@sunggang/ui-lib 0.1.78 → 0.1.80
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/index.esm.css +7 -0
- package/index.esm.js +348 -70
- package/package.json +1 -1
- package/src/Type/index.d.ts +2 -0
- package/src/lib/DataTable/BasePagination.d.ts +6 -0
- package/src/lib/DataTable/index.d.ts +1 -1
package/index.esm.css
CHANGED
|
@@ -843,6 +843,9 @@ video {
|
|
|
843
843
|
.w-\[100px\] {
|
|
844
844
|
width: 100px;
|
|
845
845
|
}
|
|
846
|
+
.w-\[140px\] {
|
|
847
|
+
width: 140px;
|
|
848
|
+
}
|
|
846
849
|
.w-\[280px\] {
|
|
847
850
|
width: 280px;
|
|
848
851
|
}
|
|
@@ -1851,6 +1854,10 @@ video {
|
|
|
1851
1854
|
display: flex;
|
|
1852
1855
|
}
|
|
1853
1856
|
|
|
1857
|
+
.lg\:w-60 {
|
|
1858
|
+
width: 15rem;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1854
1861
|
.lg\:justify-center {
|
|
1855
1862
|
justify-content: center;
|
|
1856
1863
|
}
|
package/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
|
7
7
|
import clsx$1, { clsx } from 'clsx';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
9
|
import { format } from 'date-fns';
|
|
10
|
-
import { Calendar as Calendar$3 } from 'lucide-react';
|
|
10
|
+
import { Calendar as Calendar$3, ChevronDown } from 'lucide-react';
|
|
11
11
|
import { Slot } from '@radix-ui/react-slot';
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
13
|
import { DayPicker } from 'react-day-picker';
|
|
@@ -17,7 +17,7 @@ import { Calendar as Calendar$4, DateRange } from 'react-date-range';
|
|
|
17
17
|
import * as locales from 'react-date-range/dist/locale/index.js';
|
|
18
18
|
import addDays from 'date-fns/addDays/index.js';
|
|
19
19
|
import format$1 from 'date-fns/format/index.js';
|
|
20
|
-
import '@tanstack/react-table';
|
|
20
|
+
import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, flexRender } from '@tanstack/react-table';
|
|
21
21
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
22
22
|
import { ChevronRightIcon, CheckIcon, DotFilledIcon } from '@radix-ui/react-icons';
|
|
23
23
|
import crypto$1 from 'crypto';
|
|
@@ -1118,13 +1118,13 @@ var PropTypes = propTypes$1.exports;
|
|
|
1118
1118
|
* See the {@glink features/watchdog Watchdog feature guide} to learn the rationale behind it and how to use it.
|
|
1119
1119
|
*
|
|
1120
1120
|
* @internal
|
|
1121
|
-
*/ function _array_like_to_array$
|
|
1121
|
+
*/ function _array_like_to_array$8(arr, len) {
|
|
1122
1122
|
if (len == null || len > arr.length) len = arr.length;
|
|
1123
1123
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1124
1124
|
return arr2;
|
|
1125
1125
|
}
|
|
1126
1126
|
function _array_without_holes$3(arr) {
|
|
1127
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1127
|
+
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
1128
1128
|
}
|
|
1129
1129
|
function _class_call_check$2(instance, Constructor) {
|
|
1130
1130
|
if (!(instance instanceof Constructor)) {
|
|
@@ -1159,15 +1159,15 @@ function _non_iterable_spread$3() {
|
|
|
1159
1159
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1160
1160
|
}
|
|
1161
1161
|
function _to_consumable_array$3(arr) {
|
|
1162
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$
|
|
1162
|
+
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$3();
|
|
1163
1163
|
}
|
|
1164
|
-
function _unsupported_iterable_to_array$
|
|
1164
|
+
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
1165
1165
|
if (!o) return;
|
|
1166
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1166
|
+
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
1167
1167
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1168
1168
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1169
1169
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1170
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1170
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
1171
1171
|
}
|
|
1172
1172
|
var Watchdog = /*#__PURE__*/ function() {
|
|
1173
1173
|
function Watchdog(config) {
|
|
@@ -3754,12 +3754,12 @@ var now$1 = now;
|
|
|
3754
3754
|
/**
|
|
3755
3755
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3756
3756
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
3757
|
-
*/ function _array_like_to_array$
|
|
3757
|
+
*/ function _array_like_to_array$7(arr, len) {
|
|
3758
3758
|
if (len == null || len > arr.length) len = arr.length;
|
|
3759
3759
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3760
3760
|
return arr2;
|
|
3761
3761
|
}
|
|
3762
|
-
function _array_with_holes$
|
|
3762
|
+
function _array_with_holes$5(arr) {
|
|
3763
3763
|
if (Array.isArray(arr)) return arr;
|
|
3764
3764
|
}
|
|
3765
3765
|
function _assert_this_initialized$1(self) {
|
|
@@ -3835,7 +3835,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
3835
3835
|
});
|
|
3836
3836
|
if (superClass) _set_prototype_of$1(subClass, superClass);
|
|
3837
3837
|
}
|
|
3838
|
-
function _iterable_to_array_limit$
|
|
3838
|
+
function _iterable_to_array_limit$5(arr, i) {
|
|
3839
3839
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3840
3840
|
if (_i == null) return;
|
|
3841
3841
|
var _arr = [];
|
|
@@ -3859,7 +3859,7 @@ function _iterable_to_array_limit$4(arr, i) {
|
|
|
3859
3859
|
}
|
|
3860
3860
|
return _arr;
|
|
3861
3861
|
}
|
|
3862
|
-
function _non_iterable_rest$
|
|
3862
|
+
function _non_iterable_rest$5() {
|
|
3863
3863
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3864
3864
|
}
|
|
3865
3865
|
function _object_spread$a(target) {
|
|
@@ -3941,8 +3941,8 @@ function _set_prototype_of$1(o, p) {
|
|
|
3941
3941
|
};
|
|
3942
3942
|
return _set_prototype_of$1(o, p);
|
|
3943
3943
|
}
|
|
3944
|
-
function _sliced_to_array$
|
|
3945
|
-
return _array_with_holes$
|
|
3944
|
+
function _sliced_to_array$5(arr, i) {
|
|
3945
|
+
return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$5();
|
|
3946
3946
|
}
|
|
3947
3947
|
function _super_prop_base$1(object, property) {
|
|
3948
3948
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
@@ -3955,13 +3955,13 @@ function _type_of$a(obj) {
|
|
|
3955
3955
|
"@swc/helpers - typeof";
|
|
3956
3956
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3957
3957
|
}
|
|
3958
|
-
function _unsupported_iterable_to_array$
|
|
3958
|
+
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
3959
3959
|
if (!o) return;
|
|
3960
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3960
|
+
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
3961
3961
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3962
3962
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3963
3963
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3964
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3964
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
3965
3965
|
}
|
|
3966
3966
|
function _is_native_reflect_construct$1() {
|
|
3967
3967
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -4109,7 +4109,7 @@ var EditorWatchdog = /*#__PURE__*/ function(Watchdog) {
|
|
|
4109
4109
|
try {
|
|
4110
4110
|
// Traverse through the roots saved when the editor crashed and set up the discussed values.
|
|
4111
4111
|
for(var _iterator = Object.entries(_this._data.roots)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4112
|
-
var _step_value = _sliced_to_array$
|
|
4112
|
+
var _step_value = _sliced_to_array$5(_step.value, 2), rootName = _step_value[0], rootData = _step_value[1];
|
|
4113
4113
|
if (rootData.isLoaded) {
|
|
4114
4114
|
existingRoots[rootName] = "";
|
|
4115
4115
|
rootsAttributes[rootName] = oldRootsAttributes[rootName] || {};
|
|
@@ -4469,14 +4469,14 @@ var EditorWatchdog = /*#__PURE__*/ function(Watchdog) {
|
|
|
4469
4469
|
var _this = this;
|
|
4470
4470
|
var editor = this.editor;
|
|
4471
4471
|
Object.entries(this._data.roots).forEach(function(param) {
|
|
4472
|
-
var _param = _sliced_to_array$
|
|
4472
|
+
var _param = _sliced_to_array$5(param, 2), rootName = _param[0], _param_ = _param[1], content = _param_.content, attributes = _param_.attributes;
|
|
4473
4473
|
var parsedNodes = JSON.parse(content);
|
|
4474
4474
|
var parsedAttributes = JSON.parse(attributes);
|
|
4475
4475
|
var rootElement = editor.model.document.getRoot(rootName);
|
|
4476
4476
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4477
4477
|
try {
|
|
4478
4478
|
for(var _iterator = parsedAttributes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4479
|
-
var _step_value = _sliced_to_array$
|
|
4479
|
+
var _step_value = _sliced_to_array$5(_step.value, 2), key = _step_value[0], value = _step_value[1];
|
|
4480
4480
|
writer.setAttribute(key, value, rootElement);
|
|
4481
4481
|
}
|
|
4482
4482
|
} catch (err) {
|
|
@@ -4516,7 +4516,7 @@ var EditorWatchdog = /*#__PURE__*/ function(Watchdog) {
|
|
|
4516
4516
|
}
|
|
4517
4517
|
});
|
|
4518
4518
|
Object.entries(this._data.markers).forEach(function(param) {
|
|
4519
|
-
var _param = _sliced_to_array$
|
|
4519
|
+
var _param = _sliced_to_array$5(param, 2), markerName = _param[0], markerOptions = _param[1];
|
|
4520
4520
|
var document = editor.model.document;
|
|
4521
4521
|
var _markerOptions_rangeJSON = markerOptions.rangeJSON, start = _markerOptions_rangeJSON.start, end = _markerOptions_rangeJSON.end, options = _object_without_properties$7(markerOptions, [
|
|
4522
4522
|
"rangeJSON"
|
|
@@ -79636,16 +79636,16 @@ var DragDropImages = function(param) {
|
|
|
79636
79636
|
});
|
|
79637
79637
|
};
|
|
79638
79638
|
|
|
79639
|
-
function _array_like_to_array$
|
|
79639
|
+
function _array_like_to_array$6(arr, len) {
|
|
79640
79640
|
if (len == null || len > arr.length) len = arr.length;
|
|
79641
79641
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
79642
79642
|
return arr2;
|
|
79643
79643
|
}
|
|
79644
|
-
function _array_with_holes$
|
|
79644
|
+
function _array_with_holes$4(arr) {
|
|
79645
79645
|
if (Array.isArray(arr)) return arr;
|
|
79646
79646
|
}
|
|
79647
79647
|
function _array_without_holes$2(arr) {
|
|
79648
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
79648
|
+
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
79649
79649
|
}
|
|
79650
79650
|
function _define_property$8(obj, key, value) {
|
|
79651
79651
|
if (key in obj) {
|
|
@@ -79663,7 +79663,7 @@ function _define_property$8(obj, key, value) {
|
|
|
79663
79663
|
function _iterable_to_array$2(iter) {
|
|
79664
79664
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
79665
79665
|
}
|
|
79666
|
-
function _iterable_to_array_limit$
|
|
79666
|
+
function _iterable_to_array_limit$4(arr, i) {
|
|
79667
79667
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
79668
79668
|
if (_i == null) return;
|
|
79669
79669
|
var _arr = [];
|
|
@@ -79687,7 +79687,7 @@ function _iterable_to_array_limit$3(arr, i) {
|
|
|
79687
79687
|
}
|
|
79688
79688
|
return _arr;
|
|
79689
79689
|
}
|
|
79690
|
-
function _non_iterable_rest$
|
|
79690
|
+
function _non_iterable_rest$4() {
|
|
79691
79691
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79692
79692
|
}
|
|
79693
79693
|
function _non_iterable_spread$2() {
|
|
@@ -79732,23 +79732,23 @@ function _object_spread_props$4(target, source) {
|
|
|
79732
79732
|
}
|
|
79733
79733
|
return target;
|
|
79734
79734
|
}
|
|
79735
|
-
function _sliced_to_array$
|
|
79736
|
-
return _array_with_holes$
|
|
79735
|
+
function _sliced_to_array$4(arr, i) {
|
|
79736
|
+
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$4();
|
|
79737
79737
|
}
|
|
79738
79738
|
function _to_consumable_array$2(arr) {
|
|
79739
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$
|
|
79739
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$2();
|
|
79740
79740
|
}
|
|
79741
|
-
function _unsupported_iterable_to_array$
|
|
79741
|
+
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
79742
79742
|
if (!o) return;
|
|
79743
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
79743
|
+
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
79744
79744
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79745
79745
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
79746
79746
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
79747
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
79747
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
79748
79748
|
}
|
|
79749
79749
|
var DropImage = function(param) {
|
|
79750
79750
|
var _param_preview = param.preview, preview = _param_preview === void 0 ? true : _param_preview, setFiles = param.setFiles, imageUrls = param.imageUrls, setImageUrls = param.setImageUrls;
|
|
79751
|
-
var _useState = _sliced_to_array$
|
|
79751
|
+
var _useState = _sliced_to_array$4(useState([]), 2), previewFiles = _useState[0], setPreviewFiles = _useState[1];
|
|
79752
79752
|
useEffect(function() {
|
|
79753
79753
|
setPreviewFiles(imageUrls);
|
|
79754
79754
|
}, [
|
|
@@ -79769,11 +79769,11 @@ var DropImage = function(param) {
|
|
|
79769
79769
|
onDrop: function(dropFiles) {
|
|
79770
79770
|
var newFiles = [];
|
|
79771
79771
|
setFiles(dropFiles);
|
|
79772
|
-
dropFiles.forEach(function(dropFile) {
|
|
79772
|
+
dropFiles.forEach(function(dropFile, index) {
|
|
79773
79773
|
Object.assign(dropFile, {
|
|
79774
79774
|
preview: URL.createObjectURL(dropFile),
|
|
79775
79775
|
id: v4(),
|
|
79776
|
-
index: (previewFiles === null || previewFiles === void 0 ? void 0 : previewFiles.length) + 1
|
|
79776
|
+
index: (previewFiles === null || previewFiles === void 0 ? void 0 : previewFiles.length) + index + 1
|
|
79777
79777
|
});
|
|
79778
79778
|
newFiles.push(dropFile);
|
|
79779
79779
|
});
|
|
@@ -79785,7 +79785,7 @@ var DropImage = function(param) {
|
|
|
79785
79785
|
var onDragEnd = function(result) {
|
|
79786
79786
|
if (!result.destination) return;
|
|
79787
79787
|
var newItems = _to_consumable_array$2(previewFiles);
|
|
79788
|
-
var _newItems_splice = _sliced_to_array$
|
|
79788
|
+
var _newItems_splice = _sliced_to_array$4(newItems.splice(result.source.index, 1), 1), reorderedItem = _newItems_splice[0];
|
|
79789
79789
|
newItems.splice(result.destination.index, 0, reorderedItem);
|
|
79790
79790
|
var reSortItem = newItems.map(function(item, index) {
|
|
79791
79791
|
return _object_spread_props$4(_object_spread$8({}, item), {
|
|
@@ -79951,15 +79951,15 @@ var Modal = function(param) {
|
|
|
79951
79951
|
});
|
|
79952
79952
|
};
|
|
79953
79953
|
|
|
79954
|
-
function _array_like_to_array$
|
|
79954
|
+
function _array_like_to_array$5(arr, len) {
|
|
79955
79955
|
if (len == null || len > arr.length) len = arr.length;
|
|
79956
79956
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
79957
79957
|
return arr2;
|
|
79958
79958
|
}
|
|
79959
|
-
function _array_with_holes$
|
|
79959
|
+
function _array_with_holes$3(arr) {
|
|
79960
79960
|
if (Array.isArray(arr)) return arr;
|
|
79961
79961
|
}
|
|
79962
|
-
function _iterable_to_array_limit$
|
|
79962
|
+
function _iterable_to_array_limit$3(arr, i) {
|
|
79963
79963
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
79964
79964
|
if (_i == null) return;
|
|
79965
79965
|
var _arr = [];
|
|
@@ -79983,23 +79983,23 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
79983
79983
|
}
|
|
79984
79984
|
return _arr;
|
|
79985
79985
|
}
|
|
79986
|
-
function _non_iterable_rest$
|
|
79986
|
+
function _non_iterable_rest$3() {
|
|
79987
79987
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79988
79988
|
}
|
|
79989
|
-
function _sliced_to_array$
|
|
79990
|
-
return _array_with_holes$
|
|
79989
|
+
function _sliced_to_array$3(arr, i) {
|
|
79990
|
+
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$3();
|
|
79991
79991
|
}
|
|
79992
|
-
function _unsupported_iterable_to_array$
|
|
79992
|
+
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
79993
79993
|
if (!o) return;
|
|
79994
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
79994
|
+
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
79995
79995
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
79996
79996
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
79997
79997
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
79998
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
79998
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
79999
79999
|
}
|
|
80000
80000
|
var BaseTemplate = function(param) {
|
|
80001
80001
|
var file = param.file, imageUrl = param.imageUrl;
|
|
80002
|
-
var _useState = _sliced_to_array$
|
|
80002
|
+
var _useState = _sliced_to_array$3(useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
|
|
80003
80003
|
useEffect(function() {
|
|
80004
80004
|
var fileReader;
|
|
80005
80005
|
var isCancel = false;
|
|
@@ -80060,15 +80060,15 @@ var BaseTemplate = function(param) {
|
|
|
80060
80060
|
});
|
|
80061
80061
|
};
|
|
80062
80062
|
|
|
80063
|
-
function _array_like_to_array$
|
|
80063
|
+
function _array_like_to_array$4(arr, len) {
|
|
80064
80064
|
if (len == null || len > arr.length) len = arr.length;
|
|
80065
80065
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
80066
80066
|
return arr2;
|
|
80067
80067
|
}
|
|
80068
|
-
function _array_with_holes$
|
|
80068
|
+
function _array_with_holes$2(arr) {
|
|
80069
80069
|
if (Array.isArray(arr)) return arr;
|
|
80070
80070
|
}
|
|
80071
|
-
function _iterable_to_array_limit$
|
|
80071
|
+
function _iterable_to_array_limit$2(arr, i) {
|
|
80072
80072
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
80073
80073
|
if (_i == null) return;
|
|
80074
80074
|
var _arr = [];
|
|
@@ -80092,25 +80092,25 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
80092
80092
|
}
|
|
80093
80093
|
return _arr;
|
|
80094
80094
|
}
|
|
80095
|
-
function _non_iterable_rest$
|
|
80095
|
+
function _non_iterable_rest$2() {
|
|
80096
80096
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
80097
80097
|
}
|
|
80098
|
-
function _sliced_to_array$
|
|
80099
|
-
return _array_with_holes$
|
|
80098
|
+
function _sliced_to_array$2(arr, i) {
|
|
80099
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
|
|
80100
80100
|
}
|
|
80101
|
-
function _unsupported_iterable_to_array$
|
|
80101
|
+
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
80102
80102
|
if (!o) return;
|
|
80103
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
80103
|
+
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
80104
80104
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
80105
80105
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
80106
80106
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
80107
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
80107
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
80108
80108
|
}
|
|
80109
80109
|
var CustomUpload = function(param) {
|
|
80110
80110
|
var className = param.className, children = param.children, file = param.file, setFile = param.setFile, imageUrl = param.imageUrl, setImageUrl = param.setImageUrl;
|
|
80111
80111
|
var imageMimeType = /image\/(png|jpg|jpeg)/i;
|
|
80112
80112
|
var DEFAULT_IMAGE_SIZE_LIMIT_IN_BYTES = 5120000; // 5000 KB
|
|
80113
|
-
var _useState = _sliced_to_array$
|
|
80113
|
+
var _useState = _sliced_to_array$2(useState(null), 2), modal = _useState[0], setModal = _useState[1];
|
|
80114
80114
|
var hiddenFileInput = useRef(null);
|
|
80115
80115
|
var handleImageClick = function() {
|
|
80116
80116
|
var _hiddenFileInput_current;
|
|
@@ -80694,15 +80694,15 @@ function DateRangePicker(param) {
|
|
|
80694
80694
|
});
|
|
80695
80695
|
}
|
|
80696
80696
|
|
|
80697
|
-
function _array_like_to_array$
|
|
80697
|
+
function _array_like_to_array$3(arr, len) {
|
|
80698
80698
|
if (len == null || len > arr.length) len = arr.length;
|
|
80699
80699
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
80700
80700
|
return arr2;
|
|
80701
80701
|
}
|
|
80702
|
-
function _array_with_holes(arr) {
|
|
80702
|
+
function _array_with_holes$1(arr) {
|
|
80703
80703
|
if (Array.isArray(arr)) return arr;
|
|
80704
80704
|
}
|
|
80705
|
-
function _iterable_to_array_limit(arr, i) {
|
|
80705
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
80706
80706
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
80707
80707
|
if (_i == null) return;
|
|
80708
80708
|
var _arr = [];
|
|
@@ -80726,30 +80726,30 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
80726
80726
|
}
|
|
80727
80727
|
return _arr;
|
|
80728
80728
|
}
|
|
80729
|
-
function _non_iterable_rest() {
|
|
80729
|
+
function _non_iterable_rest$1() {
|
|
80730
80730
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
80731
80731
|
}
|
|
80732
|
-
function _sliced_to_array(arr, i) {
|
|
80733
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$
|
|
80732
|
+
function _sliced_to_array$1(arr, i) {
|
|
80733
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
|
|
80734
80734
|
}
|
|
80735
|
-
function _unsupported_iterable_to_array$
|
|
80735
|
+
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
80736
80736
|
if (!o) return;
|
|
80737
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
80737
|
+
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
80738
80738
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
80739
80739
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
80740
80740
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
80741
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
80741
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
80742
80742
|
}
|
|
80743
80743
|
var ReactDateRange = function(param) {
|
|
80744
80744
|
var className = param.className, item = param.item, onChange = param.onChange, dates = param.dates, date = param.date;
|
|
80745
|
-
var _useState = _sliced_to_array(useState("zhTW"), 1), locale = _useState[0];
|
|
80746
|
-
var _useState1 = _sliced_to_array(useState(""), 2), calendarData = _useState1[0], setCalendarData = _useState1[1];
|
|
80747
|
-
var _useState2 = _sliced_to_array(useState({
|
|
80745
|
+
var _useState = _sliced_to_array$1(useState("zhTW"), 1), locale = _useState[0];
|
|
80746
|
+
var _useState1 = _sliced_to_array$1(useState(""), 2), calendarData = _useState1[0], setCalendarData = _useState1[1];
|
|
80747
|
+
var _useState2 = _sliced_to_array$1(useState({
|
|
80748
80748
|
startDate: new Date(),
|
|
80749
80749
|
endDate: addDays(new Date(), 7),
|
|
80750
80750
|
key: "selection"
|
|
80751
80751
|
}), 2), range = _useState2[0], setRange = _useState2[1];
|
|
80752
|
-
var _useState3 = _sliced_to_array(useState(false), 2), open = _useState3[0], setOpen = _useState3[1];
|
|
80752
|
+
var _useState3 = _sliced_to_array$1(useState(false), 2), open = _useState3[0], setOpen = _useState3[1];
|
|
80753
80753
|
var refOne = useRef(null);
|
|
80754
80754
|
var hideOnEscape = function(e) {
|
|
80755
80755
|
if (e.key === "Escape") {
|
|
@@ -80919,6 +80919,8 @@ function _object_without_properties_loose$2(source, excluded) {
|
|
|
80919
80919
|
}
|
|
80920
80920
|
return target;
|
|
80921
80921
|
}
|
|
80922
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
80923
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
80922
80924
|
var DropdownMenuSubTrigger = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
80923
80925
|
var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties$2(_param, [
|
|
80924
80926
|
"className",
|
|
@@ -81250,6 +81252,282 @@ var TableCaption = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
81250
81252
|
});
|
|
81251
81253
|
TableCaption.displayName = "TableCaption";
|
|
81252
81254
|
|
|
81255
|
+
var TablePagination = function(param) {
|
|
81256
|
+
var table = param.table;
|
|
81257
|
+
var setPageIndex = table.setPageIndex, getCanPreviousPage = table.getCanPreviousPage, getCanNextPage = table.getCanNextPage, getPageCount = table.getPageCount, previousPage = table.previousPage, nextPage = table.nextPage, getPreFilteredRowModel = table.getPreFilteredRowModel, getState = table.getState;
|
|
81258
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
81259
|
+
className: "flex items-center flex-wrap",
|
|
81260
|
+
children: [
|
|
81261
|
+
/*#__PURE__*/ jsxs("div", {
|
|
81262
|
+
className: "flex gap-2 items-center text-md font-medium",
|
|
81263
|
+
children: [
|
|
81264
|
+
/*#__PURE__*/ jsx("span", {
|
|
81265
|
+
className: "",
|
|
81266
|
+
children: "每頁"
|
|
81267
|
+
}),
|
|
81268
|
+
/*#__PURE__*/ jsx("select", {
|
|
81269
|
+
name: "",
|
|
81270
|
+
id: "",
|
|
81271
|
+
onChange: function(e) {
|
|
81272
|
+
return table.setPageSize(Number(e.target.value));
|
|
81273
|
+
},
|
|
81274
|
+
className: "border inline-flex gap-4 w-[70px] cursor-pointer rounded-md p-1",
|
|
81275
|
+
children: [
|
|
81276
|
+
5,
|
|
81277
|
+
10,
|
|
81278
|
+
20,
|
|
81279
|
+
50,
|
|
81280
|
+
100
|
|
81281
|
+
].map(function(row) {
|
|
81282
|
+
return /*#__PURE__*/ jsx("option", {
|
|
81283
|
+
value: row,
|
|
81284
|
+
className: "mt-2",
|
|
81285
|
+
children: row
|
|
81286
|
+
}, row);
|
|
81287
|
+
})
|
|
81288
|
+
}),
|
|
81289
|
+
"筆"
|
|
81290
|
+
]
|
|
81291
|
+
}),
|
|
81292
|
+
/*#__PURE__*/ jsxs("div", {
|
|
81293
|
+
className: "text-gray-400 text-sm pl-4",
|
|
81294
|
+
children: [
|
|
81295
|
+
"共",
|
|
81296
|
+
getPreFilteredRowModel().rows.length,
|
|
81297
|
+
"筆資料"
|
|
81298
|
+
]
|
|
81299
|
+
}),
|
|
81300
|
+
/*#__PURE__*/ jsxs("div", {
|
|
81301
|
+
className: "flex gap-8 justify-end",
|
|
81302
|
+
children: [
|
|
81303
|
+
/*#__PURE__*/ jsxs("div", {
|
|
81304
|
+
className: "flex w-[100px] items-center justify-start lg:justify-center text-md font-medium",
|
|
81305
|
+
children: [
|
|
81306
|
+
"頁數 \xa0 ",
|
|
81307
|
+
/*#__PURE__*/ jsx("strong", {
|
|
81308
|
+
children: getState().pagination.pageIndex + 1
|
|
81309
|
+
}),
|
|
81310
|
+
"\xa0 / ",
|
|
81311
|
+
getPageCount()
|
|
81312
|
+
]
|
|
81313
|
+
}),
|
|
81314
|
+
/*#__PURE__*/ jsxs("div", {
|
|
81315
|
+
className: "flex gap-2 [&>button]:h-8 [&>button]:w-8 [&>button]:border [&>button]:border-gray-300 [&>button]:rounded-md [&>button]:grid [&>button]:place-items-center [&>button:disabled]:opacity-50 [&>button:disabled]:border-gray-200 ",
|
|
81316
|
+
children: [
|
|
81317
|
+
/*#__PURE__*/ jsx("button", {
|
|
81318
|
+
type: "button",
|
|
81319
|
+
disabled: !getCanPreviousPage(),
|
|
81320
|
+
onClick: function() {
|
|
81321
|
+
return setPageIndex(0);
|
|
81322
|
+
},
|
|
81323
|
+
children: "<<"
|
|
81324
|
+
}),
|
|
81325
|
+
/*#__PURE__*/ jsx("button", {
|
|
81326
|
+
type: "button",
|
|
81327
|
+
disabled: !getCanPreviousPage(),
|
|
81328
|
+
onClick: previousPage,
|
|
81329
|
+
children: "<"
|
|
81330
|
+
}),
|
|
81331
|
+
/*#__PURE__*/ jsx("button", {
|
|
81332
|
+
type: "button",
|
|
81333
|
+
disabled: !getCanNextPage(),
|
|
81334
|
+
onClick: nextPage,
|
|
81335
|
+
children: ">"
|
|
81336
|
+
}),
|
|
81337
|
+
/*#__PURE__*/ jsx("button", {
|
|
81338
|
+
type: "button",
|
|
81339
|
+
disabled: !getCanNextPage(),
|
|
81340
|
+
onClick: function() {
|
|
81341
|
+
return setPageIndex(getPageCount() - 1);
|
|
81342
|
+
},
|
|
81343
|
+
children: ">>"
|
|
81344
|
+
})
|
|
81345
|
+
]
|
|
81346
|
+
})
|
|
81347
|
+
]
|
|
81348
|
+
})
|
|
81349
|
+
]
|
|
81350
|
+
});
|
|
81351
|
+
};
|
|
81352
|
+
|
|
81353
|
+
function _array_like_to_array$2(arr, len) {
|
|
81354
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
81355
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
81356
|
+
return arr2;
|
|
81357
|
+
}
|
|
81358
|
+
function _array_with_holes(arr) {
|
|
81359
|
+
if (Array.isArray(arr)) return arr;
|
|
81360
|
+
}
|
|
81361
|
+
function _iterable_to_array_limit(arr, i) {
|
|
81362
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
81363
|
+
if (_i == null) return;
|
|
81364
|
+
var _arr = [];
|
|
81365
|
+
var _n = true;
|
|
81366
|
+
var _d = false;
|
|
81367
|
+
var _s, _e;
|
|
81368
|
+
try {
|
|
81369
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
81370
|
+
_arr.push(_s.value);
|
|
81371
|
+
if (i && _arr.length === i) break;
|
|
81372
|
+
}
|
|
81373
|
+
} catch (err) {
|
|
81374
|
+
_d = true;
|
|
81375
|
+
_e = err;
|
|
81376
|
+
} finally{
|
|
81377
|
+
try {
|
|
81378
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
81379
|
+
} finally{
|
|
81380
|
+
if (_d) throw _e;
|
|
81381
|
+
}
|
|
81382
|
+
}
|
|
81383
|
+
return _arr;
|
|
81384
|
+
}
|
|
81385
|
+
function _non_iterable_rest() {
|
|
81386
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
81387
|
+
}
|
|
81388
|
+
function _sliced_to_array(arr, i) {
|
|
81389
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest();
|
|
81390
|
+
}
|
|
81391
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
81392
|
+
if (!o) return;
|
|
81393
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
81394
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
81395
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
81396
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
81397
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
81398
|
+
}
|
|
81399
|
+
var DataTable = function(param) {
|
|
81400
|
+
var data = param.data, filterColumn = param.filterColumn, columns = param.columns, _param_searchData = param.searchData, searchData = _param_searchData === void 0 ? {
|
|
81401
|
+
disable: true,
|
|
81402
|
+
label: "",
|
|
81403
|
+
name: ""
|
|
81404
|
+
} : _param_searchData;
|
|
81405
|
+
var _table_getColumn, _table_getRowModel_rows;
|
|
81406
|
+
var _useState = _sliced_to_array(useState([]), 2), sorting = _useState[0], setSorting = _useState[1];
|
|
81407
|
+
var _useState1 = _sliced_to_array(useState([]), 2), columnFilters = _useState1[0], setColumnFilters = _useState1[1];
|
|
81408
|
+
var _useState2 = _sliced_to_array(useState({}), 2), columnVisibility = _useState2[0], setColumnVisibility = _useState2[1];
|
|
81409
|
+
var _useState3 = _sliced_to_array(useState({}), 2), rowSelection = _useState3[0], setRowSelection = _useState3[1];
|
|
81410
|
+
var table = useReactTable({
|
|
81411
|
+
data: data,
|
|
81412
|
+
columns: columns,
|
|
81413
|
+
onSortingChange: setSorting,
|
|
81414
|
+
onColumnFiltersChange: setColumnFilters,
|
|
81415
|
+
getCoreRowModel: getCoreRowModel(),
|
|
81416
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
81417
|
+
getSortedRowModel: getSortedRowModel(),
|
|
81418
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
81419
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
81420
|
+
onRowSelectionChange: setRowSelection,
|
|
81421
|
+
state: {
|
|
81422
|
+
sorting: sorting,
|
|
81423
|
+
columnFilters: columnFilters,
|
|
81424
|
+
columnVisibility: columnVisibility,
|
|
81425
|
+
rowSelection: rowSelection
|
|
81426
|
+
}
|
|
81427
|
+
});
|
|
81428
|
+
useEffect(function() {
|
|
81429
|
+
table.setPageSize(5);
|
|
81430
|
+
}, []);
|
|
81431
|
+
var _table_getColumn_getFilterValue;
|
|
81432
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
81433
|
+
className: "w-full",
|
|
81434
|
+
children: [
|
|
81435
|
+
/*#__PURE__*/ jsxs("div", {
|
|
81436
|
+
className: "flex items-center py-4 gap-2",
|
|
81437
|
+
children: [
|
|
81438
|
+
!(searchData === null || searchData === void 0 ? void 0 : searchData.disable) && /*#__PURE__*/ jsx(Input, {
|
|
81439
|
+
placeholder: searchData === null || searchData === void 0 ? void 0 : searchData.label,
|
|
81440
|
+
value: (_table_getColumn_getFilterValue = (_table_getColumn = table.getColumn(searchData === null || searchData === void 0 ? void 0 : searchData.name)) === null || _table_getColumn === void 0 ? void 0 : _table_getColumn.getFilterValue()) !== null && _table_getColumn_getFilterValue !== void 0 ? _table_getColumn_getFilterValue : "",
|
|
81441
|
+
onChange: function(event) {
|
|
81442
|
+
var _table_getColumn;
|
|
81443
|
+
return (_table_getColumn = table.getColumn(searchData === null || searchData === void 0 ? void 0 : searchData.name)) === null || _table_getColumn === void 0 ? void 0 : _table_getColumn.setFilterValue(event.target.value);
|
|
81444
|
+
},
|
|
81445
|
+
className: "max-w-sm"
|
|
81446
|
+
}),
|
|
81447
|
+
/*#__PURE__*/ jsx("div", {
|
|
81448
|
+
children: table.pagesize
|
|
81449
|
+
}),
|
|
81450
|
+
/*#__PURE__*/ jsxs(DropdownMenu, {
|
|
81451
|
+
children: [
|
|
81452
|
+
/*#__PURE__*/ jsx(DropdownMenuTrigger, {
|
|
81453
|
+
asChild: true,
|
|
81454
|
+
children: /*#__PURE__*/ jsxs(Button, {
|
|
81455
|
+
variant: "outline",
|
|
81456
|
+
className: "ml-auto",
|
|
81457
|
+
children: [
|
|
81458
|
+
"欄位篩選 ",
|
|
81459
|
+
/*#__PURE__*/ jsx(ChevronDown, {
|
|
81460
|
+
className: "ml-2 h-4 w-4"
|
|
81461
|
+
})
|
|
81462
|
+
]
|
|
81463
|
+
})
|
|
81464
|
+
}),
|
|
81465
|
+
/*#__PURE__*/ jsx(DropdownMenuContent, {
|
|
81466
|
+
align: "end",
|
|
81467
|
+
children: table.getAllColumns().filter(function(column) {
|
|
81468
|
+
return column.getCanHide();
|
|
81469
|
+
}).map(function(column) {
|
|
81470
|
+
return /*#__PURE__*/ jsx(DropdownMenuCheckboxItem, {
|
|
81471
|
+
className: "capitalize",
|
|
81472
|
+
checked: column.getIsVisible(),
|
|
81473
|
+
onCheckedChange: function(value) {
|
|
81474
|
+
return column.toggleVisibility(!!value);
|
|
81475
|
+
},
|
|
81476
|
+
children: filterColumn[column.id]
|
|
81477
|
+
}, column.id);
|
|
81478
|
+
})
|
|
81479
|
+
})
|
|
81480
|
+
]
|
|
81481
|
+
})
|
|
81482
|
+
]
|
|
81483
|
+
}),
|
|
81484
|
+
/*#__PURE__*/ jsx("div", {
|
|
81485
|
+
className: "rounded-md border",
|
|
81486
|
+
children: /*#__PURE__*/ jsxs(Table, {
|
|
81487
|
+
children: [
|
|
81488
|
+
/*#__PURE__*/ jsx(TableHeader, {
|
|
81489
|
+
children: table.getHeaderGroups().map(function(headerGroup) {
|
|
81490
|
+
return /*#__PURE__*/ jsx(TableRow, {
|
|
81491
|
+
children: headerGroup.headers.map(function(header) {
|
|
81492
|
+
return /*#__PURE__*/ jsx(TableHead, {
|
|
81493
|
+
children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())
|
|
81494
|
+
}, header.id);
|
|
81495
|
+
})
|
|
81496
|
+
}, headerGroup.id);
|
|
81497
|
+
})
|
|
81498
|
+
}),
|
|
81499
|
+
/*#__PURE__*/ jsx(TableBody, {
|
|
81500
|
+
children: ((_table_getRowModel_rows = table.getRowModel().rows) === null || _table_getRowModel_rows === void 0 ? void 0 : _table_getRowModel_rows.length) ? table.getRowModel().rows.map(function(row) {
|
|
81501
|
+
return /*#__PURE__*/ jsx(TableRow, {
|
|
81502
|
+
"data-state": row.getIsSelected() && "selected",
|
|
81503
|
+
children: row.getVisibleCells().map(function(cell) {
|
|
81504
|
+
return /*#__PURE__*/ jsx(TableCell, {
|
|
81505
|
+
className: "min-w-[2rem]",
|
|
81506
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
81507
|
+
}, cell.id);
|
|
81508
|
+
})
|
|
81509
|
+
}, row.id);
|
|
81510
|
+
}) : /*#__PURE__*/ jsx(TableRow, {
|
|
81511
|
+
children: /*#__PURE__*/ jsx(TableCell, {
|
|
81512
|
+
colSpan: columns.length,
|
|
81513
|
+
className: "h-24 text-center",
|
|
81514
|
+
children: "無資料"
|
|
81515
|
+
})
|
|
81516
|
+
})
|
|
81517
|
+
})
|
|
81518
|
+
]
|
|
81519
|
+
})
|
|
81520
|
+
}),
|
|
81521
|
+
/*#__PURE__*/ jsx("div", {
|
|
81522
|
+
className: "flex items-center justify-end space-x-2 py-4",
|
|
81523
|
+
children: /*#__PURE__*/ jsx(TablePagination, {
|
|
81524
|
+
table: table
|
|
81525
|
+
})
|
|
81526
|
+
})
|
|
81527
|
+
]
|
|
81528
|
+
});
|
|
81529
|
+
};
|
|
81530
|
+
|
|
81253
81531
|
var phone = /^09\d{8}$/;
|
|
81254
81532
|
var email = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/i;
|
|
81255
81533
|
var birthday = /^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/;
|
|
@@ -101765,4 +102043,4 @@ function DnDCalendar(props) {
|
|
|
101765
102043
|
});
|
|
101766
102044
|
}
|
|
101767
102045
|
|
|
101768
|
-
export { BigCalender, CkEditor, CustomUpload, DateRangePicker, DnDCalendar, DropImage, ReactDateRange, Regex, Spin, Switch, UiLibrary, decryptByEcPay, encryptByEcPay, verifyId, verifyTaxId };
|
|
102046
|
+
export { BigCalender, CkEditor, CustomUpload, DataTable, DateRangePicker, DnDCalendar, DropImage, ReactDateRange, Regex, Spin, Switch, UiLibrary, decryptByEcPay, encryptByEcPay, verifyId, verifyTaxId };
|
package/package.json
CHANGED
package/src/Type/index.d.ts
CHANGED