@eifi1/ui-kit 0.21.0 → 0.23.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.
- package/README.md +42 -25
- package/dist/chart.d.ts +19 -14
- package/dist/components/account-chips.d.ts +10 -3
- package/dist/components/account-chips.js +5 -2
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/account-settings.d.ts +33 -2
- package/dist/components/account-settings.js +43 -21
- package/dist/components/account-settings.js.map +1 -1
- package/dist/components/amount-input.d.ts +53 -14
- package/dist/components/amount-input.js +17 -28
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/autocomplete.d.ts +29 -0
- package/dist/components/autocomplete.js +134 -104
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/button-group.d.ts +19 -14
- package/dist/components/calculator.d.ts +19 -14
- package/dist/components/checkbox-group.d.ts +104 -0
- package/dist/components/checkbox-group.js +111 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.d.ts +19 -0
- package/dist/components/checkbox.js +30 -7
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/chip.d.ts +18 -0
- package/dist/components/chip.js +47 -10
- package/dist/components/chip.js.map +1 -1
- package/dist/components/column-mapper.d.ts +182 -0
- package/dist/components/column-mapper.js +375 -0
- package/dist/components/column-mapper.js.map +1 -0
- package/dist/components/combobox-core.d.ts +39 -2
- package/dist/components/combobox-core.js +29 -6
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox.d.ts +91 -2
- package/dist/components/combobox.js +454 -308
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog.d.ts +69 -161
- package/dist/components/confirm-dialog.js +7 -8
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-button.d.ts +16 -11
- package/dist/components/country-select.d.ts +167 -0
- package/dist/components/country-select.js +293 -0
- package/dist/components/country-select.js.map +1 -0
- package/dist/components/currency-select.d.ts +17 -1
- package/dist/components/currency-select.js +56 -23
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm.d.ts +69 -166
- package/dist/components/danger-confirm.js +144 -50
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-cells.d.ts +1 -2
- package/dist/components/data-table-filter-popover.d.ts +1 -2
- package/dist/components/data-table-filters.d.ts +1 -2
- package/dist/components/data-table-labels.d.ts +4 -97
- package/dist/components/data-table-labels.js +9 -1
- package/dist/components/data-table-labels.js.map +1 -1
- package/dist/components/data-table-pagination.d.ts +3 -1
- package/dist/components/data-table.d.ts +1 -2
- package/dist/components/data-table.js +98 -3
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.d.ts +66 -5
- package/dist/components/date-picker.js +378 -66
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/entity-combobox.d.ts +42 -1
- package/dist/components/entity-combobox.js +154 -113
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/facing-pair.d.ts +19 -14
- package/dist/components/field-parts.d.ts +224 -0
- package/dist/components/field-parts.js +156 -0
- package/dist/components/field-parts.js.map +1 -0
- package/dist/components/field-strip.d.ts +105 -0
- package/dist/components/field-strip.js +46 -0
- package/dist/components/field-strip.js.map +1 -0
- package/dist/components/file-button.d.ts +19 -14
- package/dist/components/file-button.js +13 -3
- package/dist/components/file-button.js.map +1 -1
- package/dist/components/file-dropzone.d.ts +41 -15
- package/dist/components/file-dropzone.js +57 -34
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/form-actions.d.ts +18 -13
- package/dist/components/form-actions.js +69 -5
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/iban-input.d.ts +69 -0
- package/dist/components/iban-input.js +125 -0
- package/dist/components/iban-input.js.map +1 -0
- package/dist/components/icon-picker.d.ts +21 -2
- package/dist/components/icon-picker.js +19 -4
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/inline-edit-field.d.ts +167 -0
- package/dist/components/inline-edit-field.js +293 -0
- package/dist/components/inline-edit-field.js.map +1 -0
- package/dist/components/language-select.d.ts +130 -0
- package/dist/components/language-select.js +18 -0
- package/dist/components/language-select.js.map +1 -0
- package/dist/components/line-items.d.ts +25 -3
- package/dist/components/line-items.js +55 -46
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list.d.ts +25 -0
- package/dist/components/list.js +16 -5
- package/dist/components/list.js.map +1 -1
- package/dist/components/money-field.d.ts +32 -14
- package/dist/components/money-field.js.map +1 -1
- package/dist/components/month-picker.d.ts +52 -4
- package/dist/components/month-picker.js +291 -86
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-entity-combobox.d.ts +26 -1
- package/dist/components/multi-entity-combobox.js +143 -102
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/multi-select.d.ts +8 -1
- package/dist/components/multi-select.js +9 -4
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/number-field.d.ts +34 -19
- package/dist/components/number-field.js +6 -20
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/number-input.d.ts +79 -19
- package/dist/components/number-input.js +90 -38
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numpad-sheet.d.ts +19 -14
- package/dist/components/one-time-code-input.d.ts +100 -0
- package/dist/components/one-time-code-input.js +137 -0
- package/dist/components/one-time-code-input.js.map +1 -0
- package/dist/components/phone-input.d.ts +69 -0
- package/dist/components/phone-input.js +171 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/reauth-dialog.d.ts +2 -2
- package/dist/components/reauth-dialog.js +6 -8
- package/dist/components/reauth-dialog.js.map +1 -1
- package/dist/components/series-chart.d.ts +19 -14
- package/dist/components/settings-fields.d.ts +19 -14
- package/dist/components/share-card.d.ts +16 -11
- package/dist/components/sign-chip.d.ts +66 -0
- package/dist/components/sign-chip.js +39 -0
- package/dist/components/sign-chip.js.map +1 -0
- package/dist/components/swatch-picker.d.ts +43 -2
- package/dist/components/swatch-picker.js +80 -32
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/switch.d.ts +19 -0
- package/dist/components/switch.js +24 -6
- package/dist/components/switch.js.map +1 -1
- package/dist/components/text-link.d.ts +18 -13
- package/dist/components/tile-radio.d.ts +88 -13
- package/dist/components/tile-radio.js +28 -11
- package/dist/components/tile-radio.js.map +1 -1
- package/dist/components/time-input.d.ts +24 -15
- package/dist/components/time-input.js.map +1 -1
- package/dist/components/toggle-group.d.ts +47 -1
- package/dist/components/toggle-group.js +110 -69
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/trigger-aria.d.ts +3 -0
- package/dist/components/trigger-aria.js +3 -1
- package/dist/components/trigger-aria.js.map +1 -1
- package/dist/components/ui.d.ts +16 -11
- package/dist/components/ui.js +284 -88
- package/dist/components/ui.js.map +1 -1
- package/dist/components/use-table-state.d.ts +1 -2
- package/dist/{data-table-3mi2R3so.d.ts → data-table-labels-B7OdnM0S.d.ts} +140 -3
- package/dist/data-table.d.ts +1 -2
- package/dist/data-table.js +2 -1
- package/dist/data-table.js.map +1 -1
- package/dist/feedback/feedback-attachment.d.ts +1 -1
- package/dist/feedback/feedback-attachment.js +348 -41
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +1 -1
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +3 -2
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-thread.d.ts +68 -253
- package/dist/feedback/feedback-thread.js +46 -10
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/{kit-labels-D1J2_jyD.d.ts → feedback-BxeQVzwq.d.ts} +1206 -20
- package/dist/{feedback-attachment-WFiXJ8We.d.ts → feedback-attachment-fGAzZPf0.d.ts} +178 -11
- package/dist/feedback.d.ts +66 -2
- package/dist/hooks/use-file-drop.d.ts +19 -14
- package/dist/i18n/defaults.d.ts +19 -14
- package/dist/i18n/defaults.js +19 -2
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.d.ts +19 -14
- package/dist/i18n/german.js +84 -5
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +15 -10
- package/dist/i18n/kit-labels.js +8 -2
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +19 -14
- package/dist/i18n/locales/de-CH.d.ts +19 -14
- package/dist/i18n/locales/en.d.ts +19 -14
- package/dist/i18n/locales/en.js +16 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +19 -14
- package/dist/i18n/locales/es.js +83 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +19 -14
- package/dist/i18n/locales/fr.js +82 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +19 -14
- package/dist/i18n/locales/hu.js +85 -5
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +19 -14
- package/dist/i18n/locales/it.js +84 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +19 -14
- package/dist/i18n/locales/zh.js +80 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.d.ts +19 -14
- package/dist/i18n/review.js +27 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.js +73 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/column-mapping.d.ts +81 -0
- package/dist/lib/column-mapping.js +108 -0
- package/dist/lib/column-mapping.js.map +1 -0
- package/dist/lib/countries.d.ts +43 -0
- package/dist/lib/countries.js +39 -0
- package/dist/lib/countries.js.map +1 -0
- package/dist/lib/decimal-marks.d.ts +46 -0
- package/dist/lib/decimal-marks.js +40 -0
- package/dist/lib/decimal-marks.js.map +1 -0
- package/dist/lib/iban.d.ts +98 -0
- package/dist/lib/iban.js +154 -0
- package/dist/lib/iban.js.map +1 -0
- package/dist/lib/isin.d.ts +30 -0
- package/dist/lib/isin.js +36 -0
- package/dist/lib/isin.js.map +1 -0
- package/dist/lib/phone.d.ts +69 -0
- package/dist/lib/phone.js +121 -0
- package/dist/lib/phone.js.map +1 -0
- package/dist/lib/table-text.d.ts +109 -1
- package/dist/lib/table-text.js +122 -1
- package/dist/lib/table-text.js.map +1 -1
- package/dist/rhf/fields.d.ts +233 -18
- package/dist/rhf/fields.js +456 -3
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form.d.ts +19 -14
- package/dist/rhf.d.ts +22 -15
- package/dist/rhf.js.map +1 -1
- package/dist/shell/app-shell.d.ts +18 -13
- package/dist/shell/top-bar-brand.d.ts +19 -14
- package/dist/shell/topbar-action-menu.d.ts +36 -3
- package/dist/shell/topbar-action-menu.js +74 -33
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell.d.ts +18 -13
- package/dist/table-text.d.ts +1 -1
- package/dist/tour/tour.js +20 -24
- package/dist/tour/tour.js.map +1 -1
- package/dist/wizard/stepper-nav.d.ts +49 -16
- package/dist/wizard/stepper-nav.js +4 -0
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard.d.ts +19 -14
- package/package.json +1 -1
- package/src/components/account-chips.tsx +17 -3
- package/src/components/account-settings.tsx +92 -26
- package/src/components/amount-input.tsx +68 -56
- package/src/components/autocomplete.tsx +198 -114
- package/src/components/checkbox-group.tsx +229 -0
- package/src/components/checkbox.tsx +72 -8
- package/src/components/chip.tsx +80 -10
- package/src/components/column-mapper.tsx +666 -0
- package/src/components/combobox-core.tsx +82 -9
- package/src/components/combobox.tsx +661 -340
- package/src/components/confirm-dialog.tsx +12 -8
- package/src/components/country-select.tsx +556 -0
- package/src/components/currency-select.tsx +109 -33
- package/src/components/danger-confirm.tsx +429 -82
- package/src/components/data-table-labels.ts +16 -1
- package/src/components/data-table.tsx +175 -6
- package/src/components/date-picker.tsx +595 -71
- package/src/components/entity-combobox.tsx +235 -124
- package/src/components/field-parts.tsx +403 -0
- package/src/components/field-strip.tsx +149 -0
- package/src/components/file-button.tsx +36 -3
- package/src/components/file-dropzone.tsx +106 -38
- package/src/components/form-actions.tsx +147 -6
- package/src/components/iban-input.tsx +231 -0
- package/src/components/icon-picker.tsx +47 -6
- package/src/components/inline-edit-field.tsx +533 -0
- package/src/components/language-select.tsx +78 -0
- package/src/components/line-items.tsx +35 -2
- package/src/components/list.tsx +55 -6
- package/src/components/money-field.tsx +13 -0
- package/src/components/month-picker.tsx +400 -63
- package/src/components/multi-entity-combobox.tsx +207 -120
- package/src/components/multi-select.tsx +80 -58
- package/src/components/number-field.tsx +28 -46
- package/src/components/number-input.tsx +210 -43
- package/src/components/one-time-code-input.tsx +288 -0
- package/src/components/phone-input.tsx +299 -0
- package/src/components/reauth-dialog.tsx +17 -18
- package/src/components/sign-chip.tsx +103 -0
- package/src/components/swatch-picker.tsx +143 -31
- package/src/components/switch.tsx +58 -7
- package/src/components/tile-radio.tsx +145 -29
- package/src/components/time-input.tsx +8 -1
- package/src/components/toggle-group.tsx +206 -73
- package/src/components/trigger-aria.ts +5 -0
- package/src/components/ui.tsx +479 -138
- package/src/data-table.ts +2 -1
- package/src/feedback/feedback-attachment.tsx +597 -46
- package/src/feedback/feedback-dialog.tsx +9 -3
- package/src/feedback/feedback-inbox.tsx +3 -2
- package/src/feedback/feedback-thread.tsx +113 -9
- package/src/i18n/defaults.ts +18 -1
- package/src/i18n/german.ts +89 -0
- package/src/i18n/kit-labels.tsx +82 -2
- package/src/i18n/locales/en.ts +36 -4
- package/src/i18n/locales/es.ts +87 -0
- package/src/i18n/locales/fr.ts +87 -0
- package/src/i18n/locales/hu.ts +83 -0
- package/src/i18n/locales/it.ts +88 -0
- package/src/i18n/locales/zh.ts +76 -0
- package/src/i18n/review.ts +26 -0
- package/src/index.ts +71 -3
- package/src/lib/column-mapping.ts +234 -0
- package/src/lib/countries.ts +91 -0
- package/src/lib/decimal-marks.ts +99 -0
- package/src/lib/iban.ts +171 -0
- package/src/lib/isin.ts +62 -0
- package/src/lib/phone.ts +211 -0
- package/src/lib/table-text.ts +271 -0
- package/src/rhf/fields.tsx +860 -9
- package/src/rhf.ts +3 -1
- package/src/shell/topbar-action-menu.tsx +134 -38
- package/src/tour/tour.tsx +66 -28
- package/src/wizard/stepper-nav.tsx +35 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import './data-table-sort.js';
|
|
3
|
-
export {
|
|
3
|
+
export { I as DEFAULT_PERSIST_PREFIX, T as TableUrlState, k as TableUrlStateProps, l as TableUrlSync, U as UseTableUrlStateOptions, m as UseTableUrlStateReturn, w as readTableUrlState, J as useTableState, E as useTableUrlState } from '../data-table-labels-B7OdnM0S.js';
|
|
4
4
|
import './swipeable-row.js';
|
|
5
|
-
import './data-table-labels.js';
|
|
@@ -2,7 +2,6 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
3
3
|
import { SortState, SortDir, SortCycle } from './components/data-table-sort.js';
|
|
4
4
|
import { SwipeAction } from './components/swipeable-row.js';
|
|
5
|
-
import { DataTableLabels } from './components/data-table-labels.js';
|
|
6
5
|
|
|
7
6
|
/** How a column is filtered. `text`/`select`/`date`/`number` each read a value
|
|
8
7
|
* off the row and compare it against the user's {@link FilterValue}. */
|
|
@@ -280,6 +279,14 @@ interface DataTableColumn<T> {
|
|
|
280
279
|
* Default `"asc"`.
|
|
281
280
|
*/
|
|
282
281
|
firstSort?: SortDir;
|
|
282
|
+
/**
|
|
283
|
+
* The column's name as plain text, for the places a ReactNode `header` cannot go:
|
|
284
|
+
* the phone sort control's options ({@link DataTableProps.mobileSort}), the spoken
|
|
285
|
+
* "Sorted by …" and the column-settings checklist. Only needed when `header` is not
|
|
286
|
+
* a string (an icon, a unit suffix); without it those places fall back to the
|
|
287
|
+
* header string, then to `key`.
|
|
288
|
+
*/
|
|
289
|
+
headerText?: string;
|
|
283
290
|
/**
|
|
284
291
|
* Extra attributes for this column's `<td>` in a given row — a `data-*` hook, a
|
|
285
292
|
* `title`, an `aria-describedby`, a class. keksdose's accounts page
|
|
@@ -537,6 +544,18 @@ interface DataTableProps<T> {
|
|
|
537
544
|
* wastes space (feedback #317). Desktop is unaffected.
|
|
538
545
|
*/
|
|
539
546
|
mobileCard?: (row: T) => ReactNode;
|
|
547
|
+
/**
|
|
548
|
+
* A "Sort by" select and a direction button above the phone card list (keksdose
|
|
549
|
+
* K10). The card list has no header row, so without it a phone user is stuck with
|
|
550
|
+
* whatever order the table opened in. It drives the same sort state as the column
|
|
551
|
+
* headers — `sorts`/`onSortsChange` when controlled, the URL and `storageKey` when
|
|
552
|
+
* not — and offers the columns a header click could sort (those with a `sortBy`).
|
|
553
|
+
* Each option is named by the column's `headerText`, else its string `header`.
|
|
554
|
+
*
|
|
555
|
+
* Off by default, so no existing phone layout gains a row. Strings:
|
|
556
|
+
* {@link DataTableSortLabels}. Phones only; the desktop table is unchanged.
|
|
557
|
+
*/
|
|
558
|
+
mobileSort?: boolean;
|
|
540
559
|
/**
|
|
541
560
|
* Swipe actions for a mobile row, revealed by dragging it horizontally. Return
|
|
542
561
|
* `null` (or empty sides) for rows that should not move — a locked row, one whose
|
|
@@ -714,7 +733,125 @@ interface MobileSwipeActions {
|
|
|
714
733
|
/** Committed by dragging physically RIGHT, whatever the direction. */
|
|
715
734
|
right?: SwipeAction[];
|
|
716
735
|
}
|
|
736
|
+
/**
|
|
737
|
+
* The phone sort control's strings (keksdose K10). They are `dataTable` strings —
|
|
738
|
+
* read from the table's resolved labels, so the `labels` prop and the provider's
|
|
739
|
+
* `dataTable` namespace reach them — and are declared here, beside the control, with
|
|
740
|
+
* English defaults until `DataTableLabels` declares them itself.
|
|
741
|
+
*/
|
|
742
|
+
interface DataTableSortLabels {
|
|
743
|
+
/** The control's visible label: "Sort by". */
|
|
744
|
+
sortBy: string;
|
|
745
|
+
/** The "no sort" option — the rows in the order they were given: "Default order". */
|
|
746
|
+
sortDefault: string;
|
|
747
|
+
/** The direction button's name while the sort ascends: "Ascending". */
|
|
748
|
+
sortAscending: string;
|
|
749
|
+
/** …and while it descends: "Descending". */
|
|
750
|
+
sortDescending: string;
|
|
751
|
+
}
|
|
752
|
+
/** The phone sort control's words, as they sit in {@link DEFAULT_DATA_TABLE_LABELS}
|
|
753
|
+
* (DataTableLabels extends DataTableSortLabels; one source for the English). */
|
|
754
|
+
declare const DEFAULT_DATA_TABLE_SORT_LABELS: DataTableSortLabels;
|
|
717
755
|
|
|
718
|
-
declare function DataTable<T>({ rows, columns: columnsProp, rowKey, defaultPageSize, onRowClick, rowHref, expandedRow, isExpanded, rowClassName, rowAttributes, paginated, empty, storageKey, urlSync, fillHeight, maxBodyHeight, serverPagination, filters: filtersProp, onFiltersChange, sorts: sortsProp, onSortsChange, selection, labels: labelsProp, locale: localeProp, storageKeyPrefix, mobileExpandAsDialog, mobileDialogBackCloses, mobileGroupBy, mobileGroupLabel, mobileCard, mobileSwipeActions, leadingRow, density, sortCycle, chrome, columnSettings: columnSettingsProp, resizable: resizableProp, multiSort: multiSortProp, frame, className, rowActions, toolbar, footerLabel, footer: footerProp, }: DataTableProps<T>): react.JSX.Element;
|
|
756
|
+
declare function DataTable<T>({ rows, columns: columnsProp, rowKey, defaultPageSize, onRowClick, rowHref, expandedRow, isExpanded, rowClassName, rowAttributes, paginated, empty, storageKey, urlSync, fillHeight, maxBodyHeight, serverPagination, filters: filtersProp, onFiltersChange, sorts: sortsProp, onSortsChange, selection, labels: labelsProp, locale: localeProp, storageKeyPrefix, mobileExpandAsDialog, mobileDialogBackCloses, mobileGroupBy, mobileGroupLabel, mobileCard, mobileSort, mobileSwipeActions, leadingRow, density, sortCycle, chrome, columnSettings: columnSettingsProp, resizable: resizableProp, multiSort: multiSortProp, frame, className, rowActions, toolbar, footerLabel, footer: footerProp, }: DataTableProps<T>): react.JSX.Element;
|
|
757
|
+
|
|
758
|
+
/** The phone sort control's four keys (`sortBy`, `sortDefault`, `sortAscending`,
|
|
759
|
+
* `sortDescending`, 0.22.0) are {@link DataTableSortLabels}', declared beside the
|
|
760
|
+
* control and part of this namespace like every other key. */
|
|
761
|
+
interface DataTableLabels extends DataTableSortLabels {
|
|
762
|
+
columns: string;
|
|
763
|
+
selectAllRows: string;
|
|
764
|
+
sortHint: string;
|
|
765
|
+
filter: string;
|
|
766
|
+
close: string;
|
|
767
|
+
selectRow: string;
|
|
768
|
+
autoSize: string;
|
|
769
|
+
loading: string;
|
|
770
|
+
filters: string;
|
|
771
|
+
clearAll: string;
|
|
772
|
+
done: string;
|
|
773
|
+
pageSize: string;
|
|
774
|
+
pageSizeAll: string;
|
|
775
|
+
prevPage: string;
|
|
776
|
+
nextPage: string;
|
|
777
|
+
clearFilter: string;
|
|
778
|
+
filterPlaceholder: string;
|
|
779
|
+
selectFilter: string;
|
|
780
|
+
selectAll: string;
|
|
781
|
+
selectNone: string;
|
|
782
|
+
dateFrom: string;
|
|
783
|
+
dateTo: string;
|
|
784
|
+
numberMin: string;
|
|
785
|
+
numberMax: string;
|
|
786
|
+
numberAbs: string;
|
|
787
|
+
presets: Record<string, string>;
|
|
788
|
+
/**
|
|
789
|
+
* The table's own accessible name. Deliberately a label rather than a second,
|
|
790
|
+
* parallel `tableLabel` prop: the audit already records "three different prop
|
|
791
|
+
* names for the accessible name" as a finding, and a table that is not "Data
|
|
792
|
+
* table" says so with `labels={{ table: "Transactions" }}` at the call site.
|
|
793
|
+
*/
|
|
794
|
+
table: string;
|
|
795
|
+
/** After a filter changes: "12 of 137 rows". */
|
|
796
|
+
filterResults: (shown: number, total: number) => string;
|
|
797
|
+
/** After a header is activated: "Sorted by Name, ascending". */
|
|
798
|
+
sortedAscending: (column: string) => string;
|
|
799
|
+
sortedDescending: (column: string) => string;
|
|
800
|
+
/** The third click, which removes the column from the sort entirely. */
|
|
801
|
+
sortCleared: (column: string) => string;
|
|
802
|
+
/** After paging: "Page 3 of 14". `page` is 1-BASED, as spoken. */
|
|
803
|
+
pageChanged: (page: number, totalPages: number) => string;
|
|
804
|
+
/** The pagination range summary: "1–25 / 137". */
|
|
805
|
+
pageRange: (from: number, to: number, total: number) => string;
|
|
806
|
+
/** The same summary when the page size is "all" — just the row count. */
|
|
807
|
+
rowCount: (total: number) => string;
|
|
808
|
+
/** The column-settings rail and its heading: "Columns (4/9)". */
|
|
809
|
+
columnsCount: (visible: number, total: number) => string;
|
|
810
|
+
/** The body of a table with no rows and no `empty` prop of its own. A sentence, not
|
|
811
|
+
* "—": a dash in the only row of a table reads as one row with a missing value. */
|
|
812
|
+
empty: string;
|
|
813
|
+
/** The accessible name of the `rowActions` column (its header is visually empty). */
|
|
814
|
+
actions: string;
|
|
815
|
+
/** The `kind: "edit"` row action's name — its tooltip and its swipe label. */
|
|
816
|
+
edit: string;
|
|
817
|
+
/** The `kind: "delete"` row action's name. */
|
|
818
|
+
delete: string;
|
|
819
|
+
/** What {@link BooleanMark} says to a screen reader for `true` / `false` / nothing. */
|
|
820
|
+
booleanTrue: string;
|
|
821
|
+
booleanFalse: string;
|
|
822
|
+
booleanUnset: string;
|
|
823
|
+
}
|
|
824
|
+
declare const DEFAULT_DATA_TABLE_LABELS: DataTableLabels;
|
|
825
|
+
/**
|
|
826
|
+
* Merge caller overrides onto the English defaults (presets merged too).
|
|
827
|
+
*
|
|
828
|
+
* The parameter is `Partial` on purpose — a table with no labels at all still
|
|
829
|
+
* renders — but that is also how a translated app ends up half English and never
|
|
830
|
+
* hears about it: lenkbank ships nineteen of these keys in English in a German UI
|
|
831
|
+
* today, because every one of them is backfilled silently. The kit will not start
|
|
832
|
+
* throwing over it (three apps depend on the lenient merge), so
|
|
833
|
+
* {@link missingDataTableLabels} is the other half: it answers which keys fell back,
|
|
834
|
+
* and an app asserts on that in its OWN test, where the answer is actionable.
|
|
835
|
+
*/
|
|
836
|
+
declare function resolveDataTableLabels(partial?: Partial<DataTableLabels>): DataTableLabels;
|
|
837
|
+
/**
|
|
838
|
+
* The label keys `labels` does not supply, and which therefore come back English
|
|
839
|
+
* from {@link resolveDataTableLabels}.
|
|
840
|
+
*
|
|
841
|
+
* For a consumer's own test:
|
|
842
|
+
*
|
|
843
|
+
* ```ts
|
|
844
|
+
* expect(missingDataTableLabels(de.dataTable)).toEqual([]);
|
|
845
|
+
* ```
|
|
846
|
+
*
|
|
847
|
+
* which fails the day the kit adds a key — which is the point. Adding a label is
|
|
848
|
+
* additive here and a silent regression in a translated app, and nothing else in
|
|
849
|
+
* either repository can tell the two apart.
|
|
850
|
+
*
|
|
851
|
+
* Preset labels are reported one at a time (`presets.yesterday`), because `presets`
|
|
852
|
+
* is a `Record` merged key by key: answering `"presets"` would say nothing about
|
|
853
|
+
* which of the eleven are still English.
|
|
854
|
+
*/
|
|
855
|
+
declare function missingDataTableLabels(labels?: Partial<DataTableLabels>): string[];
|
|
719
856
|
|
|
720
|
-
export {
|
|
857
|
+
export { selectFilter as A, textFilter as B, type ColumnFilter as C, DEFAULT_DATA_TABLE_LABELS as D, useTableUrlState as E, type FilterState as F, type DataTableCellProps as G, type DataTableHeadProps as H, DEFAULT_PERSIST_PREFIX as I, useTableState as J, type MobileSwipeActions as M, type ServerPagination as S, type TableUrlState as T, type UseTableUrlStateOptions as U, DEFAULT_DATA_TABLE_SORT_LABELS as a, DataTable as b, type DataTableChrome as c, type DataTableColumn as d, type DataTableDensity as e, type DataTableLabels as f, type DataTableProps as g, type DataTableRowAction as h, type DataTableSortLabels as i, type FilterValue as j, type TableUrlStateProps as k, type TableUrlSync as l, type UseTableUrlStateReturn as m, dateFilter as n, decodeFilterValue as o, decodeFilterValueOfType as p, defaultFilterState as q, encodeFilterValue as r, filterHref as s, isFilterActive as t, missingDataTableLabels as u, numberFilter as v, readTableUrlState as w, resolveDataTableLabels as x, resolveFilter as y, rowMatches as z };
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { DEFAULT_DATA_TABLE_LABELS, DataTableLabels, missingDataTableLabels, resolveDataTableLabels } from './
|
|
1
|
+
export { C as ColumnFilter, D as DEFAULT_DATA_TABLE_LABELS, a as DEFAULT_DATA_TABLE_SORT_LABELS, b as DataTable, c as DataTableChrome, d as DataTableColumn, e as DataTableDensity, f as DataTableLabels, g as DataTableProps, h as DataTableRowAction, i as DataTableSortLabels, F as FilterState, j as FilterValue, M as MobileSwipeActions, S as ServerPagination, T as TableUrlState, k as TableUrlStateProps, l as TableUrlSync, U as UseTableUrlStateOptions, m as UseTableUrlStateReturn, n as dateFilter, o as decodeFilterValue, p as decodeFilterValueOfType, q as defaultFilterState, r as encodeFilterValue, s as filterHref, t as isFilterActive, u as missingDataTableLabels, v as numberFilter, w as readTableUrlState, x as resolveDataTableLabels, y as resolveFilter, z as rowMatches, A as selectFilter, B as textFilter, E as useTableUrlState } from './data-table-labels-B7OdnM0S.js';
|
|
2
2
|
export { SortCycle, SortDir, SortState, SortStepOptions, decodeSorts, encodeSorts, nextSorts, normalizeSorts } from './components/data-table-sort.js';
|
|
3
|
-
export { C as ColumnFilter, D as DataTable, a as DataTableChrome, b as DataTableColumn, c as DataTableDensity, d as DataTableProps, e as DataTableRowAction, F as FilterState, f as FilterValue, M as MobileSwipeActions, S as ServerPagination, T as TableUrlState, g as TableUrlStateProps, h as TableUrlSync, U as UseTableUrlStateOptions, i as UseTableUrlStateReturn, j as dateFilter, k as decodeFilterValue, l as decodeFilterValueOfType, m as defaultFilterState, n as encodeFilterValue, o as filterHref, p as isFilterActive, q as numberFilter, r as readTableUrlState, s as resolveFilter, t as rowMatches, u as selectFilter, v as textFilter, w as useTableUrlState } from './data-table-3mi2R3so.js';
|
|
4
3
|
export { PAGE_SIZE_OPTIONS, Pagination } from './components/data-table-pagination.js';
|
|
5
4
|
export { FilterPopover } from './components/data-table-filter-popover.js';
|
|
6
5
|
export { BooleanColumnOptions, BooleanMark, BooleanMarkProps, booleanColumn } from './components/data-table-cells.js';
|
package/dist/data-table.js
CHANGED
|
@@ -4,10 +4,11 @@ export * from "./components/data-table-sort.js";
|
|
|
4
4
|
export * from "./components/data-table-filters.js";
|
|
5
5
|
export * from "./components/data-table-pagination.js";
|
|
6
6
|
import { FilterPopover } from "./components/data-table-filter-popover.js";
|
|
7
|
-
import { DataTable } from "./components/data-table.js";
|
|
7
|
+
import { DataTable, DEFAULT_DATA_TABLE_SORT_LABELS } from "./components/data-table.js";
|
|
8
8
|
export * from "./components/data-table-cells.js";
|
|
9
9
|
import { useTableUrlState, readTableUrlState } from "./components/use-table-state.js";
|
|
10
10
|
export {
|
|
11
|
+
DEFAULT_DATA_TABLE_SORT_LABELS,
|
|
11
12
|
DataTable,
|
|
12
13
|
FilterPopover,
|
|
13
14
|
readTableUrlState,
|
package/dist/data-table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/data-table.ts"],"sourcesContent":["// `@eifi1/ui-kit/data-table` — the table suite.\n//\n// A re-slicing of the main barrel, not a new API. This entry point requires\n// `react-router`: DataTable calls useSearchParams unconditionally, above any `urlSync`\n// branch, so a Router is needed even with URL sync switched off.\nexport * from \"./components/data-table-labels\";\nexport * from \"./components/data-table-sort\";\nexport * from \"./components/data-table-filters\";\nexport * from \"./components/data-table-pagination\";\nexport { FilterPopover } from \"./components/data-table-filter-popover\";\n// `SortState` comes from data-table-sort above; re-exporting the module wholesale\n// would collide with it, which is why the main barrel names these explicitly too.\nexport { DataTable } from \"./components/data-table\";\nexport type {\n DataTableColumn,\n DataTableProps,\n ServerPagination,\n FilterState,\n MobileSwipeActions,\n DataTableDensity,\n DataTableChrome,\n DataTableRowAction,\n} from \"./components/data-table\";\nexport * from \"./components/data-table-cells\";\nexport { useTableUrlState, readTableUrlState } from \"./components/use-table-state\";\nexport type {\n TableUrlState,\n TableUrlSync,\n TableUrlStateProps,\n UseTableUrlStateOptions,\n UseTableUrlStateReturn,\n} from \"./components/use-table-state\";\n"],"mappings":";AAKA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;AAG9B,SAAS,
|
|
1
|
+
{"version":3,"sources":["../src/data-table.ts"],"sourcesContent":["// `@eifi1/ui-kit/data-table` — the table suite.\n//\n// A re-slicing of the main barrel, not a new API. This entry point requires\n// `react-router`: DataTable calls useSearchParams unconditionally, above any `urlSync`\n// branch, so a Router is needed even with URL sync switched off.\nexport * from \"./components/data-table-labels\";\nexport * from \"./components/data-table-sort\";\nexport * from \"./components/data-table-filters\";\nexport * from \"./components/data-table-pagination\";\nexport { FilterPopover } from \"./components/data-table-filter-popover\";\n// `SortState` comes from data-table-sort above; re-exporting the module wholesale\n// would collide with it, which is why the main barrel names these explicitly too.\nexport { DataTable, DEFAULT_DATA_TABLE_SORT_LABELS } from \"./components/data-table\";\nexport type {\n DataTableSortLabels,\n DataTableColumn,\n DataTableProps,\n ServerPagination,\n FilterState,\n MobileSwipeActions,\n DataTableDensity,\n DataTableChrome,\n DataTableRowAction,\n} from \"./components/data-table\";\nexport * from \"./components/data-table-cells\";\nexport { useTableUrlState, readTableUrlState } from \"./components/use-table-state\";\nexport type {\n TableUrlState,\n TableUrlSync,\n TableUrlStateProps,\n UseTableUrlStateOptions,\n UseTableUrlStateReturn,\n} from \"./components/use-table-state\";\n"],"mappings":";AAKA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;AAG9B,SAAS,WAAW,sCAAsC;AAY1D,cAAc;AACd,SAAS,kBAAkB,yBAAyB;","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export { D as DEFAULT_ATTACHMENT_ACCEPT, a as DEFAULT_FEEDBACK_ATTACHMENT_LABELS, c as DEFAULT_MAX_ATTACHMENTS, d as DEFAULT_MAX_ATTACHMENT_BYTES, F as FeedbackAttachmentError, e as
|
|
2
|
+
export { D as DEFAULT_ATTACHMENT_ACCEPT, a as DEFAULT_FEEDBACK_ATTACHMENT_LABELS, c as DEFAULT_MAX_ATTACHMENTS, d as DEFAULT_MAX_ATTACHMENT_BYTES, F as FeedbackAttachmentError, e as FeedbackAttachmentErrorInfo, f as FeedbackAttachmentField, g as FeedbackAttachmentFieldLabels, h as FeedbackAttachmentFieldMultipleProps, i as FeedbackAttachmentFieldProps, j as FeedbackAttachmentFieldRefsProps, k as FeedbackAttachmentFieldSingleProps, m as FeedbackAttachmentRef, n as FeedbackAttachmentRefsError, x as pastedName } from '../feedback-attachment-fGAzZPf0.js';
|