@caspeco/casper-ui-library 9.0.2 → 9.2.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 +10 -4
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/icon/icons/calendar-icon.d.ts +2 -0
- package/dist/components/icon/icons/calendar-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar-icon.js +8 -0
- package/dist/components/icon/icons/cart-icon.js +1 -1
- package/dist/components/icon/icons/closed-icon.d.ts +2 -0
- package/dist/components/icon/icons/closed-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/closed-icon.js +8 -0
- package/dist/components/icon/icons/comment-add-icon.d.ts +2 -0
- package/dist/components/icon/icons/comment-add-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/comment-add-icon.js +8 -0
- package/dist/components/icon/icons/comment-icon.js +1 -1
- package/dist/components/icon/icons/deliverect-icon.d.ts +2 -0
- package/dist/components/icon/icons/deliverect-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/deliverect-icon.js +8 -0
- package/dist/components/icon/icons/door-closed-icon.d.ts +2 -0
- package/dist/components/icon/icons/door-closed-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/door-closed-icon.js +8 -0
- package/dist/components/icon/icons/door-open-icon.d.ts +2 -0
- package/dist/components/icon/icons/door-open-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/door-open-icon.js +8 -0
- package/dist/components/icon/icons/failed-print-icon.d.ts +2 -0
- package/dist/components/icon/icons/failed-print-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/failed-print-icon.js +8 -0
- package/dist/components/icon/icons/index.d.ts +27 -4
- package/dist/components/icon/icons/index.d.ts.map +1 -1
- package/dist/components/icon/icons/key-command-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-command-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-command-icon.js +8 -0
- package/dist/components/icon/icons/key-enter-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-enter-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-enter-icon.js +8 -0
- package/dist/components/icon/icons/key-option-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-option-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-option-icon.js +8 -0
- package/dist/components/icon/icons/message-add-icon.d.ts +2 -0
- package/dist/components/icon/icons/message-add-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/message-add-icon.js +8 -0
- package/dist/components/icon/icons/message-icon.js +1 -1
- package/dist/components/icon/icons/message-lines-icon.d.ts +2 -0
- package/dist/components/icon/icons/message-lines-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/message-lines-icon.js +8 -0
- package/dist/components/icon/icons/module-home-icon.js +1 -1
- package/dist/components/icon/icons/no-cart-icon.d.ts +2 -0
- package/dist/components/icon/icons/no-cart-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/no-cart-icon.js +8 -0
- package/dist/components/icon/icons/note-icon.d.ts +2 -0
- package/dist/components/icon/icons/note-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/note-icon.js +8 -0
- package/dist/components/icon/icons/product-my-pages-icon.d.ts +2 -0
- package/dist/components/icon/icons/product-my-pages-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/product-my-pages-icon.js +8 -0
- package/dist/components/icon/icons/puck-icon.d.ts +2 -0
- package/dist/components/icon/icons/puck-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/puck-icon.js +8 -0
- package/dist/components/icon/icons/redo-icon.d.ts +2 -0
- package/dist/components/icon/icons/redo-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/redo-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-hide-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-hide-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-hide-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-left-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-left-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-left-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-right-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-right-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-right-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-show-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-show-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-show-icon.js +8 -0
- package/dist/components/icon/icons/swatch-icon.d.ts +2 -0
- package/dist/components/icon/icons/swatch-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/swatch-icon.js +8 -0
- package/dist/components/icon/icons/trivec-icon.d.ts +2 -0
- package/dist/components/icon/icons/trivec-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/trivec-icon.js +9 -0
- package/dist/components/icon/icons/waste-icon.d.ts +2 -0
- package/dist/components/icon/icons/waste-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/waste-icon.js +8 -0
- package/dist/components/table/table-toolbar-settings.d.ts +15 -1
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +71 -44
- package/dist/components/table/table-toolbar-settings.spec.d.ts +2 -0
- package/dist/components/table/table-toolbar-settings.spec.d.ts.map +1 -0
- package/dist/components/table/table.constants.d.ts +2 -0
- package/dist/components/table/table.constants.d.ts.map +1 -0
- package/dist/components/table/table.constants.js +4 -0
- package/dist/components/table/translations.d.ts +14 -0
- package/dist/components/table/translations.d.ts.map +1 -1
- package/dist/components/table/translations.js +12 -0
- package/dist/index.js +727 -681
- package/dist/node_modules/@dnd-kit/abstract/index.js +502 -442
- package/dist/node_modules/@dnd-kit/dom/index.js +817 -779
- package/dist/node_modules/@dnd-kit/dom/sortable.js +260 -262
- package/dist/node_modules/@dnd-kit/dom/utilities.js +470 -463
- package/dist/node_modules/@dnd-kit/react/hooks.js +26 -26
- package/dist/node_modules/@dnd-kit/react/index.js +8 -1
- package/dist/node_modules/@dnd-kit/react/sortable.js +45 -46
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +11 -11
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +85 -73
- package/package.json +20 -18
- package/dist/components/icon/icons/tablet-icon.d.ts +0 -2
- package/dist/components/icon/icons/tablet-icon.d.ts.map +0 -1
- package/dist/components/icon/icons/tablet-icon.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as C } from "../create-icon.js";
|
|
2
|
+
const o = C(
|
|
3
|
+
"PuckIcon",
|
|
4
|
+
"M3.5 7.75C3.5 7.90625 3.5625 8.125 3.84375 8.375C4.125 8.65625 4.5625 8.9375 5.15625 9.1875C6.375 9.6875 8.0625 10 10 10C11.9375 10 13.625 9.6875 14.8438 9.1875C15.4375 8.9375 15.875 8.65625 16.1562 8.375C16.4375 8.125 16.5 7.90625 16.5 7.75C16.5 7.59375 16.4375 7.375 16.1562 7.125C15.875 6.84375 15.4375 6.5625 14.8438 6.3125C13.6562 5.8125 11.9375 5.5 10 5.5C8.0625 5.5 6.375 5.8125 5.15625 6.3125C4.5625 6.5625 4.125 6.84375 3.84375 7.125C3.5625 7.375 3.5 7.59375 3.5 7.75ZM2 7.75C2 7.0625 2.34375 6.5 2.78125 6.0625C3.25 5.59375 3.875 5.21875 4.59375 4.9375C6 4.34375 7.9375 4 10 4C12.0625 4 14 4.34375 15.4062 4.9375C16.125 5.21875 16.75 5.59375 17.2188 6.03125C17.6562 6.5 18 7.0625 18 7.75V12.25C18 12.9375 17.6562 13.5 17.2188 13.9375C16.75 14.4062 16.125 14.7812 15.4062 15.0625C14 15.6562 12.0625 16 10 16C7.9375 16 6 15.6562 4.59375 15.0625C3.875 14.7812 3.25 14.4062 2.78125 13.9688C2.34375 13.5 2 12.9375 2 12.25V7.75ZM16.5 10C16.1875 10.2188 15.8125 10.4062 15.4062 10.5625C14 11.1562 12.0625 11.5 10 11.5C7.9375 11.5 6 11.1562 4.59375 10.5625C4.1875 10.4062 3.84375 10.2188 3.5 10V12.25C3.5 12.4062 3.5625 12.625 3.84375 12.875C4.125 13.1562 4.5625 13.4375 5.15625 13.6875C6.375 14.1875 8.0625 14.5 10 14.5C11.9375 14.5 13.625 14.1875 14.8438 13.6875C15.4375 13.4375 15.875 13.1562 16.1562 12.875C16.4375 12.625 16.5 12.4062 16.5 12.25V10Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
o as PuckIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redo-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/redo-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,iCAGpB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as C } from "../create-icon.js";
|
|
2
|
+
const e = C(
|
|
3
|
+
"RedoIcon",
|
|
4
|
+
"M11.75 9.49997C12.1562 9.49997 12.5 9.84372 12.5 10.25V11.9062L16.25 8.49997L12.5 5.12497V6.74997C12.5 7.18747 12.1562 7.49997 11.75 7.49997H7.5C5.28125 7.49997 3.5 9.31246 3.5 11.5C3.5 12 3.53125 12.4375 3.65625 12.8125C4.1875 10.9062 5.90625 9.49997 8 9.49997H11.75ZM11 11V11.0312H8C6.34375 11.0312 5 12.375 5 14.0312C5 14.5625 5.125 14.9687 5.28125 15.2812C5.34375 15.375 5.375 15.4375 5.4375 15.5312C5.53125 15.625 5.59375 15.7187 5.6875 15.7812C5.6875 15.8125 5.71875 15.8125 5.71875 15.8437C5.875 16 5.96875 16.1875 5.96875 16.4062C5.96875 16.75 5.71875 17 5.375 17C5.28125 17 5.1875 17 5.125 16.9687C5.03125 16.9062 4.90625 16.8437 4.78125 16.75C4.6875 16.6875 4.59375 16.625 4.5 16.5625C4.375 16.4687 4.25 16.375 4.125 16.2812C3.1875 15.4687 2 13.9375 2 11.5C2 8.46871 4.4375 5.99997 7.5 5.99997H11V3.99997C11 3.62497 11.2188 3.24997 11.5938 3.09372C11.9375 2.93747 12.375 2.99997 12.6562 3.28122L17.6562 7.78122C17.875 7.96872 18 8.21872 18 8.49997C18 8.81247 17.875 9.06247 17.6562 9.24997L12.6562 13.75C12.375 14.0312 11.9375 14.0937 11.5938 13.9375C11.2188 13.7812 11 13.4062 11 13V11Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
e as RedoIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-hide-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/sidebar-hide-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,iCAG3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as e } from "../create-icon.js";
|
|
2
|
+
const r = e(
|
|
3
|
+
"SidebarHideIcon",
|
|
4
|
+
"M5 6C5 4.90625 5.90625 4 7 4H17C18.0938 4 19 4.90625 19 6V14C19 15.0938 18.0938 16 17 16H7C5.90625 16 5 15.0938 5 14V6ZM10 14.5H17C17.2812 14.5 17.5 14.2812 17.5 14V6C17.5 5.71875 17.2812 5.5 17 5.5H10V14.5Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
r as SidebarHideIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-left-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/sidebar-left-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,iCAG3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as e } from "../create-icon.js";
|
|
2
|
+
const r = e(
|
|
3
|
+
"SidebarLeftIcon",
|
|
4
|
+
"M2 6C2 4.90625 2.90625 4 4 4H16C17.0938 4 18 4.90625 18 6V14C18 15.0938 17.0938 16 16 16H4C2.90625 16 2 15.0938 2 14V6ZM7 14.5H16C16.2812 14.5 16.5 14.2812 16.5 14V6C16.5 5.71875 16.2812 5.5 16 5.5H7V14.5Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
r as SidebarLeftIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-right-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/sidebar-right-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,iCAG5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as o } from "../create-icon.js";
|
|
2
|
+
const C = o(
|
|
3
|
+
"SidebarRightIcon",
|
|
4
|
+
"M18 6C18 4.90625 17.0938 4 16 4H4C2.90625 4 2 4.90625 2 6V14C2 15.0938 2.90625 16 4 16H16C17.0938 16 18 15.0938 18 14V6ZM13 14.5H4C3.71875 14.5 3.5 14.2812 3.5 14V6C3.5 5.71875 3.71875 5.5 4 5.5H13V14.5Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
C as SidebarRightIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-show-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/sidebar-show-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,iCAG3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as o } from "../create-icon.js";
|
|
2
|
+
const C = o(
|
|
3
|
+
"SidebarShowIcon",
|
|
4
|
+
"M5 6C5 4.90625 5.90625 4 7 4H17C18.0938 4 19 4.90625 19 6V14C19 15.0938 18.0938 16 17 16H7C5.90625 16 5 15.0938 5 14V6ZM10 14.5H17C17.2812 14.5 17.5 14.2812 17.5 14V6C17.5 5.71875 17.2812 5.5 17 5.5H10V14.5Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
C as SidebarShowIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swatch-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/swatch-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iCAGtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trivec-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/trivec-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iCAItB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createCasperIcon as e } from "../create-icon.js";
|
|
2
|
+
const c = e(
|
|
3
|
+
"TrivecIcon",
|
|
4
|
+
"M8.85261 9.8913C9.3112 10.1563 9.59572 10.6493 9.59572 11.1792V14.698L7.7918 13.656V11.4707L7.86549 11.3406L5.80742 10.174V8.13198L8.85261 9.8913Z",
|
|
5
|
+
{ fillRule: "evenodd", clipRule: "evenodd" }
|
|
6
|
+
);
|
|
7
|
+
export {
|
|
8
|
+
c as TrivecIcon
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waste-icon.d.ts","sourceRoot":"","sources":["../../../../lib/components/icon/icons/waste-icon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,iCAGrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createCasperIcon as C } from "../create-icon.js";
|
|
2
|
+
const V = C(
|
|
3
|
+
"WasteIcon",
|
|
4
|
+
"M0.177122 2.3125C0.427122 1.96875 0.895872 1.90625 1.20837 2.1875L3.61462 4.03125L3.77087 2.6875C3.80212 2.28125 4.17712 1.96875 4.58337 2.03125C4.98962 2.0625 5.30212 2.4375 5.23962 2.84375L4.98962 5.125L6.27087 6.125V2.75C6.27087 2.34375 6.58337 2 7.02087 2C7.42712 2 7.77087 2.34375 7.77087 2.75V7.25C7.77087 7.28125 7.77087 7.28125 7.77087 7.3125L9.11462 8.34375C9.20837 8.1875 9.27087 7.96875 9.27087 7.75V7.3125L8.77087 2.84375C8.70837 2.4375 9.02087 2.0625 9.42712 2.03125C9.83337 1.96875 10.2084 2.28125 10.2396 2.6875L10.7396 7.1875V7.75C10.7396 8.3125 10.5834 8.84375 10.3021 9.28125L12.0209 10.625V7.5C12.0209 3 15.5209 2 16.0209 2C16.5521 2 17.0209 2.46875 17.0209 3V14.5625L19.7084 16.6875C20.0521 16.9375 20.1146 17.4062 19.8334 17.7188C19.5834 18.0625 19.1146 18.125 18.8021 17.8438L0.302122 3.34375C-0.0416276 3.09375 -0.104128 2.625 0.177122 2.3125ZM3.27087 7.75V7.5625L7.77087 11.125V17.25C7.77087 17.6875 7.42712 18 7.02087 18C6.58337 18 6.27087 17.6875 6.27087 17.25V10.5H6.02087C4.48962 10.5 3.27087 9.28125 3.27087 7.75ZM13.5209 7.5V11C13.5209 11.2812 13.7396 11.5 14.0209 11.5H15.5209V3.75C15.2709 3.84375 15.0521 4 14.8021 4.21875C14.1771 4.75 13.5209 5.71875 13.5209 7.5Z"
|
|
5
|
+
);
|
|
6
|
+
export {
|
|
7
|
+
V as WasteIcon
|
|
8
|
+
};
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
type TableToolbarSettingsProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The current selected value in the Rows per page section.
|
|
4
|
+
* If provided, the rows-per-page selection becomes controlled and should be updated through `onPageSizeChange`.
|
|
5
|
+
* Note: This does not change the number of rendered rows automatically; handle that in your own table or pagination logic.
|
|
6
|
+
*/
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Called when a new option is selected in the Rows per page section.
|
|
10
|
+
* Receives the selected number of rows to display per page.
|
|
11
|
+
*/
|
|
12
|
+
onPageSizeChange?: (newPageSize: number) => void;
|
|
13
|
+
};
|
|
1
14
|
/**
|
|
2
15
|
* Settings menu for column visibility and breaking content. Use inside TableToolbar.
|
|
3
16
|
*
|
|
4
17
|
* @see Docs https://caspeco.github.io/casper-ui-library/components/table#column-visibility-and-how-to-store-it
|
|
5
18
|
*/
|
|
6
|
-
export declare const TableToolbarSettings: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
+
export declare const TableToolbarSettings: import('react').MemoExoticComponent<({ pageSize, onPageSizeChange }: TableToolbarSettingsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
20
|
+
export {};
|
|
7
21
|
//# sourceMappingURL=table-toolbar-settings.d.ts.map
|
|
@@ -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":"AAaA,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;AAiGF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,uEApGkC,yBAAyB,6CAoGzB,CAAC"}
|
|
@@ -1,59 +1,86 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Flex as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { useTableContext as
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx as t, jsxs as o, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as S, Portal as k, Box as T } from "@chakra-ui/react";
|
|
3
|
+
import { memo as x, useCallback as h } from "react";
|
|
4
|
+
import { useTableContext as I } from "./table-context.js";
|
|
5
|
+
import { DEFAULT_PAGE_SIZE_OPTIONS as v } from "./table.constants.js";
|
|
6
|
+
import { translations as B } from "./translations.js";
|
|
7
|
+
import { Menu as M } from "../menu/menu.js";
|
|
8
|
+
import { MenuButton as w } from "../menu/menu-button.js";
|
|
9
|
+
import { SlidersIcon as y } from "../icon/icons/sliders-icon.js";
|
|
10
|
+
import { MenuList as O } from "../menu/menu-list.js";
|
|
11
|
+
import { Text as d } from "../text/text.js";
|
|
12
|
+
import { MenuItem as i } from "../menu/menu-item.js";
|
|
13
|
+
import { GripMoreIcon as V } from "../icon/icons/grip-more-icon.js";
|
|
14
|
+
import { Checkbox as A } from "../checkbox/checkbox.js";
|
|
15
|
+
import { MenuDivider as b } from "../menu/menu-divider.js";
|
|
16
|
+
import { RadioGroup as F } from "../radio/radio-group.js";
|
|
17
|
+
import { Radio as G } from "../radio/radio.js";
|
|
18
|
+
import { Switch as P } from "../switch/switch.js";
|
|
19
|
+
import { ThemeIconSizeVariable as j, ThemeSpaceVariable as a, ThemeColorVariable as g } from "../../theme/theme-types.js";
|
|
20
|
+
const D = ({ pageSize: m, onPageSizeChange: s }) => {
|
|
21
|
+
const r = I(), l = B[r.localeString], p = !!s && Number.isInteger(m), C = h(() => r.table.getAllColumns().length === Object.keys(r.breakingContentState).length && !Object.values(r.breakingContentState).includes(!1), [r.breakingContentState, r.table]), f = h(
|
|
22
|
+
({ checked: e }) => {
|
|
23
|
+
const n = {};
|
|
24
|
+
r.table.getAllColumns().forEach((c) => {
|
|
25
|
+
n[c.id] = e;
|
|
26
|
+
}), r.setBreakingContentState(n), r.onBreakingContentChange?.(n);
|
|
24
27
|
},
|
|
25
|
-
[
|
|
28
|
+
[r]
|
|
26
29
|
);
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
|
|
30
|
+
return /* @__PURE__ */ t(S, { children: /* @__PURE__ */ o(M, { closeOnSelect: !1, isLazy: !0, children: [
|
|
31
|
+
/* @__PURE__ */ t(w, { "aria-label": l.presets, variant: "ghost", p: "unset", w: "40px", h: "40px", children: /* @__PURE__ */ t(y, { size: j.Medium }) }),
|
|
32
|
+
/* @__PURE__ */ t(k, { children: /* @__PURE__ */ o(O, { children: [
|
|
33
|
+
/* @__PURE__ */ t(
|
|
34
|
+
d,
|
|
32
35
|
{
|
|
33
|
-
color:
|
|
34
|
-
py:
|
|
35
|
-
px:
|
|
36
|
+
color: g.OnSurfaceSubdued,
|
|
37
|
+
py: a.Small,
|
|
38
|
+
px: a.Medium,
|
|
36
39
|
children: l.showColumns
|
|
37
40
|
}
|
|
38
41
|
),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
42
|
+
/* @__PURE__ */ t(T, { maxHeight: "320px", overflowY: "auto", children: r.table.getAllLeafColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ o(i, { itemType: "checkbox", leftIcon: V, value: e.id, children: [
|
|
43
|
+
/* @__PURE__ */ t(u, { children: e.columnDef.header }),
|
|
44
|
+
/* @__PURE__ */ t(
|
|
45
|
+
A,
|
|
43
46
|
{
|
|
44
|
-
isChecked:
|
|
45
|
-
onCheckedChange: ({ checked:
|
|
47
|
+
isChecked: e.getIsVisible(),
|
|
48
|
+
onCheckedChange: ({ checked: n }) => e.toggleVisibility(!!n)
|
|
46
49
|
}
|
|
47
50
|
)
|
|
48
|
-
] },
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
+
] }, e.id)) }),
|
|
52
|
+
/* @__PURE__ */ t(b, {}),
|
|
53
|
+
p && /* @__PURE__ */ o(u, { children: [
|
|
54
|
+
/* @__PURE__ */ t(
|
|
55
|
+
d,
|
|
56
|
+
{
|
|
57
|
+
color: g.OnSurfaceSubdued,
|
|
58
|
+
py: a.Small,
|
|
59
|
+
px: a.Medium,
|
|
60
|
+
children: l.rowsPerPage
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ t(
|
|
64
|
+
F,
|
|
65
|
+
{
|
|
66
|
+
gap: "unset",
|
|
67
|
+
value: String(m),
|
|
68
|
+
onValueChange: (e) => s?.(Number(e.value)),
|
|
69
|
+
children: v.map((e) => /* @__PURE__ */ o(i, { itemType: "radio", value: String(e), children: [
|
|
70
|
+
l.numberOfRows.replace("{count}", String(e)),
|
|
71
|
+
/* @__PURE__ */ t(G, { value: String(e) })
|
|
72
|
+
] }, e))
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ t(b, {})
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ o(i, { itemType: "switch", value: "breakingContent", children: [
|
|
51
78
|
l.breakingContent,
|
|
52
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ t(P, { onCheckedChange: f, isChecked: C() })
|
|
53
80
|
] })
|
|
54
81
|
] }) })
|
|
55
82
|
] }) });
|
|
56
|
-
},
|
|
83
|
+
}, re = x(D);
|
|
57
84
|
export {
|
|
58
|
-
|
|
85
|
+
re as TableToolbarSettings
|
|
59
86
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar-settings.spec.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-settings.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.constants.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,4BAA6B,CAAC"}
|
|
@@ -23,6 +23,8 @@ export declare const translations: {
|
|
|
23
23
|
filterReset: string;
|
|
24
24
|
selected: string;
|
|
25
25
|
selectedSingular: string;
|
|
26
|
+
rowsPerPage: string;
|
|
27
|
+
numberOfRows: string;
|
|
26
28
|
action: string;
|
|
27
29
|
deleteSelectedRows: string;
|
|
28
30
|
};
|
|
@@ -49,6 +51,8 @@ export declare const translations: {
|
|
|
49
51
|
filterReset: string;
|
|
50
52
|
selected: string;
|
|
51
53
|
selectedSingular: string;
|
|
54
|
+
rowsPerPage: string;
|
|
55
|
+
numberOfRows: string;
|
|
52
56
|
action: string;
|
|
53
57
|
deleteSelectedRows: string;
|
|
54
58
|
};
|
|
@@ -75,6 +79,8 @@ export declare const translations: {
|
|
|
75
79
|
filterReset: string;
|
|
76
80
|
selected: string;
|
|
77
81
|
selectedSingular: string;
|
|
82
|
+
rowsPerPage: string;
|
|
83
|
+
numberOfRows: string;
|
|
78
84
|
action: string;
|
|
79
85
|
deleteSelectedRows: string;
|
|
80
86
|
};
|
|
@@ -101,6 +107,8 @@ export declare const translations: {
|
|
|
101
107
|
filterReset: string;
|
|
102
108
|
selected: string;
|
|
103
109
|
selectedSingular: string;
|
|
110
|
+
rowsPerPage: string;
|
|
111
|
+
numberOfRows: string;
|
|
104
112
|
action: string;
|
|
105
113
|
deleteSelectedRows: string;
|
|
106
114
|
};
|
|
@@ -127,6 +135,8 @@ export declare const translations: {
|
|
|
127
135
|
filterReset: string;
|
|
128
136
|
selected: string;
|
|
129
137
|
selectedSingular: string;
|
|
138
|
+
rowsPerPage: string;
|
|
139
|
+
numberOfRows: string;
|
|
130
140
|
action: string;
|
|
131
141
|
deleteSelectedRows: string;
|
|
132
142
|
};
|
|
@@ -153,6 +163,8 @@ export declare const translations: {
|
|
|
153
163
|
filterReset: string;
|
|
154
164
|
selected: string;
|
|
155
165
|
selectedSingular: string;
|
|
166
|
+
rowsPerPage: string;
|
|
167
|
+
numberOfRows: string;
|
|
156
168
|
action: string;
|
|
157
169
|
deleteSelectedRows: string;
|
|
158
170
|
};
|
|
@@ -179,6 +191,8 @@ export declare const translations: {
|
|
|
179
191
|
filterReset: string;
|
|
180
192
|
selected: string;
|
|
181
193
|
selectedSingular: string;
|
|
194
|
+
rowsPerPage: string;
|
|
195
|
+
numberOfRows: string;
|
|
182
196
|
action: string;
|
|
183
197
|
deleteSelectedRows: string;
|
|
184
198
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../lib/components/table/translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../lib/components/table/translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AA+B1F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+IxB,CAAC"}
|
|
@@ -21,6 +21,8 @@ const e = {
|
|
|
21
21
|
filterReset: "Clear filter",
|
|
22
22
|
selected: "{count} selected",
|
|
23
23
|
selectedSingular: "{count} selected",
|
|
24
|
+
rowsPerPage: "Rows per page",
|
|
25
|
+
numberOfRows: "{count} rows",
|
|
24
26
|
action: "Action",
|
|
25
27
|
deleteSelectedRows: "Delete selected rows"
|
|
26
28
|
}, n = {
|
|
@@ -47,6 +49,8 @@ const e = {
|
|
|
47
49
|
filterReset: "Rensa filter",
|
|
48
50
|
selected: "{count} valda",
|
|
49
51
|
selectedSingular: "{count} vald",
|
|
52
|
+
rowsPerPage: "Rader per sida",
|
|
53
|
+
numberOfRows: "{count} rader",
|
|
50
54
|
action: "Åtgärd",
|
|
51
55
|
deleteSelectedRows: "Ta bort valda rader"
|
|
52
56
|
},
|
|
@@ -75,6 +79,8 @@ const e = {
|
|
|
75
79
|
filterReset: "Fjern filter",
|
|
76
80
|
selected: "{count} valgte",
|
|
77
81
|
selectedSingular: "{count} valgt",
|
|
82
|
+
rowsPerPage: "Rader per side",
|
|
83
|
+
numberOfRows: "{count} rader",
|
|
78
84
|
action: "Handling",
|
|
79
85
|
deleteSelectedRows: "Fjern valgte rader"
|
|
80
86
|
},
|
|
@@ -101,6 +107,8 @@ const e = {
|
|
|
101
107
|
filterReset: "Fjern filter",
|
|
102
108
|
selected: "{count} valgte",
|
|
103
109
|
selectedSingular: "{count} valgt",
|
|
110
|
+
rowsPerPage: "Rækker per side",
|
|
111
|
+
numberOfRows: "{count} rækker",
|
|
104
112
|
action: "Handling",
|
|
105
113
|
deleteSelectedRows: "Fjern valgte rækker"
|
|
106
114
|
},
|
|
@@ -127,6 +135,8 @@ const e = {
|
|
|
127
135
|
filterReset: "Effacer le filtre",
|
|
128
136
|
selected: "{count} sélectionnées",
|
|
129
137
|
selectedSingular: "{count} sélectionnée",
|
|
138
|
+
rowsPerPage: "Lignes par page",
|
|
139
|
+
numberOfRows: "{count} lignes",
|
|
130
140
|
action: "Action",
|
|
131
141
|
deleteSelectedRows: "Supprimer les lignes sélectionnées"
|
|
132
142
|
},
|
|
@@ -153,6 +163,8 @@ const e = {
|
|
|
153
163
|
filterReset: "Filter wissen",
|
|
154
164
|
selected: "{count} geselecteerd",
|
|
155
165
|
selectedSingular: "{count} geselecteerd",
|
|
166
|
+
rowsPerPage: "Rijen per pagina",
|
|
167
|
+
numberOfRows: "{count} rijen",
|
|
156
168
|
action: "Actie",
|
|
157
169
|
deleteSelectedRows: "Verwijder geselecteerde rijen"
|
|
158
170
|
}
|