@caspeco/casper-ui-library 10.8.0 → 10.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/components/table/helper.d.ts +3 -0
  2. package/dist/components/table/helper.d.ts.map +1 -1
  3. package/dist/components/table/helper.js +17 -11
  4. package/dist/components/table/index.d.ts +1 -1
  5. package/dist/components/table/index.d.ts.map +1 -1
  6. package/dist/components/table/table-cell.d.ts +2 -1
  7. package/dist/components/table/table-cell.d.ts.map +1 -1
  8. package/dist/components/table/table-cell.js +62 -55
  9. package/dist/components/table/table-content.d.ts.map +1 -1
  10. package/dist/components/table/table-content.js +84 -56
  11. package/dist/components/table/table-context-provider.d.ts +17 -2
  12. package/dist/components/table/table-context-provider.d.ts.map +1 -1
  13. package/dist/components/table/table-context-provider.js +179 -122
  14. package/dist/components/table/table-drag-accessibility.d.ts +11 -0
  15. package/dist/components/table/table-drag-accessibility.d.ts.map +1 -0
  16. package/dist/components/table/table-drag-accessibility.js +22 -0
  17. package/dist/components/table/table-header-row.d.ts.map +1 -1
  18. package/dist/components/table/table-header-row.js +70 -62
  19. package/dist/components/table/table-recipe.d.ts.map +1 -1
  20. package/dist/components/table/table-recipe.js +6 -0
  21. package/dist/components/table/table-row-drag-handle.d.ts +6 -0
  22. package/dist/components/table/table-row-drag-handle.d.ts.map +1 -0
  23. package/dist/components/table/table-row-drag-handle.js +53 -0
  24. package/dist/components/table/table-row-reorder.spec.d.ts +2 -0
  25. package/dist/components/table/table-row-reorder.spec.d.ts.map +1 -0
  26. package/dist/components/table/table-row.d.ts.map +1 -1
  27. package/dist/components/table/table-row.js +59 -42
  28. package/dist/components/table/table-sorted-reorder-prompt.d.ts +8 -0
  29. package/dist/components/table/table-sorted-reorder-prompt.d.ts.map +1 -0
  30. package/dist/components/table/table-sorted-reorder-prompt.js +64 -0
  31. package/dist/components/table/table-toolbar-settings.js +27 -27
  32. package/dist/components/table/table.composition.d.ts +2 -0
  33. package/dist/components/table/table.composition.d.ts.map +1 -1
  34. package/dist/components/table/table.constants.d.ts +15 -0
  35. package/dist/components/table/table.constants.d.ts.map +1 -1
  36. package/dist/components/table/table.constants.js +2 -2
  37. package/dist/components/table/table.d.ts +1 -1
  38. package/dist/components/table/table.d.ts.map +1 -1
  39. package/dist/components/table/table.js +4 -2
  40. package/dist/components/table/translations.d.ts +70 -0
  41. package/dist/components/table/translations.d.ts.map +1 -1
  42. package/dist/components/table/translations.js +66 -6
  43. package/dist/components/table/types.d.ts +37 -5
  44. package/dist/components/table/types.d.ts.map +1 -1
  45. package/package.json +1 -1
@@ -15,11 +15,11 @@ import { Switch as h } from "../switch/switch.js";
15
15
  import { DEFAULT_PAGE_SIZE_OPTIONS as g } from "./table.constants.js";
16
16
  import { getColumnLabel as _ } from "./helper.js";
17
17
  import { useTableContext as v } from "./table-context.js";
18
- import { closestCenter as y } from "../../node_modules/@dnd-kit/collision/dist/index.js";
19
- import { DragDropProvider as b } from "../../node_modules/@dnd-kit/react/index.js";
20
- import { SortableKeyboardPlugin as x, isSortableOperation as S } from "../../node_modules/@dnd-kit/dom/sortable.js";
21
- import { useSortable as C } from "../../node_modules/@dnd-kit/react/sortable.js";
22
- import { translations as w } from "./translations.js";
18
+ import { translations as y } from "./translations.js";
19
+ import { closestCenter as b } from "../../node_modules/@dnd-kit/collision/dist/index.js";
20
+ import { DragDropProvider as x } from "../../node_modules/@dnd-kit/react/index.js";
21
+ import { SortableKeyboardPlugin as S, isSortableOperation as C } from "../../node_modules/@dnd-kit/dom/sortable.js";
22
+ import { useSortable as w } from "../../node_modules/@dnd-kit/react/sortable.js";
23
23
  import { memo as T, useCallback as E, useState as D } from "react";
24
24
  import { Box as O, Flex as k, Portal as A } from "@chakra-ui/react";
25
25
  import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
@@ -30,27 +30,27 @@ var F = (e, t, n, r) => {
30
30
  let i = n.findIndex((e) => e.id === r.sourceId), a = n.findIndex((e) => e.id === r.targetId);
31
31
  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
32
  }, I = (e) => {
33
- if (!S(e)) return null;
33
+ if (!C(e)) return null;
34
34
  let { source: t, target: n } = e;
35
35
  return t && n ? {
36
36
  source: t,
37
37
  target: n
38
38
  } : null;
39
39
  }, L = ({ pageSize: n, onPageSizeChange: i }) => {
40
- let y = v(), x = w[y.localeString], S = !!i && Number.isInteger(n), [C, T] = D(null), L = y.table.getAllLeafColumns().filter((e) => e.getCanHide()), R = L.filter((e) => e.getIsVisible()), B = L.filter((e) => !e.getIsVisible()).sort((e, t) => {
40
+ let b = v(), S = y[b.localeString], C = !!i && Number.isInteger(n), [w, T] = D(null), L = b.table.getAllLeafColumns().filter((e) => e.getCanHide()), R = L.filter((e) => e.getIsVisible()), B = L.filter((e) => !e.getIsVisible()).sort((e, t) => {
41
41
  let n = _(e.columnDef.header, e.id), r = _(t.columnDef.header, t.id);
42
- return n.localeCompare(r, y.localeString, { sensitivity: "base" });
43
- }), V = E(() => y.table.getAllColumns().length === Object.keys(y.breakingContentState).length && !Object.values(y.breakingContentState).includes(!1), [y.breakingContentState, y.table]), H = E(({ checked: e }) => {
42
+ return n.localeCompare(r, b.localeString, { sensitivity: "base" });
43
+ }), V = E(() => b.table.getAllColumns().length === Object.keys(b.breakingContentState).length && !Object.values(b.breakingContentState).includes(!1), [b.breakingContentState, b.table]), H = E(({ checked: e }) => {
44
44
  let t = {};
45
- y.table.getAllColumns().forEach((n) => {
45
+ b.table.getAllColumns().forEach((n) => {
46
46
  t[n.id] = e;
47
- }), y.setBreakingContentState(t), y.onBreakingContentChange?.(t);
48
- }, [y]);
47
+ }), b.setBreakingContentState(t), b.onBreakingContentChange?.(t);
48
+ }, [b]);
49
49
  return /* @__PURE__ */ M(k, { children: /* @__PURE__ */ N(s, {
50
50
  closeOnSelect: !1,
51
51
  isLazy: !0,
52
52
  children: [/* @__PURE__ */ M(c, {
53
- "aria-label": x.presets,
53
+ "aria-label": S.presets,
54
54
  variant: "ghost",
55
55
  p: "unset",
56
56
  w: "40px",
@@ -61,12 +61,12 @@ var F = (e, t, n, r) => {
61
61
  color: e.OnSurfaceSubdued,
62
62
  py: r.Small,
63
63
  px: r.Medium,
64
- children: x.shownInTable
64
+ children: S.shownInTable
65
65
  }),
66
66
  /* @__PURE__ */ N(O, {
67
67
  maxHeight: "400px",
68
68
  overflowY: "auto",
69
- children: [/* @__PURE__ */ M(b, {
69
+ children: [/* @__PURE__ */ M(x, {
70
70
  onDragOver: (e) => {
71
71
  let t = I(e.operation);
72
72
  t && T({
@@ -77,14 +77,14 @@ var F = (e, t, n, r) => {
77
77
  onDragEnd: (e) => {
78
78
  let t = I(e.operation);
79
79
  P(() => {
80
- T(null), t && y.handleDragEnd(String(t.source.id), String(t.target.id));
80
+ T(null), t && b.handleDragEnd(String(t.source.id), String(t.target.id));
81
81
  });
82
82
  },
83
83
  children: R.map((e, t) => /* @__PURE__ */ M(z, {
84
84
  column: e,
85
85
  index: t,
86
86
  isDisabled: R.length === 1,
87
- translateY: F(e.id, t, R, C)
87
+ translateY: F(e.id, t, R, w)
88
88
  }, e.id))
89
89
  }), B.length > 0 && /* @__PURE__ */ N(j, { children: [
90
90
  /* @__PURE__ */ M(l, {}),
@@ -92,7 +92,7 @@ var F = (e, t, n, r) => {
92
92
  color: e.OnSurfaceSubdued,
93
93
  py: r.Small,
94
94
  px: r.Medium,
95
- children: x.hiddenInTable
95
+ children: S.hiddenInTable
96
96
  }),
97
97
  B.map((e) => /* @__PURE__ */ N(u, {
98
98
  itemType: "checkbox",
@@ -101,8 +101,8 @@ var F = (e, t, n, r) => {
101
101
  isChecked: e.getIsVisible(),
102
102
  onCheckedChange: ({ checked: t }) => {
103
103
  if (e.toggleVisibility(!!t), t) {
104
- let t = y.columnOrder.filter((t) => t !== e.id);
105
- t.push(e.id), y.setColumnOrder(t);
104
+ let t = b.columnOrder.filter((t) => t !== e.id);
105
+ t.push(e.id), b.setColumnOrder(t);
106
106
  }
107
107
  }
108
108
  })]
@@ -110,12 +110,12 @@ var F = (e, t, n, r) => {
110
110
  ] })]
111
111
  }),
112
112
  /* @__PURE__ */ M(l, {}),
113
- S && /* @__PURE__ */ N(j, { children: [
113
+ C && /* @__PURE__ */ N(j, { children: [
114
114
  /* @__PURE__ */ M(o, {
115
115
  color: e.OnSurfaceSubdued,
116
116
  py: r.Small,
117
117
  px: r.Medium,
118
- children: x.rowsPerPage
118
+ children: S.rowsPerPage
119
119
  }),
120
120
  /* @__PURE__ */ M(m, {
121
121
  gap: "unset",
@@ -124,7 +124,7 @@ var F = (e, t, n, r) => {
124
124
  children: g.map((e) => /* @__PURE__ */ N(u, {
125
125
  itemType: "radio",
126
126
  value: String(e),
127
- children: [x.numberOfRows.replace("{count}", String(e)), /* @__PURE__ */ M(p, { value: String(e) })]
127
+ children: [S.numberOfRows.replace("{count}", String(e)), /* @__PURE__ */ M(p, { value: String(e) })]
128
128
  }, e))
129
129
  }),
130
130
  /* @__PURE__ */ M(l, {})
@@ -132,18 +132,18 @@ var F = (e, t, n, r) => {
132
132
  /* @__PURE__ */ N(u, {
133
133
  itemType: "switch",
134
134
  value: "breakingContent",
135
- children: [x.breakingContent, /* @__PURE__ */ M(h, {
135
+ children: [S.breakingContent, /* @__PURE__ */ M(h, {
136
136
  onCheckedChange: H,
137
137
  isChecked: V()
138
138
  })]
139
139
  })
140
140
  ] }) })]
141
141
  }) });
142
- }, R = [x], z = ({ column: a, index: o, isDisabled: s, translateY: c }) => {
143
- let { ref: l, handleRef: d, isDragging: p } = C({
142
+ }, R = [S], z = ({ column: a, index: o, isDisabled: s, translateY: c }) => {
143
+ let { ref: l, handleRef: d, isDragging: p } = w({
144
144
  id: a.id,
145
145
  index: o,
146
- collisionDetector: y,
146
+ collisionDetector: b,
147
147
  plugins: R
148
148
  });
149
149
  return /* @__PURE__ */ M(O, {
@@ -17,4 +17,6 @@ export declare const EditableTable: () => import("react").JSX.Element;
17
17
  export declare const HeaderTextWrappingTable: () => import("react").JSX.Element;
18
18
  export declare const NestedTableWithToolbar: () => import("react").JSX.Element;
19
19
  export declare const ResizableTable: () => import("react").JSX.Element;
20
+ export declare const ReorderableTable: () => import("react").JSX.Element;
21
+ export declare const ReorderableTableWithHandlesShown: () => import("react").JSX.Element;
20
22
  //# sourceMappingURL=table.composition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.composition.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AA8GH,eAAO,MAAM,UAAU,mCAoEtB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAyDvB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAqBD,eAAO,MAAM,aAAa,mCAqEzB,CAAC;AAKF,eAAO,MAAM,uBAAuB,mCAyCnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mCAmElC,CAAC;AAIF,eAAO,MAAM,cAAc,mCA+D1B,CAAC"}
1
+ {"version":3,"file":"table.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.composition.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AA8GH,eAAO,MAAM,UAAU,mCAoEtB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAyDvB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAqBD,eAAO,MAAM,aAAa,mCAqEzB,CAAC;AAKF,eAAO,MAAM,uBAAuB,mCAyCnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mCAmElC,CAAC;AAIF,eAAO,MAAM,cAAc,mCA+D1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mCA8B5B,CAAC;AAEF,eAAO,MAAM,gCAAgC,mCAI5C,CAAC"}
@@ -3,4 +3,19 @@ export declare const RESIZABLE_COLUMN_MIN_SIZE = 80;
3
3
  /** How much one arrow-key press changes a column's width, and how much the same press with Shift does. */
4
4
  export declare const RESIZABLE_COLUMN_KEYBOARD_STEP = 10;
5
5
  export declare const RESIZABLE_COLUMN_KEYBOARD_LARGE_STEP = 50;
6
+ /**
7
+ * Width of one control slot at the start of a row's first cell. The grip, the row action menu and the
8
+ * checkbox each take a slot. They float over the cell, so the cell adds this much padding per slot to
9
+ * keep them off its text.
10
+ */
11
+ export declare const ROW_SLOT_WIDTH = 24;
12
+ /**
13
+ * How far a press on the grip has to move before it counts as trying to drag. This is only needed while a
14
+ * sort blocks dragging: dnd-kit is switched off then, so the table watches the press itself, and a few
15
+ * pixels of slack stop a plain click from looking like a drag.
16
+ */
17
+ export declare const BLOCKED_DRAG_THRESHOLD_PX = 4;
18
+ /** Rows and columns share the same `DragDropProvider`, so each sortable identifies its type. */
19
+ export declare const ROW_SORTABLE_TYPE = "table-row";
20
+ export declare const COLUMN_SORTABLE_TYPE = "table-column";
6
21
  //# sourceMappingURL=table.constants.d.ts.map
@@ -1 +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;AAEpE,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,0GAA0G;AAC1G,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,eAAO,MAAM,oCAAoC,KAAK,CAAC"}
1
+ {"version":3,"file":"table.constants.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,4BAA6B,CAAC;AAEpE,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,0GAA0G;AAC1G,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,oBAAoB,iBAAiB,CAAC"}
@@ -4,6 +4,6 @@ var e = [
4
4
  25,
5
5
  50,
6
6
  100
7
- ];
7
+ ], t = "table-row", n = "table-column";
8
8
  //#endregion
9
- export { e as DEFAULT_PAGE_SIZE_OPTIONS };
9
+ export { n as COLUMN_SORTABLE_TYPE, e as DEFAULT_PAGE_SIZE_OPTIONS, t as ROW_SORTABLE_TYPE };
@@ -4,5 +4,5 @@ import { TableData, TableProps } from './types.js';
4
4
  *
5
5
  * @see Docs https://caspeco.github.io/casper-ui-library/components/table
6
6
  */
7
- export declare function Table<TData extends TableData>({ columns, data, totalDataCount, localeString, expandedState, initialExpandedState, initialBreakingContentState, initialColumnVisibilityState, columnVisibilityState, onColumnVisibilityChange, onExpandedChange, onBreakingContentChange, getRowId, getRowActions, id, customRowIndication, onSortingChange, initialSortingState, sortingState, onSelectionChange, initialSelectionState, selectionState, selectionActions, disableSelectionCheckbox, enableColumnReorder, columnOrderState, initialColumnOrder, onColumnOrderChange, enableColumnResizing, initialColumnSizingState, onColumnSizingChange, children, }: TableProps<TData>): import("react").JSX.Element;
7
+ export declare function Table<TData extends TableData>({ columns, data, totalDataCount, localeString, expandedState, initialExpandedState, initialBreakingContentState, initialColumnVisibilityState, columnVisibilityState, onColumnVisibilityChange, onExpandedChange, onBreakingContentChange, getRowId, getRowActions, id, customRowIndication, onSortingChange, initialSortingState, sortingState, onSelectionChange, initialSelectionState, selectionState, selectionActions, disableSelectionCheckbox, enableColumnReorder, columnOrderState, initialColumnOrder, onColumnOrderChange, enableColumnResizing, initialColumnSizingState, onColumnSizingChange, enableRowReorder, onRowOrderChange, children, }: TableProps<TData>): import("react").JSX.Element;
8
8
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,KAAK,SAAS,SAAS,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,oBAAyB,EACzB,2BAAgC,EAChC,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,QAAQ,EACR,aAAa,EACb,EAAE,EACF,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,QAAQ,GACR,EAAE,UAAU,CAAC,KAAK,CAAC,+BAsCnB"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,KAAK,SAAS,SAAS,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,oBAAyB,EACzB,2BAAgC,EAChC,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,QAAQ,EACR,aAAa,EACb,EAAE,EACF,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,GACR,EAAE,UAAU,CAAC,KAAK,CAAC,+BAwCnB"}
@@ -2,7 +2,7 @@
2
2
  import { TableProvider as e } from "./table-context-provider.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  //#region lib/components/table/table.tsx
5
- function n({ columns: n, data: r, totalDataCount: i, localeString: a, expandedState: o, initialExpandedState: s = {}, initialBreakingContentState: c = {}, initialColumnVisibilityState: l, columnVisibilityState: u, onColumnVisibilityChange: d, onExpandedChange: f, onBreakingContentChange: p, getRowId: m, getRowActions: h, id: g, customRowIndication: _, onSortingChange: v, initialSortingState: y, sortingState: b, onSelectionChange: x, initialSelectionState: S, selectionState: C, selectionActions: w, disableSelectionCheckbox: T, enableColumnReorder: E, columnOrderState: D, initialColumnOrder: O, onColumnOrderChange: k, enableColumnResizing: A, initialColumnSizingState: j, onColumnSizingChange: M, children: N }) {
5
+ function n({ columns: n, data: r, totalDataCount: i, localeString: a, expandedState: o, initialExpandedState: s = {}, initialBreakingContentState: c = {}, initialColumnVisibilityState: l, columnVisibilityState: u, onColumnVisibilityChange: d, onExpandedChange: f, onBreakingContentChange: p, getRowId: m, getRowActions: h, id: g, customRowIndication: _, onSortingChange: v, initialSortingState: y, sortingState: b, onSelectionChange: x, initialSelectionState: S, selectionState: C, selectionActions: w, disableSelectionCheckbox: T, enableColumnReorder: E, columnOrderState: D, initialColumnOrder: O, onColumnOrderChange: k, enableColumnResizing: A, initialColumnSizingState: j, onColumnSizingChange: M, enableRowReorder: N, onRowOrderChange: P, children: F }) {
6
6
  return /* @__PURE__ */ t(e, {
7
7
  columns: n,
8
8
  data: r,
@@ -35,7 +35,9 @@ function n({ columns: n, data: r, totalDataCount: i, localeString: a, expandedSt
35
35
  enableColumnResizing: A,
36
36
  initialColumnSizingState: j,
37
37
  onColumnSizingChange: M,
38
- children: N
38
+ enableRowReorder: N,
39
+ onRowOrderChange: P,
40
+ children: F
39
41
  });
40
42
  }
41
43
  //#endregion
@@ -35,6 +35,16 @@ export declare const translations: {
35
35
  shownInTable: string;
36
36
  hiddenInTable: string;
37
37
  clearSorting: string;
38
+ reorderRow: string;
39
+ cancel: string;
40
+ reorderSortedTitle: string;
41
+ reorderSortedBody: string;
42
+ reorderSortedConfirm: string;
43
+ reorderInstructions: string;
44
+ reorderPickedUp: string;
45
+ reorderMovedTo: string;
46
+ reorderDropped: string;
47
+ reorderCancelled: string;
38
48
  };
39
49
  "en-US": {
40
50
  sortUp: string;
@@ -68,6 +78,16 @@ export declare const translations: {
68
78
  shownInTable: string;
69
79
  hiddenInTable: string;
70
80
  clearSorting: string;
81
+ reorderRow: string;
82
+ cancel: string;
83
+ reorderSortedTitle: string;
84
+ reorderSortedBody: string;
85
+ reorderSortedConfirm: string;
86
+ reorderInstructions: string;
87
+ reorderPickedUp: string;
88
+ reorderMovedTo: string;
89
+ reorderDropped: string;
90
+ reorderCancelled: string;
71
91
  };
72
92
  "en-GB": {
73
93
  sortUp: string;
@@ -101,6 +121,16 @@ export declare const translations: {
101
121
  shownInTable: string;
102
122
  hiddenInTable: string;
103
123
  clearSorting: string;
124
+ reorderRow: string;
125
+ cancel: string;
126
+ reorderSortedTitle: string;
127
+ reorderSortedBody: string;
128
+ reorderSortedConfirm: string;
129
+ reorderInstructions: string;
130
+ reorderPickedUp: string;
131
+ reorderMovedTo: string;
132
+ reorderDropped: string;
133
+ reorderCancelled: string;
104
134
  };
105
135
  "nb-NO": {
106
136
  sortUp: string;
@@ -134,6 +164,16 @@ export declare const translations: {
134
164
  shownInTable: string;
135
165
  hiddenInTable: string;
136
166
  clearSorting: string;
167
+ reorderRow: string;
168
+ cancel: string;
169
+ reorderSortedTitle: string;
170
+ reorderSortedBody: string;
171
+ reorderSortedConfirm: string;
172
+ reorderInstructions: string;
173
+ reorderPickedUp: string;
174
+ reorderMovedTo: string;
175
+ reorderDropped: string;
176
+ reorderCancelled: string;
137
177
  };
138
178
  "da-DK": {
139
179
  sortUp: string;
@@ -167,6 +207,16 @@ export declare const translations: {
167
207
  shownInTable: string;
168
208
  hiddenInTable: string;
169
209
  clearSorting: string;
210
+ reorderRow: string;
211
+ cancel: string;
212
+ reorderSortedTitle: string;
213
+ reorderSortedBody: string;
214
+ reorderSortedConfirm: string;
215
+ reorderInstructions: string;
216
+ reorderPickedUp: string;
217
+ reorderMovedTo: string;
218
+ reorderDropped: string;
219
+ reorderCancelled: string;
170
220
  };
171
221
  "fr-FR": {
172
222
  sortUp: string;
@@ -200,6 +250,16 @@ export declare const translations: {
200
250
  shownInTable: string;
201
251
  hiddenInTable: string;
202
252
  clearSorting: string;
253
+ reorderRow: string;
254
+ cancel: string;
255
+ reorderSortedTitle: string;
256
+ reorderSortedBody: string;
257
+ reorderSortedConfirm: string;
258
+ reorderInstructions: string;
259
+ reorderPickedUp: string;
260
+ reorderMovedTo: string;
261
+ reorderDropped: string;
262
+ reorderCancelled: string;
203
263
  };
204
264
  "nl-BE": {
205
265
  sortUp: string;
@@ -233,6 +293,16 @@ export declare const translations: {
233
293
  shownInTable: string;
234
294
  hiddenInTable: string;
235
295
  clearSorting: string;
296
+ reorderRow: string;
297
+ cancel: string;
298
+ reorderSortedTitle: string;
299
+ reorderSortedBody: string;
300
+ reorderSortedConfirm: string;
301
+ reorderInstructions: string;
302
+ reorderPickedUp: string;
303
+ reorderMovedTo: string;
304
+ reorderDropped: string;
305
+ reorderCancelled: string;
236
306
  };
237
307
  };
238
308
  //# sourceMappingURL=translations.d.ts.map
@@ -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;AAE1F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,UAE1F;AAoCD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwKxB,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;AAE1F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,UAE1F;AAgDD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoOxB,CAAC"}
@@ -33,7 +33,17 @@ var t = {
33
33
  deleteSelectedRows: "Delete selected rows",
34
34
  shownInTable: "Shown in table",
35
35
  hiddenInTable: "Hidden in table",
36
- clearSorting: "Clear sorting"
36
+ clearSorting: "Clear sorting",
37
+ reorderRow: "Move row",
38
+ cancel: "Cancel",
39
+ reorderSortedTitle: "Sorting blocks reordering",
40
+ reorderSortedBody: "Rows can only be moved by hand while the table is unsorted. Remove the sorting to move rows?",
41
+ reorderSortedConfirm: "Remove sorting",
42
+ reorderInstructions: "Press Space or Enter to start moving, the arrow keys to move, Space or Enter to drop, Escape to cancel.",
43
+ reorderPickedUp: "Picked up. Position {position} of {count}.",
44
+ reorderMovedTo: "Position {position} of {count}.",
45
+ reorderDropped: "Dropped at position {position} of {count}.",
46
+ reorderCancelled: "Move cancelled."
37
47
  }, n = {
38
48
  "sv-SE": {
39
49
  sortUp: "Sortera stigande",
@@ -66,7 +76,17 @@ var t = {
66
76
  deleteSelectedRows: "Ta bort valda rader",
67
77
  shownInTable: "Visas i tabellen",
68
78
  hiddenInTable: "Dold i tabellen",
69
- clearSorting: "Rensa sortering"
79
+ clearSorting: "Rensa sortering",
80
+ reorderRow: "Flytta rad",
81
+ cancel: "Avbryt",
82
+ reorderSortedTitle: "Sorteringen hindrar omordning",
83
+ reorderSortedBody: "Rader kan bara flyttas manuellt när tabellen är osorterad. Ta bort sorteringen för att flytta rader?",
84
+ reorderSortedConfirm: "Ta bort sortering",
85
+ reorderInstructions: "Tryck på blanksteg eller Retur för att börja flytta, piltangenterna för att flytta, blanksteg eller Retur för att släppa, Escape för att avbryta.",
86
+ reorderPickedUp: "Upplockad. Position {position} av {count}.",
87
+ reorderMovedTo: "Position {position} av {count}.",
88
+ reorderDropped: "Släppt på position {position} av {count}.",
89
+ reorderCancelled: "Flytten avbröts."
70
90
  },
71
91
  "en-US": t,
72
92
  "en-GB": t,
@@ -101,7 +121,17 @@ var t = {
101
121
  deleteSelectedRows: "Fjern valgte rader",
102
122
  shownInTable: "Vises i tabellen",
103
123
  hiddenInTable: "Dold i tabellen",
104
- clearSorting: "Fjern sortering"
124
+ clearSorting: "Fjern sortering",
125
+ reorderRow: "Flytt rad",
126
+ cancel: "Avbryt",
127
+ reorderSortedTitle: "Sorteringen hindrer omordning",
128
+ reorderSortedBody: "Rader kan bare flyttes manuelt når tabellen er usortert. Fjern sorteringen for å flytte rader?",
129
+ reorderSortedConfirm: "Fjern sortering",
130
+ reorderInstructions: "Trykk på mellomrom eller Enter for å begynne å flytte, piltastene for å flytte, mellomrom eller Enter for å slippe, Escape for å avbryte.",
131
+ reorderPickedUp: "Plukket opp. Posisjon {position} av {count}.",
132
+ reorderMovedTo: "Posisjon {position} av {count}.",
133
+ reorderDropped: "Sluppet på posisjon {position} av {count}.",
134
+ reorderCancelled: "Flyttingen ble avbrutt."
105
135
  },
106
136
  "da-DK": {
107
137
  sortUp: "Sorter stigende",
@@ -134,7 +164,17 @@ var t = {
134
164
  deleteSelectedRows: "Fjern valgte rækker",
135
165
  shownInTable: "Vises i tabellen",
136
166
  hiddenInTable: "Dold i tabellen",
137
- clearSorting: "Fjern sortering"
167
+ clearSorting: "Fjern sortering",
168
+ reorderRow: "Flyt række",
169
+ cancel: "Annuller",
170
+ reorderSortedTitle: "Sorteringen forhindrer omarrangering",
171
+ reorderSortedBody: "Rækker kan kun flyttes manuelt, når tabellen er usorteret. Fjern sorteringen for at flytte rækker?",
172
+ reorderSortedConfirm: "Fjern sortering",
173
+ reorderInstructions: "Tryk på mellemrum eller Enter for at begynde at flytte, piletasterne for at flytte, mellemrum eller Enter for at slippe, Escape for at annullere.",
174
+ reorderPickedUp: "Samlet op. Position {position} af {count}.",
175
+ reorderMovedTo: "Position {position} af {count}.",
176
+ reorderDropped: "Sluppet på position {position} af {count}.",
177
+ reorderCancelled: "Flytningen blev annulleret."
138
178
  },
139
179
  "fr-FR": {
140
180
  sortUp: "Trier par ordre croissant",
@@ -167,7 +207,17 @@ var t = {
167
207
  deleteSelectedRows: "Supprimer les lignes sélectionnées",
168
208
  shownInTable: "Affiché dans le tableau",
169
209
  hiddenInTable: "Masqué dans le tableau",
170
- clearSorting: "Effacer le tri"
210
+ clearSorting: "Effacer le tri",
211
+ reorderRow: "Déplacer la ligne",
212
+ cancel: "Annuler",
213
+ reorderSortedTitle: "Le tri empêche le réordonnancement",
214
+ reorderSortedBody: "Les lignes ne peuvent être déplacées manuellement que lorsque le tableau n'est pas trié. Supprimer le tri pour déplacer des lignes ?",
215
+ reorderSortedConfirm: "Supprimer le tri",
216
+ reorderInstructions: "Appuyez sur Espace ou Entrée pour commencer à déplacer, les flèches pour déplacer, Espace ou Entrée pour déposer, Échap pour annuler.",
217
+ reorderPickedUp: "Saisi. Position {position} sur {count}.",
218
+ reorderMovedTo: "Position {position} sur {count}.",
219
+ reorderDropped: "Déposé à la position {position} sur {count}.",
220
+ reorderCancelled: "Déplacement annulé."
171
221
  },
172
222
  "nl-BE": {
173
223
  sortUp: "Oplopend sorteren",
@@ -200,7 +250,17 @@ var t = {
200
250
  deleteSelectedRows: "Verwijder geselecteerde rijen",
201
251
  shownInTable: "Getoond in tabel",
202
252
  hiddenInTable: "Verborgen in tabel",
203
- clearSorting: "Sortering wissen"
253
+ clearSorting: "Sortering wissen",
254
+ reorderRow: "Rij verplaatsen",
255
+ cancel: "Annuleren",
256
+ reorderSortedTitle: "Sorteren blokkeert het herordenen",
257
+ reorderSortedBody: "Rijen kunnen alleen handmatig worden verplaatst als de tabel niet is gesorteerd. Sortering verwijderen om rijen te verplaatsen?",
258
+ reorderSortedConfirm: "Sortering verwijderen",
259
+ reorderInstructions: "Druk op Spatie of Enter om te beginnen met verplaatsen, de pijltoetsen om te verplaatsen, Spatie of Enter om neer te zetten, Escape om te annuleren.",
260
+ reorderPickedUp: "Opgepakt. Positie {position} van {count}.",
261
+ reorderMovedTo: "Positie {position} van {count}.",
262
+ reorderDropped: "Neergezet op positie {position} van {count}.",
263
+ reorderCancelled: "Verplaatsing geannuleerd."
204
264
  }
205
265
  };
206
266
  //#endregion
@@ -68,11 +68,6 @@ interface BaseTableProps<TData extends TableData> {
68
68
  */
69
69
  onBreakingContentChange?: (breakingContentState: Record<string, boolean>) => void;
70
70
  columnVisibilityState?: VisibilityState;
71
- /**
72
- * Optional function used to derive a unique ID for any given row.
73
- * If not provided the row's index is used (nested rows join together with `.` using their grandparents' index eg. "0.1.0").
74
- */
75
- getRowId?: (originalRow: TableRow<TData>, index: number, parent?: Row<TableRow<TData>>) => string;
76
71
  /**
77
72
  * Optional function to add quick-action menus for table rows. The function should return a [MenuList](https://caspeco.github.io/casper-ui-library/components/menu/) or undefined for each row.
78
73
  * If this function is defined, padding will be applied to the first column to make room for the action menu button (regardless of whether the function returns a menu for any row or not).
@@ -169,7 +164,44 @@ interface BaseTableProps<TData extends TableData> {
169
164
  * A keyboard resize has no release to wait for, so each keypress that changes a width calls this.
170
165
  */
171
166
  onColumnSizingChange?: (state: ColumnSizingState) => void;
167
+ /**
168
+ * Optional function used to derive a unique ID for any given row.
169
+ * If not provided the row's index is used (nested rows join together with `.` using their grandparents' index eg. "0.1.0").
170
+ *
171
+ * Required when `enableRowReorder` is used.
172
+ */
173
+ getRowId?: (originalRow: TableRow<TData>, index: number, parent?: Row<TableRow<TData>>) => string;
174
+ /**
175
+ * Enable drag-and-drop row reordering. Also requires `getRowId`.
176
+ *
177
+ * If `data` changes, it replaces the dragged order. Save the order in `onRowOrderChange` and pass it back through `data`.
178
+ *
179
+ * Switch this off while a filter is on, e.g. `enableRowReorder={filters.length === 0}`.
180
+ */
181
+ enableRowReorder?: boolean;
182
+ /**
183
+ * Called after a row is dropped in a new position. Use it to save the order.
184
+ *
185
+ * Not called when new `data` replaces the order.
186
+ */
187
+ onRowOrderChange?: (details: RowReorderDetails) => void;
172
188
  }
189
+ export type RowReorderDetails = {
190
+ /** ID of the row that moved, as given by `getRowId`. */
191
+ rowId: string;
192
+ /** ID of the row this one now sits after, or `undefined` if it is first. */
193
+ afterRowId: string | undefined;
194
+ /** ID of the row this one now sits before, or `undefined` if it is last. */
195
+ beforeRowId: string | undefined;
196
+ /** The rows you passed in `data`, by ID, in the order they are now in. */
197
+ orderedRowIds: string[];
198
+ /**
199
+ * Puts the row back where this drag found it, leaving earlier drags alone since `data` may not have
200
+ * caught up with those. Safe to call late: it does nothing if the rows moved again, or if new `data`
201
+ * already replaced the order.
202
+ */
203
+ revert: () => void;
204
+ };
173
205
  export type TableProps<TData extends TableData = TableData> = PropsWithChildren<BaseTableProps<TData>>;
174
206
  export type SelectionAction = {
175
207
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAA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B,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAE/B,WAAW,CAAC,EAAE,KAAK,CAAC;QAEpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACtB;IACD,UAAU,SAAS,CAAC,KAAK,SAAS,OAAO;QACxC,KAAK,CAAC,EAAE,KAAK,CAAC;KACd;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "10.8.0",
3
+ "version": "10.9.0",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,