@bagelink/vue 0.0.963 → 0.0.965

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":"TableSchema.vue.d.ts","sourceRoot":"","sources":["../../src/components/TableSchema.vue"],"names":[],"mappings":"AAwjBA,OAAO,EAEN,KAAK,cAAc,EAKnB,MAAM,eAAe,CAAA;AAItB,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,CAAA;AAC5C,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,IAAI,eAAe,EAAE,CAAA;yBAGtC,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;WAobxD,mBAAmB,CAAC;;;;;;;;;;wBAvNZ,MAAM,EAAE;;cAzNnB,CAAC,EAAE;iBACA,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC;qBACzC,MAAM,EAAE;wBACL,OAAO;qBACV,OAAO;4BACA,MAAM,IAAI;MA2awD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;;UArDuE,GAAG;UAuD9E;0BAxNS,CAAC,OAAO,SAAiC,CAAC;6BACvC,CAAC,UAAU,QAAoC,CAAC;gCAC7C,CAAC,aAAa,EAAC,MAAM,EAAE,CAAC;KAsNL;OAG/B,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,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,CAAC;KAsNL;OAG/B,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA/bzE,wBA+b4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -15,6 +15,7 @@ declare let __VLS_typeProps: {
15
15
  theme?: 'dropzone' | 'basic';
16
16
  accept?: string;
17
17
  required?: boolean;
18
+ disabled?: boolean;
18
19
  };
19
20
  declare function browse(): void;
20
21
  declare const __VLS_defaults: {
@@ -1 +1 @@
1
- {"version":3,"file":"FileUpload.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/FileUpload.vue"],"names":[],"mappings":"AAomBA,OAAO,EAAmC,KAAK,WAAW,EAAkB,MAAM,eAAe,CAAA;AAKjG,KAAK,MAAM,GAAG,MAAM,WAAW,CAAA;AAE/B,KAAK,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;AAEzC,QAAA,IAAI,eAAe,EAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,CAAA;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CA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main$D = /* @__PURE__ */ vue.defineComponent({
18728
18728
  label: {},
18729
18729
  multiple: { type: Boolean },
18730
18730
  files: {},
18731
- bindkey: {},
18731
+ bindkey: { default: "id" },
18732
18732
  modelValue: {},
18733
18733
  width: {},
18734
- height: {},
18734
+ height: { default: "215px" },
18735
18735
  topic: {},
18736
18736
  fill: { type: Boolean },
18737
18737
  oval: { type: Boolean },
18738
- theme: {},
18739
- accept: {},
18740
- required: { type: Boolean }
18738
+ theme: { default: "dropzone" },
18739
+ accept: { default: "*" },
18740
+ required: { type: Boolean },
18741
+ disabled: { type: Boolean }
18741
18742
  }, {
18742
- "modelValue": { default: () => [] },
18743
+ "modelValue": {
18744
+ default: () => []
18745
+ },
18743
18746
  "modelModifiers": {}
18744
18747
  }),
18745
18748
  emits: /* @__PURE__ */ vue.mergeModels(["update:modelValue", "addFileStart"], ["update:modelValue"]),
18746
18749
  setup(__props, { emit: __emit }) {
18747
- const props2 = __props;
18748
18750
  const emit2 = __emit;
18749
- const bindKey2 = props2.bindkey || "id";
18751
+ const bindKey2 = __props.bindkey;
18750
18752
  const bagel = useBagel();
18751
18753
  const isImage = (str) => IMAGE_FORMATS_REGEXP.test(str);
18752
18754
  const file_bindkeys = vue.useModel(__props, "modelValue");
18753
18755
  const storageFiles = vue.ref([]);
18754
18756
  async function fetchTopicFiles() {
18755
- const files = await bagel.get(`/files?topic=${props2.topic}`);
18757
+ const files = await bagel.get(`/files?topic=${__props.topic}`);
18756
18758
  storageFiles.value.push(...files);
18757
18759
  }
18758
18760
  function loadFiles() {
@@ -18763,7 +18765,9 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18763
18765
  }
18764
18766
  const currentIds = storageFiles.value.map((file) => file[bindKey2]);
18765
18767
  const idsToAdd = ids.filter((id) => !currentIds.includes(id));
18766
- const idsToRemove = currentIds.filter((id) => (typeof id === "string" || typeof id === "number") && !ids.includes(id));
18768
+ const idsToRemove = currentIds.filter(
18769
+ (id) => (typeof id === "string" || typeof id === "number") && !ids.includes(id)
18770
+ );
18767
18771
  idsToRemove.forEach((id) => {
18768
18772
  const index2 = storageFiles.value.findIndex((file) => file[bindKey2] === id);
18769
18773
  if (index2 !== -1) storageFiles.value.splice(index2, 1);
@@ -18774,7 +18778,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18774
18778
  });
18775
18779
  return;
18776
18780
  }
18777
- if (props2.multiple) {
18781
+ if (__props.multiple) {
18778
18782
  idsToAdd.forEach((id) => {
18779
18783
  void bagel.get(`/files/${id}`).then((file) => {
18780
18784
  storageFiles.value.push(file);
@@ -18787,15 +18791,15 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18787
18791
  }
18788
18792
  }
18789
18793
  vue.onMounted(() => {
18790
- if (props2.topic) fetchTopicFiles();
18791
- if (!props2.files && [file_bindkeys.value].flat().length > 0) {
18794
+ if (__props.topic) fetchTopicFiles();
18795
+ if (!__props.files && [file_bindkeys.value].flat().length > 0) {
18792
18796
  loadFiles();
18793
18797
  }
18794
18798
  });
18795
- vue.watch(() => props2.topic, fetchTopicFiles);
18796
- vue.watch(() => props2.modelValue, loadFiles);
18799
+ vue.watch(() => __props.topic, fetchTopicFiles);
18800
+ vue.watch(() => __props.modelValue, loadFiles);
18797
18801
  vue.watch(
18798
- () => props2.files,
18802
+ () => __props.files,
18799
18803
  (newFiles) => {
18800
18804
  if (newFiles) {
18801
18805
  const filesToAdd = [newFiles].flat().filter((f2) => !storageFiles.value.some((sf) => sf[bindKey2] === f2[bindKey2]));
@@ -18806,13 +18810,12 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18806
18810
  },
18807
18811
  { immediate: true }
18808
18812
  );
18809
- const theme = props2.theme || "dropzone";
18810
18813
  function compareLists(a2, b2) {
18811
18814
  return [a2].flat().every((id) => [b2].flat().includes(id)) && [b2].flat().every((id) => [a2].flat().includes(id));
18812
18815
  }
18813
18816
  function updateModelValue() {
18814
18817
  let idValue;
18815
- if (props2.multiple) {
18818
+ if (__props.multiple) {
18816
18819
  idValue = storageFiles.value.map((f2) => f2[bindKey2]);
18817
18820
  } else {
18818
18821
  idValue = storageFiles.value[0][bindKey2] || "";
@@ -18839,10 +18842,10 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18839
18842
  emit2("addFileStart");
18840
18843
  for (const file of fileQueue.value) {
18841
18844
  file.uploading = true;
18842
- if (!props2.multiple) storageFiles.value.splice(0, 1);
18845
+ if (!__props.multiple) storageFiles.value.splice(0, 1);
18843
18846
  const serverFile = await bagel.uploadFile(file.file, {
18844
18847
  onUploadProgress: (e) => file.progress = e.progress * 100 - 1,
18845
- topic: props2.topic
18848
+ topic: __props.topic
18846
18849
  });
18847
18850
  storageFiles.value.push(serverFile);
18848
18851
  }
@@ -18850,10 +18853,11 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18850
18853
  updateModelValue();
18851
18854
  }
18852
18855
  function browse() {
18856
+ if (__props.disabled) return;
18853
18857
  const input = document.createElement("input");
18854
18858
  input.type = "file";
18855
- input.multiple = props2.multiple;
18856
- input.accept = props2.accept || "*";
18859
+ input.multiple = __props.multiple;
18860
+ input.accept = __props.accept;
18857
18861
  input.onchange = (e) => {
18858
18862
  const target = e.target;
18859
18863
  if (target.files) {
@@ -18873,11 +18877,13 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18873
18877
  else isDragOver.value = false;
18874
18878
  }
18875
18879
  function dragover(e) {
18880
+ if (__props.disabled) return;
18876
18881
  preventDefault(e);
18877
18882
  if (e.dataTransfer) isDragOver.value = true;
18878
18883
  else isDragOver.value = false;
18879
18884
  }
18880
18885
  function drop3(e) {
18886
+ if (__props.disabled) return;
18881
18887
  preventDefault(e);
18882
18888
  if (e.dataTransfer) {
18883
18889
  Array.from(e.dataTransfer.files).forEach(
@@ -18893,7 +18899,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18893
18899
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
18894
18900
  vue.createElementVNode("label", null, vue.toDisplayString(_ctx.label), 1),
18895
18901
  _ctx.required && !storageFiles.value.length ? (vue.openBlock(), vue.createElementBlock("input", _hoisted_2$l)) : vue.createCommentVNode("", true),
18896
- vue.unref(theme) === "basic" ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$R), {
18902
+ _ctx.theme === "basic" ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$R), {
18897
18903
  key: 1,
18898
18904
  outline: "",
18899
18905
  class: "flex p-05 gap-1",
@@ -18972,7 +18978,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
18972
18978
  "dragover": vue.unref(isDragOver),
18973
18979
  "bgl_oval-upload": _ctx.oval
18974
18980
  }]),
18975
- style: vue.normalizeStyle({ width: props2.width, height: props2.height || "215px" }),
18981
+ style: vue.normalizeStyle({ width: _ctx.width, height: _ctx.height }),
18976
18982
  onClick: browse,
18977
18983
  onDragover: dragover,
18978
18984
  onDrop: drop3,
@@ -19138,7 +19144,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
19138
19144
  };
19139
19145
  }
19140
19146
  });
19141
- const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-30231b53"]]);
19147
+ const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-f191c0e6"]]);
19142
19148
  const _hoisted_1$u = ["title"];
19143
19149
  const _hoisted_2$k = { key: 0 };
19144
19150
  const _hoisted_3$g = ["value", "placeholder"];
@@ -54736,7 +54742,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
54736
54742
  emits: /* @__PURE__ */ vue.mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
54737
54743
  setup(__props, { emit: __emit }) {
54738
54744
  vue.useCssVars((_ctx) => ({
54739
- "44de596f": vue.unref(computedItemHeight)
54745
+ "651c754b": vue.unref(computedItemHeight)
54740
54746
  }));
54741
54747
  const emit2 = __emit;
54742
54748
  const slots = vue.useSlots();
@@ -54858,9 +54864,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
54858
54864
  async function registerLastItemObserver() {
54859
54865
  await until(() => lastItem.value).toBeTruthy();
54860
54866
  useIntersectionObserver(lastItem.value, ([entry]) => {
54861
- var _a2;
54862
54867
  if (entry.isIntersecting && computedData.value.length) {
54863
- void ((_a2 = __props.onLastItemVisible) == null ? void 0 : _a2.call(__props));
54868
+ emit2("lastItemVisible");
54864
54869
  }
54865
54870
  }, { threshold: 0.5 });
54866
54871
  }
@@ -54967,7 +54972,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
54967
54972
  };
54968
54973
  }
54969
54974
  });
54970
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-3dbd30bd"]]);
54975
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-9025464f"]]);
54971
54976
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
54972
54977
  __name: "Title",
54973
54978
  props: {
package/dist/index.mjs CHANGED
@@ -18726,31 +18726,33 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18726
18726
  label: {},
18727
18727
  multiple: { type: Boolean },
18728
18728
  files: {},
18729
- bindkey: {},
18729
+ bindkey: { default: "id" },
18730
18730
  modelValue: {},
18731
18731
  width: {},
18732
- height: {},
18732
+ height: { default: "215px" },
18733
18733
  topic: {},
18734
18734
  fill: { type: Boolean },
18735
18735
  oval: { type: Boolean },
18736
- theme: {},
18737
- accept: {},
18738
- required: { type: Boolean }
18736
+ theme: { default: "dropzone" },
18737
+ accept: { default: "*" },
18738
+ required: { type: Boolean },
18739
+ disabled: { type: Boolean }
18739
18740
  }, {
18740
- "modelValue": { default: () => [] },
18741
+ "modelValue": {
18742
+ default: () => []
18743
+ },
18741
18744
  "modelModifiers": {}
18742
18745
  }),
18743
18746
  emits: /* @__PURE__ */ mergeModels(["update:modelValue", "addFileStart"], ["update:modelValue"]),
18744
18747
  setup(__props, { emit: __emit }) {
18745
- const props2 = __props;
18746
18748
  const emit2 = __emit;
18747
- const bindKey2 = props2.bindkey || "id";
18749
+ const bindKey2 = __props.bindkey;
18748
18750
  const bagel = useBagel();
18749
18751
  const isImage = (str) => IMAGE_FORMATS_REGEXP.test(str);
18750
18752
  const file_bindkeys = useModel(__props, "modelValue");
18751
18753
  const storageFiles = ref([]);
18752
18754
  async function fetchTopicFiles() {
18753
- const files = await bagel.get(`/files?topic=${props2.topic}`);
18755
+ const files = await bagel.get(`/files?topic=${__props.topic}`);
18754
18756
  storageFiles.value.push(...files);
18755
18757
  }
18756
18758
  function loadFiles() {
@@ -18761,7 +18763,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18761
18763
  }
18762
18764
  const currentIds = storageFiles.value.map((file) => file[bindKey2]);
18763
18765
  const idsToAdd = ids.filter((id) => !currentIds.includes(id));
18764
- const idsToRemove = currentIds.filter((id) => (typeof id === "string" || typeof id === "number") && !ids.includes(id));
18766
+ const idsToRemove = currentIds.filter(
18767
+ (id) => (typeof id === "string" || typeof id === "number") && !ids.includes(id)
18768
+ );
18765
18769
  idsToRemove.forEach((id) => {
18766
18770
  const index2 = storageFiles.value.findIndex((file) => file[bindKey2] === id);
18767
18771
  if (index2 !== -1) storageFiles.value.splice(index2, 1);
@@ -18772,7 +18776,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18772
18776
  });
18773
18777
  return;
18774
18778
  }
18775
- if (props2.multiple) {
18779
+ if (__props.multiple) {
18776
18780
  idsToAdd.forEach((id) => {
18777
18781
  void bagel.get(`/files/${id}`).then((file) => {
18778
18782
  storageFiles.value.push(file);
@@ -18785,15 +18789,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18785
18789
  }
18786
18790
  }
18787
18791
  onMounted(() => {
18788
- if (props2.topic) fetchTopicFiles();
18789
- if (!props2.files && [file_bindkeys.value].flat().length > 0) {
18792
+ if (__props.topic) fetchTopicFiles();
18793
+ if (!__props.files && [file_bindkeys.value].flat().length > 0) {
18790
18794
  loadFiles();
18791
18795
  }
18792
18796
  });
18793
- watch(() => props2.topic, fetchTopicFiles);
18794
- watch(() => props2.modelValue, loadFiles);
18797
+ watch(() => __props.topic, fetchTopicFiles);
18798
+ watch(() => __props.modelValue, loadFiles);
18795
18799
  watch(
18796
- () => props2.files,
18800
+ () => __props.files,
18797
18801
  (newFiles) => {
18798
18802
  if (newFiles) {
18799
18803
  const filesToAdd = [newFiles].flat().filter((f2) => !storageFiles.value.some((sf) => sf[bindKey2] === f2[bindKey2]));
@@ -18804,13 +18808,12 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18804
18808
  },
18805
18809
  { immediate: true }
18806
18810
  );
18807
- const theme = props2.theme || "dropzone";
18808
18811
  function compareLists(a2, b2) {
18809
18812
  return [a2].flat().every((id) => [b2].flat().includes(id)) && [b2].flat().every((id) => [a2].flat().includes(id));
18810
18813
  }
18811
18814
  function updateModelValue() {
18812
18815
  let idValue;
18813
- if (props2.multiple) {
18816
+ if (__props.multiple) {
18814
18817
  idValue = storageFiles.value.map((f2) => f2[bindKey2]);
18815
18818
  } else {
18816
18819
  idValue = storageFiles.value[0][bindKey2] || "";
@@ -18837,10 +18840,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18837
18840
  emit2("addFileStart");
18838
18841
  for (const file of fileQueue.value) {
18839
18842
  file.uploading = true;
18840
- if (!props2.multiple) storageFiles.value.splice(0, 1);
18843
+ if (!__props.multiple) storageFiles.value.splice(0, 1);
18841
18844
  const serverFile = await bagel.uploadFile(file.file, {
18842
18845
  onUploadProgress: (e) => file.progress = e.progress * 100 - 1,
18843
- topic: props2.topic
18846
+ topic: __props.topic
18844
18847
  });
18845
18848
  storageFiles.value.push(serverFile);
18846
18849
  }
@@ -18848,10 +18851,11 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18848
18851
  updateModelValue();
18849
18852
  }
18850
18853
  function browse() {
18854
+ if (__props.disabled) return;
18851
18855
  const input = document.createElement("input");
18852
18856
  input.type = "file";
18853
- input.multiple = props2.multiple;
18854
- input.accept = props2.accept || "*";
18857
+ input.multiple = __props.multiple;
18858
+ input.accept = __props.accept;
18855
18859
  input.onchange = (e) => {
18856
18860
  const target = e.target;
18857
18861
  if (target.files) {
@@ -18871,11 +18875,13 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18871
18875
  else isDragOver.value = false;
18872
18876
  }
18873
18877
  function dragover(e) {
18878
+ if (__props.disabled) return;
18874
18879
  preventDefault(e);
18875
18880
  if (e.dataTransfer) isDragOver.value = true;
18876
18881
  else isDragOver.value = false;
18877
18882
  }
18878
18883
  function drop3(e) {
18884
+ if (__props.disabled) return;
18879
18885
  preventDefault(e);
18880
18886
  if (e.dataTransfer) {
18881
18887
  Array.from(e.dataTransfer.files).forEach(
@@ -18891,7 +18897,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18891
18897
  return openBlock(), createElementBlock("div", _hoisted_1$v, [
18892
18898
  createElementVNode("label", null, toDisplayString(_ctx.label), 1),
18893
18899
  _ctx.required && !storageFiles.value.length ? (openBlock(), createElementBlock("input", _hoisted_2$l)) : createCommentVNode("", true),
18894
- unref(theme) === "basic" ? (openBlock(), createBlock(unref(_sfc_main$R), {
18900
+ _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$R), {
18895
18901
  key: 1,
18896
18902
  outline: "",
18897
18903
  class: "flex p-05 gap-1",
@@ -18970,7 +18976,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
18970
18976
  "dragover": unref(isDragOver),
18971
18977
  "bgl_oval-upload": _ctx.oval
18972
18978
  }]),
18973
- style: normalizeStyle({ width: props2.width, height: props2.height || "215px" }),
18979
+ style: normalizeStyle({ width: _ctx.width, height: _ctx.height }),
18974
18980
  onClick: browse,
18975
18981
  onDragover: dragover,
18976
18982
  onDrop: drop3,
@@ -19136,7 +19142,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
19136
19142
  };
19137
19143
  }
19138
19144
  });
19139
- const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-30231b53"]]);
19145
+ const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-f191c0e6"]]);
19140
19146
  const _hoisted_1$u = ["title"];
19141
19147
  const _hoisted_2$k = { key: 0 };
19142
19148
  const _hoisted_3$g = ["value", "placeholder"];
@@ -54734,7 +54740,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54734
54740
  emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
54735
54741
  setup(__props, { emit: __emit }) {
54736
54742
  useCssVars((_ctx) => ({
54737
- "44de596f": unref(computedItemHeight)
54743
+ "651c754b": unref(computedItemHeight)
54738
54744
  }));
54739
54745
  const emit2 = __emit;
54740
54746
  const slots = useSlots();
@@ -54856,9 +54862,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54856
54862
  async function registerLastItemObserver() {
54857
54863
  await until(() => lastItem.value).toBeTruthy();
54858
54864
  useIntersectionObserver(lastItem.value, ([entry]) => {
54859
- var _a2;
54860
54865
  if (entry.isIntersecting && computedData.value.length) {
54861
- void ((_a2 = __props.onLastItemVisible) == null ? void 0 : _a2.call(__props));
54866
+ emit2("lastItemVisible");
54862
54867
  }
54863
54868
  }, { threshold: 0.5 });
54864
54869
  }
@@ -54965,7 +54970,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
54965
54970
  };
54966
54971
  }
54967
54972
  });
54968
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-3dbd30bd"]]);
54973
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-9025464f"]]);
54969
54974
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
54970
54975
  __name: "Title",
54971
54976
  props: {