@bagelink/vue 0.0.363 → 0.0.378

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 (30) hide show
  1. package/dist/components/Alert.vue.d.ts.map +1 -1
  2. package/dist/components/Card.vue.d.ts +2 -0
  3. package/dist/components/Card.vue.d.ts.map +1 -1
  4. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  5. package/dist/components/form/BglForm.vue.d.ts +3 -0
  6. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/DatePicker.vue.d.ts +4 -2
  8. package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
  9. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/RichText.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  12. package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
  13. package/dist/index.cjs +209 -167
  14. package/dist/index.mjs +209 -167
  15. package/dist/style.css +138 -81
  16. package/dist/utils/BagelFormUtils.d.ts +10 -0
  17. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  18. package/package.json +1 -1
  19. package/src/components/Alert.vue +1 -1
  20. package/src/components/Card.vue +51 -23
  21. package/src/components/form/BglField.vue +65 -36
  22. package/src/components/form/BglForm.vue +64 -60
  23. package/src/components/form/inputs/DatePicker.vue +15 -18
  24. package/src/components/form/inputs/FileUpload.vue +71 -90
  25. package/src/components/form/inputs/RichText.vue +70 -43
  26. package/src/components/form/inputs/SelectInput.vue +1 -1
  27. package/src/components/form/inputs/TextInput.vue +4 -0
  28. package/src/components/layout/SidebarMenu.vue +39 -20
  29. package/src/styles/text.css +1 -1
  30. package/src/utils/BagelFormUtils.ts +14 -0
package/dist/index.cjs CHANGED
@@ -4570,7 +4570,10 @@ var __publicField = (obj, key, value) => {
4570
4570
  };
4571
4571
  const axios = axios$1.create({
4572
4572
  // withCredentials to true to send cookies with requests
4573
- withCredentials: true
4573
+ headers: {
4574
+ "Allow-Control-Allow-Origin": "*",
4575
+ withCredentials: true
4576
+ }
4574
4577
  });
4575
4578
  class DataRequest {
4576
4579
  constructor(table, bagel) {
@@ -4586,7 +4589,7 @@ class DataRequest {
4586
4589
  if (!this.data_table)
4587
4590
  throw new Error("Data table not set");
4588
4591
  const { data: data2 } = await axios.post(
4589
- `${this.bagel.host}/data/${this.data_table}`,
4592
+ `/data/${this.data_table}`,
4590
4593
  item
4591
4594
  );
4592
4595
  return data2;
@@ -4600,7 +4603,7 @@ class DataRequest {
4600
4603
  if (!this.data_table)
4601
4604
  throw new Error("Data table not set");
4602
4605
  const filterStr = Object.keys(this._filter).length ? `?filter={${Object.entries(this._filter).map(([k2, v2]) => `${k2}:${v2}`).join(",")}}` : "";
4603
- const url = `${this.bagel.host}/data/${this.data_table}${this.itemID ? `/${this.itemID}` : ""}${filterStr}`;
4606
+ const url = `/data/${this.data_table}${this.itemID ? `/${this.itemID}` : ""}${filterStr}`;
4604
4607
  try {
4605
4608
  const { data: data2 } = await axios.get(url);
4606
4609
  return data2;
@@ -4618,18 +4621,18 @@ class DataRequest {
4618
4621
  if (!this.data_table)
4619
4622
  throw new Error("Data table not set");
4620
4623
  const { data: data2 } = await axios.delete(
4621
- `${this.bagel.host}/data/${this.data_table}/${this.itemID}`
4624
+ `/data/${this.data_table}/${this.itemID}`
4622
4625
  );
4623
4626
  return data2;
4624
4627
  }
4625
4628
  async put(updatedItem) {
4626
- const { data_table, itemID, bagel } = this;
4629
+ const { data_table, itemID } = this;
4627
4630
  if (!data_table)
4628
4631
  throw new Error("Data table not set");
4629
4632
  if (!itemID)
4630
4633
  throw new Error("Item ID not set");
4631
4634
  const { data: data2 } = await axios.put(
4632
- `${bagel.host}/data/${data_table}/${itemID}`,
4635
+ `/data/${data_table}/${itemID}`,
4633
4636
  updatedItem
4634
4637
  );
4635
4638
  return data2;
@@ -4678,7 +4681,7 @@ class BagelAuth {
4678
4681
  formData.append("username", (user == null ? void 0 : user.email) || "");
4679
4682
  formData.append("password", (user == null ? void 0 : user.password) || "");
4680
4683
  try {
4681
- await axios.post(`${this.bagel.host}/auth/cookie/login`, formData, {
4684
+ await axios.post("/auth/cookie/login", formData, {
4682
4685
  headers: {
4683
4686
  "Content-Type": "multipart/form-data",
4684
4687
  withCredentials: true
@@ -4692,7 +4695,7 @@ class BagelAuth {
4692
4695
  async logout() {
4693
4696
  var _a2, _b;
4694
4697
  try {
4695
- await axios.post(`${this.bagel.host}/auth/cookie/logout`);
4698
+ await axios.post("/auth/cookie/logout");
4696
4699
  } catch (err) {
4697
4700
  (_b = (_a2 = this.bagel).onError) == null ? void 0 : _b.call(_a2, err);
4698
4701
  console.log(err);
@@ -4700,12 +4703,12 @@ class BagelAuth {
4700
4703
  this.user = null;
4701
4704
  }
4702
4705
  async acceptInvite(token, user) {
4703
- await axios.post(`${this.bagel.host}/auth/accept-invite/${token}`, user);
4706
+ await axios.post(`/auth/accept-invite/${token}`, user);
4704
4707
  await this.login(user);
4705
4708
  }
4706
4709
  async register(user, errors) {
4707
4710
  try {
4708
- await axios.post(`${this.bagel.host}/auth/register`, user);
4711
+ await axios.post("/auth/register", user);
4709
4712
  return this.login(user);
4710
4713
  } catch (err) {
4711
4714
  console.error(err);
@@ -4721,7 +4724,8 @@ class Bagel {
4721
4724
  __publicField(this, "onError");
4722
4725
  __publicField(this, "read_table", null);
4723
4726
  __publicField(this, "auth", new BagelAuth(this));
4724
- this.host = host;
4727
+ this.host = host.replace(/\/$/, "");
4728
+ axios.defaults.baseURL = this.host;
4725
4729
  this.onError = onError;
4726
4730
  }
4727
4731
  data(table) {
@@ -4736,7 +4740,7 @@ class Bagel {
4736
4740
  const queryParams = Object.entries(query).map(([key, value]) => `${key}=${value}`).join("&");
4737
4741
  endpoint = `${endpoint}?${queryParams}`;
4738
4742
  }
4739
- return axios.get(`${this.host}/api/${endpoint}`).then(({ data: data2 }) => data2);
4743
+ return axios.get(`/api/${endpoint}`).then(({ data: data2 }) => data2);
4740
4744
  }
4741
4745
  async get(endpoint, query) {
4742
4746
  endpoint = this._endpointCleaner(endpoint);
@@ -4747,7 +4751,7 @@ class Bagel {
4747
4751
  if (queryParams)
4748
4752
  endpoint = `${endpoint}?${queryParams}`;
4749
4753
  }
4750
- const url = `${this.host}/${endpoint}`;
4754
+ const url = `/${endpoint}`;
4751
4755
  return axios.get(url).then(({ data: data2 }) => data2).catch((err) => {
4752
4756
  var _a2;
4753
4757
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
@@ -4756,7 +4760,7 @@ class Bagel {
4756
4760
  }
4757
4761
  async delete(endpoint) {
4758
4762
  endpoint = this._endpointCleaner(endpoint);
4759
- return axios.delete(`${this.host}/${endpoint}`).then(({ data: data2 }) => data2).catch((err) => {
4763
+ return axios.delete(`/${endpoint}`).then(({ data: data2 }) => data2).catch((err) => {
4760
4764
  var _a2;
4761
4765
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4762
4766
  throw err;
@@ -4764,7 +4768,7 @@ class Bagel {
4764
4768
  }
4765
4769
  async put(endpoint, payload) {
4766
4770
  endpoint = this._endpointCleaner(endpoint);
4767
- return axios.put(`${this.host}/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4771
+ return axios.put(`/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4768
4772
  var _a2;
4769
4773
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4770
4774
  throw err;
@@ -4772,7 +4776,7 @@ class Bagel {
4772
4776
  }
4773
4777
  async patch(endpoint, payload = {}) {
4774
4778
  endpoint = this._endpointCleaner(endpoint);
4775
- return axios.patch(`${this.host}/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4779
+ return axios.patch(`/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4776
4780
  var _a2;
4777
4781
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4778
4782
  throw err;
@@ -4780,7 +4784,7 @@ class Bagel {
4780
4784
  }
4781
4785
  async post(endpoint, payload = {}) {
4782
4786
  endpoint = this._endpointCleaner(endpoint);
4783
- return axios.post(`${this.host}/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4787
+ return axios.post(`/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4784
4788
  var _a2;
4785
4789
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4786
4790
  throw err;
@@ -4789,7 +4793,7 @@ class Bagel {
4789
4793
  async uploadFile(file, options) {
4790
4794
  const formData = new FormData();
4791
4795
  formData.append("file", file);
4792
- const { data: data2 } = await axios.post(`${this.host}/files/upload`, formData, {
4796
+ const { data: data2 } = await axios.post("/static_files/upload", formData, {
4793
4797
  headers: {
4794
4798
  "Content-Type": "multipart/form-data"
4795
4799
  },
@@ -4907,6 +4911,17 @@ function formatString(str, format2) {
4907
4911
  }
4908
4912
  return str;
4909
4913
  }
4914
+ function richText(id, label, options) {
4915
+ return {
4916
+ $el: "richtext",
4917
+ class: options == null ? void 0 : options.class,
4918
+ required: options == null ? void 0 : options.required,
4919
+ id,
4920
+ label,
4921
+ placeholder: options == null ? void 0 : options.placeholder,
4922
+ attrs: {}
4923
+ };
4924
+ }
4910
4925
  function txtField(id, label, options) {
4911
4926
  return {
4912
4927
  $el: "text",
@@ -4953,6 +4968,7 @@ const BagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
4953
4968
  __proto__: null,
4954
4969
  frmRow,
4955
4970
  numField,
4971
+ richText,
4956
4972
  slctField,
4957
4973
  txtField
4958
4974
  }, Symbol.toStringTag, { value: "Module" }));
@@ -5024,8 +5040,8 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
5024
5040
  };
5025
5041
  }
5026
5042
  });
5027
- const _hoisted_1$D = { class: "full-nav" };
5028
- const _hoisted_2$v = { class: "nav-scroll" };
5043
+ const _hoisted_1$E = { class: "full-nav" };
5044
+ const _hoisted_2$x = { class: "nav-scroll" };
5029
5045
  const _hoisted_3$m = { class: "nav-links-wrapper" };
5030
5046
  const _hoisted_4$e = { class: "tooltip" };
5031
5047
  const _hoisted_5$b = { class: "bot-buttons-wrapper" };
@@ -5059,8 +5075,8 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
5059
5075
  class: "top-arrow"
5060
5076
  })
5061
5077
  ], 32),
5062
- vue.createElementVNode("div", _hoisted_1$D, [
5063
- vue.createElementVNode("div", _hoisted_2$v, [
5078
+ vue.createElementVNode("div", _hoisted_1$E, [
5079
+ vue.createElementVNode("div", _hoisted_2$x, [
5064
5080
  vue.createElementVNode("div", _hoisted_3$m, [
5065
5081
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.links, (link) => {
5066
5082
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(link.to ? "router-link" : "div"), {
@@ -5118,11 +5134,11 @@ const _export_sfc = (sfc, props2) => {
5118
5134
  return target;
5119
5135
  };
5120
5136
  const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-727b754a"]]);
5121
- const _hoisted_1$C = {
5137
+ const _hoisted_1$D = {
5122
5138
  key: 0,
5123
5139
  class: "loading"
5124
5140
  };
5125
- const _hoisted_2$u = {
5141
+ const _hoisted_2$w = {
5126
5142
  key: 1,
5127
5143
  class: "bgl_btn-flex"
5128
5144
  };
@@ -5213,7 +5229,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5213
5229
  })
5214
5230
  }, {
5215
5231
  default: vue.withCtx(() => [
5216
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$u, [
5232
+ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$w, [
5217
5233
  _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
5218
5234
  key: 0,
5219
5235
  icon: _ctx.icon
@@ -5234,8 +5250,8 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5234
5250
  }
5235
5251
  });
5236
5252
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-d09a83c5"]]);
5237
- const _hoisted_1$B = { class: "tool-bar" };
5238
- const _hoisted_2$t = { class: "modal-footer mt-3" };
5253
+ const _hoisted_1$C = { class: "tool-bar" };
5254
+ const _hoisted_2$v = { class: "modal-footer mt-3" };
5239
5255
  const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5240
5256
  __name: "Modal",
5241
5257
  props: {
@@ -5283,7 +5299,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5283
5299
  }, ["stop"]))
5284
5300
  }, {
5285
5301
  default: vue.withCtx(() => [
5286
- vue.createElementVNode("header", _hoisted_1$B, [
5302
+ vue.createElementVNode("header", _hoisted_1$C, [
5287
5303
  vue.renderSlot(_ctx.$slots, "toolbar"),
5288
5304
  vue.createVNode(vue.unref(Btn), {
5289
5305
  style: vue.normalizeStyle({ float: _ctx.side ? "left" : "right" }),
@@ -5299,7 +5315,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5299
5315
  }, null, 8, ["label"])) : vue.createCommentVNode("", true)
5300
5316
  ]),
5301
5317
  vue.renderSlot(_ctx.$slots, "default"),
5302
- vue.createElementVNode("footer", _hoisted_2$t, [
5318
+ vue.createElementVNode("footer", _hoisted_2$v, [
5303
5319
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (action, i2) => {
5304
5320
  return vue.openBlock(), vue.createBlock(vue.unref(Btn), vue.mergeProps({
5305
5321
  key: i2,
@@ -5425,8 +5441,8 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5425
5441
  }
5426
5442
  });
5427
5443
  const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
5428
- const _hoisted_1$A = { class: "accordion-item" };
5429
- const _hoisted_2$s = ["aria-expanded", "aria-controls"];
5444
+ const _hoisted_1$B = { class: "accordion-item" };
5445
+ const _hoisted_2$u = ["aria-expanded", "aria-controls"];
5430
5446
  const _hoisted_3$l = { class: "accordion-label" };
5431
5447
  const _hoisted_4$d = ["id", "aria-hidden"];
5432
5448
  const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
@@ -5453,7 +5469,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5453
5469
  accordionState.openItem = null;
5454
5470
  }
5455
5471
  return (_ctx, _cache) => {
5456
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
5472
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
5457
5473
  vue.createElementVNode("button", {
5458
5474
  onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
5459
5475
  "aria-expanded": vue.unref(open) ? "true" : "false",
@@ -5466,7 +5482,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5466
5482
  }, [
5467
5483
  vue.createVNode(vue.unref(_sfc_main$H), { icon: "expand_more" })
5468
5484
  ], 2)
5469
- ], 8, _hoisted_2$s),
5485
+ ], 8, _hoisted_2$u),
5470
5486
  vue.createVNode(vue.Transition, { name: "expand" }, {
5471
5487
  default: vue.withCtx(() => [
5472
5488
  vue.unref(open) ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -5485,15 +5501,15 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5485
5501
  }
5486
5502
  });
5487
5503
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
5488
- const _hoisted_1$z = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5489
- const _hoisted_2$r = { class: "p-1" };
5504
+ const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5505
+ const _hoisted_2$t = { class: "p-1" };
5490
5506
  const _hoisted_3$k = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5491
5507
  const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5492
5508
  __name: "ListView",
5493
5509
  setup(__props) {
5494
5510
  return (_ctx, _cache) => {
5495
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$z, [
5496
- vue.createElementVNode("div", _hoisted_2$r, [
5511
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
5512
+ vue.createElementVNode("div", _hoisted_2$t, [
5497
5513
  vue.renderSlot(_ctx.$slots, "header")
5498
5514
  ]),
5499
5515
  vue.createElementVNode("div", _hoisted_3$k, [
@@ -5503,8 +5519,8 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5503
5519
  };
5504
5520
  }
5505
5521
  });
5506
- const _hoisted_1$y = { class: "txt16 no-margin ellipsis" };
5507
- const _hoisted_2$q = { class: "txt14 no-margin txt-gray ellipsis" };
5522
+ const _hoisted_1$z = { class: "txt16 no-margin ellipsis" };
5523
+ const _hoisted_2$s = { class: "txt14 no-margin txt-gray ellipsis" };
5508
5524
  const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5509
5525
  __name: "ListItem",
5510
5526
  props: {
@@ -5529,11 +5545,11 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5529
5545
  size: 40
5530
5546
  }, null, 8, ["name", "src"])) : vue.createCommentVNode("", true),
5531
5547
  vue.createElementVNode("div", null, [
5532
- vue.createElementVNode("p", _hoisted_1$y, [
5548
+ vue.createElementVNode("p", _hoisted_1$z, [
5533
5549
  vue.createTextVNode(vue.toDisplayString(_ctx.title) + " ", 1),
5534
5550
  vue.renderSlot(_ctx.$slots, "default")
5535
5551
  ]),
5536
- vue.createElementVNode("p", _hoisted_2$q, [
5552
+ vue.createElementVNode("p", _hoisted_2$s, [
5537
5553
  vue.createTextVNode(vue.toDisplayString(_ctx.subtitle) + " ", 1),
5538
5554
  vue.renderSlot(_ctx.$slots, "subtitle")
5539
5555
  ])
@@ -5544,8 +5560,8 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5544
5560
  };
5545
5561
  }
5546
5562
  });
5547
- const _hoisted_1$x = { class: "page-top" };
5548
- const _hoisted_2$p = { class: "top-title" };
5563
+ const _hoisted_1$y = { class: "page-top" };
5564
+ const _hoisted_2$r = { class: "top-title" };
5549
5565
  const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5550
5566
  __name: "PageTitle",
5551
5567
  props: {
@@ -5556,8 +5572,8 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5556
5572
  },
5557
5573
  setup(__props) {
5558
5574
  return (_ctx, _cache) => {
5559
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
5560
- vue.createElementVNode("h1", _hoisted_2$p, [
5575
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
5576
+ vue.createElementVNode("h1", _hoisted_2$r, [
5561
5577
  vue.renderSlot(_ctx.$slots, "default"),
5562
5578
  vue.createTextVNode(" " + vue.toDisplayString(__props.value), 1)
5563
5579
  ])
@@ -5565,8 +5581,8 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5565
5581
  };
5566
5582
  }
5567
5583
  });
5568
- const _hoisted_1$w = { class: "table-list-wrap h-100" };
5569
- const _hoisted_2$o = { class: "infinite-wrapper" };
5584
+ const _hoisted_1$x = { class: "table-list-wrap h-100" };
5585
+ const _hoisted_2$q = { class: "infinite-wrapper" };
5570
5586
  const _hoisted_3$j = { class: "row first-row" };
5571
5587
  const _hoisted_4$c = ["onClick"];
5572
5588
  const _hoisted_5$a = { class: "flex" };
@@ -5606,8 +5622,8 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5606
5622
  emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
5607
5623
  };
5608
5624
  return (_ctx, _cache) => {
5609
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
5610
- vue.createElementVNode("table", _hoisted_2$o, [
5625
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
5626
+ vue.createElementVNode("table", _hoisted_2$q, [
5611
5627
  vue.createElementVNode("thead", _hoisted_3$j, [
5612
5628
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (field) => {
5613
5629
  return vue.openBlock(), vue.createElementBlock("th", {
@@ -5666,9 +5682,9 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5666
5682
  });
5667
5683
  const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-f3641508"]]);
5668
5684
  const _sfc_main$x = {};
5669
- const _hoisted_1$v = { class: "flex space-between" };
5685
+ const _hoisted_1$w = { class: "flex space-between" };
5670
5686
  function _sfc_render$1(_ctx, _cache) {
5671
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
5687
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
5672
5688
  vue.renderSlot(_ctx.$slots, "default")
5673
5689
  ]);
5674
5690
  }
@@ -5696,11 +5712,11 @@ function _sfc_render(_ctx, _cache) {
5696
5712
  });
5697
5713
  }
5698
5714
  const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render]]);
5699
- const _hoisted_1$u = {
5715
+ const _hoisted_1$v = {
5700
5716
  key: 0,
5701
5717
  class: "data"
5702
5718
  };
5703
- const _hoisted_2$n = {
5719
+ const _hoisted_2$p = {
5704
5720
  key: 0,
5705
5721
  class: "data-row"
5706
5722
  };
@@ -5722,7 +5738,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5722
5738
  const itemData = vue.useModel(__props, "data");
5723
5739
  return (_ctx, _cache) => {
5724
5740
  var _a2;
5725
- return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
5741
+ return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
5726
5742
  _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$s), {
5727
5743
  key: 0,
5728
5744
  label: _ctx.title
@@ -5731,7 +5747,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5731
5747
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5732
5748
  key: field.id
5733
5749
  }, [
5734
- vue.unref(iffer)(field, itemData.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$n, [
5750
+ vue.unref(iffer)(field, itemData.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$p, [
5735
5751
  vue.createElementVNode("div", _hoisted_3$i, vue.toDisplayString((field == null ? void 0 : field.label) || vue.unref(keyToLabel)(field.id)), 1),
5736
5752
  vue.createVNode(vue.unref(_sfc_main$l), {
5737
5753
  field,
@@ -5758,9 +5774,11 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5758
5774
  }
5759
5775
  });
5760
5776
  const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-bb2526f9"]]);
5777
+ const _hoisted_1$u = { class: "card_label" };
5761
5778
  const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5762
5779
  __name: "Card",
5763
5780
  props: {
5781
+ label: {},
5764
5782
  thin: { type: Boolean },
5765
5783
  outline: { type: Boolean },
5766
5784
  h100: { type: Boolean },
@@ -5773,13 +5791,14 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5773
5791
  return vue.openBlock(), vue.createElementBlock("div", {
5774
5792
  class: vue.normalizeClass(["bgl_card", {
5775
5793
  thin: _ctx.thin,
5776
- border: _ctx.outline,
5794
+ "border": _ctx.outline,
5777
5795
  "h-100": _ctx.h100,
5778
5796
  [_ctx.bg || ""]: _ctx.bg,
5779
5797
  "overflow-x": _ctx.overflowX,
5780
5798
  "overflow-y": _ctx.overflowY
5781
5799
  }])
5782
5800
  }, [
5801
+ vue.createElementVNode("span", _hoisted_1$u, vue.toDisplayString(_ctx.label), 1),
5783
5802
  vue.renderSlot(_ctx.$slots, "default")
5784
5803
  ], 2);
5785
5804
  };
@@ -5856,6 +5875,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5856
5875
  }
5857
5876
  });
5858
5877
  const _hoisted_1$s = ["dismissable"];
5878
+ const _hoisted_2$o = { class: "m-0" };
5859
5879
  const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
5860
5880
  __name: "Alert",
5861
5881
  props: {
@@ -5882,7 +5902,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
5882
5902
  size: 2,
5883
5903
  color: color2[_ctx.type]
5884
5904
  }, null, 8, ["icon", "color"]),
5885
- vue.createElementVNode("p", null, vue.toDisplayString(_ctx.message), 1),
5905
+ vue.createElementVNode("p", _hoisted_2$o, vue.toDisplayString(_ctx.message), 1),
5886
5906
  vue.createVNode(Btn, {
5887
5907
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true),
5888
5908
  flat: "",
@@ -5894,7 +5914,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
5894
5914
  };
5895
5915
  }
5896
5916
  });
5897
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-94bfcb05"]]);
5917
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-4017e821"]]);
5898
5918
  const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
5899
5919
  __name: "Badge",
5900
5920
  props: {
@@ -5927,7 +5947,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
5927
5947
  });
5928
5948
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-10743b06"]]);
5929
5949
  const _hoisted_1$r = { class: "bgl_vid" };
5930
- const _hoisted_2$m = ["src"];
5950
+ const _hoisted_2$n = ["src"];
5931
5951
  const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
5932
5952
  const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
5933
5953
  __name: "BglVideo",
@@ -5976,7 +5996,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
5976
5996
  frameborder: "0",
5977
5997
  allowfullscreen: "",
5978
5998
  title: "Video"
5979
- }, null, 12, _hoisted_2$m)) : (vue.openBlock(), vue.createElementBlock("video", {
5999
+ }, null, 12, _hoisted_2$n)) : (vue.openBlock(), vue.createElementBlock("video", {
5980
6000
  key: 1,
5981
6001
  src: _ctx.src,
5982
6002
  autoplay: _ctx.autoplay,
@@ -5995,7 +6015,7 @@ const _hoisted_1$q = {
5995
6015
  key: 0,
5996
6016
  class: "blocker"
5997
6017
  };
5998
- const _hoisted_2$l = { class: "Handlers" };
6018
+ const _hoisted_2$m = { class: "Handlers" };
5999
6019
  const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
6000
6020
  __name: "Carousel",
6001
6021
  props: {
@@ -6158,7 +6178,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
6158
6178
  vue.unref(isDragging) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q)) : vue.createCommentVNode("", true),
6159
6179
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
6160
6180
  ], 34),
6161
- vue.createElementVNode("div", _hoisted_2$l, [
6181
+ vue.createElementVNode("div", _hoisted_2$m, [
6162
6182
  vue.createElementVNode("span", { onClick: prev }, [
6163
6183
  vue.renderSlot(_ctx.$slots, "prev", {}, void 0, true)
6164
6184
  ]),
@@ -6179,7 +6199,8 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
6179
6199
  schema: {},
6180
6200
  modelValue: { default: () => ({}) },
6181
6201
  onDelete: {},
6182
- onSubmit: {}
6202
+ onSubmit: {},
6203
+ status: {}
6183
6204
  },
6184
6205
  emits: ["update:modelValue", "submit", "dirty"],
6185
6206
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -6208,17 +6229,13 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
6208
6229
  return (_b = (_a2 = form.value) == null ? void 0 : _a2.reportValidity) == null ? void 0 : _b.call(_a2);
6209
6230
  };
6210
6231
  const clearForm = () => Object.assign(data2.value, {});
6211
- let formStatus = vue.ref("idle");
6212
6232
  const runSubmit = () => {
6213
6233
  var _a2;
6214
- try {
6215
- validateForm();
6216
- (_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
6217
- clearForm();
6218
- formStatus.value = "success";
6219
- } catch (e) {
6220
- formStatus.value = "error";
6221
- }
6234
+ const isValid2 = validateForm();
6235
+ if (!isValid2)
6236
+ return;
6237
+ (_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
6238
+ clearForm();
6222
6239
  };
6223
6240
  const i18nT = (val) => val;
6224
6241
  const deleteItem = () => {
@@ -6251,7 +6268,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
6251
6268
  modelValue: data2.value,
6252
6269
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data2.value = $event)
6253
6270
  }, null, 8, ["field", "modelValue"]);
6254
- }), 128)) : !vue.unref(slots).success || vue.unref(formStatus) !== "success" ? (vue.openBlock(), vue.createElementBlock("form", {
6271
+ }), 128)) : !vue.unref(slots).success || _ctx.status !== "success" ? (vue.openBlock(), vue.createElementBlock("form", {
6255
6272
  key: 1,
6256
6273
  ref_key: "form",
6257
6274
  ref: form,
@@ -6272,8 +6289,8 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
6272
6289
  }), 128)),
6273
6290
  vue.renderSlot(_ctx.$slots, "submit")
6274
6291
  ], 544)) : vue.createCommentVNode("", true),
6275
- vue.unref(formStatus) === "success" ? vue.renderSlot(_ctx.$slots, "success", { key: 2 }) : vue.createCommentVNode("", true),
6276
- vue.unref(formStatus) === "error" ? vue.renderSlot(_ctx.$slots, "error", { key: 3 }) : vue.createCommentVNode("", true)
6292
+ _ctx.status === "success" ? vue.renderSlot(_ctx.$slots, "success", { key: 2 }) : vue.createCommentVNode("", true),
6293
+ _ctx.status === "error" ? vue.renderSlot(_ctx.$slots, "error", { key: 3 }) : vue.createCommentVNode("", true)
6277
6294
  ], 64);
6278
6295
  };
6279
6296
  }
@@ -6296,6 +6313,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
6296
6313
  return ToggleInput;
6297
6314
  if (props2.field.$el === "check")
6298
6315
  return CheckInput;
6316
+ if (props2.field.$el === "richtext")
6317
+ return _sfc_main$8;
6299
6318
  return props2.field.$el || "div";
6300
6319
  });
6301
6320
  const emit2 = __emit;
@@ -6311,7 +6330,11 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
6311
6330
  data2[props2.field.id] = val;
6312
6331
  emit2("update:modelValue", data2);
6313
6332
  },
6314
- get: () => props2.field.id ? props2.modelValue[props2.field.id] : props2.field.defaultValue || ""
6333
+ get: () => {
6334
+ if (props2.field.id)
6335
+ return props2.modelValue[props2.field.id];
6336
+ return props2.field.defaultValue || "";
6337
+ }
6315
6338
  });
6316
6339
  const vIf = vue.computed(() => {
6317
6340
  var _a2, _b;
@@ -6370,7 +6393,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
6370
6393
  });
6371
6394
  const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-e8219826"), n2 = n2(), vue.popScopeId(), n2);
6372
6395
  const _hoisted_1$p = ["title"];
6373
- const _hoisted_2$k = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("svg", {
6396
+ const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("svg", {
6374
6397
  xmlns: "http://www.w3.org/2000/svg",
6375
6398
  height: "24",
6376
6399
  viewBox: "0 -960 960 960",
@@ -6379,7 +6402,7 @@ const _hoisted_2$k = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.cr
6379
6402
  /* @__PURE__ */ vue.createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
6380
6403
  ], -1));
6381
6404
  const _hoisted_3$g = [
6382
- _hoisted_2$k
6405
+ _hoisted_2$l
6383
6406
  ];
6384
6407
  const _hoisted_4$a = ["required", "id"];
6385
6408
  const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
@@ -15033,7 +15056,7 @@ Object.entries(Mo).forEach(([e, t]) => {
15033
15056
  e !== "default" && (Va[e] = t);
15034
15057
  });
15035
15058
  const _hoisted_1$o = ["title"];
15036
- const _hoisted_2$j = { key: 0 };
15059
+ const _hoisted_2$k = { key: 0 };
15037
15060
  const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15038
15061
  __name: "DateInput",
15039
15062
  props: {
@@ -15071,7 +15094,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15071
15094
  class: vue.normalizeClass(["bagel-input", { small: _ctx.small }]),
15072
15095
  title: _ctx.label
15073
15096
  }, [
15074
- _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$j, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
15097
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$k, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
15075
15098
  vue.createVNode(vue.unref(Va), vue.mergeProps({
15076
15099
  ref_key: "datePicker",
15077
15100
  ref: datePicker,
@@ -15085,7 +15108,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15085
15108
  }
15086
15109
  });
15087
15110
  const _hoisted_1$n = ["title"];
15088
- const _hoisted_2$i = { key: 0 };
15111
+ const _hoisted_2$j = { key: 0 };
15089
15112
  const _hoisted_3$f = ["value", "placeholder"];
15090
15113
  const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
15091
15114
  __name: "JSONInput",
@@ -15110,7 +15133,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
15110
15133
  class: vue.normalizeClass(["bagel-input", { small: _ctx.small }]),
15111
15134
  title: _ctx.description
15112
15135
  }, [
15113
- _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$i, [
15136
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$j, [
15114
15137
  vue.createVNode(_component_LangText, { input: _ctx.label }, null, 8, ["input"])
15115
15138
  ])) : vue.createCommentVNode("", true),
15116
15139
  vue.createElementVNode("textarea", {
@@ -15125,7 +15148,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
15125
15148
  });
15126
15149
  const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1fc4f739"]]);
15127
15150
  const _hoisted_1$m = ["disabled"];
15128
- const _hoisted_2$h = ["value"];
15151
+ const _hoisted_2$i = ["value"];
15129
15152
  const _hoisted_3$e = ["onClick"];
15130
15153
  const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15131
15154
  __name: "SelectInput",
@@ -15323,7 +15346,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15323
15346
  onInput: _cache[1] || (_cache[1] = ($event) => updateOpen(true)),
15324
15347
  value: selectedItems.value,
15325
15348
  required: ""
15326
- }, null, 40, _hoisted_2$h)) : vue.createCommentVNode("", true)
15349
+ }, null, 40, _hoisted_2$i)) : vue.createCommentVNode("", true)
15327
15350
  ])
15328
15351
  ]),
15329
15352
  _: 3
@@ -15331,7 +15354,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
15331
15354
  };
15332
15355
  }
15333
15356
  });
15334
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70fd5ae7"]]);
15357
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-ab376074"]]);
15335
15358
  /*!
15336
15359
  * vue-draggable-next v2.2.0
15337
15360
  * (c) 2023 Anish George
@@ -17855,7 +17878,7 @@ const VueDraggableNext = vue.defineComponent({
17855
17878
  }
17856
17879
  });
17857
17880
  const _hoisted_1$l = ["title"];
17858
- const _hoisted_2$g = { class: "bagel-input" };
17881
+ const _hoisted_2$h = { class: "bagel-input" };
17859
17882
  const _hoisted_3$d = { class: "table-side-scroll" };
17860
17883
  const _hoisted_4$9 = { class: "table-header" };
17861
17884
  const _hoisted_5$8 = { class: "table-reorder" };
@@ -17925,7 +17948,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
17925
17948
  class: "table-field-wrap",
17926
17949
  title: _ctx.description
17927
17950
  }, [
17928
- vue.createElementVNode("div", _hoisted_2$g, [
17951
+ vue.createElementVNode("div", _hoisted_2$h, [
17929
17952
  vue.createElementVNode("label", null, vue.toDisplayString((_a2 = vue.unref(fieldMeta)) == null ? void 0 : _a2.label), 1)
17930
17953
  ]),
17931
17954
  vue.createElementVNode("div", _hoisted_3$d, [
@@ -18006,7 +18029,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
18006
18029
  });
18007
18030
  const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-cdacf10e"]]);
18008
18031
  const _hoisted_1$k = ["title"];
18009
- const _hoisted_2$f = ["for"];
18032
+ const _hoisted_2$g = ["for"];
18010
18033
  const _hoisted_3$c = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
18011
18034
  const _hoisted_4$8 = ["title", "id", "type", "rows", "placeholder", "disabled", "required", "pattern"];
18012
18035
  const _hoisted_5$7 = { key: 2 };
@@ -18143,7 +18166,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
18143
18166
  [vue.vModelText, vue.unref(inputVal)]
18144
18167
  ]),
18145
18168
  _ctx.helptext ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$7, vue.toDisplayString(_ctx.helptext), 1)) : vue.createCommentVNode("", true)
18146
- ], 8, _hoisted_2$f),
18169
+ ], 8, _hoisted_2$g),
18147
18170
  _ctx.iconStart ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
18148
18171
  key: 0,
18149
18172
  class: "iconStart",
@@ -18165,7 +18188,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
18165
18188
  };
18166
18189
  }
18167
18190
  });
18168
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cd4c27ad"]]);
18191
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-df718b64"]]);
18169
18192
  const _hoisted_1$j = { class: "primary-checkbox" };
18170
18193
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
18171
18194
  __name: "Checkbox",
@@ -18196,7 +18219,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
18196
18219
  });
18197
18220
  const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e4cbb088"]]);
18198
18221
  const _hoisted_1$i = ["title"];
18199
- const _hoisted_2$e = ["id", "placeholder", "required"];
18222
+ const _hoisted_2$f = ["id", "placeholder", "required"];
18200
18223
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
18201
18224
  __name: "ColorPicker",
18202
18225
  props: {
@@ -18233,7 +18256,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
18233
18256
  placeholder: _ctx.placeholder || _ctx.label,
18234
18257
  class: { "no-edit": !_ctx.editMode },
18235
18258
  required: _ctx.required
18236
- }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$e), [
18259
+ }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$f), [
18237
18260
  [vue.vModelText, inputVal.value]
18238
18261
  ])
18239
18262
  ])
@@ -18242,7 +18265,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
18242
18265
  }
18243
18266
  });
18244
18267
  const _hoisted_1$h = { class: "datetime-wrap" };
18245
- const _hoisted_2$d = { class: "date-wrap" };
18268
+ const _hoisted_2$e = { class: "date-wrap" };
18246
18269
  const _hoisted_3$b = {
18247
18270
  key: 0,
18248
18271
  class: "time-wrap"
@@ -18252,7 +18275,8 @@ const _hoisted_5$6 = ["for"];
18252
18275
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18253
18276
  __name: "DatePicker",
18254
18277
  props: {
18255
- name: {},
18278
+ label: {},
18279
+ id: {},
18256
18280
  options: {},
18257
18281
  showTimeWrap: { type: Boolean }
18258
18282
  },
@@ -18266,7 +18290,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18266
18290
  });
18267
18291
  return (_ctx, _cache) => {
18268
18292
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
18269
- vue.createElementVNode("div", _hoisted_2$d, [
18293
+ vue.createElementVNode("div", _hoisted_2$e, [
18270
18294
  vue.createVNode(vue.unref(Va), vue.mergeProps({
18271
18295
  inline: "",
18272
18296
  "week-start": "0",
@@ -18286,15 +18310,15 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18286
18310
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: hr2 }, [
18287
18311
  vue.withDirectives(vue.createElementVNode("input", {
18288
18312
  type: "radio",
18289
- id: `${hr2}_${_ctx.name}`,
18290
- name: _ctx.name,
18313
+ id: `${hr2}_${_ctx.id}`,
18314
+ name: _ctx.label,
18291
18315
  value: hr2,
18292
18316
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedHour.value = $event)
18293
18317
  }, null, 8, _hoisted_4$7), [
18294
18318
  [vue.vModelRadio, selectedHour.value]
18295
18319
  ]),
18296
18320
  vue.createElementVNode("label", {
18297
- for: `${hr2}_${_ctx.name}`
18321
+ for: `${hr2}_${_ctx.id}`
18298
18322
  }, vue.toDisplayString(hr2), 9, _hoisted_5$6)
18299
18323
  ], 64);
18300
18324
  }), 128))
@@ -18304,7 +18328,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
18304
18328
  }
18305
18329
  });
18306
18330
  const _hoisted_1$g = { class: "bagel-input" };
18307
- const _hoisted_2$c = { class: "pb-025" };
18331
+ const _hoisted_2$d = { class: "pb-025" };
18308
18332
  const _hoisted_3$a = { class: "flex gap-05 flex-wrap" };
18309
18333
  const _hoisted_4$6 = ["id", "name", "value", "checked"];
18310
18334
  const _hoisted_5$5 = ["for"];
@@ -18348,7 +18372,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
18348
18372
  });
18349
18373
  return (_ctx, _cache) => {
18350
18374
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
18351
- vue.createElementVNode("label", _hoisted_2$c, vue.toDisplayString(_ctx.label), 1),
18375
+ vue.createElementVNode("label", _hoisted_2$d, vue.toDisplayString(_ctx.label), 1),
18352
18376
  vue.createElementVNode("div", _hoisted_3$a, [
18353
18377
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(cumputedOptions.value, ({ optioId, label, value }, index2) => {
18354
18378
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -18373,7 +18397,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
18373
18397
  });
18374
18398
  const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-e47ae8b5"]]);
18375
18399
  const _hoisted_1$f = { class: "bagel-input" };
18376
- const _hoisted_2$b = {
18400
+ const _hoisted_2$c = {
18377
18401
  key: 0,
18378
18402
  class: "imagePreviewWrap"
18379
18403
  };
@@ -18411,20 +18435,28 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18411
18435
  const file_ids = vue.useModel(__props, "modelValue");
18412
18436
  const storageFiles = vue.ref([]);
18413
18437
  const compareIds = (v1, v2) => [v1].flat().join(",") === [v2].flat().join(",");
18414
- vue.watch(() => props2.files, (newFiles) => {
18415
- if (newFiles)
18416
- storageFiles.value.push(...[newFiles].flat());
18417
- }, { immediate: true });
18418
- vue.watch(() => storageFiles.value, (newFiles) => {
18419
- var _a2;
18420
- let idValue = "";
18421
- if (props2.multiple)
18422
- idValue = newFiles.map((f2) => f2.id || "");
18423
- else
18424
- idValue = ((_a2 = newFiles[0]) == null ? void 0 : _a2.id) || "";
18425
- if (!compareIds(file_ids == null ? void 0 : file_ids.value, idValue))
18426
- file_ids.value = idValue;
18427
- }, { deep: true });
18438
+ vue.watch(
18439
+ () => props2.files,
18440
+ (newFiles) => {
18441
+ if (newFiles)
18442
+ storageFiles.value.push(...[newFiles].flat());
18443
+ },
18444
+ { immediate: true }
18445
+ );
18446
+ vue.watch(
18447
+ () => storageFiles.value,
18448
+ (newFiles) => {
18449
+ var _a2;
18450
+ let idValue = "";
18451
+ if (props2.multiple)
18452
+ idValue = newFiles.map((f2) => f2.id || "");
18453
+ else
18454
+ idValue = ((_a2 = newFiles[0]) == null ? void 0 : _a2.id) || "";
18455
+ if (!compareIds(file_ids == null ? void 0 : file_ids.value, idValue))
18456
+ file_ids.value = idValue;
18457
+ },
18458
+ { deep: true }
18459
+ );
18428
18460
  const fileQueue = vue.ref([]);
18429
18461
  let isDragOver = vue.ref(false);
18430
18462
  const preventDefault = (e) => {
@@ -18435,21 +18467,20 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18435
18467
  const removeFile = (file) => {
18436
18468
  const index2 = storageFiles.value.indexOf(file);
18437
18469
  storageFiles.value.splice(index2, 1);
18438
- if (props2.deleteEndpoint)
18470
+ if (props2.deleteEndpoint) {
18439
18471
  void bagel.delete(`${props2.deleteEndpoint}/${file.id}`);
18472
+ }
18440
18473
  };
18441
18474
  const flushQueue = () => {
18442
- fileQueue.value.forEach(
18443
- async (file, i2) => {
18444
- if (!props2.multiple)
18445
- storageFiles.value.splice(0, 1);
18446
- const serverFile = await bagel.uploadFile(file.file, {
18447
- onUploadProgress: (e) => file.progress = e.progress * 100 - 1
18448
- });
18449
- storageFiles.value.push(serverFile);
18450
- fileQueue.value.splice(i2, 1);
18451
- }
18452
- );
18475
+ fileQueue.value.forEach(async (file, i2) => {
18476
+ if (!props2.multiple)
18477
+ storageFiles.value.splice(0, 1);
18478
+ const serverFile = await bagel.uploadFile(file.file, {
18479
+ onUploadProgress: (e) => file.progress = e.progress * 100 - 1
18480
+ });
18481
+ storageFiles.value.push(serverFile);
18482
+ fileQueue.value.splice(i2, 1);
18483
+ });
18453
18484
  };
18454
18485
  const browse = () => {
18455
18486
  const input = document.createElement("input");
@@ -18458,7 +18489,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18458
18489
  input.onchange = (e) => {
18459
18490
  const target = e == null ? void 0 : e.target;
18460
18491
  if (target == null ? void 0 : target.files) {
18461
- Array.from(target.files).forEach((file) => fileQueue.value.push({ name: file.name, file, progress: 0 }));
18492
+ Array.from(target.files).forEach(
18493
+ (file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
18494
+ );
18462
18495
  }
18463
18496
  flushQueue();
18464
18497
  };
@@ -18496,13 +18529,16 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18496
18529
  onDragover: dragover,
18497
18530
  onDrop: drop3,
18498
18531
  onDragleave: dragleave,
18499
- class: vue.normalizeClass(["fileUploadWrap", { fileDropZone: !storageFiles.value.length && !fileQueue.value.length, dragover: vue.unref(isDragOver) }])
18532
+ class: vue.normalizeClass(["fileUploadWrap", {
18533
+ fileDropZone: !storageFiles.value.length && !fileQueue.value.length,
18534
+ dragover: vue.unref(isDragOver)
18535
+ }])
18500
18536
  }, [
18501
18537
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(storageFiles.value, (file) => {
18502
18538
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
18503
18539
  key: file.id
18504
18540
  }, [
18505
- !_ctx.multiple ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$b, [
18541
+ !_ctx.multiple ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$c, [
18506
18542
  vue.createElementVNode("img", {
18507
18543
  class: "preview",
18508
18544
  src: file.url,
@@ -18566,12 +18602,12 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
18566
18602
  };
18567
18603
  }
18568
18604
  });
18569
- const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-1be8d7b1"]]);
18605
+ const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-3bb24b0c"]]);
18570
18606
  const _withScopeId = (n2) => (vue.pushScopeId("data-v-b87221d6"), n2 = n2(), vue.popScopeId(), n2);
18571
18607
  const _hoisted_1$e = ["title"];
18572
- const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
18608
+ const _hoisted_2$b = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
18573
18609
  const _hoisted_3$8 = [
18574
- _hoisted_2$a
18610
+ _hoisted_2$b
18575
18611
  ];
18576
18612
  const _hoisted_4$4 = ["id"];
18577
18613
  const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
@@ -39061,7 +39097,11 @@ vue.defineComponent({
39061
39097
  }, (_b = (_a2 = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a2));
39062
39098
  }
39063
39099
  });
39064
- const _hoisted_1$d = { key: 0 };
39100
+ const _hoisted_1$d = { class: "RichText" };
39101
+ const _hoisted_2$a = {
39102
+ key: 0,
39103
+ class: "RichText-tools"
39104
+ };
39065
39105
  const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39066
39106
  __name: "RichText",
39067
39107
  props: {
@@ -39078,7 +39118,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39078
39118
  };
39079
39119
  const config = [
39080
39120
  {
39081
- name: "bold",
39121
+ name: "Bold",
39082
39122
  command: () => {
39083
39123
  var _a2;
39084
39124
  return (_a2 = focus2()) == null ? void 0 : _a2.toggleBold().run();
@@ -39090,7 +39130,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39090
39130
  }
39091
39131
  },
39092
39132
  {
39093
- name: "italic",
39133
+ name: "Italic",
39094
39134
  command: () => focus2().toggleItalic().run(),
39095
39135
  icon: "format_italic",
39096
39136
  disabled: () => {
@@ -39099,7 +39139,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39099
39139
  }
39100
39140
  },
39101
39141
  {
39102
- name: "strike",
39142
+ name: "Strike",
39103
39143
  command: () => focus2().toggleStrike().run(),
39104
39144
  icon: "format_strikethrough",
39105
39145
  disabled: () => {
@@ -39108,93 +39148,93 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39108
39148
  }
39109
39149
  },
39110
39150
  {
39111
- name: "code",
39151
+ name: "Code Text",
39112
39152
  command: () => focus2().toggleCode().run(),
39113
39153
  icon: "code"
39114
39154
  },
39155
+ // {
39156
+ // name: 'clearMarks',
39157
+ // command: () => focus().unsetAllMarks(),
39158
+ // icon: 'clear',
39159
+ // },
39115
39160
  {
39116
- name: "clearMarks",
39117
- command: () => focus2().unsetAllMarks(),
39118
- icon: "clear"
39119
- },
39120
- {
39121
- name: "clearNodes",
39161
+ name: "Clear",
39122
39162
  command: () => focus2().clearNodes().run(),
39123
- icon: "clear"
39163
+ icon: "format_clear"
39124
39164
  },
39125
39165
  {
39126
- name: "paragraph",
39166
+ name: "Paragraph",
39127
39167
  command: () => focus2().setParagraph().run(),
39128
39168
  icon: "format_paragraph"
39129
39169
  },
39130
39170
  {
39131
- name: "heading",
39171
+ name: "Heading",
39132
39172
  command: () => focus2().toggleHeading({ level: 1 }).run(),
39133
39173
  icon: "format_h1",
39134
39174
  option: { level: 1 }
39135
39175
  },
39136
39176
  {
39137
- name: "heading",
39177
+ name: "Heading",
39138
39178
  command: () => focus2().toggleHeading({ level: 2 }).run(),
39139
39179
  icon: "format_h2",
39140
39180
  option: { level: 2 }
39141
39181
  },
39142
39182
  {
39143
- name: "heading",
39183
+ name: "Heading",
39144
39184
  command: () => focus2().toggleHeading({ level: 3 }).run(),
39145
39185
  icon: "format_h3",
39146
39186
  option: { level: 3 }
39147
39187
  },
39148
39188
  {
39149
- name: "heading",
39189
+ name: "Heading",
39150
39190
  command: () => focus2().toggleHeading({ level: 4 }).run(),
39151
39191
  icon: "format_h4",
39152
39192
  option: { level: 4 }
39153
39193
  },
39154
39194
  {
39155
- name: "heading",
39195
+ name: "Heading",
39156
39196
  command: () => focus2().toggleHeading({ level: 5 }).run(),
39157
39197
  icon: "format_h5",
39158
39198
  option: { level: 5 }
39159
39199
  },
39160
39200
  {
39161
- name: "heading",
39201
+ name: "Heading",
39162
39202
  command: () => focus2().toggleHeading({ level: 6 }).run(),
39163
39203
  icon: "format_h6",
39164
39204
  option: { level: 6 }
39165
39205
  },
39166
39206
  {
39167
- name: "bulletList",
39207
+ name: "Bullet List",
39168
39208
  command: () => focus2().toggleBulletList().run(),
39169
39209
  icon: "format_list_bulleted"
39170
39210
  },
39171
39211
  {
39172
- name: "orderedList",
39212
+ name: "Ordered List",
39173
39213
  command: () => focus2().toggleOrderedList().run(),
39174
39214
  icon: "format_list_numbered"
39175
39215
  },
39176
39216
  {
39177
- name: "codeBlock",
39217
+ name: "Code Block",
39178
39218
  command: () => focus2().toggleCodeBlock().run(),
39179
- icon: "code"
39219
+ icon: "code_blocks"
39180
39220
  },
39181
39221
  {
39182
- name: "blockquote",
39222
+ name: "Blockquote",
39183
39223
  command: () => focus2().toggleBlockquote().run(),
39184
39224
  icon: "format_quote"
39185
39225
  },
39186
39226
  {
39187
- name: "horizontalRule",
39227
+ name: "Horizontal Rule",
39188
39228
  command: () => focus2().setHorizontalRule().run(),
39189
39229
  icon: "horizontal_rule"
39190
39230
  },
39191
39231
  {
39192
- name: "hardBreak",
39232
+ name: "Hard Break",
39193
39233
  command: () => focus2().setHardBreak().run(),
39194
39234
  icon: "keyboard_return"
39195
39235
  },
39196
39236
  {
39197
- name: "undo",
39237
+ name: "Undo",
39198
39238
  command: () => focus2().undo().run(),
39199
39239
  icon: "undo",
39200
39240
  disabled: () => {
@@ -39203,7 +39243,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39203
39243
  }
39204
39244
  },
39205
39245
  {
39206
- name: "redo",
39246
+ name: "Redo",
39207
39247
  command: () => focus2().redo().run(),
39208
39248
  icon: "redo",
39209
39249
  disabled: () => {
@@ -39223,8 +39263,10 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39223
39263
  vue.watch(
39224
39264
  () => props2.modelValue,
39225
39265
  (value) => {
39226
- var _a2;
39227
- return (_a2 = editor.value) == null ? void 0 : _a2.commands.setContent(value);
39266
+ var _a2, _b;
39267
+ if (((_a2 = editor.value) == null ? void 0 : _a2.getHTML()) === value)
39268
+ return;
39269
+ (_b = editor.value) == null ? void 0 : _b.commands.setContent(value, false);
39228
39270
  },
39229
39271
  { immediate: true }
39230
39272
  );
@@ -39235,8 +39277,8 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39235
39277
  });
39236
39278
  return (_ctx, _cache) => {
39237
39279
  const _directive_tooltip = vue.resolveDirective("tooltip");
39238
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
39239
- vue.unref(editor) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
39280
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
39281
+ vue.unref(editor) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, [
39240
39282
  (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(config, (item) => {
39241
39283
  var _a2;
39242
39284
  return vue.withDirectives(vue.createVNode(vue.unref(Btn), {
@@ -39252,7 +39294,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
39252
39294
  }), 64))
39253
39295
  ])) : vue.createCommentVNode("", true),
39254
39296
  vue.createVNode(vue.unref(EditorContent), { editor: vue.unref(editor) }, null, 8, ["editor"])
39255
- ], 64);
39297
+ ]);
39256
39298
  };
39257
39299
  }
39258
39300
  });
@@ -45717,7 +45759,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
45717
45759
  };
45718
45760
  }
45719
45761
  });
45720
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-24905642"]]);
45762
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-65bec778"]]);
45721
45763
  const _hoisted_1$4 = { class: "m-0 pb-025 txt14 line-height-1" };
45722
45764
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
45723
45765
  __name: "BottomMenu",