@expcat/tigercat-react 1.3.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3SV6J7I5.mjs → chunk-2L7QEOFD.mjs} +34 -25
- package/dist/{chunk-FNJDBFKM.mjs → chunk-2LYV6NBJ.mjs} +6 -1
- package/dist/{chunk-EEWHWEYO.js → chunk-2RBHQBSG.js} +2 -2
- package/dist/{chunk-Y5RQN5BO.mjs → chunk-376X7SDZ.mjs} +2 -2
- package/dist/{chunk-UXUYCWQC.js → chunk-3EDASNTG.js} +5 -5
- package/dist/{chunk-NPTXXUXF.mjs → chunk-3RBRWBUG.mjs} +9 -7
- package/dist/{chunk-PUZDW7NR.js → chunk-4AMSYFYC.js} +134 -20
- package/dist/{chunk-IG75YSX3.mjs → chunk-4MONGWU5.mjs} +4 -6
- package/dist/{chunk-3CJFNG54.mjs → chunk-56CTXEJS.mjs} +1 -1
- package/dist/{chunk-TMON4MPO.js → chunk-5ALMTE35.js} +9 -7
- package/dist/{chunk-MSHCPJIJ.mjs → chunk-6BOSSZM3.mjs} +8 -9
- package/dist/{chunk-SIY6FDKJ.js → chunk-7CHTTM6D.js} +339 -314
- package/dist/{chunk-RF2BA2N6.js → chunk-7PXALKLM.js} +4 -4
- package/dist/{chunk-DLKUDB2R.js → chunk-AF2AEZKM.js} +15 -3
- package/dist/{chunk-FB34UWF7.mjs → chunk-AVLIUHOS.mjs} +101 -40
- package/dist/{chunk-TSJYAEFZ.js → chunk-B63GEB2Y.js} +358 -305
- package/dist/{chunk-6I6X255M.js → chunk-BA6TJQZL.js} +12 -12
- package/dist/{chunk-LMTUM3J3.js → chunk-BEM7XG2L.js} +2 -4
- package/dist/{chunk-MB6U72CI.js → chunk-BEZO5IE4.js} +2 -2
- package/dist/{chunk-5OHVTGHS.mjs → chunk-BN4ZKCAI.mjs} +368 -315
- package/dist/{chunk-UHFHOTNI.js → chunk-BRA3PO53.js} +6 -7
- package/dist/{chunk-M7HBWFQO.js → chunk-BROIZ266.js} +11 -1
- package/dist/{chunk-SDZOVRVR.mjs → chunk-CAQPYJFA.mjs} +350 -325
- package/dist/{chunk-BFAZZUD6.js → chunk-CC5GFX6F.js} +5 -22
- package/dist/{chunk-LQT6ZGME.mjs → chunk-CME2IFUT.mjs} +15 -3
- package/dist/{chunk-KQ5I7PRM.js → chunk-CNNEUJR2.js} +28 -14
- package/dist/{chunk-EF5ZTNHX.js → chunk-D5MQBUP2.js} +16 -4
- package/dist/{chunk-RQXY2MGX.mjs → chunk-D7UR526A.mjs} +231 -184
- package/dist/{chunk-CBYJXDW4.js → chunk-DBMC6FPU.js} +16 -4
- package/dist/{chunk-WQ4FOHOU.mjs → chunk-DEIVWO2D.mjs} +3 -5
- package/dist/{chunk-7QZ4XT2P.mjs → chunk-DVEK5SO6.mjs} +3 -8
- package/dist/{chunk-TC6JLEGZ.js → chunk-EJKOUI26.js} +24 -7
- package/dist/{chunk-4GITZKAH.mjs → chunk-EPJ6W4VI.mjs} +14 -2
- package/dist/{chunk-KYP7U6FK.js → chunk-FZHBVHQ6.js} +34 -25
- package/dist/{chunk-WVVXZKNI.js → chunk-GDPU5MYA.js} +3 -8
- package/dist/{chunk-2GQCFTD7.mjs → chunk-H4MPPCTB.mjs} +23 -4
- package/dist/{chunk-YOAYDEWW.mjs → chunk-HHMYERHY.mjs} +3 -20
- package/dist/{chunk-LRPPXU74.mjs → chunk-I7FEGKX2.mjs} +19 -5
- package/dist/{chunk-F6IXIH6B.mjs → chunk-IZGXDHPB.mjs} +24 -5
- package/dist/{chunk-GQFVVAEF.js → chunk-J6OZWT3P.js} +5 -5
- package/dist/{chunk-IGAMV6ML.mjs → chunk-KDXKF6B2.mjs} +1 -1
- package/dist/{chunk-A42OLED6.mjs → chunk-KED5S2WG.mjs} +13 -2
- package/dist/{chunk-BJQIYELW.mjs → chunk-KGMVRIYC.mjs} +5 -5
- package/dist/{chunk-6GYT3EZD.mjs → chunk-KXT2TP6A.mjs} +3 -4
- package/dist/{chunk-BBLVRLXT.js → chunk-KYNWNTGO.js} +230 -146
- package/dist/{chunk-M73NMNZX.js → chunk-L24PPXLV.js} +17 -5
- package/dist/chunk-L3WPA2RP.js +25 -0
- package/dist/{chunk-V4JIZN3E.mjs → chunk-L6KSO66F.mjs} +4 -12
- package/dist/{chunk-4LX5UGPQ.js → chunk-LJRCEB7F.js} +168 -121
- package/dist/{chunk-F7H4ALKN.js → chunk-LZG24TDB.js} +8 -9
- package/dist/{chunk-ZYJTHGQW.js → chunk-M3FVPPMM.js} +9 -13
- package/dist/{chunk-GN3TSQWW.mjs → chunk-M6YXUNOU.mjs} +2 -2
- package/dist/{chunk-I373B74W.js → chunk-MC26ORSN.js} +102 -41
- package/dist/{chunk-5HFHHFQS.mjs → chunk-MTIGGMHG.mjs} +17 -5
- package/dist/{chunk-DKT2EYVM.mjs → chunk-MV2JQ6XQ.mjs} +3 -6
- package/dist/{chunk-HR5GBE3P.js → chunk-NDGA3N6H.js} +19 -7
- package/dist/{chunk-PU7KEYLP.mjs → chunk-NEZ445D4.mjs} +9 -9
- package/dist/{chunk-4U5HSR2H.js → chunk-NVI2P7VH.js} +3 -4
- package/dist/{chunk-NVEIVIAW.mjs → chunk-OFRKYQOZ.mjs} +133 -19
- package/dist/{chunk-AW5M3EL4.js → chunk-OS6M3IZF.js} +62 -12
- package/dist/{chunk-3ZNZLGQO.mjs → chunk-OXQOKKTP.mjs} +6 -7
- package/dist/{chunk-NMEVQPOD.js → chunk-PHAJXRGE.js} +2 -4
- package/dist/{chunk-WG3YS2QV.js → chunk-PT5T5F4H.js} +13 -2
- package/dist/{chunk-WNLUUD5N.mjs → chunk-QIL24WZD.mjs} +8 -12
- package/dist/{chunk-ZFMMAYSX.js → chunk-QLATA4UB.js} +4 -6
- package/dist/{chunk-2TZ3SBMU.mjs → chunk-RVLV63SI.mjs} +16 -11
- package/dist/{chunk-3QPCQH62.mjs → chunk-RYNLPRUM.mjs} +1 -1
- package/dist/{chunk-6GIJ7NFV.mjs → chunk-SDZKL3IB.mjs} +3 -5
- package/dist/{chunk-G5USITWF.js → chunk-SH4BZYXO.js} +27 -8
- package/dist/{chunk-L5AMVEQL.mjs → chunk-SLEXEH7R.mjs} +60 -10
- package/dist/{chunk-JLRRXRZO.js → chunk-SQONS5PH.js} +4 -7
- package/dist/chunk-SQTOVSDU.mjs +692 -0
- package/dist/{chunk-ITRYKHQJ.js → chunk-TEYL5X56.js} +19 -14
- package/dist/{chunk-KGSDDVRC.mjs → chunk-TNTOSFGN.mjs} +4 -4
- package/dist/{chunk-CY5GRTAX.js → chunk-UAM3RQY4.js} +24 -5
- package/dist/{chunk-XRNKHQTL.js → chunk-UEAXYZSE.js} +3 -2
- package/dist/{chunk-7ISEWLA3.js → chunk-UKQMF3JV.js} +21 -6
- package/dist/{chunk-ITVLIR7T.mjs → chunk-ULWT6W6M.mjs} +13 -20
- package/dist/{chunk-M5GSLKUX.mjs → chunk-VAIWWELW.mjs} +15 -3
- package/dist/{chunk-4SO4LANY.js → chunk-VC26SAXB.js} +340 -274
- package/dist/{chunk-SKMZTW3K.js → chunk-WCTNQYXO.js} +16 -23
- package/dist/{chunk-KXNWY2Q7.mjs → chunk-WFWEMXO7.mjs} +241 -157
- package/dist/chunk-WHYHLUXG.mjs +25 -0
- package/dist/{chunk-ONTRGV5T.js → chunk-WZUADPYB.js} +6 -14
- package/dist/{chunk-N4PP3ENO.js → chunk-XTQUPDRI.js} +2 -2
- package/dist/{chunk-XATXFVKR.mjs → chunk-Y7K27DVV.mjs} +4 -3
- package/dist/{chunk-WI4N5DD3.mjs → chunk-YH57D4AV.mjs} +16 -4
- package/dist/{chunk-3MRP3XYI.js → chunk-YRVAF2ID.js} +7 -2
- package/dist/{chunk-5XE5VBDS.mjs → chunk-YSGM22AH.mjs} +11 -1
- package/dist/{chunk-6TR7JB6C.js → chunk-ZDNQGS4O.js} +4 -4
- package/dist/{chunk-CHBUNQIJ.mjs → chunk-ZQSMJS2Q.mjs} +23 -6
- package/dist/{chunk-QQFLRNI3.mjs → chunk-ZRZB3C5J.mjs} +18 -3
- package/dist/components/ActivityFeed.js +4 -3
- package/dist/components/ActivityFeed.mjs +3 -2
- package/dist/components/Cascader.d.mts +3 -1
- package/dist/components/Cascader.d.ts +3 -1
- package/dist/components/Cascader.js +3 -2
- package/dist/components/Cascader.mjs +2 -1
- package/dist/components/ChatWindow.js +5 -5
- package/dist/components/ChatWindow.mjs +4 -4
- package/dist/components/Checkbox.js +4 -4
- package/dist/components/Checkbox.mjs +3 -3
- package/dist/components/CheckboxGroup.js +3 -3
- package/dist/components/CheckboxGroup.mjs +2 -2
- package/dist/components/CommentThread.js +4 -4
- package/dist/components/CommentThread.mjs +3 -3
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.d.mts +2 -2
- package/dist/components/DataTableWithToolbar.d.ts +2 -2
- package/dist/components/DataTableWithToolbar.js +11 -11
- package/dist/components/DataTableWithToolbar.mjs +10 -10
- package/dist/components/DatePicker.d.mts +1 -0
- package/dist/components/DatePicker.d.ts +1 -0
- package/dist/components/DatePicker.js +3 -2
- package/dist/components/DatePicker.mjs +2 -1
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Drawer.mjs +2 -2
- package/dist/components/FileManager.d.mts +2 -1
- package/dist/components/FileManager.d.ts +2 -1
- package/dist/components/FileManager.js +3 -2
- package/dist/components/FileManager.mjs +2 -1
- package/dist/components/Form.js +3 -2
- package/dist/components/Form.mjs +2 -1
- package/dist/components/FormItem.js +4 -3
- package/dist/components/FormItem.mjs +3 -2
- package/dist/components/FormWizard.js +4 -4
- package/dist/components/FormWizard.mjs +3 -3
- package/dist/components/Image.js +4 -4
- package/dist/components/Image.mjs +3 -3
- package/dist/components/ImageGroup.js +3 -3
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.js +2 -2
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/ImageViewer.d.mts +1 -1
- package/dist/components/ImageViewer.d.ts +1 -1
- package/dist/components/ImageViewer.js +2 -2
- package/dist/components/ImageViewer.mjs +1 -1
- package/dist/components/InfiniteScroll.d.mts +2 -0
- package/dist/components/InfiniteScroll.d.ts +2 -0
- package/dist/components/InfiniteScroll.js +3 -2
- package/dist/components/InfiniteScroll.mjs +2 -1
- package/dist/components/Input.js +3 -2
- package/dist/components/Input.mjs +2 -1
- package/dist/components/InputNumber.js +3 -2
- package/dist/components/InputNumber.mjs +2 -1
- package/dist/components/List.d.mts +6 -2
- package/dist/components/List.d.ts +6 -2
- package/dist/components/List.js +3 -2
- package/dist/components/List.mjs +2 -1
- package/dist/components/Loading.js +3 -2
- package/dist/components/Loading.mjs +2 -1
- package/dist/components/MarkdownEditor.js +3 -3
- package/dist/components/MarkdownEditor.mjs +2 -2
- package/dist/components/Mentions.js +2 -2
- package/dist/components/Mentions.mjs +1 -1
- package/dist/components/Menu.d.mts +8 -80
- package/dist/components/Menu.d.ts +8 -80
- package/dist/components/Menu.js +2 -2
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/MenuItem.d.mts +6 -2
- package/dist/components/MenuItem.d.ts +6 -2
- package/dist/components/MenuItem.js +2 -2
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItemGroup.d.mts +6 -2
- package/dist/components/MenuItemGroup.d.ts +6 -2
- package/dist/components/MenuItemGroup.js +2 -2
- package/dist/components/MenuItemGroup.mjs +1 -1
- package/dist/components/Message.js +2 -2
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/Notification.js +2 -2
- package/dist/components/Notification.mjs +1 -1
- package/dist/components/NotificationCenter.js +5 -4
- package/dist/components/NotificationCenter.mjs +4 -3
- package/dist/components/NumberKeyboard.js +3 -2
- package/dist/components/NumberKeyboard.mjs +2 -1
- package/dist/components/Radio.js +4 -4
- package/dist/components/Radio.mjs +3 -3
- package/dist/components/RadioGroup.js +3 -3
- package/dist/components/RadioGroup.mjs +2 -2
- package/dist/components/RichTextEditor.js +3 -3
- package/dist/components/RichTextEditor.mjs +2 -2
- package/dist/components/Select.d.mts +3 -1
- package/dist/components/Select.d.ts +3 -1
- package/dist/components/Select.js +3 -2
- package/dist/components/Select.mjs +2 -1
- package/dist/components/Signature.d.mts +1 -0
- package/dist/components/Signature.d.ts +1 -0
- package/dist/components/Signature.js +3 -2
- package/dist/components/Signature.mjs +2 -1
- package/dist/components/Spotlight.js +4 -2
- package/dist/components/Spotlight.mjs +3 -1
- package/dist/components/Steps.js +2 -2
- package/dist/components/Steps.mjs +1 -1
- package/dist/components/StepsItem.js +2 -2
- package/dist/components/StepsItem.mjs +1 -1
- package/dist/components/SubMenu.d.mts +6 -2
- package/dist/components/SubMenu.d.ts +6 -2
- package/dist/components/SubMenu.js +2 -2
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/Table.d.mts +2 -2
- package/dist/components/Table.d.ts +2 -2
- package/dist/components/Table.js +9 -9
- package/dist/components/Table.mjs +8 -8
- package/dist/components/Textarea.js +3 -3
- package/dist/components/Textarea.mjs +2 -2
- package/dist/components/TimePicker.d.mts +1 -0
- package/dist/components/TimePicker.d.ts +1 -0
- package/dist/components/TimePicker.js +4 -2
- package/dist/components/TimePicker.mjs +3 -1
- package/dist/components/Tour.js +3 -2
- package/dist/components/Tour.mjs +2 -1
- package/dist/components/Transfer.d.mts +3 -1
- package/dist/components/Transfer.d.ts +3 -1
- package/dist/components/Transfer.js +3 -2
- package/dist/components/Transfer.mjs +2 -1
- package/dist/components/Tree.d.mts +3 -1
- package/dist/components/Tree.d.ts +3 -1
- package/dist/components/Tree.js +3 -2
- package/dist/components/Tree.mjs +2 -1
- package/dist/components/TreeSelect.d.mts +3 -1
- package/dist/components/TreeSelect.d.ts +3 -1
- package/dist/components/TreeSelect.js +3 -2
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.js +3 -2
- package/dist/components/Upload.mjs +2 -1
- package/dist/components/VirtualTable.d.mts +3 -2
- package/dist/components/VirtualTable.d.ts +3 -2
- package/dist/components/VirtualTable.js +3 -2
- package/dist/components/VirtualTable.mjs +2 -1
- package/dist/index.d.mts +33 -7
- package/dist/index.d.ts +33 -7
- package/dist/index.js +54 -54
- package/dist/index.mjs +53 -53
- package/dist/{types-CHmCMNEM.d.mts → types-0oVwMXtR.d.mts} +1 -1
- package/dist/{types-CHmCMNEM.d.ts → types-0oVwMXtR.d.ts} +1 -1
- package/dist/types-DaC4a0Ny.d.mts +80 -0
- package/dist/types-DaC4a0Ny.d.ts +80 -0
- package/package.json +2 -2
- package/dist/chunk-UKGQ7256.js +0 -12
- package/dist/chunk-UQMPEMY7.mjs +0 -12
- package/dist/chunk-VNVGSPBI.mjs +0 -626
- package/dist/{chunk-OZD75CLT.js → chunk-ANBNSUSR.js} +3 -3
- package/dist/{chunk-I2AUOICV.mjs → chunk-M3MOSUZO.mjs} +3 -3
- package/dist/{chunk-UMZ3PMUJ.js → chunk-SXHCMZ6U.js} +2 -2
- package/dist/{chunk-BWDQZSAB.mjs → chunk-WTSG7QXK.mjs} +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKYNWNTGOjs = require('./chunk-KYNWNTGO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk5ALMTE35js = require('./chunk-5ALMTE35.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZRHDNGWOjs = require('./chunk-ZRHDNGWO.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkLZG24TDBjs = require('./chunk-LZG24TDB.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
|
|
16
16
|
|
|
17
17
|
// src/components/Table.tsx
|
|
18
18
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
@@ -150,7 +150,7 @@ function useTableState(input) {
|
|
|
150
150
|
onSelectionChange,
|
|
151
151
|
onSortChange,
|
|
152
152
|
onFilterChange,
|
|
153
|
-
|
|
153
|
+
onHiddenColumnKeysChange,
|
|
154
154
|
onPageChange,
|
|
155
155
|
onExpandChange,
|
|
156
156
|
onCellChange,
|
|
@@ -263,7 +263,7 @@ function useTableState(input) {
|
|
|
263
263
|
if (!isHiddenColumnsControlled) {
|
|
264
264
|
setUncontrolledHiddenColumnKeys(hiddenKeys);
|
|
265
265
|
}
|
|
266
|
-
_optionalChain([
|
|
266
|
+
_optionalChain([onHiddenColumnKeysChange, 'optionalCall', _21 => _21(hiddenKeys)]);
|
|
267
267
|
}
|
|
268
268
|
function toggleColumnLock(columnKey) {
|
|
269
269
|
setFixedOverrides((prev) => {
|
|
@@ -927,7 +927,12 @@ function renderPagination(ctx, view) {
|
|
|
927
927
|
);
|
|
928
928
|
const finalPrevAriaLabel = view.disableI18n ? finalPrevText : labels.prevPageAriaLabel;
|
|
929
929
|
const finalNextAriaLabel = view.disableI18n ? finalNextText : labels.nextPageAriaLabel;
|
|
930
|
-
const normalizedPageSizeOptions = paginationConfig.pageSizeOptions || [
|
|
930
|
+
const normalizedPageSizeOptions = paginationConfig.pageSizeOptions || [
|
|
931
|
+
10,
|
|
932
|
+
20,
|
|
933
|
+
50,
|
|
934
|
+
100
|
|
935
|
+
];
|
|
931
936
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.getSimplePaginationContainerClasses.call(void 0, ), children: [
|
|
932
937
|
paginationConfig.showTotal !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.getSimplePaginationTotalClasses.call(void 0, ), children: finalTotalText }),
|
|
933
938
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.getSimplePaginationControlsClasses.call(void 0, ), children: [
|
|
@@ -1045,7 +1050,7 @@ function Table({
|
|
|
1045
1050
|
onSelectionChange,
|
|
1046
1051
|
onSortChange,
|
|
1047
1052
|
onFilterChange,
|
|
1048
|
-
|
|
1053
|
+
onHiddenColumnKeysChange,
|
|
1049
1054
|
onPageChange,
|
|
1050
1055
|
onExpandChange,
|
|
1051
1056
|
onCellChange,
|
|
@@ -1148,7 +1153,7 @@ function Table({
|
|
|
1148
1153
|
onSelectionChange,
|
|
1149
1154
|
onSortChange,
|
|
1150
1155
|
onFilterChange,
|
|
1151
|
-
|
|
1156
|
+
onHiddenColumnKeysChange,
|
|
1152
1157
|
onPageChange,
|
|
1153
1158
|
onExpandChange,
|
|
1154
1159
|
onCellChange,
|
|
@@ -1291,7 +1296,7 @@ function Table({
|
|
|
1291
1296
|
"data-tiger-table-mobile": "card",
|
|
1292
1297
|
children: [
|
|
1293
1298
|
_optionalChain([internalRowSelection, 'optionalAccess', _68 => _68.type]) !== "radio" && _optionalChain([internalRowSelection, 'optionalAccess', _69 => _69.showCheckbox]) !== false && internalRowSelection && ctx.paginatedData.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-between rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] px-3 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1294
|
-
|
|
1299
|
+
_chunkLZG24TDBjs.Checkbox,
|
|
1295
1300
|
{
|
|
1296
1301
|
size: "sm",
|
|
1297
1302
|
checked: ctx.allSelected,
|
|
@@ -1301,7 +1306,7 @@ function Table({
|
|
|
1301
1306
|
}
|
|
1302
1307
|
) }) : null,
|
|
1303
1308
|
ctx.displayColumns.some((column) => column.sortable) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] px-3 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1304
|
-
|
|
1309
|
+
_chunkKYNWNTGOjs.Select,
|
|
1305
1310
|
{
|
|
1306
1311
|
size: "sm",
|
|
1307
1312
|
value: ctx.sortState.key && ctx.sortState.direction ? `${ctx.sortState.key}:${ctx.sortState.direction}` : "",
|
|
@@ -1352,7 +1357,7 @@ function Table({
|
|
|
1352
1357
|
const resolvedCardClassName = typeof cardClassName === "function" ? cardClassName(record, index) : cardClassName;
|
|
1353
1358
|
const controlsNode = _optionalChain([internalRowSelection, 'optionalAccess', _73 => _73.showCheckbox]) !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1354
1359
|
internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { onClick: (event) => event.stopPropagation(), children: internalRowSelection.type === "radio" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1355
|
-
|
|
1360
|
+
_chunk5ALMTE35js.Radio,
|
|
1356
1361
|
{
|
|
1357
1362
|
value: key,
|
|
1358
1363
|
checked: isSelected,
|
|
@@ -1365,7 +1370,7 @@ function Table({
|
|
|
1365
1370
|
onChange: () => ctx.handleSelectRow(key, true)
|
|
1366
1371
|
}
|
|
1367
1372
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1368
|
-
|
|
1373
|
+
_chunkLZG24TDBjs.Checkbox,
|
|
1369
1374
|
{
|
|
1370
1375
|
size: "sm",
|
|
1371
1376
|
checked: isSelected,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Steps,
|
|
3
3
|
StepsItem
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
useTigerConfig
|
|
7
|
-
} from "./chunk-QAIBQHIO.mjs";
|
|
4
|
+
} from "./chunk-YSGM22AH.mjs";
|
|
8
5
|
import {
|
|
9
6
|
Button
|
|
10
7
|
} from "./chunk-5TE7KLE5.mjs";
|
|
8
|
+
import {
|
|
9
|
+
useTigerConfig
|
|
10
|
+
} from "./chunk-QAIBQHIO.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/FormWizard.tsx
|
|
13
13
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
|
|
4
|
+
|
|
5
|
+
// src/components/Form.tsx
|
|
2
6
|
|
|
3
7
|
|
|
4
8
|
|
|
@@ -25,6 +29,8 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
|
|
32
|
+
|
|
33
|
+
|
|
28
34
|
var _tigercatcore = require('@expcat/tigercat-core');
|
|
29
35
|
var _jsxruntime = require('react/jsx-runtime');
|
|
30
36
|
var FormContext = _react.createContext.call(void 0, null);
|
|
@@ -54,9 +60,15 @@ var Form = _react.forwardRef.call(void 0,
|
|
|
54
60
|
validateDebounce = 0,
|
|
55
61
|
undoable = false,
|
|
56
62
|
maxHistorySize = 50,
|
|
63
|
+
locale,
|
|
57
64
|
...props
|
|
58
65
|
}, ref) => {
|
|
59
66
|
const resolvedLabelAlign = _nullishCoalesce(labelAlign, () => ( (labelPosition === "top" ? "left" : "right")));
|
|
67
|
+
const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
|
|
68
|
+
const validationMessages = _react.useMemo.call(void 0,
|
|
69
|
+
() => _tigercatcore.getFormValidationLabels.call(void 0, _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale)),
|
|
70
|
+
[config.locale, locale]
|
|
71
|
+
);
|
|
60
72
|
const [errors, setErrors] = _react.useState.call(void 0, []);
|
|
61
73
|
const [formValues, setFormValues] = _react.useState.call(void 0, model);
|
|
62
74
|
const fieldRulesRef = _react2.default.useRef({});
|
|
@@ -161,9 +173,16 @@ var Form = _react.forwardRef.call(void 0,
|
|
|
161
173
|
}
|
|
162
174
|
const currentValues = formValuesRef.current;
|
|
163
175
|
const value = _tigercatcore.getValueByPath.call(void 0, currentValues, fieldName);
|
|
164
|
-
return _tigercatcore.validateField.call(void 0,
|
|
176
|
+
return _tigercatcore.validateField.call(void 0,
|
|
177
|
+
fieldName,
|
|
178
|
+
value,
|
|
179
|
+
fieldRules,
|
|
180
|
+
currentValues,
|
|
181
|
+
trigger,
|
|
182
|
+
validationMessages
|
|
183
|
+
);
|
|
165
184
|
},
|
|
166
|
-
[resolveFieldRules]
|
|
185
|
+
[resolveFieldRules, validationMessages]
|
|
167
186
|
);
|
|
168
187
|
const validateFieldNow = _react.useCallback.call(void 0,
|
|
169
188
|
async (fieldName, rulesOverride, trigger) => {
|
|
@@ -219,10 +238,10 @@ var Form = _react.forwardRef.call(void 0,
|
|
|
219
238
|
setErrors([]);
|
|
220
239
|
return { valid: true, errors: [] };
|
|
221
240
|
}
|
|
222
|
-
const result = await _tigercatcore.validateForm.call(void 0, formValuesRef.current, effectiveRules);
|
|
241
|
+
const result = await _tigercatcore.validateForm.call(void 0, formValuesRef.current, effectiveRules, validationMessages);
|
|
223
242
|
setErrors(result.errors);
|
|
224
243
|
return result;
|
|
225
|
-
}, [getEffectiveRules]);
|
|
244
|
+
}, [getEffectiveRules, validationMessages]);
|
|
226
245
|
const validate = _react.useCallback.call(void 0, async () => {
|
|
227
246
|
const result = await runValidation();
|
|
228
247
|
return result.valid;
|
|
@@ -8,6 +8,7 @@ var _tigercatcore = require('@expcat/tigercat-core');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
var _jsxruntime = require('react/jsx-runtime');
|
|
12
13
|
var Mentions = ({
|
|
13
14
|
value = "",
|
|
@@ -68,10 +69,10 @@ var Mentions = ({
|
|
|
68
69
|
if (!isOpen) return;
|
|
69
70
|
if (e.key === "ArrowDown") {
|
|
70
71
|
e.preventDefault();
|
|
71
|
-
setActiveIndex((prev) => (
|
|
72
|
+
setActiveIndex((prev) => _tigercatcore.getCyclicIndex.call(void 0, filteredOptions.length, prev, 1));
|
|
72
73
|
} else if (e.key === "ArrowUp") {
|
|
73
74
|
e.preventDefault();
|
|
74
|
-
setActiveIndex((prev) => (
|
|
75
|
+
setActiveIndex((prev) => _tigercatcore.getCyclicIndex.call(void 0, filteredOptions.length, prev, -1));
|
|
75
76
|
} else if (e.key === "Enter") {
|
|
76
77
|
e.preventDefault();
|
|
77
78
|
const opt = filteredOptions[activeIndex];
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
|
|
4
|
+
|
|
5
|
+
// src/components/Signature.tsx
|
|
6
|
+
|
|
2
7
|
|
|
3
8
|
|
|
4
9
|
|
|
@@ -22,6 +27,8 @@ var _react = require('react');
|
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
|
|
30
|
+
|
|
31
|
+
|
|
25
32
|
var _tigercatcore = require('@expcat/tigercat-core');
|
|
26
33
|
var _jsxruntime = require('react/jsx-runtime');
|
|
27
34
|
var DEFAULT_WIDTH = 480;
|
|
@@ -39,14 +46,21 @@ var Signature = _react.forwardRef.call(void 0,
|
|
|
39
46
|
exportType = "image/png",
|
|
40
47
|
quality = 0.92,
|
|
41
48
|
ariaLabel = "Signature pad",
|
|
42
|
-
clearText
|
|
49
|
+
clearText,
|
|
50
|
+
locale,
|
|
43
51
|
className,
|
|
44
52
|
onChange,
|
|
45
53
|
onBegin,
|
|
46
54
|
onEnd,
|
|
55
|
+
onClear,
|
|
47
56
|
style,
|
|
48
57
|
...rest
|
|
49
58
|
}, ref) => {
|
|
59
|
+
const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
|
|
60
|
+
const mergedLocale = _react.useMemo.call(void 0,
|
|
61
|
+
() => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale),
|
|
62
|
+
[config.locale, locale]
|
|
63
|
+
);
|
|
50
64
|
const canvasRef = _react.useRef.call(void 0, null);
|
|
51
65
|
const strokesRef = _react.useRef.call(void 0, []);
|
|
52
66
|
const activeStrokeRef = _react.useRef.call(void 0, null);
|
|
@@ -110,7 +124,8 @@ var Signature = _react.forwardRef.call(void 0,
|
|
|
110
124
|
setStrokes([]);
|
|
111
125
|
draw([]);
|
|
112
126
|
emitChange([]);
|
|
113
|
-
|
|
127
|
+
_optionalChain([onClear, 'optionalCall', _4 => _4()]);
|
|
128
|
+
}, [draw, emitChange, onClear]);
|
|
114
129
|
_react.useImperativeHandle.call(void 0,
|
|
115
130
|
ref,
|
|
116
131
|
() => ({
|
|
@@ -138,7 +153,7 @@ var Signature = _react.forwardRef.call(void 0,
|
|
|
138
153
|
activeStrokeRef.current = stroke;
|
|
139
154
|
strokesRef.current = nextStrokes;
|
|
140
155
|
setStrokes(nextStrokes);
|
|
141
|
-
_optionalChain([onBegin, 'optionalCall',
|
|
156
|
+
_optionalChain([onBegin, 'optionalCall', _5 => _5()]);
|
|
142
157
|
};
|
|
143
158
|
const handlePointerMove = (event) => {
|
|
144
159
|
const activeStroke = activeStrokeRef.current;
|
|
@@ -153,7 +168,7 @@ var Signature = _react.forwardRef.call(void 0,
|
|
|
153
168
|
if (!activeStrokeRef.current) return;
|
|
154
169
|
activeStrokeRef.current = null;
|
|
155
170
|
const payload = emitChange(strokesRef.current);
|
|
156
|
-
_optionalChain([onEnd, 'optionalCall',
|
|
171
|
+
_optionalChain([onEnd, 'optionalCall', _6 => _6(payload)]);
|
|
157
172
|
};
|
|
158
173
|
const handleKeyDown = (event) => {
|
|
159
174
|
if (!clearable || isDisabled) return;
|
|
@@ -187,7 +202,7 @@ var Signature = _react.forwardRef.call(void 0,
|
|
|
187
202
|
className: _tigercatcore.signatureClearButtonClasses,
|
|
188
203
|
disabled: isDisabled || _tigercatcore.isSignatureEmpty.call(void 0, strokesRef.current),
|
|
189
204
|
onClick: clear,
|
|
190
|
-
children: clearText
|
|
205
|
+
children: _tigercatcore.resolveLocaleText.call(void 0, "Clear", clearText, _optionalChain([mergedLocale, 'optionalAccess', _7 => _7.common, 'optionalAccess', _8 => _8.clearText]))
|
|
191
206
|
}
|
|
192
207
|
) })
|
|
193
208
|
] });
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useControlledState
|
|
3
|
+
} from "./chunk-WHYHLUXG.mjs";
|
|
4
|
+
|
|
1
5
|
// src/components/InputNumber.tsx
|
|
2
6
|
import { useState, useCallback, useMemo, useRef, useEffect } from "react";
|
|
3
7
|
import {
|
|
@@ -19,6 +23,8 @@ import {
|
|
|
19
23
|
formatPrecision,
|
|
20
24
|
isAtMin,
|
|
21
25
|
isAtMax,
|
|
26
|
+
formatInputNumberDisplay,
|
|
27
|
+
parseInputNumberValue,
|
|
22
28
|
createRafRepeatActionController
|
|
23
29
|
} from "@expcat/tigercat-core";
|
|
24
30
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -47,32 +53,22 @@ var InputNumber = ({
|
|
|
47
53
|
onBlur,
|
|
48
54
|
className
|
|
49
55
|
}) => {
|
|
50
|
-
const isControlled = controlledValue !== void 0;
|
|
51
56
|
const inputRef = useRef(null);
|
|
52
57
|
const repeatControllerRef = useRef(createRafRepeatActionController());
|
|
53
58
|
const repeatValueRef = useRef(null);
|
|
54
59
|
const suppressNextClickRef = useRef(false);
|
|
55
60
|
const [focused, setFocused] = useState(false);
|
|
56
|
-
const [
|
|
57
|
-
|
|
61
|
+
const [currentValue, setValue] = useControlledState(
|
|
62
|
+
controlledValue,
|
|
63
|
+
defaultValue ?? controlledValue ?? null,
|
|
64
|
+
onChange
|
|
58
65
|
);
|
|
59
66
|
const [displayValue, setDisplayValue] = useState("");
|
|
60
|
-
const currentValue = isControlled ? controlledValue ?? null : internalValue;
|
|
61
67
|
const toDisplayValue = useCallback(
|
|
62
|
-
(val) => {
|
|
63
|
-
if (val === null || val === void 0) return "";
|
|
64
|
-
if (formatter) return formatter(val);
|
|
65
|
-
if (precision !== void 0) return val.toFixed(precision);
|
|
66
|
-
return String(val);
|
|
67
|
-
},
|
|
68
|
+
(val) => formatInputNumberDisplay(val, { formatter, precision }),
|
|
68
69
|
[formatter, precision]
|
|
69
70
|
);
|
|
70
|
-
const parseValue = (str) => {
|
|
71
|
-
if (str === "" || str === "-") return null;
|
|
72
|
-
if (parser) return parser(str);
|
|
73
|
-
const num = Number(str);
|
|
74
|
-
return Number.isNaN(num) ? null : num;
|
|
75
|
-
};
|
|
71
|
+
const parseValue = (str) => parseInputNumberValue(str, { parser });
|
|
76
72
|
useEffect(() => {
|
|
77
73
|
if (!focused) {
|
|
78
74
|
setDisplayValue(toDisplayValue(currentValue));
|
|
@@ -92,10 +88,7 @@ var InputNumber = ({
|
|
|
92
88
|
finalVal = formatPrecision(finalVal, precision);
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
|
-
|
|
96
|
-
setInternalValue(finalVal);
|
|
97
|
-
}
|
|
98
|
-
onChange?.(finalVal);
|
|
91
|
+
setValue(finalVal);
|
|
99
92
|
setDisplayValue(toDisplayValue(finalVal));
|
|
100
93
|
};
|
|
101
94
|
const handleStep = (direction, baseValue = currentValue) => {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useTigerConfig
|
|
3
|
+
} from "./chunk-QAIBQHIO.mjs";
|
|
4
|
+
|
|
1
5
|
// src/components/TreeSelect.tsx
|
|
2
6
|
import { useState, useMemo, useRef, useEffect, useId } from "react";
|
|
3
7
|
import {
|
|
8
|
+
resolveLocaleText,
|
|
9
|
+
mergeTigerLocale,
|
|
4
10
|
treeSelectBaseClasses,
|
|
5
11
|
treeSelectDropdownClasses,
|
|
6
12
|
treeSelectSearchClasses,
|
|
@@ -45,12 +51,18 @@ var TreeSelect = (props) => {
|
|
|
45
51
|
clearable = false,
|
|
46
52
|
multiple = false,
|
|
47
53
|
showSearch = false,
|
|
48
|
-
notFoundText
|
|
54
|
+
notFoundText,
|
|
49
55
|
defaultExpandAll = false,
|
|
50
56
|
className,
|
|
51
57
|
onChange,
|
|
58
|
+
locale,
|
|
52
59
|
...rest
|
|
53
60
|
} = props;
|
|
61
|
+
const config = useTigerConfig();
|
|
62
|
+
const mergedLocale = useMemo(
|
|
63
|
+
() => mergeTigerLocale(config.locale, locale),
|
|
64
|
+
[config.locale, locale]
|
|
65
|
+
);
|
|
54
66
|
const divProps = {};
|
|
55
67
|
for (const key of Object.keys(rest)) {
|
|
56
68
|
if (!TREESELECT_KEYS.has(key)) {
|
|
@@ -204,7 +216,7 @@ var TreeSelect = (props) => {
|
|
|
204
216
|
{
|
|
205
217
|
type: "text",
|
|
206
218
|
className: treeSelectSearchClasses,
|
|
207
|
-
placeholder: "Search...",
|
|
219
|
+
placeholder: resolveLocaleText("Search...", mergedLocale?.common?.searchPlaceholder),
|
|
208
220
|
value: searchQuery,
|
|
209
221
|
"aria-label": "Search tree",
|
|
210
222
|
onChange: (e) => setSearchQuery(e.target.value)
|
|
@@ -248,7 +260,7 @@ var TreeSelect = (props) => {
|
|
|
248
260
|
},
|
|
249
261
|
String(node.key)
|
|
250
262
|
);
|
|
251
|
-
}) : /* @__PURE__ */ jsx("div", { className: treeSelectEmptyClasses, children: notFoundText })
|
|
263
|
+
}) : /* @__PURE__ */ jsx("div", { className: treeSelectEmptyClasses, children: resolveLocaleText("No data", notFoundText, mergedLocale?.common?.emptyText) })
|
|
252
264
|
] })
|
|
253
265
|
] });
|
|
254
266
|
};
|