@kosdev-code/kos-dispense-sdk 0.1.0-dev.5873 → 0.1.0-next.1000
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/.kos.json +129 -0
- package/{dispense-registration-manager-ukk4OBeX.cjs → dispense-registration-manager-CfWgJqfq.cjs} +807 -445
- package/dispense-registration-manager-CfWgJqfq.cjs.map +1 -0
- package/{dispense-registration-manager-C4XZ_c3x.js → dispense-registration-manager-DtN0T_JG.js} +846 -484
- package/dispense-registration-manager-DtN0T_JG.js.map +1 -0
- package/{extension-utils-CMVLCSA8.cjs → extension-utils-BWYG2dYG.cjs} +52 -194
- package/extension-utils-BWYG2dYG.cjs.map +1 -0
- package/{extension-utils-FxS68Xu9.js → extension-utils-BoXtjU5_.js} +58 -200
- package/extension-utils-BoXtjU5_.js.map +1 -0
- package/extensions/control-pour-extension.d.ts +8 -9
- package/extensions/control-pour-extension.d.ts.map +1 -1
- package/extensions/index.d.ts.map +1 -1
- package/index.cjs +31 -11
- package/index.cjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +118 -98
- package/index.js.map +1 -1
- package/models/constants/constants.d.ts +14 -178
- package/models/constants/constants.d.ts.map +1 -1
- package/models/constants/index.d.ts.map +1 -1
- package/models/index.d.ts.map +1 -1
- package/models/models/assembly/assembly-model.d.ts +12 -5
- package/models/models/assembly/assembly-model.d.ts.map +1 -1
- package/models/models/assembly/assembly-registration.d.ts +12 -71
- package/models/models/assembly/assembly-registration.d.ts.map +1 -1
- package/models/models/assembly/board-utils.d.ts +1 -2
- package/models/models/assembly/board-utils.d.ts.map +1 -1
- package/models/models/assembly/holder-utils.d.ts +1 -2
- package/models/models/assembly/holder-utils.d.ts.map +1 -1
- package/models/models/assembly/index.d.ts.map +1 -1
- package/models/models/assembly/nozzle-utils.d.ts +1 -2
- package/models/models/assembly/nozzle-utils.d.ts.map +1 -1
- package/models/models/assembly/pump-utils.d.ts +2 -3
- package/models/models/assembly/pump-utils.d.ts.map +1 -1
- package/models/models/assembly/services/assembly-services.d.ts +0 -1
- package/models/models/assembly/services/assembly-services.d.ts.map +1 -1
- package/models/models/assembly/services/index.d.ts.map +1 -1
- package/models/models/assembly/types/index.d.ts +8 -3
- package/models/models/availability/availability-model.d.ts +13 -78
- package/models/models/availability/availability-model.d.ts.map +1 -1
- package/models/models/availability/index.d.ts.map +1 -1
- package/models/models/availability/types/index.d.ts +7 -13
- package/models/models/board/board-container-model.d.ts +10 -3
- package/models/models/board/board-container-model.d.ts.map +1 -1
- package/models/models/board/board-container-registration.d.ts +13 -77
- package/models/models/board/board-container-registration.d.ts.map +1 -1
- package/models/models/board/board-model.d.ts +1 -2
- package/models/models/board/board-model.d.ts.map +1 -1
- package/models/models/board/board-registration.d.ts +12 -74
- package/models/models/board/board-registration.d.ts.map +1 -1
- package/models/models/board/index.d.ts.map +1 -1
- package/models/models/board/types/index.d.ts +12 -2
- package/models/models/board/types/services.d.ts.map +1 -1
- package/models/models/board/utils/board-trouble-data-mapper.d.ts +1 -2
- package/models/models/board/utils/board-trouble-data-mapper.d.ts.map +1 -1
- package/models/models/board/utils/board-trouble-resolver.d.ts +0 -1
- package/models/models/board/utils/board-trouble-resolver.d.ts.map +1 -1
- package/models/models/cui-kit-state/cui-kit-state-model.d.ts +133 -0
- package/models/models/cui-kit-state/cui-kit-state-model.d.ts.map +1 -0
- package/models/models/cui-kit-state/index.d.ts +4 -0
- package/models/models/cui-kit-state/index.d.ts.map +1 -0
- package/models/models/cui-kit-state/types/index.d.ts +82 -0
- package/models/models/device-assembly/device-assembly-model.d.ts +6 -3
- package/models/models/device-assembly/device-assembly-model.d.ts.map +1 -1
- package/models/models/device-assembly/device-assembly-registration.d.ts +14 -79
- package/models/models/device-assembly/device-assembly-registration.d.ts.map +1 -1
- package/models/models/device-assembly/index.d.ts.map +1 -1
- package/models/models/device-assembly/types/index.d.ts +4 -0
- package/models/models/generic-pour/generic-pour-model.d.ts +19 -4
- package/models/models/generic-pour/generic-pour-model.d.ts.map +1 -1
- package/models/models/generic-pour/generic-pour-registration.d.ts +13 -75
- package/models/models/generic-pour/generic-pour-registration.d.ts.map +1 -1
- package/models/models/generic-pour/index.d.ts.map +1 -1
- package/models/models/generic-pour/services/generic-pour-services.d.ts.map +1 -1
- package/models/models/generic-pour/services/index.d.ts.map +1 -1
- package/models/models/generic-pour/types/index.d.ts +4 -0
- package/models/models/holder/holder-model.d.ts +16 -75
- package/models/models/holder/holder-model.d.ts.map +1 -1
- package/models/models/holder/index.d.ts.map +1 -1
- package/models/models/holder/services/assignment-services.d.ts.map +1 -1
- package/models/models/holder/services/holder-services.d.ts.map +1 -1
- package/models/models/holder/services/index.d.ts.map +1 -1
- package/models/models/holder/types/index.d.ts +11 -7
- package/models/models/holder/utils/holder-utils.d.ts +0 -1
- package/models/models/holder/utils/holder-utils.d.ts.map +1 -1
- package/models/models/holder-container/holder-container-model.d.ts +12 -70
- package/models/models/holder-container/holder-container-model.d.ts.map +1 -1
- package/models/models/holder-container/index.d.ts.map +1 -1
- package/models/models/holder-container/types/index.d.ts +16 -5
- package/models/models/index.d.ts +1 -0
- package/models/models/index.d.ts.map +1 -1
- package/models/models/ingredient/index.d.ts.map +1 -1
- package/models/models/ingredient/ingredient-model.d.ts +12 -76
- package/models/models/ingredient/ingredient-model.d.ts.map +1 -1
- package/models/models/ingredient/services/index.d.ts.map +1 -1
- package/models/models/ingredient/services/ingredient-services.d.ts.map +1 -1
- package/models/models/ingredient/types/index.d.ts +7 -13
- package/models/models/ingredient-container/index.d.ts.map +1 -1
- package/models/models/ingredient-container/ingredient-container-model.d.ts +12 -70
- package/models/models/ingredient-container/ingredient-container-model.d.ts.map +1 -1
- package/models/models/ingredient-container/types/index.d.ts +7 -3
- package/models/models/nozzle/index.d.ts.map +1 -1
- package/models/models/nozzle/nozzle-model.d.ts +20 -81
- package/models/models/nozzle/nozzle-model.d.ts.map +1 -1
- package/models/models/nozzle/services/index.d.ts.map +1 -1
- package/models/models/nozzle/services/nozzle-services.d.ts +11 -65
- package/models/models/nozzle/services/nozzle-services.d.ts.map +1 -1
- package/models/models/nozzle/types/index.d.ts +7 -3
- package/models/models/pump/index.d.ts.map +1 -1
- package/models/models/pump/pump-model.d.ts +12 -81
- package/models/models/pump/pump-model.d.ts.map +1 -1
- package/models/models/pump/services/index.d.ts.map +1 -1
- package/models/models/pump/services/pump-services.d.ts +3 -5
- package/models/models/pump/services/pump-services.d.ts.map +1 -1
- package/models/models/pump/types/index.d.ts +7 -3
- package/models/models/pump/utils/pump-trouble-resolver.d.ts +0 -1
- package/models/models/pump/utils/pump-trouble-resolver.d.ts.map +1 -1
- package/models/models/pump-container/index.d.ts.map +1 -1
- package/models/models/pump-container/pump-container-model.d.ts +16 -70
- package/models/models/pump-container/pump-container-model.d.ts.map +1 -1
- package/models/models/pump-container/types/index.d.ts +7 -3
- package/models/models/types/assembly.d.ts.map +1 -1
- package/models/models/types/index.d.ts.map +1 -1
- package/models/models/types/intent.d.ts +11 -79
- package/models/models/types/intent.d.ts.map +1 -1
- package/models/models/types/pouring.d.ts.map +1 -1
- package/models/utils/dispense-registration-manager.d.ts +34 -10
- package/models/utils/dispense-registration-manager.d.ts.map +1 -1
- package/models/utils/extension-utils.d.ts +66 -173
- package/models/utils/extension-utils.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +1 -1
- package/models/utils/openapi-index.d.ts.map +1 -1
- package/models/utils/pour-context.d.ts +8 -0
- package/models/utils/pour-context.d.ts.map +1 -0
- package/models/utils/registration.d.ts +0 -1
- package/models/utils/registration.d.ts.map +1 -1
- package/models/utils/service.d.ts +34 -35
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/dispense/1.6.5/service.d.ts +34 -35
- package/models/utils/services/dispense/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/dispense/1.8.1/service.d.ts +34 -35
- package/models/utils/services/dispense/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/dispense/daily/openapi.d.ts +1941 -1812
- package/models/utils/services/dispense/daily/service.d.ts +127 -37
- package/models/utils/services/dispense/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +1 -1
- package/models/utils/services-index.d.ts.map +1 -1
- package/models.cjs +4 -5
- package/models.cjs.map +1 -1
- package/models.d.ts +1 -0
- package/models.js +29 -30
- package/models.js.map +1 -1
- package/package.json +11 -12
- package/{pump-provider-BAQXIUuP.cjs → pump-provider-B4WR3LiY.cjs} +480 -544
- package/pump-provider-B4WR3LiY.cjs.map +1 -0
- package/{pump-provider-9rUgev7q.js → pump-provider-CPUsLke5.js} +541 -605
- package/pump-provider-CPUsLke5.js.map +1 -0
- package/ui/contexts/assembly/assembly-provider.d.ts +9 -2
- package/ui/contexts/assembly/assembly-provider.d.ts.map +1 -1
- package/ui/contexts/assembly/index.d.ts.map +1 -1
- package/ui/contexts/availability/availability-provider.d.ts +9 -2
- package/ui/contexts/availability/availability-provider.d.ts.map +1 -1
- package/ui/contexts/availability/index.d.ts.map +1 -1
- package/ui/contexts/board/board-provider.d.ts +9 -2
- package/ui/contexts/board/board-provider.d.ts.map +1 -1
- package/ui/contexts/board/index.d.ts.map +1 -1
- package/ui/contexts/board-container/board-container-provider.d.ts +9 -2
- package/ui/contexts/board-container/board-container-provider.d.ts.map +1 -1
- package/ui/contexts/board-container/index.d.ts.map +1 -1
- package/ui/contexts/cui-kit/cui-kit.d.ts +17 -3
- package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -1
- package/ui/contexts/cui-kit/index.d.ts.map +1 -1
- package/ui/contexts/device-assembly/device-assembly-provider.d.ts +9 -2
- package/ui/contexts/device-assembly/device-assembly-provider.d.ts.map +1 -1
- package/ui/contexts/device-assembly/index.d.ts.map +1 -1
- package/ui/contexts/holder/holder-provider.d.ts +9 -2
- package/ui/contexts/holder/holder-provider.d.ts.map +1 -1
- package/ui/contexts/holder/index.d.ts.map +1 -1
- package/ui/contexts/holder-container/holder-container-provider.d.ts +9 -2
- package/ui/contexts/holder-container/holder-container-provider.d.ts.map +1 -1
- package/ui/contexts/holder-container/index.d.ts.map +1 -1
- package/ui/contexts/index.d.ts.map +1 -1
- package/ui/contexts/ingredient/index.d.ts.map +1 -1
- package/ui/contexts/ingredient/ingredient-provider.d.ts +9 -2
- package/ui/contexts/ingredient/ingredient-provider.d.ts.map +1 -1
- package/ui/contexts/ingredient-container/index.d.ts.map +1 -1
- package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts +9 -2
- package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts.map +1 -1
- package/ui/contexts/nozzle/index.d.ts.map +1 -1
- package/ui/contexts/nozzle/nozzle-provider.d.ts +9 -2
- package/ui/contexts/nozzle/nozzle-provider.d.ts.map +1 -1
- package/ui/contexts/pump/index.d.ts.map +1 -1
- package/ui/contexts/pump/pump-provider.d.ts +9 -2
- package/ui/contexts/pump/pump-provider.d.ts.map +1 -1
- package/ui/hooks/assembly/index.d.ts.map +1 -1
- package/ui/hooks/assembly/use-assembly.d.ts +5 -2
- package/ui/hooks/assembly/use-assembly.d.ts.map +1 -1
- package/ui/hooks/assembly/with-assembly.d.ts +4 -1
- package/ui/hooks/assembly/with-assembly.d.ts.map +1 -1
- package/ui/hooks/availability/index.d.ts.map +1 -1
- package/ui/hooks/availability/use-availability.d.ts +5 -2
- package/ui/hooks/availability/use-availability.d.ts.map +1 -1
- package/ui/hooks/availability/with-availability.d.ts +0 -1
- package/ui/hooks/availability/with-availability.d.ts.map +1 -1
- package/ui/hooks/board/index.d.ts.map +1 -1
- package/ui/hooks/board/use-board.d.ts +5 -2
- package/ui/hooks/board/use-board.d.ts.map +1 -1
- package/ui/hooks/board/with-board.d.ts +4 -1
- package/ui/hooks/board/with-board.d.ts.map +1 -1
- package/ui/hooks/board-container/index.d.ts.map +1 -1
- package/ui/hooks/board-container/use-board-container.d.ts +5 -2
- package/ui/hooks/board-container/use-board-container.d.ts.map +1 -1
- package/ui/hooks/board-container/with-board-container.d.ts +4 -1
- package/ui/hooks/board-container/with-board-container.d.ts.map +1 -1
- package/ui/hooks/cui-kit/dispense-topics.d.ts +0 -1
- package/ui/hooks/cui-kit/dispense-topics.d.ts.map +1 -1
- package/ui/hooks/cui-kit/index.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts +0 -1
- package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-beverages.d.ts +1 -2
- package/ui/hooks/cui-kit/use-beverages.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-brands.d.ts +1 -2
- package/ui/hooks/cui-kit/use-brands.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-cui-kit.d.ts +51 -7
- package/ui/hooks/cui-kit/use-cui-kit.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts +16 -44
- package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts +0 -1
- package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-dispense-timers.d.ts +0 -1
- package/ui/hooks/cui-kit/use-dispense-timers.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-flavors.d.ts +1 -2
- package/ui/hooks/cui-kit/use-flavors.d.ts.map +1 -1
- package/ui/hooks/device-assembly/index.d.ts.map +1 -1
- package/ui/hooks/device-assembly/use-device-assembly.d.ts +5 -2
- package/ui/hooks/device-assembly/use-device-assembly.d.ts.map +1 -1
- package/ui/hooks/device-assembly/with-device-assembly.d.ts +4 -1
- package/ui/hooks/device-assembly/with-device-assembly.d.ts.map +1 -1
- package/ui/hooks/generic-pour/index.d.ts.map +1 -1
- package/ui/hooks/generic-pour/use-generic-pour.d.ts +6 -3
- package/ui/hooks/generic-pour/use-generic-pour.d.ts.map +1 -1
- package/ui/hooks/generic-pour/with-generic-pour.d.ts +5 -2
- package/ui/hooks/generic-pour/with-generic-pour.d.ts.map +1 -1
- package/ui/hooks/holder/index.d.ts.map +1 -1
- package/ui/hooks/holder/use-holder.d.ts +5 -2
- package/ui/hooks/holder/use-holder.d.ts.map +1 -1
- package/ui/hooks/holder/with-holder.d.ts +4 -1
- package/ui/hooks/holder/with-holder.d.ts.map +1 -1
- package/ui/hooks/holder-container/index.d.ts.map +1 -1
- package/ui/hooks/holder-container/use-holder-container.d.ts +7 -4
- package/ui/hooks/holder-container/use-holder-container.d.ts.map +1 -1
- package/ui/hooks/holder-container/with-holder-container.d.ts +4 -1
- package/ui/hooks/holder-container/with-holder-container.d.ts.map +1 -1
- package/ui/hooks/index.d.ts.map +1 -1
- package/ui/hooks/ingredient/index.d.ts.map +1 -1
- package/ui/hooks/ingredient/use-ingredient-pour.d.ts +16 -22
- package/ui/hooks/ingredient/use-ingredient-pour.d.ts.map +1 -1
- package/ui/hooks/ingredient/use-ingredient.d.ts +5 -2
- package/ui/hooks/ingredient/use-ingredient.d.ts.map +1 -1
- package/ui/hooks/ingredient/with-ingredient.d.ts +4 -1
- package/ui/hooks/ingredient/with-ingredient.d.ts.map +1 -1
- package/ui/hooks/ingredient-container/index.d.ts.map +1 -1
- package/ui/hooks/ingredient-container/use-ingredient-container.d.ts +5 -2
- package/ui/hooks/ingredient-container/use-ingredient-container.d.ts.map +1 -1
- package/ui/hooks/ingredient-container/with-ingredient-container.d.ts +4 -1
- package/ui/hooks/ingredient-container/with-ingredient-container.d.ts.map +1 -1
- package/ui/hooks/nozzle/index.d.ts.map +1 -1
- package/ui/hooks/nozzle/use-dispense-kit.d.ts +0 -1
- package/ui/hooks/nozzle/use-dispense-kit.d.ts.map +1 -1
- package/ui/hooks/nozzle/use-nozzle.d.ts +5 -2
- package/ui/hooks/nozzle/use-nozzle.d.ts.map +1 -1
- package/ui/hooks/nozzle/with-nozzle.d.ts +4 -1
- package/ui/hooks/nozzle/with-nozzle.d.ts.map +1 -1
- package/ui/hooks/nozzle-pour/index.d.ts.map +1 -1
- package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +16 -22
- package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -1
- package/ui/hooks/pour/index.d.ts.map +1 -1
- package/ui/hooks/pour/use-pour.d.ts +11 -23
- package/ui/hooks/pour/use-pour.d.ts.map +1 -1
- package/ui/hooks/pump/index.d.ts.map +1 -1
- package/ui/hooks/pump/use-pump.d.ts +1 -2
- package/ui/hooks/pump/use-pump.d.ts.map +1 -1
- package/ui/hooks/pump/with-pump.d.ts +0 -1
- package/ui/hooks/pump/with-pump.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts +5 -2
- package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts +4 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/index.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts +11 -2
- package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts +5 -2
- package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts +5 -2
- package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts +4 -1
- package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts.map +1 -1
- package/ui/index.d.ts.map +1 -1
- package/ui/utils/pour-context.d.ts +1 -7
- package/ui/utils/pour-context.d.ts.map +1 -1
- package/ui.cjs +3 -7
- package/ui.cjs.map +1 -1
- package/ui.d.ts +1 -0
- package/ui.js +64 -68
- package/ui.js.map +1 -1
- package/dispense-registration-manager-C4XZ_c3x.js.map +0 -1
- package/dispense-registration-manager-ukk4OBeX.cjs.map +0 -1
- package/extension-utils-CMVLCSA8.cjs.map +0 -1
- package/extension-utils-FxS68Xu9.js.map +0 -1
- package/kos-models.json +0 -180
- package/pump-provider-9rUgev7q.js.map +0 -1
- package/pump-provider-BAQXIUuP.cjs.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { IKosDataModel, IKosIdentifiable, KosRegistrationFor, PublicModelInterface, KosLoggerAware } from '@kosdev-code/kos-ui-sdk';
|
|
2
|
+
import { PourStrategy } from '../../../ui/hooks/utils/pour-strategy/pour-strategy';
|
|
3
|
+
import { PourContext } from '../../utils/pour-context';
|
|
4
|
+
import { AvailabilityModel } from '../availability/types';
|
|
5
|
+
import { NozzleModel } from '../nozzle';
|
|
6
|
+
import { PourStrategyAware } from '../nozzle/types';
|
|
7
|
+
import { CuiKitGroup, CuiKitStateOptions, CuiKitSteps, CuiPourOptions, CuiPourResult } from './types';
|
|
8
|
+
export declare const MODEL_TYPE = "cui-kit-state-model";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export type CuiKitStateModel = PublicModelInterface<CuiKitStateModelImpl>;
|
|
11
|
+
export interface CuiKitStateModelImpl extends KosLoggerAware {
|
|
12
|
+
}
|
|
13
|
+
export declare const MODEL_CONFIG: {
|
|
14
|
+
readonly modelTypeId: "cui-kit-state-model";
|
|
15
|
+
readonly singleton: false;
|
|
16
|
+
};
|
|
17
|
+
/** The model id of the CUI Kit driving the nozzle at `nozzlePath`. */
|
|
18
|
+
export declare const cuiKitId: (nozzlePath: string) => string;
|
|
19
|
+
/**
|
|
20
|
+
* The state behind a nozzle's CUI Kit: the step being shown, the selections, and the
|
|
21
|
+
* navigation between steps. `useCuiKit` exposes it to React; the lifecycle events
|
|
22
|
+
* (`/kos/dispense/{nozzlePath}/...`) are published from here.
|
|
23
|
+
*
|
|
24
|
+
* Without `steps`, navigation keeps the original flow: brand → beverage → flavor, with
|
|
25
|
+
* `back()` returning to the start. With `steps`, only the declared steps are shown and
|
|
26
|
+
* `back()` moves to the previous one.
|
|
27
|
+
*
|
|
28
|
+
* @kosService dispense.cui-kit-state
|
|
29
|
+
*/
|
|
30
|
+
export declare class CuiKitStateModelImpl implements IKosDataModel, IKosIdentifiable {
|
|
31
|
+
static Registration: KosRegistrationFor<typeof MODEL_CONFIG, CuiKitStateModel, CuiKitStateOptions>;
|
|
32
|
+
id: string;
|
|
33
|
+
nozzlePath: string;
|
|
34
|
+
initialGroup: "brands" | "beverages";
|
|
35
|
+
steps?: CuiKitSteps;
|
|
36
|
+
companionTypes: NonNullable<CuiKitStateOptions["companionTypes"]>;
|
|
37
|
+
currentGroup: CuiKitGroup;
|
|
38
|
+
selectedBrand: AvailabilityModel | null;
|
|
39
|
+
selectedBeverage: AvailabilityModel | null;
|
|
40
|
+
selectedFlavors: AvailabilityModel[];
|
|
41
|
+
pourStrategy?: PourStrategy;
|
|
42
|
+
onPourComplete?: (result: CuiPourResult) => void;
|
|
43
|
+
/** Data passed to the before-pour gate; carries `selectedBeverage`. */
|
|
44
|
+
pourContext: PourContext;
|
|
45
|
+
/** The target of the last pour the kit started. */
|
|
46
|
+
activeTarget?: PourStrategyAware;
|
|
47
|
+
private beforePour?;
|
|
48
|
+
private pressCount;
|
|
49
|
+
private released;
|
|
50
|
+
private lastPourState?;
|
|
51
|
+
private lastPourError?;
|
|
52
|
+
nozzle: NozzleModel;
|
|
53
|
+
constructor(modelId: string, options: CuiKitStateOptions);
|
|
54
|
+
updateModel(options: CuiKitStateOptions): void;
|
|
55
|
+
/** The steps shown, in order. */
|
|
56
|
+
get enabledSteps(): CuiKitGroup[];
|
|
57
|
+
/** The step navigation starts at and `home()` returns to. */
|
|
58
|
+
get firstGroup(): "brands" | "beverages";
|
|
59
|
+
/** The step `back()` moves to, or undefined when there is none. */
|
|
60
|
+
get previousGroup(): CuiKitGroup | undefined;
|
|
61
|
+
get canBack(): boolean;
|
|
62
|
+
get brands(): AvailabilityModel[];
|
|
63
|
+
/** Whether the kit shows a brands step; without `steps` it follows `initialGroup`. */
|
|
64
|
+
get hasBrands(): boolean;
|
|
65
|
+
get beverages(): AvailabilityModel[];
|
|
66
|
+
get flavors(): AvailabilityModel[];
|
|
67
|
+
get brandCompanions(): IKosDataModel[];
|
|
68
|
+
get beverageCompanions(): IKosDataModel[];
|
|
69
|
+
get flavorCompanions(): IKosDataModel[];
|
|
70
|
+
private companionsOf;
|
|
71
|
+
selectBrand(brand: AvailabilityModel, context?: Record<string, any>): void;
|
|
72
|
+
clearBrand(): void;
|
|
73
|
+
selectBeverage(beverage: AvailabilityModel, context?: Record<string, any>, forceUpdate?: boolean): Promise<void>;
|
|
74
|
+
clearBeverage(): Promise<void>;
|
|
75
|
+
/** Toggles a flavor and sends the beverage with the resulting flavors to the nozzle. */
|
|
76
|
+
selectFlavor(flavor: AvailabilityModel, context?: Record<string, any>, forceUpdate?: boolean): Promise<void>;
|
|
77
|
+
clearFlavors(): Promise<void>;
|
|
78
|
+
/** Moves to the previous step. Without `steps`, returns to the start and clears brand and beverage. */
|
|
79
|
+
back(): void;
|
|
80
|
+
/** Returns to the first step and clears the selections. */
|
|
81
|
+
home(): void;
|
|
82
|
+
/** Number of `useCuiKit` hooks attached to this kit. */
|
|
83
|
+
attached: number;
|
|
84
|
+
/**
|
|
85
|
+
* Attaches a `useCuiKit` hook. A nozzle has one kit hook; components read it through
|
|
86
|
+
* the kit's context. Returns false, and logs an error, for a second hook.
|
|
87
|
+
*/
|
|
88
|
+
attach(): boolean;
|
|
89
|
+
detach(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Returns the kit to the first step with nothing selected, as a newly mounted kit
|
|
92
|
+
* starts. The nozzle's own selection is left as it is.
|
|
93
|
+
*/
|
|
94
|
+
reset(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Moves to the pour step. Only available when `steps.pour` is on. With `start`, also
|
|
97
|
+
* starts a pour; ignored, with a warning, when the pour needs a held button.
|
|
98
|
+
*/
|
|
99
|
+
toPour(options?: CuiPourOptions & {
|
|
100
|
+
start?: boolean;
|
|
101
|
+
}): void;
|
|
102
|
+
/** Sets the before-pour gate the kit calls before every pour. */
|
|
103
|
+
setBeforePour(callback?: (context?: PourContext) => Promise<boolean>): void;
|
|
104
|
+
/** Starts a pour without a gesture (a click-to-pour button or an automated pour). */
|
|
105
|
+
startPour(options?: CuiPourOptions): Promise<boolean>;
|
|
106
|
+
/** The press half of a pour gesture; `releasePour` is the release. */
|
|
107
|
+
pressPour(options?: CuiPourOptions): Promise<boolean>;
|
|
108
|
+
/** The release half of a pour gesture. */
|
|
109
|
+
releasePour(options?: CuiPourOptions): void;
|
|
110
|
+
/** Cancels the pour the kit started last. */
|
|
111
|
+
cancelPour(): Promise<void>;
|
|
112
|
+
/** The pour target whose state the kit reports: the last one poured, else the nozzle. */
|
|
113
|
+
get pourTarget(): PourStrategyAware | undefined;
|
|
114
|
+
private strategyFor;
|
|
115
|
+
/**
|
|
116
|
+
* select → prepare → before-pour gate → pour. While the target is pouring nothing is
|
|
117
|
+
* selected; for a gesture, a release before the pour starts stops the sequence.
|
|
118
|
+
*/
|
|
119
|
+
private runPour;
|
|
120
|
+
/**
|
|
121
|
+
* Selects a beverage, and its brand first when the kit has a brands step, and waits
|
|
122
|
+
* for the nozzle.
|
|
123
|
+
*/
|
|
124
|
+
private selectForPour;
|
|
125
|
+
/** Calls onPourComplete when the pour target returns to idle without being cancelled. */
|
|
126
|
+
trackPourCompletion(): void;
|
|
127
|
+
publishBeverageList(): void;
|
|
128
|
+
private publish;
|
|
129
|
+
init(): Promise<void>;
|
|
130
|
+
}
|
|
131
|
+
/** @internal */
|
|
132
|
+
export declare const CuiKitState: import('@kosdev-code/kos-ui-sdk').KosModelRegistrationFactory<CuiKitStateModel, CuiKitStateOptions>;
|
|
133
|
+
//# sourceMappingURL=cui-kit-state-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cui-kit-state-model.d.ts","sourceRoot":"","s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,SAAS,CAE9C;IAED,OAAO,CAAC,WAAW;IAInB;;;OAGG;YACW,OAAO;IA0CrB;;;OAGG;YACW,aAAa;IAY3B,yFAAyF;IAMzF,mBAAmB;IAsBnB,mBAAmB;IAInB,OAAO,CAAC,OAAO;IAMT,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B;AAED,gBAAgB;AAChB,eAAO,MAAM,WAAW,qGAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/cui-kit-state/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { FutureEndState } from '@kosdev-code/kos-ui-sdk';
|
|
2
|
+
import { PourStrategy } from '../../../../ui/hooks/utils/pour-strategy/pour-strategy';
|
|
3
|
+
import { AvailabilityModel } from '../../availability/types';
|
|
4
|
+
import { PourStrategyAware } from '../../nozzle/types';
|
|
5
|
+
import { PourContext } from '../../../utils/pour-context';
|
|
6
|
+
/**
|
|
7
|
+
* A screen of the CUI Kit's selection flow.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export type CuiKitGroup = "brands" | "beverages" | "flavors" | "pour";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The steps a CUI Kit shows. `beverages` is always on; the rest are opt-in. Turning a
|
|
14
|
+
* step off removes its screen, not its data: `flavors` stays selectable on another
|
|
15
|
+
* screen when its step is off.
|
|
16
|
+
* @kosService dispense.cui-kit
|
|
17
|
+
* @kosApiLevel 17
|
|
18
|
+
*/
|
|
19
|
+
export interface CuiKitSteps {
|
|
20
|
+
brands?: boolean;
|
|
21
|
+
flavors?: boolean;
|
|
22
|
+
pour?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export interface CuiKitStateOptions {
|
|
27
|
+
/** Path of the nozzle the kit drives. */
|
|
28
|
+
nozzlePath: string;
|
|
29
|
+
/**
|
|
30
|
+
* Where navigation starts when `steps` is not set.
|
|
31
|
+
* @deprecated Use `steps.brands`.
|
|
32
|
+
*/
|
|
33
|
+
initialGroup?: "brands" | "beverages";
|
|
34
|
+
/** The steps to show. Without it the kit keeps its original brand → beverage → flavor flow. */
|
|
35
|
+
steps?: CuiKitSteps;
|
|
36
|
+
/** Pour defaults for every pour the kit starts. */
|
|
37
|
+
pour?: {
|
|
38
|
+
/** Gesture strategy for pours that do not name one. */
|
|
39
|
+
strategy?: PourStrategy;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Called when a pour ends on its own (a fixed or automated pour finishing, or a pour
|
|
43
|
+
* failing) rather than being cancelled. A hold-to-pour release never calls it.
|
|
44
|
+
*/
|
|
45
|
+
onPourComplete?: (result: CuiPourResult) => void;
|
|
46
|
+
/** Companion model types created alongside the brand, beverage and flavor availability models. */
|
|
47
|
+
companionTypes?: {
|
|
48
|
+
brand?: string;
|
|
49
|
+
beverage?: string;
|
|
50
|
+
flavor?: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Options for a single pour.
|
|
56
|
+
* @kosService dispense.cui-kit
|
|
57
|
+
* @kosApiLevel 17
|
|
58
|
+
*/
|
|
59
|
+
export interface CuiPourOptions {
|
|
60
|
+
/** A beverage to select (with its brand) before pouring; waits until the nozzle has it. */
|
|
61
|
+
select?: AvailabilityModel;
|
|
62
|
+
/** Runs after selecting and before the before-pour gate. */
|
|
63
|
+
prepare?: (context: PourContext) => Promise<void> | void;
|
|
64
|
+
/** What to pour on, e.g. a GenericPour. Default: the nozzle. */
|
|
65
|
+
target?: PourStrategyAware;
|
|
66
|
+
/** Gesture strategy for this pour. Default: the kit's `pour.strategy`. */
|
|
67
|
+
strategy?: PourStrategy;
|
|
68
|
+
/** Pours the nozzle's named fixed volume instead of using the strategy. */
|
|
69
|
+
fixedPourName?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* How a pour ended, passed to `onPourComplete`.
|
|
74
|
+
* @kosService dispense.cui-kit
|
|
75
|
+
* @kosApiLevel 17
|
|
76
|
+
*/
|
|
77
|
+
export interface CuiPourResult {
|
|
78
|
+
/** End state of the pour's future, when it reached one. */
|
|
79
|
+
endState?: FutureEndState;
|
|
80
|
+
/** The error when starting the pour failed. */
|
|
81
|
+
error?: unknown;
|
|
82
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { DeviceAssemblyOptions } from './types';
|
|
2
|
-
import { NozzleModel } from '../nozzle';
|
|
3
1
|
import { IKosDataModel, IKosIdentifiable, KosCreationContext, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { NozzleModel } from '../nozzle';
|
|
3
|
+
import { DeviceAssemblyOptions } from './types';
|
|
5
4
|
export declare const MODEL_TYPE = "device-assembly-model";
|
|
5
|
+
/**
|
|
6
|
+
* @kosService dispense.device-assembly
|
|
7
|
+
* @kosApiLevel 2
|
|
8
|
+
*/
|
|
6
9
|
export type DeviceAssemblyModel = PublicModelInterface<DeviceAssemblyModelImpl>;
|
|
7
10
|
/**
|
|
8
11
|
* @kosService dispense.device-assembly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-assembly-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"device-assembly-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/device-assembly/device-assembly-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAGhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,UAAU,0BAA0B,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;AAEhF;;;GAGG;AACH,qBACa,uBACX,YAAW,aAAa,EAAE,gBAAgB;IAE1C,EAAE,EAAE,MAAM,CAAC;IACD,OAAO,CAAC,aAAa,CAAkC;IACjE,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,kBAAkB;IASvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIhD,IAAI,WAAW,IAAI,MAAM,EAAE,CAE1B;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAwB5B"}
|
|
@@ -1,89 +1,24 @@
|
|
|
1
|
-
import { DeviceAssemblyOptions } from './types';
|
|
2
|
-
import { DeviceAssemblyModel } from './device-assembly-model';
|
|
3
1
|
import { SingletonKosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { DeviceAssemblyModel } from './device-assembly-model';
|
|
3
|
+
import { DeviceAssemblyOptions } from './types';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The registration bean includes convenience methods for creating and working with DeviceAssemblyModel 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
|
|
5
|
+
* Registration bean for {@link DeviceAssemblyModel}.
|
|
17
6
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* ## factory
|
|
24
|
-
*
|
|
25
|
-
* The factory method creates a factory function that can be used to create new DeviceAssemblyModel instances.
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
7
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
8
|
+
* - `factory`: `DeviceAssembly.factory(options)` returns the single instance, creating it on the first call.
|
|
9
|
+
* - `guard`: type guard that narrows an `IKosDataModel` to `DeviceAssemblyModel`.
|
|
10
|
+
* - `instance()`: reads the model, or builds it from options.
|
|
11
|
+
* - `register()`: registers the model, and any related models, with the model registry.
|
|
29
12
|
*
|
|
30
|
-
*
|
|
31
|
-
* in this case and the existing model will be returned in its current state.
|
|
13
|
+
* DeviceAssembly is a singleton. `KosModelRegistry.dispense.models()` registers it.
|
|
32
14
|
*
|
|
33
15
|
* @example
|
|
34
16
|
* ```typescript
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* });
|
|
17
|
+
* @kosDependency({ modelType: DeviceAssembly.type })
|
|
18
|
+
* private deviceAssembly!: DeviceAssemblyModel;
|
|
38
19
|
* ```
|
|
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 DeviceAssemblyModel.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
*
|
|
49
|
-
* const model: IKosDataModel = ...; // some model
|
|
50
|
-
*
|
|
51
|
-
* if (DeviceAssembly.predicate(model)) {
|
|
52
|
-
* // if the function evaluates to true, the model is narrowed down to DeviceAssemblyModel
|
|
53
|
-
* // and the compiler will know that the model has the DeviceAssemblyModel 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 { DeviceAssembly } 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(DeviceAssembly);
|
|
78
|
-
* ```
|
|
79
|
-
*
|
|
80
|
-
* ## registration.singleton
|
|
81
|
-
|
|
82
|
-
* The deviceAssembly 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
|
-
* */
|
|
20
|
+
* @kosService dispense.device-assembly
|
|
21
|
+
* @kosApiLevel 2
|
|
22
|
+
*/
|
|
88
23
|
export declare const DeviceAssembly: SingletonKosModelRegistrationFactory<DeviceAssemblyModel, DeviceAssemblyOptions>;
|
|
89
24
|
//# sourceMappingURL=device-assembly-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-assembly-registration.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"device-assembly-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/device-assembly/device-assembly-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,kFAMzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/device-assembly/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,mBAAmB,SAAS,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { GenericPourOptions } from './types';
|
|
2
|
-
import { PourState } from '../types';
|
|
3
|
-
import { PourStrategyAware } from '../nozzle/types';
|
|
4
1
|
import { FutureContainer, IFutureModel, IKosDataModel, PublicModelInterface, KosData, KosFutureAwareFull, KosLoggerAware, KosStateMachineAware } from '@kosdev-code/kos-ui-sdk';
|
|
5
|
-
|
|
2
|
+
import { PourStrategyAware } from '../nozzle/types';
|
|
3
|
+
import { PourState } from '../types';
|
|
4
|
+
import { GenericPourOptions } from './types';
|
|
6
5
|
export declare const MODEL_TYPE = "generic-pour-model";
|
|
6
|
+
/**
|
|
7
|
+
* @kosService dispense.generic-pour
|
|
8
|
+
* @kosApiLevel 4
|
|
9
|
+
*/
|
|
7
10
|
export type GenericPourModel = PublicModelInterface<GenericPourModelImpl>;
|
|
11
|
+
/**
|
|
12
|
+
* @kosService dispense.generic-pour
|
|
13
|
+
* @kosApiLevel 4
|
|
14
|
+
*/
|
|
8
15
|
export declare const TOPIC_GENERIC_POUR_STARTED = "/kos/generic/pour/started";
|
|
16
|
+
/**
|
|
17
|
+
* @kosService dispense.generic-pour
|
|
18
|
+
* @kosApiLevel 4
|
|
19
|
+
*/
|
|
9
20
|
export declare const TOPIC_GENERIC_POUR_PROGRESS = "/kos/generic/pour/progress";
|
|
21
|
+
/**
|
|
22
|
+
* @kosService dispense.generic-pour
|
|
23
|
+
* @kosApiLevel 4
|
|
24
|
+
*/
|
|
10
25
|
export declare const TOPIC_GENERIC_POUR_CANCEL = "/kos/generic/pour/cancel";
|
|
11
26
|
type PourEvent = "START_POUR" | "POUR_ACTIVE" | "CANCEL_POUR" | "POUR_CANCELED" | "POUR_COMPLETED";
|
|
12
27
|
export interface GenericPourModelImpl extends KosLoggerAware, KosFutureAwareFull<any>, KosStateMachineAware<PourState, PourEvent> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-pour-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"generic-pour-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/generic-pour/generic-pour-model.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,eAAe,EAGf,YAAY,EACZ,aAAa,EAEb,oBAAoB,EAWpB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,UAAU,uBAAuB,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,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;IAUvB;;;OAGG;IACH,IAAI,SAAS,YAOZ;IAED;;;;;;;;OAQG;IACH,IAAI,OAAO,YAEV;IAED,IAAI,YAAY,WAEf;IAMD,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC;CA6BzC"}
|
|
@@ -1,87 +1,25 @@
|
|
|
1
|
-
import { GenericPourModel } from './generic-pour-model';
|
|
2
|
-
import { GenericPourOptions } from './types';
|
|
3
1
|
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { GenericPourOptions } from './types';
|
|
3
|
+
import { GenericPourModel } from './generic-pour-model';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* Registration bean for {@link GenericPourModel}.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
8
|
+
* - `factory`: curried factory, `GenericPour.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
|
|
9
|
+
* - `guard`: type guard that narrows an `IKosDataModel` to `GenericPourModel`.
|
|
10
|
+
* - `instance(id)`: reads the model, or builds it from options.
|
|
11
|
+
* - `register()`: registers the model, and any related models, with the model registry.
|
|
9
12
|
*
|
|
10
|
-
*
|
|
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.
|
|
13
|
+
* GenericPour is not a singleton: each id has its own instance.
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```typescript
|
|
17
|
-
*
|
|
18
|
-
* @kosDependency({modelType: GenericPour.type, id: "genericPourId"})
|
|
19
|
-
* private genericPourModel: GenericPourModel;
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* ## factory
|
|
24
|
-
*
|
|
25
|
-
* The factory method creates a factory function that can be used to create new GenericPourModel instances.
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
29
|
-
*
|
|
30
|
-
* If a model with the specified id 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 = GenericPour.factory("genericPourId")({
|
|
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 GenericPourModel.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
*
|
|
49
|
-
* const model: IKosDataModel = ...; // some model
|
|
50
|
-
*
|
|
51
|
-
* if (GenericPour.predicate(model)) {
|
|
52
|
-
* // if the function evaluates to true, the model is narrowed down to GenericPourModel
|
|
53
|
-
* // and the compiler will know that the model has the GenericPourModel 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 { GenericPour } from "@kos-ui/project-models";
|
|
71
17
|
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
72
18
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* KosModelRegistry.dispense
|
|
76
|
-
* .models()
|
|
77
|
-
* .model(GenericPour);
|
|
19
|
+
* KosModelRegistry.dispense.models().model(GenericPour);
|
|
78
20
|
* ```
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
* The genericPour 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.
|
|
83
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
84
|
-
|
|
85
|
-
* */
|
|
21
|
+
* @kosService dispense.generic-pour
|
|
22
|
+
* @kosApiLevel 4
|
|
23
|
+
*/
|
|
86
24
|
export declare const GenericPour: KosModelRegistrationFactory<GenericPourModel, GenericPourOptions>;
|
|
87
25
|
//# sourceMappingURL=generic-pour-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-pour-registration.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"generic-pour-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/generic-pour/generic-pour-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,mEAMtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/generic-pour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,mBAAmB,MAAM,YAAY,CAAC;AAClD,mBAAmB,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-pour-services.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"generic-pour-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/generic-pour/services/generic-pour-services.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;IAaI;AACJ,eAAO,MAAM,YAAY,GAAU,MAAM,MAAM,EAAE,SAAS,MAAM,mFAW/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/generic-pour/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|