vuefinder 1.0.5 → 1.0.6

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/README.md CHANGED
@@ -55,7 +55,7 @@ current progress :
55
55
  - [x] multi-language (en/tr atm. will be more. PRs are welcomed.)
56
56
  - [x] thumbnails
57
57
  - [x] update npm package
58
- - [ ] validation & error messages
58
+ - [x] validation & error messages
59
59
  - [ ] code refactoring
60
60
  - [ ] test for different adapters (especially check if zip/archive works)
61
61
  - [ ] test for different OS (windows directory seperator is different)
package/dist/vuefinder.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ref as P, watch as pt, inject as B, openBlock as w, createElementBlock as C, createElementVNode as h, unref as _, normalizeClass as de, createTextVNode as le, toDisplayString as $, createCommentVNode as q, createVNode as we, TransitionGroup as Ai, withCtx as F, Fragment as ce, renderList as be, reactive as ht, onMounted as _e, onUpdated as Oi, withDirectives as ve, vShow as st, withModifiers as Pe, nextTick as gt, vModelSelect as cr, customRef as Pi, withKeys as Ye, isRef as Ii, vModelText as We, normalizeStyle as Cr, renderSlot as Mt, provide as xt, createBlock as G, resolveDynamicComponent as Ni } from "vue";
1
+ import { ref as P, watch as pt, inject as B, openBlock as w, createElementBlock as C, createElementVNode as h, unref as _, normalizeClass as de, createTextVNode as le, toDisplayString as $, createCommentVNode as q, createVNode as we, TransitionGroup as Ai, withCtx as F, Fragment as ce, renderList as be, reactive as ht, onMounted as _e, onUpdated as Oi, withDirectives as ve, vShow as st, withModifiers as Pe, nextTick as gt, vModelSelect as cr, customRef as Pi, withKeys as Ye, isRef as Ii, vModelText as We, normalizeStyle as Cr, provide as xt, createBlock as G, resolveDynamicComponent as Ni, renderSlot as Mt } from "vue";
2
2
  import _t from "plupload";
3
3
  const ft = (n, { method: e = "get", params: t = {}, json: o = !0 }) => {
4
4
  const a = { method: e };
@@ -1931,7 +1931,7 @@ const So = $r.exports, Do = (n, e, t, o, a) => (e = Math, t = e.log, o = 1024, a
1931
1931
  filter: j
1932
1932
  },
1933
1933
  onSuccess: (H) => {
1934
- t.emit("vf-toast-clear"), H.files.length || t.emit("vf-toast-push", { label: p("No search result found.") });
1934
+ H.files.length || t.emit("vf-toast-push", { label: p("No search result found.") });
1935
1935
  }
1936
1936
  }) : t.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
1937
1937
  });
@@ -2305,7 +2305,7 @@ const So = $r.exports, Do = (n, e, t, o, a) => (e = Math, t = e.log, o = 1024, a
2305
2305
  s.value = !0, gt(() => f.value.focus());
2306
2306
  }, p = Wn("", 400);
2307
2307
  pt(p, (L) => {
2308
- t.emit("vf-search-query", { newQuery: L });
2308
+ t.emit("vf-toast-clear"), t.emit("vf-search-query", { newQuery: L });
2309
2309
  });
2310
2310
  const b = () => i.value.length && !s.value, A = (L) => {
2311
2311
  var R;
@@ -2537,59 +2537,12 @@ function ga(n, e) {
2537
2537
  }
2538
2538
  return { t: g, support_locales: a, changeLocale: s };
2539
2539
  }
2540
- const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2541
- xmlns: "http://www.w3.org/2000/svg",
2542
- fill: "none",
2543
- viewBox: "0 0 24 24",
2544
- "stroke-width": "1.5",
2545
- stroke: "currentColor",
2546
- class: "w-5 h-5"
2547
- }, [
2548
- /* @__PURE__ */ h("path", {
2549
- "stroke-linecap": "round",
2550
- "stroke-linejoin": "round",
2551
- d: "M6 18L18 6M6 6l12 12"
2552
- })
2553
- ], -1), ya = [
2554
- ba
2555
- ], wa = {
2556
- name: "Message"
2557
- }, De = /* @__PURE__ */ Object.assign(wa, {
2558
- props: {
2559
- error: {
2560
- type: Boolean,
2561
- default: !1
2562
- }
2563
- },
2564
- setup(n) {
2565
- var s;
2566
- const { t: e } = B("i18n"), t = P(!1), o = P(null), a = P((s = o.value) == null ? void 0 : s.strMessage);
2567
- pt(a, () => t.value = !1);
2568
- const i = () => t.value = !0;
2569
- return (f, g) => (w(), C("div", null, [
2570
- t.value ? q("", !0) : (w(), C("div", {
2571
- key: 0,
2572
- ref_key: "strMessage",
2573
- ref: o,
2574
- class: de(["flex mt-1 p-1 px-2 rounded text-sm", n.error ? "bg-red-100 text-red-600" : "bg-emerald-100 text-emerald-600"])
2575
- }, [
2576
- Mt(f.$slots, "default"),
2577
- h("div", {
2578
- class: "ml-auto cursor-pointer",
2579
- onClick: i,
2580
- "aria-label": _(e)("Close"),
2581
- "data-microtip-position": "top-left",
2582
- role: "tooltip"
2583
- }, ya, 8, va)
2584
- ], 2))
2585
- ]));
2586
- }
2587
- }), xa = /* @__PURE__ */ h("iframe", {
2540
+ const va = /* @__PURE__ */ h("iframe", {
2588
2541
  id: "download_frame",
2589
2542
  style: { display: "none" }
2590
- }, null, -1), _a = {
2543
+ }, null, -1), ba = {
2591
2544
  name: "VueFinder"
2592
- }, ka = /* @__PURE__ */ Object.assign(_a, {
2545
+ }, ya = /* @__PURE__ */ Object.assign(ba, {
2593
2546
  props: {
2594
2547
  url: {
2595
2548
  type: [String]
@@ -2673,10 +2626,10 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2673
2626
  current: g
2674
2627
  }, null, 8, ["selection", "current"])) : q("", !0),
2675
2628
  we(fa, { current: g }, null, 8, ["current"]),
2676
- xa
2629
+ va
2677
2630
  ], 2));
2678
2631
  }
2679
- }), Sa = /* @__PURE__ */ h("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), Da = { class: "fixed z-10 inset-0 overflow-y-auto" }, Ma = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl sm:w-full" }, Ca = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, $a = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Me = {
2632
+ }), wa = /* @__PURE__ */ h("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), xa = { class: "fixed z-10 inset-0 overflow-y-auto" }, _a = { class: "relative bg-white dark:bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:max-w-4xl md:max-w-2xl lg:max-w-3xl xl:max-w-5xl sm:w-full" }, ka = { class: "bg-white dark:bg-gray-800 px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Sa = { class: "bg-gray-50 dark:bg-gray-800 dark:border-t dark:border-gray-700 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, De = {
2680
2633
  __name: "ModalLayout",
2681
2634
  setup(n) {
2682
2635
  const e = B("emitter");
@@ -2691,17 +2644,17 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2691
2644
  onKeyup: o[1] || (o[1] = Ye((a) => _(e).emit("vf-modal-close"), ["esc"])),
2692
2645
  tabindex: "0"
2693
2646
  }, [
2694
- Sa,
2695
- h("div", Da, [
2647
+ wa,
2648
+ h("div", xa, [
2696
2649
  h("div", {
2697
2650
  class: "flex items-end sm:items-center justify-center min-h-full p-4 text-center sm:p-0",
2698
2651
  onMousedown: o[0] || (o[0] = Pe((a) => _(e).emit("vf-modal-close"), ["self"]))
2699
2652
  }, [
2700
- h("div", Ma, [
2701
- h("div", Ca, [
2653
+ h("div", _a, [
2654
+ h("div", ka, [
2702
2655
  Mt(t.$slots, "default")
2703
2656
  ]),
2704
- h("div", $a, [
2657
+ h("div", Sa, [
2705
2658
  Mt(t.$slots, "buttons")
2706
2659
  ])
2707
2660
  ])
@@ -2709,7 +2662,54 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2709
2662
  ])
2710
2663
  ], 32));
2711
2664
  }
2712
- }, Ea = { class: "sm:flex sm:items-start" }, Ta = /* @__PURE__ */ h("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2665
+ }, Da = ["aria-label"], Ma = /* @__PURE__ */ h("svg", {
2666
+ xmlns: "http://www.w3.org/2000/svg",
2667
+ fill: "none",
2668
+ viewBox: "0 0 24 24",
2669
+ "stroke-width": "1.5",
2670
+ stroke: "currentColor",
2671
+ class: "w-5 h-5"
2672
+ }, [
2673
+ /* @__PURE__ */ h("path", {
2674
+ "stroke-linecap": "round",
2675
+ "stroke-linejoin": "round",
2676
+ d: "M6 18L18 6M6 6l12 12"
2677
+ })
2678
+ ], -1), Ca = [
2679
+ Ma
2680
+ ], $a = {
2681
+ name: "Message"
2682
+ }, Me = /* @__PURE__ */ Object.assign($a, {
2683
+ props: {
2684
+ error: {
2685
+ type: Boolean,
2686
+ default: !1
2687
+ }
2688
+ },
2689
+ setup(n) {
2690
+ var s;
2691
+ const { t: e } = B("i18n"), t = P(!1), o = P(null), a = P((s = o.value) == null ? void 0 : s.strMessage);
2692
+ pt(a, () => t.value = !1);
2693
+ const i = () => t.value = !0;
2694
+ return (f, g) => (w(), C("div", null, [
2695
+ t.value ? q("", !0) : (w(), C("div", {
2696
+ key: 0,
2697
+ ref_key: "strMessage",
2698
+ ref: o,
2699
+ class: de(["flex mt-1 p-1 px-2 rounded text-sm", n.error ? "bg-red-100 text-red-600" : "bg-emerald-100 text-emerald-600"])
2700
+ }, [
2701
+ Mt(f.$slots, "default"),
2702
+ h("div", {
2703
+ class: "ml-auto cursor-pointer",
2704
+ onClick: i,
2705
+ "aria-label": _(e)("Close"),
2706
+ "data-microtip-position": "top-left",
2707
+ role: "tooltip"
2708
+ }, Ca, 8, Da)
2709
+ ], 2))
2710
+ ]));
2711
+ }
2712
+ }), Ea = { class: "sm:flex sm:items-start" }, Ta = /* @__PURE__ */ h("div", { class: "mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-gray-500 sm:mx-0 sm:h-10 sm:w-10" }, [
2713
2713
  /* @__PURE__ */ h("svg", {
2714
2714
  xmlns: "http://www.w3.org/2000/svg",
2715
2715
  class: "h-6 w-6 stroke-red-600 dark:stroke-red-200",
@@ -2779,7 +2779,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2779
2779
  }
2780
2780
  });
2781
2781
  };
2782
- return (g, m) => (w(), G(Me, null, {
2782
+ return (g, m) => (w(), G(De, null, {
2783
2783
  buttons: F(() => [
2784
2784
  h("button", {
2785
2785
  type: "button",
@@ -2804,7 +2804,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2804
2804
  d.type == "dir" ? (w(), C("svg", La, Va)) : (w(), C("svg", za, Ra)),
2805
2805
  h("span", Ha, $(d.basename), 1)
2806
2806
  ]))), 256)),
2807
- s.value.length ? (w(), G(De, {
2807
+ s.value.length ? (w(), G(Me, {
2808
2808
  key: 0,
2809
2809
  error: ""
2810
2810
  }, {
@@ -2846,7 +2846,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2846
2846
  },
2847
2847
  setup(n) {
2848
2848
  const e = B("emitter"), { t } = B("i18n");
2849
- return (o, a) => (w(), G(Me, null, {
2849
+ return (o, a) => (w(), G(De, null, {
2850
2850
  buttons: F(() => [
2851
2851
  h("button", {
2852
2852
  type: "button",
@@ -2913,7 +2913,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2913
2913
  }
2914
2914
  });
2915
2915
  };
2916
- return (g, m) => (w(), G(Me, null, {
2916
+ return (g, m) => (w(), G(De, null, {
2917
2917
  buttons: F(() => [
2918
2918
  h("button", {
2919
2919
  type: "button",
@@ -2942,7 +2942,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
2942
2942
  }, null, 40, as), [
2943
2943
  [We, i.value]
2944
2944
  ]),
2945
- s.value.length ? (w(), G(De, {
2945
+ s.value.length ? (w(), G(Me, {
2946
2946
  key: 0,
2947
2947
  error: ""
2948
2948
  }, {
@@ -3000,7 +3000,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
3000
3000
  }
3001
3001
  });
3002
3002
  };
3003
- return (g, m) => (w(), G(Me, null, {
3003
+ return (g, m) => (w(), G(De, null, {
3004
3004
  buttons: F(() => [
3005
3005
  h("button", {
3006
3006
  type: "button",
@@ -3029,7 +3029,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
3029
3029
  }, null, 40, ps), [
3030
3030
  [We, i.value]
3031
3031
  ]),
3032
- s.value.length ? (w(), G(De, {
3032
+ s.value.length ? (w(), G(Me, {
3033
3033
  key: 0,
3034
3034
  error: ""
3035
3035
  }, {
@@ -3112,7 +3112,7 @@ const va = ["aria-label"], ba = /* @__PURE__ */ h("svg", {
3112
3112
  [We, a.value]
3113
3113
  ])
3114
3114
  ])) : (w(), C("pre", xs, $(o.value), 1)),
3115
- g.value.length ? (w(), G(De, {
3115
+ g.value.length ? (w(), G(Me, {
3116
3116
  key: 2,
3117
3117
  error: m.value
3118
3118
  }, {
@@ -4352,7 +4352,7 @@ const hl = { class: "flex" }, fl = {
4352
4352
  alt: ""
4353
4353
  }, null, 8, gl)
4354
4354
  ]),
4355
- g.value.length ? (w(), G(De, {
4355
+ g.value.length ? (w(), G(Me, {
4356
4356
  key: 0,
4357
4357
  error: m.value
4358
4358
  }, {
@@ -4514,7 +4514,7 @@ const hl = { class: "flex" }, fl = {
4514
4514
  const m = t.value + "?" + Ne({ q: "download", adapter: e.selection.adapter, path: e.selection.item.path });
4515
4515
  o.emit("vf-download", m);
4516
4516
  };
4517
- return (m, d) => (w(), G(Me, null, {
4517
+ return (m, d) => (w(), G(De, null, {
4518
4518
  buttons: F(() => [
4519
4519
  h("button", {
4520
4520
  type: "button",
@@ -4642,7 +4642,7 @@ const hl = { class: "flex" }, fl = {
4642
4642
  }
4643
4643
  });
4644
4644
  };
4645
- return (m, d) => (w(), G(Me, null, {
4645
+ return (m, d) => (w(), G(De, null, {
4646
4646
  buttons: F(() => [
4647
4647
  h("button", {
4648
4648
  type: "button",
@@ -4674,7 +4674,7 @@ const hl = { class: "flex" }, fl = {
4674
4674
  }, null, 40, tc), [
4675
4675
  [We, s.value]
4676
4676
  ]),
4677
- f.value.length ? (w(), G(De, {
4677
+ f.value.length ? (w(), G(Me, {
4678
4678
  key: 0,
4679
4679
  error: ""
4680
4680
  }, {
@@ -4754,7 +4754,7 @@ const hl = { class: "flex" }, fl = {
4754
4754
  }
4755
4755
  }
4756
4756
  }), i.value.init();
4757
- }), (b, A) => (w(), G(Me, null, {
4757
+ }), (b, A) => (w(), G(De, null, {
4758
4758
  buttons: F(() => [
4759
4759
  h("button", {
4760
4760
  disabled: d.value,
@@ -4797,7 +4797,7 @@ const hl = { class: "flex" }, fl = {
4797
4797
  class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
4798
4798
  }, $(_(a)("Select Files")), 513)
4799
4799
  ], 512),
4800
- m.value.length ? (w(), G(De, {
4800
+ m.value.length ? (w(), G(Me, {
4801
4801
  key: 0,
4802
4802
  error: ""
4803
4803
  }, {
@@ -4884,7 +4884,7 @@ const hl = { class: "flex" }, fl = {
4884
4884
  }
4885
4885
  });
4886
4886
  };
4887
- return (m, d) => (w(), G(Me, null, {
4887
+ return (m, d) => (w(), G(De, null, {
4888
4888
  buttons: F(() => [
4889
4889
  h("button", {
4890
4890
  type: "button",
@@ -4916,7 +4916,7 @@ const hl = { class: "flex" }, fl = {
4916
4916
  }, null, 40, $c), [
4917
4917
  [We, i.value]
4918
4918
  ]),
4919
- s.value.length ? (w(), G(De, {
4919
+ s.value.length ? (w(), G(Me, {
4920
4920
  key: 0,
4921
4921
  error: ""
4922
4922
  }, {
@@ -5004,7 +5004,7 @@ const hl = { class: "flex" }, fl = {
5004
5004
  }
5005
5005
  });
5006
5006
  };
5007
- return (m, d) => (w(), G(Me, null, {
5007
+ return (m, d) => (w(), G(De, null, {
5008
5008
  buttons: F(() => [
5009
5009
  h("button", {
5010
5010
  type: "button",
@@ -5028,7 +5028,7 @@ const hl = { class: "flex" }, fl = {
5028
5028
  h("span", Uc, $(p.basename), 1)
5029
5029
  ]))), 256)),
5030
5030
  h("p", Kc, $(_(a)("The archive will be unarchived at")) + " (" + $(n.current.dirname) + ")", 1),
5031
- s.value.length ? (w(), G(De, {
5031
+ s.value.length ? (w(), G(Me, {
5032
5032
  key: 0,
5033
5033
  error: ""
5034
5034
  }, {
@@ -5129,7 +5129,7 @@ const hl = { class: "flex" }, fl = {
5129
5129
  }
5130
5130
  });
5131
5131
  };
5132
- return (g, m) => (w(), G(Me, null, {
5132
+ return (g, m) => (w(), G(De, null, {
5133
5133
  buttons: F(() => [
5134
5134
  h("button", {
5135
5135
  type: "button",
@@ -5157,7 +5157,7 @@ const hl = { class: "flex" }, fl = {
5157
5157
  lu,
5158
5158
  h("span", cu, $(n.selection.items.to.path), 1)
5159
5159
  ]),
5160
- s.value.length ? (w(), G(De, {
5160
+ s.value.length ? (w(), G(Me, {
5161
5161
  key: 0,
5162
5162
  error: ""
5163
5163
  }, {
@@ -5186,7 +5186,7 @@ const hl = { class: "flex" }, fl = {
5186
5186
  ModalUnarchive: Wc,
5187
5187
  ModalMove: du
5188
5188
  }, Symbol.toStringTag, { value: "Module" })), Dt = {
5189
- VueFinder: ka,
5189
+ VueFinder: ya,
5190
5190
  ...hu
5191
5191
  };
5192
5192
  const pu = {