react-table-edit 0.9.6 → 0.9.8

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