@combeenation/configurator-client
    Preparing search index...

    Class ConfiguratorClient

    Index

    Constructors

    Properties

    version: "@VERSION@" = version

    Methods

    • Parameters

      • options: CfgrConnectionOptions

        Ignored, when on a managed configurator URL which are all URLs on the domain portal.combeenation.com.

        The client retrieves all the necessary options from the managed configurator URL.

        Your configurator will run under a managed configurator URL when:

        • Opening the preview of your configurator from within the configurator editor
        • Opening a configurator from a published or staged URL
        • Basically when using any link to your configurator shown on the Combeenation plattform

      Returns Promise<void>

    • Use the respective component methods like ValueComponent.getValue etc. which come with the auto generated component typings of your configurator.

      See {TODO link to docs} for more information.

      Type Parameters

      • T extends unknown

      Parameters

      • cmpName: string

      Returns Promise<undefined | T>

    • Type Parameters

      Parameters

      • listener: CmpValuesChangedListener<TInput["name"]>

        Called whenever the value of at least 1 component has changed.
        Returns an object that indicates which components have actually changed.

      • components: TInput[]

        Only call the listener if one of the given cmps have changed

      • lazy: boolean = false

        false: Immediately fetch the values of all changed components.
        true: Trigger the listener but don't fetch values until specifically requested. This could reduce data traffic when only some components are required in the listener, due to conditions or similar.

      Returns Promise<void>

      [SCENARIO 1] where lazy: true could be benefical

      CmpUtils.onAnyCmpValueChanged(() => {
      const useBigData = CmpSimpleBool.getValue();
      if(useBigData) {
      // only now the data will be retrieved from the server
      const bigData = await CmpBigData.getValue();
      }

      }, [CmpBigData, CmpSimpleBool, CmpSimpleText], true);

      [SCENARIO 2] where lazy: false could be benefical

      CmpUtils.onAnyCmpValueChanged(() => {
      // The data for both values has been fetched in the background, so no further server request is necessary
      const bigData1 = await CmpBigData1.getValue();
      const bigData2 = await CmpBigData2.getValue();
      }, [CmpBigData1, CmpBigData2]);
    • Use the respective component methods like ValueComponent.onValueChanged etc. which come with the auto generated component typings of your configurator.

      See {TODO link to docs} for more information.

      Type Parameters

      • TValue extends unknown

      Parameters

      • cmpName: string
      • listener: CmpValueChangedListener<TValue>
      • Optionalcondition: CmpValueChangedCondition<TValue>
      • callImmediately: boolean = false

      Returns Promise<void>

    • When starting a new configuration, the server creates a unique configuration ID which can be used to create copies or further edit existing configurations.

      When editing an existing configuration, an additional authToken is required to prevent unauthorized access.

      See CfgrConnectionOptions for more information.

      Parameters

      • listener: (cfgnId: string, authToken: string) => void

      Returns void

    • Allows setting of input values for multiple components at once.

      Parameters

      • values: { name: string; parameter?: string | number | object; value: unknown }[]

      Returns Promise<void>