@fctc/sme-widget-ui 1.1.3 → 1.1.5

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/.babelrc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "presets": [
3
+ "@babel/preset-env",
4
+ "@babel/preset-react",
5
+ "@babel/preset-typescript"
6
+ ]
7
+ }
@@ -0,0 +1,10 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ insert_final_newline = true
6
+
7
+ [*.{js,json,yml}]
8
+ charset = utf-8
9
+ indent_style = space
10
+ indent_size = 2
@@ -0,0 +1,6 @@
1
+ dist
2
+ .cache
3
+ package-lock.json
4
+ public
5
+ node_modules
6
+ yarn.lock
@@ -0,0 +1,66 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: { browser: true, es2020: true },
4
+ extends: [
5
+ 'eslint:recommended',
6
+ 'plugin:@typescript-eslint/recommended',
7
+ 'plugin:prettier/recommended',
8
+ ],
9
+ ignorePatterns: ['dist', '.eslintrc.cjs', 'commitlint.config.cjs'],
10
+ parser: '@typescript-eslint/parser',
11
+ overrides: [
12
+ {
13
+ files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs'],
14
+ plugins: [
15
+ '@typescript-eslint',
16
+ 'unused-imports',
17
+ 'simple-import-sort',
18
+ 'react-refresh',
19
+ ],
20
+ rules: {
21
+ 'react-refresh/only-export-components': [
22
+ 'warn',
23
+ { allowConstantExport: true },
24
+ ],
25
+ 'import/prefer-default-export': 'off',
26
+ 'simple-import-sort/imports': [
27
+ 'error',
28
+ {
29
+ groups: [
30
+ // Packages `react` related packages come first.
31
+ ['^react', '^@?\\w'],
32
+ // Internal packages.
33
+ ['^(@|components)(/.*|$)'],
34
+ // Side effect imports.
35
+ ['^\\u0000'],
36
+ // Parent imports. Put `..` last.
37
+ ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
38
+ // Other relative imports. Put same-folder imports and `.` last.
39
+ ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
40
+ // Style imports.
41
+ ['^.+\\.?(css)$'],
42
+ ],
43
+ },
44
+ ],
45
+ 'prettier/prettier': [
46
+ 'error',
47
+ {
48
+ endOfLine: 'auto',
49
+ },
50
+ ],
51
+ 'react/react-in-jsx-scope': 'off',
52
+ 'no-param-reassign': 'off',
53
+ 'simple-import-sort/exports': 'error',
54
+ '@typescript-eslint/no-unused-vars': 'off',
55
+ '@typescript-eslint/no-non-null-assertion': 'off',
56
+ '@typescript-eslint/no-explicit-any': 'off',
57
+ '@typescript-eslint/ban-ts-comment': 'off',
58
+ '@typescript-eslint/ban-types': 'off',
59
+ 'unused-imports/no-unused-imports': 'error',
60
+ 'unused-imports/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
61
+ 'no-plusplus': 'off',
62
+ 'no-case-declarations': 'off',
63
+ },
64
+ },
65
+ ],
66
+ }
@@ -0,0 +1,4 @@
1
+ /.yarn/** linguist-vendored
2
+ /.yarn/releases/* binary
3
+ /.yarn/plugins/**/* binary
4
+ /.pnp.* binary linguist-generated
@@ -0,0 +1,4 @@
1
+ {
2
+ "singleQuote": true,
3
+ "semi": false
4
+ }
package/dist/index.js CHANGED
@@ -12410,9 +12410,12 @@ var TableBodyRow = (props) => {
12410
12410
  isForm,
12411
12411
  typeCo,
12412
12412
  selectedRowKeys,
12413
+ tableGroupController,
12414
+ groupByList,
12415
+ setIsAutoSelect,
12416
+ isAutoSelect,
12413
12417
  isEditTable
12414
12418
  } = props;
12415
- const [isAutoSelect, setIsAutoSelect] = (0, import_react12.useState)(false);
12416
12419
  const rootStyle = getComputedStyle(document.documentElement);
12417
12420
  const colorPrimary = rootStyle.getPropertyValue("--primary").trim();
12418
12421
  return rows && rows?.length > 0 ? rows?.map((row, index4) => {
@@ -12420,21 +12423,24 @@ var TableBodyRow = (props) => {
12420
12423
  TableGroup,
12421
12424
  {
12422
12425
  columns,
12423
- indexRow: index4,
12424
12426
  rows,
12425
12427
  row,
12428
+ indexRow: index4,
12426
12429
  model,
12427
12430
  viewData,
12428
12431
  renderField,
12429
12432
  level: level + 1,
12430
12433
  specification,
12431
- domain: row?.__domain,
12432
12434
  context,
12433
12435
  checkedAll,
12434
12436
  isDisplayCheckbox,
12435
12437
  selectedRowKeysRef,
12436
12438
  isAutoSelect,
12437
- setIsAutoSelect
12439
+ setIsAutoSelect,
12440
+ groupByList,
12441
+ tableGroupController,
12442
+ setSelectedRowKeys,
12443
+ selectedRowKeys
12438
12444
  },
12439
12445
  `record-group-${index4}`
12440
12446
  ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
@@ -12473,7 +12479,15 @@ var TableBodyRow = (props) => {
12473
12479
  ) }) });
12474
12480
  };
12475
12481
  var TableBody = (props) => {
12476
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("tbody", { className: "overflow-hidden z-0", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableBodyRow, { ...props }) });
12482
+ const [isAutoSelect, setIsAutoSelect] = (0, import_react12.useState)(false);
12483
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12484
+ TableBodyRow,
12485
+ {
12486
+ ...props,
12487
+ isAutoSelect,
12488
+ setIsAutoSelect
12489
+ }
12490
+ ) });
12477
12491
  };
12478
12492
 
12479
12493
  // src/widgets/advanced/table/table-filter.tsx
@@ -14854,7 +14868,7 @@ var PopupFilter = ({
14854
14868
  right: 0,
14855
14869
  zIndex: 33
14856
14870
  },
14857
- className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white border-none shadow-xl",
14871
+ className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
14858
14872
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
14859
14873
  "div",
14860
14874
  {
@@ -15214,64 +15228,59 @@ var Search = ({
15214
15228
  "div",
15215
15229
  {
15216
15230
  ref: popupFilterRef,
15217
- className: `search ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative items-center w-full min-w-[70%] flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] bg-grey-100 shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[#F2F2F2]`,
15231
+ className: `search gap-[8px] p-2 items-center ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[var(--stroke-default)]`,
15218
15232
  children: [
15219
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
15220
- "div",
15221
- {
15222
- className: `relative flex md:min-w-[400px] max-w-full items-center gap-[8px] p-1 !pl-4 w-full ${(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && "border-r border-[rgba(242,242,242,1)]"}`,
15223
- children: [
15224
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchIcon, {}) }),
15225
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
15226
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15227
- TagSearch,
15228
- {
15229
- removeSearchItems,
15230
- selectedTags,
15231
- filterBy,
15232
- setFilterBy
15233
- }
15234
- ),
15235
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15236
- "input",
15237
- {
15238
- value: searchString,
15239
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
15240
- placeholder: instance.t("search..."),
15241
- onChange: (e3) => {
15242
- onSearchString(e3.target.value);
15243
- setShowPopupFilter(false);
15244
- },
15245
- onKeyUp: (e3) => e3.preventDefault()
15246
- }
15247
- ),
15248
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15249
- SearchList,
15250
- {
15251
- handleAddTagSearch,
15252
- searchBy,
15253
- searchString
15254
- }
15255
- )
15256
- ] })
15257
- ]
15258
- }
15259
- ),
15260
- (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
15233
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "size-5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchIcon, {}) }),
15234
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
15261
15235
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15236
+ TagSearch,
15237
+ {
15238
+ removeSearchItems,
15239
+ selectedTags,
15240
+ filterBy,
15241
+ setFilterBy
15242
+ }
15243
+ ),
15244
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15245
+ "input",
15246
+ {
15247
+ value: searchString,
15248
+ className: "h-5 w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
15249
+ placeholder: instance.t("search..."),
15250
+ onChange: (e3) => {
15251
+ onSearchString(e3.target.value);
15252
+ setShowPopupFilter(false);
15253
+ },
15254
+ onKeyUp: (e3) => e3.preventDefault()
15255
+ }
15256
+ ),
15257
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15258
+ SearchList,
15259
+ {
15260
+ handleAddTagSearch,
15261
+ searchBy,
15262
+ searchString
15263
+ }
15264
+ )
15265
+ ] }),
15266
+ (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
15267
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
15262
15268
  "div",
15263
15269
  {
15264
- className: `flex h-full cursor-pointer items-center justify-center px-[10px] max-w-fit`,
15270
+ className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
15265
15271
  onClick: (e3) => {
15266
15272
  e3.stopPropagation();
15267
15273
  setShowPopupFilter((prev2) => !prev2);
15268
15274
  },
15269
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15270
- ChevronBottomIcon,
15271
- {
15272
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
15273
- }
15274
- ) })
15275
+ children: [
15276
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
15277
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15278
+ ChevronBottomIcon,
15279
+ {
15280
+ className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
15281
+ }
15282
+ )
15283
+ ]
15275
15284
  }
15276
15285
  ),
15277
15286
  showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
@@ -18226,12 +18235,12 @@ var CheckboxField = (props) => {
18226
18235
  {
18227
18236
  name: name2 ?? "",
18228
18237
  control: methods?.control,
18229
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
18230
- "input",
18238
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
18239
+ "div",
18231
18240
  {
18232
- ...field,
18233
- onChange: (e3) => {
18234
- const checked = e3.target.checked;
18241
+ className: "flex items-center gap-2",
18242
+ onClick: () => {
18243
+ const checked = !field.value;
18235
18244
  if (!isEditTable && readonly) return;
18236
18245
  methods.setValue(name2, checked, { shouldDirty: true });
18237
18246
  field.onChange(checked);
@@ -18239,13 +18248,28 @@ var CheckboxField = (props) => {
18239
18248
  onChange2(name2 ?? "", checked);
18240
18249
  }
18241
18250
  },
18242
- type: "checkbox",
18243
- disabled: readonly,
18244
- required: !invisible && required,
18245
- className: "custom-checkbox",
18246
- checked: field.value ?? false
18251
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
18252
+ "input",
18253
+ {
18254
+ ...field,
18255
+ onChange: (e3) => {
18256
+ const checked = e3.target.checked;
18257
+ if (!isEditTable && readonly) return;
18258
+ methods.setValue(name2, checked, { shouldDirty: true });
18259
+ field.onChange(checked);
18260
+ if (onChange2) {
18261
+ onChange2(name2 ?? "", checked);
18262
+ }
18263
+ },
18264
+ type: "checkbox",
18265
+ disabled: readonly,
18266
+ required: !invisible && required,
18267
+ className: "custom-checkbox",
18268
+ checked: field.value ?? false
18269
+ }
18270
+ )
18247
18271
  }
18248
- ) })
18272
+ )
18249
18273
  }
18250
18274
  );
18251
18275
  };
@@ -34102,7 +34126,7 @@ var Many2ManyField = (props) => {
34102
34126
  !isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
34103
34127
  "div",
34104
34128
  {
34105
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34129
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34106
34130
  children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
34107
34131
  "div",
34108
34132
  {
package/dist/index.mjs CHANGED
@@ -12291,9 +12291,12 @@ var TableBodyRow = (props) => {
12291
12291
  isForm,
12292
12292
  typeCo,
12293
12293
  selectedRowKeys,
12294
+ tableGroupController,
12295
+ groupByList,
12296
+ setIsAutoSelect,
12297
+ isAutoSelect,
12294
12298
  isEditTable
12295
12299
  } = props;
12296
- const [isAutoSelect, setIsAutoSelect] = useState2(false);
12297
12300
  const rootStyle = getComputedStyle(document.documentElement);
12298
12301
  const colorPrimary = rootStyle.getPropertyValue("--primary").trim();
12299
12302
  return rows && rows?.length > 0 ? rows?.map((row, index4) => {
@@ -12301,21 +12304,24 @@ var TableBodyRow = (props) => {
12301
12304
  TableGroup,
12302
12305
  {
12303
12306
  columns,
12304
- indexRow: index4,
12305
12307
  rows,
12306
12308
  row,
12309
+ indexRow: index4,
12307
12310
  model,
12308
12311
  viewData,
12309
12312
  renderField,
12310
12313
  level: level + 1,
12311
12314
  specification,
12312
- domain: row?.__domain,
12313
12315
  context,
12314
12316
  checkedAll,
12315
12317
  isDisplayCheckbox,
12316
12318
  selectedRowKeysRef,
12317
12319
  isAutoSelect,
12318
- setIsAutoSelect
12320
+ setIsAutoSelect,
12321
+ groupByList,
12322
+ tableGroupController,
12323
+ setSelectedRowKeys,
12324
+ selectedRowKeys
12319
12325
  },
12320
12326
  `record-group-${index4}`
12321
12327
  ) : /* @__PURE__ */ jsx42(
@@ -12354,7 +12360,15 @@ var TableBodyRow = (props) => {
12354
12360
  ) }) });
12355
12361
  };
12356
12362
  var TableBody = (props) => {
12357
- return /* @__PURE__ */ jsx42("tbody", { className: "overflow-hidden z-0", children: /* @__PURE__ */ jsx42(TableBodyRow, { ...props }) });
12363
+ const [isAutoSelect, setIsAutoSelect] = useState2(false);
12364
+ return /* @__PURE__ */ jsx42("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ jsx42(
12365
+ TableBodyRow,
12366
+ {
12367
+ ...props,
12368
+ isAutoSelect,
12369
+ setIsAutoSelect
12370
+ }
12371
+ ) });
12358
12372
  };
12359
12373
 
12360
12374
  // src/widgets/advanced/table/table-filter.tsx
@@ -14735,7 +14749,7 @@ var PopupFilter = ({
14735
14749
  right: 0,
14736
14750
  zIndex: 33
14737
14751
  },
14738
- className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white border-none shadow-xl",
14752
+ className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
14739
14753
  children: /* @__PURE__ */ jsxs35(
14740
14754
  "div",
14741
14755
  {
@@ -15095,64 +15109,59 @@ var Search = ({
15095
15109
  "div",
15096
15110
  {
15097
15111
  ref: popupFilterRef,
15098
- className: `search ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative items-center w-full min-w-[70%] flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] bg-grey-100 shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[#F2F2F2]`,
15112
+ className: `search gap-[8px] p-2 items-center ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[var(--stroke-default)]`,
15099
15113
  children: [
15100
- /* @__PURE__ */ jsxs38(
15101
- "div",
15102
- {
15103
- className: `relative flex md:min-w-[400px] max-w-full items-center gap-[8px] p-1 !pl-4 w-full ${(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && "border-r border-[rgba(242,242,242,1)]"}`,
15104
- children: [
15105
- /* @__PURE__ */ jsx57("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ jsx57(SearchIcon, {}) }),
15106
- /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
15107
- /* @__PURE__ */ jsx57(
15108
- TagSearch,
15109
- {
15110
- removeSearchItems,
15111
- selectedTags,
15112
- filterBy,
15113
- setFilterBy
15114
- }
15115
- ),
15116
- /* @__PURE__ */ jsx57(
15117
- "input",
15118
- {
15119
- value: searchString,
15120
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
15121
- placeholder: instance.t("search..."),
15122
- onChange: (e3) => {
15123
- onSearchString(e3.target.value);
15124
- setShowPopupFilter(false);
15125
- },
15126
- onKeyUp: (e3) => e3.preventDefault()
15127
- }
15128
- ),
15129
- /* @__PURE__ */ jsx57(
15130
- SearchList,
15131
- {
15132
- handleAddTagSearch,
15133
- searchBy,
15134
- searchString
15135
- }
15136
- )
15137
- ] })
15138
- ]
15139
- }
15140
- ),
15141
- (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ jsxs38(Fragment9, { children: [
15114
+ /* @__PURE__ */ jsx57("div", { className: "size-5", children: /* @__PURE__ */ jsx57(SearchIcon, {}) }),
15115
+ /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
15142
15116
  /* @__PURE__ */ jsx57(
15117
+ TagSearch,
15118
+ {
15119
+ removeSearchItems,
15120
+ selectedTags,
15121
+ filterBy,
15122
+ setFilterBy
15123
+ }
15124
+ ),
15125
+ /* @__PURE__ */ jsx57(
15126
+ "input",
15127
+ {
15128
+ value: searchString,
15129
+ className: "h-5 w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
15130
+ placeholder: instance.t("search..."),
15131
+ onChange: (e3) => {
15132
+ onSearchString(e3.target.value);
15133
+ setShowPopupFilter(false);
15134
+ },
15135
+ onKeyUp: (e3) => e3.preventDefault()
15136
+ }
15137
+ ),
15138
+ /* @__PURE__ */ jsx57(
15139
+ SearchList,
15140
+ {
15141
+ handleAddTagSearch,
15142
+ searchBy,
15143
+ searchString
15144
+ }
15145
+ )
15146
+ ] }),
15147
+ (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ jsxs38(Fragment9, { children: [
15148
+ /* @__PURE__ */ jsxs38(
15143
15149
  "div",
15144
15150
  {
15145
- className: `flex h-full cursor-pointer items-center justify-center px-[10px] max-w-fit`,
15151
+ className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
15146
15152
  onClick: (e3) => {
15147
15153
  e3.stopPropagation();
15148
15154
  setShowPopupFilter((prev2) => !prev2);
15149
15155
  },
15150
- children: /* @__PURE__ */ jsx57("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ jsx57(
15151
- ChevronBottomIcon,
15152
- {
15153
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
15154
- }
15155
- ) })
15156
+ children: [
15157
+ /* @__PURE__ */ jsx57("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
15158
+ /* @__PURE__ */ jsx57(
15159
+ ChevronBottomIcon,
15160
+ {
15161
+ className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
15162
+ }
15163
+ )
15164
+ ]
15156
15165
  }
15157
15166
  ),
15158
15167
  showPopupFilter && /* @__PURE__ */ jsx57(
@@ -18107,12 +18116,12 @@ var CheckboxField = (props) => {
18107
18116
  {
18108
18117
  name: name2 ?? "",
18109
18118
  control: methods?.control,
18110
- render: ({ field }) => /* @__PURE__ */ jsx72("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx72(
18111
- "input",
18119
+ render: ({ field }) => /* @__PURE__ */ jsx72(
18120
+ "div",
18112
18121
  {
18113
- ...field,
18114
- onChange: (e3) => {
18115
- const checked = e3.target.checked;
18122
+ className: "flex items-center gap-2",
18123
+ onClick: () => {
18124
+ const checked = !field.value;
18116
18125
  if (!isEditTable && readonly) return;
18117
18126
  methods.setValue(name2, checked, { shouldDirty: true });
18118
18127
  field.onChange(checked);
@@ -18120,13 +18129,28 @@ var CheckboxField = (props) => {
18120
18129
  onChange2(name2 ?? "", checked);
18121
18130
  }
18122
18131
  },
18123
- type: "checkbox",
18124
- disabled: readonly,
18125
- required: !invisible && required,
18126
- className: "custom-checkbox",
18127
- checked: field.value ?? false
18132
+ children: /* @__PURE__ */ jsx72(
18133
+ "input",
18134
+ {
18135
+ ...field,
18136
+ onChange: (e3) => {
18137
+ const checked = e3.target.checked;
18138
+ if (!isEditTable && readonly) return;
18139
+ methods.setValue(name2, checked, { shouldDirty: true });
18140
+ field.onChange(checked);
18141
+ if (onChange2) {
18142
+ onChange2(name2 ?? "", checked);
18143
+ }
18144
+ },
18145
+ type: "checkbox",
18146
+ disabled: readonly,
18147
+ required: !invisible && required,
18148
+ className: "custom-checkbox",
18149
+ checked: field.value ?? false
18150
+ }
18151
+ )
18128
18152
  }
18129
- ) })
18153
+ )
18130
18154
  }
18131
18155
  );
18132
18156
  };
@@ -33983,7 +34007,7 @@ var Many2ManyField = (props) => {
33983
34007
  !isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ jsx102("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx102("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx102(
33984
34008
  "div",
33985
34009
  {
33986
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34010
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33987
34011
  children: /* @__PURE__ */ jsx102("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx102("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx102(
33988
34012
  "div",
33989
34013
  {
@@ -39,6 +39,8 @@ interface TableBodyProps {
39
39
  typeCo?: any;
40
40
  setSelectedRowKeys?: any;
41
41
  selectedRowKeys?: any;
42
+ tableGroupController?: any;
43
+ groupByList?: any;
42
44
  isEditTable?: boolean;
43
45
  }
44
46
  declare const TableBody: (props: TableBodyProps) => JSX.Element;
package/dist/widgets.d.ts CHANGED
@@ -39,6 +39,8 @@ interface TableBodyProps {
39
39
  typeCo?: any;
40
40
  setSelectedRowKeys?: any;
41
41
  selectedRowKeys?: any;
42
+ tableGroupController?: any;
43
+ groupByList?: any;
42
44
  isEditTable?: boolean;
43
45
  }
44
46
  declare const TableBody: (props: TableBodyProps) => JSX.Element;
package/dist/widgets.js CHANGED
@@ -12010,9 +12010,12 @@ var TableBodyRow = (props) => {
12010
12010
  isForm,
12011
12011
  typeCo,
12012
12012
  selectedRowKeys,
12013
+ tableGroupController,
12014
+ groupByList,
12015
+ setIsAutoSelect,
12016
+ isAutoSelect,
12013
12017
  isEditTable
12014
12018
  } = props;
12015
- const [isAutoSelect, setIsAutoSelect] = (0, import_react11.useState)(false);
12016
12019
  const rootStyle = getComputedStyle(document.documentElement);
12017
12020
  const colorPrimary = rootStyle.getPropertyValue("--primary").trim();
12018
12021
  return rows && rows?.length > 0 ? rows?.map((row, index4) => {
@@ -12020,21 +12023,24 @@ var TableBodyRow = (props) => {
12020
12023
  TableGroup,
12021
12024
  {
12022
12025
  columns,
12023
- indexRow: index4,
12024
12026
  rows,
12025
12027
  row,
12028
+ indexRow: index4,
12026
12029
  model,
12027
12030
  viewData,
12028
12031
  renderField,
12029
12032
  level: level + 1,
12030
12033
  specification,
12031
- domain: row?.__domain,
12032
12034
  context,
12033
12035
  checkedAll,
12034
12036
  isDisplayCheckbox,
12035
12037
  selectedRowKeysRef,
12036
12038
  isAutoSelect,
12037
- setIsAutoSelect
12039
+ setIsAutoSelect,
12040
+ groupByList,
12041
+ tableGroupController,
12042
+ setSelectedRowKeys,
12043
+ selectedRowKeys
12038
12044
  },
12039
12045
  `record-group-${index4}`
12040
12046
  ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
@@ -12073,7 +12079,15 @@ var TableBodyRow = (props) => {
12073
12079
  ) }) });
12074
12080
  };
12075
12081
  var TableBody = (props) => {
12076
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("tbody", { className: "overflow-hidden z-0", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableBodyRow, { ...props }) });
12082
+ const [isAutoSelect, setIsAutoSelect] = (0, import_react11.useState)(false);
12083
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12084
+ TableBodyRow,
12085
+ {
12086
+ ...props,
12087
+ isAutoSelect,
12088
+ setIsAutoSelect
12089
+ }
12090
+ ) });
12077
12091
  };
12078
12092
 
12079
12093
  // src/widgets/advanced/table/table-filter.tsx
@@ -14499,7 +14513,7 @@ var PopupFilter = ({
14499
14513
  right: 0,
14500
14514
  zIndex: 33
14501
14515
  },
14502
- className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white border-none shadow-xl",
14516
+ className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
14503
14517
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
14504
14518
  "div",
14505
14519
  {
@@ -14859,64 +14873,59 @@ var Search = ({
14859
14873
  "div",
14860
14874
  {
14861
14875
  ref: popupFilterRef,
14862
- className: `search ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative items-center w-full min-w-[70%] flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] bg-grey-100 shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[#F2F2F2]`,
14876
+ className: `search gap-[8px] p-2 items-center ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[var(--stroke-default)]`,
14863
14877
  children: [
14864
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
14865
- "div",
14866
- {
14867
- className: `relative flex md:min-w-[400px] max-w-full items-center gap-[8px] p-1 !pl-4 w-full ${(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && "border-r border-[rgba(242,242,242,1)]"}`,
14868
- children: [
14869
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchIcon, {}) }),
14870
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
14871
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14872
- TagSearch,
14873
- {
14874
- removeSearchItems,
14875
- selectedTags,
14876
- filterBy,
14877
- setFilterBy
14878
- }
14879
- ),
14880
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14881
- "input",
14882
- {
14883
- value: searchString,
14884
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
14885
- placeholder: instance.t("search..."),
14886
- onChange: (e3) => {
14887
- onSearchString(e3.target.value);
14888
- setShowPopupFilter(false);
14889
- },
14890
- onKeyUp: (e3) => e3.preventDefault()
14891
- }
14892
- ),
14893
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14894
- SearchList,
14895
- {
14896
- handleAddTagSearch,
14897
- searchBy,
14898
- searchString
14899
- }
14900
- )
14901
- ] })
14902
- ]
14903
- }
14904
- ),
14905
- (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
14878
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "size-5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchIcon, {}) }),
14879
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
14906
14880
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14881
+ TagSearch,
14882
+ {
14883
+ removeSearchItems,
14884
+ selectedTags,
14885
+ filterBy,
14886
+ setFilterBy
14887
+ }
14888
+ ),
14889
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14890
+ "input",
14891
+ {
14892
+ value: searchString,
14893
+ className: "h-5 w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
14894
+ placeholder: instance.t("search..."),
14895
+ onChange: (e3) => {
14896
+ onSearchString(e3.target.value);
14897
+ setShowPopupFilter(false);
14898
+ },
14899
+ onKeyUp: (e3) => e3.preventDefault()
14900
+ }
14901
+ ),
14902
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14903
+ SearchList,
14904
+ {
14905
+ handleAddTagSearch,
14906
+ searchBy,
14907
+ searchString
14908
+ }
14909
+ )
14910
+ ] }),
14911
+ (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
14912
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
14907
14913
  "div",
14908
14914
  {
14909
- className: `flex h-full cursor-pointer items-center justify-center px-[10px] max-w-fit`,
14915
+ className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
14910
14916
  onClick: (e3) => {
14911
14917
  e3.stopPropagation();
14912
14918
  setShowPopupFilter((prev2) => !prev2);
14913
14919
  },
14914
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14915
- ChevronBottomIcon,
14916
- {
14917
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
14918
- }
14919
- ) })
14920
+ children: [
14921
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
14922
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14923
+ ChevronBottomIcon,
14924
+ {
14925
+ className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
14926
+ }
14927
+ )
14928
+ ]
14920
14929
  }
14921
14930
  ),
14922
14931
  showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
@@ -17871,12 +17880,12 @@ var CheckboxField = (props) => {
17871
17880
  {
17872
17881
  name: name2 ?? "",
17873
17882
  control: methods?.control,
17874
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
17875
- "input",
17883
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
17884
+ "div",
17876
17885
  {
17877
- ...field,
17878
- onChange: (e3) => {
17879
- const checked = e3.target.checked;
17886
+ className: "flex items-center gap-2",
17887
+ onClick: () => {
17888
+ const checked = !field.value;
17880
17889
  if (!isEditTable && readonly) return;
17881
17890
  methods.setValue(name2, checked, { shouldDirty: true });
17882
17891
  field.onChange(checked);
@@ -17884,13 +17893,28 @@ var CheckboxField = (props) => {
17884
17893
  onChange2(name2 ?? "", checked);
17885
17894
  }
17886
17895
  },
17887
- type: "checkbox",
17888
- disabled: readonly,
17889
- required: !invisible && required,
17890
- className: "custom-checkbox",
17891
- checked: field.value ?? false
17896
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
17897
+ "input",
17898
+ {
17899
+ ...field,
17900
+ onChange: (e3) => {
17901
+ const checked = e3.target.checked;
17902
+ if (!isEditTable && readonly) return;
17903
+ methods.setValue(name2, checked, { shouldDirty: true });
17904
+ field.onChange(checked);
17905
+ if (onChange2) {
17906
+ onChange2(name2 ?? "", checked);
17907
+ }
17908
+ },
17909
+ type: "checkbox",
17910
+ disabled: readonly,
17911
+ required: !invisible && required,
17912
+ className: "custom-checkbox",
17913
+ checked: field.value ?? false
17914
+ }
17915
+ )
17892
17916
  }
17893
- ) })
17917
+ )
17894
17918
  }
17895
17919
  );
17896
17920
  };
@@ -33747,7 +33771,7 @@ var Many2ManyField = (props) => {
33747
33771
  !isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
33748
33772
  "div",
33749
33773
  {
33750
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33774
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33751
33775
  children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
33752
33776
  "div",
33753
33777
  {
package/dist/widgets.mjs CHANGED
@@ -11948,9 +11948,12 @@ var TableBodyRow = (props) => {
11948
11948
  isForm,
11949
11949
  typeCo,
11950
11950
  selectedRowKeys,
11951
+ tableGroupController,
11952
+ groupByList,
11953
+ setIsAutoSelect,
11954
+ isAutoSelect,
11951
11955
  isEditTable
11952
11956
  } = props;
11953
- const [isAutoSelect, setIsAutoSelect] = useState2(false);
11954
11957
  const rootStyle = getComputedStyle(document.documentElement);
11955
11958
  const colorPrimary = rootStyle.getPropertyValue("--primary").trim();
11956
11959
  return rows && rows?.length > 0 ? rows?.map((row, index4) => {
@@ -11958,21 +11961,24 @@ var TableBodyRow = (props) => {
11958
11961
  TableGroup,
11959
11962
  {
11960
11963
  columns,
11961
- indexRow: index4,
11962
11964
  rows,
11963
11965
  row,
11966
+ indexRow: index4,
11964
11967
  model,
11965
11968
  viewData,
11966
11969
  renderField,
11967
11970
  level: level + 1,
11968
11971
  specification,
11969
- domain: row?.__domain,
11970
11972
  context,
11971
11973
  checkedAll,
11972
11974
  isDisplayCheckbox,
11973
11975
  selectedRowKeysRef,
11974
11976
  isAutoSelect,
11975
- setIsAutoSelect
11977
+ setIsAutoSelect,
11978
+ groupByList,
11979
+ tableGroupController,
11980
+ setSelectedRowKeys,
11981
+ selectedRowKeys
11976
11982
  },
11977
11983
  `record-group-${index4}`
11978
11984
  ) : /* @__PURE__ */ jsx42(
@@ -12011,7 +12017,15 @@ var TableBodyRow = (props) => {
12011
12017
  ) }) });
12012
12018
  };
12013
12019
  var TableBody = (props) => {
12014
- return /* @__PURE__ */ jsx42("tbody", { className: "overflow-hidden z-0", children: /* @__PURE__ */ jsx42(TableBodyRow, { ...props }) });
12020
+ const [isAutoSelect, setIsAutoSelect] = useState2(false);
12021
+ return /* @__PURE__ */ jsx42("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ jsx42(
12022
+ TableBodyRow,
12023
+ {
12024
+ ...props,
12025
+ isAutoSelect,
12026
+ setIsAutoSelect
12027
+ }
12028
+ ) });
12015
12029
  };
12016
12030
 
12017
12031
  // src/widgets/advanced/table/table-filter.tsx
@@ -14437,7 +14451,7 @@ var PopupFilter = ({
14437
14451
  right: 0,
14438
14452
  zIndex: 33
14439
14453
  },
14440
- className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white border-none shadow-xl",
14454
+ className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
14441
14455
  children: /* @__PURE__ */ jsxs35(
14442
14456
  "div",
14443
14457
  {
@@ -14797,64 +14811,59 @@ var Search = ({
14797
14811
  "div",
14798
14812
  {
14799
14813
  ref: popupFilterRef,
14800
- className: `search ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative items-center w-full min-w-[70%] flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] bg-grey-100 shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[#F2F2F2]`,
14814
+ className: `search gap-[8px] p-2 items-center ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} !order-3 xl:!order-2 bg-white custom-search-input relative flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[var(--stroke-default)]`,
14801
14815
  children: [
14802
- /* @__PURE__ */ jsxs38(
14803
- "div",
14804
- {
14805
- className: `relative flex md:min-w-[400px] max-w-full items-center gap-[8px] p-1 !pl-4 w-full ${(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && "border-r border-[rgba(242,242,242,1)]"}`,
14806
- children: [
14807
- /* @__PURE__ */ jsx57("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ jsx57(SearchIcon, {}) }),
14808
- /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
14809
- /* @__PURE__ */ jsx57(
14810
- TagSearch,
14811
- {
14812
- removeSearchItems,
14813
- selectedTags,
14814
- filterBy,
14815
- setFilterBy
14816
- }
14817
- ),
14818
- /* @__PURE__ */ jsx57(
14819
- "input",
14820
- {
14821
- value: searchString,
14822
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
14823
- placeholder: instance.t("search..."),
14824
- onChange: (e3) => {
14825
- onSearchString(e3.target.value);
14826
- setShowPopupFilter(false);
14827
- },
14828
- onKeyUp: (e3) => e3.preventDefault()
14829
- }
14830
- ),
14831
- /* @__PURE__ */ jsx57(
14832
- SearchList,
14833
- {
14834
- handleAddTagSearch,
14835
- searchBy,
14836
- searchString
14837
- }
14838
- )
14839
- ] })
14840
- ]
14841
- }
14842
- ),
14843
- (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ jsxs38(Fragment9, { children: [
14816
+ /* @__PURE__ */ jsx57("div", { className: "size-5", children: /* @__PURE__ */ jsx57(SearchIcon, {}) }),
14817
+ /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
14844
14818
  /* @__PURE__ */ jsx57(
14819
+ TagSearch,
14820
+ {
14821
+ removeSearchItems,
14822
+ selectedTags,
14823
+ filterBy,
14824
+ setFilterBy
14825
+ }
14826
+ ),
14827
+ /* @__PURE__ */ jsx57(
14828
+ "input",
14829
+ {
14830
+ value: searchString,
14831
+ className: "h-5 w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
14832
+ placeholder: instance.t("search..."),
14833
+ onChange: (e3) => {
14834
+ onSearchString(e3.target.value);
14835
+ setShowPopupFilter(false);
14836
+ },
14837
+ onKeyUp: (e3) => e3.preventDefault()
14838
+ }
14839
+ ),
14840
+ /* @__PURE__ */ jsx57(
14841
+ SearchList,
14842
+ {
14843
+ handleAddTagSearch,
14844
+ searchBy,
14845
+ searchString
14846
+ }
14847
+ )
14848
+ ] }),
14849
+ (showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ jsxs38(Fragment9, { children: [
14850
+ /* @__PURE__ */ jsxs38(
14845
14851
  "div",
14846
14852
  {
14847
- className: `flex h-full cursor-pointer items-center justify-center px-[10px] max-w-fit`,
14853
+ className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
14848
14854
  onClick: (e3) => {
14849
14855
  e3.stopPropagation();
14850
14856
  setShowPopupFilter((prev2) => !prev2);
14851
14857
  },
14852
- children: /* @__PURE__ */ jsx57("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ jsx57(
14853
- ChevronBottomIcon,
14854
- {
14855
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
14856
- }
14857
- ) })
14858
+ children: [
14859
+ /* @__PURE__ */ jsx57("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
14860
+ /* @__PURE__ */ jsx57(
14861
+ ChevronBottomIcon,
14862
+ {
14863
+ className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
14864
+ }
14865
+ )
14866
+ ]
14858
14867
  }
14859
14868
  ),
14860
14869
  showPopupFilter && /* @__PURE__ */ jsx57(
@@ -17809,12 +17818,12 @@ var CheckboxField = (props) => {
17809
17818
  {
17810
17819
  name: name2 ?? "",
17811
17820
  control: methods?.control,
17812
- render: ({ field }) => /* @__PURE__ */ jsx72("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx72(
17813
- "input",
17821
+ render: ({ field }) => /* @__PURE__ */ jsx72(
17822
+ "div",
17814
17823
  {
17815
- ...field,
17816
- onChange: (e3) => {
17817
- const checked = e3.target.checked;
17824
+ className: "flex items-center gap-2",
17825
+ onClick: () => {
17826
+ const checked = !field.value;
17818
17827
  if (!isEditTable && readonly) return;
17819
17828
  methods.setValue(name2, checked, { shouldDirty: true });
17820
17829
  field.onChange(checked);
@@ -17822,13 +17831,28 @@ var CheckboxField = (props) => {
17822
17831
  onChange2(name2 ?? "", checked);
17823
17832
  }
17824
17833
  },
17825
- type: "checkbox",
17826
- disabled: readonly,
17827
- required: !invisible && required,
17828
- className: "custom-checkbox",
17829
- checked: field.value ?? false
17834
+ children: /* @__PURE__ */ jsx72(
17835
+ "input",
17836
+ {
17837
+ ...field,
17838
+ onChange: (e3) => {
17839
+ const checked = e3.target.checked;
17840
+ if (!isEditTable && readonly) return;
17841
+ methods.setValue(name2, checked, { shouldDirty: true });
17842
+ field.onChange(checked);
17843
+ if (onChange2) {
17844
+ onChange2(name2 ?? "", checked);
17845
+ }
17846
+ },
17847
+ type: "checkbox",
17848
+ disabled: readonly,
17849
+ required: !invisible && required,
17850
+ className: "custom-checkbox",
17851
+ checked: field.value ?? false
17852
+ }
17853
+ )
17830
17854
  }
17831
- ) })
17855
+ )
17832
17856
  }
17833
17857
  );
17834
17858
  };
@@ -33685,7 +33709,7 @@ var Many2ManyField = (props) => {
33685
33709
  !isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ jsx102("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx102("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx102(
33686
33710
  "div",
33687
33711
  {
33688
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33712
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33689
33713
  children: /* @__PURE__ */ jsx102("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx102("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx102(
33690
33714
  "div",
33691
33715
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",