@fctc/sme-widget-ui 2.6.0 → 2.6.2

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
@@ -11024,7 +11024,7 @@ var Row = (props) => {
11024
11024
  `${col.name}____${index4}`
11025
11025
  );
11026
11026
  }),
11027
- typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11027
+ typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: "relative p-2 w-[35px] td-remove", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11028
11028
  "button",
11029
11029
  {
11030
11030
  type: "button",
@@ -11043,7 +11043,7 @@ var Row = (props) => {
11043
11043
  minWidth: "50px",
11044
11044
  right: 0
11045
11045
  },
11046
- className: `p-3 min-w-[40px]`
11046
+ className: `p-3 min-w-[40px] td-toggle-optional`
11047
11047
  }
11048
11048
  )
11049
11049
  ] })
@@ -13192,7 +13192,7 @@ var TableHead = (props) => {
13192
13192
  "table-head-" + index4
13193
13193
  );
13194
13194
  }),
13195
- typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "relative p-2 w-[35px]" }),
13195
+ typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "relative p-2 w-[35px] th-remove" }),
13196
13196
  columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13197
13197
  "th",
13198
13198
  {
@@ -13201,7 +13201,7 @@ var TableHead = (props) => {
13201
13201
  minWidth: "50px",
13202
13202
  right: 0
13203
13203
  },
13204
- className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
13204
+ className: `th-toggle-optional column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
13205
13205
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13206
13206
  TableFilter,
13207
13207
  {
@@ -32660,7 +32660,8 @@ var Many2ManyTagField = (props) => {
32660
32660
  domainObject,
32661
32661
  isFetching,
32662
32662
  setIsShowModalMany2Many,
32663
- baseClassName
32663
+ baseClassName,
32664
+ placeholder
32664
32665
  } = props;
32665
32666
  const { t: t3 } = useI18n();
32666
32667
  if (!isForm && !isEditTable) {
@@ -32737,7 +32738,7 @@ var Many2ManyTagField = (props) => {
32737
32738
  },
32738
32739
  onMenuOpen: fetchMoreOptions,
32739
32740
  menuPlacement: "auto",
32740
- placeholder: readonly ? "" : t3("choose_place"),
32741
+ placeholder,
32741
32742
  classNames: isEditTable ? {
32742
32743
  valueContainer: () => "overflow-unset !px-0",
32743
32744
  control: ({ isFocused }) => `widget many2many-tags-widget ${baseClassName} ${isFocused ? "focused" : ""} ${filteredValue?.length === 0 && "no-values"}`,
@@ -33906,7 +33907,8 @@ var Many2OneField = (props) => {
33906
33907
  setIsShowModalMany2Many,
33907
33908
  setInputValue,
33908
33909
  setDomainObject,
33909
- baseClassName
33910
+ baseClassName,
33911
+ placeholder
33910
33912
  } = props;
33911
33913
  const { t: t3 } = useI18n();
33912
33914
  if (!isForm && !isEditTable) {
@@ -33959,9 +33961,9 @@ var Many2OneField = (props) => {
33959
33961
  label: field?.value?.display_name,
33960
33962
  ...field?.value ?? {}
33961
33963
  } : null;
33962
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33963
- (option) => option.value === tempSelectedOption?.value
33964
- ) : currentValue ? currentValue : null;
33964
+ const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length ? options2.find(
33965
+ (o3) => o3?.value === tempSelectedOption.value
33966
+ ) ?? currentValue : currentValue ?? null;
33965
33967
  (0, import_react68.useEffect)(() => {
33966
33968
  if (error2 && selectedOption) {
33967
33969
  methods?.clearErrors(name2);
@@ -33982,7 +33984,7 @@ var Many2OneField = (props) => {
33982
33984
  clearIndicator: () => `m-0 p-0'`,
33983
33985
  menu: () => "z-[99]"
33984
33986
  },
33985
- placeholder: readonly ? "" : t3("choose_place"),
33987
+ placeholder,
33986
33988
  onMenuOpen: fetchMoreOptions,
33987
33989
  onMenuClose: () => {
33988
33990
  const filteredDomain = [...domainObject ?? []]?.filter(
package/dist/index.mjs CHANGED
@@ -10897,7 +10897,7 @@ var Row = (props) => {
10897
10897
  `${col.name}____${index4}`
10898
10898
  );
10899
10899
  }),
10900
- typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ jsx47("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ jsx47("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ jsx47(
10900
+ typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ jsx47("td", { className: "relative p-2 w-[35px] td-remove", children: /* @__PURE__ */ jsx47("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ jsx47(
10901
10901
  "button",
10902
10902
  {
10903
10903
  type: "button",
@@ -10916,7 +10916,7 @@ var Row = (props) => {
10916
10916
  minWidth: "50px",
10917
10917
  right: 0
10918
10918
  },
10919
- className: `p-3 min-w-[40px]`
10919
+ className: `p-3 min-w-[40px] td-toggle-optional`
10920
10920
  }
10921
10921
  )
10922
10922
  ] })
@@ -13065,7 +13065,7 @@ var TableHead = (props) => {
13065
13065
  "table-head-" + index4
13066
13066
  );
13067
13067
  }),
13068
- typeof onRemoveRow === "function" && /* @__PURE__ */ jsx51("th", { className: "relative p-2 w-[35px]" }),
13068
+ typeof onRemoveRow === "function" && /* @__PURE__ */ jsx51("th", { className: "relative p-2 w-[35px] th-remove" }),
13069
13069
  columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ jsx51(
13070
13070
  "th",
13071
13071
  {
@@ -13074,7 +13074,7 @@ var TableHead = (props) => {
13074
13074
  minWidth: "50px",
13075
13075
  right: 0
13076
13076
  },
13077
- className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
13077
+ className: `th-toggle-optional column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
13078
13078
  children: /* @__PURE__ */ jsx51(
13079
13079
  TableFilter,
13080
13080
  {
@@ -32533,7 +32533,8 @@ var Many2ManyTagField = (props) => {
32533
32533
  domainObject,
32534
32534
  isFetching,
32535
32535
  setIsShowModalMany2Many,
32536
- baseClassName
32536
+ baseClassName,
32537
+ placeholder
32537
32538
  } = props;
32538
32539
  const { t: t3 } = useI18n();
32539
32540
  if (!isForm && !isEditTable) {
@@ -32610,7 +32611,7 @@ var Many2ManyTagField = (props) => {
32610
32611
  },
32611
32612
  onMenuOpen: fetchMoreOptions,
32612
32613
  menuPlacement: "auto",
32613
- placeholder: readonly ? "" : t3("choose_place"),
32614
+ placeholder,
32614
32615
  classNames: isEditTable ? {
32615
32616
  valueContainer: () => "overflow-unset !px-0",
32616
32617
  control: ({ isFocused }) => `widget many2many-tags-widget ${baseClassName} ${isFocused ? "focused" : ""} ${filteredValue?.length === 0 && "no-values"}`,
@@ -33779,7 +33780,8 @@ var Many2OneField = (props) => {
33779
33780
  setIsShowModalMany2Many,
33780
33781
  setInputValue,
33781
33782
  setDomainObject,
33782
- baseClassName
33783
+ baseClassName,
33784
+ placeholder
33783
33785
  } = props;
33784
33786
  const { t: t3 } = useI18n();
33785
33787
  if (!isForm && !isEditTable) {
@@ -33832,9 +33834,9 @@ var Many2OneField = (props) => {
33832
33834
  label: field?.value?.display_name,
33833
33835
  ...field?.value ?? {}
33834
33836
  } : null;
33835
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33836
- (option) => option.value === tempSelectedOption?.value
33837
- ) : currentValue ? currentValue : null;
33837
+ const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length ? options2.find(
33838
+ (o3) => o3?.value === tempSelectedOption.value
33839
+ ) ?? currentValue : currentValue ?? null;
33838
33840
  useEffect28(() => {
33839
33841
  if (error2 && selectedOption) {
33840
33842
  methods?.clearErrors(name2);
@@ -33855,7 +33857,7 @@ var Many2OneField = (props) => {
33855
33857
  clearIndicator: () => `m-0 p-0'`,
33856
33858
  menu: () => "z-[99]"
33857
33859
  },
33858
- placeholder: readonly ? "" : t3("choose_place"),
33860
+ placeholder,
33859
33861
  onMenuOpen: fetchMoreOptions,
33860
33862
  onMenuClose: () => {
33861
33863
  const filteredDomain = [...domainObject ?? []]?.filter(
package/dist/widgets.js CHANGED
@@ -10016,7 +10016,7 @@ var Row = (props) => {
10016
10016
  `${col.name}____${index4}`
10017
10017
  );
10018
10018
  }),
10019
- typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10019
+ typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: "relative p-2 w-[35px] td-remove", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
10020
10020
  "button",
10021
10021
  {
10022
10022
  type: "button",
@@ -10035,7 +10035,7 @@ var Row = (props) => {
10035
10035
  minWidth: "50px",
10036
10036
  right: 0
10037
10037
  },
10038
- className: `p-3 min-w-[40px]`
10038
+ className: `p-3 min-w-[40px] td-toggle-optional`
10039
10039
  }
10040
10040
  )
10041
10041
  ] })
@@ -12184,7 +12184,7 @@ var TableHead = (props) => {
12184
12184
  "table-head-" + index4
12185
12185
  );
12186
12186
  }),
12187
- typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "relative p-2 w-[35px]" }),
12187
+ typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "relative p-2 w-[35px] th-remove" }),
12188
12188
  columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12189
12189
  "th",
12190
12190
  {
@@ -12193,7 +12193,7 @@ var TableHead = (props) => {
12193
12193
  minWidth: "50px",
12194
12194
  right: 0
12195
12195
  },
12196
- className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
12196
+ className: `th-toggle-optional column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
12197
12197
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12198
12198
  TableFilter,
12199
12199
  {
@@ -31909,7 +31909,8 @@ var Many2ManyTagField = (props) => {
31909
31909
  domainObject,
31910
31910
  isFetching,
31911
31911
  setIsShowModalMany2Many,
31912
- baseClassName
31912
+ baseClassName,
31913
+ placeholder
31913
31914
  } = props;
31914
31915
  const { t: t3 } = useI18n();
31915
31916
  if (!isForm && !isEditTable) {
@@ -31986,7 +31987,7 @@ var Many2ManyTagField = (props) => {
31986
31987
  },
31987
31988
  onMenuOpen: fetchMoreOptions,
31988
31989
  menuPlacement: "auto",
31989
- placeholder: readonly ? "" : t3("choose_place"),
31990
+ placeholder,
31990
31991
  classNames: isEditTable ? {
31991
31992
  valueContainer: () => "overflow-unset !px-0",
31992
31993
  control: ({ isFocused }) => `widget many2many-tags-widget ${baseClassName} ${isFocused ? "focused" : ""} ${filteredValue?.length === 0 && "no-values"}`,
@@ -33155,7 +33156,8 @@ var Many2OneField = (props) => {
33155
33156
  setIsShowModalMany2Many,
33156
33157
  setInputValue,
33157
33158
  setDomainObject,
33158
- baseClassName
33159
+ baseClassName,
33160
+ placeholder
33159
33161
  } = props;
33160
33162
  const { t: t3 } = useI18n();
33161
33163
  if (!isForm && !isEditTable) {
@@ -33208,9 +33210,9 @@ var Many2OneField = (props) => {
33208
33210
  label: field?.value?.display_name,
33209
33211
  ...field?.value ?? {}
33210
33212
  } : null;
33211
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33212
- (option) => option.value === tempSelectedOption?.value
33213
- ) : currentValue ? currentValue : null;
33213
+ const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length ? options2.find(
33214
+ (o3) => o3?.value === tempSelectedOption.value
33215
+ ) ?? currentValue : currentValue ?? null;
33214
33216
  (0, import_react68.useEffect)(() => {
33215
33217
  if (error2 && selectedOption) {
33216
33218
  methods?.clearErrors(name2);
@@ -33231,7 +33233,7 @@ var Many2OneField = (props) => {
33231
33233
  clearIndicator: () => `m-0 p-0'`,
33232
33234
  menu: () => "z-[99]"
33233
33235
  },
33234
- placeholder: readonly ? "" : t3("choose_place"),
33236
+ placeholder,
33235
33237
  onMenuOpen: fetchMoreOptions,
33236
33238
  onMenuClose: () => {
33237
33239
  const filteredDomain = [...domainObject ?? []]?.filter(
package/dist/widgets.mjs CHANGED
@@ -9953,7 +9953,7 @@ var Row = (props) => {
9953
9953
  `${col.name}____${index4}`
9954
9954
  );
9955
9955
  }),
9956
- typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ jsx47("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ jsx47("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ jsx47(
9956
+ typeof onRemoveRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ jsx47("td", { className: "relative p-2 w-[35px] td-remove", children: /* @__PURE__ */ jsx47("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ jsx47(
9957
9957
  "button",
9958
9958
  {
9959
9959
  type: "button",
@@ -9972,7 +9972,7 @@ var Row = (props) => {
9972
9972
  minWidth: "50px",
9973
9973
  right: 0
9974
9974
  },
9975
- className: `p-3 min-w-[40px]`
9975
+ className: `p-3 min-w-[40px] td-toggle-optional`
9976
9976
  }
9977
9977
  )
9978
9978
  ] })
@@ -12121,7 +12121,7 @@ var TableHead = (props) => {
12121
12121
  "table-head-" + index4
12122
12122
  );
12123
12123
  }),
12124
- typeof onRemoveRow === "function" && /* @__PURE__ */ jsx51("th", { className: "relative p-2 w-[35px]" }),
12124
+ typeof onRemoveRow === "function" && /* @__PURE__ */ jsx51("th", { className: "relative p-2 w-[35px] th-remove" }),
12125
12125
  columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ jsx51(
12126
12126
  "th",
12127
12127
  {
@@ -12130,7 +12130,7 @@ var TableHead = (props) => {
12130
12130
  minWidth: "50px",
12131
12131
  right: 0
12132
12132
  },
12133
- className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
12133
+ className: `th-toggle-optional column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
12134
12134
  children: /* @__PURE__ */ jsx51(
12135
12135
  TableFilter,
12136
12136
  {
@@ -31846,7 +31846,8 @@ var Many2ManyTagField = (props) => {
31846
31846
  domainObject,
31847
31847
  isFetching,
31848
31848
  setIsShowModalMany2Many,
31849
- baseClassName
31849
+ baseClassName,
31850
+ placeholder
31850
31851
  } = props;
31851
31852
  const { t: t3 } = useI18n();
31852
31853
  if (!isForm && !isEditTable) {
@@ -31923,7 +31924,7 @@ var Many2ManyTagField = (props) => {
31923
31924
  },
31924
31925
  onMenuOpen: fetchMoreOptions,
31925
31926
  menuPlacement: "auto",
31926
- placeholder: readonly ? "" : t3("choose_place"),
31927
+ placeholder,
31927
31928
  classNames: isEditTable ? {
31928
31929
  valueContainer: () => "overflow-unset !px-0",
31929
31930
  control: ({ isFocused }) => `widget many2many-tags-widget ${baseClassName} ${isFocused ? "focused" : ""} ${filteredValue?.length === 0 && "no-values"}`,
@@ -33092,7 +33093,8 @@ var Many2OneField = (props) => {
33092
33093
  setIsShowModalMany2Many,
33093
33094
  setInputValue,
33094
33095
  setDomainObject,
33095
- baseClassName
33096
+ baseClassName,
33097
+ placeholder
33096
33098
  } = props;
33097
33099
  const { t: t3 } = useI18n();
33098
33100
  if (!isForm && !isEditTable) {
@@ -33145,9 +33147,9 @@ var Many2OneField = (props) => {
33145
33147
  label: field?.value?.display_name,
33146
33148
  ...field?.value ?? {}
33147
33149
  } : null;
33148
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33149
- (option) => option.value === tempSelectedOption?.value
33150
- ) : currentValue ? currentValue : null;
33150
+ const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length ? options2.find(
33151
+ (o3) => o3?.value === tempSelectedOption.value
33152
+ ) ?? currentValue : currentValue ?? null;
33151
33153
  useEffect28(() => {
33152
33154
  if (error2 && selectedOption) {
33153
33155
  methods?.clearErrors(name2);
@@ -33168,7 +33170,7 @@ var Many2OneField = (props) => {
33168
33170
  clearIndicator: () => `m-0 p-0'`,
33169
33171
  menu: () => "z-[99]"
33170
33172
  },
33171
- placeholder: readonly ? "" : t3("choose_place"),
33173
+ placeholder,
33172
33174
  onMenuOpen: fetchMoreOptions,
33173
33175
  onMenuClose: () => {
33174
33176
  const filteredDomain = [...domainObject ?? []]?.filter(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",