@fctc/sme-widget-ui 2.3.9 → 2.4.1

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
@@ -13114,64 +13114,70 @@ var TableHead = (props) => {
13114
13114
  "data-type-co": col?.field?.type_co,
13115
13115
  "data-rtc-resizable": col?.name,
13116
13116
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
13117
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
13118
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
13119
- col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
13120
- (0, import_react_dom.createPortal)(
13121
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13122
- M,
13123
- {
13124
- style: {
13125
- padding: "6px 12px",
13126
- fontSize: "12px",
13127
- borderRadius: "4px",
13128
- maxWidth: "200px",
13129
- whiteSpace: "wrap",
13130
- fontWeight: 400,
13131
- textTransform: "none",
13132
- zIndex: "9999"
13133
- },
13134
- id: `field-help-${col?.field?.name}`,
13135
- content: col?.field?.help,
13136
- place: "top"
13137
- }
13138
- ),
13139
- document.body
13140
- ),
13141
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13142
- "span",
13143
- {
13144
- style: {
13145
- width: "12px",
13146
- height: "12px",
13147
- minWidth: "12px",
13148
- maxHeight: "12px",
13149
- fontSize: "8px"
13150
- },
13151
- "data-tooltip-id": `field-help-${col?.field?.name}`,
13152
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13153
- "svg",
13117
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
13118
+ "div",
13119
+ {
13120
+ className: `cursor-pointer flex items-center gap-[4px] w-full group relative ${col?.field?.type === "monetary" && "justify-end"}`,
13121
+ children: [
13122
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
13123
+ col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
13124
+ (0, import_react_dom.createPortal)(
13125
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13126
+ M,
13127
+ {
13128
+ style: {
13129
+ padding: "6px 12px",
13130
+ fontSize: "12px",
13131
+ borderRadius: "4px",
13132
+ maxWidth: "200px",
13133
+ whiteSpace: "wrap",
13134
+ fontWeight: 400,
13135
+ textTransform: "none",
13136
+ zIndex: "9999"
13137
+ },
13138
+ id: `field-help-${col?.field?.name}`,
13139
+ content: col?.field?.help,
13140
+ place: "top"
13141
+ }
13142
+ ),
13143
+ document.body
13144
+ ),
13145
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13146
+ "span",
13154
13147
  {
13155
- xmlns: "http://www.w3.org/2000/svg",
13156
- width: "13",
13157
- height: "13",
13158
- viewBox: "0 0 13 13",
13159
- fill: "none",
13148
+ style: {
13149
+ width: "12px",
13150
+ height: "12px",
13151
+ minWidth: "12px",
13152
+ maxHeight: "12px",
13153
+ fontSize: "8px"
13154
+ },
13155
+ "data-tooltip-id": `field-help-${col?.field?.name}`,
13160
13156
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13161
- "path",
13157
+ "svg",
13162
13158
  {
13163
- fillRule: "evenodd",
13164
- clipRule: "evenodd",
13165
- d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
13166
- fill: "#C3C3C3"
13159
+ xmlns: "http://www.w3.org/2000/svg",
13160
+ width: "13",
13161
+ height: "13",
13162
+ viewBox: "0 0 13 13",
13163
+ fill: "none",
13164
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13165
+ "path",
13166
+ {
13167
+ fillRule: "evenodd",
13168
+ clipRule: "evenodd",
13169
+ d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
13170
+ fill: "#C3C3C3"
13171
+ }
13172
+ )
13167
13173
  }
13168
13174
  )
13169
13175
  }
13170
13176
  )
13171
- }
13172
- )
13173
- ] })
13174
- ] })
13177
+ ] })
13178
+ ]
13179
+ }
13180
+ )
13175
13181
  },
13176
13182
  "table-head-" + index4
13177
13183
  );
@@ -32835,15 +32841,9 @@ var MonetaryField = (props) => {
32835
32841
  ] });
32836
32842
  }
32837
32843
  if (!isForm) {
32838
- const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
32839
- if (widget === "monetary" && !formValues?.currency_id) {
32840
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
32841
- parseFloat(String(value ?? defaultValue))
32842
- )} ${symbol}` });
32843
- }
32844
32844
  return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
32845
32845
  parseFloat(value ?? defaultValue)
32846
- )} ${currencySymbol}` });
32846
+ )} ${symbol}` });
32847
32847
  }
32848
32848
  return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
32849
32849
  Controller,
package/dist/index.mjs CHANGED
@@ -12987,64 +12987,70 @@ var TableHead = (props) => {
12987
12987
  "data-type-co": col?.field?.type_co,
12988
12988
  "data-rtc-resizable": col?.name,
12989
12989
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
12990
- children: /* @__PURE__ */ jsxs29("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
12991
- /* @__PURE__ */ jsx51("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12992
- col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
12993
- createPortal(
12994
- /* @__PURE__ */ jsx51(
12995
- M,
12996
- {
12997
- style: {
12998
- padding: "6px 12px",
12999
- fontSize: "12px",
13000
- borderRadius: "4px",
13001
- maxWidth: "200px",
13002
- whiteSpace: "wrap",
13003
- fontWeight: 400,
13004
- textTransform: "none",
13005
- zIndex: "9999"
13006
- },
13007
- id: `field-help-${col?.field?.name}`,
13008
- content: col?.field?.help,
13009
- place: "top"
13010
- }
13011
- ),
13012
- document.body
13013
- ),
13014
- /* @__PURE__ */ jsx51(
13015
- "span",
13016
- {
13017
- style: {
13018
- width: "12px",
13019
- height: "12px",
13020
- minWidth: "12px",
13021
- maxHeight: "12px",
13022
- fontSize: "8px"
13023
- },
13024
- "data-tooltip-id": `field-help-${col?.field?.name}`,
13025
- children: /* @__PURE__ */ jsx51(
13026
- "svg",
12990
+ children: /* @__PURE__ */ jsxs29(
12991
+ "div",
12992
+ {
12993
+ className: `cursor-pointer flex items-center gap-[4px] w-full group relative ${col?.field?.type === "monetary" && "justify-end"}`,
12994
+ children: [
12995
+ /* @__PURE__ */ jsx51("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12996
+ col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
12997
+ createPortal(
12998
+ /* @__PURE__ */ jsx51(
12999
+ M,
13000
+ {
13001
+ style: {
13002
+ padding: "6px 12px",
13003
+ fontSize: "12px",
13004
+ borderRadius: "4px",
13005
+ maxWidth: "200px",
13006
+ whiteSpace: "wrap",
13007
+ fontWeight: 400,
13008
+ textTransform: "none",
13009
+ zIndex: "9999"
13010
+ },
13011
+ id: `field-help-${col?.field?.name}`,
13012
+ content: col?.field?.help,
13013
+ place: "top"
13014
+ }
13015
+ ),
13016
+ document.body
13017
+ ),
13018
+ /* @__PURE__ */ jsx51(
13019
+ "span",
13027
13020
  {
13028
- xmlns: "http://www.w3.org/2000/svg",
13029
- width: "13",
13030
- height: "13",
13031
- viewBox: "0 0 13 13",
13032
- fill: "none",
13021
+ style: {
13022
+ width: "12px",
13023
+ height: "12px",
13024
+ minWidth: "12px",
13025
+ maxHeight: "12px",
13026
+ fontSize: "8px"
13027
+ },
13028
+ "data-tooltip-id": `field-help-${col?.field?.name}`,
13033
13029
  children: /* @__PURE__ */ jsx51(
13034
- "path",
13030
+ "svg",
13035
13031
  {
13036
- fillRule: "evenodd",
13037
- clipRule: "evenodd",
13038
- d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
13039
- fill: "#C3C3C3"
13032
+ xmlns: "http://www.w3.org/2000/svg",
13033
+ width: "13",
13034
+ height: "13",
13035
+ viewBox: "0 0 13 13",
13036
+ fill: "none",
13037
+ children: /* @__PURE__ */ jsx51(
13038
+ "path",
13039
+ {
13040
+ fillRule: "evenodd",
13041
+ clipRule: "evenodd",
13042
+ d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
13043
+ fill: "#C3C3C3"
13044
+ }
13045
+ )
13040
13046
  }
13041
13047
  )
13042
13048
  }
13043
13049
  )
13044
- }
13045
- )
13046
- ] })
13047
- ] })
13050
+ ] })
13051
+ ]
13052
+ }
13053
+ )
13048
13054
  },
13049
13055
  "table-head-" + index4
13050
13056
  );
@@ -32708,15 +32714,9 @@ var MonetaryField = (props) => {
32708
32714
  ] });
32709
32715
  }
32710
32716
  if (!isForm) {
32711
- const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
32712
- if (widget === "monetary" && !formValues?.currency_id) {
32713
- return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
32714
- parseFloat(String(value ?? defaultValue))
32715
- )} ${symbol}` });
32716
- }
32717
32717
  return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
32718
32718
  parseFloat(value ?? defaultValue)
32719
- )} ${currencySymbol}` });
32719
+ )} ${symbol}` });
32720
32720
  }
32721
32721
  return /* @__PURE__ */ jsx100(
32722
32722
  Controller,
package/dist/widgets.js CHANGED
@@ -12106,64 +12106,70 @@ var TableHead = (props) => {
12106
12106
  "data-type-co": col?.field?.type_co,
12107
12107
  "data-rtc-resizable": col?.name,
12108
12108
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
12109
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
12110
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12111
- col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
12112
- (0, import_react_dom.createPortal)(
12113
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12114
- M,
12115
- {
12116
- style: {
12117
- padding: "6px 12px",
12118
- fontSize: "12px",
12119
- borderRadius: "4px",
12120
- maxWidth: "200px",
12121
- whiteSpace: "wrap",
12122
- fontWeight: 400,
12123
- textTransform: "none",
12124
- zIndex: "9999"
12125
- },
12126
- id: `field-help-${col?.field?.name}`,
12127
- content: col?.field?.help,
12128
- place: "top"
12129
- }
12130
- ),
12131
- document.body
12132
- ),
12133
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12134
- "span",
12135
- {
12136
- style: {
12137
- width: "12px",
12138
- height: "12px",
12139
- minWidth: "12px",
12140
- maxHeight: "12px",
12141
- fontSize: "8px"
12142
- },
12143
- "data-tooltip-id": `field-help-${col?.field?.name}`,
12144
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12145
- "svg",
12109
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
12110
+ "div",
12111
+ {
12112
+ className: `cursor-pointer flex items-center gap-[4px] w-full group relative ${col?.field?.type === "monetary" && "justify-end"}`,
12113
+ children: [
12114
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12115
+ col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
12116
+ (0, import_react_dom.createPortal)(
12117
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12118
+ M,
12119
+ {
12120
+ style: {
12121
+ padding: "6px 12px",
12122
+ fontSize: "12px",
12123
+ borderRadius: "4px",
12124
+ maxWidth: "200px",
12125
+ whiteSpace: "wrap",
12126
+ fontWeight: 400,
12127
+ textTransform: "none",
12128
+ zIndex: "9999"
12129
+ },
12130
+ id: `field-help-${col?.field?.name}`,
12131
+ content: col?.field?.help,
12132
+ place: "top"
12133
+ }
12134
+ ),
12135
+ document.body
12136
+ ),
12137
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12138
+ "span",
12146
12139
  {
12147
- xmlns: "http://www.w3.org/2000/svg",
12148
- width: "13",
12149
- height: "13",
12150
- viewBox: "0 0 13 13",
12151
- fill: "none",
12140
+ style: {
12141
+ width: "12px",
12142
+ height: "12px",
12143
+ minWidth: "12px",
12144
+ maxHeight: "12px",
12145
+ fontSize: "8px"
12146
+ },
12147
+ "data-tooltip-id": `field-help-${col?.field?.name}`,
12152
12148
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12153
- "path",
12149
+ "svg",
12154
12150
  {
12155
- fillRule: "evenodd",
12156
- clipRule: "evenodd",
12157
- d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
12158
- fill: "#C3C3C3"
12151
+ xmlns: "http://www.w3.org/2000/svg",
12152
+ width: "13",
12153
+ height: "13",
12154
+ viewBox: "0 0 13 13",
12155
+ fill: "none",
12156
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12157
+ "path",
12158
+ {
12159
+ fillRule: "evenodd",
12160
+ clipRule: "evenodd",
12161
+ d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
12162
+ fill: "#C3C3C3"
12163
+ }
12164
+ )
12159
12165
  }
12160
12166
  )
12161
12167
  }
12162
12168
  )
12163
- }
12164
- )
12165
- ] })
12166
- ] })
12169
+ ] })
12170
+ ]
12171
+ }
12172
+ )
12167
12173
  },
12168
12174
  "table-head-" + index4
12169
12175
  );
@@ -32084,15 +32090,9 @@ var MonetaryField = (props) => {
32084
32090
  ] });
32085
32091
  }
32086
32092
  if (!isForm) {
32087
- const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
32088
- if (widget === "monetary" && !formValues?.currency_id) {
32089
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
32090
- parseFloat(String(value ?? defaultValue))
32091
- )} ${symbol}` });
32092
- }
32093
32093
  return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: `${formatNumberOnly(
32094
32094
  parseFloat(value ?? defaultValue)
32095
- )} ${currencySymbol}` });
32095
+ )} ${symbol}` });
32096
32096
  }
32097
32097
  return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
32098
32098
  Controller,
package/dist/widgets.mjs CHANGED
@@ -12043,64 +12043,70 @@ var TableHead = (props) => {
12043
12043
  "data-type-co": col?.field?.type_co,
12044
12044
  "data-rtc-resizable": col?.name,
12045
12045
  className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
12046
- children: /* @__PURE__ */ jsxs29("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
12047
- /* @__PURE__ */ jsx51("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12048
- col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
12049
- createPortal(
12050
- /* @__PURE__ */ jsx51(
12051
- M,
12052
- {
12053
- style: {
12054
- padding: "6px 12px",
12055
- fontSize: "12px",
12056
- borderRadius: "4px",
12057
- maxWidth: "200px",
12058
- whiteSpace: "wrap",
12059
- fontWeight: 400,
12060
- textTransform: "none",
12061
- zIndex: "9999"
12062
- },
12063
- id: `field-help-${col?.field?.name}`,
12064
- content: col?.field?.help,
12065
- place: "top"
12066
- }
12067
- ),
12068
- document.body
12069
- ),
12070
- /* @__PURE__ */ jsx51(
12071
- "span",
12072
- {
12073
- style: {
12074
- width: "12px",
12075
- height: "12px",
12076
- minWidth: "12px",
12077
- maxHeight: "12px",
12078
- fontSize: "8px"
12079
- },
12080
- "data-tooltip-id": `field-help-${col?.field?.name}`,
12081
- children: /* @__PURE__ */ jsx51(
12082
- "svg",
12046
+ children: /* @__PURE__ */ jsxs29(
12047
+ "div",
12048
+ {
12049
+ className: `cursor-pointer flex items-center gap-[4px] w-full group relative ${col?.field?.type === "monetary" && "justify-end"}`,
12050
+ children: [
12051
+ /* @__PURE__ */ jsx51("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
12052
+ col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
12053
+ createPortal(
12054
+ /* @__PURE__ */ jsx51(
12055
+ M,
12056
+ {
12057
+ style: {
12058
+ padding: "6px 12px",
12059
+ fontSize: "12px",
12060
+ borderRadius: "4px",
12061
+ maxWidth: "200px",
12062
+ whiteSpace: "wrap",
12063
+ fontWeight: 400,
12064
+ textTransform: "none",
12065
+ zIndex: "9999"
12066
+ },
12067
+ id: `field-help-${col?.field?.name}`,
12068
+ content: col?.field?.help,
12069
+ place: "top"
12070
+ }
12071
+ ),
12072
+ document.body
12073
+ ),
12074
+ /* @__PURE__ */ jsx51(
12075
+ "span",
12083
12076
  {
12084
- xmlns: "http://www.w3.org/2000/svg",
12085
- width: "13",
12086
- height: "13",
12087
- viewBox: "0 0 13 13",
12088
- fill: "none",
12077
+ style: {
12078
+ width: "12px",
12079
+ height: "12px",
12080
+ minWidth: "12px",
12081
+ maxHeight: "12px",
12082
+ fontSize: "8px"
12083
+ },
12084
+ "data-tooltip-id": `field-help-${col?.field?.name}`,
12089
12085
  children: /* @__PURE__ */ jsx51(
12090
- "path",
12086
+ "svg",
12091
12087
  {
12092
- fillRule: "evenodd",
12093
- clipRule: "evenodd",
12094
- d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
12095
- fill: "#C3C3C3"
12088
+ xmlns: "http://www.w3.org/2000/svg",
12089
+ width: "13",
12090
+ height: "13",
12091
+ viewBox: "0 0 13 13",
12092
+ fill: "none",
12093
+ children: /* @__PURE__ */ jsx51(
12094
+ "path",
12095
+ {
12096
+ fillRule: "evenodd",
12097
+ clipRule: "evenodd",
12098
+ d: "M6.25 12.5C9.70178 12.5 12.5 9.70178 12.5 6.25C12.5 2.79822 9.70178 0 6.25 0C2.79822 0 0 2.79822 0 6.25C0 9.70178 2.79822 12.5 6.25 12.5ZM7.36584 9.45858L7.46565 9.0506C7.41399 9.07486 7.3307 9.10258 7.21649 9.13414C7.10197 9.1657 6.9989 9.18177 6.90831 9.18177C6.71536 9.18177 6.57952 9.15014 6.50065 9.08657C6.42236 9.023 6.38331 8.90342 6.38331 8.72827C6.38331 8.65887 6.39509 8.55542 6.41973 8.42003C6.44361 8.28373 6.47108 8.16261 6.50161 8.05666L6.87419 6.73759C6.91068 6.61653 6.93571 6.48344 6.94916 6.33818C6.96292 6.19325 6.96932 6.09185 6.96932 6.03429C6.96932 5.75614 6.87182 5.53041 6.67676 5.35629C6.4817 5.18229 6.20393 5.09529 5.84396 5.09529C5.64365 5.09529 5.43188 5.13088 5.20776 5.202C4.98363 5.27294 4.74933 5.3584 4.50421 5.4582L4.40415 5.8665C4.47719 5.83949 4.56419 5.81043 4.66598 5.78034C4.76732 5.75038 4.86674 5.73489 4.96347 5.73489C5.16096 5.73489 5.29399 5.76856 5.3637 5.83488C5.43342 5.90139 5.46844 6.0197 5.46844 6.18883C5.46844 6.28236 5.45736 6.38626 5.43438 6.49919C5.41172 6.61282 5.38342 6.73298 5.35013 6.8598L4.97595 8.18419C4.94266 8.32336 4.91834 8.44787 4.90304 8.55843C4.88786 8.66886 4.88057 8.77724 4.88057 8.88262C4.88057 9.15482 4.98114 9.3792 5.18222 9.55627C5.38329 9.73264 5.66523 9.82143 6.02769 9.82143C6.26372 9.82143 6.47088 9.79057 6.64917 9.72854C6.82727 9.6667 7.06644 9.57675 7.36584 9.45858ZM7.29946 4.1002C7.47352 3.93882 7.56014 3.74254 7.56014 3.51272C7.56014 3.28341 7.47365 3.08675 7.29946 2.92331C7.12584 2.76032 6.91657 2.67857 6.6719 2.67857C6.42646 2.67857 6.21635 2.76013 6.04107 2.92331C5.86579 3.08675 5.77796 3.28334 5.77796 3.51272C5.77796 3.74254 5.86579 3.93875 6.04107 4.1002C6.21667 4.26217 6.42639 4.34321 6.6719 4.34321C6.91664 4.34321 7.12584 4.26217 7.29946 4.1002Z",
12099
+ fill: "#C3C3C3"
12100
+ }
12101
+ )
12096
12102
  }
12097
12103
  )
12098
12104
  }
12099
12105
  )
12100
- }
12101
- )
12102
- ] })
12103
- ] })
12106
+ ] })
12107
+ ]
12108
+ }
12109
+ )
12104
12110
  },
12105
12111
  "table-head-" + index4
12106
12112
  );
@@ -32021,15 +32027,9 @@ var MonetaryField = (props) => {
32021
32027
  ] });
32022
32028
  }
32023
32029
  if (!isForm) {
32024
- const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : symbol;
32025
- if (widget === "monetary" && !formValues?.currency_id) {
32026
- return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
32027
- parseFloat(String(value ?? defaultValue))
32028
- )} ${symbol}` });
32029
- }
32030
32030
  return /* @__PURE__ */ jsx100("span", { children: `${formatNumberOnly(
32031
32031
  parseFloat(value ?? defaultValue)
32032
- )} ${currencySymbol}` });
32032
+ )} ${symbol}` });
32033
32033
  }
32034
32034
  return /* @__PURE__ */ jsx100(
32035
32035
  Controller,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "2.3.9",
3
+ "version": "2.4.1",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",