@fctc/sme-widget-ui 1.1.4 → 1.1.6

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
@@ -14868,7 +14868,7 @@ var PopupFilter = ({
14868
14868
  right: 0,
14869
14869
  zIndex: 33
14870
14870
  },
14871
- 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",
14872
14872
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
14873
14873
  "div",
14874
14874
  {
@@ -15228,64 +15228,59 @@ var Search = ({
15228
15228
  "div",
15229
15229
  {
15230
15230
  ref: popupFilterRef,
15231
- 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)]`,
15232
15232
  children: [
15233
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
15234
- "div",
15235
- {
15236
- 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)]"}`,
15237
- children: [
15238
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchIcon, {}) }),
15239
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
15240
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15241
- TagSearch,
15242
- {
15243
- removeSearchItems,
15244
- selectedTags,
15245
- filterBy,
15246
- setFilterBy
15247
- }
15248
- ),
15249
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15250
- "input",
15251
- {
15252
- value: searchString,
15253
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
15254
- placeholder: instance.t("search..."),
15255
- onChange: (e3) => {
15256
- onSearchString(e3.target.value);
15257
- setShowPopupFilter(false);
15258
- },
15259
- onKeyUp: (e3) => e3.preventDefault()
15260
- }
15261
- ),
15262
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15263
- SearchList,
15264
- {
15265
- handleAddTagSearch,
15266
- searchBy,
15267
- searchString
15268
- }
15269
- )
15270
- ] })
15271
- ]
15272
- }
15273
- ),
15274
- (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: [
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
+ ),
15275
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)(
15276
15268
  "div",
15277
15269
  {
15278
- 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`,
15279
15271
  onClick: (e3) => {
15280
15272
  e3.stopPropagation();
15281
15273
  setShowPopupFilter((prev2) => !prev2);
15282
15274
  },
15283
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
15284
- ChevronBottomIcon,
15285
- {
15286
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
15287
- }
15288
- ) })
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
+ ]
15289
15284
  }
15290
15285
  ),
15291
15286
  showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
@@ -18240,12 +18235,12 @@ var CheckboxField = (props) => {
18240
18235
  {
18241
18236
  name: name2 ?? "",
18242
18237
  control: methods?.control,
18243
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
18244
- "input",
18238
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
18239
+ "div",
18245
18240
  {
18246
- ...field,
18247
- onChange: (e3) => {
18248
- const checked = e3.target.checked;
18241
+ className: "flex items-center gap-2",
18242
+ onClick: () => {
18243
+ const checked = !field.value;
18249
18244
  if (!isEditTable && readonly) return;
18250
18245
  methods.setValue(name2, checked, { shouldDirty: true });
18251
18246
  field.onChange(checked);
@@ -18253,13 +18248,28 @@ var CheckboxField = (props) => {
18253
18248
  onChange2(name2 ?? "", checked);
18254
18249
  }
18255
18250
  },
18256
- type: "checkbox",
18257
- disabled: readonly,
18258
- required: !invisible && required,
18259
- className: "custom-checkbox",
18260
- 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
+ )
18261
18271
  }
18262
- ) })
18272
+ )
18263
18273
  }
18264
18274
  );
18265
18275
  };
@@ -32715,9 +32725,11 @@ var FloatField = (props) => {
32715
32725
  isForm,
32716
32726
  string,
32717
32727
  defaultValue,
32728
+ isEditTable,
32718
32729
  onChange: handleOnchange
32719
32730
  } = props;
32720
- if (!isForm) {
32731
+ const { t: t3 } = useI18n();
32732
+ if (!isForm && !isEditTable) {
32721
32733
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
32722
32734
  }
32723
32735
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
@@ -32726,8 +32738,8 @@ var FloatField = (props) => {
32726
32738
  name: name2 ?? "",
32727
32739
  control: methods.control,
32728
32740
  rules: {
32729
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
32730
- validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || i18n_default.t("invalid_number")
32741
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
32742
+ validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || t3("invalid_number")
32731
32743
  },
32732
32744
  render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
32733
32745
  const { setError, clearErrors } = methods;
@@ -32763,7 +32775,7 @@ var FloatField = (props) => {
32763
32775
  if (parsedValue < 0) {
32764
32776
  setError(name2, {
32765
32777
  type: "validate",
32766
- message: i18n_default.t("invalid_number")
32778
+ message: t3("invalid_number")
32767
32779
  });
32768
32780
  } else {
32769
32781
  onChange2(parsedValue);
@@ -32777,17 +32789,13 @@ var FloatField = (props) => {
32777
32789
  }
32778
32790
  };
32779
32791
  const handleInputMouseLeave = () => {
32780
- if (!isDirtyRef.current) {
32781
- inputRef.current?.blur();
32782
- return;
32783
- }
32784
32792
  const rawValue = inputValue.replace(/,/g, "");
32785
32793
  const parsedValue = parseFloat(rawValue);
32786
32794
  if (rawValue === "" || rawValue === ".") {
32787
32795
  if (required) {
32788
32796
  setError(name2, {
32789
32797
  type: "required",
32790
- message: `${string} ${instance.t("must_required")}`
32798
+ message: `${string} ${t3("must_required")}`
32791
32799
  });
32792
32800
  }
32793
32801
  onChange2(null);
@@ -32797,7 +32805,7 @@ var FloatField = (props) => {
32797
32805
  if (parsedValue < 0) {
32798
32806
  setError(name2, {
32799
32807
  type: "validate",
32800
- message: i18n_default.t("invalid_number")
32808
+ message: t3("invalid_number")
32801
32809
  });
32802
32810
  setInputValue("");
32803
32811
  lastCommittedValueRef.current = null;
@@ -32818,13 +32826,12 @@ var FloatField = (props) => {
32818
32826
  } else {
32819
32827
  setError(name2, {
32820
32828
  type: "validate",
32821
- message: i18n_default.t("invalid_number")
32829
+ message: t3("invalid_number")
32822
32830
  });
32823
32831
  setInputValue("");
32824
32832
  lastCommittedValueRef.current = null;
32825
32833
  }
32826
32834
  isDirtyRef.current = false;
32827
- inputRef.current?.blur();
32828
32835
  };
32829
32836
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
32830
32837
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
@@ -32840,17 +32847,22 @@ var FloatField = (props) => {
32840
32847
  placeholder,
32841
32848
  required: !invisible && required,
32842
32849
  style: invisible ? { display: "none" } : {},
32843
- className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none focus:border-[1px] focus:border-primary outline-0 bg-white border border-[rgba(66,66,66,0.12)] rounded-lg p-3 text-sm font-normal gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content
32844
- ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer text-[#AEAEAE]"}
32850
+ className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none outline-0 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
32851
+ ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer border-[#f7f7f7] text-[#525866]"}
32852
+ ${!isEditTable ? "bg-[#f7f7f7] borer-input-primary rounded-[10px] px-3" : "border-b-primary bg-transparent "}
32853
+ ${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
32845
32854
  `
32846
32855
  }
32847
32856
  ),
32848
- error2 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32857
+ error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32849
32858
  ] });
32850
32859
  }
32851
32860
  }
32852
32861
  );
32853
32862
  };
32863
+ function useI18n() {
32864
+ throw new Error("Function not implemented.");
32865
+ }
32854
32866
 
32855
32867
  // src/widgets/basic/float-time-field/float-time.tsx
32856
32868
  var import_react56 = require("react");
@@ -34116,7 +34128,7 @@ var Many2ManyField = (props) => {
34116
34128
  !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)(
34117
34129
  "div",
34118
34130
  {
34119
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34131
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34120
34132
  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)(
34121
34133
  "div",
34122
34134
  {
package/dist/index.mjs CHANGED
@@ -14749,7 +14749,7 @@ var PopupFilter = ({
14749
14749
  right: 0,
14750
14750
  zIndex: 33
14751
14751
  },
14752
- 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",
14753
14753
  children: /* @__PURE__ */ jsxs35(
14754
14754
  "div",
14755
14755
  {
@@ -15109,64 +15109,59 @@ var Search = ({
15109
15109
  "div",
15110
15110
  {
15111
15111
  ref: popupFilterRef,
15112
- 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)]`,
15113
15113
  children: [
15114
- /* @__PURE__ */ jsxs38(
15115
- "div",
15116
- {
15117
- 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)]"}`,
15118
- children: [
15119
- /* @__PURE__ */ jsx57("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ jsx57(SearchIcon, {}) }),
15120
- /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
15121
- /* @__PURE__ */ jsx57(
15122
- TagSearch,
15123
- {
15124
- removeSearchItems,
15125
- selectedTags,
15126
- filterBy,
15127
- setFilterBy
15128
- }
15129
- ),
15130
- /* @__PURE__ */ jsx57(
15131
- "input",
15132
- {
15133
- value: searchString,
15134
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
15135
- placeholder: instance.t("search..."),
15136
- onChange: (e3) => {
15137
- onSearchString(e3.target.value);
15138
- setShowPopupFilter(false);
15139
- },
15140
- onKeyUp: (e3) => e3.preventDefault()
15141
- }
15142
- ),
15143
- /* @__PURE__ */ jsx57(
15144
- SearchList,
15145
- {
15146
- handleAddTagSearch,
15147
- searchBy,
15148
- searchString
15149
- }
15150
- )
15151
- ] })
15152
- ]
15153
- }
15154
- ),
15155
- (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: [
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
+ ),
15156
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(
15157
15149
  "div",
15158
15150
  {
15159
- 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`,
15160
15152
  onClick: (e3) => {
15161
15153
  e3.stopPropagation();
15162
15154
  setShowPopupFilter((prev2) => !prev2);
15163
15155
  },
15164
- children: /* @__PURE__ */ jsx57("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ jsx57(
15165
- ChevronBottomIcon,
15166
- {
15167
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
15168
- }
15169
- ) })
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
+ ]
15170
15165
  }
15171
15166
  ),
15172
15167
  showPopupFilter && /* @__PURE__ */ jsx57(
@@ -18121,12 +18116,12 @@ var CheckboxField = (props) => {
18121
18116
  {
18122
18117
  name: name2 ?? "",
18123
18118
  control: methods?.control,
18124
- render: ({ field }) => /* @__PURE__ */ jsx72("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx72(
18125
- "input",
18119
+ render: ({ field }) => /* @__PURE__ */ jsx72(
18120
+ "div",
18126
18121
  {
18127
- ...field,
18128
- onChange: (e3) => {
18129
- const checked = e3.target.checked;
18122
+ className: "flex items-center gap-2",
18123
+ onClick: () => {
18124
+ const checked = !field.value;
18130
18125
  if (!isEditTable && readonly) return;
18131
18126
  methods.setValue(name2, checked, { shouldDirty: true });
18132
18127
  field.onChange(checked);
@@ -18134,13 +18129,28 @@ var CheckboxField = (props) => {
18134
18129
  onChange2(name2 ?? "", checked);
18135
18130
  }
18136
18131
  },
18137
- type: "checkbox",
18138
- disabled: readonly,
18139
- required: !invisible && required,
18140
- className: "custom-checkbox",
18141
- 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
+ )
18142
18152
  }
18143
- ) })
18153
+ )
18144
18154
  }
18145
18155
  );
18146
18156
  };
@@ -32596,9 +32606,11 @@ var FloatField = (props) => {
32596
32606
  isForm,
32597
32607
  string,
32598
32608
  defaultValue,
32609
+ isEditTable,
32599
32610
  onChange: handleOnchange
32600
32611
  } = props;
32601
- if (!isForm) {
32612
+ const { t: t3 } = useI18n();
32613
+ if (!isForm && !isEditTable) {
32602
32614
  return /* @__PURE__ */ jsx85("span", { children: formatFloatNumber(propValue ?? defaultValue) });
32603
32615
  }
32604
32616
  return /* @__PURE__ */ jsx85(
@@ -32607,8 +32619,8 @@ var FloatField = (props) => {
32607
32619
  name: name2 ?? "",
32608
32620
  control: methods.control,
32609
32621
  rules: {
32610
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
32611
- validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || i18n_default.t("invalid_number")
32622
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
32623
+ validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || t3("invalid_number")
32612
32624
  },
32613
32625
  render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
32614
32626
  const { setError, clearErrors } = methods;
@@ -32644,7 +32656,7 @@ var FloatField = (props) => {
32644
32656
  if (parsedValue < 0) {
32645
32657
  setError(name2, {
32646
32658
  type: "validate",
32647
- message: i18n_default.t("invalid_number")
32659
+ message: t3("invalid_number")
32648
32660
  });
32649
32661
  } else {
32650
32662
  onChange2(parsedValue);
@@ -32658,17 +32670,13 @@ var FloatField = (props) => {
32658
32670
  }
32659
32671
  };
32660
32672
  const handleInputMouseLeave = () => {
32661
- if (!isDirtyRef.current) {
32662
- inputRef.current?.blur();
32663
- return;
32664
- }
32665
32673
  const rawValue = inputValue.replace(/,/g, "");
32666
32674
  const parsedValue = parseFloat(rawValue);
32667
32675
  if (rawValue === "" || rawValue === ".") {
32668
32676
  if (required) {
32669
32677
  setError(name2, {
32670
32678
  type: "required",
32671
- message: `${string} ${instance.t("must_required")}`
32679
+ message: `${string} ${t3("must_required")}`
32672
32680
  });
32673
32681
  }
32674
32682
  onChange2(null);
@@ -32678,7 +32686,7 @@ var FloatField = (props) => {
32678
32686
  if (parsedValue < 0) {
32679
32687
  setError(name2, {
32680
32688
  type: "validate",
32681
- message: i18n_default.t("invalid_number")
32689
+ message: t3("invalid_number")
32682
32690
  });
32683
32691
  setInputValue("");
32684
32692
  lastCommittedValueRef.current = null;
@@ -32699,13 +32707,12 @@ var FloatField = (props) => {
32699
32707
  } else {
32700
32708
  setError(name2, {
32701
32709
  type: "validate",
32702
- message: i18n_default.t("invalid_number")
32710
+ message: t3("invalid_number")
32703
32711
  });
32704
32712
  setInputValue("");
32705
32713
  lastCommittedValueRef.current = null;
32706
32714
  }
32707
32715
  isDirtyRef.current = false;
32708
- inputRef.current?.blur();
32709
32716
  };
32710
32717
  return /* @__PURE__ */ jsxs59(Fragment24, { children: [
32711
32718
  /* @__PURE__ */ jsx85(
@@ -32721,17 +32728,22 @@ var FloatField = (props) => {
32721
32728
  placeholder,
32722
32729
  required: !invisible && required,
32723
32730
  style: invisible ? { display: "none" } : {},
32724
- className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none focus:border-[1px] focus:border-primary outline-0 bg-white border border-[rgba(66,66,66,0.12)] rounded-lg p-3 text-sm font-normal gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content
32725
- ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer text-[#AEAEAE]"}
32731
+ className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none outline-0 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
32732
+ ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer border-[#f7f7f7] text-[#525866]"}
32733
+ ${!isEditTable ? "bg-[#f7f7f7] borer-input-primary rounded-[10px] px-3" : "border-b-primary bg-transparent "}
32734
+ ${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
32726
32735
  `
32727
32736
  }
32728
32737
  ),
32729
- error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32738
+ error2 && !isEditTable && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32730
32739
  ] });
32731
32740
  }
32732
32741
  }
32733
32742
  );
32734
32743
  };
32744
+ function useI18n() {
32745
+ throw new Error("Function not implemented.");
32746
+ }
32735
32747
 
32736
32748
  // src/widgets/basic/float-time-field/float-time.tsx
32737
32749
  import { useState as useState18 } from "react";
@@ -33997,7 +34009,7 @@ var Many2ManyField = (props) => {
33997
34009
  !isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ jsx102("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx102("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx102(
33998
34010
  "div",
33999
34011
  {
34000
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34012
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
34001
34013
  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(
34002
34014
  "div",
34003
34015
  {
package/dist/widgets.js CHANGED
@@ -14513,7 +14513,7 @@ var PopupFilter = ({
14513
14513
  right: 0,
14514
14514
  zIndex: 33
14515
14515
  },
14516
- 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",
14517
14517
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
14518
14518
  "div",
14519
14519
  {
@@ -14873,64 +14873,59 @@ var Search = ({
14873
14873
  "div",
14874
14874
  {
14875
14875
  ref: popupFilterRef,
14876
- 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)]`,
14877
14877
  children: [
14878
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
14879
- "div",
14880
- {
14881
- 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)]"}`,
14882
- children: [
14883
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SearchIcon, {}) }),
14884
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
14885
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14886
- TagSearch,
14887
- {
14888
- removeSearchItems,
14889
- selectedTags,
14890
- filterBy,
14891
- setFilterBy
14892
- }
14893
- ),
14894
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14895
- "input",
14896
- {
14897
- value: searchString,
14898
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
14899
- placeholder: instance.t("search..."),
14900
- onChange: (e3) => {
14901
- onSearchString(e3.target.value);
14902
- setShowPopupFilter(false);
14903
- },
14904
- onKeyUp: (e3) => e3.preventDefault()
14905
- }
14906
- ),
14907
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14908
- SearchList,
14909
- {
14910
- handleAddTagSearch,
14911
- searchBy,
14912
- searchString
14913
- }
14914
- )
14915
- ] })
14916
- ]
14917
- }
14918
- ),
14919
- (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: [
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
+ ),
14920
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)(
14921
14913
  "div",
14922
14914
  {
14923
- 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`,
14924
14916
  onClick: (e3) => {
14925
14917
  e3.stopPropagation();
14926
14918
  setShowPopupFilter((prev2) => !prev2);
14927
14919
  },
14928
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
14929
- ChevronBottomIcon,
14930
- {
14931
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
14932
- }
14933
- ) })
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
+ ]
14934
14929
  }
14935
14930
  ),
14936
14931
  showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
@@ -17885,12 +17880,12 @@ var CheckboxField = (props) => {
17885
17880
  {
17886
17881
  name: name2 ?? "",
17887
17882
  control: methods?.control,
17888
- render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
17889
- "input",
17883
+ render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
17884
+ "div",
17890
17885
  {
17891
- ...field,
17892
- onChange: (e3) => {
17893
- const checked = e3.target.checked;
17886
+ className: "flex items-center gap-2",
17887
+ onClick: () => {
17888
+ const checked = !field.value;
17894
17889
  if (!isEditTable && readonly) return;
17895
17890
  methods.setValue(name2, checked, { shouldDirty: true });
17896
17891
  field.onChange(checked);
@@ -17898,13 +17893,28 @@ var CheckboxField = (props) => {
17898
17893
  onChange2(name2 ?? "", checked);
17899
17894
  }
17900
17895
  },
17901
- type: "checkbox",
17902
- disabled: readonly,
17903
- required: !invisible && required,
17904
- className: "custom-checkbox",
17905
- 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
+ )
17906
17916
  }
17907
- ) })
17917
+ )
17908
17918
  }
17909
17919
  );
17910
17920
  };
@@ -32360,9 +32370,11 @@ var FloatField = (props) => {
32360
32370
  isForm,
32361
32371
  string,
32362
32372
  defaultValue,
32373
+ isEditTable,
32363
32374
  onChange: handleOnchange
32364
32375
  } = props;
32365
- if (!isForm) {
32376
+ const { t: t3 } = useI18n();
32377
+ if (!isForm && !isEditTable) {
32366
32378
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
32367
32379
  }
32368
32380
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
@@ -32371,8 +32383,8 @@ var FloatField = (props) => {
32371
32383
  name: name2 ?? "",
32372
32384
  control: methods.control,
32373
32385
  rules: {
32374
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
32375
- validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || i18n_default.t("invalid_number")
32386
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
32387
+ validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || t3("invalid_number")
32376
32388
  },
32377
32389
  render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
32378
32390
  const { setError, clearErrors } = methods;
@@ -32408,7 +32420,7 @@ var FloatField = (props) => {
32408
32420
  if (parsedValue < 0) {
32409
32421
  setError(name2, {
32410
32422
  type: "validate",
32411
- message: i18n_default.t("invalid_number")
32423
+ message: t3("invalid_number")
32412
32424
  });
32413
32425
  } else {
32414
32426
  onChange2(parsedValue);
@@ -32422,17 +32434,13 @@ var FloatField = (props) => {
32422
32434
  }
32423
32435
  };
32424
32436
  const handleInputMouseLeave = () => {
32425
- if (!isDirtyRef.current) {
32426
- inputRef.current?.blur();
32427
- return;
32428
- }
32429
32437
  const rawValue = inputValue.replace(/,/g, "");
32430
32438
  const parsedValue = parseFloat(rawValue);
32431
32439
  if (rawValue === "" || rawValue === ".") {
32432
32440
  if (required) {
32433
32441
  setError(name2, {
32434
32442
  type: "required",
32435
- message: `${string} ${instance.t("must_required")}`
32443
+ message: `${string} ${t3("must_required")}`
32436
32444
  });
32437
32445
  }
32438
32446
  onChange2(null);
@@ -32442,7 +32450,7 @@ var FloatField = (props) => {
32442
32450
  if (parsedValue < 0) {
32443
32451
  setError(name2, {
32444
32452
  type: "validate",
32445
- message: i18n_default.t("invalid_number")
32453
+ message: t3("invalid_number")
32446
32454
  });
32447
32455
  setInputValue("");
32448
32456
  lastCommittedValueRef.current = null;
@@ -32463,13 +32471,12 @@ var FloatField = (props) => {
32463
32471
  } else {
32464
32472
  setError(name2, {
32465
32473
  type: "validate",
32466
- message: i18n_default.t("invalid_number")
32474
+ message: t3("invalid_number")
32467
32475
  });
32468
32476
  setInputValue("");
32469
32477
  lastCommittedValueRef.current = null;
32470
32478
  }
32471
32479
  isDirtyRef.current = false;
32472
- inputRef.current?.blur();
32473
32480
  };
32474
32481
  return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
32475
32482
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
@@ -32485,17 +32492,22 @@ var FloatField = (props) => {
32485
32492
  placeholder,
32486
32493
  required: !invisible && required,
32487
32494
  style: invisible ? { display: "none" } : {},
32488
- className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none focus:border-[1px] focus:border-primary outline-0 bg-white border border-[rgba(66,66,66,0.12)] rounded-lg p-3 text-sm font-normal gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content
32489
- ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer text-[#AEAEAE]"}
32495
+ className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none outline-0 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
32496
+ ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer border-[#f7f7f7] text-[#525866]"}
32497
+ ${!isEditTable ? "bg-[#f7f7f7] borer-input-primary rounded-[10px] px-3" : "border-b-primary bg-transparent "}
32498
+ ${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
32490
32499
  `
32491
32500
  }
32492
32501
  ),
32493
- error2 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32502
+ error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32494
32503
  ] });
32495
32504
  }
32496
32505
  }
32497
32506
  );
32498
32507
  };
32508
+ function useI18n() {
32509
+ throw new Error("Function not implemented.");
32510
+ }
32499
32511
 
32500
32512
  // src/widgets/basic/float-time-field/float-time.tsx
32501
32513
  var import_react56 = require("react");
@@ -33761,7 +33773,7 @@ var Many2ManyField = (props) => {
33761
33773
  !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)(
33762
33774
  "div",
33763
33775
  {
33764
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33776
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33765
33777
  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)(
33766
33778
  "div",
33767
33779
  {
package/dist/widgets.mjs CHANGED
@@ -14451,7 +14451,7 @@ var PopupFilter = ({
14451
14451
  right: 0,
14452
14452
  zIndex: 33
14453
14453
  },
14454
- 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",
14455
14455
  children: /* @__PURE__ */ jsxs35(
14456
14456
  "div",
14457
14457
  {
@@ -14811,64 +14811,59 @@ var Search = ({
14811
14811
  "div",
14812
14812
  {
14813
14813
  ref: popupFilterRef,
14814
- 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)]`,
14815
14815
  children: [
14816
- /* @__PURE__ */ jsxs38(
14817
- "div",
14818
- {
14819
- 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)]"}`,
14820
- children: [
14821
- /* @__PURE__ */ jsx57("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ jsx57(SearchIcon, {}) }),
14822
- /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
14823
- /* @__PURE__ */ jsx57(
14824
- TagSearch,
14825
- {
14826
- removeSearchItems,
14827
- selectedTags,
14828
- filterBy,
14829
- setFilterBy
14830
- }
14831
- ),
14832
- /* @__PURE__ */ jsx57(
14833
- "input",
14834
- {
14835
- value: searchString,
14836
- className: "min-h-[44px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
14837
- placeholder: instance.t("search..."),
14838
- onChange: (e3) => {
14839
- onSearchString(e3.target.value);
14840
- setShowPopupFilter(false);
14841
- },
14842
- onKeyUp: (e3) => e3.preventDefault()
14843
- }
14844
- ),
14845
- /* @__PURE__ */ jsx57(
14846
- SearchList,
14847
- {
14848
- handleAddTagSearch,
14849
- searchBy,
14850
- searchString
14851
- }
14852
- )
14853
- ] })
14854
- ]
14855
- }
14856
- ),
14857
- (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: [
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
+ ),
14858
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(
14859
14851
  "div",
14860
14852
  {
14861
- 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`,
14862
14854
  onClick: (e3) => {
14863
14855
  e3.stopPropagation();
14864
14856
  setShowPopupFilter((prev2) => !prev2);
14865
14857
  },
14866
- children: /* @__PURE__ */ jsx57("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ jsx57(
14867
- ChevronBottomIcon,
14868
- {
14869
- className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
14870
- }
14871
- ) })
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
+ ]
14872
14867
  }
14873
14868
  ),
14874
14869
  showPopupFilter && /* @__PURE__ */ jsx57(
@@ -17823,12 +17818,12 @@ var CheckboxField = (props) => {
17823
17818
  {
17824
17819
  name: name2 ?? "",
17825
17820
  control: methods?.control,
17826
- render: ({ field }) => /* @__PURE__ */ jsx72("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx72(
17827
- "input",
17821
+ render: ({ field }) => /* @__PURE__ */ jsx72(
17822
+ "div",
17828
17823
  {
17829
- ...field,
17830
- onChange: (e3) => {
17831
- const checked = e3.target.checked;
17824
+ className: "flex items-center gap-2",
17825
+ onClick: () => {
17826
+ const checked = !field.value;
17832
17827
  if (!isEditTable && readonly) return;
17833
17828
  methods.setValue(name2, checked, { shouldDirty: true });
17834
17829
  field.onChange(checked);
@@ -17836,13 +17831,28 @@ var CheckboxField = (props) => {
17836
17831
  onChange2(name2 ?? "", checked);
17837
17832
  }
17838
17833
  },
17839
- type: "checkbox",
17840
- disabled: readonly,
17841
- required: !invisible && required,
17842
- className: "custom-checkbox",
17843
- 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
+ )
17844
17854
  }
17845
- ) })
17855
+ )
17846
17856
  }
17847
17857
  );
17848
17858
  };
@@ -32298,9 +32308,11 @@ var FloatField = (props) => {
32298
32308
  isForm,
32299
32309
  string,
32300
32310
  defaultValue,
32311
+ isEditTable,
32301
32312
  onChange: handleOnchange
32302
32313
  } = props;
32303
- if (!isForm) {
32314
+ const { t: t3 } = useI18n();
32315
+ if (!isForm && !isEditTable) {
32304
32316
  return /* @__PURE__ */ jsx85("span", { children: formatFloatNumber(propValue ?? defaultValue) });
32305
32317
  }
32306
32318
  return /* @__PURE__ */ jsx85(
@@ -32309,8 +32321,8 @@ var FloatField = (props) => {
32309
32321
  name: name2 ?? "",
32310
32322
  control: methods.control,
32311
32323
  rules: {
32312
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
32313
- validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || i18n_default.t("invalid_number")
32324
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
32325
+ validate: (val) => val === void 0 || val === null || val === "" || !isNaN(parseFloat(String(val).replace(",", "."))) || t3("invalid_number")
32314
32326
  },
32315
32327
  render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
32316
32328
  const { setError, clearErrors } = methods;
@@ -32346,7 +32358,7 @@ var FloatField = (props) => {
32346
32358
  if (parsedValue < 0) {
32347
32359
  setError(name2, {
32348
32360
  type: "validate",
32349
- message: i18n_default.t("invalid_number")
32361
+ message: t3("invalid_number")
32350
32362
  });
32351
32363
  } else {
32352
32364
  onChange2(parsedValue);
@@ -32360,17 +32372,13 @@ var FloatField = (props) => {
32360
32372
  }
32361
32373
  };
32362
32374
  const handleInputMouseLeave = () => {
32363
- if (!isDirtyRef.current) {
32364
- inputRef.current?.blur();
32365
- return;
32366
- }
32367
32375
  const rawValue = inputValue.replace(/,/g, "");
32368
32376
  const parsedValue = parseFloat(rawValue);
32369
32377
  if (rawValue === "" || rawValue === ".") {
32370
32378
  if (required) {
32371
32379
  setError(name2, {
32372
32380
  type: "required",
32373
- message: `${string} ${instance.t("must_required")}`
32381
+ message: `${string} ${t3("must_required")}`
32374
32382
  });
32375
32383
  }
32376
32384
  onChange2(null);
@@ -32380,7 +32388,7 @@ var FloatField = (props) => {
32380
32388
  if (parsedValue < 0) {
32381
32389
  setError(name2, {
32382
32390
  type: "validate",
32383
- message: i18n_default.t("invalid_number")
32391
+ message: t3("invalid_number")
32384
32392
  });
32385
32393
  setInputValue("");
32386
32394
  lastCommittedValueRef.current = null;
@@ -32401,13 +32409,12 @@ var FloatField = (props) => {
32401
32409
  } else {
32402
32410
  setError(name2, {
32403
32411
  type: "validate",
32404
- message: i18n_default.t("invalid_number")
32412
+ message: t3("invalid_number")
32405
32413
  });
32406
32414
  setInputValue("");
32407
32415
  lastCommittedValueRef.current = null;
32408
32416
  }
32409
32417
  isDirtyRef.current = false;
32410
- inputRef.current?.blur();
32411
32418
  };
32412
32419
  return /* @__PURE__ */ jsxs59(Fragment24, { children: [
32413
32420
  /* @__PURE__ */ jsx85(
@@ -32423,17 +32430,22 @@ var FloatField = (props) => {
32423
32430
  placeholder,
32424
32431
  required: !invisible && required,
32425
32432
  style: invisible ? { display: "none" } : {},
32426
- className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none focus:border-[1px] focus:border-primary outline-0 bg-white border border-[rgba(66,66,66,0.12)] rounded-lg p-3 text-sm font-normal gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content
32427
- ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer text-[#AEAEAE]"}
32433
+ className: `w-full min-h-[44px] ring-0 focus:ring-0 focus:!outline-none outline-0 py-[12px] text-sm font-normal gap-2 opacity-100 leading-[1.5] resize-none overflow-hidden
32434
+ ${readonly ? "!cursor-not-allowed border-transparent text-[#5c5a5a]" : "!cursor-pointer border-[#f7f7f7] text-[#525866]"}
32435
+ ${!isEditTable ? "bg-[#f7f7f7] borer-input-primary rounded-[10px] px-3" : "border-b-primary bg-transparent "}
32436
+ ${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}
32428
32437
  `
32429
32438
  }
32430
32439
  ),
32431
- error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32440
+ error2 && !isEditTable && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
32432
32441
  ] });
32433
32442
  }
32434
32443
  }
32435
32444
  );
32436
32445
  };
32446
+ function useI18n() {
32447
+ throw new Error("Function not implemented.");
32448
+ }
32437
32449
 
32438
32450
  // src/widgets/basic/float-time-field/float-time.tsx
32439
32451
  import { useState as useState18 } from "react";
@@ -33699,7 +33711,7 @@ var Many2ManyField = (props) => {
33699
33711
  !isDataLoading && isDataFetched || isPlaceholderData ? /* @__PURE__ */ jsx102("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx102("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx102(
33700
33712
  "div",
33701
33713
  {
33702
- className: `border-[1px] h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33714
+ className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
33703
33715
  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(
33704
33716
  "div",
33705
33717
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
package/dist/.babelrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "presets": [
3
- "@babel/preset-env",
4
- "@babel/preset-react",
5
- "@babel/preset-typescript"
6
- ]
7
- }
@@ -1,10 +0,0 @@
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
@@ -1,6 +0,0 @@
1
- dist
2
- .cache
3
- package-lock.json
4
- public
5
- node_modules
6
- yarn.lock
@@ -1,66 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- /.yarn/** linguist-vendored
2
- /.yarn/releases/* binary
3
- /.yarn/plugins/**/* binary
4
- /.pnp.* binary linguist-generated
package/dist/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "semi": false
4
- }