@regulaforensics/idv-gui 3.10.609-nightly → 3.10.610-nightly

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/main.js CHANGED
@@ -1216,23 +1216,27 @@ var vn = () => {
1216
1216
  }, yn = ({ isGenericTemplate: e, isPressed: t, isHovered: n, backgroundColor: r, highlightColor: i, hoverColor: a }) => {
1217
1217
  let o = U(r) || "transparent", s = U(i), c = U(a);
1218
1218
  return e && t ? s || o : e && n ? c || o : !e && n && s || o;
1219
- }, bn = ({ title: e, image: t, responseBody: n, backgroundColor: r = "transparent", cornerRadius: i, highlightColor: a, hoverColor: o, dataTestId: s, borderColor: c, borderWidth: l, type: u = "RESPONSE_BODY", paddings: d, isGenericTemplate: f = !1, onClick: p }) => {
1220
- var m;
1221
- let { perform: h } = vt(), { isHovered: g, isPressed: _, interactionHandlers: v } = vn(), y = yn({
1222
- isGenericTemplate: f,
1223
- isPressed: _,
1224
- isHovered: g,
1225
- backgroundColor: r,
1226
- highlightColor: a,
1227
- hoverColor: o
1228
- }), b = (e) => {
1229
- if (p && p(e), u !== "RESPONSE_BODY" && !(u === "FORM" && n)) return;
1219
+ }, bn = ({ title: e, image: t, responseBody: n, url: r, backgroundColor: i = "transparent", cornerRadius: a, highlightColor: o, hoverColor: s, dataTestId: c, borderColor: l, borderWidth: u, type: d = "RESPONSE_BODY", paddings: f, isGenericTemplate: p = !1, onClick: m }) => {
1220
+ var h;
1221
+ let { perform: g } = vt(), { isHovered: _, isPressed: v, interactionHandlers: y } = vn(), b = yn({
1222
+ isGenericTemplate: p,
1223
+ isPressed: v,
1224
+ isHovered: _,
1225
+ backgroundColor: i,
1226
+ highlightColor: o,
1227
+ hoverColor: s
1228
+ }), x = (e) => {
1229
+ if (d === "URL") {
1230
+ r && window.open(r, "_blank", "noopener,noreferrer");
1231
+ return;
1232
+ }
1233
+ if (m && m(e), d !== "RESPONSE_BODY" && !(d === "FORM" && n)) return;
1230
1234
  let t = JSON.parse(JSON.stringify(n));
1231
- rn(t), h(t, u === "FORM" ? ut.FORM : ut.DATA);
1232
- }, x = f ? z({}, zt(d)) : {
1235
+ rn(t), g(t, d === "FORM" ? ut.FORM : ut.DATA);
1236
+ }, S = p ? z({}, zt(f)) : {
1233
1237
  padding: "10px 16px",
1234
1238
  height: "50px"
1235
- }, S = z(z({
1239
+ }, C = z(z({
1236
1240
  width: "100%",
1237
1241
  textAlign: "center",
1238
1242
  fontSize: "16px",
@@ -1243,23 +1247,23 @@ var vn = () => {
1243
1247
  alignItems: "center",
1244
1248
  justifyContent: "center",
1245
1249
  gap: 10,
1246
- borderRadius: i || 0,
1247
- borderStyle: c && l ? "solid" : void 0,
1248
- backgroundColor: y,
1249
- borderColor: (m = U(c)) == null ? "none" : m,
1250
- borderWidth: l == null ? 0 : l,
1250
+ borderRadius: a || 0,
1251
+ borderStyle: l && u ? "solid" : void 0,
1252
+ backgroundColor: b,
1253
+ borderColor: (h = U(l)) == null ? "none" : h,
1254
+ borderWidth: u == null ? 0 : u,
1251
1255
  overflow: "hidden",
1252
1256
  transition: ".3s",
1253
1257
  outlineColor: Jt
1254
- }, f && { WebkitTapHighlightColor: "transparent" }), x);
1258
+ }, p && { WebkitTapHighlightColor: "transparent" }), S);
1255
1259
  return /* @__PURE__ */ B("button", z(z({
1256
1260
  "data-ui": "gui-button",
1257
1261
  part: "gui-button",
1258
- type: u === "FORM" ? "submit" : "button",
1259
- "data-test": s,
1260
- style: S
1261
- }, v), {}, {
1262
- onClick: b,
1262
+ type: d === "FORM" ? "submit" : "button",
1263
+ "data-test": c,
1264
+ style: C
1265
+ }, y), {}, {
1266
+ onClick: x,
1263
1267
  children: [t && /* @__PURE__ */ B("div", {
1264
1268
  style: {
1265
1269
  width: "auto",
@@ -1271,7 +1275,7 @@ var vn = () => {
1271
1275
  children: /* @__PURE__ */ B(W, z({}, t))
1272
1276
  }), e && /* @__PURE__ */ B("div", {
1273
1277
  style: { flexGrow: +!t },
1274
- children: /* @__PURE__ */ B(G, z(z({}, e), {}, { isGenericTemplate: f }))
1278
+ children: /* @__PURE__ */ B(G, z(z({}, e), {}, { isGenericTemplate: p }))
1275
1279
  })]
1276
1280
  }));
1277
1281
  }, xn = ["items"], Sn = (e) => {
@@ -6113,6 +6117,7 @@ var vo = ce(void 0), yo = ({ children: e, handlers: t }) => /* @__PURE__ */ B(vo
6113
6117
  title: e.title,
6114
6118
  image: e.image,
6115
6119
  responseBody: e.responseBody,
6120
+ url: e.url,
6116
6121
  borderColor: e.borderColor,
6117
6122
  borderWidth: e.borderWidth,
6118
6123
  type: e.type,
@@ -6131,56 +6136,60 @@ var vo = ce(void 0), yo = ({ children: e, handlers: t }) => /* @__PURE__ */ B(vo
6131
6136
  //#region src/components/imageButton/index.tsx
6132
6137
  R();
6133
6138
  var Co = (e) => {
6134
- let { image: t, responseBody: n, paddings: r, backgroundColor: i, highlightColor: a, hoverColor: o, cornerRadius: s, onClick: c } = e, { perform: l } = vt(), [u, d] = N(!0), [f, p] = N(0), { failedAssets: h } = bt(), { isHovered: g, isPressed: _, interactionHandlers: v } = vn(), y = Vt(t, h)[f];
6135
- if (!y) return null;
6136
- let { imageId: b, imageURL: x, base64: S, contentMode: C = Et.ASPECT_FILL, cornerRadius: w, backgroundColor: T } = y, E = So({
6137
- isPressed: _,
6138
- isHovered: g,
6139
- backgroundColor: i,
6140
- highlightColor: a,
6141
- hoverColor: o
6142
- }), D = u && x, ee = () => {
6143
- d(!1);
6144
- }, O = () => {
6145
- p((e) => e + 1);
6146
- }, te = (e) => {
6139
+ let { image: t, responseBody: n, type: r, url: i, paddings: a, backgroundColor: o, highlightColor: s, hoverColor: c, cornerRadius: l, onClick: u } = e, { perform: d } = vt(), [f, p] = N(!0), [h, g] = N(0), { failedAssets: _ } = bt(), { isHovered: v, isPressed: y, interactionHandlers: b } = vn(), x = Vt(t, _)[h];
6140
+ if (!x) return null;
6141
+ let { imageId: S, imageURL: C, base64: w, contentMode: T = Et.ASPECT_FILL, cornerRadius: E, backgroundColor: D } = x, ee = So({
6142
+ isPressed: y,
6143
+ isHovered: v,
6144
+ backgroundColor: o,
6145
+ highlightColor: s,
6146
+ hoverColor: c
6147
+ }), O = f && C, te = () => {
6148
+ p(!1);
6149
+ }, k = () => {
6150
+ g((e) => e + 1);
6151
+ }, A = (e) => {
6152
+ if (r === "URL") {
6153
+ i && window.open(i, "_blank", "noopener,noreferrer");
6154
+ return;
6155
+ }
6147
6156
  if (n) {
6148
6157
  let e = JSON.parse(JSON.stringify(n));
6149
- rn(e), l(e, ut.DATA);
6158
+ rn(e), d(e, ut.DATA);
6150
6159
  }
6151
- c && c(e);
6152
- }, k = {
6160
+ u && u(e);
6161
+ }, ne = {
6153
6162
  width: "100%",
6154
6163
  height: "100%"
6155
- }, A, ne = U(T) || "transparent";
6156
- return S && (A = /* @__PURE__ */ B("img", {
6157
- style: z(z({}, k), {}, {
6158
- objectFit: Ht(C),
6159
- borderRadius: w,
6160
- backgroundColor: ne,
6164
+ }, re, ie = U(D) || "transparent";
6165
+ return w && (re = /* @__PURE__ */ B("img", {
6166
+ style: z(z({}, ne), {}, {
6167
+ objectFit: Ht(T),
6168
+ borderRadius: E,
6169
+ backgroundColor: ie,
6161
6170
  display: "block"
6162
6171
  }),
6163
- src: S,
6164
- onError: O
6165
- })), b && (A = /* @__PURE__ */ B(qt, {
6166
- type: b in Kt ? b : "default",
6167
- contentMode: C,
6168
- cornerRadius: w,
6169
- backgroundColor: ne,
6172
+ src: w,
6173
+ onError: k
6174
+ })), S && (re = /* @__PURE__ */ B(qt, {
6175
+ type: S in Kt ? S : "default",
6176
+ contentMode: T,
6177
+ cornerRadius: E,
6178
+ backgroundColor: ie,
6170
6179
  isFullSize: !0
6171
- })), x && (A = /* @__PURE__ */ B(m, { children: [D && /* @__PURE__ */ B("div", { style: z(z({}, k), {}, {
6180
+ })), C && (re = /* @__PURE__ */ B(m, { children: [O && /* @__PURE__ */ B("div", { style: z(z({}, ne), {}, {
6172
6181
  backgroundColor: "#e0e0e0",
6173
- borderRadius: w
6182
+ borderRadius: E
6174
6183
  }) }), /* @__PURE__ */ B("img", {
6175
- style: z(z({}, k), {}, {
6176
- objectFit: Ht(C),
6177
- borderRadius: w,
6178
- backgroundColor: ne,
6179
- display: D ? "none" : "block"
6184
+ style: z(z({}, ne), {}, {
6185
+ objectFit: Ht(T),
6186
+ borderRadius: E,
6187
+ backgroundColor: ie,
6188
+ display: O ? "none" : "block"
6180
6189
  }),
6181
- src: x,
6182
- onLoad: ee,
6183
- onError: O
6190
+ src: C,
6191
+ onLoad: te,
6192
+ onError: k
6184
6193
  })] })), /* @__PURE__ */ B("button", z(z({
6185
6194
  type: "button",
6186
6195
  style: z({
@@ -6193,12 +6202,12 @@ var Co = (e) => {
6193
6202
  margin: 0,
6194
6203
  display: "inline-flex",
6195
6204
  cursor: "pointer",
6196
- backgroundColor: E,
6197
- borderRadius: s
6198
- }, zt(r))
6199
- }, v), {}, {
6200
- onClick: te,
6201
- children: A
6205
+ backgroundColor: ee,
6206
+ borderRadius: l
6207
+ }, zt(a))
6208
+ }, b), {}, {
6209
+ onClick: A,
6210
+ children: re
6202
6211
  }));
6203
6212
  }, wo = (e) => {
6204
6213
  let t = bo(), n = t == null ? void 0 : t.handlers, r;
@@ -6215,6 +6224,8 @@ var Co = (e) => {
6215
6224
  timeout: e.image.timeout,
6216
6225
  placeholderImage: e.image.placeholderImage
6217
6226
  },
6227
+ type: e.type,
6228
+ url: e.url,
6218
6229
  responseBody: e.responseBody,
6219
6230
  paddings: e.paddings,
6220
6231
  cornerRadius: e.cornerRadius,
@@ -6306,6 +6317,7 @@ var Co = (e) => {
6306
6317
  timeout: e.content.image.timeout,
6307
6318
  placeholderImage: e.content.image.placeholderImage
6308
6319
  },
6320
+ url: e.content.url,
6309
6321
  responseBody: e.content.responseBody,
6310
6322
  cornerRadius: e.content.cornerRadius,
6311
6323
  backgroundColor: e.content.backgroundColor,
@@ -6318,6 +6330,7 @@ var Co = (e) => {
6318
6330
  title: e.content.title,
6319
6331
  image: e.content.image,
6320
6332
  responseBody: e.content.responseBody,
6333
+ url: e.content.url,
6321
6334
  borderColor: e.content.borderColor,
6322
6335
  borderWidth: e.content.borderWidth,
6323
6336
  type: e.content.type,