@flux-ui/application 3.0.0-next.73 → 3.0.0-next.75

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
@@ -2,7 +2,7 @@ import { Fragment, TransitionGroup, computed, createBlock, createCommentVNode, c
2
2
  import { FluxFadeTransition, FluxFlyout, FluxIcon, FluxMenu, FluxMenuItem, FluxPane, FluxRouteTransition, FluxSecondaryButton, FluxSpacer, FluxTabBar, useBreakpoints } from "@flux-ui/components";
3
3
  import { DateTime } from "luxon";
4
4
  import { RouterView, matchedRouteKey, useRoute, viewDepthKey } from "vue-router";
5
- //#region ../../node_modules/.bun/@basmilius+utils@3.37.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
5
+ //#region ../../node_modules/.bun/@basmilius+utils@3.40.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
6
6
  function x(e) {
7
7
  let t = {};
8
8
  do {
@@ -3100,7 +3100,7 @@ useMode(definition$2);
3100
3100
  useMode(definition$1);
3101
3101
  useMode(definition);
3102
3102
  //#endregion
3103
- //#region ../../node_modules/.bun/@basmilius+http-client@3.37.0+f97c77f67c914c00/node_modules/@basmilius/http-client/dist/index.mjs
3103
+ //#region ../../node_modules/.bun/@basmilius+http-client@3.40.0+24cbb59c6ffe9d25/node_modules/@basmilius/http-client/dist/index.mjs
3104
3104
  function adapter_default(Parent) {
3105
3105
  return class extends Parent {
3106
3106
  constructor(...args) {
@@ -3108,11 +3108,6 @@ function adapter_default(Parent) {
3108
3108
  }
3109
3109
  };
3110
3110
  }
3111
- function bound_default() {
3112
- return (target, method) => {
3113
- target[method] = target[method].bind(target);
3114
- };
3115
- }
3116
3111
  /**
3117
3112
  * Checks if the two given values are equal. When both values are a
3118
3113
  * dto, the check is done by firstly converthing them to JSON.
@@ -3136,7 +3131,7 @@ var TRIGGER = Symbol();
3136
3131
  * Checks if the given object is a dto.
3137
3132
  */
3138
3133
  function isDto_default(obj) {
3139
- return typeof obj === "object" && obj !== null && NAME in obj;
3134
+ return obj && typeof obj === "object" && !!obj[NAME];
3140
3135
  }
3141
3136
  /**
3142
3137
  * Asserts that the given object is a dto.
@@ -3191,9 +3186,6 @@ var markDtoClean = circularProtect_default(function(obj) {
3191
3186
  if (!obj[CHILDREN] || obj[CHILDREN].length === 0) return;
3192
3187
  obj[CHILDREN].filter(isDtoDirty_default).forEach(markDtoClean);
3193
3188
  });
3194
- function isProxiedArray_default(value) {
3195
- return Array.isArray(value) && PARENT in value;
3196
- }
3197
3189
  /**
3198
3190
  * Marks the given dto dirty.
3199
3191
  */
@@ -3220,7 +3212,7 @@ function relateDtoTo_default(dto, parent, key) {
3220
3212
  */
3221
3213
  function relateValueTo_default(dto, key, value) {
3222
3214
  if (isDto_default(value)) relateDtoTo_default(value, dto, key);
3223
- else if (isProxiedArray_default(value)) {
3215
+ else if (Array.isArray(value)) {
3224
3216
  for (const item of value) {
3225
3217
  if (!isDto_default(item)) continue;
3226
3218
  relateDtoTo_default(item, dto, key);
@@ -3252,7 +3244,7 @@ function unrelateDtoFrom_default(dto, parent) {
3252
3244
  */
3253
3245
  function unrelateValueFrom_default(dto, value) {
3254
3246
  if (isDto_default(value)) unrelateDtoFrom_default(value, dto);
3255
- else if (isProxiedArray_default(value)) {
3247
+ else if (Array.isArray(value)) {
3256
3248
  for (const item of value) if (isDto_default(item)) unrelateDtoFrom_default(item, dto);
3257
3249
  value[PARENT] = void 0;
3258
3250
  value[PARENT_KEY] = void 0;
@@ -3296,7 +3288,7 @@ var arrayProxy_default = {
3296
3288
  }
3297
3289
  };
3298
3290
  /**
3299
- * Checks if the proxy should ignore the given key.
3291
+ * Checks if the given key should be ignored by the proxy.
3300
3292
  */
3301
3293
  function ignored(target, key) {
3302
3294
  return typeof key === "symbol" || typeof target[key] === "function" || key === "length";
@@ -3341,7 +3333,7 @@ var instanceProxy_default = {
3341
3333
  const oldValue = descriptor.get?.call(target) ?? void 0;
3342
3334
  if (areEqual_default(value, oldValue)) return true;
3343
3335
  unrelateValueFrom_default(target, oldValue);
3344
- if (Array.isArray(value) && !isProxiedArray_default(value)) value = new Proxy(value, arrayProxy_default);
3336
+ if (Array.isArray(value) && !value[PROXY]) value = new Proxy(value, arrayProxy_default);
3345
3337
  descriptor.set.call(target, value);
3346
3338
  relateValueTo_default(target, key, value);
3347
3339
  markDtoDirty(target, key);
@@ -3465,7 +3457,7 @@ function dto_default(clazz) {
3465
3457
  K(clazz.prototype, DESCRIPTORS, descriptors);
3466
3458
  K(clazz.prototype, NAME, clazz.name);
3467
3459
  K(clazz.prototype, PROPERTIES, properties);
3468
- K(clazz, Symbol.hasInstance, (instance) => typeof instance === "object" && instance !== null && NAME in instance && instance[NAME] === clazz.name);
3460
+ K(clazz, Symbol.hasInstance, (instance) => typeof instance === "object" && instance?.[NAME] === clazz.name);
3469
3461
  G(clazz, "clone", clone_default);
3470
3462
  G(clazz, "fill", fill_default);
3471
3463
  G(clazz, "toJSON", toJSON_default);
@@ -3486,12 +3478,6 @@ function __decorate(decorators, target, key, desc) {
3486
3478
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3487
3479
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3488
3480
  }
3489
- var X = class {
3490
- test() {
3491
- return true;
3492
- }
3493
- };
3494
- __decorate([bound_default()], X.prototype, "test", null);
3495
3481
  var BlobResponse = class BlobResponse {
3496
3482
  get blob() {
3497
3483
  return this.#blob;
@@ -3604,7 +3590,7 @@ var HttpAdapter = _HttpAdapter = class HttpAdapter {
3604
3590
  const defaultFilename = `download-${DateTime.now().toFormat("yyyy-MM-dd HH-mm-ss")}`;
3605
3591
  if (!header.startsWith("attachment")) return defaultFilename;
3606
3592
  const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(header);
3607
- if (!matches || matches.length < 2) return defaultFilename;
3593
+ if ((matches?.length || 0) < 2) return defaultFilename;
3608
3594
  return matches[1].replaceAll("'", "").replaceAll("\"", "").replaceAll("/", "-").replaceAll(":", "-");
3609
3595
  }
3610
3596
  static parseRequestError(data, statusCode) {
@@ -3612,14 +3598,19 @@ var HttpAdapter = _HttpAdapter = class HttpAdapter {
3612
3598
  }
3613
3599
  static parseValidationError(data) {
3614
3600
  let errors;
3615
- if (data.errors) errors = Object.fromEntries(Object.entries(data.errors).map(([key, value]) => [key, _HttpAdapter.parseValidationError(value)]));
3601
+ if (data.errors) {
3602
+ errors = {};
3603
+ Object.entries(data.errors).forEach(([key, value]) => {
3604
+ errors[key] = _HttpAdapter.parseValidationError(value);
3605
+ });
3606
+ }
3616
3607
  return new ValidationError_default(data.code, data.error, data.error_description, errors, data.params);
3617
3608
  }
3618
3609
  };
3619
3610
  HttpAdapter = _HttpAdapter = __decorate([adapter_default], HttpAdapter);
3620
3611
  RegExp(`[a-z]`), RegExp(`[A-Z]`), RegExp(`[0-9]`), RegExp(`[!"#$%&'()*+,-./:;<=>?@[\\\\\\]^_\`{|}~]`);
3621
3612
  //#endregion
3622
- //#region ../internals/dist/composable-BLswOqxr.js
3613
+ //#region ../internals/dist/composable-CbnFLx66.js
3623
3614
  function D(e, t, n, r = { passive: !0 }) {
3624
3615
  watch(e, (e, i, a) => {
3625
3616
  e && (e.addEventListener(t, n, r), a(() => e.removeEventListener(t, n)));
@@ -3655,7 +3646,7 @@ function j(e) {
3655
3646
  };
3656
3647
  }
3657
3648
  //#endregion
3658
- //#region ../internals/dist/directive-Dprka-AO.js
3649
+ //#region ../internals/dist/directive-CoRl44Fx.js
3659
3650
  var i = class {
3660
3651
  #e;
3661
3652
  #t;
@@ -3877,7 +3868,7 @@ function useApplicationContextMenu_default(name = "menu") {
3877
3868
  const matches = useNamedRoutes_default(toRef(() => name));
3878
3869
  const hasContextMenu = computed(() => matches.value.length > 0);
3879
3870
  return {
3880
- contextMenuKey: computed(() => matches.value.map((m) => m.record.path).join("|") || void 0),
3871
+ contextMenuKey: computed(() => matches.value.map((match) => match.record.path).join("|") || void 0),
3881
3872
  hasContextMenu
3882
3873
  };
3883
3874
  }