@stsdti/funky-ui-kit 1.8.4 → 1.8.6

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.
@@ -67832,7 +67832,7 @@ function normalizePosition(position) {
67832
67832
  function startTimer(item) {
67833
67833
  item.startedAt = Date.now();
67834
67834
  item.timer = setTimeout(() => {
67835
- remove(item.id);
67835
+ remove$1(item.id);
67836
67836
  }, item.remaining);
67837
67837
  }
67838
67838
  function open(options = {}) {
@@ -67893,7 +67893,7 @@ function recomputeHeights() {
67893
67893
  if (element && element.style.overflow !== "hidden") setHeight(id, element.offsetHeight);
67894
67894
  });
67895
67895
  }
67896
- async function remove(idOrItem) {
67896
+ async function remove$1(idOrItem) {
67897
67897
  const id = typeof idOrItem === "object" ? idOrItem?.id : idOrItem;
67898
67898
  if (!toastState.toasts[id]) return;
67899
67899
  const item = toastState.toasts[id];
@@ -68080,7 +68080,7 @@ var ToastUtils = class {
68080
68080
  return open(options);
68081
68081
  }
68082
68082
  static remove(idOrItem) {
68083
- remove(idOrItem);
68083
+ remove$1(idOrItem);
68084
68084
  }
68085
68085
  static removeAll() {
68086
68086
  removeAll();
@@ -68409,7 +68409,7 @@ var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uF
68409
68409
  * @param {Boolean} [allOwnKeys = false]
68410
68410
  * @returns {any}
68411
68411
  */
68412
- function forEach$1(obj, fn, { allOwnKeys = false } = {}) {
68412
+ function forEach$2(obj, fn, { allOwnKeys = false } = {}) {
68413
68413
  if (obj === null || typeof obj === "undefined") return;
68414
68414
  let i;
68415
68415
  let l;
@@ -68469,7 +68469,7 @@ function merge$1() {
68469
68469
  else if (isArray$3(val)) result[targetKey] = val.slice();
68470
68470
  else result[targetKey] = val;
68471
68471
  };
68472
- for (let i = 0, l = arguments.length; i < l; i++) arguments[i] && forEach$1(arguments[i], assignValue);
68472
+ for (let i = 0, l = arguments.length; i < l; i++) arguments[i] && forEach$2(arguments[i], assignValue);
68473
68473
  return result;
68474
68474
  }
68475
68475
  /**
@@ -68483,7 +68483,7 @@ function merge$1() {
68483
68483
  * @returns {Object} The resulting value of object a
68484
68484
  */
68485
68485
  var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
68486
- forEach$1(b, (val, key) => {
68486
+ forEach$2(b, (val, key) => {
68487
68487
  if (thisArg && isFunction(val)) a[key] = bind(val, thisArg);
68488
68488
  else a[key] = val;
68489
68489
  }, { allOwnKeys });
@@ -68638,7 +68638,7 @@ var isRegExp = kindOfTest("RegExp");
68638
68638
  var reduceDescriptors = (obj, reducer) => {
68639
68639
  const descriptors = Object.getOwnPropertyDescriptors(obj);
68640
68640
  const reducedDescriptors = {};
68641
- forEach$1(descriptors, (descriptor, name) => {
68641
+ forEach$2(descriptors, (descriptor, name) => {
68642
68642
  let ret;
68643
68643
  if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor;
68644
68644
  });
@@ -68699,7 +68699,7 @@ var toJSONObject = (obj) => {
68699
68699
  if (!("toJSON" in source)) {
68700
68700
  stack[i] = source;
68701
68701
  const target = isArray$3(source) ? [] : {};
68702
- forEach$1(source, (value, key) => {
68702
+ forEach$2(source, (value, key) => {
68703
68703
  const reducedValue = visit(value, i + 1);
68704
68704
  !isUndefined(reducedValue) && (target[key] = reducedValue);
68705
68705
  });
@@ -68750,7 +68750,7 @@ var utils_default = {
68750
68750
  isURLSearchParams,
68751
68751
  isTypedArray,
68752
68752
  isFileList,
68753
- forEach: forEach$1,
68753
+ forEach: forEach$2,
68754
68754
  merge: merge$1,
68755
68755
  extend,
68756
68756
  trim,
@@ -73228,22 +73228,23 @@ var AppInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
73228
73228
  }),
73229
73229
  emits: /*@__PURE__*/ mergeModels(["onSubmit", "blur"], ["update:modelValue"]),
73230
73230
  setup(__props, { expose: __expose, emit: __emit }) {
73231
- useSlots();
73231
+ const slots = useSlots();
73232
73232
  let modelValue = useModel(__props, "modelValue");
73233
73233
  const props = __props;
73234
73234
  const emits = __emit;
73235
+ const hasLeftIcon = computed(() => !!props.leftIcon || !!slots.iconLeft);
73235
73236
  const clearStyle = computed(() => ({ "margin-right": isTypeNumber.value ? "2px" : "8px" }));
73236
73237
  const inputClass = computed(() => ({
73237
73238
  "input-empty no-spinner flex-1": true,
73238
- "pl-15": !props.leftIcon
73239
+ "pl-15": !hasLeftIcon.value
73239
73240
  }));
73240
73241
  const inputContainerClass = computed(() => {
73241
73242
  return {
73242
73243
  "flex-center-vertical form-control": true,
73243
73244
  "disabled-element": props.disabled,
73244
- "p-0": !props.leftIcon,
73245
- "no-padding-right": !!props.leftIcon,
73246
- "gap-1": !!props.leftIcon
73245
+ "p-0": !hasLeftIcon.value,
73246
+ "no-padding-right": !!hasLeftIcon.value,
73247
+ "gap-1": !!hasLeftIcon.value
73247
73248
  };
73248
73249
  });
73249
73250
  const isTypeNumber = computed(() => props.type === "number");
@@ -73289,7 +73290,7 @@ var AppInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
73289
73290
  return openBlock(), createBlock(AppFormElement_default, normalizeProps(guardReactiveProps(unref(formElementProps))), createSlots({
73290
73291
  "help-block": withCtx(() => [renderSlot(_ctx.$slots, "help-block", {}, void 0, true)]),
73291
73292
  default: withCtx(() => [createElementVNode("div", { class: normalizeClass(inputContainerClass.value) }, [
73292
- __props.leftIcon ? (openBlock(), createElementBlock("div", _hoisted_1$59, [createVNode(_component_app_icon, { value: __props.leftIcon }, null, 8, ["value"])])) : createCommentVNode("", true),
73293
+ hasLeftIcon.value ? (openBlock(), createElementBlock("div", _hoisted_1$59, [renderSlot(_ctx.$slots, "iconLeft", {}, () => [createVNode(_component_app_icon, { value: __props.leftIcon }, null, 8, ["value"])], true)])) : createCommentVNode("", true),
73293
73294
  withDirectives(createElementVNode("input", mergeProps({
73294
73295
  ref_key: "inputElement",
73295
73296
  ref: inputElement,
@@ -73327,7 +73328,7 @@ var AppInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
73327
73328
  })]), 1040);
73328
73329
  };
73329
73330
  }
73330
- }, [["__scopeId", "data-v-5dd82e85"]]);
73331
+ }, [["__scopeId", "data-v-7a5068b0"]]);
73331
73332
  //#endregion
73332
73333
  //#region src/components/small/app-link/AppLink.vue
73333
73334
  var _hoisted_1$58 = {
@@ -77908,7 +77909,7 @@ function addMonths(date, amount, options) {
77908
77909
  * .toString();
77909
77910
  * //=> "2017-06-15T15:29:20"
77910
77911
  */
77911
- function add(date, duration, options) {
77912
+ function add$1(date, duration, options) {
77912
77913
  const { years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0 } = duration;
77913
77914
  const _date = toDate(date, options?.in);
77914
77915
  const dateWithMonths = months || years ? addMonths(_date, months + years * 12) : _date;
@@ -86378,7 +86379,7 @@ var St = {
86378
86379
  return !m.validateTime(e, r);
86379
86380
  }
86380
86381
  return !1;
86381
- }, K = computed(() => (e) => !Y(+m[e] + +D.value[`${e}Increment`], e) || G(e, !0) || m.disabled), J = computed(() => (e) => !Y(m[e] - +D.value[`${e}Increment`], e) || G(e, !1) || m.disabled), se = (e, t) => add(set$2(h(), e), t), ce = (e, t) => sub(set$2(h(), e), t), le = computed(() => ({
86382
+ }, K = computed(() => (e) => !Y(+m[e] + +D.value[`${e}Increment`], e) || G(e, !0) || m.disabled), J = computed(() => (e) => !Y(m[e] - +D.value[`${e}Increment`], e) || G(e, !1) || m.disabled), se = (e, t) => add$1(set$2(h(), e), t), ce = (e, t) => sub(set$2(h(), e), t), le = computed(() => ({
86382
86383
  "dp--time-col": !0,
86383
86384
  "dp--time-col-block": !D.value.timePickerInline,
86384
86385
  "dp--time-col-reg-block": !D.value.enableSeconds && D.value.is24 && !D.value.timePickerInline,
@@ -87432,7 +87433,7 @@ var St = {
87432
87433
  };
87433
87434
  }, me = (e = o(), t = !1) => {
87434
87435
  if ((!v.value.count || !v.value.static || t) && G(0, getMonth(e), getYear(e), t), v.value.count && (!p.value || fe() || !v.value.solo) && (!v.value.solo || t)) for (let e = 1; e < v.value.count; e++) {
87435
- let t = add(set$2(o(), {
87436
+ let t = add$1(set$2(o(), {
87436
87437
  month: u.value(e - 1),
87437
87438
  year: d.value(e - 1)
87438
87439
  }), { months: 1 });
@@ -125164,8 +125165,9 @@ var _sfc_main$63 = {
125164
125165
  "download",
125165
125166
  "removed"
125166
125167
  ],
125167
- setup(__props) {
125168
+ setup(__props, { emit: __emit }) {
125168
125169
  const props = __props;
125170
+ const fileUploadContext = inject("fileUploadContext", null);
125169
125171
  const { getFilename, getFileTypeClass, getStatus, getExtension } = AppFileNewUtils_default;
125170
125172
  const getFileStatusLabel = (file) => getStatus(file)?.label;
125171
125173
  const actions = [
@@ -125185,6 +125187,7 @@ var _sfc_main$63 = {
125185
125187
  emit: "removed"
125186
125188
  }
125187
125189
  ];
125190
+ const passthroughSlots = computed(() => Object.keys(useSlots()).filter((slotName) => !["status", "actions"].includes(slotName)));
125188
125191
  const gridStyles = computed(() => ({
125189
125192
  display: "grid",
125190
125193
  gridTemplateColumns: `repeat(${props.columns}, minmax(0, 1fr))`,
@@ -125213,22 +125216,25 @@ var _sfc_main$63 = {
125213
125216
  class: "file-name"
125214
125217
  }, null, 8, ["value"]), createElementVNode("div", _hoisted_2$4, [
125215
125218
  createElementVNode("span", null, toDisplayString(file?.size ? (file.size / (1024 * 1024)).toFixed(2) + " MB" : "N/A"), 1),
125216
- createElementVNode("span", { class: normalizeClass(getFileStatusClass(file)) }, [createVNode(_component_app_icon, {
125219
+ renderSlot(_ctx.$slots, "status", { file }, () => [createElementVNode("span", { class: normalizeClass(getFileStatusClass(file)) }, [createVNode(_component_app_icon, {
125217
125220
  value: getFileStatusIcon(file),
125218
125221
  class: "status-icon"
125219
- }, null, 8, ["value"]), createTextVNode(" " + toDisplayString(getFileStatusLabel(file)), 1)], 2),
125220
- (openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(_ctx.$slots), (slotName) => {
125222
+ }, null, 8, ["value"]), createTextVNode(" " + toDisplayString(getFileStatusLabel(file)), 1)], 2)]),
125223
+ (openBlock(true), createElementBlock(Fragment, null, renderList(passthroughSlots.value, (slotName) => {
125221
125224
  return renderSlot(_ctx.$slots, slotName, {
125222
125225
  key: slotName,
125223
- file
125226
+ file,
125227
+ fileUpload: _ctx.fileUpload
125224
125228
  });
125225
125229
  }), 128))
125226
125230
  ])]),
125227
125231
  unref(getStatus)(file) === unref(fileStatus).uploaded ? (openBlock(), createElementBlock("div", _hoisted_3$3, [(openBlock(), createElementBlock(Fragment, null, renderList(actions, (action) => {
125228
125232
  return renderSlot(_ctx.$slots, action.name, {
125229
125233
  key: action.name,
125234
+ action,
125230
125235
  file,
125231
- index
125236
+ index,
125237
+ fileUploadContext: unref(fileUploadContext)
125232
125238
  }, () => [createVNode(_component_app_button, {
125233
125239
  disabled: action.name === "removed" && __props.disabled,
125234
125240
  class: "btn-transparent",
@@ -125392,6 +125398,7 @@ var _sfc_main$16 = {
125392
125398
  const emit = __emit;
125393
125399
  const previewModal = ref(null);
125394
125400
  const fileUpload = useFileUpload(modelValue, props, emit);
125401
+ provide("fileUploadContext", fileUpload);
125395
125402
  const fileInput = fileUpload.fileInput;
125396
125403
  const appFileNewUtils = AppFileNewUtils_default;
125397
125404
  const appFileNewRepository = AppFileNewRepository_default(props);
@@ -126408,6 +126415,734 @@ var _sfc_main$58 = {
126408
126415
  }
126409
126416
  };
126410
126417
  //#endregion
126418
+ //#region node_modules/@formkit/auto-animate/index.mjs
126419
+ /**
126420
+ * A set of all the parents currently being observe. This is the only non weak
126421
+ * registry.
126422
+ */
126423
+ var parents = /* @__PURE__ */ new Set();
126424
+ /**
126425
+ * Element coordinates that is constantly kept up to date.
126426
+ */
126427
+ var coords = /* @__PURE__ */ new WeakMap();
126428
+ /**
126429
+ * Siblings of elements that have been removed from the dom.
126430
+ */
126431
+ var siblings = /* @__PURE__ */ new WeakMap();
126432
+ /**
126433
+ * Animations that are currently running.
126434
+ */
126435
+ var animations = /* @__PURE__ */ new WeakMap();
126436
+ /**
126437
+ * A map of existing intersection observers used to track element movements.
126438
+ */
126439
+ var intersections = /* @__PURE__ */ new WeakMap();
126440
+ /**
126441
+ * A map of existing mutation observers used to track element movements.
126442
+ */
126443
+ var mutationObservers = /* @__PURE__ */ new WeakMap();
126444
+ /**
126445
+ * Intervals for automatically checking the position of elements occasionally.
126446
+ */
126447
+ var intervals = /* @__PURE__ */ new WeakMap();
126448
+ /**
126449
+ * The configuration options for each group of elements.
126450
+ */
126451
+ var options = /* @__PURE__ */ new WeakMap();
126452
+ /**
126453
+ * Debounce counters by id, used to debounce calls to update positions.
126454
+ */
126455
+ var debounces = /* @__PURE__ */ new WeakMap();
126456
+ /**
126457
+ * All parents that are currently enabled are tracked here.
126458
+ */
126459
+ var enabled = /* @__PURE__ */ new WeakSet();
126460
+ /**
126461
+ * The document used to calculate transitions.
126462
+ */
126463
+ var root;
126464
+ /**
126465
+ * The root’s XY scroll positions.
126466
+ */
126467
+ var scrollX = 0;
126468
+ var scrollY = 0;
126469
+ /**
126470
+ * Used to sign an element as the target.
126471
+ */
126472
+ var TGT = "__aa_tgt";
126473
+ /**
126474
+ * Used to sign an element as being part of a removal.
126475
+ */
126476
+ var DEL = "__aa_del";
126477
+ /**
126478
+ * Used to sign an element as being "new". When an element is removed from the
126479
+ * dom, but may cycle back in we can sign it with new to ensure the next time
126480
+ * it is recognized we consider it new.
126481
+ */
126482
+ var NEW = "__aa_new";
126483
+ /**
126484
+ * Callback for handling all mutations.
126485
+ * @param mutations - A mutation list
126486
+ */
126487
+ var handleMutations = (mutations) => {
126488
+ const elements = getElements(mutations);
126489
+ if (elements) elements.forEach((el) => animate(el));
126490
+ };
126491
+ /**
126492
+ *
126493
+ * @param entries - Elements that have been resized.
126494
+ */
126495
+ var handleResizes = (entries) => {
126496
+ entries.forEach((entry) => {
126497
+ if (entry.target === root) updateAllPos();
126498
+ if (coords.has(entry.target)) updatePos(entry.target);
126499
+ });
126500
+ };
126501
+ /**
126502
+ * Determine if an element is fully outside of the current viewport.
126503
+ * @param el - Element to test
126504
+ */
126505
+ function isOffscreen(el) {
126506
+ const rect = el.getBoundingClientRect();
126507
+ const vw = (root === null || root === void 0 ? void 0 : root.clientWidth) || 0;
126508
+ const vh = (root === null || root === void 0 ? void 0 : root.clientHeight) || 0;
126509
+ return rect.bottom < 0 || rect.top > vh || rect.right < 0 || rect.left > vw;
126510
+ }
126511
+ /**
126512
+ * Observe this elements position.
126513
+ * @param el - The element to observe the position of.
126514
+ */
126515
+ function observePosition(el) {
126516
+ const oldObserver = intersections.get(el);
126517
+ oldObserver === null || oldObserver === void 0 || oldObserver.disconnect();
126518
+ let rect = coords.get(el);
126519
+ let invocations = 0;
126520
+ const buffer = 5;
126521
+ if (!rect) {
126522
+ rect = getCoords(el);
126523
+ coords.set(el, rect);
126524
+ }
126525
+ const { offsetWidth, offsetHeight } = root;
126526
+ const rootMargin = [
126527
+ rect.top - buffer,
126528
+ offsetWidth - (rect.left + buffer + rect.width),
126529
+ offsetHeight - (rect.top + buffer + rect.height),
126530
+ rect.left - buffer
126531
+ ].map((px) => `${-1 * Math.floor(px)}px`).join(" ");
126532
+ const observer = new IntersectionObserver(() => {
126533
+ ++invocations > 1 && updatePos(el);
126534
+ }, {
126535
+ root,
126536
+ threshold: 1,
126537
+ rootMargin
126538
+ });
126539
+ observer.observe(el);
126540
+ intersections.set(el, observer);
126541
+ }
126542
+ /**
126543
+ * Update the exact position of a given element.
126544
+ * @param el - An element to update the position of.
126545
+ * @param debounce - Whether or not to debounce the update. After an animation is finished, it should update as soon as possible to prevent flickering on quick toggles.
126546
+ */
126547
+ function updatePos(el, debounce = true) {
126548
+ clearTimeout(debounces.get(el));
126549
+ const optionsOrPlugin = getOptions(el);
126550
+ const delay = debounce ? isPlugin(optionsOrPlugin) ? 500 : optionsOrPlugin.duration : 0;
126551
+ debounces.set(el, setTimeout(async () => {
126552
+ const currentAnimation = animations.get(el);
126553
+ try {
126554
+ await (currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.finished);
126555
+ coords.set(el, getCoords(el));
126556
+ observePosition(el);
126557
+ } catch {}
126558
+ }, delay));
126559
+ }
126560
+ /**
126561
+ * Updates all positions that are currently being tracked.
126562
+ */
126563
+ function updateAllPos() {
126564
+ clearTimeout(debounces.get(root));
126565
+ debounces.set(root, setTimeout(() => {
126566
+ parents.forEach((parent) => forEach(parent, (el) => lowPriority(() => updatePos(el))));
126567
+ }, 100));
126568
+ }
126569
+ /**
126570
+ * Its possible for a quick scroll or other fast events to get past the
126571
+ * intersection observer, so occasionally we need want "cold-poll" for the
126572
+ * latests and greatest position. We try to do this in the most non-disruptive
126573
+ * fashion possible. First we only do this ever couple seconds, staggard by a
126574
+ * random offset.
126575
+ * @param el - Element
126576
+ */
126577
+ function poll(el) {
126578
+ setTimeout(() => {
126579
+ intervals.set(el, setInterval(() => lowPriority(updatePos.bind(null, el)), 2e3));
126580
+ }, Math.round(2e3 * Math.random()));
126581
+ }
126582
+ /**
126583
+ * Perform some operation that is non critical at some point.
126584
+ * @param callback
126585
+ */
126586
+ function lowPriority(callback) {
126587
+ if (typeof requestIdleCallback === "function") requestIdleCallback(() => callback());
126588
+ else requestAnimationFrame(() => callback());
126589
+ }
126590
+ /**
126591
+ * A resize observer, responsible for recalculating elements on resize.
126592
+ */
126593
+ var resize;
126594
+ /**
126595
+ * Ensure the browser is supported.
126596
+ */
126597
+ var supportedBrowser = typeof window !== "undefined" && "ResizeObserver" in window;
126598
+ /**
126599
+ * If this is in a browser, initialize our Web APIs
126600
+ */
126601
+ if (supportedBrowser) {
126602
+ root = document.documentElement;
126603
+ new MutationObserver(handleMutations);
126604
+ resize = new ResizeObserver(handleResizes);
126605
+ window.addEventListener("scroll", () => {
126606
+ scrollY = window.scrollY;
126607
+ scrollX = window.scrollX;
126608
+ });
126609
+ resize.observe(root);
126610
+ }
126611
+ /**
126612
+ * Retrieves all the elements that may have been affected by the last mutation
126613
+ * including ones that have been removed and are no longer in the DOM.
126614
+ * @param mutations - A mutation list.
126615
+ * @returns
126616
+ */
126617
+ function getElements(mutations) {
126618
+ if (mutations.reduce((nodes, mutation) => {
126619
+ return [
126620
+ ...nodes,
126621
+ ...Array.from(mutation.addedNodes),
126622
+ ...Array.from(mutation.removedNodes)
126623
+ ];
126624
+ }, []).every((node) => node.nodeName === "#comment")) return false;
126625
+ return mutations.reduce((elements, mutation) => {
126626
+ if (elements === false) return false;
126627
+ if (mutation.target instanceof Element) {
126628
+ target(mutation.target);
126629
+ if (!elements.has(mutation.target)) {
126630
+ elements.add(mutation.target);
126631
+ for (let i = 0; i < mutation.target.children.length; i++) {
126632
+ const child = mutation.target.children.item(i);
126633
+ if (!child) continue;
126634
+ if (DEL in child) return false;
126635
+ target(mutation.target, child);
126636
+ elements.add(child);
126637
+ }
126638
+ }
126639
+ if (mutation.removedNodes.length) for (let i = 0; i < mutation.removedNodes.length; i++) {
126640
+ const child = mutation.removedNodes[i];
126641
+ if (DEL in child) return false;
126642
+ if (child instanceof Element) {
126643
+ elements.add(child);
126644
+ target(mutation.target, child);
126645
+ siblings.set(child, [mutation.previousSibling, mutation.nextSibling]);
126646
+ }
126647
+ }
126648
+ }
126649
+ return elements;
126650
+ }, /* @__PURE__ */ new Set());
126651
+ }
126652
+ /**
126653
+ * Assign the target to an element.
126654
+ * @param el - The root element
126655
+ * @param child
126656
+ */
126657
+ function target(el, child) {
126658
+ if (!child && !(TGT in el)) Object.defineProperty(el, TGT, { value: el });
126659
+ else if (child && !(TGT in child)) Object.defineProperty(child, TGT, { value: el });
126660
+ }
126661
+ /**
126662
+ * Determines what kind of change took place on the given element and then
126663
+ * performs the proper animation based on that.
126664
+ * @param el - The specific element to animate.
126665
+ */
126666
+ function animate(el) {
126667
+ var _a, _b;
126668
+ const isMounted = el.isConnected;
126669
+ const preExisting = coords.has(el);
126670
+ if (isMounted && siblings.has(el)) siblings.delete(el);
126671
+ if (((_a = animations.get(el)) === null || _a === void 0 ? void 0 : _a.playState) !== "finished") (_b = animations.get(el)) === null || _b === void 0 || _b.cancel();
126672
+ if (NEW in el) add(el);
126673
+ else if (preExisting && isMounted) remain(el);
126674
+ else if (preExisting && !isMounted) remove(el);
126675
+ else add(el);
126676
+ }
126677
+ /**
126678
+ * Removes all non-digits from a string and casts to a number.
126679
+ * @param str - A string containing a pixel value.
126680
+ * @returns
126681
+ */
126682
+ function raw(str) {
126683
+ return Number(str.replace(/[^0-9.\-]/g, ""));
126684
+ }
126685
+ /**
126686
+ * Get the scroll offset of elements
126687
+ * @param el - Element
126688
+ * @returns
126689
+ */
126690
+ function getScrollOffset(el) {
126691
+ let p = el.parentElement;
126692
+ while (p) {
126693
+ if (p.scrollLeft || p.scrollTop) return {
126694
+ x: p.scrollLeft,
126695
+ y: p.scrollTop
126696
+ };
126697
+ p = p.parentElement;
126698
+ }
126699
+ return {
126700
+ x: 0,
126701
+ y: 0
126702
+ };
126703
+ }
126704
+ /**
126705
+ * Get the coordinates of elements adjusted for scroll position.
126706
+ * @param el - Element
126707
+ * @returns
126708
+ */
126709
+ function getCoords(el) {
126710
+ const rect = el.getBoundingClientRect();
126711
+ const { x, y } = getScrollOffset(el);
126712
+ return {
126713
+ top: rect.top + y,
126714
+ left: rect.left + x,
126715
+ width: rect.width,
126716
+ height: rect.height
126717
+ };
126718
+ }
126719
+ /**
126720
+ * Returns the width/height that the element should be transitioned between.
126721
+ * This takes into account box-sizing.
126722
+ * @param el - Element being animated
126723
+ * @param oldCoords - Old set of Coordinates coordinates
126724
+ * @param newCoords - New set of Coordinates coordinates
126725
+ * @returns
126726
+ */
126727
+ function getTransitionSizes(el, oldCoords, newCoords) {
126728
+ let widthFrom = oldCoords.width;
126729
+ let heightFrom = oldCoords.height;
126730
+ let widthTo = newCoords.width;
126731
+ let heightTo = newCoords.height;
126732
+ const styles = getComputedStyle(el);
126733
+ if (styles.getPropertyValue("box-sizing") === "content-box") {
126734
+ const paddingY = raw(styles.paddingTop) + raw(styles.paddingBottom) + raw(styles.borderTopWidth) + raw(styles.borderBottomWidth);
126735
+ const paddingX = raw(styles.paddingLeft) + raw(styles.paddingRight) + raw(styles.borderRightWidth) + raw(styles.borderLeftWidth);
126736
+ widthFrom -= paddingX;
126737
+ widthTo -= paddingX;
126738
+ heightFrom -= paddingY;
126739
+ heightTo -= paddingY;
126740
+ }
126741
+ return [
126742
+ widthFrom,
126743
+ widthTo,
126744
+ heightFrom,
126745
+ heightTo
126746
+ ].map(Math.round);
126747
+ }
126748
+ /**
126749
+ * Retrieves animation options for the current element.
126750
+ * @param el - Element to retrieve options for.
126751
+ * @returns
126752
+ */
126753
+ function getOptions(el) {
126754
+ return TGT in el && options.has(el[TGT]) ? options.get(el[TGT]) : {
126755
+ duration: 250,
126756
+ easing: "ease-in-out"
126757
+ };
126758
+ }
126759
+ /**
126760
+ * Returns the target of a given animation (generally the parent).
126761
+ * @param el - An element to check for a target
126762
+ * @returns
126763
+ */
126764
+ function getTarget(el) {
126765
+ if (TGT in el) return el[TGT];
126766
+ }
126767
+ /**
126768
+ * Checks if animations are enabled or disabled for a given element.
126769
+ * @param el - Any element
126770
+ * @returns
126771
+ */
126772
+ function isEnabled(el) {
126773
+ const target = getTarget(el);
126774
+ return target ? enabled.has(target) : false;
126775
+ }
126776
+ /**
126777
+ * Iterate over the children of a given parent.
126778
+ * @param parent - A parent element
126779
+ * @param callback - A callback
126780
+ */
126781
+ function forEach(parent, ...callbacks) {
126782
+ callbacks.forEach((callback) => callback(parent, options.has(parent)));
126783
+ for (let i = 0; i < parent.children.length; i++) {
126784
+ const child = parent.children.item(i);
126785
+ if (child) callbacks.forEach((callback) => callback(child, options.has(child)));
126786
+ }
126787
+ }
126788
+ /**
126789
+ * Always return tuple to provide consistent interface
126790
+ */
126791
+ function getPluginTuple(pluginReturn) {
126792
+ if (Array.isArray(pluginReturn)) return pluginReturn;
126793
+ return [pluginReturn];
126794
+ }
126795
+ /**
126796
+ * Determine if config is plugin
126797
+ */
126798
+ function isPlugin(config) {
126799
+ return typeof config === "function";
126800
+ }
126801
+ /**
126802
+ * The element in question is remaining in the DOM.
126803
+ * @param el - Element to flip
126804
+ * @returns
126805
+ */
126806
+ function remain(el) {
126807
+ const oldCoords = coords.get(el);
126808
+ const newCoords = getCoords(el);
126809
+ if (!isEnabled(el)) return coords.set(el, newCoords);
126810
+ if (isOffscreen(el)) {
126811
+ coords.set(el, newCoords);
126812
+ observePosition(el);
126813
+ return;
126814
+ }
126815
+ let animation;
126816
+ if (!oldCoords) return;
126817
+ const pluginOrOptions = getOptions(el);
126818
+ if (typeof pluginOrOptions !== "function") {
126819
+ let deltaLeft = oldCoords.left - newCoords.left;
126820
+ let deltaTop = oldCoords.top - newCoords.top;
126821
+ const deltaRight = oldCoords.left + oldCoords.width - (newCoords.left + newCoords.width);
126822
+ if (oldCoords.top + oldCoords.height - (newCoords.top + newCoords.height) == 0) deltaTop = 0;
126823
+ if (deltaRight == 0) deltaLeft = 0;
126824
+ const [widthFrom, widthTo, heightFrom, heightTo] = getTransitionSizes(el, oldCoords, newCoords);
126825
+ const start = { transform: `translate(${deltaLeft}px, ${deltaTop}px)` };
126826
+ const end = { transform: `translate(0, 0)` };
126827
+ if (widthFrom !== widthTo) {
126828
+ start.width = `${widthFrom}px`;
126829
+ end.width = `${widthTo}px`;
126830
+ }
126831
+ if (heightFrom !== heightTo) {
126832
+ start.height = `${heightFrom}px`;
126833
+ end.height = `${heightTo}px`;
126834
+ }
126835
+ animation = el.animate([start, end], {
126836
+ duration: pluginOrOptions.duration,
126837
+ easing: pluginOrOptions.easing
126838
+ });
126839
+ } else {
126840
+ const [keyframes] = getPluginTuple(pluginOrOptions(el, "remain", oldCoords, newCoords));
126841
+ animation = new Animation(keyframes);
126842
+ animation.play();
126843
+ }
126844
+ animations.set(el, animation);
126845
+ coords.set(el, newCoords);
126846
+ animation.addEventListener("finish", updatePos.bind(null, el, false), { once: true });
126847
+ }
126848
+ /**
126849
+ * Adds the element with a transition.
126850
+ * @param el - Animates the element being added.
126851
+ */
126852
+ function add(el) {
126853
+ if (NEW in el) delete el[NEW];
126854
+ const newCoords = getCoords(el);
126855
+ coords.set(el, newCoords);
126856
+ const pluginOrOptions = getOptions(el);
126857
+ if (!isEnabled(el)) return;
126858
+ if (isOffscreen(el)) {
126859
+ observePosition(el);
126860
+ return;
126861
+ }
126862
+ let animation;
126863
+ if (typeof pluginOrOptions !== "function") animation = el.animate([
126864
+ {
126865
+ transform: "scale(.98)",
126866
+ opacity: 0
126867
+ },
126868
+ {
126869
+ transform: "scale(0.98)",
126870
+ opacity: 0,
126871
+ offset: .5
126872
+ },
126873
+ {
126874
+ transform: "scale(1)",
126875
+ opacity: 1
126876
+ }
126877
+ ], {
126878
+ duration: pluginOrOptions.duration * 1.5,
126879
+ easing: "ease-in"
126880
+ });
126881
+ else {
126882
+ const [keyframes] = getPluginTuple(pluginOrOptions(el, "add", newCoords));
126883
+ animation = new Animation(keyframes);
126884
+ animation.play();
126885
+ }
126886
+ animations.set(el, animation);
126887
+ animation.addEventListener("finish", updatePos.bind(null, el, false), { once: true });
126888
+ }
126889
+ /**
126890
+ * Clean up after removing an element from the dom.
126891
+ * @param el - Element being removed
126892
+ * @param styles - Optional styles that should be removed from the element.
126893
+ */
126894
+ function cleanUp(el, styles) {
126895
+ var _a;
126896
+ el.remove();
126897
+ coords.delete(el);
126898
+ siblings.delete(el);
126899
+ animations.delete(el);
126900
+ (_a = intersections.get(el)) === null || _a === void 0 || _a.disconnect();
126901
+ setTimeout(() => {
126902
+ if (DEL in el) delete el[DEL];
126903
+ Object.defineProperty(el, NEW, {
126904
+ value: true,
126905
+ configurable: true
126906
+ });
126907
+ if (styles && el instanceof HTMLElement) for (const style in styles) el.style[style] = "";
126908
+ }, 0);
126909
+ }
126910
+ /**
126911
+ * Animates the removal of an element.
126912
+ * @param el - Element to remove
126913
+ */
126914
+ function remove(el) {
126915
+ var _a;
126916
+ if (!siblings.has(el) || !coords.has(el)) return;
126917
+ const [prev, next] = siblings.get(el);
126918
+ Object.defineProperty(el, DEL, {
126919
+ value: true,
126920
+ configurable: true
126921
+ });
126922
+ const finalX = window.scrollX;
126923
+ const finalY = window.scrollY;
126924
+ if (next && next.parentNode && next.parentNode instanceof Element) next.parentNode.insertBefore(el, next);
126925
+ else if (prev && prev.parentNode) prev.parentNode.appendChild(el);
126926
+ else (_a = getTarget(el)) === null || _a === void 0 || _a.appendChild(el);
126927
+ if (!isEnabled(el)) return cleanUp(el);
126928
+ const [top, left, width, height] = deletePosition(el);
126929
+ const optionsOrPlugin = getOptions(el);
126930
+ const oldCoords = coords.get(el);
126931
+ if (finalX !== scrollX || finalY !== scrollY) adjustScroll(el, finalX, finalY, optionsOrPlugin);
126932
+ let animation;
126933
+ let styleReset = {
126934
+ position: "absolute",
126935
+ top: `${top}px`,
126936
+ left: `${left}px`,
126937
+ width: `${width}px`,
126938
+ height: `${height}px`,
126939
+ margin: "0",
126940
+ pointerEvents: "none",
126941
+ transformOrigin: "center",
126942
+ zIndex: "100"
126943
+ };
126944
+ if (!isPlugin(optionsOrPlugin)) {
126945
+ Object.assign(el.style, styleReset);
126946
+ animation = el.animate([{
126947
+ transform: "scale(1)",
126948
+ opacity: 1
126949
+ }, {
126950
+ transform: "scale(.98)",
126951
+ opacity: 0
126952
+ }], {
126953
+ duration: optionsOrPlugin.duration,
126954
+ easing: "ease-out"
126955
+ });
126956
+ } else {
126957
+ const [keyframes, options] = getPluginTuple(optionsOrPlugin(el, "remove", oldCoords));
126958
+ if ((options === null || options === void 0 ? void 0 : options.styleReset) !== false) {
126959
+ styleReset = (options === null || options === void 0 ? void 0 : options.styleReset) || styleReset;
126960
+ Object.assign(el.style, styleReset);
126961
+ }
126962
+ animation = new Animation(keyframes);
126963
+ animation.play();
126964
+ }
126965
+ animations.set(el, animation);
126966
+ animation.addEventListener("finish", () => cleanUp(el, styleReset), { once: true });
126967
+ }
126968
+ /**
126969
+ * If the element being removed is at the very bottom of the page, and the
126970
+ * the page was scrolled into a space being "made available" by the element
126971
+ * that was removed, the page scroll will have jumped up some amount. We need
126972
+ * to offset the jump by the amount that the page was "automatically" scrolled
126973
+ * up. We can do this by comparing the scroll position before and after the
126974
+ * element was removed, and then offsetting by that amount.
126975
+ *
126976
+ * @param el - The element being deleted
126977
+ * @param finalX - The final X scroll position
126978
+ * @param finalY - The final Y scroll position
126979
+ * @param optionsOrPlugin - The options or plugin
126980
+ * @returns
126981
+ */
126982
+ function adjustScroll(el, finalX, finalY, optionsOrPlugin) {
126983
+ const scrollDeltaX = scrollX - finalX;
126984
+ const scrollDeltaY = scrollY - finalY;
126985
+ const scrollBefore = document.documentElement.style.scrollBehavior;
126986
+ if (getComputedStyle(root).scrollBehavior === "smooth") document.documentElement.style.scrollBehavior = "auto";
126987
+ window.scrollTo(window.scrollX + scrollDeltaX, window.scrollY + scrollDeltaY);
126988
+ if (!el.parentElement) return;
126989
+ const parent = el.parentElement;
126990
+ let lastHeight = parent.clientHeight;
126991
+ let lastWidth = parent.clientWidth;
126992
+ const startScroll = performance.now();
126993
+ function smoothScroll() {
126994
+ requestAnimationFrame(() => {
126995
+ if (!isPlugin(optionsOrPlugin)) {
126996
+ const deltaY = lastHeight - parent.clientHeight;
126997
+ const deltaX = lastWidth - parent.clientWidth;
126998
+ if (startScroll + optionsOrPlugin.duration > performance.now()) {
126999
+ window.scrollTo({
127000
+ left: window.scrollX - deltaX,
127001
+ top: window.scrollY - deltaY
127002
+ });
127003
+ lastHeight = parent.clientHeight;
127004
+ lastWidth = parent.clientWidth;
127005
+ smoothScroll();
127006
+ } else document.documentElement.style.scrollBehavior = scrollBefore;
127007
+ }
127008
+ });
127009
+ }
127010
+ smoothScroll();
127011
+ }
127012
+ /**
127013
+ * Determines the position of the element being removed.
127014
+ * @param el - The element being deleted
127015
+ * @returns
127016
+ */
127017
+ function deletePosition(el) {
127018
+ var _a;
127019
+ const oldCoords = coords.get(el);
127020
+ const [width, , height] = getTransitionSizes(el, oldCoords, getCoords(el));
127021
+ let offsetParent = el.parentElement;
127022
+ while (offsetParent && (getComputedStyle(offsetParent).position === "static" || offsetParent instanceof HTMLBodyElement)) offsetParent = offsetParent.parentElement;
127023
+ if (!offsetParent) offsetParent = document.body;
127024
+ const parentStyles = getComputedStyle(offsetParent);
127025
+ const parentCoords = !animations.has(el) || ((_a = animations.get(el)) === null || _a === void 0 ? void 0 : _a.playState) === "finished" ? getCoords(offsetParent) : coords.get(offsetParent);
127026
+ return [
127027
+ Math.round(oldCoords.top - parentCoords.top) - raw(parentStyles.borderTopWidth),
127028
+ Math.round(oldCoords.left - parentCoords.left) - raw(parentStyles.borderLeftWidth),
127029
+ width,
127030
+ height
127031
+ ];
127032
+ }
127033
+ /**
127034
+ * A function that automatically adds animation effects to itself and its
127035
+ * immediate children. Specifically it adds effects for adding, moving, and
127036
+ * removing DOM elements.
127037
+ * @param el - A parent element to add animations to.
127038
+ * @param options - An optional object of options.
127039
+ */
127040
+ function autoAnimate(el, config = {}) {
127041
+ if (supportedBrowser && resize) {
127042
+ if (!(window.matchMedia("(prefers-reduced-motion: reduce)").matches && !isPlugin(config) && !config.disrespectUserMotionPreference)) {
127043
+ enabled.add(el);
127044
+ if (getComputedStyle(el).position === "static") Object.assign(el.style, { position: "relative" });
127045
+ forEach(el, updatePos, poll, (element) => resize === null || resize === void 0 ? void 0 : resize.observe(element));
127046
+ if (isPlugin(config)) options.set(el, config);
127047
+ else options.set(el, {
127048
+ duration: 250,
127049
+ easing: "ease-in-out",
127050
+ ...config
127051
+ });
127052
+ const mo = new MutationObserver(handleMutations);
127053
+ mo.observe(el, { childList: true });
127054
+ mutationObservers.set(el, mo);
127055
+ parents.add(el);
127056
+ }
127057
+ }
127058
+ return Object.freeze({
127059
+ parent: el,
127060
+ enable: () => {
127061
+ enabled.add(el);
127062
+ },
127063
+ disable: () => {
127064
+ enabled.delete(el);
127065
+ forEach(el, (node) => {
127066
+ const a = animations.get(node);
127067
+ try {
127068
+ a === null || a === void 0 || a.cancel();
127069
+ } catch {}
127070
+ animations.delete(node);
127071
+ const d = debounces.get(node);
127072
+ if (d) clearTimeout(d);
127073
+ debounces.delete(node);
127074
+ const i = intervals.get(node);
127075
+ if (i) clearInterval(i);
127076
+ intervals.delete(node);
127077
+ });
127078
+ },
127079
+ isEnabled: () => enabled.has(el),
127080
+ destroy: () => {
127081
+ enabled.delete(el);
127082
+ parents.delete(el);
127083
+ options.delete(el);
127084
+ const mo = mutationObservers.get(el);
127085
+ mo === null || mo === void 0 || mo.disconnect();
127086
+ mutationObservers.delete(el);
127087
+ forEach(el, (node) => {
127088
+ resize === null || resize === void 0 || resize.unobserve(node);
127089
+ const a = animations.get(node);
127090
+ try {
127091
+ a === null || a === void 0 || a.cancel();
127092
+ } catch {}
127093
+ animations.delete(node);
127094
+ const io = intersections.get(node);
127095
+ io === null || io === void 0 || io.disconnect();
127096
+ intersections.delete(node);
127097
+ const i = intervals.get(node);
127098
+ if (i) clearInterval(i);
127099
+ intervals.delete(node);
127100
+ const d = debounces.get(node);
127101
+ if (d) clearTimeout(d);
127102
+ debounces.delete(node);
127103
+ coords.delete(node);
127104
+ siblings.delete(node);
127105
+ });
127106
+ }
127107
+ });
127108
+ }
127109
+ //#endregion
127110
+ //#region node_modules/@formkit/auto-animate/vue/index.mjs
127111
+ /**
127112
+ * AutoAnimate hook for adding dead-simple transitions and animations to Vue.
127113
+ * @param options - Auto animate options or a plugin
127114
+ * @returns A template ref. Use the `ref` attribute of your parent element
127115
+ * to store the element in this template ref.
127116
+ */
127117
+ function useAutoAnimate(options) {
127118
+ const element = ref();
127119
+ let controller;
127120
+ function setEnabled(enabled) {
127121
+ if (controller) enabled ? controller.enable() : controller.disable();
127122
+ }
127123
+ onMounted(() => {
127124
+ watchEffect((onCleanup) => {
127125
+ let el;
127126
+ if (element.value instanceof HTMLElement) el = element.value;
127127
+ else if (element.value && "$el" in element.value && element.value.$el instanceof HTMLElement) el = element.value.$el;
127128
+ if (el) {
127129
+ controller = autoAnimate(el, options || {});
127130
+ onCleanup(() => {
127131
+ var _a;
127132
+ (_a = controller === null || controller === void 0 ? void 0 : controller.destroy) === null || _a === void 0 || _a.call(controller);
127133
+ controller = void 0;
127134
+ });
127135
+ }
127136
+ });
127137
+ });
127138
+ onBeforeUnmount(() => {
127139
+ var _a;
127140
+ (_a = controller === null || controller === void 0 ? void 0 : controller.destroy) === null || _a === void 0 || _a.call(controller);
127141
+ controller = void 0;
127142
+ });
127143
+ return [element, setEnabled];
127144
+ }
127145
+ //#endregion
126411
127146
  //#region src/components/small/app-card-grid/AppBoard.vue
126412
127147
  var _hoisted_1$1 = { key: 0 };
126413
127148
  var _sfc_main$1 = {
@@ -126425,6 +127160,10 @@ var _sfc_main$1 = {
126425
127160
  disabled: {
126426
127161
  default: false,
126427
127162
  type: Boolean
127163
+ },
127164
+ isAnimated: {
127165
+ default: false,
127166
+ type: Boolean
126428
127167
  }
126429
127168
  }, {
126430
127169
  "modelValue": {},
@@ -126441,6 +127180,7 @@ var _sfc_main$1 = {
126441
127180
  return props.isMultiSelect ? value : (0, import_lodash.head)(value);
126442
127181
  }
126443
127182
  });
127183
+ const [parent, enableAnimation] = useAutoAnimate();
126444
127184
  const isSelected = (item) => {
126445
127185
  return modelValue.value.some((selectedItem) => (0, import_lodash.isEqual)(selectedItem, item));
126446
127186
  };
@@ -126449,18 +127189,26 @@ var _sfc_main$1 = {
126449
127189
  newValue = props.isMultiSelect ? newValue : [(0, import_lodash.last)(newValue)];
126450
127190
  modelValue.value = newValue;
126451
127191
  };
126452
- const boardStyle = computed(() => ({ gridTemplateColumns: `repeat(auto-fill, ${props.cellWidth}px)` }));
127192
+ const boardStyle = computed(() => ({
127193
+ gridTemplateColumns: `repeat(auto-fill, ${props.cellWidth}px)`,
127194
+ minHeight: "200px"
127195
+ }));
126453
127196
  const computedClass = computed(() => {
126454
127197
  return { "disabled-element": props.disabled };
126455
127198
  });
126456
127199
  const getCellClass = (item) => {
126457
127200
  return { selected: isSelected(item) };
126458
127201
  };
127202
+ onMounted(() => {
127203
+ enableAnimation(props.isAnimated);
127204
+ });
126459
127205
  return (_ctx, _cache) => {
126460
127206
  return openBlock(), createElementBlock("div", {
126461
127207
  style: { "min-height": "100px" },
126462
127208
  class: normalizeClass(computedClass.value)
126463
127209
  }, [_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(_ctx.$slots, "header")])) : createCommentVNode("", true), createElementVNode("div", {
127210
+ ref_key: "parent",
127211
+ ref: parent,
126464
127212
  class: "app-board",
126465
127213
  style: normalizeStyle(boardStyle.value)
126466
127214
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.list, (item, index) => {