@orianatech/pire 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/components/core/Tag.d.ts.map +1 -1
  2. package/dist/components/core/icon-data.generated.d.ts.map +1 -1
  3. package/dist/components/core/icon-map.d.ts.map +1 -1
  4. package/dist/components/data/BarList.d.cts +30 -0
  5. package/dist/components/data/BarList.d.ts +31 -0
  6. package/dist/components/data/BarList.d.ts.map +1 -0
  7. package/dist/components/data/DataTable.d.cts +45 -3
  8. package/dist/components/data/DataTable.d.ts +45 -3
  9. package/dist/components/data/DataTable.d.ts.map +1 -1
  10. package/dist/components/data/RecordCard.d.cts +28 -0
  11. package/dist/components/data/RecordCard.d.ts +29 -0
  12. package/dist/components/data/RecordCard.d.ts.map +1 -0
  13. package/dist/components/data/ViewSwitcher.d.cts +32 -0
  14. package/dist/components/data/ViewSwitcher.d.ts +33 -0
  15. package/dist/components/data/ViewSwitcher.d.ts.map +1 -0
  16. package/dist/components/feedback/Tooltip.d.cts +18 -0
  17. package/dist/components/feedback/Tooltip.d.ts +18 -0
  18. package/dist/components/feedback/Tooltip.d.ts.map +1 -1
  19. package/dist/components/forms/ChoiceCardGroup.d.cts +50 -0
  20. package/dist/components/forms/ChoiceCardGroup.d.ts +51 -0
  21. package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -0
  22. package/dist/components/forms/NumberField.d.cts +18 -1
  23. package/dist/components/forms/NumberField.d.ts +18 -1
  24. package/dist/components/forms/NumberField.d.ts.map +1 -1
  25. package/dist/components/forms/QuantityStepper.d.cts +28 -0
  26. package/dist/components/forms/QuantityStepper.d.ts +29 -0
  27. package/dist/components/forms/QuantityStepper.d.ts.map +1 -0
  28. package/dist/components/navigation/Ribbon.d.cts +75 -0
  29. package/dist/components/navigation/Ribbon.d.ts +76 -0
  30. package/dist/components/navigation/Ribbon.d.ts.map +1 -0
  31. package/dist/components/patterns/ConfirmDialog.d.cts +8 -1
  32. package/dist/components/patterns/ConfirmDialog.d.ts +8 -1
  33. package/dist/components/patterns/ConfirmDialog.d.ts.map +1 -1
  34. package/dist/components/patterns/ValueHelpDialog.d.cts +23 -1
  35. package/dist/components/patterns/ValueHelpDialog.d.ts +23 -1
  36. package/dist/components/patterns/ValueHelpDialog.d.ts.map +1 -1
  37. package/dist/components.css +212 -0
  38. package/dist/i18n/messages.d.cts +44 -0
  39. package/dist/i18n/messages.d.ts +44 -0
  40. package/dist/i18n/messages.d.ts.map +1 -1
  41. package/dist/index.cjs +1330 -845
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +7 -1
  44. package/dist/index.d.ts +7 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1253 -774
  47. package/dist/index.js.map +1 -1
  48. package/dist/tokens/colors.css +7 -0
  49. package/dist/tokens/themes.css +3 -0
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/forms/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4D/B,MAAM,WAAW,gBAAgB,CAAC,MAAM,SAAS,EAAE,GAAG,IAAI,GAAG,KAAK;IAChE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;2FACuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;iFAG6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAMtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,C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,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAoCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,MAAM,SAAS,EAAE,GAAG,IAAI,GAAG,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EACxF,YAAY,EAAE,WAAW,EAAE,aAAyB,EAAE,cAAc,EAAE,cAAc,EAAE,IAAW,EACjG,SAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EACvD,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,CAAC,MAAM,CAAC,qBAoInF"}
@@ -0,0 +1,28 @@
1
+ import { type NumberFieldProps } from './NumberField.cjs';
2
+ /**
3
+ * Nothing beyond NumberField's own props: this is that field with the layout, the empty sentinel
4
+ * and the button names a stock count needs.
5
+ *
6
+ * `incrementLabel`/`decrementLabel` are deliberately not offered here — unlike `NumberField`,
7
+ * which keeps them for a caller with its own wording. Every `QuantityStepper` on a warehouse
8
+ * screen names its buttons from the dictionary (`quantityStepperIncrease` /
9
+ * `quantityStepperDecrease`), so two counts on the same screen never end up with one stepper
10
+ * labelled in English and the other in Spanish. Wanting different wording means the dictionary is
11
+ * wrong for this locale — fix it there, not at the call site.
12
+ */
13
+ export interface QuantityStepperProps extends Omit<NumberFieldProps<null>, 'stepperLayout' | 'hideStepper' | 'emptyValue' | 'suffix' | 'incrementLabel' | 'decrementLabel'> {
14
+ /** Height of the value box. `sm` for a line-item table cell, where the field competes with the
15
+ * row for space. The two buttons stay 32px square either way — that is the whole point of the
16
+ * component, and a size that shrank them below the touch target would defeat it. */
17
+ size?: 'sm' | 'md';
18
+ }
19
+ /**
20
+ * A counted quantity: decrement, value, increment, sized for a warehouse.
21
+ *
22
+ * Use it wherever the number is entered by someone holding a scanner or wearing gloves — a
23
+ * physical count, a picking screen, a returns desk. Everywhere else `NumberField` is the field.
24
+ *
25
+ * `null` means "not counted yet", which is not the same fact as zero: conflating the two is how
26
+ * a blind count reports a shortage that never happened.
27
+ */
28
+ export declare function QuantityStepper({ size, ...rest }: QuantityStepperProps): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { type NumberFieldProps } from './NumberField.js';
2
+ /**
3
+ * Nothing beyond NumberField's own props: this is that field with the layout, the empty sentinel
4
+ * and the button names a stock count needs.
5
+ *
6
+ * `incrementLabel`/`decrementLabel` are deliberately not offered here — unlike `NumberField`,
7
+ * which keeps them for a caller with its own wording. Every `QuantityStepper` on a warehouse
8
+ * screen names its buttons from the dictionary (`quantityStepperIncrease` /
9
+ * `quantityStepperDecrease`), so two counts on the same screen never end up with one stepper
10
+ * labelled in English and the other in Spanish. Wanting different wording means the dictionary is
11
+ * wrong for this locale — fix it there, not at the call site.
12
+ */
13
+ export interface QuantityStepperProps extends Omit<NumberFieldProps<null>, 'stepperLayout' | 'hideStepper' | 'emptyValue' | 'suffix' | 'incrementLabel' | 'decrementLabel'> {
14
+ /** Height of the value box. `sm` for a line-item table cell, where the field competes with the
15
+ * row for space. The two buttons stay 32px square either way — that is the whole point of the
16
+ * component, and a size that shrank them below the touch target would defeat it. */
17
+ size?: 'sm' | 'md';
18
+ }
19
+ /**
20
+ * A counted quantity: decrement, value, increment, sized for a warehouse.
21
+ *
22
+ * Use it wherever the number is entered by someone holding a scanner or wearing gloves — a
23
+ * physical count, a picking screen, a returns desk. Everywhere else `NumberField` is the field.
24
+ *
25
+ * `null` means "not counted yet", which is not the same fact as zero: conflating the two is how
26
+ * a blind count reports a shortage that never happened.
27
+ */
28
+ export declare function QuantityStepper({ size, ...rest }: QuantityStepperProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=QuantityStepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityStepper.d.ts","sourceRoot":"","sources":["../../../src/components/forms/QuantityStepper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGnE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa,GAAG,YAAY,GAAG,QAAQ,GAC1F,gBAAgB,GAAG,gBAAgB,CAAC;IACxC;;yFAEqF;IACrF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAW,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,+BAM7E"}
@@ -0,0 +1,75 @@
1
+ import * as React from 'react';
2
+ export interface RibbonCommandProps {
3
+ /** Visible text *and* accessible name. Never hand-break it across lines — a large command's
4
+ * tile has a fixed width and wraps the caption itself, so one string stays one name. */
5
+ label: string;
6
+ /** Lucide slug, resolved through CARBON_MAP like every other icon in the library. */
7
+ icon?: string;
8
+ /** `lg` is the stacked icon-over-caption tile that anchors a group; `sm` is the stacked list
9
+ * beside it. A group with no `lg` command reads as a list of options rather than a place. */
10
+ size?: 'sm' | 'lg';
11
+ onPress?: () => void;
12
+ isDisabled?: boolean;
13
+ /** Disables the command while nothing is selected. Use it for anything that acts *on rows* —
14
+ * a command that fires against an empty selection is the bug this prevents. */
15
+ requiresSelection?: boolean;
16
+ /** Also shows the command in the collapsed bar. Reserve it for the handful a user reaches for
17
+ * without opening the ribbon; a bar that carries everything is the ribbon again, in one row. */
18
+ inBar?: boolean;
19
+ }
20
+ export interface RibbonGroupProps {
21
+ /** The group's name. Rendered under the commands *and* used as the `role="group"` label, so it
22
+ * has to read as a category on its own — "Stock", not "Actions". */
23
+ caption: string;
24
+ children?: React.ReactNode;
25
+ }
26
+ export interface RibbonTabProps {
27
+ id: string;
28
+ label: string;
29
+ /** Renders the tab only while `selectionCount > 0`, in the teal that means "acting on a
30
+ * selection". Put the commands that only make sense against selected rows here. */
31
+ isContextual?: boolean;
32
+ children?: React.ReactNode;
33
+ }
34
+ export interface RibbonProps {
35
+ /** Names the tab list when expanded, and the bar when collapsed — whichever is on screen. */
36
+ 'aria-label': string;
37
+ /** `Ribbon.Tab` elements. */
38
+ children?: React.ReactNode;
39
+ value?: string;
40
+ defaultValue?: string;
41
+ onChange?: (id: string) => void;
42
+ /** Collapses the band to a single command bar. Controlled when supplied, uncontrolled when not. */
43
+ isCollapsed?: boolean;
44
+ onCollapsedChange?: (collapsed: boolean) => void;
45
+ /** Rendered at the start of the **collapsed bar only**. Expanded mode has a tab list there.
46
+ * Its reason for existing is the saved-view chip, which a collapsed screen has nowhere else
47
+ * to put. */
48
+ leading?: React.ReactNode;
49
+ /** Trailing slot in both modes, before the collapse toggle — usually the overflow IconButton. */
50
+ actions?: React.ReactNode;
51
+ /** How many records are selected. Drives `requiresSelection` on commands and the visibility of
52
+ * `isContextual` tabs, so the ribbon never offers an action with nothing to act on. */
53
+ selectionCount?: number;
54
+ className?: string;
55
+ style?: React.CSSProperties;
56
+ }
57
+ /** @see RibbonTabProps */
58
+ export declare const RibbonTab: (props: RibbonTabProps) => React.ReactElement;
59
+ /** @see RibbonGroupProps */
60
+ export declare const RibbonGroup: (props: RibbonGroupProps) => React.ReactElement;
61
+ /** @see RibbonCommandProps */
62
+ export declare const RibbonCommand: (props: RibbonCommandProps) => React.ReactElement;
63
+ /**
64
+ * The tabbed command surface an ERP list screen carries above its toolbar.
65
+ *
66
+ * Children are configuration elements — `Ribbon.Tab`, `Ribbon.Group`, `Ribbon.Command` — that
67
+ * `Ribbon` reads rather than renders. That is what lets the collapsed bar be *derived* from the
68
+ * same tree instead of authored a second time.
69
+ */
70
+ export declare function Ribbon({ children, value, defaultValue, onChange, isCollapsed, onCollapsedChange, leading, actions, selectionCount, className, style, ...rest }: RibbonProps): React.JSX.Element;
71
+ export declare namespace Ribbon {
72
+ export { RibbonTab as Tab };
73
+ export { RibbonGroup as Group };
74
+ export { RibbonCommand as Command };
75
+ }
@@ -0,0 +1,76 @@
1
+ import * as React from 'react';
2
+ export interface RibbonCommandProps {
3
+ /** Visible text *and* accessible name. Never hand-break it across lines — a large command's
4
+ * tile has a fixed width and wraps the caption itself, so one string stays one name. */
5
+ label: string;
6
+ /** Lucide slug, resolved through CARBON_MAP like every other icon in the library. */
7
+ icon?: string;
8
+ /** `lg` is the stacked icon-over-caption tile that anchors a group; `sm` is the stacked list
9
+ * beside it. A group with no `lg` command reads as a list of options rather than a place. */
10
+ size?: 'sm' | 'lg';
11
+ onPress?: () => void;
12
+ isDisabled?: boolean;
13
+ /** Disables the command while nothing is selected. Use it for anything that acts *on rows* —
14
+ * a command that fires against an empty selection is the bug this prevents. */
15
+ requiresSelection?: boolean;
16
+ /** Also shows the command in the collapsed bar. Reserve it for the handful a user reaches for
17
+ * without opening the ribbon; a bar that carries everything is the ribbon again, in one row. */
18
+ inBar?: boolean;
19
+ }
20
+ export interface RibbonGroupProps {
21
+ /** The group's name. Rendered under the commands *and* used as the `role="group"` label, so it
22
+ * has to read as a category on its own — "Stock", not "Actions". */
23
+ caption: string;
24
+ children?: React.ReactNode;
25
+ }
26
+ export interface RibbonTabProps {
27
+ id: string;
28
+ label: string;
29
+ /** Renders the tab only while `selectionCount > 0`, in the teal that means "acting on a
30
+ * selection". Put the commands that only make sense against selected rows here. */
31
+ isContextual?: boolean;
32
+ children?: React.ReactNode;
33
+ }
34
+ export interface RibbonProps {
35
+ /** Names the tab list when expanded, and the bar when collapsed — whichever is on screen. */
36
+ 'aria-label': string;
37
+ /** `Ribbon.Tab` elements. */
38
+ children?: React.ReactNode;
39
+ value?: string;
40
+ defaultValue?: string;
41
+ onChange?: (id: string) => void;
42
+ /** Collapses the band to a single command bar. Controlled when supplied, uncontrolled when not. */
43
+ isCollapsed?: boolean;
44
+ onCollapsedChange?: (collapsed: boolean) => void;
45
+ /** Rendered at the start of the **collapsed bar only**. Expanded mode has a tab list there.
46
+ * Its reason for existing is the saved-view chip, which a collapsed screen has nowhere else
47
+ * to put. */
48
+ leading?: React.ReactNode;
49
+ /** Trailing slot in both modes, before the collapse toggle — usually the overflow IconButton. */
50
+ actions?: React.ReactNode;
51
+ /** How many records are selected. Drives `requiresSelection` on commands and the visibility of
52
+ * `isContextual` tabs, so the ribbon never offers an action with nothing to act on. */
53
+ selectionCount?: number;
54
+ className?: string;
55
+ style?: React.CSSProperties;
56
+ }
57
+ /** @see RibbonTabProps */
58
+ export declare const RibbonTab: (props: RibbonTabProps) => React.ReactElement;
59
+ /** @see RibbonGroupProps */
60
+ export declare const RibbonGroup: (props: RibbonGroupProps) => React.ReactElement;
61
+ /** @see RibbonCommandProps */
62
+ export declare const RibbonCommand: (props: RibbonCommandProps) => React.ReactElement;
63
+ /**
64
+ * The tabbed command surface an ERP list screen carries above its toolbar.
65
+ *
66
+ * Children are configuration elements — `Ribbon.Tab`, `Ribbon.Group`, `Ribbon.Command` — that
67
+ * `Ribbon` reads rather than renders. That is what lets the collapsed bar be *derived* from the
68
+ * same tree instead of authored a second time.
69
+ */
70
+ export declare function Ribbon({ children, value, defaultValue, onChange, isCollapsed, onCollapsedChange, leading, actions, selectionCount, className, style, ...rest }: RibbonProps): React.JSX.Element;
71
+ export declare namespace Ribbon {
72
+ export { RibbonTab as Tab };
73
+ export { RibbonGroup as Group };
74
+ export { RibbonCommand as Command };
75
+ }
76
+ //# sourceMappingURL=Ribbon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ribbon.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/Ribbon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA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EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAmBD,0BAA0B;AAC1B,eAAO,MAAM,SAAS,EAAsC,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,YAAY,CAAC;AAC1G,4BAA4B;AAC5B,eAAO,MAAM,WAAW,EAA4C,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,YAAY,CAAC;AACpH,8BAA8B;AAC9B,eAAO,MAAM,aAAa,EAAgD,CAAC,KAAK,EAAE,kBAAkB,KAAK,KAAK,CAAC,YAAY,CAAC;AA0H5H;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAC9F,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,qBAkJ3E;yBAnJe,MAAM;aAqJT,SAAS;aACP,WAAW;aACT,aAAa"}
@@ -1,9 +1,16 @@
1
1
  import type * as React from 'react';
2
+ import type { ObjectFact } from '../data/ObjectHeader.cjs';
2
3
  export interface ConfirmDialogProps {
3
4
  isOpen?: boolean;
4
5
  /** Question form, sentence case: "Release purchase order?" */
5
6
  title?: React.ReactNode;
6
7
  subtitle?: React.ReactNode;
8
+ /**
9
+ * The key figures the decision rests on, shown above the consequence. Use it when the number
10
+ * *is* the reason to hesitate — units moved, value written off, records affected. A dialog
11
+ * whose figures are buried in prose asks the reader to do arithmetic under time pressure.
12
+ */
13
+ facts?: ObjectFact[];
7
14
  /** What will happen — rendered as a warning, or an error when tone is danger. */
8
15
  consequence?: React.ReactNode;
9
16
  /** Extra detail or an opt-in Checkbox. */
@@ -18,4 +25,4 @@ export interface ConfirmDialogProps {
18
25
  onCancel?: () => void;
19
26
  }
20
27
  /** Interrupts one irreversible action. Never use for information — that is an InlineMessage. */
21
- export declare function ConfirmDialog({ isOpen, title, subtitle, consequence, children, confirmLabel, cancelLabel, tone, isBusy, onConfirm, onCancel }: ConfirmDialogProps): React.JSX.Element;
28
+ export declare function ConfirmDialog({ isOpen, title, subtitle, facts, consequence, children, confirmLabel, cancelLabel, tone, isBusy, onConfirm, onCancel }: ConfirmDialogProps): React.JSX.Element;
@@ -1,9 +1,16 @@
1
1
  import type * as React from 'react';
2
+ import type { ObjectFact } from '../data/ObjectHeader.js';
2
3
  export interface ConfirmDialogProps {
3
4
  isOpen?: boolean;
4
5
  /** Question form, sentence case: "Release purchase order?" */
5
6
  title?: React.ReactNode;
6
7
  subtitle?: React.ReactNode;
8
+ /**
9
+ * The key figures the decision rests on, shown above the consequence. Use it when the number
10
+ * *is* the reason to hesitate — units moved, value written off, records affected. A dialog
11
+ * whose figures are buried in prose asks the reader to do arithmetic under time pressure.
12
+ */
13
+ facts?: ObjectFact[];
7
14
  /** What will happen — rendered as a warning, or an error when tone is danger. */
8
15
  consequence?: React.ReactNode;
9
16
  /** Extra detail or an opt-in Checkbox. */
@@ -18,5 +25,5 @@ export interface ConfirmDialogProps {
18
25
  onCancel?: () => void;
19
26
  }
20
27
  /** Interrupts one irreversible action. Never use for information — that is an InlineMessage. */
21
- export declare function ConfirmDialog({ isOpen, title, subtitle, consequence, children, confirmLabel, cancelLabel, tone, isBusy, onConfirm, onCancel }: ConfirmDialogProps): React.JSX.Element;
28
+ export declare function ConfirmDialog({ isOpen, title, subtitle, facts, consequence, children, confirmLabel, cancelLabel, tone, isBusy, onConfirm, onCancel }: ConfirmDialogProps): React.JSX.Element;
22
29
  //# sourceMappingURL=ConfirmDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,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,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAwB,EAC7G,WAAsB,EAAE,IAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,kBAAkB,qBA8B5F"}
@@ -34,8 +34,30 @@ export interface ValueHelpDialogProps<T extends {
34
34
  /** Receives the picked row. */
35
35
  onSelect?: (row: T) => void;
36
36
  onClose?: () => void;
37
+ /**
38
+ * `'single'` (the default) commits on row press, exactly as before. `'multiple'` adds a
39
+ * checkbox column, a running count and select-all / clear shortcuts, and moves the commit to
40
+ * an explicit confirm — a row press only toggles that row.
41
+ */
42
+ selectionMode?: 'single' | 'multiple';
43
+ /**
44
+ * The checked ids, in `'multiple'` mode. Held by the **consumer**, not derived from the
45
+ * rendered rows — a selection tied to the filtered list would empty itself the moment a search
46
+ * narrows the table, silently dropping rows the user already ticked.
47
+ */
48
+ selectedKeys?: Array<string | number>;
49
+ /**
50
+ * Fires on every checkbox toggle and on the select-all / clear shortcuts, in `'multiple'` mode.
51
+ *
52
+ * Always the **whole** selection, never just the part currently on screen: the toolbar's
53
+ * select-all reports every id in `rows`, and a row toggle reports the ids already held plus or
54
+ * minus the one pressed. A caller can therefore assign it straight over its own state.
55
+ */
56
+ onSelectionChange?: (keys: Array<string | number>) => void;
57
+ /** Fires with the current `selectedKeys` when the `'multiple'`-mode footer button is pressed. */
58
+ onConfirm?: (keys: Array<string | number>) => void;
37
59
  }
38
60
  /** The ERP value help: search a master-data list and pick one record back into a field. */
39
61
  export declare function ValueHelpDialog<T extends {
40
62
  id: string | number;
41
- }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSearch, isFilteredExternally, isLoading, onLoadMore, onSelect, onClose }: ValueHelpDialogProps<T>): React.JSX.Element;
63
+ }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSearch, isFilteredExternally, isLoading, onLoadMore, onSelect, onClose, selectionMode, selectedKeys, onSelectionChange, onConfirm }: ValueHelpDialogProps<T>): React.JSX.Element;
@@ -34,9 +34,31 @@ export interface ValueHelpDialogProps<T extends {
34
34
  /** Receives the picked row. */
35
35
  onSelect?: (row: T) => void;
36
36
  onClose?: () => void;
37
+ /**
38
+ * `'single'` (the default) commits on row press, exactly as before. `'multiple'` adds a
39
+ * checkbox column, a running count and select-all / clear shortcuts, and moves the commit to
40
+ * an explicit confirm — a row press only toggles that row.
41
+ */
42
+ selectionMode?: 'single' | 'multiple';
43
+ /**
44
+ * The checked ids, in `'multiple'` mode. Held by the **consumer**, not derived from the
45
+ * rendered rows — a selection tied to the filtered list would empty itself the moment a search
46
+ * narrows the table, silently dropping rows the user already ticked.
47
+ */
48
+ selectedKeys?: Array<string | number>;
49
+ /**
50
+ * Fires on every checkbox toggle and on the select-all / clear shortcuts, in `'multiple'` mode.
51
+ *
52
+ * Always the **whole** selection, never just the part currently on screen: the toolbar's
53
+ * select-all reports every id in `rows`, and a row toggle reports the ids already held plus or
54
+ * minus the one pressed. A caller can therefore assign it straight over its own state.
55
+ */
56
+ onSelectionChange?: (keys: Array<string | number>) => void;
57
+ /** Fires with the current `selectedKeys` when the `'multiple'`-mode footer button is pressed. */
58
+ onConfirm?: (keys: Array<string | number>) => void;
37
59
  }
38
60
  /** The ERP value help: search a master-data list and pick one record back into a field. */
39
61
  export declare function ValueHelpDialog<T extends {
40
62
  id: string | number;
41
- }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSearch, isFilteredExternally, isLoading, onLoadMore, onSelect, onClose }: ValueHelpDialogProps<T>): React.JSX.Element;
63
+ }>({ isOpen, title, columns, rows, searchPlaceholder, emptyLabel, onSearch, isFilteredExternally, isLoading, onLoadMore, onSelect, onClose, selectionMode, selectedKeys, onSelectionChange, onConfirm }: ValueHelpDialogProps<T>): React.JSX.Element;
42
64
  //# sourceMappingURL=ValueHelpDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValueHelpDialog.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/ValueHelpDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpE,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,GAAG;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kGAAkG;IAClG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,+BAA+B;IA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