react-table-edit 0.9.7 → 0.9.9

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