@fctc/sme-widget-ui 1.7.9 → 1.8.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
@@ -18541,7 +18541,7 @@ var baseStyle = {
18541
18541
  fontWeight: 500,
18542
18542
  cursor: "pointer",
18543
18543
  transition: "all 0.3s ease-in-out",
18544
- height: "fit-content !important"
18544
+ height: "fit-content"
18545
18545
  };
18546
18546
  var ButtonBadgeField = (props) => {
18547
18547
  const { defaultValue, selection, value, formValues, domainHelper } = props;
@@ -33676,18 +33676,10 @@ var HtmlField = (props) => {
33676
33676
  // src/widgets/basic/image-field/image.tsx
33677
33677
  var import_jsx_runtime88 = require("react/jsx-runtime");
33678
33678
  var ImageField = (props) => {
33679
- const { value, type, name: name2 } = props;
33679
+ const { value, type, name: name2, baseURL } = props;
33680
33680
  if (!value) return null;
33681
33681
  if (type === "url") {
33682
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
33683
- "img",
33684
- {
33685
- src: `https://api.vitrust.app/c2${value}`,
33686
- width: 48,
33687
- height: 48,
33688
- alt: name2
33689
- }
33690
- );
33682
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
33691
33683
  }
33692
33684
  return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
33693
33685
  };
package/dist/index.mjs CHANGED
@@ -18421,7 +18421,7 @@ var baseStyle = {
18421
18421
  fontWeight: 500,
18422
18422
  cursor: "pointer",
18423
18423
  transition: "all 0.3s ease-in-out",
18424
- height: "fit-content !important"
18424
+ height: "fit-content"
18425
18425
  };
18426
18426
  var ButtonBadgeField = (props) => {
18427
18427
  const { defaultValue, selection, value, formValues, domainHelper } = props;
@@ -33556,18 +33556,10 @@ var HtmlField = (props) => {
33556
33556
  // src/widgets/basic/image-field/image.tsx
33557
33557
  import { jsx as jsx90 } from "react/jsx-runtime";
33558
33558
  var ImageField = (props) => {
33559
- const { value, type, name: name2 } = props;
33559
+ const { value, type, name: name2, baseURL } = props;
33560
33560
  if (!value) return null;
33561
33561
  if (type === "url") {
33562
- return /* @__PURE__ */ jsx90(
33563
- "img",
33564
- {
33565
- src: `https://api.vitrust.app/c2${value}`,
33566
- width: 48,
33567
- height: 48,
33568
- alt: name2
33569
- }
33570
- );
33562
+ return /* @__PURE__ */ jsx90("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
33571
33563
  }
33572
33564
  return /* @__PURE__ */ jsx90("div", { id: "qr-code", children: /* @__PURE__ */ jsx90("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
33573
33565
  };
@@ -294,7 +294,11 @@ declare const FloatTimeField: React__default.FC<IInputFieldProps>;
294
294
 
295
295
  declare const HtmlField: (props: IInputFieldProps) => JSX.Element;
296
296
 
297
- declare const ImageField: (props: IInputFieldProps) => JSX.Element | null;
297
+ interface ImageFieldProps extends IInputFieldProps {
298
+ baseURL?: string;
299
+ }
300
+
301
+ declare const ImageField: (props: ImageFieldProps) => JSX.Element | null;
298
302
 
299
303
  interface IMany2ManyTagsProps extends IInputFieldProps {
300
304
  options: any[];
package/dist/widgets.d.ts CHANGED
@@ -294,7 +294,11 @@ declare const FloatTimeField: React__default.FC<IInputFieldProps>;
294
294
 
295
295
  declare const HtmlField: (props: IInputFieldProps) => JSX.Element;
296
296
 
297
- declare const ImageField: (props: IInputFieldProps) => JSX.Element | null;
297
+ interface ImageFieldProps extends IInputFieldProps {
298
+ baseURL?: string;
299
+ }
300
+
301
+ declare const ImageField: (props: ImageFieldProps) => JSX.Element | null;
298
302
 
299
303
  interface IMany2ManyTagsProps extends IInputFieldProps {
300
304
  options: any[];
package/dist/widgets.js CHANGED
@@ -18166,7 +18166,7 @@ var baseStyle = {
18166
18166
  fontWeight: 500,
18167
18167
  cursor: "pointer",
18168
18168
  transition: "all 0.3s ease-in-out",
18169
- height: "fit-content !important"
18169
+ height: "fit-content"
18170
18170
  };
18171
18171
  var ButtonBadgeField = (props) => {
18172
18172
  const { defaultValue, selection, value, formValues, domainHelper } = props;
@@ -33301,18 +33301,10 @@ var HtmlField = (props) => {
33301
33301
  // src/widgets/basic/image-field/image.tsx
33302
33302
  var import_jsx_runtime88 = require("react/jsx-runtime");
33303
33303
  var ImageField = (props) => {
33304
- const { value, type, name: name2 } = props;
33304
+ const { value, type, name: name2, baseURL } = props;
33305
33305
  if (!value) return null;
33306
33306
  if (type === "url") {
33307
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
33308
- "img",
33309
- {
33310
- src: `https://api.vitrust.app/c2${value}`,
33311
- width: 48,
33312
- height: 48,
33313
- alt: name2
33314
- }
33315
- );
33307
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
33316
33308
  }
33317
33309
  return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
33318
33310
  };
package/dist/widgets.mjs CHANGED
@@ -18103,7 +18103,7 @@ var baseStyle = {
18103
18103
  fontWeight: 500,
18104
18104
  cursor: "pointer",
18105
18105
  transition: "all 0.3s ease-in-out",
18106
- height: "fit-content !important"
18106
+ height: "fit-content"
18107
18107
  };
18108
18108
  var ButtonBadgeField = (props) => {
18109
18109
  const { defaultValue, selection, value, formValues, domainHelper } = props;
@@ -33238,18 +33238,10 @@ var HtmlField = (props) => {
33238
33238
  // src/widgets/basic/image-field/image.tsx
33239
33239
  import { jsx as jsx90 } from "react/jsx-runtime";
33240
33240
  var ImageField = (props) => {
33241
- const { value, type, name: name2 } = props;
33241
+ const { value, type, name: name2, baseURL } = props;
33242
33242
  if (!value) return null;
33243
33243
  if (type === "url") {
33244
- return /* @__PURE__ */ jsx90(
33245
- "img",
33246
- {
33247
- src: `https://api.vitrust.app/c2${value}`,
33248
- width: 48,
33249
- height: 48,
33250
- alt: name2
33251
- }
33252
- );
33244
+ return /* @__PURE__ */ jsx90("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
33253
33245
  }
33254
33246
  return /* @__PURE__ */ jsx90("div", { id: "qr-code", children: /* @__PURE__ */ jsx90("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
33255
33247
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "1.7.9",
3
+ "version": "1.8.1",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",