@xaypay/tui 0.2.2 → 0.2.4
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/README.md +0 -38
- package/dist/index.es.js +178 -91
- package/dist/index.js +178 -91
- package/package.json +8 -22
- package/rollup.config.mjs +4 -4
- package/tui.config.js +1 -1
- package/LICENSE +0 -21
- package/cli-command.js +0 -3
- package/vite.config.mjs +0 -50
package/dist/index.es.js
CHANGED
|
@@ -16,12 +16,10 @@ function rng() {
|
|
|
16
16
|
if (!getRandomValues) {
|
|
17
17
|
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
18
18
|
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
19
|
-
|
|
20
19
|
if (!getRandomValues) {
|
|
21
20
|
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return getRandomValues(rnds8);
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -31,11 +29,9 @@ function rng() {
|
|
|
31
29
|
*/
|
|
32
30
|
|
|
33
31
|
const byteToHex = [];
|
|
34
|
-
|
|
35
32
|
for (let i = 0; i < 256; ++i) {
|
|
36
33
|
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
37
34
|
}
|
|
38
|
-
|
|
39
35
|
function unsafeStringify(arr, offset = 0) {
|
|
40
36
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
41
37
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
@@ -51,7 +47,6 @@ function v4(options, buf, offset) {
|
|
|
51
47
|
if (native.randomUUID && !buf && !options) {
|
|
52
48
|
return native.randomUUID();
|
|
53
49
|
}
|
|
54
|
-
|
|
55
50
|
options = options || {};
|
|
56
51
|
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
57
52
|
|
|
@@ -60,14 +55,11 @@ function v4(options, buf, offset) {
|
|
|
60
55
|
|
|
61
56
|
if (buf) {
|
|
62
57
|
offset = offset || 0;
|
|
63
|
-
|
|
64
58
|
for (let i = 0; i < 16; ++i) {
|
|
65
59
|
buf[offset + i] = rnds[i];
|
|
66
60
|
}
|
|
67
|
-
|
|
68
61
|
return buf;
|
|
69
62
|
}
|
|
70
|
-
|
|
71
63
|
return unsafeStringify(rnds);
|
|
72
64
|
}
|
|
73
65
|
|
|
@@ -1097,7 +1089,7 @@ var packageResult = {
|
|
|
1097
1089
|
marginLeft: '10px'
|
|
1098
1090
|
}
|
|
1099
1091
|
|
|
1100
|
-
// checkedIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1092
|
+
// checkedIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
1101
1093
|
// unCheckedIcon: React.createElement(<SvgUnchecked fill="#E00" />),
|
|
1102
1094
|
},
|
|
1103
1095
|
// default properties for <Table /> component
|
|
@@ -1230,7 +1222,7 @@ async function getProps() {
|
|
|
1230
1222
|
}
|
|
1231
1223
|
|
|
1232
1224
|
var configStylesPromise = getProps();
|
|
1233
|
-
const hasOwnerProperty = (object, property) => {
|
|
1225
|
+
const hasOwnerProperty$1 = (object, property) => {
|
|
1234
1226
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
1235
1227
|
};
|
|
1236
1228
|
|
|
@@ -1276,6 +1268,9 @@ const Button = ({
|
|
|
1276
1268
|
const handleMouseLeave = () => {
|
|
1277
1269
|
setIsHover(false);
|
|
1278
1270
|
};
|
|
1271
|
+
useEffect(() => {
|
|
1272
|
+
className && setClassProps(() => classnames(className ?? configStyles.BUTTON.className));
|
|
1273
|
+
}, [className]);
|
|
1279
1274
|
useEffect(() => {
|
|
1280
1275
|
if (!label && !icon) {
|
|
1281
1276
|
alert('Add icon or label props on Button component');
|
|
@@ -1781,6 +1776,9 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1781
1776
|
alert('Please add change prop on File component');
|
|
1782
1777
|
}
|
|
1783
1778
|
}, [change]);
|
|
1779
|
+
useEffect(() => {
|
|
1780
|
+
className && setClassProps(() => classnames(className ?? configStyles.FILE.className));
|
|
1781
|
+
}, [className]);
|
|
1784
1782
|
useEffect(() => {
|
|
1785
1783
|
configStylesPromise.then(data => {
|
|
1786
1784
|
setClassProps(() => classnames(className ?? data.FILE.className));
|
|
@@ -2178,9 +2176,9 @@ const Checkbox$1 = ({
|
|
|
2178
2176
|
},
|
|
2179
2177
|
onClick: !innerDisabled && handleChecked ? handleClick : _ => _
|
|
2180
2178
|
}, innerChecked && (ignoreDisabledForChecked ?? !innerDisabled) ? checkedIcon ? checkedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
|
|
2181
|
-
fillColor: checkedColor
|
|
2179
|
+
fillColor: checkedColor
|
|
2182
2180
|
}) : unCheckedIcon ? unCheckedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
|
|
2183
|
-
fillColor: unCheckedColor
|
|
2181
|
+
fillColor: unCheckedColor
|
|
2184
2182
|
}), label && /*#__PURE__*/React__default.createElement("span", {
|
|
2185
2183
|
style: {
|
|
2186
2184
|
marginLeft: labelMarginLeft
|
|
@@ -2229,12 +2227,12 @@ const SingleCheckbox = ({
|
|
|
2229
2227
|
disabled: disabled,
|
|
2230
2228
|
innerIndex: innerIndex,
|
|
2231
2229
|
checkedIcon: checkedIcon,
|
|
2232
|
-
checkedColor: checkedColor,
|
|
2233
2230
|
unCheckedIcon: unCheckedIcon,
|
|
2234
2231
|
handleChecked: handleChecked,
|
|
2235
|
-
unCheckedColor: unCheckedColor,
|
|
2236
2232
|
ignoreDisabledForChecked: ignoreDisabledForChecked,
|
|
2237
|
-
|
|
2233
|
+
checkedColor: checkedColor ?? configStyles.CHECKBOX.colors.checked,
|
|
2234
|
+
unCheckedColor: unCheckedColor ?? configStyles.CHECKBOX.colors.unChecked,
|
|
2235
|
+
labelMarginLeft: labelMarginLeft ?? configStyles.CHECKBOX.label.marginLeft
|
|
2238
2236
|
});
|
|
2239
2237
|
};
|
|
2240
2238
|
SingleCheckbox.propTypes = {
|
|
@@ -2254,15 +2252,14 @@ SingleCheckbox.propTypes = {
|
|
|
2254
2252
|
};
|
|
2255
2253
|
|
|
2256
2254
|
function styleInject(css, ref) {
|
|
2257
|
-
if (
|
|
2255
|
+
if (ref === void 0) ref = {};
|
|
2258
2256
|
var insertAt = ref.insertAt;
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2257
|
+
if (!css || typeof document === 'undefined') {
|
|
2258
|
+
return;
|
|
2259
|
+
}
|
|
2262
2260
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
2263
2261
|
var style = document.createElement('style');
|
|
2264
2262
|
style.type = 'text/css';
|
|
2265
|
-
|
|
2266
2263
|
if (insertAt === 'top') {
|
|
2267
2264
|
if (head.firstChild) {
|
|
2268
2265
|
head.insertBefore(style, head.firstChild);
|
|
@@ -2272,7 +2269,6 @@ function styleInject(css, ref) {
|
|
|
2272
2269
|
} else {
|
|
2273
2270
|
head.appendChild(style);
|
|
2274
2271
|
}
|
|
2275
|
-
|
|
2276
2272
|
if (style.styleSheet) {
|
|
2277
2273
|
style.styleSheet.cssText = css;
|
|
2278
2274
|
} else {
|
|
@@ -2303,7 +2299,7 @@ const TH = ({
|
|
|
2303
2299
|
handleCheckArrowActionHeader
|
|
2304
2300
|
}) => {
|
|
2305
2301
|
const handleCheckArrowAction = (e, object, property) => {
|
|
2306
|
-
if (hasOwnerProperty(object, property)) {
|
|
2302
|
+
if (hasOwnerProperty$1(object, property)) {
|
|
2307
2303
|
handleCheckArrowActionHeader(e, object);
|
|
2308
2304
|
}
|
|
2309
2305
|
};
|
|
@@ -2324,14 +2320,14 @@ const TH = ({
|
|
|
2324
2320
|
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
2325
2321
|
},
|
|
2326
2322
|
onClick: handleHeaderItemClick,
|
|
2327
|
-
className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$9['sorting-arrows'] : '' : ''}`
|
|
2323
|
+
className: `${hasOwnerProperty$1(item, 'sortingArrows') ? item.sortingArrows === true ? styles$9['sorting-arrows'] : '' : ''}`
|
|
2328
2324
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2329
2325
|
style: {
|
|
2330
2326
|
display: 'flex',
|
|
2331
2327
|
alignItems: 'flex-start',
|
|
2332
|
-
justifyContent: hasOwnerProperty(item, 'checkBox') ? 'space-between' : tHeadTextAlign ? tHeadTextAlign === 'left' ? 'flex-start' : tHeadTextAlign === 'right' ? 'flex-end' : 'center' : 'center'
|
|
2328
|
+
justifyContent: hasOwnerProperty$1(item, 'checkBox') ? 'space-between' : tHeadTextAlign ? tHeadTextAlign === 'left' ? 'flex-start' : tHeadTextAlign === 'right' ? 'flex-end' : 'center' : 'center'
|
|
2333
2329
|
}
|
|
2334
|
-
}, hasOwnerProperty(item, 'checkBox') ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
2330
|
+
}, hasOwnerProperty$1(item, 'checkBox') ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
2335
2331
|
data: item,
|
|
2336
2332
|
checked: item.checkBox.checked,
|
|
2337
2333
|
disabled: item.checkBox.disabled,
|
|
@@ -2343,7 +2339,7 @@ const TH = ({
|
|
|
2343
2339
|
margin: '0px'
|
|
2344
2340
|
},
|
|
2345
2341
|
onClick: e => handleCheckArrowAction(e, item, 'arrowComponent')
|
|
2346
|
-
}, item.type === 'show' ? item.content : hasOwnerProperty(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : '')));
|
|
2342
|
+
}, item.type === 'show' ? item.content : hasOwnerProperty$1(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : '')));
|
|
2347
2343
|
};
|
|
2348
2344
|
|
|
2349
2345
|
const TD = ({
|
|
@@ -2388,7 +2384,7 @@ const TD = ({
|
|
|
2388
2384
|
handleBodyActionClick(e, actionData);
|
|
2389
2385
|
};
|
|
2390
2386
|
const handleCheckActions = (e, object, property, objectIndex) => {
|
|
2391
|
-
if (hasOwnerProperty(object, property)) {
|
|
2387
|
+
if (hasOwnerProperty$1(object, property)) {
|
|
2392
2388
|
handleBodyAction(e, {
|
|
2393
2389
|
item: object,
|
|
2394
2390
|
itemIndex: objectIndex
|
|
@@ -2431,7 +2427,7 @@ const TD = ({
|
|
|
2431
2427
|
maxWidth: tableColumnMaxWidth,
|
|
2432
2428
|
whiteSpace: Array.isArray(item) ? 'nowrap' : 'wrap',
|
|
2433
2429
|
borderColor: hideBorder ? 'transparent' : borderRightColor,
|
|
2434
|
-
boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
|
|
2430
|
+
boxShadow: hasOwnerProperty$1(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
|
|
2435
2431
|
borderTopLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
2436
2432
|
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
2437
2433
|
borderTopRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px',
|
|
@@ -2444,7 +2440,7 @@ const TD = ({
|
|
|
2444
2440
|
width: '32px',
|
|
2445
2441
|
height: '32px',
|
|
2446
2442
|
marginRight: '10px',
|
|
2447
|
-
cursor: hasOwnerProperty(newItem, 'type') ? 'pointer' : 'auto'
|
|
2443
|
+
cursor: hasOwnerProperty$1(newItem, 'type') ? 'pointer' : 'auto'
|
|
2448
2444
|
},
|
|
2449
2445
|
id: newItem.id,
|
|
2450
2446
|
type: newItem.type,
|
|
@@ -2466,7 +2462,7 @@ const TD = ({
|
|
|
2466
2462
|
width: '32px',
|
|
2467
2463
|
height: '32px',
|
|
2468
2464
|
marginRight: '10px',
|
|
2469
|
-
cursor: hasOwnerProperty(iT, 'type') ? 'pointer' : 'auto'
|
|
2465
|
+
cursor: hasOwnerProperty$1(iT, 'type') ? 'pointer' : 'auto'
|
|
2470
2466
|
},
|
|
2471
2467
|
id: iT.id ? iT.id : '',
|
|
2472
2468
|
type: iT.type ? iT.type : '',
|
|
@@ -2484,9 +2480,9 @@ const TD = ({
|
|
|
2484
2480
|
style: {
|
|
2485
2481
|
display: 'flex',
|
|
2486
2482
|
alignItems: 'flex-start',
|
|
2487
|
-
justifyContent: hasOwnerProperty(item, 'checkBox') ? 'space-between' : tBodyTextAlign ? tBodyTextAlign === 'left' ? 'flex-start' : tBodyTextAlign === 'right' ? 'flex-end' : 'center' : 'center'
|
|
2483
|
+
justifyContent: hasOwnerProperty$1(item, 'checkBox') ? 'space-between' : tBodyTextAlign ? tBodyTextAlign === 'left' ? 'flex-start' : tBodyTextAlign === 'right' ? 'flex-end' : 'center' : 'center'
|
|
2488
2484
|
}
|
|
2489
|
-
}, !hasOwnerProperty(item, 'hideArrow') && item.hideArrow !== false && (!hasOwnerProperty(item, 'rightArrow') || item.rightArrow !== true) ? hasOwnerProperty(item, 'contentList') && (hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
2485
|
+
}, !hasOwnerProperty$1(item, 'hideArrow') && item.hideArrow !== false && (!hasOwnerProperty$1(item, 'rightArrow') || item.rightArrow !== true) ? hasOwnerProperty$1(item, 'contentList') && (hasOwnerProperty$1(item, 'closeArrow') || hasOwnerProperty$1(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
2490
2486
|
id: item.id,
|
|
2491
2487
|
style: {
|
|
2492
2488
|
width: '21px',
|
|
@@ -2495,7 +2491,7 @@ const TD = ({
|
|
|
2495
2491
|
},
|
|
2496
2492
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
2497
2493
|
className: styles$9['td-span']
|
|
2498
|
-
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'checkBox') && /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
2494
|
+
}, hasOwnerProperty$1(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty$1(item, 'checkBox') && /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
2499
2495
|
data: item,
|
|
2500
2496
|
index: index,
|
|
2501
2497
|
innerIndex: innerIndex,
|
|
@@ -2507,18 +2503,18 @@ const TD = ({
|
|
|
2507
2503
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2508
2504
|
style: {
|
|
2509
2505
|
flexShrink: 11,
|
|
2510
|
-
marginLeft: hasOwnerProperty(item, 'contentList') && (!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty(item, 'rightArrow') ? item.rightArrow === true ? '0px' : '11px' : hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow') ? '11px' : '0px' : '0px',
|
|
2511
|
-
marginRight: hasOwnerProperty(item, 'contentList') && (!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty(item, 'rightArrow') ? item.rightArrow === true ? '11px' : '0px' : '0px' : '0px'
|
|
2506
|
+
marginLeft: hasOwnerProperty$1(item, 'contentList') && (!hasOwnerProperty$1(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty$1(item, 'rightArrow') ? item.rightArrow === true ? '0px' : '11px' : hasOwnerProperty$1(item, 'closeArrow') || hasOwnerProperty$1(item, 'openArrow') ? '11px' : '0px' : '0px',
|
|
2507
|
+
marginRight: hasOwnerProperty$1(item, 'contentList') && (!hasOwnerProperty$1(item, 'hideArrow') || item.hideArrow !== true) ? hasOwnerProperty$1(item, 'rightArrow') ? item.rightArrow === true ? '11px' : '0px' : '0px' : '0px'
|
|
2512
2508
|
}
|
|
2513
2509
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2514
2510
|
style: {
|
|
2515
2511
|
textAlign: tBodyTextAlign,
|
|
2516
2512
|
margin: '0px',
|
|
2517
|
-
cursor: hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots') ? 'pointer' : 'auto',
|
|
2513
|
+
cursor: hasOwnerProperty$1(item, 'arrowComponent') || hasOwnerProperty$1(item, 'dots') ? 'pointer' : 'auto',
|
|
2518
2514
|
...item.props
|
|
2519
2515
|
},
|
|
2520
|
-
onClick: hasOwnerProperty(item, 'arrowComponent') ? () => handleCheckArrowAction(item, item.checkIndex) : hasOwnerProperty(item, 'dots') ? e => handleCheckDots(e, item, index, innerIndex) : _ => _
|
|
2521
|
-
}, item.content === 0 ? item.content.toString() : item.content ? item.content : hasOwnerProperty(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : hasOwnerProperty(item, 'dots') ? /*#__PURE__*/React__default.createElement("span", {
|
|
2516
|
+
onClick: hasOwnerProperty$1(item, 'arrowComponent') ? () => handleCheckArrowAction(item, item.checkIndex) : hasOwnerProperty$1(item, 'dots') ? e => handleCheckDots(e, item, index, innerIndex) : _ => _
|
|
2517
|
+
}, item.content === 0 ? item.content.toString() : item.content ? item.content : hasOwnerProperty$1(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : hasOwnerProperty$1(item, 'dots') ? /*#__PURE__*/React__default.createElement("span", {
|
|
2522
2518
|
style: {
|
|
2523
2519
|
display: 'block',
|
|
2524
2520
|
position: 'relative'
|
|
@@ -2539,7 +2535,7 @@ const TD = ({
|
|
|
2539
2535
|
backgroundColor: '#FFFFFF',
|
|
2540
2536
|
boxShadow: '0px 0px 20px 0px #3C393E4D'
|
|
2541
2537
|
}
|
|
2542
|
-
}, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
|
|
2538
|
+
}, hasOwnerProperty$1(item, 'options') && item.options.map((optionItem, optionIndex) => {
|
|
2543
2539
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
2544
2540
|
key: `${optionItem.content}_${optionIndex}`,
|
|
2545
2541
|
className: styles$9['dots-option-item'],
|
|
@@ -2564,7 +2560,7 @@ const TD = ({
|
|
|
2564
2560
|
},
|
|
2565
2561
|
title: optionItem.content
|
|
2566
2562
|
}, optionItem.content === 0 ? optionItem.content.toString() : optionItem.content ? optionItem.content : ''));
|
|
2567
|
-
}))) : ''), hasOwnerProperty(item, 'contentList') && /*#__PURE__*/React__default.createElement("div", {
|
|
2563
|
+
}))) : ''), hasOwnerProperty$1(item, 'contentList') && /*#__PURE__*/React__default.createElement("div", {
|
|
2568
2564
|
style: {
|
|
2569
2565
|
overflow: 'auto',
|
|
2570
2566
|
marginTop: '10px',
|
|
@@ -2613,7 +2609,7 @@ const TD = ({
|
|
|
2613
2609
|
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
|
|
2614
2610
|
}, innerItem.content === 0 ? innerItem.content.toString() : innerItem.content ? innerItem.content : '');
|
|
2615
2611
|
}
|
|
2616
|
-
}))), !hasOwnerProperty(item, 'hideArrow') && item.hideArrow !== false && hasOwnerProperty(item, 'rightArrow') && item.rightArrow === true ? hasOwnerProperty(item, 'contentList') && (hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
2612
|
+
}))), !hasOwnerProperty$1(item, 'hideArrow') && item.hideArrow !== false && hasOwnerProperty$1(item, 'rightArrow') && item.rightArrow === true ? hasOwnerProperty$1(item, 'contentList') && (hasOwnerProperty$1(item, 'closeArrow') || hasOwnerProperty$1(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
2617
2613
|
id: item.id,
|
|
2618
2614
|
style: {
|
|
2619
2615
|
width: '21px',
|
|
@@ -2622,7 +2618,7 @@ const TD = ({
|
|
|
2622
2618
|
},
|
|
2623
2619
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
2624
2620
|
className: styles$9['td-span']
|
|
2625
|
-
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
|
|
2621
|
+
}, hasOwnerProperty$1(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
|
|
2626
2622
|
};
|
|
2627
2623
|
|
|
2628
2624
|
const SvgUpArrow = ({
|
|
@@ -2727,7 +2723,7 @@ const Table = ({
|
|
|
2727
2723
|
bodyData.map((item, index) => {
|
|
2728
2724
|
if (index === data.index) {
|
|
2729
2725
|
item.map((innerItem, innerIndex) => {
|
|
2730
|
-
if (hasOwnerProperty(innerItem, 'arrowComponent')) {
|
|
2726
|
+
if (hasOwnerProperty$1(innerItem, 'arrowComponent')) {
|
|
2731
2727
|
removeItemIndex = innerIndex;
|
|
2732
2728
|
}
|
|
2733
2729
|
});
|
|
@@ -2751,7 +2747,7 @@ const Table = ({
|
|
|
2751
2747
|
let removeItemIndex;
|
|
2752
2748
|
let headerWithoutArrow;
|
|
2753
2749
|
header.map((item, index) => {
|
|
2754
|
-
if (hasOwnerProperty(item, 'arrowComponent')) {
|
|
2750
|
+
if (hasOwnerProperty$1(item, 'arrowComponent')) {
|
|
2755
2751
|
removeItemIndex = index;
|
|
2756
2752
|
}
|
|
2757
2753
|
});
|
|
@@ -2791,7 +2787,7 @@ const Table = ({
|
|
|
2791
2787
|
let checkedItems = [];
|
|
2792
2788
|
data.map((item, index) => {
|
|
2793
2789
|
item.map((innerItem, innerIndex) => {
|
|
2794
|
-
if (hasOwnerProperty(innerItem, 'checkBox')) {
|
|
2790
|
+
if (hasOwnerProperty$1(innerItem, 'checkBox')) {
|
|
2795
2791
|
if (!checkedItems[innerIndex]) {
|
|
2796
2792
|
checkedItems[innerIndex] = [];
|
|
2797
2793
|
}
|
|
@@ -2871,7 +2867,7 @@ const Table = ({
|
|
|
2871
2867
|
checkableItemBool = !item.checkBox.checked;
|
|
2872
2868
|
item.checkBox.checked = !item.checkBox.checked;
|
|
2873
2869
|
}
|
|
2874
|
-
if (hasOwnerProperty(item, 'arrowComponent')) {
|
|
2870
|
+
if (hasOwnerProperty$1(item, 'arrowComponent')) {
|
|
2875
2871
|
removeItemIndex = index;
|
|
2876
2872
|
}
|
|
2877
2873
|
return item;
|
|
@@ -2879,7 +2875,7 @@ const Table = ({
|
|
|
2879
2875
|
const newUpdatedBody = updatedBody.map((item, index) => {
|
|
2880
2876
|
return item.map((innerItem, innerIndex) => {
|
|
2881
2877
|
if (checkableItemIndex === innerIndex) {
|
|
2882
|
-
if (!hasOwnerProperty(innerItem.checkBox, 'disabled') || innerItem.checkBox.disabled !== true) {
|
|
2878
|
+
if (!hasOwnerProperty$1(innerItem.checkBox, 'disabled') || innerItem.checkBox.disabled !== true) {
|
|
2883
2879
|
innerItem.checkBox.checked = checkableItemBool;
|
|
2884
2880
|
checkableBodyRowItems.push({
|
|
2885
2881
|
column: innerIndex,
|
|
@@ -2923,7 +2919,7 @@ const Table = ({
|
|
|
2923
2919
|
const updatedBody = body.slice().map(item => Object.values(item));
|
|
2924
2920
|
const newData = updatedBody.map((item, index) => {
|
|
2925
2921
|
return item.map((innerItem, innerIndex) => {
|
|
2926
|
-
if (innerItem.id === data.id && innerItem.content == data.content && hasOwnerProperty(innerItem, 'checkBox')) {
|
|
2922
|
+
if (innerItem.id === data.id && innerItem.content == data.content && hasOwnerProperty$1(innerItem, 'checkBox')) {
|
|
2927
2923
|
innerItem.checkBox.checked = !innerItem.checkBox.checked;
|
|
2928
2924
|
handleHeaderCheckedUpdate({
|
|
2929
2925
|
row: index,
|
|
@@ -2980,7 +2976,7 @@ const Table = ({
|
|
|
2980
2976
|
const handleCheckArrowAction = (item, rowPosition) => {
|
|
2981
2977
|
const status = item.status;
|
|
2982
2978
|
const checkedOpenableRow = body[rowPosition].map(innerItem => {
|
|
2983
|
-
if (hasOwnerProperty(innerItem, 'status')) {
|
|
2979
|
+
if (hasOwnerProperty$1(innerItem, 'status')) {
|
|
2984
2980
|
if (status === 'close') {
|
|
2985
2981
|
innerItem.status = 'open';
|
|
2986
2982
|
} else {
|
|
@@ -3006,13 +3002,13 @@ const Table = ({
|
|
|
3006
3002
|
}
|
|
3007
3003
|
single = item;
|
|
3008
3004
|
}
|
|
3009
|
-
if (hasOwnerProperty(item, 'status') && !hasOwnerProperty(item, 'arrowComponent')) {
|
|
3005
|
+
if (hasOwnerProperty$1(item, 'status') && !hasOwnerProperty$1(item, 'arrowComponent')) {
|
|
3010
3006
|
allArrows.push(item);
|
|
3011
3007
|
}
|
|
3012
3008
|
return item;
|
|
3013
3009
|
});
|
|
3014
3010
|
const checkedOpenableRowArrow = checkedOpenableRow.map(item => {
|
|
3015
|
-
if (hasOwnerProperty(item, 'arrowComponent')) {
|
|
3011
|
+
if (hasOwnerProperty$1(item, 'arrowComponent')) {
|
|
3016
3012
|
if (single && single.status === 'close') {
|
|
3017
3013
|
item.status = 'close';
|
|
3018
3014
|
} else if (single && single.status === 'open') {
|
|
@@ -3021,7 +3017,7 @@ const Table = ({
|
|
|
3021
3017
|
}
|
|
3022
3018
|
}
|
|
3023
3019
|
}
|
|
3024
|
-
if (hasOwnerProperty(clickableItem, 'theSame') && hasOwnerProperty(item, 'theSame') && clickableItem.theSame === item.theSame) {
|
|
3020
|
+
if (hasOwnerProperty$1(clickableItem, 'theSame') && hasOwnerProperty$1(item, 'theSame') && clickableItem.theSame === item.theSame) {
|
|
3025
3021
|
item.status = clickableItem.status;
|
|
3026
3022
|
}
|
|
3027
3023
|
return item;
|
|
@@ -3045,7 +3041,7 @@ const Table = ({
|
|
|
3045
3041
|
});
|
|
3046
3042
|
const checkedOpenableAllRowsBody = body.map(innerItem => {
|
|
3047
3043
|
return innerItem.map(iElem => {
|
|
3048
|
-
if (hasOwnerProperty(iElem, 'status')) {
|
|
3044
|
+
if (hasOwnerProperty$1(iElem, 'status')) {
|
|
3049
3045
|
if (item.status === 'open') {
|
|
3050
3046
|
iElem.status = 'open';
|
|
3051
3047
|
} else {
|
|
@@ -3062,7 +3058,7 @@ const Table = ({
|
|
|
3062
3058
|
e.stopPropagation();
|
|
3063
3059
|
const checkBodyMore = body.map((elemItem, elemIndex) => {
|
|
3064
3060
|
return elemItem.map((elemInnerItem, elemInnerIndex) => {
|
|
3065
|
-
if (elemIndex === index && hasOwnerProperty(elemInnerItem, 'dots')) {
|
|
3061
|
+
if (elemIndex === index && hasOwnerProperty$1(elemInnerItem, 'dots')) {
|
|
3066
3062
|
if (elemInnerIndex === innerIndex) {
|
|
3067
3063
|
if (item.dotsStatus === 'deActive') {
|
|
3068
3064
|
elemInnerItem.dotsStatus = 'active';
|
|
@@ -3070,7 +3066,7 @@ const Table = ({
|
|
|
3070
3066
|
elemInnerItem.dotsStatus = 'deActive';
|
|
3071
3067
|
}
|
|
3072
3068
|
}
|
|
3073
|
-
} else if (elemIndex !== index && hasOwnerProperty(elemInnerItem, 'dots')) {
|
|
3069
|
+
} else if (elemIndex !== index && hasOwnerProperty$1(elemInnerItem, 'dots')) {
|
|
3074
3070
|
if (elemInnerIndex === innerIndex) {
|
|
3075
3071
|
elemInnerItem.dotsStatus = 'deActive';
|
|
3076
3072
|
}
|
|
@@ -3119,7 +3115,7 @@ const Table = ({
|
|
|
3119
3115
|
const handleTableClick = () => {
|
|
3120
3116
|
const checkBodyMore = body.map(elemItem => {
|
|
3121
3117
|
return elemItem.map(elemInnerItem => {
|
|
3122
|
-
if (hasOwnerProperty(elemInnerItem, 'dots')) {
|
|
3118
|
+
if (hasOwnerProperty$1(elemInnerItem, 'dots')) {
|
|
3123
3119
|
elemInnerItem.dotsStatus = 'deActive';
|
|
3124
3120
|
}
|
|
3125
3121
|
return elemInnerItem;
|
|
@@ -3136,8 +3132,8 @@ const Table = ({
|
|
|
3136
3132
|
const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
|
|
3137
3133
|
const insert = checkForInsertArrow.map((item, index) => {
|
|
3138
3134
|
item.map((innerItem, innerIndex) => {
|
|
3139
|
-
if (hasOwnerProperty(innerItem, 'checkBox')) {
|
|
3140
|
-
if (hasOwnerProperty(innerItem.checkBox, 'disabled')) {
|
|
3135
|
+
if (hasOwnerProperty$1(innerItem, 'checkBox')) {
|
|
3136
|
+
if (hasOwnerProperty$1(innerItem.checkBox, 'disabled')) {
|
|
3141
3137
|
if (innerItem.checkBox.disabled === true) {
|
|
3142
3138
|
if (!disabledArray[innerIndex]) {
|
|
3143
3139
|
disabledArray[innerIndex] = {
|
|
@@ -3156,8 +3152,8 @@ const Table = ({
|
|
|
3156
3152
|
} else {
|
|
3157
3153
|
const insert = checkBodyForChackedItems.map((item, index) => {
|
|
3158
3154
|
item.map((innerItem, innerIndex) => {
|
|
3159
|
-
if (hasOwnerProperty(innerItem, 'checkBox')) {
|
|
3160
|
-
if (hasOwnerProperty(innerItem.checkBox, 'disabled')) {
|
|
3155
|
+
if (hasOwnerProperty$1(innerItem, 'checkBox')) {
|
|
3156
|
+
if (hasOwnerProperty$1(innerItem.checkBox, 'disabled')) {
|
|
3161
3157
|
if (innerItem.checkBox.disabled === true) {
|
|
3162
3158
|
if (!disabledArray[innerIndex]) {
|
|
3163
3159
|
disabledArray[innerIndex] = {
|
|
@@ -3187,6 +3183,9 @@ const Table = ({
|
|
|
3187
3183
|
setHeader(() => dataHeader);
|
|
3188
3184
|
}
|
|
3189
3185
|
}, [dataHeader, arrowColumn, arrowShow, disableArr]);
|
|
3186
|
+
useEffect(() => {
|
|
3187
|
+
className && setClassProps(() => classnames(className ?? configStyles.TABLE.className));
|
|
3188
|
+
}, [className]);
|
|
3190
3189
|
useEffect(() => {
|
|
3191
3190
|
configStylesPromise.then(data => {
|
|
3192
3191
|
setClassProps(() => classnames(className ?? data.TABLE.className));
|
|
@@ -3538,6 +3537,9 @@ const Modal = ({
|
|
|
3538
3537
|
}
|
|
3539
3538
|
}
|
|
3540
3539
|
}, [selected]);
|
|
3540
|
+
useEffect(() => {
|
|
3541
|
+
className && setClassProps(() => classnames(className ?? configStyles.MODAL.className));
|
|
3542
|
+
}, [className]);
|
|
3541
3543
|
useEffect(() => {
|
|
3542
3544
|
document.addEventListener('keydown', handleESC, false);
|
|
3543
3545
|
configStylesPromise.then(data => {
|
|
@@ -3675,7 +3677,7 @@ const Modal = ({
|
|
|
3675
3677
|
}
|
|
3676
3678
|
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
3677
3679
|
if (select === index) {
|
|
3678
|
-
if (!hasOwnerProperty(item, 'url')) {
|
|
3680
|
+
if (!hasOwnerProperty$1(item, 'url')) {
|
|
3679
3681
|
alert('Please add url property in data prop on each element');
|
|
3680
3682
|
} else {
|
|
3681
3683
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -4149,6 +4151,7 @@ const Input = ({
|
|
|
4149
4151
|
const [show, setShow] = useState(false);
|
|
4150
4152
|
const [isHover, setIsHover] = useState(false);
|
|
4151
4153
|
const [classProps, setClassProps] = useState({});
|
|
4154
|
+
const [innerValue, setInnerValue] = useState('');
|
|
4152
4155
|
const [configStyles, setConfigStyles] = useState({});
|
|
4153
4156
|
const [innerErrorMessage, setInnerErrorMessage] = useState('');
|
|
4154
4157
|
const inpStyles = configStyles.INPUT && {
|
|
@@ -4202,6 +4205,13 @@ const Input = ({
|
|
|
4202
4205
|
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
4203
4206
|
}
|
|
4204
4207
|
}, [type, regexp, errorMessage, regexpErrorMessage]);
|
|
4208
|
+
useEffect(() => {
|
|
4209
|
+
const val = typeof value === 'number' ? value.toString() : value;
|
|
4210
|
+
setInnerValue(() => val);
|
|
4211
|
+
}, [value]);
|
|
4212
|
+
useEffect(() => {
|
|
4213
|
+
className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
|
|
4214
|
+
}, [className]);
|
|
4205
4215
|
useEffect(() => {
|
|
4206
4216
|
configStylesPromise.then(data => {
|
|
4207
4217
|
setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']));
|
|
@@ -4253,7 +4263,7 @@ const Input = ({
|
|
|
4253
4263
|
}
|
|
4254
4264
|
}, type === 'password' ? show ? leftIcon[1] : leftIcon[0] : leftIcon[0]) : '', type === 'tel' ? /*#__PURE__*/React__default.createElement(TelInput, {
|
|
4255
4265
|
type: type,
|
|
4256
|
-
value:
|
|
4266
|
+
value: innerValue,
|
|
4257
4267
|
inputChange: change,
|
|
4258
4268
|
isHover: isHover,
|
|
4259
4269
|
disabled: disabled,
|
|
@@ -4268,8 +4278,8 @@ const Input = ({
|
|
|
4268
4278
|
telBorderRightColor: telBorderRightColor ?? configStyles.INPUT.tel.borderRight.color,
|
|
4269
4279
|
telBorderRightColorHover: telBorderRightColorHover ?? configStyles.INPUT.tel.borderRight.colors.hover
|
|
4270
4280
|
}) : type === 'number' ? /*#__PURE__*/React__default.createElement(NumberInput, {
|
|
4271
|
-
value: value,
|
|
4272
4281
|
dots: withoutDot,
|
|
4282
|
+
value: innerValue,
|
|
4273
4283
|
float: floatToFix,
|
|
4274
4284
|
disabled: disabled,
|
|
4275
4285
|
inputChange: change,
|
|
@@ -4282,7 +4292,7 @@ const Input = ({
|
|
|
4282
4292
|
}) : type === 'password' ? /*#__PURE__*/React__default.createElement(PassInput, {
|
|
4283
4293
|
show: show,
|
|
4284
4294
|
type: type,
|
|
4285
|
-
value:
|
|
4295
|
+
value: innerValue,
|
|
4286
4296
|
disabled: disabled,
|
|
4287
4297
|
inputChange: change,
|
|
4288
4298
|
maxLength: maxLength,
|
|
@@ -4290,7 +4300,7 @@ const Input = ({
|
|
|
4290
4300
|
inpAttributes: inpAttributes,
|
|
4291
4301
|
radius: radius ?? configStyles.INPUT.radius
|
|
4292
4302
|
}) : /*#__PURE__*/React__default.createElement(TextInput, {
|
|
4293
|
-
value:
|
|
4303
|
+
value: innerValue,
|
|
4294
4304
|
disabled: disabled,
|
|
4295
4305
|
inputChange: change,
|
|
4296
4306
|
inpStyles: inpStyles,
|
|
@@ -4395,7 +4405,31 @@ Input.propTypes = {
|
|
|
4395
4405
|
leftIcon: PropTypes.arrayOf(PropTypes.element),
|
|
4396
4406
|
rightIcon: PropTypes.arrayOf(PropTypes.element),
|
|
4397
4407
|
type: PropTypes.oneOf(Object.values(InputTypes)),
|
|
4398
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
|
|
4408
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])
|
|
4409
|
+
};
|
|
4410
|
+
|
|
4411
|
+
const hasOwnerProperty = (object, property) => {
|
|
4412
|
+
return Object.prototype.hasOwnProperty.call(object, property);
|
|
4413
|
+
};
|
|
4414
|
+
const handleUtilsMouseEnterLeave = (e, behaviourStyle) => {
|
|
4415
|
+
if (typeof behaviourStyle !== 'object' || behaviourStyle === null || behaviourStyle === undefined) {
|
|
4416
|
+
alert('Please set a second param of handleUtilsMouseEnter function as valid object');
|
|
4417
|
+
return;
|
|
4418
|
+
}
|
|
4419
|
+
if (!hasOwnerProperty(e, 'target')) {
|
|
4420
|
+
alert('Please set a valid object like DOM event');
|
|
4421
|
+
return;
|
|
4422
|
+
}
|
|
4423
|
+
const existStyle = e.target.style;
|
|
4424
|
+
if (typeof existStyle !== 'object' || existStyle === null) {
|
|
4425
|
+
alert('Please set a valid style object in DOM event tergat');
|
|
4426
|
+
return;
|
|
4427
|
+
}
|
|
4428
|
+
for (const property in behaviourStyle) {
|
|
4429
|
+
if (existStyle[property]) {
|
|
4430
|
+
existStyle[property] = behaviourStyle[property];
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4399
4433
|
};
|
|
4400
4434
|
|
|
4401
4435
|
const RadioDirectionMode = {
|
|
@@ -4437,6 +4471,18 @@ const Radio = ({
|
|
|
4437
4471
|
});
|
|
4438
4472
|
const handleMouseEnter = (id, elemID) => {
|
|
4439
4473
|
const elem = document.querySelector(`#${elemID}`);
|
|
4474
|
+
// const newStyles = {
|
|
4475
|
+
// backgroundColor:
|
|
4476
|
+
// id === innerSelectedData?.id
|
|
4477
|
+
// ? borderActiveColor
|
|
4478
|
+
// ? borderActiveColor
|
|
4479
|
+
// : configStyles.RADIO.border.activeColor
|
|
4480
|
+
// : borderColor
|
|
4481
|
+
// ? borderColor
|
|
4482
|
+
// : configStyles.RADIO.border.color
|
|
4483
|
+
// }
|
|
4484
|
+
// handleUtilsMouseEnterLeave(e, newStyles);
|
|
4485
|
+
|
|
4440
4486
|
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color;
|
|
4441
4487
|
};
|
|
4442
4488
|
const handleMouseLeave = (id, elemID) => {
|
|
@@ -4489,6 +4535,9 @@ const Radio = ({
|
|
|
4489
4535
|
});
|
|
4490
4536
|
}
|
|
4491
4537
|
}, [keyNames]);
|
|
4538
|
+
useEffect(() => {
|
|
4539
|
+
className && setClassProps(() => classnames(className ?? configStyles.RADIO.className));
|
|
4540
|
+
}, [className]);
|
|
4492
4541
|
useEffect(() => {
|
|
4493
4542
|
configStylesPromise.then(data => {
|
|
4494
4543
|
setClassProps(() => classnames(className ?? data.RADIO.className));
|
|
@@ -4682,7 +4731,7 @@ const Select = ({
|
|
|
4682
4731
|
onChange({});
|
|
4683
4732
|
setNewSelected([]);
|
|
4684
4733
|
const clearedOptions = existOptions && existOptions.length > 0 && existOptions.map(item => {
|
|
4685
|
-
if (hasOwnerProperty(item, 'checked')) {
|
|
4734
|
+
if (hasOwnerProperty$1(item, 'checked')) {
|
|
4686
4735
|
item.checked = false;
|
|
4687
4736
|
}
|
|
4688
4737
|
return item;
|
|
@@ -4732,7 +4781,7 @@ const Select = ({
|
|
|
4732
4781
|
};
|
|
4733
4782
|
const isObjectEmpty = obj => {
|
|
4734
4783
|
for (var key in obj) {
|
|
4735
|
-
if (hasOwnerProperty(obj, key)) {
|
|
4784
|
+
if (hasOwnerProperty$1(obj, key)) {
|
|
4736
4785
|
return false;
|
|
4737
4786
|
}
|
|
4738
4787
|
}
|
|
@@ -4776,6 +4825,9 @@ const Select = ({
|
|
|
4776
4825
|
setExistOptions(modifiedOptions);
|
|
4777
4826
|
}
|
|
4778
4827
|
}, [options, multiple, selected, selected?.length]);
|
|
4828
|
+
useEffect(() => {
|
|
4829
|
+
className && setClassProps(() => classnames(className ?? configStyles.SELECT.className));
|
|
4830
|
+
}, [className]);
|
|
4779
4831
|
useEffect(() => {
|
|
4780
4832
|
configStylesPromise.then(data => {
|
|
4781
4833
|
setClassProps(() => classnames(className ?? data.SELECT.className));
|
|
@@ -5362,6 +5414,9 @@ const Toaster = ({
|
|
|
5362
5414
|
const handleToasterClick = e => {
|
|
5363
5415
|
e.stopPropagation();
|
|
5364
5416
|
};
|
|
5417
|
+
useEffect(() => {
|
|
5418
|
+
className && setClassProps(() => classnames(className ?? configStyles.TOASTER.className));
|
|
5419
|
+
}, [className]);
|
|
5365
5420
|
useEffect(() => {
|
|
5366
5421
|
configStylesPromise.then(data => {
|
|
5367
5422
|
setClassProps(() => classnames(className ?? data.TOASTER.className));
|
|
@@ -5438,6 +5493,9 @@ const Tooltip = ({
|
|
|
5438
5493
|
tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
|
|
5439
5494
|
tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
|
|
5440
5495
|
}, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
|
|
5496
|
+
useEffect(() => {
|
|
5497
|
+
className && setClassProps(() => classnames(className ?? configStyles.TOOLTIP.className));
|
|
5498
|
+
}, [className]);
|
|
5441
5499
|
useEffect(() => {
|
|
5442
5500
|
configStylesPromise.then(data => {
|
|
5443
5501
|
setClassProps(() => classnames(styles$4['tooltip-block'], className ?? data.TOOLTIP.className));
|
|
@@ -5589,6 +5647,9 @@ const Captcha = ({
|
|
|
5589
5647
|
setRangeNumber(Math.min(roundedRange, 100));
|
|
5590
5648
|
}
|
|
5591
5649
|
}, [range, getRange]);
|
|
5650
|
+
useEffect(() => {
|
|
5651
|
+
className && setClassProps(() => classnames(className ?? configStyles.CAPTCHA.className));
|
|
5652
|
+
}, [className]);
|
|
5592
5653
|
useEffect(() => {
|
|
5593
5654
|
configStylesPromise.then(data => {
|
|
5594
5655
|
setClassProps(() => classnames(className ?? data.CAPTCHA.className));
|
|
@@ -5704,6 +5765,9 @@ const Stepper = ({
|
|
|
5704
5765
|
}) => {
|
|
5705
5766
|
const [classProps, setClassProps] = useState({});
|
|
5706
5767
|
const [configStyles, setConfigStyles] = useState({});
|
|
5768
|
+
useEffect(() => {
|
|
5769
|
+
className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
|
|
5770
|
+
}, [className]);
|
|
5707
5771
|
useEffect(() => {
|
|
5708
5772
|
configStylesPromise.then(data => {
|
|
5709
5773
|
setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$2['stepper-container']} stepper-container-rem`));
|
|
@@ -5797,6 +5861,9 @@ const Checkbox = ({
|
|
|
5797
5861
|
});
|
|
5798
5862
|
}
|
|
5799
5863
|
}, [keyNames]);
|
|
5864
|
+
useEffect(() => {
|
|
5865
|
+
className && setClassProps(() => classnames(className ?? configStyles.CHECKBOX.className));
|
|
5866
|
+
}, [className]);
|
|
5800
5867
|
useEffect(() => {
|
|
5801
5868
|
configStylesPromise.then(data => {
|
|
5802
5869
|
setClassProps(() => classnames(className ?? data.CHECKBOX.className));
|
|
@@ -5830,12 +5897,12 @@ const Checkbox = ({
|
|
|
5830
5897
|
label: item[innerKeyNames.label],
|
|
5831
5898
|
checked: item[innerKeyNames.checked],
|
|
5832
5899
|
disabled: item[innerKeyNames.disabled],
|
|
5833
|
-
|
|
5834
|
-
labelMarginLeft: labelMarginLeft ?? configStyles.CHECKBOX.label.marginLeft,
|
|
5900
|
+
checkedIcon: checkedIcon ?? configStyles.CHECKBOX.checkedIcon,
|
|
5835
5901
|
checkedColor: checkedColor ?? configStyles.CHECKBOX.colors.checked,
|
|
5902
|
+
unCheckedIcon: unCheckedIcon ?? configStyles.CHECKBOX.unCheckedIcon,
|
|
5903
|
+
ignoreDisabledForChecked: item[innerKeyNames.ignoreDisabledForChecked],
|
|
5836
5904
|
unCheckedColor: unCheckedColor ?? configStyles.CHECKBOX.colors.unChecked,
|
|
5837
|
-
|
|
5838
|
-
unCheckedIcon: unCheckedIcon ?? configStyles.CHECKBOX.unCheckedIcon
|
|
5905
|
+
labelMarginLeft: labelMarginLeft ?? configStyles.CHECKBOX.label.marginLeft
|
|
5839
5906
|
}));
|
|
5840
5907
|
}));
|
|
5841
5908
|
};
|
|
@@ -5950,6 +6017,9 @@ const Textarea = ({
|
|
|
5950
6017
|
}
|
|
5951
6018
|
setInnerValue(() => value);
|
|
5952
6019
|
}, [value, errorMessage]);
|
|
6020
|
+
useEffect(() => {
|
|
6021
|
+
className && setClassProps(() => classnames(className ?? configStyles.TEXTAREA.className));
|
|
6022
|
+
}, [className]);
|
|
5953
6023
|
useEffect(() => {
|
|
5954
6024
|
configStylesPromise.then(data => {
|
|
5955
6025
|
setClassProps(() => classnames(className ?? data.TEXTAREA.className));
|
|
@@ -6156,6 +6226,9 @@ const Typography = ({
|
|
|
6156
6226
|
setValidVariant(true);
|
|
6157
6227
|
}
|
|
6158
6228
|
}, [variant]);
|
|
6229
|
+
useEffect(() => {
|
|
6230
|
+
className && setClassProps(() => classnames(className ?? configStyles.TYPOGRAPHY.className));
|
|
6231
|
+
}, [className]);
|
|
6159
6232
|
useEffect(() => {
|
|
6160
6233
|
configStylesPromise.then(data => {
|
|
6161
6234
|
setClassProps(() => classnames(className ?? data.TYPOGRAPHY.className));
|
|
@@ -6288,6 +6361,25 @@ const Pagination = ({
|
|
|
6288
6361
|
const [configStyles, setConfigStyles] = useState({});
|
|
6289
6362
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
6290
6363
|
const [currentTotalCount, setcurrentTotalCount] = useState(totalCount);
|
|
6364
|
+
useEffect(() => {
|
|
6365
|
+
configStylesPromise.then(data => {
|
|
6366
|
+
setClassProps(() => classnames(
|
|
6367
|
+
// TODO: check and remove pagination-bar-rem class
|
|
6368
|
+
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6369
|
+
setConfigStyles(() => {
|
|
6370
|
+
return {
|
|
6371
|
+
...data
|
|
6372
|
+
};
|
|
6373
|
+
});
|
|
6374
|
+
}, error => {
|
|
6375
|
+
console.error(error);
|
|
6376
|
+
});
|
|
6377
|
+
}, []);
|
|
6378
|
+
useEffect(() => {
|
|
6379
|
+
className && setClassProps(() => classnames(
|
|
6380
|
+
// TODO: check and remove pagination-bar-rem class
|
|
6381
|
+
styles$1.list, className ?? configStyles.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6382
|
+
}, [className]);
|
|
6291
6383
|
useEffect(() => {
|
|
6292
6384
|
setcurrentTotalCount(totalCount);
|
|
6293
6385
|
}, [totalCount]);
|
|
@@ -6357,20 +6449,6 @@ const Pagination = ({
|
|
|
6357
6449
|
}
|
|
6358
6450
|
};
|
|
6359
6451
|
let lastPage = paginationRange[paginationRange.length - 1];
|
|
6360
|
-
useEffect(() => {
|
|
6361
|
-
configStylesPromise.then(data => {
|
|
6362
|
-
setClassProps(() => classnames(
|
|
6363
|
-
// TODO: check and remove pagination-bar-rem class
|
|
6364
|
-
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6365
|
-
setConfigStyles(() => {
|
|
6366
|
-
return {
|
|
6367
|
-
...data
|
|
6368
|
-
};
|
|
6369
|
-
});
|
|
6370
|
-
}, error => {
|
|
6371
|
-
console.error(error);
|
|
6372
|
-
});
|
|
6373
|
-
}, []);
|
|
6374
6452
|
return configStyles.PAGINATION && /*#__PURE__*/React__default.createElement("div", {
|
|
6375
6453
|
style: {
|
|
6376
6454
|
display: 'flex',
|
|
@@ -6564,12 +6642,18 @@ const Autocomplete = ({
|
|
|
6564
6642
|
setIsHover(false);
|
|
6565
6643
|
};
|
|
6566
6644
|
const handleRowMouseEnter = e => {
|
|
6567
|
-
|
|
6568
|
-
|
|
6645
|
+
const newStyles = {
|
|
6646
|
+
color: contentBottomRowHoverColor ? contentBottomRowHoverColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.hover,
|
|
6647
|
+
backgroundColor: contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.backgroundHover
|
|
6648
|
+
};
|
|
6649
|
+
handleUtilsMouseEnterLeave(e, newStyles);
|
|
6569
6650
|
};
|
|
6570
6651
|
const handleRowMouseLeave = e => {
|
|
6571
|
-
|
|
6572
|
-
|
|
6652
|
+
const newStyles = {
|
|
6653
|
+
color: contentBottomRowColor ? contentBottomRowColor : configStyles.AUTOCOMPLETE.contentBottom.row.color,
|
|
6654
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.AUTOCOMPLETE.contentBottom.row.colors.background
|
|
6655
|
+
};
|
|
6656
|
+
handleUtilsMouseEnterLeave(e, newStyles);
|
|
6573
6657
|
};
|
|
6574
6658
|
const handleFocus = () => {
|
|
6575
6659
|
setIsFocus(true);
|
|
@@ -6661,7 +6745,7 @@ const Autocomplete = ({
|
|
|
6661
6745
|
alert('Please add options prop');
|
|
6662
6746
|
}
|
|
6663
6747
|
options && options.length > 0 && options.map(item => {
|
|
6664
|
-
if (!hasOwnerProperty(item, keyNames.name)) {
|
|
6748
|
+
if (!hasOwnerProperty$1(item, keyNames.name)) {
|
|
6665
6749
|
alert(`Please add ${keyNames.name} property in items of options array`);
|
|
6666
6750
|
}
|
|
6667
6751
|
});
|
|
@@ -6687,6 +6771,9 @@ const Autocomplete = ({
|
|
|
6687
6771
|
useEffect(() => {
|
|
6688
6772
|
setInnerError(errorMessage);
|
|
6689
6773
|
}, [errorMessage]);
|
|
6774
|
+
useEffect(() => {
|
|
6775
|
+
className && setClassProps(() => classnames(className ?? configStyles.AUTOCOMPLETE.className, styles['auto-complete']));
|
|
6776
|
+
}, [className]);
|
|
6690
6777
|
useEffect(() => {
|
|
6691
6778
|
configStylesPromise.then(data => {
|
|
6692
6779
|
setClassProps(() => classnames(className ?? data.AUTOCOMPLETE.className, styles['auto-complete']));
|