funda-ui 2.2.555 → 2.5.105
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.js +245 -52
- package/CascadingSelectE2E/index.js +245 -52
- package/Checkbox/index.js +5 -2
- package/ColorPicker/index.js +5 -2
- package/DropdownMenu/index.js +250 -49
- package/DynamicFields/index.js +4 -2
- package/EventCalendar/index.js +311 -109
- package/EventCalendarTimeline/index.js +521 -125
- package/Input/index.js +5 -2
- package/LiveSearch/index.d.ts +1 -0
- package/LiveSearch/index.js +240 -71
- package/ModalDialog/index.d.ts +6 -4
- package/ModalDialog/index.js +278 -91
- package/MultiFuncSelect/index.js +309 -135
- package/MultipleCheckboxes/index.js +10 -4
- package/Pagination/index.d.ts +8 -8
- package/Pagination/index.js +79 -42
- package/README.md +5 -6
- package/Radio/index.js +5 -2
- package/RangeSlider/index.js +10 -4
- package/RootPortal/index.d.ts +8 -0
- package/RootPortal/index.js +141 -0
- package/SearchBar/index.d.ts +1 -0
- package/SearchBar/index.js +8 -4
- package/Select/index.js +5 -2
- package/Switch/index.js +5 -2
- package/Table/index.css +20 -0
- package/Table/index.d.ts +6 -0
- package/Table/index.js +215 -997
- package/TagInput/index.js +5 -2
- package/Textarea/index.js +5 -2
- package/Toast/index.d.ts +2 -0
- package/Toast/index.js +298 -69
- package/Tooltip/index.css +5 -6
- package/Tooltip/index.js +331 -65
- package/Tree/index.js +5 -2
- package/all.d.ts +1 -0
- package/all.js +1 -0
- package/lib/cjs/CascadingSelect/index.js +245 -52
- package/lib/cjs/CascadingSelectE2E/index.js +245 -52
- package/lib/cjs/Checkbox/index.js +5 -2
- package/lib/cjs/ColorPicker/index.js +5 -2
- package/lib/cjs/DropdownMenu/index.js +250 -49
- package/lib/cjs/DynamicFields/index.js +4 -2
- package/lib/cjs/EventCalendar/index.js +311 -109
- package/lib/cjs/EventCalendarTimeline/index.js +521 -125
- package/lib/cjs/Input/index.js +5 -2
- package/lib/cjs/LiveSearch/index.d.ts +1 -0
- package/lib/cjs/LiveSearch/index.js +240 -71
- package/lib/cjs/ModalDialog/index.d.ts +6 -4
- package/lib/cjs/ModalDialog/index.js +278 -91
- package/lib/cjs/MultiFuncSelect/index.js +309 -135
- package/lib/cjs/MultipleCheckboxes/index.js +10 -4
- package/lib/cjs/Pagination/index.d.ts +8 -8
- package/lib/cjs/Pagination/index.js +79 -42
- package/lib/cjs/Radio/index.js +5 -2
- package/lib/cjs/RangeSlider/index.js +10 -4
- package/lib/cjs/RootPortal/index.d.ts +8 -0
- package/lib/cjs/RootPortal/index.js +141 -0
- package/lib/cjs/SearchBar/index.d.ts +1 -0
- package/lib/cjs/SearchBar/index.js +8 -4
- package/lib/cjs/Select/index.js +5 -2
- package/lib/cjs/Switch/index.js +5 -2
- package/lib/cjs/Table/index.d.ts +6 -0
- package/lib/cjs/Table/index.js +215 -997
- package/lib/cjs/TagInput/index.js +5 -2
- package/lib/cjs/Textarea/index.js +5 -2
- package/lib/cjs/Toast/index.d.ts +2 -0
- package/lib/cjs/Toast/index.js +298 -69
- package/lib/cjs/Tooltip/index.js +331 -65
- package/lib/cjs/Tree/index.js +5 -2
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/css/Table/index.css +20 -0
- package/lib/css/Tooltip/index.css +5 -6
- package/lib/esm/CascadingSelect/Group.tsx +14 -11
- package/lib/esm/CascadingSelect/index.tsx +85 -132
- package/lib/esm/CascadingSelectE2E/Group.tsx +15 -12
- package/lib/esm/CascadingSelectE2E/index.tsx +72 -117
- package/lib/esm/Checkbox/index.tsx +1 -1
- package/lib/esm/ColorPicker/index.tsx +1 -1
- package/lib/esm/DropdownMenu/Option.tsx +15 -2
- package/lib/esm/DropdownMenu/index.tsx +24 -60
- package/lib/esm/DynamicFields/index.tsx +1 -1
- package/lib/esm/EventCalendar/index.tsx +2 -3
- package/lib/esm/EventCalendarTimeline/index.tsx +4 -17
- package/lib/esm/Input/index.tsx +1 -1
- package/lib/esm/LiveSearch/index.tsx +125 -185
- package/lib/esm/ModalDialog/index.tsx +111 -143
- package/lib/esm/MultiFuncSelect/index.tsx +197 -247
- package/lib/esm/MultipleCheckboxes/index.tsx +1 -1
- package/lib/esm/Pagination/index.tsx +101 -58
- package/lib/esm/Radio/index.tsx +1 -1
- package/lib/esm/RangeSlider/index.tsx +1 -1
- package/lib/esm/RootPortal/index.tsx +53 -0
- package/lib/esm/SearchBar/index.tsx +4 -2
- package/lib/esm/Select/index.tsx +1 -1
- package/lib/esm/Switch/index.tsx +1 -1
- package/lib/esm/Table/TableField.tsx +19 -3
- package/lib/esm/Table/TableFieldRow.tsx +131 -39
- package/lib/esm/Table/TableHeaders.tsx +2 -3
- package/lib/esm/Table/TableRow.tsx +60 -22
- package/lib/esm/Table/index.scss +35 -0
- package/lib/esm/Table/index.tsx +26 -3
- package/lib/esm/Table/table-utils.ts +1 -1
- package/lib/esm/TagInput/index.tsx +1 -1
- package/lib/esm/Textarea/index.tsx +1 -1
- package/lib/esm/Toast/Item.tsx +38 -5
- package/lib/esm/Toast/index.scss +4 -1
- package/lib/esm/Toast/index.tsx +93 -94
- package/lib/esm/Tooltip/index.scss +6 -6
- package/lib/esm/Tooltip/index.tsx +104 -69
- package/lib/esm/index.js +1 -0
- package/package.json +1 -1
package/CascadingSelect/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("react"));
|
|
3
|
+
module.exports = factory(require("react"), require("react-dom"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define(["react"], factory);
|
|
5
|
+
define(["react", "react-dom"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["RPB"] = factory(require("react"));
|
|
7
|
+
exports["RPB"] = factory(require("react"), require("react-dom"));
|
|
8
8
|
else
|
|
9
|
-
root["RPB"] = factory(root["React"]);
|
|
10
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
|
|
9
|
+
root["RPB"] = factory(root["React"], root["ReactDOM"]);
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -332,12 +332,215 @@ module.exports = {
|
|
|
332
332
|
|
|
333
333
|
/***/ }),
|
|
334
334
|
|
|
335
|
+
/***/ 909:
|
|
336
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
337
|
+
|
|
338
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
339
|
+
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); }
|
|
340
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
341
|
+
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__webpack_require__(787), __webpack_require__(156));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(787), __webpack_require__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
342
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
343
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
344
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
345
|
+
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) {
|
|
346
|
+
return (/******/function () {
|
|
347
|
+
// webpackBootstrap
|
|
348
|
+
/******/
|
|
349
|
+
"use strict";
|
|
350
|
+
|
|
351
|
+
/******/
|
|
352
|
+
var __webpack_modules__ = {
|
|
353
|
+
/***/787: /***/function _(module) {
|
|
354
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
355
|
+
|
|
356
|
+
/***/
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
/***/156: /***/function _(module) {
|
|
360
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
361
|
+
|
|
362
|
+
/***/
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/******/
|
|
366
|
+
};
|
|
367
|
+
/************************************************************************/
|
|
368
|
+
/******/ // The module cache
|
|
369
|
+
/******/
|
|
370
|
+
var __webpack_module_cache__ = {};
|
|
371
|
+
/******/
|
|
372
|
+
/******/ // The require function
|
|
373
|
+
/******/
|
|
374
|
+
function __nested_webpack_require_1708__(moduleId) {
|
|
375
|
+
/******/ // Check if module is in cache
|
|
376
|
+
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
377
|
+
/******/
|
|
378
|
+
if (cachedModule !== undefined) {
|
|
379
|
+
/******/return cachedModule.exports;
|
|
380
|
+
/******/
|
|
381
|
+
}
|
|
382
|
+
/******/ // Create a new module (and put it into the cache)
|
|
383
|
+
/******/
|
|
384
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
385
|
+
/******/ // no module.id needed
|
|
386
|
+
/******/ // no module.loaded needed
|
|
387
|
+
/******/exports: {}
|
|
388
|
+
/******/
|
|
389
|
+
};
|
|
390
|
+
/******/
|
|
391
|
+
/******/ // Execute the module function
|
|
392
|
+
/******/
|
|
393
|
+
__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_1708__);
|
|
394
|
+
/******/
|
|
395
|
+
/******/ // Return the exports of the module
|
|
396
|
+
/******/
|
|
397
|
+
return module.exports;
|
|
398
|
+
/******/
|
|
399
|
+
}
|
|
400
|
+
/******/
|
|
401
|
+
/************************************************************************/
|
|
402
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
403
|
+
/******/
|
|
404
|
+
(function () {
|
|
405
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
406
|
+
/******/__nested_webpack_require_1708__.n = function (module) {
|
|
407
|
+
/******/var getter = module && module.__esModule ? /******/function () {
|
|
408
|
+
return module['default'];
|
|
409
|
+
} : /******/function () {
|
|
410
|
+
return module;
|
|
411
|
+
};
|
|
412
|
+
/******/
|
|
413
|
+
__nested_webpack_require_1708__.d(getter, {
|
|
414
|
+
a: getter
|
|
415
|
+
});
|
|
416
|
+
/******/
|
|
417
|
+
return getter;
|
|
418
|
+
/******/
|
|
419
|
+
};
|
|
420
|
+
/******/
|
|
421
|
+
})();
|
|
422
|
+
/******/
|
|
423
|
+
/******/ /* webpack/runtime/define property getters */
|
|
424
|
+
/******/
|
|
425
|
+
(function () {
|
|
426
|
+
/******/ // define getter functions for harmony exports
|
|
427
|
+
/******/__nested_webpack_require_1708__.d = function (exports, definition) {
|
|
428
|
+
/******/for (var key in definition) {
|
|
429
|
+
/******/if (__nested_webpack_require_1708__.o(definition, key) && !__nested_webpack_require_1708__.o(exports, key)) {
|
|
430
|
+
/******/Object.defineProperty(exports, key, {
|
|
431
|
+
enumerable: true,
|
|
432
|
+
get: definition[key]
|
|
433
|
+
});
|
|
434
|
+
/******/
|
|
435
|
+
}
|
|
436
|
+
/******/
|
|
437
|
+
}
|
|
438
|
+
/******/
|
|
439
|
+
};
|
|
440
|
+
/******/
|
|
441
|
+
})();
|
|
442
|
+
/******/
|
|
443
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
444
|
+
/******/
|
|
445
|
+
(function () {
|
|
446
|
+
/******/__nested_webpack_require_1708__.o = function (obj, prop) {
|
|
447
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
448
|
+
};
|
|
449
|
+
/******/
|
|
450
|
+
})();
|
|
451
|
+
/******/
|
|
452
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
453
|
+
/******/
|
|
454
|
+
(function () {
|
|
455
|
+
/******/ // define __esModule on exports
|
|
456
|
+
/******/__nested_webpack_require_1708__.r = function (exports) {
|
|
457
|
+
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
458
|
+
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
459
|
+
value: 'Module'
|
|
460
|
+
});
|
|
461
|
+
/******/
|
|
462
|
+
}
|
|
463
|
+
/******/
|
|
464
|
+
Object.defineProperty(exports, '__esModule', {
|
|
465
|
+
value: true
|
|
466
|
+
});
|
|
467
|
+
/******/
|
|
468
|
+
};
|
|
469
|
+
/******/
|
|
470
|
+
})();
|
|
471
|
+
/******/
|
|
472
|
+
/************************************************************************/
|
|
473
|
+
var __webpack_exports__ = {};
|
|
474
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
475
|
+
(function () {
|
|
476
|
+
__nested_webpack_require_1708__.r(__webpack_exports__);
|
|
477
|
+
/* harmony export */
|
|
478
|
+
__nested_webpack_require_1708__.d(__webpack_exports__, {
|
|
479
|
+
/* harmony export */"default": function _default() {
|
|
480
|
+
return __WEBPACK_DEFAULT_EXPORT__;
|
|
481
|
+
}
|
|
482
|
+
/* harmony export */
|
|
483
|
+
});
|
|
484
|
+
/* harmony import */
|
|
485
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_1708__(787);
|
|
486
|
+
/* harmony import */
|
|
487
|
+
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
488
|
+
/* harmony import */
|
|
489
|
+
var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_1708__(156);
|
|
490
|
+
/* harmony import */
|
|
491
|
+
var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_1708__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
492
|
+
var RootPortal = function RootPortal(props) {
|
|
493
|
+
var containerClassName = props.containerClassName,
|
|
494
|
+
show = props.show,
|
|
495
|
+
children = props.children;
|
|
496
|
+
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
497
|
+
|
|
498
|
+
// Move HTML templates to tag end body </body>
|
|
499
|
+
// render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
|
|
500
|
+
// prevent "transform", "filter", "perspective" attribute destruction fixed viewport orientation
|
|
501
|
+
// ###
|
|
502
|
+
// ###
|
|
503
|
+
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
504
|
+
|
|
505
|
+
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
506
|
+
containerRef.current = document.createElement('div');
|
|
507
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
508
|
+
document.body.appendChild(containerRef.current);
|
|
509
|
+
return function () {
|
|
510
|
+
if (containerRef.current) {
|
|
511
|
+
containerRef.current.remove();
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
}, []);
|
|
515
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
516
|
+
};
|
|
517
|
+
/* harmony default export */
|
|
518
|
+
var __WEBPACK_DEFAULT_EXPORT__ = RootPortal;
|
|
519
|
+
})();
|
|
520
|
+
|
|
521
|
+
/******/
|
|
522
|
+
return __webpack_exports__;
|
|
523
|
+
/******/
|
|
524
|
+
}()
|
|
525
|
+
);
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
/***/ }),
|
|
529
|
+
|
|
335
530
|
/***/ 787:
|
|
336
531
|
/***/ ((module) => {
|
|
337
532
|
|
|
338
533
|
"use strict";
|
|
339
534
|
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
340
535
|
|
|
536
|
+
/***/ }),
|
|
537
|
+
|
|
538
|
+
/***/ 156:
|
|
539
|
+
/***/ ((module) => {
|
|
540
|
+
|
|
541
|
+
"use strict";
|
|
542
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
543
|
+
|
|
341
544
|
/***/ })
|
|
342
545
|
|
|
343
546
|
/******/ });
|
|
@@ -354,13 +557,16 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
|
354
557
|
/******/ }
|
|
355
558
|
/******/ // Create a new module (and put it into the cache)
|
|
356
559
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
357
|
-
/******/
|
|
358
|
-
/******/
|
|
560
|
+
/******/ id: moduleId,
|
|
561
|
+
/******/ loaded: false,
|
|
359
562
|
/******/ exports: {}
|
|
360
563
|
/******/ };
|
|
361
564
|
/******/
|
|
362
565
|
/******/ // Execute the module function
|
|
363
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
566
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
567
|
+
/******/
|
|
568
|
+
/******/ // Flag the module as loaded
|
|
569
|
+
/******/ module.loaded = true;
|
|
364
570
|
/******/
|
|
365
571
|
/******/ // Return the exports of the module
|
|
366
572
|
/******/ return module.exports;
|
|
@@ -407,6 +613,15 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
|
407
613
|
/******/ };
|
|
408
614
|
/******/ })();
|
|
409
615
|
/******/
|
|
616
|
+
/******/ /* webpack/runtime/node module decorator */
|
|
617
|
+
/******/ (() => {
|
|
618
|
+
/******/ __webpack_require__.nmd = (module) => {
|
|
619
|
+
/******/ module.paths = [];
|
|
620
|
+
/******/ if (!module.children) module.children = [];
|
|
621
|
+
/******/ return module;
|
|
622
|
+
/******/ };
|
|
623
|
+
/******/ })();
|
|
624
|
+
/******/
|
|
410
625
|
/************************************************************************/
|
|
411
626
|
var __webpack_exports__ = {};
|
|
412
627
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
@@ -423,6 +638,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
423
638
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
424
639
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
425
640
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
641
|
+
// EXTERNAL MODULE: ../RootPortal/dist/cjs/index.js
|
|
642
|
+
var cjs = __webpack_require__(909);
|
|
643
|
+
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
|
|
426
644
|
// EXTERNAL MODULE: ./src/utils/performance.js
|
|
427
645
|
var performance = __webpack_require__(342);
|
|
428
646
|
;// CONCATENATED MODULE: ./src/Group.tsx
|
|
@@ -446,6 +664,10 @@ function Group(props) {
|
|
|
446
664
|
className: "cas-select__opt ".concat(item.current ? 'active' : ''),
|
|
447
665
|
dangerouslySetInnerHTML: {
|
|
448
666
|
__html: typeof item.label !== 'undefined' ? item.label : item.name // "item.label" usually uses hierarchical style
|
|
667
|
+
},
|
|
668
|
+
|
|
669
|
+
onClick: function onClick(e) {
|
|
670
|
+
return selectEv === null || selectEv === void 0 ? void 0 : selectEv(e, item, index);
|
|
449
671
|
}
|
|
450
672
|
});
|
|
451
673
|
} else {
|
|
@@ -467,7 +689,10 @@ function Group(props) {
|
|
|
467
689
|
"data-index": index,
|
|
468
690
|
"data-id": item.id,
|
|
469
691
|
"data-value": JSON.stringify(item),
|
|
470
|
-
"data-level": level
|
|
692
|
+
"data-level": level,
|
|
693
|
+
onClick: function onClick(e) {
|
|
694
|
+
return selectEv === null || selectEv === void 0 ? void 0 : selectEv(e, item, index);
|
|
695
|
+
}
|
|
471
696
|
}, cleanNodeBtnContent || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
472
697
|
width: "12px",
|
|
473
698
|
height: "12px",
|
|
@@ -511,6 +736,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
511
736
|
|
|
512
737
|
|
|
513
738
|
|
|
739
|
+
|
|
514
740
|
var CascadingSelect = function CascadingSelect(props) {
|
|
515
741
|
var wrapperClassName = props.wrapperClassName,
|
|
516
742
|
controlClassName = props.controlClassName,
|
|
@@ -683,27 +909,6 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
683
909
|
_modalRef.classList.remove('active');
|
|
684
910
|
}
|
|
685
911
|
}
|
|
686
|
-
function popwinBtnEventsInit() {
|
|
687
|
-
if (listRef.current === null) return;
|
|
688
|
-
|
|
689
|
-
// options event listener
|
|
690
|
-
// !!! to prevent button mismatch when changing
|
|
691
|
-
if (listData.current.length > 0) {
|
|
692
|
-
[].slice.call(listRef.current.querySelectorAll('[data-opt]')).forEach(function (node) {
|
|
693
|
-
if (typeof node.dataset.ev === 'undefined') {
|
|
694
|
-
node.dataset.ev = 'true';
|
|
695
|
-
|
|
696
|
-
// Prevent touch screen from starting to click option, DO NOT USE "pointerdown"
|
|
697
|
-
node.addEventListener('click', function (e) {
|
|
698
|
-
var _value = JSON.parse(e.currentTarget.dataset.value);
|
|
699
|
-
var _index = Number(e.currentTarget.dataset.index);
|
|
700
|
-
var _level = Number(e.currentTarget.dataset.level);
|
|
701
|
-
handleClickItem(e, _value, _index, _level, listData.current);
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
912
|
function updateColDisplay(useFetch) {
|
|
708
913
|
var emptyAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
709
914
|
var level = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -741,11 +946,6 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
741
946
|
}
|
|
742
947
|
});
|
|
743
948
|
}
|
|
744
|
-
|
|
745
|
-
// initialize events for options
|
|
746
|
-
setTimeout(function () {
|
|
747
|
-
popwinBtnEventsInit();
|
|
748
|
-
}, 0);
|
|
749
949
|
}
|
|
750
950
|
function cancel() {
|
|
751
951
|
// hide list
|
|
@@ -759,7 +959,6 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
759
959
|
// window position
|
|
760
960
|
setTimeout(function () {
|
|
761
961
|
popwinPosInit();
|
|
762
|
-
popwinBtnEventsInit();
|
|
763
962
|
}, 0);
|
|
764
963
|
}
|
|
765
964
|
function fetchData(_x2) {
|
|
@@ -1336,14 +1535,6 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
1336
1535
|
}));
|
|
1337
1536
|
}
|
|
1338
1537
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
1339
|
-
// Move HTML templates to tag end body </body>
|
|
1340
|
-
// render() don't use "Fragment", in order to avoid error "Failed to execute 'insertBefore' on 'Node'"
|
|
1341
|
-
// prevent "transform", "filter", "perspective" attribute destruction fixed viewport orientation
|
|
1342
|
-
//--------------
|
|
1343
|
-
if (document.body !== null && listRef.current !== null) {
|
|
1344
|
-
document.body.appendChild(listRef.current);
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
1538
|
// Initialize default value (request parameters for each level)
|
|
1348
1539
|
//--------------
|
|
1349
1540
|
initDefaultValue(value);
|
|
@@ -1361,29 +1552,31 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
1361
1552
|
window.addEventListener('touchmove', windowScrollUpdate);
|
|
1362
1553
|
windowScrollUpdate();
|
|
1363
1554
|
return function () {
|
|
1364
|
-
var _document$querySelect;
|
|
1365
1555
|
document.removeEventListener('pointerdown', handleClickOutside);
|
|
1366
1556
|
window.removeEventListener('scroll', windowScrollUpdate);
|
|
1367
1557
|
window.removeEventListener('touchmove', windowScrollUpdate);
|
|
1368
|
-
|
|
1369
|
-
//
|
|
1370
|
-
(_document$querySelect = document.querySelector("#cas-select__items-wrapper-".concat(idRes))) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.remove();
|
|
1371
1558
|
};
|
|
1372
1559
|
}, [value]);
|
|
1373
1560
|
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", {
|
|
1374
1561
|
className: wrapperClassName || wrapperClassName === '' ? "cas-select__wrapper ".concat(wrapperClassName) : "cas-select__wrapper mb-3 position-relative",
|
|
1375
1562
|
ref: rootRef,
|
|
1376
1563
|
"data-overlay-id": "cas-select__items-wrapper-".concat(idRes)
|
|
1377
|
-
}, label ? /*#__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("label", {
|
|
1564
|
+
}, label ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
|
|
1378
1565
|
htmlFor: idRes,
|
|
1379
1566
|
className: "form-label",
|
|
1380
1567
|
dangerouslySetInnerHTML: {
|
|
1381
1568
|
__html: "".concat(label)
|
|
1382
1569
|
}
|
|
1383
|
-
})
|
|
1570
|
+
}) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
|
|
1571
|
+
htmlFor: idRes,
|
|
1572
|
+
className: "form-label"
|
|
1573
|
+
}, label)) : null, triggerContent ? /*#__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", {
|
|
1384
1574
|
className: triggerClassName ? "cas-select__trigger ".concat(triggerClassName) : "cas-select__trigger d-inline w-auto",
|
|
1385
1575
|
onClick: handleDisplayOptions
|
|
1386
|
-
}, triggerContent)) : null, !hasErr ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(
|
|
1576
|
+
}, triggerContent)) : null, !hasErr ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
|
|
1577
|
+
show: true,
|
|
1578
|
+
containerClassName: "CascadingSelect"
|
|
1579
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
1387
1580
|
ref: listRef,
|
|
1388
1581
|
id: "cas-select__items-wrapper-".concat(idRes),
|
|
1389
1582
|
className: "cas-select__items-wrapper position-absolute border shadow small",
|
|
@@ -1456,7 +1649,7 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
1456
1649
|
} else {
|
|
1457
1650
|
return null;
|
|
1458
1651
|
}
|
|
1459
|
-
}))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
1652
|
+
})))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
1460
1653
|
className: "cas-select__val",
|
|
1461
1654
|
onClick: handleDisplayOptions
|
|
1462
1655
|
}, displayResult ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|