@ostack.tech/ui 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{en-Czf-_HZt.js → en-MXAz48KY.js} +2 -1
- package/dist/chunks/{en-Czf-_HZt.js.map → en-MXAz48KY.js.map} +1 -1
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +1 -0
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +1 -0
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +89 -84
- package/dist/ostack-ui.js +1073 -993
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +1 -1
- package/scss/components/Calendar/_Calendar-variables.scss +1 -1
- package/scss/components/Calendar/_Calendar.scss +15 -16
- package/scss/components/ControlAddon/_ControlAddon.scss +3 -5
- package/scss/components/DataTable/_DataTable.scss +7 -2
- package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -1
- package/scss/components/Feedback/_Feedback.scss +2 -0
- package/scss/components/Field/_Field.scss +0 -1
- package/scss/components/HelperText/_HelperText.scss +2 -1
- package/scss/components/Input/_Input.scss +1 -1
- package/scss/components/Label/_Label.scss +1 -0
- package/scss/components/Link/_Link.scss +1 -1
- package/scss/components/Root/_Root.scss +1 -1
- package/scss/components/Stack/_Stack.scss +1 -1
- package/scss/components/Table/_Table.scss +23 -9
- package/scss/components/Tabs/_Tabs.scss +2 -2
- package/scss/scss/helpers/_margin-utils.scss +13 -11
- package/scss/scss/helpers/_padding-utils.scss +13 -11
- package/scss/scss/helpers/_print-utils.scss +3 -1
- package/scss/scss/helpers/_sizing-utils.scss +19 -17
- package/scss/scss/helpers/_text-utils.scss +19 -17
- package/scss/scss/helpers/_visually-hidden.scss +1 -1
- package/scss/scss/utils/_button-reset.scss +1 -1
- package/types/components/Form/FormError.d.ts +1 -1
- package/types/components/Keybinds/KeyPress.d.ts +3 -3
- package/types/components/Keybinds/Keybind.d.ts +2 -2
- package/types/components/Keybinds/Keybinds.d.ts +1 -1
- package/types/components/Printer/Printer.d.ts +2 -2
- package/types/components/Printer/PrinterContentContext.d.ts +4 -16
- package/types/components/Printer/PrinterContext.d.ts +1 -2
- package/types/components/Printer/index.d.ts +1 -1
- package/types/components/Printer/usePrintClassNames.d.ts +6 -2
- package/types/components/Table/TableContext.d.ts +2 -0
- package/types/components/Table/columnUtils.d.ts +4 -0
- package/types/index.d.ts +1 -0
- package/types/utils/useIntersectionObserver.d.ts +6 -2
- package/types/utils/useResizeObserver.d.ts +6 -0
package/dist/ostack-ui.js
CHANGED
|
@@ -224,7 +224,7 @@ function PrefixProvider(t0) {
|
|
|
224
224
|
/** Hook which returns a function which can be used to prefix a string with the current prefix. */
|
|
225
225
|
function usePrefix() {
|
|
226
226
|
const $ = c(2);
|
|
227
|
-
const defaultPrefix_0 = useStore(defaultPrefixStore, _temp$
|
|
227
|
+
const defaultPrefix_0 = useStore(defaultPrefixStore, _temp$60);
|
|
228
228
|
const prefix = useContext(PrefixContext) ?? defaultPrefix_0;
|
|
229
229
|
let t0;
|
|
230
230
|
if ($[0] !== prefix) {
|
|
@@ -236,7 +236,7 @@ function usePrefix() {
|
|
|
236
236
|
} else t0 = $[1];
|
|
237
237
|
return t0;
|
|
238
238
|
}
|
|
239
|
-
function _temp$
|
|
239
|
+
function _temp$60(t0) {
|
|
240
240
|
const { defaultPrefix } = t0;
|
|
241
241
|
return defaultPrefix;
|
|
242
242
|
}
|
|
@@ -294,7 +294,7 @@ function useMediaQuery(query, options) {
|
|
|
294
294
|
let subscribe;
|
|
295
295
|
if (!matchMedia) {
|
|
296
296
|
getSnapshot = getDefaultSnapshot;
|
|
297
|
-
subscribe = _temp2$
|
|
297
|
+
subscribe = _temp2$36;
|
|
298
298
|
} else {
|
|
299
299
|
const isWindowMatchMedia = matchMedia === window.matchMedia;
|
|
300
300
|
let queryData;
|
|
@@ -364,10 +364,10 @@ function useMediaQuery(query, options) {
|
|
|
364
364
|
function _temp3$20(notify) {
|
|
365
365
|
return notify();
|
|
366
366
|
}
|
|
367
|
-
function _temp2$
|
|
368
|
-
return _temp$
|
|
367
|
+
function _temp2$36() {
|
|
368
|
+
return _temp$59;
|
|
369
369
|
}
|
|
370
|
-
function _temp$
|
|
370
|
+
function _temp$59() {}
|
|
371
371
|
// src/utils/breakpoints.ts
|
|
372
372
|
/** Available breakpoints. */
|
|
373
373
|
var BREAKPOINTS = {
|
|
@@ -1346,61 +1346,29 @@ function usePrinting() {
|
|
|
1346
1346
|
return usePrinterContentContext().printing;
|
|
1347
1347
|
}
|
|
1348
1348
|
/**
|
|
1349
|
-
*
|
|
1350
|
-
* finishes. The printer will wait for any ongoing printing tasks before printing.
|
|
1349
|
+
* Prevents printing from happening while `pending` is `true`.
|
|
1351
1350
|
*
|
|
1352
|
-
* > **Note:** This hook **can** be called outside the printer context, in which case
|
|
1353
|
-
* > starting/finishing printing tasks will be no-ops but **won't** fail.
|
|
1351
|
+
* > **Note:** This hook **can** be called outside the printer context, in which case it is a no-op.
|
|
1354
1352
|
*/
|
|
1355
|
-
function
|
|
1356
|
-
const $ = c(
|
|
1353
|
+
function usePrintingTask(pending) {
|
|
1354
|
+
const $ = c(4);
|
|
1355
|
+
const { startPrintingTask } = usePrinterContentContext();
|
|
1356
|
+
let t0;
|
|
1357
1357
|
let t1;
|
|
1358
|
-
if ($[0] !==
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
$[1] = t1;
|
|
1362
|
-
} else t1 = $[1];
|
|
1363
|
-
const { enabled: t2 } = t1;
|
|
1364
|
-
const enabled = t2 === void 0 ? true : t2;
|
|
1365
|
-
const { startPrintingTask, finishPrintingTask } = usePrinterContentContext();
|
|
1366
|
-
const finishedRef = useRef(true);
|
|
1367
|
-
let t3;
|
|
1368
|
-
if ($[2] !== finishPrintingTask) {
|
|
1369
|
-
t3 = () => {
|
|
1370
|
-
if (!finishedRef.current) {
|
|
1371
|
-
finishedRef.current = true;
|
|
1372
|
-
finishPrintingTask?.();
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
$[2] = finishPrintingTask;
|
|
1376
|
-
$[3] = t3;
|
|
1377
|
-
} else t3 = $[3];
|
|
1378
|
-
const finish = t3;
|
|
1379
|
-
let t4;
|
|
1380
|
-
let t5;
|
|
1381
|
-
if ($[4] !== enabled || $[5] !== finish || $[6] !== startPrintingTask) {
|
|
1382
|
-
t4 = () => {
|
|
1383
|
-
if (!enabled || !startPrintingTask) return;
|
|
1384
|
-
startPrintingTask();
|
|
1385
|
-
finishedRef.current = false;
|
|
1386
|
-
return finish;
|
|
1358
|
+
if ($[0] !== pending || $[1] !== startPrintingTask) {
|
|
1359
|
+
t0 = () => {
|
|
1360
|
+
if (pending && startPrintingTask) return startPrintingTask();
|
|
1387
1361
|
};
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
];
|
|
1393
|
-
$[4] = enabled;
|
|
1394
|
-
$[5] = finish;
|
|
1395
|
-
$[6] = startPrintingTask;
|
|
1396
|
-
$[7] = t4;
|
|
1397
|
-
$[8] = t5;
|
|
1362
|
+
t1 = [pending, startPrintingTask];
|
|
1363
|
+
$[0] = pending;
|
|
1364
|
+
$[1] = startPrintingTask;
|
|
1365
|
+
$[2] = t0;
|
|
1366
|
+
$[3] = t1;
|
|
1398
1367
|
} else {
|
|
1399
|
-
|
|
1400
|
-
|
|
1368
|
+
t0 = $[2];
|
|
1369
|
+
t1 = $[3];
|
|
1401
1370
|
}
|
|
1402
|
-
useSafeLayoutEffect(
|
|
1403
|
-
return finish;
|
|
1371
|
+
useSafeLayoutEffect(t0, t1);
|
|
1404
1372
|
}
|
|
1405
1373
|
// src/components/DataTable/keyUtils.ts
|
|
1406
1374
|
/** Returns the key of a row. */
|
|
@@ -1409,7 +1377,9 @@ function getRowKey(row, rowKey) {
|
|
|
1409
1377
|
}
|
|
1410
1378
|
/** Compare table row keys. */
|
|
1411
1379
|
function compareRowKeys(k1, k2) {
|
|
1412
|
-
|
|
1380
|
+
const s1 = String(k1);
|
|
1381
|
+
const s2 = String(k2);
|
|
1382
|
+
return s1 < s2 ? -1 : s1 > s2 ? 1 : 0;
|
|
1413
1383
|
}
|
|
1414
1384
|
// src/utils/filtering.ts
|
|
1415
1385
|
/**
|
|
@@ -1567,15 +1537,14 @@ function spliceWindow(totalCount, offset, limit, window, startIndex, deleted = 0
|
|
|
1567
1537
|
var DataTableContext = createContext(null);
|
|
1568
1538
|
/** Hook which creates the data table context value. */
|
|
1569
1539
|
function useCreateDataTableContext(t0) {
|
|
1570
|
-
const $ = c(
|
|
1540
|
+
const $ = c(90);
|
|
1571
1541
|
const { displayMode, columns, rows, onVisibleRowsChange, onProcessedRowsChange, getRows, rowKey, loadingCount, required, loading, renderRow, renderCell, dynamicRowHeight, estimatedRowHeight, overscan, showAllRowsWhilePrinting, apiRef, leafColumns, headCount, defaultOffset, offset, onOffsetChange, defaultLimit, limit, onLimitChange, defaultFilter, filter, onFilterChange, defaultSortBy, sortBy, defaultSortDirection, sortDirection, onSort, showSelectionColumn, selectionMode, defaultSelectedRows, selectedRows, onSelectedRowsChange, selectAllChecked, onSelectAll, disabledSelections, selectAllRowsLabel, selectRowLabel } = t0;
|
|
1572
1542
|
const [locale] = useLocale();
|
|
1573
|
-
const { startPrintingTask
|
|
1543
|
+
const { startPrintingTask } = usePrinterContentContext();
|
|
1574
1544
|
let t1;
|
|
1575
|
-
if ($[0] !==
|
|
1545
|
+
if ($[0] !== onFilterChange || $[1] !== onLimitChange || $[2] !== onOffsetChange || $[3] !== onProcessedRowsChange || $[4] !== onSelectedRowsChange || $[5] !== onSort || $[6] !== onVisibleRowsChange || $[7] !== startPrintingTask) {
|
|
1576
1546
|
t1 = {
|
|
1577
1547
|
startPrintingTask,
|
|
1578
|
-
finishPrintingTask,
|
|
1579
1548
|
onVisibleRowsChange,
|
|
1580
1549
|
onProcessedRowsChange,
|
|
1581
1550
|
onOffsetChange,
|
|
@@ -1584,30 +1553,29 @@ function useCreateDataTableContext(t0) {
|
|
|
1584
1553
|
onFilterChange,
|
|
1585
1554
|
onSelectedRowsChange
|
|
1586
1555
|
};
|
|
1587
|
-
$[0] =
|
|
1588
|
-
$[1] =
|
|
1589
|
-
$[2] =
|
|
1590
|
-
$[3] =
|
|
1591
|
-
$[4] =
|
|
1592
|
-
$[5] =
|
|
1593
|
-
$[6] =
|
|
1594
|
-
$[7] =
|
|
1595
|
-
$[8] =
|
|
1596
|
-
|
|
1597
|
-
} else t1 = $[9];
|
|
1556
|
+
$[0] = onFilterChange;
|
|
1557
|
+
$[1] = onLimitChange;
|
|
1558
|
+
$[2] = onOffsetChange;
|
|
1559
|
+
$[3] = onProcessedRowsChange;
|
|
1560
|
+
$[4] = onSelectedRowsChange;
|
|
1561
|
+
$[5] = onSort;
|
|
1562
|
+
$[6] = onVisibleRowsChange;
|
|
1563
|
+
$[7] = startPrintingTask;
|
|
1564
|
+
$[8] = t1;
|
|
1565
|
+
} else t1 = $[8];
|
|
1598
1566
|
const latestRef = useLatestRef(t1);
|
|
1599
1567
|
let t2;
|
|
1600
|
-
if ($[
|
|
1568
|
+
if ($[9] !== columns || $[10] !== defaultFilter || $[11] !== defaultLimit || $[12] !== defaultOffset || $[13] !== defaultSelectedRows || $[14] !== defaultSortBy || $[15] !== defaultSortDirection || $[16] !== disabledSelections || $[17] !== displayMode || $[18] !== filter || $[19] !== getRows || $[20] !== headCount || $[21] !== latestRef || $[22] !== leafColumns || $[23] !== limit || $[24] !== loading || $[25] !== loadingCount || $[26] !== locale.languageTag || $[27] !== offset || $[28] !== rows || $[29] !== selectedRows || $[30] !== selectionMode || $[31] !== sortBy || $[32] !== sortDirection) {
|
|
1601
1569
|
t2 = () => {
|
|
1602
1570
|
const initialSortBy = sortBy ?? defaultSortBy;
|
|
1603
1571
|
return createStore()(subscribeWithSelector((set, get) => ({
|
|
1604
1572
|
columns,
|
|
1605
1573
|
leafColumns,
|
|
1606
|
-
hasFooterCells: computed(() => [get().leafColumns], _temp2$
|
|
1574
|
+
hasFooterCells: computed(() => [get().leafColumns], _temp2$35),
|
|
1607
1575
|
headCount,
|
|
1608
1576
|
_offset: offset ?? defaultOffset,
|
|
1609
1577
|
offset: computed(() => [get()._offset, get().totalCount()], _temp3$19),
|
|
1610
|
-
currentPage: computed(() => [get().offset(), get().limit()], _temp4$
|
|
1578
|
+
currentPage: computed(() => [get().offset(), get().limit()], _temp4$9),
|
|
1611
1579
|
pageOffset: computed(() => [get().currentPage(), get().limit()], _temp5$6),
|
|
1612
1580
|
limitOptions: void 0,
|
|
1613
1581
|
_limit: limit ?? defaultLimit,
|
|
@@ -1808,13 +1776,13 @@ function useCreateDataTableContext(t0) {
|
|
|
1808
1776
|
});
|
|
1809
1777
|
};
|
|
1810
1778
|
if (isPromiseLike(result)) {
|
|
1811
|
-
const { startPrintingTask: startPrintingTask_0
|
|
1812
|
-
startPrintingTask_0?.();
|
|
1779
|
+
const { startPrintingTask: startPrintingTask_0 } = latestRef.current;
|
|
1780
|
+
const finishPrintingTask = startPrintingTask_0?.();
|
|
1813
1781
|
result.then((result_0) => {
|
|
1814
|
-
|
|
1782
|
+
finishPrintingTask?.();
|
|
1815
1783
|
if (!abortController.signal.aborted) cacheRows(result_0);
|
|
1816
1784
|
}, (err) => {
|
|
1817
|
-
|
|
1785
|
+
finishPrintingTask?.();
|
|
1818
1786
|
if (!(err instanceof DOMException) || err.name !== "AbortError") throw err;
|
|
1819
1787
|
});
|
|
1820
1788
|
} else cacheRows(result);
|
|
@@ -1855,100 +1823,100 @@ function useCreateDataTableContext(t0) {
|
|
|
1855
1823
|
}
|
|
1856
1824
|
})));
|
|
1857
1825
|
};
|
|
1858
|
-
$[
|
|
1859
|
-
$[
|
|
1860
|
-
$[
|
|
1861
|
-
$[
|
|
1862
|
-
$[
|
|
1863
|
-
$[
|
|
1864
|
-
$[
|
|
1865
|
-
$[
|
|
1866
|
-
$[
|
|
1867
|
-
$[
|
|
1868
|
-
$[
|
|
1869
|
-
$[
|
|
1870
|
-
$[
|
|
1871
|
-
$[
|
|
1872
|
-
$[
|
|
1873
|
-
$[
|
|
1874
|
-
$[
|
|
1875
|
-
$[
|
|
1876
|
-
$[
|
|
1877
|
-
$[
|
|
1878
|
-
$[
|
|
1879
|
-
$[
|
|
1880
|
-
$[
|
|
1881
|
-
$[
|
|
1882
|
-
$[
|
|
1883
|
-
} else t2 = $[
|
|
1826
|
+
$[9] = columns;
|
|
1827
|
+
$[10] = defaultFilter;
|
|
1828
|
+
$[11] = defaultLimit;
|
|
1829
|
+
$[12] = defaultOffset;
|
|
1830
|
+
$[13] = defaultSelectedRows;
|
|
1831
|
+
$[14] = defaultSortBy;
|
|
1832
|
+
$[15] = defaultSortDirection;
|
|
1833
|
+
$[16] = disabledSelections;
|
|
1834
|
+
$[17] = displayMode;
|
|
1835
|
+
$[18] = filter;
|
|
1836
|
+
$[19] = getRows;
|
|
1837
|
+
$[20] = headCount;
|
|
1838
|
+
$[21] = latestRef;
|
|
1839
|
+
$[22] = leafColumns;
|
|
1840
|
+
$[23] = limit;
|
|
1841
|
+
$[24] = loading;
|
|
1842
|
+
$[25] = loadingCount;
|
|
1843
|
+
$[26] = locale.languageTag;
|
|
1844
|
+
$[27] = offset;
|
|
1845
|
+
$[28] = rows;
|
|
1846
|
+
$[29] = selectedRows;
|
|
1847
|
+
$[30] = selectionMode;
|
|
1848
|
+
$[31] = sortBy;
|
|
1849
|
+
$[32] = sortDirection;
|
|
1850
|
+
$[33] = t2;
|
|
1851
|
+
} else t2 = $[33];
|
|
1884
1852
|
const store = useConstant(t2);
|
|
1885
1853
|
let t3;
|
|
1886
1854
|
let t4;
|
|
1887
|
-
if ($[
|
|
1855
|
+
if ($[34] !== getRows || $[35] !== store) {
|
|
1888
1856
|
t3 = () => {
|
|
1889
1857
|
if (store.getState().getRows !== getRows) store.getState().actions.setGetRows(getRows);
|
|
1890
1858
|
};
|
|
1891
1859
|
t4 = [getRows, store];
|
|
1892
|
-
$[
|
|
1893
|
-
$[
|
|
1894
|
-
$[
|
|
1895
|
-
$[
|
|
1860
|
+
$[34] = getRows;
|
|
1861
|
+
$[35] = store;
|
|
1862
|
+
$[36] = t3;
|
|
1863
|
+
$[37] = t4;
|
|
1896
1864
|
} else {
|
|
1897
|
-
t3 = $[
|
|
1898
|
-
t4 = $[
|
|
1865
|
+
t3 = $[36];
|
|
1866
|
+
t4 = $[37];
|
|
1899
1867
|
}
|
|
1900
1868
|
useEffect(t3, t4);
|
|
1901
1869
|
let t5;
|
|
1902
1870
|
let t6;
|
|
1903
|
-
if ($[
|
|
1871
|
+
if ($[38] !== offset || $[39] !== store) {
|
|
1904
1872
|
t5 = () => {
|
|
1905
1873
|
if (offset !== void 0 && offset !== store.getState()._offset) store.getState().actions.setOffset(offset);
|
|
1906
1874
|
};
|
|
1907
1875
|
t6 = [offset, store];
|
|
1908
|
-
$[
|
|
1909
|
-
$[
|
|
1910
|
-
$[
|
|
1911
|
-
$[
|
|
1876
|
+
$[38] = offset;
|
|
1877
|
+
$[39] = store;
|
|
1878
|
+
$[40] = t5;
|
|
1879
|
+
$[41] = t6;
|
|
1912
1880
|
} else {
|
|
1913
|
-
t5 = $[
|
|
1914
|
-
t6 = $[
|
|
1881
|
+
t5 = $[40];
|
|
1882
|
+
t6 = $[41];
|
|
1915
1883
|
}
|
|
1916
1884
|
useEffect(t5, t6);
|
|
1917
1885
|
let t7;
|
|
1918
1886
|
let t8;
|
|
1919
|
-
if ($[
|
|
1887
|
+
if ($[42] !== limit || $[43] !== store) {
|
|
1920
1888
|
t7 = () => {
|
|
1921
1889
|
if (limit !== void 0 && limit !== store.getState()._limit) store.getState().actions.setLimit(limit);
|
|
1922
1890
|
};
|
|
1923
1891
|
t8 = [limit, store];
|
|
1924
|
-
$[
|
|
1925
|
-
$[
|
|
1926
|
-
$[
|
|
1927
|
-
$[
|
|
1892
|
+
$[42] = limit;
|
|
1893
|
+
$[43] = store;
|
|
1894
|
+
$[44] = t7;
|
|
1895
|
+
$[45] = t8;
|
|
1928
1896
|
} else {
|
|
1929
|
-
t7 = $[
|
|
1930
|
-
t8 = $[
|
|
1897
|
+
t7 = $[44];
|
|
1898
|
+
t8 = $[45];
|
|
1931
1899
|
}
|
|
1932
1900
|
useEffect(t7, t8);
|
|
1933
1901
|
let t10;
|
|
1934
1902
|
let t9;
|
|
1935
|
-
if ($[
|
|
1903
|
+
if ($[46] !== filter || $[47] !== store) {
|
|
1936
1904
|
t9 = () => {
|
|
1937
1905
|
if (filter !== void 0 && filter !== store.getState().filter) store.getState().actions.setFilter(filter);
|
|
1938
1906
|
};
|
|
1939
1907
|
t10 = [filter, store];
|
|
1940
|
-
$[
|
|
1941
|
-
$[
|
|
1942
|
-
$[
|
|
1943
|
-
$[
|
|
1908
|
+
$[46] = filter;
|
|
1909
|
+
$[47] = store;
|
|
1910
|
+
$[48] = t10;
|
|
1911
|
+
$[49] = t9;
|
|
1944
1912
|
} else {
|
|
1945
|
-
t10 = $[
|
|
1946
|
-
t9 = $[
|
|
1913
|
+
t10 = $[48];
|
|
1914
|
+
t9 = $[49];
|
|
1947
1915
|
}
|
|
1948
1916
|
useEffect(t9, t10);
|
|
1949
1917
|
let t11;
|
|
1950
1918
|
let t12;
|
|
1951
|
-
if ($[
|
|
1919
|
+
if ($[50] !== sortBy || $[51] !== sortDirection || $[52] !== store) {
|
|
1952
1920
|
t11 = () => {
|
|
1953
1921
|
if ((sortBy !== void 0 || sortDirection !== void 0) && (sortBy !== store.getState().sortBy || sortDirection !== store.getState().sortDirection)) store.getState().actions.setSort(sortBy === void 0 ? store.getState().sortBy : sortBy, sortDirection ?? store.getState().sortDirection);
|
|
1954
1922
|
};
|
|
@@ -1957,19 +1925,19 @@ function useCreateDataTableContext(t0) {
|
|
|
1957
1925
|
sortDirection,
|
|
1958
1926
|
store
|
|
1959
1927
|
];
|
|
1960
|
-
$[
|
|
1961
|
-
$[
|
|
1962
|
-
$[
|
|
1963
|
-
$[
|
|
1964
|
-
$[
|
|
1928
|
+
$[50] = sortBy;
|
|
1929
|
+
$[51] = sortDirection;
|
|
1930
|
+
$[52] = store;
|
|
1931
|
+
$[53] = t11;
|
|
1932
|
+
$[54] = t12;
|
|
1965
1933
|
} else {
|
|
1966
|
-
t11 = $[
|
|
1967
|
-
t12 = $[
|
|
1934
|
+
t11 = $[53];
|
|
1935
|
+
t12 = $[54];
|
|
1968
1936
|
}
|
|
1969
1937
|
useEffect(t11, t12);
|
|
1970
1938
|
let t13;
|
|
1971
1939
|
let t14;
|
|
1972
|
-
if ($[
|
|
1940
|
+
if ($[55] !== columns || $[56] !== disabledSelections || $[57] !== headCount || $[58] !== leafColumns || $[59] !== loading || $[60] !== loadingCount || $[61] !== locale.languageTag || $[62] !== rows || $[63] !== selectedRows || $[64] !== selectionMode || $[65] !== store) {
|
|
1973
1941
|
t13 = () => {
|
|
1974
1942
|
store.setState({
|
|
1975
1943
|
columns,
|
|
@@ -1997,27 +1965,27 @@ function useCreateDataTableContext(t0) {
|
|
|
1997
1965
|
selectionMode,
|
|
1998
1966
|
locale.languageTag
|
|
1999
1967
|
];
|
|
2000
|
-
$[
|
|
2001
|
-
$[
|
|
2002
|
-
$[
|
|
2003
|
-
$[
|
|
2004
|
-
$[
|
|
2005
|
-
$[
|
|
2006
|
-
$[
|
|
2007
|
-
$[
|
|
2008
|
-
$[
|
|
2009
|
-
$[
|
|
2010
|
-
$[
|
|
2011
|
-
$[
|
|
2012
|
-
$[
|
|
2013
|
-
} else {
|
|
2014
|
-
t13 = $[
|
|
2015
|
-
t14 = $[
|
|
1968
|
+
$[55] = columns;
|
|
1969
|
+
$[56] = disabledSelections;
|
|
1970
|
+
$[57] = headCount;
|
|
1971
|
+
$[58] = leafColumns;
|
|
1972
|
+
$[59] = loading;
|
|
1973
|
+
$[60] = loadingCount;
|
|
1974
|
+
$[61] = locale.languageTag;
|
|
1975
|
+
$[62] = rows;
|
|
1976
|
+
$[63] = selectedRows;
|
|
1977
|
+
$[64] = selectionMode;
|
|
1978
|
+
$[65] = store;
|
|
1979
|
+
$[66] = t13;
|
|
1980
|
+
$[67] = t14;
|
|
1981
|
+
} else {
|
|
1982
|
+
t13 = $[66];
|
|
1983
|
+
t14 = $[67];
|
|
2016
1984
|
}
|
|
2017
1985
|
useEffect(t13, t14);
|
|
2018
1986
|
let t15;
|
|
2019
1987
|
let t16;
|
|
2020
|
-
if ($[
|
|
1988
|
+
if ($[68] !== latestRef || $[69] !== store) {
|
|
2021
1989
|
t15 = () => {
|
|
2022
1990
|
if (store.getState()._rows) {
|
|
2023
1991
|
const { visibleRows, processedRows } = store.getState();
|
|
@@ -2026,18 +1994,18 @@ function useCreateDataTableContext(t0) {
|
|
|
2026
1994
|
}
|
|
2027
1995
|
};
|
|
2028
1996
|
t16 = [latestRef, store];
|
|
2029
|
-
$[
|
|
2030
|
-
$[
|
|
2031
|
-
$[
|
|
2032
|
-
$[
|
|
1997
|
+
$[68] = latestRef;
|
|
1998
|
+
$[69] = store;
|
|
1999
|
+
$[70] = t15;
|
|
2000
|
+
$[71] = t16;
|
|
2033
2001
|
} else {
|
|
2034
|
-
t15 = $[
|
|
2035
|
-
t16 = $[
|
|
2002
|
+
t15 = $[70];
|
|
2003
|
+
t16 = $[71];
|
|
2036
2004
|
}
|
|
2037
2005
|
useEffect(t15, t16);
|
|
2038
2006
|
const generatedId = useId();
|
|
2039
2007
|
let t17;
|
|
2040
|
-
if ($[
|
|
2008
|
+
if ($[72] !== apiRef || $[73] !== displayMode || $[74] !== dynamicRowHeight || $[75] !== estimatedRowHeight || $[76] !== generatedId || $[77] !== onSelectAll || $[78] !== overscan || $[79] !== renderCell || $[80] !== renderRow || $[81] !== required || $[82] !== rowKey || $[83] !== selectAllChecked || $[84] !== selectAllRowsLabel || $[85] !== selectRowLabel || $[86] !== showAllRowsWhilePrinting || $[87] !== showSelectionColumn || $[88] !== store) {
|
|
2041
2009
|
t17 = {
|
|
2042
2010
|
displayMode,
|
|
2043
2011
|
rowKey,
|
|
@@ -2057,25 +2025,25 @@ function useCreateDataTableContext(t0) {
|
|
|
2057
2025
|
apiRef,
|
|
2058
2026
|
store
|
|
2059
2027
|
};
|
|
2060
|
-
$[
|
|
2061
|
-
$[
|
|
2062
|
-
$[
|
|
2063
|
-
$[
|
|
2064
|
-
$[
|
|
2065
|
-
$[
|
|
2066
|
-
$[
|
|
2067
|
-
$[
|
|
2068
|
-
$[
|
|
2069
|
-
$[
|
|
2070
|
-
$[
|
|
2071
|
-
$[
|
|
2072
|
-
$[
|
|
2073
|
-
$[
|
|
2074
|
-
$[
|
|
2075
|
-
$[
|
|
2076
|
-
$[
|
|
2077
|
-
$[
|
|
2078
|
-
} else t17 = $[
|
|
2028
|
+
$[72] = apiRef;
|
|
2029
|
+
$[73] = displayMode;
|
|
2030
|
+
$[74] = dynamicRowHeight;
|
|
2031
|
+
$[75] = estimatedRowHeight;
|
|
2032
|
+
$[76] = generatedId;
|
|
2033
|
+
$[77] = onSelectAll;
|
|
2034
|
+
$[78] = overscan;
|
|
2035
|
+
$[79] = renderCell;
|
|
2036
|
+
$[80] = renderRow;
|
|
2037
|
+
$[81] = required;
|
|
2038
|
+
$[82] = rowKey;
|
|
2039
|
+
$[83] = selectAllChecked;
|
|
2040
|
+
$[84] = selectAllRowsLabel;
|
|
2041
|
+
$[85] = selectRowLabel;
|
|
2042
|
+
$[86] = showAllRowsWhilePrinting;
|
|
2043
|
+
$[87] = showSelectionColumn;
|
|
2044
|
+
$[88] = store;
|
|
2045
|
+
$[89] = t17;
|
|
2046
|
+
} else t17 = $[89];
|
|
2079
2047
|
return t17;
|
|
2080
2048
|
}
|
|
2081
2049
|
function _temp12(hasFooterCells) {
|
|
@@ -2112,16 +2080,16 @@ function _temp6$2(limit_2, limitOptions) {
|
|
|
2112
2080
|
function _temp5$6(currentPage, limit_1) {
|
|
2113
2081
|
return currentPage * limit_1;
|
|
2114
2082
|
}
|
|
2115
|
-
function _temp4$
|
|
2083
|
+
function _temp4$9(offset_1, limit_0) {
|
|
2116
2084
|
return Math.floor(offset_1 / limit_0);
|
|
2117
2085
|
}
|
|
2118
2086
|
function _temp3$19(offset_0, t0) {
|
|
2119
2087
|
return Math.min(Math.max(offset_0, 0), Math.max((t0 === void 0 ? offset_0 : t0) - 1, 0));
|
|
2120
2088
|
}
|
|
2121
|
-
function _temp2$
|
|
2122
|
-
return Object.values(leafColumns_0).some(_temp$
|
|
2089
|
+
function _temp2$35(leafColumns_0) {
|
|
2090
|
+
return Object.values(leafColumns_0).some(_temp$58);
|
|
2123
2091
|
}
|
|
2124
|
-
function _temp$
|
|
2092
|
+
function _temp$58(column) {
|
|
2125
2093
|
return typeof column.footer !== "boolean" && column.footer != null;
|
|
2126
2094
|
}
|
|
2127
2095
|
/** Hook providing access to the data table context. */
|
|
@@ -2145,12 +2113,12 @@ function useDataTableColumnLabelId() {
|
|
|
2145
2113
|
var FeedbackContext = createContext(null);
|
|
2146
2114
|
/** Hook which creates the feedback context value. */
|
|
2147
2115
|
function useCreateFeedbackContext() {
|
|
2148
|
-
return useConstant(_temp2$
|
|
2116
|
+
return useConstant(_temp2$34);
|
|
2149
2117
|
}
|
|
2150
|
-
function _temp2$
|
|
2151
|
-
return createStore()(subscribeWithSelector(_temp$
|
|
2118
|
+
function _temp2$34() {
|
|
2119
|
+
return createStore()(subscribeWithSelector(_temp$57));
|
|
2152
2120
|
}
|
|
2153
|
-
function _temp$
|
|
2121
|
+
function _temp$57(set) {
|
|
2154
2122
|
return {
|
|
2155
2123
|
controlName: void 0,
|
|
2156
2124
|
controlStatus: void 0,
|
|
@@ -2187,9 +2155,9 @@ function _temp3$18(state) {
|
|
|
2187
2155
|
}
|
|
2188
2156
|
/** Hook exposing the focused status of a control. */
|
|
2189
2157
|
function useFeedbackControlFocused() {
|
|
2190
|
-
return useFeedbackStore(_temp4$
|
|
2158
|
+
return useFeedbackStore(_temp4$8);
|
|
2191
2159
|
}
|
|
2192
|
-
function _temp4$
|
|
2160
|
+
function _temp4$8(state) {
|
|
2193
2161
|
return state.controlFocused;
|
|
2194
2162
|
}
|
|
2195
2163
|
/** Hook that registers a feedback and returns its identifier. */
|
|
@@ -2240,12 +2208,12 @@ function _temp5$5(state) {
|
|
|
2240
2208
|
var FieldContext = createContext(null);
|
|
2241
2209
|
/** Hook which creates the field context value. */
|
|
2242
2210
|
function useCreateFieldContext() {
|
|
2243
|
-
return useConstant(_temp2$
|
|
2211
|
+
return useConstant(_temp2$33);
|
|
2244
2212
|
}
|
|
2245
|
-
function _temp2$
|
|
2246
|
-
return createStore()(subscribeWithSelector(_temp$
|
|
2213
|
+
function _temp2$33() {
|
|
2214
|
+
return createStore()(subscribeWithSelector(_temp$56));
|
|
2247
2215
|
}
|
|
2248
|
-
function _temp$
|
|
2216
|
+
function _temp$56(_set) {
|
|
2249
2217
|
return { controlHasCode: false };
|
|
2250
2218
|
}
|
|
2251
2219
|
/** Hook returning the field's context value. */
|
|
@@ -2257,12 +2225,12 @@ function useFieldContext() {
|
|
|
2257
2225
|
var HelperTextContext = createContext(null);
|
|
2258
2226
|
/** Hook which creates the helper text context value. */
|
|
2259
2227
|
function useCreateHelperTextContext() {
|
|
2260
|
-
return useConstant(_temp2$
|
|
2228
|
+
return useConstant(_temp2$32);
|
|
2261
2229
|
}
|
|
2262
|
-
function _temp2$
|
|
2263
|
-
return createStore()(subscribeWithSelector(_temp$
|
|
2230
|
+
function _temp2$32() {
|
|
2231
|
+
return createStore()(subscribeWithSelector(_temp$55));
|
|
2264
2232
|
}
|
|
2265
|
-
function _temp$
|
|
2233
|
+
function _temp$55(set) {
|
|
2266
2234
|
return {
|
|
2267
2235
|
helperTextIds: [],
|
|
2268
2236
|
actions: {
|
|
@@ -2335,12 +2303,12 @@ function _temp3$17(state) {
|
|
|
2335
2303
|
var LabelContext = createContext(null);
|
|
2336
2304
|
/** Hook which creates the label context value. */
|
|
2337
2305
|
function useCreateLabelContext() {
|
|
2338
|
-
return useConstant(_temp2$
|
|
2306
|
+
return useConstant(_temp2$31);
|
|
2339
2307
|
}
|
|
2340
|
-
function _temp2$
|
|
2341
|
-
return createStore()(subscribeWithSelector(_temp$
|
|
2308
|
+
function _temp2$31() {
|
|
2309
|
+
return createStore()(subscribeWithSelector(_temp$54));
|
|
2342
2310
|
}
|
|
2343
|
-
function _temp$
|
|
2311
|
+
function _temp$54(_set) {
|
|
2344
2312
|
return {
|
|
2345
2313
|
label: void 0,
|
|
2346
2314
|
labelId: void 0,
|
|
@@ -2420,9 +2388,9 @@ function _temp3$16(state) {
|
|
|
2420
2388
|
}
|
|
2421
2389
|
/** Hook exposing whether the `tagName` of a control. */
|
|
2422
2390
|
function useLabelControlTagName() {
|
|
2423
|
-
return useLabelStore(_temp4$
|
|
2391
|
+
return useLabelStore(_temp4$7);
|
|
2424
2392
|
}
|
|
2425
|
-
function _temp4$
|
|
2393
|
+
function _temp4$7(state) {
|
|
2426
2394
|
return state.controlTagName;
|
|
2427
2395
|
}
|
|
2428
2396
|
/** Hook exposing whether a control is marked as required. */
|
|
@@ -2539,6 +2507,32 @@ function stickyColumnOffsets(leaves, defaultColumnWidth) {
|
|
|
2539
2507
|
}
|
|
2540
2508
|
return offsets;
|
|
2541
2509
|
}
|
|
2510
|
+
/** Keys of all columns (leaves and groups), based on their location in the column tree. */
|
|
2511
|
+
function columnKeys(columns) {
|
|
2512
|
+
const keys = /* @__PURE__ */ new Map();
|
|
2513
|
+
const visit = (columns, parentKey) => {
|
|
2514
|
+
const counts = /* @__PURE__ */ new Map();
|
|
2515
|
+
columns.forEach((column, i) => {
|
|
2516
|
+
const { key, label } = column;
|
|
2517
|
+
const segment = key != null ? `k:${key}` : typeof label === "string" || typeof label === "number" ? `v:${label}` : `i:${i}`;
|
|
2518
|
+
const n = counts.get(segment) ?? 0;
|
|
2519
|
+
counts.set(segment, n + 1);
|
|
2520
|
+
const columnKey = `${parentKey}/${n === 0 ? segment : `${segment}#${n}`}`;
|
|
2521
|
+
keys.set(column, columnKey);
|
|
2522
|
+
if (column.subColumns) visit(column.subColumns, columnKey);
|
|
2523
|
+
});
|
|
2524
|
+
};
|
|
2525
|
+
visit(columns, "");
|
|
2526
|
+
return keys;
|
|
2527
|
+
}
|
|
2528
|
+
/** Keys of the `<col>` elements, aligned with the result of `columnWidths`. */
|
|
2529
|
+
function colKeys(leaves, keys) {
|
|
2530
|
+
return leaves.flatMap((column) => {
|
|
2531
|
+
const key = keys.get(column);
|
|
2532
|
+
const colSpan = column.colSpan ?? 1;
|
|
2533
|
+
return colSpan === 1 ? [key] : Array.from({ length: colSpan }, (_, i) => `${key}:${i}`);
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2542
2536
|
// src/components/Table/TableContext.ts
|
|
2543
2537
|
/** Table context. */
|
|
2544
2538
|
var TableContext = createContext(null);
|
|
@@ -2551,9 +2545,10 @@ function useCreateTableContext(t0) {
|
|
|
2551
2545
|
t1 = () => createStore()(subscribeWithSelector((_set, get) => ({
|
|
2552
2546
|
scrollPosition: void 0,
|
|
2553
2547
|
leafColumns: void 0,
|
|
2548
|
+
columnKeys: void 0,
|
|
2554
2549
|
defaultColumnWidth,
|
|
2555
|
-
numberOfColumns: computed(() => [get().leafColumns], _temp$
|
|
2556
|
-
stickyColumnOffsets: computed(() => [get().leafColumns, get().defaultColumnWidth], _temp2$
|
|
2550
|
+
numberOfColumns: computed(() => [get().leafColumns], _temp$53),
|
|
2551
|
+
stickyColumnOffsets: computed(() => [get().leafColumns, get().defaultColumnWidth], _temp2$30)
|
|
2557
2552
|
})));
|
|
2558
2553
|
$[0] = defaultColumnWidth;
|
|
2559
2554
|
$[1] = t1;
|
|
@@ -2591,10 +2586,10 @@ function useCreateTableContext(t0) {
|
|
|
2591
2586
|
} else t4 = $[10];
|
|
2592
2587
|
return t4;
|
|
2593
2588
|
}
|
|
2594
|
-
function _temp2$
|
|
2589
|
+
function _temp2$30(leaves_0, defaultColumnWidth_0) {
|
|
2595
2590
|
return leaves_0 && stickyColumnOffsets(leaves_0, defaultColumnWidth_0);
|
|
2596
2591
|
}
|
|
2597
|
-
function _temp$
|
|
2592
|
+
function _temp$53(leaves) {
|
|
2598
2593
|
return leaves && numberOfColumns(leaves);
|
|
2599
2594
|
}
|
|
2600
2595
|
/** Hook returning the table's context value. */
|
|
@@ -2800,7 +2795,7 @@ function Layer(t0) {
|
|
|
2800
2795
|
const normalizeZIndex = t1;
|
|
2801
2796
|
let t2;
|
|
2802
2797
|
if ($[7] !== normalizeZIndex || $[8] !== parentZIndices || $[9] !== reset || $[10] !== zIndex) {
|
|
2803
|
-
const normalizedZIndex = (Array.isArray(zIndex) ? zIndex.map(normalizeZIndex) : [normalizeZIndex(zIndex)]).filter(_temp$
|
|
2798
|
+
const normalizedZIndex = (Array.isArray(zIndex) ? zIndex.map(normalizeZIndex) : [normalizeZIndex(zIndex)]).filter(_temp$52);
|
|
2804
2799
|
t2 = normalizedZIndex == null ? reset ? [] : parentZIndices : reset ? normalizedZIndex : [...parentZIndices, ...normalizedZIndex];
|
|
2805
2800
|
$[7] = normalizeZIndex;
|
|
2806
2801
|
$[8] = parentZIndices;
|
|
@@ -2836,7 +2831,7 @@ function Layer(t0) {
|
|
|
2836
2831
|
} else t3 = $[18];
|
|
2837
2832
|
return t3;
|
|
2838
2833
|
}
|
|
2839
|
-
function _temp$
|
|
2834
|
+
function _temp$52(v) {
|
|
2840
2835
|
return v != null;
|
|
2841
2836
|
}
|
|
2842
2837
|
// src/components/Overlay/Overlay.tsx
|
|
@@ -2980,7 +2975,7 @@ function DialogContent(t0) {
|
|
|
2980
2975
|
const size = t3 === void 0 ? "md" : t3;
|
|
2981
2976
|
const prefix = usePrefix();
|
|
2982
2977
|
const portalContext = usePortalContext();
|
|
2983
|
-
const handlePointerDownOutside = _temp$
|
|
2978
|
+
const handlePointerDownOutside = _temp$51;
|
|
2984
2979
|
const t4 = portalContext?.container;
|
|
2985
2980
|
let t5;
|
|
2986
2981
|
if ($[13] !== overlayProps?.className || $[14] !== prefix) {
|
|
@@ -3088,7 +3083,7 @@ function DialogContent(t0) {
|
|
|
3088
3083
|
} else t15 = $[46];
|
|
3089
3084
|
return t15;
|
|
3090
3085
|
}
|
|
3091
|
-
function _temp$
|
|
3086
|
+
function _temp$51(evt) {
|
|
3092
3087
|
if (evt.detail.originalEvent.offsetX > evt.currentTarget.clientWidth) evt.preventDefault();
|
|
3093
3088
|
}
|
|
3094
3089
|
// src/components/Dialog/DialogDescription.tsx
|
|
@@ -3387,15 +3382,26 @@ var ignoreKeyboardShortcutInEditableElements = defaultKeybindingsHandlerIgnore;
|
|
|
3387
3382
|
*/
|
|
3388
3383
|
function normalizeKeybinds(keybinds) {
|
|
3389
3384
|
if (keybinds == null) return [];
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3385
|
+
const keybindsArray = Array.isArray(keybinds) ? keybinds : [keybinds];
|
|
3386
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3387
|
+
const result = [];
|
|
3388
|
+
for (const keybind of keybindsArray) {
|
|
3389
|
+
const normalized = parseKeybinding(keybind).map(([reqMods, optMods, key]) => {
|
|
3390
|
+
let finalKey;
|
|
3391
|
+
if (key instanceof RegExp) finalKey = `(${key.source.slice(1, -1)})`;
|
|
3392
|
+
else {
|
|
3393
|
+
finalKey = key.replace(KEY_CLEAN_UP, "");
|
|
3394
|
+
if (finalKey.length === 1) finalKey = finalKey.toUpperCase();
|
|
3395
|
+
}
|
|
3396
|
+
return Array.from(new Set(reqMods.concat(optMods, finalKey)));
|
|
3397
|
+
});
|
|
3398
|
+
const id = JSON.stringify(normalized);
|
|
3399
|
+
if (!seen.has(id)) {
|
|
3400
|
+
seen.add(id);
|
|
3401
|
+
result.push(normalized);
|
|
3396
3402
|
}
|
|
3397
|
-
|
|
3398
|
-
|
|
3403
|
+
}
|
|
3404
|
+
return result;
|
|
3399
3405
|
}
|
|
3400
3406
|
/**
|
|
3401
3407
|
* Converts the provided `tinykeys` keybinds into an `aria-keyshortcuts` string.
|
|
@@ -3461,8 +3467,8 @@ function useTextProps(t0) {
|
|
|
3461
3467
|
} else t2 = $[10];
|
|
3462
3468
|
const lineHeightProps = useResponsiveValue("", "line-height", size, t2);
|
|
3463
3469
|
const alignProps = useResponsiveValue("", "text-align", align);
|
|
3464
|
-
const weightProps = useResponsiveValue("", "font-weight", weight, _temp$
|
|
3465
|
-
const wrapProps = useResponsiveValue("", "text-wrap", wrap, _temp2$
|
|
3470
|
+
const weightProps = useResponsiveValue("", "font-weight", weight, _temp$50);
|
|
3471
|
+
const wrapProps = useResponsiveValue("", "text-wrap", wrap, _temp2$29);
|
|
3466
3472
|
let t3;
|
|
3467
3473
|
if ($[11] !== alignProps.cssVars || $[12] !== fontSizeProps.cssVars || $[13] !== lineHeightProps.cssVars || $[14] !== weightProps.cssVars || $[15] !== wrapProps.cssVars) {
|
|
3468
3474
|
t3 = {
|
|
@@ -3557,10 +3563,10 @@ function useTextProps(t0) {
|
|
|
3557
3563
|
} else t11 = $[43];
|
|
3558
3564
|
return t11;
|
|
3559
3565
|
}
|
|
3560
|
-
function _temp2$
|
|
3566
|
+
function _temp2$29(v_2) {
|
|
3561
3567
|
return v_2 === true ? "wrap" : v_2 === false ? "nowrap" : v_2;
|
|
3562
3568
|
}
|
|
3563
|
-
function _temp$
|
|
3569
|
+
function _temp$50(v_1) {
|
|
3564
3570
|
return typeof v_1 === "string" && v_1 in FONT_WEIGHTS ? FONT_WEIGHTS[v_1] : v_1;
|
|
3565
3571
|
}
|
|
3566
3572
|
// src/components/VisuallyHidden/VisuallyHidden.tsx
|
|
@@ -3944,124 +3950,100 @@ function Key(t0) {
|
|
|
3944
3950
|
return t1;
|
|
3945
3951
|
}
|
|
3946
3952
|
// src/components/Keybinds/KeyPress.tsx
|
|
3947
|
-
var
|
|
3948
|
-
function KeyPress({ keyPress, keySymbols, keyLabels }) {
|
|
3949
|
-
return intersperse(keyPress.map((key
|
|
3953
|
+
var KEYS_SEPARATOR = IS_APPLE ? " " : " + ";
|
|
3954
|
+
function KeyPress({ keyPress, keysSeparatorLabel, keySymbols, keyLabels }) {
|
|
3955
|
+
return intersperse(keyPress.map((key) => /* @__PURE__ */ jsx(Key, {
|
|
3950
3956
|
keyName: key,
|
|
3951
3957
|
keySymbols,
|
|
3952
3958
|
keyLabels
|
|
3953
|
-
}, `key
|
|
3954
|
-
"aria-hidden":
|
|
3955
|
-
children:
|
|
3956
|
-
},
|
|
3959
|
+
}, `k:${key}`)), (i) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
3960
|
+
"aria-hidden": !!keysSeparatorLabel || void 0,
|
|
3961
|
+
children: KEYS_SEPARATOR
|
|
3962
|
+
}), keysSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
3963
|
+
" ",
|
|
3964
|
+
keysSeparatorLabel,
|
|
3965
|
+
" "
|
|
3966
|
+
] })] }, `s:${i}`));
|
|
3957
3967
|
}
|
|
3958
3968
|
// src/components/Keybinds/Keybind.tsx
|
|
3959
|
-
var
|
|
3960
|
-
function Keybind(
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
$[5] = keyLabels;
|
|
3975
|
-
$[6] = keySymbols;
|
|
3976
|
-
$[7] = t2;
|
|
3977
|
-
} else t2 = $[7];
|
|
3978
|
-
let t3;
|
|
3979
|
-
if ($[8] !== keyPressesSeparatorLabel) {
|
|
3980
|
-
t3 = (i_0) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
3981
|
-
"aria-hidden": true,
|
|
3982
|
-
children: KEY_PRESS_SEPARATOR
|
|
3983
|
-
}), /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
3984
|
-
" ",
|
|
3985
|
-
keyPressesSeparatorLabel,
|
|
3986
|
-
" "
|
|
3987
|
-
] })] }, `key-press-separator-${i_0}`);
|
|
3988
|
-
$[8] = keyPressesSeparatorLabel;
|
|
3989
|
-
$[9] = t3;
|
|
3990
|
-
} else t3 = $[9];
|
|
3991
|
-
t1 = intersperse(keybind.map(t2), t3);
|
|
3992
|
-
$[0] = keyLabels;
|
|
3993
|
-
$[1] = keyPressesSeparatorLabel;
|
|
3994
|
-
$[2] = keySymbols;
|
|
3995
|
-
$[3] = keybind;
|
|
3996
|
-
$[4] = t1;
|
|
3997
|
-
} else t1 = $[4];
|
|
3998
|
-
return t1;
|
|
3969
|
+
var KEY_PRESSES_SEPARATOR = " ";
|
|
3970
|
+
function Keybind({ keybind, keyPressesSeparatorLabel, keysSeparatorLabel, keySymbols, keyLabels }) {
|
|
3971
|
+
return intersperse(keybind.map((keyPress, i) => /* @__PURE__ */ jsx(KeyPress, {
|
|
3972
|
+
keyPress,
|
|
3973
|
+
keysSeparatorLabel,
|
|
3974
|
+
keySymbols,
|
|
3975
|
+
keyLabels
|
|
3976
|
+
}, `k:${i}`)), (i) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
3977
|
+
"aria-hidden": !!keyPressesSeparatorLabel || void 0,
|
|
3978
|
+
children: KEY_PRESSES_SEPARATOR
|
|
3979
|
+
}), keyPressesSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
3980
|
+
" ",
|
|
3981
|
+
keyPressesSeparatorLabel,
|
|
3982
|
+
" "
|
|
3983
|
+
] })] }, `s:${i}`));
|
|
3999
3984
|
}
|
|
4000
3985
|
// src/components/Keybinds/Keybinds.tsx
|
|
4001
|
-
var
|
|
3986
|
+
var KEYBINDS_SEPARATOR = "\xA0/ ";
|
|
4002
3987
|
/** Component which visually renders [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keybinds. */
|
|
4003
3988
|
function Keybinds(t0) {
|
|
4004
3989
|
const $ = c(27);
|
|
4005
3990
|
let className;
|
|
4006
3991
|
let keyLabels;
|
|
4007
|
-
let
|
|
3992
|
+
let keyPressesSeparatorLabelProp;
|
|
4008
3993
|
let keySymbols;
|
|
4009
|
-
let
|
|
3994
|
+
let keybinds;
|
|
4010
3995
|
let keybindsSeparatorLabelProp;
|
|
3996
|
+
let keysSeparatorLabelProp;
|
|
4011
3997
|
let limit;
|
|
4012
3998
|
let otherProps;
|
|
4013
3999
|
let style;
|
|
4014
4000
|
if ($[0] !== t0) {
|
|
4015
|
-
({keybinds
|
|
4001
|
+
({keybinds, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel: keyPressesSeparatorLabelProp, keysSeparatorLabel: keysSeparatorLabelProp, keySymbols, keyLabels, className, style, ...otherProps} = t0);
|
|
4016
4002
|
$[0] = t0;
|
|
4017
4003
|
$[1] = className;
|
|
4018
4004
|
$[2] = keyLabels;
|
|
4019
|
-
$[3] =
|
|
4005
|
+
$[3] = keyPressesSeparatorLabelProp;
|
|
4020
4006
|
$[4] = keySymbols;
|
|
4021
|
-
$[5] =
|
|
4007
|
+
$[5] = keybinds;
|
|
4022
4008
|
$[6] = keybindsSeparatorLabelProp;
|
|
4023
|
-
$[7] =
|
|
4024
|
-
$[8] =
|
|
4025
|
-
$[9] =
|
|
4009
|
+
$[7] = keysSeparatorLabelProp;
|
|
4010
|
+
$[8] = limit;
|
|
4011
|
+
$[9] = otherProps;
|
|
4012
|
+
$[10] = style;
|
|
4026
4013
|
} else {
|
|
4027
4014
|
className = $[1];
|
|
4028
4015
|
keyLabels = $[2];
|
|
4029
|
-
|
|
4016
|
+
keyPressesSeparatorLabelProp = $[3];
|
|
4030
4017
|
keySymbols = $[4];
|
|
4031
|
-
|
|
4018
|
+
keybinds = $[5];
|
|
4032
4019
|
keybindsSeparatorLabelProp = $[6];
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4020
|
+
keysSeparatorLabelProp = $[7];
|
|
4021
|
+
limit = $[8];
|
|
4022
|
+
otherProps = $[9];
|
|
4023
|
+
style = $[10];
|
|
4036
4024
|
}
|
|
4037
4025
|
if (limit != null && limit < 1) throw new RangeError("Limit must be >= 1.");
|
|
4038
4026
|
const prefix = usePrefix();
|
|
4039
4027
|
const [locale] = useLocale();
|
|
4040
|
-
let t1;
|
|
4041
|
-
if ($[10] !== keybindsProp || $[11] !== limit) {
|
|
4042
|
-
t1 = Array.isArray(keybindsProp) ? keybindsProp.slice(0, limit) : keybindsProp;
|
|
4043
|
-
$[10] = keybindsProp;
|
|
4044
|
-
$[11] = limit;
|
|
4045
|
-
$[12] = t1;
|
|
4046
|
-
} else t1 = $[12];
|
|
4047
|
-
const keybinds = t1;
|
|
4048
4028
|
const keybindsSeparatorLabel = keybindsSeparatorLabelProp ?? locale.Keybinds.keybindsSeparatorLabel;
|
|
4049
|
-
const
|
|
4029
|
+
const keyPressesSeparatorLabel = keyPressesSeparatorLabelProp ?? locale.Keybinds.keyPressesSeparatorLabel;
|
|
4030
|
+
const keysSeparatorLabel = keysSeparatorLabelProp ?? locale.Keybinds.keysSeparatorLabel;
|
|
4031
|
+
const t1 = useMarginProps(otherProps);
|
|
4050
4032
|
let marginProps;
|
|
4051
4033
|
let nonMarginProps;
|
|
4052
|
-
if ($[
|
|
4053
|
-
({marginProps, ...nonMarginProps} =
|
|
4054
|
-
$[
|
|
4055
|
-
$[
|
|
4056
|
-
$[
|
|
4034
|
+
if ($[11] !== t1) {
|
|
4035
|
+
({marginProps, ...nonMarginProps} = t1);
|
|
4036
|
+
$[11] = t1;
|
|
4037
|
+
$[12] = marginProps;
|
|
4038
|
+
$[13] = nonMarginProps;
|
|
4057
4039
|
} else {
|
|
4058
|
-
marginProps = $[
|
|
4059
|
-
nonMarginProps = $[
|
|
4040
|
+
marginProps = $[12];
|
|
4041
|
+
nonMarginProps = $[13];
|
|
4060
4042
|
}
|
|
4061
|
-
let
|
|
4062
|
-
if ($[
|
|
4063
|
-
const normalizedKeybinds = normalizeKeybinds(keybinds);
|
|
4064
|
-
|
|
4043
|
+
let t2;
|
|
4044
|
+
if ($[14] !== className || $[15] !== keyLabels || $[16] !== keyPressesSeparatorLabel || $[17] !== keySymbols || $[18] !== keybinds || $[19] !== keybindsSeparatorLabel || $[20] !== keysSeparatorLabel || $[21] !== limit || $[22] !== marginProps || $[23] !== nonMarginProps || $[24] !== prefix || $[25] !== style) {
|
|
4045
|
+
const normalizedKeybinds = normalizeKeybinds(keybinds).slice(0, limit);
|
|
4046
|
+
t2 = normalizedKeybinds.length === 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
4065
4047
|
className: cx(prefix("keybinds"), className),
|
|
4066
4048
|
style: {
|
|
4067
4049
|
...marginProps.cssVars,
|
|
@@ -4069,33 +4051,36 @@ function Keybinds(t0) {
|
|
|
4069
4051
|
},
|
|
4070
4052
|
...marginProps.dataAttrs,
|
|
4071
4053
|
...nonMarginProps,
|
|
4072
|
-
children: intersperse(normalizedKeybinds.map((keybind
|
|
4054
|
+
children: intersperse(normalizedKeybinds.map((keybind) => /* @__PURE__ */ jsx(Keybind, {
|
|
4073
4055
|
keybind,
|
|
4074
4056
|
keyPressesSeparatorLabel,
|
|
4057
|
+
keysSeparatorLabel,
|
|
4075
4058
|
keySymbols,
|
|
4076
4059
|
keyLabels
|
|
4077
|
-
}, `keybind
|
|
4078
|
-
"aria-hidden":
|
|
4079
|
-
children:
|
|
4060
|
+
}, `k:${JSON.stringify(keybind)}`)), (i) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
4061
|
+
"aria-hidden": !!keybindsSeparatorLabel || void 0,
|
|
4062
|
+
children: KEYBINDS_SEPARATOR
|
|
4080
4063
|
}), keybindsSeparatorLabel && /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
4081
4064
|
" ",
|
|
4082
4065
|
keybindsSeparatorLabel,
|
|
4083
4066
|
" "
|
|
4084
|
-
] })] }, `
|
|
4067
|
+
] })] }, `s:${i}`))
|
|
4085
4068
|
});
|
|
4086
|
-
$[
|
|
4087
|
-
$[
|
|
4088
|
-
$[
|
|
4089
|
-
$[
|
|
4090
|
-
$[
|
|
4091
|
-
$[
|
|
4069
|
+
$[14] = className;
|
|
4070
|
+
$[15] = keyLabels;
|
|
4071
|
+
$[16] = keyPressesSeparatorLabel;
|
|
4072
|
+
$[17] = keySymbols;
|
|
4073
|
+
$[18] = keybinds;
|
|
4074
|
+
$[19] = keybindsSeparatorLabel;
|
|
4075
|
+
$[20] = keysSeparatorLabel;
|
|
4076
|
+
$[21] = limit;
|
|
4092
4077
|
$[22] = marginProps;
|
|
4093
4078
|
$[23] = nonMarginProps;
|
|
4094
4079
|
$[24] = prefix;
|
|
4095
4080
|
$[25] = style;
|
|
4096
|
-
$[26] =
|
|
4097
|
-
} else
|
|
4098
|
-
return
|
|
4081
|
+
$[26] = t2;
|
|
4082
|
+
} else t2 = $[26];
|
|
4083
|
+
return t2;
|
|
4099
4084
|
}
|
|
4100
4085
|
// src/components/Spinner/Spinner.tsx
|
|
4101
4086
|
/**
|
|
@@ -5778,8 +5763,8 @@ function useCreateDocumentTitleStore(breadcrumbs) {
|
|
|
5778
5763
|
breadcrumbs: breadcrumbs ?? [],
|
|
5779
5764
|
childrenDocumentTitles: 0,
|
|
5780
5765
|
actions: {
|
|
5781
|
-
addChildDocumentTitle: () => set(_temp$
|
|
5782
|
-
removeChildDocumentTitle: () => set(_temp2$
|
|
5766
|
+
addChildDocumentTitle: () => set(_temp$49),
|
|
5767
|
+
removeChildDocumentTitle: () => set(_temp2$28)
|
|
5783
5768
|
}
|
|
5784
5769
|
})));
|
|
5785
5770
|
$[0] = breadcrumbs;
|
|
@@ -5804,11 +5789,11 @@ function useCreateDocumentTitleStore(breadcrumbs) {
|
|
|
5804
5789
|
useEffect(t1, t2);
|
|
5805
5790
|
return store;
|
|
5806
5791
|
}
|
|
5807
|
-
function _temp2$
|
|
5792
|
+
function _temp2$28(t0) {
|
|
5808
5793
|
const { childrenDocumentTitles: childrenDocumentTitles_0 } = t0;
|
|
5809
5794
|
return { childrenDocumentTitles: childrenDocumentTitles_0 - 1 };
|
|
5810
5795
|
}
|
|
5811
|
-
function _temp$
|
|
5796
|
+
function _temp$49(t0) {
|
|
5812
5797
|
const { childrenDocumentTitles } = t0;
|
|
5813
5798
|
return { childrenDocumentTitles: childrenDocumentTitles + 1 };
|
|
5814
5799
|
}
|
|
@@ -5831,7 +5816,7 @@ function DocumentTitle(t0) {
|
|
|
5831
5816
|
const { title, children } = t0;
|
|
5832
5817
|
const documentTitleProviderContext = useContext(DocumentTitleProviderContext);
|
|
5833
5818
|
if (!documentTitleProviderContext) throw new Error("Document title provider context not in scope.");
|
|
5834
|
-
const actions = useDocumentTitleStore(_temp$
|
|
5819
|
+
const actions = useDocumentTitleStore(_temp$48);
|
|
5835
5820
|
let t1;
|
|
5836
5821
|
if ($[0] !== title) {
|
|
5837
5822
|
t1 = (state_0) => title ? [title, ...state_0.breadcrumbs ?? []] : state_0.breadcrumbs ?? [];
|
|
@@ -5845,7 +5830,7 @@ function DocumentTitle(t0) {
|
|
|
5845
5830
|
t2 = () => {
|
|
5846
5831
|
if (title) {
|
|
5847
5832
|
actions?.addChildDocumentTitle();
|
|
5848
|
-
const unsubscribe = store.subscribe(_temp2$
|
|
5833
|
+
const unsubscribe = store.subscribe(_temp2$27, (t4) => {
|
|
5849
5834
|
const { breadcrumbs: breadcrumbs_1, childrenDocumentTitles: childrenDocumentTitles_0 } = t4;
|
|
5850
5835
|
if (childrenDocumentTitles_0 === 0) setDocumentTitle([breadcrumbs_1.join(` ${documentTitleProviderContext.breadcrumbsSeparator} `), documentTitleProviderContext.baseDocumentTitle].join(` ${documentTitleProviderContext.baseSeparator} `));
|
|
5851
5836
|
}, {
|
|
@@ -5891,14 +5876,14 @@ function DocumentTitle(t0) {
|
|
|
5891
5876
|
} else t4 = $[12];
|
|
5892
5877
|
return t4;
|
|
5893
5878
|
}
|
|
5894
|
-
function _temp2$
|
|
5879
|
+
function _temp2$27(t0) {
|
|
5895
5880
|
const { breadcrumbs: breadcrumbs_0, childrenDocumentTitles } = t0;
|
|
5896
5881
|
return {
|
|
5897
5882
|
breadcrumbs: breadcrumbs_0,
|
|
5898
5883
|
childrenDocumentTitles
|
|
5899
5884
|
};
|
|
5900
5885
|
}
|
|
5901
|
-
function _temp$
|
|
5886
|
+
function _temp$48(state) {
|
|
5902
5887
|
return state.actions;
|
|
5903
5888
|
}
|
|
5904
5889
|
// src/providers/DocumentTitleProvider/DocumentTitleProvider.tsx
|
|
@@ -5919,7 +5904,7 @@ function DocumentTitleProvider(t0) {
|
|
|
5919
5904
|
let t4;
|
|
5920
5905
|
let t5;
|
|
5921
5906
|
if ($[0] !== baseDocumentTitle || $[1] !== store) {
|
|
5922
|
-
t4 = () => store.subscribe(_temp$
|
|
5907
|
+
t4 = () => store.subscribe(_temp$47, (childrenDocumentTitles_0) => {
|
|
5923
5908
|
if (childrenDocumentTitles_0 === 0) setDocumentTitle(baseDocumentTitle ?? "");
|
|
5924
5909
|
}, { fireImmediately: true });
|
|
5925
5910
|
t5 = [baseDocumentTitle, store];
|
|
@@ -5966,7 +5951,7 @@ function DocumentTitleProvider(t0) {
|
|
|
5966
5951
|
} else t8 = $[13];
|
|
5967
5952
|
return t8;
|
|
5968
5953
|
}
|
|
5969
|
-
function _temp$
|
|
5954
|
+
function _temp$47(t0) {
|
|
5970
5955
|
const { childrenDocumentTitles } = t0;
|
|
5971
5956
|
return childrenDocumentTitles;
|
|
5972
5957
|
}
|
|
@@ -7013,7 +6998,7 @@ function useSizingProps(t0) {
|
|
|
7013
6998
|
otherProps = $[6];
|
|
7014
6999
|
width = $[7];
|
|
7015
7000
|
}
|
|
7016
|
-
const sizingMapper = _temp$
|
|
7001
|
+
const sizingMapper = _temp$46;
|
|
7017
7002
|
const widthProps = useResponsiveValue("", "w", width, sizingMapper);
|
|
7018
7003
|
const minWidthProps = useResponsiveValue("", "min-w", minWidth, sizingMapper);
|
|
7019
7004
|
const maxWidthProps = useResponsiveValue("", "max-w", maxWidth, sizingMapper);
|
|
@@ -7126,7 +7111,7 @@ function useSizingProps(t0) {
|
|
|
7126
7111
|
} else t10 = $[45];
|
|
7127
7112
|
return t10;
|
|
7128
7113
|
}
|
|
7129
|
-
function _temp$
|
|
7114
|
+
function _temp$46(v) {
|
|
7130
7115
|
return typeof v === "number" ? `${v}px` : v;
|
|
7131
7116
|
}
|
|
7132
7117
|
// src/components/Box/Box.tsx
|
|
@@ -8273,7 +8258,7 @@ function Root(t0) {
|
|
|
8273
8258
|
toastViewportProps,
|
|
8274
8259
|
errorBoundaryProps
|
|
8275
8260
|
};
|
|
8276
|
-
if (isInRoot && Object.values(topMostProps).some(_temp$
|
|
8261
|
+
if (isInRoot && Object.values(topMostProps).some(_temp$45)) warnOnce(`Root: Properties ${Object.keys(topMostProps).map(_temp2$26).join(", ")} have no effect in nested \`Root\` components. Please set any of these properties on the top-most \`Root\` component instead.`);
|
|
8277
8262
|
const t1 = !isInRoot;
|
|
8278
8263
|
let t2;
|
|
8279
8264
|
if ($[29] !== otherProps || $[30] !== t1) {
|
|
@@ -8377,10 +8362,10 @@ function Root(t0) {
|
|
|
8377
8362
|
} else t3 = $[60];
|
|
8378
8363
|
return t3;
|
|
8379
8364
|
}
|
|
8380
|
-
function _temp2$
|
|
8365
|
+
function _temp2$26(prop) {
|
|
8381
8366
|
return `\`${prop}\``;
|
|
8382
8367
|
}
|
|
8383
|
-
function _temp$
|
|
8368
|
+
function _temp$45(prop_0) {
|
|
8384
8369
|
return prop_0 !== void 0;
|
|
8385
8370
|
}
|
|
8386
8371
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
@@ -10745,7 +10730,7 @@ function Stack(t0) {
|
|
|
10745
10730
|
"child-mr": t14,
|
|
10746
10731
|
"child-mb": t15,
|
|
10747
10732
|
"child-ml": t16,
|
|
10748
|
-
wrap: _temp$
|
|
10733
|
+
wrap: _temp$44
|
|
10749
10734
|
};
|
|
10750
10735
|
$[38] = gapMapper;
|
|
10751
10736
|
$[39] = t10;
|
|
@@ -10822,7 +10807,7 @@ function Stack(t0) {
|
|
|
10822
10807
|
} else t23 = $[69];
|
|
10823
10808
|
return t23;
|
|
10824
10809
|
}
|
|
10825
|
-
function _temp$
|
|
10810
|
+
function _temp$44(v_0) {
|
|
10826
10811
|
return v_0 === "reverse" ? "wrap-reverse" : v_0 ? "wrap" : "nowrap";
|
|
10827
10812
|
}
|
|
10828
10813
|
// src/components/Actions/useActionsLayouts.ts
|
|
@@ -11624,16 +11609,16 @@ function useIsInFeedbackList() {
|
|
|
11624
11609
|
}
|
|
11625
11610
|
/** Hook exposing whether the `id`s of feedbacks. */
|
|
11626
11611
|
function useFeedbackIds() {
|
|
11627
|
-
return useFeedbackStore(_temp$
|
|
11612
|
+
return useFeedbackStore(_temp$43);
|
|
11628
11613
|
}
|
|
11629
|
-
function _temp$
|
|
11614
|
+
function _temp$43(state) {
|
|
11630
11615
|
return state.feedbackIds;
|
|
11631
11616
|
}
|
|
11632
11617
|
/** Hook exposing whether the `name` of a control. */
|
|
11633
11618
|
function useFeedbackControlName() {
|
|
11634
|
-
return useFeedbackStore(_temp2$
|
|
11619
|
+
return useFeedbackStore(_temp2$25);
|
|
11635
11620
|
}
|
|
11636
|
-
function _temp2$
|
|
11621
|
+
function _temp2$25(state) {
|
|
11637
11622
|
return state.controlName;
|
|
11638
11623
|
}
|
|
11639
11624
|
/**
|
|
@@ -12162,34 +12147,57 @@ function PopoverTrigger(props) {
|
|
|
12162
12147
|
} else t0 = $[1];
|
|
12163
12148
|
return t0;
|
|
12164
12149
|
}
|
|
12150
|
+
// src/utils/useResizeObserver.ts
|
|
12151
|
+
/**
|
|
12152
|
+
* Hook wrapping a `ResizeObserver` which observes one or more elements. `onResize` is called with
|
|
12153
|
+
* the observer's entries whenever any observed element is resized, including once right after the
|
|
12154
|
+
* elements start being observed.
|
|
12155
|
+
*/
|
|
12156
|
+
function useResizeObserver(elements, onResize, options) {
|
|
12157
|
+
const $ = c(5);
|
|
12158
|
+
const latestOnResizeRef = useLatestRef(onResize);
|
|
12159
|
+
let t0;
|
|
12160
|
+
let t1;
|
|
12161
|
+
if ($[0] !== elements || $[1] !== latestOnResizeRef || $[2] !== options) {
|
|
12162
|
+
t0 = () => {
|
|
12163
|
+
const targets = (Array.isArray(elements) ? elements : [elements]).filter(_temp$42);
|
|
12164
|
+
if (targets.length === 0) return;
|
|
12165
|
+
const observer = new ResizeObserver((entries) => latestOnResizeRef.current(entries));
|
|
12166
|
+
for (const target of targets) observer.observe(target, options);
|
|
12167
|
+
return () => observer.disconnect();
|
|
12168
|
+
};
|
|
12169
|
+
t1 = [
|
|
12170
|
+
elements,
|
|
12171
|
+
options,
|
|
12172
|
+
latestOnResizeRef
|
|
12173
|
+
];
|
|
12174
|
+
$[0] = elements;
|
|
12175
|
+
$[1] = latestOnResizeRef;
|
|
12176
|
+
$[2] = options;
|
|
12177
|
+
$[3] = t0;
|
|
12178
|
+
$[4] = t1;
|
|
12179
|
+
} else {
|
|
12180
|
+
t0 = $[3];
|
|
12181
|
+
t1 = $[4];
|
|
12182
|
+
}
|
|
12183
|
+
useEffect(t0, t1);
|
|
12184
|
+
}
|
|
12185
|
+
function _temp$42(el) {
|
|
12186
|
+
return el != null;
|
|
12187
|
+
}
|
|
12165
12188
|
// src/utils/useScrollPosition.ts
|
|
12166
12189
|
/** Hook that tracks the position of an element's scroll. */
|
|
12167
12190
|
function useScrollPosition(element, setScrollPosition) {
|
|
12168
|
-
const $ = c(
|
|
12191
|
+
const $ = c(7);
|
|
12169
12192
|
let t0;
|
|
12170
12193
|
let t1;
|
|
12171
12194
|
if ($[0] !== element || $[1] !== setScrollPosition) {
|
|
12172
12195
|
t0 = () => {
|
|
12173
|
-
if (!element)
|
|
12174
|
-
|
|
12175
|
-
return;
|
|
12176
|
-
}
|
|
12177
|
-
const handler = () => setScrollPosition({
|
|
12178
|
-
target: element,
|
|
12179
|
-
top: element.scrollTop,
|
|
12180
|
-
right: element.scrollWidth - element.scrollLeft - element.clientWidth,
|
|
12181
|
-
bottom: element.scrollHeight - element.scrollTop - element.clientHeight,
|
|
12182
|
-
left: element.scrollLeft
|
|
12183
|
-
});
|
|
12196
|
+
if (!element) return;
|
|
12197
|
+
const handler = () => setScrollPosition(getScrollPosition(element));
|
|
12184
12198
|
handler();
|
|
12185
|
-
|
|
12186
|
-
observer.observe(element);
|
|
12187
|
-
element.addEventListener("scroll", handler, {
|
|
12188
|
-
capture: false,
|
|
12189
|
-
passive: true
|
|
12190
|
-
});
|
|
12199
|
+
element.addEventListener("scroll", handler, { passive: true });
|
|
12191
12200
|
return () => {
|
|
12192
|
-
observer.disconnect();
|
|
12193
12201
|
element.removeEventListener("scroll", handler);
|
|
12194
12202
|
setScrollPosition(void 0);
|
|
12195
12203
|
};
|
|
@@ -12204,6 +12212,25 @@ function useScrollPosition(element, setScrollPosition) {
|
|
|
12204
12212
|
t1 = $[3];
|
|
12205
12213
|
}
|
|
12206
12214
|
useEffect(t0, t1);
|
|
12215
|
+
let t2;
|
|
12216
|
+
if ($[4] !== element || $[5] !== setScrollPosition) {
|
|
12217
|
+
t2 = () => {
|
|
12218
|
+
if (element) setScrollPosition(getScrollPosition(element));
|
|
12219
|
+
};
|
|
12220
|
+
$[4] = element;
|
|
12221
|
+
$[5] = setScrollPosition;
|
|
12222
|
+
$[6] = t2;
|
|
12223
|
+
} else t2 = $[6];
|
|
12224
|
+
useResizeObserver(element, t2);
|
|
12225
|
+
}
|
|
12226
|
+
function getScrollPosition(element) {
|
|
12227
|
+
return {
|
|
12228
|
+
target: element,
|
|
12229
|
+
top: element.scrollTop,
|
|
12230
|
+
right: element.scrollWidth - element.scrollLeft - element.clientWidth,
|
|
12231
|
+
bottom: element.scrollHeight - element.scrollTop - element.clientHeight,
|
|
12232
|
+
left: element.scrollLeft
|
|
12233
|
+
};
|
|
12207
12234
|
}
|
|
12208
12235
|
// src/utils/nativeControls.ts
|
|
12209
12236
|
/** Native form controls. */
|
|
@@ -12267,7 +12294,7 @@ function usePrint() {
|
|
|
12267
12294
|
* to a hidden `<iframe>` which is then printed by the browser.
|
|
12268
12295
|
*
|
|
12269
12296
|
* Content being printed is aware of the fact that it is being printed and can adapt its appearance
|
|
12270
|
-
* accordingly. Use the `usePrinting` and `
|
|
12297
|
+
* accordingly. Use the `usePrinting` and `usePrintingTask` hooks to control the printing
|
|
12271
12298
|
* behaviour.
|
|
12272
12299
|
*
|
|
12273
12300
|
* Built on top of the [`react-to-print`](https://github.com/MatthewHerbst/react-to-print) package.
|
|
@@ -12300,8 +12327,8 @@ function usePrint() {
|
|
|
12300
12327
|
* ```
|
|
12301
12328
|
*/
|
|
12302
12329
|
function Printer(t0) {
|
|
12303
|
-
const $ = c(
|
|
12304
|
-
const { preview, printInForeground, documentTitle, pageSize, pageMargin, printColorAdjust: t1, fonts, copyShadowRoots, nonce, printFn, onBeforePrint, onAfterPrint, iframeProps, children } = t0;
|
|
12330
|
+
const $ = c(42);
|
|
12331
|
+
const { preview, printInForeground, documentTitle: documentTitleProp, pageSize, pageMargin, printColorAdjust: t1, fonts, copyShadowRoots, nonce, printFn, onBeforePrint, onAfterPrint, iframeProps, children } = t0;
|
|
12305
12332
|
const printColorAdjust = t1 === void 0 ? "exact" : t1;
|
|
12306
12333
|
const prefix = usePrefix();
|
|
12307
12334
|
const triggerRef = useRef(null);
|
|
@@ -12310,202 +12337,219 @@ function Printer(t0) {
|
|
|
12310
12337
|
const [printOptions, setPrintOptions] = useState(void 0);
|
|
12311
12338
|
const resolvePrintRef = useRef(null);
|
|
12312
12339
|
const rejectPrintRef = useRef(null);
|
|
12313
|
-
const
|
|
12314
|
-
const resolvePendingRef = useRef(null);
|
|
12315
|
-
const pendingTasksRef = useRef(0);
|
|
12316
|
-
const finishedTasksRef = useRef(0);
|
|
12340
|
+
const trackerRef = useRef(null);
|
|
12317
12341
|
let t2;
|
|
12318
12342
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12319
|
-
t2 = (
|
|
12320
|
-
|
|
12343
|
+
t2 = () => {
|
|
12344
|
+
if (!trackerRef.current) trackerRef.current = {
|
|
12345
|
+
tasks: /* @__PURE__ */ new Set(),
|
|
12346
|
+
waiters: []
|
|
12347
|
+
};
|
|
12348
|
+
return trackerRef.current;
|
|
12349
|
+
};
|
|
12350
|
+
$[0] = t2;
|
|
12351
|
+
} else t2 = $[0];
|
|
12352
|
+
const getTracker = t2;
|
|
12353
|
+
let t3;
|
|
12354
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12355
|
+
t3 = (t4) => {
|
|
12356
|
+
const focusTrigger = t4 === void 0 ? false : t4;
|
|
12321
12357
|
setPrintInProgress(false);
|
|
12322
12358
|
setPrintOptions(void 0);
|
|
12323
12359
|
resolvePrintRef.current = null;
|
|
12324
12360
|
rejectPrintRef.current = null;
|
|
12325
|
-
pendingPromiseRef.current = null;
|
|
12326
|
-
resolvePendingRef.current = null;
|
|
12327
|
-
pendingTasksRef.current = 0;
|
|
12328
|
-
finishedTasksRef.current = 0;
|
|
12329
12361
|
if (focusTrigger) setTimeout(() => triggerRef.current?.focus(), 100);
|
|
12330
12362
|
};
|
|
12331
|
-
$[
|
|
12332
|
-
} else
|
|
12333
|
-
const finishPrint =
|
|
12334
|
-
const relevantDocumentTitle = printOptions?.documentTitle ?? documentTitle;
|
|
12335
|
-
let t3;
|
|
12336
|
-
if ($[1] !== prefix || $[2] !== preview || $[3] !== printInForeground) {
|
|
12337
|
-
t3 = preview || printInForeground ? prefix("root") : void 0;
|
|
12338
|
-
$[1] = prefix;
|
|
12339
|
-
$[2] = preview;
|
|
12340
|
-
$[3] = printInForeground;
|
|
12341
|
-
$[4] = t3;
|
|
12342
|
-
} else t3 = $[4];
|
|
12363
|
+
$[1] = t3;
|
|
12364
|
+
} else t3 = $[1];
|
|
12365
|
+
const finishPrint = t3;
|
|
12343
12366
|
let t4;
|
|
12344
|
-
if ($[
|
|
12345
|
-
t4 =
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
|
|
12360
|
-
|
|
12367
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12368
|
+
t4 = () => {
|
|
12369
|
+
const tracker = getTracker();
|
|
12370
|
+
const id = Symbol();
|
|
12371
|
+
tracker.tasks.add(id);
|
|
12372
|
+
return () => {
|
|
12373
|
+
if (!tracker.tasks.delete(id)) return;
|
|
12374
|
+
queueMicrotask(() => {
|
|
12375
|
+
if (tracker.tasks.size === 0) tracker.waiters.splice(0).forEach(_temp$41);
|
|
12376
|
+
});
|
|
12377
|
+
};
|
|
12378
|
+
};
|
|
12379
|
+
$[2] = t4;
|
|
12380
|
+
} else t4 = $[2];
|
|
12381
|
+
const startPrintingTask = t4;
|
|
12382
|
+
let t5;
|
|
12383
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12384
|
+
t5 = () => {
|
|
12385
|
+
const tracker_0 = getTracker();
|
|
12386
|
+
if (tracker_0.tasks.size === 0) return Promise.resolve();
|
|
12387
|
+
return new Promise((resolve_0) => {
|
|
12388
|
+
tracker_0.waiters.push(resolve_0);
|
|
12389
|
+
});
|
|
12390
|
+
};
|
|
12391
|
+
$[3] = t5;
|
|
12392
|
+
} else t5 = $[3];
|
|
12393
|
+
const waitForPrintingTasks = t5;
|
|
12394
|
+
const documentTitle = printOptions?.documentTitle ?? documentTitleProp;
|
|
12395
|
+
let t6;
|
|
12396
|
+
if ($[4] !== prefix || $[5] !== preview || $[6] !== printInForeground) {
|
|
12397
|
+
t6 = cx(prefix("printer__iframe"), (preview || printInForeground) && prefix("root"));
|
|
12398
|
+
$[4] = prefix;
|
|
12399
|
+
$[5] = preview;
|
|
12400
|
+
$[6] = printInForeground;
|
|
12401
|
+
$[7] = t6;
|
|
12402
|
+
} else t6 = $[7];
|
|
12403
|
+
let t7;
|
|
12404
|
+
if ($[8] !== documentTitle) {
|
|
12405
|
+
t7 = typeof documentTitle === "function" ? () => documentTitle() ?? getDocumentTitle() : documentTitle ?? getDocumentTitle();
|
|
12406
|
+
$[8] = documentTitle;
|
|
12361
12407
|
$[9] = t7;
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
const t9 = printOptions?.
|
|
12365
|
-
const t10 = printOptions?.
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12408
|
+
} else t7 = $[9];
|
|
12409
|
+
const t8 = printOptions?.pageSize ?? pageSize;
|
|
12410
|
+
const t9 = printOptions?.pageMargin ?? pageMargin;
|
|
12411
|
+
const t10 = printOptions?.printColorAdjust ?? printColorAdjust;
|
|
12412
|
+
let t11;
|
|
12413
|
+
if ($[10] !== t10 || $[11] !== t8 || $[12] !== t9) {
|
|
12414
|
+
t11 = printPageStyle({
|
|
12415
|
+
pageSize: t8,
|
|
12416
|
+
pageMargin: t9,
|
|
12417
|
+
printColorAdjust: t10
|
|
12418
|
+
});
|
|
12419
|
+
$[10] = t10;
|
|
12420
|
+
$[11] = t8;
|
|
12421
|
+
$[12] = t9;
|
|
12422
|
+
$[13] = t11;
|
|
12423
|
+
} else t11 = $[13];
|
|
12424
|
+
const t12 = printOptions?.fonts ?? fonts;
|
|
12425
|
+
const t13 = printOptions?.copyShadowRoots ?? copyShadowRoots;
|
|
12426
|
+
const t14 = printOptions?.nonce ?? nonce;
|
|
12427
|
+
const t15 = printOptions?.iframeProps ?? iframeProps;
|
|
12428
|
+
const t16 = printOptions?.printFn ?? printFn;
|
|
12429
|
+
let t17;
|
|
12430
|
+
if ($[14] !== onAfterPrint) {
|
|
12431
|
+
t17 = () => {
|
|
12372
12432
|
let event;
|
|
12373
12433
|
withCleanup(() => onAfterPrint?.(event = new Event("ostack-ui.afterPrint")), () => {
|
|
12374
|
-
resolvePrintRef.current();
|
|
12434
|
+
resolvePrintRef.current?.();
|
|
12375
12435
|
finishPrint(!event?.defaultPrevented);
|
|
12376
12436
|
});
|
|
12377
12437
|
};
|
|
12378
|
-
$[
|
|
12379
|
-
$[
|
|
12380
|
-
} else
|
|
12381
|
-
let
|
|
12382
|
-
if ($[
|
|
12383
|
-
|
|
12384
|
-
rejectPrintRef.current(error);
|
|
12438
|
+
$[14] = onAfterPrint;
|
|
12439
|
+
$[15] = t17;
|
|
12440
|
+
} else t17 = $[15];
|
|
12441
|
+
let t18;
|
|
12442
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12443
|
+
t18 = (_errorLocation, error) => {
|
|
12444
|
+
rejectPrintRef.current?.(error);
|
|
12385
12445
|
finishPrint();
|
|
12386
12446
|
};
|
|
12387
|
-
$[
|
|
12388
|
-
} else
|
|
12389
|
-
let
|
|
12390
|
-
if ($[
|
|
12391
|
-
|
|
12392
|
-
bodyClass:
|
|
12393
|
-
documentTitle:
|
|
12394
|
-
pageStyle:
|
|
12395
|
-
fonts:
|
|
12396
|
-
copyShadowRoots:
|
|
12397
|
-
nonce:
|
|
12398
|
-
printIframeProps:
|
|
12447
|
+
$[16] = t18;
|
|
12448
|
+
} else t18 = $[16];
|
|
12449
|
+
let t19;
|
|
12450
|
+
if ($[17] !== t11 || $[18] !== t12 || $[19] !== t13 || $[20] !== t14 || $[21] !== t15 || $[22] !== t16 || $[23] !== t17 || $[24] !== t6 || $[25] !== t7) {
|
|
12451
|
+
t19 = {
|
|
12452
|
+
bodyClass: t6,
|
|
12453
|
+
documentTitle: t7,
|
|
12454
|
+
pageStyle: t11,
|
|
12455
|
+
fonts: t12,
|
|
12456
|
+
copyShadowRoots: t13,
|
|
12457
|
+
nonce: t14,
|
|
12458
|
+
printIframeProps: t15,
|
|
12399
12459
|
suppressErrors: DEV,
|
|
12400
|
-
print:
|
|
12401
|
-
onAfterPrint:
|
|
12402
|
-
onPrintError:
|
|
12403
|
-
};
|
|
12404
|
-
$[
|
|
12405
|
-
$[
|
|
12406
|
-
$[
|
|
12407
|
-
$[
|
|
12408
|
-
$[
|
|
12409
|
-
$[
|
|
12410
|
-
$[
|
|
12411
|
-
$[
|
|
12412
|
-
$[
|
|
12413
|
-
$[
|
|
12414
|
-
} else
|
|
12415
|
-
const reactToPrintFn = useReactToPrint(
|
|
12416
|
-
let
|
|
12417
|
-
if ($[
|
|
12418
|
-
|
|
12460
|
+
print: t16,
|
|
12461
|
+
onAfterPrint: t17,
|
|
12462
|
+
onPrintError: t18
|
|
12463
|
+
};
|
|
12464
|
+
$[17] = t11;
|
|
12465
|
+
$[18] = t12;
|
|
12466
|
+
$[19] = t13;
|
|
12467
|
+
$[20] = t14;
|
|
12468
|
+
$[21] = t15;
|
|
12469
|
+
$[22] = t16;
|
|
12470
|
+
$[23] = t17;
|
|
12471
|
+
$[24] = t6;
|
|
12472
|
+
$[25] = t7;
|
|
12473
|
+
$[26] = t19;
|
|
12474
|
+
} else t19 = $[26];
|
|
12475
|
+
const reactToPrintFn = useReactToPrint(t19);
|
|
12476
|
+
let t20;
|
|
12477
|
+
if ($[27] !== onBeforePrint || $[28] !== printInProgress || $[29] !== reactToPrintFn) {
|
|
12478
|
+
t20 = {
|
|
12419
12479
|
printInProgress,
|
|
12420
12480
|
reactToPrintFn,
|
|
12421
12481
|
onBeforePrint
|
|
12422
12482
|
};
|
|
12423
|
-
$[
|
|
12424
|
-
$[
|
|
12425
|
-
$[
|
|
12426
|
-
$[
|
|
12427
|
-
} else
|
|
12428
|
-
const latestRef = useLatestRef(
|
|
12429
|
-
let
|
|
12430
|
-
if ($[
|
|
12431
|
-
|
|
12483
|
+
$[27] = onBeforePrint;
|
|
12484
|
+
$[28] = printInProgress;
|
|
12485
|
+
$[29] = reactToPrintFn;
|
|
12486
|
+
$[30] = t20;
|
|
12487
|
+
} else t20 = $[30];
|
|
12488
|
+
const latestRef = useLatestRef(t20);
|
|
12489
|
+
let t21;
|
|
12490
|
+
if ($[31] !== latestRef) {
|
|
12491
|
+
t21 = async (options) => {
|
|
12432
12492
|
const { printInProgress: printInProgress_0, onBeforePrint: onBeforePrint_0 } = latestRef.current;
|
|
12433
12493
|
if (printInProgress_0) throw new Error("Printing is already in progress.");
|
|
12434
12494
|
flushSync(() => {
|
|
12435
12495
|
setPrintInProgress(true);
|
|
12436
12496
|
setPrintOptions(options);
|
|
12437
12497
|
});
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12498
|
+
try {
|
|
12499
|
+
await waitForPrintingTasks();
|
|
12500
|
+
if (onBeforePrint_0) {
|
|
12501
|
+
const event_0 = new Event("ostack-ui.print");
|
|
12502
|
+
await onBeforePrint_0(event_0);
|
|
12503
|
+
if (event_0.defaultPrevented) return finishPrint();
|
|
12504
|
+
}
|
|
12505
|
+
} catch (t22) {
|
|
12506
|
+
const error_0 = t22;
|
|
12507
|
+
finishPrint();
|
|
12508
|
+
throw error_0;
|
|
12443
12509
|
}
|
|
12444
12510
|
return new Promise((res, rej) => {
|
|
12445
|
-
latestRef.current.reactToPrintFn(() => contentRef.current);
|
|
12446
12511
|
resolvePrintRef.current = res;
|
|
12447
12512
|
rejectPrintRef.current = rej;
|
|
12513
|
+
latestRef.current.reactToPrintFn(() => contentRef.current);
|
|
12448
12514
|
});
|
|
12449
12515
|
};
|
|
12450
|
-
$[
|
|
12451
|
-
$[
|
|
12452
|
-
} else
|
|
12453
|
-
const handlePrint =
|
|
12454
|
-
let
|
|
12455
|
-
if ($[
|
|
12456
|
-
|
|
12457
|
-
let t20 = pendingTasksRef.current;
|
|
12458
|
-
const t21 = t20++;
|
|
12459
|
-
pendingTasksRef.current = t20;
|
|
12460
|
-
if (t21 === 0) pendingPromiseRef.current = new Promise((res_0) => resolvePendingRef.current = res_0);
|
|
12461
|
-
};
|
|
12462
|
-
$[30] = t19;
|
|
12463
|
-
} else t19 = $[30];
|
|
12464
|
-
const startPrintingTask = t19;
|
|
12465
|
-
let t20;
|
|
12466
|
-
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12467
|
-
t20 = () => {
|
|
12468
|
-
let t21 = finishedTasksRef.current;
|
|
12469
|
-
const t22 = ++t21;
|
|
12470
|
-
finishedTasksRef.current = t21;
|
|
12471
|
-
if (t22 >= pendingTasksRef.current) queueMicrotask(() => {
|
|
12472
|
-
if (finishedTasksRef.current >= pendingTasksRef.current) resolvePendingRef.current?.();
|
|
12473
|
-
});
|
|
12474
|
-
};
|
|
12475
|
-
$[31] = t20;
|
|
12476
|
-
} else t20 = $[31];
|
|
12477
|
-
const finishPrintingTask = t20;
|
|
12478
|
-
let t21;
|
|
12479
|
-
if ($[32] !== documentTitle || $[33] !== handlePrint || $[34] !== preview || $[35] !== printInForeground || $[36] !== printInProgress) {
|
|
12480
|
-
t21 = {
|
|
12516
|
+
$[31] = latestRef;
|
|
12517
|
+
$[32] = t21;
|
|
12518
|
+
} else t21 = $[32];
|
|
12519
|
+
const handlePrint = t21;
|
|
12520
|
+
let t22;
|
|
12521
|
+
if ($[33] !== documentTitleProp || $[34] !== handlePrint || $[35] !== preview || $[36] !== printInForeground || $[37] !== printInProgress) {
|
|
12522
|
+
t22 = {
|
|
12481
12523
|
preview,
|
|
12482
12524
|
printInForeground,
|
|
12483
|
-
documentTitle,
|
|
12525
|
+
documentTitle: documentTitleProp,
|
|
12484
12526
|
printInProgress,
|
|
12485
12527
|
triggerRef,
|
|
12486
12528
|
contentRef,
|
|
12487
12529
|
print: handlePrint,
|
|
12488
|
-
startPrintingTask
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
$[
|
|
12492
|
-
$[
|
|
12493
|
-
$[
|
|
12494
|
-
$[
|
|
12495
|
-
$[
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
value: t21,
|
|
12530
|
+
startPrintingTask
|
|
12531
|
+
};
|
|
12532
|
+
$[33] = documentTitleProp;
|
|
12533
|
+
$[34] = handlePrint;
|
|
12534
|
+
$[35] = preview;
|
|
12535
|
+
$[36] = printInForeground;
|
|
12536
|
+
$[37] = printInProgress;
|
|
12537
|
+
$[38] = t22;
|
|
12538
|
+
} else t22 = $[38];
|
|
12539
|
+
let t23;
|
|
12540
|
+
if ($[39] !== children || $[40] !== t22) {
|
|
12541
|
+
t23 = /* @__PURE__ */ jsx(PrinterContext, {
|
|
12542
|
+
value: t22,
|
|
12502
12543
|
children
|
|
12503
12544
|
});
|
|
12504
|
-
$[
|
|
12505
|
-
$[39] = t21;
|
|
12545
|
+
$[39] = children;
|
|
12506
12546
|
$[40] = t22;
|
|
12507
|
-
|
|
12508
|
-
|
|
12547
|
+
$[41] = t23;
|
|
12548
|
+
} else t23 = $[41];
|
|
12549
|
+
return t23;
|
|
12550
|
+
}
|
|
12551
|
+
function _temp$41(resolve) {
|
|
12552
|
+
return resolve();
|
|
12509
12553
|
}
|
|
12510
12554
|
/** Print page style to use. */
|
|
12511
12555
|
function printPageStyle({ pageSize, pageMargin, printColorAdjust }) {
|
|
@@ -12522,6 +12566,7 @@ function printPageStyle({ pageSize, pageMargin, printColorAdjust }) {
|
|
|
12522
12566
|
return pageStyle;
|
|
12523
12567
|
}
|
|
12524
12568
|
// src/components/Printer/usePrintClassNames.ts
|
|
12569
|
+
/** Hook which exposes print-related class names. */
|
|
12525
12570
|
function usePrintClassNames() {
|
|
12526
12571
|
const $ = c(7);
|
|
12527
12572
|
const prefix = usePrefix();
|
|
@@ -12557,7 +12602,7 @@ function usePrintClassNames() {
|
|
|
12557
12602
|
* **only** exists during printing.
|
|
12558
12603
|
*/
|
|
12559
12604
|
function PrinterContent(t0) {
|
|
12560
|
-
const $ = c(
|
|
12605
|
+
const $ = c(29);
|
|
12561
12606
|
let children;
|
|
12562
12607
|
let className;
|
|
12563
12608
|
let otherProps;
|
|
@@ -12582,58 +12627,55 @@ function PrinterContent(t0) {
|
|
|
12582
12627
|
ref = $[6];
|
|
12583
12628
|
}
|
|
12584
12629
|
const { printOnly: printOnlyClassName } = usePrintClassNames();
|
|
12585
|
-
const { preview, printInForeground, printInProgress, contentRef, startPrintingTask
|
|
12630
|
+
const { preview, printInForeground, printInProgress, contentRef, startPrintingTask } = usePrinterContext();
|
|
12586
12631
|
const printing = preview || printInProgress;
|
|
12587
12632
|
const t1 = printing ? startPrintingTask : void 0;
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
t3 = {
|
|
12633
|
+
let t2;
|
|
12634
|
+
if ($[7] !== printing || $[8] !== t1) {
|
|
12635
|
+
t2 = {
|
|
12592
12636
|
printing,
|
|
12593
|
-
startPrintingTask: t1
|
|
12594
|
-
finishPrintingTask: t2
|
|
12637
|
+
startPrintingTask: t1
|
|
12595
12638
|
};
|
|
12596
12639
|
$[7] = printing;
|
|
12597
12640
|
$[8] = t1;
|
|
12598
12641
|
$[9] = t2;
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
const contentContext = t3;
|
|
12642
|
+
} else t2 = $[9];
|
|
12643
|
+
const contentContext = t2;
|
|
12602
12644
|
const foregroundPrint = preview || printInForeground;
|
|
12603
|
-
const
|
|
12604
|
-
let
|
|
12605
|
-
if ($[
|
|
12606
|
-
|
|
12607
|
-
$[
|
|
12645
|
+
const t3 = !foregroundPrint && printOnlyClassName;
|
|
12646
|
+
let t4;
|
|
12647
|
+
if ($[10] !== className || $[11] !== t3) {
|
|
12648
|
+
t4 = cx(t3, className);
|
|
12649
|
+
$[10] = className;
|
|
12650
|
+
$[11] = t3;
|
|
12608
12651
|
$[12] = t4;
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
$[14] =
|
|
12615
|
-
$[15] =
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
ref: t7,
|
|
12652
|
+
} else t4 = $[12];
|
|
12653
|
+
let t5;
|
|
12654
|
+
if ($[13] !== contentRef || $[14] !== ref) {
|
|
12655
|
+
t5 = [contentRef, ref];
|
|
12656
|
+
$[13] = contentRef;
|
|
12657
|
+
$[14] = ref;
|
|
12658
|
+
$[15] = t5;
|
|
12659
|
+
} else t5 = $[15];
|
|
12660
|
+
const t6 = useCombinedRef(t5);
|
|
12661
|
+
let t7;
|
|
12662
|
+
if ($[16] !== children || $[17] !== otherProps || $[18] !== t4 || $[19] !== t6) {
|
|
12663
|
+
t7 = /* @__PURE__ */ jsx(Box, {
|
|
12664
|
+
className: t4,
|
|
12665
|
+
ref: t6,
|
|
12624
12666
|
...otherProps,
|
|
12625
12667
|
children
|
|
12626
12668
|
});
|
|
12627
|
-
$[
|
|
12628
|
-
$[
|
|
12629
|
-
$[
|
|
12669
|
+
$[16] = children;
|
|
12670
|
+
$[17] = otherProps;
|
|
12671
|
+
$[18] = t4;
|
|
12672
|
+
$[19] = t6;
|
|
12630
12673
|
$[20] = t7;
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
t9 = foregroundPrint ? /* @__PURE__ */ jsx(PrinterContentContext, {
|
|
12674
|
+
} else t7 = $[20];
|
|
12675
|
+
const content = t7;
|
|
12676
|
+
let t8;
|
|
12677
|
+
if ($[21] !== children || $[22] !== content || $[23] !== contentContext || $[24] !== foregroundPrint || $[25] !== portalContainer || $[26] !== printInProgress || $[27] !== printOnly) {
|
|
12678
|
+
t8 = foregroundPrint ? /* @__PURE__ */ jsx(PrinterContentContext, {
|
|
12637
12679
|
value: contentContext,
|
|
12638
12680
|
children: content
|
|
12639
12681
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [!printOnly && /* @__PURE__ */ jsx(PrinterContentContext, {
|
|
@@ -12647,16 +12689,16 @@ function PrinterContent(t0) {
|
|
|
12647
12689
|
children: content
|
|
12648
12690
|
})
|
|
12649
12691
|
})] });
|
|
12650
|
-
$[
|
|
12651
|
-
$[
|
|
12652
|
-
$[
|
|
12653
|
-
$[
|
|
12654
|
-
$[
|
|
12655
|
-
$[
|
|
12656
|
-
$[
|
|
12657
|
-
$[
|
|
12658
|
-
} else
|
|
12659
|
-
return
|
|
12692
|
+
$[21] = children;
|
|
12693
|
+
$[22] = content;
|
|
12694
|
+
$[23] = contentContext;
|
|
12695
|
+
$[24] = foregroundPrint;
|
|
12696
|
+
$[25] = portalContainer;
|
|
12697
|
+
$[26] = printInProgress;
|
|
12698
|
+
$[27] = printOnly;
|
|
12699
|
+
$[28] = t8;
|
|
12700
|
+
} else t8 = $[28];
|
|
12701
|
+
return t8;
|
|
12660
12702
|
}
|
|
12661
12703
|
// src/components/Printer/PrinterTrigger.tsx
|
|
12662
12704
|
/**
|
|
@@ -13110,9 +13152,9 @@ function _temp$40(state) {
|
|
|
13110
13152
|
}
|
|
13111
13153
|
/** Hook exposing the label's id. */
|
|
13112
13154
|
function useLabelId() {
|
|
13113
|
-
return useLabelStore(_temp2$
|
|
13155
|
+
return useLabelStore(_temp2$24);
|
|
13114
13156
|
}
|
|
13115
|
-
function _temp2$
|
|
13157
|
+
function _temp2$24(state) {
|
|
13116
13158
|
return state.labelId;
|
|
13117
13159
|
}
|
|
13118
13160
|
/** Hook which runs the provided callback whenever the label's label changes. */
|
|
@@ -13273,7 +13315,7 @@ var DEFAULT_TABLE_COLUMN_WIDTH = 150;
|
|
|
13273
13315
|
* ```
|
|
13274
13316
|
*/
|
|
13275
13317
|
function Table(t0) {
|
|
13276
|
-
const $ = c(
|
|
13318
|
+
const $ = c(127);
|
|
13277
13319
|
let ariaDescribedBy;
|
|
13278
13320
|
let ariaLabel;
|
|
13279
13321
|
let ariaLabelledBy;
|
|
@@ -13517,68 +13559,65 @@ function Table(t0) {
|
|
|
13517
13559
|
$[67] = variant;
|
|
13518
13560
|
$[68] = t24;
|
|
13519
13561
|
} else t24 = $[68];
|
|
13520
|
-
const t25 =
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
t27 = {
|
|
13562
|
+
const t25 = scrollableProps?.style;
|
|
13563
|
+
let t26;
|
|
13564
|
+
if ($[69] !== maxHeight || $[70] !== t25) {
|
|
13565
|
+
t26 = {
|
|
13525
13566
|
maxHeight,
|
|
13526
|
-
|
|
13527
|
-
...t26
|
|
13567
|
+
...t25
|
|
13528
13568
|
};
|
|
13529
13569
|
$[69] = maxHeight;
|
|
13530
13570
|
$[70] = t25;
|
|
13531
13571
|
$[71] = t26;
|
|
13572
|
+
} else t26 = $[71];
|
|
13573
|
+
const t27 = scrollableProps?.ref;
|
|
13574
|
+
let t28;
|
|
13575
|
+
if ($[72] !== t27) {
|
|
13576
|
+
t28 = [setScrollableEl, t27];
|
|
13532
13577
|
$[72] = t27;
|
|
13533
|
-
} else t27 = $[72];
|
|
13534
|
-
const t28 = scrollableProps?.ref;
|
|
13535
|
-
let t29;
|
|
13536
|
-
if ($[73] !== t28) {
|
|
13537
|
-
t29 = [setScrollableEl, t28];
|
|
13538
13578
|
$[73] = t28;
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13579
|
+
} else t28 = $[73];
|
|
13580
|
+
const t29 = useCombinedRef(t28);
|
|
13581
|
+
let t30;
|
|
13582
|
+
if ($[74] !== className || $[75] !== layout || $[76] !== prefix || $[77] !== variant) {
|
|
13583
|
+
t30 = cx(prefix("table"), prefix(`table--${variant}`), layout === "fixed" && prefix("table--fixed"), className);
|
|
13584
|
+
$[74] = className;
|
|
13585
|
+
$[75] = layout;
|
|
13586
|
+
$[76] = prefix;
|
|
13587
|
+
$[77] = variant;
|
|
13588
|
+
$[78] = t30;
|
|
13589
|
+
} else t30 = $[78];
|
|
13542
13590
|
let t31;
|
|
13543
|
-
if ($[
|
|
13544
|
-
t31 =
|
|
13545
|
-
$[
|
|
13546
|
-
$[
|
|
13547
|
-
$[
|
|
13548
|
-
$[
|
|
13549
|
-
$[
|
|
13550
|
-
} else t31 = $[
|
|
13591
|
+
if ($[79] !== ariaLabel || $[80] !== ariaLabelledBy || $[81] !== codeId || $[82] !== visuallyHiddenCaptionId) {
|
|
13592
|
+
t31 = ariaLabelledBy ?? (ariaLabel === void 0 && codeId ? combineAriaIds([codeId, visuallyHiddenCaptionId]) : void 0);
|
|
13593
|
+
$[79] = ariaLabel;
|
|
13594
|
+
$[80] = ariaLabelledBy;
|
|
13595
|
+
$[81] = codeId;
|
|
13596
|
+
$[82] = visuallyHiddenCaptionId;
|
|
13597
|
+
$[83] = t31;
|
|
13598
|
+
} else t31 = $[83];
|
|
13551
13599
|
let t32;
|
|
13552
|
-
if ($[
|
|
13553
|
-
t32 =
|
|
13554
|
-
$[80] = ariaLabel;
|
|
13555
|
-
$[81] = ariaLabelledBy;
|
|
13556
|
-
$[82] = codeId;
|
|
13557
|
-
$[83] = visuallyHiddenCaptionId;
|
|
13558
|
-
$[84] = t32;
|
|
13559
|
-
} else t32 = $[84];
|
|
13560
|
-
let t33;
|
|
13561
|
-
if ($[85] !== ariaDescribedBy || $[86] !== feedbackIds || $[87] !== helperTextIds) {
|
|
13562
|
-
t33 = combineAriaIds([
|
|
13600
|
+
if ($[84] !== ariaDescribedBy || $[85] !== feedbackIds || $[86] !== helperTextIds) {
|
|
13601
|
+
t32 = combineAriaIds([
|
|
13563
13602
|
feedbackIds,
|
|
13564
13603
|
ariaDescribedBy,
|
|
13565
13604
|
helperTextIds
|
|
13566
13605
|
]);
|
|
13567
|
-
$[
|
|
13568
|
-
$[
|
|
13569
|
-
$[
|
|
13570
|
-
$[
|
|
13571
|
-
} else
|
|
13572
|
-
let
|
|
13573
|
-
if ($[
|
|
13574
|
-
|
|
13575
|
-
$[
|
|
13576
|
-
$[
|
|
13577
|
-
} else
|
|
13578
|
-
const
|
|
13579
|
-
let
|
|
13580
|
-
if ($[
|
|
13581
|
-
|
|
13606
|
+
$[84] = ariaDescribedBy;
|
|
13607
|
+
$[85] = feedbackIds;
|
|
13608
|
+
$[86] = helperTextIds;
|
|
13609
|
+
$[87] = t32;
|
|
13610
|
+
} else t32 = $[87];
|
|
13611
|
+
let t33;
|
|
13612
|
+
if ($[88] !== ref) {
|
|
13613
|
+
t33 = [tableRef, ref];
|
|
13614
|
+
$[88] = ref;
|
|
13615
|
+
$[89] = t33;
|
|
13616
|
+
} else t33 = $[89];
|
|
13617
|
+
const t34 = useCombinedRef(t33);
|
|
13618
|
+
let t35;
|
|
13619
|
+
if ($[90] !== visuallyHiddenCaption || $[91] !== visuallyHiddenCaptionId || $[92] !== visuallyHiddenCaptionProps) {
|
|
13620
|
+
t35 = visuallyHiddenCaptionId && /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
13582
13621
|
asChild: true,
|
|
13583
13622
|
children: /* @__PURE__ */ jsx("caption", {
|
|
13584
13623
|
...visuallyHiddenCaptionProps,
|
|
@@ -13586,106 +13625,106 @@ function Table(t0) {
|
|
|
13586
13625
|
children: visuallyHiddenCaption
|
|
13587
13626
|
})
|
|
13588
13627
|
});
|
|
13589
|
-
$[
|
|
13590
|
-
$[
|
|
13591
|
-
$[
|
|
13592
|
-
$[
|
|
13593
|
-
} else
|
|
13628
|
+
$[90] = visuallyHiddenCaption;
|
|
13629
|
+
$[91] = visuallyHiddenCaptionId;
|
|
13630
|
+
$[92] = visuallyHiddenCaptionProps;
|
|
13631
|
+
$[93] = t35;
|
|
13632
|
+
} else t35 = $[93];
|
|
13633
|
+
let t36;
|
|
13634
|
+
if ($[94] !== defaultColumnWidth) {
|
|
13635
|
+
t36 = /* @__PURE__ */ jsx(ColumnWidths, { defaultColumnWidth });
|
|
13636
|
+
$[94] = defaultColumnWidth;
|
|
13637
|
+
$[95] = t36;
|
|
13638
|
+
} else t36 = $[95];
|
|
13594
13639
|
let t37;
|
|
13595
|
-
if ($[
|
|
13596
|
-
t37 = /* @__PURE__ */
|
|
13597
|
-
|
|
13598
|
-
$[96] = t37;
|
|
13599
|
-
} else t37 = $[96];
|
|
13600
|
-
let t38;
|
|
13601
|
-
if ($[97] !== ariaLabel || $[98] !== children || $[99] !== nonMarginProps || $[100] !== status || $[101] !== t31 || $[102] !== t32 || $[103] !== t33 || $[104] !== t35 || $[105] !== t36 || $[106] !== t37) {
|
|
13602
|
-
t38 = /* @__PURE__ */ jsxs("table", {
|
|
13603
|
-
className: t31,
|
|
13640
|
+
if ($[96] !== ariaLabel || $[97] !== children || $[98] !== nonMarginProps || $[99] !== status || $[100] !== t30 || $[101] !== t31 || $[102] !== t32 || $[103] !== t34 || $[104] !== t35 || $[105] !== t36) {
|
|
13641
|
+
t37 = /* @__PURE__ */ jsxs("table", {
|
|
13642
|
+
className: t30,
|
|
13604
13643
|
"data-status": status,
|
|
13605
13644
|
"aria-label": ariaLabel,
|
|
13606
|
-
"aria-labelledby":
|
|
13607
|
-
"aria-describedby":
|
|
13645
|
+
"aria-labelledby": t31,
|
|
13646
|
+
"aria-describedby": t32,
|
|
13608
13647
|
...nonMarginProps,
|
|
13609
|
-
ref:
|
|
13648
|
+
ref: t34,
|
|
13610
13649
|
children: [
|
|
13650
|
+
t35,
|
|
13611
13651
|
t36,
|
|
13612
|
-
t37,
|
|
13613
13652
|
children
|
|
13614
13653
|
]
|
|
13615
13654
|
});
|
|
13616
|
-
$[
|
|
13617
|
-
$[
|
|
13618
|
-
$[
|
|
13619
|
-
$[
|
|
13655
|
+
$[96] = ariaLabel;
|
|
13656
|
+
$[97] = children;
|
|
13657
|
+
$[98] = nonMarginProps;
|
|
13658
|
+
$[99] = status;
|
|
13659
|
+
$[100] = t30;
|
|
13620
13660
|
$[101] = t31;
|
|
13621
13661
|
$[102] = t32;
|
|
13622
|
-
$[103] =
|
|
13662
|
+
$[103] = t34;
|
|
13623
13663
|
$[104] = t35;
|
|
13624
13664
|
$[105] = t36;
|
|
13625
13665
|
$[106] = t37;
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
t39 = /* @__PURE__ */ jsx("div", {
|
|
13666
|
+
} else t37 = $[106];
|
|
13667
|
+
let t38;
|
|
13668
|
+
if ($[107] !== controlId || $[108] !== scrollableProps || $[109] !== status || $[110] !== t23 || $[111] !== t24 || $[112] !== t26 || $[113] !== t29 || $[114] !== t37) {
|
|
13669
|
+
t38 = /* @__PURE__ */ jsx("div", {
|
|
13631
13670
|
"data-status": status,
|
|
13632
13671
|
"data-accent": t23,
|
|
13633
13672
|
tabIndex: 0,
|
|
13634
13673
|
...scrollableProps,
|
|
13635
13674
|
id: controlId,
|
|
13636
13675
|
className: t24,
|
|
13637
|
-
style:
|
|
13638
|
-
ref:
|
|
13639
|
-
children:
|
|
13640
|
-
});
|
|
13641
|
-
$[
|
|
13642
|
-
$[
|
|
13643
|
-
$[
|
|
13644
|
-
$[
|
|
13645
|
-
$[
|
|
13646
|
-
$[
|
|
13647
|
-
$[
|
|
13676
|
+
style: t26,
|
|
13677
|
+
ref: t29,
|
|
13678
|
+
children: t37
|
|
13679
|
+
});
|
|
13680
|
+
$[107] = controlId;
|
|
13681
|
+
$[108] = scrollableProps;
|
|
13682
|
+
$[109] = status;
|
|
13683
|
+
$[110] = t23;
|
|
13684
|
+
$[111] = t24;
|
|
13685
|
+
$[112] = t26;
|
|
13686
|
+
$[113] = t29;
|
|
13687
|
+
$[114] = t37;
|
|
13648
13688
|
$[115] = t38;
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
t41 = /* @__PURE__ */ jsxs("div", {
|
|
13689
|
+
} else t38 = $[115];
|
|
13690
|
+
const t39 = captionSide === "bottom" && captionEl;
|
|
13691
|
+
let t40;
|
|
13692
|
+
if ($[116] !== containerProps || $[117] !== marginProps.dataAttrs || $[118] !== t19 || $[119] !== t21 || $[120] !== t22 || $[121] !== t38 || $[122] !== t39) {
|
|
13693
|
+
t40 = /* @__PURE__ */ jsxs("div", {
|
|
13655
13694
|
...t18,
|
|
13656
13695
|
...containerProps,
|
|
13657
13696
|
className: t19,
|
|
13658
13697
|
style: t21,
|
|
13659
13698
|
children: [
|
|
13660
13699
|
t22,
|
|
13661
|
-
|
|
13662
|
-
|
|
13700
|
+
t38,
|
|
13701
|
+
t39
|
|
13663
13702
|
]
|
|
13664
13703
|
});
|
|
13665
|
-
$[
|
|
13666
|
-
$[
|
|
13667
|
-
$[
|
|
13668
|
-
$[
|
|
13669
|
-
$[
|
|
13704
|
+
$[116] = containerProps;
|
|
13705
|
+
$[117] = marginProps.dataAttrs;
|
|
13706
|
+
$[118] = t19;
|
|
13707
|
+
$[119] = t21;
|
|
13708
|
+
$[120] = t22;
|
|
13709
|
+
$[121] = t38;
|
|
13670
13710
|
$[122] = t39;
|
|
13671
13711
|
$[123] = t40;
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
t42 = /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsx(TableContext, {
|
|
13712
|
+
} else t40 = $[123];
|
|
13713
|
+
let t41;
|
|
13714
|
+
if ($[124] !== t40 || $[125] !== tableContextValue) {
|
|
13715
|
+
t41 = /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsx(TableContext, {
|
|
13677
13716
|
value: tableContextValue,
|
|
13678
|
-
children:
|
|
13717
|
+
children: t40
|
|
13679
13718
|
}) });
|
|
13680
|
-
$[
|
|
13681
|
-
$[
|
|
13682
|
-
$[
|
|
13683
|
-
} else
|
|
13684
|
-
return
|
|
13719
|
+
$[124] = t40;
|
|
13720
|
+
$[125] = tableContextValue;
|
|
13721
|
+
$[126] = t41;
|
|
13722
|
+
} else t41 = $[126];
|
|
13723
|
+
return t41;
|
|
13685
13724
|
}
|
|
13686
13725
|
/** Table column widths. */
|
|
13687
13726
|
function ColumnWidths(t0) {
|
|
13688
|
-
const $ = c(
|
|
13727
|
+
const $ = c(5);
|
|
13689
13728
|
const { defaultColumnWidth } = t0;
|
|
13690
13729
|
const { store } = useTableContext();
|
|
13691
13730
|
let t1;
|
|
@@ -13695,16 +13734,18 @@ function ColumnWidths(t0) {
|
|
|
13695
13734
|
$[1] = t1;
|
|
13696
13735
|
} else t1 = $[1];
|
|
13697
13736
|
const widths = useStore(store, useShallow(t1));
|
|
13737
|
+
const keys = useStore(store, useShallow(_temp$39));
|
|
13698
13738
|
let t2;
|
|
13699
|
-
if ($[2] !== widths) {
|
|
13700
|
-
t2 = widths && /* @__PURE__ */ jsx("colgroup", { children: widths.map(
|
|
13701
|
-
$[2] =
|
|
13702
|
-
$[3] =
|
|
13703
|
-
|
|
13739
|
+
if ($[2] !== keys || $[3] !== widths) {
|
|
13740
|
+
t2 = widths && keys && /* @__PURE__ */ jsx("colgroup", { children: widths.map((width, i) => /* @__PURE__ */ jsx("col", { style: width != null ? { width } : void 0 }, keys[i])) });
|
|
13741
|
+
$[2] = keys;
|
|
13742
|
+
$[3] = widths;
|
|
13743
|
+
$[4] = t2;
|
|
13744
|
+
} else t2 = $[4];
|
|
13704
13745
|
return t2;
|
|
13705
13746
|
}
|
|
13706
|
-
function _temp$39(
|
|
13707
|
-
return
|
|
13747
|
+
function _temp$39(state_0) {
|
|
13748
|
+
return state_0.leafColumns && state_0.columnKeys && colKeys(state_0.leafColumns, state_0.columnKeys);
|
|
13708
13749
|
}
|
|
13709
13750
|
// src/components/Table/TableBody.tsx
|
|
13710
13751
|
/** Table body component. */
|
|
@@ -14111,7 +14152,7 @@ function TableRow(t0) {
|
|
|
14111
14152
|
// src/components/Table/TableHead.tsx
|
|
14112
14153
|
/** Table head component. */
|
|
14113
14154
|
function TableHead(t0) {
|
|
14114
|
-
const $ = c(
|
|
14155
|
+
const $ = c(42);
|
|
14115
14156
|
let children;
|
|
14116
14157
|
let className;
|
|
14117
14158
|
let columnsProp;
|
|
@@ -14164,49 +14205,61 @@ function TableHead(t0) {
|
|
|
14164
14205
|
const rows = Array.from({ length: nRows }, (_, i) => columnsOfRow(columns, i));
|
|
14165
14206
|
const { printHidden } = usePrintClassNames();
|
|
14166
14207
|
const generatedId = useId();
|
|
14208
|
+
let keys;
|
|
14167
14209
|
let leaves;
|
|
14168
14210
|
let t3;
|
|
14169
14211
|
if ($[12] !== columns) {
|
|
14170
14212
|
leaves = leafColumns$1(columns);
|
|
14171
|
-
|
|
14213
|
+
keys = columnKeys(columns);
|
|
14214
|
+
t3 = new Map(leaves.map(_temp2$23));
|
|
14172
14215
|
$[12] = columns;
|
|
14173
|
-
$[13] =
|
|
14174
|
-
$[14] =
|
|
14216
|
+
$[13] = keys;
|
|
14217
|
+
$[14] = leaves;
|
|
14218
|
+
$[15] = t3;
|
|
14175
14219
|
} else {
|
|
14176
|
-
|
|
14177
|
-
|
|
14220
|
+
keys = $[13];
|
|
14221
|
+
leaves = $[14];
|
|
14222
|
+
t3 = $[15];
|
|
14178
14223
|
}
|
|
14179
14224
|
const leafIndices = t3;
|
|
14180
14225
|
let t4;
|
|
14181
14226
|
let t5;
|
|
14182
|
-
if ($[
|
|
14183
|
-
t4 = () => store.setState({
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14227
|
+
if ($[16] !== keys || $[17] !== leaves || $[18] !== store) {
|
|
14228
|
+
t4 = () => store.setState({
|
|
14229
|
+
leafColumns: leaves,
|
|
14230
|
+
columnKeys: keys
|
|
14231
|
+
});
|
|
14232
|
+
t5 = [
|
|
14233
|
+
keys,
|
|
14234
|
+
leaves,
|
|
14235
|
+
store
|
|
14236
|
+
];
|
|
14237
|
+
$[16] = keys;
|
|
14238
|
+
$[17] = leaves;
|
|
14239
|
+
$[18] = store;
|
|
14240
|
+
$[19] = t4;
|
|
14241
|
+
$[20] = t5;
|
|
14189
14242
|
} else {
|
|
14190
|
-
t4 = $[
|
|
14191
|
-
t5 = $[
|
|
14243
|
+
t4 = $[19];
|
|
14244
|
+
t5 = $[20];
|
|
14192
14245
|
}
|
|
14193
14246
|
useEffect(t4, t5);
|
|
14194
14247
|
const tableHeadRef = useRef(null);
|
|
14195
14248
|
let t6;
|
|
14196
14249
|
let t7;
|
|
14197
|
-
if ($[
|
|
14250
|
+
if ($[21] !== sticky || $[22] !== store) {
|
|
14198
14251
|
t6 = () => store.subscribe((t8) => {
|
|
14199
14252
|
const { scrollPosition } = t8;
|
|
14200
14253
|
return sticky && scrollPosition != null && scrollPosition.top > 0;
|
|
14201
14254
|
}, (isStuck) => setBoolDataAttr(tableHeadRef.current, "stuck", isStuck), { fireImmediately: true });
|
|
14202
14255
|
t7 = [sticky, store];
|
|
14203
|
-
$[
|
|
14204
|
-
$[
|
|
14205
|
-
$[
|
|
14206
|
-
$[
|
|
14256
|
+
$[21] = sticky;
|
|
14257
|
+
$[22] = store;
|
|
14258
|
+
$[23] = t6;
|
|
14259
|
+
$[24] = t7;
|
|
14207
14260
|
} else {
|
|
14208
|
-
t6 = $[
|
|
14209
|
-
t7 = $[
|
|
14261
|
+
t6 = $[23];
|
|
14262
|
+
t7 = $[24];
|
|
14210
14263
|
}
|
|
14211
14264
|
useEffect(t6, t7);
|
|
14212
14265
|
const leftMost = leftMostColumns(columns);
|
|
@@ -14214,28 +14267,28 @@ function TableHead(t0) {
|
|
|
14214
14267
|
const T0 = TableHeadContext;
|
|
14215
14268
|
const t8 = true;
|
|
14216
14269
|
let t9;
|
|
14217
|
-
if ($[
|
|
14270
|
+
if ($[25] !== className || $[26] !== prefix) {
|
|
14218
14271
|
t9 = cx(prefix("table__head"), className);
|
|
14219
|
-
$[
|
|
14220
|
-
$[
|
|
14221
|
-
$[
|
|
14222
|
-
} else t9 = $[
|
|
14272
|
+
$[25] = className;
|
|
14273
|
+
$[26] = prefix;
|
|
14274
|
+
$[27] = t9;
|
|
14275
|
+
} else t9 = $[27];
|
|
14223
14276
|
let t10;
|
|
14224
|
-
if ($[
|
|
14277
|
+
if ($[28] !== sticky) {
|
|
14225
14278
|
t10 = boolDataAttr(sticky);
|
|
14226
|
-
$[
|
|
14227
|
-
$[
|
|
14228
|
-
} else t10 = $[
|
|
14279
|
+
$[28] = sticky;
|
|
14280
|
+
$[29] = t10;
|
|
14281
|
+
} else t10 = $[29];
|
|
14229
14282
|
let t11;
|
|
14230
|
-
if ($[
|
|
14283
|
+
if ($[30] !== ref) {
|
|
14231
14284
|
t11 = [tableHeadRef, ref];
|
|
14232
|
-
$[
|
|
14233
|
-
$[
|
|
14234
|
-
} else t11 = $[
|
|
14285
|
+
$[30] = ref;
|
|
14286
|
+
$[31] = t11;
|
|
14287
|
+
} else t11 = $[31];
|
|
14235
14288
|
const t12 = useCombinedRef(t11);
|
|
14236
14289
|
const t15 = rows.map((row, i_1) => /* @__PURE__ */ jsx(TableRow, {
|
|
14237
14290
|
...typeof rowProps === "function" ? rowProps(i_1) : rowProps,
|
|
14238
|
-
children: row.map((column
|
|
14291
|
+
children: row.map((column) => {
|
|
14239
14292
|
const { subColumns: t13, label: label_0, helperText, helperButtonLabel: helperButtonLabelProp, width, fixed: _fixed, header: _header, align, sticky: sticky_0, sortable, defaultSortDirection: t14, sorted, onSort, containerProps, labelProps, sortButtonProps, sortIconContainerProps, sortAscIconProps, sortDescIconProps, helperButtonProps, helperPopoverProps, helperPopoverContentProps, style, ...otherColumnProps } = column;
|
|
14240
14293
|
const subColumns = t13 === void 0 ? [] : t13;
|
|
14241
14294
|
const defaultSortDirection = t14 === void 0 ? "asc" : t14;
|
|
@@ -14335,11 +14388,11 @@ function TableHead(t0) {
|
|
|
14335
14388
|
helperTextEl
|
|
14336
14389
|
]
|
|
14337
14390
|
})
|
|
14338
|
-
},
|
|
14391
|
+
}, keys.get(column));
|
|
14339
14392
|
})
|
|
14340
14393
|
}, i_1));
|
|
14341
14394
|
let t16;
|
|
14342
|
-
if ($[
|
|
14395
|
+
if ($[32] !== children || $[33] !== otherProps || $[34] !== t10 || $[35] !== t12 || $[36] !== t15 || $[37] !== t9) {
|
|
14343
14396
|
t16 = /* @__PURE__ */ jsxs("thead", {
|
|
14344
14397
|
className: t9,
|
|
14345
14398
|
"data-sticky": t10,
|
|
@@ -14347,30 +14400,30 @@ function TableHead(t0) {
|
|
|
14347
14400
|
ref: t12,
|
|
14348
14401
|
children: [t15, children]
|
|
14349
14402
|
});
|
|
14350
|
-
$[
|
|
14351
|
-
$[
|
|
14352
|
-
$[
|
|
14353
|
-
$[
|
|
14354
|
-
$[
|
|
14355
|
-
$[
|
|
14356
|
-
$[
|
|
14357
|
-
} else t16 = $[
|
|
14403
|
+
$[32] = children;
|
|
14404
|
+
$[33] = otherProps;
|
|
14405
|
+
$[34] = t10;
|
|
14406
|
+
$[35] = t12;
|
|
14407
|
+
$[36] = t15;
|
|
14408
|
+
$[37] = t9;
|
|
14409
|
+
$[38] = t16;
|
|
14410
|
+
} else t16 = $[38];
|
|
14358
14411
|
let t17;
|
|
14359
|
-
if ($[
|
|
14412
|
+
if ($[39] !== T0 || $[40] !== t16) {
|
|
14360
14413
|
t17 = /* @__PURE__ */ jsx(T0, {
|
|
14361
14414
|
value: t8,
|
|
14362
14415
|
children: t16
|
|
14363
14416
|
});
|
|
14364
|
-
$[
|
|
14365
|
-
$[
|
|
14366
|
-
$[
|
|
14367
|
-
} else t17 = $[
|
|
14417
|
+
$[39] = T0;
|
|
14418
|
+
$[40] = t16;
|
|
14419
|
+
$[41] = t17;
|
|
14420
|
+
} else t17 = $[41];
|
|
14368
14421
|
return t17;
|
|
14369
14422
|
}
|
|
14370
14423
|
function _temp3$13(sum, width_0) {
|
|
14371
14424
|
return sum + width_0;
|
|
14372
14425
|
}
|
|
14373
|
-
function _temp2$
|
|
14426
|
+
function _temp2$23(l, i_0) {
|
|
14374
14427
|
return [l, i_0];
|
|
14375
14428
|
}
|
|
14376
14429
|
function _temp$38(t0) {
|
|
@@ -14953,7 +15006,7 @@ function DataTable(t0) {
|
|
|
14953
15006
|
groupType: DataTableColumnGroup,
|
|
14954
15007
|
groupProp: "subColumns",
|
|
14955
15008
|
allowNestedGroups: true,
|
|
14956
|
-
transformChildObject: _temp2$
|
|
15009
|
+
transformChildObject: _temp2$22
|
|
14957
15010
|
});
|
|
14958
15011
|
$[45] = children;
|
|
14959
15012
|
$[46] = t13;
|
|
@@ -15172,7 +15225,7 @@ function DataTable(t0) {
|
|
|
15172
15225
|
} else t20 = $[129];
|
|
15173
15226
|
return t20;
|
|
15174
15227
|
}
|
|
15175
|
-
function _temp2$
|
|
15228
|
+
function _temp2$22(t0) {
|
|
15176
15229
|
const { children: children_0, render, ...otherProps_0 } = t0;
|
|
15177
15230
|
return {
|
|
15178
15231
|
render: render ?? children_0,
|
|
@@ -15258,9 +15311,9 @@ function useScrollbarSize() {
|
|
|
15258
15311
|
$[0] = t0;
|
|
15259
15312
|
} else t0 = $[0];
|
|
15260
15313
|
useEffect(_temp$36, t0);
|
|
15261
|
-
return useScrollbarSizeStore(_temp2$
|
|
15314
|
+
return useScrollbarSizeStore(_temp2$21);
|
|
15262
15315
|
}
|
|
15263
|
-
function _temp2$
|
|
15316
|
+
function _temp2$21(state) {
|
|
15264
15317
|
return state.measurements;
|
|
15265
15318
|
}
|
|
15266
15319
|
function _temp$36() {
|
|
@@ -15906,7 +15959,7 @@ function useCreateFormContext(t0) {
|
|
|
15906
15959
|
$[5] = t4;
|
|
15907
15960
|
} else t4 = $[5];
|
|
15908
15961
|
const store = useConstant(t4);
|
|
15909
|
-
const actions_0 = useStore(store, _temp2$
|
|
15962
|
+
const actions_0 = useStore(store, _temp2$20);
|
|
15910
15963
|
let t5;
|
|
15911
15964
|
if ($[6] !== actions_0) {
|
|
15912
15965
|
t5 = () => buildFormApi(actions_0);
|
|
@@ -15949,7 +16002,7 @@ function useCreateFormContext(t0) {
|
|
|
15949
16002
|
} else t8 = $[17];
|
|
15950
16003
|
return t8;
|
|
15951
16004
|
}
|
|
15952
|
-
function _temp2$
|
|
16005
|
+
function _temp2$20(t0) {
|
|
15953
16006
|
const { actions } = t0;
|
|
15954
16007
|
return actions;
|
|
15955
16008
|
}
|
|
@@ -16006,9 +16059,9 @@ function useFormValue(name) {
|
|
|
16006
16059
|
/** Hook which returns `true` when the form is currently being submitted. */
|
|
16007
16060
|
function useFormSubmitting() {
|
|
16008
16061
|
const { store } = useFormContext();
|
|
16009
|
-
return useStore(store, _temp4$
|
|
16062
|
+
return useStore(store, _temp4$6);
|
|
16010
16063
|
}
|
|
16011
|
-
function _temp4$
|
|
16064
|
+
function _temp4$6(t0) {
|
|
16012
16065
|
const { submitting } = t0;
|
|
16013
16066
|
return submitting;
|
|
16014
16067
|
}
|
|
@@ -16939,15 +16992,15 @@ function useDataTableSelectionColumn() {
|
|
|
16939
16992
|
const actualSelectAllRowsLabel = selectAllRowsLabel ?? locale.DataTable.selectAllRowsLabel;
|
|
16940
16993
|
const actualSelectRowLabel = selectRowLabel ?? locale.DataTable.selectRowLabel;
|
|
16941
16994
|
const selectionMode = useStore(store, _temp$32);
|
|
16942
|
-
const
|
|
16995
|
+
const wrappedSelectedRows = useStore(store, _temp2$19);
|
|
16943
16996
|
const disabledSelections = useStore(store, _temp3$11);
|
|
16944
|
-
const { selectRows, unselectRows } = useStore(store, _temp4$
|
|
16997
|
+
const { selectRows, unselectRows } = useStore(store, _temp4$5);
|
|
16945
16998
|
let t0;
|
|
16946
16999
|
if ($[0] !== disabledSelections || $[1] !== rowKey || $[2] !== showSelectionColumn) {
|
|
16947
17000
|
t0 = (state_3) => {
|
|
16948
17001
|
if (state_3.loading || !showSelectionColumn) return "loading";
|
|
16949
17002
|
const { selectionMode: selectionMode_0, selectedRows: t1 } = state_3;
|
|
16950
|
-
const [
|
|
17003
|
+
const [selectedRows] = t1;
|
|
16951
17004
|
const visibleRows = state_3.visibleRows();
|
|
16952
17005
|
let selectedCount = 0;
|
|
16953
17006
|
let disabledCount = 0;
|
|
@@ -16955,7 +17008,7 @@ function useDataTableSelectionColumn() {
|
|
|
16955
17008
|
for (const row of visibleRows) {
|
|
16956
17009
|
if (row === void 0) return "loading";
|
|
16957
17010
|
const key = getRowKey(row, rowKey);
|
|
16958
|
-
const isSelected =
|
|
17011
|
+
const isSelected = selectedRows.has(key) === (selectionMode_0 === "additive");
|
|
16959
17012
|
const isDisabled = disabledSelections?.has(key) ?? false;
|
|
16960
17013
|
selectedCount = selectedCount + +isSelected;
|
|
16961
17014
|
disabledCount = disabledCount + +isDisabled;
|
|
@@ -17006,12 +17059,13 @@ function useDataTableSelectionColumn() {
|
|
|
17006
17059
|
$[15] = t2;
|
|
17007
17060
|
} else t2 = $[15];
|
|
17008
17061
|
let t3;
|
|
17009
|
-
if ($[16] !== actualSelectRowLabel || $[17] !== disabledSelections || $[18] !== prefix || $[19] !== rowKey || $[20] !== selectRows || $[21] !==
|
|
17062
|
+
if ($[16] !== actualSelectRowLabel || $[17] !== disabledSelections || $[18] !== prefix || $[19] !== rowKey || $[20] !== selectRows || $[21] !== selectionMode || $[22] !== unselectRows || $[23] !== wrappedSelectedRows) {
|
|
17010
17063
|
t3 = (t4) => {
|
|
17011
17064
|
const { row: row_1 } = t4;
|
|
17012
17065
|
const key_0 = getRowKey(row_1, rowKey);
|
|
17066
|
+
const [selectedRows_0] = wrappedSelectedRows;
|
|
17013
17067
|
return /* @__PURE__ */ jsx(Checkbox, {
|
|
17014
|
-
checked:
|
|
17068
|
+
checked: selectedRows_0.has(key_0) === (selectionMode === "additive"),
|
|
17015
17069
|
onCheckedChange: (checked) => {
|
|
17016
17070
|
if (checked) selectRows([key_0]);
|
|
17017
17071
|
else unselectRows([key_0]);
|
|
@@ -17026,9 +17080,9 @@ function useDataTableSelectionColumn() {
|
|
|
17026
17080
|
$[18] = prefix;
|
|
17027
17081
|
$[19] = rowKey;
|
|
17028
17082
|
$[20] = selectRows;
|
|
17029
|
-
$[21] =
|
|
17030
|
-
$[22] =
|
|
17031
|
-
$[23] =
|
|
17083
|
+
$[21] = selectionMode;
|
|
17084
|
+
$[22] = unselectRows;
|
|
17085
|
+
$[23] = wrappedSelectedRows;
|
|
17032
17086
|
$[24] = t3;
|
|
17033
17087
|
} else t3 = $[24];
|
|
17034
17088
|
let t4;
|
|
@@ -17052,13 +17106,13 @@ function useDataTableSelectionColumn() {
|
|
|
17052
17106
|
return t4;
|
|
17053
17107
|
}
|
|
17054
17108
|
}
|
|
17055
|
-
function _temp4$
|
|
17109
|
+
function _temp4$5(state_2) {
|
|
17056
17110
|
return state_2.actions;
|
|
17057
17111
|
}
|
|
17058
17112
|
function _temp3$11(state_1) {
|
|
17059
17113
|
return state_1.disabledSelections;
|
|
17060
17114
|
}
|
|
17061
|
-
function _temp2$
|
|
17115
|
+
function _temp2$19(state_0) {
|
|
17062
17116
|
return state_0.selectedRows;
|
|
17063
17117
|
}
|
|
17064
17118
|
function _temp$32(state) {
|
|
@@ -17114,7 +17168,7 @@ function DataTableRow(t0) {
|
|
|
17114
17168
|
} else t1 = $[7];
|
|
17115
17169
|
const leafColumns = useStore(store, useShallow(t1));
|
|
17116
17170
|
const headCount = useStore(store, _temp$31);
|
|
17117
|
-
const filter = useStore(store, _temp2$
|
|
17171
|
+
const filter = useStore(store, _temp2$18);
|
|
17118
17172
|
let t2;
|
|
17119
17173
|
if ($[8] !== row || $[9] !== rowKey) {
|
|
17120
17174
|
t2 = (state_2) => row && state_2.selectedRows[0].has(getRowKey(row, rowKey));
|
|
@@ -17145,7 +17199,7 @@ function DataTableRow(t0) {
|
|
|
17145
17199
|
if ($[28] !== filter || $[29] !== generatedId || $[30] !== index || $[31] !== locale || $[32] !== prefix || $[33] !== printing || $[34] !== renderCell || $[35] !== row || $[36] !== rowHeight) {
|
|
17146
17200
|
t7 = (cells, t8, i) => {
|
|
17147
17201
|
const [columnId, t9] = t8;
|
|
17148
|
-
const { filterable, locale: columnLocale, subColumns: _subColumns, getValue, format, render, compare: _compare, match, footer: _footer, label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t10, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps, footerProps: _footerProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t9;
|
|
17202
|
+
const { filterable, locale: columnLocale, subColumns: _subColumns, getValue, format, render, compare: _compare, match, sortOptions: _sortOptions, footer: _footer, label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t10, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps, footerProps: _footerProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t9;
|
|
17149
17203
|
if (printing && !(t10 === void 0 ? true : t10)) return cells;
|
|
17150
17204
|
const loadingRow = row === void 0;
|
|
17151
17205
|
const value = !loadingRow && (getValue ? getValue({
|
|
@@ -17232,7 +17286,7 @@ function DataTableRow(t0) {
|
|
|
17232
17286
|
} else t7 = $[43];
|
|
17233
17287
|
return t7;
|
|
17234
17288
|
}
|
|
17235
|
-
function _temp2$
|
|
17289
|
+
function _temp2$18(state_1) {
|
|
17236
17290
|
return state_1.filter;
|
|
17237
17291
|
}
|
|
17238
17292
|
function _temp$31(state_0) {
|
|
@@ -17246,7 +17300,7 @@ function DataTableEmptyOrLoadingRows(t0) {
|
|
|
17246
17300
|
const prefix = usePrefix();
|
|
17247
17301
|
const { renderRow, store, apiRef } = useDataTableContext();
|
|
17248
17302
|
const loading = useStore(store, _temp$30);
|
|
17249
|
-
const loadingCount = useStore(store, _temp2$
|
|
17303
|
+
const loadingCount = useStore(store, _temp2$17);
|
|
17250
17304
|
const numberOfColumns = useTableNumberOfColumns() ?? 1;
|
|
17251
17305
|
const headCount = useStore(store, _temp3$10);
|
|
17252
17306
|
let t1;
|
|
@@ -17292,18 +17346,18 @@ function DataTableEmptyOrLoadingRows(t0) {
|
|
|
17292
17346
|
}
|
|
17293
17347
|
function _temp7() {
|
|
17294
17348
|
return {
|
|
17295
|
-
splice: _temp4$
|
|
17349
|
+
splice: _temp4$4,
|
|
17296
17350
|
refresh: _temp5$3,
|
|
17297
17351
|
goTo: _temp6$1
|
|
17298
17352
|
};
|
|
17299
17353
|
}
|
|
17300
17354
|
function _temp6$1() {}
|
|
17301
17355
|
function _temp5$3() {}
|
|
17302
|
-
function _temp4$
|
|
17356
|
+
function _temp4$4() {}
|
|
17303
17357
|
function _temp3$10(state_1) {
|
|
17304
17358
|
return state_1.headCount;
|
|
17305
17359
|
}
|
|
17306
|
-
function _temp2$
|
|
17360
|
+
function _temp2$17(state_0) {
|
|
17307
17361
|
return state_0.loadingCount;
|
|
17308
17362
|
}
|
|
17309
17363
|
function _temp$30(state) {
|
|
@@ -17519,7 +17573,7 @@ function ScrolledDataTableRows(t0) {
|
|
|
17519
17573
|
let t7;
|
|
17520
17574
|
let t8;
|
|
17521
17575
|
if ($[19] !== store || $[20] !== update || $[21] !== virtualizer_1) {
|
|
17522
|
-
t7 = () => store.subscribe(_temp2$
|
|
17576
|
+
t7 = () => store.subscribe(_temp2$16, () => update(virtualizer_1.getVirtualItems()));
|
|
17523
17577
|
t8 = [
|
|
17524
17578
|
store,
|
|
17525
17579
|
update,
|
|
@@ -17740,7 +17794,7 @@ function _temp3$9(t0) {
|
|
|
17740
17794
|
const { offset: offset_0 } = t0;
|
|
17741
17795
|
return offset_0();
|
|
17742
17796
|
}
|
|
17743
|
-
function _temp2$
|
|
17797
|
+
function _temp2$16(t0) {
|
|
17744
17798
|
const { updateCounter } = t0;
|
|
17745
17799
|
return updateCounter;
|
|
17746
17800
|
}
|
|
@@ -17808,25 +17862,13 @@ function _temp$27(state) {
|
|
|
17808
17862
|
// src/utils/useMeasure.ts
|
|
17809
17863
|
/** Hook that tracks the dimensions of an HTML element using the Resize Observer API. */
|
|
17810
17864
|
function useMeasure(element, setMeasurement) {
|
|
17811
|
-
const $ = c(
|
|
17865
|
+
const $ = c(7);
|
|
17812
17866
|
let t0;
|
|
17813
17867
|
let t1;
|
|
17814
17868
|
if ($[0] !== element || $[1] !== setMeasurement) {
|
|
17815
17869
|
t0 = () => {
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
return;
|
|
17819
|
-
}
|
|
17820
|
-
setMeasurement(element.getBoundingClientRect());
|
|
17821
|
-
const observer = new ResizeObserver((t2) => {
|
|
17822
|
-
const [entry] = t2;
|
|
17823
|
-
return entry && setMeasurement(element.getBoundingClientRect());
|
|
17824
|
-
});
|
|
17825
|
-
observer.observe(element);
|
|
17826
|
-
return () => {
|
|
17827
|
-
observer.disconnect();
|
|
17828
|
-
setMeasurement(void 0);
|
|
17829
|
-
};
|
|
17870
|
+
setMeasurement(element?.getBoundingClientRect());
|
|
17871
|
+
return () => setMeasurement(void 0);
|
|
17830
17872
|
};
|
|
17831
17873
|
t1 = [element, setMeasurement];
|
|
17832
17874
|
$[0] = element;
|
|
@@ -17838,6 +17880,16 @@ function useMeasure(element, setMeasurement) {
|
|
|
17838
17880
|
t1 = $[3];
|
|
17839
17881
|
}
|
|
17840
17882
|
useSafeLayoutEffect(t0, t1);
|
|
17883
|
+
let t2;
|
|
17884
|
+
if ($[4] !== element || $[5] !== setMeasurement) {
|
|
17885
|
+
t2 = () => {
|
|
17886
|
+
if (element) setMeasurement(element.getBoundingClientRect());
|
|
17887
|
+
};
|
|
17888
|
+
$[4] = element;
|
|
17889
|
+
$[5] = setMeasurement;
|
|
17890
|
+
$[6] = t2;
|
|
17891
|
+
} else t2 = $[6];
|
|
17892
|
+
useResizeObserver(element, t2);
|
|
17841
17893
|
}
|
|
17842
17894
|
// src/components/DataTable/DataTableFoot.tsx
|
|
17843
17895
|
/** Foot of the data table. */
|
|
@@ -17904,7 +17956,7 @@ function DataTableFoot(t0) {
|
|
|
17904
17956
|
$[13] = t4;
|
|
17905
17957
|
} else t4 = $[13];
|
|
17906
17958
|
const footRowIndex = useStore(store, t4);
|
|
17907
|
-
const rows = useStore(store, _temp2$
|
|
17959
|
+
const rows = useStore(store, _temp2$15);
|
|
17908
17960
|
let t5;
|
|
17909
17961
|
if ($[14] !== ref) {
|
|
17910
17962
|
t5 = [setTableFootEl, ref];
|
|
@@ -17921,9 +17973,10 @@ function DataTableFoot(t0) {
|
|
|
17921
17973
|
"aria-rowindex": footRowIndex,
|
|
17922
17974
|
children: Object.entries(leafColumns_0).reduce((cells, t7) => {
|
|
17923
17975
|
const [columnId, t8] = t7;
|
|
17924
|
-
const { filterable: _filterable, locale: _locale, subColumns: _subColumns, getValue: _getValue, format: _format, render: _render, compare: _compare, footer, label: _label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t9, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps: _labelProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t8;
|
|
17976
|
+
const { filterable: _filterable, locale: _locale, subColumns: _subColumns, getValue: _getValue, format: _format, render: _render, compare: _compare, match: _match, sortOptions: _sortOptions, footer, footerProps, label: _label, helperText: _helperText, helperButtonLabel: _helperButtonLabel, width: _width, fixed: _fixed, sortable: _sortable, defaultSortDirection: _defaultSortDirection, showWhilePrinting: t9, id: _id, cellId: _cellId, containerProps: _containerProps, labelProps: _labelProps, sortButtonProps: _sortButtonProps, sortIconContainerProps: _sortIconContainerProps, sortAscIconProps: _sortAscIconProps, sortDescIconProps: _sortDescIconProps, helperButtonProps: _helperButtonProps, helperPopoverProps: _helperPopoverProps, helperPopoverContentProps: _helperPopoverContentProps, ...otherProps_0 } = t8;
|
|
17925
17977
|
if (!printing || (t9 === void 0 ? true : t9)) cells.push(/* @__PURE__ */ jsx(TableCell, {
|
|
17926
17978
|
...otherProps_0,
|
|
17979
|
+
...footerProps,
|
|
17927
17980
|
children: typeof footer === "function" ? footer({ rows }) : footer
|
|
17928
17981
|
}, columnId));
|
|
17929
17982
|
return cells;
|
|
@@ -17943,7 +17996,7 @@ function DataTableFoot(t0) {
|
|
|
17943
17996
|
} else t6 = $[25];
|
|
17944
17997
|
return t6;
|
|
17945
17998
|
}
|
|
17946
|
-
function _temp2$
|
|
17999
|
+
function _temp2$15(t0) {
|
|
17947
18000
|
const { processedRows } = t0;
|
|
17948
18001
|
return processedRows();
|
|
17949
18002
|
}
|
|
@@ -17985,7 +18038,7 @@ function DataTableHead(t0) {
|
|
|
17985
18038
|
} else t1 = $[6];
|
|
17986
18039
|
const columns = useStore(store, useShallow(t1));
|
|
17987
18040
|
const sortBy = useStore(store, _temp$25);
|
|
17988
|
-
const sortDirection = useStore(store, _temp2$
|
|
18041
|
+
const sortDirection = useStore(store, _temp2$14);
|
|
17989
18042
|
const { setSort } = useStore(store, _temp3$8);
|
|
17990
18043
|
const [tableHeadEl, setTableHeadEl] = useState(null);
|
|
17991
18044
|
let t2;
|
|
@@ -18054,7 +18107,7 @@ function DataTableHead(t0) {
|
|
|
18054
18107
|
function _temp3$8(state_2) {
|
|
18055
18108
|
return state_2.actions;
|
|
18056
18109
|
}
|
|
18057
|
-
function _temp2$
|
|
18110
|
+
function _temp2$14(state_1) {
|
|
18058
18111
|
return state_1.sortDirection;
|
|
18059
18112
|
}
|
|
18060
18113
|
function _temp$25(state_0) {
|
|
@@ -18062,7 +18115,7 @@ function _temp$25(state_0) {
|
|
|
18062
18115
|
}
|
|
18063
18116
|
function dataTableToTableColumns(columns, printing, generatedId, sortingProps) {
|
|
18064
18117
|
return columns && Object.entries(columns).reduce((columns, [columnId, column]) => {
|
|
18065
|
-
const { sortable, subColumns, cellId, showWhilePrinting = true, labelProps, filterable: _filterable,
|
|
18118
|
+
const { sortable, subColumns, cellId, showWhilePrinting = true, labelProps, filterable: _filterable, locale: _locale, getValue: _getValue, format: _format, render: _render, compare: _compare, match: _match, sortOptions: _sortOptions, footer: _footer, footerProps: _footerProps, ...otherColumn } = column;
|
|
18066
18119
|
if (printing && !showWhilePrinting) return columns;
|
|
18067
18120
|
const actualLabelProps = {
|
|
18068
18121
|
id: labelProps?.id ?? `data-table-column-label-${columnId}-${generatedId}`,
|
|
@@ -18087,7 +18140,7 @@ function dataTableToTableColumns(columns, printing, generatedId, sortingProps) {
|
|
|
18087
18140
|
// src/components/DataTable/DataTableContent.tsx
|
|
18088
18141
|
/** Component containing the "main content" of the data table, i.e. the table itself. */
|
|
18089
18142
|
function DataTableContent(t0) {
|
|
18090
|
-
const $ = c(
|
|
18143
|
+
const $ = c(69);
|
|
18091
18144
|
let className;
|
|
18092
18145
|
let containerProps;
|
|
18093
18146
|
let emptyMessageProp;
|
|
@@ -18134,158 +18187,179 @@ function DataTableContent(t0) {
|
|
|
18134
18187
|
const [locale] = useLocale();
|
|
18135
18188
|
const emptyMessage = emptyMessageProp ?? locale.DataTableContent.emptyMessage;
|
|
18136
18189
|
const { displayMode, required, estimatedRowHeight, store } = useDataTableContext();
|
|
18137
|
-
const
|
|
18190
|
+
const [tableEl, setTableEl] = useState(null);
|
|
18138
18191
|
const [scrollableEl, setScrollableEl] = useState(null);
|
|
18139
18192
|
const { height: scrollbarHeight } = useScrollbarSize();
|
|
18193
|
+
const [overflowsX, setOverflowsX] = useState(false);
|
|
18140
18194
|
let t2;
|
|
18141
|
-
if ($[13] !==
|
|
18142
|
-
t2 =
|
|
18143
|
-
$[13] =
|
|
18144
|
-
$[14] =
|
|
18145
|
-
|
|
18146
|
-
|
|
18195
|
+
if ($[13] !== scrollableEl || $[14] !== tableEl) {
|
|
18196
|
+
t2 = [scrollableEl, tableEl];
|
|
18197
|
+
$[13] = scrollableEl;
|
|
18198
|
+
$[14] = tableEl;
|
|
18199
|
+
$[15] = t2;
|
|
18200
|
+
} else t2 = $[15];
|
|
18147
18201
|
let t3;
|
|
18148
|
-
if ($[
|
|
18149
|
-
t3 = (
|
|
18150
|
-
|
|
18151
|
-
|
|
18152
|
-
$[
|
|
18153
|
-
$[
|
|
18154
|
-
} else t3 = $[
|
|
18155
|
-
|
|
18156
|
-
const stickyHeadFoot = maxHeight !== void 0;
|
|
18202
|
+
if ($[16] !== scrollableEl) {
|
|
18203
|
+
t3 = () => {
|
|
18204
|
+
if (scrollableEl) setOverflowsX(scrollableEl.scrollWidth > scrollableEl.clientWidth);
|
|
18205
|
+
};
|
|
18206
|
+
$[16] = scrollableEl;
|
|
18207
|
+
$[17] = t3;
|
|
18208
|
+
} else t3 = $[17];
|
|
18209
|
+
useResizeObserver(t2, t3);
|
|
18157
18210
|
let t4;
|
|
18211
|
+
if ($[18] !== estimatedRowHeight) {
|
|
18212
|
+
t4 = typeof estimatedRowHeight === "number" ? estimatedRowHeight : estimatedRowHeight(0);
|
|
18213
|
+
$[18] = estimatedRowHeight;
|
|
18214
|
+
$[19] = t4;
|
|
18215
|
+
} else t4 = $[19];
|
|
18216
|
+
const rowHeight = t4;
|
|
18158
18217
|
let t5;
|
|
18159
|
-
if ($[
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
|
|
18164
|
-
$[
|
|
18165
|
-
$[
|
|
18166
|
-
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
t5 = $[21];
|
|
18170
|
-
}
|
|
18171
|
-
useEffect(t4, t5);
|
|
18218
|
+
if ($[20] !== displayMode || $[21] !== overflowsX || $[22] !== rowHeight || $[23] !== scrollbarHeight) {
|
|
18219
|
+
t5 = (state) => displayMode === "scrolled" && !state.loading && (state.totalCount() ?? 0) > state.limit() ? (state.tableHeadHeight ?? rowHeight) + (state.tableFootHeight ?? 0) + rowHeight * state.limit() + (overflowsX ? scrollbarHeight : 0) : void 0;
|
|
18220
|
+
$[20] = displayMode;
|
|
18221
|
+
$[21] = overflowsX;
|
|
18222
|
+
$[22] = rowHeight;
|
|
18223
|
+
$[23] = scrollbarHeight;
|
|
18224
|
+
$[24] = t5;
|
|
18225
|
+
} else t5 = $[24];
|
|
18226
|
+
const maxHeight = useStore(store, t5);
|
|
18227
|
+
const stickyHeadFoot = maxHeight !== void 0;
|
|
18172
18228
|
let t6;
|
|
18173
|
-
if ($[22] !== className || $[23] !== prefix) {
|
|
18174
|
-
t6 = cx(prefix("data-table__content"), className);
|
|
18175
|
-
$[22] = className;
|
|
18176
|
-
$[23] = prefix;
|
|
18177
|
-
$[24] = t6;
|
|
18178
|
-
} else t6 = $[24];
|
|
18179
18229
|
let t7;
|
|
18180
|
-
if ($[25] !==
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
|
|
18230
|
+
if ($[25] !== store || $[26] !== tableEl) {
|
|
18231
|
+
t6 = () => {
|
|
18232
|
+
if (tableEl) return store.subscribe(_temp$24, (totalCount) => {
|
|
18233
|
+
tableEl.ariaRowCount = totalCount.toString();
|
|
18234
|
+
}, { fireImmediately: true });
|
|
18235
|
+
};
|
|
18236
|
+
t7 = [store, tableEl];
|
|
18237
|
+
$[25] = store;
|
|
18238
|
+
$[26] = tableEl;
|
|
18239
|
+
$[27] = t6;
|
|
18240
|
+
$[28] = t7;
|
|
18241
|
+
} else {
|
|
18242
|
+
t6 = $[27];
|
|
18243
|
+
t7 = $[28];
|
|
18244
|
+
}
|
|
18245
|
+
useEffect(t6, t7);
|
|
18186
18246
|
let t8;
|
|
18187
|
-
if ($[
|
|
18188
|
-
t8 =
|
|
18247
|
+
if ($[29] !== className || $[30] !== prefix) {
|
|
18248
|
+
t8 = cx(prefix("data-table__content"), className);
|
|
18249
|
+
$[29] = className;
|
|
18250
|
+
$[30] = prefix;
|
|
18251
|
+
$[31] = t8;
|
|
18252
|
+
} else t8 = $[31];
|
|
18253
|
+
let t9;
|
|
18254
|
+
if ($[32] !== containerProps?.className || $[33] !== prefix) {
|
|
18255
|
+
t9 = cx(prefix("data-table__content-container"), containerProps?.className);
|
|
18256
|
+
$[32] = containerProps?.className;
|
|
18257
|
+
$[33] = prefix;
|
|
18258
|
+
$[34] = t9;
|
|
18259
|
+
} else t9 = $[34];
|
|
18260
|
+
let t10;
|
|
18261
|
+
if ($[35] !== containerProps || $[36] !== t9) {
|
|
18262
|
+
t10 = {
|
|
18189
18263
|
...containerProps,
|
|
18190
|
-
className:
|
|
18264
|
+
className: t9
|
|
18191
18265
|
};
|
|
18192
|
-
$[
|
|
18193
|
-
$[
|
|
18194
|
-
$[
|
|
18195
|
-
} else
|
|
18196
|
-
const
|
|
18197
|
-
let t10;
|
|
18198
|
-
if ($[31] !== t9) {
|
|
18199
|
-
t10 = [setScrollableEl, t9];
|
|
18200
|
-
$[31] = t9;
|
|
18201
|
-
$[32] = t10;
|
|
18202
|
-
} else t10 = $[32];
|
|
18203
|
-
const t11 = useCombinedRef(t10);
|
|
18266
|
+
$[35] = containerProps;
|
|
18267
|
+
$[36] = t9;
|
|
18268
|
+
$[37] = t10;
|
|
18269
|
+
} else t10 = $[37];
|
|
18270
|
+
const t11 = scrollableProps?.ref;
|
|
18204
18271
|
let t12;
|
|
18205
|
-
if ($[
|
|
18206
|
-
t12 =
|
|
18272
|
+
if ($[38] !== t11) {
|
|
18273
|
+
t12 = [setScrollableEl, t11];
|
|
18274
|
+
$[38] = t11;
|
|
18275
|
+
$[39] = t12;
|
|
18276
|
+
} else t12 = $[39];
|
|
18277
|
+
const t13 = useCombinedRef(t12);
|
|
18278
|
+
let t14;
|
|
18279
|
+
if ($[40] !== scrollableProps || $[41] !== t13) {
|
|
18280
|
+
t14 = {
|
|
18207
18281
|
...scrollableProps,
|
|
18208
|
-
ref:
|
|
18282
|
+
ref: t13
|
|
18209
18283
|
};
|
|
18210
|
-
$[
|
|
18211
|
-
$[
|
|
18212
|
-
$[
|
|
18213
|
-
} else
|
|
18214
|
-
let t13;
|
|
18215
|
-
if ($[36] !== ref) {
|
|
18216
|
-
t13 = [tableRef, ref];
|
|
18217
|
-
$[36] = ref;
|
|
18218
|
-
$[37] = t13;
|
|
18219
|
-
} else t13 = $[37];
|
|
18220
|
-
const t14 = useCombinedRef(t13);
|
|
18284
|
+
$[40] = scrollableProps;
|
|
18285
|
+
$[41] = t13;
|
|
18286
|
+
$[42] = t14;
|
|
18287
|
+
} else t14 = $[42];
|
|
18221
18288
|
let t15;
|
|
18222
|
-
if ($[
|
|
18223
|
-
t15 =
|
|
18289
|
+
if ($[43] !== ref) {
|
|
18290
|
+
t15 = [setTableEl, ref];
|
|
18291
|
+
$[43] = ref;
|
|
18292
|
+
$[44] = t15;
|
|
18293
|
+
} else t15 = $[44];
|
|
18294
|
+
const t16 = useCombinedRef(t15);
|
|
18295
|
+
let t17;
|
|
18296
|
+
if ($[45] !== stickyHeadFoot || $[46] !== tableHeadProps) {
|
|
18297
|
+
t17 = /* @__PURE__ */ jsx(DataTableHead, {
|
|
18224
18298
|
sticky: stickyHeadFoot,
|
|
18225
18299
|
...tableHeadProps
|
|
18226
18300
|
});
|
|
18227
|
-
$[
|
|
18228
|
-
$[
|
|
18229
|
-
$[
|
|
18230
|
-
} else
|
|
18231
|
-
let
|
|
18232
|
-
if ($[
|
|
18233
|
-
|
|
18301
|
+
$[45] = stickyHeadFoot;
|
|
18302
|
+
$[46] = tableHeadProps;
|
|
18303
|
+
$[47] = t17;
|
|
18304
|
+
} else t17 = $[47];
|
|
18305
|
+
let t18;
|
|
18306
|
+
if ($[48] !== emptyMessage || $[49] !== emptyMessageProps || $[50] !== scrollableEl || $[51] !== tableBodyProps) {
|
|
18307
|
+
t18 = /* @__PURE__ */ jsx(DataTableBody, {
|
|
18234
18308
|
scrollableEl,
|
|
18235
18309
|
emptyMessage,
|
|
18236
18310
|
emptyMessageProps,
|
|
18237
18311
|
...tableBodyProps
|
|
18238
18312
|
});
|
|
18239
|
-
$[
|
|
18240
|
-
$[
|
|
18241
|
-
$[
|
|
18242
|
-
$[
|
|
18243
|
-
$[
|
|
18244
|
-
} else
|
|
18245
|
-
let
|
|
18246
|
-
if ($[
|
|
18247
|
-
|
|
18313
|
+
$[48] = emptyMessage;
|
|
18314
|
+
$[49] = emptyMessageProps;
|
|
18315
|
+
$[50] = scrollableEl;
|
|
18316
|
+
$[51] = tableBodyProps;
|
|
18317
|
+
$[52] = t18;
|
|
18318
|
+
} else t18 = $[52];
|
|
18319
|
+
let t19;
|
|
18320
|
+
if ($[53] !== showTableFootWhenEmpty || $[54] !== stickyHeadFoot || $[55] !== tableFootContent || $[56] !== tableFootProps) {
|
|
18321
|
+
t19 = /* @__PURE__ */ jsx(DataTableFoot, {
|
|
18248
18322
|
sticky: stickyHeadFoot,
|
|
18249
18323
|
showWhenEmpty: showTableFootWhenEmpty,
|
|
18250
18324
|
footContent: tableFootContent,
|
|
18251
18325
|
...tableFootProps
|
|
18252
18326
|
});
|
|
18253
|
-
$[
|
|
18254
|
-
$[
|
|
18255
|
-
$[
|
|
18256
|
-
$[
|
|
18257
|
-
$[
|
|
18258
|
-
} else
|
|
18259
|
-
let
|
|
18260
|
-
if ($[
|
|
18261
|
-
|
|
18262
|
-
className:
|
|
18327
|
+
$[53] = showTableFootWhenEmpty;
|
|
18328
|
+
$[54] = stickyHeadFoot;
|
|
18329
|
+
$[55] = tableFootContent;
|
|
18330
|
+
$[56] = tableFootProps;
|
|
18331
|
+
$[57] = t19;
|
|
18332
|
+
} else t19 = $[57];
|
|
18333
|
+
let t20;
|
|
18334
|
+
if ($[58] !== maxHeight || $[59] !== otherProps || $[60] !== required || $[61] !== t10 || $[62] !== t14 || $[63] !== t16 || $[64] !== t17 || $[65] !== t18 || $[66] !== t19 || $[67] !== t8) {
|
|
18335
|
+
t20 = /* @__PURE__ */ jsxs(Table, {
|
|
18336
|
+
className: t8,
|
|
18263
18337
|
required,
|
|
18264
18338
|
maxHeight,
|
|
18265
|
-
containerProps:
|
|
18266
|
-
scrollableProps:
|
|
18339
|
+
containerProps: t10,
|
|
18340
|
+
scrollableProps: t14,
|
|
18267
18341
|
...otherProps,
|
|
18268
18342
|
layout: "fixed",
|
|
18269
|
-
ref:
|
|
18343
|
+
ref: t16,
|
|
18270
18344
|
children: [
|
|
18271
|
-
|
|
18272
|
-
|
|
18273
|
-
|
|
18345
|
+
t17,
|
|
18346
|
+
t18,
|
|
18347
|
+
t19
|
|
18274
18348
|
]
|
|
18275
18349
|
});
|
|
18276
|
-
$[
|
|
18277
|
-
$[
|
|
18278
|
-
$[
|
|
18279
|
-
$[
|
|
18280
|
-
$[
|
|
18281
|
-
$[
|
|
18282
|
-
$[
|
|
18283
|
-
$[
|
|
18284
|
-
$[
|
|
18285
|
-
$[
|
|
18286
|
-
$[
|
|
18287
|
-
} else
|
|
18288
|
-
return
|
|
18350
|
+
$[58] = maxHeight;
|
|
18351
|
+
$[59] = otherProps;
|
|
18352
|
+
$[60] = required;
|
|
18353
|
+
$[61] = t10;
|
|
18354
|
+
$[62] = t14;
|
|
18355
|
+
$[63] = t16;
|
|
18356
|
+
$[64] = t17;
|
|
18357
|
+
$[65] = t18;
|
|
18358
|
+
$[66] = t19;
|
|
18359
|
+
$[67] = t8;
|
|
18360
|
+
$[68] = t20;
|
|
18361
|
+
} else t20 = $[68];
|
|
18362
|
+
return t20;
|
|
18289
18363
|
}
|
|
18290
18364
|
function _temp$24(state_0) {
|
|
18291
18365
|
return state_0.headCount + state_0.bodyCount() + state_0.footCount();
|
|
@@ -18968,9 +19042,9 @@ function PagedDataTablePagination(t0) {
|
|
|
18968
19042
|
const prefix = usePrefix();
|
|
18969
19043
|
const { store } = useDataTableContext();
|
|
18970
19044
|
const loading = useStore(store, _temp$22);
|
|
18971
|
-
const totalCount = useStore(store, _temp2$
|
|
19045
|
+
const totalCount = useStore(store, _temp2$13);
|
|
18972
19046
|
const limit = useStore(store, _temp3$7);
|
|
18973
|
-
const currentPage = useStore(store, _temp4$
|
|
19047
|
+
const currentPage = useStore(store, _temp4$3);
|
|
18974
19048
|
const { setOffset } = useStore(store, _temp5$2);
|
|
18975
19049
|
let t1;
|
|
18976
19050
|
if ($[4] !== className || $[5] !== prefix) {
|
|
@@ -19020,13 +19094,13 @@ function PagedDataTablePagination(t0) {
|
|
|
19020
19094
|
function _temp5$2(state_3) {
|
|
19021
19095
|
return state_3.actions;
|
|
19022
19096
|
}
|
|
19023
|
-
function _temp4$
|
|
19097
|
+
function _temp4$3(state_2) {
|
|
19024
19098
|
return state_2.currentPage();
|
|
19025
19099
|
}
|
|
19026
19100
|
function _temp3$7(state_1) {
|
|
19027
19101
|
return state_1.limit();
|
|
19028
19102
|
}
|
|
19029
|
-
function _temp2$
|
|
19103
|
+
function _temp2$13(state_0) {
|
|
19030
19104
|
return state_0.totalCount();
|
|
19031
19105
|
}
|
|
19032
19106
|
function _temp$22(state) {
|
|
@@ -19056,7 +19130,7 @@ function ScrolledDataTablePagination(t0) {
|
|
|
19056
19130
|
const prefix = usePrefix();
|
|
19057
19131
|
const { store } = useDataTableContext();
|
|
19058
19132
|
const totalCount = useStore(store, _temp$21);
|
|
19059
|
-
const scrolledRangeStart = useStore(store, _temp2$
|
|
19133
|
+
const scrolledRangeStart = useStore(store, _temp2$12);
|
|
19060
19134
|
const scrolledRangeEnd = useStore(store, _temp3$6);
|
|
19061
19135
|
let t1;
|
|
19062
19136
|
if ($[5] !== className || $[6] !== prefix) {
|
|
@@ -19107,7 +19181,7 @@ function ScrolledDataTablePagination(t0) {
|
|
|
19107
19181
|
function _temp3$6(state_1) {
|
|
19108
19182
|
return state_1.scrolledRangeEnd;
|
|
19109
19183
|
}
|
|
19110
|
-
function _temp2$
|
|
19184
|
+
function _temp2$12(state_0) {
|
|
19111
19185
|
return state_0.scrolledRangeStart;
|
|
19112
19186
|
}
|
|
19113
19187
|
function _temp$21(state) {
|
|
@@ -19299,10 +19373,10 @@ function DataTableRowsPerPage(t0) {
|
|
|
19299
19373
|
}
|
|
19300
19374
|
const { store } = useDataTableContext();
|
|
19301
19375
|
const limit = useStore(store, _temp$20);
|
|
19302
|
-
const { setLimit } = useStore(store, _temp2$
|
|
19376
|
+
const { setLimit } = useStore(store, _temp2$11);
|
|
19303
19377
|
let t3;
|
|
19304
19378
|
if ($[10] !== limitOptions) {
|
|
19305
|
-
t3 = limitOptions === DEFAULT_LIMIT_OPTIONS ? limitOptions : Array.from(new Set(limitOptions.map(Math.trunc))).sort(_temp3$5).filter(_temp4$
|
|
19379
|
+
t3 = limitOptions === DEFAULT_LIMIT_OPTIONS ? limitOptions : Array.from(new Set(limitOptions.map(Math.trunc))).sort(_temp3$5).filter(_temp4$2);
|
|
19306
19380
|
$[10] = limitOptions;
|
|
19307
19381
|
$[11] = t3;
|
|
19308
19382
|
} else t3 = $[11];
|
|
@@ -19438,13 +19512,13 @@ function _temp5$1(option) {
|
|
|
19438
19512
|
children: option
|
|
19439
19513
|
}, option);
|
|
19440
19514
|
}
|
|
19441
|
-
function _temp4$
|
|
19515
|
+
function _temp4$2(limit_0) {
|
|
19442
19516
|
return limit_0 >= 1;
|
|
19443
19517
|
}
|
|
19444
19518
|
function _temp3$5(a, b) {
|
|
19445
19519
|
return a - b;
|
|
19446
19520
|
}
|
|
19447
|
-
function _temp2$
|
|
19521
|
+
function _temp2$11(state_0) {
|
|
19448
19522
|
return state_0.actions;
|
|
19449
19523
|
}
|
|
19450
19524
|
function _temp$20(state) {
|
|
@@ -22311,7 +22385,7 @@ var SelectContext = createContext(null);
|
|
|
22311
22385
|
function useCreateSelectContext(t0) {
|
|
22312
22386
|
const $ = c(11);
|
|
22313
22387
|
const { multiple, value, onOptionSelect, status, maxSelected, disabled, readOnly, valueTagCloseButtonLabel, valueTagProps } = t0;
|
|
22314
|
-
const store = useConstant(_temp2$
|
|
22388
|
+
const store = useConstant(_temp2$10);
|
|
22315
22389
|
let t1;
|
|
22316
22390
|
if ($[0] !== disabled || $[1] !== maxSelected || $[2] !== multiple || $[3] !== onOptionSelect || $[4] !== readOnly || $[5] !== status || $[6] !== store || $[7] !== value || $[8] !== valueTagCloseButtonLabel || $[9] !== valueTagProps) {
|
|
22317
22391
|
t1 = {
|
|
@@ -22340,7 +22414,7 @@ function useCreateSelectContext(t0) {
|
|
|
22340
22414
|
} else t1 = $[10];
|
|
22341
22415
|
return t1;
|
|
22342
22416
|
}
|
|
22343
|
-
function _temp2$
|
|
22417
|
+
function _temp2$10() {
|
|
22344
22418
|
return createStore()(subscribeWithSelector(_temp$16));
|
|
22345
22419
|
}
|
|
22346
22420
|
function _temp$16(set, get) {
|
|
@@ -22926,7 +23000,7 @@ function SelectMultipleValue() {
|
|
|
22926
23000
|
const valuesOptionStates = useStore(store, useShallow(t3));
|
|
22927
23001
|
let t4;
|
|
22928
23002
|
if ($[10] !== valuesOptionStates) {
|
|
22929
|
-
t4 = valuesOptionStates.
|
|
23003
|
+
t4 = valuesOptionStates.filter(_temp$14).map(_temp2$9);
|
|
22930
23004
|
$[10] = valuesOptionStates;
|
|
22931
23005
|
$[11] = t4;
|
|
22932
23006
|
} else t4 = $[11];
|
|
@@ -22934,11 +23008,11 @@ function SelectMultipleValue() {
|
|
|
22934
23008
|
let t5;
|
|
22935
23009
|
if ($[12] !== disabled || $[13] !== handleCloseValueTag || $[14] !== prefix || $[15] !== status || $[16] !== valueTagCloseButtonLabel || $[17] !== valueTagProps || $[18] !== valuesOptionStates || $[19] !== valuesToRender) {
|
|
22936
23010
|
t5 = intersperse(valuesToRender.map((v_0, i_0) => {
|
|
22937
|
-
const
|
|
22938
|
-
return
|
|
23011
|
+
const optionState_1 = valuesOptionStates[i_0];
|
|
23012
|
+
return optionState_1 && /* @__PURE__ */ jsx(Tag, {
|
|
22939
23013
|
variant: "subtle",
|
|
22940
23014
|
...valueTagProps,
|
|
22941
|
-
showCloseButton: !
|
|
23015
|
+
showCloseButton: !optionState_1.disabled,
|
|
22942
23016
|
closeButtonProps: {
|
|
22943
23017
|
label: null,
|
|
22944
23018
|
tooltipContent: valueTagCloseButtonLabel,
|
|
@@ -22947,14 +23021,14 @@ function SelectMultipleValue() {
|
|
|
22947
23021
|
type: void 0,
|
|
22948
23022
|
disabled,
|
|
22949
23023
|
"data-disabled": boolDataAttr(disabled),
|
|
22950
|
-
onMouseDown:
|
|
23024
|
+
onMouseDown: _temp3$4,
|
|
22951
23025
|
onClick: (evt_1) => handleCloseValueTag(v_0, evt_1),
|
|
22952
23026
|
"aria-controls": void 0,
|
|
22953
23027
|
"aria-expanded": void 0,
|
|
22954
23028
|
"aria-describedby": void 0,
|
|
22955
23029
|
...valueTagProps?.closeButtonProps
|
|
22956
23030
|
},
|
|
22957
|
-
color:
|
|
23031
|
+
color: optionState_1.color ?? controlStatusToAccent(status, "primary"),
|
|
22958
23032
|
className: cx(prefix("select__value-tag"), valueTagProps?.className),
|
|
22959
23033
|
containerProps: {
|
|
22960
23034
|
className: cx(prefix("select__value-tag-container"), valueTagProps?.containerProps?.className),
|
|
@@ -22964,9 +23038,9 @@ function SelectMultipleValue() {
|
|
|
22964
23038
|
className: cx(prefix("select__value-tag-content"), valueTagProps?.contentProps?.className),
|
|
22965
23039
|
...valueTagProps?.contentProps
|
|
22966
23040
|
},
|
|
22967
|
-
children:
|
|
23041
|
+
children: optionState_1.content
|
|
22968
23042
|
}, v_0);
|
|
22969
|
-
}),
|
|
23043
|
+
}), _temp4$1);
|
|
22970
23044
|
$[12] = disabled;
|
|
22971
23045
|
$[13] = handleCloseValueTag;
|
|
22972
23046
|
$[14] = prefix;
|
|
@@ -22989,14 +23063,17 @@ function SelectMultipleValue() {
|
|
|
22989
23063
|
} else t8 = $[23];
|
|
22990
23064
|
return t8;
|
|
22991
23065
|
}
|
|
22992
|
-
function
|
|
23066
|
+
function _temp4$1(i_1) {
|
|
22993
23067
|
return /* @__PURE__ */ jsx(VisuallyHidden, { children: ", " }, `separator-${i_1}`);
|
|
22994
23068
|
}
|
|
22995
|
-
function
|
|
23069
|
+
function _temp3$4(evt_0) {
|
|
22996
23070
|
return evt_0.preventDefault();
|
|
22997
23071
|
}
|
|
22998
|
-
function
|
|
22999
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [i === 0 ? "" : ", ",
|
|
23072
|
+
function _temp2$9(optionState_0, i) {
|
|
23073
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [i === 0 ? "" : ", ", optionState_0.content] }, optionState_0.value);
|
|
23074
|
+
}
|
|
23075
|
+
function _temp$14(optionState) {
|
|
23076
|
+
return optionState != null;
|
|
23000
23077
|
}
|
|
23001
23078
|
// src/components/Form/HiddenFormControl.tsx
|
|
23002
23079
|
/** Hidden native control meant to be used as the "real" control of a form. */
|
|
@@ -23091,7 +23168,7 @@ function SelectNative(t0) {
|
|
|
23091
23168
|
}
|
|
23092
23169
|
const { store } = useSelectContext();
|
|
23093
23170
|
const hasEmptyOption = useStore(store, _temp$13);
|
|
23094
|
-
const optionStates = useStore(store, useShallow(_temp2$
|
|
23171
|
+
const optionStates = useStore(store, useShallow(_temp2$8));
|
|
23095
23172
|
let t1;
|
|
23096
23173
|
if ($[6] !== multiple || $[7] !== onValueChange) {
|
|
23097
23174
|
t1 = (evt) => onValueChange(multiple ? Array.from(evt.target.options).filter(_temp3$3).map(_temp4) : evt.target.value);
|
|
@@ -23164,7 +23241,7 @@ function _temp4(option_0) {
|
|
|
23164
23241
|
function _temp3$3(option) {
|
|
23165
23242
|
return option.selected;
|
|
23166
23243
|
}
|
|
23167
|
-
function _temp2$
|
|
23244
|
+
function _temp2$8(state_0) {
|
|
23168
23245
|
return Array.from(state_0.options[0].values());
|
|
23169
23246
|
}
|
|
23170
23247
|
function _temp$13(state) {
|
|
@@ -23708,7 +23785,7 @@ function Select(t0) {
|
|
|
23708
23785
|
t32 = !readOnly && /* @__PURE__ */ jsx(Icon, {
|
|
23709
23786
|
icon: showOpen ? faAngleUp : faAngleDown,
|
|
23710
23787
|
className: cx(prefix("select__arrow"), printHidden, arrowProps?.className),
|
|
23711
|
-
onClick: _temp2$
|
|
23788
|
+
onClick: _temp2$7,
|
|
23712
23789
|
"data-status": status,
|
|
23713
23790
|
"data-disabled": boolDataAttr(disabled || softDisabled)
|
|
23714
23791
|
});
|
|
@@ -24209,7 +24286,7 @@ function Select(t0) {
|
|
|
24209
24286
|
} else t96 = $[332];
|
|
24210
24287
|
return t96;
|
|
24211
24288
|
}
|
|
24212
|
-
function _temp2$
|
|
24289
|
+
function _temp2$7(evt_3) {
|
|
24213
24290
|
return evt_3.preventDefault();
|
|
24214
24291
|
}
|
|
24215
24292
|
function _temp$12(open_0) {
|
|
@@ -24882,7 +24959,7 @@ function Calendar(t0) {
|
|
|
24882
24959
|
case "multiple": {
|
|
24883
24960
|
let t8;
|
|
24884
24961
|
if ($[51] !== normalizedValue) {
|
|
24885
|
-
t8 = Array.isArray(normalizedValue) ? normalizedValue : normalizedValue === null ? [] : isDate(normalizedValue) ? [normalizedValue] : [normalizedValue.start, normalizedValue.end].filter(_temp2$
|
|
24962
|
+
t8 = Array.isArray(normalizedValue) ? normalizedValue : normalizedValue === null ? [] : isDate(normalizedValue) ? [normalizedValue] : [normalizedValue.start, normalizedValue.end].filter(_temp2$6);
|
|
24886
24963
|
$[51] = normalizedValue;
|
|
24887
24964
|
$[52] = t8;
|
|
24888
24965
|
} else t8 = $[52];
|
|
@@ -25639,7 +25716,7 @@ function Calendar(t0) {
|
|
|
25639
25716
|
function _temp3$2() {
|
|
25640
25717
|
return /* @__PURE__ */ new Date();
|
|
25641
25718
|
}
|
|
25642
|
-
function _temp2$
|
|
25719
|
+
function _temp2$6(d_0) {
|
|
25643
25720
|
return d_0 !== null;
|
|
25644
25721
|
}
|
|
25645
25722
|
function _temp$11(dates, d) {
|
|
@@ -30060,7 +30137,7 @@ function Form(t0) {
|
|
|
30060
30137
|
$[34] = t3;
|
|
30061
30138
|
} else t3 = $[34];
|
|
30062
30139
|
const handleReset = t3;
|
|
30063
|
-
const handleBeforeUnload = useEffectEvent(_temp2$
|
|
30140
|
+
const handleBeforeUnload = useEffectEvent(_temp2$5);
|
|
30064
30141
|
let t4;
|
|
30065
30142
|
if ($[35] !== confirmUnloadWhenDirty || $[36] !== handleBeforeUnload || $[37] !== store) {
|
|
30066
30143
|
t4 = () => {
|
|
@@ -30165,7 +30242,7 @@ function _temp3$1(t0) {
|
|
|
30165
30242
|
const { submitting: submitting_1, actions: actions_0 } = t0;
|
|
30166
30243
|
return !submitting_1 && actions_0.isDirty();
|
|
30167
30244
|
}
|
|
30168
|
-
function _temp2$
|
|
30245
|
+
function _temp2$5(event) {
|
|
30169
30246
|
event.preventDefault();
|
|
30170
30247
|
event.returnValue = "";
|
|
30171
30248
|
}
|
|
@@ -30179,7 +30256,7 @@ function _temp$8(t0) {
|
|
|
30179
30256
|
// src/components/Form/FormError.tsx
|
|
30180
30257
|
/** Error within a `Form`. */
|
|
30181
30258
|
function FormError(t0) {
|
|
30182
|
-
const $ = c(
|
|
30259
|
+
const $ = c(25);
|
|
30183
30260
|
const { name: nameProp, errorDisplayMode: errorDisplayModeProp, nativeErrorMessages, children } = t0;
|
|
30184
30261
|
const [locale] = useLocale();
|
|
30185
30262
|
const { errorDisplayMode: formErrorDisplayMode, nativeErrorMessages: formNativeErrorMessages, store } = useFormContext();
|
|
@@ -30256,17 +30333,14 @@ function FormError(t0) {
|
|
|
30256
30333
|
...externalErrors_0 ?? []
|
|
30257
30334
|
] : [];
|
|
30258
30335
|
if (errorDisplayMode === "first") messages = messages.slice(0, 1);
|
|
30259
|
-
|
|
30260
|
-
|
|
30261
|
-
|
|
30262
|
-
|
|
30263
|
-
|
|
30264
|
-
|
|
30265
|
-
|
|
30266
|
-
|
|
30267
|
-
$[27] = t8;
|
|
30268
|
-
} else t8 = $[27];
|
|
30269
|
-
const render = t8;
|
|
30336
|
+
const keys = messageKeys(messages);
|
|
30337
|
+
const render = children ?? ((messages_0) => name === "" ? /* @__PURE__ */ jsx(Alert, {
|
|
30338
|
+
severity: "danger",
|
|
30339
|
+
children: messages_0.length > 1 ? /* @__PURE__ */ jsx("ul", { children: messages_0.map((message, i) => /* @__PURE__ */ jsx("li", { children: message }, keys[i])) }) : messages_0[0]
|
|
30340
|
+
}) : /* @__PURE__ */ jsx(FeedbackList, { children: messages_0.map((message_0, i_0) => /* @__PURE__ */ jsx(Feedback, {
|
|
30341
|
+
type: "error",
|
|
30342
|
+
children: message_0
|
|
30343
|
+
}, keys[i_0])) }));
|
|
30270
30344
|
t7 = messages.length > 0 && render(messages);
|
|
30271
30345
|
$[12] = children;
|
|
30272
30346
|
$[13] = errorDisplayMode;
|
|
@@ -30284,19 +30358,20 @@ function FormError(t0) {
|
|
|
30284
30358
|
} else t7 = $[24];
|
|
30285
30359
|
return t7;
|
|
30286
30360
|
}
|
|
30287
|
-
function _temp2$5(message_0, i_0) {
|
|
30288
|
-
return /* @__PURE__ */ jsx(Feedback, {
|
|
30289
|
-
type: "error",
|
|
30290
|
-
children: message_0
|
|
30291
|
-
}, i_0);
|
|
30292
|
-
}
|
|
30293
|
-
function _temp$7(message, i) {
|
|
30294
|
-
return /* @__PURE__ */ jsx("li", { children: message }, i);
|
|
30295
|
-
}
|
|
30296
30361
|
function nativeErrorMessage(nativeErrorMessages, nativeError) {
|
|
30297
30362
|
const message = nativeErrorMessages?.[nativeError.key];
|
|
30298
30363
|
return typeof message === "function" ? message(nativeError.element) : message;
|
|
30299
30364
|
}
|
|
30365
|
+
/** Returns keys for all provided messages. */
|
|
30366
|
+
function messageKeys(messages) {
|
|
30367
|
+
const keyCounts = /* @__PURE__ */ new Map();
|
|
30368
|
+
return messages.map((node, i) => {
|
|
30369
|
+
const key = typeof node === "string" || typeof node === "number" ? `v:${String(node)}` : isValidElement(node) && node.key != null ? `k:${node.key}` : `i:${i}`;
|
|
30370
|
+
const n = keyCounts.get(key) ?? 0;
|
|
30371
|
+
keyCounts.set(key, n + 1);
|
|
30372
|
+
return n === 0 ? key : `${key}#${n}`;
|
|
30373
|
+
});
|
|
30374
|
+
}
|
|
30300
30375
|
// src/components/Form/FormReset.tsx
|
|
30301
30376
|
/** Component used to wrap a button to reset the form. */
|
|
30302
30377
|
function FormReset(t0) {
|
|
@@ -32603,7 +32678,7 @@ function useCreateStepperContext(defaultActiveStep, activeStep, onActiveStepChan
|
|
|
32603
32678
|
t1 = () => createStore()(subscribeWithSelector((set, get) => ({
|
|
32604
32679
|
_activeStep: defaultActiveStep ?? 0,
|
|
32605
32680
|
_controlledActiveStep: activeStep,
|
|
32606
|
-
activeStep: computed(() => [get()._controlledActiveStep ?? get()._activeStep, get().stepCount()], _temp$
|
|
32681
|
+
activeStep: computed(() => [get()._controlledActiveStep ?? get()._activeStep, get().stepCount()], _temp$7),
|
|
32607
32682
|
stepsInfo: {},
|
|
32608
32683
|
stepsContent: {},
|
|
32609
32684
|
stepCount: computed(() => [get().stepsInfo], _temp2$4),
|
|
@@ -32697,7 +32772,7 @@ function useCreateStepperContext(defaultActiveStep, activeStep, onActiveStepChan
|
|
|
32697
32772
|
function _temp2$4(stepLabels) {
|
|
32698
32773
|
return Object.keys(stepLabels).length;
|
|
32699
32774
|
}
|
|
32700
|
-
function _temp$
|
|
32775
|
+
function _temp$7(activeStep_0, stepCount) {
|
|
32701
32776
|
return Number.isNaN(activeStep_0) ? 0 : Math.max(0, Math.min(activeStep_0, stepCount));
|
|
32702
32777
|
}
|
|
32703
32778
|
/** Hooks returning the stepper context value. */
|
|
@@ -33519,7 +33594,7 @@ function StepperFinishTrigger(t0) {
|
|
|
33519
33594
|
const [locale] = useLocale();
|
|
33520
33595
|
const { printHidden } = usePrintClassNames();
|
|
33521
33596
|
const { store } = useStepperContext();
|
|
33522
|
-
const isLast = useStore(store, _temp$
|
|
33597
|
+
const isLast = useStore(store, _temp$6);
|
|
33523
33598
|
if (!(showWhenNotLast || isLast)) return null;
|
|
33524
33599
|
const shouldDisable = !isLast || disabled;
|
|
33525
33600
|
let t1;
|
|
@@ -33586,7 +33661,7 @@ function StepperFinishTrigger(t0) {
|
|
|
33586
33661
|
} else t3 = $[25];
|
|
33587
33662
|
return t3;
|
|
33588
33663
|
}
|
|
33589
|
-
function _temp$
|
|
33664
|
+
function _temp$6(state) {
|
|
33590
33665
|
return state.activeStep() >= state.stepCount() - 1;
|
|
33591
33666
|
}
|
|
33592
33667
|
// src/components/Stepper/StepperNextTrigger.tsx
|
|
@@ -33623,7 +33698,7 @@ function StepperNextTrigger(t0) {
|
|
|
33623
33698
|
const [locale] = useLocale();
|
|
33624
33699
|
const { printHidden } = usePrintClassNames();
|
|
33625
33700
|
const { store } = useStepperContext();
|
|
33626
|
-
const isLast = useStore(store, _temp$
|
|
33701
|
+
const isLast = useStore(store, _temp$5);
|
|
33627
33702
|
const nextIsDisabled = useStore(store, _temp2$3);
|
|
33628
33703
|
let t1;
|
|
33629
33704
|
if ($[8] !== store) {
|
|
@@ -33720,7 +33795,7 @@ function StepperNextTrigger(t0) {
|
|
|
33720
33795
|
function _temp2$3(state_0) {
|
|
33721
33796
|
return state_0.actions.getStepInfo(state_0.activeStep() + 1)?.disabled;
|
|
33722
33797
|
}
|
|
33723
|
-
function _temp$
|
|
33798
|
+
function _temp$5(state) {
|
|
33724
33799
|
return state.activeStep() >= state.stepCount() - 1;
|
|
33725
33800
|
}
|
|
33726
33801
|
// src/components/Stepper/StepperPreviousTrigger.tsx
|
|
@@ -33758,7 +33833,7 @@ function StepperPreviousTrigger(t0) {
|
|
|
33758
33833
|
const [locale] = useLocale();
|
|
33759
33834
|
const { printHidden } = usePrintClassNames();
|
|
33760
33835
|
const { store } = useStepperContext();
|
|
33761
|
-
const isFirst = useStore(store, _temp$
|
|
33836
|
+
const isFirst = useStore(store, _temp$4);
|
|
33762
33837
|
const prevIsDisabled = useStore(store, _temp2$2);
|
|
33763
33838
|
let t2;
|
|
33764
33839
|
if ($[8] !== store) {
|
|
@@ -33854,7 +33929,7 @@ function StepperPreviousTrigger(t0) {
|
|
|
33854
33929
|
function _temp2$2(state_0) {
|
|
33855
33930
|
return state_0.actions.getStepInfo(state_0.activeStep() - 1)?.disabled;
|
|
33856
33931
|
}
|
|
33857
|
-
function _temp$
|
|
33932
|
+
function _temp$4(state) {
|
|
33858
33933
|
return state.activeStep() === 0;
|
|
33859
33934
|
}
|
|
33860
33935
|
// src/components/Stepper/StepperState.tsx
|
|
@@ -33953,7 +34028,7 @@ function useRegisterTabLabel(value, label) {
|
|
|
33953
34028
|
const $ = c(6);
|
|
33954
34029
|
const { showAllTabsWhilePrinting, store } = useTabsContext();
|
|
33955
34030
|
const needsRegisteredTabLabels = usePrinting() && showAllTabsWhilePrinting;
|
|
33956
|
-
const { registerTabLabel } = useStore(store, _temp$
|
|
34031
|
+
const { registerTabLabel } = useStore(store, _temp$3);
|
|
33957
34032
|
let t0;
|
|
33958
34033
|
let t1;
|
|
33959
34034
|
if ($[0] !== label || $[1] !== needsRegisteredTabLabels || $[2] !== registerTabLabel || $[3] !== value) {
|
|
@@ -33978,7 +34053,7 @@ function useRegisterTabLabel(value, label) {
|
|
|
33978
34053
|
}
|
|
33979
34054
|
useEffect(t0, t1);
|
|
33980
34055
|
}
|
|
33981
|
-
function _temp$
|
|
34056
|
+
function _temp$3(state) {
|
|
33982
34057
|
return state.actions;
|
|
33983
34058
|
}
|
|
33984
34059
|
/** Hook which returns the label of a tab. */
|
|
@@ -34388,7 +34463,7 @@ function TabList(t0) {
|
|
|
34388
34463
|
useScrollPosition(containerEl, t3);
|
|
34389
34464
|
let t4;
|
|
34390
34465
|
if ($[17] !== containerEl?.scrollWidth || $[18] !== store) {
|
|
34391
|
-
t4 = () => store.subscribe(_temp$
|
|
34466
|
+
t4 = () => store.subscribe(_temp$2, (width_0) => {
|
|
34392
34467
|
store.setState({ showScrollButtons: (containerEl?.scrollWidth ?? 0) > Math.ceil(width_0) });
|
|
34393
34468
|
}, { fireImmediately: true });
|
|
34394
34469
|
$[17] = containerEl?.scrollWidth;
|
|
@@ -34621,7 +34696,7 @@ function TabList(t0) {
|
|
|
34621
34696
|
} else t33 = $[86];
|
|
34622
34697
|
return t33;
|
|
34623
34698
|
}
|
|
34624
|
-
function _temp$
|
|
34699
|
+
function _temp$2(t0) {
|
|
34625
34700
|
const { width } = t0;
|
|
34626
34701
|
return width;
|
|
34627
34702
|
}
|
|
@@ -35106,29 +35181,31 @@ function navigate(url, options) {
|
|
|
35106
35181
|
history[options?.replace ? "replaceState" : "pushState"](options?.state, "", url);
|
|
35107
35182
|
}
|
|
35108
35183
|
// src/utils/useIntersectionObserver.ts
|
|
35109
|
-
/**
|
|
35110
|
-
|
|
35184
|
+
/**
|
|
35185
|
+
* Hook wrapping an `IntersectionObserver` which observes one or more elements. `onIntersect` is
|
|
35186
|
+
* called with the observer's entries whenever the intersection of any observed element changes,
|
|
35187
|
+
* including once right after the elements start being observed.
|
|
35188
|
+
*/
|
|
35189
|
+
function useIntersectionObserver(elements, onIntersect, options) {
|
|
35111
35190
|
const $ = c(5);
|
|
35191
|
+
const latestOnIntersectRef = useLatestRef(onIntersect);
|
|
35112
35192
|
let t0;
|
|
35113
35193
|
let t1;
|
|
35114
|
-
if ($[0] !==
|
|
35194
|
+
if ($[0] !== elements || $[1] !== latestOnIntersectRef || $[2] !== options) {
|
|
35115
35195
|
t0 = () => {
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
observer.observe(element);
|
|
35122
|
-
return () => observer.unobserve(element);
|
|
35123
|
-
}
|
|
35196
|
+
const targets = (Array.isArray(elements) ? elements : [elements]).filter(_temp$1);
|
|
35197
|
+
if (targets.length === 0) return;
|
|
35198
|
+
const observer = new IntersectionObserver((entries) => latestOnIntersectRef.current(entries), options);
|
|
35199
|
+
for (const target of targets) observer.observe(target);
|
|
35200
|
+
return () => observer.disconnect();
|
|
35124
35201
|
};
|
|
35125
35202
|
t1 = [
|
|
35126
|
-
|
|
35127
|
-
|
|
35128
|
-
|
|
35203
|
+
elements,
|
|
35204
|
+
options,
|
|
35205
|
+
latestOnIntersectRef
|
|
35129
35206
|
];
|
|
35130
|
-
$[0] =
|
|
35131
|
-
$[1] =
|
|
35207
|
+
$[0] = elements;
|
|
35208
|
+
$[1] = latestOnIntersectRef;
|
|
35132
35209
|
$[2] = options;
|
|
35133
35210
|
$[3] = t0;
|
|
35134
35211
|
$[4] = t1;
|
|
@@ -35138,6 +35215,9 @@ function useIntersectionObserver(element, onIntersectionEntryChange, options) {
|
|
|
35138
35215
|
}
|
|
35139
35216
|
useEffect(t0, t1);
|
|
35140
35217
|
}
|
|
35218
|
+
function _temp$1(el) {
|
|
35219
|
+
return el != null;
|
|
35220
|
+
}
|
|
35141
35221
|
// src/utils/useLocation.ts
|
|
35142
35222
|
var MONKEY_PATCHED_HISTORY = Symbol.for("ostack-ui.monkeyPatchedHistory");
|
|
35143
35223
|
var HISTORY_EVENT_TYPES = [
|
|
@@ -35327,6 +35407,6 @@ function _temp2(nextSearchParams, t0) {
|
|
|
35327
35407
|
function _temp(location) {
|
|
35328
35408
|
return location.search;
|
|
35329
35409
|
}
|
|
35330
|
-
export { Action, ActionGroup, ActionMenu, ActionMenuCheckboxItem, ActionMenuRadioGroup, ActionMenuRadioItem, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProvider, AlertDialogProviderContext, AlertDialogTitle, AlertDialogTrigger, AlertTitle, BREAKPOINTS, Badge, Box, Button, ButtonGroup, Calendar, Card, CardBody, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClearContexts, CloseButton, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandMenu, CommandMenuDialog, CommandMenuGroup, CommandMenuItem, Container, Control, ControlAddon, ControlCode, ControlContext, ControlWithContainerRef, DATA_TABLE_SELECTION_COLUMN_WIDTH, DEFAULT_DATE_FORMAT, DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR, DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR, DEFAULT_TABLE_COLUMN_WIDTH, DEFAULT_TABLE_ROW_HEIGHT, DataTable, DataTableCell, DataTableColumn, DataTableColumnGroup, DataTableColumns, DataTableContent, DataTableFilter, DataTablePagination, DataTableRow, DataTableRowsPerPage, DataTableSelectionTrigger, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DocumentTitleProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, ErrorReportingContext, ErrorReportingProvider, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, FieldGroup, FieldGroupBody, FieldGroupHeader, FieldGroupTitle, Form, FormError, FormReset, FormState, FormSubmit, Grid, Heading, HelperText, HelperTextProvider, Icon, IconButton, Input, Keybinds, Keyboard, Label, LabelProvider, Layer, Link, LocalizationContext, LocalizationProvider, Mark, MenuList, MenuListGroup, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Output, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Portal, PortalContext, PrefixContext, PrefixProvider, Printer, PrinterContent, PrinterTrigger, Radio, RadioGroup, Root, Select, Separator, Slot, Slottable, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, StepperState, Tab, TabContent, TabList, Table, TableBody, TableCell, TableColumn, TableColumnGroup, TableFoot, TableHead, TableRow, Tabs, Tag, Text, TextArea, Toast, ToastDescription, ToastManagerContext, ToastManagerProvider, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipProvider, VisuallyHidden, boolDataAttr, buildErrorReport, combineAriaIds, compare, compareNumericStrings, computed, controlStatusToAccent, cx, defaultIgnoreKeyboardShortcut, ensureStore, formatNumericValue, ignoreKeyboardShortcutInEditableElements, isNumericStringNegative, isResponsiveValueObject, keybindsToAriaKeyShortcuts, localeLabel, matchAgainstFilter, mergeResponsiveValues, navigate, normalizeKeybinds, normalizeNumericString, numericStringFloatToInt, numericStringIntToFloat, numericStringRepresentsNull, numericToString, parseChildren, parseDateStrict, parseNumericValue, registerKeyboardShortcut, setBoolDataAttr, setDefaultPrefix, setNativeProperty, stableSort, stringHash, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControlContext, useControllableState, useCssVars, useCurrentMediaBreakpoint, useCurrentResponsiveValue, useDataTableApiRef, useDataTableColumnLabel, useDataTableColumnLabelId, useDateTransformer, useErrorBoundary, useErrorReporter, useFeedbackControlName, useFeedbackIds, useFormApi, useFormState, useFormValue, useHelperTextIds, useIntersectionObserver, useIsInFeedbackList, useIsInFeedbackProvider, useIsInField, useIsInLabelProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLabel, useLabelId, useLatestRef, useLayerZIndex, useLocale, useLocation, useMarginProps, useMeasure, useMediaBreakpointDown, useMediaBreakpointUp, useMediaQuery, useNumericTransformer, useOnLabelChange, usePaddingProps, usePortalContext, usePrefix, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, useRegisterControl, useRegisterControlInField, useRegisterControlInLabelProvider, useRegisterControlNameInFeedbackProvider, useRegisterControlStatusInFeedbackProvider, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollPosition, useScrollbarSize, useSearchParam, useSearchParams, useSetControlFocusedInFeedbackProvider, useSizingProps, useSpacing,
|
|
35410
|
+
export { Action, ActionGroup, ActionMenu, ActionMenuCheckboxItem, ActionMenuRadioGroup, ActionMenuRadioItem, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProvider, AlertDialogProviderContext, AlertDialogTitle, AlertDialogTrigger, AlertTitle, BREAKPOINTS, Badge, Box, Button, ButtonGroup, Calendar, Card, CardBody, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClearContexts, CloseButton, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandMenu, CommandMenuDialog, CommandMenuGroup, CommandMenuItem, Container, Control, ControlAddon, ControlCode, ControlContext, ControlWithContainerRef, DATA_TABLE_SELECTION_COLUMN_WIDTH, DEFAULT_DATE_FORMAT, DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR, DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR, DEFAULT_TABLE_COLUMN_WIDTH, DEFAULT_TABLE_ROW_HEIGHT, DataTable, DataTableCell, DataTableColumn, DataTableColumnGroup, DataTableColumns, DataTableContent, DataTableFilter, DataTablePagination, DataTableRow, DataTableRowsPerPage, DataTableSelectionTrigger, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DocumentTitleProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, ErrorReportingContext, ErrorReportingProvider, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, FieldGroup, FieldGroupBody, FieldGroupHeader, FieldGroupTitle, Form, FormError, FormReset, FormState, FormSubmit, Grid, Heading, HelperText, HelperTextProvider, Icon, IconButton, Input, Keybinds, Keyboard, Label, LabelProvider, Layer, Link, LocalizationContext, LocalizationProvider, Mark, MenuList, MenuListGroup, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Output, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Portal, PortalContext, PrefixContext, PrefixProvider, Printer, PrinterContent, PrinterTrigger, Radio, RadioGroup, Root, Select, Separator, Slot, Slottable, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, StepperState, Tab, TabContent, TabList, Table, TableBody, TableCell, TableColumn, TableColumnGroup, TableFoot, TableHead, TableRow, Tabs, Tag, Text, TextArea, Toast, ToastDescription, ToastManagerContext, ToastManagerProvider, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipProvider, VisuallyHidden, boolDataAttr, buildErrorReport, combineAriaIds, compare, compareNumericStrings, computed, controlStatusToAccent, cx, defaultIgnoreKeyboardShortcut, ensureStore, formatNumericValue, ignoreKeyboardShortcutInEditableElements, isNumericStringNegative, isResponsiveValueObject, keybindsToAriaKeyShortcuts, localeLabel, matchAgainstFilter, mergeResponsiveValues, navigate, normalizeKeybinds, normalizeNumericString, numericStringFloatToInt, numericStringIntToFloat, numericStringRepresentsNull, numericToString, parseChildren, parseDateStrict, parseNumericValue, registerKeyboardShortcut, setBoolDataAttr, setDefaultPrefix, setNativeProperty, stableSort, stringHash, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControlContext, useControllableState, useCssVars, useCurrentMediaBreakpoint, useCurrentResponsiveValue, useDataTableApiRef, useDataTableColumnLabel, useDataTableColumnLabelId, useDateTransformer, useErrorBoundary, useErrorReporter, useFeedbackControlName, useFeedbackIds, useFormApi, useFormState, useFormValue, useHelperTextIds, useIntersectionObserver, useIsInFeedbackList, useIsInFeedbackProvider, useIsInField, useIsInLabelProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLabel, useLabelId, useLatestRef, useLayerZIndex, useLocale, useLocation, useMarginProps, useMeasure, useMediaBreakpointDown, useMediaBreakpointUp, useMediaQuery, useNumericTransformer, useOnLabelChange, usePaddingProps, usePortalContext, usePrefix, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, usePrintingTask, useRegisterControl, useRegisterControlInField, useRegisterControlInLabelProvider, useRegisterControlNameInFeedbackProvider, useRegisterControlStatusInFeedbackProvider, useResizeObserver, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollPosition, useScrollbarSize, useSearchParam, useSearchParams, useSetControlFocusedInFeedbackProvider, useSizingProps, useSpacing, useStepperApi, useTableNumberOfColumns, useTextProps, useToastManager, validateNumericTransformerOptions, warnOnce, withCleanup };
|
|
35331
35411
|
|
|
35332
35412
|
//# sourceMappingURL=ostack-ui.js.map
|