@sunggang/ui-lib 0.3.45 → 0.3.47
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 +235 -0
- package/index.esm2.js +345 -145
- package/package.json +1 -1
- package/src/lib/Form/index.d.ts +3 -0
- package/src/lib/Form/types.d.ts +6 -0
- package/src/lib/SearchDropDown/BaseDropdown.d.ts +6 -0
package/index.esm2.js
CHANGED
|
@@ -6202,13 +6202,13 @@ function setObjProp(f, key, value) {
|
|
|
6202
6202
|
});
|
|
6203
6203
|
}
|
|
6204
6204
|
|
|
6205
|
-
function _array_like_to_array$
|
|
6205
|
+
function _array_like_to_array$p(arr, len) {
|
|
6206
6206
|
if (len == null || len > arr.length) len = arr.length;
|
|
6207
6207
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6208
6208
|
return arr2;
|
|
6209
6209
|
}
|
|
6210
6210
|
function _array_without_holes$9(arr) {
|
|
6211
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6211
|
+
if (Array.isArray(arr)) return _array_like_to_array$p(arr);
|
|
6212
6212
|
}
|
|
6213
6213
|
function _iterable_to_array$9(iter) {
|
|
6214
6214
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -6217,15 +6217,15 @@ function _non_iterable_spread$9() {
|
|
|
6217
6217
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6218
6218
|
}
|
|
6219
6219
|
function _to_consumable_array$9(arr) {
|
|
6220
|
-
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$
|
|
6220
|
+
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$p(arr) || _non_iterable_spread$9();
|
|
6221
6221
|
}
|
|
6222
|
-
function _unsupported_iterable_to_array$
|
|
6222
|
+
function _unsupported_iterable_to_array$p(o, minLen) {
|
|
6223
6223
|
if (!o) return;
|
|
6224
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6224
|
+
if (typeof o === "string") return _array_like_to_array$p(o, minLen);
|
|
6225
6225
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6226
6226
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6227
6227
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6228
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6228
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$p(o, minLen);
|
|
6229
6229
|
}
|
|
6230
6230
|
function _ts_generator$4(thisArg, body) {
|
|
6231
6231
|
var f, y, t, g, _ = {
|
|
@@ -17922,16 +17922,16 @@ var Modal = function(param) {
|
|
|
17922
17922
|
});
|
|
17923
17923
|
};
|
|
17924
17924
|
|
|
17925
|
-
function _array_like_to_array$
|
|
17925
|
+
function _array_like_to_array$o(arr, len) {
|
|
17926
17926
|
if (len == null || len > arr.length) len = arr.length;
|
|
17927
17927
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
17928
17928
|
return arr2;
|
|
17929
17929
|
}
|
|
17930
|
-
function _array_with_holes$
|
|
17930
|
+
function _array_with_holes$l(arr) {
|
|
17931
17931
|
if (Array.isArray(arr)) return arr;
|
|
17932
17932
|
}
|
|
17933
17933
|
function _array_without_holes$8(arr) {
|
|
17934
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
17934
|
+
if (Array.isArray(arr)) return _array_like_to_array$o(arr);
|
|
17935
17935
|
}
|
|
17936
17936
|
function _define_property$p(obj, key, value) {
|
|
17937
17937
|
if (key in obj) {
|
|
@@ -17949,7 +17949,7 @@ function _define_property$p(obj, key, value) {
|
|
|
17949
17949
|
function _iterable_to_array$8(iter) {
|
|
17950
17950
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
17951
17951
|
}
|
|
17952
|
-
function _iterable_to_array_limit$
|
|
17952
|
+
function _iterable_to_array_limit$l(arr, i) {
|
|
17953
17953
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
17954
17954
|
if (_i == null) return;
|
|
17955
17955
|
var _arr = [];
|
|
@@ -17973,7 +17973,7 @@ function _iterable_to_array_limit$k(arr, i) {
|
|
|
17973
17973
|
}
|
|
17974
17974
|
return _arr;
|
|
17975
17975
|
}
|
|
17976
|
-
function _non_iterable_rest$
|
|
17976
|
+
function _non_iterable_rest$l() {
|
|
17977
17977
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17978
17978
|
}
|
|
17979
17979
|
function _non_iterable_spread$8() {
|
|
@@ -18018,24 +18018,24 @@ function _object_spread_props$j(target, source) {
|
|
|
18018
18018
|
}
|
|
18019
18019
|
return target;
|
|
18020
18020
|
}
|
|
18021
|
-
function _sliced_to_array$
|
|
18022
|
-
return _array_with_holes$
|
|
18021
|
+
function _sliced_to_array$l(arr, i) {
|
|
18022
|
+
return _array_with_holes$l(arr) || _iterable_to_array_limit$l(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$l();
|
|
18023
18023
|
}
|
|
18024
18024
|
function _to_consumable_array$8(arr) {
|
|
18025
|
-
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$
|
|
18025
|
+
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$8();
|
|
18026
18026
|
}
|
|
18027
|
-
function _unsupported_iterable_to_array$
|
|
18027
|
+
function _unsupported_iterable_to_array$o(o, minLen) {
|
|
18028
18028
|
if (!o) return;
|
|
18029
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
18029
|
+
if (typeof o === "string") return _array_like_to_array$o(o, minLen);
|
|
18030
18030
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
18031
18031
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
18032
18032
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
18033
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
18033
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$o(o, minLen);
|
|
18034
18034
|
}
|
|
18035
18035
|
var DropImage = function(param) {
|
|
18036
18036
|
var _param_preview = param.preview, preview = _param_preview === void 0 ? true : _param_preview, setFiles = param.setFiles, imageUrls = param.imageUrls, setImageUrls = param.setImageUrls, _param_imageStyleType = param.imageStyleType, imageStyleType = _param_imageStyleType === void 0 ? "base" : _param_imageStyleType, _param_limitSize = param.limitSize, limitSize = _param_limitSize === void 0 ? 0 : _param_limitSize;
|
|
18037
|
-
var _useState = _sliced_to_array$
|
|
18038
|
-
var _useState1 = _sliced_to_array$
|
|
18037
|
+
var _useState = _sliced_to_array$l(useState([]), 2), previewFiles = _useState[0], setPreviewFiles = _useState[1];
|
|
18038
|
+
var _useState1 = _sliced_to_array$l(useState(null), 2), uploadError = _useState1[0], setUploadError = _useState1[1];
|
|
18039
18039
|
useEffect(function() {
|
|
18040
18040
|
setPreviewFiles(imageUrls);
|
|
18041
18041
|
}, [
|
|
@@ -18112,7 +18112,7 @@ var DropImage = function(param) {
|
|
|
18112
18112
|
var onDragEnd = function(result) {
|
|
18113
18113
|
if (!result.destination) return;
|
|
18114
18114
|
var newItems = _to_consumable_array$8(previewFiles);
|
|
18115
|
-
var _newItems_splice = _sliced_to_array$
|
|
18115
|
+
var _newItems_splice = _sliced_to_array$l(newItems.splice(result.source.index, 1), 1), reorderedItem = _newItems_splice[0];
|
|
18116
18116
|
newItems.splice(result.destination.index, 0, reorderedItem);
|
|
18117
18117
|
var reSortItem = newItems.map(function(item, index) {
|
|
18118
18118
|
return _object_spread_props$j(_object_spread$o({}, item), {
|
|
@@ -19342,16 +19342,16 @@ var Spinner = function(param) {
|
|
|
19342
19342
|
});
|
|
19343
19343
|
};
|
|
19344
19344
|
|
|
19345
|
-
function _array_like_to_array$
|
|
19345
|
+
function _array_like_to_array$n(arr, len) {
|
|
19346
19346
|
if (len == null || len > arr.length) len = arr.length;
|
|
19347
19347
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
19348
19348
|
return arr2;
|
|
19349
19349
|
}
|
|
19350
|
-
function _array_with_holes$
|
|
19350
|
+
function _array_with_holes$k(arr) {
|
|
19351
19351
|
if (Array.isArray(arr)) return arr;
|
|
19352
19352
|
}
|
|
19353
19353
|
function _array_without_holes$7(arr) {
|
|
19354
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
19354
|
+
if (Array.isArray(arr)) return _array_like_to_array$n(arr);
|
|
19355
19355
|
}
|
|
19356
19356
|
function _define_property$n(obj, key, value) {
|
|
19357
19357
|
if (key in obj) {
|
|
@@ -19369,7 +19369,7 @@ function _define_property$n(obj, key, value) {
|
|
|
19369
19369
|
function _iterable_to_array$7(iter) {
|
|
19370
19370
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
19371
19371
|
}
|
|
19372
|
-
function _iterable_to_array_limit$
|
|
19372
|
+
function _iterable_to_array_limit$k(arr, i) {
|
|
19373
19373
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
19374
19374
|
if (_i == null) return;
|
|
19375
19375
|
var _arr = [];
|
|
@@ -19393,7 +19393,7 @@ function _iterable_to_array_limit$j(arr, i) {
|
|
|
19393
19393
|
}
|
|
19394
19394
|
return _arr;
|
|
19395
19395
|
}
|
|
19396
|
-
function _non_iterable_rest$
|
|
19396
|
+
function _non_iterable_rest$k() {
|
|
19397
19397
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19398
19398
|
}
|
|
19399
19399
|
function _non_iterable_spread$7() {
|
|
@@ -19438,25 +19438,25 @@ function _object_spread_props$h(target, source) {
|
|
|
19438
19438
|
}
|
|
19439
19439
|
return target;
|
|
19440
19440
|
}
|
|
19441
|
-
function _sliced_to_array$
|
|
19442
|
-
return _array_with_holes$
|
|
19441
|
+
function _sliced_to_array$k(arr, i) {
|
|
19442
|
+
return _array_with_holes$k(arr) || _iterable_to_array_limit$k(arr, i) || _unsupported_iterable_to_array$n(arr, i) || _non_iterable_rest$k();
|
|
19443
19443
|
}
|
|
19444
19444
|
function _to_consumable_array$7(arr) {
|
|
19445
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$
|
|
19445
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_spread$7();
|
|
19446
19446
|
}
|
|
19447
|
-
function _unsupported_iterable_to_array$
|
|
19447
|
+
function _unsupported_iterable_to_array$n(o, minLen) {
|
|
19448
19448
|
if (!o) return;
|
|
19449
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
19449
|
+
if (typeof o === "string") return _array_like_to_array$n(o, minLen);
|
|
19450
19450
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
19451
19451
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
19452
19452
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
19453
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
19453
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$n(o, minLen);
|
|
19454
19454
|
}
|
|
19455
19455
|
var DropDown = function(param) {
|
|
19456
19456
|
var _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_value = param.value, value = _param_value === void 0 ? null : _param_value, onChange = param.onChange, onSearchInputChange = param.onSearchInputChange, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Select..." : _param_placeholder, _param_searchInputPlaceholder = param.searchInputPlaceholder, searchInputPlaceholder = _param_searchInputPlaceholder === void 0 ? "Search..." : _param_searchInputPlaceholder, _param_isMultiple = param.isMultiple, isMultiple = _param_isMultiple === void 0 ? false : _param_isMultiple, _param_isClearable = param.isClearable, isClearable = _param_isClearable === void 0 ? false : _param_isClearable, _param_isSearchable = param.isSearchable, isSearchable = _param_isSearchable === void 0 ? false : _param_isSearchable, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading, _param_menuIsOpen = param.menuIsOpen, menuIsOpen = _param_menuIsOpen === void 0 ? false : _param_menuIsOpen, _param_noOptionsMessage = param.noOptionsMessage, noOptionsMessage = _param_noOptionsMessage === void 0 ? "No options found" : _param_noOptionsMessage, _param_primaryColor = param.primaryColor, primaryColor = _param_primaryColor === void 0 ? DEFAULT_THEME : _param_primaryColor, _param_formatGroupLabel = param.formatGroupLabel, formatGroupLabel = _param_formatGroupLabel === void 0 ? null : _param_formatGroupLabel, _param_formatOptionLabel = param.formatOptionLabel, formatOptionLabel = _param_formatOptionLabel === void 0 ? null : _param_formatOptionLabel, classNames = param.classNames;
|
|
19457
|
-
var _useState = _sliced_to_array$
|
|
19458
|
-
var _useState1 = _sliced_to_array$
|
|
19459
|
-
var _useState2 = _sliced_to_array$
|
|
19457
|
+
var _useState = _sliced_to_array$k(useState(menuIsOpen), 2), open = _useState[0], setOpen = _useState[1];
|
|
19458
|
+
var _useState1 = _sliced_to_array$k(useState(options), 2), list = _useState1[0], setList = _useState1[1];
|
|
19459
|
+
var _useState2 = _sliced_to_array$k(useState(""), 2), inputValue = _useState2[0], setInputValue = _useState2[1];
|
|
19460
19460
|
var ref = useRef(null);
|
|
19461
19461
|
var searchBoxRef = useRef(null);
|
|
19462
19462
|
useEffect(function() {
|
|
@@ -19699,15 +19699,15 @@ var DropDown = function(param) {
|
|
|
19699
19699
|
});
|
|
19700
19700
|
};
|
|
19701
19701
|
|
|
19702
|
-
function _array_like_to_array$
|
|
19702
|
+
function _array_like_to_array$m(arr, len) {
|
|
19703
19703
|
if (len == null || len > arr.length) len = arr.length;
|
|
19704
19704
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
19705
19705
|
return arr2;
|
|
19706
19706
|
}
|
|
19707
|
-
function _array_with_holes$
|
|
19707
|
+
function _array_with_holes$j(arr) {
|
|
19708
19708
|
if (Array.isArray(arr)) return arr;
|
|
19709
19709
|
}
|
|
19710
|
-
function _iterable_to_array_limit$
|
|
19710
|
+
function _iterable_to_array_limit$j(arr, i) {
|
|
19711
19711
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
19712
19712
|
if (_i == null) return;
|
|
19713
19713
|
var _arr = [];
|
|
@@ -19731,23 +19731,23 @@ function _iterable_to_array_limit$i(arr, i) {
|
|
|
19731
19731
|
}
|
|
19732
19732
|
return _arr;
|
|
19733
19733
|
}
|
|
19734
|
-
function _non_iterable_rest$
|
|
19734
|
+
function _non_iterable_rest$j() {
|
|
19735
19735
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19736
19736
|
}
|
|
19737
|
-
function _sliced_to_array$
|
|
19738
|
-
return _array_with_holes$
|
|
19737
|
+
function _sliced_to_array$j(arr, i) {
|
|
19738
|
+
return _array_with_holes$j(arr) || _iterable_to_array_limit$j(arr, i) || _unsupported_iterable_to_array$m(arr, i) || _non_iterable_rest$j();
|
|
19739
19739
|
}
|
|
19740
|
-
function _unsupported_iterable_to_array$
|
|
19740
|
+
function _unsupported_iterable_to_array$m(o, minLen) {
|
|
19741
19741
|
if (!o) return;
|
|
19742
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
19742
|
+
if (typeof o === "string") return _array_like_to_array$m(o, minLen);
|
|
19743
19743
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
19744
19744
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
19745
19745
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
19746
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
19746
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$m(o, minLen);
|
|
19747
19747
|
}
|
|
19748
19748
|
var BaseTemplate$1 = function(param) {
|
|
19749
19749
|
var file = param.file, imageUrl = param.imageUrl;
|
|
19750
|
-
var _useState = _sliced_to_array$
|
|
19750
|
+
var _useState = _sliced_to_array$j(useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
|
|
19751
19751
|
useEffect(function() {
|
|
19752
19752
|
var fileReader;
|
|
19753
19753
|
var isCancel = false;
|
|
@@ -19808,15 +19808,15 @@ var BaseTemplate$1 = function(param) {
|
|
|
19808
19808
|
});
|
|
19809
19809
|
};
|
|
19810
19810
|
|
|
19811
|
-
function _array_like_to_array$
|
|
19811
|
+
function _array_like_to_array$l(arr, len) {
|
|
19812
19812
|
if (len == null || len > arr.length) len = arr.length;
|
|
19813
19813
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
19814
19814
|
return arr2;
|
|
19815
19815
|
}
|
|
19816
|
-
function _array_with_holes$
|
|
19816
|
+
function _array_with_holes$i(arr) {
|
|
19817
19817
|
if (Array.isArray(arr)) return arr;
|
|
19818
19818
|
}
|
|
19819
|
-
function _iterable_to_array_limit$
|
|
19819
|
+
function _iterable_to_array_limit$i(arr, i) {
|
|
19820
19820
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
19821
19821
|
if (_i == null) return;
|
|
19822
19822
|
var _arr = [];
|
|
@@ -19840,25 +19840,25 @@ function _iterable_to_array_limit$h(arr, i) {
|
|
|
19840
19840
|
}
|
|
19841
19841
|
return _arr;
|
|
19842
19842
|
}
|
|
19843
|
-
function _non_iterable_rest$
|
|
19843
|
+
function _non_iterable_rest$i() {
|
|
19844
19844
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19845
19845
|
}
|
|
19846
|
-
function _sliced_to_array$
|
|
19847
|
-
return _array_with_holes$
|
|
19846
|
+
function _sliced_to_array$i(arr, i) {
|
|
19847
|
+
return _array_with_holes$i(arr) || _iterable_to_array_limit$i(arr, i) || _unsupported_iterable_to_array$l(arr, i) || _non_iterable_rest$i();
|
|
19848
19848
|
}
|
|
19849
|
-
function _unsupported_iterable_to_array$
|
|
19849
|
+
function _unsupported_iterable_to_array$l(o, minLen) {
|
|
19850
19850
|
if (!o) return;
|
|
19851
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
19851
|
+
if (typeof o === "string") return _array_like_to_array$l(o, minLen);
|
|
19852
19852
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
19853
19853
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
19854
19854
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
19855
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
19855
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$l(o, minLen);
|
|
19856
19856
|
}
|
|
19857
19857
|
var CustomUpload$1 = function(param) {
|
|
19858
19858
|
var className = param.className, children = param.children, file = param.file, setFile = param.setFile, imageUrl = param.imageUrl, setImageUrl = param.setImageUrl;
|
|
19859
19859
|
var imageMimeType = /image\/(png|jpg|jpeg)/i;
|
|
19860
19860
|
var DEFAULT_IMAGE_SIZE_LIMIT_IN_BYTES = 5242880;
|
|
19861
|
-
var _useState = _sliced_to_array$
|
|
19861
|
+
var _useState = _sliced_to_array$i(useState(null), 2), modal = _useState[0], setModal = _useState[1];
|
|
19862
19862
|
var hiddenFileInput = useRef(null);
|
|
19863
19863
|
var handleImageClick = function() {
|
|
19864
19864
|
var _hiddenFileInput_current;
|
|
@@ -19956,16 +19956,16 @@ function cn() {
|
|
|
19956
19956
|
return twMerge(clsx(inputs));
|
|
19957
19957
|
}
|
|
19958
19958
|
|
|
19959
|
-
function _array_like_to_array$
|
|
19959
|
+
function _array_like_to_array$k(arr, len) {
|
|
19960
19960
|
if (len == null || len > arr.length) len = arr.length;
|
|
19961
19961
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
19962
19962
|
return arr2;
|
|
19963
19963
|
}
|
|
19964
|
-
function _array_with_holes$
|
|
19964
|
+
function _array_with_holes$h(arr) {
|
|
19965
19965
|
if (Array.isArray(arr)) return arr;
|
|
19966
19966
|
}
|
|
19967
19967
|
function _array_without_holes$6(arr) {
|
|
19968
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
19968
|
+
if (Array.isArray(arr)) return _array_like_to_array$k(arr);
|
|
19969
19969
|
}
|
|
19970
19970
|
function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
19971
19971
|
try {
|
|
@@ -20019,7 +20019,7 @@ function _instanceof$c(left, right) {
|
|
|
20019
20019
|
function _iterable_to_array$6(iter) {
|
|
20020
20020
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
20021
20021
|
}
|
|
20022
|
-
function _iterable_to_array_limit$
|
|
20022
|
+
function _iterable_to_array_limit$h(arr, i) {
|
|
20023
20023
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
20024
20024
|
if (_i == null) return;
|
|
20025
20025
|
var _arr = [];
|
|
@@ -20043,7 +20043,7 @@ function _iterable_to_array_limit$g(arr, i) {
|
|
|
20043
20043
|
}
|
|
20044
20044
|
return _arr;
|
|
20045
20045
|
}
|
|
20046
|
-
function _non_iterable_rest$
|
|
20046
|
+
function _non_iterable_rest$h() {
|
|
20047
20047
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
20048
20048
|
}
|
|
20049
20049
|
function _non_iterable_spread$6() {
|
|
@@ -20115,19 +20115,19 @@ function _object_without_properties_loose$b(source, excluded) {
|
|
|
20115
20115
|
}
|
|
20116
20116
|
return target;
|
|
20117
20117
|
}
|
|
20118
|
-
function _sliced_to_array$
|
|
20119
|
-
return _array_with_holes$
|
|
20118
|
+
function _sliced_to_array$h(arr, i) {
|
|
20119
|
+
return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$k(arr, i) || _non_iterable_rest$h();
|
|
20120
20120
|
}
|
|
20121
20121
|
function _to_consumable_array$6(arr) {
|
|
20122
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$
|
|
20122
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$k(arr) || _non_iterable_spread$6();
|
|
20123
20123
|
}
|
|
20124
|
-
function _unsupported_iterable_to_array$
|
|
20124
|
+
function _unsupported_iterable_to_array$k(o, minLen) {
|
|
20125
20125
|
if (!o) return;
|
|
20126
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
20126
|
+
if (typeof o === "string") return _array_like_to_array$k(o, minLen);
|
|
20127
20127
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
20128
20128
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
20129
20129
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
20130
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
20130
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$k(o, minLen);
|
|
20131
20131
|
}
|
|
20132
20132
|
function _ts_generator$3(thisArg, body) {
|
|
20133
20133
|
var f, y, t, g, _ = {
|
|
@@ -20466,7 +20466,7 @@ var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? React.useLayou
|
|
|
20466
20466
|
*/ function useFormState(props) {
|
|
20467
20467
|
var methods = useFormContext();
|
|
20468
20468
|
var _ref = props || {}, _ref_control = _ref.control, control = _ref_control === void 0 ? methods.control : _ref_control, disabled = _ref.disabled, name = _ref.name, exact = _ref.exact;
|
|
20469
|
-
var _React__default_useState = _sliced_to_array$
|
|
20469
|
+
var _React__default_useState = _sliced_to_array$h(React__default.useState(control._formState), 2), formState = _React__default_useState[0], updateFormState = _React__default_useState[1];
|
|
20470
20470
|
var _localProxyFormState = React__default.useRef({
|
|
20471
20471
|
isDirty: false,
|
|
20472
20472
|
isLoading: false,
|
|
@@ -20538,7 +20538,7 @@ var generateWatchOutput = function(names, _names, formValues, isGlobal, defaultV
|
|
|
20538
20538
|
var methods = useFormContext();
|
|
20539
20539
|
var _ref = props || {}, _ref_control = _ref.control, control = _ref_control === void 0 ? methods.control : _ref_control, name = _ref.name, defaultValue = _ref.defaultValue, disabled = _ref.disabled, exact = _ref.exact;
|
|
20540
20540
|
var _defaultValue = React__default.useRef(defaultValue);
|
|
20541
|
-
var _React__default_useState = _sliced_to_array$
|
|
20541
|
+
var _React__default_useState = _sliced_to_array$h(React__default.useState(control._getWatch(name, _defaultValue.current)), 2), value1 = _React__default_useState[0], updateValue = _React__default_useState[1];
|
|
20542
20542
|
useIsomorphicLayoutEffect$1(function() {
|
|
20543
20543
|
return control._subscribe({
|
|
20544
20544
|
name: name,
|
|
@@ -22943,7 +22943,7 @@ var updateAt = function(fieldValues, index, value1) {
|
|
|
22943
22943
|
*/ function useFieldArray(props) {
|
|
22944
22944
|
var methods = useFormContext();
|
|
22945
22945
|
var _props_control = props.control, control = _props_control === void 0 ? methods.control : _props_control, name = props.name, _props_keyName = props.keyName, keyName = _props_keyName === void 0 ? "id" : _props_keyName, shouldUnregister = props.shouldUnregister, rules = props.rules;
|
|
22946
|
-
var _React__default_useState = _sliced_to_array$
|
|
22946
|
+
var _React__default_useState = _sliced_to_array$h(React__default.useState(control._getFieldArray(name)), 2), fields = _React__default_useState[0], setFields = _React__default_useState[1];
|
|
22947
22947
|
var ids = React__default.useRef(control._getFieldArray(name).map(generateId));
|
|
22948
22948
|
var _fieldIds = React__default.useRef(fields);
|
|
22949
22949
|
var _name = React__default.useRef(name);
|
|
@@ -23210,7 +23210,7 @@ var updateAt = function(fieldValues, index, value1) {
|
|
|
23210
23210
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23211
23211
|
var _formControl = React__default.useRef(undefined);
|
|
23212
23212
|
var _values = React__default.useRef(undefined);
|
|
23213
|
-
var _React__default_useState = _sliced_to_array$
|
|
23213
|
+
var _React__default_useState = _sliced_to_array$h(React__default.useState({
|
|
23214
23214
|
isDirty: false,
|
|
23215
23215
|
isValidating: false,
|
|
23216
23216
|
isLoading: isFunction$5(props.defaultValues),
|
|
@@ -23958,15 +23958,15 @@ function DateRangePicker(param) {
|
|
|
23958
23958
|
});
|
|
23959
23959
|
}
|
|
23960
23960
|
|
|
23961
|
-
function _array_like_to_array$
|
|
23961
|
+
function _array_like_to_array$j(arr, len) {
|
|
23962
23962
|
if (len == null || len > arr.length) len = arr.length;
|
|
23963
23963
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
23964
23964
|
return arr2;
|
|
23965
23965
|
}
|
|
23966
|
-
function _array_with_holes$
|
|
23966
|
+
function _array_with_holes$g(arr) {
|
|
23967
23967
|
if (Array.isArray(arr)) return arr;
|
|
23968
23968
|
}
|
|
23969
|
-
function _iterable_to_array_limit$
|
|
23969
|
+
function _iterable_to_array_limit$g(arr, i) {
|
|
23970
23970
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
23971
23971
|
if (_i == null) return;
|
|
23972
23972
|
var _arr = [];
|
|
@@ -23990,23 +23990,23 @@ function _iterable_to_array_limit$f(arr, i) {
|
|
|
23990
23990
|
}
|
|
23991
23991
|
return _arr;
|
|
23992
23992
|
}
|
|
23993
|
-
function _non_iterable_rest$
|
|
23993
|
+
function _non_iterable_rest$g() {
|
|
23994
23994
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
23995
23995
|
}
|
|
23996
|
-
function _sliced_to_array$
|
|
23997
|
-
return _array_with_holes$
|
|
23996
|
+
function _sliced_to_array$g(arr, i) {
|
|
23997
|
+
return _array_with_holes$g(arr) || _iterable_to_array_limit$g(arr, i) || _unsupported_iterable_to_array$j(arr, i) || _non_iterable_rest$g();
|
|
23998
23998
|
}
|
|
23999
|
-
function _unsupported_iterable_to_array$
|
|
23999
|
+
function _unsupported_iterable_to_array$j(o, minLen) {
|
|
24000
24000
|
if (!o) return;
|
|
24001
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
24001
|
+
if (typeof o === "string") return _array_like_to_array$j(o, minLen);
|
|
24002
24002
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
24003
24003
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
24004
24004
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24005
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
24005
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$j(o, minLen);
|
|
24006
24006
|
}
|
|
24007
24007
|
var SingleDatePicker = function(param) {
|
|
24008
24008
|
var disable = param.disable, onChange = param.onChange;
|
|
24009
|
-
var _useState = _sliced_to_array$
|
|
24009
|
+
var _useState = _sliced_to_array$g(useState(), 2), date = _useState[0], setDate = _useState[1];
|
|
24010
24010
|
var handleDate = function(newDate) {
|
|
24011
24011
|
if (newDate) {
|
|
24012
24012
|
setDate(newDate);
|
|
@@ -24046,15 +24046,15 @@ var SingleDatePicker = function(param) {
|
|
|
24046
24046
|
});
|
|
24047
24047
|
};
|
|
24048
24048
|
|
|
24049
|
-
function _array_like_to_array$
|
|
24049
|
+
function _array_like_to_array$i(arr, len) {
|
|
24050
24050
|
if (len == null || len > arr.length) len = arr.length;
|
|
24051
24051
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
24052
24052
|
return arr2;
|
|
24053
24053
|
}
|
|
24054
|
-
function _array_with_holes$
|
|
24054
|
+
function _array_with_holes$f(arr) {
|
|
24055
24055
|
if (Array.isArray(arr)) return arr;
|
|
24056
24056
|
}
|
|
24057
|
-
function _iterable_to_array_limit$
|
|
24057
|
+
function _iterable_to_array_limit$f(arr, i) {
|
|
24058
24058
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24059
24059
|
if (_i == null) return;
|
|
24060
24060
|
var _arr = [];
|
|
@@ -24078,30 +24078,30 @@ function _iterable_to_array_limit$e(arr, i) {
|
|
|
24078
24078
|
}
|
|
24079
24079
|
return _arr;
|
|
24080
24080
|
}
|
|
24081
|
-
function _non_iterable_rest$
|
|
24081
|
+
function _non_iterable_rest$f() {
|
|
24082
24082
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24083
24083
|
}
|
|
24084
|
-
function _sliced_to_array$
|
|
24085
|
-
return _array_with_holes$
|
|
24084
|
+
function _sliced_to_array$f(arr, i) {
|
|
24085
|
+
return _array_with_holes$f(arr) || _iterable_to_array_limit$f(arr, i) || _unsupported_iterable_to_array$i(arr, i) || _non_iterable_rest$f();
|
|
24086
24086
|
}
|
|
24087
|
-
function _unsupported_iterable_to_array$
|
|
24087
|
+
function _unsupported_iterable_to_array$i(o, minLen) {
|
|
24088
24088
|
if (!o) return;
|
|
24089
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
24089
|
+
if (typeof o === "string") return _array_like_to_array$i(o, minLen);
|
|
24090
24090
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
24091
24091
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
24092
24092
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24093
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
24093
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$i(o, minLen);
|
|
24094
24094
|
}
|
|
24095
24095
|
var ReactDateRange = function(param) {
|
|
24096
24096
|
var className = param.className, item = param.item, onChange = param.onChange, dates = param.dates, date = param.date;
|
|
24097
|
-
var _useState = _sliced_to_array$
|
|
24098
|
-
var _useState1 = _sliced_to_array$
|
|
24099
|
-
var _useState2 = _sliced_to_array$
|
|
24097
|
+
var _useState = _sliced_to_array$f(useState("zhTW"), 1), locale = _useState[0];
|
|
24098
|
+
var _useState1 = _sliced_to_array$f(useState(""), 2), calendarData = _useState1[0], setCalendarData = _useState1[1];
|
|
24099
|
+
var _useState2 = _sliced_to_array$f(useState({
|
|
24100
24100
|
startDate: new Date(),
|
|
24101
24101
|
endDate: addDays(new Date(), 7),
|
|
24102
24102
|
key: "selection"
|
|
24103
24103
|
}), 2), range = _useState2[0], setRange = _useState2[1];
|
|
24104
|
-
var _useState3 = _sliced_to_array$
|
|
24104
|
+
var _useState3 = _sliced_to_array$f(useState(false), 2), open = _useState3[0], setOpen = _useState3[1];
|
|
24105
24105
|
var refOne = useRef(null);
|
|
24106
24106
|
var hideOnEscape = function(e) {
|
|
24107
24107
|
if (e.key === "Escape") {
|
|
@@ -24550,16 +24550,16 @@ function getFrameElement(win) {
|
|
|
24550
24550
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
24551
24551
|
}
|
|
24552
24552
|
|
|
24553
|
-
function _array_like_to_array$
|
|
24553
|
+
function _array_like_to_array$h(arr, len) {
|
|
24554
24554
|
if (len == null || len > arr.length) len = arr.length;
|
|
24555
24555
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
24556
24556
|
return arr2;
|
|
24557
24557
|
}
|
|
24558
|
-
function _array_with_holes$
|
|
24558
|
+
function _array_with_holes$e(arr) {
|
|
24559
24559
|
if (Array.isArray(arr)) return arr;
|
|
24560
24560
|
}
|
|
24561
24561
|
function _array_without_holes$5(arr) {
|
|
24562
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
24562
|
+
if (Array.isArray(arr)) return _array_like_to_array$h(arr);
|
|
24563
24563
|
}
|
|
24564
24564
|
function _define_property$g(obj, key, value) {
|
|
24565
24565
|
if (key in obj) {
|
|
@@ -24577,7 +24577,7 @@ function _define_property$g(obj, key, value) {
|
|
|
24577
24577
|
function _iterable_to_array$5(iter) {
|
|
24578
24578
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
24579
24579
|
}
|
|
24580
|
-
function _iterable_to_array_limit$
|
|
24580
|
+
function _iterable_to_array_limit$e(arr, i) {
|
|
24581
24581
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24582
24582
|
if (_i == null) return;
|
|
24583
24583
|
var _arr = [];
|
|
@@ -24601,7 +24601,7 @@ function _iterable_to_array_limit$d(arr, i) {
|
|
|
24601
24601
|
}
|
|
24602
24602
|
return _arr;
|
|
24603
24603
|
}
|
|
24604
|
-
function _non_iterable_rest$
|
|
24604
|
+
function _non_iterable_rest$e() {
|
|
24605
24605
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24606
24606
|
}
|
|
24607
24607
|
function _non_iterable_spread$5() {
|
|
@@ -24646,19 +24646,19 @@ function _object_spread_props$b(target, source) {
|
|
|
24646
24646
|
}
|
|
24647
24647
|
return target;
|
|
24648
24648
|
}
|
|
24649
|
-
function _sliced_to_array$
|
|
24650
|
-
return _array_with_holes$
|
|
24649
|
+
function _sliced_to_array$e(arr, i) {
|
|
24650
|
+
return _array_with_holes$e(arr) || _iterable_to_array_limit$e(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$e();
|
|
24651
24651
|
}
|
|
24652
24652
|
function _to_consumable_array$5(arr) {
|
|
24653
|
-
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$
|
|
24653
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$h(arr) || _non_iterable_spread$5();
|
|
24654
24654
|
}
|
|
24655
|
-
function _unsupported_iterable_to_array$
|
|
24655
|
+
function _unsupported_iterable_to_array$h(o, minLen) {
|
|
24656
24656
|
if (!o) return;
|
|
24657
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
24657
|
+
if (typeof o === "string") return _array_like_to_array$h(o, minLen);
|
|
24658
24658
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
24659
24659
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
24660
24660
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24661
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
24661
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
|
|
24662
24662
|
}
|
|
24663
24663
|
function getCssDimensions(element) {
|
|
24664
24664
|
var css = getComputedStyle$3(element);
|
|
@@ -24884,7 +24884,7 @@ function observeMove(element, onMove) {
|
|
|
24884
24884
|
var resizeObserver = null;
|
|
24885
24885
|
if (elementResize) {
|
|
24886
24886
|
resizeObserver = new ResizeObserver(function(_ref) {
|
|
24887
|
-
var _$_ref = _sliced_to_array$
|
|
24887
|
+
var _$_ref = _sliced_to_array$e(_ref, 1), firstEntry = _$_ref[0];
|
|
24888
24888
|
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
24889
24889
|
// Prevent update loops when using the `size` middleware.
|
|
24890
24890
|
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
@@ -47229,12 +47229,12 @@ var verifyTaxId = function(idStr) {
|
|
|
47229
47229
|
return isLegal;
|
|
47230
47230
|
};
|
|
47231
47231
|
|
|
47232
|
-
/* eslint-disable react/jsx-props-no-spreading */ function _array_like_to_array$
|
|
47232
|
+
/* eslint-disable react/jsx-props-no-spreading */ function _array_like_to_array$g(arr, len) {
|
|
47233
47233
|
if (len == null || len > arr.length) len = arr.length;
|
|
47234
47234
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
47235
47235
|
return arr2;
|
|
47236
47236
|
}
|
|
47237
|
-
function _array_with_holes$
|
|
47237
|
+
function _array_with_holes$d(arr) {
|
|
47238
47238
|
if (Array.isArray(arr)) return arr;
|
|
47239
47239
|
}
|
|
47240
47240
|
function _define_property$f(obj, key, value) {
|
|
@@ -47250,7 +47250,7 @@ function _define_property$f(obj, key, value) {
|
|
|
47250
47250
|
}
|
|
47251
47251
|
return obj;
|
|
47252
47252
|
}
|
|
47253
|
-
function _iterable_to_array_limit$
|
|
47253
|
+
function _iterable_to_array_limit$d(arr, i) {
|
|
47254
47254
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
47255
47255
|
if (_i == null) return;
|
|
47256
47256
|
var _arr = [];
|
|
@@ -47274,7 +47274,7 @@ function _iterable_to_array_limit$c(arr, i) {
|
|
|
47274
47274
|
}
|
|
47275
47275
|
return _arr;
|
|
47276
47276
|
}
|
|
47277
|
-
function _non_iterable_rest$
|
|
47277
|
+
function _non_iterable_rest$d() {
|
|
47278
47278
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47279
47279
|
}
|
|
47280
47280
|
function _object_spread$e(target) {
|
|
@@ -47316,16 +47316,16 @@ function _object_spread_props$a(target, source) {
|
|
|
47316
47316
|
}
|
|
47317
47317
|
return target;
|
|
47318
47318
|
}
|
|
47319
|
-
function _sliced_to_array$
|
|
47320
|
-
return _array_with_holes$
|
|
47319
|
+
function _sliced_to_array$d(arr, i) {
|
|
47320
|
+
return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$d();
|
|
47321
47321
|
}
|
|
47322
|
-
function _unsupported_iterable_to_array$
|
|
47322
|
+
function _unsupported_iterable_to_array$g(o, minLen) {
|
|
47323
47323
|
if (!o) return;
|
|
47324
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
47324
|
+
if (typeof o === "string") return _array_like_to_array$g(o, minLen);
|
|
47325
47325
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
47326
47326
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
47327
47327
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
47328
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
47328
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
|
|
47329
47329
|
}
|
|
47330
47330
|
// interface CityDistrictProps {
|
|
47331
47331
|
// item?: {
|
|
@@ -47354,9 +47354,9 @@ var CityDistrict = function(param) {
|
|
|
47354
47354
|
var item = param.item;
|
|
47355
47355
|
var _errors_city, _errors_district;
|
|
47356
47356
|
var _useFormContext = useFormContext(), register = _useFormContext.register, setValue = _useFormContext.setValue, getValues = _useFormContext.getValues, errors = _useFormContext.formState.errors;
|
|
47357
|
-
var _useState = _sliced_to_array$
|
|
47358
|
-
var _useState1 = _sliced_to_array$
|
|
47359
|
-
var _useState2 = _sliced_to_array$
|
|
47357
|
+
var _useState = _sliced_to_array$d(useState(null), 2), currentCity = _useState[0], setCurrentCity = _useState[1];
|
|
47358
|
+
var _useState1 = _sliced_to_array$d(useState(DistrictData), 1), city = _useState1[0];
|
|
47359
|
+
var _useState2 = _sliced_to_array$d(useState([]), 2), district = _useState2[0], setDistrict = _useState2[1];
|
|
47360
47360
|
var cityValue = getValues().city;
|
|
47361
47361
|
var districtValue = getValues().district;
|
|
47362
47362
|
useEffect(function() {
|
|
@@ -47492,15 +47492,15 @@ var CityDistrict = function(param) {
|
|
|
47492
47492
|
}, v4());
|
|
47493
47493
|
};
|
|
47494
47494
|
|
|
47495
|
-
function _array_like_to_array$
|
|
47495
|
+
function _array_like_to_array$f(arr, len) {
|
|
47496
47496
|
if (len == null || len > arr.length) len = arr.length;
|
|
47497
47497
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
47498
47498
|
return arr2;
|
|
47499
47499
|
}
|
|
47500
|
-
function _array_with_holes$
|
|
47500
|
+
function _array_with_holes$c(arr) {
|
|
47501
47501
|
if (Array.isArray(arr)) return arr;
|
|
47502
47502
|
}
|
|
47503
|
-
function _iterable_to_array_limit$
|
|
47503
|
+
function _iterable_to_array_limit$c(arr, i) {
|
|
47504
47504
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
47505
47505
|
if (_i == null) return;
|
|
47506
47506
|
var _arr = [];
|
|
@@ -47524,23 +47524,23 @@ function _iterable_to_array_limit$b(arr, i) {
|
|
|
47524
47524
|
}
|
|
47525
47525
|
return _arr;
|
|
47526
47526
|
}
|
|
47527
|
-
function _non_iterable_rest$
|
|
47527
|
+
function _non_iterable_rest$c() {
|
|
47528
47528
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47529
47529
|
}
|
|
47530
|
-
function _sliced_to_array$
|
|
47531
|
-
return _array_with_holes$
|
|
47530
|
+
function _sliced_to_array$c(arr, i) {
|
|
47531
|
+
return _array_with_holes$c(arr) || _iterable_to_array_limit$c(arr, i) || _unsupported_iterable_to_array$f(arr, i) || _non_iterable_rest$c();
|
|
47532
47532
|
}
|
|
47533
|
-
function _unsupported_iterable_to_array$
|
|
47533
|
+
function _unsupported_iterable_to_array$f(o, minLen) {
|
|
47534
47534
|
if (!o) return;
|
|
47535
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
47535
|
+
if (typeof o === "string") return _array_like_to_array$f(o, minLen);
|
|
47536
47536
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
47537
47537
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
47538
47538
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
47539
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
47539
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
|
|
47540
47540
|
}
|
|
47541
47541
|
var BaseTemplate = function(param) {
|
|
47542
47542
|
var item = param.item, file = param.file, imageUrl = param.imageUrl, field = param.field;
|
|
47543
|
-
var _useState = _sliced_to_array$
|
|
47543
|
+
var _useState = _sliced_to_array$c(useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
|
|
47544
47544
|
useEffect(function() {
|
|
47545
47545
|
var fileReader;
|
|
47546
47546
|
var isCancel = false;
|
|
@@ -47674,12 +47674,12 @@ var BaseTemplate = function(param) {
|
|
|
47674
47674
|
});
|
|
47675
47675
|
};
|
|
47676
47676
|
|
|
47677
|
-
function _array_like_to_array$
|
|
47677
|
+
function _array_like_to_array$e(arr, len) {
|
|
47678
47678
|
if (len == null || len > arr.length) len = arr.length;
|
|
47679
47679
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
47680
47680
|
return arr2;
|
|
47681
47681
|
}
|
|
47682
|
-
function _array_with_holes$
|
|
47682
|
+
function _array_with_holes$b(arr) {
|
|
47683
47683
|
if (Array.isArray(arr)) return arr;
|
|
47684
47684
|
}
|
|
47685
47685
|
function _instanceof$7(left, right) {
|
|
@@ -47689,7 +47689,7 @@ function _instanceof$7(left, right) {
|
|
|
47689
47689
|
return left instanceof right;
|
|
47690
47690
|
}
|
|
47691
47691
|
}
|
|
47692
|
-
function _iterable_to_array_limit$
|
|
47692
|
+
function _iterable_to_array_limit$b(arr, i) {
|
|
47693
47693
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
47694
47694
|
if (_i == null) return;
|
|
47695
47695
|
var _arr = [];
|
|
@@ -47713,25 +47713,25 @@ function _iterable_to_array_limit$a(arr, i) {
|
|
|
47713
47713
|
}
|
|
47714
47714
|
return _arr;
|
|
47715
47715
|
}
|
|
47716
|
-
function _non_iterable_rest$
|
|
47716
|
+
function _non_iterable_rest$b() {
|
|
47717
47717
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47718
47718
|
}
|
|
47719
|
-
function _sliced_to_array$
|
|
47720
|
-
return _array_with_holes$
|
|
47719
|
+
function _sliced_to_array$b(arr, i) {
|
|
47720
|
+
return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$b();
|
|
47721
47721
|
}
|
|
47722
|
-
function _unsupported_iterable_to_array$
|
|
47722
|
+
function _unsupported_iterable_to_array$e(o, minLen) {
|
|
47723
47723
|
if (!o) return;
|
|
47724
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
47724
|
+
if (typeof o === "string") return _array_like_to_array$e(o, minLen);
|
|
47725
47725
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
47726
47726
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
47727
47727
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
47728
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
47728
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
|
|
47729
47729
|
}
|
|
47730
47730
|
var CustomUpload = function(param) {
|
|
47731
47731
|
var item = param.item, field = param.field;
|
|
47732
47732
|
var imageMimeType = /image\/(png|jpg|jpeg)/i;
|
|
47733
47733
|
var DEFAULT_IMAGE_SIZE_LIMIT_IN_BYTES = (item === null || item === void 0 ? void 0 : item.limitSize) || 5242880;
|
|
47734
|
-
var _useState = _sliced_to_array$
|
|
47734
|
+
var _useState = _sliced_to_array$b(useState(null), 2), modal = _useState[0], setModal = _useState[1];
|
|
47735
47735
|
var hiddenFileInput = useRef(null);
|
|
47736
47736
|
useEffect(function() {
|
|
47737
47737
|
if (modal) {
|
|
@@ -48111,6 +48111,197 @@ var BaseSelect = function(param) {
|
|
|
48111
48111
|
});
|
|
48112
48112
|
};
|
|
48113
48113
|
|
|
48114
|
+
function _array_like_to_array$d(arr, len) {
|
|
48115
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
48116
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
48117
|
+
return arr2;
|
|
48118
|
+
}
|
|
48119
|
+
function _array_with_holes$a(arr) {
|
|
48120
|
+
if (Array.isArray(arr)) return arr;
|
|
48121
|
+
}
|
|
48122
|
+
function _iterable_to_array_limit$a(arr, i) {
|
|
48123
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
48124
|
+
if (_i == null) return;
|
|
48125
|
+
var _arr = [];
|
|
48126
|
+
var _n = true;
|
|
48127
|
+
var _d = false;
|
|
48128
|
+
var _s, _e;
|
|
48129
|
+
try {
|
|
48130
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
48131
|
+
_arr.push(_s.value);
|
|
48132
|
+
if (i && _arr.length === i) break;
|
|
48133
|
+
}
|
|
48134
|
+
} catch (err) {
|
|
48135
|
+
_d = true;
|
|
48136
|
+
_e = err;
|
|
48137
|
+
} finally{
|
|
48138
|
+
try {
|
|
48139
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
48140
|
+
} finally{
|
|
48141
|
+
if (_d) throw _e;
|
|
48142
|
+
}
|
|
48143
|
+
}
|
|
48144
|
+
return _arr;
|
|
48145
|
+
}
|
|
48146
|
+
function _non_iterable_rest$a() {
|
|
48147
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48148
|
+
}
|
|
48149
|
+
function _sliced_to_array$a(arr, i) {
|
|
48150
|
+
return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$d(arr, i) || _non_iterable_rest$a();
|
|
48151
|
+
}
|
|
48152
|
+
function _unsupported_iterable_to_array$d(o, minLen) {
|
|
48153
|
+
if (!o) return;
|
|
48154
|
+
if (typeof o === "string") return _array_like_to_array$d(o, minLen);
|
|
48155
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
48156
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
48157
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
48158
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
|
|
48159
|
+
}
|
|
48160
|
+
var DropdownList = function(param) {
|
|
48161
|
+
var item = param.item;
|
|
48162
|
+
var _item_option, _item_validateOption, _errors_funeralLocation;
|
|
48163
|
+
var _useFormContext = useFormContext(), control = _useFormContext.control, errors = _useFormContext.formState.errors;
|
|
48164
|
+
var dropdownRef = useRef(null);
|
|
48165
|
+
var _useState = _sliced_to_array$a(useState(""), 2), query = _useState[0], setQuery = _useState[1];
|
|
48166
|
+
var _useState1 = _sliced_to_array$a(useState(false), 2), open = _useState1[0], setOpen = _useState1[1];
|
|
48167
|
+
var filtered = (item === null || item === void 0 ? void 0 : (_item_option = item.option) === null || _item_option === void 0 ? void 0 : _item_option.filter(function(opt) {
|
|
48168
|
+
var _opt_name;
|
|
48169
|
+
return opt === null || opt === void 0 ? void 0 : (_opt_name = opt.name) === null || _opt_name === void 0 ? void 0 : _opt_name.toLowerCase().includes(query.toLowerCase());
|
|
48170
|
+
})) || [];
|
|
48171
|
+
useEffect(function() {
|
|
48172
|
+
var handleClickOutside = function(event) {
|
|
48173
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
48174
|
+
setOpen(false);
|
|
48175
|
+
}
|
|
48176
|
+
};
|
|
48177
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
48178
|
+
return function() {
|
|
48179
|
+
return document.removeEventListener("mousedown", handleClickOutside);
|
|
48180
|
+
};
|
|
48181
|
+
}, []);
|
|
48182
|
+
var _ref = (item === null || item === void 0 ? void 0 : item.dropStyle) || {}, _ref_bgClass = _ref.bgClass, bgClass = _ref_bgClass === void 0 ? "bg-[#E5E5EA]" : _ref_bgClass, _ref_hoverClass = _ref.hoverClass, hoverClass = _ref_hoverClass === void 0 ? "hover:bg-[#d9d9e2]" : _ref_hoverClass, _ref_selectedClass = _ref.selectedClass, selectedClass = _ref_selectedClass === void 0 ? "bg-[#C7C7CC]" : _ref_selectedClass;
|
|
48183
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
48184
|
+
className: (item === null || item === void 0 ? void 0 : item.className) || "w-full h-24",
|
|
48185
|
+
children: [
|
|
48186
|
+
/*#__PURE__*/ jsxs("div", {
|
|
48187
|
+
className: [
|
|
48188
|
+
(item === null || item === void 0 ? void 0 : item.label) ? "visible font-medium mb-2 h-[22px]" : "invisible"
|
|
48189
|
+
].join(" "),
|
|
48190
|
+
children: [
|
|
48191
|
+
/*#__PURE__*/ jsx("span", {
|
|
48192
|
+
children: item === null || item === void 0 ? void 0 : item.label
|
|
48193
|
+
}),
|
|
48194
|
+
(item === null || item === void 0 ? void 0 : item.label) && (item === null || item === void 0 ? void 0 : (_item_validateOption = item.validateOption) === null || _item_validateOption === void 0 ? void 0 : _item_validateOption.required) && /*#__PURE__*/ jsx("span", {
|
|
48195
|
+
className: "pl-1 text-[#EF5533] font-bold",
|
|
48196
|
+
children: "*"
|
|
48197
|
+
})
|
|
48198
|
+
]
|
|
48199
|
+
}),
|
|
48200
|
+
/*#__PURE__*/ jsxs("div", {
|
|
48201
|
+
className: "relative",
|
|
48202
|
+
ref: dropdownRef,
|
|
48203
|
+
children: [
|
|
48204
|
+
/*#__PURE__*/ jsx("div", {
|
|
48205
|
+
className: "absolute w-12 h-11 top-0 right-0 z-10 flex items-center justify-center rounded-r-lg pointer-events-none",
|
|
48206
|
+
children: !(item === null || item === void 0 ? void 0 : item.hiddenArrow) && /*#__PURE__*/ jsx(Icon, {
|
|
48207
|
+
icon: "lets-icons:arrow-drop-down-big",
|
|
48208
|
+
className: "h-6 w-6",
|
|
48209
|
+
color: "#6f6f6f"
|
|
48210
|
+
})
|
|
48211
|
+
}),
|
|
48212
|
+
/*#__PURE__*/ jsx(Controller$2, {
|
|
48213
|
+
name: item.name,
|
|
48214
|
+
control: control,
|
|
48215
|
+
rules: item.validateOption,
|
|
48216
|
+
render: function(param) {
|
|
48217
|
+
var field = param.field;
|
|
48218
|
+
var _item_option_find, _item_option;
|
|
48219
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
48220
|
+
className: [
|
|
48221
|
+
(item === null || item === void 0 ? void 0 : item.disable) || (item === null || item === void 0 ? void 0 : item.disabled) ? "text-[#B0B0B0] bg-[#E5E5EA] cursor-not-allowed" : "bg-white text-[#6f6f6f]",
|
|
48222
|
+
"customSelect w-full h-11 py-2 pr-4 pl-4 rounded-2xl border border-solid border-[#C7C7CC]"
|
|
48223
|
+
].join(" "),
|
|
48224
|
+
children: [
|
|
48225
|
+
/*#__PURE__*/ jsx("div", {
|
|
48226
|
+
className: "w-full h-full flex items-center justify-between cursor-pointer",
|
|
48227
|
+
onClick: function() {
|
|
48228
|
+
return !item.disabled && setOpen(!open);
|
|
48229
|
+
},
|
|
48230
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
48231
|
+
className: "truncate",
|
|
48232
|
+
children: ((_item_option = item.option) === null || _item_option === void 0 ? void 0 : (_item_option_find = _item_option.find(function(o) {
|
|
48233
|
+
return o.value === field.value;
|
|
48234
|
+
})) === null || _item_option_find === void 0 ? void 0 : _item_option_find.name) || "請輸入名稱"
|
|
48235
|
+
})
|
|
48236
|
+
}),
|
|
48237
|
+
open && /*#__PURE__*/ jsxs("div", {
|
|
48238
|
+
className: [
|
|
48239
|
+
"absolute left-0 z-20 mt-2 w-full rounded-xl shadow-btn-2xl overflow-hidden p-4 border border-[#C7C7CC]",
|
|
48240
|
+
bgClass
|
|
48241
|
+
].join(" "),
|
|
48242
|
+
children: [
|
|
48243
|
+
/*#__PURE__*/ jsx("div", {
|
|
48244
|
+
className: "px-3 py-3 border-[1.5px] border-[#B4B4B4] bg-white rounded-lg",
|
|
48245
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
48246
|
+
className: "flex items-center gap-2 px-3 rounded-lg",
|
|
48247
|
+
children: [
|
|
48248
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
48249
|
+
icon: "ic:round-search",
|
|
48250
|
+
className: "text-gray-500",
|
|
48251
|
+
width: 24,
|
|
48252
|
+
height: 24
|
|
48253
|
+
}),
|
|
48254
|
+
/*#__PURE__*/ jsx("input", {
|
|
48255
|
+
className: "w-full bg-transparent focus:outline-none text-sm placeholder:text-[#00000033]",
|
|
48256
|
+
placeholder: item === null || item === void 0 ? void 0 : item.placeholder,
|
|
48257
|
+
value: query,
|
|
48258
|
+
onChange: function(e) {
|
|
48259
|
+
return setQuery(e.target.value);
|
|
48260
|
+
}
|
|
48261
|
+
})
|
|
48262
|
+
]
|
|
48263
|
+
})
|
|
48264
|
+
}),
|
|
48265
|
+
/*#__PURE__*/ jsx("div", {
|
|
48266
|
+
className: "max-h-60 overflow-y-auto text-[#1A1A1A]",
|
|
48267
|
+
children: filtered.length > 0 ? filtered.map(function(opt, inx) {
|
|
48268
|
+
return /*#__PURE__*/ jsx("div", {
|
|
48269
|
+
onClick: function() {
|
|
48270
|
+
field.onChange(opt.value);
|
|
48271
|
+
setOpen(false);
|
|
48272
|
+
setQuery("");
|
|
48273
|
+
},
|
|
48274
|
+
className: [
|
|
48275
|
+
"px-4 py-3 text-sm cursor-pointer rounded-lg",
|
|
48276
|
+
field.value === opt.value ? selectedClass : "",
|
|
48277
|
+
hoverClass
|
|
48278
|
+
].join(" "),
|
|
48279
|
+
children: opt.name
|
|
48280
|
+
}, "dropdownList".concat(inx));
|
|
48281
|
+
}) : /*#__PURE__*/ jsx("div", {
|
|
48282
|
+
className: "px-4 py-3 text-sm text-gray-400",
|
|
48283
|
+
children: item === null || item === void 0 ? void 0 : item.noDataText
|
|
48284
|
+
})
|
|
48285
|
+
})
|
|
48286
|
+
]
|
|
48287
|
+
})
|
|
48288
|
+
]
|
|
48289
|
+
});
|
|
48290
|
+
}
|
|
48291
|
+
}),
|
|
48292
|
+
/*#__PURE__*/ jsx("div", {
|
|
48293
|
+
className: "inviable h-5 pt-1",
|
|
48294
|
+
children: errors.funeralLocation && /*#__PURE__*/ jsx("p", {
|
|
48295
|
+
className: "text-left text-xs text-[#EF5533]",
|
|
48296
|
+
children: (_errors_funeralLocation = errors.funeralLocation) === null || _errors_funeralLocation === void 0 ? void 0 : _errors_funeralLocation.message
|
|
48297
|
+
})
|
|
48298
|
+
})
|
|
48299
|
+
]
|
|
48300
|
+
})
|
|
48301
|
+
]
|
|
48302
|
+
}, item.name);
|
|
48303
|
+
};
|
|
48304
|
+
|
|
48114
48305
|
/* eslint-disable react/no-array-index-key */ /* eslint-disable react/prop-types */ function _array_like_to_array$c(arr, len) {
|
|
48115
48306
|
if (len == null || len > arr.length) len = arr.length;
|
|
48116
48307
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -48843,6 +49034,10 @@ var Row = function(param) {
|
|
|
48843
49034
|
return /*#__PURE__*/ createElement(BaseSelect, _object_spread_props$8(_object_spread$c({}, baseConfig), {
|
|
48844
49035
|
key: "rowField-".concat(index)
|
|
48845
49036
|
}));
|
|
49037
|
+
case "baseDropDown":
|
|
49038
|
+
return /*#__PURE__*/ createElement(DropdownList, _object_spread_props$8(_object_spread$c({}, baseConfig), {
|
|
49039
|
+
key: "rowField-".concat(index)
|
|
49040
|
+
}));
|
|
48846
49041
|
case "multipleSelect":
|
|
48847
49042
|
return /*#__PURE__*/ createElement(MultipleSelect, _object_spread_props$8(_object_spread$c({}, baseConfig), {
|
|
48848
49043
|
key: "rowField-".concat(index)
|
|
@@ -48905,7 +49100,8 @@ var Form = {
|
|
|
48905
49100
|
City: City,
|
|
48906
49101
|
CityDistrict: CityDistrict,
|
|
48907
49102
|
CheckboxField: CheckboxField,
|
|
48908
|
-
BaseCkeditor: BaseCkeditor
|
|
49103
|
+
BaseCkeditor: BaseCkeditor,
|
|
49104
|
+
Dropdown: DropdownList
|
|
48909
49105
|
};
|
|
48910
49106
|
|
|
48911
49107
|
function _define_property$c(obj, key, value) {
|
|
@@ -78396,7 +78592,6 @@ var LiffProvider = function(param) {
|
|
|
78396
78592
|
var _useState4 = _sliced_to_array(useState(null), 2), userInfo = _useState4[0], setUserInfo = _useState4[1];
|
|
78397
78593
|
var _useState5 = _sliced_to_array(useState(null), 2), isFriendship = _useState5[0], setFriendship = _useState5[1];
|
|
78398
78594
|
var _useState6 = _sliced_to_array(useState(null), 2), loginType = _useState6[0], setLoginType = _useState6[1];
|
|
78399
|
-
var _useState7 = _sliced_to_array(useState(null), 2), queryToken = _useState7[0], setQueryToken = _useState7[1];
|
|
78400
78595
|
var fetchMemberInfo = function() {
|
|
78401
78596
|
var _ref = _async_to_generator(function(token) {
|
|
78402
78597
|
var response, err;
|
|
@@ -78857,12 +79052,16 @@ var LiffProvider = function(param) {
|
|
|
78857
79052
|
}), [
|
|
78858
79053
|
liffObject
|
|
78859
79054
|
]);
|
|
79055
|
+
var normalizeToken = function(token) {
|
|
79056
|
+
var trimmed = token.trim();
|
|
79057
|
+
return trimmed.toLowerCase().startsWith("bearer ") ? trimmed : "Bearer ".concat(trimmed);
|
|
79058
|
+
};
|
|
78860
79059
|
var searchParams = typeof window !== "undefined" ? new URLSearchParams(window.location.search) : null;
|
|
78861
79060
|
// 客戶端初始化 LIFF
|
|
78862
79061
|
useEffect(function() {
|
|
78863
79062
|
var checkAndInitialize = function() {
|
|
78864
79063
|
var _ref = _async_to_generator(function() {
|
|
78865
|
-
var tokenFromQuery, isValid, loginStore, jwtToken, _parsedStore_data, _parsedStore_state, parsedStore, isValid1, _tmp;
|
|
79064
|
+
var tokenFromQuery, finalToken, isValid, loginStore, jwtToken, _parsedStore_data, _parsedStore_state, parsedStore, isValid1, _tmp;
|
|
78866
79065
|
return _ts_generator(this, function(_state) {
|
|
78867
79066
|
switch(_state.label){
|
|
78868
79067
|
case 0:
|
|
@@ -78871,13 +79070,16 @@ var LiffProvider = function(param) {
|
|
|
78871
79070
|
3,
|
|
78872
79071
|
2
|
|
78873
79072
|
];
|
|
78874
|
-
|
|
79073
|
+
finalToken = normalizeToken(tokenFromQuery);
|
|
79074
|
+
console.log("finalToken:", finalToken);
|
|
79075
|
+
setAccessToken(finalToken);
|
|
78875
79076
|
return [
|
|
78876
79077
|
4,
|
|
78877
|
-
checkTokenFunc(
|
|
79078
|
+
checkTokenFunc(finalToken)
|
|
78878
79079
|
];
|
|
78879
79080
|
case 1:
|
|
78880
79081
|
isValid = _state.sent();
|
|
79082
|
+
console.log("tokenFromQuery isValid:", isValid);
|
|
78881
79083
|
if (isValid) return [
|
|
78882
79084
|
2
|
|
78883
79085
|
];
|
|
@@ -78944,8 +79146,7 @@ var LiffProvider = function(param) {
|
|
|
78944
79146
|
isFriendship: isFriendship,
|
|
78945
79147
|
ensureLiffTokenValid: ensureLiffTokenValid,
|
|
78946
79148
|
accountLogin: accountLogin,
|
|
78947
|
-
loginType: loginType
|
|
78948
|
-
queryToken: queryToken
|
|
79149
|
+
loginType: loginType
|
|
78949
79150
|
};
|
|
78950
79151
|
}, [
|
|
78951
79152
|
liffObject,
|
|
@@ -78956,8 +79157,7 @@ var LiffProvider = function(param) {
|
|
|
78956
79157
|
isFriendship,
|
|
78957
79158
|
ensureLiffTokenValid,
|
|
78958
79159
|
accountLogin,
|
|
78959
|
-
loginType
|
|
78960
|
-
queryToken
|
|
79160
|
+
loginType
|
|
78961
79161
|
]);
|
|
78962
79162
|
return /*#__PURE__*/ jsx(LiffContext.Provider, {
|
|
78963
79163
|
value: contextValue,
|