funda-ui 4.7.133 → 4.7.152

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.
Files changed (57) hide show
  1. package/CascadingSelect/index.css +15 -4
  2. package/CascadingSelect/index.d.ts +2 -0
  3. package/CascadingSelect/index.js +294 -22
  4. package/CascadingSelectE2E/index.css +15 -4
  5. package/CascadingSelectE2E/index.d.ts +2 -0
  6. package/CascadingSelectE2E/index.js +300 -28
  7. package/Chatbox/index.d.ts +7 -0
  8. package/Chatbox/index.js +247 -163
  9. package/Checkbox/index.js +4 -2
  10. package/LiveSearch/index.js +2 -1
  11. package/Refresher/index.js +3 -3
  12. package/Select/index.css +33 -0
  13. package/Select/index.d.ts +1 -0
  14. package/Select/index.js +350 -39
  15. package/SplitterPanel/index.js +3 -3
  16. package/Switch/index.js +4 -2
  17. package/Utils/format-string.d.ts +2 -1
  18. package/Utils/format-string.js +22 -12
  19. package/Utils/time.d.ts +3 -3
  20. package/Utils/useIsMobile.js +3 -3
  21. package/lib/cjs/CascadingSelect/index.d.ts +2 -0
  22. package/lib/cjs/CascadingSelect/index.js +294 -22
  23. package/lib/cjs/CascadingSelectE2E/index.d.ts +2 -0
  24. package/lib/cjs/CascadingSelectE2E/index.js +300 -28
  25. package/lib/cjs/Chatbox/index.d.ts +7 -0
  26. package/lib/cjs/Chatbox/index.js +247 -163
  27. package/lib/cjs/Checkbox/index.js +4 -2
  28. package/lib/cjs/LiveSearch/index.js +2 -1
  29. package/lib/cjs/Refresher/index.js +3 -3
  30. package/lib/cjs/Select/index.d.ts +1 -0
  31. package/lib/cjs/Select/index.js +350 -39
  32. package/lib/cjs/SplitterPanel/index.js +3 -3
  33. package/lib/cjs/Switch/index.js +4 -2
  34. package/lib/cjs/Utils/format-string.d.ts +2 -1
  35. package/lib/cjs/Utils/format-string.js +22 -12
  36. package/lib/cjs/Utils/time.d.ts +3 -3
  37. package/lib/cjs/Utils/useIsMobile.js +3 -3
  38. package/lib/css/CascadingSelect/index.css +15 -4
  39. package/lib/css/CascadingSelectE2E/index.css +15 -4
  40. package/lib/css/Select/index.css +33 -0
  41. package/lib/esm/CascadingSelect/index.scss +22 -7
  42. package/lib/esm/CascadingSelect/index.tsx +49 -1
  43. package/lib/esm/CascadingSelectE2E/Group.tsx +1 -0
  44. package/lib/esm/CascadingSelectE2E/index.scss +23 -6
  45. package/lib/esm/CascadingSelectE2E/index.tsx +53 -1
  46. package/lib/esm/Chatbox/index.tsx +96 -11
  47. package/lib/esm/Checkbox/index.tsx +5 -3
  48. package/lib/esm/LiveSearch/index.tsx +2 -1
  49. package/lib/esm/Select/index.scss +43 -2
  50. package/lib/esm/Select/index.tsx +81 -24
  51. package/lib/esm/Select/utils/func.ts +0 -10
  52. package/lib/esm/Switch/index.tsx +4 -2
  53. package/lib/esm/Textarea/index.tsx +0 -1
  54. package/lib/esm/Utils/hooks/useIsMobile.tsx +9 -12
  55. package/lib/esm/Utils/libs/format-string.ts +22 -12
  56. package/lib/esm/Utils/libs/time.ts +6 -6
  57. package/package.json +1 -1
@@ -459,10 +459,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
459
459
  // Set the mounted state to true after the component has mounted
460
460
  setIsMounted(true);
461
461
  var handleResize = function handleResize() {
462
- if (window) {
462
+ if (typeof window !== 'undefined') {
463
463
  var detectDeviceType = function detectDeviceType() {
464
464
  // 1. First check if window and navigator are available (SSR compatibility)
465
- if (typeof window === 'undefined' || !navigator) {
465
+ if (typeof window === 'undefined' || typeof navigator === 'undefined') {
466
466
  return 'desktop'; // Default to desktop
467
467
  }
468
468
 
@@ -470,7 +470,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
470
470
  var ua = navigator.userAgent.toLowerCase();
471
471
 
472
472
  // 3. Get platform info
473
- var platform = navigator.platform.toLowerCase();
473
+ var platform = navigator.platform ? navigator.platform.toLowerCase() : '';
474
474
 
475
475
  // 4. Check screen characteristics using window.matchMedia
476
476
  var isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
package/Switch/index.js CHANGED
@@ -533,7 +533,7 @@ var Switch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(func
533
533
  var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default()();
534
534
  var idRes = id || uniqueID;
535
535
  var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
536
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)( false || false),
536
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
537
537
  _useState2 = _slicedToArray(_useState, 2),
538
538
  val = _useState2[0],
539
539
  setVal = _useState2[1]; // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
@@ -569,7 +569,9 @@ var Switch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(func
569
569
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
570
570
  }
571
571
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
572
- setVal(checked);
572
+ if (typeof checked === 'boolean') {
573
+ setVal(checked);
574
+ }
573
575
  }, [checked]);
574
576
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
575
577
  className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__.clsWrite)(wrapperClassName, 'mb-3 position-relative'),
@@ -32,13 +32,14 @@ declare function trimAll(input: string): string;
32
32
  */
33
33
  declare function multiSpacesToSingle(input: string): string;
34
34
  /**
35
- * Convert HTML text to plain text
35
+ * Convert HTML text to plain text (Remove html tag content)
36
36
  * @param {string} input - The input string to process
37
37
  * @returns {string} The processed string
38
38
  */
39
39
  declare function htmlToPlain(input: string): string;
40
40
  /**
41
41
  * Strip HTML tags and their content
42
+ * !!!Important: It will remove nested tags
42
43
  * @param {string} input - The input string to process
43
44
  * @returns {string} The processed string
44
45
  */
@@ -67,7 +67,7 @@ __webpack_require__.r(__webpack_exports__);
67
67
  * @returns {string} The processed string
68
68
  */
69
69
  function rmSpec(input) {
70
- return input.replace(/[^a-zA-Z0-9 \u4E00-\u9FFF]/g, "");
70
+ return input === null || input === void 0 ? void 0 : input.replace(/[^a-zA-Z0-9 \u4E00-\u9FFF]/g, "");
71
71
  }
72
72
 
73
73
  /**
@@ -76,7 +76,7 @@ function rmSpec(input) {
76
76
  * @returns {string} The processed string
77
77
  */
78
78
  function onlyNumAndLetter(input) {
79
- return input.replace(/[^a-zA-Z0-9 ]/g, "");
79
+ return input === null || input === void 0 ? void 0 : input.replace(/[^a-zA-Z0-9 ]/g, "");
80
80
  }
81
81
 
82
82
  /**
@@ -85,7 +85,7 @@ function onlyNumAndLetter(input) {
85
85
  * @returns {string} The processed string
86
86
  */
87
87
  function rmAllSpace(input) {
88
- return input.replace(/\s/g, "");
88
+ return input === null || input === void 0 ? void 0 : input.replace(/\s/g, "");
89
89
  }
90
90
 
91
91
  /**
@@ -94,7 +94,7 @@ function rmAllSpace(input) {
94
94
  * @returns {string} The processed string
95
95
  */
96
96
  function trimAll(input) {
97
- return input.replace(/(^\s+)|(\s+$)/g, "");
97
+ return input === null || input === void 0 ? void 0 : input.replace(/(^\s+)|(\s+$)/g, "");
98
98
  }
99
99
 
100
100
  /**
@@ -103,25 +103,35 @@ function trimAll(input) {
103
103
  * @returns {string} The processed string
104
104
  */
105
105
  function multiSpacesToSingle(input) {
106
- return input.replace(/\s+(\W)/g, ' ');
106
+ return input === null || input === void 0 ? void 0 : input.replace(/\s+(\W)/g, ' ');
107
107
  }
108
108
 
109
109
  /**
110
- * Convert HTML text to plain text
110
+ * Convert HTML text to plain text (Remove html tag content)
111
111
  * @param {string} input - The input string to process
112
112
  * @returns {string} The processed string
113
113
  */
114
+ /*
115
+ Examples:
116
+ console.log(htmlToPlain("<p>Hello <b>World</b></p>")); // Hello World
117
+ */
114
118
  function htmlToPlain(input) {
115
- return input.replace(/(<([^>]+)>)/ig, '');
119
+ return input === null || input === void 0 ? void 0 : input.replace(/(<([^>]+)>)/ig, '');
116
120
  }
117
121
 
118
122
  /**
119
- * Strip HTML tags and their content
123
+ * Strip HTML tags and their content
124
+ * !!!Important: It will remove nested tags
120
125
  * @param {string} input - The input string to process
121
126
  * @returns {string} The processed string
122
127
  */
128
+ /*
129
+ Examples:
130
+ console.log(stripTagsAndContent("<p>Hello <b>World</b></p>")); // World
131
+ console.log(stripTagsAndContent("Hello <b>World</b>")); // Hello
132
+ */
123
133
  function stripTagsAndContent(input) {
124
- return input.replace(/<\/?[^>]+(>|$)(.*?)<\/?[^>]+(>|$)/ig, '');
134
+ return input === null || input === void 0 ? void 0 : input.replace(/<\/?[^>]+(>|$)(.*?)<\/?[^>]+(>|$)/ig, '');
125
135
  }
126
136
 
127
137
  /**
@@ -130,7 +140,7 @@ function stripTagsAndContent(input) {
130
140
  * @returns {string} The processed URL
131
141
  */
132
142
  function removeFirstLastSlash(input) {
133
- return input.replace(/^\/|\/$/g, '');
143
+ return input === null || input === void 0 ? void 0 : input.replace(/^\/|\/$/g, '');
134
144
  }
135
145
 
136
146
  /**
@@ -139,7 +149,7 @@ function removeFirstLastSlash(input) {
139
149
  * @returns {string} The processed URL
140
150
  */
141
151
  function removeTrailingSlash(input) {
142
- return input.replace(/\/+$/, '');
152
+ return input === null || input === void 0 ? void 0 : input.replace(/\/+$/, '');
143
153
  }
144
154
 
145
155
  /**
@@ -148,7 +158,7 @@ function removeTrailingSlash(input) {
148
158
  * @returns {string} The processed URL
149
159
  */
150
160
  function removeFirstSlash(input) {
151
- return input.replace(/\//, '');
161
+ return input === null || input === void 0 ? void 0 : input.replace(/\//, '');
152
162
  }
153
163
 
154
164
  /******/ return __webpack_exports__;
package/Utils/time.d.ts CHANGED
@@ -17,18 +17,18 @@ declare function getTimeslots(startTime: string, endTime: string, timeInterval:
17
17
  * @param {Date} endDate - ebd date
18
18
  * @returns Number
19
19
  */
20
- declare function getMinutesBetweenDates(startDate: any, endDate: any): number;
20
+ declare function getMinutesBetweenDates(startDate: Date, endDate: Date): number;
21
21
  /**
22
22
  * Get minutes between two time
23
23
  * @param {String} startTime - start time
24
24
  * @param {String} endTime - ebd time
25
25
  * @returns Number
26
26
  */
27
- declare function getMinutesBetweenTime(startTime: any, endTime: any): string;
27
+ declare function getMinutesBetweenTime(startTime: string, endTime: string): string;
28
28
  /**
29
29
  * Convert HH:MM:SS into minute
30
30
  * @param {String} timeStr - time string
31
31
  * @returns Number
32
32
  */
33
- declare function convertTimeToMin(timeStr: any): number;
33
+ declare function convertTimeToMin(timeStr: string): number;
34
34
  export { getTimeslots, getMinutesBetweenDates, getMinutesBetweenTime, convertTimeToMin };
@@ -140,10 +140,10 @@ var useIsMobile = function useIsMobile() {
140
140
  // Set the mounted state to true after the component has mounted
141
141
  setIsMounted(true);
142
142
  var handleResize = function handleResize() {
143
- if (window) {
143
+ if (typeof window !== 'undefined') {
144
144
  var detectDeviceType = function detectDeviceType() {
145
145
  // 1. First check if window and navigator are available (SSR compatibility)
146
- if (typeof window === 'undefined' || !navigator) {
146
+ if (typeof window === 'undefined' || typeof navigator === 'undefined') {
147
147
  return 'desktop'; // Default to desktop
148
148
  }
149
149
 
@@ -151,7 +151,7 @@ var useIsMobile = function useIsMobile() {
151
151
  var ua = navigator.userAgent.toLowerCase();
152
152
 
153
153
  // 3. Get platform info
154
- var platform = navigator.platform.toLowerCase();
154
+ var platform = navigator.platform ? navigator.platform.toLowerCase() : '';
155
155
 
156
156
  // 4. Check screen characteristics using window.matchMedia
157
157
  var isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
@@ -5,6 +5,8 @@ export declare type CascadingSelectProps = {
5
5
  wrapperClassName?: string;
6
6
  controlClassName?: string;
7
7
  controlExClassName?: string;
8
+ searchable?: boolean;
9
+ searchPlaceholder?: string;
8
10
  perColumnHeadersShow?: boolean;
9
11
  exceededSidePosOffset?: number;
10
12
  value?: string;
@@ -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
 
@@ -1851,6 +2081,8 @@ var extract = __webpack_require__(135);
1851
2081
  var convert = __webpack_require__(79);
1852
2082
  // EXTERNAL MODULE: ../Utils/dist/cjs/getElementProperty.js
1853
2083
  var getElementProperty = __webpack_require__(767);
2084
+ // EXTERNAL MODULE: ../Utils/dist/cjs/format-string.js
2085
+ var format_string = __webpack_require__(933);
1854
2086
  // EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
1855
2087
  var cls = __webpack_require__(188);
1856
2088
  ;// CONCATENATED MODULE: ./src/Group.tsx
@@ -1920,14 +2152,14 @@ function Group(props) {
1920
2152
  }));
1921
2153
  }
1922
2154
  ;// CONCATENATED MODULE: ./src/index.tsx
1923
- var _excluded = ["popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "perColumnHeadersShow", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
2155
+ var _excluded = ["popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "searchable", "searchPlaceholder", "perColumnHeadersShow", "exceededSidePosOffset", "disabled", "required", "value", "label", "placeholder", "name", "id", "extractValueByBraces", "columnTitle", "depth", "loader", "displayResult", "displayResultArrow", "controlArrow", "valueType", "showCloseBtn", "style", "tabIndex", "triggerClassName", "triggerContent", "cleanNodeBtnClassName", "cleanNodeBtnContent", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange", "onBlur", "onFocus"];
1924
2156
  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; }
2157
+ 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); }
2158
+ 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); }
1925
2159
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1926
2160
  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."); }
1927
2161
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1928
2162
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1929
- 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); }
1930
- 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); }
1931
2163
  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); } }
1932
2164
  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); }); }; }
1933
2165
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -1948,11 +2180,16 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
1948
2180
 
1949
2181
 
1950
2182
 
2183
+
1951
2184
  var CascadingSelect = function CascadingSelect(props) {
1952
2185
  var popupRef = props.popupRef,
1953
2186
  wrapperClassName = props.wrapperClassName,
1954
2187
  controlClassName = props.controlClassName,
1955
2188
  controlExClassName = props.controlExClassName,
2189
+ _props$searchable = props.searchable,
2190
+ searchable = _props$searchable === void 0 ? false : _props$searchable,
2191
+ _props$searchPlacehol = props.searchPlaceholder,
2192
+ searchPlaceholder = _props$searchPlacehol === void 0 ? '' : _props$searchPlacehol,
1956
2193
  _props$perColumnHeade = props.perColumnHeadersShow,
1957
2194
  perColumnHeadersShow = _props$perColumnHeade === void 0 ? true : _props$perColumnHeade,
1958
2195
  exceededSidePosOffset = props.exceededSidePosOffset,
@@ -1997,6 +2234,12 @@ var CascadingSelect = function CascadingSelect(props) {
1997
2234
  var valRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1998
2235
  var listRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
1999
2236
 
2237
+ // searchable
2238
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
2239
+ _useState2 = _slicedToArray(_useState, 2),
2240
+ columnSearchKeywords = _useState2[0],
2241
+ setColumnSearchKeywords = _useState2[1];
2242
+
2000
2243
  // exposes the following methods
2001
2244
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(popupRef, function () {
2002
2245
  return {
@@ -2012,22 +2255,22 @@ var CascadingSelect = function CascadingSelect(props) {
2012
2255
  // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2013
2256
 
2014
2257
  var dictionaryData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
2015
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2016
- _useState2 = _slicedToArray(_useState, 2),
2017
- loading = _useState2[0],
2018
- setLoading = _useState2[1];
2019
- var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
2258
+ var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2020
2259
  _useState4 = _slicedToArray(_useState3, 2),
2021
- columnTitleData = _useState4[0],
2022
- setColumnTitleData = _useState4[1];
2023
- var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2260
+ loading = _useState4[0],
2261
+ setLoading = _useState4[1];
2262
+ var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
2024
2263
  _useState6 = _slicedToArray(_useState5, 2),
2025
- hasErr = _useState6[0],
2026
- setHasErr = _useState6[1];
2027
- var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || ''),
2264
+ columnTitleData = _useState6[0],
2265
+ setColumnTitleData = _useState6[1];
2266
+ var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2028
2267
  _useState8 = _slicedToArray(_useState7, 2),
2029
- changedVal = _useState8[0],
2030
- setChangedVal = _useState8[1];
2268
+ hasErr = _useState8[0],
2269
+ setHasErr = _useState8[1];
2270
+ var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || ''),
2271
+ _useState10 = _slicedToArray(_useState9, 2),
2272
+ changedVal = _useState10[0],
2273
+ setChangedVal = _useState10[1];
2031
2274
 
2032
2275
  //for variable
2033
2276
  var listData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
@@ -2035,10 +2278,10 @@ var CascadingSelect = function CascadingSelect(props) {
2035
2278
  labels: [],
2036
2279
  values: []
2037
2280
  });
2038
- var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2039
- _useState10 = _slicedToArray(_useState9, 2),
2040
- isShow = _useState10[0],
2041
- setIsShow = _useState10[1];
2281
+ var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
2282
+ _useState12 = _slicedToArray(_useState11, 2),
2283
+ isShow = _useState12[0],
2284
+ setIsShow = _useState12[1];
2042
2285
 
2043
2286
  // click outside
2044
2287
  useClickOutside_default()({
@@ -2794,6 +3037,15 @@ var CascadingSelect = function CascadingSelect(props) {
2794
3037
  //--------------
2795
3038
  initDefaultValue(value);
2796
3039
  }, [value]);
3040
+
3041
+ // Automatically complete and truncate column Search Keywords each time the number of columns changes
3042
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3043
+ if (listData.current.length !== columnSearchKeywords.length) {
3044
+ setColumnSearchKeywords(Array(listData.current.length).fill('').map(function (v, i) {
3045
+ return columnSearchKeywords[i] || '';
3046
+ }));
3047
+ }
3048
+ }, [listData.current.length]);
2797
3049
  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", {
2798
3050
  className: (0,cls.clsWrite)(wrapperClassName, 'cas-select__wrapper mb-3 position-relative', "cas-select__wrapper ".concat(wrapperClassName)),
2799
3051
  ref: rootRef,
@@ -2870,15 +3122,35 @@ var CascadingSelect = function CascadingSelect(props) {
2870
3122
  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"
2871
3123
  }))) : null, listData.current.map(function (item, level) {
2872
3124
  if (item.length > 0) {
3125
+ // filter data
3126
+ var filteredItem = item;
3127
+ if (searchable && columnSearchKeywords[level]) {
3128
+ var keyword = columnSearchKeywords[level].toLowerCase();
3129
+ filteredItem = item.filter(function (opt) {
3130
+ return ((0,format_string.htmlToPlain)(opt.name) || '').toLowerCase().includes(keyword);
3131
+ });
3132
+ }
2873
3133
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
2874
3134
  key: level,
2875
3135
  "data-col": level,
2876
3136
  className: "cas-select__items-col"
2877
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Group, {
3137
+ }, searchable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
3138
+ className: "cas-select__items-col-searchbox"
3139
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
3140
+ type: "text",
3141
+ placeholder: searchPlaceholder,
3142
+ value: columnSearchKeywords[level] || '',
3143
+ onChange: function onChange(e) {
3144
+ var newKeywords = _toConsumableArray(columnSearchKeywords);
3145
+ newKeywords[level] = e.target.value;
3146
+ setColumnSearchKeywords(newKeywords);
3147
+ }
3148
+ })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Group, {
2878
3149
  perColumnHeadersShow: perColumnHeadersShow,
2879
3150
  level: level,
2880
3151
  columnTitle: columnTitleData,
2881
- data: item,
3152
+ data: filteredItem // filter result
3153
+ ,
2882
3154
  cleanNodeBtnClassName: cleanNodeBtnClassName,
2883
3155
  cleanNodeBtnContent: cleanNodeBtnContent,
2884
3156
  selectEv: function selectEv(e, value, index) {
@@ -14,6 +14,8 @@ export declare type CascadingSelectE2EProps = {
14
14
  wrapperClassName?: string;
15
15
  controlClassName?: string;
16
16
  controlExClassName?: string;
17
+ searchable?: boolean;
18
+ searchPlaceholder?: string;
17
19
  perColumnHeadersShow?: boolean;
18
20
  exceededSidePosOffset?: number;
19
21
  value?: string;