@sunggang/ui-lib 0.2.5 → 0.2.7
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.js +1 -1
- package/index.esm2.js +75 -92
- package/package.json +1 -1
- package/src/components/ui/inputOtp.d.ts +2 -4
- package/src/index.d.ts +1 -1
- package/src/utils/hooks/useBaseLIff.d.ts +10 -0
- package/src/lib/Function/Hook/useBaseLiff.d.ts +0 -14
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BaseTable, r as BigCalender, C as CkEditor, j as CustomUpload, m as DataTable, l as DateRangePicker, s as DnDCalendar, i as DropDown, D as DropImage, R as ReactDateRange, n as Regex, S as Spin, k as Switch, U as UiLibrary, p as decryptByEcPay, q as encryptByEcPay, u as
|
|
1
|
+
export { B as BaseTable, r as BigCalender, C as CkEditor, j as CustomUpload, m as DataTable, l as DateRangePicker, s as DnDCalendar, i as DropDown, D as DropImage, R as ReactDateRange, n as Regex, S as Spin, k as Switch, U as UiLibrary, p as decryptByEcPay, q as encryptByEcPay, u as useLiff, o as verifyId, v as verifyTaxId } from './index.esm2.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@iconify/react';
|
package/index.esm2.js
CHANGED
|
@@ -415,7 +415,7 @@ var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
|
415
415
|
* This source code is licensed under the MIT license found in the
|
|
416
416
|
* LICENSE file in the root directory of this source tree.
|
|
417
417
|
*/
|
|
418
|
-
function _instanceof$
|
|
418
|
+
function _instanceof$f(left, right) {
|
|
419
419
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
420
420
|
return !!right[Symbol.hasInstance](left);
|
|
421
421
|
} else {
|
|
@@ -474,10 +474,10 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
474
474
|
} catch (ex) {
|
|
475
475
|
error = ex;
|
|
476
476
|
}
|
|
477
|
-
if (error && !_instanceof$
|
|
477
|
+
if (error && !_instanceof$f(error, Error)) {
|
|
478
478
|
printWarning$2((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker " + "function must return `null` or an `Error` but returned a " + (typeof error === "undefined" ? "undefined" : _type_of$h(error)) + ". " + "You may have forgotten to pass an argument to the type checker " + "creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and " + "shape all require an argument).");
|
|
479
479
|
}
|
|
480
|
-
if (_instanceof$
|
|
480
|
+
if (_instanceof$f(error, Error) && !(error.message in loggedTypeFailures)) {
|
|
481
481
|
// Only monitor this failure once because there tends to be a lot of the
|
|
482
482
|
// same error.
|
|
483
483
|
loggedTypeFailures[error.message] = true;
|
|
@@ -505,7 +505,7 @@ var checkPropTypes_1 = checkPropTypes$1;
|
|
|
505
505
|
* This source code is licensed under the MIT license found in the
|
|
506
506
|
* LICENSE file in the root directory of this source tree.
|
|
507
507
|
*/
|
|
508
|
-
function _instanceof$
|
|
508
|
+
function _instanceof$e(left, right) {
|
|
509
509
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
510
510
|
return !!right[Symbol.hasInstance](left);
|
|
511
511
|
} else {
|
|
@@ -730,7 +730,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
730
730
|
}
|
|
731
731
|
for(var i = 0; i < propValue.length; i++){
|
|
732
732
|
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret$1);
|
|
733
|
-
if (_instanceof$
|
|
733
|
+
if (_instanceof$e(error, Error)) {
|
|
734
734
|
return error;
|
|
735
735
|
}
|
|
736
736
|
}
|
|
@@ -762,7 +762,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
762
762
|
}
|
|
763
763
|
function createInstanceTypeChecker(expectedClass) {
|
|
764
764
|
function validate(props, propName, componentName, location, propFullName) {
|
|
765
|
-
if (!_instanceof$
|
|
765
|
+
if (!_instanceof$e(props[propName], expectedClass)) {
|
|
766
766
|
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
767
767
|
var actualClassName = getClassName(props[propName]);
|
|
768
768
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
@@ -813,7 +813,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
813
813
|
for(var key in propValue){
|
|
814
814
|
if (has(propValue, key)) {
|
|
815
815
|
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret$1);
|
|
816
|
-
if (_instanceof$
|
|
816
|
+
if (_instanceof$e(error, Error)) {
|
|
817
817
|
return error;
|
|
818
818
|
}
|
|
819
819
|
}
|
|
@@ -968,7 +968,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
968
968
|
return true;
|
|
969
969
|
}
|
|
970
970
|
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
971
|
-
if (typeof Symbol === "function" && _instanceof$
|
|
971
|
+
if (typeof Symbol === "function" && _instanceof$e(propValue, Symbol)) {
|
|
972
972
|
return true;
|
|
973
973
|
}
|
|
974
974
|
return false;
|
|
@@ -979,7 +979,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
979
979
|
if (Array.isArray(propValue)) {
|
|
980
980
|
return "array";
|
|
981
981
|
}
|
|
982
|
-
if (_instanceof$
|
|
982
|
+
if (_instanceof$e(propValue, RegExp)) {
|
|
983
983
|
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
984
984
|
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
985
985
|
// passes PropTypes.object.
|
|
@@ -998,9 +998,9 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
998
998
|
}
|
|
999
999
|
var propType = getPropType(propValue);
|
|
1000
1000
|
if (propType === "object") {
|
|
1001
|
-
if (_instanceof$
|
|
1001
|
+
if (_instanceof$e(propValue, Date)) {
|
|
1002
1002
|
return "date";
|
|
1003
|
-
} else if (_instanceof$
|
|
1003
|
+
} else if (_instanceof$e(propValue, RegExp)) {
|
|
1004
1004
|
return "regexp";
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
@@ -1145,7 +1145,7 @@ function _create_class$2(Constructor, protoProps, staticProps) {
|
|
|
1145
1145
|
if (staticProps) _defineProperties$3(Constructor, staticProps);
|
|
1146
1146
|
return Constructor;
|
|
1147
1147
|
}
|
|
1148
|
-
function _instanceof$
|
|
1148
|
+
function _instanceof$d(left, right) {
|
|
1149
1149
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1150
1150
|
return !!right[Symbol.hasInstance](left);
|
|
1151
1151
|
} else {
|
|
@@ -1205,7 +1205,7 @@ var Watchdog = /*#__PURE__*/ function() {
|
|
|
1205
1205
|
var error = "error" in evt ? evt.error : evt.reason;
|
|
1206
1206
|
// Note that `evt.reason` might be everything that is in the promise rejection.
|
|
1207
1207
|
// Similarly everything that is thrown lands in `evt.error`.
|
|
1208
|
-
if (_instanceof$
|
|
1208
|
+
if (_instanceof$d(error, Error)) {
|
|
1209
1209
|
_this._handleError(error, evt);
|
|
1210
1210
|
}
|
|
1211
1211
|
};
|
|
@@ -1328,9 +1328,9 @@ var Watchdog = /*#__PURE__*/ function() {
|
|
|
1328
1328
|
message: error.message,
|
|
1329
1329
|
stack: error.stack,
|
|
1330
1330
|
// `evt.filename`, `evt.lineno` and `evt.colno` are available only in ErrorEvent events
|
|
1331
|
-
filename: _instanceof$
|
|
1332
|
-
lineno: _instanceof$
|
|
1333
|
-
colno: _instanceof$
|
|
1331
|
+
filename: _instanceof$d(evt, ErrorEvent) ? evt.filename : undefined,
|
|
1332
|
+
lineno: _instanceof$d(evt, ErrorEvent) ? evt.lineno : undefined,
|
|
1333
|
+
colno: _instanceof$d(evt, ErrorEvent) ? evt.colno : undefined,
|
|
1334
1334
|
date: this._now()
|
|
1335
1335
|
});
|
|
1336
1336
|
var causesRestart = this._shouldRestart();
|
|
@@ -1385,7 +1385,7 @@ var Watchdog = /*#__PURE__*/ function() {
|
|
|
1385
1385
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1386
1386
|
*/ /**
|
|
1387
1387
|
* @module watchdog/utils/getsubnodes
|
|
1388
|
-
*/ /* globals EventTarget, Event */ function _instanceof$
|
|
1388
|
+
*/ /* globals EventTarget, Event */ function _instanceof$c(left, right) {
|
|
1389
1389
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1390
1390
|
return !!right[Symbol.hasInstance](left);
|
|
1391
1391
|
} else {
|
|
@@ -1470,7 +1470,7 @@ function shouldNodeBeIncluded(node) {
|
|
|
1470
1470
|
// until a better solution is found.
|
|
1471
1471
|
// More in https://github.com/ckeditor/ckeditor5/issues/12292.
|
|
1472
1472
|
node._watchdogExcluded || // Skip native DOM objects, e.g. Window, nodes, events, etc.
|
|
1473
|
-
_instanceof$
|
|
1473
|
+
_instanceof$c(node, EventTarget) || _instanceof$c(node, Event));
|
|
1474
1474
|
}
|
|
1475
1475
|
|
|
1476
1476
|
/**
|
|
@@ -2813,7 +2813,7 @@ MapCache$4.prototype.set = mapCacheSet$2;
|
|
|
2813
2813
|
/** Built-in value references. */ var getPrototype$5 = overArg$3(Object.getPrototypeOf, Object);
|
|
2814
2814
|
var getPrototype$6 = getPrototype$5;
|
|
2815
2815
|
|
|
2816
|
-
function _instanceof$
|
|
2816
|
+
function _instanceof$b(left, right) {
|
|
2817
2817
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
2818
2818
|
return !!right[Symbol.hasInstance](left);
|
|
2819
2819
|
} else {
|
|
@@ -2861,7 +2861,7 @@ function _instanceof$a(left, right) {
|
|
|
2861
2861
|
return true;
|
|
2862
2862
|
}
|
|
2863
2863
|
var Ctor = hasOwnProperty$f.call(proto, "constructor") && proto.constructor;
|
|
2864
|
-
return typeof Ctor == "function" && _instanceof$
|
|
2864
|
+
return typeof Ctor == "function" && _instanceof$b(Ctor, Ctor) && funcToString$3.call(Ctor) == objectCtorString$1;
|
|
2865
2865
|
}
|
|
2866
2866
|
|
|
2867
2867
|
/**
|
|
@@ -2913,7 +2913,7 @@ function _instanceof$a(left, right) {
|
|
|
2913
2913
|
return this.__data__.has(key);
|
|
2914
2914
|
}
|
|
2915
2915
|
|
|
2916
|
-
function _instanceof$
|
|
2916
|
+
function _instanceof$a(left, right) {
|
|
2917
2917
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
2918
2918
|
return !!right[Symbol.hasInstance](left);
|
|
2919
2919
|
} else {
|
|
@@ -2932,7 +2932,7 @@ function _instanceof$9(left, right) {
|
|
|
2932
2932
|
* @returns {Object} Returns the stack cache instance.
|
|
2933
2933
|
*/ function stackSet$2(key, value) {
|
|
2934
2934
|
var data = this.__data__;
|
|
2935
|
-
if (_instanceof$
|
|
2935
|
+
if (_instanceof$a(data, ListCache$5)) {
|
|
2936
2936
|
var pairs = data.__data__;
|
|
2937
2937
|
if (!Map$6 || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
|
|
2938
2938
|
pairs.push([
|
|
@@ -67901,7 +67901,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
67901
67901
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
67902
67902
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
67903
67903
|
PERFORMANCE OF THIS SOFTWARE.
|
|
67904
|
-
***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ function _instanceof$
|
|
67904
|
+
***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ function _instanceof$9(left, right) {
|
|
67905
67905
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
67906
67906
|
return !!right[Symbol.hasInstance](left);
|
|
67907
67907
|
} else {
|
|
@@ -67909,7 +67909,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
67909
67909
|
}
|
|
67910
67910
|
}
|
|
67911
67911
|
var extendStatics = function extendStatics1(d, b) {
|
|
67912
|
-
extendStatics = Object.setPrototypeOf || _instanceof$
|
|
67912
|
+
extendStatics = Object.setPrototypeOf || _instanceof$9({
|
|
67913
67913
|
__proto__: []
|
|
67914
67914
|
}, Array) && function(d, b) {
|
|
67915
67915
|
d.__proto__ = b;
|
|
@@ -67938,7 +67938,7 @@ var __assign = function __assign1() {
|
|
|
67938
67938
|
};
|
|
67939
67939
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
67940
67940
|
function adopt(value) {
|
|
67941
|
-
return _instanceof$
|
|
67941
|
+
return _instanceof$9(value, P) ? value : new P(function(resolve) {
|
|
67942
67942
|
resolve(value);
|
|
67943
67943
|
});
|
|
67944
67944
|
}
|
|
@@ -73397,7 +73397,7 @@ var _default = function(file, acceptedFiles) {
|
|
|
73397
73397
|
return true;
|
|
73398
73398
|
};
|
|
73399
73399
|
|
|
73400
|
-
function _instanceof$
|
|
73400
|
+
function _instanceof$8(left, right) {
|
|
73401
73401
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
73402
73402
|
return !!right[Symbol.hasInstance](left);
|
|
73403
73403
|
} else {
|
|
@@ -73723,7 +73723,7 @@ function isIeOrEdge() {
|
|
|
73723
73723
|
* @param {any} v
|
|
73724
73724
|
* @returns {boolean} True if v is an abort exception.
|
|
73725
73725
|
*/ function isAbort(v) {
|
|
73726
|
-
return _instanceof$
|
|
73726
|
+
return _instanceof$8(v, DOMException) && (v.name === "AbortError" || v.code === v.ABORT_ERR);
|
|
73727
73727
|
}
|
|
73728
73728
|
/**
|
|
73729
73729
|
* Check if v is a security error.
|
|
@@ -73732,7 +73732,7 @@ function isIeOrEdge() {
|
|
|
73732
73732
|
* @param {any} v
|
|
73733
73733
|
* @returns {boolean} True if v is a security error.
|
|
73734
73734
|
*/ function isSecurityError(v) {
|
|
73735
|
-
return _instanceof$
|
|
73735
|
+
return _instanceof$8(v, DOMException) && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
|
|
73736
73736
|
}
|
|
73737
73737
|
/**
|
|
73738
73738
|
* Check if v is a MIME type string.
|
|
@@ -74877,7 +74877,7 @@ function _objectSpread2$7(e) {
|
|
|
74877
74877
|
return e;
|
|
74878
74878
|
}
|
|
74879
74879
|
|
|
74880
|
-
function _instanceof$
|
|
74880
|
+
function _instanceof$7(left, right) {
|
|
74881
74881
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
74882
74882
|
return !!right[Symbol.hasInstance](left);
|
|
74883
74883
|
} else {
|
|
@@ -74961,10 +74961,10 @@ function ctorName(val) {
|
|
|
74961
74961
|
return typeof val.constructor === "function" ? val.constructor.name : null;
|
|
74962
74962
|
}
|
|
74963
74963
|
function isError(val) {
|
|
74964
|
-
return _instanceof$
|
|
74964
|
+
return _instanceof$7(val, Error) || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
|
|
74965
74965
|
}
|
|
74966
74966
|
function isDate(val) {
|
|
74967
|
-
if (_instanceof$
|
|
74967
|
+
if (_instanceof$7(val, Date)) return true;
|
|
74968
74968
|
return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
|
|
74969
74969
|
}
|
|
74970
74970
|
function kindOf(val) {
|
|
@@ -76891,7 +76891,7 @@ var rafSchd = function rafSchd(fn) {
|
|
|
76891
76891
|
};
|
|
76892
76892
|
var rafSchd$1 = rafSchd;
|
|
76893
76893
|
|
|
76894
|
-
function _instanceof$
|
|
76894
|
+
function _instanceof$6(left, right) {
|
|
76895
76895
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
76896
76896
|
return !!right[Symbol.hasInstance](left);
|
|
76897
76897
|
} else {
|
|
@@ -76987,7 +76987,7 @@ var ErrorBoundary = function(_React$Component) {
|
|
|
76987
76987
|
process.env.NODE_ENV !== "production" ? warning$1("\n An error was caught by our window 'error' event listener while a drag was occurring.\n The active drag has been aborted.\n ") : void 0;
|
|
76988
76988
|
}
|
|
76989
76989
|
var err = event.error;
|
|
76990
|
-
if (_instanceof$
|
|
76990
|
+
if (_instanceof$6(err, RbdInvariant)) {
|
|
76991
76991
|
event.preventDefault();
|
|
76992
76992
|
if (process.env.NODE_ENV !== "production") {
|
|
76993
76993
|
error(err.message);
|
|
@@ -77015,7 +77015,7 @@ var ErrorBoundary = function(_React$Component) {
|
|
|
77015
77015
|
]);
|
|
77016
77016
|
};
|
|
77017
77017
|
_proto.componentDidCatch = function componentDidCatch(err) {
|
|
77018
|
-
if (_instanceof$
|
|
77018
|
+
if (_instanceof$6(err, RbdInvariant)) {
|
|
77019
77019
|
if (process.env.NODE_ENV !== "production") {
|
|
77020
77020
|
error(err.message);
|
|
77021
77021
|
}
|
|
@@ -81029,7 +81029,7 @@ var getWindowFromEl = function getWindowFromEl(el) {
|
|
|
81029
81029
|
return el && el.ownerDocument ? el.ownerDocument.defaultView : window;
|
|
81030
81030
|
};
|
|
81031
81031
|
function isHtmlElement(el) {
|
|
81032
|
-
return _instanceof$
|
|
81032
|
+
return _instanceof$6(el, getWindowFromEl(el).HTMLElement);
|
|
81033
81033
|
}
|
|
81034
81034
|
function findDragHandle(contextId, draggableId) {
|
|
81035
81035
|
var selector = "[" + dragHandle.contextId + '="' + contextId + '"]';
|
|
@@ -82270,7 +82270,7 @@ var getBorderBoxCenterPosition = function getBorderBoxCenterPosition(el) {
|
|
|
82270
82270
|
return getRect(el.getBoundingClientRect()).center;
|
|
82271
82271
|
};
|
|
82272
82272
|
function isElement$1(el) {
|
|
82273
|
-
return _instanceof$
|
|
82273
|
+
return _instanceof$6(el, getWindowFromEl(el).Element);
|
|
82274
82274
|
}
|
|
82275
82275
|
var supportedMatchesName = function() {
|
|
82276
82276
|
var base = "matches";
|
|
@@ -87772,7 +87772,7 @@ function _objectWithoutProperties(e, t) {
|
|
|
87772
87772
|
return i;
|
|
87773
87773
|
}
|
|
87774
87774
|
|
|
87775
|
-
function _instanceof$
|
|
87775
|
+
function _instanceof$5(left, right) {
|
|
87776
87776
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
87777
87777
|
return !!right[Symbol.hasInstance](left);
|
|
87778
87778
|
} else {
|
|
@@ -87780,7 +87780,7 @@ function _instanceof$4(left, right) {
|
|
|
87780
87780
|
}
|
|
87781
87781
|
}
|
|
87782
87782
|
function _classCallCheck(a, n) {
|
|
87783
|
-
if (!_instanceof$
|
|
87783
|
+
if (!_instanceof$5(a, n)) throw new TypeError("Cannot call a class as a function");
|
|
87784
87784
|
}
|
|
87785
87785
|
|
|
87786
87786
|
function _defineProperties(e, r) {
|
|
@@ -89600,7 +89600,7 @@ function getWindow(node) {
|
|
|
89600
89600
|
return node;
|
|
89601
89601
|
}
|
|
89602
89602
|
|
|
89603
|
-
function _instanceof$
|
|
89603
|
+
function _instanceof$4(left, right) {
|
|
89604
89604
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
89605
89605
|
return !!right[Symbol.hasInstance](left);
|
|
89606
89606
|
} else {
|
|
@@ -89609,11 +89609,11 @@ function _instanceof$3(left, right) {
|
|
|
89609
89609
|
}
|
|
89610
89610
|
function isElement(node) {
|
|
89611
89611
|
var OwnElement = getWindow(node).Element;
|
|
89612
|
-
return _instanceof$
|
|
89612
|
+
return _instanceof$4(node, OwnElement) || _instanceof$4(node, Element);
|
|
89613
89613
|
}
|
|
89614
89614
|
function isHTMLElement(node) {
|
|
89615
89615
|
var OwnElement = getWindow(node).HTMLElement;
|
|
89616
|
-
return _instanceof$
|
|
89616
|
+
return _instanceof$4(node, OwnElement) || _instanceof$4(node, HTMLElement);
|
|
89617
89617
|
}
|
|
89618
89618
|
function isShadowRoot(node) {
|
|
89619
89619
|
// IE 11 has no ShadowRoot
|
|
@@ -89621,7 +89621,7 @@ function isShadowRoot(node) {
|
|
|
89621
89621
|
return false;
|
|
89622
89622
|
}
|
|
89623
89623
|
var OwnElement = getWindow(node).ShadowRoot;
|
|
89624
|
-
return _instanceof$
|
|
89624
|
+
return _instanceof$4(node, OwnElement) || _instanceof$4(node, ShadowRoot);
|
|
89625
89625
|
}
|
|
89626
89626
|
|
|
89627
89627
|
var max = Math.max;
|
|
@@ -92300,7 +92300,7 @@ MapCache$3.prototype.has = mapCacheHas;
|
|
|
92300
92300
|
MapCache$3.prototype.set = mapCacheSet;
|
|
92301
92301
|
var _MapCache = MapCache$3;
|
|
92302
92302
|
|
|
92303
|
-
function _instanceof$
|
|
92303
|
+
function _instanceof$3(left, right) {
|
|
92304
92304
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
92305
92305
|
return !!right[Symbol.hasInstance](left);
|
|
92306
92306
|
} else {
|
|
@@ -92320,7 +92320,7 @@ var ListCache$1 = _ListCache, Map$2 = _Map, MapCache$2 = _MapCache;
|
|
|
92320
92320
|
* @returns {Object} Returns the stack cache instance.
|
|
92321
92321
|
*/ function stackSet$1(key, value) {
|
|
92322
92322
|
var data = this.__data__;
|
|
92323
|
-
if (_instanceof$
|
|
92323
|
+
if (_instanceof$3(data, ListCache$1)) {
|
|
92324
92324
|
var pairs = data.__data__;
|
|
92325
92325
|
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
92326
92326
|
pairs.push([
|
|
@@ -93069,7 +93069,7 @@ var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols$2 = _getSymbols, keys$4 = key
|
|
|
93069
93069
|
}
|
|
93070
93070
|
var _getAllKeys = getAllKeys$2;
|
|
93071
93071
|
|
|
93072
|
-
function _instanceof$
|
|
93072
|
+
function _instanceof$2(left, right) {
|
|
93073
93073
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
93074
93074
|
return !!right[Symbol.hasInstance](left);
|
|
93075
93075
|
} else {
|
|
@@ -93130,7 +93130,7 @@ var getAllKeys$1 = _getAllKeys;
|
|
|
93130
93130
|
if (result && !skipCtor) {
|
|
93131
93131
|
var objCtor = object.constructor, othCtor = other.constructor;
|
|
93132
93132
|
// Non `Object` object instances with different constructors are not equal.
|
|
93133
|
-
if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && _instanceof$
|
|
93133
|
+
if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && _instanceof$2(objCtor, objCtor) && typeof othCtor == "function" && _instanceof$2(othCtor, othCtor))) {
|
|
93134
93134
|
result = false;
|
|
93135
93135
|
}
|
|
93136
93136
|
}
|
|
@@ -95318,7 +95318,7 @@ var castPath$1 = _castPath, last = last_1, parent = _parent, toKey = _toKey;
|
|
|
95318
95318
|
}
|
|
95319
95319
|
var _baseUnset = baseUnset$1;
|
|
95320
95320
|
|
|
95321
|
-
function _instanceof(left, right) {
|
|
95321
|
+
function _instanceof$1(left, right) {
|
|
95322
95322
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
95323
95323
|
return !!right[Symbol.hasInstance](left);
|
|
95324
95324
|
} else {
|
|
@@ -95367,7 +95367,7 @@ var baseGetTag = _baseGetTag, getPrototype$1 = _getPrototype, isObjectLike = isO
|
|
|
95367
95367
|
return true;
|
|
95368
95368
|
}
|
|
95369
95369
|
var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
|
|
95370
|
-
return typeof Ctor == "function" && _instanceof(Ctor, Ctor) && funcToString.call(Ctor) == objectCtorString;
|
|
95370
|
+
return typeof Ctor == "function" && _instanceof$1(Ctor, Ctor) && funcToString.call(Ctor) == objectCtorString;
|
|
95371
95371
|
}
|
|
95372
95372
|
var isPlainObject_1 = isPlainObject$1;
|
|
95373
95373
|
|
|
@@ -108185,6 +108185,13 @@ function _async_to_generator(fn) {
|
|
|
108185
108185
|
});
|
|
108186
108186
|
};
|
|
108187
108187
|
}
|
|
108188
|
+
function _instanceof(left, right) {
|
|
108189
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
108190
|
+
return !!right[Symbol.hasInstance](left);
|
|
108191
|
+
} else {
|
|
108192
|
+
return left instanceof right;
|
|
108193
|
+
}
|
|
108194
|
+
}
|
|
108188
108195
|
function _iterable_to_array_limit(arr, i) {
|
|
108189
108196
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
108190
108197
|
if (_i == null) return;
|
|
@@ -108318,31 +108325,15 @@ function _ts_generator(thisArg, body) {
|
|
|
108318
108325
|
};
|
|
108319
108326
|
}
|
|
108320
108327
|
}
|
|
108321
|
-
var
|
|
108322
|
-
var liffId = param.liffId,
|
|
108328
|
+
var useLiff = function(param) {
|
|
108329
|
+
var liffId = param.liffId, withLoginOnExternalBrowser = param.withLoginOnExternalBrowser;
|
|
108323
108330
|
var _useState = _sliced_to_array(useState(null), 2), liffObject = _useState[0], setLiffObject = _useState[1];
|
|
108324
108331
|
var _useState1 = _sliced_to_array(useState(null), 2), liffError = _useState1[0], setLiffError = _useState1[1];
|
|
108325
|
-
var _useState2 = _sliced_to_array(useState(
|
|
108326
|
-
var _useState3 = _sliced_to_array(useState(null), 2), accessToken = _useState3[0], setAccessToken = _useState3[1];
|
|
108332
|
+
var _useState2 = _sliced_to_array(useState(null), 2), accessToken = _useState2[0], setAccessToken = _useState2[1];
|
|
108327
108333
|
useEffect(function() {
|
|
108328
|
-
|
|
108329
|
-
var
|
|
108330
|
-
|
|
108331
|
-
if (loggedIn) {
|
|
108332
|
-
var token = liffObject.getAccessToken();
|
|
108333
|
-
setAccessToken(token);
|
|
108334
|
-
}
|
|
108335
|
-
}
|
|
108336
|
-
}, [
|
|
108337
|
-
liffObject
|
|
108338
|
-
]);
|
|
108339
|
-
useEffect(function() {
|
|
108340
|
-
var initLiff = function initLiff() {
|
|
108341
|
-
return _initLiff.apply(this, arguments);
|
|
108342
|
-
};
|
|
108343
|
-
function _initLiff() {
|
|
108344
|
-
_initLiff = _async_to_generator(function() {
|
|
108345
|
-
var customFetch, liff, originalFetch, error;
|
|
108334
|
+
var initializeLiff = function() {
|
|
108335
|
+
var _ref = _async_to_generator(function() {
|
|
108336
|
+
var liff, token, error;
|
|
108346
108337
|
return _ts_generator(this, function(_state) {
|
|
108347
108338
|
switch(_state.label){
|
|
108348
108339
|
case 0:
|
|
@@ -108352,23 +108343,13 @@ var useBaseLiff = function(param) {
|
|
|
108352
108343
|
,
|
|
108353
108344
|
4
|
|
108354
108345
|
]);
|
|
108355
|
-
customFetch = // eslint-disable-next-line no-inner-declarations
|
|
108356
|
-
function customFetch(url, options) {
|
|
108357
|
-
if (typeof url === "string" && url.startsWith("https://liffsdk.line-scdn.net/xlt/") && url.endsWith(".json")) {
|
|
108358
|
-
url = "".concat(url, "?ts=").concat(Math.random());
|
|
108359
|
-
}
|
|
108360
|
-
return originalFetch(url, options);
|
|
108361
|
-
};
|
|
108362
108346
|
return [
|
|
108363
108347
|
4,
|
|
108364
108348
|
import('./index.esm3.js')
|
|
108365
108349
|
];
|
|
108366
108350
|
case 1:
|
|
108367
108351
|
liff = _state.sent().liff;
|
|
108368
|
-
|
|
108369
|
-
originalFetch = window.fetch;
|
|
108370
|
-
window.fetch = customFetch;
|
|
108371
|
-
console.log("LIFF 初始化中...");
|
|
108352
|
+
console.log("LIFF init...");
|
|
108372
108353
|
return [
|
|
108373
108354
|
4,
|
|
108374
108355
|
liff.init({
|
|
@@ -108378,17 +108359,18 @@ var useBaseLiff = function(param) {
|
|
|
108378
108359
|
];
|
|
108379
108360
|
case 2:
|
|
108380
108361
|
_state.sent();
|
|
108381
|
-
console.log("LIFF
|
|
108362
|
+
console.log("LIFF init succeeded.");
|
|
108363
|
+
token = liff.getAccessToken();
|
|
108364
|
+
setAccessToken(token);
|
|
108382
108365
|
setLiffObject(liff);
|
|
108383
|
-
if (redirectPath) window.location.replace(window.location.href + redirectPath);
|
|
108384
108366
|
return [
|
|
108385
108367
|
3,
|
|
108386
108368
|
4
|
|
108387
108369
|
];
|
|
108388
108370
|
case 3:
|
|
108389
108371
|
error = _state.sent();
|
|
108390
|
-
console.error("LIFF
|
|
108391
|
-
setLiffError(error);
|
|
108372
|
+
console.error("LIFF init failed:", error);
|
|
108373
|
+
setLiffError(_instanceof(error, Error) ? error.message : String(error));
|
|
108392
108374
|
return [
|
|
108393
108375
|
3,
|
|
108394
108376
|
4
|
|
@@ -108400,16 +108382,17 @@ var useBaseLiff = function(param) {
|
|
|
108400
108382
|
}
|
|
108401
108383
|
});
|
|
108402
108384
|
});
|
|
108403
|
-
return
|
|
108404
|
-
|
|
108405
|
-
|
|
108385
|
+
return function initializeLiff() {
|
|
108386
|
+
return _ref.apply(this, arguments);
|
|
108387
|
+
};
|
|
108388
|
+
}();
|
|
108389
|
+
initializeLiff();
|
|
108406
108390
|
}, []);
|
|
108407
108391
|
return {
|
|
108408
|
-
accessToken: accessToken,
|
|
108409
|
-
isLoggedIn: isLoggedIn,
|
|
108410
108392
|
liffObject: liffObject,
|
|
108411
|
-
liffError: liffError
|
|
108393
|
+
liffError: liffError,
|
|
108394
|
+
accessToken: accessToken
|
|
108412
108395
|
};
|
|
108413
108396
|
};
|
|
108414
108397
|
|
|
108415
|
-
export { BaseTable as B, CkEditor as C, DropImage as D, ReactDateRange as R, Spin as S, UiLibrary as U, __spreadArray as _, __read as a, __extends as b, __assign as c, __makeTemplateObject as d, __awaiter as e, __generator as f, commonjsGlobal as g, __values as h, DropDown as i, CustomUpload as j, Switch as k, DateRangePicker as l, DataTable as m, Regex as n, verifyId as o, decryptByEcPay as p, encryptByEcPay as q, BigCalender as r, DnDCalendar as s,
|
|
108398
|
+
export { BaseTable as B, CkEditor as C, DropImage as D, ReactDateRange as R, Spin as S, UiLibrary as U, __spreadArray as _, __read as a, __extends as b, __assign as c, __makeTemplateObject as d, __awaiter as e, __generator as f, commonjsGlobal as g, __values as h, DropDown as i, CustomUpload as j, Switch as k, DateRangePicker as l, DataTable as m, Regex as n, verifyId as o, decryptByEcPay as p, encryptByEcPay as q, BigCalender as r, DnDCalendar as s, useLiff as u, verifyTaxId as v };
|
package/package.json
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "maxLength" | "value" | "onChange" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "
|
|
2
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "maxLength" | "value" | "onChange" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
3
3
|
value?: string | undefined;
|
|
4
4
|
onChange?: ((newValue: string) => unknown) | undefined;
|
|
5
5
|
maxLength: number;
|
|
6
6
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
7
7
|
onComplete?: ((...args: any[]) => unknown) | undefined;
|
|
8
8
|
pushPasswordManagerStrategy?: "none" | "increase-width" | undefined;
|
|
9
|
-
pasteTransformer?: ((pasted: string) => string) | undefined;
|
|
10
9
|
containerClassName?: string | undefined;
|
|
11
10
|
noScriptCSSFallback?: string | null | undefined;
|
|
12
11
|
} & {
|
|
13
12
|
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
13
|
children?: undefined;
|
|
15
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "maxLength" | "value" | "onChange" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "
|
|
14
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "maxLength" | "value" | "onChange" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
16
15
|
value?: string | undefined;
|
|
17
16
|
onChange?: ((newValue: string) => unknown) | undefined;
|
|
18
17
|
maxLength: number;
|
|
19
18
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
20
19
|
onComplete?: ((...args: any[]) => unknown) | undefined;
|
|
21
20
|
pushPasswordManagerStrategy?: "none" | "increase-width" | undefined;
|
|
22
|
-
pasteTransformer?: ((pasted: string) => string) | undefined;
|
|
23
21
|
containerClassName?: string | undefined;
|
|
24
22
|
noScriptCSSFallback?: string | null | undefined;
|
|
25
23
|
} & {
|
package/src/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface UseLiffResult {
|
|
2
|
+
liffObject: any;
|
|
3
|
+
liffError: string | null;
|
|
4
|
+
accessToken: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const useLiff: ({ liffId, withLoginOnExternalBrowser, }: {
|
|
7
|
+
liffId: any;
|
|
8
|
+
withLoginOnExternalBrowser: any;
|
|
9
|
+
}) => UseLiffResult;
|
|
10
|
+
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Liff } from '@line/liff';
|
|
2
|
-
interface UseLiffProps {
|
|
3
|
-
liffId: string;
|
|
4
|
-
withLoginOnExternalBrowser?: boolean;
|
|
5
|
-
redirectPath?: string;
|
|
6
|
-
}
|
|
7
|
-
interface UseLiffReturn {
|
|
8
|
-
accessToken: string | null;
|
|
9
|
-
isLoggedIn: boolean;
|
|
10
|
-
liffObject: Liff | null;
|
|
11
|
-
liffError: Error | null;
|
|
12
|
-
}
|
|
13
|
-
export declare const useBaseLiff: ({ liffId, withLoginOnExternalBrowser, redirectPath, }: UseLiffProps) => UseLiffReturn;
|
|
14
|
-
export {};
|