@caspeco/casper-ui-library 11.4.0 → 12.0.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/dist/components/accordion/accordion-item.js +10 -10
- package/dist/components/accordion/accordion-panel.js +4 -4
- package/dist/components/accordion/accordion.js +4 -4
- package/dist/components/alert/alert.js +10 -10
- package/dist/components/badge/badge.js +18 -18
- package/dist/components/box/box.js +3 -3
- package/dist/components/breadcrumbs/breadcrumb-item.js +4 -4
- package/dist/components/breadcrumbs/breadcrumb-link.js +3 -3
- package/dist/components/breadcrumbs/breadcrumbs.js +22 -22
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +5 -5
- package/dist/components/checkbox/checkbox-icon.js +3 -3
- package/dist/components/checkbox/checkbox.js +7 -7
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/collapsible/collapsible.d.ts +1 -1
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +30 -29
- package/dist/components/collapsible/collapsible.translations.d.ts +6 -0
- package/dist/components/collapsible/collapsible.translations.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.translations.js +54 -0
- package/dist/components/collapsible/types.d.ts +0 -6
- package/dist/components/collapsible/types.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.d.ts +1 -1
- package/dist/components/combobox/combobox-button.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.js +66 -64
- package/dist/components/combobox/combobox-item.js +8 -8
- package/dist/components/combobox/combobox-menu.d.ts.map +1 -1
- package/dist/components/combobox/combobox-menu.js +95 -94
- package/dist/components/combobox/combobox.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +91 -91
- package/dist/components/combobox/combobox.translations.d.ts +10 -0
- package/dist/components/combobox/combobox.translations.d.ts.map +1 -0
- package/dist/components/combobox/combobox.translations.js +102 -0
- package/dist/components/combobox/index.d.ts +1 -1
- package/dist/components/combobox/index.d.ts.map +1 -1
- package/dist/components/combobox/types.d.ts +0 -15
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.d.ts +1 -1
- package/dist/components/date-picker/base-date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.js +163 -162
- package/dist/components/date-picker/date-multi-picker.d.ts +1 -1
- package/dist/components/date-picker/date-multi-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-multi-picker.js +20 -21
- package/dist/components/date-picker/date-picker-date-cell.js +27 -27
- package/dist/components/date-picker/date-picker-header.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-header.js +84 -116
- package/dist/components/date-picker/date-picker-week-cell.js +4 -4
- package/dist/components/date-picker/date-picker.composition.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +20 -21
- package/dist/components/date-picker/date-picker.translations.d.ts +6 -0
- package/dist/components/date-picker/date-picker.translations.d.ts.map +1 -0
- package/dist/components/date-picker/date-picker.translations.js +54 -0
- package/dist/components/date-picker/date-range-picker.d.ts +1 -1
- package/dist/components/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-range-picker.js +15 -16
- package/dist/components/date-picker/date-week-picker.d.ts +1 -1
- package/dist/components/date-picker/date-week-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-week-picker.js +13 -14
- package/dist/components/date-picker/types.d.ts +4 -10
- package/dist/components/date-picker/types.d.ts.map +1 -1
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/drawer/inline-drawer.js +4 -4
- package/dist/components/fieldset/fieldset-error-text.js +3 -3
- package/dist/components/fieldset/fieldset-helper-text.js +3 -3
- package/dist/components/fieldset/fieldset-legend.js +3 -3
- package/dist/components/fieldset/fieldset.js +3 -3
- package/dist/components/flex/flex.js +3 -3
- package/dist/components/form-control/form-control.js +3 -3
- package/dist/components/form-control/form-error-message.js +3 -3
- package/dist/components/form-control/form-helper-text.js +3 -3
- package/dist/components/form-control/form-label.js +5 -5
- package/dist/components/grid/grid-item.js +3 -3
- package/dist/components/grid/grid.js +3 -3
- package/dist/components/heading/heading.js +3 -3
- package/dist/components/highlight/highlight.js +3 -3
- package/dist/components/icon/create-icon.js +7 -7
- package/dist/components/icon-button/icon-button.js +4 -4
- package/dist/components/image/image.js +3 -3
- package/dist/components/image-upload/image-upload-dropzone.d.ts +1 -3
- package/dist/components/image-upload/image-upload-dropzone.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-dropzone.js +75 -74
- package/dist/components/image-upload/image-upload-icons.js +11 -11
- package/dist/components/image-upload/image-upload-modal.d.ts +2 -3
- package/dist/components/image-upload/image-upload-modal.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload-modal.js +69 -69
- package/dist/components/image-upload/image-upload.d.ts +1 -1
- package/dist/components/image-upload/image-upload.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload.js +43 -44
- package/dist/components/image-upload/image-upload.translations.d.ts +12 -0
- package/dist/components/image-upload/image-upload.translations.d.ts.map +1 -0
- package/dist/components/image-upload/image-upload.translations.js +126 -0
- package/dist/components/image-upload/types.d.ts +0 -3
- package/dist/components/image-upload/types.d.ts.map +1 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.js +5 -5
- package/dist/components/link/link.js +3 -3
- package/dist/components/list/list-item.js +3 -3
- package/dist/components/list/list.js +3 -3
- package/dist/components/menu/menu-box-button.js +4 -4
- package/dist/components/menu/menu-button.js +4 -4
- package/dist/components/menu/menu-group.js +11 -11
- package/dist/components/menu/menu-icon-button.js +4 -4
- package/dist/components/menu/menu-item.js +7 -7
- package/dist/components/menu/menu-list.js +3 -3
- package/dist/components/menu/menu.js +4 -4
- package/dist/components/message/message.js +8 -8
- package/dist/components/modal/modal-body.js +3 -3
- package/dist/components/modal/modal-close-button.js +5 -5
- package/dist/components/modal/modal-footer.js +3 -3
- package/dist/components/modal/modal-header.js +3 -3
- package/dist/components/modal/modal.js +8 -8
- package/dist/components/navigation-list/navigation-list-item.js +10 -10
- package/dist/components/navigation-list/navigation-list.js +4 -4
- package/dist/components/paginator/paginator.composition.d.ts.map +1 -1
- package/dist/components/paginator/paginator.d.ts +1 -4
- package/dist/components/paginator/paginator.d.ts.map +1 -1
- package/dist/components/paginator/paginator.js +31 -30
- package/dist/components/paginator/paginator.translations.d.ts +7 -0
- package/dist/components/paginator/paginator.translations.d.ts.map +1 -0
- package/dist/components/paginator/paginator.translations.js +66 -0
- package/dist/components/phone-input/country-data.d.ts +2 -2
- package/dist/components/phone-input/country-data.d.ts.map +1 -1
- package/dist/components/phone-input/country-list.js +6 -6
- package/dist/components/phone-input/country-selector.d.ts +1 -4
- package/dist/components/phone-input/country-selector.d.ts.map +1 -1
- package/dist/components/phone-input/country-selector.js +86 -84
- package/dist/components/phone-input/phone-input-helpers.d.ts +4 -5
- package/dist/components/phone-input/phone-input-helpers.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input-helpers.js +33 -34
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input.js +38 -38
- package/dist/components/phone-input/phone-input.translations.d.ts +10 -0
- package/dist/components/phone-input/phone-input.translations.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.translations.js +102 -0
- package/dist/components/phone-input/types.d.ts +0 -3
- package/dist/components/phone-input/types.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.d.ts +0 -3
- package/dist/components/phone-input/use-phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.js +82 -81
- package/dist/components/quantity-button/quantity-button.js +12 -12
- package/dist/components/radio/radio-group.js +4 -4
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +14 -14
- package/dist/components/radio-card/radio-card-group.js +3 -3
- package/dist/components/radio-card/radio-card.d.ts +1 -1
- package/dist/components/radio-card/radio-card.js +7 -7
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts +0 -2
- package/dist/components/rich-text-editor/rich-text-editor-context.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor-control.js +129 -128
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +22 -25
- package/dist/components/rich-text-editor/{translations.d.ts → rich-text-editor.translations.d.ts} +3 -5
- package/dist/components/rich-text-editor/rich-text-editor.translations.d.ts.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.translations.js +234 -0
- package/dist/components/rich-text-editor/rich-text-renderer.js +4 -4
- package/dist/components/rich-text-editor/types.d.ts +0 -2
- package/dist/components/rich-text-editor/types.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +5 -5
- package/dist/components/select/select.js +5 -5
- package/dist/components/skeleton/skeleton-text.js +3 -3
- package/dist/components/skeleton/skeleton.js +3 -3
- package/dist/components/spinner/spinner.js +5 -5
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.js +3 -3
- package/dist/components/stepper/step.js +25 -25
- package/dist/components/stepper/stepper.js +8 -8
- package/dist/components/switch/switch.js +6 -6
- package/dist/components/table/table-cell.d.ts +1 -3
- package/dist/components/table/table-cell.d.ts.map +1 -1
- package/dist/components/table/table-cell.js +43 -46
- package/dist/components/table/table-column-resize-handle.d.ts.map +1 -1
- package/dist/components/table/table-column-resize-handle.js +22 -21
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +81 -79
- package/dist/components/table/table-context-provider.d.ts +1 -4
- package/dist/components/table/table-context-provider.d.ts.map +1 -1
- package/dist/components/table/table-context-provider.js +137 -140
- package/dist/components/table/table-drag-accessibility.d.ts +3 -3
- package/dist/components/table/table-drag-accessibility.d.ts.map +1 -1
- package/dist/components/table/table-drag-accessibility.js +10 -14
- package/dist/components/table/table-filter.d.ts.map +1 -1
- package/dist/components/table/table-filter.js +59 -59
- package/dist/components/table/table-header-dropdown.d.ts +0 -2
- package/dist/components/table/table-header-dropdown.d.ts.map +1 -1
- package/dist/components/table/table-header-dropdown.js +28 -27
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +53 -56
- package/dist/components/table/table-row-drag-handle.d.ts +1 -3
- package/dist/components/table/table-row-drag-handle.d.ts.map +1 -1
- package/dist/components/table/table-row-drag-handle.js +10 -9
- package/dist/components/table/table-row-expand-toggle-button.d.ts +1 -3
- package/dist/components/table/table-row-expand-toggle-button.d.ts.map +1 -1
- package/dist/components/table/table-row-expand-toggle-button.js +9 -8
- package/dist/components/table/table-row.d.ts.map +1 -1
- package/dist/components/table/table-row.js +5 -6
- package/dist/components/table/table-sorted-reorder-prompt.d.ts +1 -3
- package/dist/components/table/table-sorted-reorder-prompt.d.ts.map +1 -1
- package/dist/components/table/table-sorted-reorder-prompt.js +26 -25
- package/dist/components/table/table-toolbar-actions.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-actions.js +4 -4
- package/dist/components/table/table-toolbar-add-button.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-add-button.js +4 -4
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +110 -108
- package/dist/components/table/table-toolbar.js +11 -11
- package/dist/components/table/table.composition.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +31 -32
- package/dist/components/table/table.translations.d.ts +45 -0
- package/dist/components/table/table.translations.d.ts.map +1 -0
- package/dist/components/table/table.translations.js +522 -0
- package/dist/components/table/types.d.ts +0 -5
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/tabs/tab-list.js +3 -3
- package/dist/components/tabs/tab-panel.js +3 -3
- package/dist/components/tabs/tab-panels.js +3 -3
- package/dist/components/tabs/tab-with-image.js +10 -10
- package/dist/components/tabs/tab.js +4 -4
- package/dist/components/tabs/tabs.js +3 -3
- package/dist/components/tag/tag.js +28 -28
- package/dist/components/text/text.js +3 -3
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/toaster/toaster.js +9 -9
- package/dist/components/toggle-button/toggle-button.js +3 -3
- package/dist/components/toggle-button/use-button-children.js +10 -10
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +8 -8
- package/dist/index.js +404 -402
- package/dist/node_modules/libphonenumber-js/metadata.mobile.json.js +13 -19
- package/dist/test-utils/render-with-theme.d.ts +5 -1
- package/dist/test-utils/render-with-theme.d.ts.map +1 -1
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/locale-provider.d.ts +9 -0
- package/dist/theme/locale-provider.d.ts.map +1 -0
- package/dist/theme/locale-provider.js +14 -0
- package/dist/theme/locale-provider.spec.d.ts +2 -0
- package/dist/theme/locale-provider.spec.d.ts.map +1 -0
- package/dist/theme/theme-locale.d.ts +7 -0
- package/dist/theme/theme-locale.d.ts.map +1 -0
- package/dist/theme/theme-locale.js +8 -0
- package/dist/theme/theme-provider.d.ts +4 -1
- package/dist/theme/theme-provider.d.ts.map +1 -1
- package/dist/theme/theme-provider.js +30 -25
- package/dist/theme/translations.d.ts +14 -0
- package/dist/theme/translations.d.ts.map +1 -0
- package/dist/theme/translations.js +10 -0
- package/dist/theme/translations.spec.d.ts +2 -0
- package/dist/theme/translations.spec.d.ts.map +1 -0
- package/package.json +5 -5
- package/dist/components/collapsible/translations.d.ts +0 -32
- package/dist/components/collapsible/translations.d.ts.map +0 -1
- package/dist/components/collapsible/translations.js +0 -30
- package/dist/components/combobox/translations.d.ts +0 -9
- package/dist/components/combobox/translations.d.ts.map +0 -1
- package/dist/components/combobox/translations.js +0 -57
- package/dist/components/image-upload/translations.d.ts +0 -73
- package/dist/components/image-upload/translations.d.ts.map +0 -1
- package/dist/components/image-upload/translations.js +0 -66
- package/dist/components/paginator/translations.d.ts +0 -9
- package/dist/components/paginator/translations.d.ts.map +0 -1
- package/dist/components/paginator/translations.js +0 -36
- package/dist/components/phone-input/translations.d.ts +0 -60
- package/dist/components/phone-input/translations.d.ts.map +0 -1
- package/dist/components/phone-input/translations.js +0 -54
- package/dist/components/rich-text-editor/translations.d.ts.map +0 -1
- package/dist/components/rich-text-editor/translations.js +0 -120
- package/dist/components/table/translations.d.ts +0 -308
- package/dist/components/table/translations.d.ts.map +0 -1
- package/dist/components/table/translations.js +0 -267
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use no memo";
|
|
2
2
|
import { ThemeColorVariable as e, ThemeIconSizeVariable as t } from "../../theme/theme-types.js";
|
|
3
3
|
import { GripMoreIcon as n } from "../icon/icons/grip-more-icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useComponentTranslations as r } from "../../theme/translations.js";
|
|
5
|
+
import { useTableContext as i } from "./table-context.js";
|
|
6
|
+
import { tableTranslations as a } from "./table.translations.js";
|
|
7
|
+
import { memo as o, useRef as s } from "react";
|
|
8
8
|
import { jsx as c } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import { Box as l } from "@chakra-ui/react";
|
|
10
|
+
var u = o(({ handleRef: o }) => {
|
|
11
|
+
let u = r(a), { rowReorderMode: d, setIsSortedReorderPromptOpen: f } = i(), p = d === "blockedBySort", m = s(null), h = (e) => {
|
|
11
12
|
p && (m.current = {
|
|
12
13
|
x: e.clientX,
|
|
13
14
|
y: e.clientY
|
|
@@ -18,8 +19,8 @@ var l = a(({ localeString: a, handleRef: l }) => {
|
|
|
18
19
|
}, _ = () => {
|
|
19
20
|
m.current = null;
|
|
20
21
|
};
|
|
21
|
-
return /* @__PURE__ */ c(
|
|
22
|
-
ref:
|
|
22
|
+
return /* @__PURE__ */ c(l, {
|
|
23
|
+
ref: o,
|
|
23
24
|
onPointerDown: h,
|
|
24
25
|
onPointerMove: g,
|
|
25
26
|
onPointerUp: _,
|
|
@@ -50,4 +51,4 @@ var l = a(({ localeString: a, handleRef: l }) => {
|
|
|
50
51
|
});
|
|
51
52
|
});
|
|
52
53
|
//#endregion
|
|
53
|
-
export {
|
|
54
|
+
export { u as TableRowDragHandle };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Row } from '@tanstack/react-table';
|
|
2
|
-
import { Locales } from './translations.js';
|
|
3
2
|
import { TableRow } from './types.js';
|
|
4
3
|
interface TableRowExpandToggleButtonProps {
|
|
5
4
|
row: Row<TableRow>;
|
|
6
|
-
localeString: Locales;
|
|
7
5
|
rowIsExpanded: boolean;
|
|
8
6
|
hidden?: boolean;
|
|
9
7
|
}
|
|
10
|
-
export declare const TableRowExpandToggleButton: import('react').MemoExoticComponent<({ row,
|
|
8
|
+
export declare const TableRowExpandToggleButton: import('react').MemoExoticComponent<({ row, rowIsExpanded, hidden }: TableRowExpandToggleButtonProps) => import('react').JSX.Element>;
|
|
11
9
|
export {};
|
|
12
10
|
//# sourceMappingURL=table-row-expand-toggle-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-row-expand-toggle-button.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-row-expand-toggle-button.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,
|
|
1
|
+
{"version":3,"file":"table-row-expand-toggle-button.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-row-expand-toggle-button.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,UAAU,+BAA+B;IACxC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,0BAA0B,uEACL,+BAA+B,iCAkChE,CAAC"}
|
|
@@ -3,17 +3,18 @@ import { ThemeSpaceVariable as e } from "../../theme/theme-types.js";
|
|
|
3
3
|
import { TreeViewCollapseIcon as t } from "../icon/icons/tree-view-collapse-icon.js";
|
|
4
4
|
import { TreeViewExpandIcon as n } from "../icon/icons/tree-view-expand-icon.js";
|
|
5
5
|
import { IconButton as r } from "../icon-button/icon-button.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useComponentTranslations as i } from "../../theme/translations.js";
|
|
7
|
+
import { tableTranslations as a } from "./table.translations.js";
|
|
8
|
+
import { memo as o } from "react";
|
|
9
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
9
10
|
//#region lib/components/table/table-row-expand-toggle-button.tsx
|
|
10
|
-
var
|
|
11
|
-
let u = i
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
var c = o(({ row: o, rowIsExpanded: c, hidden: l }) => {
|
|
12
|
+
let u = i(a), d = o.getToggleExpandedHandler();
|
|
13
|
+
return /* @__PURE__ */ s(r, {
|
|
13
14
|
size: "xs",
|
|
14
15
|
mr: e.XSmall,
|
|
15
16
|
variant: "ghost",
|
|
16
|
-
"aria-label": c ?
|
|
17
|
+
"aria-label": c ? u.collapseRow(o.index + 1) : u.expandRow(o.index + 1),
|
|
17
18
|
icon: c ? t : n,
|
|
18
19
|
onClick: (e) => {
|
|
19
20
|
e.stopPropagation(), d();
|
|
@@ -26,4 +27,4 @@ var s = a(({ row: a, localeString: s, rowIsExpanded: c, hidden: l }) => {
|
|
|
26
27
|
});
|
|
27
28
|
});
|
|
28
29
|
//#endregion
|
|
29
|
-
export {
|
|
30
|
+
export { c as TableRowExpandToggleButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-row.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-row.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAKvD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE,KAAK,aAAa,CAAC,KAAK,SAAS,SAAS,IAAI;IAC7C,GAAG,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9B,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC;IACnD,UAAU,CAAC,EAAE,CACZ,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,EACxB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,KACnF,IAAI,CAAC;IACV,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,KAAK,SAAS,SAAS,EAAE,6EAM7C,aAAa,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"table-row.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-row.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAKvD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE,KAAK,aAAa,CAAC,KAAK,SAAS,SAAS,IAAI;IAC7C,GAAG,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9B,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC;IACnD,UAAU,CAAC,EAAE,CACZ,GAAG,EAAE,YAAY,CAAC,KAAK,CAAC,EACxB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,KACnF,IAAI,CAAC;IACV,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,KAAK,SAAS,SAAS,EAAE,6EAM7C,aAAa,CAAC,KAAK,CAAC,gCAgGtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAA0B,OAAO,aAAa,CAAC"}
|
|
@@ -6,8 +6,8 @@ import { SortableKeyboardPlugin as r } from "../../node_modules/@dnd-kit/dom/sor
|
|
|
6
6
|
import { useSortable as i } from "../../node_modules/@dnd-kit/react/sortable.js";
|
|
7
7
|
import { TableCell as a } from "./table-cell.js";
|
|
8
8
|
import { memo as o, useCallback as s, useMemo as c } from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
import { Table as d } from "@chakra-ui/react";
|
|
11
11
|
var f = o(({ row: o, visibleCells: f, onClickRow: p, showRowHoverStyle: m, onRowClickIndication: h }) => {
|
|
12
12
|
let g = t(), _ = o.depth === 0, v = g.rowReorderMode === "enabled" && _, { ref: y, handleRef: b, isDragging: x, isDropTarget: S } = i({
|
|
13
13
|
id: o.id,
|
|
@@ -32,7 +32,7 @@ var f = o(({ row: o, visibleCells: f, onClickRow: p, showRowHoverStyle: m, onRow
|
|
|
32
32
|
g.rowHighlight,
|
|
33
33
|
g.selectedRowIds
|
|
34
34
|
]), E = g.getRowActions?.(o.original), D = (e) => g.disableSelectionCheckbox?.(e) ?? !1;
|
|
35
|
-
return /* @__PURE__ */ d
|
|
35
|
+
return /* @__PURE__ */ u(d.Row, {
|
|
36
36
|
ref: v ? y : void 0,
|
|
37
37
|
id: o.id,
|
|
38
38
|
tabIndex: p ? 0 : void 0,
|
|
@@ -46,19 +46,18 @@ var f = o(({ row: o, visibleCells: f, onClickRow: p, showRowHoverStyle: m, onRow
|
|
|
46
46
|
"data-drop-target": S || void 0,
|
|
47
47
|
children: [f.map((e, t) => {
|
|
48
48
|
let n = t === 0;
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ l(a, {
|
|
50
50
|
cell: e,
|
|
51
51
|
visibleCells: f,
|
|
52
52
|
row: o,
|
|
53
53
|
rowIsExpanded: o.getIsExpanded(),
|
|
54
54
|
breakingContentState: g.breakingContentState,
|
|
55
|
-
localeString: g.localeString,
|
|
56
55
|
actionMenu: n ? E : void 0,
|
|
57
56
|
canSelectRows: g.canSelectRows && n,
|
|
58
57
|
isCheckboxDisabled: D(o),
|
|
59
58
|
dragHandleRef: n && v ? b : void 0
|
|
60
59
|
}, e.id);
|
|
61
|
-
}), g.enableColumnResizing && /* @__PURE__ */
|
|
60
|
+
}), g.enableColumnResizing && /* @__PURE__ */ l(d.Cell, {
|
|
62
61
|
"aria-hidden": !0,
|
|
63
62
|
style: { borderBottom: 0 }
|
|
64
63
|
})]
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const TableSortedReorderPrompt: ({ isOpen, localeString, onCancel, onConfirm, }: {
|
|
1
|
+
export declare const TableSortedReorderPrompt: ({ isOpen, onCancel, onConfirm, }: {
|
|
3
2
|
isOpen: boolean;
|
|
4
|
-
localeString: Locales;
|
|
5
3
|
onCancel: () => void;
|
|
6
4
|
onConfirm: () => void;
|
|
7
5
|
}) => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-sorted-reorder-prompt.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-sorted-reorder-prompt.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-sorted-reorder-prompt.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-sorted-reorder-prompt.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,wBAAwB,GAAI,kCAItC;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACtB,gCA8BA,CAAC"}
|
|
@@ -3,62 +3,63 @@ import { ThemeColorVariable as t, ThemeFontSizeVariable as n, ThemeFontVariable
|
|
|
3
3
|
import { Text as a } from "../text/text.js";
|
|
4
4
|
import { Button as o } from "../button/button.js";
|
|
5
5
|
import { Flex as s } from "../flex/flex.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { useComponentTranslations as c } from "../../theme/translations.js";
|
|
7
|
+
import { Modal as l } from "../modal/modal.js";
|
|
8
|
+
import { ModalBody as u } from "../modal/modal-body.js";
|
|
9
|
+
import { ModalFooter as d } from "../modal/modal-footer.js";
|
|
10
|
+
import { ModalHeader as f } from "../modal/modal-header.js";
|
|
11
|
+
import { tableTranslations as p } from "./table.translations.js";
|
|
12
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
13
|
//#region lib/components/table/table-sorted-reorder-prompt.tsx
|
|
13
|
-
var
|
|
14
|
-
let
|
|
15
|
-
|
|
14
|
+
var g = e(), _ = (e) => {
|
|
15
|
+
let _ = (0, g.c)(19), { isOpen: v, onCancel: y, onConfirm: b } = e, x = c(p), S;
|
|
16
|
+
_[0] === x.reorderSortedTitle ? S = _[1] : (S = /* @__PURE__ */ m(f, {
|
|
16
17
|
p: i.Medium,
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ m(a, {
|
|
18
19
|
color: t.OnSurfaceHeader,
|
|
19
20
|
fontFamily: r.SubHeader,
|
|
20
21
|
fontWeight: "medium",
|
|
21
22
|
fontSize: n.XLarge,
|
|
22
23
|
children: x.reorderSortedTitle
|
|
23
24
|
})
|
|
24
|
-
}),
|
|
25
|
+
}), _[0] = x.reorderSortedTitle, _[1] = S);
|
|
25
26
|
let C;
|
|
26
|
-
|
|
27
|
+
_[2] === x.reorderSortedBody ? C = _[3] : (C = /* @__PURE__ */ m(u, {
|
|
27
28
|
px: i.Medium,
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
}),
|
|
29
|
+
children: /* @__PURE__ */ m(a, { children: x.reorderSortedBody })
|
|
30
|
+
}), _[2] = x.reorderSortedBody, _[3] = C);
|
|
30
31
|
let w;
|
|
31
|
-
|
|
32
|
+
_[4] !== y || _[5] !== x.cancel ? (w = /* @__PURE__ */ m(o, {
|
|
32
33
|
variant: "secondary",
|
|
33
34
|
onClick: y,
|
|
34
35
|
children: x.cancel
|
|
35
|
-
}),
|
|
36
|
+
}), _[4] = y, _[5] = x.cancel, _[6] = w) : w = _[6];
|
|
36
37
|
let T;
|
|
37
|
-
|
|
38
|
+
_[7] !== b || _[8] !== x.reorderSortedConfirm ? (T = /* @__PURE__ */ m(o, {
|
|
38
39
|
variant: "primary",
|
|
39
40
|
onClick: b,
|
|
40
41
|
children: x.reorderSortedConfirm
|
|
41
|
-
}),
|
|
42
|
+
}), _[7] = b, _[8] = x.reorderSortedConfirm, _[9] = T) : T = _[9];
|
|
42
43
|
let E;
|
|
43
|
-
|
|
44
|
+
_[10] !== w || _[11] !== T ? (E = /* @__PURE__ */ m(d, {
|
|
44
45
|
p: i.Medium,
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ h(s, {
|
|
46
47
|
gap: i.Small,
|
|
47
48
|
justify: "flex-end",
|
|
48
49
|
w: "100%",
|
|
49
50
|
children: [w, T]
|
|
50
51
|
})
|
|
51
|
-
}),
|
|
52
|
+
}), _[10] = w, _[11] = T, _[12] = E) : E = _[12];
|
|
52
53
|
let D;
|
|
53
|
-
return
|
|
54
|
-
isOpen:
|
|
54
|
+
return _[13] !== v || _[14] !== y || _[15] !== S || _[16] !== C || _[17] !== E ? (D = /* @__PURE__ */ h(l, {
|
|
55
|
+
isOpen: v,
|
|
55
56
|
onClose: y,
|
|
56
57
|
children: [
|
|
57
58
|
S,
|
|
58
59
|
C,
|
|
59
60
|
E
|
|
60
61
|
]
|
|
61
|
-
}),
|
|
62
|
+
}), _[13] = v, _[14] = y, _[15] = S, _[16] = C, _[17] = E, _[18] = D) : D = _[18], D;
|
|
62
63
|
};
|
|
63
64
|
//#endregion
|
|
64
|
-
export {
|
|
65
|
+
export { _ as TableSortedReorderPrompt };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-toolbar-actions.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-actions.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAwB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrE,MAAM,MAAM,wBAAwB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,CAAC;CACzE,CAAC;AAEF,QAAA,MAAM,wBAAwB,GAAI,cAAc,wBAAwB,
|
|
1
|
+
{"version":3,"file":"table-toolbar-actions.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-actions.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAwB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrE,MAAM,MAAM,wBAAwB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,CAAC;CACzE,CAAC;AAEF,QAAA,MAAM,wBAAwB,GAAI,cAAc,wBAAwB,gCAcvE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAqC,OAAO,wBAAwB,CAAC"}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { MoreVerticalIcon as e } from "../icon/icons/more-vertical-icon.js";
|
|
3
3
|
import { Menu as t } from "../menu/menu.js";
|
|
4
4
|
import { MenuIconButton as n } from "../menu/menu-icon-button.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useComponentTranslations as r } from "../../theme/translations.js";
|
|
6
|
+
import { tableTranslations as i } from "./table.translations.js";
|
|
7
7
|
import { memo as a } from "react";
|
|
8
8
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
9
|
var c = a(({ children: a }) => {
|
|
10
|
-
let c = r()
|
|
10
|
+
let c = r(i);
|
|
11
11
|
return /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(n, {
|
|
12
12
|
icon: e,
|
|
13
13
|
variant: "ghost",
|
|
14
14
|
size: "md",
|
|
15
|
-
"aria-label":
|
|
15
|
+
"aria-label": c.toolbarActions
|
|
16
16
|
}), a] });
|
|
17
17
|
});
|
|
18
18
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-toolbar-add-button.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-add-button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAK5E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,YAAY,CAAC,GAAG;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,OAAO,0BAA0B,
|
|
1
|
+
{"version":3,"file":"table-toolbar-add-button.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-add-button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAK5E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,YAAY,CAAC,GAAG;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,OAAO,0BAA0B,gCAKpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAuC,OAAO,0BAA0B,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use no memo";
|
|
2
2
|
import { IncreaseIcon as e } from "../icon/icons/increase-icon.js";
|
|
3
3
|
import { IconButton as t } from "../icon-button/icon-button.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useComponentTranslations as n } from "../../theme/translations.js";
|
|
5
|
+
import { tableTranslations as r } from "./table.translations.js";
|
|
6
6
|
import { memo as i } from "react";
|
|
7
7
|
import { jsx as a } from "react/jsx-runtime";
|
|
8
8
|
var o = i((i) => {
|
|
9
|
-
let o = n(), s =
|
|
9
|
+
let o = n(r), s = i["aria-label"] ?? o.new;
|
|
10
10
|
return /* @__PURE__ */ a(t, {
|
|
11
|
-
"aria-label":
|
|
11
|
+
"aria-label": s,
|
|
12
12
|
icon: e,
|
|
13
13
|
variant: "secondary",
|
|
14
14
|
...i
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-toolbar-settings.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-settings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-toolbar-settings.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-settings.tsx"],"names":[],"mappings":"AAgCA,KAAK,yBAAyB,GAAG;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD,CAAC;AA8OF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,uEAzNkC,yBAAyB,iCAyNzB,CAAC"}
|
|
@@ -1,180 +1,182 @@
|
|
|
1
1
|
"use no memo";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
2
|
+
import { useLocale as e } from "../../theme/theme-locale.js";
|
|
3
|
+
import { ThemeColorVariable as t, ThemeIconSizeVariable as n, ThemeShadowVariable as r, ThemeSpaceVariable as i } from "../../theme/theme-types.js";
|
|
4
|
+
import { GripMoreIcon as a } from "../icon/icons/grip-more-icon.js";
|
|
5
|
+
import { SlidersIcon as o } from "../icon/icons/sliders-icon.js";
|
|
6
|
+
import { Text as s } from "../text/text.js";
|
|
7
|
+
import { Menu as c } from "../menu/menu.js";
|
|
8
|
+
import { MenuButton as l } from "../menu/menu-button.js";
|
|
9
|
+
import { MenuDivider as u } from "../menu/menu-divider.js";
|
|
10
|
+
import { MenuItem as d } from "../menu/menu-item.js";
|
|
11
|
+
import { MenuList as f } from "../menu/menu-list.js";
|
|
12
|
+
import { Checkbox as p } from "../checkbox/checkbox.js";
|
|
13
|
+
import { useComponentTranslations as m } from "../../theme/translations.js";
|
|
14
|
+
import { Radio as h } from "../radio/radio.js";
|
|
15
|
+
import { RadioGroup as g } from "../radio/radio-group.js";
|
|
16
|
+
import { Switch as _ } from "../switch/switch.js";
|
|
17
|
+
import { DEFAULT_PAGE_SIZE_OPTIONS as v } from "./table.constants.js";
|
|
18
|
+
import { getColumnLabel as y } from "./helper.js";
|
|
19
|
+
import { useTableContext as b } from "./table-context.js";
|
|
20
|
+
import { tableTranslations as x } from "./table.translations.js";
|
|
21
|
+
import { closestCenter as S } from "../../node_modules/@dnd-kit/collision/dist/index.js";
|
|
22
|
+
import { DragDropProvider as C } from "../../node_modules/@dnd-kit/react/index.js";
|
|
23
|
+
import { SortableKeyboardPlugin as w, isSortableOperation as T } from "../../node_modules/@dnd-kit/dom/sortable.js";
|
|
24
|
+
import { useSortable as E } from "../../node_modules/@dnd-kit/react/sortable.js";
|
|
25
|
+
import { memo as D, useCallback as O, useState as k } from "react";
|
|
26
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
27
|
+
import { Box as N, Flex as P, Portal as F } from "@chakra-ui/react";
|
|
28
|
+
import { flushSync as I } from "react-dom";
|
|
27
29
|
//#region lib/components/table/table-toolbar-settings.tsx
|
|
28
|
-
var
|
|
30
|
+
var L = (e, t, n, r) => {
|
|
29
31
|
if (!r || r.sourceId === e) return "none";
|
|
30
32
|
let i = n.findIndex((e) => e.id === r.sourceId), a = n.findIndex((e) => e.id === r.targetId);
|
|
31
33
|
return i < 0 || a < 0 || i === a ? "none" : i < a && t > i && t <= a ? "translateY(-100%)" : i > a && t >= a && t < i ? "translateY(100%)" : "none";
|
|
32
|
-
},
|
|
33
|
-
if (!
|
|
34
|
+
}, R = (e) => {
|
|
35
|
+
if (!T(e)) return null;
|
|
34
36
|
let { source: t, target: n } = e;
|
|
35
37
|
return t && n ? {
|
|
36
38
|
source: t,
|
|
37
39
|
target: n
|
|
38
40
|
} : null;
|
|
39
|
-
},
|
|
40
|
-
let b =
|
|
41
|
-
let n =
|
|
42
|
-
return n.localeCompare(r,
|
|
43
|
-
}),
|
|
41
|
+
}, z = ({ pageSize: r, onPageSizeChange: a }) => {
|
|
42
|
+
let S = b(), w = e(), T = m(x), E = !!a && Number.isInteger(r), [D, z] = k(null), B = S.table.getAllLeafColumns().filter((e) => e.getCanHide()), H = B.filter((e) => e.getIsVisible()), U = B.filter((e) => !e.getIsVisible()).sort((e, t) => {
|
|
43
|
+
let n = y(e.columnDef.header, e.id), r = y(t.columnDef.header, t.id);
|
|
44
|
+
return n.localeCompare(r, w, { sensitivity: "base" });
|
|
45
|
+
}), W = O(() => S.table.getAllColumns().length === Object.keys(S.breakingContentState).length && !Object.values(S.breakingContentState).includes(!1), [S.breakingContentState, S.table]), G = O(({ checked: e }) => {
|
|
44
46
|
let t = {};
|
|
45
|
-
|
|
47
|
+
S.table.getAllColumns().forEach((n) => {
|
|
46
48
|
t[n.id] = e;
|
|
47
|
-
}),
|
|
48
|
-
}, [
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
}), S.setBreakingContentState(t), S.onBreakingContentChange?.(t);
|
|
50
|
+
}, [S]);
|
|
51
|
+
return /* @__PURE__ */ j(P, { children: /* @__PURE__ */ M(c, {
|
|
50
52
|
closeOnSelect: !1,
|
|
51
53
|
isLazy: !0,
|
|
52
|
-
children: [/* @__PURE__ */
|
|
53
|
-
"aria-label":
|
|
54
|
+
children: [/* @__PURE__ */ j(l, {
|
|
55
|
+
"aria-label": T.presets,
|
|
54
56
|
variant: "ghost",
|
|
55
57
|
p: "unset",
|
|
56
58
|
w: "40px",
|
|
57
59
|
h: "40px",
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
color:
|
|
62
|
-
py:
|
|
63
|
-
px:
|
|
64
|
-
children:
|
|
60
|
+
children: /* @__PURE__ */ j(o, { size: n.Medium })
|
|
61
|
+
}), /* @__PURE__ */ j(F, { children: /* @__PURE__ */ M(f, { children: [
|
|
62
|
+
/* @__PURE__ */ j(s, {
|
|
63
|
+
color: t.OnSurfaceSubdued,
|
|
64
|
+
py: i.Small,
|
|
65
|
+
px: i.Medium,
|
|
66
|
+
children: T.shownInTable
|
|
65
67
|
}),
|
|
66
|
-
/* @__PURE__ */ N
|
|
68
|
+
/* @__PURE__ */ M(N, {
|
|
67
69
|
maxHeight: "400px",
|
|
68
70
|
overflowY: "auto",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ j(C, {
|
|
70
72
|
onDragOver: (e) => {
|
|
71
|
-
let t =
|
|
72
|
-
t &&
|
|
73
|
+
let t = R(e.operation);
|
|
74
|
+
t && z({
|
|
73
75
|
sourceId: String(t.source.id),
|
|
74
76
|
targetId: String(t.target.id)
|
|
75
77
|
});
|
|
76
78
|
},
|
|
77
79
|
onDragEnd: (e) => {
|
|
78
|
-
let t =
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
let t = R(e.operation);
|
|
81
|
+
I(() => {
|
|
82
|
+
z(null), t && S.handleDragEnd(String(t.source.id), String(t.target.id));
|
|
81
83
|
});
|
|
82
84
|
},
|
|
83
|
-
children:
|
|
85
|
+
children: H.map((e, t) => /* @__PURE__ */ j(V, {
|
|
84
86
|
column: e,
|
|
85
87
|
index: t,
|
|
86
|
-
isDisabled:
|
|
87
|
-
translateY:
|
|
88
|
+
isDisabled: H.length === 1,
|
|
89
|
+
translateY: L(e.id, t, H, D)
|
|
88
90
|
}, e.id))
|
|
89
|
-
}),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
color:
|
|
93
|
-
py:
|
|
94
|
-
px:
|
|
95
|
-
children:
|
|
91
|
+
}), U.length > 0 && /* @__PURE__ */ M(A, { children: [
|
|
92
|
+
/* @__PURE__ */ j(u, {}),
|
|
93
|
+
/* @__PURE__ */ j(s, {
|
|
94
|
+
color: t.OnSurfaceSubdued,
|
|
95
|
+
py: i.Small,
|
|
96
|
+
px: i.Medium,
|
|
97
|
+
children: T.hiddenInTable
|
|
96
98
|
}),
|
|
97
|
-
|
|
99
|
+
U.map((e) => /* @__PURE__ */ M(d, {
|
|
98
100
|
itemType: "checkbox",
|
|
99
101
|
value: e.id,
|
|
100
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ j(A, { children: e.columnDef.header }), /* @__PURE__ */ j(p, {
|
|
101
103
|
isChecked: e.getIsVisible(),
|
|
102
104
|
onCheckedChange: ({ checked: t }) => {
|
|
103
105
|
if (e.toggleVisibility(!!t), t) {
|
|
104
|
-
let t =
|
|
105
|
-
t.push(e.id),
|
|
106
|
+
let t = S.columnOrder.filter((t) => t !== e.id);
|
|
107
|
+
t.push(e.id), S.setColumnOrder(t);
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
})]
|
|
109
111
|
}, e.id))
|
|
110
112
|
] })]
|
|
111
113
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
color:
|
|
116
|
-
py:
|
|
117
|
-
px:
|
|
118
|
-
children:
|
|
114
|
+
/* @__PURE__ */ j(u, {}),
|
|
115
|
+
E && /* @__PURE__ */ M(A, { children: [
|
|
116
|
+
/* @__PURE__ */ j(s, {
|
|
117
|
+
color: t.OnSurfaceSubdued,
|
|
118
|
+
py: i.Small,
|
|
119
|
+
px: i.Medium,
|
|
120
|
+
children: T.rowsPerPage
|
|
119
121
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ j(g, {
|
|
121
123
|
gap: "unset",
|
|
122
|
-
value: String(
|
|
123
|
-
onValueChange: (e) =>
|
|
124
|
-
children:
|
|
124
|
+
value: String(r),
|
|
125
|
+
onValueChange: (e) => a?.(Number(e.value)),
|
|
126
|
+
children: v.map((e) => /* @__PURE__ */ M(d, {
|
|
125
127
|
itemType: "radio",
|
|
126
128
|
value: String(e),
|
|
127
|
-
children: [
|
|
129
|
+
children: [T.numberOfRows(e), /* @__PURE__ */ j(h, { value: String(e) })]
|
|
128
130
|
}, e))
|
|
129
131
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ j(u, {})
|
|
131
133
|
] }),
|
|
132
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ M(d, {
|
|
133
135
|
itemType: "switch",
|
|
134
136
|
value: "breakingContent",
|
|
135
|
-
children: [
|
|
136
|
-
onCheckedChange:
|
|
137
|
-
isChecked:
|
|
137
|
+
children: [T.breakingContent, /* @__PURE__ */ j(_, {
|
|
138
|
+
onCheckedChange: G,
|
|
139
|
+
isChecked: W()
|
|
138
140
|
})]
|
|
139
141
|
})
|
|
140
142
|
] }) })]
|
|
141
143
|
}) });
|
|
142
|
-
},
|
|
143
|
-
let { ref: l, handleRef:
|
|
144
|
-
id:
|
|
144
|
+
}, B = [w], V = ({ column: e, index: o, isDisabled: s, translateY: c }) => {
|
|
145
|
+
let { ref: l, handleRef: u, isDragging: f } = E({
|
|
146
|
+
id: e.id,
|
|
145
147
|
index: o,
|
|
146
|
-
collisionDetector:
|
|
147
|
-
plugins:
|
|
148
|
+
collisionDetector: S,
|
|
149
|
+
plugins: B
|
|
148
150
|
});
|
|
149
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ j(N, {
|
|
150
152
|
ref: l,
|
|
151
153
|
role: "none",
|
|
152
|
-
opacity:
|
|
153
|
-
backgroundColor:
|
|
154
|
+
opacity: f ? .95 : 1,
|
|
155
|
+
backgroundColor: t.Background,
|
|
154
156
|
transform: c,
|
|
155
|
-
transition:
|
|
156
|
-
boxShadow:
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
transition: f ? void 0 : "transform 200ms ease",
|
|
158
|
+
boxShadow: f ? r.Medium : void 0,
|
|
159
|
+
children: /* @__PURE__ */ M(d, {
|
|
158
160
|
itemType: "checkbox",
|
|
159
|
-
value:
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
value: e.id,
|
|
162
|
+
children: [/* @__PURE__ */ M(P, {
|
|
161
163
|
alignItems: "center",
|
|
162
|
-
gap:
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
-
ref:
|
|
165
|
-
cursor:
|
|
164
|
+
gap: i.XSmall,
|
|
165
|
+
children: [/* @__PURE__ */ j(N, {
|
|
166
|
+
ref: u,
|
|
167
|
+
cursor: f ? "grabbing" : "grab",
|
|
166
168
|
display: "inline-flex",
|
|
167
169
|
alignItems: "center",
|
|
168
170
|
flexShrink: 0,
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
-
}), !
|
|
171
|
+
children: /* @__PURE__ */ j(a, { size: n.Medium })
|
|
172
|
+
}), /* @__PURE__ */ j(A, { children: e.columnDef.header })]
|
|
173
|
+
}), !f && /* @__PURE__ */ j(p, {
|
|
172
174
|
isDisabled: s,
|
|
173
|
-
isChecked:
|
|
174
|
-
onCheckedChange: ({ checked:
|
|
175
|
+
isChecked: e.getIsVisible(),
|
|
176
|
+
onCheckedChange: ({ checked: t }) => e.toggleVisibility(!!t)
|
|
175
177
|
})]
|
|
176
178
|
})
|
|
177
179
|
});
|
|
178
|
-
},
|
|
180
|
+
}, H = D(z);
|
|
179
181
|
//#endregion
|
|
180
|
-
export {
|
|
182
|
+
export { H as TableToolbarSettings };
|