@dcs-tech/ui 0.9.0 → 0.11.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 (235) hide show
  1. package/CHANGELOG.md +488 -0
  2. package/README.md +43 -7
  3. package/THIRD_PARTY_NOTICES.md +23 -0
  4. package/dist/ChartImageMenu-sB2QNQzd.js +9673 -0
  5. package/dist/ChartView-BstZkP1g.js +1942 -0
  6. package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-B5ibDNOZ.js} +11 -10
  7. package/dist/{SummaryImage-Crf1R-3a.js → SummaryImage-CRP7X2Nl.js} +2 -2
  8. package/dist/SummarySeeAll-CtYRGV4G.js +101 -0
  9. package/dist/assets/fileTask.worker-D97s2vRV.js +1 -0
  10. package/dist/columnValue-BOn9NC8X.js +644 -0
  11. package/dist/exportContext-CMzuzRjc.js +274 -0
  12. package/dist/{exportEngine-BFZD6djX.js → exportEngine-CYDN8Ty-.js} +167 -137
  13. package/dist/file-worker.js +1 -1
  14. package/dist/{fileActions-CFNO14Aj.js → fileActions-DkPEWE-t.js} +1 -1
  15. package/dist/{geometry-yZmKN662.js → geometry-CFS5If1N.js} +848 -439
  16. package/dist/index.js +24208 -12603
  17. package/dist/{labels-CnqqTrne.js → labels-mukFhYkc.js} +126 -1
  18. package/dist/{runFileTask-BIZTFnZP.js → runFileTask-DI_39TjR.js} +17 -0
  19. package/dist/scrollArea-B52kugL1.js +291 -0
  20. package/dist/style.css +1 -1
  21. package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-D15kw64n.js} +10 -3
  22. package/dist/types/components/Alert/Alert.d.ts +16 -0
  23. package/dist/types/components/Alert/index.d.ts +2 -0
  24. package/dist/types/components/Card/Card.d.ts +4 -3
  25. package/dist/types/components/Card/index.d.ts +1 -1
  26. package/dist/types/components/Charts/BarList.d.ts +4 -3
  27. package/dist/types/components/Charts/CalendarHeatmap.d.ts +4 -2
  28. package/dist/types/components/Charts/Chart.d.ts +3 -2
  29. package/dist/types/components/Charts/ChartView.d.ts +3 -2
  30. package/dist/types/components/Charts/ColumnChart.d.ts +4 -3
  31. package/dist/types/components/Charts/Donut.d.ts +3 -2
  32. package/dist/types/components/Charts/Funnel.d.ts +4 -2
  33. package/dist/types/components/Charts/Gauge.d.ts +3 -2
  34. package/dist/types/components/Charts/LineChart.d.ts +4 -3
  35. package/dist/types/components/Charts/NumberTrend.d.ts +4 -3
  36. package/dist/types/components/Charts/Progress.d.ts +3 -2
  37. package/dist/types/components/Charts/StackedBar.d.ts +3 -2
  38. package/dist/types/components/Charts/Treemap.d.ts +3 -2
  39. package/dist/types/components/Charts/chartData.d.ts +6 -0
  40. package/dist/types/components/Charts/chartImage.d.ts +3 -0
  41. package/dist/types/components/Charts/geometry.d.ts +3 -0
  42. package/dist/types/components/Charts/index.d.ts +2 -0
  43. package/dist/types/components/Charts/palette.d.ts +1 -0
  44. package/dist/types/components/Charts/parts.d.ts +14 -0
  45. package/dist/types/components/Charts/useChartMotion.d.ts +8 -0
  46. package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
  47. package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
  48. package/dist/types/components/CommandPalette/index.d.ts +2 -0
  49. package/dist/types/components/DataTable/DataTable.d.ts +3 -1
  50. package/dist/types/components/DataTable/DisplayPopover.d.ts +1 -0
  51. package/dist/types/components/DataTable/HeaderMenu.d.ts +1 -0
  52. package/dist/types/components/DataTable/TableColumnModal.d.ts +4 -1
  53. package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
  54. package/dist/types/components/DataTable/TableToolbar.d.ts +21 -1
  55. package/dist/types/components/DataTable/TableView.d.ts +19 -2
  56. package/dist/types/components/DataTable/cards/CardView.d.ts +25 -5
  57. package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
  58. package/dist/types/components/DataTable/cards/rowParts.d.ts +1 -0
  59. package/dist/types/components/DataTable/cellSelection/CellRangeBar.d.ts +16 -0
  60. package/dist/types/components/DataTable/cellSelection/cellRangeStore.d.ts +18 -0
  61. package/dist/types/components/DataTable/cellSelection/paintRanges.d.ts +2 -0
  62. package/dist/types/components/DataTable/cellSelection/useCellSelection.d.ts +63 -0
  63. package/dist/types/components/DataTable/data/listDelta.d.ts +27 -0
  64. package/dist/types/components/DataTable/data/rowLineage.d.ts +3 -0
  65. package/dist/types/components/DataTable/data/rowModels.d.ts +9 -0
  66. package/dist/types/components/DataTable/data/rowTransaction.d.ts +9 -0
  67. package/dist/types/components/DataTable/data/useServerData.d.ts +3 -1
  68. package/dist/types/components/DataTable/defaults.d.ts +4 -0
  69. package/dist/types/components/DataTable/export/exportCells.d.ts +5 -2
  70. package/dist/types/components/DataTable/export/exportEngine.d.ts +7 -2
  71. package/dist/types/components/DataTable/export/useTableExport.d.ts +17 -1
  72. package/dist/types/components/DataTable/filters/filterRowModel.d.ts +1 -0
  73. package/dist/types/components/DataTable/grouping/groupModel.d.ts +11 -0
  74. package/dist/types/components/DataTable/index.d.ts +1 -1
  75. package/dist/types/components/DataTable/keyboard/ShortcutsDialog.d.ts +4 -1
  76. package/dist/types/components/DataTable/keyboard/useGridKeyboard.d.ts +8 -0
  77. package/dist/types/components/DataTable/labels.d.ts +130 -0
  78. package/dist/types/components/DataTable/layout/LayoutSwitcher.d.ts +10 -2
  79. package/dist/types/components/DataTable/layout/useFitWidths.d.ts +7 -0
  80. package/dist/types/components/DataTable/menu/RowMenu.d.ts +1 -0
  81. package/dist/types/components/DataTable/menu/buildRowMenu.d.ts +6 -3
  82. package/dist/types/components/DataTable/motion/RowChangeNotice.d.ts +19 -0
  83. package/dist/types/components/DataTable/motion/rowChanges.d.ts +25 -0
  84. package/dist/types/components/DataTable/motion/useNoticeInsets.d.ts +2 -0
  85. package/dist/types/components/DataTable/motion/useRowChangeNotices.d.ts +35 -0
  86. package/dist/types/components/DataTable/motion/useRowMotion.d.ts +29 -3
  87. package/dist/types/components/DataTable/persistence/reconcile.d.ts +4 -0
  88. package/dist/types/components/DataTable/persistence/useColumnPersistence.d.ts +5 -1
  89. package/dist/types/components/DataTable/pivot/PivotPanel.d.ts +11 -0
  90. package/dist/types/components/DataTable/pivot/PivotView.d.ts +22 -0
  91. package/dist/types/components/DataTable/pivot/pivotModel.d.ts +54 -0
  92. package/dist/types/components/DataTable/pivot/usePivot.d.ts +44 -0
  93. package/dist/types/components/DataTable/rows/PressRow.d.ts +1 -0
  94. package/dist/types/components/DataTable/rows/RowLead.d.ts +23 -0
  95. package/dist/types/components/DataTable/rows/rowPress.d.ts +2 -0
  96. package/dist/types/components/DataTable/rows/usePinnedRows.d.ts +34 -0
  97. package/dist/types/components/DataTable/rows/useRowDrag.d.ts +44 -0
  98. package/dist/types/components/DataTable/split/SplitView.d.ts +4 -2
  99. package/dist/types/components/DataTable/summary/SummaryChart.d.ts +2 -1
  100. package/dist/types/components/DataTable/summary/TableSummary.d.ts +2 -1
  101. package/dist/types/components/DataTable/summary/summaryModel.d.ts +28 -6
  102. package/dist/types/components/DataTable/summary/useTableSummary.d.ts +3 -0
  103. package/dist/types/components/DataTable/toolbar/ToolbarMore.d.ts +14 -0
  104. package/dist/types/components/DataTable/toolbar/useToolbarFit.d.ts +10 -0
  105. package/dist/types/components/DataTable/tree/TreeChips.d.ts +5 -0
  106. package/dist/types/components/DataTable/tree/treeExport.d.ts +54 -0
  107. package/dist/types/components/DataTable/tree/treeMove.d.ts +1 -0
  108. package/dist/types/components/DataTable/tree/useTreeChildren.d.ts +15 -0
  109. package/dist/types/components/DataTable/tree/useTreeData.d.ts +60 -0
  110. package/dist/types/components/DataTable/types.d.ts +290 -6
  111. package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
  112. package/dist/types/components/DataTable/ui.d.ts +2 -1
  113. package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -4
  114. package/dist/types/components/DataTable/useTable.d.ts +14 -1
  115. package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +1 -0
  116. package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
  117. package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
  118. package/dist/types/components/DatePicker/index.d.ts +1 -1
  119. package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
  120. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
  121. package/dist/types/components/EventCalendar/EventCalendar.d.ts +46 -0
  122. package/dist/types/components/EventCalendar/eventParts.d.ts +10 -0
  123. package/dist/types/components/EventCalendar/index.d.ts +3 -0
  124. package/dist/types/components/EventCalendar/useCalendarEdit.d.ts +40 -0
  125. package/dist/types/components/FieldWrapper/index.d.ts +1 -1
  126. package/dist/types/components/Fields/index.d.ts +1 -1
  127. package/dist/types/components/Icon/Icon.d.ts +36 -0
  128. package/dist/types/components/Icon/Icon.storyData.d.ts +6 -0
  129. package/dist/types/components/Icon/IconContext.d.ts +7 -0
  130. package/dist/types/components/Icon/icons.d.ts +223 -0
  131. package/dist/types/components/Icon/index.d.ts +7 -0
  132. package/dist/types/components/Icon/useIconDone.d.ts +5 -0
  133. package/dist/types/components/Image/ImageEditor.d.ts +21 -0
  134. package/dist/types/components/Image/ImagePicker.d.ts +10 -1
  135. package/dist/types/components/Image/imageRender.d.ts +33 -0
  136. package/dist/types/components/Image/index.d.ts +3 -1
  137. package/dist/types/components/Image/prepareImage.d.ts +4 -3
  138. package/dist/types/components/Link/Link.d.ts +22 -0
  139. package/dist/types/components/Link/index.d.ts +2 -0
  140. package/dist/types/components/NavList/NavList.d.ts +13 -0
  141. package/dist/types/components/NavList/index.d.ts +2 -0
  142. package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
  143. package/dist/types/components/PageProgress/index.d.ts +2 -0
  144. package/dist/types/components/Pagination/Pagination.d.ts +19 -0
  145. package/dist/types/components/Pagination/index.d.ts +2 -0
  146. package/dist/types/components/Popover/Popover.d.ts +2 -1
  147. package/dist/types/components/Popover/floatingPosition.d.ts +26 -2
  148. package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
  149. package/dist/types/components/ReorderList/ReorderList.d.ts +56 -0
  150. package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
  151. package/dist/types/components/ReorderList/index.d.ts +5 -0
  152. package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
  153. package/dist/types/components/Scroll/ui.d.ts +1 -0
  154. package/dist/types/components/SlidingHighlight/index.d.ts +2 -0
  155. package/dist/types/components/SlidingHighlight/useSlidingHighlight.d.ts +20 -0
  156. package/dist/types/components/Suggest/SuggestionList.d.ts +1 -0
  157. package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
  158. package/dist/types/components/UIProvider/UILabelsContext.d.ts +120 -0
  159. package/dist/types/components/UIProvider/UIProvider.d.ts +2 -0
  160. package/dist/types/core/hooks/index.d.ts +2 -1
  161. package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
  162. package/dist/types/core/hooks/usePresence.d.ts +1 -0
  163. package/dist/types/core/icons/actions.icons.d.ts +37 -0
  164. package/dist/types/core/icons/commerce.icons.d.ts +16 -0
  165. package/dist/types/core/icons/communication.icons.d.ts +10 -0
  166. package/dist/types/core/icons/delivery.icons.d.ts +13 -0
  167. package/dist/types/core/icons/devices.icons.d.ts +16 -0
  168. package/dist/types/core/icons/files.icons.d.ts +13 -0
  169. package/dist/types/core/icons/general.icons.d.ts +24 -0
  170. package/dist/types/core/icons/index.d.ts +14 -0
  171. package/dist/types/core/icons/media.icons.d.ts +11 -0
  172. package/dist/types/core/icons/navigation.icons.d.ts +25 -0
  173. package/dist/types/core/icons/people.icons.d.ts +13 -0
  174. package/dist/types/core/icons/registry.d.ts +2 -0
  175. package/dist/types/core/icons/state.icons.d.ts +14 -0
  176. package/dist/types/core/icons/status.icons.d.ts +10 -0
  177. package/dist/types/core/icons/table.icons.d.ts +22 -0
  178. package/dist/types/core/icons/text.icons.d.ts +13 -0
  179. package/dist/types/core/logic/alert.logic.d.ts +3 -0
  180. package/dist/types/core/logic/cellRange.logic.d.ts +66 -0
  181. package/dist/types/core/logic/cellTouch.logic.d.ts +16 -0
  182. package/dist/types/core/logic/columnGroups.logic.d.ts +31 -0
  183. package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
  184. package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
  185. package/dist/types/core/logic/dropdownSide.logic.d.ts +19 -0
  186. package/dist/types/core/logic/eventCalendar.logic.d.ts +225 -0
  187. package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
  188. package/dist/types/core/logic/fitColumns.logic.d.ts +7 -0
  189. package/dist/types/core/logic/icon.logic.d.ts +24 -0
  190. package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
  191. package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
  192. package/dist/types/core/logic/index.d.ts +25 -0
  193. package/dist/types/core/logic/inertProps.d.ts +3 -0
  194. package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
  195. package/dist/types/core/logic/pagination.logic.d.ts +7 -0
  196. package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
  197. package/dist/types/core/logic/pivot.logic.d.ts +100 -0
  198. package/dist/types/core/logic/reorder.logic.d.ts +49 -0
  199. package/dist/types/core/logic/rowActions.logic.d.ts +7 -0
  200. package/dist/types/core/logic/rowDrag.logic.d.ts +36 -0
  201. package/dist/types/core/logic/rowPinning.logic.d.ts +12 -0
  202. package/dist/types/core/logic/slidingHighlight.logic.d.ts +20 -0
  203. package/dist/types/core/logic/toolbarOverflow.logic.d.ts +21 -0
  204. package/dist/types/core/logic/treeData.logic.d.ts +44 -0
  205. package/dist/types/core/logic/treeDrag.logic.d.ts +63 -0
  206. package/dist/types/core/logic/tween.logic.d.ts +33 -0
  207. package/dist/types/core/logic/visualViewport.logic.d.ts +13 -0
  208. package/dist/types/core/types/chipinput.types.d.ts +3 -1
  209. package/dist/types/core/types/collapsible.types.d.ts +3 -0
  210. package/dist/types/core/types/datePicker.types.d.ts +7 -0
  211. package/dist/types/core/types/eventCalendar.types.d.ts +18 -0
  212. package/dist/types/core/types/field.types.d.ts +6 -3
  213. package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
  214. package/dist/types/core/types/fields.types.d.ts +6 -1
  215. package/dist/types/core/types/fileEngine.types.d.ts +6 -0
  216. package/dist/types/core/types/form.types.d.ts +1 -0
  217. package/dist/types/core/types/format.types.d.ts +2 -0
  218. package/dist/types/core/types/icon.types.d.ts +109 -0
  219. package/dist/types/core/types/index.d.ts +2 -0
  220. package/dist/types/core/types/input.types.d.ts +2 -0
  221. package/dist/types/core/types/navigation.types.d.ts +1 -0
  222. package/dist/types/core/types/select.types.d.ts +2 -6
  223. package/dist/types/core/types/suggest.types.d.ts +2 -0
  224. package/dist/types/index.d.ts +31 -6
  225. package/package.json +4 -4
  226. package/dist/ChartImageMenu-DDVNJNc6.js +0 -1499
  227. package/dist/ChartView-CW3m4Z_1.js +0 -1703
  228. package/dist/SummarySeeAll-BRHOMQRA.js +0 -101
  229. package/dist/assets/fileTask.worker--Q3rI3Bn.js +0 -1
  230. package/dist/columnValue-DwUqueZ6.js +0 -610
  231. package/dist/exportContext-BKFnNQ0q.js +0 -166
  232. package/dist/scrollArea-DbYFqbIH.js +0 -269
  233. package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
  234. package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
  235. package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
@@ -1,166 +0,0 @@
1
- "use client";
2
- import { a as e, d as t, r as n, s as r } from "./columnValue-DwUqueZ6.js";
3
- import { r as i, t as a } from "./labels-CnqqTrne.js";
4
- // src/core/logic/exportSafety.logic.ts
5
- var o = /^[=+\-@\t\r]/, s = (e) => o.test(e) ? `'${e}` : e, c = (e) => e === "xlsx" || e === "json" || e === "xml" ? "typed" : "text";
6
- function l(e) {
7
- let t = /* @__PURE__ */ new Map();
8
- return e.map((e) => {
9
- let n = (t.get(e) ?? 0) + 1;
10
- return t.set(e, n), n === 1 ? e : `${e} (${n})`;
11
- });
12
- }
13
- var u = (e) => typeof e == "number" && Number.isFinite(e);
14
- function d(e) {
15
- let [t, n, r] = e.slice(0, 10).split("-").map(Number), i = e.length > 10 ? Number(e.slice(11, 13)) : 0, a = e.length > 10 ? Number(e.slice(14, 16)) : 0;
16
- return new Date(Date.UTC(t, n - 1, r, i, a));
17
- }
18
- function f(e) {
19
- let { locale: t, currency: n } = e.fmt ?? {};
20
- if (!n) return "";
21
- try {
22
- return new Intl.NumberFormat(t, {
23
- style: "currency",
24
- currency: n
25
- }).formatToParts(0).find((e) => e.type === "currency")?.value ?? "";
26
- } catch {
27
- return "";
28
- }
29
- }
30
- function p(e, t, n) {
31
- if (e.type === "date") {
32
- let r = e.dateFormat ?? n.fmt?.dateFormat ?? "dd-mm-yyyy";
33
- return t.some((e) => e instanceof Date && (e.getUTCHours() || e.getUTCMinutes())) ? `${r} hh:mm` : r;
34
- }
35
- switch (e.numberFormat) {
36
- case "integer": return "#,##0";
37
- case "amount": return "#,##0.00";
38
- case "percent": return "0%";
39
- case "currency": {
40
- let e = f(n);
41
- return e ? `"${e}"#,##0.00` : "#,##0.00";
42
- }
43
- }
44
- if (e.type === "number") {
45
- let e = t.filter(u);
46
- return e.length && e.every(Number.isInteger) ? "#,##0" : void 0;
47
- }
48
- }
49
- function m(r, i, a, o, f, m, h = "Total") {
50
- let g = new Map(a.map((e) => [e.key, e])), _ = o.map((e) => g.get(e)).filter((e) => e !== void 0 && e.exportable !== !1 && e.authorized !== !1), v = l(_.map((e) => e.exportHeader || e.header)), y = c(r), b = r === "csv" || r === "xlsx", x = _.map(() => []), S = i.map((i) => {
51
- let a = {};
52
- return _.forEach((o, c) => {
53
- let l = e(o, i), p;
54
- if (o.exportValue) p = o.exportValue(l, i);
55
- else if (y === "text") p = t(o, l, f, i);
56
- else if (o.type === "date") {
57
- let e = n(o, l, i);
58
- p = e ? r === "xlsx" ? d(e) : e : "";
59
- } else if (o.type === "number" && !o.format) {
60
- let e = typeof l == "number" ? l : l == null || l === "" ? NaN : Number(l);
61
- p = Number.isFinite(e) ? e : "";
62
- } else p = r !== "xlsx" && (typeof l == "boolean" || u(l)) && !o.format ? l : t(o, l, f, i);
63
- b && typeof p == "string" && (p = s(p)), x[c].push(p), a[v[c]] = p ?? "";
64
- }), a;
65
- }), C = _.some((e) => e.cellStyle) ? i.map((t) => {
66
- let n = {};
67
- return _.forEach((r, i) => {
68
- let a = r.cellStyle?.(e(r, t), t);
69
- a && (n[v[i]] = a);
70
- }), n;
71
- }) : void 0, w = _.map((e, t) => ({
72
- header: v[t],
73
- type: e.type,
74
- align: e.align ?? (e.type === "number" ? "right" : void 0),
75
- width: e.width,
76
- ...r === "xlsx" ? { numFmt: p(e, x[t], f) } : {},
77
- ...e.cellStyle ? { cellStyle: e.cellStyle } : {}
78
- })), T = new Set(m ?? []), E = null;
79
- return T.size && (E = {}, _.forEach((n, r) => {
80
- let a = v[r];
81
- if (!T.has(n.key)) {
82
- E[a] = r === 0 ? h : "";
83
- return;
84
- }
85
- let o = i.reduce((t, r) => {
86
- let i = e(n, r), a = typeof i == "number" ? i : Number(i);
87
- return Number.isFinite(a) && i !== null && i !== "" ? t + a : t;
88
- }, 0);
89
- E[a] = y === "text" ? t({
90
- ...n,
91
- format: void 0
92
- }, o, f) : o;
93
- }), _.some((e) => T.has(e.key)) || (E = null)), {
94
- headers: v,
95
- rows: S,
96
- exportColumns: _,
97
- cellStyles: C,
98
- columnMeta: w,
99
- totals: E
100
- };
101
- }
102
- // src/components/DataTable/export/exportRows.ts
103
- function h(e, t = a) {
104
- return e == null ? "" : typeof e == "number" ? e : typeof e == "boolean" ? e ? t.yes : t.no : e instanceof Date ? e.toLocaleDateString() : Array.isArray(e) ? e.length === 0 ? "" : typeof e[0] == "object" ? t.exportItems(String(e.length)) : e.join(", ") : typeof e == "object" ? "" : String(e);
105
- }
106
- function g(t, n, i, o = a) {
107
- let s = new Map(n.map((e) => [e.key, e])), c = i.map((e) => s.get(e)).filter((e) => e !== void 0 && e.exportable !== !1 && e.authorized !== !1), u = l(c.map((e) => e.exportHeader || e.header)), d = c.some((e) => e.cellStyle);
108
- return {
109
- headers: u,
110
- rows: t.map((t) => c.reduce((n, i, a) => {
111
- let s = e(i, t);
112
- return n[u[a]] = i.exportValue ? i.exportValue(s, t) : i.format ? i.format(s, t) ?? "" : i.type === "date" ? r(i, s, t) : h(s, o), n;
113
- }, {})),
114
- exportColumns: c,
115
- cellStyles: d ? t.map((t) => c.reduce((n, r, i) => {
116
- if (r.cellStyle) {
117
- let a = e(r, t), o = r.cellStyle(a, t);
118
- o && (n[u[i]] = o);
119
- }
120
- return n;
121
- }, {})) : void 0
122
- };
123
- }
124
- function _(e) {
125
- let t = e?.businessMeta?.() || {}, n = {};
126
- return t.businessName && (n.businessName = t.businessName), t.businessAddress && (n.businessAddress = t.businessAddress), t.businessPhone && (n.businessPhone = t.businessPhone), t.taxNumber && (n.taxNumber = t.taxNumber, n.taxNumberLabel = t.taxNumberLabel), n;
127
- }
128
- // src/components/DataTable/export/exportContext.ts
129
- var v = (e) => i(e?.labels), y = (e) => e.taxNumberLabel || v(e).exportTaxNo;
130
- function b(e, t) {
131
- return e.map((e) => ({
132
- column: e.columnLabel,
133
- operator: e.operatorLabel,
134
- value: t?.get(e.id) ?? e.displayValue
135
- }));
136
- }
137
- function x(e, t = {}) {
138
- let n = v(e), r = [];
139
- if (e.filters && e.filters.length > 0 && r.push({
140
- label: n.exportFiltersLabel,
141
- value: e.filters.map((e) => `${e.column} ${e.operator} ${e.value}`).join(", ")
142
- }), e.searchTerm && r.push({
143
- label: n.exportSearchLabel,
144
- value: `"${e.searchTerm}"`
145
- }), e.totalRows > 0 || e.resultRows > 0) {
146
- let i = [n.exportRowsTotal(String(e.totalRows))];
147
- e.filteredRows !== e.totalRows && i.push(n.exportRowsFiltered(String(e.filteredRows))), (t.rows ?? "export") === "export" && i.push(n.exportRowsExported(String(e.resultRows)));
148
- let a = e.selectedRows > 0 ? ` (${n.exportRowsSelected(String(e.selectedRows))})` : "";
149
- r.push({
150
- label: n.exportRowsLabel,
151
- value: `${i.join(" > ")}${a}`,
152
- rows: !0
153
- });
154
- }
155
- return r;
156
- }
157
- function S(e, t) {
158
- return x(e, t).map((e) => e.rows ? e.value : `${e.label}: ${e.value}`).join(" | ");
159
- }
160
- function C(e) {
161
- let t = v(e), n = [];
162
- e.businessName && n.push([t.exportBusiness, e.businessName]), e.businessAddress && n.push([t.exportAddress, e.businessAddress]), e.businessPhone && n.push([t.exportPhone, e.businessPhone]), e.taxNumber && n.push([y(e), e.taxNumber]);
163
- for (let t of x(e)) n.push([t.label, t.value]);
164
- return n;
165
- }
166
- export { y as a, g as c, v as i, m as l, S as n, h as o, C as r, _ as s, b as t };
@@ -1,269 +0,0 @@
1
- "use client";
2
- import { Nn as e, wn as t } from "./geometry-yZmKN662.js";
3
- import { n, t as r } from "./labels-CnqqTrne.js";
4
- import { createContext as i, useCallback as ee, useContext as a, useEffect as o, useId as te, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
5
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
- import { createPortal as ne } from "react-dom";
7
- // src/components/Dialog/dialogOpen.tsx
8
- var p = i(null), m = i(0), h = ({ children: e }) => {
9
- let [t, n] = u(0), r = c(() => () => {
10
- n((e) => e + 1);
11
- let e = !1;
12
- return () => {
13
- e || (e = !0, n((e) => e - 1));
14
- };
15
- }, []);
16
- return /* @__PURE__ */ d(p.Provider, {
17
- value: r,
18
- children: /* @__PURE__ */ d(m.Provider, {
19
- value: t,
20
- children: e
21
- })
22
- });
23
- };
24
- function g(e) {
25
- let t = a(p);
26
- o(() => e && t ? t() : void 0, [e, t]);
27
- }
28
- var _ = () => a(m), v = () => a(m) > 0, y = {
29
- root: "_root_1rswg_7",
30
- nonModal: "_nonModal_1rswg_30",
31
- panel: "_panel_1rswg_3",
32
- center: "_center_1rswg_41",
33
- right: "_right_1rswg_42",
34
- left: "_left_1rswg_43",
35
- top: "_top_1rswg_44",
36
- bottom: "_bottom_1rswg_45",
37
- sm: "_sm_1rswg_86",
38
- md: "_md_1rswg_87",
39
- lg: "_lg_1rswg_88",
40
- xl: "_xl_1rswg_89",
41
- full: "_full_1rswg_90",
42
- header: "_header_1rswg_96",
43
- headText: "_headText_1rswg_106",
44
- title: "_title_1rswg_108",
45
- subtitle: "_subtitle_1rswg_114",
46
- body: "_body_1rswg_120",
47
- flush: "_flush_1rswg_128",
48
- footer: "_footer_1rswg_130",
49
- close: "_close_1rswg_141",
50
- dialogPop: "_dialogPop_1rswg_1",
51
- slideFromRight: "_slideFromRight_1rswg_1",
52
- slideFromLeft: "_slideFromLeft_1rswg_1",
53
- slideFromTop: "_slideFromTop_1rswg_1",
54
- slideFromBottom: "_slideFromBottom_1rswg_1",
55
- backdropIn: "_backdropIn_1rswg_1",
56
- closing: "_closing_1rswg_168"
57
- }, b = 0, x = null, re = (e) => {
58
- if (typeof document < "u") {
59
- if (b === 0) {
60
- let t = document.body;
61
- x = {
62
- overflow: t.style.overflow,
63
- paddingRight: t.style.paddingRight
64
- };
65
- let n = window.innerWidth - document.documentElement.clientWidth;
66
- if (e && n > 0) {
67
- let e = parseFloat(window.getComputedStyle(t).paddingRight) || 0;
68
- t.style.paddingRight = `${e + n}px`;
69
- }
70
- t.style.overflow = "hidden";
71
- }
72
- b += 1;
73
- }
74
- }, ie = () => {
75
- typeof document < "u" && (b = Math.max(0, b - 1), b === 0 && x && (document.body.style.overflow = x.overflow, document.body.style.paddingRight = x.paddingRight, x = null));
76
- }, S = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, ae = /* @__PURE__ */ f("svg", {
77
- width: "16",
78
- height: "16",
79
- viewBox: "0 0 24 24",
80
- fill: "none",
81
- stroke: "currentColor",
82
- strokeWidth: "2",
83
- strokeLinecap: "round",
84
- "aria-hidden": "true",
85
- children: [/* @__PURE__ */ d("line", {
86
- x1: "18",
87
- y1: "6",
88
- x2: "6",
89
- y2: "18"
90
- }), /* @__PURE__ */ d("line", {
91
- x1: "6",
92
- y1: "6",
93
- x2: "18",
94
- y2: "18"
95
- })]
96
- }), oe = 0, C = "button:not([disabled]),a[href],input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"]),[contenteditable=\"true\"]", w = ({ open: n, onClose: r, onBeforeClose: i, onEscKeyDown: a, onOverlayClick: c, onAnimationEnd: p, children: m, title: h, subtitle: _, footer: v, modal: b = !0, placement: x = "center", size: w = "md", closeOnBackdrop: T = !0, closeOnEscape: E = !0, showCloseButton: D = !0, closeIcon: O, closeIconId: k, blockScroll: A = !0, reserveScrollBarGap: j = !0, initialFocusRef: M, container: se, animationDuration: ce = 200, padded: le = !0, classNames: N = {}, styleSlots: P = {}, className: ue = "", style: de, role: fe = "dialog", id: pe, "aria-label": F, "aria-labelledby": I, "aria-describedby": L }) => {
97
- let R = e(), z = l(null), [me, he] = u(null), B = te(), [V, H] = u(n), [ge, U] = u(!1), [W, G] = u(!1), K = l(null), q = l(n);
98
- q.current = n;
99
- let J = l(null), Y = S() ? 0 : ce;
100
- g(V), o(() => {
101
- n ? (J.current &&= (clearTimeout(J.current), null), U(!1), H(!0)) : V && (U(!0), J.current = setTimeout(() => {
102
- z.current?.close(), H(!1), G(!1), U(!1), p?.();
103
- }, Y));
104
- }, [n]), o(() => () => {
105
- J.current && clearTimeout(J.current);
106
- }, []);
107
- let X = ee(() => {
108
- i && i() === !1 || r?.();
109
- }, [i, r]);
110
- s(() => {
111
- let e = z.current;
112
- if (e && V) {
113
- if (!e.open) {
114
- let t = document.activeElement;
115
- K.current = t instanceof HTMLElement && t !== document.body ? t : null, b && (e.dataset.modalOrder = String(++oe)), b ? e.showModal() : e.show();
116
- }
117
- G(!0);
118
- }
119
- }, [V, b]), s(() => {
120
- let e = z.current;
121
- if (!e || !W) return;
122
- if (M?.current) {
123
- M.current.focus({ focusVisible: !0 });
124
- return;
125
- }
126
- let t = document.activeElement;
127
- t && t !== e && e.contains(t) || e.querySelector(C)?.focus();
128
- }, [W]), s(() => () => {
129
- let e = z.current, t = K.current;
130
- if (!e?.open || !t) return;
131
- let n = document.activeElement;
132
- (!n || n === document.body || e.contains(n)) && queueMicrotask(() => {
133
- let e = document.activeElement;
134
- t.isConnected && (!e || e === document.body) && t.focus({ preventScroll: !0 });
135
- });
136
- }, []), o(() => {
137
- if (V && A && b) return re(j), () => ie();
138
- }, [
139
- V,
140
- b,
141
- A,
142
- j
143
- ]), o(() => {
144
- let e = z.current;
145
- if (!e || !V) return;
146
- let t = (t) => {
147
- t.key !== "Escape" || t.defaultPrevented || t.isComposing || t.target instanceof Node && e.contains(t.target) && (t.preventDefault(), a?.(t), E && X());
148
- }, n = (e) => {
149
- e.preventDefault(), a?.(e), E && X();
150
- }, r = () => {
151
- q.current && !e.open && e.isConnected && (b ? e.showModal() : e.show(), e.querySelector(C)?.focus());
152
- }, i = e.ownerDocument.defaultView ?? window;
153
- return i.addEventListener("keydown", t), e.addEventListener("cancel", n), e.addEventListener("close", r), () => {
154
- i.removeEventListener("keydown", t), e.removeEventListener("cancel", n), e.removeEventListener("close", r);
155
- };
156
- }, [
157
- V,
158
- b,
159
- E,
160
- X,
161
- a
162
- ]);
163
- let Z = l(!1), _e = (e) => {
164
- Z.current = e.target === z.current;
165
- }, Q = (e) => {
166
- let t = Z.current && e.target === z.current;
167
- Z.current = !1, t && (c?.(e), T && X());
168
- };
169
- if (!V) return null;
170
- let ve = h !== void 0 || _ !== void 0 || D, ye = I ?? (h !== void 0 && !F ? B : void 0), be = /* @__PURE__ */ d("dialog", {
171
- ref: (e) => {
172
- z.current = e, he(e);
173
- },
174
- id: pe,
175
- "data-modal": b ? "" : void 0,
176
- className: [
177
- y.root,
178
- y[x],
179
- y[w],
180
- b ? "" : y.nonModal,
181
- ge ? y.closing : "",
182
- N.root,
183
- ue
184
- ].filter(Boolean).join(" "),
185
- style: {
186
- "--dialog-anim": `${Y}ms`,
187
- ...P.root,
188
- ...de
189
- },
190
- role: fe,
191
- "aria-label": F,
192
- "aria-labelledby": ye,
193
- "aria-describedby": L,
194
- "aria-modal": b || void 0,
195
- onPointerDown: _e,
196
- onPointerUp: Q,
197
- children: /* @__PURE__ */ d(t.Provider, {
198
- value: me,
199
- children: W && /* @__PURE__ */ f("div", {
200
- className: [y.panel, N.panel].filter(Boolean).join(" "),
201
- style: P.panel,
202
- children: [
203
- ve && /* @__PURE__ */ f("div", {
204
- className: [y.header, N.header].filter(Boolean).join(" "),
205
- style: P.header,
206
- children: [/* @__PURE__ */ f("span", {
207
- className: y.headText,
208
- children: [h !== void 0 && /* @__PURE__ */ d("span", {
209
- className: y.title,
210
- id: B,
211
- children: h
212
- }), _ !== void 0 && /* @__PURE__ */ d("span", {
213
- className: y.subtitle,
214
- children: _
215
- })]
216
- }), D && /* @__PURE__ */ d("button", {
217
- type: "button",
218
- id: k,
219
- className: [y.close, N.closeButton].filter(Boolean).join(" "),
220
- style: P.closeButton,
221
- onClick: X,
222
- "aria-label": R.dialog.close,
223
- children: O ?? ae
224
- })]
225
- }),
226
- m !== void 0 && /* @__PURE__ */ d("div", {
227
- className: [
228
- y.body,
229
- le ? "scroll-fade-y scroll-gutter" : `${y.flush} scroll-fade-y`,
230
- N.body
231
- ].filter(Boolean).join(" "),
232
- style: P.body,
233
- children: m
234
- }),
235
- v !== void 0 && /* @__PURE__ */ d("div", {
236
- className: [y.footer, N.footer].filter(Boolean).join(" "),
237
- style: P.footer,
238
- children: v
239
- })
240
- ]
241
- })
242
- })
243
- }), $ = se ?? (typeof document > "u" ? null : document.body);
244
- return $ ? ne(be, $) : null;
245
- };
246
- w.displayName = "Dialog";
247
- var T = i({
248
- authorize: () => !0,
249
- exportOptions: {},
250
- serverMode: !1,
251
- labels: r,
252
- format: n(),
253
- text: {
254
- yes: r.yes,
255
- no: r.no
256
- }
257
- });
258
- function E() {
259
- return a(T);
260
- }
261
- function D() {
262
- return a(T).labels;
263
- }
264
- function O(e, t, n) {
265
- return !e || e(t, n) !== !1;
266
- }
267
- // src/components/DataTable/layout/scrollArea.ts
268
- var k = "dt-scroll-area scroll-fade-y scroll-gutter", A = "dt-scroll-area scroll-fade-x scroll-fade-y scroll-gutter";
269
- export { D as a, h as c, O as i, v as l, k as n, E as o, T as r, w as s, A as t, _ as u };
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { type DragAndDropListProps, type DragAndDropItem } from './types';
3
- import './DragAndDropList.css';
4
- export default function DragAndDropList<T = DragAndDropItem>({ state, setState, renderKeys, onReorder, renderItem, getItemKey, className, showDragHandle, isItemDraggable, dragHandleProps, emptyMessage, showManualButtons, showSerialNumber, maxHeight, enableScrolling }: DragAndDropListProps<T>): React.JSX.Element;
@@ -1,3 +0,0 @@
1
- export { default } from './DragAndDropList';
2
- export { default as DragAndDropList } from './DragAndDropList';
3
- export * from './types';
@@ -1,70 +0,0 @@
1
- import { type CSSProperties, type ReactNode, type MouseEvent, type TouchEvent, type DragEvent } from 'react';
2
- export type DragAndDropItem = any;
3
- export type GetItemKeyFn<T = DragAndDropItem> = (item: T, index: number) => string | number;
4
- export type IsItemDraggableFn<T = DragAndDropItem> = (item: T, index: number) => boolean;
5
- export type OnReorderFn<T = DragAndDropItem> = (newItems: T[]) => void;
6
- export type RenderItemFn<T = DragAndDropItem> = (item: T, index: number, isDragging: boolean, isDragOver: boolean, dragHandle: ReactNode, moveItem: (fromIndex: number, toIndex: number) => void) => ReactNode;
7
- export interface DragHandleProps {
8
- className?: string;
9
- style?: CSSProperties;
10
- title?: string;
11
- 'aria-label'?: string;
12
- onClick?: (e: MouseEvent<HTMLSpanElement>) => void;
13
- onMouseDown?: (e: MouseEvent<HTMLSpanElement>) => void;
14
- }
15
- export interface DragAndDropListProps<T = DragAndDropItem> {
16
- state: T[];
17
- setState?: (items: T[]) => void;
18
- renderKeys?: string | string[];
19
- onReorder?: OnReorderFn<T>;
20
- renderItem?: RenderItemFn<T>;
21
- getItemKey?: GetItemKeyFn<T>;
22
- className?: string;
23
- showDragHandle?: boolean;
24
- isItemDraggable?: IsItemDraggableFn<T>;
25
- dragHandleProps?: DragHandleProps;
26
- emptyMessage?: string;
27
- showManualButtons?: boolean;
28
- showSerialNumber?: boolean;
29
- maxHeight?: string | number;
30
- enableScrolling?: boolean;
31
- }
32
- export interface DragAndDropState {
33
- draggedIndex: number | null;
34
- dragOverIndex: number | null;
35
- isDragging: boolean;
36
- touchStartY: number | null;
37
- touchCurrentY: number | null;
38
- touchStartX: number | null;
39
- isDragReady: boolean;
40
- touchStartTime: number | null;
41
- }
42
- export type AutoScrollDirection = 'up' | 'down';
43
- export interface TouchEventData {
44
- clientX: number;
45
- clientY: number;
46
- startY: number;
47
- startX: number;
48
- startTime: number;
49
- }
50
- export interface DragEventHandlers {
51
- handleDragStart: (e: DragEvent<HTMLDivElement>, index: number) => void;
52
- handleDragEnd: () => void;
53
- handleDragOver: (e: DragEvent<HTMLDivElement>) => void;
54
- handleDragEnter: (e: DragEvent<HTMLDivElement>, index: number) => void;
55
- handleDragLeave: (e: DragEvent<HTMLDivElement>) => void;
56
- handleDrop: (e: DragEvent<HTMLDivElement>, dropIndex: number) => void;
57
- }
58
- export interface TouchEventHandlers {
59
- handleTouchStart: (e: TouchEvent<HTMLDivElement>, index: number) => void;
60
- handleTouchMove: (e: TouchEvent<HTMLDivElement>) => void;
61
- handleTouchEnd: () => void;
62
- }
63
- export interface ItemRenderContext<T = DragAndDropItem> {
64
- item: T;
65
- index: number;
66
- isCurrentDragging: boolean;
67
- isCurrentDragOver: boolean;
68
- isDraggable: boolean;
69
- itemKey: string | number;
70
- }