@eifi1/ui-kit 0.56.0 → 0.57.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 (63) hide show
  1. package/README.md +9 -6
  2. package/dist/components/data-table.d.ts +16 -0
  3. package/dist/components/data-table.js +17 -0
  4. package/dist/components/data-table.js.map +1 -1
  5. package/dist/components/quantity-field.d.ts +61 -0
  6. package/dist/components/quantity-field.js +95 -0
  7. package/dist/components/quantity-field.js.map +1 -0
  8. package/dist/components/quantity-input.d.ts +139 -0
  9. package/dist/components/quantity-input.js +188 -0
  10. package/dist/components/quantity-input.js.map +1 -0
  11. package/dist/components/quantity-labels.d.ts +2 -0
  12. package/dist/components/quantity-labels.js +11 -0
  13. package/dist/components/quantity-labels.js.map +1 -0
  14. package/dist/eslint/index.js +1 -1
  15. package/dist/feedback/feedback-inbox-bulk.d.ts +88 -0
  16. package/dist/feedback/feedback-inbox-bulk.js +316 -0
  17. package/dist/feedback/feedback-inbox-bulk.js.map +1 -0
  18. package/dist/feedback/feedback-inbox-page.d.ts +47 -3
  19. package/dist/feedback/feedback-inbox-page.js +19 -4
  20. package/dist/feedback/feedback-inbox-page.js.map +1 -1
  21. package/dist/feedback/feedback-row-detail.d.ts +5 -1
  22. package/dist/feedback/feedback-row-detail.js.map +1 -1
  23. package/dist/feedback/feedback-table-labels.js +10 -1
  24. package/dist/feedback/feedback-table-labels.js.map +1 -1
  25. package/dist/feedback/feedback-table.d.ts +26 -0
  26. package/dist/feedback/feedback-table.js.map +1 -1
  27. package/dist/feedback.d.ts +1 -1
  28. package/dist/feedback.js.map +1 -1
  29. package/dist/i18n/defaults.js +3 -1
  30. package/dist/i18n/defaults.js.map +1 -1
  31. package/dist/i18n/german.js +20 -1
  32. package/dist/i18n/german.js.map +1 -1
  33. package/dist/i18n/kit-labels.d.ts +4 -0
  34. package/dist/i18n/kit-labels.js.map +1 -1
  35. package/dist/i18n/locales/en.js +26 -3
  36. package/dist/i18n/locales/en.js.map +3 -3
  37. package/dist/i18n/locales/es.js +20 -1
  38. package/dist/i18n/locales/es.js.map +1 -1
  39. package/dist/i18n/locales/fr.js +25 -1
  40. package/dist/i18n/locales/fr.js.map +1 -1
  41. package/dist/i18n/locales/hu.js +22 -1
  42. package/dist/i18n/locales/hu.js.map +1 -1
  43. package/dist/i18n/locales/it.js +21 -1
  44. package/dist/i18n/locales/it.js.map +1 -1
  45. package/dist/i18n/locales/zh.js +20 -1
  46. package/dist/i18n/locales/zh.js.map +1 -1
  47. package/dist/i18n/review.js +12 -1
  48. package/dist/i18n/review.js.map +1 -1
  49. package/dist/index.d.ts +6 -0
  50. package/dist/index.js +23 -0
  51. package/dist/index.js.map +1 -1
  52. package/dist/lib/quantity.d.ts +107 -0
  53. package/dist/lib/quantity.js +166 -0
  54. package/dist/lib/quantity.js.map +1 -0
  55. package/dist/rhf/fields.d.ts +28 -0
  56. package/dist/rhf/fields.js +82 -0
  57. package/dist/rhf/fields.js.map +1 -1
  58. package/dist/rhf.js.map +1 -1
  59. package/dist/theme/contrast.d.ts +1 -1
  60. package/dist/theme/palette-store.d.ts +1 -1
  61. package/dist/theme/text-size.d.ts +1 -1
  62. package/dist/theme/theme-store.d.ts +1 -1
  63. package/package.json +2 -3
package/README.md CHANGED
@@ -579,7 +579,7 @@ columns, strings and permissions (see the note at the top of `src/feedback/feedb
579
579
 
580
580
  <!-- BEGIN GENERATED: exports — node scripts/gen-export-inventory.mjs -->
581
581
 
582
- **2199 names from 371 modules** in the main barrel — 992 values and 1207 types — and 191 more in 16 standalone entries. _Italic_ is a type-only export.
582
+ **2221 names from 374 modules** in the main barrel — 1003 values and 1218 types — and 193 more in 16 standalone entries. _Italic_ is a type-only export.
583
583
 
584
584
  Generated from `dist/index.d.ts` and each standalone entry's own `.d.ts` by
585
585
  `node scripts/gen-export-inventory.mjs`; the counts are pinned by
@@ -587,13 +587,13 @@ Generated from `dist/index.d.ts` and each standalone entry's own `.d.ts` by
587
587
 
588
588
  | Entry point | Names |
589
589
  |---|---|
590
- | `@eifi1/ui-kit` | 2199 |
590
+ | `@eifi1/ui-kit` | 2221 |
591
591
  | `@eifi1/ui-kit/chart` | 102 |
592
592
  | `@eifi1/ui-kit/shell` | 110 |
593
593
  | `@eifi1/ui-kit/data-table` | 56 |
594
594
  | `@eifi1/ui-kit/wizard` | 25 |
595
595
  | `@eifi1/ui-kit/tour` | 49 |
596
- | `@eifi1/ui-kit/feedback` | 203 |
596
+ | `@eifi1/ui-kit/feedback` | 204 |
597
597
  | `@eifi1/ui-kit/search` | 20 |
598
598
  | `@eifi1/ui-kit/dates` | 26 |
599
599
  | `@eifi1/ui-kit/table-text` | 14 |
@@ -601,7 +601,7 @@ Generated from `dist/index.d.ts` and each standalone entry's own `.d.ts` by
601
601
  | `@eifi1/ui-kit/eslint` | 1 |
602
602
  | `@eifi1/ui-kit/testing` | 15 |
603
603
  | `@eifi1/ui-kit/testing/react` | 2 |
604
- | `@eifi1/ui-kit/rhf` | 48 |
604
+ | `@eifi1/ui-kit/rhf` | 50 |
605
605
  | `@eifi1/ui-kit/offline` | 33 |
606
606
  | `@eifi1/ui-kit/sync` | 36 |
607
607
  | `@eifi1/ui-kit/sync/testing` | 3 |
@@ -638,6 +638,7 @@ Every other subpath is a re-slicing of the barrel, never a second API.
638
638
  | `lib/countries` | `COUNTRY_CODES`, `countryName` |
639
639
  | `lib/iban` | `compactIban`, `formatIban`, `IBAN_LENGTHS`, `ibanCheckDigits`, `ibanProblem`, `isQrIban`, `isValidIban`, _`IbanKind`_, _`IbanProblem`_ |
640
640
  | `lib/phone` | `formatNationalPhone`, `formatPhone`, `isE164`, `parsePhone`, `PHONE_COUNTRIES`, `PHONE_DIAL_CODES`, _`ParsedPhone`_, _`PhoneCountry`_, _`PhoneCountryCode`_ |
641
+ | `lib/quantity` | `convertQuantity`, `formatQuantity`, `parseQuantity`, `QUANTITY_DIGITS`, `QUANTITY_UNITS`, `quantityFamily`, `sumQuantities`, `toBaseQuantity`, _`BaseQuantity`_, _`FormatQuantityOptions`_, _`Quantity`_, _`QuantityBaseUnit`_, _`QuantityFamily`_, _`QuantityUnit`_, _`QuantityUnitWords`_ |
641
642
  | `lib/column-mapping` | `assignColumnRole`, `guessMapping`, `missingRoles`, `readMappedTable`, `readTextFile`, `roleOfColumn`, _`ColumnMapperResult`_, _`ColumnMapping`_, _`ColumnRole`_ |
642
643
  | `lib/document-title` | `DEFAULT_DOCUMENT_TITLE_FORMAT`, `formatDocumentTitle`, _`DocumentTitleParts`_ |
643
644
  | `lib/status-tone` | `STATUS_KINDS`, `statusTone`, _`StatusKind`_, _`StatusTone`_ |
@@ -691,6 +692,8 @@ Every other subpath is a re-slicing of the barrel, never a second API.
691
692
  | `components/slider` | `fromLogPosition`, `Slider`, `toLogPosition`, _`SliderMark`_, _`SliderProps`_ |
692
693
  | `components/time-input` | `isTimeInRange`, `normalizeTime`, `TimeInput`, _`TimeInputProps`_ |
693
694
  | `components/number-field` | `IntegerField`, `NumberField`, _`NumberFieldProps`_ |
695
+ | `components/quantity-input` | `DEFAULT_QUANTITY_LABELS`, `QuantityInput`, _`QuantityInputProps`_, _`QuantityLabels`_ |
696
+ | `components/quantity-field` | `QuantityField`, _`QuantityFieldProps`_ |
694
697
  | `components/sparkline` | `DEFAULT_SPARKLINE_LABELS`, `Sparkline`, `sparklineSummary`, _`SparklineLabels`_, _`SparklineProps`_, _`SparklineTone`_ |
695
698
  | `components/stat-tile` | `DEFAULT_STAT_TILE_LABELS`, `StatTile`, `StatTileGrid`, _`StatTileDelta`_, _`StatTileGridProps`_, _`StatTileLabels`_, _`StatTileLinkProps`_, _`StatTileProps`_, _`StatTileSubValue`_, _`StatTileTone`_ |
696
699
  | `components/signature-pad` | `DEFAULT_SIGNATURE_PAD_LABELS`, `SignaturePad`, `SignatureView`, _`SignatureDetail`_, _`SignaturePadHandle`_, _`SignaturePadLabels`_, _`SignaturePadProps`_, _`SignatureViewProps`_ |
@@ -938,7 +941,7 @@ Every other subpath is a re-slicing of the barrel, never a second API.
938
941
  | `feedback/feedback-comment-thread` | `DEFAULT_FEEDBACK_COMMENTS_LABELS`, `FeedbackCommentThread`, _`FeedbackCommentsLabels`_, _`FeedbackCommentThreadProps`_ |
939
942
  | `feedback/feedback-replies` | `DEFAULT_FEEDBACK_REPLIES_LABELS`, `FeedbackReplyComposer`, `feedbackReplyNudge`, `FeedbackReplyTimeline`, `useFeedbackRepliesLabels`, _`FeedbackRepliesLabels`_, _`FeedbackReplyComposerProps`_, _`FeedbackReplyTimelineProps`_ |
940
943
  | `feedback/feedback-entry-file` | `FeedbackEntryFile`, `useFeedbackEntryUpload`, _`FeedbackEntryFileProps`_, _`FeedbackEntryUpload`_, _`FeedbackEntryUploadOptions`_, _`FeedbackEntryUploadState`_ |
941
- | `feedback/feedback-inbox-page` | `FeedbackInbox`, `useFeedbackInbox`, _`FeedbackInboxMutation`_, _`FeedbackInboxProps`_, _`FeedbackInboxState`_, _`FeedbackReplyPost`_, _`FeedbackReworkPost`_, _`UseFeedbackInboxOptions`_ |
944
+ | `feedback/feedback-inbox-page` | `FeedbackInbox`, `useFeedbackInbox`, _`FeedbackInboxBulk`_, _`FeedbackInboxMutation`_, _`FeedbackInboxProps`_, _`FeedbackInboxState`_, _`FeedbackReplyPost`_, _`FeedbackReworkPost`_, _`UseFeedbackInboxOptions`_ |
942
945
  | `feedback/feedback-vocabulary` | `FEEDBACK_CATEGORY_META`, `FEEDBACK_CATEGORY_ORDER`, `FEEDBACK_STATUS_META`, `FEEDBACK_STATUS_ORDER`, `feedbackCategoryRank`, `nextFeedbackStatus`, `selectableFeedbackStatuses`, `visibleFeedbackStatuses`, _`FeedbackCategory`_, _`FeedbackStatus`_ |
943
946
 
944
947
  ### wizard
@@ -1121,7 +1124,7 @@ Every other subpath is a re-slicing of the barrel, never a second API.
1121
1124
  |---|---|
1122
1125
  | `rhf/form-core` | `Form` |
1123
1126
  | `rhf/use-rhf-wizard-step` | `useRhfWizardStep`, _`RhfWizardStepOptions`_ |
1124
- | `rhf/fields` | `RhfCheckbox`, `RhfCombobox`, `RhfCountrySelect`, `RhfDateField`, `RhfDateRangePicker`, `RhfField`, `RhfIbanInput`, `RhfInlineEntityCombobox`, `RhfIntegerField`, `RhfMoneyField`, `RhfMonthPicker`, `RhfNumberField`, `RhfPhoneInput`, `RhfSelect`, `RhfTextarea`, `RhfTextCombobox`, `RhfTextField`, `RhfTimeInput`, `RhfToggleGroup`, _`RhfCheckboxProps`_, _`RhfComboboxProps`_, _`RhfCountrySelectProps`_, _`RhfDateFieldProps`_, _`RhfDateRangePickerProps`_, _`RhfFieldBaseProps`_, _`RhfFieldProps`_, _`RhfFieldRenderContext`_, _`RhfIbanInputProps`_, _`RhfInlineEntityComboboxProps`_, _`RhfIntegerFieldProps`_, _`RhfMoneyFieldProps`_, _`RhfMonthPickerProps`_, _`RhfNumberFieldProps`_, _`RhfPhoneInputProps`_, _`RhfSelectOption`_, _`RhfSelectProps`_, _`RhfTextareaProps`_, _`RhfTextComboboxProps`_, _`RhfTextFieldProps`_, _`RhfTimeInputProps`_, _`RhfToggleGroupProps`_ |
1127
+ | `rhf/fields` | `RhfCheckbox`, `RhfCombobox`, `RhfCountrySelect`, `RhfDateField`, `RhfDateRangePicker`, `RhfField`, `RhfIbanInput`, `RhfInlineEntityCombobox`, `RhfIntegerField`, `RhfMoneyField`, `RhfMonthPicker`, `RhfNumberField`, `RhfPhoneInput`, `RhfQuantityField`, `RhfSelect`, `RhfTextarea`, `RhfTextCombobox`, `RhfTextField`, `RhfTimeInput`, `RhfToggleGroup`, _`RhfCheckboxProps`_, _`RhfComboboxProps`_, _`RhfCountrySelectProps`_, _`RhfDateFieldProps`_, _`RhfDateRangePickerProps`_, _`RhfFieldBaseProps`_, _`RhfFieldProps`_, _`RhfFieldRenderContext`_, _`RhfIbanInputProps`_, _`RhfInlineEntityComboboxProps`_, _`RhfIntegerFieldProps`_, _`RhfMoneyFieldProps`_, _`RhfMonthPickerProps`_, _`RhfNumberFieldProps`_, _`RhfPhoneInputProps`_, _`RhfQuantityFieldProps`_, _`RhfSelectOption`_, _`RhfSelectProps`_, _`RhfTextareaProps`_, _`RhfTextComboboxProps`_, _`RhfTextFieldProps`_, _`RhfTimeInputProps`_, _`RhfToggleGroupProps`_ |
1125
1128
  | `rhf/line-items` | `RhfLineItems`, _`RhfLineItemCellContext`_, _`RhfLineItemsColumn`_, _`RhfLineItemsProps`_ |
1126
1129
 
1127
1130
  ### @eifi1/ui-kit/offline (standalone)
@@ -439,6 +439,22 @@ export interface DataTableProps<T> {
439
439
  allSelected: boolean;
440
440
  someSelected: boolean;
441
441
  onToggleAll: (checked: boolean) => void;
442
+ /**
443
+ * Told which rows the table's OWN filters keep — on every page, in the order `rows`
444
+ * gave them — each time that set changes (0.57, keksdose dev #663: the feedback
445
+ * inbox's bulk edit). Optional and additive.
446
+ *
447
+ * What a select-all should take and a bulk action act on. `onToggleAll` says only
448
+ * "checked", and the filters are the table's (its state, `urlSync`'s `f.*`), out of
449
+ * the owner's sight: an owner selecting "all of `rows`" under a status filter ticked
450
+ * the rows the filter hides too, and its bulk change then reached rows nobody was
451
+ * looking at. With this the owner selects, counts and acts on these rows.
452
+ *
453
+ * Called after the commit that changed the set, not on every render — compared by
454
+ * `rowKey`, so a fresh but equal `rows` (`list.data ?? []` while a query loads)
455
+ * does not call it again, and an owner may set state in it.
456
+ */
457
+ onFilteredRowsChange?: (rows: readonly T[]) => void;
442
458
  };
443
459
  /** User-facing strings (English defaults); pass translated overrides. Merged over
444
460
  * `dataTable` from `<UiKitProvider labels>`, so a call site only states what
@@ -243,6 +243,23 @@ function DataTable({
243
243
  }
244
244
  return result;
245
245
  }, [rows, columnSig, filters, serverRows, locale]);
246
+ const notifyFiltered = !!selection?.onFilteredRowsChange;
247
+ const filteredReport = useRef({ notify: selection?.onFilteredRowsChange, rowKey });
248
+ useLayoutEffect(() => {
249
+ filteredReport.current = { notify: selection?.onFilteredRowsChange, rowKey };
250
+ });
251
+ const reportedKeys = useRef(null);
252
+ useEffect(() => {
253
+ const { notify, rowKey: keyOf } = filteredReport.current;
254
+ if (!notify) {
255
+ reportedKeys.current = null;
256
+ return;
257
+ }
258
+ const keys = filtered.map((row) => String(keyOf(row))).join("\0");
259
+ if (keys === reportedKeys.current) return;
260
+ reportedKeys.current = keys;
261
+ notify(filtered);
262
+ }, [filtered, notifyFiltered]);
246
263
  const sorted = useMemo(() => {
247
264
  if (serverRows) return filtered;
248
265
  const chain = sorts.map((s) => {