@oub/fusion 0.2.99 → 0.2.101

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
@@ -14247,11 +14247,16 @@ const fk = /* @__PURE__ */ he(yy, [["render", ky], ["__scopeId", "data-v-9abe1eb
14247
14247
  }
14248
14248
  },
14249
14249
  watch: {
14250
- date(e) {
14251
- if (e) {
14252
- const { month: t, year: a } = e;
14253
- this.$emit("update:modelValue", new Date(a, t, 1));
14254
- }
14250
+ modelValue: {
14251
+ handler(e) {
14252
+ if (!e) {
14253
+ this.date = null;
14254
+ return;
14255
+ }
14256
+ const t = e instanceof Date ? e.getMonth() : e.month, a = e instanceof Date ? e.getFullYear() : e.year;
14257
+ this.date = { month: t, year: a };
14258
+ },
14259
+ immediate: !0
14255
14260
  }
14256
14261
  },
14257
14262
  methods: {
@@ -14260,6 +14265,14 @@ const fk = /* @__PURE__ */ he(yy, [["render", ky], ["__scopeId", "data-v-9abe1eb
14260
14265
  },
14261
14266
  handleBlur() {
14262
14267
  this.$emit("input:blur");
14268
+ },
14269
+ handleChange(e) {
14270
+ if (!e) {
14271
+ this.$emit("update:modelValue", null);
14272
+ return;
14273
+ }
14274
+ const { month: t, year: a } = e;
14275
+ this.$emit("update:modelValue", new Date(a, t, 1));
14263
14276
  }
14264
14277
  }
14265
14278
  });
@@ -14286,8 +14299,7 @@ function Fy(e, t, a, r, n, o) {
14286
14299
  }, _(e.helperLabel), 3)) : C("", !0)
14287
14300
  ]),
14288
14301
  de(s, {
14289
- modelValue: e.date,
14290
- "onUpdate:modelValue": t[0] || (t[0] = (p) => e.date = p),
14302
+ "model-value": e.date,
14291
14303
  uid: e.id,
14292
14304
  "enable-time-picker": !1,
14293
14305
  format: e.format,
@@ -14306,20 +14318,21 @@ function Fy(e, t, a, r, n, o) {
14306
14318
  clearable: e.isClearable,
14307
14319
  "month-picker": !0,
14308
14320
  onBlur: e.handleBlur,
14309
- onFocus: e.handleFocus
14321
+ onFocus: e.handleFocus,
14322
+ "onUpdate:modelValue": e.handleChange
14310
14323
  }, {
14311
14324
  "input-icon": be(() => [
14312
14325
  de(i, { class: "fusion-date-picker icon" })
14313
14326
  ]),
14314
14327
  _: 1
14315
- }, 8, ["modelValue", "uid", "format", "placeholder", "autocomplete", "required", "text-input", "name", "class", "max-date", "min-date", "disabled", "clearable", "onBlur", "onFocus"]),
14328
+ }, 8, ["model-value", "uid", "format", "placeholder", "autocomplete", "required", "text-input", "name", "class", "max-date", "min-date", "disabled", "clearable", "onBlur", "onFocus", "onUpdate:modelValue"]),
14316
14329
  e.errorLabel ? (d(), m("div", Py, [
14317
14330
  de(l, { "data-test": "error-icon" }),
14318
14331
  v("span", Ty, _(e.errorLabel), 1)
14319
14332
  ])) : C("", !0)
14320
14333
  ], 8, wy);
14321
14334
  }
14322
- const hk = /* @__PURE__ */ he(Ay, [["render", Fy], ["__scopeId", "data-v-ac4d3c2e"]]);
14335
+ const hk = /* @__PURE__ */ he(Ay, [["render", Fy], ["__scopeId", "data-v-1a58f07d"]]);
14323
14336
  function Qn(e, t) {
14324
14337
  if (!{}.hasOwnProperty.call(e, t))
14325
14338
  throw new TypeError("attempted to use private field on non-instance");
@@ -17157,7 +17170,8 @@ const P3 = /* @__PURE__ */ he(w3, [["render", C3]]), T3 = le({
17157
17170
  "uppy-file-added",
17158
17171
  "uppy-file-removed",
17159
17172
  "uppy-upload-error",
17160
- "uppy-restriction-error"
17173
+ "uppy-restriction-error",
17174
+ "uppy-upload-complete"
17161
17175
  ],
17162
17176
  data() {
17163
17177
  return {
@@ -17239,7 +17253,7 @@ const P3 = /* @__PURE__ */ he(w3, [["render", C3]]), T3 = le({
17239
17253
  }), this.uppy.on("complete", (e) => {
17240
17254
  this.isUploading = !1;
17241
17255
  const t = (e == null ? void 0 : e.failed) || [], a = (e == null ? void 0 : e.successful) || [];
17242
- t.length === 0 && a.length > 0 && this.clearInternalError();
17256
+ t.length === 0 && a.length > 0 && this.clearInternalError(), this.$emit("uppy-upload-complete");
17243
17257
  }), this.uppy.on("restriction-failed", (e, t) => {
17244
17258
  let a = t.message;
17245
17259
  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);
@@ -17345,7 +17359,7 @@ function I3(e, t, a, r, n, o) {
17345
17359
  ], 2)) : C("", !0)
17346
17360
  ], 10, F3);
17347
17361
  }
17348
- const mk = /* @__PURE__ */ he(T3, [["render", I3], ["__scopeId", "data-v-432137e5"]]), M3 = le({
17362
+ const mk = /* @__PURE__ */ he(T3, [["render", I3], ["__scopeId", "data-v-2e81a2c1"]]), M3 = le({
17349
17363
  name: "FusionRangeDatePicker",
17350
17364
  components: { SVGCalendar: qo, SVGExclamationTriangle: wt, VueDatePicker: Un },
17351
17365
  props: {