@jupyterlab/settingregistry

  • Version 4.1.6
  • Published
  • 200 kB
  • 9 dependencies
  • BSD-3-Clause license

Install

npm i @jupyterlab/settingregistry
yarn add @jupyterlab/settingregistry
pnpm add @jupyterlab/settingregistry

Overview

settingregistry

Index

Variables

variable ISettingRegistry

const ISettingRegistry: Token<ISettingRegistry>;
  • The setting registry token.

Classes

class BaseSettings

class BaseSettings<
T extends ISettingRegistry.IProperty = ISettingRegistry.IProperty
> {}
  • Base settings specified by a JSON schema.

constructor

constructor(options: { schema: T });

    property schema

    readonly schema: ISettingRegistry.IProperty;
    • The plugin's schema.

    method default

    default: (key?: string) => PartialJSONValue | undefined;
    • Calculate the default value of a setting by iterating through the schema.

      Parameter key

      The name of the setting whose default value is calculated.

      Returns

      A calculated default JSON value for a specific setting.

    method isDefault

    isDefault: (user: ReadonlyPartialJSONObject) => boolean;
    • Checks if any fields are different from the default value.

    class DefaultSchemaValidator

    class DefaultSchemaValidator implements ISchemaValidator {}
    • The default implementation of a schema validator.

    constructor

    constructor();
    • Instantiate a schema validator.

    method validateData

    validateData: (
    plugin: ISettingRegistry.IPlugin,
    populate?: boolean
    ) => ISchemaValidator.IError[] | null;
    • Validate a plugin's schema and user data; populate the composite data.

      Parameter plugin

      The plugin being validated. Its composite data will be populated by reference.

      Parameter populate

      Whether plugin data should be populated, defaults to true.

      Returns

      A list of errors if either the schema or data fail to validate or null if there are no errors.

    class SettingRegistry

    class SettingRegistry implements ISettingRegistry {}
    • The default concrete implementation of a setting registry.

    constructor

    constructor(options: SettingRegistry.IOptions);
    • Create a new setting registry.

    property connector

    readonly connector: IDataConnector<ISettingRegistry.IPlugin, string, string>;
    • The data connector used by the setting registry.

    property pluginChanged

    readonly pluginChanged: ISignal<this, string>;
    • A signal that emits the name of a plugin when its settings change.

    property plugins

    readonly plugins: { [name: string]: ISettingRegistry.IPlugin };
    • The collection of setting registry plugins.

    property schema

    readonly schema: ISettingRegistry.ISchema;
    • The schema of the setting registry.

    property validator

    readonly validator: ISchemaValidator;
    • The schema validator used by the setting registry.

    method get

    get: (
    plugin: string,
    key: string
    ) => Promise<{
    composite: PartialJSONValue | undefined;
    user: PartialJSONValue | undefined;
    }>;
    • Get an individual setting.

      Parameter plugin

      The name of the plugin whose settings are being retrieved.

      Parameter key

      The name of the setting being retrieved.

      Returns

      A promise that resolves when the setting is retrieved.

    method load

    load: (
    plugin: string,
    forceTransform?: boolean
    ) => Promise<ISettingRegistry.ISettings>;
    • Load a plugin's settings into the setting registry.

      Parameter plugin

      The name of the plugin whose settings are being loaded.

      Parameter forceTransform

      An optional parameter to force replay the transforms methods.

      Returns

      A promise that resolves with a plugin settings object or rejects if the plugin is not found.

    method reload

    reload: (plugin: string) => Promise<ISettingRegistry.ISettings>;
    • Reload a plugin's settings into the registry even if they already exist.

      Parameter plugin

      The name of the plugin whose settings are being reloaded.

      Returns

      A promise that resolves with a plugin settings object or rejects with a list of ISchemaValidator.IError objects if it fails.

    method remove

    remove: (plugin: string, key: string) => Promise<void>;
    • Remove a single setting in the registry.

      Parameter plugin

      The name of the plugin whose setting is being removed.

      Parameter key

      The name of the setting being removed.

      Returns

      A promise that resolves when the setting is removed.

    method set

    set: (plugin: string, key: string, value: JSONValue) => Promise<void>;
    • Set a single setting in the registry.

      Parameter plugin

      The name of the plugin whose setting is being set.

      Parameter key

      The name of the setting being set.

      Parameter value

      The value of the setting being set.

      Returns

      A promise that resolves when the setting has been saved.

    method transform

    transform: (
    plugin: string,
    transforms: {
    compose?: ISettingRegistry.IPlugin.Transform;
    fetch?: ISettingRegistry.IPlugin.Transform;
    }
    ) => IDisposable;
    • Register a plugin transform function to act on a specific plugin.

      Parameter plugin

      The name of the plugin whose settings are transformed.

      Parameter transforms

      The transform functions applied to the plugin.

      Returns

      A disposable that removes the transforms from the registry.

      #### Notes - compose transformations: The registry automatically overwrites a plugin's default values with user overrides, but a plugin may instead wish to merge values. This behavior can be accomplished in a compose transformation. - fetch transformations: The registry uses the plugin data that is fetched from its connector. If a plugin wants to override, e.g. to update its schema with dynamic defaults, a fetch transformation can be applied.

    method upload

    upload: (plugin: string, raw: string) => Promise<void>;
    • Upload a plugin's settings.

      Parameter plugin

      The name of the plugin whose settings are being set.

      Parameter raw

      The raw plugin settings being uploaded.

      Returns

      A promise that resolves when the settings have been saved.

    class Settings

    class Settings
    extends BaseSettings<ISettingRegistry.ISchema>
    implements ISettingRegistry.ISettings {}
    • A manager for a specific plugin's settings.

    constructor

    constructor(options: Settings.IOptions);
    • Instantiate a new plugin settings manager.

    property changed

    readonly changed: ISignal<this, void>;
    • A signal that emits when the plugin's settings have changed.

    property composite

    readonly composite: ReadonlyPartialJSONObject;
    • The composite of user settings and extension defaults.

    property id

    readonly id: string;
    • The plugin name.

    property isDisposed

    readonly isDisposed: boolean;
    • Test whether the plugin settings manager disposed.

    property isModified

    readonly isModified: boolean;
    • Whether the settings have been modified by the user or not.

    property plugin

    readonly plugin: ISettingRegistry.IPlugin;

      property raw

      readonly raw: string;
      • The plugin settings raw text value.

      property registry

      readonly registry: ISettingRegistry;
      • The setting registry instance used as a back-end for these settings.

      property user

      readonly user: ReadonlyPartialJSONObject;
      • The user settings.

      property version

      readonly version: string;
      • The published version of the NPM package containing these settings.

      method annotatedDefaults

      annotatedDefaults: () => string;
      • Return the defaults in a commented JSON format.

      method dispose

      dispose: () => void;
      • Dispose of the plugin settings resources.

      method get

      get: (key: string) => {
      composite: ReadonlyPartialJSONValue | undefined;
      user: ReadonlyPartialJSONValue | undefined;
      };
      • Get an individual setting.

        Parameter key

        The name of the setting being retrieved.

        Returns

        The setting value.

        #### Notes This method returns synchronously because it uses a cached copy of the plugin settings that is synchronized with the registry.

      method remove

      remove: (key: string) => Promise<void>;
      • Remove a single setting.

        Parameter key

        The name of the setting being removed.

        Returns

        A promise that resolves when the setting is removed.

        #### Notes This function is asynchronous because it writes to the setting registry.

      method save

      save: (raw: string) => Promise<void>;
      • Save all of the plugin's user settings at once.

      method set

      set: (key: string, value: JSONValue) => Promise<void>;
      • Set a single setting.

        Parameter key

        The name of the setting being set.

        Parameter value

        The value of the setting.

        Returns

        A promise that resolves when the setting has been saved.

        #### Notes This function is asynchronous because it writes to the setting registry.

      method validate

      validate: (raw: string) => ISchemaValidator.IError[] | null;
      • Validates raw settings with comments.

        Parameter raw

        The JSON with comments string being validated.

        Returns

        A list of errors or null if valid.

      Interfaces

      interface ISchemaValidator

      interface ISchemaValidator {}
      • An implementation of a schema validator.

      method validateData

      validateData: (
      plugin: ISettingRegistry.IPlugin,
      populate?: boolean
      ) => ISchemaValidator.IError[] | null;
      • Validate a plugin's schema and user data; populate the composite data.

        Parameter plugin

        The plugin being validated. Its composite data will be populated by reference.

        Parameter populate

        Whether plugin data should be populated, defaults to true.

        Returns

        A list of errors if either the schema or data fail to validate or null if there are no errors.

      interface ISettingRegistry

      interface ISettingRegistry {}
      • The settings registry interface.

      property connector

      readonly connector: IDataConnector<ISettingRegistry.IPlugin, string, string>;
      • The data connector used by the setting registry.

      property pluginChanged

      readonly pluginChanged: ISignal<this, string>;
      • A signal that emits the name of a plugin when its settings change.

      property plugins

      readonly plugins: {
      [name: string]: ISettingRegistry.IPlugin | undefined;
      };
      • The collection of setting registry plugins.

      property schema

      readonly schema: ISettingRegistry.ISchema;
      • The schema of the setting registry.

      property validator

      readonly validator: ISchemaValidator;
      • The schema validator used by the setting registry.

      method get

      get: (
      plugin: string,
      key: string
      ) => Promise<{
      composite: PartialJSONValue | undefined;
      user: PartialJSONValue | undefined;
      }>;
      • Get an individual setting.

        Parameter plugin

        The name of the plugin whose settings are being retrieved.

        Parameter key

        The name of the setting being retrieved.

        Returns

        A promise that resolves when the setting is retrieved.

      method load

      load: (
      plugin: string,
      forceTransform?: boolean
      ) => Promise<ISettingRegistry.ISettings>;
      • Load a plugin's settings into the setting registry.

        Parameter plugin

        The name of the plugin whose settings are being loaded.

        Parameter forceTransform

        An optional parameter to force replay the transforms methods.

        Returns

        A promise that resolves with a plugin settings object or rejects if the plugin is not found.

      method reload

      reload: (plugin: string) => Promise<ISettingRegistry.ISettings>;
      • Reload a plugin's settings into the registry even if they already exist.

        Parameter plugin

        The name of the plugin whose settings are being reloaded.

        Returns

        A promise that resolves with a plugin settings object or rejects with a list of ISchemaValidator.IError objects if it fails.

      method remove

      remove: (plugin: string, key: string) => Promise<void>;
      • Remove a single setting in the registry.

        Parameter plugin

        The name of the plugin whose setting is being removed.

        Parameter key

        The name of the setting being removed.

        Returns

        A promise that resolves when the setting is removed.

      method set

      set: (plugin: string, key: string, value: PartialJSONValue) => Promise<void>;
      • Set a single setting in the registry.

        Parameter plugin

        The name of the plugin whose setting is being set.

        Parameter key

        The name of the setting being set.

        Parameter value

        The value of the setting being set.

        Returns

        A promise that resolves when the setting has been saved.

      method transform

      transform: (
      plugin: string,
      transforms: {
      compose?: ISettingRegistry.IPlugin.Transform;
      fetch?: ISettingRegistry.IPlugin.Transform;
      }
      ) => IDisposable;
      • Register a plugin transform function to act on a specific plugin.

        Parameter plugin

        The name of the plugin whose settings are transformed.

        Parameter transforms

        The transform functions applied to the plugin.

        Returns

        A disposable that removes the transforms from the registry.

        #### Notes - compose transformations: The registry automatically overwrites a plugin's default values with user overrides, but a plugin may instead wish to merge values. This behavior can be accomplished in a compose transformation. - fetch transformations: The registry uses the plugin data that is fetched from its connector. If a plugin wants to override, e.g. to update its schema with dynamic defaults, a fetch transformation can be applied.

      method upload

      upload: (plugin: string, raw: string) => Promise<void>;
      • Upload a plugin's settings.

        Parameter plugin

        The name of the plugin whose settings are being set.

        Parameter raw

        The raw plugin settings being uploaded.

        Returns

        A promise that resolves when the settings have been saved.

      Namespaces

      namespace ISchemaValidator

      namespace ISchemaValidator {}
      • A namespace for schema validator interfaces.

      interface IError

      interface IError {}
      • A schema validation error definition.

      property data

      data?: unknown;
      • handle new fields from ajv8

      property instancePath

      instancePath: string;
      • handle new fields from ajv8

      property keyword

      keyword: string | string[];
      • The keyword whose validation failed.

      property message

      message?: string;
      • The error message.

      property params

      params?: ReadonlyJSONObject;
      • Optional parameter metadata that might be included in an error.

      property parentSchema

      parentSchema?: unknown;
      • handle new fields from ajv8

      property propertyName

      propertyName?: string;
      • handle new fields from ajv8

      property schema

      schema?: unknown;
      • handle new fields from ajv8

      property schemaPath

      schemaPath: string;
      • The path in the schema where the error occurred.

      namespace ISettingRegistry

      namespace ISettingRegistry {}
      • A namespace for setting registry interfaces.

      interface IContextMenuItem

      interface IContextMenuItem extends IMenuItem {}
      • An interface describing a context menu item

      property selector

      selector: string;
      • The CSS selector for the context menu item.

        The context menu item will only be displayed in the context menu when the selector matches a node on the propagation path of the contextmenu event. This allows the menu item to be restricted to user-defined contexts.

        The selector must not contain commas.

      interface IMenu

      interface IMenu extends PartialJSONObject {}
      • An interface defining a menu.

      property disabled

      disabled?: boolean;
      • Whether a menu is disabled. False by default.

        #### Notes This allows an user to suppress a menu.

      property icon

      icon?: string;
      • Menu icon id

        #### Note The icon id will looked for in registered LabIcon.

      property id

      id: DefaultMenuId | string;
      • Unique menu identifier

      property items

      items?: IMenuItem[];
      • Menu items

      property label

      label?: string;
      • Menu title

        #### Notes Default will be the capitalized id.

      property mnemonic

      mnemonic?: number;
      • Get the mnemonic index for the title.

        #### Notes The default value is -1.

      property rank

      rank?: number;
      • The rank order of the menu among its siblings.

      interface IMenuItem

      interface IMenuItem extends PartialJSONObject {}
      • An interface describing a menu item.

      property args

      args?: PartialJSONObject;
      • The arguments for the command.

        The default value is an empty object.

      property command

      command?: string;
      • The command to execute when the item is triggered.

        The default value is an empty string.

      property disabled

      disabled?: boolean;
      • Whether a menu item is disabled. false by default.

        #### Notes This allows an user to suppress menu items.

      property rank

      rank?: number;
      • The rank order of the menu item among its siblings.

      property submenu

      submenu?: IMenu | null;
      • The submenu for a 'submenu' type item.

        The default value is null.

      property type

      type?: 'command' | 'submenu' | 'separator';
      • The type of the menu item.

        The default value is 'command'.

      interface IMetadataForm

      interface IMetadataForm extends PartialJSONObject {}
      • An interface describing the metadata form.

      property id

      id: string;
      • The section unique ID.

      property label

      label?: string;
      • The section label.

      property metadataOptions

      metadataOptions?: {
      [metadataKey: string]: IMetadataOptions;
      };
      • The jupyter properties.

      property metadataSchema

      metadataSchema: IMetadataSchema;
      • The metadata schema.

      property rank

      rank?: number;
      • The section rank in notebooktools panel.

      property showModified

      showModified?: boolean;
      • Whether to show the modified field from default value.

      property uiSchema

      uiSchema?: {
      [metadataKey: string]: UiSchema;
      };
      • The ui schema as used by react-JSON-schema-form.

      interface IMetadataOptions

      interface IMetadataOptions extends PartialJSONObject {}
      • Options to customize the widget, the field and the relevant metadata.

      property cellTypes

      cellTypes?: CellType[];
      • Cells which should have this metadata.

      property customField

      customField?: string;
      • Name of a custom react field registered.

      property customWidget

      customWidget?: string;
      • Name of a custom react widget registered.

      property metadataLevel

      metadataLevel?: 'cell' | 'notebook';
      • Metadata applied to notebook or cell.

      property writeDefault

      writeDefault?: boolean;
      • Whether to avoid writing default value in metadata.

      interface IMetadataSchema

      interface IMetadataSchema extends RJSFSchema {}
      • The metadata schema as defined in JSON schema.

      property allOf

      allOf?: Array<PartialJSONObject>;
      • Support for allOf feature of JSON schema (useful for if/then/else).

      property properties

      properties: {
      [option: string]: any;
      };
      • The properties as defined in JSON schema, and interpretable by react-JSON-schema-form.

      property required

      required?: string[];
      • The required fields.

      interface IPlugin

      interface IPlugin extends PartialJSONObject {}
      • The settings for a specific plugin.

      property data

      data: ISettingBundle;
      • The collection of values for a specified plugin.

      property id

      id: string;
      • The name of the plugin.

      property raw

      raw: string;
      • The raw user settings data as a string containing JSON with comments.

      property schema

      schema: ISchema;
      • The JSON schema for the plugin.

      property version

      version: string;
      • The published version of the NPM package containing the plugin.

      interface IProperty

      interface IProperty extends PartialJSONObject {}
      • A minimal subset of the formal JSON Schema that describes a property.

      property default

      default?: PartialJSONValue;
      • The default value, if any.

      property description

      description?: string;
      • The schema description.

      property properties

      properties?: {
      [property: string]: IProperty;
      };
      • The schema's child properties.

      property title

      title?: string;
      • The title of a property.

      property type

      type?: Primitive | Primitive[];
      • The type or types of the data.

      interface ISchema

      interface ISchema extends IProperty {}
      • A schema type that is a minimal subset of the formal JSON Schema along with optional JupyterLab rendering hints.

      property 'jupyter.lab.menus'

      'jupyter.lab.menus'?: {
      main: IMenu[];
      context: IContextMenuItem[];
      };
      • The JupyterLab menus that are created by a plugin's schema.

      property 'jupyter.lab.metadataforms'

      'jupyter.lab.metadataforms'?: IMetadataForm[];
      • The JupyterLab metadata-form schema

      property 'jupyter.lab.setting-deprecated'

      'jupyter.lab.setting-deprecated'?: boolean;
      • Whether the schema is deprecated.

        #### Notes This flag can be used by functionality that loads this plugin's settings from the registry. For example, the setting editor does not display a plugin's settings if it is set to true.

      property 'jupyter.lab.setting-icon-class'

      'jupyter.lab.setting-icon-class'?: string;
      • The JupyterLab icon class hint.

      property 'jupyter.lab.setting-icon-label'

      'jupyter.lab.setting-icon-label'?: string;
      • The JupyterLab icon label hint.

      property 'jupyter.lab.setting-icon'

      'jupyter.lab.setting-icon'?: string;
      • The JupyterLab icon hint.

      property 'jupyter.lab.shortcuts'

      'jupyter.lab.shortcuts'?: IShortcut[];
      • The JupyterLab shortcuts that are created by a plugin's schema.

      property 'jupyter.lab.toolbars'

      'jupyter.lab.toolbars'?: {
      [factory: string]: IToolbarItem[];
      };
      • The JupyterLab toolbars created by a plugin's schema.

        #### Notes The toolbar items are grouped by document or widget factory name that will contain a toolbar.

      property 'jupyter.lab.transform'

      'jupyter.lab.transform'?: boolean;
      • A flag that indicates plugin should be transformed before being used by the setting registry.

        #### Notes If this value is set to true, the setting registry will wait until a transformation has been registered (by calling the transform() method of the registry) for the plugin ID before resolving load() promises. This means that if the attribute is set to true but no transformation is registered in time, calls to load() a plugin will eventually time out and reject.

      property type

      type: 'object';
      • The root schema is always an object.

      interface ISettingBundle

      interface ISettingBundle extends PartialJSONObject {}
      • The setting values for a plugin.

      property composite

      composite: PartialJSONObject;
      • A composite of the user setting values and the plugin schema defaults.

        #### Notes The composite values will always be a superset of the user values.

      property user

      user: PartialJSONObject;
      • The user setting values.

      interface ISettings

      interface ISettings extends IDisposable {}
      • An interface for manipulating the settings of a specific plugin.

      property changed

      readonly changed: ISignal<this, void>;
      • A signal that emits when the plugin's settings have changed.

      property composite

      readonly composite: ReadonlyPartialJSONObject;
      • The composite of user settings and extension defaults.

      property id

      readonly id: string;
      • The plugin's ID.

      property plugin

      readonly plugin: ISettingRegistry.IPlugin;

        property raw

        readonly raw: string;
        • The plugin settings raw text value.

        property schema

        readonly schema: ISettingRegistry.ISchema;
        • The plugin's schema.

        property user

        readonly user: ReadonlyPartialJSONObject;
        • The user settings.

        property version

        readonly version: string;
        • The published version of the NPM package containing these settings.

        method annotatedDefaults

        annotatedDefaults: () => string;
        • Return the defaults in a commented JSON format.

        method default

        default: (key: string) => PartialJSONValue | undefined;
        • Calculate the default value of a setting by iterating through the schema.

          Parameter key

          The name of the setting whose default value is calculated.

          Returns

          A calculated default JSON value for a specific setting.

        method get

        get: (key: string) => {
        composite: ReadonlyPartialJSONValue | undefined;
        user: ReadonlyPartialJSONValue | undefined;
        };
        • Get an individual setting.

          Parameter key

          The name of the setting being retrieved.

          Returns

          The setting value.

        method remove

        remove: (key: string) => Promise<void>;
        • Remove a single setting.

          Parameter key

          The name of the setting being removed.

          Returns

          A promise that resolves when the setting is removed.

          #### Notes This function is asynchronous because it writes to the setting registry.

        method save

        save: (raw: string) => Promise<void>;
        • Save all of the plugin's user settings at once.

        method set

        set: (key: string, value: PartialJSONValue) => Promise<void>;
        • Set a single setting.

          Parameter key

          The name of the setting being set.

          Parameter value

          The value of the setting.

          Returns

          A promise that resolves when the setting has been saved.

          #### Notes This function is asynchronous because it writes to the setting registry.

        method validate

        validate: (raw: string) => ISchemaValidator.IError[] | null;
        • Validates raw settings with comments.

          Parameter raw

          The JSON with comments string being validated.

          Returns

          A list of errors or null if valid.

        interface IShortcut

        interface IShortcut extends PartialJSONObject {}
        • An interface describing a JupyterLab keyboard shortcut.

        property args

        args?: PartialJSONObject;
        • The optional arguments passed into the shortcut's command.

        property command

        command: string;
        • The command invoked by the shortcut.

        property disabled

        disabled?: boolean;
        • Whether a keyboard shortcut is disabled. False by default.

        property keys

        keys: string[];
        • The key sequence of the shortcut.

          ### Notes

          If this is a list like ['Ctrl A', 'B'], the user needs to press Ctrl A followed by B to trigger the shortcuts.

        property selector

        selector: string;
        • The CSS selector applicable to the shortcut.

        interface IToolbarItem

        interface IToolbarItem extends PartialJSONObject {}
        • An interface describing a toolbar item.

        property args

        args?: PartialJSONObject;
        • The arguments for the command.

          The default value is an empty object.

        property command

        command?: string;
        • The command to execute when the item is triggered.

          The default value is an empty string.

        property disabled

        disabled?: boolean;
        • Whether the toolbar item is ignored (i.e. not created). false by default.

          #### Notes This allows an user to suppress toolbar items.

        property icon

        icon?: string;
        • Item icon id

          #### Note The id will be looked for in the LabIcon registry. The command icon will be overridden by this label if defined.

        property label

        label?: string;
        • Item label

          #### Note The command label will be overridden by this label if defined.

        property name

        name: string;
        • Unique toolbar item name

        property rank

        rank?: number;
        • The rank order of the toolbar item among its siblings.

        property type

        type?: 'command' | 'spacer';
        • The type of the toolbar item.

        type DefaultMenuId

        type DefaultMenuId =
        | 'jp-menu-file'
        | 'jp-menu-file-new'
        | 'jp-menu-edit'
        | 'jp-menu-help'
        | 'jp-menu-kernel'
        | 'jp-menu-run'
        | 'jp-menu-settings'
        | 'jp-menu-view'
        | 'jp-menu-tabs';
        • The menu ids defined by default.

        type Primitive

        type Primitive = 'array' | 'boolean' | 'null' | 'number' | 'object' | 'string';
        • The primitive types available in a JSON schema.

        namespace ISettingRegistry.IPlugin

        namespace ISettingRegistry.IPlugin {}
        • A namespace for plugin functionality.

        type Phase

        type Phase = 'compose' | 'fetch';
        • The phases during which a transformation may be applied to a plugin.

        type Transform

        type Transform = (plugin: IPlugin) => IPlugin;
        • A function that transforms a plugin object before it is consumed by the setting registry.

        namespace SettingRegistry

        namespace SettingRegistry {}
        • A namespace for SettingRegistry statics.

        function filterDisabledItems

        filterDisabledItems: <T extends ISettingRegistry.IMenuItem>(items: T[]) => T[];
        • Remove disabled entries from menu items

          Parameter items

          Menu items

          Returns

          Filtered menu items

        function reconcileItems

        reconcileItems: <T extends ISettingRegistry.IMenuItem>(
        reference?: T[],
        addition?: T[],
        warn?: boolean,
        addNewItems?: boolean
        ) => T[] | undefined;
        • Merge two set of menu items.

          Parameter reference

          Reference set of menu items

          Parameter addition

          New items to add

          Parameter warn

          Whether to warn if item is duplicated; default to false

          Returns

          The merged set of items

        function reconcileMenus

        reconcileMenus: (
        reference: ISettingRegistry.IMenu[] | null,
        addition: ISettingRegistry.IMenu[] | null,
        warn?: boolean,
        addNewItems?: boolean
        ) => ISettingRegistry.IMenu[];
        • Reconcile the menus.

          Parameter reference

          The reference list of menus.

          Parameter addition

          The list of menus to add.

          Parameter warn

          Warn if the command items are duplicated within the same menu.

          Returns

          The reconciled list of menus.

        function reconcileShortcuts

        reconcileShortcuts: (
        defaults: ISettingRegistry.IShortcut[],
        user: ISettingRegistry.IShortcut[]
        ) => ISettingRegistry.IShortcut[];
        • Reconcile default and user shortcuts and return the composite list.

          Parameter defaults

          The list of default shortcuts.

          Parameter user

          The list of user shortcut overrides and additions.

          Returns

          A loadable list of shortcuts (omitting disabled and overridden).

        function reconcileToolbarItems

        reconcileToolbarItems: (
        reference?: ISettingRegistry.IToolbarItem[],
        addition?: ISettingRegistry.IToolbarItem[],
        warn?: boolean
        ) => ISettingRegistry.IToolbarItem[] | undefined;
        • Merge two set of toolbar items.

          Parameter reference

          Reference set of toolbar items

          Parameter addition

          New items to add

          Parameter warn

          Whether to warn if item is duplicated; default to false

          Returns

          The merged set of items

        interface IOptions

        interface IOptions {}
        • The instantiation options for a setting registry

        property connector

        connector: IDataConnector<ISettingRegistry.IPlugin, string>;
        • The data connector used by the setting registry.

        property plugins

        plugins?: ISettingRegistry.IPlugin[];
        • Preloaded plugin data to populate the setting registry.

        property timeout

        timeout?: number;
        • The number of milliseconds before a load() call to the registry waits before timing out if it requires a transformation that has not been registered.

          #### Notes The default value is 7000.

        property validator

        validator?: ISchemaValidator;
        • The validator used to enforce the settings JSON schema.

        namespace Settings

        namespace Settings {}
        • A namespace for Settings statics.

        interface IOptions

        interface IOptions {}
        • The instantiation options for a Settings object.

        property plugin

        plugin: ISettingRegistry.IPlugin;
        • The setting values for a plugin.

        property registry

        registry: ISettingRegistry;
        • The system registry instance used by the settings manager.

        Package Files (3)

        Dependencies (9)

        Dev Dependencies (5)

        Peer Dependencies (1)

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@jupyterlab/settingregistry.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@jupyterlab/settingregistry)
        • HTML
          <a href="https://www.jsdocs.io/package/@jupyterlab/settingregistry"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>