@bagelink/vue 0.0.1031 → 0.0.1035

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
@@ -40,6 +40,9 @@ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
40
40
  },
41
41
  get txtField() {
42
42
  return txtField;
43
+ },
44
+ get uploadField() {
45
+ return uploadField;
43
46
  }
44
47
  }, Symbol.toStringTag, { value: "Module" }));
45
48
  const _sfc_main$15 = /* @__PURE__ */ defineComponent({
@@ -10383,11 +10386,13 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10383
10386
  customAttrs.value.multiline = true;
10384
10387
  return TextInput;
10385
10388
  }
10389
+ if (props2.field.$el === "number") return NumberInput;
10386
10390
  if (props2.field.$el === "array") return FieldArray;
10387
10391
  if (props2.field.$el === "select") return SelectInput;
10388
10392
  if (props2.field.$el === "toggle") return ToggleInput;
10389
10393
  if (props2.field.$el === "check") return CheckInput;
10390
10394
  if (props2.field.$el === "richtext") return RichText;
10395
+ if (props2.field.$el === "upload") return UploadInput;
10391
10396
  if (props2.field.$el === "file") return FileUpload;
10392
10397
  if (props2.field.$el === "date") return DateInput;
10393
10398
  if (props2.field.$el === "tabs") return TabsNav;
@@ -19985,7 +19990,8 @@ const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_ren
19985
19990
  const _sfc_main$I = /* @__PURE__ */ defineComponent({
19986
19991
  __name: "Image",
19987
19992
  props: {
19988
- src: { type: String, required: true },
19993
+ src: { type: String, required: false },
19994
+ pathKey: { type: String, required: false },
19989
19995
  alt: { type: String, required: false, default: "" },
19990
19996
  width: { type: [String, Number], required: false },
19991
19997
  height: { type: [String, Number], required: false },
@@ -19994,20 +20000,25 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
19994
20000
  setup(__props, { expose: __expose }) {
19995
20001
  __expose();
19996
20002
  let imageSrc = ref(null);
19997
- async function loadImage(src) {
20003
+ const bagel = useBagel();
20004
+ const fileBaseUrl = computed(() => (bagel.fileBaseUrl || "https://files.bagel.design").replace(/\/$/, ""));
20005
+ const pathToUrl = () => `${fileBaseUrl.value}/${__props.pathKey}`;
20006
+ async function loadImage() {
19998
20007
  var _a2;
19999
- if (!src) {
20008
+ const url = __props.src || pathToUrl();
20009
+ console.log(url);
20010
+ if (!url) {
20000
20011
  imageSrc.value = null;
20001
20012
  return;
20002
20013
  }
20003
- const ext = (_a2 = src.split(".").pop()) == null ? void 0 : _a2.toLowerCase().split("?").shift();
20014
+ const ext = (_a2 = url.split(".").pop()) == null ? void 0 : _a2.toLowerCase().split("?").shift();
20004
20015
  if (ext === "heic") {
20005
20016
  if (!("caches" in window)) {
20006
20017
  console.warn("Caching is not available. Proceeding without cache.");
20007
20018
  } else {
20008
20019
  try {
20009
20020
  const imgCache = await window.caches.open("img-cache");
20010
- const cachedResponse = await imgCache.match(src);
20021
+ const cachedResponse = await imgCache.match(url);
20011
20022
  if (cachedResponse) {
20012
20023
  imageSrc.value = URL.createObjectURL(await cachedResponse.blob());
20013
20024
  return;
@@ -20018,14 +20029,14 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
20018
20029
  }
20019
20030
  try {
20020
20031
  await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
20021
- const response = await fetch(src);
20032
+ const response = await fetch(url);
20022
20033
  const blob = await response.blob();
20023
20034
  const convertedBlob = await window.heic2any({ blob });
20024
20035
  imageSrc.value = URL.createObjectURL(convertedBlob);
20025
20036
  if ("caches" in window) {
20026
20037
  try {
20027
20038
  const imgCache = await window.caches.open("img-cache");
20028
- imgCache.put(src, new Response(convertedBlob));
20039
+ imgCache.put(url, new Response(convertedBlob));
20029
20040
  } catch (cacheError) {
20030
20041
  console.warn("Failed to cache the image:", cacheError);
20031
20042
  }
@@ -20034,15 +20045,15 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
20034
20045
  console.error("Error converting HEIC file:", error);
20035
20046
  }
20036
20047
  } else {
20037
- imageSrc.value = src;
20048
+ imageSrc.value = url;
20038
20049
  }
20039
20050
  }
20040
- watch(() => __props.src, loadImage, { immediate: true });
20051
+ watch(() => [__props.src, __props.pathKey], loadImage, { immediate: true });
20041
20052
  const __returned__ = { get imageSrc() {
20042
20053
  return imageSrc;
20043
20054
  }, set imageSrc(v) {
20044
20055
  imageSrc = v;
20045
- }, loadImage, get Skeleton() {
20056
+ }, bagel, fileBaseUrl, pathToUrl, loadImage, get Skeleton() {
20046
20057
  return Skeleton;
20047
20058
  }, get normalizeDimension() {
20048
20059
  return normalizeDimension;
@@ -20727,7 +20738,7 @@ const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_rend
20727
20738
  const _sfc_main$F = /* @__PURE__ */ defineComponent({
20728
20739
  __name: "NumberInput",
20729
20740
  props: {
20730
- modelValue: { type: Number, required: true },
20741
+ modelValue: { type: Number, required: false },
20731
20742
  min: { type: Number, required: false },
20732
20743
  max: { type: Number, required: false },
20733
20744
  step: { type: Number, required: false, default: 1 },
@@ -20736,7 +20747,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20736
20747
  icon: { type: null, required: false },
20737
20748
  label: { type: String, required: false },
20738
20749
  placeholder: { type: String, required: false },
20739
- disabled: { type: Boolean, required: true },
20750
+ disabled: { type: Boolean, required: false },
20740
20751
  required: { type: Boolean, required: false },
20741
20752
  id: { type: String, required: false },
20742
20753
  helptext: { type: String, required: false },
@@ -20747,7 +20758,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20747
20758
  setup(__props, { expose: __expose, emit: __emit }) {
20748
20759
  __expose();
20749
20760
  const emit2 = __emit;
20750
- let numberValue = ref(0);
20761
+ let numberValue = ref(__props.modelValue || 0);
20751
20762
  const btnLayouts = ["horizontal", "vertical"];
20752
20763
  function increment() {
20753
20764
  if (!__props.max || numberValue.value + __props.step <= __props.max) {
@@ -20777,7 +20788,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20777
20788
  }, { immediate: true });
20778
20789
  watch(() => __props.modelValue, (newVal) => {
20779
20790
  if (newVal !== numberValue.value) {
20780
- numberValue.value = newVal;
20791
+ numberValue.value = newVal || 0;
20781
20792
  }
20782
20793
  }, { immediate: true });
20783
20794
  const __returned__ = { emit: emit2, get numberValue() {
@@ -20829,6 +20840,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
20829
20840
  [
20830
20841
  $props.layout && $setup.btnLayouts.includes($props.layout) ? (openBlock(), createBlock($setup["Btn"], {
20831
20842
  key: 0,
20843
+ flat: "",
20832
20844
  icon: "add",
20833
20845
  class: normalizeClass(["radius", [{ "bgl-big-ctrl-num-btn": $props.layout === "vertical" }]]),
20834
20846
  onClick: $setup.increment
@@ -20887,6 +20899,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
20887
20899
  }, null, 8, ["icon"])) : createCommentVNode("v-if", true),
20888
20900
  $props.layout && $setup.btnLayouts.includes($props.layout) ? (openBlock(), createBlock($setup["Btn"], {
20889
20901
  key: 4,
20902
+ flat: "",
20890
20903
  icon: "remove",
20891
20904
  class: normalizeClass(["radius", [{ "bgl-big-ctrl-num-btn": $props.layout === "vertical" }]]),
20892
20905
  onClick: $setup.decrement
@@ -31836,7 +31849,7 @@ const files = {
31836
31849
  }
31837
31850
  };
31838
31851
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
31839
- __name: "UploadFile",
31852
+ __name: "UploadInput",
31840
31853
  props: {
31841
31854
  label: { type: String, required: false },
31842
31855
  multiple: { type: Boolean, required: false },
@@ -31858,8 +31871,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31858
31871
  const props2 = __props;
31859
31872
  const emit2 = __emit;
31860
31873
  const bagel = useBagel();
31861
- const fileBaseUrl = computed(() => (props2.baseURL || bagel.fileBaseUrl || "https://files.bagel.design/").replace(/\/$/, ""));
31862
31874
  files.setBaseUrl(bagel.host);
31875
+ const fileBaseUrl = computed(() => (props2.baseURL || bagel.fileBaseUrl || "https://files.bagel.design").replace(/\/$/, ""));
31876
+ const pathToUrl = (path_key) => `${fileBaseUrl.value}/${path_key}`;
31863
31877
  const fileQueue = ref([]);
31864
31878
  let storageFiles = ref([]);
31865
31879
  const pk = ref([props2.modelValue].flat().filter(Boolean));
@@ -31872,7 +31886,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31872
31886
  else emit2("update:modelValue", value[0] || void 0);
31873
31887
  }, { deep: true });
31874
31888
  const isImage = (str) => IMAGE_FORMATS_REGEXP.test(str);
31875
- const pathToUrl = (path_key) => `${fileBaseUrl.value}/${path_key}`;
31876
31889
  const fileToUrl = (file) => URL.createObjectURL(file);
31877
31890
  let isDragOver = ref(false);
31878
31891
  async function removeFile(path_key) {
@@ -31899,7 +31912,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31899
31912
  });
31900
31913
  pk.value.push(data2.path_key);
31901
31914
  } catch (error) {
31902
- console.error(error);
31915
+ console.error("error flushing queue", error);
31903
31916
  }
31904
31917
  }
31905
31918
  fileQueue.value.splice(0, fileQueue.value.length);
@@ -31941,11 +31954,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31941
31954
  files.get(props2.dirPath).then((response) => storageFiles.value.push(...[response.data].flat())).catch(console.error);
31942
31955
  }
31943
31956
  });
31944
- const __returned__ = { props: props2, emit: emit2, bagel, fileBaseUrl, fileQueue, get storageFiles() {
31957
+ const __returned__ = { props: props2, emit: emit2, bagel, fileBaseUrl, pathToUrl, fileQueue, get storageFiles() {
31945
31958
  return storageFiles;
31946
31959
  }, set storageFiles(v) {
31947
31960
  storageFiles = v;
31948
- }, pk, pathKeys, isImage, pathToUrl, fileToUrl, get isDragOver() {
31961
+ }, pk, pathKeys, isImage, fileToUrl, get isDragOver() {
31949
31962
  return isDragOver;
31950
31963
  }, set isDragOver(v) {
31951
31964
  isDragOver = v;
@@ -32043,29 +32056,35 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32043
32056
  class: "txt-gray txt-12 flex"
32044
32057
  }, [
32045
32058
  createElementVNode("div", _hoisted_4$4, [
32046
- (openBlock(true), createElementBlock(
32047
- Fragment,
32059
+ withDirectives(createVNode($setup["Btn"], {
32060
+ color: "gray",
32061
+ thin: "",
32062
+ icon: "delete",
32063
+ onClick: ($event) => $setup.removeFile(path_key)
32064
+ }, null, 8, ["onClick"]), [
32065
+ [_directive_tooltip, "Delete"]
32066
+ ]),
32067
+ withDirectives(createVNode(
32068
+ $setup["Btn"],
32069
+ {
32070
+ color: "gray",
32071
+ thin: "",
32072
+ icon: "autorenew",
32073
+ onClick: $setup.browse
32074
+ },
32048
32075
  null,
32049
- renderList([
32050
- { tooltip: "Delete", icon: "delete", onClick: () => $setup.removeFile(path_key) },
32051
- { tooltip: "Replace", icon: "autorenew", onClick: $setup.browse },
32052
- { tooltip: "Download", icon: "download", href: $setup.pathToUrl(path_key), download: path_key.split("/").pop() }
32053
- ], (action) => {
32054
- return withDirectives((openBlock(), createBlock($setup["Btn"], mergeProps({
32055
- key: action.tooltip,
32056
- color: "gray",
32057
- thin: "",
32058
- icon: action.icon,
32059
- ref_for: true
32060
- }, action.href ? { href: action.href, download: action.download, target: "_blank" } : {}, {
32061
- onClick: withModifiers(action.onClick, ["stop"])
32062
- }), null, 16, ["icon", "onClick"])), [
32063
- [_directive_tooltip, action.tooltip]
32064
- ]);
32065
- }),
32066
- 128
32067
- /* KEYED_FRAGMENT */
32068
- )),
32076
+ 512
32077
+ /* NEED_PATCH */
32078
+ ), [
32079
+ [_directive_tooltip, "Replace"]
32080
+ ]),
32081
+ createVNode($setup["Btn"], {
32082
+ icon: "download",
32083
+ flat: "",
32084
+ thin: "",
32085
+ href: $setup.pathToUrl(path_key),
32086
+ download: path_key.split("/").pop()
32087
+ }, null, 8, ["href", "download"]),
32069
32088
  withDirectives((openBlock(), createElementBlock("p", _hoisted_5$4, [
32070
32089
  createTextVNode(
32071
32090
  toDisplayString(path_key.split("/").pop()),
@@ -32119,10 +32138,9 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32119
32138
  [
32120
32139
  $setup.isImage(path_key) ? (openBlock(), createBlock($setup["Image"], {
32121
32140
  key: 0,
32122
- class: "multi-preview",
32123
- src: $setup.pathToUrl(path_key),
32124
- alt: ""
32125
- }, null, 8, ["src"])) : (openBlock(), createBlock($setup["Icon"], {
32141
+ pathKey: path_key,
32142
+ class: "multi-preview"
32143
+ }, null, 8, ["pathKey"])) : (openBlock(), createBlock($setup["Icon"], {
32126
32144
  key: 1,
32127
32145
  icon: "description",
32128
32146
  class: "multi-preview"
@@ -32139,7 +32157,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32139
32157
  flat: "",
32140
32158
  icon: "delete",
32141
32159
  color: "red",
32142
- onClick: withModifiers(($event) => $setup.removeFile(path_key), ["stop"])
32160
+ onClick: ($event) => $setup.removeFile(path_key)
32143
32161
  }, null, 8, ["onClick"])
32144
32162
  ],
32145
32163
  2
@@ -32222,38 +32240,44 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32222
32240
  },
32223
32241
  [
32224
32242
  createElementVNode("div", _hoisted_12$1, [
32225
- (openBlock(true), createElementBlock(
32226
- Fragment,
32243
+ withDirectives(createVNode($setup["Btn"], {
32244
+ color: "gray",
32245
+ thin: "",
32246
+ icon: "delete",
32247
+ onClick: ($event) => $setup.removeFile(path_key)
32248
+ }, null, 8, ["onClick"]), [
32249
+ [_directive_tooltip, "Delete"]
32250
+ ]),
32251
+ withDirectives(createVNode(
32252
+ $setup["Btn"],
32253
+ {
32254
+ color: "gray",
32255
+ thin: "",
32256
+ icon: "autorenew",
32257
+ onClick: $setup.browse
32258
+ },
32227
32259
  null,
32228
- renderList([
32229
- { tooltip: "Delete", icon: "delete", onClick: () => $setup.removeFile(path_key) },
32230
- { tooltip: "Replace", icon: "autorenew", onClick: $setup.browse },
32231
- { tooltip: "Download", icon: "download", href: $setup.pathToUrl(path_key), download: path_key.split("/").pop() }
32232
- ], (action) => {
32233
- return withDirectives((openBlock(), createBlock($setup["Btn"], mergeProps({
32234
- key: action.tooltip,
32235
- color: "gray",
32236
- thin: "",
32237
- icon: action.icon,
32238
- ref_for: true
32239
- }, action.href ? { href: action.href, download: action.download, target: "_blank" } : {}, {
32240
- onClick: withModifiers(action.onClick, ["stop"])
32241
- }), null, 16, ["icon", "onClick"])), [
32242
- [_directive_tooltip, action.tooltip]
32243
- ]);
32244
- }),
32245
- 128
32246
- /* KEYED_FRAGMENT */
32247
- ))
32260
+ 512
32261
+ /* NEED_PATCH */
32262
+ ), [
32263
+ [_directive_tooltip, "Replace"]
32264
+ ]),
32265
+ withDirectives(createVNode($setup["Btn"], {
32266
+ color: "gray",
32267
+ thin: "",
32268
+ icon: "download",
32269
+ href: $setup.pathToUrl(path_key),
32270
+ download: path_key.split("/").pop()
32271
+ }, null, 8, ["href", "download"]), [
32272
+ [_directive_tooltip, "Download"]
32273
+ ])
32248
32274
  ]),
32249
32275
  $setup.isImage(path_key) ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
32250
- withDirectives(createVNode($setup["Image"], {
32276
+ createVNode($setup["Image"], {
32251
32277
  class: "single-preview",
32252
- src: $setup.pathToUrl(path_key),
32278
+ pathKey: path_key,
32253
32279
  alt: ""
32254
- }, null, 8, ["src"]), [
32255
- [_directive_lightbox, { src: $setup.pathToUrl(path_key), download: true }]
32256
- ])
32280
+ }, null, 8, ["pathKey"])
32257
32281
  ])) : withDirectives((openBlock(), createBlock(
32258
32282
  $setup["Icon"],
32259
32283
  {
@@ -32343,7 +32367,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
32343
32367
  ))
32344
32368
  ]);
32345
32369
  }
32346
- const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-9254a525"], ["__file", "/Users/natanelyoung/Projects/bagelink/packages/vue/src/components/form/inputs/Upload/UploadFile.vue"]]);
32370
+ const UploadInput = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-bec8d254"], ["__file", "/Users/natanelyoung/Projects/bagelink/packages/vue/src/components/form/inputs/Upload/UploadInput.vue"]]);
32347
32371
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
32348
32372
  __name: "IframeVue",
32349
32373
  props: {
@@ -36318,7 +36342,7 @@ function dateField(id, label, options) {
36318
36342
  }
36319
36343
  function numField(id, label, options) {
36320
36344
  return {
36321
- $el: "text",
36345
+ $el: "number",
36322
36346
  class: options == null ? void 0 : options.class,
36323
36347
  required: options == null ? void 0 : options.required,
36324
36348
  defaultValue: options == null ? void 0 : options.defaultValue,
@@ -36328,12 +36352,9 @@ function numField(id, label, options) {
36328
36352
  placeholder: options == null ? void 0 : options.placeholder,
36329
36353
  helptext: options == null ? void 0 : options.helptext,
36330
36354
  attrs: {
36331
- type: "number",
36332
- nativeInputAttrs: {
36333
- step: options == null ? void 0 : options.step,
36334
- min: options == null ? void 0 : options.min,
36335
- max: options == null ? void 0 : options.max
36336
- }
36355
+ step: options == null ? void 0 : options.step,
36356
+ min: options == null ? void 0 : options.min,
36357
+ max: options == null ? void 0 : options.max
36337
36358
  }
36338
36359
  };
36339
36360
  }
@@ -36344,6 +36365,14 @@ function frmRow(...children2) {
36344
36365
  children: children2
36345
36366
  };
36346
36367
  }
36368
+ function uploadField(id, label, options) {
36369
+ return {
36370
+ $el: "upload",
36371
+ id,
36372
+ label,
36373
+ attrs: options
36374
+ };
36375
+ }
36347
36376
  function bglForm(idOrField, ...schema) {
36348
36377
  if (typeof idOrField === "string") {
36349
36378
  return {
@@ -37156,7 +37185,7 @@ export {
37156
37185
  ToggleInput,
37157
37186
  ToolBar,
37158
37187
  TopBar,
37159
- UploadFile as Upload,
37188
+ UploadInput,
37160
37189
  VIDEO_FORMATS,
37161
37190
  VIDEO_FORMATS_REGEXP,
37162
37191
  Zoomer,
package/dist/style.css CHANGED
@@ -1731,7 +1731,7 @@ line-height: 1.65;
1731
1731
  .bgl-toggle input:checked + label[data-v-905f82b8] {
1732
1732
  color: var(--bgl-primary) !important;
1733
1733
  }
1734
- .fileUploadWrap[data-v-9254a525] {
1734
+ .fileUploadWrap[data-v-bec8d254] {
1735
1735
  outline: 1px solid var(--border-color);
1736
1736
  border-radius: var(--input-border-radius);
1737
1737
  text-align: center;
@@ -1743,7 +1743,7 @@ line-height: 1.65;
1743
1743
  background: var(--input-bg);
1744
1744
  height: 215px;
1745
1745
  }
1746
- .bagel-input .fileUploadWrap.fileDropZone[data-v-9254a525] {
1746
+ .bagel-input .fileUploadWrap.fileDropZone[data-v-bec8d254] {
1747
1747
  background: var(--input-bg);
1748
1748
  display: flex;
1749
1749
  align-items: center;
@@ -1751,14 +1751,14 @@ line-height: 1.65;
1751
1751
  color: var(--bgl-gray);
1752
1752
  flex-direction: column;
1753
1753
  }
1754
- .fileUploadWrap.dragover[data-v-9254a525],
1755
- .fileUploadWrap[data-v-9254a525]:hover {
1754
+ .fileUploadWrap.dragover[data-v-bec8d254],
1755
+ .fileUploadWrap[data-v-bec8d254]:hover {
1756
1756
  box-shadow: inset 0 0 10px #00000012;
1757
1757
  }
1758
- .fileUploadWrap[style*='height: auto;'][data-v-9254a525] {
1758
+ .fileUploadWrap[style*='height: auto;'][data-v-bec8d254] {
1759
1759
  min-height: 215px;
1760
1760
  }
1761
- .multi-image-item-preview[data-v-9254a525] {
1761
+ .multi-image-item-preview[data-v-bec8d254] {
1762
1762
  border: 1px solid var(--border-color) !important;
1763
1763
  border-radius: var(--input-border-radius);
1764
1764
  margin: 0.5rem !important;
@@ -1772,12 +1772,12 @@ line-height: 1.65;
1772
1772
  gap: 1rem;
1773
1773
  align-items: center;
1774
1774
  }
1775
- .multi-image-item-preview p[data-v-9254a525] {
1775
+ .multi-image-item-preview p[data-v-bec8d254] {
1776
1776
  overflow: hidden;
1777
1777
  text-overflow: ellipsis;
1778
1778
  white-space: nowrap;
1779
1779
  }
1780
- .multi-preview[data-v-9254a525] {
1780
+ .multi-preview[data-v-bec8d254] {
1781
1781
  width: 40px;
1782
1782
  height: 40px;
1783
1783
  border-radius: var(--input-border-radius);
@@ -1788,17 +1788,17 @@ line-height: 1.65;
1788
1788
  align-items: center;
1789
1789
  display: flex;
1790
1790
  }
1791
- .bgl-single-preview[data-v-9254a525] {
1791
+ .bgl-single-preview[data-v-bec8d254] {
1792
1792
  height: 100%;
1793
1793
  position: relative;
1794
1794
  }
1795
- .bgl-single-preview + .fileUploadPlaceHolder[data-v-9254a525] {
1795
+ .bgl-single-preview + .fileUploadPlaceHolder[data-v-bec8d254] {
1796
1796
  position: absolute;
1797
1797
  inset: 0;
1798
1798
  margin: auto;
1799
1799
  top: calc(50% - 2rem);
1800
1800
  }
1801
- .single-image-item-preview[data-v-9254a525] {
1801
+ .single-image-item-preview[data-v-bec8d254] {
1802
1802
  height: 100%;
1803
1803
  min-height: 100%;
1804
1804
  position: relative;
@@ -1806,13 +1806,13 @@ line-height: 1.65;
1806
1806
  align-items: center;
1807
1807
  justify-content: center;
1808
1808
  }
1809
- .fileUploadWrap[style*='height: auto'] .single-image-item-preview[data-v-9254a525] {
1809
+ .fileUploadWrap[style*='height: auto'] .single-image-item-preview[data-v-bec8d254] {
1810
1810
  min-height: 215px;
1811
1811
  }
1812
- .fileUploadWrap[style*='height: auto'] .single-preview[data-v-9254a525] {
1812
+ .fileUploadWrap[style*='height: auto'] .single-preview[data-v-bec8d254] {
1813
1813
  margin: 0rem !important;
1814
1814
  }
1815
- .single-preview[data-v-9254a525] {
1815
+ .single-preview[data-v-bec8d254] {
1816
1816
  border-radius: var(--input-border-radius);
1817
1817
  margin: 1rem;
1818
1818
  padding: 0px;
@@ -1822,7 +1822,7 @@ line-height: 1.65;
1822
1822
  background: var(--bgl-gray-light);
1823
1823
  width: 90%;
1824
1824
  }
1825
- .single-image-item-preview[data-v-9254a525]:hover::after {
1825
+ .single-image-item-preview[data-v-bec8d254]:hover::after {
1826
1826
  content: 'zoom_in';
1827
1827
  font-size: 32px;
1828
1828
  font-family: 'Material Symbols Outlined', serif;
@@ -1832,20 +1832,20 @@ line-height: 1.65;
1832
1832
  z-index: 9;
1833
1833
  pointer-events: none;
1834
1834
  }
1835
- .single-image-item-preview:hover img[data-v-9254a525] {
1835
+ .single-image-item-preview:hover img[data-v-bec8d254] {
1836
1836
  filter: brightness(70%);
1837
1837
  }
1838
- .bgl_fill-image.single-image-item-preview[data-v-9254a525] {
1838
+ .bgl_fill-image.single-image-item-preview[data-v-bec8d254] {
1839
1839
  height: 100%;
1840
1840
  }
1841
- .bgl_fill-image.single-image-item-preview .single-preview[data-v-9254a525] {
1841
+ .bgl_fill-image.single-image-item-preview .single-preview[data-v-bec8d254] {
1842
1842
  border-radius: unset;
1843
1843
  object-fit: cover;
1844
1844
  box-shadow: unset;
1845
1845
  width: 100%;
1846
1846
  height: auto;
1847
1847
  }
1848
- .single-image-item-preview .pie[data-v-9254a525] {
1848
+ .single-image-item-preview .pie[data-v-bec8d254] {
1849
1849
  transform-origin: top;
1850
1850
  transform: scale(1.4);
1851
1851
  position: absolute;
@@ -1859,31 +1859,31 @@ line-height: 1.65;
1859
1859
  border: none !important;
1860
1860
  padding: 0 !important;
1861
1861
  }
1862
- .bgl_oval-upload[data-v-9254a525] {
1862
+ .bgl_oval-upload[data-v-bec8d254] {
1863
1863
  border-radius: 100% !important;
1864
1864
  overflow: hidden;
1865
1865
  }
1866
- .bgl_oval-upload p[data-v-9254a525] {
1866
+ .bgl_oval-upload p[data-v-bec8d254] {
1867
1867
  padding: 0.75rem !important;
1868
1868
  font-size: 12px;
1869
1869
  }
1870
- .bgl_oval-upload .fileUploadPlaceHolder[data-v-9254a525] {
1870
+ .bgl_oval-upload .fileUploadPlaceHolder[data-v-bec8d254] {
1871
1871
  top: 0;
1872
1872
  }
1873
- .bgl_oval-upload .pie[data-v-9254a525] {
1873
+ .bgl_oval-upload .pie[data-v-bec8d254] {
1874
1874
  transform: scale(1);
1875
1875
  }
1876
- .bgl_oval-upload span.bgl_icon-font.color-primary[data-v-9254a525] {
1876
+ .bgl_oval-upload span.bgl_icon-font.color-primary[data-v-bec8d254] {
1877
1877
  transform: scale(0.4) !important;
1878
1878
  }
1879
- .bgl_oval-upload .single-image-item-preview[data-v-9254a525] {
1879
+ .bgl_oval-upload .single-image-item-preview[data-v-bec8d254] {
1880
1880
  height: 100%;
1881
1881
  }
1882
- .bgl_oval-upload .single-preview[data-v-9254a525] {
1882
+ .bgl_oval-upload .single-preview[data-v-bec8d254] {
1883
1883
  margin: 0;
1884
1884
  height: 100% !important;
1885
1885
  }
1886
- .pie[data-v-9254a525] {
1886
+ .pie[data-v-bec8d254] {
1887
1887
  width: 30px;
1888
1888
  height: 30px;
1889
1889
  position: relative;
@@ -1891,7 +1891,7 @@ line-height: 1.65;
1891
1891
  align-items: center;
1892
1892
  justify-content: center;
1893
1893
  }
1894
- .pie[data-v-9254a525]:before {
1894
+ .pie[data-v-bec8d254]:before {
1895
1895
  content: '';
1896
1896
  position: absolute;
1897
1897
  border-radius: 50%;
@@ -1909,26 +1909,26 @@ line-height: 1.65;
1909
1909
  #000 calc(100% - var(--b))
1910
1910
  );
1911
1911
  }
1912
- .pie .success[data-v-9254a525] {
1912
+ .pie .success[data-v-bec8d254] {
1913
1913
  transform: scale(0);
1914
1914
  opacity: 0;
1915
1915
  transition: all 0.3s ease-in-out;
1916
1916
  }
1917
- .pie .progress[data-v-9254a525] {
1917
+ .pie .progress[data-v-bec8d254] {
1918
1918
  position: absolute;
1919
1919
  font-size: 10px;
1920
1920
  }
1921
- .pie.complete .progress[data-v-9254a525] {
1921
+ .pie.complete .progress[data-v-bec8d254] {
1922
1922
  display: none;
1923
1923
  }
1924
- .pie.complete .success[data-v-9254a525] {
1924
+ .pie.complete .success[data-v-bec8d254] {
1925
1925
  transform: scale(1.3);
1926
1926
  opacity: 1;
1927
1927
  }
1928
- .pie.complete[data-v-9254a525]:before {
1928
+ .pie.complete[data-v-bec8d254]:before {
1929
1929
  background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
1930
1930
  }
1931
- .pie.complete[data-v-9254a525] {
1931
+ .pie.complete[data-v-bec8d254] {
1932
1932
  color: var(--bgl-green);
1933
1933
  }
1934
1934
 
@@ -45,6 +45,15 @@ export declare function frmRow(...children: Field[]): {
45
45
  class: string;
46
46
  children: Field[];
47
47
  };
48
+ interface UploadOptions extends InputOptions {
49
+ multiple?: boolean;
50
+ }
51
+ export declare function uploadField(id: string, label?: string, options?: UploadOptions): {
52
+ $el: string;
53
+ id: string;
54
+ label: string | undefined;
55
+ attrs: UploadOptions | undefined;
56
+ };
48
57
  export declare function bglForm(idOrField?: string | Field, ...schema: Field[]): {
49
58
  $el: import('vue').Raw<{
50
59
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"BagelFormUtils.d.ts","sourceRoot":"","sources":["../../src/utils/BagelFormUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,KAAK,EAAE,KAAK,MAAM,EAAY,MAAM,eAAe,CAAA;AAGjG,UAAU,YAAY;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,KAAK,WAAW,GAAG,YAAY,CAAA;AAE/B,UAAU,gBAAiB,SAAQ,YAAY;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,UAAU,gBAAiB,SAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBrE;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,KAAK,CAO5F;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,KAAK,GAAG,SAAS,CASvF;AAED,UAAU,iBAAkB,SAAQ,YAAY;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,OAAO,CAAA;CACb;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,iBAAiB;;;;;gBAJ7F,OAAO;aACV,OAAO;mBA1NF,OAAO;sBACJ,MAAM;gBACZ,MAAM;uBACC,MAAM;mBACV,OAAO;mBACP,MAAM;;;EA+NjB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1031",
4
+ "version": "0.0.1035",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",