@bagelink/vue 0.0.423 → 0.0.431

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.
Files changed (48) hide show
  1. package/dist/components/AccordionItem.vue.d.ts +3 -2
  2. package/dist/components/AccordionItem.vue.d.ts.map +1 -1
  3. package/dist/components/Alert.vue.d.ts +4 -1
  4. package/dist/components/Alert.vue.d.ts.map +1 -1
  5. package/dist/components/Avatar.vue.d.ts.map +1 -1
  6. package/dist/components/Carousel.vue.d.ts +8 -2
  7. package/dist/components/Carousel.vue.d.ts.map +1 -1
  8. package/dist/components/Modal.vue.d.ts.map +1 -1
  9. package/dist/components/TableSchema.vue.d.ts +2 -5
  10. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/DatePicker.vue.d.ts +4 -0
  12. package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/FileUpload.vue.d.ts +6 -2
  14. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  15. package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
  16. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  17. package/dist/components/form/inputs/TextInput.vue.d.ts +0 -3
  18. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  19. package/dist/components/layout/Tabs.vue.d.ts +6 -2
  20. package/dist/components/layout/Tabs.vue.d.ts.map +1 -1
  21. package/dist/components/layout/TabsNav.vue.d.ts +6 -2
  22. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  23. package/dist/index.cjs +256 -155
  24. package/dist/index.mjs +257 -156
  25. package/dist/plugins/bagel.d.ts +3 -0
  26. package/dist/plugins/bagel.d.ts.map +1 -1
  27. package/dist/style.css +194 -172
  28. package/dist/utils/index.d.ts +1 -0
  29. package/dist/utils/index.d.ts.map +1 -1
  30. package/dist/utils/lang.d.ts +7 -0
  31. package/dist/utils/lang.d.ts.map +1 -0
  32. package/package.json +1 -1
  33. package/src/components/AccordionItem.vue +57 -43
  34. package/src/components/Alert.vue +4 -2
  35. package/src/components/Avatar.vue +1 -1
  36. package/src/components/Carousel.vue +2 -2
  37. package/src/components/Modal.vue +4 -2
  38. package/src/components/TableSchema.vue +19 -9
  39. package/src/components/form/inputs/DatePicker.vue +8 -2
  40. package/src/components/form/inputs/FileUpload.vue +54 -23
  41. package/src/components/form/inputs/RadioPillsInput.vue +5 -4
  42. package/src/components/form/inputs/SelectInput.vue +212 -204
  43. package/src/components/form/inputs/TextInput.vue +1 -1
  44. package/src/components/layout/Tabs.vue +14 -5
  45. package/src/components/layout/TabsNav.vue +40 -15
  46. package/src/plugins/bagel.ts +13 -4
  47. package/src/utils/index.ts +2 -0
  48. package/src/utils/lang.ts +39 -0
package/dist/index.cjs CHANGED
@@ -4813,94 +4813,6 @@ const clickOutside = {
4813
4813
  document.removeEventListener("click", el.clickOutsideEvent);
4814
4814
  }
4815
4815
  };
4816
- const bagelInjectionKey = Symbol("bagel");
4817
- const i18nTInjectionKey = Symbol("bagel");
4818
- function useBagel() {
4819
- const bagel = vue.inject(bagelInjectionKey);
4820
- if (!bagel)
4821
- throw new Error("No bagel provided");
4822
- return bagel;
4823
- }
4824
- function useI18nT() {
4825
- const i18nT = vue.inject(i18nTInjectionKey);
4826
- if (!i18nT)
4827
- throw new Error("No i18nT provided");
4828
- return i18nT;
4829
- }
4830
- const BagelVue = {
4831
- install: (app, options) => {
4832
- const bagel = new Bagel({ host: options.host, onError: options.onError });
4833
- app.directive("click-outside", clickOutside);
4834
- app.use(Gt$1, {
4835
- themes: {
4836
- "bgl-theme": {
4837
- triggers: ["click"],
4838
- autoHide: true,
4839
- placement: "bottom"
4840
- }
4841
- }
4842
- });
4843
- app.config.globalProperties.$bagel = bagel;
4844
- app.provide(bagelInjectionKey, bagel);
4845
- app.config.globalProperties.$i18T = (options == null ? void 0 : options.i18nT) || ((key) => key);
4846
- app.provide(i18nTInjectionKey, (options == null ? void 0 : options.i18nT) || ((key) => key));
4847
- }
4848
- };
4849
- const ModalSymbol = Symbol("modal");
4850
- const useModal = () => {
4851
- const modalApi = vue.inject(ModalSymbol);
4852
- if (!modalApi)
4853
- throw new Error("Modal API not provided");
4854
- return modalApi;
4855
- };
4856
- const ModalPlugin = {
4857
- install: (app) => {
4858
- const modalStack = vue.ref([]);
4859
- const hideModal = (index2) => {
4860
- modalStack.value.splice(index2, 1);
4861
- };
4862
- const modalConfirm = (options) => new Promise((resolve) => {
4863
- if (typeof options === "string")
4864
- options = { title: options, message: "" };
4865
- modalStack.value.push({
4866
- modalOptions: { ...options, resolve },
4867
- modalType: "confirm",
4868
- componentSlots: {}
4869
- });
4870
- });
4871
- const showModal = (modalType, options, slots = {}) => {
4872
- modalStack.value.push({
4873
- modalOptions: options,
4874
- modalType,
4875
- componentSlots: slots
4876
- });
4877
- if (modalType === "modalForm")
4878
- return modalStack.value.at(-1);
4879
- return modalStack.value.at(-1);
4880
- };
4881
- app.provide(ModalSymbol, {
4882
- showModal: (options, slots) => showModal("modal", options, slots),
4883
- showModalForm: (options, slots) => showModal("modalForm", options, slots),
4884
- confirm: (userOptions) => modalConfirm(userOptions),
4885
- hideModal: (index2 = modalStack.value.length - 1) => hideModal(index2)
4886
- // modalOptions,
4887
- });
4888
- const ModalComponent = vue.defineComponent({
4889
- data: () => ({ modalStack: modalStack.value }),
4890
- render() {
4891
- return modalStack.value.map((modal, index2) => {
4892
- const props2 = { ...modal.modalOptions, visible: true, "onUpdate:visible": () => hideModal(index2) };
4893
- if (modal.modalType === "modalForm")
4894
- return vue.h(ModalForm, props2, modal.componentSlots);
4895
- if (modal.modalType === "confirm")
4896
- return vue.h(_sfc_main$n, props2, {});
4897
- return vue.h(_sfc_main$F, props2, modal.componentSlots);
4898
- });
4899
- }
4900
- });
4901
- app.component("ModalContainer", ModalComponent);
4902
- }
4903
- };
4904
4816
  function formatString(str, format2) {
4905
4817
  if (format2 === "titleCase") {
4906
4818
  return str.split("_").map((word) => word[0].toUpperCase() + word.slice(1).toLocaleLowerCase()).join(" ");
@@ -4992,6 +4904,32 @@ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
4992
4904
  slctField,
4993
4905
  txtField
4994
4906
  }, Symbol.toStringTag, { value: "Module" }));
4907
+ const state$1 = vue.reactive({
4908
+ defaultLang: "",
4909
+ availableLangs: [],
4910
+ lang: "en"
4911
+ });
4912
+ function useLang() {
4913
+ const lang = vue.computed({
4914
+ get: () => state$1.lang,
4915
+ set: (val) => state$1.lang = val
4916
+ });
4917
+ const $tdb = (langEl) => langEl[state$1.lang] || langEl[state$1.defaultLang] || "";
4918
+ const availableLangs = vue.computed({
4919
+ get: () => state$1.availableLangs,
4920
+ set: (val) => state$1.availableLangs = val
4921
+ });
4922
+ const defaultLang = vue.computed({
4923
+ get: () => state$1.defaultLang,
4924
+ set: (val) => state$1.defaultLang = val
4925
+ });
4926
+ return {
4927
+ lang,
4928
+ $tdb,
4929
+ availableLangs,
4930
+ defaultLang
4931
+ };
4932
+ }
4995
4933
  let timeout;
4996
4934
  const debounce$2 = (fn2, delay = 500) => {
4997
4935
  clearTimeout(timeout);
@@ -5043,6 +4981,101 @@ const iffer = (field, itemData) => {
5043
4981
  return true;
5044
4982
  };
5045
4983
  const denullify = (itemData, fieldID) => fieldID && itemData ? itemData[fieldID] : null;
4984
+ const bagelInjectionKey = Symbol("bagel");
4985
+ const i18nTInjectionKey = Symbol("bagel");
4986
+ function useBagel() {
4987
+ const bagel = vue.inject(bagelInjectionKey);
4988
+ if (!bagel)
4989
+ throw new Error("No bagel provided");
4990
+ return bagel;
4991
+ }
4992
+ function useI18nT() {
4993
+ const i18nT = vue.inject(i18nTInjectionKey);
4994
+ if (!i18nT)
4995
+ throw new Error("No i18nT provided");
4996
+ return i18nT;
4997
+ }
4998
+ const BagelVue = {
4999
+ install: (app, options) => {
5000
+ const bagel = new Bagel({ host: options.host, onError: options.onError });
5001
+ app.directive("click-outside", clickOutside);
5002
+ app.use(Gt$1, {
5003
+ themes: {
5004
+ "bgl-theme": {
5005
+ triggers: ["click"],
5006
+ autoHide: true,
5007
+ placement: "bottom"
5008
+ }
5009
+ }
5010
+ });
5011
+ const { availableLangs, defaultLang, lang } = useLang();
5012
+ if (options.availableLangs)
5013
+ availableLangs.value = options.availableLangs;
5014
+ if (options.defaultLang)
5015
+ defaultLang.value = options.defaultLang;
5016
+ if (options.language)
5017
+ lang.value = options.language;
5018
+ app.config.globalProperties.$bagel = bagel;
5019
+ app.provide(bagelInjectionKey, bagel);
5020
+ app.config.globalProperties.$i18T = (options == null ? void 0 : options.i18nT) || ((key) => key);
5021
+ app.provide(i18nTInjectionKey, (options == null ? void 0 : options.i18nT) || ((key) => key));
5022
+ }
5023
+ };
5024
+ const ModalSymbol = Symbol("modal");
5025
+ const useModal = () => {
5026
+ const modalApi = vue.inject(ModalSymbol);
5027
+ if (!modalApi)
5028
+ throw new Error("Modal API not provided");
5029
+ return modalApi;
5030
+ };
5031
+ const ModalPlugin = {
5032
+ install: (app) => {
5033
+ const modalStack = vue.ref([]);
5034
+ const hideModal = (index2) => {
5035
+ modalStack.value.splice(index2, 1);
5036
+ };
5037
+ const modalConfirm = (options) => new Promise((resolve) => {
5038
+ if (typeof options === "string")
5039
+ options = { title: options, message: "" };
5040
+ modalStack.value.push({
5041
+ modalOptions: { ...options, resolve },
5042
+ modalType: "confirm",
5043
+ componentSlots: {}
5044
+ });
5045
+ });
5046
+ const showModal = (modalType, options, slots = {}) => {
5047
+ modalStack.value.push({
5048
+ modalOptions: options,
5049
+ modalType,
5050
+ componentSlots: slots
5051
+ });
5052
+ if (modalType === "modalForm")
5053
+ return modalStack.value.at(-1);
5054
+ return modalStack.value.at(-1);
5055
+ };
5056
+ app.provide(ModalSymbol, {
5057
+ showModal: (options, slots) => showModal("modal", options, slots),
5058
+ showModalForm: (options, slots) => showModal("modalForm", options, slots),
5059
+ confirm: (userOptions) => modalConfirm(userOptions),
5060
+ hideModal: (index2 = modalStack.value.length - 1) => hideModal(index2)
5061
+ // modalOptions,
5062
+ });
5063
+ const ModalComponent = vue.defineComponent({
5064
+ data: () => ({ modalStack: modalStack.value }),
5065
+ render() {
5066
+ return modalStack.value.map((modal, index2) => {
5067
+ const props2 = { ...modal.modalOptions, visible: true, "onUpdate:visible": () => hideModal(index2) };
5068
+ if (modal.modalType === "modalForm")
5069
+ return vue.h(ModalForm, props2, modal.componentSlots);
5070
+ if (modal.modalType === "confirm")
5071
+ return vue.h(_sfc_main$n, props2, {});
5072
+ return vue.h(_sfc_main$F, props2, modal.componentSlots);
5073
+ });
5074
+ }
5075
+ });
5076
+ app.component("ModalContainer", ModalComponent);
5077
+ }
5078
+ };
5046
5079
  const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
5047
5080
  __name: "MaterialIcon",
5048
5081
  props: {
@@ -5271,7 +5304,10 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
5271
5304
  });
5272
5305
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-d09a83c5"]]);
5273
5306
  const _hoisted_1$C = { class: "tool-bar" };
5274
- const _hoisted_2$v = { class: "modal-footer mt-3" };
5307
+ const _hoisted_2$v = {
5308
+ key: 0,
5309
+ class: "modal-footer mt-3"
5310
+ };
5275
5311
  const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5276
5312
  __name: "Modal",
5277
5313
  props: {
@@ -5285,6 +5321,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5285
5321
  emits: ["update:visible"],
5286
5322
  setup(__props, { expose: __expose, emit: __emit }) {
5287
5323
  const props2 = __props;
5324
+ const slots = vue.useSlots();
5288
5325
  let isVisible = vue.ref(false);
5289
5326
  vue.watch(
5290
5327
  () => props2.visible,
@@ -5332,34 +5369,37 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5332
5369
  }, ["stop"])),
5333
5370
  style: vue.normalizeStyle({ ...maxWidth.value })
5334
5371
  }, {
5335
- default: vue.withCtx(() => [
5336
- vue.createElementVNode("header", _hoisted_1$C, [
5337
- vue.renderSlot(_ctx.$slots, "toolbar"),
5338
- vue.createVNode(vue.unref(Btn), {
5339
- style: vue.normalizeStyle({ float: _ctx.side ? "left" : "right" }),
5340
- flat: "",
5341
- icon: "close",
5342
- onClick: closeModal
5343
- }, null, 8, ["style"]),
5344
- _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$t), {
5345
- key: 0,
5346
- class: "modal-title",
5347
- tag: "h3",
5348
- label: _ctx.title
5349
- }, null, 8, ["label"])) : vue.createCommentVNode("", true)
5350
- ]),
5351
- vue.renderSlot(_ctx.$slots, "default"),
5352
- vue.createElementVNode("footer", _hoisted_2$v, [
5353
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (action, i2) => {
5354
- return vue.openBlock(), vue.createBlock(vue.unref(Btn), vue.mergeProps({
5355
- key: i2,
5356
- onClick: closeModal,
5357
- color: "gray"
5358
- }, action), null, 16);
5359
- }), 128)),
5360
- vue.renderSlot(_ctx.$slots, "footer")
5361
- ])
5362
- ]),
5372
+ default: vue.withCtx(() => {
5373
+ var _a2;
5374
+ return [
5375
+ vue.createElementVNode("header", _hoisted_1$C, [
5376
+ vue.renderSlot(_ctx.$slots, "toolbar"),
5377
+ vue.createVNode(vue.unref(Btn), {
5378
+ style: vue.normalizeStyle({ float: _ctx.side ? "left" : "right" }),
5379
+ flat: "",
5380
+ icon: "close",
5381
+ onClick: closeModal
5382
+ }, null, 8, ["style"]),
5383
+ _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$t), {
5384
+ key: 0,
5385
+ class: "modal-title",
5386
+ tag: "h3",
5387
+ label: _ctx.title
5388
+ }, null, 8, ["label"])) : vue.createCommentVNode("", true)
5389
+ ]),
5390
+ vue.renderSlot(_ctx.$slots, "default"),
5391
+ vue.unref(slots)["footer"] || ((_a2 = _ctx.actions) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_2$v, [
5392
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (action, i2) => {
5393
+ return vue.openBlock(), vue.createBlock(vue.unref(Btn), vue.mergeProps({
5394
+ key: i2,
5395
+ onClick: closeModal,
5396
+ color: "gray"
5397
+ }, action), null, 16);
5398
+ }), 128)),
5399
+ vue.renderSlot(_ctx.$slots, "footer")
5400
+ ])) : vue.createCommentVNode("", true)
5401
+ ];
5402
+ }),
5363
5403
  _: 3
5364
5404
  }, 8, ["style"])
5365
5405
  ], 34);
@@ -5496,11 +5536,15 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5496
5536
  let open = vue.ref(false);
5497
5537
  const accordionState = vue.inject("accordionState");
5498
5538
  const id = props2.id || Math.random().toString(36).substring(7);
5499
- vue.watch(() => accordionState == null ? void 0 : accordionState.openItem, (currentOpenId) => {
5500
- if (currentOpenId !== id) {
5501
- open.value = false;
5502
- }
5503
- }, { immediate: true });
5539
+ vue.watch(
5540
+ () => accordionState == null ? void 0 : accordionState.openItem,
5541
+ (currentOpenId) => {
5542
+ if (currentOpenId !== id) {
5543
+ open.value = false;
5544
+ }
5545
+ },
5546
+ { immediate: true }
5547
+ );
5504
5548
  function toggle() {
5505
5549
  open.value = !open.value;
5506
5550
  if (open.value && (accordionState == null ? void 0 : accordionState.openItem))
@@ -5517,6 +5561,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5517
5561
  "aria-controls": `accordion-body-${vue.unref(id)}`
5518
5562
  }, [
5519
5563
  vue.createElementVNode("span", _hoisted_3$k, vue.toDisplayString(_ctx.label), 1),
5564
+ vue.renderSlot(_ctx.$slots, "head", {}, void 0, true),
5520
5565
  vue.createElementVNode("div", {
5521
5566
  class: vue.normalizeClass(["accordion-icon", { open: vue.unref(open) }])
5522
5567
  }, [
@@ -5540,7 +5585,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5540
5585
  };
5541
5586
  }
5542
5587
  });
5543
- const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-bf74738b"]]);
5588
+ const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-0fb593ee"]]);
5544
5589
  const _sfc_main$C = {};
5545
5590
  const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5546
5591
  const _hoisted_2$t = { class: "p-1" };
@@ -5640,7 +5685,11 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5640
5685
  if (typeof props2.schema === "function") {
5641
5686
  return props2.schema();
5642
5687
  }
5643
- return props2.schema;
5688
+ if (props2.schema)
5689
+ return props2.schema;
5690
+ const keys4 = [...new Set((props2.data || []).map(Object.keys).flat())];
5691
+ const schema = keys4.map((id) => ({ id, label: keyToLabel(id) }));
5692
+ return schema;
5644
5693
  });
5645
5694
  const emit2 = __emit;
5646
5695
  const selectElement = (item) => emit2("select", item);
@@ -5749,7 +5798,7 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5749
5798
  };
5750
5799
  }
5751
5800
  });
5752
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-54d69b8f"]]);
5801
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-1d169811"]]);
5753
5802
  const _sfc_main$y = {};
5754
5803
  const _hoisted_1$w = { class: "flex space-between" };
5755
5804
  function _sfc_render$1(_ctx, _cache) {
@@ -5888,7 +5937,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5888
5937
  setup(__props) {
5889
5938
  return (_ctx, _cache) => {
5890
5939
  return vue.openBlock(), vue.createElementBlock("div", {
5891
- class: "avatar flex",
5940
+ class: "avatar flex justify-content-center",
5892
5941
  style: vue.normalizeStyle({ width: `${_ctx.size}px`, height: `${_ctx.size}px` })
5893
5942
  }, [
5894
5943
  _ctx.src ? (vue.openBlock(), vue.createElementBlock("img", {
@@ -5903,7 +5952,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5903
5952
  };
5904
5953
  }
5905
5954
  });
5906
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-21ffa9bb"]]);
5955
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-371a733d"]]);
5907
5956
  const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
5908
5957
  __name: "Title",
5909
5958
  props: {
@@ -5953,7 +6002,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5953
6002
  props: {
5954
6003
  message: {},
5955
6004
  dismissable: { type: Boolean },
5956
- type: { default: "info" }
6005
+ type: { default: "info" },
6006
+ icon: {}
5957
6007
  },
5958
6008
  setup(__props) {
5959
6009
  const isDismissed = vue.ref(false);
@@ -5968,12 +6018,13 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5968
6018
  class: vue.normalizeClass(["alert", [_ctx.type]]),
5969
6019
  dismissable: _ctx.dismissable
5970
6020
  }, [
5971
- vue.createVNode(vue.unref(_sfc_main$I), {
6021
+ _ctx.icon !== "none" ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$I), {
6022
+ key: 0,
5972
6023
  class: "alert_icon",
5973
- icon: _ctx.type,
6024
+ icon: _ctx.icon || _ctx.type,
5974
6025
  size: 2,
5975
6026
  color: color2[_ctx.type]
5976
- }, null, 8, ["icon", "color"]),
6027
+ }, null, 8, ["icon", "color"])) : vue.createCommentVNode("", true),
5977
6028
  vue.createElementVNode("p", _hoisted_2$o, vue.toDisplayString(_ctx.message), 1),
5978
6029
  vue.createVNode(Btn, {
5979
6030
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true),
@@ -5986,7 +6037,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5986
6037
  };
5987
6038
  }
5988
6039
  });
5989
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-4017e821"]]);
6040
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-0ec1391d"]]);
5990
6041
  const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
5991
6042
  __name: "Badge",
5992
6043
  props: {
@@ -6258,17 +6309,23 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
6258
6309
  ], 34),
6259
6310
  vue.createElementVNode("div", _hoisted_2$m, [
6260
6311
  vue.createElementVNode("span", { onClick: prev }, [
6261
- vue.renderSlot(_ctx.$slots, "prev", {}, void 0, true)
6312
+ vue.renderSlot(_ctx.$slots, "prev", {
6313
+ prev,
6314
+ index: vue.unref(activeSlideIndex)
6315
+ }, void 0, true)
6262
6316
  ]),
6263
6317
  vue.createElementVNode("span", { onClick: next }, [
6264
- vue.renderSlot(_ctx.$slots, "next", {}, void 0, true)
6318
+ vue.renderSlot(_ctx.$slots, "next", {
6319
+ next,
6320
+ index: vue.unref(activeSlideIndex)
6321
+ }, void 0, true)
6265
6322
  ])
6266
6323
  ])
6267
6324
  ], 6);
6268
6325
  };
6269
6326
  }
6270
6327
  });
6271
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-068aa914"]]);
6328
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e1cc4e21"]]);
6272
6329
  const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
6273
6330
  __name: "ModalConfirm",
6274
6331
  props: {
@@ -15496,7 +15553,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15496
15553
  };
15497
15554
  }
15498
15555
  });
15499
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-6b40f812"]]);
15556
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-9b751fe0"]]);
15500
15557
  /*!
15501
15558
  * vue-draggable-next v2.2.0
15502
15559
  * (c) 2023 Anish George
@@ -18198,7 +18255,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
18198
18255
  autoheight: { type: Boolean },
18199
18256
  code: { type: Boolean },
18200
18257
  lines: {},
18201
- autocomplete: { default: "off" },
18258
+ autocomplete: {},
18202
18259
  autofocus: { type: Boolean }
18203
18260
  },
18204
18261
  emits: ["update:modelValue", "debounce"],
@@ -18330,7 +18387,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
18330
18387
  };
18331
18388
  }
18332
18389
  });
18333
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-df718b64"]]);
18390
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-534ec341"]]);
18334
18391
  const _hoisted_1$j = { class: "primary-checkbox" };
18335
18392
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
18336
18393
  __name: "Checkbox",
@@ -18421,7 +18478,9 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18421
18478
  id: {},
18422
18479
  options: {},
18423
18480
  showTimeWrap: { type: Boolean },
18424
- modelValue: {}
18481
+ modelValue: {},
18482
+ allowedDates: {},
18483
+ disabledDates: {}
18425
18484
  },
18426
18485
  emits: ["update:modelValue"],
18427
18486
  setup(__props, { emit: __emit }) {
@@ -18448,6 +18507,8 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18448
18507
  "week-start": "0",
18449
18508
  modelValue: selectedDate.value,
18450
18509
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedDate.value = $event),
18510
+ "allowed-dates": _ctx.allowedDates,
18511
+ "disabled-dates": _ctx.disabledDates,
18451
18512
  "auto-apply": true,
18452
18513
  "highlight-week-days": [6],
18453
18514
  "enable-time-picker": false,
@@ -18456,7 +18517,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18456
18517
  "action-buttons": vue.withCtx(() => []),
18457
18518
  "action-preview": vue.withCtx(() => []),
18458
18519
  _: 1
18459
- }, 16, ["modelValue"])
18520
+ }, 16, ["modelValue", "allowed-dates", "disabled-dates"])
18460
18521
  ]),
18461
18522
  _ctx.showTimeWrap ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$b, [
18462
18523
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(hours), (hr2) => {
@@ -18490,7 +18551,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
18490
18551
  props: {
18491
18552
  options: {},
18492
18553
  modelValue: { default: "" },
18493
- id: { default: () => `radio-pill-${Math.random().toString(36).substr(2, 9)}` },
18554
+ id: { default: () => `radio-pill-${Math.random().toString(36).substring(2, 9)}` },
18494
18555
  label: { default: "" }
18495
18556
  },
18496
18557
  emits: ["update:modelValue"],
@@ -18558,7 +18619,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
18558
18619
  };
18559
18620
  }
18560
18621
  });
18561
- const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-41859ed6"]]);
18622
+ const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-ad2e40f3"]]);
18562
18623
  const _hoisted_1$f = { class: "bagel-input" };
18563
18624
  const _hoisted_2$c = {
18564
18625
  key: 0,
@@ -18574,7 +18635,7 @@ const _hoisted_7$1 = {
18574
18635
  };
18575
18636
  const _hoisted_8 = ["src"];
18576
18637
  const _hoisted_9 = { class: "previewName" };
18577
- const _hoisted_10 = ["src"];
18638
+ const _hoisted_10 = ["width", "src"];
18578
18639
  const _hoisted_11 = { class: "no-margin" };
18579
18640
  const _hoisted_12 = {
18580
18641
  key: 0,
@@ -18587,7 +18648,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18587
18648
  multiple: { type: Boolean },
18588
18649
  files: {},
18589
18650
  deleteEndpoint: {},
18590
- bindkey: {}
18651
+ bindkey: {},
18652
+ width: {}
18591
18653
  }, {
18592
18654
  "modelValue": {},
18593
18655
  "modelModifiers": {}
@@ -18600,11 +18662,31 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18600
18662
  const file_bindkeys = vue.useModel(__props, "modelValue");
18601
18663
  const storageFiles = vue.ref([]);
18602
18664
  const compareIds = (v1, v2) => [v1].flat().join(",") === [v2].flat().join(",");
18665
+ vue.onMounted(() => {
18666
+ if (!props2.files && [file_bindkeys.value].flat().length) {
18667
+ const ids = [file_bindkeys.value].flat();
18668
+ if (props2.multiple) {
18669
+ ids.forEach((id) => {
18670
+ void bagel.get(`/files/${id}`).then((file) => {
18671
+ storageFiles.value.push(file);
18672
+ });
18673
+ });
18674
+ } else {
18675
+ void bagel.get(`/files/${ids[0]}`).then((file) => {
18676
+ storageFiles.value.push(file);
18677
+ });
18678
+ }
18679
+ }
18680
+ });
18603
18681
  vue.watch(
18604
18682
  () => props2.files,
18605
18683
  (newFiles) => {
18606
- if (newFiles)
18607
- storageFiles.value.push(...[newFiles].flat());
18684
+ if (newFiles) {
18685
+ const filesToAdd = [newFiles].flat().filter((f2) => !storageFiles.value.find((sf) => sf[bindKey2] === f2[bindKey2]));
18686
+ for (const file of filesToAdd) {
18687
+ storageFiles.value.push(file);
18688
+ }
18689
+ }
18608
18690
  },
18609
18691
  { immediate: true }
18610
18692
  );
@@ -18715,7 +18797,6 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18715
18797
  vue.createElementVNode("div", _hoisted_4$5, [
18716
18798
  _ctx.multiple ? (vue.openBlock(), vue.createElementBlock("img", {
18717
18799
  key: 0,
18718
- height: "60",
18719
18800
  class: "preview",
18720
18801
  src: file.url,
18721
18802
  alt: ""
@@ -18745,7 +18826,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18745
18826
  vue.createElementVNode("div", _hoisted_9, [
18746
18827
  _ctx.multiple ? (vue.openBlock(), vue.createElementBlock("img", {
18747
18828
  key: 0,
18748
- height: "60",
18829
+ width: _ctx.width || "220",
18749
18830
  class: "preview",
18750
18831
  src: fileToUrl(fileQ.file),
18751
18832
  alt: ""
@@ -18769,7 +18850,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18769
18850
  };
18770
18851
  }
18771
18852
  });
18772
- const $el = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0dbacaa0"]]);
18853
+ const $el = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-4f0a6b20"]]);
18773
18854
  const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-b87221d6"), n2 = n2(), vue.popScopeId(), n2);
18774
18855
  const _hoisted_1$e = ["title"];
18775
18856
  const _hoisted_2$b = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
@@ -51001,12 +51082,18 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
51001
51082
  tabs: {},
51002
51083
  modelValue: {}
51003
51084
  },
51004
- setup(__props) {
51085
+ emits: ["update:modelValue"],
51086
+ setup(__props, { emit: __emit }) {
51005
51087
  const props2 = __props;
51006
51088
  const slots = vue.useSlots();
51007
51089
  const group = Math.random().toString(36).substring(7);
51008
51090
  const { currentTab } = useTabs(group);
51009
51091
  const tabValue = (tab) => typeof tab === "string" ? tab : tab.id;
51092
+ const emit2 = __emit;
51093
+ const slctTab = vue.computed({
51094
+ get: () => props2.modelValue || tabValue(props2.tabs[0]),
51095
+ set: (value) => emit2("update:modelValue", value)
51096
+ });
51010
51097
  const tabComponent = vue.defineComponent({
51011
51098
  render() {
51012
51099
  var _a2, _b, _c;
@@ -51014,16 +51101,18 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
51014
51101
  (tab) => tabValue(tab) === currentTab.value
51015
51102
  );
51016
51103
  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;
51017
- return vue.h("div", slotChildren == null ? void 0 : slotChildren[currentTabIndex]);
51104
+ return vue.h("div", slotChildren[currentTabIndex]);
51018
51105
  }
51019
51106
  });
51020
51107
  return (_ctx, _cache) => {
51021
51108
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
51022
51109
  vue.createVNode(vue.unref(TabsNav), {
51110
+ modelValue: slctTab.value,
51111
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => slctTab.value = $event),
51023
51112
  tabs: _ctx.tabs,
51024
51113
  group: vue.unref(group),
51025
51114
  class: "mb-05"
51026
- }, null, 8, ["tabs", "group"]),
51115
+ }, null, 8, ["modelValue", "tabs", "group"]),
51027
51116
  vue.unref(currentTab) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
51028
51117
  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)
51029
51118
  ])) : vue.createCommentVNode("", true)
@@ -51031,7 +51120,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
51031
51120
  };
51032
51121
  }
51033
51122
  });
51034
- const _hoisted_1$2 = { class: "grid auto-flow-columns fit-content" };
51123
+ const _hoisted_1$2 = { class: "grid auto-flow-columns fit-content bgl_tabs_wrap" };
51035
51124
  const _hoisted_2$1 = ["onClick"];
51036
51125
  const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
51037
51126
  __name: "TabsNav",
@@ -51042,12 +51131,15 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
51042
51131
  sideTabs: { type: Boolean },
51043
51132
  group: {}
51044
51133
  },
51045
- setup(__props) {
51134
+ emits: ["update:modelValue"],
51135
+ setup(__props, { emit: __emit }) {
51046
51136
  const props2 = __props;
51047
51137
  const { currentTab } = useTabs(props2.group);
51048
51138
  currentTab.value = props2.modelValue || typeof props2.tabs[0] === "string" ? props2.tabs[0] : props2.tabs[0].id;
51139
+ const emit2 = __emit;
51049
51140
  const selectTab = (tab) => {
51050
51141
  currentTab.value = typeof tab === "string" ? tab : tab.id;
51142
+ emit2("update:modelValue", currentTab.value);
51051
51143
  };
51052
51144
  const isActive2 = (tab) => {
51053
51145
  if (typeof tab === "string")
@@ -51059,6 +51151,14 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
51059
51151
  return tab;
51060
51152
  return tab.label;
51061
51153
  };
51154
+ vue.watch(
51155
+ () => props2.modelValue,
51156
+ (value) => {
51157
+ if (value && !isActive2(value))
51158
+ currentTab.value = value;
51159
+ },
51160
+ { immediate: true }
51161
+ );
51062
51162
  return (_ctx, _cache) => {
51063
51163
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
51064
51164
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs, (tab, i2) => {
@@ -51079,7 +51179,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
51079
51179
  };
51080
51180
  }
51081
51181
  });
51082
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-0774360e"]]);
51182
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-05be4d6e"]]);
51083
51183
  const _hoisted_1$1 = { key: 0 };
51084
51184
  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
51085
51185
  __name: "TabsBody",
@@ -51227,4 +51327,5 @@ exports.keyToLabel = keyToLabel;
51227
51327
  exports.useBagel = useBagel;
51228
51328
  exports.useEscape = useEscape;
51229
51329
  exports.useI18nT = useI18nT;
51330
+ exports.useLang = useLang;
51230
51331
  exports.useModal = useModal;