@kosdev-code/kos-ddk-models 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants.d.ts +3 -0
- package/constants.d.ts.map +1 -0
- package/index.d.ts +30 -0
- package/index.d.ts.map +1 -0
- package/index.js +1 -0
- package/index.mjs +2609 -0
- package/lib/agitation-control/agitation-control-model.d.ts +50 -0
- package/lib/agitation-control/agitation-control-model.d.ts.map +1 -0
- package/lib/agitation-control/agitation-control-registration.d.ts +89 -0
- package/lib/agitation-control/agitation-control-registration.d.ts.map +1 -0
- package/lib/agitation-control/index.d.ts +4 -0
- package/lib/agitation-control/index.d.ts.map +1 -0
- package/lib/agitation-control/types/index.d.ts +7 -0
- package/lib/animation/animation-model.d.ts +14 -0
- package/lib/animation/animation-model.d.ts.map +1 -0
- package/lib/animation/animation-registration.d.ts +86 -0
- package/lib/animation/animation-registration.d.ts.map +1 -0
- package/lib/animation/index.d.ts +4 -0
- package/lib/animation/index.d.ts.map +1 -0
- package/lib/animation/services/animation-services.d.ts +10 -0
- package/lib/animation/services/animation-services.d.ts.map +1 -0
- package/lib/animation/services/index.d.ts +2 -0
- package/lib/animation/services/index.d.ts.map +1 -0
- package/lib/animation/types/index.d.ts +14 -0
- package/lib/application/application-model.d.ts +33 -0
- package/lib/application/application-model.d.ts.map +1 -0
- package/lib/application/application-registration.d.ts +86 -0
- package/lib/application/application-registration.d.ts.map +1 -0
- package/lib/application/index.d.ts +4 -0
- package/lib/application/index.d.ts.map +1 -0
- package/lib/application/services/application-services.d.ts +29 -0
- package/lib/application/services/application-services.d.ts.map +1 -0
- package/lib/application/services/index.d.ts +2 -0
- package/lib/application/services/index.d.ts.map +1 -0
- package/lib/application/types/index.d.ts +31 -0
- package/lib/auth/auth-model.d.ts +17 -0
- package/lib/auth/auth-model.d.ts.map +1 -0
- package/lib/auth/auth-registration.d.ts +84 -0
- package/lib/auth/auth-registration.d.ts.map +1 -0
- package/lib/auth/index.d.ts +4 -0
- package/lib/auth/index.d.ts.map +1 -0
- package/lib/auth/services/auth-services.d.ts +10 -0
- package/lib/auth/services/auth-services.d.ts.map +1 -0
- package/lib/auth/services/index.d.ts +2 -0
- package/lib/auth/services/index.d.ts.map +1 -0
- package/lib/auth/types/index.d.ts +12 -0
- package/lib/carb-water/carb-water-model.d.ts +18 -0
- package/lib/carb-water/carb-water-model.d.ts.map +1 -0
- package/lib/carb-water/carb-water-registration.d.ts +85 -0
- package/lib/carb-water/carb-water-registration.d.ts.map +1 -0
- package/lib/carb-water/index.d.ts +4 -0
- package/lib/carb-water/index.d.ts.map +1 -0
- package/lib/carb-water/services/carb-water-services.d.ts +6 -0
- package/lib/carb-water/services/carb-water-services.d.ts.map +1 -0
- package/lib/carb-water/services/index.d.ts +2 -0
- package/lib/carb-water/services/index.d.ts.map +1 -0
- package/lib/carb-water/types/index.d.ts +1 -0
- package/lib/copy-logs/copy-logs-model.d.ts +45 -0
- package/lib/copy-logs/copy-logs-model.d.ts.map +1 -0
- package/lib/copy-logs/copy-logs-registration.d.ts +89 -0
- package/lib/copy-logs/copy-logs-registration.d.ts.map +1 -0
- package/lib/copy-logs/index.d.ts +5 -0
- package/lib/copy-logs/index.d.ts.map +1 -0
- package/lib/copy-logs/services/copy-logs-services.d.ts +22 -0
- package/lib/copy-logs/services/copy-logs-services.d.ts.map +1 -0
- package/lib/copy-logs/services/index.d.ts +2 -0
- package/lib/copy-logs/services/index.d.ts.map +1 -0
- package/lib/copy-logs/types/index.d.ts +8 -0
- package/lib/dashboard-operations/dashboard-operations-model.d.ts +28 -0
- package/lib/dashboard-operations/dashboard-operations-model.d.ts.map +1 -0
- package/lib/dashboard-operations/dashboard-operations-registration.d.ts +86 -0
- package/lib/dashboard-operations/dashboard-operations-registration.d.ts.map +1 -0
- package/lib/dashboard-operations/index.d.ts +4 -0
- package/lib/dashboard-operations/index.d.ts.map +1 -0
- package/lib/dashboard-operations/services/dashboard-operations-services.d.ts +7 -0
- package/lib/dashboard-operations/services/dashboard-operations-services.d.ts.map +1 -0
- package/lib/dashboard-operations/services/index.d.ts +2 -0
- package/lib/dashboard-operations/services/index.d.ts.map +1 -0
- package/lib/dashboard-operations/types/index.d.ts +21 -0
- package/lib/dispenser/dispenser-model.d.ts +13 -0
- package/lib/dispenser/dispenser-model.d.ts.map +1 -0
- package/lib/dispenser/dispenser-registration.d.ts +86 -0
- package/lib/dispenser/dispenser-registration.d.ts.map +1 -0
- package/lib/dispenser/index.d.ts +4 -0
- package/lib/dispenser/index.d.ts.map +1 -0
- package/lib/dispenser/services/dispenser-services.d.ts +10 -0
- package/lib/dispenser/services/dispenser-services.d.ts.map +1 -0
- package/lib/dispenser/services/index.d.ts +2 -0
- package/lib/dispenser/services/index.d.ts.map +1 -0
- package/lib/dispenser/types/index.d.ts +9 -0
- package/lib/dispenser-info/dispenser-info-model.d.ts +13 -0
- package/lib/dispenser-info/dispenser-info-model.d.ts.map +1 -0
- package/lib/dispenser-info/dispenser-info-registration.d.ts +84 -0
- package/lib/dispenser-info/dispenser-info-registration.d.ts.map +1 -0
- package/lib/dispenser-info/index.d.ts +4 -0
- package/lib/dispenser-info/index.d.ts.map +1 -0
- package/lib/dispenser-info/services/dispenser-info-services.d.ts +10 -0
- package/lib/dispenser-info/services/dispenser-info-services.d.ts.map +1 -0
- package/lib/dispenser-info/services/index.d.ts +2 -0
- package/lib/dispenser-info/services/index.d.ts.map +1 -0
- package/lib/dispenser-info/types/index.d.ts +10 -0
- package/lib/door/door-model.d.ts +20 -0
- package/lib/door/door-model.d.ts.map +1 -0
- package/lib/door/door-registration.d.ts +87 -0
- package/lib/door/door-registration.d.ts.map +1 -0
- package/lib/door/index.d.ts +4 -0
- package/lib/door/index.d.ts.map +1 -0
- package/lib/door/types/index.d.ts +3 -0
- package/lib/enrollment/enrollment-model.d.ts +14 -0
- package/lib/enrollment/enrollment-model.d.ts.map +1 -0
- package/lib/enrollment/enrollment-registration.d.ts +84 -0
- package/lib/enrollment/enrollment-registration.d.ts.map +1 -0
- package/lib/enrollment/index.d.ts +4 -0
- package/lib/enrollment/index.d.ts.map +1 -0
- package/lib/enrollment/services/enrollment-services.d.ts +10 -0
- package/lib/enrollment/services/enrollment-services.d.ts.map +1 -0
- package/lib/enrollment/services/index.d.ts +2 -0
- package/lib/enrollment/services/index.d.ts.map +1 -0
- package/lib/enrollment/types/index.d.ts +10 -0
- package/lib/extension/index.d.ts +2 -0
- package/lib/extension/index.d.ts.map +1 -0
- package/lib/fcm-pump/fcm-pump-model.d.ts +28 -0
- package/lib/fcm-pump/fcm-pump-model.d.ts.map +1 -0
- package/lib/fcm-pump/fcm-pump-registration.d.ts +87 -0
- package/lib/fcm-pump/fcm-pump-registration.d.ts.map +1 -0
- package/lib/fcm-pump/index.d.ts +5 -0
- package/lib/fcm-pump/index.d.ts.map +1 -0
- package/lib/fcm-pump/services/fcm-pump-services.d.ts +17 -0
- package/lib/fcm-pump/services/fcm-pump-services.d.ts.map +1 -0
- package/lib/fcm-pump/services/index.d.ts +2 -0
- package/lib/fcm-pump/services/index.d.ts.map +1 -0
- package/lib/fcm-pump/types/index.d.ts +5 -0
- package/lib/ingredient-summary/index.d.ts +3 -0
- package/lib/ingredient-summary/index.d.ts.map +1 -0
- package/lib/ingredient-summary/ingredient-summary-model.d.ts +18 -0
- package/lib/ingredient-summary/ingredient-summary-model.d.ts.map +1 -0
- package/lib/ingredient-summary/ingredient-summary-registration.d.ts +84 -0
- package/lib/ingredient-summary/ingredient-summary-registration.d.ts.map +1 -0
- package/lib/ingredient-summary/types/index.d.ts +11 -0
- package/lib/lfcv-pump/index.d.ts +5 -0
- package/lib/lfcv-pump/index.d.ts.map +1 -0
- package/lib/lfcv-pump/lfcv-pump-model.d.ts +20 -0
- package/lib/lfcv-pump/lfcv-pump-model.d.ts.map +1 -0
- package/lib/lfcv-pump/lfcv-pump-registration.d.ts +87 -0
- package/lib/lfcv-pump/lfcv-pump-registration.d.ts.map +1 -0
- package/lib/lfcv-pump/services/index.d.ts +2 -0
- package/lib/lfcv-pump/services/index.d.ts.map +1 -0
- package/lib/lfcv-pump/services/lfcv-pump-services.d.ts +10 -0
- package/lib/lfcv-pump/services/lfcv-pump-services.d.ts.map +1 -0
- package/lib/lfcv-pump/types/index.d.ts +5 -0
- package/lib/lockout/index.d.ts +5 -0
- package/lib/lockout/index.d.ts.map +1 -0
- package/lib/lockout/lockout-model.d.ts +79 -0
- package/lib/lockout/lockout-model.d.ts.map +1 -0
- package/lib/lockout/lockout-registration.d.ts +89 -0
- package/lib/lockout/lockout-registration.d.ts.map +1 -0
- package/lib/lockout/services/index.d.ts +2 -0
- package/lib/lockout/services/index.d.ts.map +1 -0
- package/lib/lockout/services/lockout-services.d.ts +3 -0
- package/lib/lockout/services/lockout-services.d.ts.map +1 -0
- package/lib/lockout/types/index.d.ts +1 -0
- package/lib/macro-assignment/index.d.ts +3 -0
- package/lib/macro-assignment/index.d.ts.map +1 -0
- package/lib/macro-assignment/macro-assignment-model.d.ts +78 -0
- package/lib/macro-assignment/macro-assignment-model.d.ts.map +1 -0
- package/lib/macro-assignment/macro-assignment-registration.d.ts +86 -0
- package/lib/macro-assignment/macro-assignment-registration.d.ts.map +1 -0
- package/lib/macro-assignment/services/index.d.ts +2 -0
- package/lib/macro-assignment/services/index.d.ts.map +1 -0
- package/lib/macro-assignment/services/macro-assignment-services.d.ts +2 -0
- package/lib/macro-assignment/services/macro-assignment-services.d.ts.map +1 -0
- package/lib/macro-assignment/types/index.d.ts +39 -0
- package/lib/network-test/index.d.ts +5 -0
- package/lib/network-test/index.d.ts.map +1 -0
- package/lib/network-test/network-test-container-model.d.ts +23 -0
- package/lib/network-test/network-test-container-model.d.ts.map +1 -0
- package/lib/network-test/network-test-container-registration.d.ts +86 -0
- package/lib/network-test/network-test-container-registration.d.ts.map +1 -0
- package/lib/network-test/network-test-model.d.ts +21 -0
- package/lib/network-test/network-test-model.d.ts.map +1 -0
- package/lib/network-test/network-test-registration.d.ts +84 -0
- package/lib/network-test/network-test-registration.d.ts.map +1 -0
- package/lib/network-test/services/index.d.ts +2 -0
- package/lib/network-test/services/index.d.ts.map +1 -0
- package/lib/network-test/services/network-test-services.d.ts +37 -0
- package/lib/network-test/services/network-test-services.d.ts.map +1 -0
- package/lib/network-test/types/index.d.ts +44 -0
- package/lib/nutritive-sweetener/index.d.ts +4 -0
- package/lib/nutritive-sweetener/index.d.ts.map +1 -0
- package/lib/nutritive-sweetener/nutritive-sweetener-model.d.ts +18 -0
- package/lib/nutritive-sweetener/nutritive-sweetener-model.d.ts.map +1 -0
- package/lib/nutritive-sweetener/nutritive-sweetener-registration.d.ts +85 -0
- package/lib/nutritive-sweetener/nutritive-sweetener-registration.d.ts.map +1 -0
- package/lib/nutritive-sweetener/services/index.d.ts +2 -0
- package/lib/nutritive-sweetener/services/index.d.ts.map +1 -0
- package/lib/nutritive-sweetener/services/nutritive-sweetener-services.d.ts +6 -0
- package/lib/nutritive-sweetener/services/nutritive-sweetener-services.d.ts.map +1 -0
- package/lib/nutritive-sweetener/types/index.d.ts +1 -0
- package/lib/plain-water/index.d.ts +4 -0
- package/lib/plain-water/index.d.ts.map +1 -0
- package/lib/plain-water/plain-water-model.d.ts +19 -0
- package/lib/plain-water/plain-water-model.d.ts.map +1 -0
- package/lib/plain-water/plain-water-registration.d.ts +85 -0
- package/lib/plain-water/plain-water-registration.d.ts.map +1 -0
- package/lib/plain-water/services/index.d.ts +2 -0
- package/lib/plain-water/services/index.d.ts.map +1 -0
- package/lib/plain-water/services/plain-water-services.d.ts +6 -0
- package/lib/plain-water/services/plain-water-services.d.ts.map +1 -0
- package/lib/plain-water/types/index.d.ts +1 -0
- package/lib/reboot/index.d.ts +4 -0
- package/lib/reboot/index.d.ts.map +1 -0
- package/lib/reboot/reboot-model.d.ts +14 -0
- package/lib/reboot/reboot-model.d.ts.map +1 -0
- package/lib/reboot/reboot-registration.d.ts +84 -0
- package/lib/reboot/reboot-registration.d.ts.map +1 -0
- package/lib/reboot/services/index.d.ts +2 -0
- package/lib/reboot/services/index.d.ts.map +1 -0
- package/lib/reboot/services/reboot-services.d.ts +2 -0
- package/lib/reboot/services/reboot-services.d.ts.map +1 -0
- package/lib/reboot/types/index.d.ts +8 -0
- package/lib/registration.d.ts +4 -0
- package/lib/registration.d.ts.map +1 -0
- package/lib/settings/index.d.ts +4 -0
- package/lib/settings/index.d.ts.map +1 -0
- package/lib/settings/services/index.d.ts +2 -0
- package/lib/settings/services/index.d.ts.map +1 -0
- package/lib/settings/services/settings-services.d.ts +13 -0
- package/lib/settings/services/settings-services.d.ts.map +1 -0
- package/lib/settings/settings-model.d.ts +23 -0
- package/lib/settings/settings-model.d.ts.map +1 -0
- package/lib/settings/settings-registration.d.ts +86 -0
- package/lib/settings/settings-registration.d.ts.map +1 -0
- package/lib/settings/types/index.d.ts +26 -0
- package/lib/setup-step/index.d.ts +5 -0
- package/lib/setup-step/index.d.ts.map +1 -0
- package/lib/setup-step/services/index.d.ts +2 -0
- package/lib/setup-step/services/index.d.ts.map +1 -0
- package/lib/setup-step/services/setup-step-services.d.ts +13 -0
- package/lib/setup-step/services/setup-step-services.d.ts.map +1 -0
- package/lib/setup-step/setup-step-container-model.d.ts +29 -0
- package/lib/setup-step/setup-step-container-model.d.ts.map +1 -0
- package/lib/setup-step/setup-step-container-registration.d.ts +86 -0
- package/lib/setup-step/setup-step-container-registration.d.ts.map +1 -0
- package/lib/setup-step/setup-step-model.d.ts +21 -0
- package/lib/setup-step/setup-step-model.d.ts.map +1 -0
- package/lib/setup-step/setup-step-registration.d.ts +84 -0
- package/lib/setup-step/setup-step-registration.d.ts.map +1 -0
- package/lib/setup-step/types/index.d.ts +40 -0
- package/lib/trouble-action/index.d.ts +4 -0
- package/lib/trouble-action/index.d.ts.map +1 -0
- package/lib/trouble-action/trouble-action-model.d.ts +20 -0
- package/lib/trouble-action/trouble-action-model.d.ts.map +1 -0
- package/lib/trouble-action/trouble-action-registration.d.ts +89 -0
- package/lib/trouble-action/trouble-action-registration.d.ts.map +1 -0
- package/lib/trouble-action/types/index.d.ts +8 -0
- package/lib/utilities/index.d.ts +5 -0
- package/lib/utilities/index.d.ts.map +1 -0
- package/lib/utilities/services/index.d.ts +2 -0
- package/lib/utilities/services/index.d.ts.map +1 -0
- package/lib/utilities/services/utilities-services.d.ts +13 -0
- package/lib/utilities/services/utilities-services.d.ts.map +1 -0
- package/lib/utilities/types/index.d.ts +32 -0
- package/lib/utilities/utilities-container-model.d.ts +19 -0
- package/lib/utilities/utilities-container-model.d.ts.map +1 -0
- package/lib/utilities/utilities-container-registration.d.ts +86 -0
- package/lib/utilities/utilities-container-registration.d.ts.map +1 -0
- package/lib/utilities/utilities-model.d.ts +19 -0
- package/lib/utilities/utilities-model.d.ts.map +1 -0
- package/lib/utilities/utilities-registration.d.ts +84 -0
- package/lib/utilities/utilities-registration.d.ts.map +1 -0
- package/lib/utils/assembly-utils.d.ts +17 -0
- package/lib/utils/assembly-utils.d.ts.map +1 -0
- package/lib/utils/holder-view-extension.d.ts +16 -0
- package/lib/utils/holder-view-extension.d.ts.map +1 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/time-utils.d.ts +9 -0
- package/lib/utils/time-utils.d.ts.map +1 -0
- package/lib/utils/trouble-visibility-filter.d.ts +5 -0
- package/lib/utils/trouble-visibility-filter.d.ts.map +1 -0
- package/package.json +20 -0
- package/start/index.d.ts +5 -0
- package/start/index.d.ts.map +1 -0
- package/start/services/index.d.ts +2 -0
- package/start/services/index.d.ts.map +1 -0
- package/start/services/start-services.d.ts +6 -0
- package/start/services/start-services.d.ts.map +1 -0
- package/start/start-model.d.ts +17 -0
- package/start/start-model.d.ts.map +1 -0
- package/start/start-registration.d.ts +89 -0
- package/start/start-registration.d.ts.map +1 -0
- package/start/types/index.d.ts +1 -0
- package/types/global.d.ts +19 -0
- package/types/global.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -0
- package/utils/openapi.d.ts +9271 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SetupStepContainerModel, SetupStepContainerOptions, SetupStepModel } from './types';
|
|
2
|
+
import { SetupStepResponse } from './services';
|
|
3
|
+
import { AuthModel } from '../auth';
|
|
4
|
+
import { IKosModelContainer, KosCreationContext } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
5
|
+
|
|
6
|
+
export declare const MODEL_TYPE = "setup-step-container-model";
|
|
7
|
+
export declare class SetupStepContainerModelImpl implements SetupStepContainerModel {
|
|
8
|
+
id: string;
|
|
9
|
+
private _currentStep?;
|
|
10
|
+
private logger;
|
|
11
|
+
models: IKosModelContainer<SetupStepModel>;
|
|
12
|
+
authModel: AuthModel;
|
|
13
|
+
constructor(modelId: string, options: SetupStepContainerOptions, context: KosCreationContext);
|
|
14
|
+
get currentStep(): SetupStepModel | undefined;
|
|
15
|
+
setCurrentStep(id: string): void;
|
|
16
|
+
nextStep(): void;
|
|
17
|
+
get hasIncompletePreSteps(): boolean;
|
|
18
|
+
get setupRequired(): boolean;
|
|
19
|
+
get firstIncompleteStep(): SetupStepModel | undefined;
|
|
20
|
+
get isLastStep(): boolean;
|
|
21
|
+
get data(): SetupStepModel[];
|
|
22
|
+
getModel(id: string): SetupStepModel | undefined;
|
|
23
|
+
addModel(model: SetupStepModel): void;
|
|
24
|
+
removeModel(id: string): void;
|
|
25
|
+
init(): Promise<void>;
|
|
26
|
+
load(): Promise<void>;
|
|
27
|
+
handleStepChanges(steps: SetupStepResponse[]): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=setup-step-container-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-step-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/setup-step/setup-step-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,KAAK,EAEV,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,UAAU,+BAA+B,CAAC;AAevD,qBACa,2BAA4B,YAAW,uBAAuB;IACzE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,YAAY,CAAC,CAAiB;IACtC,OAAO,CAAC,MAAM,CAAmB;IACvB,MAAM,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAGrD,SAAS,EAAG,SAAS,CAAC;gBAGpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,yBAAyB,EAClC,OAAO,EAAE,kBAAkB;IAe7B,IAAI,WAAW,+BAEd;IAED,cAAc,CAAC,EAAE,EAAE,MAAM;IAMzB,QAAQ;IAYR,IAAI,qBAAqB,YAExB;IAED,IAAI,aAAa,YAEhB;IACD,IAAI,mBAAmB,+BAEtB;IACD,IAAI,UAAU,YAIb;IAED,IAAI,IAAI,qBAEP;IAED,QAAQ,CAAC,EAAE,EAAE,MAAM;IAInB,QAAQ,CAAC,KAAK,EAAE,cAAc;IAI9B,WAAW,CAAC,EAAE,EAAE,MAAM;IAKhB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA2B3B,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,EAAE;CAe7C"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { SetupStepContainerModel, SetupStepContainerOptions } from './types';
|
|
2
|
+
import { SingletonKosModelRegistrationBean } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* # SetupStepContainer
|
|
6
|
+
*
|
|
7
|
+
* The registration bean includes convenience methods for creating and working with SetupStepContainerModel instances.
|
|
8
|
+
*
|
|
9
|
+
* ## type
|
|
10
|
+
* The type property is a string that identifies the model type.
|
|
11
|
+
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
12
|
+
* used when declaring dependencies on models.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
*
|
|
17
|
+
* @kosDependency({modelType: SetupStepContainer.type, id: "setupStepContainerId"})
|
|
18
|
+
* private setupStepContainerModel: SetupStepContainerModel;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* ## factory
|
|
23
|
+
*
|
|
24
|
+
* The factory method creates a factory function that can be used to create new SetupStepContainerModel instances.
|
|
25
|
+
*
|
|
26
|
+
|
|
27
|
+
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
28
|
+
*
|
|
29
|
+
* If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
+
* in this case and the existing model will be returned in its current state.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const model = SetupStepContainer.factory({
|
|
35
|
+
* // Add option data
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
*
|
|
41
|
+
* ## predicate
|
|
42
|
+
*
|
|
43
|
+
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a SetupStepContainerModel.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
*
|
|
48
|
+
* const model: IKosDataModel = ...; // some model
|
|
49
|
+
*
|
|
50
|
+
* if (SetupStepContainer.predicate(model)) {
|
|
51
|
+
* // if the function evaluates to true, the model is narrowed down to SetupStepContainerModel
|
|
52
|
+
* // and the compiler will know that the model has the SetupStepContainerModel interface
|
|
53
|
+
* model.updateAvailability(false);
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* ## registration
|
|
58
|
+
*
|
|
59
|
+
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
+
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* In an application registration file you can declare the model registration as follows:
|
|
66
|
+
*
|
|
67
|
+
* **registration.ts**
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { SetupStepContainer } from "@kos-ui/kos-dispenser-model";
|
|
70
|
+
* ...
|
|
71
|
+
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
72
|
+
* export const kosModels: IKosRegistry["models"] = {
|
|
73
|
+
* ...SetupStepContainer.registration,
|
|
74
|
+
* };
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* ## registration.singleton
|
|
78
|
+
|
|
79
|
+
* The setupStepContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
80
|
+
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
81
|
+
*
|
|
82
|
+
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
83
|
+
|
|
84
|
+
* */
|
|
85
|
+
export declare const SetupStepContainer: Readonly<SingletonKosModelRegistrationBean<SetupStepContainerModel, SetupStepContainerOptions>>;
|
|
86
|
+
//# sourceMappingURL=setup-step-container-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-step-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/setup-step/setup-step-container-registration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAMjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CACvC,iCAAiC,CAC/B,uBAAuB,EACvB,yBAAyB,CAC1B,CAeF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SetupStepModel, SetupStepOptions } from './types';
|
|
2
|
+
import { IKosDataModel, KosCreationContext } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
export declare const MODEL_TYPE = "setup-step-model";
|
|
5
|
+
export declare class SetupStepModelImpl implements SetupStepModel, IKosDataModel {
|
|
6
|
+
id: string;
|
|
7
|
+
idx: number;
|
|
8
|
+
name: string;
|
|
9
|
+
complete: boolean;
|
|
10
|
+
preStep: boolean;
|
|
11
|
+
exclusive: boolean;
|
|
12
|
+
private logger;
|
|
13
|
+
constructor(modelId: string, options: SetupStepOptions, context: KosCreationContext);
|
|
14
|
+
updateModel(options: SetupStepOptions): void;
|
|
15
|
+
get titleKey(): string;
|
|
16
|
+
get bodyKey(): string;
|
|
17
|
+
completeStep(): Promise<void>;
|
|
18
|
+
init(): Promise<void>;
|
|
19
|
+
load(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=setup-step-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-step-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/setup-step/setup-step-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C,qBACa,kBAAmB,YAAW,cAAc,EAAE,aAAa;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,kBAAkB;IAW7B,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAQ5C,IAAI,QAAQ,WAEX;IAED,IAAI,OAAO,WAEV;IAEK,YAAY;IAWZ,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { SetupStepModel, SetupStepOptions } from './types';
|
|
2
|
+
import { KosModelRegistrationBean } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* # SetupStep
|
|
6
|
+
*
|
|
7
|
+
* The registration bean includes convenience methods for creating and working with SetupStepModel instances.
|
|
8
|
+
*
|
|
9
|
+
* ## type
|
|
10
|
+
* The type property is a string that identifies the model type.
|
|
11
|
+
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
12
|
+
* used when declaring dependencies on models.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
*
|
|
17
|
+
* @kosDependency({modelType: SetupStep.type, id: "setupStepId"})
|
|
18
|
+
* private setupStepModel: SetupStepModel;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* ## factory
|
|
23
|
+
*
|
|
24
|
+
* The factory method creates a factory function that can be used to create new SetupStepModel instances.
|
|
25
|
+
*
|
|
26
|
+
|
|
27
|
+
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
28
|
+
*
|
|
29
|
+
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
+
* in this case and the existing model will be returned in its current state.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const model = SetupStep.factory("setupStepId")({
|
|
35
|
+
* // Add option data
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
*
|
|
41
|
+
* ## predicate
|
|
42
|
+
*
|
|
43
|
+
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a SetupStepModel.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
*
|
|
48
|
+
* const model: IKosDataModel = ...; // some model
|
|
49
|
+
*
|
|
50
|
+
* if (SetupStep.predicate(model)) {
|
|
51
|
+
* // if the function evaluates to true, the model is narrowed down to SetupStepModel
|
|
52
|
+
* // and the compiler will know that the model has the SetupStepModel interface
|
|
53
|
+
* model.updateAvailability(false);
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* ## registration
|
|
58
|
+
*
|
|
59
|
+
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
+
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* In an application registration file you can declare the model registration as follows:
|
|
66
|
+
*
|
|
67
|
+
* **registration.ts**
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { SetupStep } from "@kos-ui/kos-dispenser-model";
|
|
70
|
+
* ...
|
|
71
|
+
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
72
|
+
* export const kosModels: IKosRegistry["models"] = {
|
|
73
|
+
* ...SetupStep.registration,
|
|
74
|
+
* };
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* ## registration.singleton
|
|
78
|
+
|
|
79
|
+
* The setupStep model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
|
|
80
|
+
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
81
|
+
|
|
82
|
+
* */
|
|
83
|
+
export declare const SetupStep: Readonly<KosModelRegistrationBean<SetupStepModel, SetupStepOptions>>;
|
|
84
|
+
//# sourceMappingURL=setup-step-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-step-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/setup-step/setup-step-registration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EK;AACL,eAAO,MAAM,SAAS,EAAE,QAAQ,CAC9B,wBAAwB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAW3D,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IKosIdentifiable, IKosModelHolder, IKosDataModel } from '../../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// --------------- SetupStep ---------------
|
|
5
|
+
|
|
6
|
+
export interface SetupStepOptions {
|
|
7
|
+
name: string;
|
|
8
|
+
idx: number;
|
|
9
|
+
complete: boolean; // true if the step is complete
|
|
10
|
+
preStep: boolean; // true if this step is a pre-step
|
|
11
|
+
exclusive: boolean; // if true, hide all non-exclusive steps
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface SetupStepModel extends IKosDataModel {
|
|
15
|
+
idx: number;
|
|
16
|
+
name: string;
|
|
17
|
+
complete: boolean; // true if the step is complete
|
|
18
|
+
preStep: boolean; // true if this step is a pre-step
|
|
19
|
+
exclusive: boolean; // if true, hide all non-exclusive steps
|
|
20
|
+
readonly titleKey: string;
|
|
21
|
+
updateModel: (options: SetupStepOptions) => void;
|
|
22
|
+
completeStep: () => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// --------------- SetupStepContainer ---------------
|
|
26
|
+
export interface SetupStepContainerOptions {}
|
|
27
|
+
|
|
28
|
+
export interface SetupStepContainerModel
|
|
29
|
+
extends IKosDataModel,
|
|
30
|
+
IKosModelHolder<SetupStepModel> {
|
|
31
|
+
currentStep?: SetupStepModel;
|
|
32
|
+
readonly setupRequired: boolean;
|
|
33
|
+
readonly hasIncompletePreSteps: boolean;
|
|
34
|
+
setCurrentStep: (id: stepName) => void;
|
|
35
|
+
nextStep: () => void;
|
|
36
|
+
readonly firstIncompleteStep: SetupStepModel<IKosDataModel>;
|
|
37
|
+
readonly isLastStep: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type IdentifiableStep = SetupStepOptions & IKosIdentifiable;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { TroubleActionModel as TroubleActionManagerModel } from './trouble-action-model';
|
|
2
|
+
export { TroubleAction as TroubleActionManager } from './trouble-action-registration';
|
|
3
|
+
export type { TroubleActionData as TroubleActionManagerData, TroubleActionOptions as TroubleActionManagerOptions, } from './types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/trouble-action/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACtF,YAAY,EACV,iBAAiB,IAAI,wBAAwB,EAC7C,oBAAoB,IAAI,2BAA2B,GACpD,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TroubleActionOptions } from './types';
|
|
2
|
+
import { IKosDataModel, IKosIdentifiable, KosCreationContext, KosData, PublicModelInterface } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
export declare const MODEL_TYPE = "trouble-action-model";
|
|
5
|
+
export type TroubleActionModel = PublicModelInterface<TroubleActionModelImpl>;
|
|
6
|
+
export declare class TroubleActionModelImpl implements IKosDataModel, IKosIdentifiable {
|
|
7
|
+
id: string;
|
|
8
|
+
private logger;
|
|
9
|
+
private troubleContainer;
|
|
10
|
+
private disposer?;
|
|
11
|
+
state: KosData<Record<string, string | undefined>>;
|
|
12
|
+
private troubleActionData;
|
|
13
|
+
constructor(modelId: string, options: TroubleActionOptions, context: KosCreationContext);
|
|
14
|
+
get activeTrouble(): any;
|
|
15
|
+
get activeTroubleType(): any;
|
|
16
|
+
init(): Promise<void>;
|
|
17
|
+
unload(): void;
|
|
18
|
+
load(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=trouble-action-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trouble-action-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/trouble-action/trouble-action-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,OAAO,EACP,oBAAoB,EAErB,MAAM,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAqB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEvE,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAE9E,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IAGjC,OAAO,CAAC,gBAAgB,CAAyB;IACjD,OAAO,CAAC,QAAQ,CAAC,CAAa;IAC9B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACnD,OAAO,CAAC,iBAAiB,CAAoC;gBAE3D,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,kBAAkB;IAa7B,IAAI,aAAa,QAgBhB;IAED,IAAI,iBAAiB,QAEpB;IACK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA2B3B,MAAM,IAAI,IAAI;IAGR,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { TroubleActionModel } from './trouble-action-model';
|
|
2
|
+
import { TroubleActionOptions } from './types';
|
|
3
|
+
import { SingletonKosModelRegistrationFactory } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # TroubleAction
|
|
7
|
+
*
|
|
8
|
+
* The registration bean includes convenience methods for creating and working with TroubleActionModel instances.
|
|
9
|
+
*
|
|
10
|
+
* ## type
|
|
11
|
+
* The type property is a string that identifies the model type.
|
|
12
|
+
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
13
|
+
* used when declaring dependencies on models.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
*
|
|
18
|
+
* @kosDependency({modelType: TroubleAction.type, id: "troubleActionId"})
|
|
19
|
+
* private troubleActionModel: TroubleActionModel;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* ## factory
|
|
24
|
+
*
|
|
25
|
+
* The factory method creates a factory function that can be used to create new TroubleActionModel instances.
|
|
26
|
+
*
|
|
27
|
+
|
|
28
|
+
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
29
|
+
*
|
|
30
|
+
* If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
|
|
31
|
+
* in this case and the existing model will be returned in its current state.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const model = TroubleAction.factory({
|
|
36
|
+
* // Add option data
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
*
|
|
42
|
+
* ## predicate
|
|
43
|
+
*
|
|
44
|
+
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a TroubleActionModel.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
*
|
|
49
|
+
* const model: IKosDataModel = ...; // some model
|
|
50
|
+
*
|
|
51
|
+
* if (TroubleAction.predicate(model)) {
|
|
52
|
+
* // if the function evaluates to true, the model is narrowed down to TroubleActionModel
|
|
53
|
+
* // and the compiler will know that the model has the TroubleActionModel interface
|
|
54
|
+
* model.updateAvailability(false);
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* ## registration
|
|
59
|
+
*
|
|
60
|
+
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
61
|
+
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
*
|
|
66
|
+
* In an application registration file you can declare the model registration as follows:
|
|
67
|
+
*
|
|
68
|
+
* **registration.ts**
|
|
69
|
+
* ```typescript
|
|
70
|
+
* import { TroubleAction } from "@kos-ui/project-models";
|
|
71
|
+
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
72
|
+
*
|
|
73
|
+
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
74
|
+
*
|
|
75
|
+
* KosModelRegistry.dispense
|
|
76
|
+
* .models()
|
|
77
|
+
* .model(TroubleAction);
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* ## registration.singleton
|
|
81
|
+
|
|
82
|
+
* The troubleAction model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
83
|
+
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
84
|
+
*
|
|
85
|
+
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
86
|
+
|
|
87
|
+
* */
|
|
88
|
+
export declare const TroubleAction: SingletonKosModelRegistrationFactory<TroubleActionModel, TroubleActionOptions>;
|
|
89
|
+
//# sourceMappingURL=trouble-action-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trouble-action-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/trouble-action/trouble-action-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkFK;AACL,eAAO,MAAM,aAAa,gFAMxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/utilities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,mBAAmB,SAAS,CAAC;AAC7B,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ddk/kos-ddk-models/src/lib/utilities/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface UtilityResponse {
|
|
2
|
+
name: string;
|
|
3
|
+
options: Map<string, object>;
|
|
4
|
+
roles?: string[];
|
|
5
|
+
}
|
|
6
|
+
type UtilityColumnsResponse = UtilityResponse[];
|
|
7
|
+
/**
|
|
8
|
+
* @category Service
|
|
9
|
+
* Retrieves the initial utilities data.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getUtilities: () => Promise<UtilityColumnsResponse[] | undefined>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=utilities-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ddk/kos-ddk-models/src/lib/utilities/services/utilities-services.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,KAAK,sBAAsB,GAAG,eAAe,EAAE,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,YAAY,qDAQxB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IKosIdentifiable, IKosModelHolder } from '../../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// --------------- Utilities ---------------
|
|
5
|
+
export interface UtilitiesOptions {
|
|
6
|
+
columnId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
options: Map<string, object>;
|
|
9
|
+
roles?: string[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface UtilitiesModel extends IKosDataModel {
|
|
13
|
+
id: string;
|
|
14
|
+
columnId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
options: Map<string, object>;
|
|
17
|
+
updateModel: (options: UtilitiesOptions) => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type UtilityColumn = UtilitiesModel[];
|
|
21
|
+
|
|
22
|
+
// --------------- UtilitiesContainer ---------------
|
|
23
|
+
export interface UtilitiesContainerOptions {}
|
|
24
|
+
|
|
25
|
+
export interface UtilitiesContainerModel
|
|
26
|
+
extends IKosIdentifiable,
|
|
27
|
+
IKosModelHolder<UtilitiesModel> {
|
|
28
|
+
columns: string[];
|
|
29
|
+
getUtilitiesByColumn(id: string): UtilitiesModel[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type IdentifiableUtility = UtilitiesOptions & IKosIdentifiable;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UtilitiesModel, UtilitiesContainerModel, UtilitiesContainerOptions } from './types';
|
|
2
|
+
import { KosCreationContext, IKosModelContainer, IKosDataModel } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
export declare const MODEL_TYPE = "utilities-container-model";
|
|
5
|
+
export declare class UtilitiesContainerModelImpl implements UtilitiesContainerModel, IKosDataModel {
|
|
6
|
+
id: string;
|
|
7
|
+
private logger;
|
|
8
|
+
private _models;
|
|
9
|
+
constructor(modelId: string, _options: UtilitiesContainerOptions, context: KosCreationContext);
|
|
10
|
+
get data(): UtilitiesModel[];
|
|
11
|
+
get models(): IKosModelContainer<UtilitiesModel>;
|
|
12
|
+
get columns(): string[];
|
|
13
|
+
addModel(model: UtilitiesModel): void;
|
|
14
|
+
removeModel(id: string): void;
|
|
15
|
+
getModel(id: string): UtilitiesModel | undefined;
|
|
16
|
+
getUtilitiesByColumn(id: string): UtilitiesModel[];
|
|
17
|
+
load(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=utilities-container-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/utilities/utilities-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EAE1B,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,qBACa,2BACX,YAAW,uBAAuB,EAAE,aAAa;IAEjD,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,CAAC,MAAM,CAAmB;IAEvB,OAAO,CAAC,OAAO,CAAqC;gBAE5D,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,yBAAyB,EACnC,OAAO,EAAE,kBAAkB;IAc7B,IAAI,IAAI,qBAEP;IAED,IAAI,MAAM,uCAET;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,CAItB;IAED,QAAQ,CAAC,KAAK,EAAE,cAAc;IAI9B,WAAW,CAAC,EAAE,EAAE,MAAM;IAItB,QAAQ,CAAC,EAAE,EAAE,MAAM;IAInB,oBAAoB,CAAC,EAAE,EAAE,MAAM;IAMzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB5B"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { UtilitiesContainerModel, UtilitiesContainerOptions } from './types';
|
|
2
|
+
import { SingletonKosModelRegistrationBean } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* # UtilitiesContainer
|
|
6
|
+
*
|
|
7
|
+
* The registration bean includes convenience methods for creating and working with UtilitiesContainerModel instances.
|
|
8
|
+
*
|
|
9
|
+
* ## type
|
|
10
|
+
* The type property is a string that identifies the model type.
|
|
11
|
+
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
12
|
+
* used when declaring dependencies on models.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
*
|
|
17
|
+
* @kosDependency({modelType: UtilitiesContainer.type, id: "utilitiesContainerId"})
|
|
18
|
+
* private utilitiesContainerModel: UtilitiesContainerModel;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* ## factory
|
|
23
|
+
*
|
|
24
|
+
* The factory method creates a factory function that can be used to create new UtilitiesContainerModel instances.
|
|
25
|
+
*
|
|
26
|
+
|
|
27
|
+
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
28
|
+
*
|
|
29
|
+
* If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
+
* in this case and the existing model will be returned in its current state.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const model = UtilitiesContainer.factory({
|
|
35
|
+
* // Add option data
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
*
|
|
41
|
+
* ## predicate
|
|
42
|
+
*
|
|
43
|
+
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a UtilitiesContainerModel.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
*
|
|
48
|
+
* const model: IKosDataModel = ...; // some model
|
|
49
|
+
*
|
|
50
|
+
* if (UtilitiesContainer.predicate(model)) {
|
|
51
|
+
* // if the function evaluates to true, the model is narrowed down to UtilitiesContainerModel
|
|
52
|
+
* // and the compiler will know that the model has the UtilitiesContainerModel interface
|
|
53
|
+
* model.updateAvailability(false);
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* ## registration
|
|
58
|
+
*
|
|
59
|
+
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
+
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* In an application registration file you can declare the model registration as follows:
|
|
66
|
+
*
|
|
67
|
+
* **registration.ts**
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { UtilitiesContainer } from "@kos-ui/kos-dispenser-model";
|
|
70
|
+
* ...
|
|
71
|
+
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
72
|
+
* export const kosModels: IKosRegistry["models"] = {
|
|
73
|
+
* ...UtilitiesContainer.registration,
|
|
74
|
+
* };
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* ## registration.singleton
|
|
78
|
+
|
|
79
|
+
* The utilitiesContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
80
|
+
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
81
|
+
*
|
|
82
|
+
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
83
|
+
|
|
84
|
+
* */
|
|
85
|
+
export declare const UtilitiesContainer: Readonly<SingletonKosModelRegistrationBean<UtilitiesContainerModel, UtilitiesContainerOptions>>;
|
|
86
|
+
//# sourceMappingURL=utilities-container-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/utilities/utilities-container-registration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAMjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CACvC,iCAAiC,CAC/B,uBAAuB,EACvB,yBAAyB,CAC1B,CAeF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UtilitiesModel, UtilitiesOptions } from './types';
|
|
2
|
+
import { IKosDataModel, KosCreationContext } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
3
|
+
|
|
4
|
+
export declare const MODEL_TYPE = "utilities-model";
|
|
5
|
+
export declare class UtilitiesModelImpl implements UtilitiesModel, IKosDataModel {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
options: Map<string, object>;
|
|
9
|
+
roles?: string[];
|
|
10
|
+
columnId: string;
|
|
11
|
+
private logger;
|
|
12
|
+
constructor(modelId: string, options: UtilitiesOptions, context: KosCreationContext);
|
|
13
|
+
updateModel(options: UtilitiesOptions): void;
|
|
14
|
+
get titleKey(): string;
|
|
15
|
+
get bodyKey(): string;
|
|
16
|
+
init(): Promise<void>;
|
|
17
|
+
load(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=utilities-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/utilities/utilities-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAE5C,qBACa,kBAAmB,YAAW,cAAc,EAAE,aAAa;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,MAAM,CAAmB;gBAG/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,kBAAkB;IAU7B,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAM5C,IAAI,QAAQ,WAEX;IAED,IAAI,OAAO,WAEV;IAIK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|