@bagelink/vue 0.0.363 → 0.0.374

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.
package/dist/index.mjs CHANGED
@@ -4568,7 +4568,10 @@ var __publicField = (obj, key, value) => {
4568
4568
  };
4569
4569
  const axios = axios$1.create({
4570
4570
  // withCredentials to true to send cookies with requests
4571
- withCredentials: true
4571
+ headers: {
4572
+ "Allow-Control-Allow-Origin": "*",
4573
+ withCredentials: true
4574
+ }
4572
4575
  });
4573
4576
  class DataRequest {
4574
4577
  constructor(table, bagel) {
@@ -4584,7 +4587,7 @@ class DataRequest {
4584
4587
  if (!this.data_table)
4585
4588
  throw new Error("Data table not set");
4586
4589
  const { data: data2 } = await axios.post(
4587
- `${this.bagel.host}/data/${this.data_table}`,
4590
+ `/data/${this.data_table}`,
4588
4591
  item
4589
4592
  );
4590
4593
  return data2;
@@ -4598,7 +4601,7 @@ class DataRequest {
4598
4601
  if (!this.data_table)
4599
4602
  throw new Error("Data table not set");
4600
4603
  const filterStr = Object.keys(this._filter).length ? `?filter={${Object.entries(this._filter).map(([k2, v2]) => `${k2}:${v2}`).join(",")}}` : "";
4601
- const url = `${this.bagel.host}/data/${this.data_table}${this.itemID ? `/${this.itemID}` : ""}${filterStr}`;
4604
+ const url = `/data/${this.data_table}${this.itemID ? `/${this.itemID}` : ""}${filterStr}`;
4602
4605
  try {
4603
4606
  const { data: data2 } = await axios.get(url);
4604
4607
  return data2;
@@ -4616,18 +4619,18 @@ class DataRequest {
4616
4619
  if (!this.data_table)
4617
4620
  throw new Error("Data table not set");
4618
4621
  const { data: data2 } = await axios.delete(
4619
- `${this.bagel.host}/data/${this.data_table}/${this.itemID}`
4622
+ `/data/${this.data_table}/${this.itemID}`
4620
4623
  );
4621
4624
  return data2;
4622
4625
  }
4623
4626
  async put(updatedItem) {
4624
- const { data_table, itemID, bagel } = this;
4627
+ const { data_table, itemID } = this;
4625
4628
  if (!data_table)
4626
4629
  throw new Error("Data table not set");
4627
4630
  if (!itemID)
4628
4631
  throw new Error("Item ID not set");
4629
4632
  const { data: data2 } = await axios.put(
4630
- `${bagel.host}/data/${data_table}/${itemID}`,
4633
+ `/data/${data_table}/${itemID}`,
4631
4634
  updatedItem
4632
4635
  );
4633
4636
  return data2;
@@ -4676,7 +4679,7 @@ class BagelAuth {
4676
4679
  formData.append("username", (user == null ? void 0 : user.email) || "");
4677
4680
  formData.append("password", (user == null ? void 0 : user.password) || "");
4678
4681
  try {
4679
- await axios.post(`${this.bagel.host}/auth/cookie/login`, formData, {
4682
+ await axios.post("/auth/cookie/login", formData, {
4680
4683
  headers: {
4681
4684
  "Content-Type": "multipart/form-data",
4682
4685
  withCredentials: true
@@ -4690,7 +4693,7 @@ class BagelAuth {
4690
4693
  async logout() {
4691
4694
  var _a2, _b;
4692
4695
  try {
4693
- await axios.post(`${this.bagel.host}/auth/cookie/logout`);
4696
+ await axios.post("/auth/cookie/logout");
4694
4697
  } catch (err) {
4695
4698
  (_b = (_a2 = this.bagel).onError) == null ? void 0 : _b.call(_a2, err);
4696
4699
  console.log(err);
@@ -4698,12 +4701,12 @@ class BagelAuth {
4698
4701
  this.user = null;
4699
4702
  }
4700
4703
  async acceptInvite(token, user) {
4701
- await axios.post(`${this.bagel.host}/auth/accept-invite/${token}`, user);
4704
+ await axios.post(`/auth/accept-invite/${token}`, user);
4702
4705
  await this.login(user);
4703
4706
  }
4704
4707
  async register(user, errors) {
4705
4708
  try {
4706
- await axios.post(`${this.bagel.host}/auth/register`, user);
4709
+ await axios.post("/auth/register", user);
4707
4710
  return this.login(user);
4708
4711
  } catch (err) {
4709
4712
  console.error(err);
@@ -4719,7 +4722,8 @@ class Bagel {
4719
4722
  __publicField(this, "onError");
4720
4723
  __publicField(this, "read_table", null);
4721
4724
  __publicField(this, "auth", new BagelAuth(this));
4722
- this.host = host;
4725
+ this.host = host.replace(/\/$/, "");
4726
+ axios.defaults.baseURL = this.host;
4723
4727
  this.onError = onError;
4724
4728
  }
4725
4729
  data(table) {
@@ -4734,7 +4738,7 @@ class Bagel {
4734
4738
  const queryParams = Object.entries(query).map(([key, value]) => `${key}=${value}`).join("&");
4735
4739
  endpoint = `${endpoint}?${queryParams}`;
4736
4740
  }
4737
- return axios.get(`${this.host}/api/${endpoint}`).then(({ data: data2 }) => data2);
4741
+ return axios.get(`/api/${endpoint}`).then(({ data: data2 }) => data2);
4738
4742
  }
4739
4743
  async get(endpoint, query) {
4740
4744
  endpoint = this._endpointCleaner(endpoint);
@@ -4745,7 +4749,7 @@ class Bagel {
4745
4749
  if (queryParams)
4746
4750
  endpoint = `${endpoint}?${queryParams}`;
4747
4751
  }
4748
- const url = `${this.host}/${endpoint}`;
4752
+ const url = `/${endpoint}`;
4749
4753
  return axios.get(url).then(({ data: data2 }) => data2).catch((err) => {
4750
4754
  var _a2;
4751
4755
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
@@ -4754,7 +4758,7 @@ class Bagel {
4754
4758
  }
4755
4759
  async delete(endpoint) {
4756
4760
  endpoint = this._endpointCleaner(endpoint);
4757
- return axios.delete(`${this.host}/${endpoint}`).then(({ data: data2 }) => data2).catch((err) => {
4761
+ return axios.delete(`/${endpoint}`).then(({ data: data2 }) => data2).catch((err) => {
4758
4762
  var _a2;
4759
4763
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4760
4764
  throw err;
@@ -4762,7 +4766,7 @@ class Bagel {
4762
4766
  }
4763
4767
  async put(endpoint, payload) {
4764
4768
  endpoint = this._endpointCleaner(endpoint);
4765
- return axios.put(`${this.host}/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4769
+ return axios.put(`/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4766
4770
  var _a2;
4767
4771
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4768
4772
  throw err;
@@ -4770,7 +4774,7 @@ class Bagel {
4770
4774
  }
4771
4775
  async patch(endpoint, payload = {}) {
4772
4776
  endpoint = this._endpointCleaner(endpoint);
4773
- return axios.patch(`${this.host}/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4777
+ return axios.patch(`/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4774
4778
  var _a2;
4775
4779
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4776
4780
  throw err;
@@ -4778,7 +4782,7 @@ class Bagel {
4778
4782
  }
4779
4783
  async post(endpoint, payload = {}) {
4780
4784
  endpoint = this._endpointCleaner(endpoint);
4781
- return axios.post(`${this.host}/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4785
+ return axios.post(`/${endpoint}`, payload).then(({ data: data2 }) => data2).catch((err) => {
4782
4786
  var _a2;
4783
4787
  (_a2 = this.onError) == null ? void 0 : _a2.call(this, err);
4784
4788
  throw err;
@@ -4787,7 +4791,7 @@ class Bagel {
4787
4791
  async uploadFile(file, options) {
4788
4792
  const formData = new FormData();
4789
4793
  formData.append("file", file);
4790
- const { data: data2 } = await axios.post(`${this.host}/files/upload`, formData, {
4794
+ const { data: data2 } = await axios.post("/files/upload", formData, {
4791
4795
  headers: {
4792
4796
  "Content-Type": "multipart/form-data"
4793
4797
  },
@@ -4905,6 +4909,17 @@ function formatString(str, format2) {
4905
4909
  }
4906
4910
  return str;
4907
4911
  }
4912
+ function richText(id, label, options) {
4913
+ return {
4914
+ $el: "richtext",
4915
+ class: options == null ? void 0 : options.class,
4916
+ required: options == null ? void 0 : options.required,
4917
+ id,
4918
+ label,
4919
+ placeholder: options == null ? void 0 : options.placeholder,
4920
+ attrs: {}
4921
+ };
4922
+ }
4908
4923
  function txtField(id, label, options) {
4909
4924
  return {
4910
4925
  $el: "text",
@@ -4951,6 +4966,7 @@ const BagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
4951
4966
  __proto__: null,
4952
4967
  frmRow,
4953
4968
  numField,
4969
+ richText,
4954
4970
  slctField,
4955
4971
  txtField
4956
4972
  }, Symbol.toStringTag, { value: "Module" }));
@@ -5022,8 +5038,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5022
5038
  };
5023
5039
  }
5024
5040
  });
5025
- const _hoisted_1$D = { class: "full-nav" };
5026
- const _hoisted_2$v = { class: "nav-scroll" };
5041
+ const _hoisted_1$E = { class: "full-nav" };
5042
+ const _hoisted_2$x = { class: "nav-scroll" };
5027
5043
  const _hoisted_3$m = { class: "nav-links-wrapper" };
5028
5044
  const _hoisted_4$e = { class: "tooltip" };
5029
5045
  const _hoisted_5$b = { class: "bot-buttons-wrapper" };
@@ -5057,8 +5073,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5057
5073
  class: "top-arrow"
5058
5074
  })
5059
5075
  ], 32),
5060
- createElementVNode("div", _hoisted_1$D, [
5061
- createElementVNode("div", _hoisted_2$v, [
5076
+ createElementVNode("div", _hoisted_1$E, [
5077
+ createElementVNode("div", _hoisted_2$x, [
5062
5078
  createElementVNode("div", _hoisted_3$m, [
5063
5079
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.links, (link) => {
5064
5080
  return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
@@ -5116,11 +5132,11 @@ const _export_sfc = (sfc, props2) => {
5116
5132
  return target;
5117
5133
  };
5118
5134
  const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-727b754a"]]);
5119
- const _hoisted_1$C = {
5135
+ const _hoisted_1$D = {
5120
5136
  key: 0,
5121
5137
  class: "loading"
5122
5138
  };
5123
- const _hoisted_2$u = {
5139
+ const _hoisted_2$w = {
5124
5140
  key: 1,
5125
5141
  class: "bgl_btn-flex"
5126
5142
  };
@@ -5211,7 +5227,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
5211
5227
  })
5212
5228
  }, {
5213
5229
  default: withCtx(() => [
5214
- _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$C)) : (openBlock(), createElementBlock("div", _hoisted_2$u, [
5230
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$D)) : (openBlock(), createElementBlock("div", _hoisted_2$w, [
5215
5231
  _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
5216
5232
  key: 0,
5217
5233
  icon: _ctx.icon
@@ -5232,8 +5248,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
5232
5248
  }
5233
5249
  });
5234
5250
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-d09a83c5"]]);
5235
- const _hoisted_1$B = { class: "tool-bar" };
5236
- const _hoisted_2$t = { class: "modal-footer mt-3" };
5251
+ const _hoisted_1$C = { class: "tool-bar" };
5252
+ const _hoisted_2$v = { class: "modal-footer mt-3" };
5237
5253
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
5238
5254
  __name: "Modal",
5239
5255
  props: {
@@ -5281,7 +5297,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5281
5297
  }, ["stop"]))
5282
5298
  }, {
5283
5299
  default: withCtx(() => [
5284
- createElementVNode("header", _hoisted_1$B, [
5300
+ createElementVNode("header", _hoisted_1$C, [
5285
5301
  renderSlot(_ctx.$slots, "toolbar"),
5286
5302
  createVNode(unref(Btn), {
5287
5303
  style: normalizeStyle({ float: _ctx.side ? "left" : "right" }),
@@ -5297,7 +5313,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5297
5313
  }, null, 8, ["label"])) : createCommentVNode("", true)
5298
5314
  ]),
5299
5315
  renderSlot(_ctx.$slots, "default"),
5300
- createElementVNode("footer", _hoisted_2$t, [
5316
+ createElementVNode("footer", _hoisted_2$v, [
5301
5317
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.actions, (action, i2) => {
5302
5318
  return openBlock(), createBlock(unref(Btn), mergeProps({
5303
5319
  key: i2,
@@ -5423,8 +5439,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
5423
5439
  }
5424
5440
  });
5425
5441
  const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
5426
- const _hoisted_1$A = { class: "accordion-item" };
5427
- const _hoisted_2$s = ["aria-expanded", "aria-controls"];
5442
+ const _hoisted_1$B = { class: "accordion-item" };
5443
+ const _hoisted_2$u = ["aria-expanded", "aria-controls"];
5428
5444
  const _hoisted_3$l = { class: "accordion-label" };
5429
5445
  const _hoisted_4$d = ["id", "aria-hidden"];
5430
5446
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
@@ -5451,7 +5467,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5451
5467
  accordionState.openItem = null;
5452
5468
  }
5453
5469
  return (_ctx, _cache) => {
5454
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
5470
+ return openBlock(), createElementBlock("div", _hoisted_1$B, [
5455
5471
  createElementVNode("button", {
5456
5472
  onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
5457
5473
  "aria-expanded": unref(open) ? "true" : "false",
@@ -5464,7 +5480,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5464
5480
  }, [
5465
5481
  createVNode(unref(_sfc_main$H), { icon: "expand_more" })
5466
5482
  ], 2)
5467
- ], 8, _hoisted_2$s),
5483
+ ], 8, _hoisted_2$u),
5468
5484
  createVNode(Transition, { name: "expand" }, {
5469
5485
  default: withCtx(() => [
5470
5486
  unref(open) ? (openBlock(), createElementBlock("div", {
@@ -5483,15 +5499,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
5483
5499
  }
5484
5500
  });
5485
5501
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
5486
- const _hoisted_1$z = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5487
- const _hoisted_2$r = { class: "p-1" };
5502
+ const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5503
+ const _hoisted_2$t = { class: "p-1" };
5488
5504
  const _hoisted_3$k = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5489
5505
  const _sfc_main$B = /* @__PURE__ */ defineComponent({
5490
5506
  __name: "ListView",
5491
5507
  setup(__props) {
5492
5508
  return (_ctx, _cache) => {
5493
- return openBlock(), createElementBlock("div", _hoisted_1$z, [
5494
- createElementVNode("div", _hoisted_2$r, [
5509
+ return openBlock(), createElementBlock("div", _hoisted_1$A, [
5510
+ createElementVNode("div", _hoisted_2$t, [
5495
5511
  renderSlot(_ctx.$slots, "header")
5496
5512
  ]),
5497
5513
  createElementVNode("div", _hoisted_3$k, [
@@ -5501,8 +5517,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
5501
5517
  };
5502
5518
  }
5503
5519
  });
5504
- const _hoisted_1$y = { class: "txt16 no-margin ellipsis" };
5505
- const _hoisted_2$q = { class: "txt14 no-margin txt-gray ellipsis" };
5520
+ const _hoisted_1$z = { class: "txt16 no-margin ellipsis" };
5521
+ const _hoisted_2$s = { class: "txt14 no-margin txt-gray ellipsis" };
5506
5522
  const _sfc_main$A = /* @__PURE__ */ defineComponent({
5507
5523
  __name: "ListItem",
5508
5524
  props: {
@@ -5527,11 +5543,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
5527
5543
  size: 40
5528
5544
  }, null, 8, ["name", "src"])) : createCommentVNode("", true),
5529
5545
  createElementVNode("div", null, [
5530
- createElementVNode("p", _hoisted_1$y, [
5546
+ createElementVNode("p", _hoisted_1$z, [
5531
5547
  createTextVNode(toDisplayString(_ctx.title) + " ", 1),
5532
5548
  renderSlot(_ctx.$slots, "default")
5533
5549
  ]),
5534
- createElementVNode("p", _hoisted_2$q, [
5550
+ createElementVNode("p", _hoisted_2$s, [
5535
5551
  createTextVNode(toDisplayString(_ctx.subtitle) + " ", 1),
5536
5552
  renderSlot(_ctx.$slots, "subtitle")
5537
5553
  ])
@@ -5542,8 +5558,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
5542
5558
  };
5543
5559
  }
5544
5560
  });
5545
- const _hoisted_1$x = { class: "page-top" };
5546
- const _hoisted_2$p = { class: "top-title" };
5561
+ const _hoisted_1$y = { class: "page-top" };
5562
+ const _hoisted_2$r = { class: "top-title" };
5547
5563
  const _sfc_main$z = /* @__PURE__ */ defineComponent({
5548
5564
  __name: "PageTitle",
5549
5565
  props: {
@@ -5554,8 +5570,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
5554
5570
  },
5555
5571
  setup(__props) {
5556
5572
  return (_ctx, _cache) => {
5557
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
5558
- createElementVNode("h1", _hoisted_2$p, [
5573
+ return openBlock(), createElementBlock("div", _hoisted_1$y, [
5574
+ createElementVNode("h1", _hoisted_2$r, [
5559
5575
  renderSlot(_ctx.$slots, "default"),
5560
5576
  createTextVNode(" " + toDisplayString(__props.value), 1)
5561
5577
  ])
@@ -5563,8 +5579,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
5563
5579
  };
5564
5580
  }
5565
5581
  });
5566
- const _hoisted_1$w = { class: "table-list-wrap h-100" };
5567
- const _hoisted_2$o = { class: "infinite-wrapper" };
5582
+ const _hoisted_1$x = { class: "table-list-wrap h-100" };
5583
+ const _hoisted_2$q = { class: "infinite-wrapper" };
5568
5584
  const _hoisted_3$j = { class: "row first-row" };
5569
5585
  const _hoisted_4$c = ["onClick"];
5570
5586
  const _hoisted_5$a = { class: "flex" };
@@ -5604,8 +5620,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
5604
5620
  emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
5605
5621
  };
5606
5622
  return (_ctx, _cache) => {
5607
- return openBlock(), createElementBlock("div", _hoisted_1$w, [
5608
- createElementVNode("table", _hoisted_2$o, [
5623
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
5624
+ createElementVNode("table", _hoisted_2$q, [
5609
5625
  createElementVNode("thead", _hoisted_3$j, [
5610
5626
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (field) => {
5611
5627
  return openBlock(), createElementBlock("th", {
@@ -5664,9 +5680,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
5664
5680
  });
5665
5681
  const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-f3641508"]]);
5666
5682
  const _sfc_main$x = {};
5667
- const _hoisted_1$v = { class: "flex space-between" };
5683
+ const _hoisted_1$w = { class: "flex space-between" };
5668
5684
  function _sfc_render$1(_ctx, _cache) {
5669
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
5685
+ return openBlock(), createElementBlock("div", _hoisted_1$w, [
5670
5686
  renderSlot(_ctx.$slots, "default")
5671
5687
  ]);
5672
5688
  }
@@ -5694,11 +5710,11 @@ function _sfc_render(_ctx, _cache) {
5694
5710
  });
5695
5711
  }
5696
5712
  const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render]]);
5697
- const _hoisted_1$u = {
5713
+ const _hoisted_1$v = {
5698
5714
  key: 0,
5699
5715
  class: "data"
5700
5716
  };
5701
- const _hoisted_2$n = {
5717
+ const _hoisted_2$p = {
5702
5718
  key: 0,
5703
5719
  class: "data-row"
5704
5720
  };
@@ -5720,7 +5736,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5720
5736
  const itemData = useModel(__props, "data");
5721
5737
  return (_ctx, _cache) => {
5722
5738
  var _a2;
5723
- return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$u, [
5739
+ return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$v, [
5724
5740
  _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$s), {
5725
5741
  key: 0,
5726
5742
  label: _ctx.title
@@ -5729,7 +5745,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5729
5745
  return openBlock(), createElementBlock(Fragment$1, {
5730
5746
  key: field.id
5731
5747
  }, [
5732
- unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$n, [
5748
+ unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$p, [
5733
5749
  createElementVNode("div", _hoisted_3$i, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
5734
5750
  createVNode(unref(_sfc_main$l), {
5735
5751
  field,
@@ -5756,9 +5772,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
5756
5772
  }
5757
5773
  });
5758
5774
  const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-bb2526f9"]]);
5775
+ const _hoisted_1$u = { class: "card_label" };
5759
5776
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
5760
5777
  __name: "Card",
5761
5778
  props: {
5779
+ label: {},
5762
5780
  thin: { type: Boolean },
5763
5781
  outline: { type: Boolean },
5764
5782
  h100: { type: Boolean },
@@ -5771,13 +5789,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
5771
5789
  return openBlock(), createElementBlock("div", {
5772
5790
  class: normalizeClass(["bgl_card", {
5773
5791
  thin: _ctx.thin,
5774
- border: _ctx.outline,
5792
+ "border": _ctx.outline,
5775
5793
  "h-100": _ctx.h100,
5776
5794
  [_ctx.bg || ""]: _ctx.bg,
5777
5795
  "overflow-x": _ctx.overflowX,
5778
5796
  "overflow-y": _ctx.overflowY
5779
5797
  }])
5780
5798
  }, [
5799
+ createElementVNode("span", _hoisted_1$u, toDisplayString(_ctx.label), 1),
5781
5800
  renderSlot(_ctx.$slots, "default")
5782
5801
  ], 2);
5783
5802
  };
@@ -5854,6 +5873,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
5854
5873
  }
5855
5874
  });
5856
5875
  const _hoisted_1$s = ["dismissable"];
5876
+ const _hoisted_2$o = { class: "m-0" };
5857
5877
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
5858
5878
  __name: "Alert",
5859
5879
  props: {
@@ -5880,7 +5900,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
5880
5900
  size: 2,
5881
5901
  color: color2[_ctx.type]
5882
5902
  }, null, 8, ["icon", "color"]),
5883
- createElementVNode("p", null, toDisplayString(_ctx.message), 1),
5903
+ createElementVNode("p", _hoisted_2$o, toDisplayString(_ctx.message), 1),
5884
5904
  createVNode(Btn, {
5885
5905
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true),
5886
5906
  flat: "",
@@ -5892,7 +5912,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
5892
5912
  };
5893
5913
  }
5894
5914
  });
5895
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-94bfcb05"]]);
5915
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-4017e821"]]);
5896
5916
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
5897
5917
  __name: "Badge",
5898
5918
  props: {
@@ -5925,7 +5945,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
5925
5945
  });
5926
5946
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-10743b06"]]);
5927
5947
  const _hoisted_1$r = { class: "bgl_vid" };
5928
- const _hoisted_2$m = ["src"];
5948
+ const _hoisted_2$n = ["src"];
5929
5949
  const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
5930
5950
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
5931
5951
  __name: "BglVideo",
@@ -5974,7 +5994,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5974
5994
  frameborder: "0",
5975
5995
  allowfullscreen: "",
5976
5996
  title: "Video"
5977
- }, null, 12, _hoisted_2$m)) : (openBlock(), createElementBlock("video", {
5997
+ }, null, 12, _hoisted_2$n)) : (openBlock(), createElementBlock("video", {
5978
5998
  key: 1,
5979
5999
  src: _ctx.src,
5980
6000
  autoplay: _ctx.autoplay,
@@ -5993,7 +6013,7 @@ const _hoisted_1$q = {
5993
6013
  key: 0,
5994
6014
  class: "blocker"
5995
6015
  };
5996
- const _hoisted_2$l = { class: "Handlers" };
6016
+ const _hoisted_2$m = { class: "Handlers" };
5997
6017
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
5998
6018
  __name: "Carousel",
5999
6019
  props: {
@@ -6156,7 +6176,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
6156
6176
  unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_1$q)) : createCommentVNode("", true),
6157
6177
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
6158
6178
  ], 34),
6159
- createElementVNode("div", _hoisted_2$l, [
6179
+ createElementVNode("div", _hoisted_2$m, [
6160
6180
  createElementVNode("span", { onClick: prev }, [
6161
6181
  renderSlot(_ctx.$slots, "prev", {}, void 0, true)
6162
6182
  ]),
@@ -6177,7 +6197,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6177
6197
  schema: {},
6178
6198
  modelValue: { default: () => ({}) },
6179
6199
  onDelete: {},
6180
- onSubmit: {}
6200
+ onSubmit: {},
6201
+ status: {}
6181
6202
  },
6182
6203
  emits: ["update:modelValue", "submit", "dirty"],
6183
6204
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -6206,17 +6227,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6206
6227
  return (_b = (_a2 = form.value) == null ? void 0 : _a2.reportValidity) == null ? void 0 : _b.call(_a2);
6207
6228
  };
6208
6229
  const clearForm = () => Object.assign(data2.value, {});
6209
- let formStatus = ref("idle");
6210
6230
  const runSubmit = () => {
6211
6231
  var _a2;
6212
- try {
6213
- validateForm();
6214
- (_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
6215
- clearForm();
6216
- formStatus.value = "success";
6217
- } catch (e) {
6218
- formStatus.value = "error";
6219
- }
6232
+ const isValid2 = validateForm();
6233
+ if (!isValid2)
6234
+ return;
6235
+ (_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
6236
+ clearForm();
6220
6237
  };
6221
6238
  const i18nT = (val) => val;
6222
6239
  const deleteItem = () => {
@@ -6249,7 +6266,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6249
6266
  modelValue: data2.value,
6250
6267
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data2.value = $event)
6251
6268
  }, null, 8, ["field", "modelValue"]);
6252
- }), 128)) : !unref(slots).success || unref(formStatus) !== "success" ? (openBlock(), createElementBlock("form", {
6269
+ }), 128)) : !unref(slots).success || _ctx.status !== "success" ? (openBlock(), createElementBlock("form", {
6253
6270
  key: 1,
6254
6271
  ref_key: "form",
6255
6272
  ref: form,
@@ -6270,8 +6287,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6270
6287
  }), 128)),
6271
6288
  renderSlot(_ctx.$slots, "submit")
6272
6289
  ], 544)) : createCommentVNode("", true),
6273
- unref(formStatus) === "success" ? renderSlot(_ctx.$slots, "success", { key: 2 }) : createCommentVNode("", true),
6274
- unref(formStatus) === "error" ? renderSlot(_ctx.$slots, "error", { key: 3 }) : createCommentVNode("", true)
6290
+ _ctx.status === "success" ? renderSlot(_ctx.$slots, "success", { key: 2 }) : createCommentVNode("", true),
6291
+ _ctx.status === "error" ? renderSlot(_ctx.$slots, "error", { key: 3 }) : createCommentVNode("", true)
6275
6292
  ], 64);
6276
6293
  };
6277
6294
  }
@@ -6294,6 +6311,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6294
6311
  return ToggleInput;
6295
6312
  if (props2.field.$el === "check")
6296
6313
  return CheckInput;
6314
+ if (props2.field.$el === "richtext")
6315
+ return _sfc_main$8;
6297
6316
  return props2.field.$el || "div";
6298
6317
  });
6299
6318
  const emit2 = __emit;
@@ -6309,7 +6328,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6309
6328
  data2[props2.field.id] = val;
6310
6329
  emit2("update:modelValue", data2);
6311
6330
  },
6312
- get: () => props2.field.id ? props2.modelValue[props2.field.id] : props2.field.defaultValue || ""
6331
+ get: () => {
6332
+ if (props2.field.id)
6333
+ return props2.modelValue[props2.field.id];
6334
+ return props2.field.defaultValue || "";
6335
+ }
6313
6336
  });
6314
6337
  const vIf = computed(() => {
6315
6338
  var _a2, _b;
@@ -6368,7 +6391,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6368
6391
  });
6369
6392
  const _withScopeId$1 = (n2) => (pushScopeId("data-v-e8219826"), n2 = n2(), popScopeId(), n2);
6370
6393
  const _hoisted_1$p = ["title"];
6371
- const _hoisted_2$k = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("svg", {
6394
+ const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("svg", {
6372
6395
  xmlns: "http://www.w3.org/2000/svg",
6373
6396
  height: "24",
6374
6397
  viewBox: "0 -960 960 960",
@@ -6377,7 +6400,7 @@ const _hoisted_2$k = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
6377
6400
  /* @__PURE__ */ createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
6378
6401
  ], -1));
6379
6402
  const _hoisted_3$g = [
6380
- _hoisted_2$k
6403
+ _hoisted_2$l
6381
6404
  ];
6382
6405
  const _hoisted_4$a = ["required", "id"];
6383
6406
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
@@ -15031,7 +15054,7 @@ Object.entries(Mo).forEach(([e, t]) => {
15031
15054
  e !== "default" && (Va[e] = t);
15032
15055
  });
15033
15056
  const _hoisted_1$o = ["title"];
15034
- const _hoisted_2$j = { key: 0 };
15057
+ const _hoisted_2$k = { key: 0 };
15035
15058
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
15036
15059
  __name: "DateInput",
15037
15060
  props: {
@@ -15069,7 +15092,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
15069
15092
  class: normalizeClass(["bagel-input", { small: _ctx.small }]),
15070
15093
  title: _ctx.label
15071
15094
  }, [
15072
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$j, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
15095
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$k, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
15073
15096
  createVNode(unref(Va), mergeProps({
15074
15097
  ref_key: "datePicker",
15075
15098
  ref: datePicker,
@@ -15083,7 +15106,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
15083
15106
  }
15084
15107
  });
15085
15108
  const _hoisted_1$n = ["title"];
15086
- const _hoisted_2$i = { key: 0 };
15109
+ const _hoisted_2$j = { key: 0 };
15087
15110
  const _hoisted_3$f = ["value", "placeholder"];
15088
15111
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
15089
15112
  __name: "JSONInput",
@@ -15108,7 +15131,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
15108
15131
  class: normalizeClass(["bagel-input", { small: _ctx.small }]),
15109
15132
  title: _ctx.description
15110
15133
  }, [
15111
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$i, [
15134
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$j, [
15112
15135
  createVNode(_component_LangText, { input: _ctx.label }, null, 8, ["input"])
15113
15136
  ])) : createCommentVNode("", true),
15114
15137
  createElementVNode("textarea", {
@@ -15123,7 +15146,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
15123
15146
  });
15124
15147
  const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1fc4f739"]]);
15125
15148
  const _hoisted_1$m = ["disabled"];
15126
- const _hoisted_2$h = ["value"];
15149
+ const _hoisted_2$i = ["value"];
15127
15150
  const _hoisted_3$e = ["onClick"];
15128
15151
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
15129
15152
  __name: "SelectInput",
@@ -15321,7 +15344,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15321
15344
  onInput: _cache[1] || (_cache[1] = ($event) => updateOpen(true)),
15322
15345
  value: selectedItems.value,
15323
15346
  required: ""
15324
- }, null, 40, _hoisted_2$h)) : createCommentVNode("", true)
15347
+ }, null, 40, _hoisted_2$i)) : createCommentVNode("", true)
15325
15348
  ])
15326
15349
  ]),
15327
15350
  _: 3
@@ -15329,7 +15352,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
15329
15352
  };
15330
15353
  }
15331
15354
  });
15332
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70fd5ae7"]]);
15355
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-ab376074"]]);
15333
15356
  /*!
15334
15357
  * vue-draggable-next v2.2.0
15335
15358
  * (c) 2023 Anish George
@@ -17853,7 +17876,7 @@ const VueDraggableNext = defineComponent({
17853
17876
  }
17854
17877
  });
17855
17878
  const _hoisted_1$l = ["title"];
17856
- const _hoisted_2$g = { class: "bagel-input" };
17879
+ const _hoisted_2$h = { class: "bagel-input" };
17857
17880
  const _hoisted_3$d = { class: "table-side-scroll" };
17858
17881
  const _hoisted_4$9 = { class: "table-header" };
17859
17882
  const _hoisted_5$8 = { class: "table-reorder" };
@@ -17923,7 +17946,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
17923
17946
  class: "table-field-wrap",
17924
17947
  title: _ctx.description
17925
17948
  }, [
17926
- createElementVNode("div", _hoisted_2$g, [
17949
+ createElementVNode("div", _hoisted_2$h, [
17927
17950
  createElementVNode("label", null, toDisplayString((_a2 = unref(fieldMeta)) == null ? void 0 : _a2.label), 1)
17928
17951
  ]),
17929
17952
  createElementVNode("div", _hoisted_3$d, [
@@ -18004,7 +18027,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
18004
18027
  });
18005
18028
  const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-cdacf10e"]]);
18006
18029
  const _hoisted_1$k = ["title"];
18007
- const _hoisted_2$f = ["for"];
18030
+ const _hoisted_2$g = ["for"];
18008
18031
  const _hoisted_3$c = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
18009
18032
  const _hoisted_4$8 = ["title", "id", "type", "rows", "placeholder", "disabled", "required", "pattern"];
18010
18033
  const _hoisted_5$7 = { key: 2 };
@@ -18141,7 +18164,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
18141
18164
  [vModelText, unref(inputVal)]
18142
18165
  ]),
18143
18166
  _ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$7, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true)
18144
- ], 8, _hoisted_2$f),
18167
+ ], 8, _hoisted_2$g),
18145
18168
  _ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$H), {
18146
18169
  key: 0,
18147
18170
  class: "iconStart",
@@ -18163,7 +18186,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
18163
18186
  };
18164
18187
  }
18165
18188
  });
18166
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cd4c27ad"]]);
18189
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-df718b64"]]);
18167
18190
  const _hoisted_1$j = { class: "primary-checkbox" };
18168
18191
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
18169
18192
  __name: "Checkbox",
@@ -18194,7 +18217,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
18194
18217
  });
18195
18218
  const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e4cbb088"]]);
18196
18219
  const _hoisted_1$i = ["title"];
18197
- const _hoisted_2$e = ["id", "placeholder", "required"];
18220
+ const _hoisted_2$f = ["id", "placeholder", "required"];
18198
18221
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
18199
18222
  __name: "ColorPicker",
18200
18223
  props: {
@@ -18231,7 +18254,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
18231
18254
  placeholder: _ctx.placeholder || _ctx.label,
18232
18255
  class: { "no-edit": !_ctx.editMode },
18233
18256
  required: _ctx.required
18234
- }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$e), [
18257
+ }, _ctx.nativeInputAttrs), null, 16, _hoisted_2$f), [
18235
18258
  [vModelText, inputVal.value]
18236
18259
  ])
18237
18260
  ])
@@ -18240,7 +18263,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
18240
18263
  }
18241
18264
  });
18242
18265
  const _hoisted_1$h = { class: "datetime-wrap" };
18243
- const _hoisted_2$d = { class: "date-wrap" };
18266
+ const _hoisted_2$e = { class: "date-wrap" };
18244
18267
  const _hoisted_3$b = {
18245
18268
  key: 0,
18246
18269
  class: "time-wrap"
@@ -18250,7 +18273,8 @@ const _hoisted_5$6 = ["for"];
18250
18273
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
18251
18274
  __name: "DatePicker",
18252
18275
  props: {
18253
- name: {},
18276
+ label: {},
18277
+ id: {},
18254
18278
  options: {},
18255
18279
  showTimeWrap: { type: Boolean }
18256
18280
  },
@@ -18264,7 +18288,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
18264
18288
  });
18265
18289
  return (_ctx, _cache) => {
18266
18290
  return openBlock(), createElementBlock("div", _hoisted_1$h, [
18267
- createElementVNode("div", _hoisted_2$d, [
18291
+ createElementVNode("div", _hoisted_2$e, [
18268
18292
  createVNode(unref(Va), mergeProps({
18269
18293
  inline: "",
18270
18294
  "week-start": "0",
@@ -18284,15 +18308,15 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
18284
18308
  return openBlock(), createElementBlock(Fragment$1, { key: hr2 }, [
18285
18309
  withDirectives(createElementVNode("input", {
18286
18310
  type: "radio",
18287
- id: `${hr2}_${_ctx.name}`,
18288
- name: _ctx.name,
18311
+ id: `${hr2}_${_ctx.id}`,
18312
+ name: _ctx.label,
18289
18313
  value: hr2,
18290
18314
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedHour.value = $event)
18291
18315
  }, null, 8, _hoisted_4$7), [
18292
18316
  [vModelRadio, selectedHour.value]
18293
18317
  ]),
18294
18318
  createElementVNode("label", {
18295
- for: `${hr2}_${_ctx.name}`
18319
+ for: `${hr2}_${_ctx.id}`
18296
18320
  }, toDisplayString(hr2), 9, _hoisted_5$6)
18297
18321
  ], 64);
18298
18322
  }), 128))
@@ -18302,7 +18326,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
18302
18326
  }
18303
18327
  });
18304
18328
  const _hoisted_1$g = { class: "bagel-input" };
18305
- const _hoisted_2$c = { class: "pb-025" };
18329
+ const _hoisted_2$d = { class: "pb-025" };
18306
18330
  const _hoisted_3$a = { class: "flex gap-05 flex-wrap" };
18307
18331
  const _hoisted_4$6 = ["id", "name", "value", "checked"];
18308
18332
  const _hoisted_5$5 = ["for"];
@@ -18346,7 +18370,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
18346
18370
  });
18347
18371
  return (_ctx, _cache) => {
18348
18372
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
18349
- createElementVNode("label", _hoisted_2$c, toDisplayString(_ctx.label), 1),
18373
+ createElementVNode("label", _hoisted_2$d, toDisplayString(_ctx.label), 1),
18350
18374
  createElementVNode("div", _hoisted_3$a, [
18351
18375
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(cumputedOptions.value, ({ optioId, label, value }, index2) => {
18352
18376
  return openBlock(), createElementBlock("div", {
@@ -18371,7 +18395,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
18371
18395
  });
18372
18396
  const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-e47ae8b5"]]);
18373
18397
  const _hoisted_1$f = { class: "bagel-input" };
18374
- const _hoisted_2$b = {
18398
+ const _hoisted_2$c = {
18375
18399
  key: 0,
18376
18400
  class: "imagePreviewWrap"
18377
18401
  };
@@ -18500,7 +18524,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
18500
18524
  return openBlock(), createElementBlock(Fragment$1, {
18501
18525
  key: file.id
18502
18526
  }, [
18503
- !_ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
18527
+ !_ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
18504
18528
  createElementVNode("img", {
18505
18529
  class: "preview",
18506
18530
  src: file.url,
@@ -18567,9 +18591,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
18567
18591
  const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-1be8d7b1"]]);
18568
18592
  const _withScopeId = (n2) => (pushScopeId("data-v-b87221d6"), n2 = n2(), popScopeId(), n2);
18569
18593
  const _hoisted_1$e = ["title"];
18570
- const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
18594
+ const _hoisted_2$b = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
18571
18595
  const _hoisted_3$8 = [
18572
- _hoisted_2$a
18596
+ _hoisted_2$b
18573
18597
  ];
18574
18598
  const _hoisted_4$4 = ["id"];
18575
18599
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
@@ -39059,7 +39083,11 @@ defineComponent({
39059
39083
  }, (_b = (_a2 = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a2));
39060
39084
  }
39061
39085
  });
39062
- const _hoisted_1$d = { key: 0 };
39086
+ const _hoisted_1$d = { class: "RichText" };
39087
+ const _hoisted_2$a = {
39088
+ key: 0,
39089
+ class: "RichText-tools"
39090
+ };
39063
39091
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39064
39092
  __name: "RichText",
39065
39093
  props: {
@@ -39076,7 +39104,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39076
39104
  };
39077
39105
  const config = [
39078
39106
  {
39079
- name: "bold",
39107
+ name: "Bold",
39080
39108
  command: () => {
39081
39109
  var _a2;
39082
39110
  return (_a2 = focus2()) == null ? void 0 : _a2.toggleBold().run();
@@ -39088,7 +39116,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39088
39116
  }
39089
39117
  },
39090
39118
  {
39091
- name: "italic",
39119
+ name: "Italic",
39092
39120
  command: () => focus2().toggleItalic().run(),
39093
39121
  icon: "format_italic",
39094
39122
  disabled: () => {
@@ -39097,7 +39125,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39097
39125
  }
39098
39126
  },
39099
39127
  {
39100
- name: "strike",
39128
+ name: "Strike",
39101
39129
  command: () => focus2().toggleStrike().run(),
39102
39130
  icon: "format_strikethrough",
39103
39131
  disabled: () => {
@@ -39106,93 +39134,93 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39106
39134
  }
39107
39135
  },
39108
39136
  {
39109
- name: "code",
39137
+ name: "Code Text",
39110
39138
  command: () => focus2().toggleCode().run(),
39111
39139
  icon: "code"
39112
39140
  },
39141
+ // {
39142
+ // name: 'clearMarks',
39143
+ // command: () => focus().unsetAllMarks(),
39144
+ // icon: 'clear',
39145
+ // },
39113
39146
  {
39114
- name: "clearMarks",
39115
- command: () => focus2().unsetAllMarks(),
39116
- icon: "clear"
39117
- },
39118
- {
39119
- name: "clearNodes",
39147
+ name: "Clear",
39120
39148
  command: () => focus2().clearNodes().run(),
39121
- icon: "clear"
39149
+ icon: "format_clear"
39122
39150
  },
39123
39151
  {
39124
- name: "paragraph",
39152
+ name: "Paragraph",
39125
39153
  command: () => focus2().setParagraph().run(),
39126
39154
  icon: "format_paragraph"
39127
39155
  },
39128
39156
  {
39129
- name: "heading",
39157
+ name: "Heading",
39130
39158
  command: () => focus2().toggleHeading({ level: 1 }).run(),
39131
39159
  icon: "format_h1",
39132
39160
  option: { level: 1 }
39133
39161
  },
39134
39162
  {
39135
- name: "heading",
39163
+ name: "Heading",
39136
39164
  command: () => focus2().toggleHeading({ level: 2 }).run(),
39137
39165
  icon: "format_h2",
39138
39166
  option: { level: 2 }
39139
39167
  },
39140
39168
  {
39141
- name: "heading",
39169
+ name: "Heading",
39142
39170
  command: () => focus2().toggleHeading({ level: 3 }).run(),
39143
39171
  icon: "format_h3",
39144
39172
  option: { level: 3 }
39145
39173
  },
39146
39174
  {
39147
- name: "heading",
39175
+ name: "Heading",
39148
39176
  command: () => focus2().toggleHeading({ level: 4 }).run(),
39149
39177
  icon: "format_h4",
39150
39178
  option: { level: 4 }
39151
39179
  },
39152
39180
  {
39153
- name: "heading",
39181
+ name: "Heading",
39154
39182
  command: () => focus2().toggleHeading({ level: 5 }).run(),
39155
39183
  icon: "format_h5",
39156
39184
  option: { level: 5 }
39157
39185
  },
39158
39186
  {
39159
- name: "heading",
39187
+ name: "Heading",
39160
39188
  command: () => focus2().toggleHeading({ level: 6 }).run(),
39161
39189
  icon: "format_h6",
39162
39190
  option: { level: 6 }
39163
39191
  },
39164
39192
  {
39165
- name: "bulletList",
39193
+ name: "Bullet List",
39166
39194
  command: () => focus2().toggleBulletList().run(),
39167
39195
  icon: "format_list_bulleted"
39168
39196
  },
39169
39197
  {
39170
- name: "orderedList",
39198
+ name: "Ordered List",
39171
39199
  command: () => focus2().toggleOrderedList().run(),
39172
39200
  icon: "format_list_numbered"
39173
39201
  },
39174
39202
  {
39175
- name: "codeBlock",
39203
+ name: "Code Block",
39176
39204
  command: () => focus2().toggleCodeBlock().run(),
39177
- icon: "code"
39205
+ icon: "code_blocks"
39178
39206
  },
39179
39207
  {
39180
- name: "blockquote",
39208
+ name: "Blockquote",
39181
39209
  command: () => focus2().toggleBlockquote().run(),
39182
39210
  icon: "format_quote"
39183
39211
  },
39184
39212
  {
39185
- name: "horizontalRule",
39213
+ name: "Horizontal Rule",
39186
39214
  command: () => focus2().setHorizontalRule().run(),
39187
39215
  icon: "horizontal_rule"
39188
39216
  },
39189
39217
  {
39190
- name: "hardBreak",
39218
+ name: "Hard Break",
39191
39219
  command: () => focus2().setHardBreak().run(),
39192
39220
  icon: "keyboard_return"
39193
39221
  },
39194
39222
  {
39195
- name: "undo",
39223
+ name: "Undo",
39196
39224
  command: () => focus2().undo().run(),
39197
39225
  icon: "undo",
39198
39226
  disabled: () => {
@@ -39201,7 +39229,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39201
39229
  }
39202
39230
  },
39203
39231
  {
39204
- name: "redo",
39232
+ name: "Redo",
39205
39233
  command: () => focus2().redo().run(),
39206
39234
  icon: "redo",
39207
39235
  disabled: () => {
@@ -39221,8 +39249,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39221
39249
  watch(
39222
39250
  () => props2.modelValue,
39223
39251
  (value) => {
39224
- var _a2;
39225
- return (_a2 = editor.value) == null ? void 0 : _a2.commands.setContent(value);
39252
+ var _a2, _b;
39253
+ if (((_a2 = editor.value) == null ? void 0 : _a2.getHTML()) === value)
39254
+ return;
39255
+ (_b = editor.value) == null ? void 0 : _b.commands.setContent(value, false);
39226
39256
  },
39227
39257
  { immediate: true }
39228
39258
  );
@@ -39233,8 +39263,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39233
39263
  });
39234
39264
  return (_ctx, _cache) => {
39235
39265
  const _directive_tooltip = resolveDirective("tooltip");
39236
- return openBlock(), createElementBlock(Fragment$1, null, [
39237
- unref(editor) ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
39266
+ return openBlock(), createElementBlock("div", _hoisted_1$d, [
39267
+ unref(editor) ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
39238
39268
  (openBlock(), createElementBlock(Fragment$1, null, renderList(config, (item) => {
39239
39269
  var _a2;
39240
39270
  return withDirectives(createVNode(unref(Btn), {
@@ -39250,7 +39280,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
39250
39280
  }), 64))
39251
39281
  ])) : createCommentVNode("", true),
39252
39282
  createVNode(unref(EditorContent), { editor: unref(editor) }, null, 8, ["editor"])
39253
- ], 64);
39283
+ ]);
39254
39284
  };
39255
39285
  }
39256
39286
  });
@@ -45715,7 +45745,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45715
45745
  };
45716
45746
  }
45717
45747
  });
45718
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-24905642"]]);
45748
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-65bec778"]]);
45719
45749
  const _hoisted_1$4 = { class: "m-0 pb-025 txt14 line-height-1" };
45720
45750
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
45721
45751
  __name: "BottomMenu",