Skip to content
Snippets Groups Projects
Christoph Reiter's avatar
Reiter, Christoph authored
The goal of this new component is to be a generic selector for API resources,
unlike the organization/person select, which hardcode various things for their
used resource.

Instead this provides some events which can be used to customize the creation of the
URL for fetching as well as for formatting the list of results.

Atm this only handles the organization and no search-as-you-type like the person select,
but maybe this can be extended in the future.
433d5c85
History

Frontend Toolkit

Overview

This repository uses yarn 1.x workspaces to link multiple separate packages together and to hoist all shared dependencies to the top level node_modules.

In addition we use lerna for running commands for all contained packages (until we switch to yarn 2.x which should support this directly).

Setup

yarn install

cd packges/some-package and continue development with yarn run watch etc.

Other commands

  • yarn run test - Run test for all packages
  • yarn run clean - Removes all node_modules directories.

Publishing packages to npmjs.com

There is an automatic publishing process initiated for each package if code is pushed to the master branch, if the package isn't set to private in its package.json and the version number in its package.json is higher than the version number on npmjs.com.

Reserved attributes

Attribute Description
subscribe Used in all components to subscribe to attributes set by a provider
unsubscribe Reserved for future use
auth Authentication information, set by the authentication component
lang Currently selected language, set by the language selector
entry-point-url Entry point url for all api requests
requested-login-status Used by the login buttons to trigger a login in auth components
initial-file-handling-state Used by the file-handling component to sync file source/sink at first time open
clipboard-files Used by the file-handling component to use the clipboard source and sink
analytics-event Used to send analytics events to the Matomo component

Reserved events

Event Description
dbp-subscribe Event to tell a provider that the component wants to subscribe to an attribute
dbp-unsubscribe Event to tell a provider that the component wants to unsubscribe from an attribute
dbp-set-property Event to tell a provider that a property should be changed