react-table-edit 0.9.7 → 0.9.8

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/dist/index.js CHANGED
@@ -53,11 +53,11 @@ __export(Table_edit_exports, {
53
53
  module.exports = __toCommonJS(Table_edit_exports);
54
54
 
55
55
  // test-app/src/component/table/index.tsx
56
- var import_react15 = require("react");
57
- var import_reactstrap10 = require("reactstrap");
58
- var import_classnames13 = __toESM(require("classnames"));
59
- var import_react_i18next11 = require("react-i18next");
60
- var import_becoxy_icons6 = require("becoxy-icons");
56
+ var import_react16 = require("react");
57
+ var import_reactstrap11 = require("reactstrap");
58
+ var import_classnames14 = __toESM(require("classnames"));
59
+ var import_react_i18next12 = require("react-i18next");
60
+ var import_becoxy_icons7 = require("becoxy-icons");
61
61
 
62
62
  // test-app/src/component/react-input/index.tsx
63
63
  var import_becoxy_icons = require("becoxy-icons");
@@ -330,7 +330,7 @@ var roundNumber = (num, fraction) => {
330
330
  };
331
331
 
332
332
  // test-app/src/component/table/index.tsx
333
- var import_moment2 = __toESM(require("moment"));
333
+ var import_moment3 = __toESM(require("moment"));
334
334
 
335
335
  // test-app/src/component/edit-form/index.tsx
336
336
  var import_react8 = require("react");
@@ -572,7 +572,7 @@ var import_classnames5 = __toESM(require("classnames"));
572
572
  var import_react7 = require("react");
573
573
 
574
574
  // test-app/src/component/select-table/index.tsx
575
- var import_react6 = require("react");
575
+ var import_react6 = __toESM(require("react"));
576
576
  var import_reactstrap4 = require("reactstrap");
577
577
  var import_react_i18next3 = require("react-i18next");
578
578
  var import_classnames4 = __toESM(require("classnames"));
@@ -691,9 +691,6 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
691
691
  let key = "";
692
692
  if (onKeyDown && (!dropdownOpen || !listKeyUse.includes(e.code) || (e.code === "Enter" || e.code === "Tab" || e.code === "NumpadEnter" || e.code === "Space") && !(optionsLoad ? optionsLoad : options)[indexFocus] || (e.code === "ArrowDown" || e.code === "ArrowUp") && (optionsLoad?.length ?? 0) === 0 && options.length === 0 || e.code === "Escape" && !(isClearable && value && !isDisabled))) {
693
693
  key = onKeyDown(e);
694
- if (key === "ArrowRight" || key === "ArrowLeft") {
695
- closeMenu();
696
- }
697
694
  }
698
695
  let flag = false;
699
696
  if (!key) {
@@ -857,7 +854,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
857
854
  const element = document.getElementById(`select-${id}-${indexRow}-${indexCol}`);
858
855
  return element && element.scrollWidth > element.clientWidth;
859
856
  };
860
- const RenderElement = (props2) => {
857
+ const RenderElement = import_react6.default.memo((props2) => {
861
858
  const { indexRow, row, isSelected, level = 0 } = props2;
862
859
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
863
860
  "tr",
@@ -876,13 +873,11 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
876
873
  const index = value?.findIndex((x) => x === row[fieldValue ?? "value"]);
877
874
  if (index > -1) {
878
875
  value?.splice(index, 1);
879
- const valueArr = (optionsLoad ? optionsLoad : options).filter((ele) => value?.some((x) => x === ele[fieldValue ?? "value"]));
880
- onChange(valueArr);
876
+ onChange([...value]);
881
877
  } else {
882
878
  if (value) {
883
879
  value?.push(row[fieldValue ?? "value"]);
884
- const valueArr = (optionsLoad ? optionsLoad : options).filter((ele) => value?.some((x) => x === ele[fieldValue ?? "value"]));
885
- onChange(valueArr);
880
+ onChange([...value]);
886
881
  } else {
887
882
  onChange([row[fieldValue ?? "value"]]);
888
883
  }
@@ -929,13 +924,11 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
929
924
  const index = value?.findIndex((x) => x === row[fieldValue ?? "value"]);
930
925
  if (index > -1) {
931
926
  value?.splice(index, 1);
932
- const valueArr = (optionsLoad ? optionsLoad : options).filter((ele) => value?.some((x) => x === ele[fieldValue ?? "value"]));
933
- onChange(valueArr);
927
+ onChange([...value]);
934
928
  } else {
935
929
  if (value) {
936
930
  value?.push(row[fieldValue ?? "value"]);
937
- const valueArr = (optionsLoad ? optionsLoad : options).filter((ele) => value?.some((x) => x === ele[fieldValue ?? "value"]));
938
- onChange(valueArr);
931
+ onChange([...value]);
939
932
  } else {
940
933
  onChange([row[fieldValue ?? "value"]]);
941
934
  }
@@ -965,7 +958,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
965
958
  },
966
959
  `row-${indexRow}`
967
960
  );
968
- };
961
+ });
969
962
  const RenderTable = (props2) => {
970
963
  const {} = props2;
971
964
  let countDisplay = 0;
@@ -987,7 +980,7 @@ var SelectTable = (0, import_react6.forwardRef)((props, ref) => {
987
980
  if (isSelectedAll) {
988
981
  onChange([]);
989
982
  } else {
990
- onChange([...optionsLoad ? optionsLoad : options]);
983
+ onChange([...(optionsLoad ? optionsLoad : options).map((x) => x[fieldValue ?? "value"])]);
991
984
  }
992
985
  e.stopPropagation();
993
986
  }
@@ -2009,9 +2002,6 @@ var SidebarSetColumn = (props) => {
2009
2002
  };
2010
2003
  var sidebar_setting_column_default = SidebarSetColumn;
2011
2004
 
2012
- // test-app/src/component/table/index.tsx
2013
- var import_ej2_react_dropdowns = require("@syncfusion/ej2-react-dropdowns");
2014
-
2015
2005
  // test-app/src/component/table/paging/index.tsx
2016
2006
  var import_becoxy_icons5 = require("becoxy-icons");
2017
2007
  var import_classnames10 = __toESM(require("classnames"));
@@ -2243,10 +2233,587 @@ var CommandElement = (props) => {
2243
2233
  };
2244
2234
  var command_default = CommandElement;
2245
2235
 
2246
- // test-app/src/component/table/index.tsx
2236
+ // test-app/src/component/select-table-tree/index.tsx
2237
+ var import_react15 = __toESM(require("react"));
2238
+ var import_reactstrap10 = require("reactstrap");
2239
+ var import_react_i18next11 = require("react-i18next");
2240
+ var import_classnames13 = __toESM(require("classnames"));
2241
+ var import_moment2 = __toESM(require("moment"));
2242
+ var import_becoxy_icons6 = require("becoxy-icons");
2247
2243
  var import_jsx_runtime15 = require("react/jsx-runtime");
2248
- var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2244
+ var defaultMaxHeight2 = 250;
2245
+ var SelectTableTree = (0, import_react15.forwardRef)((props, ref) => {
2246
+ const {
2247
+ id,
2248
+ menuWidth,
2249
+ width,
2250
+ invalid,
2251
+ onKeyDown,
2252
+ placeholder,
2253
+ textAlign,
2254
+ options,
2255
+ columns,
2256
+ decimalSeparator,
2257
+ thousandSeparator,
2258
+ onChange,
2259
+ value,
2260
+ fieldValue,
2261
+ fieldLabel,
2262
+ fieldChildren,
2263
+ maxHeight,
2264
+ handleAdd,
2265
+ isClearable,
2266
+ component,
2267
+ formatOptionLabel,
2268
+ isMulti,
2269
+ noHeader,
2270
+ isDisabled,
2271
+ showFooter,
2272
+ selectChilds,
2273
+ footerComponent,
2274
+ onPaste
2275
+ } = props;
2276
+ const selectTableRef = (0, import_react15.useRef)();
2277
+ const selectMenuTableRef = (0, import_react15.useRef)();
2278
+ const inputRef = (0, import_react15.useRef)();
2279
+ const [dropdownOpen, setDropdownOpen] = (0, import_react15.useState)(false);
2280
+ const [isFocus, setIsFocus] = (0, import_react15.useState)(false);
2281
+ const [searchTerm, setSearchTerm] = (0, import_react15.useState)("");
2249
2282
  const { t } = (0, import_react_i18next11.useTranslation)();
2283
+ const areAllItemsSelected = (value2, options2, fieldValue2) => {
2284
+ const checkAllSelected = (nodes) => {
2285
+ return nodes.every((node) => {
2286
+ const isSelected = value2.includes(node[fieldValue2]);
2287
+ const childrenSelected = node.children ? checkAllSelected(node.children) : true;
2288
+ return isSelected && childrenSelected;
2289
+ });
2290
+ };
2291
+ return checkAllSelected(options2);
2292
+ };
2293
+ const isSelectedAll = (0, import_react15.useMemo)(() => {
2294
+ return isMulti === true && options.length > 0 && areAllItemsSelected(value, options, fieldValue ?? "value");
2295
+ }, [options, value]);
2296
+ const defaultColumns = noHeader ? [
2297
+ {
2298
+ headerText: "Name",
2299
+ field: fieldLabel ?? "label",
2300
+ width: menuWidth
2301
+ }
2302
+ ] : [
2303
+ {
2304
+ field: "key",
2305
+ headerText: "Code",
2306
+ width: 100,
2307
+ maxWidth: 120,
2308
+ minWidth: 80
2309
+ },
2310
+ {
2311
+ headerText: "Name",
2312
+ field: "label",
2313
+ width: 150,
2314
+ maxWidth: 200,
2315
+ minWidth: 250
2316
+ }
2317
+ ];
2318
+ const closeMenu = () => {
2319
+ setDropdownOpen(false);
2320
+ };
2321
+ (0, import_react15.useEffect)(() => {
2322
+ if (dropdownOpen && value && !isMulti && selectMenuTableRef) {
2323
+ const index = options?.findIndex((e) => e[fieldValue ?? "value"] === value[fieldValue ?? "value"]);
2324
+ if (index >= 0) {
2325
+ selectMenuTableRef.current.scrollTo({ top: (index - 1) * 30 });
2326
+ }
2327
+ }
2328
+ }, [dropdownOpen]);
2329
+ (0, import_react15.useEffect)(() => {
2330
+ if (inputRef && !isDisabled) {
2331
+ inputRef.current.addEventListener("blur", function() {
2332
+ setDropdownOpen(false);
2333
+ setSearchTerm("");
2334
+ setIsFocus(false);
2335
+ });
2336
+ inputRef.current.addEventListener("focus", function() {
2337
+ if (!isFocus) {
2338
+ setIsFocus(true);
2339
+ }
2340
+ });
2341
+ }
2342
+ }, [inputRef]);
2343
+ (0, import_react15.useEffect)(() => {
2344
+ if (searchTerm && !dropdownOpen) {
2345
+ setDropdownOpen(true);
2346
+ }
2347
+ }, [searchTerm]);
2348
+ const handleOpenClose = () => {
2349
+ setSearchTerm("");
2350
+ if (dropdownOpen) {
2351
+ closeMenu();
2352
+ } else {
2353
+ if (!isDisabled) {
2354
+ setDropdownOpen(true);
2355
+ }
2356
+ }
2357
+ };
2358
+ const listKeyUse = ["Escape", "Space", "F9"];
2359
+ const handleOnKeyDown = (e) => {
2360
+ let key = "";
2361
+ if (onKeyDown && (!dropdownOpen || !listKeyUse.includes(e.code) || e.code === "Escape" && !(isClearable && value && !isDisabled))) {
2362
+ key = onKeyDown(e);
2363
+ }
2364
+ let flag = false;
2365
+ if (!key) {
2366
+ if (e.code === "F9") {
2367
+ handleAdd();
2368
+ flag = true;
2369
+ } else if (e.code === "Space") {
2370
+ if (!searchTerm) {
2371
+ handleOpenClose();
2372
+ flag = true;
2373
+ }
2374
+ } else if (e.code === "Escape") {
2375
+ if (dropdownOpen && isClearable && value && !isDisabled) {
2376
+ onChange(void 0);
2377
+ handleOpenClose();
2378
+ flag = true;
2379
+ }
2380
+ }
2381
+ }
2382
+ if (flag) {
2383
+ e.stopPropagation();
2384
+ e.preventDefault();
2385
+ }
2386
+ };
2387
+ const renderHeaderCol = (col, indexCol) => {
2388
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2389
+ "th",
2390
+ {
2391
+ className: (0, import_classnames13.default)(`r-select-headercell fix-${col.fixedType}`, { "cell-fixed": col.fixedType }),
2392
+ style: {
2393
+ width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.width,
2394
+ minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2395
+ maxWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : col.width ? col.width : col.minWidth ?? "auto") : col.minWidth,
2396
+ top: `${0 * 35}px`
2397
+ },
2398
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2399
+ "div",
2400
+ {
2401
+ role: "textbox",
2402
+ title: t(col.headerText ?? ""),
2403
+ style: {
2404
+ height: `${1 * 35}px`,
2405
+ justifyContent: col.textAlign ?? "left"
2406
+ },
2407
+ className: "r-select-headercell-div",
2408
+ children: t(col.headerText ?? "")
2409
+ }
2410
+ )
2411
+ }
2412
+ ) }, `header-select-${indexCol}`);
2413
+ };
2414
+ const checkSearch = (keyword, data, columnsSearch) => {
2415
+ if (!keyword || columnsSearch.length === 0) {
2416
+ return true;
2417
+ }
2418
+ for (let index = 0; index < columnsSearch.length; index++) {
2419
+ const key = columnsSearch[index].field.trim();
2420
+ if (data[key] && data[key].toString().trim().toLowerCase().includes(keyword.trim().toLowerCase())) {
2421
+ return true;
2422
+ }
2423
+ }
2424
+ if (data[fieldChildren ?? "children"]) {
2425
+ return data[fieldChildren ?? "children"].some((child) => checkSearch(keyword, child, columnsSearch));
2426
+ }
2427
+ return false;
2428
+ };
2429
+ const checkOverflow = (indexRow, indexCol) => {
2430
+ const element = document.getElementById(`select-${id}-${indexRow}-${indexCol}`);
2431
+ return element && element.scrollWidth > element.clientWidth;
2432
+ };
2433
+ const getSelectAll = (tree, checkValue = false) => {
2434
+ const selects = [];
2435
+ const traverse = (items) => {
2436
+ items.forEach((item) => {
2437
+ if (item[fieldValue ?? "value"] && !(checkValue && value?.includes(item[fieldValue ?? "value"]))) {
2438
+ selects.push(item[fieldValue ?? "value"]);
2439
+ }
2440
+ if (item[fieldChildren ?? "children"] && item[fieldChildren ?? "children"].length > 0) {
2441
+ traverse(item[fieldChildren ?? "children"]);
2442
+ }
2443
+ });
2444
+ };
2445
+ traverse(tree);
2446
+ return selects;
2447
+ };
2448
+ const RenderElement = import_react15.default.memo((props2) => {
2449
+ const { indexRow, row, isSelected, level = 0 } = props2;
2450
+ const [expanded, setExpanded] = (0, import_react15.useState)(row.expanded);
2451
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
2452
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2453
+ "tr",
2454
+ {
2455
+ id: `row-select-table-${indexRow}`,
2456
+ className: (0, import_classnames13.default)("r-select-row", { "fisrt-row": indexRow === 0 && level === 0 }),
2457
+ children: [
2458
+ isMulti && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2459
+ "td",
2460
+ {
2461
+ className: (0, import_classnames13.default)(`r-select-rowcell`, { "r-select-active": !isMulti && value && isSelected }),
2462
+ style: {
2463
+ textAlign: "center",
2464
+ paddingLeft: level * 15 + (row[fieldChildren ?? "children"].length > 0 ? 0 : 10)
2465
+ },
2466
+ onClick: (e) => {
2467
+ if (isMulti) {
2468
+ const index = value?.findIndex((x) => x === row[fieldValue ?? "value"]);
2469
+ if (index > -1) {
2470
+ if (!selectChilds) {
2471
+ value?.splice(index, 1);
2472
+ } else {
2473
+ value?.splice(index, 1);
2474
+ getSelectAll(row[fieldChildren ?? "children"]).forEach((x) => {
2475
+ const index2 = value?.findIndex((y) => y === x);
2476
+ if (index2 > -1) {
2477
+ value?.splice(index2, 1);
2478
+ }
2479
+ });
2480
+ }
2481
+ onChange([...value]);
2482
+ } else {
2483
+ if (value) {
2484
+ if (!selectChilds) {
2485
+ onChange([...value, row[fieldValue ?? "value"]]);
2486
+ } else {
2487
+ onChange([...value, row[fieldValue ?? "value"], ...getSelectAll(row[fieldChildren ?? "children"], true)]);
2488
+ }
2489
+ } else {
2490
+ onChange([row[fieldValue ?? "value"]]);
2491
+ }
2492
+ }
2493
+ e.stopPropagation();
2494
+ }
2495
+ },
2496
+ children: [
2497
+ row[fieldChildren ?? "children"].length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2498
+ import_becoxy_icons6.ChevronRight,
2499
+ {
2500
+ onClick: (e) => {
2501
+ if (expanded) {
2502
+ row.expanded = false;
2503
+ setExpanded(false);
2504
+ } else {
2505
+ row.expanded = true;
2506
+ setExpanded(true);
2507
+ }
2508
+ e.stopPropagation();
2509
+ },
2510
+ fontSize: 18,
2511
+ className: (0, import_classnames13.default)("me-50 pb-0 r-icon-expand", { "is-open": expanded })
2512
+ }
2513
+ ),
2514
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2515
+ import_reactstrap10.Input,
2516
+ {
2517
+ checked: isSelected,
2518
+ type: "checkbox",
2519
+ className: "cursor-pointer",
2520
+ onChange: () => {
2521
+ },
2522
+ style: { textAlign: "center" }
2523
+ }
2524
+ )
2525
+ ]
2526
+ }
2527
+ ),
2528
+ (columns ? columns : defaultColumns).map((col, indexCol) => {
2529
+ let valueDisplay = row[col.field];
2530
+ if (col.type === "numeric" || col.typeCondition && col.typeCondition(row) === "numeric") {
2531
+ valueDisplay = formartNumberic(row[col.field], decimalSeparator ?? ".", thousandSeparator ?? ",", col.fraction ?? 0, true) ?? 0;
2532
+ } else if (col.type === "date") {
2533
+ valueDisplay = valueDisplay ? (0, import_moment2.default)(valueDisplay).format("DD/MM/yyyy") : "";
2534
+ } else if (col.type === "datetime") {
2535
+ valueDisplay = valueDisplay ? (0, import_moment2.default)(valueDisplay).format("DD/MM/yyyy HH:mm") : "";
2536
+ }
2537
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react15.Fragment, { children: [
2538
+ col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2539
+ "td",
2540
+ {
2541
+ id: `select-${id}-${indexRow}-${indexCol}`,
2542
+ className: (0, import_classnames13.default)(`r-select-rowcell`, { "r-select-active": !isMulti && value && isSelected }),
2543
+ style: {
2544
+ paddingLeft: 9 + (indexCol === 0 && !isMulti ? level * 10 + (row[fieldChildren ?? "children"].length > 0 ? 0 : 15) : 0),
2545
+ textAlign: col.textAlign ? col.textAlign : "left"
2546
+ },
2547
+ onClick: (e) => {
2548
+ if (isMulti) {
2549
+ const index = value?.findIndex((x) => x === row[fieldValue ?? "value"]);
2550
+ if (index > -1) {
2551
+ if (!selectChilds) {
2552
+ value?.splice(index, 1);
2553
+ } else {
2554
+ value?.splice(index, 1);
2555
+ getSelectAll(row[fieldChildren ?? "children"]).forEach((x) => {
2556
+ const index2 = value?.findIndex((y) => y === x);
2557
+ if (index2 > -1) {
2558
+ value?.splice(index2, 1);
2559
+ }
2560
+ });
2561
+ }
2562
+ onChange([...value]);
2563
+ } else {
2564
+ if (value) {
2565
+ if (!selectChilds) {
2566
+ onChange([...value, row[fieldValue ?? "value"]]);
2567
+ } else {
2568
+ onChange([...value, row[fieldValue ?? "value"], ...getSelectAll(row[fieldChildren ?? "children"], true)]);
2569
+ }
2570
+ } else {
2571
+ onChange([row[fieldValue ?? "value"]]);
2572
+ }
2573
+ }
2574
+ e.stopPropagation();
2575
+ } else {
2576
+ onChange(row);
2577
+ setSearchTerm("");
2578
+ closeMenu();
2579
+ }
2580
+ e.preventDefault();
2581
+ e.stopPropagation();
2582
+ },
2583
+ children: [
2584
+ !isMulti && indexCol === 0 && row[fieldChildren ?? "children"].length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2585
+ import_becoxy_icons6.ChevronRight,
2586
+ {
2587
+ onClick: (e) => {
2588
+ if (expanded) {
2589
+ row.expanded = false;
2590
+ setExpanded(false);
2591
+ } else {
2592
+ row.expanded = true;
2593
+ setExpanded(true);
2594
+ }
2595
+ e.stopPropagation();
2596
+ },
2597
+ fontSize: 18,
2598
+ className: (0, import_classnames13.default)("me-50 r-icon-expand", { "is-open": expanded })
2599
+ }
2600
+ ),
2601
+ col.template ? col.template(row, indexRow) : valueDisplay
2602
+ ]
2603
+ },
2604
+ `col-${indexRow}-${indexCol}`
2605
+ ),
2606
+ checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : valueDisplay })
2607
+ ] }, indexCol);
2608
+ })
2609
+ ]
2610
+ },
2611
+ `row-${indexRow}`
2612
+ ),
2613
+ row[fieldChildren ?? "children"] && row.expanded && row[fieldChildren ?? "children"].map((child, indexChild) => {
2614
+ if (checkSearch(searchTerm, child, columns ? columns : defaultColumns)) {
2615
+ const isSelectedChild = isMulti ? value?.some((x) => x === child[fieldValue ?? "value"]) : value[fieldValue ?? "value"] === child[fieldValue ?? "value"];
2616
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RenderElement, { isSelected: isSelectedChild, indexRow: indexChild, row: child, level: level + 1 }, `select-table-${indexRow}-${indexChild}`);
2617
+ }
2618
+ })
2619
+ ] });
2620
+ });
2621
+ const RenderTable = (props2) => {
2622
+ const {} = props2;
2623
+ let countDisplay = 0;
2624
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
2625
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { style: { width: "100%" }, children: [
2626
+ !noHeader && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: "r-select-gridheader", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { className: "r-select-row", role: "row", children: [
2627
+ isMulti && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2628
+ "th",
2629
+ {
2630
+ className: (0, import_classnames13.default)(`r-select-headercell checkbox-column`),
2631
+ style: { width: 40, minWidth: 40, maxWidth: 100, top: `0px` },
2632
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2633
+ "div",
2634
+ {
2635
+ style: { justifyContent: "center" },
2636
+ className: (0, import_classnames13.default)("r-select-headercell-div"),
2637
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2638
+ import_reactstrap10.Input,
2639
+ {
2640
+ checked: isSelectedAll,
2641
+ type: "checkbox",
2642
+ onClick: (e) => {
2643
+ if (isMulti) {
2644
+ if (isSelectedAll) {
2645
+ onChange([]);
2646
+ } else {
2647
+ onChange(getSelectAll(options));
2648
+ }
2649
+ e.stopPropagation();
2650
+ }
2651
+ },
2652
+ readOnly: true,
2653
+ className: (0, import_classnames13.default)("cursor-pointer", { "d-none": !isMulti }),
2654
+ style: { textAlign: "center", marginTop: 6 }
2655
+ }
2656
+ )
2657
+ }
2658
+ )
2659
+ }
2660
+ ),
2661
+ !noHeader && (columns ? columns : defaultColumns).map((col, index) => {
2662
+ return renderHeaderCol(col, index);
2663
+ })
2664
+ ] }) }),
2665
+ options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { className: "r-select-gridcontent", children: options?.map((row, indexRow) => {
2666
+ if (checkSearch(searchTerm, row, columns ? columns : defaultColumns)) {
2667
+ const isSelected = isMulti ? value?.some((x) => x === row[fieldValue ?? "value"]) : value[fieldValue ?? "value"] === row[fieldValue ?? "value"];
2668
+ countDisplay++;
2669
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RenderElement, { isSelected, indexRow, row }, `select-table-${indexRow}`);
2670
+ }
2671
+ }) }) })
2672
+ ] }),
2673
+ countDisplay === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-no-data", children: [
2674
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [
2675
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ellipse", { fill: "#f5f5f5", cx: "32", cy: "33", rx: "32", ry: "7" }),
2676
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [
2677
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }),
2678
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", fill: "#fafafa" })
2679
+ ] })
2680
+ ] }) }),
2681
+ t("No data available.")
2682
+ ] })
2683
+ ] });
2684
+ };
2685
+ const getSelectedRecords = (tree, value2) => {
2686
+ const records = [];
2687
+ const traverse = (nodes) => {
2688
+ nodes.forEach((node) => {
2689
+ if (value2.includes(node[fieldValue ?? "value"])) {
2690
+ records.push(node);
2691
+ }
2692
+ if (node.children && node.children.length > 0) {
2693
+ traverse(node.children);
2694
+ }
2695
+ });
2696
+ };
2697
+ traverse(tree);
2698
+ return records;
2699
+ };
2700
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2701
+ "div",
2702
+ {
2703
+ className: (0, import_classnames13.default)("react-select-table", { "is-invalid": invalid }),
2704
+ ref,
2705
+ id,
2706
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref: selectTableRef, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2707
+ import_reactstrap10.Dropdown,
2708
+ {
2709
+ isOpen: dropdownOpen,
2710
+ toggle: () => {
2711
+ },
2712
+ onMouseDown: (e) => e.preventDefault(),
2713
+ children: [
2714
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2715
+ import_reactstrap10.DropdownToggle,
2716
+ {
2717
+ onClick: (e) => {
2718
+ if (!isDisabled) {
2719
+ inputRef?.current.focus();
2720
+ handleOpenClose();
2721
+ }
2722
+ e.preventDefault();
2723
+ },
2724
+ tag: "div",
2725
+ style: { width: width ? width : "100%" },
2726
+ className: (0, import_classnames13.default)("select-table-control", { "r-select-is-disabled": isDisabled }, { "r-select-is-open": dropdownOpen }, { "r-select-is-focus": isFocus }, { "r-select-is-invalid": invalid }),
2727
+ children: [
2728
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "select-table-container", children: [
2729
+ isMulti ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("select-value is-mutil", { "d-none": searchTerm }), children: getSelectedRecords(options, value).map((ele, index) => {
2730
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
2731
+ index === 0 ? "" : ", ",
2732
+ ele[fieldLabel ?? "label"]
2733
+ ] }, index);
2734
+ }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_classnames13.default)("select-value", { "d-none": searchTerm }), children: [
2735
+ value ? formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? "label"] : "",
2736
+ " "
2737
+ ] }) }),
2738
+ !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("select-placeholder"), children: placeholder }),
2739
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "input-container", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2740
+ "input",
2741
+ {
2742
+ style: { textAlign: textAlign ?? "left" },
2743
+ ref: inputRef,
2744
+ className: (0, import_classnames13.default)("select-input"),
2745
+ readOnly: isDisabled,
2746
+ value: searchTerm,
2747
+ onPaste: (e) => onPaste && !dropdownOpen && onPaste(e),
2748
+ onChange: (val) => {
2749
+ setSearchTerm(val.target.value);
2750
+ },
2751
+ onKeyDown: (e) => handleOnKeyDown(e)
2752
+ }
2753
+ ) })
2754
+ ] }),
2755
+ isClearable && value && !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2756
+ "div",
2757
+ {
2758
+ className: (0, import_classnames13.default)("cursor-pointer"),
2759
+ onClick: (e) => {
2760
+ onChange(isMulti ? [] : void 0);
2761
+ e.stopPropagation();
2762
+ },
2763
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { height: "20", width: "20", color: "#c4c4c4", viewBox: "0 0 20 20", "aria-hidden": "true", focusable: "false", className: "css-tj5bde-Svg", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" }) })
2764
+ }
2765
+ ),
2766
+ !isDisabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "select-table-indicator", onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("svg", { height: "20", width: "20", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" }) }) })
2767
+ ]
2768
+ }
2769
+ ),
2770
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2771
+ import_reactstrap10.DropdownMenu,
2772
+ {
2773
+ container: component,
2774
+ className: "formula-dropdown icon-dropdown p-0",
2775
+ style: {
2776
+ width: "min-content",
2777
+ position: "fixed",
2778
+ borderRadius: 3,
2779
+ zIndex: 9999
2780
+ },
2781
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.DropdownItem, { className: (0, import_classnames13.default)("p-0 menu-select-table"), style: { borderRadius: "6px" }, tag: "div", header: true, children: dropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2782
+ "div",
2783
+ {
2784
+ onMouseDown: (e) => {
2785
+ if (!isDisabled) {
2786
+ inputRef?.current.focus();
2787
+ e.preventDefault();
2788
+ }
2789
+ },
2790
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-select-grid", children: [
2791
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-select-gridtable", ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight2 }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RenderTable, {}) }),
2792
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_classnames13.default)("r-select-footer", { "d-none": !(showFooter === true || handleAdd || isMulti) }), children: [
2793
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_reactstrap10.Button, { outline: true, color: "primary", onClick: handleAdd, className: (0, import_classnames13.default)("r-btn d-flex align-items-center", { "d-none": !handleAdd }), children: [
2794
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_becoxy_icons6.Plus, { className: "me-50", fontSize: 16 }),
2795
+ t("AddNew"),
2796
+ " (F9)"
2797
+ ] }),
2798
+ isMulti && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "ms-50 text-primary h-100 d-flex align-items-center", onClick: handleAdd, children: t("countSelected", { item: value?.length ?? 0 }) }),
2799
+ footerComponent ? footerComponent() : null
2800
+ ] })
2801
+ ] })
2802
+ }
2803
+ ) })
2804
+ }
2805
+ )
2806
+ ]
2807
+ }
2808
+ ) })
2809
+ }
2810
+ );
2811
+ });
2812
+
2813
+ // test-app/src/component/table/index.tsx
2814
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2815
+ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
2816
+ const { t } = (0, import_react_i18next12.useTranslation)();
2250
2817
  const {
2251
2818
  idTable,
2252
2819
  dataSource,
@@ -2274,36 +2841,35 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2274
2841
  handleSelect,
2275
2842
  isMulti
2276
2843
  } = props;
2277
- (0, import_react15.useImperativeHandle)(ref, () => {
2844
+ (0, import_react16.useImperativeHandle)(ref, () => {
2278
2845
  return {
2279
2846
  refeshFocusRow: handleRefeshRow
2280
2847
  };
2281
2848
  });
2282
- const [refreshRow, setRefreshRow] = (0, import_react15.useState)(false);
2283
- const [indexFocus, setIndexFocus] = (0, import_react15.useState)();
2284
- const [selectedRows, setSelectedRows] = (0, import_react15.useState)([]);
2285
- const [headerColumns, setHeaderColumns] = (0, import_react15.useState)([[]]);
2286
- const [contentColumns, setContentColumns] = (0, import_react15.useState)([]);
2287
- const [levelCol, setLevelCol] = (0, import_react15.useState)(0);
2288
- const [columnFistEdit, setColumnFistEdit] = (0, import_react15.useState)(0);
2289
- const [columnLastEdit, setColumnlastEdit] = (0, import_react15.useState)(0);
2290
- const [objWidthFix, setObjWidthFix] = (0, import_react15.useState)({});
2291
- const [openPopupTree, setOpenPopupTree] = (0, import_react15.useState)(false);
2292
- const [openPopupSetupColumn, setOpenPopupSetupColumn] = (0, import_react15.useState)(false);
2293
- const [searchTerm, setSearchTerm] = (0, import_react15.useState)("");
2294
- const tableElement = (0, import_react15.useRef)(null);
2295
- const gridRef = (0, import_react15.useRef)();
2849
+ const [refreshRow, setRefreshRow] = (0, import_react16.useState)(false);
2850
+ const [indexFocus, setIndexFocus] = (0, import_react16.useState)();
2851
+ const [selectedRows, setSelectedRows] = (0, import_react16.useState)([]);
2852
+ const [headerColumns, setHeaderColumns] = (0, import_react16.useState)([[]]);
2853
+ const [contentColumns, setContentColumns] = (0, import_react16.useState)([]);
2854
+ const [levelCol, setLevelCol] = (0, import_react16.useState)(0);
2855
+ const [columnFistEdit, setColumnFistEdit] = (0, import_react16.useState)(0);
2856
+ const [columnLastEdit, setColumnlastEdit] = (0, import_react16.useState)(0);
2857
+ const [objWidthFix, setObjWidthFix] = (0, import_react16.useState)({});
2858
+ const [openPopupSetupColumn, setOpenPopupSetupColumn] = (0, import_react16.useState)(false);
2859
+ const [searchTerm, setSearchTerm] = (0, import_react16.useState)("");
2860
+ const tableElement = (0, import_react16.useRef)(null);
2861
+ const gridRef = (0, import_react16.useRef)();
2296
2862
  let totalCount = dataSource.length;
2297
2863
  const pagingClient = pagingSetting?.allowPaging && (pagingSetting?.pagingClient || !(editDisable || addDisable));
2298
2864
  const searchClient = searchSetting?.searchEnable && (searchSetting?.searchClient || !(editDisable || addDisable));
2299
2865
  const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? "id";
2300
2866
  const fieldUniKey = columns.filter((item) => item.isUnikey === true)?.map((item) => item.field);
2301
- (0, import_react15.useEffect)(() => {
2867
+ (0, import_react16.useEffect)(() => {
2302
2868
  if (pagingClient && pagingSetting.setCurrentPage && Math.ceil(totalCount / (pagingSetting?.pageSize ?? 1)) < (pagingSetting.currentPage ?? 1)) {
2303
2869
  pagingSetting.setCurrentPage(1);
2304
2870
  }
2305
2871
  }, [dataSource]);
2306
- (0, import_react15.useEffect)(() => {
2872
+ (0, import_react16.useEffect)(() => {
2307
2873
  let indexFirst = -1;
2308
2874
  let indexlast = -1;
2309
2875
  let letfWidthFix = 0;
@@ -2337,7 +2903,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2337
2903
  setColumnFistEdit(indexFirst + 1);
2338
2904
  setColumnlastEdit(indexlast + 1);
2339
2905
  }, [contentColumns]);
2340
- (0, import_react15.useEffect)(() => {
2906
+ (0, import_react16.useEffect)(() => {
2341
2907
  const arrHeaderColumns = [];
2342
2908
  const arrContentColumns = [];
2343
2909
  let headerLevelRow = 0;
@@ -2354,7 +2920,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2354
2920
  setHeaderColumns(arrHeaderColumns);
2355
2921
  setContentColumns(arrContentColumns);
2356
2922
  }, [columns]);
2357
- (0, import_react15.useEffect)(() => {
2923
+ (0, import_react16.useEffect)(() => {
2358
2924
  const arrHeaderColumns = [];
2359
2925
  const arrContentColumns = [];
2360
2926
  let headerLevelRow = 0;
@@ -2471,7 +3037,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2471
3037
  }
2472
3038
  };
2473
3039
  const searchTemplate = () => {
2474
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "me-50 r-search", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3040
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "me-50 r-search", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2475
3041
  react_input_default,
2476
3042
  {
2477
3043
  style: { width: "230px" },
@@ -2492,12 +3058,12 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2492
3058
  const renderEdit = (row, col, indexRow, indexCol) => {
2493
3059
  switch (col?.editTypeCondition ? col?.editTypeCondition(row) : col.editType) {
2494
3060
  case "date":
2495
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2496
- import_reactstrap10.Input,
3061
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3062
+ import_reactstrap11.Input,
2497
3063
  {
2498
3064
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
2499
3065
  style: { textAlign: col.textAlign, height: 29 },
2500
- value: row[col.field] ? (0, import_moment2.default)(row[col.field]).format("yyyy-MM-DD") : row[col.field],
3066
+ value: row[col.field] ? (0, import_moment3.default)(row[col.field]).format("yyyy-MM-DD") : row[col.field],
2501
3067
  onChange: (val) => {
2502
3068
  row[col.field] = val.target.value;
2503
3069
  if (col.callback) {
@@ -2505,7 +3071,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2505
3071
  }
2506
3072
  handleDataChange(row, col, indexRow);
2507
3073
  },
2508
- className: (0, import_classnames13.default)("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3074
+ className: (0, import_classnames14.default)("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
2509
3075
  type: "date",
2510
3076
  max: "9999-12-31",
2511
3077
  onKeyDown: (e) => {
@@ -2521,12 +3087,12 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2521
3087
  }
2522
3088
  );
2523
3089
  case "datetime":
2524
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2525
- import_reactstrap10.Input,
3090
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3091
+ import_reactstrap11.Input,
2526
3092
  {
2527
3093
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
2528
3094
  style: { textAlign: col.textAlign, height: 29 },
2529
- value: row[col.field] ? (0, import_moment2.default)(row[col.field]).format("yyyy-MM-DD HH:MM") : row[col.field],
3095
+ value: row[col.field] ? (0, import_moment3.default)(row[col.field]).format("yyyy-MM-DD HH:MM") : row[col.field],
2530
3096
  onChange: (val) => {
2531
3097
  row[col.field] = val.target.value;
2532
3098
  if (col.callback) {
@@ -2534,7 +3100,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2534
3100
  }
2535
3101
  handleDataChange(row, col, indexRow);
2536
3102
  },
2537
- className: (0, import_classnames13.default)("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3103
+ className: (0, import_classnames14.default)("border-0 rounded-0 r-date-input", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
2538
3104
  type: "datetime-local",
2539
3105
  max: "9999-12-31T23:59",
2540
3106
  onKeyDown: (e) => {
@@ -2565,7 +3131,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2565
3131
  valueSelect = col.selectSettings?.defaultValue(row);
2566
3132
  }
2567
3133
  }
2568
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3134
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2569
3135
  SelectTable,
2570
3136
  {
2571
3137
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -2573,7 +3139,11 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2573
3139
  options: optionsSelect,
2574
3140
  rowData: row,
2575
3141
  onChange: (val) => {
2576
- row[col.field] = col.selectSettings?.isMulti ? val?.map((item) => item[col.selectSettings?.fieldValue ?? "value"]) ?? [] : val ? val[col.selectSettings?.fieldValue ?? "value"] : void 0;
3142
+ if (isMulti) {
3143
+ row[col.field] = !isNullOrUndefined(val) ? val : [];
3144
+ } else {
3145
+ row[col.field] = !isNullOrUndefined(val) ? val[col.selectSettings?.fieldValue ?? "value"] : void 0;
3146
+ }
2577
3147
  if (col.callback) {
2578
3148
  col.callback(val, indexRow);
2579
3149
  }
@@ -2591,6 +3161,10 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2591
3161
  handleAdd: col.selectSettings?.handAddNew,
2592
3162
  isMulti: col.selectSettings?.isMulti,
2593
3163
  noHeader: col.selectSettings?.noHeader,
3164
+ showFooter: col.selectSettings?.showFooter,
3165
+ formatOptionLabel: col.selectSettings?.formatOptionLabel,
3166
+ footerComponent: col.selectSettings?.footerComponent,
3167
+ width: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : void 0,
2594
3168
  invalid: col.validate && col.validate(row[col.field], row),
2595
3169
  maxHeight: col.selectSettings?.heightPopup ? Number(col.selectSettings?.heightPopup) : void 0,
2596
3170
  menuWidth: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : void 0,
@@ -2608,68 +3182,95 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2608
3182
  }
2609
3183
  );
2610
3184
  case "selectTree":
2611
- let valueSelectTree = !isNullOrUndefined(row[col.field]) && row[col.field] !== "" ? [row[col.field]] : [];
2612
3185
  const findItemInTree = (items, value) => {
2613
3186
  for (let index = 0; index < items.length; index++) {
2614
3187
  const item = items[index];
2615
3188
  if (item[col.selectSettings?.fieldValue ? col.selectSettings?.fieldValue : "value"] === value) {
2616
3189
  return { ...item };
2617
- } else if (item["children"]?.length > 0) {
2618
- const itemFilter = findItemInTree(item["children"], value);
3190
+ } else if (item[col.selectSettings?.fieldChild ?? "children"]?.length > 0) {
3191
+ const itemFilter = findItemInTree(item[col.selectSettings?.fieldChild ?? "children"], value);
2619
3192
  if (itemFilter) {
2620
3193
  return itemFilter;
2621
3194
  }
2622
3195
  }
2623
3196
  }
2624
3197
  };
2625
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3198
+ let valueSelectTree;
3199
+ let optionsSelectTree = [];
3200
+ if (col.selectSettings?.optionsField) {
3201
+ optionsSelectTree = row[col.selectSettings?.optionsField] ? row[col.selectSettings?.optionsField] : [];
3202
+ } else {
3203
+ optionsSelectTree = col.selectSettings?.options ? col.selectSettings?.validateOption ? col.selectSettings?.options.filter((item) => col.selectSettings?.validateOption(item, row)) : col.selectSettings?.options : [];
3204
+ }
3205
+ if (col.selectSettings?.isMulti) {
3206
+ valueSelectTree = row[col.field];
3207
+ } else {
3208
+ valueSelectTree = !isNullOrUndefined(row[col.field]) && row[col.field] !== "" ? findItemInTree(optionsSelectTree, row[col.field]) : "";
3209
+ }
3210
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2626
3211
  "div",
2627
3212
  {
2628
3213
  onKeyDown: (e) => {
2629
3214
  if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
2630
3215
  }
2631
3216
  },
2632
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2633
- import_ej2_react_dropdowns.DropDownTreeComponent,
3217
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3218
+ SelectTableTree,
2634
3219
  {
2635
3220
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
2636
- fields: {
2637
- dataSource: col.selectSettings?.options,
2638
- value: col.selectSettings?.fieldValue ? col.selectSettings?.fieldValue : "value",
2639
- text: "label",
2640
- parentValue: "parentId",
2641
- child: "children"
2642
- },
2643
- className: (0, import_classnames13.default)("select-tree", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
2644
- allowFiltering: false,
2645
3221
  value: valueSelectTree,
2646
- popupHeight: 250,
2647
- popupWidth: "auto",
2648
- changeOnBlur: false,
2649
- showClearButton: col.selectSettings?.isClearable,
2650
- change: (val) => {
2651
- const item = val?.value?.length > 0 ? val?.value[0] : void 0;
2652
- if (row[col.field] !== item) {
2653
- row[col.field] = item;
2654
- if (col.callback) {
2655
- col.callback(item ? findItemInTree(col.selectSettings?.options, item) : void 0, indexRow);
2656
- }
2657
- handleDataChange(row, col, indexRow);
3222
+ options: optionsSelectTree,
3223
+ rowData: row,
3224
+ onChange: (val) => {
3225
+ if (isMulti) {
3226
+ row[col.field] = !isNullOrUndefined(val) ? val : [];
3227
+ } else {
3228
+ row[col.field] = !isNullOrUndefined(val) ? val[col.selectSettings?.fieldValue ?? "value"] : void 0;
2658
3229
  }
3230
+ if (col.callback) {
3231
+ col.callback(val, indexRow);
3232
+ }
3233
+ handleDataChange(row, col, indexRow);
2659
3234
  },
2660
- open: () => {
2661
- setOpenPopupTree(true);
3235
+ fieldValue: col.selectSettings?.fieldValue,
3236
+ fieldLabel: col.selectSettings?.fieldLabel,
3237
+ component: tableElement,
3238
+ columns: col.selectSettings?.columns,
3239
+ isClearable: col.selectSettings?.isClearable ?? false,
3240
+ decimalSeparator,
3241
+ thousandSeparator,
3242
+ placeholder: t("Select"),
3243
+ loadOptions: col.selectSettings?.loadOptions,
3244
+ handleAdd: col.selectSettings?.handAddNew,
3245
+ fieldChildren: col.selectSettings?.fieldChild ?? "children",
3246
+ selectChilds: col.selectSettings?.selectChilds,
3247
+ showFooter: col.selectSettings?.showFooter,
3248
+ formatOptionLabel: col.selectSettings?.formatOptionLabel,
3249
+ footerComponent: col.selectSettings?.footerComponent,
3250
+ width: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : void 0,
3251
+ isMulti: col.selectSettings?.isMulti,
3252
+ noHeader: col.selectSettings?.noHeader,
3253
+ invalid: col.validate && col.validate(row[col.field], row),
3254
+ maxHeight: col.selectSettings?.heightPopup ? Number(col.selectSettings?.heightPopup) : void 0,
3255
+ menuWidth: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : void 0,
3256
+ textAlign: col.textAlign ?? "left",
3257
+ onKeyDown: (e) => {
3258
+ if (checkKeyDown(e, row, col, indexRow + 1, indexCol + 1)) {
3259
+ }
2662
3260
  },
2663
- close: () => {
2664
- setOpenPopupTree(false);
3261
+ onPaste: (e) => {
3262
+ if (toolbarSetting?.showBottomToolbar && !editDisable && !addDisable) {
3263
+ pasteDataFromExcel(indexRow, indexCol, e);
3264
+ e.preventDefault();
3265
+ }
2665
3266
  }
2666
3267
  }
2667
3268
  )
2668
3269
  }
2669
3270
  );
2670
3271
  case "checkbox":
2671
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2672
- import_reactstrap10.Input,
3272
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3273
+ import_reactstrap11.Input,
2673
3274
  {
2674
3275
  checked: row[col.field],
2675
3276
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -2691,13 +3292,13 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2691
3292
  );
2692
3293
  case "numeric":
2693
3294
  let valueCurrency = row[col.field];
2694
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2695
- import_reactstrap10.Input,
3295
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3296
+ import_reactstrap11.Input,
2696
3297
  {
2697
3298
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
2698
3299
  style: { textAlign: col.textAlign, height: 29 },
2699
3300
  defaultValue: formartNumberic(valueCurrency, decimalSeparator, thousandSeparator, col.numericSettings?.fraction),
2700
- className: (0, import_classnames13.default)("border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3301
+ className: (0, import_classnames14.default)("border-0 rounded-0 input-numeric", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
2701
3302
  onChange: (val) => {
2702
3303
  let newVal = "";
2703
3304
  const flag = val.target?.value.startsWith("-");
@@ -2781,8 +3382,8 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2781
3382
  }
2782
3383
  );
2783
3384
  case "color":
2784
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { padding: "4px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2785
- import_reactstrap10.Input,
3385
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { padding: "4px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3386
+ import_reactstrap11.Input,
2786
3387
  {
2787
3388
  type: "color",
2788
3389
  value: row[col.field],
@@ -2804,7 +3405,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2804
3405
  `col-${indexRow}-${indexCol}`
2805
3406
  ) });
2806
3407
  case "form":
2807
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3408
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2808
3409
  edit_form_default,
2809
3410
  {
2810
3411
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
@@ -2832,13 +3433,13 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
2832
3433
  }
2833
3434
  );
2834
3435
  default:
2835
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2836
- import_reactstrap10.Input,
3436
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3437
+ import_reactstrap11.Input,
2837
3438
  {
2838
3439
  id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`,
2839
3440
  style: { textAlign: col.textAlign, height: 29 },
2840
3441
  defaultValue: isNullOrUndefined(row[col.field]) ? "" : row[col.field],
2841
- className: (0, import_classnames13.default)("border-0 rounded-0 input-element", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
3442
+ className: (0, import_classnames14.default)("border-0 rounded-0 input-element", { "is-invalid": col.validate && col.validate(row[col.field], row) }),
2842
3443
  onBlur: (val) => {
2843
3444
  if (row[col.field] != val.target?.value) {
2844
3445
  row[col.field] = val.target?.value;
@@ -3020,11 +3621,9 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3020
3621
  }
3021
3622
  };
3022
3623
  useOnClickOutside(gridRef, () => {
3023
- if (!openPopupTree) {
3024
- setTimeout(() => {
3025
- setIndexFocus(-1);
3026
- }, 50);
3027
- }
3624
+ setTimeout(() => {
3625
+ setIndexFocus(-1);
3626
+ }, 50);
3028
3627
  });
3029
3628
  const handleAdd = () => {
3030
3629
  const lengthData = dataSource.length;
@@ -3220,7 +3819,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3220
3819
  }
3221
3820
  }
3222
3821
  };
3223
- (0, import_react15.useEffect)(() => {
3822
+ (0, import_react16.useEffect)(() => {
3224
3823
  setIndexFocus(-1);
3225
3824
  if (setSelectedItem) {
3226
3825
  if (isMulti) {
@@ -3247,7 +3846,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3247
3846
  }
3248
3847
  }
3249
3848
  }, [selectedRows]);
3250
- (0, import_react15.useEffect)(() => {
3849
+ (0, import_react16.useEffect)(() => {
3251
3850
  if (!isMulti) {
3252
3851
  if (dataSource && selectedItem && selectedItem[fieldKey]) {
3253
3852
  if (selectedRows?.length === 0 || selectedItem[fieldKey] !== selectedRows[0][fieldKey]) {
@@ -3264,10 +3863,10 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3264
3863
  }, [selectedItem]);
3265
3864
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
3266
3865
  if (col.field === "command") {
3267
- return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3866
+ return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3268
3867
  "td",
3269
3868
  {
3270
- className: (0, import_classnames13.default)(
3869
+ className: (0, import_classnames14.default)(
3271
3870
  `r-rowcell p-0 fix-${col.fixedType}`,
3272
3871
  { "cell-fixed": col.fixedType },
3273
3872
  { "r-active": isSelected && editDisable || indexFocus === indexRow }
@@ -3277,15 +3876,15 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3277
3876
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3278
3877
  textAlign: col.textAlign ? col.textAlign : "left"
3279
3878
  },
3280
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-rowcell-div ", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(command_default, { commandItems: col.commandItems ?? [], handleCommandClick, indexRow, rowData: row, setIndexFocus, indexFocus }) })
3879
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-rowcell-div ", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(command_default, { commandItems: col.commandItems ?? [], handleCommandClick, indexRow, rowData: row, setIndexFocus, indexFocus }) })
3281
3880
  },
3282
3881
  `col-${indexRow}-${indexCol}`
3283
3882
  );
3284
3883
  } else if (col.field === "#") {
3285
- return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3884
+ return col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3286
3885
  "td",
3287
3886
  {
3288
- className: (0, import_classnames13.default)(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { "cell-fixed": col.fixedType }, { "r-active": isSelected && editDisable || indexFocus === indexRow }),
3887
+ className: (0, import_classnames14.default)(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { "cell-fixed": col.fixedType }, { "r-active": isSelected && editDisable || indexFocus === indexRow }),
3289
3888
  tabIndex: Number(`${indexRow}${indexCol}`),
3290
3889
  style: {
3291
3890
  left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
@@ -3329,15 +3928,15 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3329
3928
  e.stopPropagation();
3330
3929
  }
3331
3930
  },
3332
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-rowcell-div pt-50", children: indexRow + 1 })
3931
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-rowcell-div pt-50", children: indexRow + 1 })
3333
3932
  },
3334
3933
  `col-${indexRow}-${indexCol}`
3335
3934
  );
3336
3935
  } else if (col.field === "checkbox") {
3337
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3936
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3338
3937
  "td",
3339
3938
  {
3340
- className: (0, import_classnames13.default)(
3939
+ className: (0, import_classnames14.default)(
3341
3940
  `r-rowcell p-0 fix-${col.fixedType}`,
3342
3941
  { "cell-fixed": col.fixedType },
3343
3942
  { "r-active": isSelected && editDisable || indexFocus === indexRow }
@@ -3347,7 +3946,7 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3347
3946
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3348
3947
  textAlign: col.textAlign ? col.textAlign : "center"
3349
3948
  },
3350
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3949
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3351
3950
  "div",
3352
3951
  {
3353
3952
  className: "r-rowcell-div cursor-pointer",
@@ -3371,8 +3970,8 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3371
3970
  e.stopPropagation();
3372
3971
  }
3373
3972
  },
3374
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3375
- import_reactstrap10.Input,
3973
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3974
+ import_reactstrap11.Input,
3376
3975
  {
3377
3976
  checked: isSelected,
3378
3977
  type: "checkbox",
@@ -3392,16 +3991,16 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3392
3991
  if (col.editType === "numeric" || col.editTypeCondition && col.editTypeCondition(row) === "numeric") {
3393
3992
  value = formartNumberic(row[col.field], decimalSeparator, thousandSeparator, col.numericSettings?.fraction, true) ?? 0;
3394
3993
  } else if (col.editType === "date") {
3395
- value = value ? (0, import_moment2.default)(value).format("DD/MM/yyyy") : "";
3994
+ value = value ? (0, import_moment3.default)(value).format("DD/MM/yyyy") : "";
3396
3995
  } else if (col.editType === "datetime") {
3397
- value = value ? (0, import_moment2.default)(value).format("DD/MM/yyyy HH:mm") : "";
3996
+ value = value ? (0, import_moment3.default)(value).format("DD/MM/yyyy HH:mm") : "";
3398
3997
  }
3399
3998
  const typeDis = !editDisable && (indexFocus === indexRow || col.editType === "checkbox") && (!col.disabledCondition || !col.disabledCondition(row)) ? col.editEnable ? 1 : col.template ? 2 : 3 : col.template ? 2 : 3;
3400
3999
  const errorMessage = typeDis === 1 || col.field === "" || !col.validate ? "" : col.validate(row[col.field], row);
3401
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4000
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3402
4001
  "td",
3403
4002
  {
3404
- className: (0, import_classnames13.default)(
4003
+ className: (0, import_classnames14.default)(
3405
4004
  `r-rowcell fix-${col.fixedType}`,
3406
4005
  { "cell-fixed": col.fixedType },
3407
4006
  { "r-active": isSelected && editDisable || indexFocus === indexRow }
@@ -3443,25 +4042,25 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3443
4042
  e.stopPropagation();
3444
4043
  }
3445
4044
  },
3446
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4045
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3447
4046
  "div",
3448
4047
  {
3449
- className: (0, import_classnames13.default)("r-rowcell-div"),
3450
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
4048
+ className: (0, import_classnames14.default)("r-rowcell-div"),
4049
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3451
4050
  "div",
3452
4051
  {
3453
4052
  id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : "",
3454
- className: (0, import_classnames13.default)("r-rowcell-content", { "r-is-invalid": errorMessage }),
4053
+ className: (0, import_classnames14.default)("r-rowcell-content", { "r-is-invalid": errorMessage }),
3455
4054
  style: {
3456
4055
  margin: typeDis === 1 ? 2 : !errorMessage ? "7px 9px" : 2,
3457
4056
  color: col.editType === "numeric" && Number(row[col.field]) < 0 ? "red" : ""
3458
4057
  },
3459
4058
  children: [
3460
- typeDis === 1 && !refreshRow ? renderEdit(row, col, indexRow, indexCol) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : value }),
3461
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { id: `error-${indexRow}-${indexCol}`, className: (0, import_classnames13.default)("cursor-pointer text-primary icon-table", { "d-none": !errorMessage }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_becoxy_icons6.AlertCircle, { fontSize: 15.5 }) }),
3462
- !(typeDis === 1 && !refreshRow) && checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: typeDis === 2 ? col.template(row, indexRow) : value }),
3463
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3464
- import_reactstrap10.UncontrolledTooltip,
4059
+ typeDis === 1 && !refreshRow ? renderEdit(row, col, indexRow, indexCol) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: typeDis === 2 ? col.template(row, indexRow) : value }),
4060
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { id: `error-${indexRow}-${indexCol}`, className: (0, import_classnames14.default)("cursor-pointer text-primary icon-table", { "d-none": !errorMessage }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.AlertCircle, { fontSize: 15.5 }) }),
4061
+ !(typeDis === 1 && !refreshRow) && checkOverflow(indexRow, indexCol) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: typeDis === 2 ? col.template(row, indexRow) : value }),
4062
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4063
+ import_reactstrap11.UncontrolledTooltip,
3465
4064
  {
3466
4065
  target: `error-${indexRow}-${indexCol}`,
3467
4066
  className: "r-tooltip tooltip-error",
@@ -3483,10 +4082,10 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3483
4082
  return element && element.scrollWidth > element.clientWidth;
3484
4083
  };
3485
4084
  const renderFooterCol = (col, indexCol) => {
3486
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react15.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4085
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Fragment, { children: col.visible !== false && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3487
4086
  "td",
3488
4087
  {
3489
- className: (0, import_classnames13.default)(
4088
+ className: (0, import_classnames14.default)(
3490
4089
  `p-0 px-50 r-footer fix-${col.fixedType}`,
3491
4090
  { "cell-fixed": col.fixedType }
3492
4091
  ),
@@ -3495,56 +4094,56 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3495
4094
  right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
3496
4095
  textAlign: col.textAlign ? col.textAlign : "left"
3497
4096
  },
3498
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
4097
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
3499
4098
  return Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0);
3500
4099
  }, 0), decimalSeparator, thousandSeparator, col.numericSettings?.fraction, true) : "" })
3501
4100
  }
3502
4101
  ) }, `summarycell-${indexCol}`);
3503
4102
  };
3504
4103
  const renderToolbarTop = () => {
3505
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-toolbar-items", children: [
3506
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
3507
- return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-left-${index}`) : "";
4104
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: "table_custom_top_toolbar", className: "r-toolbar r-toolbar-top", "aria-orientation": "horizontal", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-items", children: [
4105
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-left", children: toolbarTopOption?.map((item, index) => {
4106
+ return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-left-${index}`) : "";
3508
4107
  }) }),
3509
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
3510
- return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-center-${index}`) : "";
4108
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-center", children: toolbarTopOption?.map((item, index) => {
4109
+ return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-center-${index}`) : "";
3511
4110
  }) }),
3512
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
3513
- return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-right-${index}`) : "";
4111
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-right", children: toolbarTopOption?.map((item, index) => {
4112
+ return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-top-right-${index}`) : "";
3514
4113
  }) })
3515
4114
  ] }) });
3516
4115
  };
3517
4116
  const renderToolbarBottom = () => {
3518
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id: "table_custom_bottom_toolbar", className: "r-toolbar r-toolbar-bottom", role: "toolbar", "aria-disabled": "false", "aria-haspopup": "false", "aria-orientation": "horizontal", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-toolbar-items", children: [
3519
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-toolbar-left", children: [
3520
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.Button, { color: "success", outline: true, onClick: handleAdd, className: "d-flex", children: t("Add item") }) }),
3521
- (indexFocus ?? -1) > -1 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
3522
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.Button, { color: "success", outline: true, onClick: () => {
4117
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: "table_custom_bottom_toolbar", className: "r-toolbar r-toolbar-bottom", role: "toolbar", "aria-disabled": "false", "aria-haspopup": "false", "aria-orientation": "horizontal", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-items", children: [
4118
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-left", children: [
4119
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleAdd, className: "d-flex", children: t("Add item") }) }),
4120
+ (indexFocus ?? -1) > -1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4121
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: () => {
3523
4122
  handleDuplicate(dataSource[indexFocus ?? -1], indexFocus ?? -1);
3524
4123
  }, className: "d-flex", children: t("Duplicate") }) }),
3525
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.Button, { color: "success", outline: true, onClick: handleInsertBefore, className: "d-flex", children: t("Insert item before") }) }),
3526
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.Button, { color: "success", outline: true, onClick: handleInsertAfter, className: "d-flex", children: t("Insert item after") }) })
3527
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: " " }),
3528
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item", { "d-none": editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.Button, { color: "primary", outline: true, onClick: handleDeleteAll, className: "d-flex", children: t("Delete all item") }) }),
4124
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleInsertBefore, className: "d-flex", children: t("Insert item before") }) }),
4125
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "success", outline: true, onClick: handleInsertAfter, className: "d-flex", children: t("Insert item after") }) })
4126
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: " " }),
4127
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item", { "d-none": editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.Button, { color: "primary", outline: true, onClick: handleDeleteAll, className: "d-flex", children: t("Delete all item") }) }),
3529
4128
  toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
3530
- return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : "";
4129
+ return item.align === "left" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : "";
3531
4130
  })
3532
4131
  ] }),
3533
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
3534
- return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : "";
4132
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
4133
+ return item.align === "center" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : "";
3535
4134
  }) }),
3536
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-toolbar-right", children: [
4135
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-toolbar-right", children: [
3537
4136
  toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
3538
- return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : "";
4137
+ return item.align === "right" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : "";
3539
4138
  }),
3540
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item me-25", { "d-none": headerColumns.length > 1 }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_becoxy_icons6.Settings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }),
3541
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_classnames13.default)("r-toolbar-item me-25", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_reactstrap10.UncontrolledDropdown, { className: "dropdown-user nav-item", children: [
3542
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.DropdownToggle, { href: "/", tag: "a", color: "info", onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_becoxy_icons6.Info, { className: "cursor-pointer" }) }),
3543
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_reactstrap10.DropdownMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "d-flex flex-column p-50 py-25", children: [
3544
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\xE2n b\u1EA3n" }),
3545
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { fontSize: 13 }, children: "Ch\u1ECDn \xF4 v\xE0 Ctrl + V \u0111\u1EC3 d\xE1n th\xF4ng tin t\u1EEB excel" }),
3546
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\xE9p h\xE0ng" }),
3547
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\xE1n h\xE0ng" })
4139
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item me-25", { "d-none": headerColumns.length > 1 }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.Settings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }),
4140
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_classnames14.default)("r-toolbar-item me-25", { "d-none": editDisable || addDisable }), "aria-disabled": "false", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_reactstrap11.UncontrolledDropdown, { className: "dropdown-user nav-item", children: [
4141
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.DropdownToggle, { href: "/", tag: "a", color: "info", onClick: (e) => e.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.Info, { className: "cursor-pointer" }) }),
4142
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.DropdownMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "d-flex flex-column p-50 py-25", children: [
4143
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\xE2n b\u1EA3n" }),
4144
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { fontSize: 13 }, children: "Ch\u1ECDn \xF4 v\xE0 Ctrl + V \u0111\u1EC3 d\xE1n th\xF4ng tin t\u1EEB excel" }),
4145
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\xE9p h\xE0ng" }),
4146
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\xE0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\xE0ng v\xE0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\xE1n h\xE0ng" })
3548
4147
  ] }) })
3549
4148
  ] }) })
3550
4149
  ] })
@@ -3573,10 +4172,10 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3573
4172
  const flagDisplay = !pagingClient || totalCount > (pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1) && totalCount <= (pagingSetting.pageSize ?? 0) * (pagingSetting.currentPage ?? 0);
3574
4173
  if (flagDisplay) {
3575
4174
  countDisplay++;
3576
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3577
4176
  "tr",
3578
4177
  {
3579
- className: (0, import_classnames13.default)("r-row", { "fisrt-row": countDisplay === 0 }),
4178
+ className: (0, import_classnames14.default)("r-row", { "fisrt-row": countDisplay === 0 }),
3580
4179
  children: contentColumns.map((col, indexCol) => {
3581
4180
  return renderContentCol(col, row, indexRow, indexCol, isSelected);
3582
4181
  })
@@ -3587,19 +4186,19 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3587
4186
  }
3588
4187
  });
3589
4188
  };
3590
- (0, import_react15.useEffect)(() => {
4189
+ (0, import_react16.useEffect)(() => {
3591
4190
  if (pagingClient && pagingSetting?.setCurrentPage && (searchSetting?.searchTerm !== void 0 ? searchSetting?.searchTerm : searchTerm)) {
3592
4191
  pagingSetting?.setCurrentPage(1);
3593
4192
  }
3594
4193
  }, [searchTerm, searchSetting?.searchTerm]);
3595
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react15.Fragment, { children: [
3596
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "react-table-edit", children: [
3597
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "r-grid", ref: gridRef, children: [
3598
- toolbarSetting?.showTopToolbar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: renderToolbarTop() }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {}),
3599
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : "auto"}`, minHeight: `${minHeight ? `${minHeight}px` : ""}`, maxHeight: `${maxHeight ? `${maxHeight}px` : "400px"}` }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { style: { width: "100%" }, children: [
3600
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: "r-gridheader", children: headerColumns.map((element, indexParent) => {
3601
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
3602
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4194
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react16.Fragment, { children: [
4195
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "react-table-edit", children: [
4196
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "r-grid", ref: gridRef, children: [
4197
+ toolbarSetting?.showTopToolbar ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: renderToolbarTop() }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {}),
4198
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : "auto"}`, minHeight: `${minHeight ? `${minHeight}px` : ""}`, maxHeight: `${maxHeight ? `${maxHeight}px` : "400px"}` }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { style: { width: "100%" }, children: [
4199
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: "r-gridheader", children: headerColumns.map((element, indexParent) => {
4200
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
4201
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3603
4202
  header_default,
3604
4203
  {
3605
4204
  col,
@@ -3619,14 +4218,14 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3619
4218
  );
3620
4219
  }) }, `header-${-indexParent}`);
3621
4220
  }) }),
3622
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { className: "r-gridcontent", children: renderData() }),
3623
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tfoot", { className: "r-gridfoot", children: haveSum == true ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: "r-row", children: contentColumns.map((col, index) => {
4221
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { className: "r-gridcontent", children: renderData() }),
4222
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tfoot", { className: "r-gridfoot", children: haveSum == true ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: "r-row", children: contentColumns.map((col, index) => {
3624
4223
  return renderFooterCol(col, index);
3625
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {}) })
4224
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {}) })
3626
4225
  ] }) }),
3627
- toolbarSetting?.showBottomToolbar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: renderToolbarBottom() }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {})
4226
+ toolbarSetting?.showBottomToolbar ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: renderToolbarBottom() }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {})
3628
4227
  ] }),
3629
- pagingSetting?.allowPaging ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4228
+ pagingSetting?.allowPaging ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3630
4229
  PagingComponent,
3631
4230
  {
3632
4231
  onChangePage,
@@ -3636,9 +4235,9 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3636
4235
  totalItem: pagingClient ? totalCount : pagingSetting?.totalItem ?? 0,
3637
4236
  onChangePageSize
3638
4237
  }
3639
- ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {})
4238
+ ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {})
3640
4239
  ] }),
3641
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
4240
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3642
4241
  sidebar_setting_column_default,
3643
4242
  {
3644
4243
  handleSidebar: () => {
@@ -3654,12 +4253,12 @@ var TableEdit = (0, import_react15.forwardRef)((props, ref) => {
3654
4253
  var table_default = TableEdit;
3655
4254
 
3656
4255
  // test-app/src/component/tab-menu/index.tsx
3657
- var import_becoxy_icons7 = require("becoxy-icons");
3658
- var import_classnames14 = __toESM(require("classnames"));
3659
- var import_react16 = require("react");
4256
+ var import_becoxy_icons8 = require("becoxy-icons");
4257
+ var import_classnames15 = __toESM(require("classnames"));
4258
+ var import_react17 = require("react");
3660
4259
  var import_react_router_dom = require("react-router-dom");
3661
- var import_reactstrap11 = require("reactstrap");
3662
- var import_jsx_runtime16 = require("react/jsx-runtime");
4260
+ var import_reactstrap12 = require("reactstrap");
4261
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3663
4262
  var TabsMenuComponent = ({
3664
4263
  buttonWidth,
3665
4264
  tabParent,
@@ -3671,14 +4270,14 @@ var TabsMenuComponent = ({
3671
4270
  renderModal
3672
4271
  }) => {
3673
4272
  const navigate = (0, import_react_router_dom.useNavigate)();
3674
- const [dataMenu, setDataMenu] = (0, import_react16.useState)([]);
3675
- const [openMenu, setOpenMenu] = (0, import_react16.useState)(false);
3676
- const [url, setUrl] = (0, import_react16.useState)("");
3677
- const [contentWidth, setContentWidth] = (0, import_react16.useState)(0);
3678
- const [componentWidth, setComponentWidth] = (0, import_react16.useState)(0);
3679
- const [scrollPosition, setScrollPosition] = (0, import_react16.useState)(0);
3680
- const [dataItem, setDataItem] = (0, import_react16.useState)([]);
3681
- const [openModal, setOpenModal] = (0, import_react16.useState)({});
4273
+ const [dataMenu, setDataMenu] = (0, import_react17.useState)([]);
4274
+ const [openMenu, setOpenMenu] = (0, import_react17.useState)(false);
4275
+ const [url, setUrl] = (0, import_react17.useState)("");
4276
+ const [contentWidth, setContentWidth] = (0, import_react17.useState)(0);
4277
+ const [componentWidth, setComponentWidth] = (0, import_react17.useState)(0);
4278
+ const [scrollPosition, setScrollPosition] = (0, import_react17.useState)(0);
4279
+ const [dataItem, setDataItem] = (0, import_react17.useState)([]);
4280
+ const [openModal, setOpenModal] = (0, import_react17.useState)({});
3682
4281
  const handleWindowResize = () => {
3683
4282
  const tabEle = document.getElementById(`tab-component-${resourceCode}`);
3684
4283
  const tabContent = document.getElementById(`content-component-${resourceCode}`);
@@ -3687,7 +4286,7 @@ var TabsMenuComponent = ({
3687
4286
  setContentWidth(tabContent?.offsetWidth ?? 0);
3688
4287
  }
3689
4288
  };
3690
- (0, import_react16.useEffect)(() => {
4289
+ (0, import_react17.useEffect)(() => {
3691
4290
  setUrl(window.location.pathname);
3692
4291
  window.addEventListener("resize", handleWindowResize);
3693
4292
  setTimeout(() => {
@@ -3703,7 +4302,7 @@ var TabsMenuComponent = ({
3703
4302
  window.removeEventListener("resize", handleWindowResize);
3704
4303
  };
3705
4304
  }, []);
3706
- (0, import_react16.useEffect)(() => {
4305
+ (0, import_react17.useEffect)(() => {
3707
4306
  const item = resources?.find((x) => x.code === (resourceCodeParent ? resourceCodeParent : resourceCode));
3708
4307
  if (item) {
3709
4308
  if (resourceCodeParent) {
@@ -3734,23 +4333,23 @@ var TabsMenuComponent = ({
3734
4333
  const handleModal = (name) => {
3735
4334
  setOpenModal((old) => ({ ...old, [name]: !(openModal[name] ?? false) }));
3736
4335
  };
3737
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react16.Fragment, { children: [
4336
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react17.Fragment, { children: [
3738
4337
  renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : "",
3739
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_classnames14.default)("tab-custom", { "tab-parent": tabParent }, { "tab-child": tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [
3740
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4338
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_classnames15.default)("tab-custom", { "tab-parent": tabParent }, { "tab-child": tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [
4339
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3741
4340
  "div",
3742
4341
  {
3743
4342
  onClick: () => handleScroll(-200),
3744
- className: (0, import_classnames14.default)("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
3745
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.ChevronLeft, {})
4343
+ className: (0, import_classnames15.default)("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
4344
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.ChevronLeft, {})
3746
4345
  }
3747
4346
  ),
3748
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `tab-component-${resourceCode}`, className: "tab-component", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `content-component-${resourceCode}`, children: dataMenu.map((item) => {
4347
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { id: `tab-component-${resourceCode}`, className: "tab-component", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { id: `content-component-${resourceCode}`, children: dataMenu.map((item) => {
3749
4348
  if (item?.resAttributes?.IS_MENU === "1") {
3750
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_reactstrap11.UncontrolledDropdown, { className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: "down", style: { backgroundColor: openMenu ? "#e0e0e0" : "" }, children: [
3751
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.DropdownToggle, { color: "#00000", style: { border: "none", boxShadow: "none", margin: 0, padding: 0 }, className: "background-none", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: item.name }) }),
3752
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_reactstrap11.DropdownMenu, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3753
- import_reactstrap11.DropdownItem,
4349
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_reactstrap12.UncontrolledDropdown, { className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: "down", style: { backgroundColor: openMenu ? "#e0e0e0" : "" }, children: [
4350
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_reactstrap12.DropdownToggle, { color: "#00000", style: { border: "none", boxShadow: "none", margin: 0, padding: 0 }, className: "background-none", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: item.name }) }),
4351
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_reactstrap12.DropdownMenu, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4352
+ import_reactstrap12.DropdownItem,
3754
4353
  {
3755
4354
  style: { borderRadius: "5px", margin: "0 0.5rem", width: "95%" },
3756
4355
  onClick: () => {
@@ -3766,23 +4365,23 @@ var TabsMenuComponent = ({
3766
4365
  )) })
3767
4366
  ] }, item.code);
3768
4367
  } else {
3769
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4368
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3770
4369
  import_react_router_dom.Link,
3771
4370
  {
3772
4371
  to: item.url,
3773
- className: (0, import_classnames14.default)("tab-custom-item", { active: item.url === url || tabParent && url?.split("/").length > 3 && item.url.startsWith(url.substring(0, url.lastIndexOf("/"))) }),
4372
+ className: (0, import_classnames15.default)("tab-custom-item", { active: item.url === url || tabParent && url?.split("/").length > 3 && item.url.startsWith(url.substring(0, url.lastIndexOf("/"))) }),
3774
4373
  children: item.name
3775
4374
  },
3776
4375
  item.code
3777
4376
  );
3778
4377
  }
3779
4378
  }) }) }),
3780
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4379
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3781
4380
  "div",
3782
4381
  {
3783
4382
  onClick: () => handleScroll(200),
3784
- className: (0, import_classnames14.default)("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
3785
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_becoxy_icons7.ChevronRight, {})
4383
+ className: (0, import_classnames15.default)("btn-scroll", { "d-none": componentWidth >= contentWidth - 20 }),
4384
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.ChevronRight, {})
3786
4385
  }
3787
4386
  )
3788
4387
  ] })
@@ -3790,10 +4389,10 @@ var TabsMenuComponent = ({
3790
4389
  };
3791
4390
 
3792
4391
  // test-app/src/component/input-style/index.tsx
3793
- var import_becoxy_icons8 = require("becoxy-icons");
3794
- var import_reactstrap12 = require("reactstrap");
3795
- var import_classnames15 = __toESM(require("classnames"));
3796
- var import_react17 = require("react");
4392
+ var import_becoxy_icons9 = require("becoxy-icons");
4393
+ var import_reactstrap13 = require("reactstrap");
4394
+ var import_classnames16 = __toESM(require("classnames"));
4395
+ var import_react18 = require("react");
3797
4396
 
3798
4397
  // test-app/src/component/input-style/fonts.ts
3799
4398
  var OptionFont = [
@@ -4652,7 +5251,7 @@ var OptionFont = [
4652
5251
  ];
4653
5252
 
4654
5253
  // test-app/src/component/input-style/index.tsx
4655
- var import_jsx_runtime17 = require("react/jsx-runtime");
5254
+ var import_jsx_runtime18 = require("react/jsx-runtime");
4656
5255
  var InputStyleComponent = (props) => {
4657
5256
  const {
4658
5257
  value,
@@ -4666,8 +5265,8 @@ var InputStyleComponent = (props) => {
4666
5265
  disabledItalic,
4667
5266
  disabledUnderline
4668
5267
  } = props;
4669
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react17.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "d-flex align-items-center", children: [
4670
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5268
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "d-flex align-items-center", children: [
5269
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4671
5270
  SelectTable,
4672
5271
  {
4673
5272
  options: OptionFont,
@@ -4683,12 +5282,12 @@ var InputStyleComponent = (props) => {
4683
5282
  field: "label",
4684
5283
  headerText: "",
4685
5284
  template: (row) => {
4686
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontFamily: row.label }, children: row.label });
5285
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { fontFamily: row.label }, children: row.label });
4687
5286
  }
4688
5287
  }
4689
5288
  ],
4690
5289
  formatOptionLabel: (props2) => {
4691
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: {
5290
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { style: {
4692
5291
  paddingLeft: 3,
4693
5292
  borderRadius: 2,
4694
5293
  fontFamily: value.fontFamily,
@@ -4701,7 +5300,7 @@ var InputStyleComponent = (props) => {
4701
5300
  }
4702
5301
  }
4703
5302
  ),
4704
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_classnames15.default)("ms-25", { "d-none": disabledFontSize }), style: { width: 60 }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5303
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_classnames16.default)("ms-25", { "d-none": disabledFontSize }), style: { width: 60 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4705
5304
  SelectTable,
4706
5305
  {
4707
5306
  options: Array.from({ length: 100 }, (_, i) => ({ value: i + 1, label: i + 1 })),
@@ -4713,45 +5312,45 @@ var InputStyleComponent = (props) => {
4713
5312
  }
4714
5313
  }
4715
5314
  ) }),
4716
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5315
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4717
5316
  "div",
4718
5317
  {
4719
- className: (0, import_classnames15.default)("btn-input-style", { "active-custom": value.bold }, { "d-none": disabledBold }),
5318
+ className: (0, import_classnames16.default)("btn-input-style", { "active-custom": value.bold }, { "d-none": disabledBold }),
4720
5319
  onClick: () => {
4721
5320
  if (!disabled) {
4722
5321
  onChange({ ...value, bold: !value.bold });
4723
5322
  }
4724
5323
  },
4725
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.Bold, { fontSize: 18 })
5324
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Bold, { fontSize: 18 })
4726
5325
  }
4727
5326
  ),
4728
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5327
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4729
5328
  "div",
4730
5329
  {
4731
- className: (0, import_classnames15.default)("btn-input-style", { "active-custom": value.italic }, { "d-none": disabledItalic }),
5330
+ className: (0, import_classnames16.default)("btn-input-style", { "active-custom": value.italic }, { "d-none": disabledItalic }),
4732
5331
  onClick: () => {
4733
5332
  if (!disabled) {
4734
5333
  onChange({ ...value, italic: !value.italic });
4735
5334
  }
4736
5335
  },
4737
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.Italic, { fontSize: 18 })
5336
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Italic, { fontSize: 18 })
4738
5337
  }
4739
5338
  ),
4740
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5339
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4741
5340
  "div",
4742
5341
  {
4743
- className: (0, import_classnames15.default)("btn-input-style", { "active-custom": value.underline }, { "d-none": disabledUnderline }),
5342
+ className: (0, import_classnames16.default)("btn-input-style", { "active-custom": value.underline }, { "d-none": disabledUnderline }),
4744
5343
  onClick: () => {
4745
5344
  if (!disabled) {
4746
5345
  onChange({ ...value, underline: !value.underline });
4747
5346
  }
4748
5347
  },
4749
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.Underline, { fontSize: 18 })
5348
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Underline, { fontSize: 18 })
4750
5349
  }
4751
5350
  ),
4752
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_reactstrap12.Button, { tag: "label", color: "none", className: (0, import_classnames15.default)("btn-input-style", { "d-none": disabledColor }), children: [
4753
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.Type, { stroke: value.color ?? "#000000", fontSize: 18 }),
4754
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5351
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_reactstrap13.Button, { tag: "label", color: "none", className: (0, import_classnames16.default)("btn-input-style", { "d-none": disabledColor }), children: [
5352
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Type, { stroke: value.color ?? "#000000", fontSize: 18 }),
5353
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4755
5354
  "input",
4756
5355
  {
4757
5356
  type: "color",
@@ -4765,10 +5364,10 @@ var InputStyleComponent = (props) => {
4765
5364
  }
4766
5365
  )
4767
5366
  ] }),
4768
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_reactstrap12.Button, { tag: "label", color: "none", className: (0, import_classnames15.default)("btn-input-style", { "d-none": disabledBackgroundColor }), children: [
4769
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_becoxy_icons8.Droplet, { fill: value.backgroundColor ?? "#ffffff", fontSize: 18 }),
4770
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4771
- import_reactstrap12.Input,
5367
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_reactstrap13.Button, { tag: "label", color: "none", className: (0, import_classnames16.default)("btn-input-style", { "d-none": disabledBackgroundColor }), children: [
5368
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_becoxy_icons9.Droplet, { fill: value.backgroundColor ?? "#ffffff", fontSize: 18 }),
5369
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5370
+ import_reactstrap13.Input,
4772
5371
  {
4773
5372
  id: "backgroundColor",
4774
5373
  type: "color",