@fctc/sme-widget-ui 2.6.1 → 2.6.3

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
@@ -11009,7 +11009,7 @@ var Row = (props) => {
11009
11009
  "td",
11010
11010
  {
11011
11011
  colSpan: 1,
11012
- className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900`,
11012
+ className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900 ${col?.field?.type_co === "buttons" ? "td-buttons" : "td-normal"}`,
11013
11013
  onClick: () => {
11014
11014
  handleClickRow(col, row);
11015
11015
  },
@@ -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
  {
@@ -33961,9 +33961,9 @@ var Many2OneField = (props) => {
33961
33961
  label: field?.value?.display_name,
33962
33962
  ...field?.value ?? {}
33963
33963
  } : null;
33964
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33965
- (option) => option.value === tempSelectedOption?.value
33966
- ) : 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;
33967
33967
  (0, import_react68.useEffect)(() => {
33968
33968
  if (error2 && selectedOption) {
33969
33969
  methods?.clearErrors(name2);
package/dist/index.mjs CHANGED
@@ -10882,7 +10882,7 @@ var Row = (props) => {
10882
10882
  "td",
10883
10883
  {
10884
10884
  colSpan: 1,
10885
- className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900`,
10885
+ className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900 ${col?.field?.type_co === "buttons" ? "td-buttons" : "td-normal"}`,
10886
10886
  onClick: () => {
10887
10887
  handleClickRow(col, row);
10888
10888
  },
@@ -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
  {
@@ -33834,9 +33834,9 @@ var Many2OneField = (props) => {
33834
33834
  label: field?.value?.display_name,
33835
33835
  ...field?.value ?? {}
33836
33836
  } : null;
33837
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33838
- (option) => option.value === tempSelectedOption?.value
33839
- ) : 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;
33840
33840
  useEffect28(() => {
33841
33841
  if (error2 && selectedOption) {
33842
33842
  methods?.clearErrors(name2);
package/dist/widgets.js CHANGED
@@ -10001,7 +10001,7 @@ var Row = (props) => {
10001
10001
  "td",
10002
10002
  {
10003
10003
  colSpan: 1,
10004
- className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900`,
10004
+ className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900 ${col?.field?.type_co === "buttons" ? "td-buttons" : "td-normal"}`,
10005
10005
  onClick: () => {
10006
10006
  handleClickRow(col, row);
10007
10007
  },
@@ -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
  {
@@ -33210,9 +33210,9 @@ var Many2OneField = (props) => {
33210
33210
  label: field?.value?.display_name,
33211
33211
  ...field?.value ?? {}
33212
33212
  } : null;
33213
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33214
- (option) => option.value === tempSelectedOption?.value
33215
- ) : 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;
33216
33216
  (0, import_react68.useEffect)(() => {
33217
33217
  if (error2 && selectedOption) {
33218
33218
  methods?.clearErrors(name2);
package/dist/widgets.mjs CHANGED
@@ -9938,7 +9938,7 @@ var Row = (props) => {
9938
9938
  "td",
9939
9939
  {
9940
9940
  colSpan: 1,
9941
- className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900`,
9941
+ className: `${isEditTable || col?.field?.widget === "handle" ? "" : "p-3"} column w-max whitespace-nowrap border-b border-gray-200 text-sm font-normal text-gray-900 ${col?.field?.type_co === "buttons" ? "td-buttons" : "td-normal"}`,
9942
9942
  onClick: () => {
9943
9943
  handleClickRow(col, row);
9944
9944
  },
@@ -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
  {
@@ -33147,9 +33147,9 @@ var Many2OneField = (props) => {
33147
33147
  label: field?.value?.display_name,
33148
33148
  ...field?.value ?? {}
33149
33149
  } : null;
33150
- const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
33151
- (option) => option.value === tempSelectedOption?.value
33152
- ) : 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;
33153
33153
  useEffect28(() => {
33154
33154
  if (error2 && selectedOption) {
33155
33155
  methods?.clearErrors(name2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",