@bagelink/vue 0.0.1056 → 0.0.1060

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,OA2IO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAML,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA6KxD,mBAAmB,CAAC;;;eAzKtB,KAAK,CAAC,CAAC,CAAC;kBACL,MAAM;qBACH,GAAG;qBACH,MAAM;KAsKmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;OAKD,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvLzE,wBAuL4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,OA0IO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAML,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA2KxD,mBAAmB,CAAC;;;eAvKtB,KAAK,CAAC,CAAC,CAAC;kBACL,MAAM;qBACH,GAAG;qBACH,MAAM;KAoKmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;OAKD,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AArLzE,wBAqL4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
package/dist/index.cjs CHANGED
@@ -5845,7 +5845,7 @@ const _hoisted_4$2$1 = {
5845
5845
  };
5846
5846
  const _hoisted_5$2$1 = ["x1", "y1", "x2", "y2"];
5847
5847
  const _hoisted_6$2$1 = ["x1", "y1", "x2", "y2"];
5848
- const _hoisted_7$8 = ["x1", "y1", "x2", "y2"];
5848
+ const _hoisted_7$9 = ["x1", "y1", "x2", "y2"];
5849
5849
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
5850
5850
  return _ctx.data.length ? (vue.openBlock(), vue.createElementBlock("g", {
5851
5851
  key: 0,
@@ -5901,7 +5901,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
5901
5901
  y1: _ctx.canvas.y,
5902
5902
  x2: _ctx.canvas.width - 1,
5903
5903
  y2: _ctx.canvas.height
5904
- }, null, 8, _hoisted_7$8)
5904
+ }, null, 8, _hoisted_7$9)
5905
5905
  ])
5906
5906
  ], 8, _hoisted_1$4$1)) : vue.createCommentVNode("v-if", true);
5907
5907
  }
@@ -7051,7 +7051,7 @@ const _hoisted_6$b = {
7051
7051
  key: 0,
7052
7052
  class: "data-row"
7053
7053
  };
7054
- const _hoisted_7$7 = { class: "key" };
7054
+ const _hoisted_7$8 = { class: "key" };
7055
7055
  const _hoisted_8$5 = { class: "m-0" };
7056
7056
  const _hoisted_9$4 = {
7057
7057
  key: 0,
@@ -7120,7 +7120,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
7120
7120
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, ({ id, label }) => {
7121
7121
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: id }, [
7122
7122
  !isUnset(itemData.value[id]) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$b, [
7123
- vue.createElementVNode("div", _hoisted_7$7, [
7123
+ vue.createElementVNode("div", _hoisted_7$8, [
7124
7124
  vue.createElementVNode("p", _hoisted_8$5, vue.toDisplayString(label), 1)
7125
7125
  ]),
7126
7126
  vue.createElementVNode("div", null, [
@@ -10023,7 +10023,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10023
10023
  if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState == null ? void 0 : formState.data.value);
10024
10024
  return true;
10025
10025
  });
10026
- const computedFieldData = vue.computed(
10026
+ vue.computed(
10027
10027
  () => {
10028
10028
  var _a2, _b;
10029
10029
  return ((_b = (_a2 = props2.field).transform) == null ? void 0 : _b.call(_a2, fieldData.value, formState == null ? void 0 : formState.data.value)) ?? fieldData.value;
@@ -10064,7 +10064,6 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10064
10064
  schema: ((_a2 = _ctx.field.attrs) == null ? void 0 : _a2.schema) ?? void 0
10065
10065
  }), {
10066
10066
  default: vue.withCtx(() => [
10067
- vue.createTextVNode(vue.toDisplayString(computedFieldData.value) + " ", 1),
10068
10067
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.children, (child, ii) => {
10069
10068
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: ii }, [
10070
10069
  typeof child !== "string" ? (vue.openBlock(), vue.createBlock(_component_BglField, {
@@ -19495,7 +19494,7 @@ const _hoisted_6$a = {
19495
19494
  key: 0,
19496
19495
  class: "bgl-multi-preview"
19497
19496
  };
19498
- const _hoisted_7$6 = { class: "m-0" };
19497
+ const _hoisted_7$7 = { class: "m-0" };
19499
19498
  const _hoisted_8$4 = { class: "no-margin multi-preview-txt" };
19500
19499
  const _hoisted_9$3 = {
19501
19500
  key: 0,
@@ -19797,7 +19796,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
19797
19796
  icon: "draft",
19798
19797
  class: "multi-preview"
19799
19798
  })),
19800
- vue.createElementVNode("p", _hoisted_7$6, vue.toDisplayString(file.name), 1),
19799
+ vue.createElementVNode("p", _hoisted_7$7, vue.toDisplayString(file.name), 1),
19801
19800
  vue.createVNode(vue.unref(Btn), {
19802
19801
  thin: "",
19803
19802
  flat: "",
@@ -20313,7 +20312,7 @@ const _hoisted_6$9 = {
20313
20312
  key: 0,
20314
20313
  class: "m-0 m_txt-14"
20315
20314
  };
20316
- const _hoisted_7$5 = {
20315
+ const _hoisted_7$6 = {
20317
20316
  key: 1,
20318
20317
  class: "txt-gray txt-12 m-0"
20319
20318
  };
@@ -20360,7 +20359,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
20360
20359
  }, null, 8, _hoisted_4$b)) : vue.createCommentVNode("", true),
20361
20360
  vue.createElementVNode("div", _hoisted_5$b, [
20362
20361
  opt.label ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6$9, vue.toDisplayString(opt.label), 1)) : vue.createCommentVNode("", true),
20363
- opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$5, vue.toDisplayString(opt.subLabel), 1)) : vue.createCommentVNode("", true)
20362
+ opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$6, vue.toDisplayString(opt.subLabel), 1)) : vue.createCommentVNode("", true)
20364
20363
  ]),
20365
20364
  vue.renderSlot(_ctx.$slots, "radioItem", vue.mergeProps({ ref_for: true }, opt), void 0, true)
20366
20365
  ]),
@@ -20452,15 +20451,16 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
20452
20451
  }
20453
20452
  });
20454
20453
  const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-cf892d71"]]);
20455
- const _hoisted_1$s = {
20454
+ const _hoisted_1$s = ["dir"];
20455
+ const _hoisted_2$i = {
20456
20456
  key: 0,
20457
20457
  class: "label"
20458
20458
  };
20459
- const _hoisted_2$i = ["dir"];
20460
- const _hoisted_3$e = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
20461
- const _hoisted_4$9 = ["value", "min", "max", "step", "required", "disabled"];
20462
- const _hoisted_5$9 = { class: "track absolute pointer-events-none overflow-hidden round" };
20463
- const _hoisted_6$8 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
20459
+ const _hoisted_3$e = { class: "range-slider relative w-100" };
20460
+ const _hoisted_4$9 = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
20461
+ const _hoisted_5$9 = ["value", "min", "max", "step", "required", "disabled"];
20462
+ const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
20463
+ const _hoisted_7$5 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
20464
20464
  const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20465
20465
  __name: "RangeInput",
20466
20466
  props: {
@@ -20526,12 +20526,11 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20526
20526
  const displayFrom = vue.computed(() => formatValue(validFrom.value));
20527
20527
  const displayTo = vue.computed(() => formatValue(validTo.value));
20528
20528
  return (_ctx, _cache) => {
20529
- return vue.openBlock(), vue.createElementBlock("div", null, [
20530
- vue.unref(label) ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_1$s, vue.toDisplayString(vue.unref(label)), 1)) : vue.createCommentVNode("", true),
20531
- vue.createElementVNode("div", {
20532
- class: "range-slider relative w-100",
20533
- dir: vue.unref(rtl) ? "rtl" : "ltr"
20534
- }, [
20529
+ return vue.openBlock(), vue.createElementBlock("div", {
20530
+ dir: vue.unref(rtl) ? "rtl" : "ltr"
20531
+ }, [
20532
+ vue.unref(label) ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$i, vue.toDisplayString(vue.unref(label)), 1)) : vue.createCommentVNode("", true),
20533
+ vue.createElementVNode("div", _hoisted_3$e, [
20535
20534
  vue.createElementVNode("input", {
20536
20535
  id: vue.unref(id),
20537
20536
  value: validFrom.value,
@@ -20544,7 +20543,7 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20544
20543
  disabled: vue.unref(disabled),
20545
20544
  "aria-label": vue.unref(multiRange) ? "Minimum value" : "Value",
20546
20545
  onInput: _cache[0] || (_cache[0] = (e) => handleInput(+e.target.value, true))
20547
- }, null, 40, _hoisted_3$e),
20546
+ }, null, 40, _hoisted_4$9),
20548
20547
  vue.unref(multiRange) ? (vue.openBlock(), vue.createElementBlock("input", {
20549
20548
  key: 0,
20550
20549
  value: validTo.value,
@@ -20557,8 +20556,8 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20557
20556
  disabled: vue.unref(disabled),
20558
20557
  "aria-label": "Maximum value",
20559
20558
  onInput: _cache[1] || (_cache[1] = (e) => handleInput(+e.target.value, false))
20560
- }, null, 40, _hoisted_4$9)) : vue.createCommentVNode("", true),
20561
- vue.createElementVNode("div", _hoisted_5$9, [
20559
+ }, null, 40, _hoisted_5$9)) : vue.createCommentVNode("", true),
20560
+ vue.createElementVNode("div", _hoisted_6$8, [
20562
20561
  vue.createElementVNode("div", {
20563
20562
  class: "active-range absolute h-100 pointer-events-none bg-primary",
20564
20563
  style: vue.normalizeStyle(rangeStyle.value)
@@ -20601,8 +20600,8 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20601
20600
  vue.createTextVNode(vue.toDisplayString(displayTo.value), 1)
20602
20601
  ], true)
20603
20602
  ], 4)) : vue.createCommentVNode("", true)
20604
- ], 8, _hoisted_2$i),
20605
- vue.createElementVNode("p", _hoisted_6$8, [
20603
+ ]),
20604
+ vue.createElementVNode("p", _hoisted_7$5, [
20606
20605
  vue.renderSlot(_ctx.$slots, "min", {
20607
20606
  max: vue.unref(formatValue)(vue.unref(max2)),
20608
20607
  min: vue.unref(formatValue)(vue.unref(min2)),
@@ -20622,11 +20621,11 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20622
20621
  vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(formatValue)(vue.unref(max2))), 1)
20623
20622
  ], true)
20624
20623
  ])
20625
- ]);
20624
+ ], 8, _hoisted_1$s);
20626
20625
  };
20627
20626
  }
20628
20627
  });
20629
- const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-36a4519c"]]);
20628
+ const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-5c90c7f5"]]);
20630
20629
  const tableTools = [
20631
20630
  "mergeCells",
20632
20631
  "splitCells",
@@ -34498,6 +34497,9 @@ function debounce(fn2, wait = 500) {
34498
34497
  }, wait);
34499
34498
  debouncers.set(fn2, timeout);
34500
34499
  }
34500
+ function slugify(str) {
34501
+ return str.toLowerCase().replace(/[^a-z0-9-\s]/g, "").split(/[\s-]+/).join("-");
34502
+ }
34501
34503
  function keyToLabel(key) {
34502
34504
  if (key === void 0) return key;
34503
34505
  return key.split("_").map((k2) => k2.charAt(0).toUpperCase() + k2.slice(1)).join(" ") || key;
@@ -35230,6 +35232,7 @@ exports.normalizeDimension = normalizeDimension;
35230
35232
  exports.normalizeURL = normalizeURL;
35231
35233
  exports.provideBagelFormState = provideBagelFormState;
35232
35234
  exports.sleep = sleep;
35235
+ exports.slugify = slugify;
35233
35236
  exports.timeAgo = timeAgo;
35234
35237
  exports.useBagel = useBagel;
35235
35238
  exports.useBagelFormState = useBagelFormState;
package/dist/index.mjs CHANGED
@@ -5843,7 +5843,7 @@ const _hoisted_4$2$1 = {
5843
5843
  };
5844
5844
  const _hoisted_5$2$1 = ["x1", "y1", "x2", "y2"];
5845
5845
  const _hoisted_6$2$1 = ["x1", "y1", "x2", "y2"];
5846
- const _hoisted_7$8 = ["x1", "y1", "x2", "y2"];
5846
+ const _hoisted_7$9 = ["x1", "y1", "x2", "y2"];
5847
5847
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
5848
5848
  return _ctx.data.length ? (openBlock(), createElementBlock("g", {
5849
5849
  key: 0,
@@ -5899,7 +5899,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
5899
5899
  y1: _ctx.canvas.y,
5900
5900
  x2: _ctx.canvas.width - 1,
5901
5901
  y2: _ctx.canvas.height
5902
- }, null, 8, _hoisted_7$8)
5902
+ }, null, 8, _hoisted_7$9)
5903
5903
  ])
5904
5904
  ], 8, _hoisted_1$4$1)) : createCommentVNode("v-if", true);
5905
5905
  }
@@ -7049,7 +7049,7 @@ const _hoisted_6$b = {
7049
7049
  key: 0,
7050
7050
  class: "data-row"
7051
7051
  };
7052
- const _hoisted_7$7 = { class: "key" };
7052
+ const _hoisted_7$8 = { class: "key" };
7053
7053
  const _hoisted_8$5 = { class: "m-0" };
7054
7054
  const _hoisted_9$4 = {
7055
7055
  key: 0,
@@ -7118,7 +7118,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7118
7118
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, ({ id, label }) => {
7119
7119
  return openBlock(), createElementBlock(Fragment, { key: id }, [
7120
7120
  !isUnset(itemData.value[id]) ? (openBlock(), createElementBlock("div", _hoisted_6$b, [
7121
- createElementVNode("div", _hoisted_7$7, [
7121
+ createElementVNode("div", _hoisted_7$8, [
7122
7122
  createElementVNode("p", _hoisted_8$5, toDisplayString(label), 1)
7123
7123
  ]),
7124
7124
  createElementVNode("div", null, [
@@ -10021,7 +10021,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10021
10021
  if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState == null ? void 0 : formState.data.value);
10022
10022
  return true;
10023
10023
  });
10024
- const computedFieldData = computed(
10024
+ computed(
10025
10025
  () => {
10026
10026
  var _a2, _b;
10027
10027
  return ((_b = (_a2 = props2.field).transform) == null ? void 0 : _b.call(_a2, fieldData.value, formState == null ? void 0 : formState.data.value)) ?? fieldData.value;
@@ -10062,7 +10062,6 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10062
10062
  schema: ((_a2 = _ctx.field.attrs) == null ? void 0 : _a2.schema) ?? void 0
10063
10063
  }), {
10064
10064
  default: withCtx(() => [
10065
- createTextVNode(toDisplayString(computedFieldData.value) + " ", 1),
10066
10065
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.children, (child, ii) => {
10067
10066
  return openBlock(), createElementBlock(Fragment, { key: ii }, [
10068
10067
  typeof child !== "string" ? (openBlock(), createBlock(_component_BglField, {
@@ -19493,7 +19492,7 @@ const _hoisted_6$a = {
19493
19492
  key: 0,
19494
19493
  class: "bgl-multi-preview"
19495
19494
  };
19496
- const _hoisted_7$6 = { class: "m-0" };
19495
+ const _hoisted_7$7 = { class: "m-0" };
19497
19496
  const _hoisted_8$4 = { class: "no-margin multi-preview-txt" };
19498
19497
  const _hoisted_9$3 = {
19499
19498
  key: 0,
@@ -19795,7 +19794,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
19795
19794
  icon: "draft",
19796
19795
  class: "multi-preview"
19797
19796
  })),
19798
- createElementVNode("p", _hoisted_7$6, toDisplayString(file.name), 1),
19797
+ createElementVNode("p", _hoisted_7$7, toDisplayString(file.name), 1),
19799
19798
  createVNode(unref(Btn), {
19800
19799
  thin: "",
19801
19800
  flat: "",
@@ -20311,7 +20310,7 @@ const _hoisted_6$9 = {
20311
20310
  key: 0,
20312
20311
  class: "m-0 m_txt-14"
20313
20312
  };
20314
- const _hoisted_7$5 = {
20313
+ const _hoisted_7$6 = {
20315
20314
  key: 1,
20316
20315
  class: "txt-gray txt-12 m-0"
20317
20316
  };
@@ -20358,7 +20357,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
20358
20357
  }, null, 8, _hoisted_4$b)) : createCommentVNode("", true),
20359
20358
  createElementVNode("div", _hoisted_5$b, [
20360
20359
  opt.label ? (openBlock(), createElementBlock("p", _hoisted_6$9, toDisplayString(opt.label), 1)) : createCommentVNode("", true),
20361
- opt.subLabel ? (openBlock(), createElementBlock("p", _hoisted_7$5, toDisplayString(opt.subLabel), 1)) : createCommentVNode("", true)
20360
+ opt.subLabel ? (openBlock(), createElementBlock("p", _hoisted_7$6, toDisplayString(opt.subLabel), 1)) : createCommentVNode("", true)
20362
20361
  ]),
20363
20362
  renderSlot(_ctx.$slots, "radioItem", mergeProps({ ref_for: true }, opt), void 0, true)
20364
20363
  ]),
@@ -20450,15 +20449,16 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
20450
20449
  }
20451
20450
  });
20452
20451
  const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-cf892d71"]]);
20453
- const _hoisted_1$s = {
20452
+ const _hoisted_1$s = ["dir"];
20453
+ const _hoisted_2$i = {
20454
20454
  key: 0,
20455
20455
  class: "label"
20456
20456
  };
20457
- const _hoisted_2$i = ["dir"];
20458
- const _hoisted_3$e = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
20459
- const _hoisted_4$9 = ["value", "min", "max", "step", "required", "disabled"];
20460
- const _hoisted_5$9 = { class: "track absolute pointer-events-none overflow-hidden round" };
20461
- const _hoisted_6$8 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
20457
+ const _hoisted_3$e = { class: "range-slider relative w-100" };
20458
+ const _hoisted_4$9 = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
20459
+ const _hoisted_5$9 = ["value", "min", "max", "step", "required", "disabled"];
20460
+ const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
20461
+ const _hoisted_7$5 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
20462
20462
  const _sfc_main$A = /* @__PURE__ */ defineComponent({
20463
20463
  __name: "RangeInput",
20464
20464
  props: {
@@ -20524,12 +20524,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20524
20524
  const displayFrom = computed(() => formatValue(validFrom.value));
20525
20525
  const displayTo = computed(() => formatValue(validTo.value));
20526
20526
  return (_ctx, _cache) => {
20527
- return openBlock(), createElementBlock("div", null, [
20528
- unref(label) ? (openBlock(), createElementBlock("label", _hoisted_1$s, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
20529
- createElementVNode("div", {
20530
- class: "range-slider relative w-100",
20531
- dir: unref(rtl) ? "rtl" : "ltr"
20532
- }, [
20527
+ return openBlock(), createElementBlock("div", {
20528
+ dir: unref(rtl) ? "rtl" : "ltr"
20529
+ }, [
20530
+ unref(label) ? (openBlock(), createElementBlock("label", _hoisted_2$i, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
20531
+ createElementVNode("div", _hoisted_3$e, [
20533
20532
  createElementVNode("input", {
20534
20533
  id: unref(id),
20535
20534
  value: validFrom.value,
@@ -20542,7 +20541,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20542
20541
  disabled: unref(disabled),
20543
20542
  "aria-label": unref(multiRange) ? "Minimum value" : "Value",
20544
20543
  onInput: _cache[0] || (_cache[0] = (e) => handleInput(+e.target.value, true))
20545
- }, null, 40, _hoisted_3$e),
20544
+ }, null, 40, _hoisted_4$9),
20546
20545
  unref(multiRange) ? (openBlock(), createElementBlock("input", {
20547
20546
  key: 0,
20548
20547
  value: validTo.value,
@@ -20555,8 +20554,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20555
20554
  disabled: unref(disabled),
20556
20555
  "aria-label": "Maximum value",
20557
20556
  onInput: _cache[1] || (_cache[1] = (e) => handleInput(+e.target.value, false))
20558
- }, null, 40, _hoisted_4$9)) : createCommentVNode("", true),
20559
- createElementVNode("div", _hoisted_5$9, [
20557
+ }, null, 40, _hoisted_5$9)) : createCommentVNode("", true),
20558
+ createElementVNode("div", _hoisted_6$8, [
20560
20559
  createElementVNode("div", {
20561
20560
  class: "active-range absolute h-100 pointer-events-none bg-primary",
20562
20561
  style: normalizeStyle(rangeStyle.value)
@@ -20599,8 +20598,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20599
20598
  createTextVNode(toDisplayString(displayTo.value), 1)
20600
20599
  ], true)
20601
20600
  ], 4)) : createCommentVNode("", true)
20602
- ], 8, _hoisted_2$i),
20603
- createElementVNode("p", _hoisted_6$8, [
20601
+ ]),
20602
+ createElementVNode("p", _hoisted_7$5, [
20604
20603
  renderSlot(_ctx.$slots, "min", {
20605
20604
  max: unref(formatValue)(unref(max2)),
20606
20605
  min: unref(formatValue)(unref(min2)),
@@ -20620,11 +20619,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20620
20619
  createElementVNode("span", null, toDisplayString(unref(formatValue)(unref(max2))), 1)
20621
20620
  ], true)
20622
20621
  ])
20623
- ]);
20622
+ ], 8, _hoisted_1$s);
20624
20623
  };
20625
20624
  }
20626
20625
  });
20627
- const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-36a4519c"]]);
20626
+ const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-5c90c7f5"]]);
20628
20627
  const tableTools = [
20629
20628
  "mergeCells",
20630
20629
  "splitCells",
@@ -34496,6 +34495,9 @@ function debounce(fn2, wait = 500) {
34496
34495
  }, wait);
34497
34496
  debouncers.set(fn2, timeout);
34498
34497
  }
34498
+ function slugify(str) {
34499
+ return str.toLowerCase().replace(/[^a-z0-9-\s]/g, "").split(/[\s-]+/).join("-");
34500
+ }
34499
34501
  function keyToLabel(key) {
34500
34502
  if (key === void 0) return key;
34501
34503
  return key.split("_").map((k2) => k2.charAt(0).toUpperCase() + k2.slice(1)).join(" ") || key;
@@ -35229,6 +35231,7 @@ export {
35229
35231
  normalizeURL,
35230
35232
  provideBagelFormState,
35231
35233
  sleep,
35234
+ slugify,
35232
35235
  timeAgo,
35233
35236
  useBagel,
35234
35237
  useBagelFormState,
package/dist/style.css CHANGED
@@ -1180,28 +1180,28 @@ pre code.hljs{
1180
1180
  color: var(--bgl-light-text);
1181
1181
  }
1182
1182
 
1183
- .range-slider-position-txt[data-v-36a4519c]{
1183
+ .range-slider-position-txt[data-v-5c90c7f5]{
1184
1184
  margin-inline-start: calc((var(--progress) * 1%) - (var(--bgl-range-thumb-size) * var(--progress) / 100));
1185
1185
  top: calc(var(--bgl-range-thumb-size) / 2 ) ;
1186
1186
  transition: transform 0.1s, opacity 0.5s, top 0.5s;
1187
1187
  transform: scale(0.5);
1188
1188
  width: var(--bgl-range-thumb-size);
1189
1189
  }
1190
- .range-slider:hover .range-slider-position-txt[data-v-36a4519c]{
1190
+ .range-slider:hover .range-slider-position-txt[data-v-5c90c7f5]{
1191
1191
  opacity: 1;
1192
1192
  transform: scale(1);
1193
1193
  top: calc(var(--bgl-range-thumb-size) / 1) ;
1194
1194
  }
1195
- .range-slider[data-v-36a4519c] {
1195
+ .range-slider[data-v-5c90c7f5] {
1196
1196
  height: var(--bgl-range-track-size);
1197
1197
  display: flex;
1198
1198
  align-items: center;
1199
1199
  margin-top: calc(var(--bgl-range-thumb-size) / 2 + 0.5rem) ;
1200
1200
  }
1201
- .range-slider-txt[data-v-36a4519c]{
1201
+ .range-slider-txt[data-v-5c90c7f5]{
1202
1202
  margin-top: calc(var(--bgl-range-thumb-size) / 2) !important;
1203
1203
  }
1204
- input[type="range"][data-v-36a4519c] {
1204
+ input[type="range"][data-v-5c90c7f5] {
1205
1205
  position: absolute;
1206
1206
  width: 100%;
1207
1207
  height: 100%;
@@ -1211,7 +1211,7 @@ input[type="range"][data-v-36a4519c] {
1211
1211
  appearance: none;
1212
1212
  margin: 0;
1213
1213
  }
1214
- input[type="range"][data-v-36a4519c]::-webkit-slider-thumb {
1214
+ input[type="range"][data-v-5c90c7f5]::-webkit-slider-thumb {
1215
1215
  pointer-events: all;
1216
1216
  appearance: none;
1217
1217
  width: var(--bgl-range-thumb-size);
@@ -1224,18 +1224,18 @@ input[type="range"][data-v-36a4519c]::-webkit-slider-thumb {
1224
1224
  cursor: grab;
1225
1225
  transition: var(--bgl-transition);
1226
1226
  }
1227
- input[type="range"][data-v-36a4519c]::-webkit-slider-thumb:hover {
1227
+ input[type="range"][data-v-5c90c7f5]::-webkit-slider-thumb:hover {
1228
1228
  box-shadow: 0 0 0 calc(var(--bgl-range-thumb-size) / 2) var(--bgl-primary-tint);
1229
1229
  filter: brightness(90%);
1230
1230
  }
1231
- input[type="range"][data-v-36a4519c]:focus::-webkit-slider-thumb {
1231
+ input[type="range"][data-v-5c90c7f5]:focus::-webkit-slider-thumb {
1232
1232
  outline: none;
1233
1233
  box-shadow: 0 0 0 calc(var(--bgl-range-thumb-size) / 2.2) var(--bgl-primary-tint);
1234
1234
  }
1235
- input[type="range"][data-v-36a4519c]:active::-webkit-slider-thumb {
1235
+ input[type="range"][data-v-5c90c7f5]:active::-webkit-slider-thumb {
1236
1236
  cursor: grabbing;
1237
1237
  }
1238
- .track[data-v-36a4519c] {
1238
+ .track[data-v-5c90c7f5] {
1239
1239
  height: var(--bgl-range-track-height);
1240
1240
  background: var(--bgl-bg);
1241
1241
  margin-inline-start: calc(var(--bgl-range-thumb-size) / 2);
@@ -1,5 +1,6 @@
1
1
  import { Attributes, BglFormSchemaT } from '..';
2
2
  export declare function debounce(fn: () => void, wait?: number): void;
3
+ export declare function slugify(str: string): string;
3
4
  export declare function keyToLabel(key?: string): string | undefined;
4
5
  export declare function copyText(text: string, cb?: (msg: string) => void): Promise<void>;
5
6
  export declare function initials(...strArr: string[]): string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAI/D,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,IAAI,GAAE,MAAY,QAO1D;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ3D;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,iBAGtE;AAED,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,UAG3C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,QAIrE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,UAOpE;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EACnD,KAAK,CAAC,EAAE,UAAU,EAClB,QAAQ,CAAC,EAAE,GAAG,EACd,GAAG,CAAC,EAAE,CAAC,OAcP;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,OAO9C;AAED,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,OAAO,CAAC,EAAE,MA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B,YAAY,CAAC,GAAG,EAAE,MAAM,UAIvC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,aAAa,SAAO,GAAG,MAAM,GAAG,SAAS,CAG/G;AAED,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1056",
4
+ "version": "0.0.1060",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -123,7 +123,6 @@ const computedClass = $computed(
123
123
  :helptext="field.helptext"
124
124
  :schema="field.attrs?.schema ?? undefined"
125
125
  >
126
- {{ computedFieldData }}
127
126
  <template v-for="(child, ii) in field.children" :key="ii">
128
127
  <BglField
129
128
  v-if="(typeof child !== 'string')"
@@ -75,9 +75,9 @@ const displayTo = $computed(() => formatValue(validTo))
75
75
  </script>
76
76
 
77
77
  <template>
78
- <div>
78
+ <div :dir="rtl ? 'rtl' : 'ltr'">
79
79
  <label v-if="label" class="label">{{ label }}</label>
80
- <div class="range-slider relative w-100" :dir="rtl ? 'rtl' : 'ltr'">
80
+ <div class="range-slider relative w-100">
81
81
  <input
82
82
  :id="id"
83
83
  :value="validFrom"
@@ -11,6 +11,14 @@ export function debounce(fn: () => void, wait: number = 500) {
11
11
  debouncers.set(fn, timeout)
12
12
  }
13
13
 
14
+ export function slugify(str: string) {
15
+ return str
16
+ .toLowerCase()
17
+ .replace(/[^a-z0-9-\s]/g, '')
18
+ .split(/[\s-]+/)
19
+ .join('-')
20
+ }
21
+
14
22
  export function keyToLabel(key?: string): string | undefined {
15
23
  if (key === undefined) return key
16
24
  return (