@oub/fusion 0.2.104 → 0.2.106

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/fusion.js CHANGED
@@ -1454,7 +1454,7 @@ const Hi = /* @__PURE__ */ he(zu, [["render", Wu], ["__scopeId", "data-v-71c2433
1454
1454
  }
1455
1455
  }
1456
1456
  });
1457
- const zi = (e) => (so("data-v-12a3738f"), e = e(), lo(), e), Yu = ["data-test"], Gu = { class: "fusion-select-panel" }, Zu = { class: "fusion-select-panel-content" }, _u = { class: "list-wrapper" }, $u = {
1457
+ const zi = (e) => (so("data-v-50ad0004"), e = e(), lo(), e), Yu = ["data-test"], Gu = { class: "fusion-select-panel" }, Zu = { class: "fusion-select-panel-content" }, _u = { class: "list-wrapper" }, $u = {
1458
1458
  key: 0,
1459
1459
  class: "p-xl",
1460
1460
  "data-test": "search-loading-wrapper"
@@ -1577,7 +1577,7 @@ function fd(e, t, a, r, n, o) {
1577
1577
  _: 3
1578
1578
  }, 8, ["options", "onTrigger"]);
1579
1579
  }
1580
- const bo = /* @__PURE__ */ he(Ku, [["render", fd], ["__scopeId", "data-v-12a3738f"]]), hd = {
1580
+ const bo = /* @__PURE__ */ he(Ku, [["render", fd], ["__scopeId", "data-v-50ad0004"]]), hd = {
1581
1581
  name: "SVGArrowDown"
1582
1582
  }, md = {
1583
1583
  xmlns: "http://www.w3.org/2000/svg",
@@ -2623,7 +2623,7 @@ function Hd(e, t, a, r, n, o) {
2623
2623
  }, 1032, ["selected", "data-test", "onKeydown", "onClick"]))), 128))
2624
2624
  ], 8, Rd);
2625
2625
  }
2626
- const zd = /* @__PURE__ */ he(Ed, [["render", Hd], ["__scopeId", "data-v-93005139"]]), jd = {
2626
+ const zd = /* @__PURE__ */ he(Ed, [["render", Hd], ["__scopeId", "data-v-6e820bf3"]]), jd = {
2627
2627
  name: "CountrySelectDropdown",
2628
2628
  components: { SVGArrowDown: ji, CountryFlag: Xi },
2629
2629
  props: {
@@ -2682,7 +2682,7 @@ function Kd(e, t, a, r, n, o) {
2682
2682
  ])
2683
2683
  ], 10, Jd);
2684
2684
  }
2685
- const Yd = /* @__PURE__ */ he(jd, [["render", Kd], ["__scopeId", "data-v-e0291207"]]), Gd = le({
2685
+ const Yd = /* @__PURE__ */ he(jd, [["render", Kd], ["__scopeId", "data-v-0de9450e"]]), Gd = le({
2686
2686
  name: "FusionPhoneInput",
2687
2687
  components: { CountrySelectList: zd, FusionPanel: bo, CountrySelectDropdown: Yd, SVGExclamationTriangle: wt },
2688
2688
  props: {
@@ -3180,6 +3180,11 @@ const Wi = /* @__PURE__ */ he(Nc, [["render", qc]]), Hc = le({
3180
3180
  dataTest: {
3181
3181
  type: String,
3182
3182
  default: "fusion-icon-button"
3183
+ },
3184
+ ariaLabel: {
3185
+ type: String,
3186
+ required: !1,
3187
+ default: void 0
3183
3188
  }
3184
3189
  },
3185
3190
  emits: ["click"],
@@ -3247,7 +3252,7 @@ const Wi = /* @__PURE__ */ he(Nc, [["render", qc]]), Hc = le({
3247
3252
  }
3248
3253
  }
3249
3254
  });
3250
- const zc = ["disabled", "data-test", "type"], jc = { key: 1 };
3255
+ const zc = ["disabled", "data-test", "type", "aria-label"], jc = { key: 1 };
3251
3256
  function Jc(e, t, a, r, n, o) {
3252
3257
  const i = ne("FusionLoadingSpinner");
3253
3258
  return d(), h("button", {
@@ -3257,6 +3262,7 @@ function Jc(e, t, a, r, n, o) {
3257
3262
  class: H(["fusion-icon-button fusion-button", [e.variantTypeClass, e.variantStyleClass, e.buttonSizeClass]]),
3258
3263
  "data-test": e.dataTest,
3259
3264
  type: e.type,
3265
+ "aria-label": e.ariaLabel,
3260
3266
  onFocus: t[0] || (t[0] = (s) => e.focus = !0),
3261
3267
  onBlur: t[1] || (t[1] = (s) => e.focus = !1),
3262
3268
  onMouseover: t[2] || (t[2] = (s) => e.hover = !0),
@@ -3410,7 +3416,7 @@ function $c(e, t, a, r, n, o) {
3410
3416
  _: 3
3411
3417
  });
3412
3418
  }
3413
- const G3 = /* @__PURE__ */ he(Xc, [["render", $c], ["__scopeId", "data-v-ef671afd"]]);
3419
+ const G3 = /* @__PURE__ */ he(Xc, [["render", $c], ["__scopeId", "data-v-a6dafb6d"]]);
3414
3420
  function Ft(e) {
3415
3421
  "@babel/helpers - typeof";
3416
3422
  return Ft = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
@@ -12902,7 +12908,7 @@ function U1(e, t, a, r, n, o) {
12902
12908
  })) : C("", !0)
12903
12909
  ], 64);
12904
12910
  }
12905
- const nk = /* @__PURE__ */ he(D1, [["render", U1], ["__scopeId", "data-v-7a2d38d7"]]), I1 = le({
12911
+ const nk = /* @__PURE__ */ he(D1, [["render", U1], ["__scopeId", "data-v-3bd17874"]]), I1 = le({
12906
12912
  name: "FusionSideNavigationItem",
12907
12913
  props: {
12908
12914
  item: {
@@ -13324,20 +13330,21 @@ function k0(e, t, a, r, n, o) {
13324
13330
  size: "small",
13325
13331
  "variant-type": "primary",
13326
13332
  class: "fusion-toolbar-back-button",
13333
+ "aria-label": e.backButtonAriaLabel,
13327
13334
  onClick: e.handleBackClick
13328
13335
  }, {
13329
13336
  icon: be(() => [
13330
13337
  ue(i)
13331
13338
  ]),
13332
13339
  _: 1
13333
- }, 8, ["onClick"])) : C("", !0),
13340
+ }, 8, ["aria-label", "onClick"])) : C("", !0),
13334
13341
  g("div", g0, [
13335
13342
  e.title ? (d(), h("h2", y0, _(e.title), 1)) : C("", !0),
13336
13343
  e.helperText ? (d(), h("p", b0, _(e.helperText), 1)) : C("", !0)
13337
13344
  ])
13338
13345
  ]);
13339
13346
  }
13340
- const lk = /* @__PURE__ */ he(m0, [["render", k0], ["__scopeId", "data-v-406fe148"]]), A0 = le({
13347
+ const lk = /* @__PURE__ */ he(m0, [["render", k0], ["__scopeId", "data-v-d38e99f9"]]), A0 = le({
13341
13348
  name: "FusionActionBar"
13342
13349
  });
13343
13350
  const w0 = { class: "fusion-action-bar" };
@@ -13890,7 +13897,7 @@ const J0 = /* @__PURE__ */ he(z0, [["render", j0], ["__scopeId", "data-v-a88d594
13890
13897
  }
13891
13898
  }
13892
13899
  };
13893
- const W0 = (e) => (so("data-v-6aec5dd1"), e = e(), lo(), e), K0 = ["aria-labelledby"], Y0 = /* @__PURE__ */ W0(() => /* @__PURE__ */ g("div", {
13900
+ const W0 = (e) => (so("data-v-9397fe0b"), e = e(), lo(), e), K0 = ["aria-labelledby"], Y0 = /* @__PURE__ */ W0(() => /* @__PURE__ */ g("div", {
13894
13901
  class: "fusion-modal-background",
13895
13902
  "aria-hidden": "true"
13896
13903
  }, null, -1));
@@ -13948,7 +13955,7 @@ function G0(e, t, a, r, n, o) {
13948
13955
  Y0
13949
13956
  ], 2);
13950
13957
  }
13951
- const fk = /* @__PURE__ */ he(X0, [["render", G0], ["__scopeId", "data-v-6aec5dd1"]]), Z0 = 12, Ho = le({
13958
+ const fk = /* @__PURE__ */ he(X0, [["render", G0], ["__scopeId", "data-v-9397fe0b"]]), Z0 = 12, Ho = le({
13952
13959
  name: "FusionCircularProgressIndicator",
13953
13960
  props: {
13954
13961
  size: {
@@ -17255,26 +17262,29 @@ const F3 = /* @__PURE__ */ he(C3, [["render", T3]]), D3 = le({
17255
17262
  },
17256
17263
  acceptedFileTypes() {
17257
17264
  return this.allowedFileTypes.join(",");
17265
+ },
17266
+ uppyClient() {
17267
+ return new F2({
17268
+ // https://uppy.io/docs/uppy/#options
17269
+ restrictions: {
17270
+ maxNumberOfFiles: this.maxFiles,
17271
+ maxFileSize: this.maxFileSize,
17272
+ allowedFileTypes: this.allowedFileTypes
17273
+ },
17274
+ autoProceed: this.automaticallyUpload
17275
+ });
17258
17276
  }
17259
17277
  },
17260
17278
  mounted() {
17261
17279
  this.initUppy();
17262
17280
  },
17263
17281
  beforeUnmount() {
17264
- this.uppy && (this.uppy.cancelAll(), this.uppy.clear(), this.uppy = null);
17282
+ this.uppyClient && (this.uppyClient.cancelAll(), this.uppyClient.clear());
17265
17283
  },
17266
17284
  methods: {
17267
17285
  // Initialize Uppy
17268
17286
  initUppy() {
17269
- this.uppy = new F2({
17270
- // https://uppy.io/docs/uppy/#options
17271
- restrictions: {
17272
- maxNumberOfFiles: this.maxFiles,
17273
- maxFileSize: this.maxFileSize,
17274
- allowedFileTypes: this.allowedFileTypes
17275
- },
17276
- autoProceed: this.automaticallyUpload
17277
- }), this.uppy && this.uppy.use(Gs, {
17287
+ this.uppyClient && this.uppyClient.use(Gs, {
17278
17288
  // https://uppy.io/docs/xhr-upload/#options
17279
17289
  endpoint: this.uploadUrl,
17280
17290
  headers: this.headers,
@@ -17286,18 +17296,18 @@ const F3 = /* @__PURE__ */ he(C3, [["render", T3]]), D3 = le({
17286
17296
  shouldRetry(e) {
17287
17297
  return !1;
17288
17298
  }
17289
- }), this.uppy && (this.uppy.on("file-added", (e) => {
17290
- this.files = this.uppy.getFiles(), e && (this.uppy.setMeta(this.formData), this.$emit("uppy-file-added", e), this.clearInternalError());
17291
- }), this.uppy.on("file-removed", (e) => {
17292
- this.files = this.uppy.getFiles(), e && this.$emit("uppy-file-removed", e);
17293
- }), this.uppy.on("upload", () => {
17299
+ }), this.uppyClient && (this.uppyClient.on("file-added", (e) => {
17300
+ this.files = this.uppyClient.getFiles(), e && (this.uppyClient.setMeta(this.formData), this.$emit("uppy-file-added", e), this.clearInternalError());
17301
+ }), this.uppyClient.on("file-removed", (e) => {
17302
+ this.files = this.uppyClient.getFiles(), e && this.$emit("uppy-file-removed", e);
17303
+ }), this.uppyClient.on("upload", () => {
17294
17304
  this.isUploading = !0;
17295
- }), this.uppy.on("upload-progress", () => {
17296
- this.files = this.uppy.getFiles();
17297
- }), this.uppy.on("upload-success", (e, t) => {
17298
- this.files = this.uppy.getFiles(), e && (this.$emit("uppy-upload-success", { file: e, response: t }), this.clearInternalError());
17299
- }), this.uppy.on("upload-error", (e, t) => {
17300
- this.files = this.uppy.getFiles();
17305
+ }), this.uppyClient.on("upload-progress", () => {
17306
+ this.files = this.uppyClient.getFiles();
17307
+ }), this.uppyClient.on("upload-success", (e, t) => {
17308
+ this.files = this.uppyClient.getFiles(), e && (this.$emit("uppy-upload-success", { file: e, response: t }), this.clearInternalError());
17309
+ }), this.uppyClient.on("upload-error", (e, t) => {
17310
+ this.files = this.uppyClient.getFiles();
17301
17311
  const a = `Upload failed: ${t.message}`;
17302
17312
  switch (this.$emit("uppy-upload-error", t), t.cause) {
17303
17313
  case "Internal Server Error":
@@ -17312,11 +17322,11 @@ const F3 = /* @__PURE__ */ he(C3, [["render", T3]]), D3 = le({
17312
17322
  this.setInternalError(a);
17313
17323
  }
17314
17324
  e && this.removeFile(e);
17315
- }), this.uppy.on("complete", (e) => {
17325
+ }), this.uppyClient.on("complete", (e) => {
17316
17326
  this.isUploading = !1;
17317
17327
  const t = (e == null ? void 0 : e.failed) || [], a = (e == null ? void 0 : e.successful) || [];
17318
17328
  t.length === 0 && a.length > 0 && this.clearInternalError(), this.$emit("uppy-upload-complete");
17319
- }), this.uppy.on("restriction-failed", (e, t) => {
17329
+ }), this.uppyClient.on("restriction-failed", (e, t) => {
17320
17330
  let a = t.message;
17321
17331
  a.startsWith("You can only upload:") && (this.allowedFileTypes && this.allowedFileTypes.length > 0 ? a = `The selected files must be ${this.allowedFileTypes.join(", ")}` : a = "File type not allowed. Please check the allowed file types.", this.$emit("uppy-restriction-error", "incorrect-file-type")), a.includes("exceeds maximum allowed size") && (a = `The file size must not exceed ${Zs(this.maxFileSize)}.`, this.$emit("uppy-restriction-error", "incorrect-file-size")), a.includes("You can only upload") && (a = `You can only upload a maximum of ${this.maxFiles} file${this.maxFiles !== 1 ? "s" : ""}.`, this.$emit("uppy-restriction-error", "incorrect-file-amount")), this.setInternalError(a);
17322
17332
  }));
@@ -17333,9 +17343,9 @@ const F3 = /* @__PURE__ */ he(C3, [["render", T3]]), D3 = le({
17333
17343
  this.addFiles(a), t.value = "";
17334
17344
  },
17335
17345
  addFiles(e) {
17336
- this.disabled || !this.uppy || e.forEach((t) => {
17346
+ this.disabled || !this.uppyClient || e.forEach((t) => {
17337
17347
  try {
17338
- this.uppy.addFile({
17348
+ this.uppyClient.addFile({
17339
17349
  name: t.name,
17340
17350
  type: t.type,
17341
17351
  data: t,
@@ -17347,10 +17357,10 @@ const F3 = /* @__PURE__ */ he(C3, [["render", T3]]), D3 = le({
17347
17357
  });
17348
17358
  },
17349
17359
  removeFile(e) {
17350
- this.uppy && (this.uppy.removeFile(e.id), this.$emit("uppy-file-removed", e));
17360
+ this.uppyClient && (this.uppyClient.removeFile(e.id), this.$emit("uppy-file-removed", e));
17351
17361
  },
17352
17362
  clearFiles() {
17353
- this.uppy && (this.uppy.clear(), this.files = []);
17363
+ this.uppyClient && (this.uppyClient.clear(), this.files = []);
17354
17364
  },
17355
17365
  setInternalError(e) {
17356
17366
  this.internalErrorMessage = e;
@@ -17421,7 +17431,7 @@ function V3(e, t, a, r, n, o) {
17421
17431
  ], 2)) : C("", !0)
17422
17432
  ], 10, B3);
17423
17433
  }
17424
- const vk = /* @__PURE__ */ he(D3, [["render", V3], ["__scopeId", "data-v-2e81a2c1"]]), N3 = le({
17434
+ const vk = /* @__PURE__ */ he(D3, [["render", V3], ["__scopeId", "data-v-7e4f151b"]]), N3 = le({
17425
17435
  name: "FusionRangeDatePicker",
17426
17436
  components: { SVGCalendar: qo, SVGExclamationTriangle: wt, VueDatePicker: Un },
17427
17437
  props: {