@bagelink/vue 0.0.354 → 0.0.356

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SelectInput.vue"],"names":[],"mappings":"AA6DA;AAIA,OAAO,wBAAwB,CAAC;AAKhC,KAAK,MAAM,GACR,MAAM,GACN,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+Z7C,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SelectInput.vue"],"names":[],"mappings":"AAuDA;AAIA,OAAO,wBAAwB,CAAC;AAKhC,KAAK,MAAM,GACR,MAAM,GACN,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkb7C,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Tabs.vue"],"names":[],"mappings":"AAMA;AAEA,OAAO,EAAW,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;;;;;;;;AAkGlD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"Tabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Tabs.vue"],"names":[],"mappings":"AAWA;AAEA,OAAO,EAAW,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;;;;;;;;AAgIlD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
package/dist/index.cjs CHANGED
@@ -4915,7 +4915,7 @@ function txtField(id, label, options) {
4915
4915
  id,
4916
4916
  label,
4917
4917
  placeholder: options == null ? void 0 : options.placeholder,
4918
- attrs: { type: options == null ? void 0 : options.type }
4918
+ attrs: { type: options == null ? void 0 : options.type, pattern: options == null ? void 0 : options.pattern }
4919
4919
  };
4920
4920
  }
4921
4921
  function slctField(id, label, options, config) {
@@ -5026,7 +5026,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
5026
5026
  });
5027
5027
  const _hoisted_1$E = { class: "full-nav" };
5028
5028
  const _hoisted_2$v = { class: "nav-scroll" };
5029
- const _hoisted_3$l = { class: "nav-links-wrapper" };
5029
+ const _hoisted_3$m = { class: "nav-links-wrapper" };
5030
5030
  const _hoisted_4$e = { class: "tooltip" };
5031
5031
  const _hoisted_5$b = { class: "bot-buttons-wrapper" };
5032
5032
  const _hoisted_6$7 = { class: "tooltip" };
@@ -5061,7 +5061,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
5061
5061
  ], 32),
5062
5062
  vue.createElementVNode("div", _hoisted_1$E, [
5063
5063
  vue.createElementVNode("div", _hoisted_2$v, [
5064
- vue.createElementVNode("div", _hoisted_3$l, [
5064
+ vue.createElementVNode("div", _hoisted_3$m, [
5065
5065
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.links, (link) => {
5066
5066
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(link.to ? "router-link" : "div"), {
5067
5067
  class: "nav-button",
@@ -5427,7 +5427,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5427
5427
  const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
5428
5428
  const _hoisted_1$B = { class: "accordion-item" };
5429
5429
  const _hoisted_2$s = ["aria-expanded", "aria-controls"];
5430
- const _hoisted_3$k = { class: "accordion-label" };
5430
+ const _hoisted_3$l = { class: "accordion-label" };
5431
5431
  const _hoisted_4$d = ["id", "aria-hidden"];
5432
5432
  const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5433
5433
  __name: "AccordionItem",
@@ -5460,7 +5460,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5460
5460
  class: "accordion-head",
5461
5461
  "aria-controls": `accordion-body-${vue.unref(id)}`
5462
5462
  }, [
5463
- vue.createElementVNode("span", _hoisted_3$k, vue.toDisplayString(_ctx.label), 1),
5463
+ vue.createElementVNode("span", _hoisted_3$l, vue.toDisplayString(_ctx.label), 1),
5464
5464
  vue.createElementVNode("div", {
5465
5465
  class: vue.normalizeClass(["accordion-icon", { open: vue.unref(open) }])
5466
5466
  }, [
@@ -5487,7 +5487,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5487
5487
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
5488
5488
  const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5489
5489
  const _hoisted_2$r = { class: "p-1" };
5490
- const _hoisted_3$j = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5490
+ const _hoisted_3$k = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5491
5491
  const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5492
5492
  __name: "ListView",
5493
5493
  setup(__props) {
@@ -5496,7 +5496,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5496
5496
  vue.createElementVNode("div", _hoisted_2$r, [
5497
5497
  vue.renderSlot(_ctx.$slots, "header")
5498
5498
  ]),
5499
- vue.createElementVNode("div", _hoisted_3$j, [
5499
+ vue.createElementVNode("div", _hoisted_3$k, [
5500
5500
  vue.renderSlot(_ctx.$slots, "default")
5501
5501
  ])
5502
5502
  ]);
@@ -5567,7 +5567,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5567
5567
  });
5568
5568
  const _hoisted_1$x = { class: "table-list-wrap h-100" };
5569
5569
  const _hoisted_2$o = { class: "infinite-wrapper" };
5570
- const _hoisted_3$i = { class: "row first-row" };
5570
+ const _hoisted_3$j = { class: "row first-row" };
5571
5571
  const _hoisted_4$c = ["onClick"];
5572
5572
  const _hoisted_5$a = { class: "flex" };
5573
5573
  const _hoisted_6$6 = ["onClick"];
@@ -5608,7 +5608,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5608
5608
  return (_ctx, _cache) => {
5609
5609
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
5610
5610
  vue.createElementVNode("table", _hoisted_2$o, [
5611
- vue.createElementVNode("thead", _hoisted_3$i, [
5611
+ vue.createElementVNode("thead", _hoisted_3$j, [
5612
5612
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (field) => {
5613
5613
  return vue.openBlock(), vue.createElementBlock("th", {
5614
5614
  class: "col",
@@ -5707,7 +5707,7 @@ const _hoisted_2$n = {
5707
5707
  key: 0,
5708
5708
  class: "data-row"
5709
5709
  };
5710
- const _hoisted_3$h = { class: "key" };
5710
+ const _hoisted_3$i = { class: "key" };
5711
5711
  const _hoisted_4$b = { key: 1 };
5712
5712
  const _hoisted_5$9 = { class: "key" };
5713
5713
  const _hoisted_6$5 = { class: "vlue" };
@@ -5735,7 +5735,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5735
5735
  key: field.id
5736
5736
  }, [
5737
5737
  vue.unref(iffer)(field, itemData.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$n, [
5738
- vue.createElementVNode("div", _hoisted_3$h, vue.toDisplayString((field == null ? void 0 : field.label) || vue.unref(keyToLabel)(field.id)), 1),
5738
+ vue.createElementVNode("div", _hoisted_3$i, vue.toDisplayString((field == null ? void 0 : field.label) || vue.unref(keyToLabel)(field.id)), 1),
5739
5739
  vue.createVNode(vue.unref(_sfc_main$l), {
5740
5740
  field,
5741
5741
  modelValue: itemData.value,
@@ -5931,7 +5931,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
5931
5931
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-10743b06"]]);
5932
5932
  const _hoisted_1$r = { class: "bgl_vid" };
5933
5933
  const _hoisted_2$m = ["src"];
5934
- const _hoisted_3$g = ["src", "autoplay", "muted", "loop", "controls"];
5934
+ const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
5935
5935
  const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
5936
5936
  __name: "BglVideo",
5937
5937
  props: {
@@ -5988,7 +5988,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
5988
5988
  style: vue.normalizeStyle({ aspectRatio: aspectRatio.value }),
5989
5989
  controls: _ctx.controls,
5990
5990
  playsinline: ""
5991
- }, null, 12, _hoisted_3$g))
5991
+ }, null, 12, _hoisted_3$h))
5992
5992
  ]);
5993
5993
  };
5994
5994
  }
@@ -6381,7 +6381,7 @@ const _hoisted_2$k = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.cr
6381
6381
  }, [
6382
6382
  /* @__PURE__ */ vue.createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
6383
6383
  ], -1));
6384
- const _hoisted_3$f = [
6384
+ const _hoisted_3$g = [
6385
6385
  _hoisted_2$k
6386
6386
  ];
6387
6387
  const _hoisted_4$a = ["required", "id"];
@@ -6408,7 +6408,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
6408
6408
  vue.createElementVNode("div", {
6409
6409
  class: vue.normalizeClass(["check-square", { checked: checked.value }]),
6410
6410
  onClick: _cache[0] || (_cache[0] = ($event) => checked.value = !checked.value)
6411
- }, _hoisted_3$f, 2),
6411
+ }, _hoisted_3$g, 2),
6412
6412
  vue.createElementVNode("label", null, [
6413
6413
  vue.withDirectives(vue.createElementVNode("input", {
6414
6414
  required: _ctx.required,
@@ -15089,7 +15089,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15089
15089
  });
15090
15090
  const _hoisted_1$n = ["title"];
15091
15091
  const _hoisted_2$i = { key: 0 };
15092
- const _hoisted_3$e = ["value", "placeholder"];
15092
+ const _hoisted_3$f = ["value", "placeholder"];
15093
15093
  const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
15094
15094
  __name: "JSONInput",
15095
15095
  props: {
@@ -15121,14 +15121,15 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
15121
15121
  onInput: handleInput,
15122
15122
  class: vue.normalizeClass({ "no-edit": !_ctx.editMode }),
15123
15123
  placeholder: _ctx.placeholder
15124
- }, null, 42, _hoisted_3$e)
15124
+ }, null, 42, _hoisted_3$f)
15125
15125
  ], 10, _hoisted_1$n);
15126
15126
  };
15127
15127
  }
15128
15128
  });
15129
15129
  const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1fc4f739"]]);
15130
15130
  const _hoisted_1$m = ["disabled"];
15131
- const _hoisted_2$h = ["onClick"];
15131
+ const _hoisted_2$h = ["value"];
15132
+ const _hoisted_3$e = ["onClick"];
15132
15133
  const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15133
15134
  __name: "SelectInput",
15134
15135
  props: {
@@ -15189,13 +15190,17 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15189
15190
  return option2.value;
15190
15191
  };
15191
15192
  const isSelected = (option2) => !!selectedItems.value.find((item) => getValue(option2) === getValue(item));
15192
- const filteredOptions = vue.computed(() => props2.options.filter((option2) => {
15193
- const searchTerm = new RegExp(search.value, "gi");
15194
- return Boolean(option2) && (getLabel(option2).match(searchTerm) || getValue(option2).match(searchTerm));
15195
- }));
15193
+ const filteredOptions = vue.computed(
15194
+ () => props2.options.filter((option2) => {
15195
+ const searchTerm = new RegExp(search.value, "gi");
15196
+ return Boolean(option2) && (getLabel(option2).match(searchTerm) || getValue(option2).match(searchTerm));
15197
+ })
15198
+ );
15196
15199
  const select2 = (option2) => {
15197
15200
  var _a2;
15198
- const existingIndex = selectedItems.value.findIndex((item) => getValue(item) === getValue(option2));
15201
+ const existingIndex = selectedItems.value.findIndex(
15202
+ (item) => getValue(item) === getValue(option2)
15203
+ );
15199
15204
  if (existingIndex > -1)
15200
15205
  selectedItems.value.splice(existingIndex, 1);
15201
15206
  else if (props2.multiselect) {
@@ -15217,7 +15222,9 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15217
15222
  }
15218
15223
  }
15219
15224
  function compareArrays(arr1, arr2) {
15220
- const isSame = arr1.every((item) => arr2.map((a2) => getValue(a2)).includes(getValue(item)));
15225
+ const isSame = arr1.every(
15226
+ (item) => arr2.map((a2) => getValue(a2)).includes(getValue(item))
15227
+ );
15221
15228
  return isSame;
15222
15229
  }
15223
15230
  vue.watch(
@@ -15236,19 +15243,24 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15236
15243
  },
15237
15244
  { immediate: true }
15238
15245
  );
15239
- vue.watch(() => props2.options, () => {
15240
- const original = JSON.stringify(selectedItems.value);
15241
- [...selectedItems.value].forEach((option2, i2) => {
15242
- const exists = props2.options.find((o2) => getValue(o2) === getValue(option2));
15243
- if (!exists)
15244
- selectedItems.value.splice(i2, 1);
15245
- else
15246
- selectedItems.value.splice(i2, 1, exists);
15247
- });
15248
- const newSelection = JSON.stringify(selectedItems.value);
15249
- if (original !== newSelection)
15250
- emitUpdate();
15251
- });
15246
+ vue.watch(
15247
+ () => props2.options,
15248
+ () => {
15249
+ const original = JSON.stringify(selectedItems.value);
15250
+ [...selectedItems.value].forEach((option2, i2) => {
15251
+ const exists = props2.options.find(
15252
+ (o2) => getValue(o2) === getValue(option2)
15253
+ );
15254
+ if (!exists)
15255
+ selectedItems.value.splice(i2, 1);
15256
+ else
15257
+ selectedItems.value.splice(i2, 1, exists);
15258
+ });
15259
+ const newSelection = JSON.stringify(selectedItems.value);
15260
+ if (original !== newSelection)
15261
+ emitUpdate();
15262
+ }
15263
+ );
15252
15264
  return (_ctx, _cache) => {
15253
15265
  return vue.openBlock(), vue.createBlock(vue.unref(kt$1), {
15254
15266
  onHide: _cache[3] || (_cache[3] = ($event) => updateOpen(false)),
@@ -15289,7 +15301,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15289
15301
  icon: "fiber_manual_record"
15290
15302
  })) : vue.createCommentVNode("", true),
15291
15303
  vue.createElementVNode("span", null, vue.toDisplayString(getLabel(option2)), 1)
15292
- ], 10, _hoisted_2$h);
15304
+ ], 10, _hoisted_3$e);
15293
15305
  }), 128)),
15294
15306
  vue.renderSlot(_ctx.$slots, "last", {}, void 0, true)
15295
15307
  ]),
@@ -15308,14 +15320,13 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15308
15320
  vue.createElementVNode("p", null, vue.toDisplayString(selectedLabel.value), 1),
15309
15321
  vue.createVNode(vue.unref(_sfc_main$H), vue.normalizeProps(vue.guardReactiveProps({ icon: vue.unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
15310
15322
  ], 10, _hoisted_1$m),
15311
- _ctx.required ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
15323
+ _ctx.required ? (vue.openBlock(), vue.createElementBlock("input", {
15312
15324
  key: 0,
15313
15325
  style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
15314
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedItems.value = $event),
15326
+ onInput: _cache[1] || (_cache[1] = ($event) => updateOpen(true)),
15327
+ value: selectedItems.value,
15315
15328
  required: ""
15316
- }, null, 512)), [
15317
- [vue.vModelText, selectedItems.value]
15318
- ]) : vue.createCommentVNode("", true)
15329
+ }, null, 40, _hoisted_2$h)) : vue.createCommentVNode("", true)
15319
15330
  ])
15320
15331
  ]),
15321
15332
  _: 3
@@ -15323,7 +15334,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15323
15334
  };
15324
15335
  }
15325
15336
  });
15326
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-8235eff6"]]);
15337
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70fd5ae7"]]);
15327
15338
  /*!
15328
15339
  * vue-draggable-next v2.2.0
15329
15340
  * (c) 2023 Anish George
@@ -45758,8 +45769,21 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
45758
45769
  modelValue: {}
45759
45770
  },
45760
45771
  setup(__props) {
45772
+ const props2 = __props;
45773
+ const slots = vue.useSlots();
45761
45774
  const group = Math.random().toString(36).substring(7);
45762
45775
  const { currentTab } = useTabs(group);
45776
+ const tabValue = (tab) => typeof tab === "string" ? tab : tab.id;
45777
+ const tabComponent = vue.defineComponent({
45778
+ render() {
45779
+ var _a2, _b, _c;
45780
+ const currentTabIndex = props2.tabs.findIndex(
45781
+ (tab) => tabValue(tab) === currentTab.value
45782
+ );
45783
+ const slotChildren = (_c = (_b = (_a2 = slots == null ? void 0 : slots.default) == null ? void 0 : _a2.call(slots)) == null ? void 0 : _b[1]) == null ? void 0 : _c.children;
45784
+ return vue.h("div", slotChildren == null ? void 0 : slotChildren[currentTabIndex]);
45785
+ }
45786
+ });
45763
45787
  return (_ctx, _cache) => {
45764
45788
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
45765
45789
  vue.createVNode(vue.unref(TabsNav), {
@@ -45768,7 +45792,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
45768
45792
  class: "mb-05"
45769
45793
  }, null, 8, ["tabs", "group"]),
45770
45794
  vue.unref(currentTab) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
45771
- vue.renderSlot(_ctx.$slots, vue.unref(currentTab))
45795
+ vue.unref(slots)[vue.unref(currentTab)] ? vue.renderSlot(_ctx.$slots, vue.unref(currentTab), { key: 0 }) : vue.unref(currentTab) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tabComponent)), { key: 1 })) : vue.createCommentVNode("", true)
45772
45796
  ])) : vue.createCommentVNode("", true)
45773
45797
  ], 64);
45774
45798
  };
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ var __publicField2 = (obj, key, value) => {
4
4
  __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, inject, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, computed, withModifiers, createTextVNode, watch, onMounted, onUnmounted, mergeModels, useModel, createSlots, Transition, reactive, provide, withDirectives, vModelCheckbox, toRef, isRef, Teleport, render as render$f, onBeforeUpdate, vShow, getCurrentScope, onScopeDispose, vModelText, TransitionGroup, vModelDynamic, vModelRadio, onBeforeUnmount, markRaw, getCurrentInstance, watchEffect, customRef, resolveDirective } from "vue";
7
+ import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, inject, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, computed, withModifiers, createTextVNode, watch, onMounted, onUnmounted, mergeModels, useModel, createSlots, Transition, reactive, provide, withDirectives, vModelCheckbox, toRef, isRef, Teleport, render as render$f, onBeforeUpdate, vShow, getCurrentScope, onScopeDispose, TransitionGroup, vModelDynamic, vModelText, vModelRadio, onBeforeUnmount, markRaw, getCurrentInstance, watchEffect, customRef, resolveDirective } from "vue";
8
8
  const sides = ["top", "right", "bottom", "left"];
9
9
  const alignments = ["start", "end"];
10
10
  const placements$1 = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
@@ -4913,7 +4913,7 @@ function txtField(id, label, options) {
4913
4913
  id,
4914
4914
  label,
4915
4915
  placeholder: options == null ? void 0 : options.placeholder,
4916
- attrs: { type: options == null ? void 0 : options.type }
4916
+ attrs: { type: options == null ? void 0 : options.type, pattern: options == null ? void 0 : options.pattern }
4917
4917
  };
4918
4918
  }
4919
4919
  function slctField(id, label, options, config) {
@@ -5024,7 +5024,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5024
5024
  });
5025
5025
  const _hoisted_1$E = { class: "full-nav" };
5026
5026
  const _hoisted_2$v = { class: "nav-scroll" };
5027
- const _hoisted_3$l = { class: "nav-links-wrapper" };
5027
+ const _hoisted_3$m = { class: "nav-links-wrapper" };
5028
5028
  const _hoisted_4$e = { class: "tooltip" };
5029
5029
  const _hoisted_5$b = { class: "bot-buttons-wrapper" };
5030
5030
  const _hoisted_6$7 = { class: "tooltip" };
@@ -5059,7 +5059,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5059
5059
  ], 32),
5060
5060
  createElementVNode("div", _hoisted_1$E, [
5061
5061
  createElementVNode("div", _hoisted_2$v, [
5062
- createElementVNode("div", _hoisted_3$l, [
5062
+ createElementVNode("div", _hoisted_3$m, [
5063
5063
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.links, (link) => {
5064
5064
  return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
5065
5065
  class: "nav-button",
@@ -5425,7 +5425,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5425
5425
  const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
5426
5426
  const _hoisted_1$B = { class: "accordion-item" };
5427
5427
  const _hoisted_2$s = ["aria-expanded", "aria-controls"];
5428
- const _hoisted_3$k = { class: "accordion-label" };
5428
+ const _hoisted_3$l = { class: "accordion-label" };
5429
5429
  const _hoisted_4$d = ["id", "aria-hidden"];
5430
5430
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
5431
5431
  __name: "AccordionItem",
@@ -5458,7 +5458,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5458
5458
  class: "accordion-head",
5459
5459
  "aria-controls": `accordion-body-${unref(id)}`
5460
5460
  }, [
5461
- createElementVNode("span", _hoisted_3$k, toDisplayString(_ctx.label), 1),
5461
+ createElementVNode("span", _hoisted_3$l, toDisplayString(_ctx.label), 1),
5462
5462
  createElementVNode("div", {
5463
5463
  class: normalizeClass(["accordion-icon", { open: unref(open) }])
5464
5464
  }, [
@@ -5485,7 +5485,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5485
5485
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
5486
5486
  const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5487
5487
  const _hoisted_2$r = { class: "p-1" };
5488
- const _hoisted_3$j = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5488
+ const _hoisted_3$k = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5489
5489
  const _sfc_main$B = /* @__PURE__ */ defineComponent({
5490
5490
  __name: "ListView",
5491
5491
  setup(__props) {
@@ -5494,7 +5494,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5494
5494
  createElementVNode("div", _hoisted_2$r, [
5495
5495
  renderSlot(_ctx.$slots, "header")
5496
5496
  ]),
5497
- createElementVNode("div", _hoisted_3$j, [
5497
+ createElementVNode("div", _hoisted_3$k, [
5498
5498
  renderSlot(_ctx.$slots, "default")
5499
5499
  ])
5500
5500
  ]);
@@ -5565,7 +5565,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
5565
5565
  });
5566
5566
  const _hoisted_1$x = { class: "table-list-wrap h-100" };
5567
5567
  const _hoisted_2$o = { class: "infinite-wrapper" };
5568
- const _hoisted_3$i = { class: "row first-row" };
5568
+ const _hoisted_3$j = { class: "row first-row" };
5569
5569
  const _hoisted_4$c = ["onClick"];
5570
5570
  const _hoisted_5$a = { class: "flex" };
5571
5571
  const _hoisted_6$6 = ["onClick"];
@@ -5606,7 +5606,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
5606
5606
  return (_ctx, _cache) => {
5607
5607
  return openBlock(), createElementBlock("div", _hoisted_1$x, [
5608
5608
  createElementVNode("table", _hoisted_2$o, [
5609
- createElementVNode("thead", _hoisted_3$i, [
5609
+ createElementVNode("thead", _hoisted_3$j, [
5610
5610
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (field) => {
5611
5611
  return openBlock(), createElementBlock("th", {
5612
5612
  class: "col",
@@ -5705,7 +5705,7 @@ const _hoisted_2$n = {
5705
5705
  key: 0,
5706
5706
  class: "data-row"
5707
5707
  };
5708
- const _hoisted_3$h = { class: "key" };
5708
+ const _hoisted_3$i = { class: "key" };
5709
5709
  const _hoisted_4$b = { key: 1 };
5710
5710
  const _hoisted_5$9 = { class: "key" };
5711
5711
  const _hoisted_6$5 = { class: "vlue" };
@@ -5733,7 +5733,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5733
5733
  key: field.id
5734
5734
  }, [
5735
5735
  unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$n, [
5736
- createElementVNode("div", _hoisted_3$h, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
5736
+ createElementVNode("div", _hoisted_3$i, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
5737
5737
  createVNode(unref(_sfc_main$l), {
5738
5738
  field,
5739
5739
  modelValue: itemData.value,
@@ -5929,7 +5929,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
5929
5929
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-10743b06"]]);
5930
5930
  const _hoisted_1$r = { class: "bgl_vid" };
5931
5931
  const _hoisted_2$m = ["src"];
5932
- const _hoisted_3$g = ["src", "autoplay", "muted", "loop", "controls"];
5932
+ const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
5933
5933
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
5934
5934
  __name: "BglVideo",
5935
5935
  props: {
@@ -5986,7 +5986,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5986
5986
  style: normalizeStyle({ aspectRatio: aspectRatio.value }),
5987
5987
  controls: _ctx.controls,
5988
5988
  playsinline: ""
5989
- }, null, 12, _hoisted_3$g))
5989
+ }, null, 12, _hoisted_3$h))
5990
5990
  ]);
5991
5991
  };
5992
5992
  }
@@ -6379,7 +6379,7 @@ const _hoisted_2$k = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
6379
6379
  }, [
6380
6380
  /* @__PURE__ */ createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
6381
6381
  ], -1));
6382
- const _hoisted_3$f = [
6382
+ const _hoisted_3$g = [
6383
6383
  _hoisted_2$k
6384
6384
  ];
6385
6385
  const _hoisted_4$a = ["required", "id"];
@@ -6406,7 +6406,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
6406
6406
  createElementVNode("div", {
6407
6407
  class: normalizeClass(["check-square", { checked: checked.value }]),
6408
6408
  onClick: _cache[0] || (_cache[0] = ($event) => checked.value = !checked.value)
6409
- }, _hoisted_3$f, 2),
6409
+ }, _hoisted_3$g, 2),
6410
6410
  createElementVNode("label", null, [
6411
6411
  withDirectives(createElementVNode("input", {
6412
6412
  required: _ctx.required,
@@ -15087,7 +15087,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
15087
15087
  });
15088
15088
  const _hoisted_1$n = ["title"];
15089
15089
  const _hoisted_2$i = { key: 0 };
15090
- const _hoisted_3$e = ["value", "placeholder"];
15090
+ const _hoisted_3$f = ["value", "placeholder"];
15091
15091
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
15092
15092
  __name: "JSONInput",
15093
15093
  props: {
@@ -15119,14 +15119,15 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
15119
15119
  onInput: handleInput,
15120
15120
  class: normalizeClass({ "no-edit": !_ctx.editMode }),
15121
15121
  placeholder: _ctx.placeholder
15122
- }, null, 42, _hoisted_3$e)
15122
+ }, null, 42, _hoisted_3$f)
15123
15123
  ], 10, _hoisted_1$n);
15124
15124
  };
15125
15125
  }
15126
15126
  });
15127
15127
  const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1fc4f739"]]);
15128
15128
  const _hoisted_1$m = ["disabled"];
15129
- const _hoisted_2$h = ["onClick"];
15129
+ const _hoisted_2$h = ["value"];
15130
+ const _hoisted_3$e = ["onClick"];
15130
15131
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
15131
15132
  __name: "SelectInput",
15132
15133
  props: {
@@ -15187,13 +15188,17 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15187
15188
  return option2.value;
15188
15189
  };
15189
15190
  const isSelected = (option2) => !!selectedItems.value.find((item) => getValue(option2) === getValue(item));
15190
- const filteredOptions = computed(() => props2.options.filter((option2) => {
15191
- const searchTerm = new RegExp(search.value, "gi");
15192
- return Boolean(option2) && (getLabel(option2).match(searchTerm) || getValue(option2).match(searchTerm));
15193
- }));
15191
+ const filteredOptions = computed(
15192
+ () => props2.options.filter((option2) => {
15193
+ const searchTerm = new RegExp(search.value, "gi");
15194
+ return Boolean(option2) && (getLabel(option2).match(searchTerm) || getValue(option2).match(searchTerm));
15195
+ })
15196
+ );
15194
15197
  const select2 = (option2) => {
15195
15198
  var _a2;
15196
- const existingIndex = selectedItems.value.findIndex((item) => getValue(item) === getValue(option2));
15199
+ const existingIndex = selectedItems.value.findIndex(
15200
+ (item) => getValue(item) === getValue(option2)
15201
+ );
15197
15202
  if (existingIndex > -1)
15198
15203
  selectedItems.value.splice(existingIndex, 1);
15199
15204
  else if (props2.multiselect) {
@@ -15215,7 +15220,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15215
15220
  }
15216
15221
  }
15217
15222
  function compareArrays(arr1, arr2) {
15218
- const isSame = arr1.every((item) => arr2.map((a2) => getValue(a2)).includes(getValue(item)));
15223
+ const isSame = arr1.every(
15224
+ (item) => arr2.map((a2) => getValue(a2)).includes(getValue(item))
15225
+ );
15219
15226
  return isSame;
15220
15227
  }
15221
15228
  watch(
@@ -15234,19 +15241,24 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15234
15241
  },
15235
15242
  { immediate: true }
15236
15243
  );
15237
- watch(() => props2.options, () => {
15238
- const original = JSON.stringify(selectedItems.value);
15239
- [...selectedItems.value].forEach((option2, i2) => {
15240
- const exists = props2.options.find((o2) => getValue(o2) === getValue(option2));
15241
- if (!exists)
15242
- selectedItems.value.splice(i2, 1);
15243
- else
15244
- selectedItems.value.splice(i2, 1, exists);
15245
- });
15246
- const newSelection = JSON.stringify(selectedItems.value);
15247
- if (original !== newSelection)
15248
- emitUpdate();
15249
- });
15244
+ watch(
15245
+ () => props2.options,
15246
+ () => {
15247
+ const original = JSON.stringify(selectedItems.value);
15248
+ [...selectedItems.value].forEach((option2, i2) => {
15249
+ const exists = props2.options.find(
15250
+ (o2) => getValue(o2) === getValue(option2)
15251
+ );
15252
+ if (!exists)
15253
+ selectedItems.value.splice(i2, 1);
15254
+ else
15255
+ selectedItems.value.splice(i2, 1, exists);
15256
+ });
15257
+ const newSelection = JSON.stringify(selectedItems.value);
15258
+ if (original !== newSelection)
15259
+ emitUpdate();
15260
+ }
15261
+ );
15250
15262
  return (_ctx, _cache) => {
15251
15263
  return openBlock(), createBlock(unref(kt$1), {
15252
15264
  onHide: _cache[3] || (_cache[3] = ($event) => updateOpen(false)),
@@ -15287,7 +15299,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15287
15299
  icon: "fiber_manual_record"
15288
15300
  })) : createCommentVNode("", true),
15289
15301
  createElementVNode("span", null, toDisplayString(getLabel(option2)), 1)
15290
- ], 10, _hoisted_2$h);
15302
+ ], 10, _hoisted_3$e);
15291
15303
  }), 128)),
15292
15304
  renderSlot(_ctx.$slots, "last", {}, void 0, true)
15293
15305
  ]),
@@ -15306,14 +15318,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15306
15318
  createElementVNode("p", null, toDisplayString(selectedLabel.value), 1),
15307
15319
  createVNode(unref(_sfc_main$H), normalizeProps(guardReactiveProps({ icon: unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
15308
15320
  ], 10, _hoisted_1$m),
15309
- _ctx.required ? withDirectives((openBlock(), createElementBlock("input", {
15321
+ _ctx.required ? (openBlock(), createElementBlock("input", {
15310
15322
  key: 0,
15311
15323
  style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
15312
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedItems.value = $event),
15324
+ onInput: _cache[1] || (_cache[1] = ($event) => updateOpen(true)),
15325
+ value: selectedItems.value,
15313
15326
  required: ""
15314
- }, null, 512)), [
15315
- [vModelText, selectedItems.value]
15316
- ]) : createCommentVNode("", true)
15327
+ }, null, 40, _hoisted_2$h)) : createCommentVNode("", true)
15317
15328
  ])
15318
15329
  ]),
15319
15330
  _: 3
@@ -15321,7 +15332,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15321
15332
  };
15322
15333
  }
15323
15334
  });
15324
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-8235eff6"]]);
15335
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70fd5ae7"]]);
15325
15336
  /*!
15326
15337
  * vue-draggable-next v2.2.0
15327
15338
  * (c) 2023 Anish George
@@ -45756,8 +45767,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
45756
45767
  modelValue: {}
45757
45768
  },
45758
45769
  setup(__props) {
45770
+ const props2 = __props;
45771
+ const slots = useSlots();
45759
45772
  const group = Math.random().toString(36).substring(7);
45760
45773
  const { currentTab } = useTabs(group);
45774
+ const tabValue = (tab) => typeof tab === "string" ? tab : tab.id;
45775
+ const tabComponent = defineComponent({
45776
+ render() {
45777
+ var _a2, _b, _c;
45778
+ const currentTabIndex = props2.tabs.findIndex(
45779
+ (tab) => tabValue(tab) === currentTab.value
45780
+ );
45781
+ const slotChildren = (_c = (_b = (_a2 = slots == null ? void 0 : slots.default) == null ? void 0 : _a2.call(slots)) == null ? void 0 : _b[1]) == null ? void 0 : _c.children;
45782
+ return h$2("div", slotChildren == null ? void 0 : slotChildren[currentTabIndex]);
45783
+ }
45784
+ });
45761
45785
  return (_ctx, _cache) => {
45762
45786
  return openBlock(), createElementBlock(Fragment$1, null, [
45763
45787
  createVNode(unref(TabsNav), {
@@ -45766,7 +45790,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
45766
45790
  class: "mb-05"
45767
45791
  }, null, 8, ["tabs", "group"]),
45768
45792
  unref(currentTab) ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
45769
- renderSlot(_ctx.$slots, unref(currentTab))
45793
+ unref(slots)[unref(currentTab)] ? renderSlot(_ctx.$slots, unref(currentTab), { key: 0 }) : unref(currentTab) ? (openBlock(), createBlock(resolveDynamicComponent(unref(tabComponent)), { key: 1 })) : createCommentVNode("", true)
45770
45794
  ])) : createCommentVNode("", true)
45771
45795
  ], 64);
45772
45796
  };
package/dist/style.css CHANGED
@@ -1033,10 +1033,10 @@ display: block;
1033
1033
  }
1034
1034
  .resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.v-popper__popper{z-index:10000;top:0;left:0;outline:none}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s;pointer-events:none}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__backdrop{position:absolute;top:0;left:0;width:100%;height:100%;display:none}.v-popper__inner{position:relative;box-sizing:border-box;overflow-y:auto}.v-popper__inner>div{position:relative;z-index:1;max-width:inherit;max-height:inherit}.v-popper__arrow-container{position:absolute;width:10px;height:10px}.v-popper__popper--arrow-overflow .v-popper__arrow-container,.v-popper__popper--no-positioning .v-popper__arrow-container{display:none}.v-popper__arrow-inner,.v-popper__arrow-outer{border-style:solid;position:absolute;top:0;left:0;width:0;height:0}.v-popper__arrow-inner{visibility:hidden;border-width:7px}.v-popper__arrow-outer{border-width:6px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{left:-2px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{left:-1px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer{border-bottom-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{border-top-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{top:-4px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{top:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{top:-1px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{border-left-width:0;border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{left:-4px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{left:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-10px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer{border-right-width:0;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner{left:-2px}.v-popper--theme-tooltip .v-popper__inner{background:rgba(0,0,0,.8);color:#fff;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow-outer{border-color:#000c}.v-popper--theme-dropdown .v-popper__inner{background:#fff;color:#000;border-radius:6px;border:1px solid #ddd;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow-inner{visibility:visible;border-color:#fff}.v-popper--theme-dropdown .v-popper__arrow-outer{border-color:#ddd}
1035
1035
 
1036
- .selectinput[data-v-8235eff6] {
1036
+ .selectinput[data-v-70fd5ae7] {
1037
1037
  width: 100%;
1038
1038
  }
1039
- .selectinput-option[data-v-8235eff6] {
1039
+ .selectinput-option[data-v-70fd5ae7] {
1040
1040
  padding: 6px 12px;
1041
1041
  cursor: pointer;
1042
1042
  border-radius: 5px;
@@ -1047,14 +1047,14 @@ display: block;
1047
1047
  width: 100%;
1048
1048
  font-size: var(--input-font-size);
1049
1049
  }
1050
- .selectinput-options[data-v-8235eff6] {
1050
+ .selectinput-options[data-v-70fd5ae7] {
1051
1051
  max-height: 300px;
1052
1052
  overflow-y: auto;
1053
1053
  }
1054
- .selectinput-option[data-v-8235eff6]:hover {
1054
+ .selectinput-option[data-v-70fd5ae7]:hover {
1055
1055
  background: var(--bgl-gray-20);
1056
1056
  }
1057
- .isEmpty p[data-v-8235eff6]{
1057
+ .isEmpty p[data-v-70fd5ae7] {
1058
1058
  opacity: 0.3;
1059
1059
  }
1060
1060
 
@@ -10,6 +10,7 @@ type TextInputOptions = {
10
10
  class?: string;
11
11
  defaultValue?: string;
12
12
  disabled?: boolean;
13
+ pattern?: string;
13
14
  };
14
15
  export declare function txtField(id: string, label?: string, options?: TextInputOptions): Field;
15
16
  export declare function slctField(id: string, label?: string, options?: Option[] | (() => Option[]), config?: TextInputOptions): Field;
@@ -1 +1 @@
1
- {"version":3,"file":"BagelFormUtils.d.ts","sourceRoot":"","sources":["../../src/utils/BagelFormUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEvG,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAA;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAUtF;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAY7H;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAUtF;AAED,wBAAgB,MAAM,CAAC,GAAG,QAAQ,EAAE,KAAK,EAAE;;;;EAM1C"}
1
+ {"version":3,"file":"BagelFormUtils.d.ts","sourceRoot":"","sources":["../../src/utils/BagelFormUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEvG,KAAK,gBAAgB,GAAG;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAUtF;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAY7H;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAUtF;AAED,wBAAgB,MAAM,CAAC,GAAG,QAAQ,EAAE,KAAK,EAAE;;;;EAM1C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.354",
4
+ "version": "0.0.356",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -3,8 +3,7 @@
3
3
  @hide="updateOpen(false)"
4
4
  ref="dropdown"
5
5
  placement="bottom-start"
6
- class="bagel-input selectinput"
7
- >
6
+ class="bagel-input selectinput">
8
7
  <label>
9
8
  {{ label }}
10
9
  <button
@@ -12,44 +11,39 @@
12
11
  :disabled="disabled"
13
12
  type="button"
14
13
  class="selectinput-btn"
15
- :class="{isEmpty: selectedItems.length ===0}"
16
- >
14
+ :class="{ isEmpty: selectedItems.length === 0 }">
17
15
  <p>{{ selectedLabel }}</p>
18
16
  <Icon v-bind="{ icon: open ? 'unfold_less' : 'unfold_more' }" />
19
17
  </button>
20
18
  <input
21
19
  style="width: 0; height: 0; position: absolute; opacity: 0; z-index: -1"
22
20
  v-if="required"
23
- v-model="selectedItems"
24
- required
25
- >
21
+ @input="updateOpen(true)"
22
+ :value="selectedItems"
23
+ required />
26
24
  </label>
27
25
  <template #popper="{ hide }">
28
26
  <Card
29
27
  class="selectinput-options p-05"
30
- :style="{ width: fullWidth ? '100%' : 'auto' }"
31
- >
28
+ :style="{ width: fullWidth ? '100%' : 'auto' }">
32
29
  <TextInput
33
30
  v-if="searchable"
34
31
  ref="searchInput"
35
32
  dense
36
33
  :placeholder="'Search'"
37
34
  icon="search"
38
- v-model="search"
39
- />
35
+ v-model="search" />
40
36
  <div
41
37
  class="selectinput-option hover gap-1"
42
38
  v-for="(option, i) in filteredOptions"
43
39
  :key="`${option}${i}`"
44
40
  @click="select(option)"
45
- :class="{ selected: isSelected(option) }"
46
- >
41
+ :class="{ selected: isSelected(option) }">
47
42
  <Icon v-if="isSelected(option)" icon="check" />
48
43
  <Icon
49
44
  class="opacity-3"
50
45
  v-if="!isSelected(option)"
51
- icon="fiber_manual_record"
52
- />
46
+ icon="fiber_manual_record" />
53
47
  <span>
54
48
  {{ getLabel(option) }}
55
49
  </span>
@@ -99,7 +93,7 @@ function updateOpen(visible: boolean) {
99
93
  else {
100
94
  setTimeout(
101
95
  () => (searchInput as any)?.$el?.querySelector('input')?.focus(),
102
- 100,
96
+ 100
103
97
  );
104
98
  }
105
99
  }
@@ -130,18 +124,23 @@ const getValue = (option: Option) => {
130
124
  return option.value;
131
125
  };
132
126
 
133
- const isSelected = (option: Option) => !!selectedItems.find((item) => getValue(option) === getValue(item));
127
+ const isSelected = (option: Option) =>
128
+ !!selectedItems.find((item) => getValue(option) === getValue(item));
134
129
 
135
- const filteredOptions = $computed(() => props.options.filter((option) => {
136
- const searchTerm = new RegExp(search, 'gi');
137
- return (
138
- Boolean(option) &&
130
+ const filteredOptions = $computed(() =>
131
+ props.options.filter((option) => {
132
+ const searchTerm = new RegExp(search, 'gi');
133
+ return (
134
+ Boolean(option) &&
139
135
  (getLabel(option).match(searchTerm) || getValue(option).match(searchTerm))
140
- );
141
- }));
136
+ );
137
+ })
138
+ );
142
139
 
143
140
  const select = (option: Option) => {
144
- const existingIndex = selectedItems.findIndex((item) => getValue(item) === getValue(option));
141
+ const existingIndex = selectedItems.findIndex(
142
+ (item) => getValue(item) === getValue(option)
143
+ );
145
144
  if (existingIndex > -1) selectedItems.splice(existingIndex, 1);
146
145
  else if (props.multiselect) {
147
146
  selectedItems.push(option);
@@ -163,7 +162,9 @@ function emitUpdate() {
163
162
  }
164
163
 
165
164
  function compareArrays(arr1: Option[], arr2: Option[]) {
166
- const isSame = arr1.every((item: Option) => arr2.map((a) => getValue(a)).includes(getValue(item)));
165
+ const isSame = arr1.every((item: Option) =>
166
+ arr2.map((a) => getValue(a)).includes(getValue(item))
167
+ );
167
168
  return isSame;
168
169
  }
169
170
 
@@ -172,25 +173,32 @@ watch(
172
173
  (newVal: Option | Option[]) => {
173
174
  if (!newVal) return;
174
175
  if (!props.multiselect) {
175
- if (!isSelected(newVal)) selectedItems.splice(0, selectedItems.length, newVal);
176
+ if (!isSelected(newVal))
177
+ selectedItems.splice(0, selectedItems.length, newVal);
176
178
  } else {
177
179
  const isSame = compareArrays([newVal].flat(), selectedItems);
178
- if (!isSame) selectedItems.splice(0, selectedItems.length, [newVal].flat());
180
+ if (!isSame)
181
+ selectedItems.splice(0, selectedItems.length, [newVal].flat());
179
182
  }
180
183
  },
181
- { immediate: true },
184
+ { immediate: true }
182
185
  );
183
186
 
184
- watch(() => props.options, () => {
185
- const original = JSON.stringify(selectedItems);
186
- [...selectedItems].forEach((option, i) => {
187
- const exists = props.options.find((o) => getValue(o) === getValue(option));
188
- if (!exists) selectedItems.splice(i, 1);
189
- else selectedItems.splice(i, 1, exists);
190
- });
191
- const newSelection = JSON.stringify(selectedItems);
192
- if (original !== newSelection) emitUpdate();
193
- });
187
+ watch(
188
+ () => props.options,
189
+ () => {
190
+ const original = JSON.stringify(selectedItems);
191
+ [...selectedItems].forEach((option, i) => {
192
+ const exists = props.options.find(
193
+ (o) => getValue(o) === getValue(option)
194
+ );
195
+ if (!exists) selectedItems.splice(i, 1);
196
+ else selectedItems.splice(i, 1, exists);
197
+ });
198
+ const newSelection = JSON.stringify(selectedItems);
199
+ if (original !== newSelection) emitUpdate();
200
+ }
201
+ );
194
202
  </script>
195
203
 
196
204
  <style scoped>
@@ -218,7 +226,7 @@ watch(() => props.options, () => {
218
226
  .selectinput-option:hover {
219
227
  background: var(--bgl-gray-20);
220
228
  }
221
- .isEmpty p{
229
+ .isEmpty p {
222
230
  opacity: 0.3;
223
231
  }
224
232
  </style>
@@ -1,19 +1,38 @@
1
1
  <template>
2
2
  <TabsNav :tabs="tabs" :group="group" class="mb-05" />
3
3
  <div v-if="currentTab">
4
- <slot :name="currentTab" />
4
+ <template v-if="slots[currentTab]">
5
+ <slot :name="currentTab" />
6
+ </template>
7
+ <template v-else-if="currentTab">
8
+ <component :is="tabComponent" />
9
+ </template>
5
10
  </div>
6
11
  </template>
7
12
 
8
13
  <script setup lang="ts">
9
14
  import { TabsNav, type Tab } from '@bagelink/vue';
15
+ import { defineProps, useSlots, h, defineComponent } from 'vue';
10
16
  import { useTabs } from './tabsManager';
11
17
 
12
- defineProps<{
13
- tabs: Tab[];
14
- modelValue?: string;
18
+ const props = defineProps<{
19
+ tabs: Tab[];
20
+ modelValue?: string;
15
21
  }>();
16
22
 
23
+ const slots = useSlots();
17
24
  const group = Math.random().toString(36).substring(7);
18
25
  const { currentTab } = useTabs(group);
26
+
27
+ const tabValue = (tab: Tab) => (typeof tab === 'string' ? tab : tab.id);
28
+
29
+ const tabComponent = defineComponent({
30
+ render() {
31
+ const currentTabIndex = props.tabs.findIndex(
32
+ (tab) => tabValue(tab) === currentTab.value
33
+ );
34
+ const slotChildren = slots?.default?.()?.[1]?.children;
35
+ return h('div', slotChildren?.[currentTabIndex]);
36
+ },
37
+ });
19
38
  </script>
@@ -3,12 +3,13 @@ import type { Field } from '@bagelink/vue';
3
3
  export type Option = string | number | Record<string, any> | { label: string, value: string | number };
4
4
 
5
5
  type TextInputOptions = {
6
- required?: boolean;
7
- type?: 'text' | 'tel' | 'email';
8
- placeholder?: string;
9
- class?: string
10
- defaultValue?: string;
11
- disabled?: boolean;
6
+ required?: boolean;
7
+ type?: 'text' | 'tel' | 'email';
8
+ placeholder?: string;
9
+ class?: string
10
+ defaultValue?: string;
11
+ disabled?: boolean;
12
+ pattern?: string;
12
13
  }
13
14
 
14
15
  export function txtField(id: string, label?: string, options?: TextInputOptions): Field {
@@ -19,7 +20,7 @@ export function txtField(id: string, label?: string, options?: TextInputOptions)
19
20
  id,
20
21
  label,
21
22
  placeholder: options?.placeholder,
22
- attrs: { type: options?.type },
23
+ attrs: { type: options?.type, pattern: options?.pattern },
23
24
  };
24
25
  }
25
26