scope360-core 0.0.43 → 0.0.45

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.
@@ -2,7 +2,7 @@ import './style.css';
2
2
  var Zu = Object.defineProperty;
3
3
  var ec = (n, e, t) => e in n ? Zu(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
4
  var oe = (n, e, t) => (ec(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineAsyncComponent as tc, openBlock as A, createBlock as pe, resolveDynamicComponent as or, unref as M, computed as U, createElementBlock as V, normalizeStyle as yt, normalizeClass as he, createCommentVNode as W, toDisplayString as Pe, withKeys as ue, withModifiers as ge, renderSlot as ie, createVNode as Te, withDirectives as Xt, Fragment as be, renderList as Ee, vShow as yn, Transition as Ln, withCtx as xe, createTextVNode as bt, mergeModels as on, useModel as Tn, ref as te, createElementVNode as se, vModelText as nc, pushScopeId as Vo, popScopeId as Ho, reactive as Ea, defineComponent as ut, useSlots as la, toRef as Pr, onMounted as ct, nextTick as wn, onUnmounted as lr, watch as Yn, mergeProps as lt, isRef as Us, createSlots as _t, normalizeProps as tt, guardReactiveProps as gt, Teleport as ac, h as rc, render as Gs, onBeforeUpdate as ic, getCurrentScope as sc, onScopeDispose as oc } from "vue";
5
+ import { defineAsyncComponent as tc, openBlock as A, createBlock as pe, resolveDynamicComponent as or, unref as M, computed as U, createElementBlock as V, normalizeStyle as yt, normalizeClass as he, createCommentVNode as W, toDisplayString as Pe, withKeys as ue, withModifiers as ge, renderSlot as ie, createVNode as Te, withDirectives as Xt, Fragment as be, renderList as Ee, vShow as yn, Transition as Ln, withCtx as xe, createTextVNode as bt, mergeModels as on, ref as te, useModel as Tn, createElementVNode as se, vModelText as nc, pushScopeId as Vo, popScopeId as Ho, reactive as Ea, defineComponent as ut, useSlots as la, toRef as Pr, onMounted as ct, nextTick as wn, onUnmounted as lr, watch as Yn, mergeProps as lt, isRef as Us, createSlots as _t, normalizeProps as tt, guardReactiveProps as gt, Teleport as ac, h as rc, render as Gs, onBeforeUpdate as ic, getCurrentScope as sc, onScopeDispose as oc } from "vue";
6
6
  const lc = (n, e) => {
7
7
  const t = n[e];
8
8
  return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((a, r) => {
@@ -1217,31 +1217,33 @@ const Sc = {
1217
1217
  }),
1218
1218
  emits: ["update:modelValue"],
1219
1219
  setup(n) {
1220
- const e = Tn(n, "modelValue", {
1221
- get(l) {
1222
- return typeof l == "object" ? l.name : l;
1220
+ const e = n, t = U(() => e.width ? { width: e.width } : null), a = te(null), r = U(() => a.value && a.value.isOpen), i = U(() => !!l.value.length), s = U(
1221
+ () => e.options.every((c) => typeof c == "object" && c !== null)
1222
+ ), o = U(
1223
+ () => s.value ? e.options.map((c) => c.name) : e.options
1224
+ ), l = Tn(n, "modelValue", {
1225
+ get(c) {
1226
+ return typeof c == "object" ? c.name : c;
1223
1227
  },
1224
- set(l) {
1225
- return l;
1228
+ set(c) {
1229
+ return s.value ? e.options.find((u) => u.name === c) : c;
1226
1230
  }
1227
- }), t = n, a = U(() => t.width ? { width: t.width } : null), r = te(null), i = U(() => r.value && r.value.isOpen), s = U(() => !!e.value.length), o = U(
1228
- () => options.every((l) => typeof l == "object" && l !== null) ? options.map((l) => l.name) : options
1229
- );
1230
- return (l, c) => (A(), V("div", {
1231
+ });
1232
+ return (c, u) => (A(), V("div", {
1231
1233
  class: "scope-multiselect-container",
1232
- style: yt(a.value)
1234
+ style: yt(t.value)
1233
1235
  }, [
1234
1236
  n.label ? (A(), V("div", Sc, Pe(n.label), 1)) : W("", !0),
1235
1237
  Te(M(qo), {
1236
1238
  ref_key: "multiselect",
1237
- ref: r,
1239
+ ref: a,
1238
1240
  class: he([
1239
1241
  "scope-multiselect",
1240
1242
  `-${n.size}`,
1241
1243
  { "-with-search": n.searchable, "-invalid": n.invalid }
1242
1244
  ]),
1243
- modelValue: e.value,
1244
- "onUpdate:modelValue": c[0] || (c[0] = (u) => e.value = u),
1245
+ modelValue: l.value,
1246
+ "onUpdate:modelValue": u[0] || (u[0] = (d) => l.value = d),
1245
1247
  options: o.value,
1246
1248
  searchable: n.searchable,
1247
1249
  disabled: n.disabled,
@@ -1258,20 +1260,20 @@ const Sc = {
1258
1260
  n.searchable ? (A(), pe(ln, {
1259
1261
  key: 0,
1260
1262
  icon: "search",
1261
- class: he(["search-item", s.value ? "-is-not-empty" : "-is-empty"])
1263
+ class: he(["search-item", i.value ? "-is-not-empty" : "-is-empty"])
1262
1264
  }, null, 8, ["class"])) : W("", !0),
1263
1265
  Te(ln, {
1264
1266
  icon: "chevron",
1265
1267
  class: he([
1266
1268
  "select-item",
1267
- s.value ? "-is-not-empty" : "-is-empty",
1268
- { "-opened": i.value }
1269
+ i.value ? "-is-not-empty" : "-is-empty",
1270
+ { "-opened": r.value }
1269
1271
  ])
1270
1272
  }, null, 8, ["class"])
1271
1273
  ], 2)
1272
1274
  ], 4));
1273
1275
  }
1274
- }, ly = /* @__PURE__ */ Ft(Oc, [["__scopeId", "data-v-f3a6ad93"]]), Ac = {
1276
+ }, ly = /* @__PURE__ */ Ft(Oc, [["__scopeId", "data-v-375323d7"]]), Ac = {
1275
1277
  key: 0,
1276
1278
  class: "scope-input__label"
1277
1279
  }, Cc = ["disabled", "placeholder"], Rc = {