@dcs-tech/ui 0.10.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.
- package/CHANGELOG.md +362 -0
- package/README.md +3 -2
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/ChartImageMenu-sB2QNQzd.js +9673 -0
- package/dist/ChartView-BstZkP1g.js +1942 -0
- package/dist/{SummaryChart-i6fOdrDM.js → SummaryChart-B5ibDNOZ.js} +11 -10
- package/dist/{SummaryImage-CCt5ozD9.js → SummaryImage-CRP7X2Nl.js} +2 -2
- package/dist/SummarySeeAll-CtYRGV4G.js +101 -0
- package/dist/assets/fileTask.worker-D97s2vRV.js +1 -0
- package/dist/{columnValue-74XDBcVF.js → columnValue-BOn9NC8X.js} +86 -79
- package/dist/exportContext-CMzuzRjc.js +274 -0
- package/dist/{exportEngine-BmDly7iw.js → exportEngine-CYDN8Ty-.js} +167 -137
- package/dist/file-worker.js +1 -1
- package/dist/{fileActions-CFNO14Aj.js → fileActions-DkPEWE-t.js} +1 -1
- package/dist/{geometry-DG134nYI.js → geometry-CFS5If1N.js} +769 -466
- package/dist/index.js +21095 -12669
- package/dist/{labels-BPItSeRU.js → labels-mukFhYkc.js} +124 -1
- package/dist/{runFileTask-BIZTFnZP.js → runFileTask-DI_39TjR.js} +17 -0
- package/dist/scrollArea-B52kugL1.js +291 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-BiQYJbYZ.js → summaryChartData-D15kw64n.js} +6 -5
- package/dist/types/components/Charts/BarList.d.ts +4 -3
- package/dist/types/components/Charts/CalendarHeatmap.d.ts +4 -2
- package/dist/types/components/Charts/Chart.d.ts +3 -2
- package/dist/types/components/Charts/ChartView.d.ts +3 -2
- package/dist/types/components/Charts/ColumnChart.d.ts +4 -3
- package/dist/types/components/Charts/Donut.d.ts +3 -2
- package/dist/types/components/Charts/Funnel.d.ts +3 -2
- package/dist/types/components/Charts/Gauge.d.ts +3 -2
- package/dist/types/components/Charts/LineChart.d.ts +4 -3
- package/dist/types/components/Charts/NumberTrend.d.ts +4 -3
- package/dist/types/components/Charts/Progress.d.ts +3 -2
- package/dist/types/components/Charts/StackedBar.d.ts +3 -2
- package/dist/types/components/Charts/Treemap.d.ts +3 -2
- package/dist/types/components/Charts/chartData.d.ts +6 -0
- package/dist/types/components/Charts/chartImage.d.ts +2 -0
- package/dist/types/components/Charts/geometry.d.ts +3 -0
- package/dist/types/components/Charts/index.d.ts +2 -0
- package/dist/types/components/Charts/palette.d.ts +1 -0
- package/dist/types/components/Charts/parts.d.ts +14 -0
- package/dist/types/components/Charts/useChartMotion.d.ts +8 -0
- package/dist/types/components/DataTable/DataTable.d.ts +3 -1
- package/dist/types/components/DataTable/DisplayPopover.d.ts +1 -0
- package/dist/types/components/DataTable/HeaderMenu.d.ts +1 -0
- package/dist/types/components/DataTable/TableColumnModal.d.ts +4 -1
- package/dist/types/components/DataTable/TableToolbar.d.ts +20 -1
- package/dist/types/components/DataTable/TableView.d.ts +18 -2
- package/dist/types/components/DataTable/cards/CardView.d.ts +25 -5
- package/dist/types/components/DataTable/cards/rowParts.d.ts +1 -0
- package/dist/types/components/DataTable/cellSelection/CellRangeBar.d.ts +16 -0
- package/dist/types/components/DataTable/cellSelection/cellRangeStore.d.ts +18 -0
- package/dist/types/components/DataTable/cellSelection/paintRanges.d.ts +2 -0
- package/dist/types/components/DataTable/cellSelection/useCellSelection.d.ts +63 -0
- package/dist/types/components/DataTable/data/listDelta.d.ts +27 -0
- package/dist/types/components/DataTable/data/rowLineage.d.ts +3 -0
- package/dist/types/components/DataTable/data/rowModels.d.ts +9 -0
- package/dist/types/components/DataTable/data/rowTransaction.d.ts +9 -0
- package/dist/types/components/DataTable/data/useServerData.d.ts +3 -1
- package/dist/types/components/DataTable/export/exportCells.d.ts +5 -2
- package/dist/types/components/DataTable/export/exportEngine.d.ts +7 -2
- package/dist/types/components/DataTable/export/useTableExport.d.ts +17 -1
- package/dist/types/components/DataTable/filters/filterRowModel.d.ts +1 -0
- package/dist/types/components/DataTable/grouping/groupModel.d.ts +11 -0
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DataTable/keyboard/ShortcutsDialog.d.ts +4 -1
- package/dist/types/components/DataTable/keyboard/useGridKeyboard.d.ts +8 -0
- package/dist/types/components/DataTable/labels.d.ts +128 -0
- package/dist/types/components/DataTable/layout/LayoutSwitcher.d.ts +10 -2
- package/dist/types/components/DataTable/layout/useFitWidths.d.ts +7 -0
- package/dist/types/components/DataTable/menu/RowMenu.d.ts +1 -0
- package/dist/types/components/DataTable/menu/buildRowMenu.d.ts +6 -3
- package/dist/types/components/DataTable/motion/RowChangeNotice.d.ts +19 -0
- package/dist/types/components/DataTable/motion/rowChanges.d.ts +25 -0
- package/dist/types/components/DataTable/motion/useNoticeInsets.d.ts +2 -0
- package/dist/types/components/DataTable/motion/useRowChangeNotices.d.ts +35 -0
- package/dist/types/components/DataTable/motion/useRowMotion.d.ts +29 -3
- package/dist/types/components/DataTable/persistence/reconcile.d.ts +4 -0
- package/dist/types/components/DataTable/persistence/useColumnPersistence.d.ts +5 -1
- package/dist/types/components/DataTable/pivot/PivotPanel.d.ts +11 -0
- package/dist/types/components/DataTable/pivot/PivotView.d.ts +22 -0
- package/dist/types/components/DataTable/pivot/pivotModel.d.ts +54 -0
- package/dist/types/components/DataTable/pivot/usePivot.d.ts +44 -0
- package/dist/types/components/DataTable/rows/PressRow.d.ts +1 -0
- package/dist/types/components/DataTable/rows/RowLead.d.ts +23 -0
- package/dist/types/components/DataTable/rows/rowPress.d.ts +2 -0
- package/dist/types/components/DataTable/rows/usePinnedRows.d.ts +34 -0
- package/dist/types/components/DataTable/rows/useRowDrag.d.ts +44 -0
- package/dist/types/components/DataTable/split/SplitView.d.ts +4 -2
- package/dist/types/components/DataTable/summary/SummaryChart.d.ts +2 -1
- package/dist/types/components/DataTable/summary/TableSummary.d.ts +2 -1
- package/dist/types/components/DataTable/summary/summaryModel.d.ts +28 -6
- package/dist/types/components/DataTable/summary/useTableSummary.d.ts +3 -0
- package/dist/types/components/DataTable/toolbar/ToolbarMore.d.ts +14 -0
- package/dist/types/components/DataTable/toolbar/useToolbarFit.d.ts +10 -0
- package/dist/types/components/DataTable/tree/TreeChips.d.ts +5 -0
- package/dist/types/components/DataTable/tree/treeExport.d.ts +54 -0
- package/dist/types/components/DataTable/tree/treeMove.d.ts +1 -0
- package/dist/types/components/DataTable/tree/useTreeChildren.d.ts +15 -0
- package/dist/types/components/DataTable/tree/useTreeData.d.ts +60 -0
- package/dist/types/components/DataTable/types.d.ts +272 -4
- package/dist/types/components/DataTable/useDataChangeTracker.d.ts +11 -4
- package/dist/types/components/DataTable/useTable.d.ts +13 -1
- package/dist/types/components/DataTable/virtual/useVirtualLines.d.ts +1 -0
- package/dist/types/components/EventCalendar/EventCalendar.d.ts +46 -0
- package/dist/types/components/EventCalendar/eventParts.d.ts +10 -0
- package/dist/types/components/EventCalendar/index.d.ts +3 -0
- package/dist/types/components/EventCalendar/useCalendarEdit.d.ts +40 -0
- package/dist/types/components/Icon/Icon.d.ts +36 -0
- package/dist/types/components/Icon/Icon.storyData.d.ts +6 -0
- package/dist/types/components/Icon/IconContext.d.ts +7 -0
- package/dist/types/components/Icon/icons.d.ts +223 -0
- package/dist/types/components/Icon/index.d.ts +7 -0
- package/dist/types/components/Icon/useIconDone.d.ts +5 -0
- package/dist/types/components/Popover/Popover.d.ts +1 -0
- package/dist/types/components/Popover/floatingPosition.d.ts +22 -2
- package/dist/types/components/ReorderList/ReorderList.d.ts +2 -1
- package/dist/types/components/Scroll/ui.d.ts +1 -0
- package/dist/types/components/SlidingHighlight/index.d.ts +2 -0
- package/dist/types/components/SlidingHighlight/useSlidingHighlight.d.ts +20 -0
- package/dist/types/components/Suggest/SuggestionList.d.ts +1 -0
- package/dist/types/components/UIProvider/UILabelsContext.d.ts +34 -0
- package/dist/types/components/UIProvider/UIProvider.d.ts +2 -0
- package/dist/types/core/hooks/index.d.ts +1 -1
- package/dist/types/core/hooks/usePresence.d.ts +1 -0
- package/dist/types/core/icons/actions.icons.d.ts +37 -0
- package/dist/types/core/icons/commerce.icons.d.ts +16 -0
- package/dist/types/core/icons/communication.icons.d.ts +10 -0
- package/dist/types/core/icons/delivery.icons.d.ts +13 -0
- package/dist/types/core/icons/devices.icons.d.ts +16 -0
- package/dist/types/core/icons/files.icons.d.ts +13 -0
- package/dist/types/core/icons/general.icons.d.ts +24 -0
- package/dist/types/core/icons/index.d.ts +14 -0
- package/dist/types/core/icons/media.icons.d.ts +11 -0
- package/dist/types/core/icons/navigation.icons.d.ts +25 -0
- package/dist/types/core/icons/people.icons.d.ts +13 -0
- package/dist/types/core/icons/registry.d.ts +2 -0
- package/dist/types/core/icons/state.icons.d.ts +14 -0
- package/dist/types/core/icons/status.icons.d.ts +10 -0
- package/dist/types/core/icons/table.icons.d.ts +22 -0
- package/dist/types/core/icons/text.icons.d.ts +13 -0
- package/dist/types/core/logic/cellRange.logic.d.ts +66 -0
- package/dist/types/core/logic/cellTouch.logic.d.ts +16 -0
- package/dist/types/core/logic/columnGroups.logic.d.ts +31 -0
- package/dist/types/core/logic/dropdownSide.logic.d.ts +19 -0
- package/dist/types/core/logic/eventCalendar.logic.d.ts +225 -0
- package/dist/types/core/logic/fitColumns.logic.d.ts +7 -0
- package/dist/types/core/logic/icon.logic.d.ts +24 -0
- package/dist/types/core/logic/index.d.ts +16 -0
- package/dist/types/core/logic/pivot.logic.d.ts +100 -0
- package/dist/types/core/logic/rowActions.logic.d.ts +7 -0
- package/dist/types/core/logic/rowDrag.logic.d.ts +36 -0
- package/dist/types/core/logic/rowPinning.logic.d.ts +12 -0
- package/dist/types/core/logic/slidingHighlight.logic.d.ts +20 -0
- package/dist/types/core/logic/toolbarOverflow.logic.d.ts +21 -0
- package/dist/types/core/logic/treeData.logic.d.ts +44 -0
- package/dist/types/core/logic/treeDrag.logic.d.ts +63 -0
- package/dist/types/core/logic/tween.logic.d.ts +33 -0
- package/dist/types/core/logic/visualViewport.logic.d.ts +13 -0
- package/dist/types/core/types/eventCalendar.types.d.ts +18 -0
- package/dist/types/core/types/fileEngine.types.d.ts +6 -0
- package/dist/types/core/types/icon.types.d.ts +109 -0
- package/dist/types/core/types/index.d.ts +2 -0
- package/dist/types/index.d.ts +7 -0
- package/package.json +4 -4
- package/dist/ChartImageMenu-3OfqNFyt.js +0 -1510
- package/dist/ChartView-n4G5_2ro.js +0 -1707
- package/dist/SummarySeeAll-BY8knsRe.js +0 -101
- package/dist/assets/fileTask.worker--Q3rI3Bn.js +0 -1
- package/dist/exportContext-C52ZuHd8.js +0 -166
- package/dist/scrollArea-D84Cwm4o.js +0 -310
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as e } from "./ChartImageMenu-3OfqNFyt.js";
|
|
3
|
-
import { t } from "./ChartView-n4G5_2ro.js";
|
|
4
|
-
import { J as n, Tt as r, U as i, ot as a } from "./geometry-DG134nYI.js";
|
|
5
|
-
import { n as o, o as s, s as c } from "./scrollArea-D84Cwm4o.js";
|
|
6
|
-
import { r as l, t as u } from "./summaryChartData-BiQYJbYZ.js";
|
|
7
|
-
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
|
-
// src/components/DataTable/summary/SummarySeeAll.tsx
|
|
9
|
-
function m({ item: m, all: h, onClose: g, onSelect: _, image: v, labels: y }) {
|
|
10
|
-
let { labels: b, format: x } = s(), S = x.number, C = b.summaryAllOf(m.card.title, S(m.values)), w = r(m.card), T = h === "failed" ? [] : h, E = T.reduce((e, t) => e + t.count, 0), D = u(m, T), O = i(D, l(m), y), k = (e) => {
|
|
11
|
-
if (w === "bars") return a(1);
|
|
12
|
-
let t = D.type === "values" ? D.values[e] : void 0;
|
|
13
|
-
return a(t?.slot ?? e + 1);
|
|
14
|
-
}, A = (e) => {
|
|
15
|
-
e !== "\0others" && _?.(e, T.find((t) => t.key === e)?.value ?? null);
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ f(c, {
|
|
18
|
-
open: !0,
|
|
19
|
-
onClose: g,
|
|
20
|
-
size: "lg",
|
|
21
|
-
"aria-label": C,
|
|
22
|
-
title: /* @__PURE__ */ p("span", {
|
|
23
|
-
className: "dt-summary-all-head",
|
|
24
|
-
children: [/* @__PURE__ */ f("span", {
|
|
25
|
-
className: "dt-summary-all-title",
|
|
26
|
-
children: C
|
|
27
|
-
}), v && h !== "failed" && /* @__PURE__ */ f(e, {
|
|
28
|
-
report: v.report,
|
|
29
|
-
title: C,
|
|
30
|
-
context: v.context,
|
|
31
|
-
branding: v.branding,
|
|
32
|
-
chart: O,
|
|
33
|
-
format: S,
|
|
34
|
-
locale: x.locale,
|
|
35
|
-
labels: y
|
|
36
|
-
})]
|
|
37
|
-
}),
|
|
38
|
-
subtitle: v?.context,
|
|
39
|
-
className: "dt-summary-all",
|
|
40
|
-
children: h === "failed" ? /* @__PURE__ */ f("div", {
|
|
41
|
-
className: "dt-summary-status dt-summary-status--failed",
|
|
42
|
-
role: "alert",
|
|
43
|
-
children: b.summaryFailed
|
|
44
|
-
}) : /* @__PURE__ */ p("div", {
|
|
45
|
-
className: `dt-summary-all-body ${o}`,
|
|
46
|
-
children: [/* @__PURE__ */ f("div", {
|
|
47
|
-
className: `dt-summary-all-chart dt-summary-all-chart--${w}`,
|
|
48
|
-
children: /* @__PURE__ */ f(t, {
|
|
49
|
-
chart: O,
|
|
50
|
-
ariaLabel: C,
|
|
51
|
-
height: w === "treemap" ? 260 : void 0,
|
|
52
|
-
size: 220,
|
|
53
|
-
legend: !1,
|
|
54
|
-
onSelect: _ ? A : void 0,
|
|
55
|
-
selected: m.selected,
|
|
56
|
-
format: S,
|
|
57
|
-
locale: x.locale,
|
|
58
|
-
labels: y
|
|
59
|
-
})
|
|
60
|
-
}), /* @__PURE__ */ f("ul", {
|
|
61
|
-
className: "dt-summary-all-list chart-root",
|
|
62
|
-
"aria-label": b.summaryLegend,
|
|
63
|
-
children: T.map((e, t) => {
|
|
64
|
-
let r = /* @__PURE__ */ p(d, { children: [
|
|
65
|
-
/* @__PURE__ */ f("span", {
|
|
66
|
-
className: "chart-swatch",
|
|
67
|
-
style: { background: k(t) },
|
|
68
|
-
"aria-hidden": !0
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ f("span", {
|
|
71
|
-
className: "dt-summary-all-name",
|
|
72
|
-
children: e.label
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ f("span", {
|
|
75
|
-
className: "dt-summary-all-count",
|
|
76
|
-
children: S(e.count)
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ f("span", {
|
|
79
|
-
className: "dt-summary-all-share",
|
|
80
|
-
children: n(E ? e.count / E * 100 : 0)
|
|
81
|
-
})
|
|
82
|
-
] });
|
|
83
|
-
return /* @__PURE__ */ f("li", {
|
|
84
|
-
className: `dt-summary-all-row${m.selected === e.key ? " dt-summary-all-row--on" : ""}`,
|
|
85
|
-
children: _ && !e.others ? /* @__PURE__ */ f("button", {
|
|
86
|
-
type: "button",
|
|
87
|
-
className: "dt-summary-all-pick",
|
|
88
|
-
"aria-pressed": m.selected === e.key,
|
|
89
|
-
onClick: () => A(e.key),
|
|
90
|
-
children: r
|
|
91
|
-
}) : /* @__PURE__ */ f("span", {
|
|
92
|
-
className: "dt-summary-all-pick",
|
|
93
|
-
children: r
|
|
94
|
-
})
|
|
95
|
-
}, e.key);
|
|
96
|
-
})
|
|
97
|
-
})]
|
|
98
|
-
})
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
export { m as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=()=>new DOMException(`Aborted`,`AbortError`);async function t(t,n){if(n.signal?.aborted)throw e();switch(t.kind){case`xlsx`:return d(t.workbook,n);case`pdf`:return h(t,n);default:throw Error(`Unknown file task: ${t.kind}`)}}const n=globalThis;async function r(){let e=await import(`exceljs`),t=[e.default?.default,e.default,e,n.ExcelJS].find(e=>e&&typeof e.Workbook==`function`);if(!t)throw Error(`ExcelJS did not load`);return t}let i=null;function a(){return i||=o().catch(e=>{throw i=null,e}),i}async function o(){let e=await import(`pdfmake/build/pdfmake.js`),t=[e.default?.default,e.default,e,n.pdfMake].find(e=>e&&typeof e.createPdf==`function`);if(!t)throw Error(`pdfmake did not load`);let r,i=`pdfMake`in n,a=i?n.pdfMake:n.pdfMake={},o=a?.addVirtualFileSystem;a&&(a.addVirtualFileSystem=e=>{r=e,o?.call(a,e)});let s;try{s=await import(`pdfmake/build/vfs_fonts.js`)}finally{i?a&&(o?a.addVirtualFileSystem=o:delete a.addVirtualFileSystem):delete n.pdfMake}return{pdfMake:t,vfs:[s?.default,s,s?.pdfMake?.vfs,s?.default?.pdfMake?.vfs,r,t.vfs,n.pdfMake?.vfs].find(e=>e&&e[`Roboto-Regular.ttf`])}}const s=e=>ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e,c=e=>`FF`+e.replace(`#`,``).toUpperCase();function l(e,t){if(t&&((t.bold!==void 0||t.italic!==void 0||t.size||t.color)&&(e.font={...e.font??{},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.size?{size:t.size}:{},...t.color?{color:{argb:c(t.color)}}:{}}),t.fill&&(e.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:c(t.fill)}}),t.align&&(e.alignment={horizontal:t.align,vertical:`middle`}),t.numFmt&&(typeof e.value==`number`||e.value instanceof Date)&&(e.numFmt=t.numFmt),t.borderTop||t.borderBottom)){let n=e=>({style:e.style,...e.color?{color:{argb:c(e.color)}}:{}});e.border={...t.borderTop?{top:n(t.borderTop)}:{},...t.borderBottom?{bottom:n(t.borderBottom)}:{}}}}function u(e,t,n){let r=e.addRow(t.values);t.style?.bold&&(r.font={bold:!0}),t.merge&&n>1&&e.mergeCells(r.number,1,r.number,n);let i=t.merge?1:Math.max(t.values.length,0);for(let e=0;e<i;e++){let n=r.getCell(e+1);l(n,t.style),l(n,t.cells?.[e])}}async function d(t,n){let i=new(await(r())).Workbook,a=Math.max(1,t.sheets.reduce((e,t)=>e+t.rows.length,0)),o=Math.max(1,Math.floor(a/50)),d=0;for(let r of t.sheets){let t=i.addWorksheet(r.name),s=r.columns.length;t.columns=r.columns.map((e,t)=>({key:String(t),width:e.width}));for(let e of r.before??[])u(t,e,s);let f=t.addRow(r.columns.map(e=>e.header));f.font={bold:r.headerStyle?.bold??!0},f.eachCell((e,t)=>{let n=r.columns[t-1]?.align;n&&(e.alignment={horizontal:n,vertical:`middle`}),l(e,r.headerStyle)});let p=f.number;r.freeze?t.views=[{state:`frozen`,ySplit:r.freeze.rows??0,xSplit:r.freeze.cols??0}]:r.freezeHeader!==!1&&(t.views=[{state:`frozen`,ySplit:p}]),r.rows.forEach((i,s)=>{let u=t.addRow(i),f=r.cellStyles?.[s],p=r.stripe&&s%2==1;if(r.columns.forEach((e,t)=>{let n=u.getCell(t+1);e.numFmt&&(typeof n.value==`number`||n.value instanceof Date)&&(n.numFmt=e.numFmt),e.align&&(n.alignment={horizontal:e.align,vertical:`middle`}),p&&(n.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:c(r.stripe)}}),l(n,e.style),l(n,f?.[t])}),++d%o===0){if(n.signal?.aborted)throw e();n.progress(d/a*.9)}}),r.autoFilter&&r.rows.length>0&&(t.autoFilter={from:{row:p,column:1},to:{row:p,column:s}});for(let e of r.after??[])u(t,e,s)}let f=await i.xlsx.writeBuffer();return n.progress(1),s(f)}const f={Roboto:{normal:`Roboto-Regular.ttf`,bold:`Roboto-Medium.ttf`,italics:`Roboto-Italic.ttf`,bolditalics:`Roboto-MediumItalic.ttf`}};function p(e){let t=e.hLineWidth??1,n=e.edgeLineWidth??t;return{hLineWidth:(e,r)=>e===0||e===(r.table.headerRows??0)||e===r.table.body.length?n:t,vLineWidth:()=>e.vLineWidth??1,...e.hLineColor?{hLineColor:()=>e.hLineColor}:{},...e.vLineColor?{vLineColor:()=>e.vLineColor}:{},...e.paddingX===void 0?{}:{paddingLeft:()=>e.paddingX,paddingRight:()=>e.paddingX},...e.paddingY===void 0?{}:{paddingTop:()=>e.paddingY,paddingBottom:()=>e.paddingY}}}function m(e){return(t,n)=>({text:e.text.replace(/\{page\}/g,String(t)).replace(/\{pages\}/g,String(n)),...e.font?{font:e.font}:{},alignment:e.alignment??`center`,fontSize:e.fontSize??8,...e.color?{color:e.color}:{},...e.margin?{margin:e.margin}:{}})}async function h(t,n){let r=n.pdfFonts?{fonts:{...n.pdfFonts.fonts,...t.fonts?.fonts},vfs:n.pdfFonts.vfs||t.fonts?.vfs?{...n.pdfFonts.vfs,...t.fonts?.vfs}:void 0}:t.fonts,i=t.footer?{...t.document,footer:m(t.footer)}:t.document,o=t.tableLayouts?Object.fromEntries(Object.entries(t.tableLayouts).map(([e,t])=>[e,p(t)])):void 0,{pdfMake:s,vfs:c}=await a();if(n.progress(.1),n.signal?.aborted)throw e();let l={...f,...r?.fonts??{}},u=r?.vfs?{...c??{},...r.vfs}:c,d=await new Promise((e,t)=>{try{let n=s.createPdf(i,o,l,u).getStream(),r=[];n.on(`data`,e=>r.push(e)),n.on(`error`,t),n.on(`end`,()=>{let t=new Uint8Array(r.reduce((e,t)=>e+t.byteLength,0)),n=0;for(let e of r)t.set(e,n),n+=e.byteLength;e(t.buffer)}),n.end()}catch(e){t(e)}});return n.progress(1),d}let g;const _=self;_.onmessage=async e=>{if(e.data.type===`init`){g=e.data.pdfFonts;return}let{id:n,task:r}=e.data;try{let e=await t(r,{progress:e=>_.postMessage({type:`progress`,id:n,fraction:e}),pdfFonts:g});_.postMessage({type:`done`,id:n,buffer:e},[e])}catch(e){_.postMessage({type:`error`,id:n,message:e instanceof Error?e.message:String(e)})}};
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { a as e, d as t, r as n, s as r } from "./columnValue-74XDBcVF.js";
|
|
3
|
-
import { r as i, t as a } from "./labels-BPItSeRU.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,310 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Nn as e, wn as t } from "./geometry-DG134nYI.js";
|
|
3
|
-
import { n, t as r } from "./labels-BPItSeRU.js";
|
|
4
|
-
import { createContext as i, useCallback as a, useContext as o, useEffect as s, useId as ee, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
5
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
-
import { createPortal as te } from "react-dom";
|
|
7
|
-
// src/components/Dialog/dialogOpen.tsx
|
|
8
|
-
var m = i(null), h = i(0), g = ({ children: e }) => {
|
|
9
|
-
let [t, n] = d(0), r = l(() => () => {
|
|
10
|
-
n((e) => e + 1);
|
|
11
|
-
let e = !1;
|
|
12
|
-
return () => {
|
|
13
|
-
e || (e = !0, n((e) => e - 1));
|
|
14
|
-
};
|
|
15
|
-
}, []);
|
|
16
|
-
return /* @__PURE__ */ f(m.Provider, {
|
|
17
|
-
value: r,
|
|
18
|
-
children: /* @__PURE__ */ f(h.Provider, {
|
|
19
|
-
value: t,
|
|
20
|
-
children: e
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
function ne(e) {
|
|
25
|
-
let t = o(m);
|
|
26
|
-
s(() => e && t ? t() : void 0, [e, t]);
|
|
27
|
-
}
|
|
28
|
-
var _ = () => o(h), v = () => o(h) > 0, y = i(null), b = () => o(y), x = typeof document > "u" ? s : c;
|
|
29
|
-
function S(e, t, n) {
|
|
30
|
-
let r = e?.claim;
|
|
31
|
-
x(() => r && n ? r(t) : void 0, [
|
|
32
|
-
r,
|
|
33
|
-
t,
|
|
34
|
-
n
|
|
35
|
-
]);
|
|
36
|
-
}
|
|
37
|
-
var C = {
|
|
38
|
-
root: "_root_6qxml_7",
|
|
39
|
-
nonModal: "_nonModal_6qxml_30",
|
|
40
|
-
panel: "_panel_6qxml_3",
|
|
41
|
-
center: "_center_6qxml_41",
|
|
42
|
-
right: "_right_6qxml_42",
|
|
43
|
-
left: "_left_6qxml_43",
|
|
44
|
-
top: "_top_6qxml_44",
|
|
45
|
-
bottom: "_bottom_6qxml_45",
|
|
46
|
-
sm: "_sm_6qxml_86",
|
|
47
|
-
md: "_md_6qxml_87",
|
|
48
|
-
lg: "_lg_6qxml_88",
|
|
49
|
-
xl: "_xl_6qxml_89",
|
|
50
|
-
full: "_full_6qxml_90",
|
|
51
|
-
header: "_header_6qxml_96",
|
|
52
|
-
headText: "_headText_6qxml_106",
|
|
53
|
-
title: "_title_6qxml_108",
|
|
54
|
-
subtitle: "_subtitle_6qxml_114",
|
|
55
|
-
body: "_body_6qxml_120",
|
|
56
|
-
flush: "_flush_6qxml_128",
|
|
57
|
-
footer: "_footer_6qxml_130",
|
|
58
|
-
slot: "_slot_6qxml_141",
|
|
59
|
-
close: "_close_6qxml_144",
|
|
60
|
-
dialogPop: "_dialogPop_6qxml_1",
|
|
61
|
-
slideFromRight: "_slideFromRight_6qxml_1",
|
|
62
|
-
slideFromLeft: "_slideFromLeft_6qxml_1",
|
|
63
|
-
slideFromTop: "_slideFromTop_6qxml_1",
|
|
64
|
-
slideFromBottom: "_slideFromBottom_6qxml_1",
|
|
65
|
-
backdropIn: "_backdropIn_6qxml_1",
|
|
66
|
-
closing: "_closing_6qxml_171"
|
|
67
|
-
}, w = 0, T = null, re = (e) => {
|
|
68
|
-
if (typeof document < "u") {
|
|
69
|
-
if (w === 0) {
|
|
70
|
-
let t = document.body;
|
|
71
|
-
T = {
|
|
72
|
-
overflow: t.style.overflow,
|
|
73
|
-
paddingRight: t.style.paddingRight
|
|
74
|
-
};
|
|
75
|
-
let n = window.innerWidth - document.documentElement.clientWidth;
|
|
76
|
-
if (e && n > 0) {
|
|
77
|
-
let e = parseFloat(window.getComputedStyle(t).paddingRight) || 0;
|
|
78
|
-
t.style.paddingRight = `${e + n}px`;
|
|
79
|
-
}
|
|
80
|
-
t.style.overflow = "hidden";
|
|
81
|
-
}
|
|
82
|
-
w += 1;
|
|
83
|
-
}
|
|
84
|
-
}, ie = () => {
|
|
85
|
-
typeof document < "u" && (w = Math.max(0, w - 1), w === 0 && T && (document.body.style.overflow = T.overflow, document.body.style.paddingRight = T.paddingRight, T = null));
|
|
86
|
-
}, ae = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, oe = /* @__PURE__ */ p("svg", {
|
|
87
|
-
width: "16",
|
|
88
|
-
height: "16",
|
|
89
|
-
viewBox: "0 0 24 24",
|
|
90
|
-
fill: "none",
|
|
91
|
-
stroke: "currentColor",
|
|
92
|
-
strokeWidth: "2",
|
|
93
|
-
strokeLinecap: "round",
|
|
94
|
-
"aria-hidden": "true",
|
|
95
|
-
children: [/* @__PURE__ */ f("line", {
|
|
96
|
-
x1: "18",
|
|
97
|
-
y1: "6",
|
|
98
|
-
x2: "6",
|
|
99
|
-
y2: "18"
|
|
100
|
-
}), /* @__PURE__ */ f("line", {
|
|
101
|
-
x1: "6",
|
|
102
|
-
y1: "6",
|
|
103
|
-
x2: "18",
|
|
104
|
-
y2: "18"
|
|
105
|
-
})]
|
|
106
|
-
}), se = 0, E = "button:not([disabled]),a[href],input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"]),[contenteditable=\"true\"]", D = ({ open: n, onClose: r, onBeforeClose: i, onEscKeyDown: o, onOverlayClick: m, onAnimationEnd: h, children: g, title: _, subtitle: v, footer: b, modal: x = !0, placement: S = "center", size: w = "md", closeOnBackdrop: T = !0, closeOnEscape: D = !0, showCloseButton: O = !0, closeIcon: ce, closeIconId: le, blockScroll: k = !0, reserveScrollBarGap: A = !0, initialFocusRef: j, container: ue, animationDuration: de = 200, padded: fe = !0, classNames: M = {}, styleSlots: N = {}, className: pe = "", style: me, role: he = "dialog", id: ge, "aria-label": P, "aria-labelledby": _e, "aria-describedby": ve }) => {
|
|
107
|
-
let ye = e(), F = u(null), [be, xe] = d(null), I = ee(), [L, R] = d({
|
|
108
|
-
header: 0,
|
|
109
|
-
footer: 0
|
|
110
|
-
}), [z, Se] = d(null), [B, Ce] = d(null), V = a((e) => (R((t) => ({
|
|
111
|
-
...t,
|
|
112
|
-
[e]: t[e] + 1
|
|
113
|
-
})), () => R((t) => ({
|
|
114
|
-
...t,
|
|
115
|
-
[e]: t[e] - 1
|
|
116
|
-
}))), []), we = l(() => ({
|
|
117
|
-
headerEl: z,
|
|
118
|
-
footerEl: B,
|
|
119
|
-
claim: V
|
|
120
|
-
}), [
|
|
121
|
-
z,
|
|
122
|
-
B,
|
|
123
|
-
V
|
|
124
|
-
]), [H, U] = d(n), [Te, W] = d(!1), [G, K] = d(!1), q = u(null), J = u(n);
|
|
125
|
-
J.current = n;
|
|
126
|
-
let Y = u(null), Ee = ae() ? 0 : de;
|
|
127
|
-
ne(H), s(() => {
|
|
128
|
-
n ? (Y.current &&= (clearTimeout(Y.current), null), W(!1), U(!0)) : H && (W(!0), Y.current = setTimeout(() => {
|
|
129
|
-
F.current?.close(), U(!1), K(!1), W(!1), h?.();
|
|
130
|
-
}, Ee));
|
|
131
|
-
}, [n]), s(() => () => {
|
|
132
|
-
Y.current && clearTimeout(Y.current);
|
|
133
|
-
}, []);
|
|
134
|
-
let X = a(() => {
|
|
135
|
-
i && i() === !1 || r?.();
|
|
136
|
-
}, [i, r]);
|
|
137
|
-
c(() => {
|
|
138
|
-
let e = F.current;
|
|
139
|
-
if (e && H) {
|
|
140
|
-
if (!e.open) {
|
|
141
|
-
let t = document.activeElement;
|
|
142
|
-
q.current = t instanceof HTMLElement && t !== document.body ? t : null, x && (e.dataset.modalOrder = String(++se)), x ? e.showModal() : e.show();
|
|
143
|
-
}
|
|
144
|
-
K(!0);
|
|
145
|
-
}
|
|
146
|
-
}, [H, x]), c(() => {
|
|
147
|
-
let e = F.current;
|
|
148
|
-
if (!e || !G) return;
|
|
149
|
-
if (j?.current) {
|
|
150
|
-
j.current.focus({ focusVisible: !0 });
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
let t = document.activeElement;
|
|
154
|
-
t && t !== e && e.contains(t) || e.querySelector(E)?.focus();
|
|
155
|
-
}, [G]), c(() => () => {
|
|
156
|
-
let e = F.current, t = q.current;
|
|
157
|
-
if (!e?.open || !t) return;
|
|
158
|
-
let n = document.activeElement;
|
|
159
|
-
(!n || n === document.body || e.contains(n)) && queueMicrotask(() => {
|
|
160
|
-
let e = document.activeElement;
|
|
161
|
-
t.isConnected && (!e || e === document.body) && t.focus({ preventScroll: !0 });
|
|
162
|
-
});
|
|
163
|
-
}, []), s(() => {
|
|
164
|
-
if (H && k && x) return re(A), () => ie();
|
|
165
|
-
}, [
|
|
166
|
-
H,
|
|
167
|
-
x,
|
|
168
|
-
k,
|
|
169
|
-
A
|
|
170
|
-
]), s(() => {
|
|
171
|
-
let e = F.current;
|
|
172
|
-
if (!e || !H) return;
|
|
173
|
-
let t = (t) => {
|
|
174
|
-
t.key !== "Escape" || t.defaultPrevented || t.isComposing || t.target instanceof Node && e.contains(t.target) && (t.preventDefault(), o?.(t), D && X());
|
|
175
|
-
}, n = (e) => {
|
|
176
|
-
e.preventDefault(), o?.(e), D && X();
|
|
177
|
-
}, r = () => {
|
|
178
|
-
J.current && !e.open && e.isConnected && (x ? e.showModal() : e.show(), e.querySelector(E)?.focus());
|
|
179
|
-
}, i = e.ownerDocument.defaultView ?? window;
|
|
180
|
-
return i.addEventListener("keydown", t), e.addEventListener("cancel", n), e.addEventListener("close", r), () => {
|
|
181
|
-
i.removeEventListener("keydown", t), e.removeEventListener("cancel", n), e.removeEventListener("close", r);
|
|
182
|
-
};
|
|
183
|
-
}, [
|
|
184
|
-
H,
|
|
185
|
-
x,
|
|
186
|
-
D,
|
|
187
|
-
X,
|
|
188
|
-
o
|
|
189
|
-
]);
|
|
190
|
-
let Z = u(!1), De = (e) => {
|
|
191
|
-
Z.current = e.target === F.current;
|
|
192
|
-
}, Oe = (e) => {
|
|
193
|
-
let t = Z.current && e.target === F.current;
|
|
194
|
-
Z.current = !1, t && (m?.(e), T && X());
|
|
195
|
-
};
|
|
196
|
-
if (!H) return null;
|
|
197
|
-
let Q = L.header > 0, ke = L.footer > 0, Ae = _ !== void 0 || v !== void 0, je = Ae || O || Q, Me = _e ?? ((_ !== void 0 || Q) && !P ? I : void 0), Ne = /* @__PURE__ */ f("dialog", {
|
|
198
|
-
ref: (e) => {
|
|
199
|
-
F.current = e, xe(e);
|
|
200
|
-
},
|
|
201
|
-
id: ge,
|
|
202
|
-
"data-modal": x ? "" : void 0,
|
|
203
|
-
className: [
|
|
204
|
-
C.root,
|
|
205
|
-
C[S],
|
|
206
|
-
C[w],
|
|
207
|
-
x ? "" : C.nonModal,
|
|
208
|
-
Te ? C.closing : "",
|
|
209
|
-
M.root,
|
|
210
|
-
pe
|
|
211
|
-
].filter(Boolean).join(" "),
|
|
212
|
-
style: {
|
|
213
|
-
"--dialog-anim": `${Ee}ms`,
|
|
214
|
-
...N.root,
|
|
215
|
-
...me
|
|
216
|
-
},
|
|
217
|
-
role: he,
|
|
218
|
-
"aria-label": P,
|
|
219
|
-
"aria-labelledby": Me,
|
|
220
|
-
"aria-describedby": ve,
|
|
221
|
-
"aria-modal": x || void 0,
|
|
222
|
-
onPointerDown: De,
|
|
223
|
-
onPointerUp: Oe,
|
|
224
|
-
children: /* @__PURE__ */ f(t.Provider, {
|
|
225
|
-
value: be,
|
|
226
|
-
children: /* @__PURE__ */ f(y.Provider, {
|
|
227
|
-
value: we,
|
|
228
|
-
children: G && /* @__PURE__ */ p("div", {
|
|
229
|
-
className: [C.panel, M.panel].filter(Boolean).join(" "),
|
|
230
|
-
style: N.panel,
|
|
231
|
-
children: [
|
|
232
|
-
je && /* @__PURE__ */ p("div", {
|
|
233
|
-
className: [C.header, M.header].filter(Boolean).join(" "),
|
|
234
|
-
style: N.header,
|
|
235
|
-
children: [
|
|
236
|
-
(Ae || !Q) && /* @__PURE__ */ p("span", {
|
|
237
|
-
className: C.headText,
|
|
238
|
-
children: [_ !== void 0 && /* @__PURE__ */ f("span", {
|
|
239
|
-
className: C.title,
|
|
240
|
-
id: I,
|
|
241
|
-
children: _
|
|
242
|
-
}), v !== void 0 && /* @__PURE__ */ f("span", {
|
|
243
|
-
className: C.subtitle,
|
|
244
|
-
children: v
|
|
245
|
-
})]
|
|
246
|
-
}),
|
|
247
|
-
Q && /* @__PURE__ */ f("div", {
|
|
248
|
-
ref: Se,
|
|
249
|
-
className: C.slot,
|
|
250
|
-
id: _ === void 0 ? I : void 0
|
|
251
|
-
}),
|
|
252
|
-
O && /* @__PURE__ */ f("button", {
|
|
253
|
-
type: "button",
|
|
254
|
-
id: le,
|
|
255
|
-
className: [C.close, M.closeButton].filter(Boolean).join(" "),
|
|
256
|
-
style: N.closeButton,
|
|
257
|
-
onClick: X,
|
|
258
|
-
"aria-label": ye.dialog.close,
|
|
259
|
-
children: ce ?? oe
|
|
260
|
-
})
|
|
261
|
-
]
|
|
262
|
-
}),
|
|
263
|
-
g !== void 0 && /* @__PURE__ */ f("div", {
|
|
264
|
-
className: [
|
|
265
|
-
C.body,
|
|
266
|
-
fe ? "scroll-fade-y scroll-gutter" : `${C.flush} scroll-fade-y`,
|
|
267
|
-
M.body
|
|
268
|
-
].filter(Boolean).join(" "),
|
|
269
|
-
style: N.body,
|
|
270
|
-
children: g
|
|
271
|
-
}),
|
|
272
|
-
(b !== void 0 || ke) && /* @__PURE__ */ p("div", {
|
|
273
|
-
className: [C.footer, M.footer].filter(Boolean).join(" "),
|
|
274
|
-
style: N.footer,
|
|
275
|
-
children: [b, ke && /* @__PURE__ */ f("div", {
|
|
276
|
-
ref: Ce,
|
|
277
|
-
className: C.slot
|
|
278
|
-
})]
|
|
279
|
-
})
|
|
280
|
-
]
|
|
281
|
-
})
|
|
282
|
-
})
|
|
283
|
-
})
|
|
284
|
-
}), $ = ue ?? (typeof document > "u" ? null : document.body);
|
|
285
|
-
return $ ? te(Ne, $) : null;
|
|
286
|
-
};
|
|
287
|
-
D.displayName = "Dialog";
|
|
288
|
-
var O = i({
|
|
289
|
-
authorize: () => !0,
|
|
290
|
-
exportOptions: {},
|
|
291
|
-
serverMode: !1,
|
|
292
|
-
labels: r,
|
|
293
|
-
format: n(),
|
|
294
|
-
text: {
|
|
295
|
-
yes: r.yes,
|
|
296
|
-
no: r.no
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
function ce() {
|
|
300
|
-
return o(O);
|
|
301
|
-
}
|
|
302
|
-
function le() {
|
|
303
|
-
return o(O).labels;
|
|
304
|
-
}
|
|
305
|
-
function k(e, t, n) {
|
|
306
|
-
return !e || e(t, n) !== !1;
|
|
307
|
-
}
|
|
308
|
-
// src/components/DataTable/layout/scrollArea.ts
|
|
309
|
-
var A = "dt-scroll-area scroll-fade-y scroll-gutter", j = "dt-scroll-area scroll-fade-x scroll-fade-y scroll-gutter";
|
|
310
|
-
export { le as a, S as c, v as d, _ as f, k as i, b as l, A as n, ce as o, O as r, D as s, j as t, g as u };
|