@fctc/sme-widget-ui 2.1.2 → 2.1.4

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
@@ -13176,8 +13176,25 @@ var TableHead = (props) => {
13176
13176
  fontSize: "8px"
13177
13177
  },
13178
13178
  "data-tooltip-id": `field-help-${col?.field?.name}`,
13179
- className: "lowercase rounded-full bg-primary size-[12px] text-[8px] text-white flex items-center justify-center",
13180
- children: "i"
13179
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13180
+ "svg",
13181
+ {
13182
+ xmlns: "http://www.w3.org/2000/svg",
13183
+ width: "13",
13184
+ height: "13",
13185
+ viewBox: "0 0 13 13",
13186
+ fill: "none",
13187
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13188
+ "path",
13189
+ {
13190
+ fillRule: "evenodd",
13191
+ clipRule: "evenodd",
13192
+ 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",
13193
+ fill: "#C3C3C3"
13194
+ }
13195
+ )
13196
+ }
13197
+ )
13181
13198
  }
13182
13199
  )
13183
13200
  ] })
@@ -17240,13 +17257,14 @@ var CharField = (props) => {
17240
17257
  const propValue = value || defaultValue;
17241
17258
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
17242
17259
  }
17260
+ const { t: t3 } = useI18n();
17243
17261
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
17244
17262
  Controller,
17245
17263
  {
17246
17264
  name: name2 ?? "",
17247
17265
  control: methods.control,
17248
17266
  rules: {
17249
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
17267
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
17250
17268
  validate: (value2) => {
17251
17269
  if (!value2) return true;
17252
17270
  if (widget === "custom_passord") {
@@ -17258,7 +17276,7 @@ var CharField = (props) => {
17258
17276
  if (!widget) return;
17259
17277
  const inputType = widget === "email" ? "email" : widget === "phone" ? "phone" : widget === "text-only" ? "text" : widget === "number" ? "number" : null;
17260
17278
  if (!inputType) return;
17261
- return validateInput(value2, inputType) || i18n_default.t(
17279
+ return validateInput(value2, inputType) || t3(
17262
17280
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
17263
17281
  );
17264
17282
  }
@@ -17327,7 +17345,7 @@ var CharField = (props) => {
17327
17345
  if (inputValue && !validateInput(inputValue, inputType)) {
17328
17346
  setError(name2, {
17329
17347
  type: "pattern",
17330
- message: i18n_default.t(
17348
+ message: t3(
17331
17349
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
17332
17350
  )
17333
17351
  });
@@ -17339,7 +17357,7 @@ var CharField = (props) => {
17339
17357
  if (!inputValue && required && !invisible) {
17340
17358
  setError(name2, {
17341
17359
  type: "required",
17342
- message: `${string} ${i18n_default.t("must_required")}`
17360
+ message: `${string} ${t3("must_required")}`
17343
17361
  });
17344
17362
  } else {
17345
17363
  clearErrors(name2);
@@ -17440,11 +17458,8 @@ var CheckboxField = (props) => {
17440
17458
  var import_react41 = require("react");
17441
17459
  var import_jsx_runtime79 = require("react/jsx-runtime");
17442
17460
  var ColorWrapper = (props) => {
17443
- const {
17444
- colors: colors2,
17445
- defaultColor,
17446
- savePickColor
17447
- } = props;
17461
+ const { colors: colors2, defaultColor, savePickColor } = props;
17462
+ const { t: t3 } = useI18n();
17448
17463
  const [selectedColor, setSelectedColor] = (0, import_react41.useState)(colors2[defaultColor]);
17449
17464
  const [showFullColors, setIsShowFullColor] = (0, import_react41.useState)(false);
17450
17465
  const pickColorsRef = (0, import_react41.useRef)(null);
@@ -17486,7 +17501,7 @@ var ColorWrapper = (props) => {
17486
17501
  className: "",
17487
17502
  place: "top",
17488
17503
  id: `${color?.color}${color?.id}`,
17489
- content: i18n_default.t(color?.name)
17504
+ content: t3(color?.name)
17490
17505
  }
17491
17506
  )
17492
17507
  ] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
@@ -17508,7 +17523,7 @@ var ColorWrapper = (props) => {
17508
17523
  {
17509
17524
  place: "top",
17510
17525
  id: `${selectedColor?.id}${selectedColor?.name}`,
17511
- content: i18n_default.t(selectedColor?.name)
17526
+ content: t3(selectedColor?.name)
17512
17527
  }
17513
17528
  )
17514
17529
  ] }) });
@@ -32447,7 +32462,7 @@ var Many2ManyTagField = (props) => {
32447
32462
  name: name2 ?? "",
32448
32463
  control: methods.control,
32449
32464
  rules: {
32450
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false
32465
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
32451
32466
  },
32452
32467
  render: ({ field, fieldState: { error: error2 } }) => {
32453
32468
  const { clearErrors } = methods;
package/dist/index.mjs CHANGED
@@ -13051,8 +13051,25 @@ var TableHead = (props) => {
13051
13051
  fontSize: "8px"
13052
13052
  },
13053
13053
  "data-tooltip-id": `field-help-${col?.field?.name}`,
13054
- className: "lowercase rounded-full bg-primary size-[12px] text-[8px] text-white flex items-center justify-center",
13055
- children: "i"
13054
+ children: /* @__PURE__ */ jsx50(
13055
+ "svg",
13056
+ {
13057
+ xmlns: "http://www.w3.org/2000/svg",
13058
+ width: "13",
13059
+ height: "13",
13060
+ viewBox: "0 0 13 13",
13061
+ fill: "none",
13062
+ children: /* @__PURE__ */ jsx50(
13063
+ "path",
13064
+ {
13065
+ fillRule: "evenodd",
13066
+ clipRule: "evenodd",
13067
+ 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",
13068
+ fill: "#C3C3C3"
13069
+ }
13070
+ )
13071
+ }
13072
+ )
13056
13073
  }
13057
13074
  )
13058
13075
  ] })
@@ -17115,13 +17132,14 @@ var CharField = (props) => {
17115
17132
  const propValue = value || defaultValue;
17116
17133
  return /* @__PURE__ */ jsx77("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
17117
17134
  }
17135
+ const { t: t3 } = useI18n();
17118
17136
  return /* @__PURE__ */ jsx77(
17119
17137
  Controller,
17120
17138
  {
17121
17139
  name: name2 ?? "",
17122
17140
  control: methods.control,
17123
17141
  rules: {
17124
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
17142
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
17125
17143
  validate: (value2) => {
17126
17144
  if (!value2) return true;
17127
17145
  if (widget === "custom_passord") {
@@ -17133,7 +17151,7 @@ var CharField = (props) => {
17133
17151
  if (!widget) return;
17134
17152
  const inputType = widget === "email" ? "email" : widget === "phone" ? "phone" : widget === "text-only" ? "text" : widget === "number" ? "number" : null;
17135
17153
  if (!inputType) return;
17136
- return validateInput(value2, inputType) || i18n_default.t(
17154
+ return validateInput(value2, inputType) || t3(
17137
17155
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
17138
17156
  );
17139
17157
  }
@@ -17202,7 +17220,7 @@ var CharField = (props) => {
17202
17220
  if (inputValue && !validateInput(inputValue, inputType)) {
17203
17221
  setError(name2, {
17204
17222
  type: "pattern",
17205
- message: i18n_default.t(
17223
+ message: t3(
17206
17224
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
17207
17225
  )
17208
17226
  });
@@ -17214,7 +17232,7 @@ var CharField = (props) => {
17214
17232
  if (!inputValue && required && !invisible) {
17215
17233
  setError(name2, {
17216
17234
  type: "required",
17217
- message: `${string} ${i18n_default.t("must_required")}`
17235
+ message: `${string} ${t3("must_required")}`
17218
17236
  });
17219
17237
  } else {
17220
17238
  clearErrors(name2);
@@ -17315,11 +17333,8 @@ var CheckboxField = (props) => {
17315
17333
  import { useEffect as useEffect13, useRef as useRef7, useState as useState12 } from "react";
17316
17334
  import { Fragment as Fragment19, jsx as jsx79, jsxs as jsxs52 } from "react/jsx-runtime";
17317
17335
  var ColorWrapper = (props) => {
17318
- const {
17319
- colors: colors2,
17320
- defaultColor,
17321
- savePickColor
17322
- } = props;
17336
+ const { colors: colors2, defaultColor, savePickColor } = props;
17337
+ const { t: t3 } = useI18n();
17323
17338
  const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
17324
17339
  const [showFullColors, setIsShowFullColor] = useState12(false);
17325
17340
  const pickColorsRef = useRef7(null);
@@ -17361,7 +17376,7 @@ var ColorWrapper = (props) => {
17361
17376
  className: "",
17362
17377
  place: "top",
17363
17378
  id: `${color?.color}${color?.id}`,
17364
- content: i18n_default.t(color?.name)
17379
+ content: t3(color?.name)
17365
17380
  }
17366
17381
  )
17367
17382
  ] }, color?.id)) }) : /* @__PURE__ */ jsxs52(Fragment19, { children: [
@@ -17383,7 +17398,7 @@ var ColorWrapper = (props) => {
17383
17398
  {
17384
17399
  place: "top",
17385
17400
  id: `${selectedColor?.id}${selectedColor?.name}`,
17386
- content: i18n_default.t(selectedColor?.name)
17401
+ content: t3(selectedColor?.name)
17387
17402
  }
17388
17403
  )
17389
17404
  ] }) });
@@ -32322,7 +32337,7 @@ var Many2ManyTagField = (props) => {
32322
32337
  name: name2 ?? "",
32323
32338
  control: methods.control,
32324
32339
  rules: {
32325
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false
32340
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
32326
32341
  },
32327
32342
  render: ({ field, fieldState: { error: error2 } }) => {
32328
32343
  const { clearErrors } = methods;
package/dist/widgets.js CHANGED
@@ -7846,7 +7846,6 @@ instance.use(Browser).use(initReactI18next).init({
7846
7846
  caches: ["cookie"]
7847
7847
  }
7848
7848
  });
7849
- var i18n_default = instance;
7850
7849
 
7851
7850
  // src/provider/index.tsx
7852
7851
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -12418,8 +12417,25 @@ var TableHead = (props) => {
12418
12417
  fontSize: "8px"
12419
12418
  },
12420
12419
  "data-tooltip-id": `field-help-${col?.field?.name}`,
12421
- className: "lowercase rounded-full bg-primary size-[12px] text-[8px] text-white flex items-center justify-center",
12422
- children: "i"
12420
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12421
+ "svg",
12422
+ {
12423
+ xmlns: "http://www.w3.org/2000/svg",
12424
+ width: "13",
12425
+ height: "13",
12426
+ viewBox: "0 0 13 13",
12427
+ fill: "none",
12428
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12429
+ "path",
12430
+ {
12431
+ fillRule: "evenodd",
12432
+ clipRule: "evenodd",
12433
+ 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",
12434
+ fill: "#C3C3C3"
12435
+ }
12436
+ )
12437
+ }
12438
+ )
12423
12439
  }
12424
12440
  )
12425
12441
  ] })
@@ -16493,13 +16509,14 @@ var CharField = (props) => {
16493
16509
  const propValue = value || defaultValue;
16494
16510
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
16495
16511
  }
16512
+ const { t: t3 } = useI18n();
16496
16513
  return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
16497
16514
  Controller,
16498
16515
  {
16499
16516
  name: name2 ?? "",
16500
16517
  control: methods.control,
16501
16518
  rules: {
16502
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
16519
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
16503
16520
  validate: (value2) => {
16504
16521
  if (!value2) return true;
16505
16522
  if (widget === "custom_passord") {
@@ -16511,7 +16528,7 @@ var CharField = (props) => {
16511
16528
  if (!widget) return;
16512
16529
  const inputType = widget === "email" ? "email" : widget === "phone" ? "phone" : widget === "text-only" ? "text" : widget === "number" ? "number" : null;
16513
16530
  if (!inputType) return;
16514
- return validateInput(value2, inputType) || i18n_default.t(
16531
+ return validateInput(value2, inputType) || t3(
16515
16532
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
16516
16533
  );
16517
16534
  }
@@ -16580,7 +16597,7 @@ var CharField = (props) => {
16580
16597
  if (inputValue && !validateInput(inputValue, inputType)) {
16581
16598
  setError(name2, {
16582
16599
  type: "pattern",
16583
- message: i18n_default.t(
16600
+ message: t3(
16584
16601
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
16585
16602
  )
16586
16603
  });
@@ -16592,7 +16609,7 @@ var CharField = (props) => {
16592
16609
  if (!inputValue && required && !invisible) {
16593
16610
  setError(name2, {
16594
16611
  type: "required",
16595
- message: `${string} ${i18n_default.t("must_required")}`
16612
+ message: `${string} ${t3("must_required")}`
16596
16613
  });
16597
16614
  } else {
16598
16615
  clearErrors(name2);
@@ -16693,11 +16710,8 @@ var CheckboxField = (props) => {
16693
16710
  var import_react41 = require("react");
16694
16711
  var import_jsx_runtime79 = require("react/jsx-runtime");
16695
16712
  var ColorWrapper = (props) => {
16696
- const {
16697
- colors: colors2,
16698
- defaultColor,
16699
- savePickColor
16700
- } = props;
16713
+ const { colors: colors2, defaultColor, savePickColor } = props;
16714
+ const { t: t3 } = useI18n();
16701
16715
  const [selectedColor, setSelectedColor] = (0, import_react41.useState)(colors2[defaultColor]);
16702
16716
  const [showFullColors, setIsShowFullColor] = (0, import_react41.useState)(false);
16703
16717
  const pickColorsRef = (0, import_react41.useRef)(null);
@@ -16739,7 +16753,7 @@ var ColorWrapper = (props) => {
16739
16753
  className: "",
16740
16754
  place: "top",
16741
16755
  id: `${color?.color}${color?.id}`,
16742
- content: i18n_default.t(color?.name)
16756
+ content: t3(color?.name)
16743
16757
  }
16744
16758
  )
16745
16759
  ] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
@@ -16761,7 +16775,7 @@ var ColorWrapper = (props) => {
16761
16775
  {
16762
16776
  place: "top",
16763
16777
  id: `${selectedColor?.id}${selectedColor?.name}`,
16764
- content: i18n_default.t(selectedColor?.name)
16778
+ content: t3(selectedColor?.name)
16765
16779
  }
16766
16780
  )
16767
16781
  ] }) });
@@ -31700,7 +31714,7 @@ var Many2ManyTagField = (props) => {
31700
31714
  name: name2 ?? "",
31701
31715
  control: methods.control,
31702
31716
  rules: {
31703
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false
31717
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
31704
31718
  },
31705
31719
  render: ({ field, fieldState: { error: error2 } }) => {
31706
31720
  const { clearErrors } = methods;
package/dist/widgets.mjs CHANGED
@@ -7784,7 +7784,6 @@ instance.use(Browser).use(initReactI18next).init({
7784
7784
  caches: ["cookie"]
7785
7785
  }
7786
7786
  });
7787
- var i18n_default = instance;
7788
7787
 
7789
7788
  // src/provider/index.tsx
7790
7789
  import { jsx } from "react/jsx-runtime";
@@ -12356,8 +12355,25 @@ var TableHead = (props) => {
12356
12355
  fontSize: "8px"
12357
12356
  },
12358
12357
  "data-tooltip-id": `field-help-${col?.field?.name}`,
12359
- className: "lowercase rounded-full bg-primary size-[12px] text-[8px] text-white flex items-center justify-center",
12360
- children: "i"
12358
+ children: /* @__PURE__ */ jsx50(
12359
+ "svg",
12360
+ {
12361
+ xmlns: "http://www.w3.org/2000/svg",
12362
+ width: "13",
12363
+ height: "13",
12364
+ viewBox: "0 0 13 13",
12365
+ fill: "none",
12366
+ children: /* @__PURE__ */ jsx50(
12367
+ "path",
12368
+ {
12369
+ fillRule: "evenodd",
12370
+ clipRule: "evenodd",
12371
+ 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",
12372
+ fill: "#C3C3C3"
12373
+ }
12374
+ )
12375
+ }
12376
+ )
12361
12377
  }
12362
12378
  )
12363
12379
  ] })
@@ -16431,13 +16447,14 @@ var CharField = (props) => {
16431
16447
  const propValue = value || defaultValue;
16432
16448
  return /* @__PURE__ */ jsx77("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
16433
16449
  }
16450
+ const { t: t3 } = useI18n();
16434
16451
  return /* @__PURE__ */ jsx77(
16435
16452
  Controller,
16436
16453
  {
16437
16454
  name: name2 ?? "",
16438
16455
  control: methods.control,
16439
16456
  rules: {
16440
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false,
16457
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
16441
16458
  validate: (value2) => {
16442
16459
  if (!value2) return true;
16443
16460
  if (widget === "custom_passord") {
@@ -16449,7 +16466,7 @@ var CharField = (props) => {
16449
16466
  if (!widget) return;
16450
16467
  const inputType = widget === "email" ? "email" : widget === "phone" ? "phone" : widget === "text-only" ? "text" : widget === "number" ? "number" : null;
16451
16468
  if (!inputType) return;
16452
- return validateInput(value2, inputType) || i18n_default.t(
16469
+ return validateInput(value2, inputType) || t3(
16453
16470
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
16454
16471
  );
16455
16472
  }
@@ -16518,7 +16535,7 @@ var CharField = (props) => {
16518
16535
  if (inputValue && !validateInput(inputValue, inputType)) {
16519
16536
  setError(name2, {
16520
16537
  type: "pattern",
16521
- message: i18n_default.t(
16538
+ message: t3(
16522
16539
  widget === "email" ? "email-only" : widget === "phone" ? "phone-only" : widget === "text-only" ? "text-only" : "number-only"
16523
16540
  )
16524
16541
  });
@@ -16530,7 +16547,7 @@ var CharField = (props) => {
16530
16547
  if (!inputValue && required && !invisible) {
16531
16548
  setError(name2, {
16532
16549
  type: "required",
16533
- message: `${string} ${i18n_default.t("must_required")}`
16550
+ message: `${string} ${t3("must_required")}`
16534
16551
  });
16535
16552
  } else {
16536
16553
  clearErrors(name2);
@@ -16631,11 +16648,8 @@ var CheckboxField = (props) => {
16631
16648
  import { useEffect as useEffect13, useRef as useRef7, useState as useState12 } from "react";
16632
16649
  import { Fragment as Fragment19, jsx as jsx79, jsxs as jsxs52 } from "react/jsx-runtime";
16633
16650
  var ColorWrapper = (props) => {
16634
- const {
16635
- colors: colors2,
16636
- defaultColor,
16637
- savePickColor
16638
- } = props;
16651
+ const { colors: colors2, defaultColor, savePickColor } = props;
16652
+ const { t: t3 } = useI18n();
16639
16653
  const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
16640
16654
  const [showFullColors, setIsShowFullColor] = useState12(false);
16641
16655
  const pickColorsRef = useRef7(null);
@@ -16677,7 +16691,7 @@ var ColorWrapper = (props) => {
16677
16691
  className: "",
16678
16692
  place: "top",
16679
16693
  id: `${color?.color}${color?.id}`,
16680
- content: i18n_default.t(color?.name)
16694
+ content: t3(color?.name)
16681
16695
  }
16682
16696
  )
16683
16697
  ] }, color?.id)) }) : /* @__PURE__ */ jsxs52(Fragment19, { children: [
@@ -16699,7 +16713,7 @@ var ColorWrapper = (props) => {
16699
16713
  {
16700
16714
  place: "top",
16701
16715
  id: `${selectedColor?.id}${selectedColor?.name}`,
16702
- content: i18n_default.t(selectedColor?.name)
16716
+ content: t3(selectedColor?.name)
16703
16717
  }
16704
16718
  )
16705
16719
  ] }) });
@@ -31638,7 +31652,7 @@ var Many2ManyTagField = (props) => {
31638
31652
  name: name2 ?? "",
31639
31653
  control: methods.control,
31640
31654
  rules: {
31641
- required: required && !invisible ? { value: true, message: `${string} ${i18n_default.t("must_required")}` } : false
31655
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
31642
31656
  },
31643
31657
  render: ({ field, fieldState: { error: error2 } }) => {
31644
31658
  const { clearErrors } = methods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",