@astryxdesign/core 0.7.8-canary.cfd120e → 0.7.8-canary.d3ec2ef

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 (59) hide show
  1. package/dist/DateInput/PickerWheel.d.ts.map +1 -1
  2. package/dist/DateInput/PickerWheel.js +0 -3
  3. package/dist/DateInput/Wheel.d.ts.map +1 -1
  4. package/dist/DateInput/Wheel.js +0 -2
  5. package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
  6. package/dist/HoverCard/useHoverCard.js +6 -1
  7. package/dist/Overlay/Overlay.d.ts.map +1 -1
  8. package/dist/Overlay/Overlay.js +7 -2
  9. package/dist/PowerSearch/PowerSearch.d.ts +4 -2
  10. package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
  11. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +24 -1
  12. package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -1
  13. package/dist/PowerSearch/PowerSearchBottomSheet.js +172 -50
  14. package/dist/Tokenizer/TokenizerBottomSheet.js +8 -12
  15. package/dist/Tooltip/useTooltip.d.ts.map +1 -1
  16. package/dist/Tooltip/useTooltip.js +6 -0
  17. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -1
  18. package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +5 -2
  19. package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
  20. package/dist/i18n/generated-locales/en.generated.js +5 -2
  21. package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
  22. package/dist/i18n/generated-locales/pseudo.generated.js +5 -2
  23. package/dist/motion/uikit/datePicker.d.ts +58 -0
  24. package/dist/motion/uikit/datePicker.d.ts.map +1 -0
  25. package/dist/motion/uikit/datePicker.js +60 -0
  26. package/dist/motion/uikit/index.d.ts +4 -3
  27. package/dist/motion/uikit/index.d.ts.map +1 -1
  28. package/dist/motion/uikit/index.js +4 -3
  29. package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
  30. package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
  31. package/dist/utils/interactionOverlay.stylex.js +3 -2
  32. package/dist/utils/pressFeedback.d.ts.map +1 -1
  33. package/dist/utils/pressFeedback.js +74 -9
  34. package/dist/utils/pressGesture.d.ts +4 -2
  35. package/dist/utils/pressGesture.d.ts.map +1 -1
  36. package/dist/utils/pressGesture.js +3 -1
  37. package/locales/en.json +21 -9
  38. package/locales/pseudo.json +15 -6
  39. package/package.json +4 -4
  40. package/src/BottomSheet/BottomSheetSwitcher.doc.mjs +5 -0
  41. package/src/DateInput/PickerWheel.tsx +0 -2
  42. package/src/DateInput/Wheel.tsx +0 -1
  43. package/src/HoverCard/useHoverCard.tsx +6 -1
  44. package/src/Overlay/Overlay.tsx +7 -2
  45. package/src/PowerSearch/PowerSearch.doc.mjs +2 -2
  46. package/src/PowerSearch/PowerSearch.tsx +4 -2
  47. package/src/PowerSearch/PowerSearchBottomSheet.tsx +237 -62
  48. package/src/Tokenizer/TokenizerBottomSheet.tsx +8 -12
  49. package/src/Tooltip/useTooltip.tsx +6 -0
  50. package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +5 -2
  51. package/src/i18n/generated-locales/en.generated.ts +6 -4
  52. package/src/i18n/generated-locales/pseudo.generated.ts +6 -4
  53. package/src/motion/MEASUREMENTS.md +10 -0
  54. package/src/motion/README.md +1 -0
  55. package/src/motion/uikit/datePicker.ts +60 -0
  56. package/src/motion/uikit/index.ts +4 -3
  57. package/src/utils/interactionOverlay.stylex.ts +3 -2
  58. package/src/utils/pressFeedback.ts +99 -21
  59. package/src/utils/pressGesture.ts +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"PickerWheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/PickerWheel.tsx"],"names":[],"mappings":"AAmDA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AA2HxB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAghBZ;yBAthBe,WAAW"}
1
+ {"version":3,"file":"PickerWheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/PickerWheel.tsx"],"names":[],"mappings":"AAmDA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AA2HxB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BA8gBZ;yBAphBe,WAAW"}
@@ -468,9 +468,6 @@ export function PickerWheel({
468
468
  isEnabled: isActive,
469
469
  isPointerKept: true
470
470
  });
471
-
472
- // A key commits the row at `position` at once and turns the wheel there
473
- // from `offset`.
474
471
  const turnToPosition = useCallback((position, offset) => {
475
472
  const current = latestRef.current;
476
473
  const option = current.options[position];
@@ -1 +1 @@
1
- {"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/Wheel.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AAoMxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAKtC;yBALe,KAAK;;;AASrB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAoUZ;yBA1Ue,WAAW"}
1
+ {"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/Wheel.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AAoMxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAKtC;yBALe,KAAK;;;AASrB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAmUZ;yBAzUe,WAAW"}
@@ -351,8 +351,6 @@ export function ScrollWheel({
351
351
  useOwnScrollGesture(scrollerRef, 'all', {
352
352
  isEnabled: isActive
353
353
  });
354
-
355
- // A key commits the row it moves to and scrolls the column there.
356
354
  const moveTo = useCallback(row => {
357
355
  const option = row == null ? undefined : options[row];
358
356
  if (row == null || option == null || option.isDisabled) {
@@ -1 +1 @@
1
- {"version":3,"file":"useHoverCard.d.ts","sourceRoot":"","sources":["../../src/HoverCard/useHoverCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA8BlC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,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AW,CAAC,WAAW,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEzC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,QAAQ,EAAE,SAAS,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,KAC5C,SAAS,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAgB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAke5E"}
@@ -197,7 +197,12 @@ export function useHoverCard(options = {}) {
197
197
 
198
198
  // Tap-to-open on touch; on a mouse this does nothing and hover still rules.
199
199
  const handlePointerDown = useCallback(event => {
200
- handleTouchPointerDown(event);
200
+ // A pen in range starts the hover show before it lands. Left pending,
201
+ // that show opens the card during the press. The tap then closes it.
202
+ if (handleTouchPointerDown(event) && showTimeoutRef.current) {
203
+ clearTimeout(showTimeoutRef.current);
204
+ showTimeoutRef.current = null;
205
+ }
201
206
  }, [handleTouchPointerDown]);
202
207
 
203
208
  // Under `auto`, whether focus counts is decided when it arrives, and a
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAE,GAAG,EAAC,MAAM,OAAO,CAAC;AAO1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CAAC;AAGxB,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC7D,8CAA8C;IAC9C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,wBAAwB;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sBAAsB;IACtB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,qBAAqB;IACrB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,GAAG,IAAI,EACR,EAAE,YAAY,+BA0Dd;yBAzEe,OAAO"}
@@ -66,8 +66,13 @@ export function Overlay({
66
66
  align
67
67
  });
68
68
 
69
- // Border radius: mirror first child's radius onto the wrapper.
70
- // Only the component needs this — hook consumers have their own radius.
69
+ // Copies the first child's radius onto the wrapper, so the scrim clips to
70
+ // the media's rounded corners. This is a layout read of the mounted DOM, and
71
+ // no user interaction causes it. It runs again when a hidden Activity shows
72
+ // the wrapper, because the child can change while it is hidden. A ref
73
+ // callback runs again when a caller's ref changes identity, so it cannot
74
+ // keep this once-per-show timing. A useOverlay consumer sets the radius on
75
+ // its own element.
71
76
  useIsomorphicLayoutEffect(() => {
72
77
  const el = overlay.containerRef.current;
73
78
  if (!el) {
@@ -133,8 +133,10 @@ export interface PowerSearchProps extends Omit<BaseProps<HTMLElement>, 'onChange
133
133
  * above it with the fields (or the content search with inline
134
134
  * suggestions), and a value step opens above that, stages operator →
135
135
  * value, and confirms from its footer. Dismissing a step reveals the
136
- * one beneath. Suited to compact touch screens, where the editor
137
- * popover competes with the software keyboard.
136
+ * one beneath. The flow edits a draft: `onChange` is called when Done
137
+ * applies it, once per edit in order, and a dismissal with a changed
138
+ * draft asks before discarding it. Suited to compact touch screens,
139
+ * where the editor popover competes with the software keyboard.
138
140
  * - `'adaptive'`: the bottom sheet on compact coarse-pointer screens,
139
141
  * otherwise the popover — the same resolution Selector uses. The server
140
142
  * render and the hydrating render are the popover.
@@ -1 +1 @@
1
- {"version":3,"file":"PowerSearch.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAUZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAY1C,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AA2B1C,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAIjB,qBAAqB,EACrB,iBAAiB,EAGjB,qBAAqB,EAEtB,MAAM,SAAS,CAAC;AAQjB,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAyMxE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,CACX;IACC,yEAAyE;IACzE,MAA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C,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACzC;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC;AAED,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAoC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EAAE,UAAU,EAClB,OAAO,EACP,QAAQ,EACR,KAAK,EAAE,cAAc,EACrB,aAAoB,EACpB,WAAW,EAAE,oBAAoB,EACjC,YAAoB,EACpB,QAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAA0B,EAC1B,SAAS,EACT,cAAmB,EACnB,oBAAoB,EACpB,gBAA6C,EAC7C,sBAAsB,EAAE,+BAA+B,EACvD,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,GAAG,EACH,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EAAE,kBAAkB,EAC9B,YAAyB,GAC1B,EAAE,gBAAgB,qBAmiClB;yBAtkCe,WAAW"}
@@ -72,7 +72,14 @@ export interface PowerSearchBottomSheetProps {
72
72
  config: InternalConfig;
73
73
  /** The caller's config, handed to Editor overrides as they expect it. */
74
74
  configProp: PowerSearchConfig;
75
+ /** The committed filters; the draft the sheet edits starts from them. */
75
76
  filters: ReadonlyArray<PowerSearchFilter>;
77
+ /**
78
+ * The field's `onChange`. Done replays the draft's edits through it, in
79
+ * order, onto the field's latest filters, each call carrying that list
80
+ * with the edit applied; nothing is reported before Done, and nothing when
81
+ * the field is read-only or disabled at Done.
82
+ */
76
83
  onChange: (filters: ReadonlyArray<PowerSearchFilter>, changeType: PowerSearchChangeType, index: number) => void;
77
84
  /** The field typeahead source; the content search lists its suggestions. */
78
85
  searchSource: SearchSource<PowerSearchItem>;
@@ -90,13 +97,29 @@ export interface PowerSearchBottomSheetProps {
90
97
  components?: PowerSearchComponents;
91
98
  editors: PowerSearchSheetEditors;
92
99
  }
100
+ /** One edit of the draft: the draft before and after it, and its type and index in the draft; Done replays it onto the field's latest filters. */
101
+ interface DraftEdit {
102
+ before: ReadonlyArray<PowerSearchFilter>;
103
+ after: ReadonlyArray<PowerSearchFilter>;
104
+ changeType: PowerSearchChangeType;
105
+ index: number;
106
+ }
107
+ /**
108
+ * Replays the draft's edits onto `base`, the field's latest filters, and
109
+ * reports each through `report` with the list after it. An add appends; an
110
+ * edit replaces the first filter matching the one it edited; a removal drops
111
+ * the filters it removed, by signature. An edit or removal whose target is
112
+ * not in the base list is skipped: the parent removed it meanwhile.
113
+ */
114
+ export declare function replayDraftEdits(base: ReadonlyArray<PowerSearchFilter>, edits: ReadonlyArray<DraftEdit>, report: (filters: ReadonlyArray<PowerSearchFilter>, changeType: PowerSearchChangeType, index: number) => void): ReadonlyArray<PowerSearchFilter>;
93
115
  /**
94
116
  * The sheet flow of PowerSearch's touch presentation: Filters, Add filter,
95
117
  * and the value step, as standalone sheets that stack, each open beneath the
96
118
  * step it led to.
97
119
  */
98
- export declare function PowerSearchBottomSheet({ isOpen, onOpenChange, finalFocusRef, resultCountText, config, configProp, filters, onChange, searchSource, placeholder, isReadOnly, isDisabled, hasClear, maxOperatorMenuItems, timezoneID, maxSearchResults, saveButtonLabel: saveButtonLabelFromProps, components: componentOverrides, editors, }: PowerSearchBottomSheetProps): React.JSX.Element;
120
+ export declare function PowerSearchBottomSheet({ isOpen, onOpenChange, finalFocusRef, resultCountText, config, configProp, filters: committedFilters, onChange: onCommit, searchSource, placeholder, isReadOnly, isDisabled, hasClear, maxOperatorMenuItems, timezoneID, maxSearchResults, saveButtonLabel: saveButtonLabelFromProps, components: componentOverrides, editors, }: PowerSearchBottomSheetProps): React.JSX.Element;
99
121
  export declare namespace PowerSearchBottomSheet {
100
122
  var displayName: string;
101
123
  }
124
+ export {};
102
125
  //# sourceMappingURL=PowerSearchBottomSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PowerSearchBottomSheet.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchBottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,EASZ,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAkCrD,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAe3D,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAIV,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EAEjB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,SAAS,CAAC;AAajB;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;IACtD,wBAAwB,EAAE,OAAO,wBAAwB,CAAC;CAC3D;AAED,MAAM,WAAW,2BAA2B;IAC1C,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC;;;OAGG;I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AAgB,EAChB,eAAe,EAAE,wBAAwB,EACzC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,GACR,EAAE,2BAA2B,qBAmsD7B;yBAvtDe,sBAAsB"}
@@ -104,6 +104,82 @@ registerEnglishFallback(english);
104
104
  // Styles
105
105
  // =============================================================================
106
106
 
107
+ /** One edit of the draft: the draft before and after it, and its type and index in the draft; Done replays it onto the field's latest filters. */
108
+
109
+ // Whether two filter lists hold the same filters in the same order, by the
110
+ // key-order-insensitive signature the sheet matches filters with.
111
+ function hasSameFilters(a, b) {
112
+ return a.length === b.length && a.every((filter, index) => b[index] != null && filterSignature(filter) === filterSignature(b[index]));
113
+ }
114
+
115
+ // The filters `before` holds that `after` does not, as a multiset by
116
+ // signature, in `before` order.
117
+ function removedFilters(before, after) {
118
+ const remaining = new Map();
119
+ for (const filter of after) {
120
+ const signature = filterSignature(filter);
121
+ remaining.set(signature, (remaining.get(signature) ?? 0) + 1);
122
+ }
123
+ return before.filter(filter => {
124
+ const signature = filterSignature(filter);
125
+ const count = remaining.get(signature) ?? 0;
126
+ if (count > 0) {
127
+ remaining.set(signature, count - 1);
128
+ return false;
129
+ }
130
+ return true;
131
+ });
132
+ }
133
+
134
+ /**
135
+ * Replays the draft's edits onto `base`, the field's latest filters, and
136
+ * reports each through `report` with the list after it. An add appends; an
137
+ * edit replaces the first filter matching the one it edited; a removal drops
138
+ * the filters it removed, by signature. An edit or removal whose target is
139
+ * not in the base list is skipped: the parent removed it meanwhile.
140
+ */
141
+ export function replayDraftEdits(base, edits, report) {
142
+ let current = base;
143
+ for (const edit of edits) {
144
+ if (edit.changeType === 'add') {
145
+ const added = edit.after[edit.index];
146
+ if (added == null) {
147
+ continue;
148
+ }
149
+ current = [...current, added];
150
+ report(current, 'add', current.length - 1);
151
+ } else if (edit.changeType === 'edit') {
152
+ const original = edit.before[edit.index];
153
+ const updated = edit.after[edit.index];
154
+ if (original == null || updated == null) {
155
+ continue;
156
+ }
157
+ const signature = filterSignature(original);
158
+ const index = current.findIndex(filter => filterSignature(filter) === signature);
159
+ if (index === -1) {
160
+ continue;
161
+ }
162
+ current = current.map((filter, i) => i === index ? updated : filter);
163
+ report(current, 'edit', index);
164
+ } else {
165
+ const removed = removedFilters(edit.before, edit.after).map(filterSignature);
166
+ const indexes = [];
167
+ for (const signature of removed) {
168
+ const index = current.findIndex((filter, i) => !indexes.includes(i) && filterSignature(filter) === signature);
169
+ if (index !== -1) {
170
+ indexes.push(index);
171
+ }
172
+ }
173
+ if (indexes.length === 0) {
174
+ continue;
175
+ }
176
+ current = current.filter((_, i) => !indexes.includes(i));
177
+ report(current, 'remove', Math.min(...indexes));
178
+ }
179
+ }
180
+ return current;
181
+ }
182
+
107
183
  // The trailing plus a field row shows when choosing it adds the filter at
108
184
  // once, and the Add filter actions' glyph. Core's default icon set has no plus.
109
185
  function PlusIcon(props) {
@@ -514,8 +590,8 @@ export function PowerSearchBottomSheet({
514
590
  resultCountText,
515
591
  config,
516
592
  configProp,
517
- filters,
518
- onChange,
593
+ filters: committedFilters,
594
+ onChange: onCommit,
519
595
  searchSource,
520
596
  placeholder,
521
597
  isReadOnly,
@@ -535,6 +611,27 @@ export function PowerSearchBottomSheet({
535
611
  const locale = useLocale();
536
612
  const formatList = useListFormatter();
537
613
  const isInteractive = !isDisabled && !isReadOnly;
614
+
615
+ // ---- draft ----
616
+ // One open flow edits one draft of the filter list; `onChange` waits for
617
+ // Done, and a dismissal with a changed draft asks first.
618
+ const [filtersAtOpen, setFiltersAtOpen] = useState(() => committedFilters);
619
+ const [filters, setFilters] = useState(() => committedFilters);
620
+ // The draft as of the last edit, for the edit log's `before` lists.
621
+ const draftRef = useRef(filters);
622
+ const draftEditsRef = useRef([]);
623
+ const onChange = useCallback((next, changeType, index) => {
624
+ draftEditsRef.current.push({
625
+ before: draftRef.current,
626
+ after: next,
627
+ changeType,
628
+ index
629
+ });
630
+ draftRef.current = next;
631
+ setFilters(next);
632
+ }, []);
633
+ const isDraftDirty = !hasSameFilters(filtersAtOpen, filters);
634
+ const [isDiscardConfirmationOpen, setIsDiscardConfirmationOpen] = useState(false);
538
635
  const contentSearchFieldKey = config.config.contentSearchFieldKey;
539
636
  const contentSearchOperator = contentSearchFieldKey == null ? undefined : config.getDefaultOperator(contentSearchFieldKey);
540
637
  const hasContentSearch = contentSearchOperator?.value.type === 'string';
@@ -616,9 +713,6 @@ export function PowerSearchBottomSheet({
616
713
  const [contentQuery, setContentQuery] = useState('');
617
714
  const [isClearConfirmationOpen, setIsClearConfirmationOpen] = useState(false);
618
715
  const clearAllButtonRef = useRef(null);
619
- // Set while Clear all commits, so the result count that changes in that
620
- // commit is spoken with Clear all's outcome, as one message.
621
- const isClearingRef = useRef(false);
622
716
 
623
717
  // `useAnnounce` delivers inside the open Astryx modal that encloses its
624
718
  // caller, and this component renders above the
@@ -645,13 +739,21 @@ export function PowerSearchBottomSheet({
645
739
  if (isOpen !== wasOpen) {
646
740
  setWasOpen(isOpen);
647
741
  if (isOpen) {
742
+ // A fresh draft from the committed filters; the entry step is judged
743
+ // against them, not the previous session's draft.
744
+ setFiltersAtOpen(committedFilters);
745
+ setFilters(committedFilters);
746
+ draftRef.current = committedFilters;
747
+ draftEditsRef.current = [];
748
+ const startsOnAddFilter = committedFilters.length === 0 && isInteractive;
648
749
  setFieldQuery('');
649
750
  setContentQuery('');
650
- setStep(isEntryAddFilter ? 'fields' : 'manage');
651
- setFieldPickerOrigin(isEntryAddFilter ? 'trigger' : 'manage');
751
+ setStep(startsOnAddFilter ? 'fields' : 'manage');
752
+ setFieldPickerOrigin(startsOnAddFilter ? 'trigger' : 'manage');
652
753
  } else {
653
754
  setStep(null);
654
755
  setIsClearConfirmationOpen(false);
756
+ setIsDiscardConfirmationOpen(false);
655
757
  }
656
758
  }
657
759
  const closeFlow = useCallback(() => {
@@ -659,6 +761,32 @@ export function PowerSearchBottomSheet({
659
761
  setStep(null);
660
762
  onOpenChange(false);
661
763
  }, [onOpenChange]);
764
+ // Done replays each edit in order onto the field's latest filters, so a
765
+ // consumer gets the calls a popover session makes and keeps a filter it
766
+ // added meanwhile.
767
+ const commitAndClose = useCallback(() => {
768
+ // A field that became read-only while the flow was open reports nothing.
769
+ if (isDraftDirty && isInteractive) {
770
+ replayDraftEdits(committedFilters, draftEditsRef.current, onCommit);
771
+ }
772
+ draftEditsRef.current = [];
773
+ closeFlow();
774
+ }, [closeFlow, committedFilters, isDraftDirty, isInteractive, onCommit]);
775
+ const requestDismiss = useCallback(() => {
776
+ if (isDraftDirty) {
777
+ setIsDiscardConfirmationOpen(true);
778
+ } else {
779
+ closeFlow();
780
+ }
781
+ }, [closeFlow, isDraftDirty]);
782
+ const closeDiscardConfirmation = () => {
783
+ // eslint-disable-next-line @eslint-react/dom-no-flush-sync -- the confirmation must be gone before focus moves back into the sheet
784
+ flushSync(() => setIsDiscardConfirmationOpen(false));
785
+ const target = stepRef.current === 'manage' ? managerAddButtonRef.current ?? manageSheetRef.current?.closest('[tabindex="-1"]') : fieldsSheetRef.current?.closest('[tabindex="-1"]');
786
+ target?.focus({
787
+ preventScroll: true
788
+ });
789
+ };
662
790
 
663
791
  // Whether a Filters row is a button: the field interactive and the
664
792
  // filter not read-only. The row opens the value step — the editor for its
@@ -864,14 +992,8 @@ export function PowerSearchBottomSheet({
864
992
  // is quiet then, so the change is spoken here, inside the dialog. Only a
865
993
  // change after the flow opened is spoken.
866
994
  const announcedResultCountRef = useRef(resultCountText);
867
- // The latest result count, for Clear all's handler to read after its
868
- // commit has flushed.
869
- const latestResultCountRef = useRef(resultCountText);
870
- useLayoutEffect(() => {
871
- latestResultCountRef.current = resultCountText;
872
- }, [resultCountText]);
873
995
  useEffect(() => {
874
- if (isClearingRef.current || resultCountText === announcedResultCountRef.current) {
996
+ if (resultCountText === announcedResultCountRef.current) {
875
997
  return;
876
998
  }
877
999
  announcedResultCountRef.current = resultCountText;
@@ -1138,26 +1260,21 @@ export function PowerSearchBottomSheet({
1138
1260
  // confirmation must be gone before focus moves into the sheet and the
1139
1261
  // outcome is routed into the sheet's region, so its close is flushed
1140
1262
  // first. The outcome is "Editable filters removed" while a read-only filter
1141
- // remains, otherwise "All filters removed", joined with a result count that
1142
- // changed in the same commit as one catalog message; focus moves to the
1143
- // sheet's first remaining control: a kept read-only row has none, so Add
1144
- // filter.
1263
+ // remains, otherwise "All filters removed"; the result count follows the
1264
+ // applied filters, which change on Done, so none changes here. Focus moves
1265
+ // to the sheet's first remaining control: a kept read-only row has none,
1266
+ // so Add filter.
1145
1267
  const closeClearConfirmation = confirmed => {
1146
1268
  const kept = filters.filter(filter => filter.isReadOnly);
1147
1269
  const firstRemovedIndex = filters.findIndex(filter => !filter.isReadOnly);
1148
1270
  const isClearing = confirmed && isInteractive && firstRemovedIndex >= 0;
1149
- isClearingRef.current = isClearing;
1150
- try {
1151
- // eslint-disable-next-line @eslint-react/dom-no-flush-sync -- the confirmation must be gone before focus moves into the sheet and the words are routed into it
1152
- flushSync(() => {
1153
- setIsClearConfirmationOpen(false);
1154
- if (isClearing) {
1155
- onChange(kept, 'remove', firstRemovedIndex);
1156
- }
1157
- });
1158
- } finally {
1159
- isClearingRef.current = false;
1160
- }
1271
+ // eslint-disable-next-line @eslint-react/dom-no-flush-sync -- the confirmation must be gone before focus moves into the sheet and the words are routed into it
1272
+ flushSync(() => {
1273
+ setIsClearConfirmationOpen(false);
1274
+ if (isClearing) {
1275
+ onChange(kept, 'remove', firstRemovedIndex);
1276
+ }
1277
+ });
1161
1278
  if (!isClearing) {
1162
1279
  clearAllButtonRef.current?.focus();
1163
1280
  return;
@@ -1165,18 +1282,7 @@ export function PowerSearchBottomSheet({
1165
1282
  managerAddButtonRef.current?.focus({
1166
1283
  preventScroll: true
1167
1284
  });
1168
- const resultCount = latestResultCountRef.current;
1169
- const changedCount = resultCount !== announcedResultCountRef.current ? resultCount : null;
1170
- announcedResultCountRef.current = resultCount;
1171
- if (kept.length > 0) {
1172
- announce(changedCount == null ? t('@astryx.powersearch.editableFiltersRemoved') : t('@astryx.powersearch.sheet.editableFiltersClearedWithCount', {
1173
- resultCount: changedCount
1174
- }));
1175
- } else {
1176
- announce(changedCount == null ? t('@astryx.powersearch.allFiltersRemoved') : t('@astryx.powersearch.sheet.filtersClearedWithCount', {
1177
- resultCount: changedCount
1178
- }));
1179
- }
1285
+ announce(kept.length > 0 ? t('@astryx.powersearch.editableFiltersRemoved') : t('@astryx.powersearch.allFiltersRemoved'));
1180
1286
  };
1181
1287
  const handleOperatorSelect = useCallback(operator => {
1182
1288
  setDraft(current => {
@@ -1270,20 +1376,20 @@ export function PowerSearchBottomSheet({
1270
1376
  // Every step change goes through the handlers above.
1271
1377
  const handleManageOpenChange = useCallback(isSheetOpen => {
1272
1378
  if (!isSheetOpen && stepRef.current === 'manage') {
1273
- closeFlow();
1379
+ requestDismiss();
1274
1380
  }
1275
- }, [closeFlow]);
1381
+ }, [requestDismiss]);
1276
1382
  const handleFieldsOpenChange = useCallback(isSheetOpen => {
1277
1383
  if (isSheetOpen || stepRef.current !== 'fields') {
1278
1384
  return;
1279
1385
  }
1280
1386
  if (fieldPickerOrigin === 'trigger') {
1281
- closeFlow();
1387
+ requestDismiss();
1282
1388
  return;
1283
1389
  }
1284
1390
  queueManagerAddFocus();
1285
1391
  setStep('manage');
1286
- }, [closeFlow, fieldPickerOrigin, queueManagerAddFocus]);
1392
+ }, [fieldPickerOrigin, queueManagerAddFocus, requestDismiss]);
1287
1393
  const handleValueOpenChange = useCallback(isSheetOpen => {
1288
1394
  if (!isSheetOpen && stepRef.current === 'value') {
1289
1395
  returnFromValue();
@@ -1510,7 +1616,7 @@ export function PowerSearchBottomSheet({
1510
1616
  // action. Mounted only while the sheet is open, so its text
1511
1617
  // is spoken in this sheet when it appears.
1512
1618
  isManageSheetOpen && /*#__PURE__*/_jsx(EmptyState, {
1513
- title: t('@astryx.powersearch.sheet.noFilters'),
1619
+ title: t(isDraftDirty ? '@astryx.powersearch.sheet.noFiltersInDraft' : '@astryx.powersearch.sheet.noFilters'),
1514
1620
  description: t('@astryx.powersearch.sheet.noFiltersDescription'),
1515
1621
  headingLevel: 4,
1516
1622
  icon: /*#__PURE__*/_jsx(Icon, {
@@ -1574,7 +1680,7 @@ export function PowerSearchBottomSheet({
1574
1680
  })
1575
1681
  })
1576
1682
  })
1577
- }), filterRows.length > 0 && /*#__PURE__*/_jsxs("div", {
1683
+ }), (filterRows.length > 0 || isDraftDirty) && /*#__PURE__*/_jsxs("div", {
1578
1684
  ...{
1579
1685
  className: "x1vjfegm x78zum5 x6s0dn4 x1qughib x1txdalj x8o8v82 x1pzlopt x10xzikg x1n2onr6 xdd4er5 x2lah0s"
1580
1686
  },
@@ -1590,7 +1696,7 @@ export function PowerSearchBottomSheet({
1590
1696
  variant: "primary",
1591
1697
  size: "lg",
1592
1698
  xstyle: isClearAllShown ? styles.footerEqualAction : [styles.footerSoleAction, styles.touchHitArea],
1593
- onClick: closeFlow,
1699
+ onClick: commitAndClose,
1594
1700
  width: isClearAllShown ? undefined : '100%'
1595
1701
  })]
1596
1702
  })]
@@ -1776,7 +1882,7 @@ export function PowerSearchBottomSheet({
1776
1882
  variant: "primary",
1777
1883
  width: "100%",
1778
1884
  xstyle: styles.touchAction,
1779
- onClick: closeFlow
1885
+ onClick: commitAndClose
1780
1886
  })
1781
1887
  })]
1782
1888
  })
@@ -1913,6 +2019,22 @@ export function PowerSearchBottomSheet({
1913
2019
  actionLabel: t('@astryx.powersearch.sheet.clearAllConfirm'),
1914
2020
  cancelLabel: t('@astryx.powersearch.sheet.clearAllCancel'),
1915
2021
  onAction: () => closeClearConfirmation(true)
2022
+ }), isDiscardConfirmationOpen && /*#__PURE__*/_jsx(SheetConfirmation, {
2023
+ isOpen: true,
2024
+ onOpenChange: isConfirmationOpen => {
2025
+ if (!isConfirmationOpen) {
2026
+ closeDiscardConfirmation();
2027
+ }
2028
+ },
2029
+ title: t('@astryx.powersearch.sheet.discardTitle'),
2030
+ description: t('@astryx.powersearch.sheet.discardDescription'),
2031
+ actionLabel: t('@astryx.powersearch.sheet.discardConfirm'),
2032
+ cancelLabel: t('@astryx.powersearch.sheet.keepEditing'),
2033
+ onAction: () => {
2034
+ setIsDiscardConfirmationOpen(false);
2035
+ draftEditsRef.current = [];
2036
+ closeFlow();
2037
+ }
1916
2038
  })]
1917
2039
  });
1918
2040
  }
@@ -189,10 +189,10 @@ function TokenizerSheetContent({
189
189
  // has an entrance animation and no exit, so a close is its unmount; the
190
190
  // close handler commits that unmount at once and then places focus itself,
191
191
  // now that the modal is gone and the sheet's content can take focus again
192
- // (`architecture:react-component-runtime` INV2): on the search field
193
- // after a confirmed clear — the clear is spent, and the search field is
194
- // where the next selection starts (FR24, `spec:AST-085` FR4) — and back on
195
- // Clear all after a cancel. A confirmed clear is announced there too — a
192
+ // (`architecture:react-component-runtime` INV2). After a clear, Clear all
193
+ // is aria-disabled but stays focusable, so it keeps focus (FR24,
194
+ // `spec:AST-085` FR4). Focus on the search field opens the on-screen
195
+ // keyboard over the cleared rows. A confirmed clear is announced too — a
196
196
  // change the person hears about, as an add or a remove is
197
197
  // (`component:Tokenizer` AR6) — after the confirmation's dialog has gone,
198
198
  // so the sheet is the modal on top and the words are delivered inside it
@@ -206,11 +206,9 @@ function TokenizerSheetContent({
206
206
  const closeClearConfirmation = confirmed => {
207
207
  // eslint-disable-next-line @eslint-react/dom-no-flush-sync -- the confirmation must be gone before focus moves into the sheet and the words are routed into it
208
208
  flushSync(() => setIsClearConfirmationOpen(false));
209
+ clearAllRef.current?.focus();
209
210
  if (confirmed) {
210
- searchRef.current?.focus();
211
211
  announce(t('@astryx.tokenizer.allRemoved'));
212
- } else {
213
- clearAllRef.current?.focus();
214
212
  }
215
213
  };
216
214
  // Keep editing: the confirmation is gone, and focus returns to the search
@@ -745,11 +743,9 @@ function TokenizerSheetContent({
745
743
  variant: "secondary",
746
744
  size: "lg",
747
745
  isDisabled: draftValue.length === 0
748
- // With a tooltip, Button's disabled mode is `aria-disabled`: the
749
- // action keeps its focus order and says why it does nothing
750
- // (`spec:AST-085` FR1), instead of leaving the tab order as a
751
- // natively disabled button does — a confirmed Clear all returns
752
- // focus here before the search field takes it (FR24).
746
+ // With a tooltip, Button uses aria-disabled, so Clear all stays
747
+ // focusable after a clear and says why it does nothing
748
+ // (`spec:AST-085` FR1; FR24).
753
749
  ,
754
750
  tooltip: draftValue.length === 0 ? t('@astryx.tokenizer.nothingToClear') : undefined,
755
751
  ref: clearAllRef,
@@ -1 +1 @@
1
- {"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA8ClC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,O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;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,wBAAgB,UAAU,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CAomBtE"}
@@ -408,6 +408,12 @@ export function useTooltip(options = {}) {
408
408
  return;
409
409
  }
410
410
  if (handleTouchPointerDown(event)) {
411
+ // A pen in range starts the hover show before it lands. Left pending,
412
+ // that show opens the layer during the press. The tap then closes it.
413
+ if (showTimeoutRef.current) {
414
+ clearTimeout(showTimeoutRef.current);
415
+ showTimeoutRef.current = null;
416
+ }
411
417
  return;
412
418
  }
413
419
  if (isOpen !== undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"PowerSearchBottomSheet.generated.d.ts","sourceRoot":"","sources":["../../../../src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgC7C,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"PowerSearchBottomSheet.generated.d.ts","sourceRoot":"","sources":["../../../../src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmC7C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -18,15 +18,18 @@ const english = {
18
18
  "@astryx.powersearch.sheet.clearAllConfirm": "Clear filters",
19
19
  "@astryx.powersearch.sheet.clearAllDescription": "This removes all editable filters from this search.",
20
20
  "@astryx.powersearch.sheet.clearAllTitle": "Clear all filters?",
21
+ "@astryx.powersearch.sheet.discardConfirm": "Discard changes",
22
+ "@astryx.powersearch.sheet.discardDescription": "Your changes to the filters haven't been applied.",
23
+ "@astryx.powersearch.sheet.discardTitle": "Discard changes?",
21
24
  "@astryx.powersearch.sheet.done": "Done",
22
- "@astryx.powersearch.sheet.editableFiltersClearedWithCount": "Editable filters removed. {resultCount}",
23
25
  "@astryx.powersearch.sheet.fieldOperator": "{field} {operator}",
24
26
  "@astryx.powersearch.sheet.filterUnavailable": "This filter is no longer available",
25
- "@astryx.powersearch.sheet.filtersClearedWithCount": "All filters removed. {resultCount}",
26
27
  "@astryx.powersearch.sheet.filtersTitle": "Filters",
28
+ "@astryx.powersearch.sheet.keepEditing": "Keep editing",
27
29
  "@astryx.powersearch.sheet.labelValue": "{label} {value}",
28
30
  "@astryx.powersearch.sheet.noFilters": "No filters applied",
29
31
  "@astryx.powersearch.sheet.noFiltersDescription": "Add a filter to narrow your results and find what you need faster.",
32
+ "@astryx.powersearch.sheet.noFiltersInDraft": "No filters",
30
33
  "@astryx.powersearch.sheet.noMatchingFields": "No filters match your search",
31
34
  "@astryx.powersearch.sheet.noResults": "No results found",
32
35
  "@astryx.powersearch.sheet.removeFilter": "Remove {field} filter",
@@ -1 +1 @@
1
- {"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiqBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmqBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}