funda-ui 4.7.125 → 4.7.150
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/CascadingSelect/index.css +15 -4
- package/CascadingSelect/index.d.ts +2 -0
- package/CascadingSelect/index.js +294 -22
- package/CascadingSelectE2E/index.css +15 -4
- package/CascadingSelectE2E/index.d.ts +2 -0
- package/CascadingSelectE2E/index.js +300 -28
- package/Checkbox/index.js +4 -2
- package/LiveSearch/index.js +2 -1
- package/README.md +1 -2
- package/Refresher/index.d.ts +22 -0
- package/Refresher/index.js +564 -0
- package/Select/index.css +33 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +350 -39
- package/SplitterPanel/index.js +67 -3
- package/Switch/index.js +4 -2
- package/Utils/format-string.d.ts +2 -1
- package/Utils/format-string.js +22 -12
- package/Utils/time.d.ts +3 -3
- package/Utils/useIsMobile.js +67 -3
- package/all.d.ts +1 -0
- package/all.js +1 -0
- package/lib/cjs/CascadingSelect/index.d.ts +2 -0
- package/lib/cjs/CascadingSelect/index.js +294 -22
- package/lib/cjs/CascadingSelectE2E/index.d.ts +2 -0
- package/lib/cjs/CascadingSelectE2E/index.js +300 -28
- package/lib/cjs/Checkbox/index.js +4 -2
- package/lib/cjs/LiveSearch/index.js +2 -1
- package/lib/cjs/Refresher/index.d.ts +22 -0
- package/lib/cjs/Refresher/index.js +564 -0
- package/lib/cjs/Select/index.d.ts +1 -0
- package/lib/cjs/Select/index.js +350 -39
- package/lib/cjs/SplitterPanel/index.js +67 -3
- package/lib/cjs/Switch/index.js +4 -2
- package/lib/cjs/Utils/format-string.d.ts +2 -1
- package/lib/cjs/Utils/format-string.js +22 -12
- package/lib/cjs/Utils/time.d.ts +3 -3
- package/lib/cjs/Utils/useIsMobile.js +67 -3
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/css/CascadingSelect/index.css +15 -4
- package/lib/css/CascadingSelectE2E/index.css +15 -4
- package/lib/css/Select/index.css +33 -0
- package/lib/esm/CascadingSelect/index.scss +22 -7
- package/lib/esm/CascadingSelect/index.tsx +49 -1
- package/lib/esm/CascadingSelectE2E/Group.tsx +1 -0
- package/lib/esm/CascadingSelectE2E/index.scss +23 -6
- package/lib/esm/CascadingSelectE2E/index.tsx +53 -1
- package/lib/esm/Checkbox/index.tsx +5 -3
- package/lib/esm/LiveSearch/index.tsx +2 -1
- package/lib/esm/Refresher/index.tsx +121 -0
- package/lib/esm/Select/index.scss +43 -2
- package/lib/esm/Select/index.tsx +81 -24
- package/lib/esm/Select/utils/func.ts +0 -10
- package/lib/esm/Switch/index.tsx +4 -2
- package/lib/esm/Utils/hooks/useIsMobile.tsx +88 -5
- package/lib/esm/Utils/libs/format-string.ts +22 -12
- package/lib/esm/Utils/libs/time.ts +6 -6
- package/lib/esm/index.js +1 -0
- package/package.json +1 -1
|
@@ -749,6 +749,236 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
749
749
|
|
|
750
750
|
/***/ }),
|
|
751
751
|
|
|
752
|
+
/***/ 933:
|
|
753
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
754
|
+
|
|
755
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
756
|
+
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
757
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
758
|
+
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
759
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
760
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
761
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
762
|
+
})(this, function () {
|
|
763
|
+
return (/******/function () {
|
|
764
|
+
// webpackBootstrap
|
|
765
|
+
/******/
|
|
766
|
+
"use strict";
|
|
767
|
+
|
|
768
|
+
/******/ // The require scope
|
|
769
|
+
/******/
|
|
770
|
+
var __nested_webpack_require_987__ = {};
|
|
771
|
+
/******/
|
|
772
|
+
/************************************************************************/
|
|
773
|
+
/******/ /* webpack/runtime/define property getters */
|
|
774
|
+
/******/
|
|
775
|
+
(function () {
|
|
776
|
+
/******/ // define getter functions for harmony exports
|
|
777
|
+
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
778
|
+
/******/for (var key in definition) {
|
|
779
|
+
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
780
|
+
/******/Object.defineProperty(exports, key, {
|
|
781
|
+
enumerable: true,
|
|
782
|
+
get: definition[key]
|
|
783
|
+
});
|
|
784
|
+
/******/
|
|
785
|
+
}
|
|
786
|
+
/******/
|
|
787
|
+
}
|
|
788
|
+
/******/
|
|
789
|
+
};
|
|
790
|
+
/******/
|
|
791
|
+
})();
|
|
792
|
+
/******/
|
|
793
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
794
|
+
/******/
|
|
795
|
+
(function () {
|
|
796
|
+
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
797
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
798
|
+
};
|
|
799
|
+
/******/
|
|
800
|
+
})();
|
|
801
|
+
/******/
|
|
802
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
803
|
+
/******/
|
|
804
|
+
(function () {
|
|
805
|
+
/******/ // define __esModule on exports
|
|
806
|
+
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
807
|
+
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
808
|
+
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
809
|
+
value: 'Module'
|
|
810
|
+
});
|
|
811
|
+
/******/
|
|
812
|
+
}
|
|
813
|
+
/******/
|
|
814
|
+
Object.defineProperty(exports, '__esModule', {
|
|
815
|
+
value: true
|
|
816
|
+
});
|
|
817
|
+
/******/
|
|
818
|
+
};
|
|
819
|
+
/******/
|
|
820
|
+
})();
|
|
821
|
+
/******/
|
|
822
|
+
/************************************************************************/
|
|
823
|
+
var __webpack_exports__ = {};
|
|
824
|
+
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
825
|
+
/* harmony export */
|
|
826
|
+
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
827
|
+
/* harmony export */"htmlToPlain": function htmlToPlain() {
|
|
828
|
+
return (/* binding */_htmlToPlain
|
|
829
|
+
);
|
|
830
|
+
},
|
|
831
|
+
/* harmony export */"multiSpacesToSingle": function multiSpacesToSingle() {
|
|
832
|
+
return (/* binding */_multiSpacesToSingle
|
|
833
|
+
);
|
|
834
|
+
},
|
|
835
|
+
/* harmony export */"onlyNumAndLetter": function onlyNumAndLetter() {
|
|
836
|
+
return (/* binding */_onlyNumAndLetter
|
|
837
|
+
);
|
|
838
|
+
},
|
|
839
|
+
/* harmony export */"removeFirstLastSlash": function removeFirstLastSlash() {
|
|
840
|
+
return (/* binding */_removeFirstLastSlash
|
|
841
|
+
);
|
|
842
|
+
},
|
|
843
|
+
/* harmony export */"removeFirstSlash": function removeFirstSlash() {
|
|
844
|
+
return (/* binding */_removeFirstSlash
|
|
845
|
+
);
|
|
846
|
+
},
|
|
847
|
+
/* harmony export */"removeTrailingSlash": function removeTrailingSlash() {
|
|
848
|
+
return (/* binding */_removeTrailingSlash
|
|
849
|
+
);
|
|
850
|
+
},
|
|
851
|
+
/* harmony export */"rmAllSpace": function rmAllSpace() {
|
|
852
|
+
return (/* binding */_rmAllSpace
|
|
853
|
+
);
|
|
854
|
+
},
|
|
855
|
+
/* harmony export */"rmSpec": function rmSpec() {
|
|
856
|
+
return (/* binding */_rmSpec
|
|
857
|
+
);
|
|
858
|
+
},
|
|
859
|
+
/* harmony export */"stripTagsAndContent": function stripTagsAndContent() {
|
|
860
|
+
return (/* binding */_stripTagsAndContent
|
|
861
|
+
);
|
|
862
|
+
},
|
|
863
|
+
/* harmony export */"trimAll": function trimAll() {
|
|
864
|
+
return (/* binding */_trimAll
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
/* harmony export */
|
|
868
|
+
});
|
|
869
|
+
/**
|
|
870
|
+
* String formatting utility functions
|
|
871
|
+
*/
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Remove all special characters except space from a string
|
|
875
|
+
* @param {string} input - The input string to process
|
|
876
|
+
* @returns {string} The processed string
|
|
877
|
+
*/
|
|
878
|
+
function _rmSpec(input) {
|
|
879
|
+
return input === null || input === void 0 ? void 0 : input.replace(/[^a-zA-Z0-9 \u4E00-\u9FFF]/g, "");
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Allow only numbers and letters in a string
|
|
884
|
+
* @param {string} input - The input string to process
|
|
885
|
+
* @returns {string} The processed string
|
|
886
|
+
*/
|
|
887
|
+
function _onlyNumAndLetter(input) {
|
|
888
|
+
return input === null || input === void 0 ? void 0 : input.replace(/[^a-zA-Z0-9 ]/g, "");
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Remove all spaces including those in the middle
|
|
893
|
+
* @param {string} input - The input string to process
|
|
894
|
+
* @returns {string} The processed string
|
|
895
|
+
*/
|
|
896
|
+
function _rmAllSpace(input) {
|
|
897
|
+
return input === null || input === void 0 ? void 0 : input.replace(/\s/g, "");
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Remove whitespace from both sides of a string
|
|
902
|
+
* @param {string} input - The input string to process
|
|
903
|
+
* @returns {string} The processed string
|
|
904
|
+
*/
|
|
905
|
+
function _trimAll(input) {
|
|
906
|
+
return input === null || input === void 0 ? void 0 : input.replace(/(^\s+)|(\s+$)/g, "");
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Replace multiple spaces with a single space
|
|
911
|
+
* @param {string} input - The input string to process
|
|
912
|
+
* @returns {string} The processed string
|
|
913
|
+
*/
|
|
914
|
+
function _multiSpacesToSingle(input) {
|
|
915
|
+
return input === null || input === void 0 ? void 0 : input.replace(/\s+(\W)/g, ' ');
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Convert HTML text to plain text (Remove html tag content)
|
|
920
|
+
* @param {string} input - The input string to process
|
|
921
|
+
* @returns {string} The processed string
|
|
922
|
+
*/
|
|
923
|
+
/*
|
|
924
|
+
Examples:
|
|
925
|
+
console.log(htmlToPlain("<p>Hello <b>World</b></p>")); // Hello World
|
|
926
|
+
*/
|
|
927
|
+
function _htmlToPlain(input) {
|
|
928
|
+
return input === null || input === void 0 ? void 0 : input.replace(/(<([^>]+)>)/ig, '');
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Strip HTML tags and their content
|
|
933
|
+
* !!!Important: It will remove nested tags
|
|
934
|
+
* @param {string} input - The input string to process
|
|
935
|
+
* @returns {string} The processed string
|
|
936
|
+
*/
|
|
937
|
+
/*
|
|
938
|
+
Examples:
|
|
939
|
+
console.log(stripTagsAndContent("<p>Hello <b>World</b></p>")); // World
|
|
940
|
+
console.log(stripTagsAndContent("Hello <b>World</b>")); // Hello
|
|
941
|
+
*/
|
|
942
|
+
function _stripTagsAndContent(input) {
|
|
943
|
+
return input === null || input === void 0 ? void 0 : input.replace(/<\/?[^>]+(>|$)(.*?)<\/?[^>]+(>|$)/ig, '');
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Remove first and last slash from a URL
|
|
948
|
+
* @param {string} input - The input URL to process
|
|
949
|
+
* @returns {string} The processed URL
|
|
950
|
+
*/
|
|
951
|
+
function _removeFirstLastSlash(input) {
|
|
952
|
+
return input === null || input === void 0 ? void 0 : input.replace(/^\/|\/$/g, '');
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Remove trailing slash from a URL
|
|
957
|
+
* @param {string} input - The input URL to process
|
|
958
|
+
* @returns {string} The processed URL
|
|
959
|
+
*/
|
|
960
|
+
function _removeTrailingSlash(input) {
|
|
961
|
+
return input === null || input === void 0 ? void 0 : input.replace(/\/+$/, '');
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Remove first slash from a URL
|
|
966
|
+
* @param {string} input - The input URL to process
|
|
967
|
+
* @returns {string} The processed URL
|
|
968
|
+
*/
|
|
969
|
+
function _removeFirstSlash(input) {
|
|
970
|
+
return input === null || input === void 0 ? void 0 : input.replace(/\//, '');
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/******/
|
|
974
|
+
return __webpack_exports__;
|
|
975
|
+
/******/
|
|
976
|
+
}()
|
|
977
|
+
);
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
/***/ }),
|
|
981
|
+
|
|
752
982
|
/***/ 767:
|
|
753
983
|
/***/ (function(module, exports, __webpack_require__) {
|
|
754
984
|
|
|
@@ -2207,6 +2437,8 @@ var convert = __webpack_require__(79);
|
|
|
2207
2437
|
var getElementProperty = __webpack_require__(767);
|
|
2208
2438
|
// EXTERNAL MODULE: ../Utils/dist/cjs/tree.js
|
|
2209
2439
|
var tree = __webpack_require__(438);
|
|
2440
|
+
// EXTERNAL MODULE: ../Utils/dist/cjs/format-string.js
|
|
2441
|
+
var format_string = __webpack_require__(933);
|
|
2210
2442
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
2211
2443
|
var cls = __webpack_require__(188);
|
|
2212
2444
|
;// CONCATENATED MODULE: ./src/Group.tsx
|
|
@@ -2278,14 +2510,14 @@ function Group(props) {
|
|
|
2278
2510
|
}));
|
|
2279
2511
|
}
|
|
2280
2512
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
2281
|
-
var _excluded = ["popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "perColumnHeadersShow", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "destroyParentIdMatch", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchArray", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
2513
|
+
var _excluded = ["popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "searchable", "searchPlaceholder", "perColumnHeadersShow", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "destroyParentIdMatch", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchArray", "onFetch", "onChange", "onBlur", "onFocus"];
|
|
2282
2514
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2515
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2516
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2283
2517
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2284
2518
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2285
2519
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
2286
2520
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2287
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2288
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2289
2521
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2290
2522
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2291
2523
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -2307,11 +2539,16 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
2307
2539
|
|
|
2308
2540
|
|
|
2309
2541
|
|
|
2542
|
+
|
|
2310
2543
|
var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
2311
2544
|
var popupRef = props.popupRef,
|
|
2312
2545
|
wrapperClassName = props.wrapperClassName,
|
|
2313
2546
|
controlClassName = props.controlClassName,
|
|
2314
2547
|
controlExClassName = props.controlExClassName,
|
|
2548
|
+
_props$searchable = props.searchable,
|
|
2549
|
+
searchable = _props$searchable === void 0 ? false : _props$searchable,
|
|
2550
|
+
_props$searchPlacehol = props.searchPlaceholder,
|
|
2551
|
+
searchPlaceholder = _props$searchPlacehol === void 0 ? '' : _props$searchPlacehol,
|
|
2315
2552
|
_props$perColumnHeade = props.perColumnHeadersShow,
|
|
2316
2553
|
perColumnHeadersShow = _props$perColumnHeade === void 0 ? true : _props$perColumnHeade,
|
|
2317
2554
|
exceededSidePosOffset = props.exceededSidePosOffset,
|
|
@@ -2354,6 +2591,12 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
2354
2591
|
var valRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
2355
2592
|
var listRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
2356
2593
|
|
|
2594
|
+
// searchable
|
|
2595
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
2596
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2597
|
+
columnSearchKeywords = _useState2[0],
|
|
2598
|
+
setColumnSearchKeywords = _useState2[1];
|
|
2599
|
+
|
|
2357
2600
|
// exposes the following methods
|
|
2358
2601
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(popupRef, function () {
|
|
2359
2602
|
return {
|
|
@@ -2369,10 +2612,10 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
2369
2612
|
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
2370
2613
|
|
|
2371
2614
|
// current data depth (GLOBAL)
|
|
2372
|
-
var
|
|
2373
|
-
|
|
2374
|
-
currentDataDepth =
|
|
2375
|
-
setCurrentDataDepth =
|
|
2615
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
2616
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2617
|
+
currentDataDepth = _useState4[0],
|
|
2618
|
+
setCurrentDataDepth = _useState4[1];
|
|
2376
2619
|
|
|
2377
2620
|
// all data from fetched data (GLOBAL)
|
|
2378
2621
|
var allData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
|
|
@@ -2382,26 +2625,26 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
2382
2625
|
|
|
2383
2626
|
// dictionary data
|
|
2384
2627
|
var dictionaryData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
|
|
2385
|
-
var
|
|
2386
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2387
|
-
loading = _useState4[0],
|
|
2388
|
-
setLoading = _useState4[1];
|
|
2389
|
-
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
2628
|
+
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
2390
2629
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
2630
|
+
loading = _useState6[0],
|
|
2631
|
+
setLoading = _useState6[1];
|
|
2632
|
+
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
2394
2633
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
2395
|
-
|
|
2396
|
-
|
|
2634
|
+
columnTitleData = _useState8[0],
|
|
2635
|
+
setColumnTitleData = _useState8[1];
|
|
2397
2636
|
var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
2398
2637
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
2638
|
+
hasErr = _useState10[0],
|
|
2639
|
+
setHasErr = _useState10[1];
|
|
2640
|
+
var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
2402
2641
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
2403
|
-
|
|
2404
|
-
|
|
2642
|
+
firstDataFeched = _useState12[0],
|
|
2643
|
+
setFirstDataFeched = _useState12[1];
|
|
2644
|
+
var _useState13 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || ''),
|
|
2645
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
2646
|
+
changedVal = _useState14[0],
|
|
2647
|
+
setChangedVal = _useState14[1];
|
|
2405
2648
|
|
|
2406
2649
|
//for variable
|
|
2407
2650
|
var listData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
|
|
@@ -2417,10 +2660,10 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
2417
2660
|
values: [],
|
|
2418
2661
|
queryIds: []
|
|
2419
2662
|
});
|
|
2420
|
-
var
|
|
2421
|
-
|
|
2422
|
-
isShow =
|
|
2423
|
-
setIsShow =
|
|
2663
|
+
var _useState15 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
2664
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
2665
|
+
isShow = _useState16[0],
|
|
2666
|
+
setIsShow = _useState16[1];
|
|
2424
2667
|
|
|
2425
2668
|
// click outside
|
|
2426
2669
|
useClickOutside_default()({
|
|
@@ -3381,6 +3624,15 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
3381
3624
|
//--------------
|
|
3382
3625
|
initDefaultValue(value);
|
|
3383
3626
|
}, [value]);
|
|
3627
|
+
|
|
3628
|
+
// Automatically complete and truncate column Search Keywords each time the number of columns changes
|
|
3629
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
3630
|
+
if (listData.current.length !== columnSearchKeywords.length) {
|
|
3631
|
+
setColumnSearchKeywords(Array(listData.current.length).fill('').map(function (v, i) {
|
|
3632
|
+
return columnSearchKeywords[i] || '';
|
|
3633
|
+
}));
|
|
3634
|
+
}
|
|
3635
|
+
}, [listData.current.length]);
|
|
3384
3636
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3385
3637
|
className: (0,cls.clsWrite)(wrapperClassName, 'cas-select-e2e__wrapper mb-3 position-relative', "cas-select-e2e__wrapper ".concat(wrapperClassName)),
|
|
3386
3638
|
ref: rootRef,
|
|
@@ -3457,15 +3709,35 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
3457
3709
|
d: "M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"
|
|
3458
3710
|
}))) : null, listData.current.map(function (item, level) {
|
|
3459
3711
|
if (item.length > 0) {
|
|
3712
|
+
// filter data
|
|
3713
|
+
var filteredItem = item;
|
|
3714
|
+
if (searchable && columnSearchKeywords[level]) {
|
|
3715
|
+
var keyword = columnSearchKeywords[level].toLowerCase();
|
|
3716
|
+
filteredItem = item.filter(function (opt) {
|
|
3717
|
+
return ((0,format_string.htmlToPlain)(opt.name) || '').toLowerCase().includes(keyword);
|
|
3718
|
+
});
|
|
3719
|
+
}
|
|
3460
3720
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
|
|
3461
3721
|
key: level,
|
|
3462
3722
|
"data-col": level,
|
|
3463
3723
|
className: "cas-select-e2e__items-col"
|
|
3464
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(
|
|
3724
|
+
}, searchable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
3725
|
+
className: "cas-select-e2e__items-col-searchbox"
|
|
3726
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
|
|
3727
|
+
type: "text",
|
|
3728
|
+
placeholder: searchPlaceholder,
|
|
3729
|
+
value: columnSearchKeywords[level] || '',
|
|
3730
|
+
onChange: function onChange(e) {
|
|
3731
|
+
var newKeywords = _toConsumableArray(columnSearchKeywords);
|
|
3732
|
+
newKeywords[level] = e.target.value;
|
|
3733
|
+
setColumnSearchKeywords(newKeywords);
|
|
3734
|
+
}
|
|
3735
|
+
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Group, {
|
|
3465
3736
|
perColumnHeadersShow: perColumnHeadersShow,
|
|
3466
3737
|
level: level,
|
|
3467
3738
|
columnTitle: columnTitleData,
|
|
3468
|
-
data:
|
|
3739
|
+
data: filteredItem // filter result
|
|
3740
|
+
,
|
|
3469
3741
|
cleanNodeBtnClassName: cleanNodeBtnClassName,
|
|
3470
3742
|
cleanNodeBtnContent: cleanNodeBtnContent,
|
|
3471
3743
|
selectEv: function selectEv(e, value, index) {
|
|
@@ -537,7 +537,7 @@ var Checkbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
537
537
|
var idRes = id || uniqueID;
|
|
538
538
|
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
539
539
|
var valRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
540
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(
|
|
540
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
541
541
|
_useState2 = _slicedToArray(_useState, 2),
|
|
542
542
|
val = _useState2[0],
|
|
543
543
|
setVal = _useState2[1]; // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
@@ -599,7 +599,9 @@ var Checkbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
599
599
|
}
|
|
600
600
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
601
601
|
// default value
|
|
602
|
-
|
|
602
|
+
if (typeof checked === 'boolean') {
|
|
603
|
+
setVal(checked);
|
|
604
|
+
}
|
|
603
605
|
|
|
604
606
|
// Set a checkbox to indeterminate state
|
|
605
607
|
if (typeof indeterminate !== 'undefined') {
|
|
@@ -2827,6 +2827,7 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
2827
2827
|
onBlur = props.onBlur,
|
|
2828
2828
|
_onPressEnter = props.onPressEnter,
|
|
2829
2829
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
2830
|
+
var QUERY_STRING_PLACEHOLDER = '------'; // Invalid parameters for the first automatic request
|
|
2830
2831
|
var DEPTH = depth || 1055; // the default value same as bootstrap
|
|
2831
2832
|
var POS_OFFSET = 0;
|
|
2832
2833
|
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
@@ -3478,7 +3479,7 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
3478
3479
|
//--------------
|
|
3479
3480
|
var _oparams = fetchFuncMethodParams || [];
|
|
3480
3481
|
var _params = _oparams.map(function (item) {
|
|
3481
|
-
return item !== '$QUERY_STRING' ? item : fetchTrigger && !fetchUpdate ? '' : fetchUpdate ?
|
|
3482
|
+
return item !== '$QUERY_STRING' ? item : fetchTrigger && !fetchUpdate ? '' : fetchUpdate ? QUERY_STRING_PLACEHOLDER : fetchTrigger ? QUERY_STRING_PLACEHOLDER : '';
|
|
3482
3483
|
});
|
|
3483
3484
|
if (!firstFetch) {
|
|
3484
3485
|
fetchData(_params.join(','));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface RefresherProps {
|
|
3
|
+
/** Pulling text */
|
|
4
|
+
pullingText?: React.ReactNode;
|
|
5
|
+
/** Text when reaching the threshold */
|
|
6
|
+
readyToRefreshText?: React.ReactNode;
|
|
7
|
+
/** Refreshing text */
|
|
8
|
+
refreshingText?: React.ReactNode;
|
|
9
|
+
/** The pull distance (px) that triggers the refresh */
|
|
10
|
+
threshold?: number;
|
|
11
|
+
/** The height of the trigger area */
|
|
12
|
+
triggerHeight?: number;
|
|
13
|
+
/** The styles of the trigger area */
|
|
14
|
+
triggerAreaStyle?: React.CSSProperties;
|
|
15
|
+
/** Pull-down is only allowed when the scroll bar of this element is at the top. You can only fire certain actions when the scrollbar is at the top by listening to the scroll event of a given DOM element and determining if its scrollTop is 0. */
|
|
16
|
+
scrollableElementClassName?: string;
|
|
17
|
+
/** Refresh action is async */
|
|
18
|
+
onRefresh: () => Promise<void>;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare const Refresher: (prpps: RefresherProps) => JSX.Element;
|
|
22
|
+
export default Refresher;
|