funda-ui 1.0.272
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/BackToTop/index.css +34 -0
- package/BackToTop/index.d.ts +11 -0
- package/BackToTop/index.js +458 -0
- package/CascadingSelect/index.css +159 -0
- package/CascadingSelect/index.d.ts +56 -0
- package/CascadingSelect/index.js +958 -0
- package/CascadingSelectE2E/index.css +159 -0
- package/CascadingSelectE2E/index.d.ts +60 -0
- package/CascadingSelectE2E/index.js +1126 -0
- package/Checkbox/index.d.ts +30 -0
- package/Checkbox/index.js +226 -0
- package/ColorPicker/index.css +38 -0
- package/ColorPicker/index.d.ts +27 -0
- package/ColorPicker/index.js +246 -0
- package/DigitalClock/index.d.ts +7 -0
- package/DigitalClock/index.js +208 -0
- package/DropdownMenu/index.css +127 -0
- package/DropdownMenu/index.d.ts +37 -0
- package/DropdownMenu/index.js +237 -0
- package/DynamicFields/index.d.ts +26 -0
- package/DynamicFields/index.js +412 -0
- package/File/index.d.ts +36 -0
- package/File/index.js +473 -0
- package/Input/index.d.ts +42 -0
- package/Input/index.js +286 -0
- package/LiveSearch/index.d.ts +37 -0
- package/LiveSearch/index.js +1195 -0
- package/ModalDialog/index.d.ts +60 -0
- package/ModalDialog/index.js +725 -0
- package/ModeSwitch/index.d.ts +17 -0
- package/ModeSwitch/index.js +202 -0
- package/MultiFuncSelect/index.css +178 -0
- package/MultiFuncSelect/index.d.ts +67 -0
- package/MultiFuncSelect/index.js +1826 -0
- package/MultilevelDropdownMenu/index.css +35 -0
- package/MultilevelDropdownMenu/index.d.ts +25 -0
- package/MultilevelDropdownMenu/index.js +464 -0
- package/Pagination/index.d.ts +49 -0
- package/Pagination/index.js +341 -0
- package/README.md +108 -0
- package/Radio/index.d.ts +31 -0
- package/Radio/index.js +246 -0
- package/RangeSlider/index.css +149 -0
- package/RangeSlider/index.d.ts +21 -0
- package/RangeSlider/index.js +730 -0
- package/ScrollReveal/index.css +23 -0
- package/ScrollReveal/index.d.ts +21 -0
- package/ScrollReveal/index.js +216 -0
- package/Scrollbar/index.css +168 -0
- package/Scrollbar/index.d.ts +15 -0
- package/Scrollbar/index.js +605 -0
- package/SearchBar/index.d.ts +32 -0
- package/SearchBar/index.js +246 -0
- package/Select/index.d.ts +34 -0
- package/Select/index.js +331 -0
- package/ShowMoreLess/index.css +23 -0
- package/ShowMoreLess/index.d.ts +30 -0
- package/ShowMoreLess/index.js +202 -0
- package/Switch/index.d.ts +29 -0
- package/Switch/index.js +211 -0
- package/Table/index.css +533 -0
- package/Table/index.d.ts +25 -0
- package/Table/index.js +2113 -0
- package/Tabs/index.d.ts +3 -0
- package/Tabs/index.js +323 -0
- package/TagInput/index.css +90 -0
- package/TagInput/index.d.ts +28 -0
- package/TagInput/index.js +370 -0
- package/Textarea/index.d.ts +30 -0
- package/Textarea/index.js +242 -0
- package/Toast/index.css +95 -0
- package/Toast/index.d.ts +35 -0
- package/Toast/index.js +340 -0
- package/Tooltip/index.css +240 -0
- package/Tooltip/index.d.ts +19 -0
- package/Tooltip/index.js +200 -0
- package/Tree/index.css +225 -0
- package/Tree/index.d.ts +37 -0
- package/Tree/index.js +1406 -0
- package/all.d.ts +33 -0
- package/all.js +35 -0
- package/lib/cjs/BackToTop/index.d.ts +11 -0
- package/lib/cjs/BackToTop/index.js +458 -0
- package/lib/cjs/CascadingSelect/index.d.ts +56 -0
- package/lib/cjs/CascadingSelect/index.js +958 -0
- package/lib/cjs/CascadingSelectE2E/index.d.ts +60 -0
- package/lib/cjs/CascadingSelectE2E/index.js +1126 -0
- package/lib/cjs/Checkbox/index.d.ts +30 -0
- package/lib/cjs/Checkbox/index.js +226 -0
- package/lib/cjs/ColorPicker/index.d.ts +27 -0
- package/lib/cjs/ColorPicker/index.js +246 -0
- package/lib/cjs/DigitalClock/index.d.ts +7 -0
- package/lib/cjs/DigitalClock/index.js +208 -0
- package/lib/cjs/DropdownMenu/index.d.ts +37 -0
- package/lib/cjs/DropdownMenu/index.js +237 -0
- package/lib/cjs/DynamicFields/index.d.ts +26 -0
- package/lib/cjs/DynamicFields/index.js +412 -0
- package/lib/cjs/File/index.d.ts +36 -0
- package/lib/cjs/File/index.js +473 -0
- package/lib/cjs/Input/index.d.ts +42 -0
- package/lib/cjs/Input/index.js +286 -0
- package/lib/cjs/LiveSearch/index.d.ts +37 -0
- package/lib/cjs/LiveSearch/index.js +1195 -0
- package/lib/cjs/ModalDialog/index.d.ts +60 -0
- package/lib/cjs/ModalDialog/index.js +725 -0
- package/lib/cjs/ModeSwitch/index.d.ts +17 -0
- package/lib/cjs/ModeSwitch/index.js +202 -0
- package/lib/cjs/MultiFuncSelect/index.d.ts +67 -0
- package/lib/cjs/MultiFuncSelect/index.js +1826 -0
- package/lib/cjs/MultilevelDropdownMenu/index.d.ts +25 -0
- package/lib/cjs/MultilevelDropdownMenu/index.js +464 -0
- package/lib/cjs/Pagination/index.d.ts +49 -0
- package/lib/cjs/Pagination/index.js +341 -0
- package/lib/cjs/Radio/index.d.ts +31 -0
- package/lib/cjs/Radio/index.js +246 -0
- package/lib/cjs/RangeSlider/index.d.ts +21 -0
- package/lib/cjs/RangeSlider/index.js +730 -0
- package/lib/cjs/ScrollReveal/index.d.ts +21 -0
- package/lib/cjs/ScrollReveal/index.js +216 -0
- package/lib/cjs/Scrollbar/index.d.ts +15 -0
- package/lib/cjs/Scrollbar/index.js +605 -0
- package/lib/cjs/SearchBar/index.d.ts +32 -0
- package/lib/cjs/SearchBar/index.js +246 -0
- package/lib/cjs/Select/index.d.ts +34 -0
- package/lib/cjs/Select/index.js +331 -0
- package/lib/cjs/ShowMoreLess/index.d.ts +30 -0
- package/lib/cjs/ShowMoreLess/index.js +202 -0
- package/lib/cjs/Switch/index.d.ts +29 -0
- package/lib/cjs/Switch/index.js +211 -0
- package/lib/cjs/Table/index.d.ts +25 -0
- package/lib/cjs/Table/index.js +2113 -0
- package/lib/cjs/Tabs/index.d.ts +3 -0
- package/lib/cjs/Tabs/index.js +323 -0
- package/lib/cjs/TagInput/index.d.ts +28 -0
- package/lib/cjs/TagInput/index.js +370 -0
- package/lib/cjs/Textarea/index.d.ts +30 -0
- package/lib/cjs/Textarea/index.js +242 -0
- package/lib/cjs/Toast/index.d.ts +35 -0
- package/lib/cjs/Toast/index.js +340 -0
- package/lib/cjs/Tooltip/index.d.ts +19 -0
- package/lib/cjs/Tooltip/index.js +200 -0
- package/lib/cjs/Tree/index.d.ts +37 -0
- package/lib/cjs/Tree/index.js +1406 -0
- package/lib/cjs/index.d.ts +33 -0
- package/lib/cjs/index.js +35 -0
- package/lib/css/BackToTop/index.css +34 -0
- package/lib/css/CascadingSelect/index.css +159 -0
- package/lib/css/CascadingSelectE2E/index.css +159 -0
- package/lib/css/ColorPicker/index.css +38 -0
- package/lib/css/DropdownMenu/index.css +127 -0
- package/lib/css/MultiFuncSelect/index.css +178 -0
- package/lib/css/MultilevelDropdownMenu/index.css +35 -0
- package/lib/css/RangeSlider/index.css +149 -0
- package/lib/css/ScrollReveal/index.css +23 -0
- package/lib/css/Scrollbar/index.css +168 -0
- package/lib/css/ShowMoreLess/index.css +23 -0
- package/lib/css/Table/index.css +533 -0
- package/lib/css/TagInput/index.css +90 -0
- package/lib/css/Toast/index.css +95 -0
- package/lib/css/Tooltip/index.css +240 -0
- package/lib/css/Tree/index.css +225 -0
- package/lib/esm/BackToTop/index.scss +47 -0
- package/lib/esm/BackToTop/index.tsx +182 -0
- package/lib/esm/BackToTop/utils/easing.js +200 -0
- package/lib/esm/BackToTop/utils/performance.js +52 -0
- package/lib/esm/CascadingSelect/Group.tsx +39 -0
- package/lib/esm/CascadingSelect/index.scss +214 -0
- package/lib/esm/CascadingSelect/index.tsx +922 -0
- package/lib/esm/CascadingSelect/utils/performance.js +52 -0
- package/lib/esm/CascadingSelectE2E/Group.tsx +39 -0
- package/lib/esm/CascadingSelectE2E/index.scss +214 -0
- package/lib/esm/CascadingSelectE2E/index.tsx +1091 -0
- package/lib/esm/CascadingSelectE2E/utils/performance.js +52 -0
- package/lib/esm/Checkbox/index.tsx +160 -0
- package/lib/esm/ColorPicker/index.scss +48 -0
- package/lib/esm/ColorPicker/index.tsx +187 -0
- package/lib/esm/DigitalClock/index.tsx +72 -0
- package/lib/esm/DigitalClock/utils/useInterval.js +43 -0
- package/lib/esm/DropdownMenu/Option.tsx +27 -0
- package/lib/esm/DropdownMenu/index.scss +180 -0
- package/lib/esm/DropdownMenu/index.tsx +148 -0
- package/lib/esm/DynamicFields/index.tsx +386 -0
- package/lib/esm/File/index.tsx +302 -0
- package/lib/esm/Input/index.tsx +233 -0
- package/lib/esm/LiveSearch/index.tsx +582 -0
- package/lib/esm/LiveSearch/utils/performance.js +52 -0
- package/lib/esm/LiveSearch/utils/useThrottle.js +36 -0
- package/lib/esm/ModalDialog/index.tsx +479 -0
- package/lib/esm/ModalDialog/plugins/BSL/bodyScrollLock.es6.js +262 -0
- package/lib/esm/ModalDialog/plugins/BSL/index.ts +2 -0
- package/lib/esm/ModeSwitch/index.tsx +82 -0
- package/lib/esm/MultiFuncSelect/index.scss +269 -0
- package/lib/esm/MultiFuncSelect/index.tsx +1597 -0
- package/lib/esm/MultiFuncSelect/utils/performance.js +52 -0
- package/lib/esm/MultiFuncSelect/utils/tree.js +103 -0
- package/lib/esm/MultiFuncSelect/utils/useThrottle.js +36 -0
- package/lib/esm/MultilevelDropdownMenu/MenuList.tsx +230 -0
- package/lib/esm/MultilevelDropdownMenu/index.scss +75 -0
- package/lib/esm/MultilevelDropdownMenu/index.tsx +71 -0
- package/lib/esm/MultilevelDropdownMenu/utils/dom.js +81 -0
- package/lib/esm/Pagination/index.tsx +230 -0
- package/lib/esm/Pagination/pagination-navigators.tsx +60 -0
- package/lib/esm/Radio/index.tsx +201 -0
- package/lib/esm/RangeSlider/index.scss +184 -0
- package/lib/esm/RangeSlider/index.tsx +223 -0
- package/lib/esm/ScrollReveal/index.scss +27 -0
- package/lib/esm/ScrollReveal/index.tsx +146 -0
- package/lib/esm/Scrollbar/index.scss +217 -0
- package/lib/esm/Scrollbar/index.tsx +497 -0
- package/lib/esm/Scrollbar/utils/performance.js +52 -0
- package/lib/esm/SearchBar/index.tsx +181 -0
- package/lib/esm/Select/index.tsx +276 -0
- package/lib/esm/ShowMoreLess/index.scss +27 -0
- package/lib/esm/ShowMoreLess/index.tsx +144 -0
- package/lib/esm/Switch/index.tsx +143 -0
- package/lib/esm/Table/TableColgroup.tsx +29 -0
- package/lib/esm/Table/TableField.tsx +40 -0
- package/lib/esm/Table/TableFieldRow.tsx +212 -0
- package/lib/esm/Table/TableHeaders.tsx +146 -0
- package/lib/esm/Table/TableRow.tsx +127 -0
- package/lib/esm/Table/TableSummaries.tsx +36 -0
- package/lib/esm/Table/index.scss +364 -0
- package/lib/esm/Table/index.tsx +576 -0
- package/lib/esm/Table/table-utils.ts +65 -0
- package/lib/esm/Table/utils/dom.js +81 -0
- package/lib/esm/Table/utils/performance.js +52 -0
- package/lib/esm/Tabs/TabList.tsx +42 -0
- package/lib/esm/Tabs/TabPanel.tsx +34 -0
- package/lib/esm/Tabs/Tabs.tsx +232 -0
- package/lib/esm/Tabs/index.tsx +3 -0
- package/lib/esm/TagInput/index.scss +125 -0
- package/lib/esm/TagInput/index.tsx +314 -0
- package/lib/esm/Textarea/index.tsx +178 -0
- package/lib/esm/Toast/Item.tsx +75 -0
- package/lib/esm/Toast/index.scss +120 -0
- package/lib/esm/Toast/index.tsx +249 -0
- package/lib/esm/Tooltip/index.scss +327 -0
- package/lib/esm/Tooltip/index.tsx +142 -0
- package/lib/esm/Tree/TreeList.tsx +503 -0
- package/lib/esm/Tree/index.scss +375 -0
- package/lib/esm/Tree/index.tsx +301 -0
- package/lib/esm/Tree/init-height.tsx +27 -0
- package/lib/esm/Tree/utils/convert-tree.js +29 -0
- package/lib/esm/Tree/utils/dom.js +81 -0
- package/lib/esm/index.js +31 -0
- package/package.json +40 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("react"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define(["react"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["RPB"] = factory(require("react"));
|
|
8
|
+
else
|
|
9
|
+
root["RPB"] = factory(root["React"]);
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
14
|
+
|
|
15
|
+
/***/ 787:
|
|
16
|
+
/***/ ((module) => {
|
|
17
|
+
|
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
19
|
+
|
|
20
|
+
/***/ })
|
|
21
|
+
|
|
22
|
+
/******/ });
|
|
23
|
+
/************************************************************************/
|
|
24
|
+
/******/ // The module cache
|
|
25
|
+
/******/ var __webpack_module_cache__ = {};
|
|
26
|
+
/******/
|
|
27
|
+
/******/ // The require function
|
|
28
|
+
/******/ function __webpack_require__(moduleId) {
|
|
29
|
+
/******/ // Check if module is in cache
|
|
30
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
31
|
+
/******/ if (cachedModule !== undefined) {
|
|
32
|
+
/******/ return cachedModule.exports;
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ // Create a new module (and put it into the cache)
|
|
35
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
36
|
+
/******/ // no module.id needed
|
|
37
|
+
/******/ // no module.loaded needed
|
|
38
|
+
/******/ exports: {}
|
|
39
|
+
/******/ };
|
|
40
|
+
/******/
|
|
41
|
+
/******/ // Execute the module function
|
|
42
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // Return the exports of the module
|
|
45
|
+
/******/ return module.exports;
|
|
46
|
+
/******/ }
|
|
47
|
+
/******/
|
|
48
|
+
/************************************************************************/
|
|
49
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
50
|
+
/******/ (() => {
|
|
51
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
52
|
+
/******/ __webpack_require__.n = (module) => {
|
|
53
|
+
/******/ var getter = module && module.__esModule ?
|
|
54
|
+
/******/ () => (module['default']) :
|
|
55
|
+
/******/ () => (module);
|
|
56
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
57
|
+
/******/ return getter;
|
|
58
|
+
/******/ };
|
|
59
|
+
/******/ })();
|
|
60
|
+
/******/
|
|
61
|
+
/******/ /* webpack/runtime/define property getters */
|
|
62
|
+
/******/ (() => {
|
|
63
|
+
/******/ // define getter functions for harmony exports
|
|
64
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
65
|
+
/******/ for(var key in definition) {
|
|
66
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
67
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
68
|
+
/******/ }
|
|
69
|
+
/******/ }
|
|
70
|
+
/******/ };
|
|
71
|
+
/******/ })();
|
|
72
|
+
/******/
|
|
73
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
74
|
+
/******/ (() => {
|
|
75
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
76
|
+
/******/ })();
|
|
77
|
+
/******/
|
|
78
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
79
|
+
/******/ (() => {
|
|
80
|
+
/******/ // define __esModule on exports
|
|
81
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
82
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
83
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
84
|
+
/******/ }
|
|
85
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
86
|
+
/******/ };
|
|
87
|
+
/******/ })();
|
|
88
|
+
/******/
|
|
89
|
+
/************************************************************************/
|
|
90
|
+
var __webpack_exports__ = {};
|
|
91
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
92
|
+
(() => {
|
|
93
|
+
// ESM COMPAT FLAG
|
|
94
|
+
__webpack_require__.r(__webpack_exports__);
|
|
95
|
+
|
|
96
|
+
// EXPORTS
|
|
97
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
98
|
+
"default": () => (/* binding */ src)
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
102
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
103
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
104
|
+
;// CONCATENATED MODULE: ./src/utils/useInterval.js
|
|
105
|
+
/**
|
|
106
|
+
* Provides a convenient way to create and manage intervals
|
|
107
|
+
*
|
|
108
|
+
* @usage:
|
|
109
|
+
|
|
110
|
+
const App = () => {
|
|
111
|
+
const [count, setCount] = useState(0);
|
|
112
|
+
|
|
113
|
+
useInterval(() => {
|
|
114
|
+
setCount(count + 1);
|
|
115
|
+
}, 1000);
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<div className="app"></div>
|
|
119
|
+
);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
var useInterval = function useInterval(fn, delay) {
|
|
125
|
+
var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
126
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
127
|
+
ref.current = fn;
|
|
128
|
+
}, [fn]);
|
|
129
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
130
|
+
function tick() {
|
|
131
|
+
ref.current && ref.current();
|
|
132
|
+
}
|
|
133
|
+
if (delay !== null && delay > 0) {
|
|
134
|
+
var id = setInterval(tick, delay);
|
|
135
|
+
return function () {
|
|
136
|
+
return clearInterval(id);
|
|
137
|
+
};
|
|
138
|
+
} else {
|
|
139
|
+
tick();
|
|
140
|
+
}
|
|
141
|
+
}, [delay]);
|
|
142
|
+
};
|
|
143
|
+
/* harmony default export */ const utils_useInterval = (useInterval);
|
|
144
|
+
;// CONCATENATED MODULE: ./src/index.tsx
|
|
145
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
146
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
147
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
148
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
149
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
150
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
var DigitalClock = function DigitalClock(props) {
|
|
154
|
+
var tmpl = props.tmpl,
|
|
155
|
+
militaryTime = props.militaryTime;
|
|
156
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
157
|
+
minutes: 'NULL',
|
|
158
|
+
seconds: 'NULL',
|
|
159
|
+
hours: 'NULL',
|
|
160
|
+
amPm: 'NULL'
|
|
161
|
+
}),
|
|
162
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
163
|
+
date = _useState2[0],
|
|
164
|
+
setDate = _useState2[1];
|
|
165
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
166
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
167
|
+
clockAppearance = _useState4[0],
|
|
168
|
+
setClockAppearance = _useState4[1];
|
|
169
|
+
var time = new Date();
|
|
170
|
+
var minutes = time.getMinutes();
|
|
171
|
+
var seconds = time.getSeconds();
|
|
172
|
+
var hours = time.getHours();
|
|
173
|
+
var amPm = time.getHours() > 12 ? "pm" : "am";
|
|
174
|
+
utils_useInterval(function () {
|
|
175
|
+
time = new Date();
|
|
176
|
+
minutes = time.getMinutes();
|
|
177
|
+
seconds = time.getSeconds();
|
|
178
|
+
hours = time.getHours();
|
|
179
|
+
if (militaryTime) {
|
|
180
|
+
amPm = 'NULL';
|
|
181
|
+
} else {
|
|
182
|
+
minutes = minutes < 10 ? "0" + minutes : minutes;
|
|
183
|
+
seconds = seconds < 10 ? "0" + seconds : seconds;
|
|
184
|
+
hours = hours < 10 ? "0" + hours : hours;
|
|
185
|
+
hours = hours > 12 ? hours - 12 : hours;
|
|
186
|
+
hours = hours == 0 ? 12 : hours;
|
|
187
|
+
}
|
|
188
|
+
var curData = {
|
|
189
|
+
minutes: minutes,
|
|
190
|
+
seconds: seconds,
|
|
191
|
+
hours: hours,
|
|
192
|
+
amPm: amPm
|
|
193
|
+
};
|
|
194
|
+
setDate(curData);
|
|
195
|
+
|
|
196
|
+
//callback
|
|
197
|
+
var res = tmpl === null || tmpl === void 0 ? void 0 : tmpl(curData);
|
|
198
|
+
setClockAppearance(res);
|
|
199
|
+
}, 1000);
|
|
200
|
+
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, date ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, clockAppearance) : null);
|
|
201
|
+
};
|
|
202
|
+
/* harmony default export */ const src = (DigitalClock);
|
|
203
|
+
})();
|
|
204
|
+
|
|
205
|
+
/******/ return __webpack_exports__;
|
|
206
|
+
/******/ })()
|
|
207
|
+
;
|
|
208
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type OptionChangeFnType = (arg1: any) => void;
|
|
3
|
+
interface OptionConfig {
|
|
4
|
+
value?: string | undefined;
|
|
5
|
+
label?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
declare type DropdownMenuProps = {
|
|
8
|
+
wrapperClassName?: string;
|
|
9
|
+
listClassName?: string;
|
|
10
|
+
hyperlinkClassName?: string;
|
|
11
|
+
showClassName?: string;
|
|
12
|
+
hoverOn?: boolean;
|
|
13
|
+
hoverOff?: boolean;
|
|
14
|
+
hoverDelay?: number;
|
|
15
|
+
/** Set a name for the form field for this component */
|
|
16
|
+
name?: string;
|
|
17
|
+
/** Whether to use button style, otherwise use "div" */
|
|
18
|
+
triggerButton?: boolean;
|
|
19
|
+
/** Specify a class for this Node. */
|
|
20
|
+
triggerClassName?: string;
|
|
21
|
+
/** Set a piece of text or HTML code for the trigger */
|
|
22
|
+
triggerContent?: string;
|
|
23
|
+
/** When enabled, the corresponding option content will be displayed after selecting an option */
|
|
24
|
+
triggerSwitchActive?: boolean;
|
|
25
|
+
/** Center align the options layer in a drop-down field. By default it is left aligned "start". */
|
|
26
|
+
alignOptionsLayer?: string;
|
|
27
|
+
/** Specify data of Dropdown Menu as a JSON string format. */
|
|
28
|
+
options?: OptionConfig[];
|
|
29
|
+
/** This function is called whenever the data is updated.
|
|
30
|
+
* Exposes the JSON format data about the option as an argument.
|
|
31
|
+
*/
|
|
32
|
+
/** -- */
|
|
33
|
+
tabIndex?: number;
|
|
34
|
+
onChange?: OptionChangeFnType | null;
|
|
35
|
+
};
|
|
36
|
+
declare const DropdownMenu: (props: DropdownMenuProps) => JSX.Element;
|
|
37
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("react"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define(["react"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["RPB"] = factory(require("react"));
|
|
8
|
+
else
|
|
9
|
+
root["RPB"] = factory(root["React"]);
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
14
|
+
|
|
15
|
+
/***/ 787:
|
|
16
|
+
/***/ ((module) => {
|
|
17
|
+
|
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
19
|
+
|
|
20
|
+
/***/ })
|
|
21
|
+
|
|
22
|
+
/******/ });
|
|
23
|
+
/************************************************************************/
|
|
24
|
+
/******/ // The module cache
|
|
25
|
+
/******/ var __webpack_module_cache__ = {};
|
|
26
|
+
/******/
|
|
27
|
+
/******/ // The require function
|
|
28
|
+
/******/ function __webpack_require__(moduleId) {
|
|
29
|
+
/******/ // Check if module is in cache
|
|
30
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
31
|
+
/******/ if (cachedModule !== undefined) {
|
|
32
|
+
/******/ return cachedModule.exports;
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ // Create a new module (and put it into the cache)
|
|
35
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
36
|
+
/******/ // no module.id needed
|
|
37
|
+
/******/ // no module.loaded needed
|
|
38
|
+
/******/ exports: {}
|
|
39
|
+
/******/ };
|
|
40
|
+
/******/
|
|
41
|
+
/******/ // Execute the module function
|
|
42
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // Return the exports of the module
|
|
45
|
+
/******/ return module.exports;
|
|
46
|
+
/******/ }
|
|
47
|
+
/******/
|
|
48
|
+
/************************************************************************/
|
|
49
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
50
|
+
/******/ (() => {
|
|
51
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
52
|
+
/******/ __webpack_require__.n = (module) => {
|
|
53
|
+
/******/ var getter = module && module.__esModule ?
|
|
54
|
+
/******/ () => (module['default']) :
|
|
55
|
+
/******/ () => (module);
|
|
56
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
57
|
+
/******/ return getter;
|
|
58
|
+
/******/ };
|
|
59
|
+
/******/ })();
|
|
60
|
+
/******/
|
|
61
|
+
/******/ /* webpack/runtime/define property getters */
|
|
62
|
+
/******/ (() => {
|
|
63
|
+
/******/ // define getter functions for harmony exports
|
|
64
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
65
|
+
/******/ for(var key in definition) {
|
|
66
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
67
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
68
|
+
/******/ }
|
|
69
|
+
/******/ }
|
|
70
|
+
/******/ };
|
|
71
|
+
/******/ })();
|
|
72
|
+
/******/
|
|
73
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
74
|
+
/******/ (() => {
|
|
75
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
76
|
+
/******/ })();
|
|
77
|
+
/******/
|
|
78
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
79
|
+
/******/ (() => {
|
|
80
|
+
/******/ // define __esModule on exports
|
|
81
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
82
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
83
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
84
|
+
/******/ }
|
|
85
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
86
|
+
/******/ };
|
|
87
|
+
/******/ })();
|
|
88
|
+
/******/
|
|
89
|
+
/************************************************************************/
|
|
90
|
+
var __webpack_exports__ = {};
|
|
91
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
92
|
+
(() => {
|
|
93
|
+
// ESM COMPAT FLAG
|
|
94
|
+
__webpack_require__.r(__webpack_exports__);
|
|
95
|
+
|
|
96
|
+
// EXPORTS
|
|
97
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
98
|
+
"default": () => (/* binding */ src)
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
102
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
103
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
104
|
+
;// CONCATENATED MODULE: ./src/Option.tsx
|
|
105
|
+
|
|
106
|
+
function Option(props) {
|
|
107
|
+
var _props$option, _props$option2;
|
|
108
|
+
function handleSelect(e) {
|
|
109
|
+
e.preventDefault();
|
|
110
|
+
var fn = props.onSelect;
|
|
111
|
+
fn(props.option);
|
|
112
|
+
}
|
|
113
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
|
|
114
|
+
className: props.hyperlinkClassName,
|
|
115
|
+
"data-value": (_props$option = props.option) === null || _props$option === void 0 ? void 0 : _props$option.value,
|
|
116
|
+
href: "#",
|
|
117
|
+
tabIndex: -1,
|
|
118
|
+
onClick: handleSelect,
|
|
119
|
+
dangerouslySetInnerHTML: {
|
|
120
|
+
__html: "".concat((_props$option2 = props.option) === null || _props$option2 === void 0 ? void 0 : _props$option2.label)
|
|
121
|
+
}
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
;// CONCATENATED MODULE: ./src/index.tsx
|
|
125
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
126
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
127
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
128
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
129
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
130
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
var DropdownMenu = function DropdownMenu(props) {
|
|
134
|
+
var wrapperClassName = props.wrapperClassName,
|
|
135
|
+
listClassName = props.listClassName,
|
|
136
|
+
hyperlinkClassName = props.hyperlinkClassName,
|
|
137
|
+
showClassName = props.showClassName,
|
|
138
|
+
hoverOn = props.hoverOn,
|
|
139
|
+
hoverOff = props.hoverOff,
|
|
140
|
+
hoverDelay = props.hoverDelay,
|
|
141
|
+
name = props.name,
|
|
142
|
+
triggerButton = props.triggerButton,
|
|
143
|
+
triggerClassName = props.triggerClassName,
|
|
144
|
+
triggerContent = props.triggerContent,
|
|
145
|
+
triggerSwitchActive = props.triggerSwitchActive,
|
|
146
|
+
alignOptionsLayer = props.alignOptionsLayer,
|
|
147
|
+
options = props.options,
|
|
148
|
+
tabIndex = props.tabIndex,
|
|
149
|
+
onChange = props.onChange;
|
|
150
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
151
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
152
|
+
isOpen = _useState2[0],
|
|
153
|
+
setIsOpen = _useState2[1];
|
|
154
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
155
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
156
|
+
selected = _useState4[0],
|
|
157
|
+
setSelected = _useState4[1];
|
|
158
|
+
var _hoverDelay = !isNaN(hoverDelay) && typeof hoverDelay !== 'undefined' ? hoverDelay : 150;
|
|
159
|
+
var defaultLabel = triggerContent === undefined ? '' : triggerContent;
|
|
160
|
+
var selectedLabel = triggerSwitchActive ? selected ? selected.label : defaultLabel : defaultLabel;
|
|
161
|
+
var selectOptionsListPresentation = options === null || options === void 0 ? void 0 : options.map(function (selectOption, index) {
|
|
162
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Option, {
|
|
163
|
+
key: index,
|
|
164
|
+
option: selectOption,
|
|
165
|
+
onSelect: handleSelect,
|
|
166
|
+
hyperlinkClassName: hyperlinkClassName ? hyperlinkClassName : 'dropdown-item-default'
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
function handleClick(event) {
|
|
170
|
+
if (hoverOn) return;
|
|
171
|
+
setIsOpen(!isOpen);
|
|
172
|
+
}
|
|
173
|
+
function handleHoverOn(event) {
|
|
174
|
+
if (!hoverOn || typeof hoverOn === 'undefined') return;
|
|
175
|
+
setTimeout(function () {
|
|
176
|
+
setIsOpen(true);
|
|
177
|
+
}, _hoverDelay);
|
|
178
|
+
}
|
|
179
|
+
function handleHoverOff(event) {
|
|
180
|
+
if (!hoverOff || typeof hoverOff === 'undefined') return;
|
|
181
|
+
setTimeout(function () {
|
|
182
|
+
setIsOpen(false);
|
|
183
|
+
}, _hoverDelay);
|
|
184
|
+
}
|
|
185
|
+
function handleClose(event) {
|
|
186
|
+
if (event.target.closest(".".concat(wrapperClassName || wrapperClassName === '' ? wrapperClassName : 'dropdown__wrapper')) === null) {
|
|
187
|
+
setIsOpen(false);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function handleSelect(option) {
|
|
191
|
+
setIsOpen(false);
|
|
192
|
+
setSelected(option);
|
|
193
|
+
if (typeof onChange === 'function') {
|
|
194
|
+
onChange(option);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
198
|
+
document.removeEventListener('pointerdown', handleClose);
|
|
199
|
+
document.addEventListener('pointerdown', handleClose);
|
|
200
|
+
return function () {
|
|
201
|
+
document.removeEventListener('pointerdown', handleClose);
|
|
202
|
+
};
|
|
203
|
+
}, [options]);
|
|
204
|
+
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", {
|
|
205
|
+
className: "dropdown__wrapper ".concat(wrapperClassName || wrapperClassName === '' ? wrapperClassName : "dropdown-default dropdown-default--".concat(alignOptionsLayer ? alignOptionsLayer : 'center'), " ").concat(isOpen ? 'active' : ''),
|
|
206
|
+
onMouseLeave: handleHoverOff
|
|
207
|
+
}, triggerButton ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
208
|
+
tabIndex: tabIndex || -1,
|
|
209
|
+
className: triggerClassName ? "".concat(triggerClassName) : "d-inline w-auto",
|
|
210
|
+
type: "button",
|
|
211
|
+
onMouseEnter: handleHoverOn,
|
|
212
|
+
onClick: handleClick,
|
|
213
|
+
dangerouslySetInnerHTML: {
|
|
214
|
+
__html: selectedLabel
|
|
215
|
+
}
|
|
216
|
+
}) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
217
|
+
className: triggerClassName ? "".concat(triggerClassName) : "d-inline w-auto",
|
|
218
|
+
onMouseEnter: handleHoverOn,
|
|
219
|
+
onClick: handleClick,
|
|
220
|
+
dangerouslySetInnerHTML: {
|
|
221
|
+
__html: selectedLabel
|
|
222
|
+
}
|
|
223
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
|
|
224
|
+
name: name || '',
|
|
225
|
+
type: "hidden",
|
|
226
|
+
value: selected === null || selected === void 0 ? void 0 : selected.value
|
|
227
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
228
|
+
className: isOpen ? "".concat(listClassName ? listClassName : 'dropdown-menu-default', " ").concat(showClassName ? showClassName : 'show') : "".concat(listClassName ? listClassName : 'dropdown-menu-default')
|
|
229
|
+
}, selectOptionsListPresentation)));
|
|
230
|
+
};
|
|
231
|
+
/* harmony default export */ const src = (DropdownMenu);
|
|
232
|
+
})();
|
|
233
|
+
|
|
234
|
+
/******/ return __webpack_exports__;
|
|
235
|
+
/******/ })()
|
|
236
|
+
;
|
|
237
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare module 'react' {
|
|
3
|
+
interface ReactI18NextChildren<T> {
|
|
4
|
+
children?: any;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
declare type DynamicFieldsProps = {
|
|
8
|
+
wrapperClassName?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
label?: React.ReactNode | string;
|
|
11
|
+
tempHtmlString?: any;
|
|
12
|
+
maxFields?: any;
|
|
13
|
+
confirmText?: string;
|
|
14
|
+
iconAddBefore?: React.ReactNode | string;
|
|
15
|
+
iconAddAfter?: React.ReactNode | string;
|
|
16
|
+
iconAdd?: React.ReactNode | string;
|
|
17
|
+
iconRemove?: React.ReactNode | string;
|
|
18
|
+
startFromZero?: boolean;
|
|
19
|
+
/** -- */
|
|
20
|
+
id?: string;
|
|
21
|
+
onAdd?: () => void;
|
|
22
|
+
onRemove?: () => void;
|
|
23
|
+
onComplete?: () => void;
|
|
24
|
+
};
|
|
25
|
+
declare const DynamicFields: (props: DynamicFieldsProps) => JSX.Element;
|
|
26
|
+
export default DynamicFields;
|