@kosdev-code/kos-ddk-story-containers 0.1.0-dev.105

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.
Files changed (51) hide show
  1. package/components/index.d.ts +2 -0
  2. package/components/index.d.ts.map +1 -0
  3. package/components/storybook/control-pour-story-container/control-pour-story-container.d.ts +7 -0
  4. package/components/storybook/control-pour-story-container/control-pour-story-container.d.ts.map +1 -0
  5. package/components/storybook/control-pour-story-container/index.d.ts +2 -0
  6. package/components/storybook/control-pour-story-container/index.d.ts.map +1 -0
  7. package/components/storybook/cui-story-container/cui-story-container.d.ts +7 -0
  8. package/components/storybook/cui-story-container/cui-story-container.d.ts.map +1 -0
  9. package/components/storybook/cui-story-container/index.d.ts +2 -0
  10. package/components/storybook/cui-story-container/index.d.ts.map +1 -0
  11. package/components/storybook/dashboard-story-container/dashboard-story-container.d.ts +25 -0
  12. package/components/storybook/dashboard-story-container/dashboard-story-container.d.ts.map +1 -0
  13. package/components/storybook/dashboard-story-container/index.d.ts +4 -0
  14. package/components/storybook/dashboard-story-container/index.d.ts.map +1 -0
  15. package/components/storybook/dashboard-story-container/region-story-container.d.ts +21 -0
  16. package/components/storybook/dashboard-story-container/region-story-container.d.ts.map +1 -0
  17. package/components/storybook/dashboard-story-container/use-dashboard-card-model.d.ts +13 -0
  18. package/components/storybook/dashboard-story-container/use-dashboard-card-model.d.ts.map +1 -0
  19. package/components/storybook/holder-story-container/holder-story-container.d.ts +25 -0
  20. package/components/storybook/holder-story-container/holder-story-container.d.ts.map +1 -0
  21. package/components/storybook/holder-story-container/index.d.ts +2 -0
  22. package/components/storybook/holder-story-container/index.d.ts.map +1 -0
  23. package/components/storybook/index.d.ts +10 -0
  24. package/components/storybook/index.d.ts.map +1 -0
  25. package/components/storybook/nav-story-container/index.d.ts +2 -0
  26. package/components/storybook/nav-story-container/index.d.ts.map +1 -0
  27. package/components/storybook/nav-story-container/nav-story-container.d.ts +7 -0
  28. package/components/storybook/nav-story-container/nav-story-container.d.ts.map +1 -0
  29. package/components/storybook/setting-story-container/index.d.ts +2 -0
  30. package/components/storybook/setting-story-container/index.d.ts.map +1 -0
  31. package/components/storybook/setting-story-container/setting-story-container.d.ts +7 -0
  32. package/components/storybook/setting-story-container/setting-story-container.d.ts.map +1 -0
  33. package/components/storybook/setup-step-story-container/index.d.ts +2 -0
  34. package/components/storybook/setup-step-story-container/index.d.ts.map +1 -0
  35. package/components/storybook/setup-step-story-container/setup-step-story-container.d.ts +7 -0
  36. package/components/storybook/setup-step-story-container/setup-step-story-container.d.ts.map +1 -0
  37. package/components/storybook/trouble-action-story-container/index.d.ts +2 -0
  38. package/components/storybook/trouble-action-story-container/index.d.ts.map +1 -0
  39. package/components/storybook/trouble-action-story-container/trouble-action-story-container.d.ts +16 -0
  40. package/components/storybook/trouble-action-story-container/trouble-action-story-container.d.ts.map +1 -0
  41. package/components/storybook/utility-story-container/index.d.ts +2 -0
  42. package/components/storybook/utility-story-container/index.d.ts.map +1 -0
  43. package/components/storybook/utility-story-container/utility-story-container.d.ts +7 -0
  44. package/components/storybook/utility-story-container/utility-story-container.d.ts.map +1 -0
  45. package/index.cjs +249 -0
  46. package/index.cjs.map +1 -0
  47. package/index.d.ts +2 -0
  48. package/index.d.ts.map +1 -0
  49. package/index.js +249 -0
  50. package/index.js.map +1 -0
  51. package/package.json +32 -0
@@ -0,0 +1,2 @@
1
+ export * from './storybook';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/kos-ddk-story-containers/src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface ControlPourStoryContainerProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const ControlPourStoryContainer: ({ children, }: ControlPourStoryContainerProps) => ReactNode;
6
+ export {};
7
+ //# sourceMappingURL=control-pour-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-pour-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/control-pour-story-container/control-pour-story-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,8BAA8B;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,yBAAyB,GAAI,eAEvC,8BAA8B,cAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './control-pour-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/control-pour-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface CUIStoryContainerProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const CUIStoryContainer: ({ children }: CUIStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=cui-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cui-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/cui-story-container/cui-story-container.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,sBAAsB,qDAuBrE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './cui-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/cui-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { AssemblyModel } from '@kosdev-code/kos-dispense-sdk';
2
+ import { IKosDataModel } from '@kosdev-code/kos-ui-sdk';
3
+ import { ReactNode } from 'react';
4
+ export interface DashboardCardStoryProps {
5
+ dashboardKey: string;
6
+ assembly?: AssemblyModel;
7
+ cardModel?: IKosDataModel;
8
+ onComplete: () => void;
9
+ }
10
+ interface DashboardStoryContainerProps {
11
+ /** The contribution's dashboardKey: an assembly (or FreestyleAssembly) property. */
12
+ dashboardKey: string;
13
+ title: string;
14
+ children: (props: DashboardCardStoryProps) => ReactNode;
15
+ }
16
+ /** A dashboard summary story, framed as the host frames the card body. */
17
+ export declare const DashboardSummaryStoryContainer: (({ dashboardKey, title, children }: DashboardStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
18
+ displayName: string;
19
+ };
20
+ /** A dashboard detail story, in the modal the host opens from the card. */
21
+ export declare const DashboardDetailStoryContainer: (({ dashboardKey, title, children }: DashboardStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
22
+ displayName: string;
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=dashboard-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/dashboard-story-container.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,UAAU,4BAA4B;IACpC,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,SAAS,CAAC;CACzD;AASD,0EAA0E;AAC1E,eAAO,MAAM,8BAA8B,uCACL,4BAA4B;;CAgBjE,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,6BAA6B,uCACJ,4BAA4B;;CAuBjE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './dashboard-story-container';
2
+ export * from './use-dashboard-card-model';
3
+ export * from './region-story-container';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { DashboardCardSize, DashboardRegionComponentProps } from '@kosdev-code/kos-ddk-models';
2
+ import { ReactNode } from 'react';
3
+ interface DashboardRegionStoryContainerProps {
4
+ /** The contribution's regionKey. */
5
+ regionKey: string;
6
+ /** Holder-group patterns the region claims, as in the descriptor. Default none. */
7
+ holders?: string[];
8
+ /** Summary dashboardKeys the region claims. Default none. */
9
+ summaries?: string[];
10
+ size?: DashboardCardSize;
11
+ children: (props: DashboardRegionComponentProps) => ReactNode;
12
+ }
13
+ /**
14
+ * A dashboard region story: the props the host dashboard passes a region component,
15
+ * built from the assembly with the holders and summaries the story says it claims.
16
+ */
17
+ export declare const DashboardRegionStoryContainer: (({ regionKey, holders, summaries, size, children, }: DashboardRegionStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
18
+ displayName: string;
19
+ };
20
+ export {};
21
+ //# sourceMappingURL=region-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/region-story-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EACnC,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,kCAAkC;IAC1C,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,SAAS,CAAC;CAC/D;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,wDAOrC,kCAAkC;;CA2BtC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { AssemblyModel } from '@kosdev-code/kos-dispense-sdk';
2
+ import { IKosDataModel } from '@kosdev-code/kos-ui-sdk';
3
+ /**
4
+ * The active models the host dashboard draws cards for at `dashboardKey`: the
5
+ * assembly property, then the FreestyleAssembly companion's; a container yields its items.
6
+ */
7
+ export declare const dashboardModels: (assembly: AssemblyModel | undefined, dashboardKey: string) => IKosDataModel[];
8
+ /** The assembly and the first active model a dashboard card renders for `dashboardKey`. */
9
+ export declare const useDashboardCardModel: (dashboardKey: string) => {
10
+ assembly: AssemblyModel<any, any> | undefined;
11
+ cardModel: IKosDataModel;
12
+ };
13
+ //# sourceMappingURL=use-dashboard-card-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-dashboard-card-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/use-dashboard-card-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,aAAa,GAAG,SAAS,EACnC,cAAc,MAAM,KACnB,aAAa,EAoBf,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,GAAI,cAAc,MAAM;;;CAIzD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { HolderModel } from '@kosdev-code/kos-dispense-sdk';
2
+ import { ReactNode } from 'react';
3
+ export interface HolderStoryProps {
4
+ holder: HolderModel;
5
+ }
6
+ interface HolderStoryContainerProps {
7
+ /** The contribution's dashboardKey. */
8
+ dashboardKey: string;
9
+ title: string;
10
+ children: (props: HolderStoryProps) => ReactNode;
11
+ }
12
+ /** A pump detail story, in the holder modal the host opens. */
13
+ export declare const PumpDetailStoryContainer: (({ dashboardKey, title, children }: HolderStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
14
+ displayName: string;
15
+ };
16
+ /** A macro summary story: the body the host shows on a macro holder card. */
17
+ export declare const MacroSummaryStoryContainer: (({ dashboardKey, children }: HolderStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
18
+ displayName: string;
19
+ };
20
+ /** A pump summary story: the body the host shows on the holder's dashboard card. */
21
+ export declare const PumpSummaryStoryContainer: (({ dashboardKey, children }: HolderStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
22
+ displayName: string;
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=holder-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holder-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/holder-story-container/holder-story-container.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,UAAU,yBAAyB;IACjC,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,SAAS,CAAC;CAClD;AAuBD,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,uCACC,yBAAyB;;CAkB9D,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,gCACR,yBAAyB;;CAKvD,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,gCACP,yBAAyB;;CAWvD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './holder-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/holder-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from './control-pour-story-container';
2
+ export * from './cui-story-container';
3
+ export * from './dashboard-story-container';
4
+ export * from './holder-story-container';
5
+ export * from './nav-story-container';
6
+ export * from './setting-story-container';
7
+ export * from './setup-step-story-container';
8
+ export * from './trouble-action-story-container';
9
+ export * from './utility-story-container';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ddk-story-containers/src/components/storybook/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './nav-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/nav-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface NavStoryContainerProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const NavStoryContainer: ({ children }: NavStoryContainerProps) => ReactNode;
6
+ export {};
7
+ //# sourceMappingURL=nav-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/nav-story-container/nav-story-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,GAAI,cAAc,sBAAsB,cAC5D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './setting-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/setting-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface SettingStoryContainerProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const SettingStoryContainer: ({ children, }: SettingStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=setting-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setting-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/setting-story-container/setting-story-container.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,0BAA0B;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,GAAI,eAEnC,0BAA0B,qDAK5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './setup-step-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/setup-step-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface SetupStepStoryContainerProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const SetupStepStoryContainer: ({ children, }: SetupStepStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=setup-step-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-step-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/setup-step-story-container/setup-step-story-container.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,4BAA4B;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB,GAAI,eAErC,4BAA4B,qDAuB9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './trouble-action-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/trouble-action-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { TroubleModel } from '@kosdev-code/kos-ui-sdk';
2
+ import { ReactNode } from 'react';
3
+ export interface TroubleActionStoryProps {
4
+ trouble: TroubleModel;
5
+ }
6
+ interface TroubleActionStoryContainerProps {
7
+ /** The contribution's troubleType: the exact type the device raises. */
8
+ troubleType: string;
9
+ children: (props: TroubleActionStoryProps) => ReactNode;
10
+ }
11
+ /** A trouble action story, given the device's active trouble of `troubleType`. */
12
+ export declare const TroubleActionStoryContainer: (({ troubleType, children }: TroubleActionStoryContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element) & {
13
+ displayName: string;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=trouble-action-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trouble-action-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/trouble-action-story-container/trouble-action-story-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,UAAU,gCAAgC;IACxC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,SAAS,CAAC;CACzD;AAED,kFAAkF;AAClF,eAAO,MAAM,2BAA2B,+BACV,gCAAgC;;CAa7D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './utility-story-container';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/utility-story-container/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface UtilityStoryContainerProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const UtilityStoryContainer: ({ children, }: UtilityStoryContainerProps) => ReactNode;
6
+ export {};
7
+ //# sourceMappingURL=utility-story-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility-story-container.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ddk-story-containers/src/components/storybook/utility-story-container/utility-story-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,0BAA0B;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,GAAI,eAEnC,0BAA0B,cAAa,CAAC"}
package/index.cjs ADDED
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const kosDdkComponents = require("@kosdev-code/kos-ddk-components");
5
+ const kosUiSdk = require("@kosdev-code/kos-ui-sdk");
6
+ const kosDispenseSdk = require("@kosdev-code/kos-dispense-sdk");
7
+ const kosFreestyleSdk = require("@kosdev-code/kos-freestyle-sdk");
8
+ const kosDdkModels = require("@kosdev-code/kos-ddk-models");
9
+ const ControlPourStoryContainer = ({
10
+ children
11
+ }) => children;
12
+ const CUIStoryContainer = ({ children }) => {
13
+ const { componentModeOverride } = kosDdkComponents.useComponentConfigurationContext();
14
+ return /* @__PURE__ */ jsxRuntime.jsx(
15
+ kosDdkComponents.Modal,
16
+ {
17
+ contain: componentModeOverride !== "compact",
18
+ mode: "maximized",
19
+ show: true,
20
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx(
22
+ kosDdkComponents.Header,
23
+ {
24
+ CloseButton: componentModeOverride === "compact" ? kosDdkComponents.BackButton : void 0,
25
+ contain: componentModeOverride === "compact",
26
+ showCloseButton: true,
27
+ showOpenButton: false,
28
+ title: "CUI"
29
+ }
30
+ ),
31
+ children
32
+ ] })
33
+ }
34
+ );
35
+ };
36
+ const dashboardModels = (assembly, dashboardKey) => {
37
+ let modelRef = assembly?.[dashboardKey];
38
+ if (!modelRef && assembly) {
39
+ const freestyle = kosUiSdk.getKosCompanionModel(
40
+ assembly,
41
+ kosFreestyleSdk.FreestyleAssembly.type
42
+ );
43
+ modelRef = freestyle?.[dashboardKey];
44
+ }
45
+ const models = modelRef ? Array.isArray(modelRef.data) ? modelRef.data : [modelRef] : [];
46
+ return models.filter(
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
+ (model) => typeof model?.active === "boolean" ? model.active : true
49
+ );
50
+ };
51
+ const useDashboardCardModel = (dashboardKey) => {
52
+ const { model: assembly } = kosDispenseSdk.useAssemblyContext();
53
+ const cardModel = dashboardModels(assembly, dashboardKey)[0];
54
+ return { assembly, cardModel };
55
+ };
56
+ const noModel = (dashboardKey) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
57
+ 'No active "',
58
+ dashboardKey,
59
+ '" model on the assembly. Start the simulator with a dispenser that has one.'
60
+ ] });
61
+ const DashboardSummaryStoryContainer = kosUiSdk.kosComponent(
62
+ ({ dashboardKey, title, children }) => {
63
+ const { assembly, cardModel } = useDashboardCardModel(dashboardKey);
64
+ if (!cardModel) return noModel(dashboardKey);
65
+ return /* @__PURE__ */ jsxRuntime.jsx(
66
+ kosDdkComponents.AgitatorDashboardCard,
67
+ {
68
+ cardId: dashboardKey,
69
+ title,
70
+ body: children({
71
+ dashboardKey,
72
+ assembly,
73
+ cardModel,
74
+ onComplete: () => void 0
75
+ })
76
+ }
77
+ );
78
+ }
79
+ );
80
+ const DashboardDetailStoryContainer = kosUiSdk.kosComponent(
81
+ ({ dashboardKey, title, children }) => {
82
+ const { componentModeOverride } = kosDdkComponents.useComponentConfigurationContext();
83
+ const { assembly, cardModel } = useDashboardCardModel(dashboardKey);
84
+ if (!cardModel) return noModel(dashboardKey);
85
+ return /* @__PURE__ */ jsxRuntime.jsxs(kosDdkComponents.Modal, { contain: componentModeOverride !== "compact", show: true, children: [
86
+ /* @__PURE__ */ jsxRuntime.jsx(
87
+ kosDdkComponents.Header,
88
+ {
89
+ CloseButton: componentModeOverride === "compact" ? kosDdkComponents.BackButton : void 0,
90
+ contain: componentModeOverride === "compact",
91
+ showCloseButton: true,
92
+ title
93
+ }
94
+ ),
95
+ children({
96
+ dashboardKey,
97
+ assembly,
98
+ cardModel,
99
+ onComplete: () => void 0
100
+ })
101
+ ] });
102
+ }
103
+ );
104
+ const DashboardRegionStoryContainer = kosUiSdk.kosComponent(
105
+ ({
106
+ regionKey,
107
+ holders = [],
108
+ summaries = [],
109
+ size = "default",
110
+ children
111
+ }) => {
112
+ const { model: assembly } = kosDispenseSdk.useAssemblyContext();
113
+ const holderGroups = kosDdkModels.orderHolderGroups(assembly?.holderGroups ?? []).filter(
114
+ (group) => holders.some((pattern) => kosDdkModels.matchesDashboardPattern(pattern, group))
115
+ ).map((name) => ({
116
+ name,
117
+ holders: kosDdkModels.sortedHoldersByGroup(assembly, name)
118
+ }));
119
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children({
120
+ regionKey,
121
+ holderGroups,
122
+ summaries: summaries.map((dashboardKey) => ({
123
+ dashboardKey,
124
+ models: dashboardModels(assembly, dashboardKey)
125
+ })),
126
+ assembly,
127
+ size,
128
+ flow: { cards: "vertical", groups: "horizontal", wrap: false },
129
+ orientation: "portrait"
130
+ }) });
131
+ }
132
+ );
133
+ const useStoryHolder = (dashboardKey, matchName) => {
134
+ const { model } = kosDispenseSdk.useHolderContainer();
135
+ return model?.holders.data.find(
136
+ (holder) => matchName && holder.name === dashboardKey || kosDdkModels.executeDashboardKeys(holder).includes(dashboardKey)
137
+ );
138
+ };
139
+ const noHolder = (dashboardKey) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
140
+ 'No holder matches dashboard key "',
141
+ dashboardKey,
142
+ '". Start the simulator with a dispenser that has one.'
143
+ ] });
144
+ const PumpDetailStoryContainer = kosUiSdk.kosComponent(
145
+ ({ dashboardKey, title, children }) => {
146
+ const { componentModeOverride } = kosDdkComponents.useComponentConfigurationContext();
147
+ const holder = useStoryHolder(dashboardKey, false);
148
+ if (!holder) return noHolder(dashboardKey);
149
+ return /* @__PURE__ */ jsxRuntime.jsxs(kosDdkComponents.Modal, { contain: componentModeOverride !== "compact", show: true, children: [
150
+ /* @__PURE__ */ jsxRuntime.jsx(
151
+ kosDdkComponents.Header,
152
+ {
153
+ CloseButton: componentModeOverride === "compact" ? kosDdkComponents.BackButton : void 0,
154
+ contain: componentModeOverride === "compact",
155
+ showCloseButton: true,
156
+ title
157
+ }
158
+ ),
159
+ children({ holder })
160
+ ] });
161
+ }
162
+ );
163
+ const MacroSummaryStoryContainer = kosUiSdk.kosComponent(
164
+ ({ dashboardKey, children }) => {
165
+ const holder = useStoryHolder(dashboardKey, true);
166
+ if (!holder) return noHolder(dashboardKey);
167
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children({ holder }) });
168
+ }
169
+ );
170
+ const PumpSummaryStoryContainer = kosUiSdk.kosComponent(
171
+ ({ dashboardKey, children }) => {
172
+ const holder = useStoryHolder(dashboardKey, false);
173
+ if (!holder) return noHolder(dashboardKey);
174
+ return /* @__PURE__ */ jsxRuntime.jsx(
175
+ kosDdkComponents.HolderDashboardCard,
176
+ {
177
+ cardId: holder.path,
178
+ avatar: holder.name,
179
+ body: children({ holder })
180
+ }
181
+ );
182
+ }
183
+ );
184
+ const NavStoryContainer = ({ children }) => children;
185
+ const SettingStoryContainer = ({
186
+ children
187
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(kosDdkComponents.TabContainer, { children: [
188
+ /* @__PURE__ */ jsxRuntime.jsx(kosDdkComponents.SettingsSubheading, { children: "Setting" }),
189
+ children
190
+ ] });
191
+ const SetupStepStoryContainer = ({
192
+ children
193
+ }) => {
194
+ const { componentModeOverride } = kosDdkComponents.useComponentConfigurationContext();
195
+ return /* @__PURE__ */ jsxRuntime.jsx(
196
+ kosDdkComponents.Modal,
197
+ {
198
+ contain: componentModeOverride !== "compact",
199
+ mode: "maximized",
200
+ show: true,
201
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
202
+ /* @__PURE__ */ jsxRuntime.jsx(
203
+ kosDdkComponents.Header,
204
+ {
205
+ CloseButton: componentModeOverride === "compact" ? kosDdkComponents.BackButton : void 0,
206
+ contain: componentModeOverride === "compact",
207
+ showCloseButton: true,
208
+ showOpenButton: true,
209
+ title: "Setup Step"
210
+ }
211
+ ),
212
+ children
213
+ ] })
214
+ }
215
+ );
216
+ };
217
+ const TroubleActionStoryContainer = kosUiSdk.kosComponent(
218
+ ({ troubleType, children }) => {
219
+ const { model } = kosUiSdk.useTroubleContainerModel();
220
+ const trouble = model?.troubles.getIndexByKey("byType", troubleType)[0];
221
+ if (!trouble) {
222
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
223
+ 'No active "',
224
+ troubleType,
225
+ '" trouble. Raise one on the simulator to see this experience.'
226
+ ] });
227
+ }
228
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children({ trouble }) });
229
+ }
230
+ );
231
+ const UtilityStoryContainer = ({
232
+ children
233
+ }) => children;
234
+ exports.CUIStoryContainer = CUIStoryContainer;
235
+ exports.ControlPourStoryContainer = ControlPourStoryContainer;
236
+ exports.DashboardDetailStoryContainer = DashboardDetailStoryContainer;
237
+ exports.DashboardRegionStoryContainer = DashboardRegionStoryContainer;
238
+ exports.DashboardSummaryStoryContainer = DashboardSummaryStoryContainer;
239
+ exports.MacroSummaryStoryContainer = MacroSummaryStoryContainer;
240
+ exports.NavStoryContainer = NavStoryContainer;
241
+ exports.PumpDetailStoryContainer = PumpDetailStoryContainer;
242
+ exports.PumpSummaryStoryContainer = PumpSummaryStoryContainer;
243
+ exports.SettingStoryContainer = SettingStoryContainer;
244
+ exports.SetupStepStoryContainer = SetupStepStoryContainer;
245
+ exports.TroubleActionStoryContainer = TroubleActionStoryContainer;
246
+ exports.UtilityStoryContainer = UtilityStoryContainer;
247
+ exports.dashboardModels = dashboardModels;
248
+ exports.useDashboardCardModel = useDashboardCardModel;
249
+ //# sourceMappingURL=index.cjs.map
package/index.cjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../packages/kos-ddk-story-containers/src/components/storybook/control-pour-story-container/control-pour-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/cui-story-container/cui-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/use-dashboard-card-model.ts","../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/dashboard-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/region-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/holder-story-container/holder-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/nav-story-container/nav-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/setting-story-container/setting-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/setup-step-story-container/setup-step-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/trouble-action-story-container/trouble-action-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/utility-story-container/utility-story-container.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\ninterface ControlPourStoryContainerProps {\n children: ReactNode;\n}\n\nexport const ControlPourStoryContainer = ({\n children,\n}: ControlPourStoryContainerProps) => children;\n","import {\n BackButton,\n Header,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { ReactNode } from \"react\";\n\ninterface CUIStoryContainerProps {\n children: ReactNode;\n}\n\nexport const CUIStoryContainer = ({ children }: CUIStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n\n return (\n <Modal\n contain={componentModeOverride !== \"compact\"}\n mode=\"maximized\"\n show={true}\n >\n <>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n showOpenButton={false}\n title=\"CUI\"\n />\n {children}\n </>\n </Modal>\n );\n};\n","import {\n useAssemblyContext,\n type AssemblyModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport { FreestyleAssembly } from \"@kosdev-code/kos-freestyle-sdk\";\nimport {\n getKosCompanionModel,\n type IKosDataModel,\n} from \"@kosdev-code/kos-ui-sdk\";\n\n/**\n * The active models the host dashboard draws cards for at `dashboardKey`: the\n * assembly property, then the FreestyleAssembly companion's; a container yields its items.\n */\nexport const dashboardModels = (\n assembly: AssemblyModel | undefined,\n dashboardKey: string\n): IKosDataModel[] => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let modelRef: any = (assembly as any)?.[dashboardKey];\n if (!modelRef && assembly) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const freestyle: any = getKosCompanionModel(\n assembly,\n FreestyleAssembly.type\n );\n modelRef = freestyle?.[dashboardKey];\n }\n const models: IKosDataModel[] = modelRef\n ? Array.isArray(modelRef.data)\n ? modelRef.data\n : [modelRef]\n : [];\n return models.filter(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (model: any) => (typeof model?.active === \"boolean\" ? model.active : true)\n );\n};\n\n/** The assembly and the first active model a dashboard card renders for `dashboardKey`. */\nexport const useDashboardCardModel = (dashboardKey: string) => {\n const { model: assembly } = useAssemblyContext();\n const cardModel = dashboardModels(assembly, dashboardKey)[0];\n return { assembly, cardModel };\n};\n","import {\n AgitatorDashboardCard,\n BackButton,\n Header,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { AssemblyModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, type IKosDataModel } from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\nimport { useDashboardCardModel } from \"./use-dashboard-card-model\";\n\nexport interface DashboardCardStoryProps {\n dashboardKey: string;\n assembly?: AssemblyModel;\n cardModel?: IKosDataModel;\n onComplete: () => void;\n}\n\ninterface DashboardStoryContainerProps {\n /** The contribution's dashboardKey: an assembly (or FreestyleAssembly) property. */\n dashboardKey: string;\n title: string;\n children: (props: DashboardCardStoryProps) => ReactNode;\n}\n\nconst noModel = (dashboardKey: string) => (\n <div>\n No active \"{dashboardKey}\" model on the assembly. Start the simulator with a\n dispenser that has one.\n </div>\n);\n\n/** A dashboard summary story, framed as the host frames the card body. */\nexport const DashboardSummaryStoryContainer = kosComponent(\n ({ dashboardKey, title, children }: DashboardStoryContainerProps) => {\n const { assembly, cardModel } = useDashboardCardModel(dashboardKey);\n if (!cardModel) return noModel(dashboardKey);\n return (\n <AgitatorDashboardCard\n cardId={dashboardKey}\n title={title}\n body={children({\n dashboardKey,\n assembly,\n cardModel,\n onComplete: () => undefined,\n })}\n />\n );\n }\n);\n\n/** A dashboard detail story, in the modal the host opens from the card. */\nexport const DashboardDetailStoryContainer = kosComponent(\n ({ dashboardKey, title, children }: DashboardStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const { assembly, cardModel } = useDashboardCardModel(dashboardKey);\n if (!cardModel) return noModel(dashboardKey);\n return (\n <Modal contain={componentModeOverride !== \"compact\"} show={true}>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={title}\n />\n {children({\n dashboardKey,\n assembly,\n cardModel,\n onComplete: () => undefined,\n })}\n </Modal>\n );\n }\n);\n","import {\n matchesDashboardPattern,\n orderHolderGroups,\n sortedHoldersByGroup,\n type DashboardCardSize,\n type DashboardRegionComponentProps,\n} from \"@kosdev-code/kos-ddk-models\";\nimport { useAssemblyContext } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\nimport { dashboardModels } from \"./use-dashboard-card-model\";\n\ninterface DashboardRegionStoryContainerProps {\n /** The contribution's regionKey. */\n regionKey: string;\n /** Holder-group patterns the region claims, as in the descriptor. Default none. */\n holders?: string[];\n /** Summary dashboardKeys the region claims. Default none. */\n summaries?: string[];\n size?: DashboardCardSize;\n children: (props: DashboardRegionComponentProps) => ReactNode;\n}\n\n/**\n * A dashboard region story: the props the host dashboard passes a region component,\n * built from the assembly with the holders and summaries the story says it claims.\n */\nexport const DashboardRegionStoryContainer = kosComponent(\n ({\n regionKey,\n holders = [],\n summaries = [],\n size = \"default\",\n children,\n }: DashboardRegionStoryContainerProps) => {\n const { model: assembly } = useAssemblyContext();\n const holderGroups = orderHolderGroups(assembly?.holderGroups ?? [])\n .filter((group) =>\n holders.some((pattern) => matchesDashboardPattern(pattern, group))\n )\n .map((name) => ({\n name,\n holders: sortedHoldersByGroup(assembly, name),\n }));\n return (\n <>\n {children({\n regionKey,\n holderGroups,\n summaries: summaries.map((dashboardKey) => ({\n dashboardKey,\n models: dashboardModels(assembly, dashboardKey),\n })),\n assembly,\n size,\n flow: { cards: \"vertical\", groups: \"horizontal\", wrap: false },\n orientation: \"portrait\",\n })}\n </>\n );\n }\n);\n","import {\n BackButton,\n Header,\n HolderDashboardCard,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n useHolderContainer,\n type HolderModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport { executeDashboardKeys } from \"@kosdev-code/kos-ddk-models\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\n\nexport interface HolderStoryProps {\n holder: HolderModel;\n}\n\ninterface HolderStoryContainerProps {\n /** The contribution's dashboardKey. */\n dashboardKey: string;\n title: string;\n children: (props: HolderStoryProps) => ReactNode;\n}\n\n/**\n * The first holder a contribution with `dashboardKey` renders for. Pump detail and\n * pump summary match any of the holder's dashboard keys (default: its first pump\n * type); macro summary tries holder.name first.\n */\nconst useStoryHolder = (dashboardKey: string, matchName: boolean) => {\n const { model } = useHolderContainer();\n return model?.holders.data.find(\n (holder: HolderModel) =>\n (matchName && holder.name === dashboardKey) ||\n executeDashboardKeys(holder).includes(dashboardKey)\n );\n};\n\nconst noHolder = (dashboardKey: string) => (\n <div>\n No holder matches dashboard key \"{dashboardKey}\". Start the simulator with a\n dispenser that has one.\n </div>\n);\n\n/** A pump detail story, in the holder modal the host opens. */\nexport const PumpDetailStoryContainer = kosComponent(\n ({ dashboardKey, title, children }: HolderStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const holder = useStoryHolder(dashboardKey, false);\n if (!holder) return noHolder(dashboardKey);\n return (\n <Modal contain={componentModeOverride !== \"compact\"} show={true}>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={title}\n />\n {children({ holder })}\n </Modal>\n );\n }\n);\n\n/** A macro summary story: the body the host shows on a macro holder card. */\nexport const MacroSummaryStoryContainer = kosComponent(\n ({ dashboardKey, children }: HolderStoryContainerProps) => {\n const holder = useStoryHolder(dashboardKey, true);\n if (!holder) return noHolder(dashboardKey);\n return <>{children({ holder })}</>;\n }\n);\n\n/** A pump summary story: the body the host shows on the holder's dashboard card. */\nexport const PumpSummaryStoryContainer = kosComponent(\n ({ dashboardKey, children }: HolderStoryContainerProps) => {\n const holder = useStoryHolder(dashboardKey, false);\n if (!holder) return noHolder(dashboardKey);\n return (\n <HolderDashboardCard\n cardId={holder.path}\n avatar={holder.name}\n body={children({ holder })}\n />\n );\n }\n);\n","import type { ReactNode } from \"react\";\n\ninterface NavStoryContainerProps {\n children: ReactNode;\n}\n\nexport const NavStoryContainer = ({ children }: NavStoryContainerProps) =>\n children;\n","import {\n SettingsSubheading,\n TabContainer,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { ReactNode } from \"react\";\n\ninterface SettingStoryContainerProps {\n children: ReactNode;\n}\n\nexport const SettingStoryContainer = ({\n children,\n}: SettingStoryContainerProps) => (\n <TabContainer>\n <SettingsSubheading>Setting</SettingsSubheading>\n {children}\n </TabContainer>\n);\n","import {\n BackButton,\n Header,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { ReactNode } from \"react\";\n\ninterface SetupStepStoryContainerProps {\n children: ReactNode;\n}\n\nexport const SetupStepStoryContainer = ({\n children,\n}: SetupStepStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n\n return (\n <Modal\n contain={componentModeOverride !== \"compact\"}\n mode=\"maximized\"\n show={true}\n >\n <>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n showOpenButton={true}\n title=\"Setup Step\"\n />\n {children}\n </>\n </Modal>\n );\n};\n","import {\n kosComponent,\n useTroubleContainerModel,\n type TroubleModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\n\nexport interface TroubleActionStoryProps {\n trouble: TroubleModel;\n}\n\ninterface TroubleActionStoryContainerProps {\n /** The contribution's troubleType: the exact type the device raises. */\n troubleType: string;\n children: (props: TroubleActionStoryProps) => ReactNode;\n}\n\n/** A trouble action story, given the device's active trouble of `troubleType`. */\nexport const TroubleActionStoryContainer = kosComponent(\n ({ troubleType, children }: TroubleActionStoryContainerProps) => {\n const { model } = useTroubleContainerModel();\n const trouble = model?.troubles.getIndexByKey(\"byType\", troubleType)[0];\n if (!trouble) {\n return (\n <div>\n No active \"{troubleType}\" trouble. Raise one on the simulator to see\n this experience.\n </div>\n );\n }\n return <>{children({ trouble })}</>;\n }\n);\n","import type { ReactNode } from \"react\";\n\ninterface UtilityStoryContainerProps {\n children: ReactNode;\n}\n\nexport const UtilityStoryContainer = ({\n children,\n}: UtilityStoryContainerProps) => children;\n"],"names":["useComponentConfigurationContext","jsx","Modal","jsxs","Fragment","Header","BackButton","getKosCompanionModel","FreestyleAssembly","useAssemblyContext","kosComponent","AgitatorDashboardCard","orderHolderGroups","matchesDashboardPattern","sortedHoldersByGroup","useHolderContainer","executeDashboardKeys","HolderDashboardCard","TabContainer","SettingsSubheading","useTroubleContainerModel"],"mappings":";;;;;;;;AAMO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,MAAsC;ACI/B,MAAM,oBAAoB,CAAC,EAAE,eAAuC;AACzE,QAAM,EAAE,sBAAA,IAA0BA,kDAAA;AAElC,SACEC,2BAAAA;AAAAA,IAACC,iBAAAA;AAAAA,IAAA;AAAA,MACC,SAAS,0BAA0B;AAAA,MACnC,MAAK;AAAA,MACL,MAAM;AAAA,MAEN,UAAAC,2BAAAA,KAAAC,qBAAA,EACE,UAAA;AAAA,QAAAH,2BAAAA;AAAAA,UAACI,iBAAAA;AAAAA,UAAA;AAAA,YACC,aACE,0BAA0B,YAAYC,iBAAAA,aAAa;AAAA,YAErD,SAAS,0BAA0B;AAAA,YACnC,iBAAiB;AAAA,YACjB,gBAAgB;AAAA,YAChB,OAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;ACrBO,MAAM,kBAAkB,CAC7B,UACA,iBACoB;AAEpB,MAAI,WAAiB,WAAmB,YAAY;AACpD,MAAI,CAAC,YAAY,UAAU;AAEzB,UAAM,YAAiBC,SAAAA;AAAAA,MACrB;AAAA,MACAC,kCAAkB;AAAA,IAAA;AAEpB,eAAW,YAAY,YAAY;AAAA,EACrC;AACA,QAAM,SAA0B,WAC5B,MAAM,QAAQ,SAAS,IAAI,IACzB,SAAS,OACT,CAAC,QAAQ,IACX,CAAA;AACJ,SAAO,OAAO;AAAA;AAAA,IAEZ,CAAC,UAAgB,OAAO,OAAO,WAAW,YAAY,MAAM,SAAS;AAAA,EAAA;AAEzE;AAGO,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;AAClC,QAAM,EAAE,sBAAA,IAA0BnB,kDAAA;AAElC,SACEC,2BAAAA;AAAAA,IAACC,iBAAAA;AAAAA,IAAA;AAAA,MACC,SAAS,0BAA0B;AAAA,MACnC,MAAK;AAAA,MACL,MAAM;AAAA,MAEN,UAAAC,2BAAAA,KAAAC,qBAAA,EACE,UAAA;AAAA,QAAAH,2BAAAA;AAAAA,UAACI,iBAAAA;AAAAA,UAAA;AAAA,YACC,aACE,0BAA0B,YAAYC,iBAAAA,aAAa;AAAA,YAErD,SAAS,0BAA0B;AAAA,YACnC,iBAAiB;AAAA,YACjB,gBAAgB;AAAA,YAChB,OAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;ACnBO,MAAM,8BAA8BI,SAAAA;AAAAA,EACzC,CAAC,EAAE,aAAa,eAAiD;AAC/D,UAAM,EAAE,MAAA,IAAUU,kCAAA;AAClB,UAAM,UAAU,OAAO,SAAS,cAAc,UAAU,WAAW,EAAE,CAAC;AACtE,QAAI,CAAC,SAAS;AACZ,6CACG,OAAA,EAAI,UAAA;AAAA,QAAA;AAAA,QACS;AAAA,QAAY;AAAA,MAAA,GAE1B;AAAA,IAEJ;AACA,WAAOnB,2BAAAA,IAAAG,WAAAA,UAAA,EAAG,UAAA,SAAS,EAAE,QAAA,CAAS,GAAE;AAAA,EAClC;AACF;AC1BO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAAkC;;;;;;;;;;;;;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/kos-ddk-story-containers/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
package/index.js ADDED
@@ -0,0 +1,249 @@
1
+ import { jsx, jsxs, Fragment } from "@emotion/react/jsx-runtime";
2
+ import { useComponentConfigurationContext, Modal, Header, BackButton, AgitatorDashboardCard, HolderDashboardCard, TabContainer, SettingsSubheading } from "@kosdev-code/kos-ddk-components";
3
+ import { getKosCompanionModel, kosComponent, useTroubleContainerModel } from "@kosdev-code/kos-ui-sdk";
4
+ import { useAssemblyContext, useHolderContainer } from "@kosdev-code/kos-dispense-sdk";
5
+ import { FreestyleAssembly } from "@kosdev-code/kos-freestyle-sdk";
6
+ import { orderHolderGroups, matchesDashboardPattern, sortedHoldersByGroup, executeDashboardKeys } from "@kosdev-code/kos-ddk-models";
7
+ const ControlPourStoryContainer = ({
8
+ children
9
+ }) => children;
10
+ const CUIStoryContainer = ({ children }) => {
11
+ const { componentModeOverride } = useComponentConfigurationContext();
12
+ return /* @__PURE__ */ jsx(
13
+ Modal,
14
+ {
15
+ contain: componentModeOverride !== "compact",
16
+ mode: "maximized",
17
+ show: true,
18
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
19
+ /* @__PURE__ */ jsx(
20
+ Header,
21
+ {
22
+ CloseButton: componentModeOverride === "compact" ? BackButton : void 0,
23
+ contain: componentModeOverride === "compact",
24
+ showCloseButton: true,
25
+ showOpenButton: false,
26
+ title: "CUI"
27
+ }
28
+ ),
29
+ children
30
+ ] })
31
+ }
32
+ );
33
+ };
34
+ const dashboardModels = (assembly, dashboardKey) => {
35
+ let modelRef = assembly?.[dashboardKey];
36
+ if (!modelRef && assembly) {
37
+ const freestyle = getKosCompanionModel(
38
+ assembly,
39
+ FreestyleAssembly.type
40
+ );
41
+ modelRef = freestyle?.[dashboardKey];
42
+ }
43
+ const models = modelRef ? Array.isArray(modelRef.data) ? modelRef.data : [modelRef] : [];
44
+ return models.filter(
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
+ (model) => typeof model?.active === "boolean" ? model.active : true
47
+ );
48
+ };
49
+ const useDashboardCardModel = (dashboardKey) => {
50
+ const { model: assembly } = useAssemblyContext();
51
+ const cardModel = dashboardModels(assembly, dashboardKey)[0];
52
+ return { assembly, cardModel };
53
+ };
54
+ const noModel = (dashboardKey) => /* @__PURE__ */ jsxs("div", { children: [
55
+ 'No active "',
56
+ dashboardKey,
57
+ '" model on the assembly. Start the simulator with a dispenser that has one.'
58
+ ] });
59
+ const DashboardSummaryStoryContainer = kosComponent(
60
+ ({ dashboardKey, title, children }) => {
61
+ const { assembly, cardModel } = useDashboardCardModel(dashboardKey);
62
+ if (!cardModel) return noModel(dashboardKey);
63
+ return /* @__PURE__ */ jsx(
64
+ AgitatorDashboardCard,
65
+ {
66
+ cardId: dashboardKey,
67
+ title,
68
+ body: children({
69
+ dashboardKey,
70
+ assembly,
71
+ cardModel,
72
+ onComplete: () => void 0
73
+ })
74
+ }
75
+ );
76
+ }
77
+ );
78
+ const DashboardDetailStoryContainer = kosComponent(
79
+ ({ dashboardKey, title, children }) => {
80
+ const { componentModeOverride } = useComponentConfigurationContext();
81
+ const { assembly, cardModel } = useDashboardCardModel(dashboardKey);
82
+ if (!cardModel) return noModel(dashboardKey);
83
+ return /* @__PURE__ */ jsxs(Modal, { contain: componentModeOverride !== "compact", show: true, children: [
84
+ /* @__PURE__ */ jsx(
85
+ Header,
86
+ {
87
+ CloseButton: componentModeOverride === "compact" ? BackButton : void 0,
88
+ contain: componentModeOverride === "compact",
89
+ showCloseButton: true,
90
+ title
91
+ }
92
+ ),
93
+ children({
94
+ dashboardKey,
95
+ assembly,
96
+ cardModel,
97
+ onComplete: () => void 0
98
+ })
99
+ ] });
100
+ }
101
+ );
102
+ const DashboardRegionStoryContainer = kosComponent(
103
+ ({
104
+ regionKey,
105
+ holders = [],
106
+ summaries = [],
107
+ size = "default",
108
+ children
109
+ }) => {
110
+ const { model: assembly } = useAssemblyContext();
111
+ const holderGroups = orderHolderGroups(assembly?.holderGroups ?? []).filter(
112
+ (group) => holders.some((pattern) => matchesDashboardPattern(pattern, group))
113
+ ).map((name) => ({
114
+ name,
115
+ holders: sortedHoldersByGroup(assembly, name)
116
+ }));
117
+ return /* @__PURE__ */ jsx(Fragment, { children: children({
118
+ regionKey,
119
+ holderGroups,
120
+ summaries: summaries.map((dashboardKey) => ({
121
+ dashboardKey,
122
+ models: dashboardModels(assembly, dashboardKey)
123
+ })),
124
+ assembly,
125
+ size,
126
+ flow: { cards: "vertical", groups: "horizontal", wrap: false },
127
+ orientation: "portrait"
128
+ }) });
129
+ }
130
+ );
131
+ const useStoryHolder = (dashboardKey, matchName) => {
132
+ const { model } = useHolderContainer();
133
+ return model?.holders.data.find(
134
+ (holder) => matchName && holder.name === dashboardKey || executeDashboardKeys(holder).includes(dashboardKey)
135
+ );
136
+ };
137
+ const noHolder = (dashboardKey) => /* @__PURE__ */ jsxs("div", { children: [
138
+ 'No holder matches dashboard key "',
139
+ dashboardKey,
140
+ '". Start the simulator with a dispenser that has one.'
141
+ ] });
142
+ const PumpDetailStoryContainer = kosComponent(
143
+ ({ dashboardKey, title, children }) => {
144
+ const { componentModeOverride } = useComponentConfigurationContext();
145
+ const holder = useStoryHolder(dashboardKey, false);
146
+ if (!holder) return noHolder(dashboardKey);
147
+ return /* @__PURE__ */ jsxs(Modal, { contain: componentModeOverride !== "compact", show: true, children: [
148
+ /* @__PURE__ */ jsx(
149
+ Header,
150
+ {
151
+ CloseButton: componentModeOverride === "compact" ? BackButton : void 0,
152
+ contain: componentModeOverride === "compact",
153
+ showCloseButton: true,
154
+ title
155
+ }
156
+ ),
157
+ children({ holder })
158
+ ] });
159
+ }
160
+ );
161
+ const MacroSummaryStoryContainer = kosComponent(
162
+ ({ dashboardKey, children }) => {
163
+ const holder = useStoryHolder(dashboardKey, true);
164
+ if (!holder) return noHolder(dashboardKey);
165
+ return /* @__PURE__ */ jsx(Fragment, { children: children({ holder }) });
166
+ }
167
+ );
168
+ const PumpSummaryStoryContainer = kosComponent(
169
+ ({ dashboardKey, children }) => {
170
+ const holder = useStoryHolder(dashboardKey, false);
171
+ if (!holder) return noHolder(dashboardKey);
172
+ return /* @__PURE__ */ jsx(
173
+ HolderDashboardCard,
174
+ {
175
+ cardId: holder.path,
176
+ avatar: holder.name,
177
+ body: children({ holder })
178
+ }
179
+ );
180
+ }
181
+ );
182
+ const NavStoryContainer = ({ children }) => children;
183
+ const SettingStoryContainer = ({
184
+ children
185
+ }) => /* @__PURE__ */ jsxs(TabContainer, { children: [
186
+ /* @__PURE__ */ jsx(SettingsSubheading, { children: "Setting" }),
187
+ children
188
+ ] });
189
+ const SetupStepStoryContainer = ({
190
+ children
191
+ }) => {
192
+ const { componentModeOverride } = useComponentConfigurationContext();
193
+ return /* @__PURE__ */ jsx(
194
+ Modal,
195
+ {
196
+ contain: componentModeOverride !== "compact",
197
+ mode: "maximized",
198
+ show: true,
199
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
200
+ /* @__PURE__ */ jsx(
201
+ Header,
202
+ {
203
+ CloseButton: componentModeOverride === "compact" ? BackButton : void 0,
204
+ contain: componentModeOverride === "compact",
205
+ showCloseButton: true,
206
+ showOpenButton: true,
207
+ title: "Setup Step"
208
+ }
209
+ ),
210
+ children
211
+ ] })
212
+ }
213
+ );
214
+ };
215
+ const TroubleActionStoryContainer = kosComponent(
216
+ ({ troubleType, children }) => {
217
+ const { model } = useTroubleContainerModel();
218
+ const trouble = model?.troubles.getIndexByKey("byType", troubleType)[0];
219
+ if (!trouble) {
220
+ return /* @__PURE__ */ jsxs("div", { children: [
221
+ 'No active "',
222
+ troubleType,
223
+ '" trouble. Raise one on the simulator to see this experience.'
224
+ ] });
225
+ }
226
+ return /* @__PURE__ */ jsx(Fragment, { children: children({ trouble }) });
227
+ }
228
+ );
229
+ const UtilityStoryContainer = ({
230
+ children
231
+ }) => children;
232
+ export {
233
+ CUIStoryContainer,
234
+ ControlPourStoryContainer,
235
+ DashboardDetailStoryContainer,
236
+ DashboardRegionStoryContainer,
237
+ DashboardSummaryStoryContainer,
238
+ MacroSummaryStoryContainer,
239
+ NavStoryContainer,
240
+ PumpDetailStoryContainer,
241
+ PumpSummaryStoryContainer,
242
+ SettingStoryContainer,
243
+ SetupStepStoryContainer,
244
+ TroubleActionStoryContainer,
245
+ UtilityStoryContainer,
246
+ dashboardModels,
247
+ useDashboardCardModel
248
+ };
249
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../packages/kos-ddk-story-containers/src/components/storybook/control-pour-story-container/control-pour-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/cui-story-container/cui-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/use-dashboard-card-model.ts","../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/dashboard-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/dashboard-story-container/region-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/holder-story-container/holder-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/nav-story-container/nav-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/setting-story-container/setting-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/setup-step-story-container/setup-step-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/trouble-action-story-container/trouble-action-story-container.tsx","../../../packages/kos-ddk-story-containers/src/components/storybook/utility-story-container/utility-story-container.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\ninterface ControlPourStoryContainerProps {\n children: ReactNode;\n}\n\nexport const ControlPourStoryContainer = ({\n children,\n}: ControlPourStoryContainerProps) => children;\n","import {\n BackButton,\n Header,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { ReactNode } from \"react\";\n\ninterface CUIStoryContainerProps {\n children: ReactNode;\n}\n\nexport const CUIStoryContainer = ({ children }: CUIStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n\n return (\n <Modal\n contain={componentModeOverride !== \"compact\"}\n mode=\"maximized\"\n show={true}\n >\n <>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n showOpenButton={false}\n title=\"CUI\"\n />\n {children}\n </>\n </Modal>\n );\n};\n","import {\n useAssemblyContext,\n type AssemblyModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport { FreestyleAssembly } from \"@kosdev-code/kos-freestyle-sdk\";\nimport {\n getKosCompanionModel,\n type IKosDataModel,\n} from \"@kosdev-code/kos-ui-sdk\";\n\n/**\n * The active models the host dashboard draws cards for at `dashboardKey`: the\n * assembly property, then the FreestyleAssembly companion's; a container yields its items.\n */\nexport const dashboardModels = (\n assembly: AssemblyModel | undefined,\n dashboardKey: string\n): IKosDataModel[] => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let modelRef: any = (assembly as any)?.[dashboardKey];\n if (!modelRef && assembly) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const freestyle: any = getKosCompanionModel(\n assembly,\n FreestyleAssembly.type\n );\n modelRef = freestyle?.[dashboardKey];\n }\n const models: IKosDataModel[] = modelRef\n ? Array.isArray(modelRef.data)\n ? modelRef.data\n : [modelRef]\n : [];\n return models.filter(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (model: any) => (typeof model?.active === \"boolean\" ? model.active : true)\n );\n};\n\n/** The assembly and the first active model a dashboard card renders for `dashboardKey`. */\nexport const useDashboardCardModel = (dashboardKey: string) => {\n const { model: assembly } = useAssemblyContext();\n const cardModel = dashboardModels(assembly, dashboardKey)[0];\n return { assembly, cardModel };\n};\n","import {\n AgitatorDashboardCard,\n BackButton,\n Header,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { AssemblyModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent, type IKosDataModel } from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\nimport { useDashboardCardModel } from \"./use-dashboard-card-model\";\n\nexport interface DashboardCardStoryProps {\n dashboardKey: string;\n assembly?: AssemblyModel;\n cardModel?: IKosDataModel;\n onComplete: () => void;\n}\n\ninterface DashboardStoryContainerProps {\n /** The contribution's dashboardKey: an assembly (or FreestyleAssembly) property. */\n dashboardKey: string;\n title: string;\n children: (props: DashboardCardStoryProps) => ReactNode;\n}\n\nconst noModel = (dashboardKey: string) => (\n <div>\n No active \"{dashboardKey}\" model on the assembly. Start the simulator with a\n dispenser that has one.\n </div>\n);\n\n/** A dashboard summary story, framed as the host frames the card body. */\nexport const DashboardSummaryStoryContainer = kosComponent(\n ({ dashboardKey, title, children }: DashboardStoryContainerProps) => {\n const { assembly, cardModel } = useDashboardCardModel(dashboardKey);\n if (!cardModel) return noModel(dashboardKey);\n return (\n <AgitatorDashboardCard\n cardId={dashboardKey}\n title={title}\n body={children({\n dashboardKey,\n assembly,\n cardModel,\n onComplete: () => undefined,\n })}\n />\n );\n }\n);\n\n/** A dashboard detail story, in the modal the host opens from the card. */\nexport const DashboardDetailStoryContainer = kosComponent(\n ({ dashboardKey, title, children }: DashboardStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const { assembly, cardModel } = useDashboardCardModel(dashboardKey);\n if (!cardModel) return noModel(dashboardKey);\n return (\n <Modal contain={componentModeOverride !== \"compact\"} show={true}>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={title}\n />\n {children({\n dashboardKey,\n assembly,\n cardModel,\n onComplete: () => undefined,\n })}\n </Modal>\n );\n }\n);\n","import {\n matchesDashboardPattern,\n orderHolderGroups,\n sortedHoldersByGroup,\n type DashboardCardSize,\n type DashboardRegionComponentProps,\n} from \"@kosdev-code/kos-ddk-models\";\nimport { useAssemblyContext } from \"@kosdev-code/kos-dispense-sdk\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\nimport { dashboardModels } from \"./use-dashboard-card-model\";\n\ninterface DashboardRegionStoryContainerProps {\n /** The contribution's regionKey. */\n regionKey: string;\n /** Holder-group patterns the region claims, as in the descriptor. Default none. */\n holders?: string[];\n /** Summary dashboardKeys the region claims. Default none. */\n summaries?: string[];\n size?: DashboardCardSize;\n children: (props: DashboardRegionComponentProps) => ReactNode;\n}\n\n/**\n * A dashboard region story: the props the host dashboard passes a region component,\n * built from the assembly with the holders and summaries the story says it claims.\n */\nexport const DashboardRegionStoryContainer = kosComponent(\n ({\n regionKey,\n holders = [],\n summaries = [],\n size = \"default\",\n children,\n }: DashboardRegionStoryContainerProps) => {\n const { model: assembly } = useAssemblyContext();\n const holderGroups = orderHolderGroups(assembly?.holderGroups ?? [])\n .filter((group) =>\n holders.some((pattern) => matchesDashboardPattern(pattern, group))\n )\n .map((name) => ({\n name,\n holders: sortedHoldersByGroup(assembly, name),\n }));\n return (\n <>\n {children({\n regionKey,\n holderGroups,\n summaries: summaries.map((dashboardKey) => ({\n dashboardKey,\n models: dashboardModels(assembly, dashboardKey),\n })),\n assembly,\n size,\n flow: { cards: \"vertical\", groups: \"horizontal\", wrap: false },\n orientation: \"portrait\",\n })}\n </>\n );\n }\n);\n","import {\n BackButton,\n Header,\n HolderDashboardCard,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport {\n useHolderContainer,\n type HolderModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport { executeDashboardKeys } from \"@kosdev-code/kos-ddk-models\";\nimport { kosComponent } from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\n\nexport interface HolderStoryProps {\n holder: HolderModel;\n}\n\ninterface HolderStoryContainerProps {\n /** The contribution's dashboardKey. */\n dashboardKey: string;\n title: string;\n children: (props: HolderStoryProps) => ReactNode;\n}\n\n/**\n * The first holder a contribution with `dashboardKey` renders for. Pump detail and\n * pump summary match any of the holder's dashboard keys (default: its first pump\n * type); macro summary tries holder.name first.\n */\nconst useStoryHolder = (dashboardKey: string, matchName: boolean) => {\n const { model } = useHolderContainer();\n return model?.holders.data.find(\n (holder: HolderModel) =>\n (matchName && holder.name === dashboardKey) ||\n executeDashboardKeys(holder).includes(dashboardKey)\n );\n};\n\nconst noHolder = (dashboardKey: string) => (\n <div>\n No holder matches dashboard key \"{dashboardKey}\". Start the simulator with a\n dispenser that has one.\n </div>\n);\n\n/** A pump detail story, in the holder modal the host opens. */\nexport const PumpDetailStoryContainer = kosComponent(\n ({ dashboardKey, title, children }: HolderStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n const holder = useStoryHolder(dashboardKey, false);\n if (!holder) return noHolder(dashboardKey);\n return (\n <Modal contain={componentModeOverride !== \"compact\"} show={true}>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n title={title}\n />\n {children({ holder })}\n </Modal>\n );\n }\n);\n\n/** A macro summary story: the body the host shows on a macro holder card. */\nexport const MacroSummaryStoryContainer = kosComponent(\n ({ dashboardKey, children }: HolderStoryContainerProps) => {\n const holder = useStoryHolder(dashboardKey, true);\n if (!holder) return noHolder(dashboardKey);\n return <>{children({ holder })}</>;\n }\n);\n\n/** A pump summary story: the body the host shows on the holder's dashboard card. */\nexport const PumpSummaryStoryContainer = kosComponent(\n ({ dashboardKey, children }: HolderStoryContainerProps) => {\n const holder = useStoryHolder(dashboardKey, false);\n if (!holder) return noHolder(dashboardKey);\n return (\n <HolderDashboardCard\n cardId={holder.path}\n avatar={holder.name}\n body={children({ holder })}\n />\n );\n }\n);\n","import type { ReactNode } from \"react\";\n\ninterface NavStoryContainerProps {\n children: ReactNode;\n}\n\nexport const NavStoryContainer = ({ children }: NavStoryContainerProps) =>\n children;\n","import {\n SettingsSubheading,\n TabContainer,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { ReactNode } from \"react\";\n\ninterface SettingStoryContainerProps {\n children: ReactNode;\n}\n\nexport const SettingStoryContainer = ({\n children,\n}: SettingStoryContainerProps) => (\n <TabContainer>\n <SettingsSubheading>Setting</SettingsSubheading>\n {children}\n </TabContainer>\n);\n","import {\n BackButton,\n Header,\n Modal,\n useComponentConfigurationContext,\n} from \"@kosdev-code/kos-ddk-components\";\nimport type { ReactNode } from \"react\";\n\ninterface SetupStepStoryContainerProps {\n children: ReactNode;\n}\n\nexport const SetupStepStoryContainer = ({\n children,\n}: SetupStepStoryContainerProps) => {\n const { componentModeOverride } = useComponentConfigurationContext();\n\n return (\n <Modal\n contain={componentModeOverride !== \"compact\"}\n mode=\"maximized\"\n show={true}\n >\n <>\n <Header\n CloseButton={\n componentModeOverride === \"compact\" ? BackButton : undefined\n }\n contain={componentModeOverride === \"compact\"}\n showCloseButton={true}\n showOpenButton={true}\n title=\"Setup Step\"\n />\n {children}\n </>\n </Modal>\n );\n};\n","import {\n kosComponent,\n useTroubleContainerModel,\n type TroubleModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { ReactNode } from \"react\";\n\nexport interface TroubleActionStoryProps {\n trouble: TroubleModel;\n}\n\ninterface TroubleActionStoryContainerProps {\n /** The contribution's troubleType: the exact type the device raises. */\n troubleType: string;\n children: (props: TroubleActionStoryProps) => ReactNode;\n}\n\n/** A trouble action story, given the device's active trouble of `troubleType`. */\nexport const TroubleActionStoryContainer = kosComponent(\n ({ troubleType, children }: TroubleActionStoryContainerProps) => {\n const { model } = useTroubleContainerModel();\n const trouble = model?.troubles.getIndexByKey(\"byType\", troubleType)[0];\n if (!trouble) {\n return (\n <div>\n No active \"{troubleType}\" trouble. Raise one on the simulator to see\n this experience.\n </div>\n );\n }\n return <>{children({ trouble })}</>;\n }\n);\n","import type { ReactNode } from \"react\";\n\ninterface UtilityStoryContainerProps {\n children: ReactNode;\n}\n\nexport const UtilityStoryContainer = ({\n children,\n}: UtilityStoryContainerProps) => children;\n"],"names":[],"mappings":";;;;;;AAMO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,MAAsC;ACI/B,MAAM,oBA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AA,QAAA;AAAA,QACS;AAAA,QAAY;AAAA,MAAA,GAE1B;AAAA,IAEJ;AACA,WAAO,oBAAA,UAAA,EAAG,UAAA,SAAS,EAAE,QAAA,CAAS,GAAE;AAAA,EAClC;AACF;AC1BO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAAkC;"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@kosdev-code/kos-ddk-story-containers",
3
+ "version": "0.1.0-dev.105",
4
+ "type": "module",
5
+ "types": "./index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./index.d.ts",
9
+ "import": "./index.js",
10
+ "require": "./index.cjs"
11
+ }
12
+ },
13
+ "dependencies": {
14
+ "@kosdev-code/kos-ddk-components": "0.1.0-dev.105",
15
+ "@kosdev-code/kos-ddk-models": "0.1.0-dev.105",
16
+ "@kosdev-code/kos-dispense-sdk": "~3.0.0",
17
+ "@kosdev-code/kos-freestyle-sdk": "~3.0.0",
18
+ "@kosdev-code/kos-ui-sdk": "~3.0.0"
19
+ },
20
+ "peerDependencies": {
21
+ "react": "^18.0.0",
22
+ "react-dom": "^18.0.0"
23
+ },
24
+ "kos": {
25
+ "build": {
26
+ "gitHash": "2ffbb04baeef2cb449cc49a5ff5f27eaffe455b1"
27
+ }
28
+ },
29
+ "publishConfig": {
30
+ "registry": "https://registry.npmjs.org/"
31
+ }
32
+ }