@bagelink/vue 1.0.43 → 1.0.47

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,5 +1,5 @@
1
1
  import { AttributeFn, AttributeValue, Attributes, BagelFieldOptions, BglFormSchemaFnT, Field } from '../..';
2
- declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2
+ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
4
  readonly "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
5
5
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & {
@@ -18,8 +18,9 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
18
18
  add?: boolean;
19
19
  delete?: boolean;
20
20
  transform?: (value: T) => T;
21
- schema: BglFormSchemaFnT;
21
+ schema?: BglFormSchemaFnT;
22
22
  modelValue: T[];
23
+ type?: "object" | "number" | "text";
23
24
  } & Partial<{}>> & import('vue').PublicProps;
24
25
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
25
26
  attrs: any;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldArray.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/FieldArray.vue"],"names":[],"mappings":"AAgOA,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,UAAU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function arrField(id, label, schema, options) {
15161
+ function arrField(id, label, schemaOrType, options) {
15162
+ const attrs = { delete: true, add: true, ...options };
15163
+ if (typeof schemaOrType === "string") attrs.type = schemaOrType;
15164
+ else attrs.schema = schemaOrType;
15162
15165
  return {
15163
15166
  label,
15164
15167
  id,
15165
15168
  $el: "array",
15166
15169
  vIf: options == null ? void 0 : options.vIf,
15167
- attrs: { schema, delete: true, add: true, ...options }
15170
+ attrs
15168
15171
  };
15169
15172
  }
15170
15173
  const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -15543,18 +15546,18 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
15543
15546
  };
15544
15547
  }
15545
15548
  });
15546
- const _hoisted_1$L = { class: "label mb-05" };
15547
- const _hoisted_2$y = {
15549
+ const _hoisted_1$L = {
15548
15550
  key: 0,
15549
- class: "ps-025 border-start mb-05"
15551
+ class: "label mb-05"
15550
15552
  };
15553
+ const _hoisted_2$y = { class: "ps-025 border-start mb-05" };
15551
15554
  const _hoisted_3$t = {
15552
15555
  key: 0,
15553
15556
  class: "flex-center h-300px"
15554
15557
  };
15555
15558
  const _hoisted_4$j = {
15556
15559
  key: 1,
15557
- class: "flex-center h-300px txt-red"
15560
+ class: "py-1"
15558
15561
  };
15559
15562
  const _hoisted_5$i = {
15560
15563
  key: 0,
@@ -15580,7 +15583,8 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15580
15583
  delete: { type: Boolean, default: true },
15581
15584
  transform: {},
15582
15585
  schema: {},
15583
- modelValue: {}
15586
+ modelValue: {},
15587
+ type: { default: "object" }
15584
15588
  },
15585
15589
  emits: ["update:modelValue"],
15586
15590
  setup(__props, { emit: __emit }) {
@@ -15590,7 +15594,23 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15590
15594
  const internalData = vue.ref(props2.modelValue || []);
15591
15595
  const schemaState = vue.ref("loaded");
15592
15596
  const resolvedSchemaData = vue.ref([]);
15597
+ vue.watch(() => props2.modelValue, (newValue) => {
15598
+ internalData.value = newValue || [];
15599
+ }, { deep: true });
15600
+ const primitiveSchema = vue.computed(() => {
15601
+ if (props2.type === "text") {
15602
+ return [{ id: "value", type: "text", label: "" }];
15603
+ } else if (props2.type === "number") {
15604
+ return [{ id: "value", type: "number", label: "" }];
15605
+ }
15606
+ return [];
15607
+ });
15593
15608
  async function resolveSchema() {
15609
+ if (props2.type !== "object") {
15610
+ resolvedSchemaData.value = primitiveSchema.value;
15611
+ schemaState.value = "loaded";
15612
+ return;
15613
+ }
15594
15614
  if (!props2.schema) {
15595
15615
  resolvedSchemaData.value = [];
15596
15616
  schemaState.value = "loaded";
@@ -15614,9 +15634,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15614
15634
  resolvedSchemaData.value = [];
15615
15635
  }
15616
15636
  }
15617
- vue.onMounted(() => {
15618
- resolveSchema();
15619
- });
15637
+ vue.onMounted(resolveSchema);
15620
15638
  function emitValue() {
15621
15639
  emit2("update:modelValue", internalData.value);
15622
15640
  }
@@ -15625,25 +15643,46 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15625
15643
  emitValue();
15626
15644
  }
15627
15645
  function addItem() {
15628
- internalData.value.push({});
15646
+ const defaultValues = {
15647
+ text: "",
15648
+ number: 0,
15649
+ object: {}
15650
+ };
15651
+ internalData.value.push(defaultValues[props2.type]);
15629
15652
  emitValue();
15630
15653
  }
15631
15654
  function toggleMinimized(index2) {
15632
15655
  minimizedItems.value[index2] = !minimizedItems.value[index2];
15633
15656
  }
15634
15657
  function updateItem(index2, value) {
15635
- internalData.value[index2] = value;
15658
+ if (props2.type === "text" || props2.type === "number") {
15659
+ internalData.value[index2] = props2.type === "number" ? Number(value.value) : value.value;
15660
+ } else {
15661
+ internalData.value[index2] = value;
15662
+ }
15636
15663
  emitValue();
15637
15664
  }
15665
+ const isPrimitiveType = vue.computed(() => props2.type === "text" || props2.type === "number");
15666
+ const canRenderItems = vue.computed(
15667
+ () => isPrimitiveType.value || props2.type === "object" && resolvedSchemaData.value.length > 0
15668
+ );
15669
+ const showMinimizeButton = vue.computed(() => resolvedSchemaData.value.length > 4);
15638
15670
  return (_ctx, _cache) => {
15671
+ const _component_Icon = vue.resolveComponent("Icon");
15639
15672
  return vue.openBlock(), vue.createElementBlock("div", {
15640
15673
  class: vue.normalizeClass(props2.class)
15641
15674
  }, [
15642
- vue.createElementVNode("p", _hoisted_1$L, vue.toDisplayString(_ctx.label), 1),
15643
- resolvedSchemaData.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, [
15644
- schemaState.value === "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$t, [
15645
- vue.createVNode(vue.unref(Loading))
15646
- ])) : schemaState.value === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$j, " Error ")) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
15675
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_1$L, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
15676
+ vue.createElementVNode("div", _hoisted_2$y, [
15677
+ schemaState.value !== "loaded" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$t, [
15678
+ schemaState.value === "loading" ? (vue.openBlock(), vue.createBlock(vue.unref(Loading), { key: 0 })) : schemaState.value === "error" ? (vue.openBlock(), vue.createBlock(_component_Icon, {
15679
+ key: 1,
15680
+ icon: "error",
15681
+ color: "red"
15682
+ })) : vue.createCommentVNode("", true)
15683
+ ])) : !canRenderItems.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$j, _cache[0] || (_cache[0] = [
15684
+ vue.createElementVNode("p", { class: "opacity-7" }, " No schema available ", -1)
15685
+ ]))) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
15647
15686
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(internalData.value, (item, i2) => {
15648
15687
  return vue.openBlock(), vue.createElementBlock("div", {
15649
15688
  key: i2,
@@ -15653,12 +15692,12 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15653
15692
  }, [
15654
15693
  minimizedItems.value[i2] ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$i, vue.toDisplayString(_ctx.label) + " " + vue.toDisplayString(i2 + 1), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$T), {
15655
15694
  key: 1,
15656
- "model-value": item,
15695
+ "model-value": isPrimitiveType.value ? { value: item } : item,
15657
15696
  schema: resolvedSchemaData.value,
15658
15697
  "onUpdate:modelValue": (val) => updateItem(i2, val)
15659
15698
  }, null, 8, ["model-value", "schema", "onUpdate:modelValue"])),
15660
15699
  vue.createElementVNode("div", _hoisted_6$f, [
15661
- resolvedSchemaData.value.length > 4 ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15700
+ showMinimizeButton.value ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15662
15701
  key: 0,
15663
15702
  class: "block rotate-180 txt10 opacity-7 p-025",
15664
15703
  flat: "",
@@ -15691,11 +15730,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15691
15730
  _: 1
15692
15731
  })) : vue.createCommentVNode("", true)
15693
15732
  ], 64))
15694
- ])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(internalData.value, (_2, i2) => {
15695
- return vue.openBlock(), vue.createElementBlock("div", { key: i2 }, _cache[0] || (_cache[0] = [
15696
- vue.createElementVNode("p", null, "No schema available", -1)
15697
- ]));
15698
- }), 128))
15733
+ ])
15699
15734
  ], 2);
15700
15735
  };
15701
15736
  }
package/dist/index.mjs CHANGED
@@ -15156,13 +15156,16 @@ function findBglFieldById(id, _schema) {
15156
15156
  }
15157
15157
  return void 0;
15158
15158
  }
15159
- function arrField(id, label, schema, options) {
15159
+ function arrField(id, label, schemaOrType, options) {
15160
+ const attrs = { delete: true, add: true, ...options };
15161
+ if (typeof schemaOrType === "string") attrs.type = schemaOrType;
15162
+ else attrs.schema = schemaOrType;
15160
15163
  return {
15161
15164
  label,
15162
15165
  id,
15163
15166
  $el: "array",
15164
15167
  vIf: options == null ? void 0 : options.vIf,
15165
- attrs: { schema, delete: true, add: true, ...options }
15168
+ attrs
15166
15169
  };
15167
15170
  }
15168
15171
  const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -15541,18 +15544,18 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
15541
15544
  };
15542
15545
  }
15543
15546
  });
15544
- const _hoisted_1$L = { class: "label mb-05" };
15545
- const _hoisted_2$y = {
15547
+ const _hoisted_1$L = {
15546
15548
  key: 0,
15547
- class: "ps-025 border-start mb-05"
15549
+ class: "label mb-05"
15548
15550
  };
15551
+ const _hoisted_2$y = { class: "ps-025 border-start mb-05" };
15549
15552
  const _hoisted_3$t = {
15550
15553
  key: 0,
15551
15554
  class: "flex-center h-300px"
15552
15555
  };
15553
15556
  const _hoisted_4$j = {
15554
15557
  key: 1,
15555
- class: "flex-center h-300px txt-red"
15558
+ class: "py-1"
15556
15559
  };
15557
15560
  const _hoisted_5$i = {
15558
15561
  key: 0,
@@ -15578,7 +15581,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15578
15581
  delete: { type: Boolean, default: true },
15579
15582
  transform: {},
15580
15583
  schema: {},
15581
- modelValue: {}
15584
+ modelValue: {},
15585
+ type: { default: "object" }
15582
15586
  },
15583
15587
  emits: ["update:modelValue"],
15584
15588
  setup(__props, { emit: __emit }) {
@@ -15588,7 +15592,23 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15588
15592
  const internalData = ref(props2.modelValue || []);
15589
15593
  const schemaState = ref("loaded");
15590
15594
  const resolvedSchemaData = ref([]);
15595
+ watch(() => props2.modelValue, (newValue) => {
15596
+ internalData.value = newValue || [];
15597
+ }, { deep: true });
15598
+ const primitiveSchema = computed(() => {
15599
+ if (props2.type === "text") {
15600
+ return [{ id: "value", type: "text", label: "" }];
15601
+ } else if (props2.type === "number") {
15602
+ return [{ id: "value", type: "number", label: "" }];
15603
+ }
15604
+ return [];
15605
+ });
15591
15606
  async function resolveSchema() {
15607
+ if (props2.type !== "object") {
15608
+ resolvedSchemaData.value = primitiveSchema.value;
15609
+ schemaState.value = "loaded";
15610
+ return;
15611
+ }
15592
15612
  if (!props2.schema) {
15593
15613
  resolvedSchemaData.value = [];
15594
15614
  schemaState.value = "loaded";
@@ -15612,9 +15632,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15612
15632
  resolvedSchemaData.value = [];
15613
15633
  }
15614
15634
  }
15615
- onMounted(() => {
15616
- resolveSchema();
15617
- });
15635
+ onMounted(resolveSchema);
15618
15636
  function emitValue() {
15619
15637
  emit2("update:modelValue", internalData.value);
15620
15638
  }
@@ -15623,25 +15641,46 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15623
15641
  emitValue();
15624
15642
  }
15625
15643
  function addItem() {
15626
- internalData.value.push({});
15644
+ const defaultValues = {
15645
+ text: "",
15646
+ number: 0,
15647
+ object: {}
15648
+ };
15649
+ internalData.value.push(defaultValues[props2.type]);
15627
15650
  emitValue();
15628
15651
  }
15629
15652
  function toggleMinimized(index2) {
15630
15653
  minimizedItems.value[index2] = !minimizedItems.value[index2];
15631
15654
  }
15632
15655
  function updateItem(index2, value) {
15633
- internalData.value[index2] = value;
15656
+ if (props2.type === "text" || props2.type === "number") {
15657
+ internalData.value[index2] = props2.type === "number" ? Number(value.value) : value.value;
15658
+ } else {
15659
+ internalData.value[index2] = value;
15660
+ }
15634
15661
  emitValue();
15635
15662
  }
15663
+ const isPrimitiveType = computed(() => props2.type === "text" || props2.type === "number");
15664
+ const canRenderItems = computed(
15665
+ () => isPrimitiveType.value || props2.type === "object" && resolvedSchemaData.value.length > 0
15666
+ );
15667
+ const showMinimizeButton = computed(() => resolvedSchemaData.value.length > 4);
15636
15668
  return (_ctx, _cache) => {
15669
+ const _component_Icon = resolveComponent("Icon");
15637
15670
  return openBlock(), createElementBlock("div", {
15638
15671
  class: normalizeClass(props2.class)
15639
15672
  }, [
15640
- createElementVNode("p", _hoisted_1$L, toDisplayString(_ctx.label), 1),
15641
- resolvedSchemaData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
15642
- schemaState.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
15643
- createVNode(unref(Loading))
15644
- ])) : schemaState.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_4$j, " Error ")) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
15673
+ _ctx.label ? (openBlock(), createElementBlock("p", _hoisted_1$L, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
15674
+ createElementVNode("div", _hoisted_2$y, [
15675
+ schemaState.value !== "loaded" ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
15676
+ schemaState.value === "loading" ? (openBlock(), createBlock(unref(Loading), { key: 0 })) : schemaState.value === "error" ? (openBlock(), createBlock(_component_Icon, {
15677
+ key: 1,
15678
+ icon: "error",
15679
+ color: "red"
15680
+ })) : createCommentVNode("", true)
15681
+ ])) : !canRenderItems.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, _cache[0] || (_cache[0] = [
15682
+ createElementVNode("p", { class: "opacity-7" }, " No schema available ", -1)
15683
+ ]))) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
15645
15684
  (openBlock(true), createElementBlock(Fragment, null, renderList(internalData.value, (item, i2) => {
15646
15685
  return openBlock(), createElementBlock("div", {
15647
15686
  key: i2,
@@ -15651,12 +15690,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15651
15690
  }, [
15652
15691
  minimizedItems.value[i2] ? (openBlock(), createElementBlock("p", _hoisted_5$i, toDisplayString(_ctx.label) + " " + toDisplayString(i2 + 1), 1)) : (openBlock(), createBlock(unref(_sfc_main$T), {
15653
15692
  key: 1,
15654
- "model-value": item,
15693
+ "model-value": isPrimitiveType.value ? { value: item } : item,
15655
15694
  schema: resolvedSchemaData.value,
15656
15695
  "onUpdate:modelValue": (val) => updateItem(i2, val)
15657
15696
  }, null, 8, ["model-value", "schema", "onUpdate:modelValue"])),
15658
15697
  createElementVNode("div", _hoisted_6$f, [
15659
- resolvedSchemaData.value.length > 4 ? (openBlock(), createBlock(unref(Btn), {
15698
+ showMinimizeButton.value ? (openBlock(), createBlock(unref(Btn), {
15660
15699
  key: 0,
15661
15700
  class: "block rotate-180 txt10 opacity-7 p-025",
15662
15701
  flat: "",
@@ -15689,11 +15728,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15689
15728
  _: 1
15690
15729
  })) : createCommentVNode("", true)
15691
15730
  ], 64))
15692
- ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(internalData.value, (_2, i2) => {
15693
- return openBlock(), createElementBlock("div", { key: i2 }, _cache[0] || (_cache[0] = [
15694
- createElementVNode("p", null, "No schema available", -1)
15695
- ]));
15696
- }), 128))
15731
+ ])
15697
15732
  ], 2);
15698
15733
  };
15699
15734
  }