@solar-taro/ui-vant 1.0.1 → 1.0.3

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.
Files changed (137) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/index.js +32 -1762
  3. package/index10.js +236 -0
  4. package/index100.js +7 -0
  5. package/index101.js +8 -0
  6. package/index102.js +9 -0
  7. package/index103.js +12 -0
  8. package/index104.js +9 -0
  9. package/index105.js +20 -0
  10. package/index106.js +7 -0
  11. package/index107.js +7 -0
  12. package/index108.js +6 -0
  13. package/index109.js +6 -0
  14. package/index11.js +48 -0
  15. package/index110.js +17 -0
  16. package/index111.js +10 -0
  17. package/index112.js +8 -0
  18. package/index113.js +8 -0
  19. package/index114.js +8 -0
  20. package/index115.js +8 -0
  21. package/index116.js +8 -0
  22. package/index117.js +9 -0
  23. package/index118.js +5 -0
  24. package/index119.js +20 -0
  25. package/index12.js +21 -0
  26. package/index120.js +8 -0
  27. package/index121.js +6 -0
  28. package/index122.js +12 -0
  29. package/index123.js +8 -0
  30. package/index124.js +7 -0
  31. package/index125.js +8 -0
  32. package/index126.js +6 -0
  33. package/index127.js +5 -0
  34. package/index128.js +7 -0
  35. package/index129.js +7 -0
  36. package/index13.js +31 -0
  37. package/index130.js +13 -0
  38. package/index131.js +9 -0
  39. package/index132.js +9 -0
  40. package/index133.js +7 -0
  41. package/index134.js +10 -0
  42. package/index135.js +5 -0
  43. package/index14.js +7 -0
  44. package/index15.js +66 -0
  45. package/index16.js +4 -0
  46. package/index17.js +4 -0
  47. package/index18.js +4 -0
  48. package/index19.js +4 -0
  49. package/index2.js +9 -0
  50. package/index20.js +4 -0
  51. package/index21.js +4 -0
  52. package/index22.js +4 -0
  53. package/index23.js +4 -0
  54. package/index24.js +4 -0
  55. package/index25.js +8 -0
  56. package/index26.js +11 -0
  57. package/index27.js +11 -0
  58. package/index28.js +65 -0
  59. package/index29.js +6 -0
  60. package/index3.js +131 -0
  61. package/index30.js +10 -0
  62. package/index31.js +9 -0
  63. package/index32.js +6 -0
  64. package/index33.js +4 -0
  65. package/index34.js +8 -0
  66. package/index35.js +12 -0
  67. package/index36.js +7 -0
  68. package/index37.js +6 -0
  69. package/index38.js +5 -0
  70. package/index39.js +6 -0
  71. package/index4.js +172 -0
  72. package/index40.js +10 -0
  73. package/index41.js +7 -0
  74. package/index42.js +7 -0
  75. package/index43.js +9 -0
  76. package/index44.js +8 -0
  77. package/index45.js +11 -0
  78. package/index46.js +7 -0
  79. package/index47.js +9 -0
  80. package/index48.js +7 -0
  81. package/index49.js +12 -0
  82. package/index5.js +36 -0
  83. package/index50.js +9 -0
  84. package/index51.js +20 -0
  85. package/index52.js +14 -0
  86. package/index53.js +9 -0
  87. package/index54.js +15 -0
  88. package/index55.js +6 -0
  89. package/index56.js +14 -0
  90. package/index57.js +10 -0
  91. package/index58.js +12 -0
  92. package/index59.js +8 -0
  93. package/index6.js +102 -0
  94. package/index60.js +8 -0
  95. package/index61.js +11 -0
  96. package/index62.js +18 -0
  97. package/index63.js +8 -0
  98. package/index64.js +8 -0
  99. package/index65.js +11 -0
  100. package/index66.js +9 -0
  101. package/index67.js +8 -0
  102. package/index68.js +8 -0
  103. package/index69.js +9 -0
  104. package/index7.js +46 -0
  105. package/index70.js +9 -0
  106. package/index71.js +28 -0
  107. package/index72.js +8 -0
  108. package/index73.js +42 -0
  109. package/index74.js +9 -0
  110. package/index75.js +8 -0
  111. package/index76.js +17 -0
  112. package/index77.js +10 -0
  113. package/index78.js +4 -0
  114. package/index79.js +5 -0
  115. package/index8.js +272 -0
  116. package/index80.js +6 -0
  117. package/index81.js +6 -0
  118. package/index82.js +6 -0
  119. package/index83.js +6 -0
  120. package/index84.js +6 -0
  121. package/index85.js +17 -0
  122. package/index86.js +5 -0
  123. package/index87.js +15 -0
  124. package/index88.js +7 -0
  125. package/index89.js +16 -0
  126. package/index9.js +64 -0
  127. package/index90.js +11 -0
  128. package/index91.js +5 -0
  129. package/index92.js +8 -0
  130. package/index93.js +8 -0
  131. package/index94.js +8 -0
  132. package/index95.js +10 -0
  133. package/index96.js +20 -0
  134. package/index97.js +13 -0
  135. package/index98.js +8 -0
  136. package/index99.js +7 -0
  137. package/package.json +1 -1
package/index131.js ADDED
@@ -0,0 +1,9 @@
1
+ import r from "./index135.js";
2
+ var e = Object.prototype, o = e.hasOwnProperty;
3
+ function p(t) {
4
+ var a = this.__data__;
5
+ return r ? a[t] !== void 0 : o.call(a, t);
6
+ }
7
+ export {
8
+ p as default
9
+ };
package/index132.js ADDED
@@ -0,0 +1,9 @@
1
+ import e from "./index135.js";
2
+ var h = "__lodash_hash_undefined__";
3
+ function s(t, a) {
4
+ var _ = this.__data__;
5
+ return this.size += this.has(t) ? 0 : 1, _[t] = e && a === void 0 ? h : a, this;
6
+ }
7
+ export {
8
+ s as default
9
+ };
package/index133.js ADDED
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ var o = typeof t;
3
+ return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? t !== "__proto__" : t === null;
4
+ }
5
+ export {
6
+ e as default
7
+ };
package/index134.js ADDED
@@ -0,0 +1,10 @@
1
+ import r from "./index29.js";
2
+ function o(t, n) {
3
+ for (var e = t.length; e--; )
4
+ if (r(t[e][0], n))
5
+ return e;
6
+ return -1;
7
+ }
8
+ export {
9
+ o as default
10
+ };
package/index135.js ADDED
@@ -0,0 +1,5 @@
1
+ import e from "./index104.js";
2
+ var a = e(Object, "create");
3
+ export {
4
+ a as default
5
+ };
package/index14.js ADDED
@@ -0,0 +1,7 @@
1
+ const r = (t, o) => {
2
+ var e;
3
+ t.setAttribute("readonly", (e = o.value) != null ? e : !0);
4
+ };
5
+ export {
6
+ r as vReadonly
7
+ };
package/index15.js ADDED
@@ -0,0 +1,66 @@
1
+ const i = {};
2
+ function e(r) {
3
+ Object.assign(i, r);
4
+ }
5
+ class a {
6
+ constructor() {
7
+ this.duration = 2e3;
8
+ }
9
+ primary(n, t = "#van-notify") {
10
+ return i.notify({ type: "primary", message: n, duration: this.duration, selector: t });
11
+ }
12
+ success(n, t = "#van-notify") {
13
+ return i.notify({ type: "success", message: n, duration: this.duration, selector: t });
14
+ }
15
+ warning(n, t = "#van-notify") {
16
+ return i.notify({ type: "warning", message: n, duration: this.duration, selector: t });
17
+ }
18
+ danger(n, t = "#van-notify") {
19
+ return i.notify({ type: "danger", message: n, duration: this.duration, selector: t });
20
+ }
21
+ dismiss() {
22
+ return i.notify.clear();
23
+ }
24
+ }
25
+ class s {
26
+ /**
27
+ * 展示确认对话框
28
+ * @param title
29
+ * @param message
30
+ * @param options 其他 dialog 选项
31
+ */
32
+ confirm(n, t, o) {
33
+ return i.dialog.confirm({
34
+ title: n,
35
+ message: t,
36
+ ...o
37
+ });
38
+ }
39
+ /**
40
+ * 展示警告对话框
41
+ * @param title
42
+ * @param message
43
+ * @param options 其他 dialog 选项
44
+ */
45
+ alert(n, t, o) {
46
+ return i.dialog.alert({
47
+ title: n,
48
+ message: t,
49
+ ...o
50
+ });
51
+ }
52
+ /**
53
+ * 关闭对话框
54
+ */
55
+ dismiss() {
56
+ return i.dialog.close();
57
+ }
58
+ }
59
+ const u = new s(), c = new a();
60
+ export {
61
+ s as Dialog,
62
+ a as Notify,
63
+ u as dialog,
64
+ c as notify,
65
+ e as setupOverlay
66
+ };
package/index16.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index3.js";
2
+ export {
3
+ f as default
4
+ };
package/index17.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index6.js";
2
+ export {
3
+ f as default
4
+ };
package/index18.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index5.js";
2
+ export {
3
+ f as default
4
+ };
package/index19.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index4.js";
2
+ export {
3
+ f as default
4
+ };
package/index2.js ADDED
@@ -0,0 +1,9 @@
1
+ import { vReadonly as r } from "./index14.js";
2
+ const a = {
3
+ install(o) {
4
+ o.directive("readonly", r);
5
+ }
6
+ };
7
+ export {
8
+ a as SolarVant
9
+ };
package/index20.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index8.js";
2
+ export {
3
+ f as default
4
+ };
package/index21.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index7.js";
2
+ export {
3
+ f as default
4
+ };
package/index22.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index9.js";
2
+ export {
3
+ f as default
4
+ };
package/index23.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index10.js";
2
+ export {
3
+ f as default
4
+ };
package/index24.js ADDED
@@ -0,0 +1,4 @@
1
+ import f from "./index11.js";
2
+ export {
3
+ f as default
4
+ };
package/index25.js ADDED
@@ -0,0 +1,8 @@
1
+ import o from "./index28.js";
2
+ var r = 1, n = 4;
3
+ function L(e) {
4
+ return o(e, r | n);
5
+ }
6
+ export {
7
+ L as default
8
+ };
package/index26.js ADDED
@@ -0,0 +1,11 @@
1
+ import { ref as i } from "vue";
2
+ import { takeUntilDestroyed as s } from "./index117.js";
3
+ function a(e, o) {
4
+ const t = i(o);
5
+ return (typeof e == "function" ? e() : e).pipe(s()).subscribe((r) => {
6
+ t.value = r;
7
+ }), t;
8
+ }
9
+ export {
10
+ a as useObservable
11
+ };
package/index27.js ADDED
@@ -0,0 +1,11 @@
1
+ import { Subject as o } from "rxjs";
2
+ import { onUnmounted as t } from "vue";
3
+ function m() {
4
+ const e = new o();
5
+ return t(() => {
6
+ e.next(), e.complete();
7
+ }), e;
8
+ }
9
+ export {
10
+ m as useDestroyed
11
+ };
package/index28.js ADDED
@@ -0,0 +1,65 @@
1
+ import S from "./index62.js";
2
+ import L from "./index60.js";
3
+ import B from "./index57.js";
4
+ import I from "./index63.js";
5
+ import O from "./index64.js";
6
+ import _ from "./index65.js";
7
+ import M from "./index66.js";
8
+ import l from "./index67.js";
9
+ import w from "./index68.js";
10
+ import D from "./index69.js";
11
+ import G from "./index70.js";
12
+ import N from "./index71.js";
13
+ import U from "./index72.js";
14
+ import h from "./index73.js";
15
+ import x from "./index74.js";
16
+ import K from "./index33.js";
17
+ import P from "./index37.js";
18
+ import R from "./index42.js";
19
+ import W from "./index41.js";
20
+ import Y from "./index46.js";
21
+ import q from "./index50.js";
22
+ import H from "./index53.js";
23
+ var J = 1, Q = 2, V = 4, A = "[object Arguments]", X = "[object Array]", Z = "[object Boolean]", $ = "[object Date]", u = "[object Error]", d = "[object Function]", z = "[object GeneratorFunction]", k = "[object Map]", v = "[object Number]", E = "[object Object]", rr = "[object RegExp]", or = "[object Set]", tr = "[object String]", er = "[object Symbol]", ir = "[object WeakMap]", nr = "[object ArrayBuffer]", fr = "[object DataView]", ar = "[object Float32Array]", mr = "[object Float64Array]", cr = "[object Int8Array]", gr = "[object Int16Array]", pr = "[object Int32Array]", br = "[object Uint8Array]", Tr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", yr = "[object Uint32Array]", o = {};
24
+ o[A] = o[X] = o[nr] = o[fr] = o[Z] = o[$] = o[ar] = o[mr] = o[cr] = o[gr] = o[pr] = o[k] = o[v] = o[E] = o[rr] = o[or] = o[tr] = o[er] = o[br] = o[Tr] = o[jr] = o[yr] = !0;
25
+ o[u] = o[d] = o[ir] = !1;
26
+ function p(r, f, g, sr, b, i) {
27
+ var t, m = f & J, c = f & Q, F = f & V;
28
+ if (t !== void 0)
29
+ return t;
30
+ if (!W(r))
31
+ return r;
32
+ var T = K(r);
33
+ if (T) {
34
+ if (t = U(r), !m)
35
+ return M(r, t);
36
+ } else {
37
+ var a = N(r), j = a == d || a == z;
38
+ if (P(r))
39
+ return _(r, m);
40
+ if (a == E || a == A || j && !b) {
41
+ if (t = c || j ? {} : x(r), !m)
42
+ return c ? w(r, O(t, r)) : l(r, I(t, r));
43
+ } else {
44
+ if (!o[a])
45
+ return b ? r : {};
46
+ t = h(r, a, m);
47
+ }
48
+ }
49
+ i || (i = new S());
50
+ var y = i.get(r);
51
+ if (y)
52
+ return y;
53
+ i.set(r, t), Y(r) ? r.forEach(function(e) {
54
+ t.add(p(e, f, g, e, r, i));
55
+ }) : R(r) && r.forEach(function(e, n) {
56
+ t.set(n, p(e, f, g, n, r, i));
57
+ });
58
+ var C = F ? c ? G : D : c ? H : q, s = T ? void 0 : C(r);
59
+ return L(s || r, function(e, n) {
60
+ s && (n = e, e = r[n]), B(t, n, p(e, f, g, n, r, i));
61
+ }), t;
62
+ }
63
+ export {
64
+ p as default
65
+ };
package/index29.js ADDED
@@ -0,0 +1,6 @@
1
+ function t(n, f) {
2
+ return n === f || n !== n && f !== f;
3
+ }
4
+ export {
5
+ t as default
6
+ };
package/index3.js ADDED
@@ -0,0 +1,131 @@
1
+ import { defineComponent as E, ref as N, computed as r, mergeProps as I, createElementVNode as L, openBlock as P, createElementBlock as $, createCommentVNode as q } from "vue";
2
+ import y from "./index25.js";
3
+ const D = I, A = L, v = P, h = $, T = q, j = ["show"], z = ["title", "value-key", "columns", "loading"], H = /* @__PURE__ */ E({
4
+ inheritAttrs: !1,
5
+ __name: "index",
6
+ props: {
7
+ show: { type: Boolean },
8
+ labelKey: { default: "fullName" },
9
+ valueKey: { default: "id" },
10
+ pidKey: { default: "pid" },
11
+ searchable: { type: Boolean, default: !0 },
12
+ title: {},
13
+ loading: { type: Boolean },
14
+ options: { default: () => [] },
15
+ modelValue: {},
16
+ required: { type: Boolean }
17
+ },
18
+ emits: ["close", "cancel", "confirm", "update:show", "update:modelValue"],
19
+ setup(K, { emit: g }) {
20
+ const u = g, n = K, a = N(""), d = r(() => {
21
+ const e = y(n.options);
22
+ for (let t = 0; t < e.length - 1; t++) {
23
+ const o = e[t];
24
+ for (let l = 0; l < o.length; l++) {
25
+ const i = o[l];
26
+ i.children = e[t + 1].filter((s) => s[n.pidKey] === i[n.valueKey]);
27
+ }
28
+ }
29
+ return e[0];
30
+ }), p = r(() => y(d.value).map((e) => c(e)).flat()), C = r(() => {
31
+ const e = n.options[n.options.length - 1].find((t) => t[n.valueKey] === n.modelValue);
32
+ return e ? x(e) : m();
33
+ });
34
+ function w() {
35
+ n.required || u("update:modelValue", null), u("cancel", n.modelValue), f();
36
+ }
37
+ function f() {
38
+ u("update:show", !1), u("close");
39
+ }
40
+ function V({ detail: e }) {
41
+ const t = e.value[e.value.length - 1];
42
+ u("update:modelValue", t[n.valueKey]), u("confirm", B(t)), u("update:show", !1);
43
+ }
44
+ function k({ detail: e }) {
45
+ const { picker: t, value: o, index: l } = e;
46
+ !a.value && l < n.options.length - 1 && t.setColumnValues(
47
+ l + 1,
48
+ n.options[l + 1].filter((i) => i[n.pidKey] === o[l][n.valueKey])
49
+ );
50
+ }
51
+ function b({ detail: e }) {
52
+ a.value = e.trim().toLowerCase(), m();
53
+ }
54
+ function B(e) {
55
+ const t = [n.options[n.options.length - 1].find((o) => o[n.valueKey] === e[n.valueKey] && o[n.pidKey] === e[n.pidKey])];
56
+ for (let o = n.options.length - 2; o >= 0; o--)
57
+ t.unshift(
58
+ n.options[o].find((l) => {
59
+ var i;
60
+ return l[n.valueKey] === ((i = t[0]) == null ? void 0 : i[n.pidKey]);
61
+ })
62
+ );
63
+ return t;
64
+ }
65
+ function c(e, t = "") {
66
+ var i;
67
+ let o = [], l = t + e[n.labelKey];
68
+ return (i = e.children) != null && i.length ? e.children.forEach((s) => {
69
+ o = o.concat(c(s, l + " / "));
70
+ }) : (e[n.labelKey] = l, o.push(e)), o;
71
+ }
72
+ function m() {
73
+ var o;
74
+ if (a.value)
75
+ return [{
76
+ values: p.value.filter((l) => l[n.labelKey].toLowerCase().includes(a.value))
77
+ }];
78
+ const e = [];
79
+ let t = d.value;
80
+ for (; t; )
81
+ e.push({ values: t }), t = (o = t[0]) == null ? void 0 : o.children;
82
+ return e;
83
+ }
84
+ function x(e) {
85
+ if (a.value) {
86
+ const o = p.value.filter((l) => l[n.labelKey].toLowerCase().includes(a.value));
87
+ return [{
88
+ values: o,
89
+ defaultIndex: o.findIndex((l) => l[n.valueKey] === e[n.valueKey])
90
+ }];
91
+ }
92
+ const t = [];
93
+ for (let o = n.options.length - 1; o >= 0; o--) {
94
+ const l = n.options[o].filter((i) => i[n.pidKey] === e[n.pidKey]);
95
+ t[o] = {
96
+ values: l,
97
+ defaultIndex: l.findIndex((i) => i[n.valueKey] === e[n.valueKey])
98
+ }, o > 0 && (e = n.options[o - 1].find((i) => i[n.valueKey] === e[n.pidKey]));
99
+ }
100
+ return t;
101
+ }
102
+ return (e, t) => (v(), h("van-popup", {
103
+ show: e.show,
104
+ position: "bottom",
105
+ round: !0,
106
+ "close-on-click-overlay": !0,
107
+ onClose: t[4] || (t[4] = (o) => f())
108
+ }, [
109
+ A("van-picker", D(e.$attrs, {
110
+ title: e.title,
111
+ "show-toolbar": !0,
112
+ "value-key": e.labelKey,
113
+ columns: C.value,
114
+ loading: e.loading,
115
+ onCancel: t[0] || (t[0] = (o) => w()),
116
+ onConfirm: t[1] || (t[1] = (o) => V(o)),
117
+ onChange: t[2] || (t[2] = (o) => k(o))
118
+ }), null, 16, z),
119
+ e.searchable && e.options.length ? (v(), h("van-search", {
120
+ key: 0,
121
+ shape: "round",
122
+ "input-align": "center",
123
+ placeholder: "请输入搜索关键词",
124
+ onChange: t[3] || (t[3] = (o) => b(o))
125
+ }, null, 32)) : T("", !0)
126
+ ], 40, j));
127
+ }
128
+ });
129
+ export {
130
+ H as default
131
+ };
package/index30.js ADDED
@@ -0,0 +1,10 @@
1
+ import e from "./index31.js";
2
+ import o from "./index32.js";
3
+ var t = Object.prototype, a = t.hasOwnProperty, n = t.propertyIsEnumerable, c = e(/* @__PURE__ */ function() {
4
+ return arguments;
5
+ }()) ? e : function(r) {
6
+ return o(r) && a.call(r, "callee") && !n.call(r, "callee");
7
+ };
8
+ export {
9
+ c as default
10
+ };
package/index31.js ADDED
@@ -0,0 +1,9 @@
1
+ import t from "./index40.js";
2
+ import e from "./index32.js";
3
+ var s = "[object Arguments]";
4
+ function m(r) {
5
+ return e(r) && t(r) == s;
6
+ }
7
+ export {
8
+ m as default
9
+ };
package/index32.js ADDED
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t != null && typeof t == "object";
3
+ }
4
+ export {
5
+ e as default
6
+ };
package/index33.js ADDED
@@ -0,0 +1,4 @@
1
+ var r = Array.isArray;
2
+ export {
3
+ r as default
4
+ };
package/index34.js ADDED
@@ -0,0 +1,8 @@
1
+ import t from "./index35.js";
2
+ import i from "./index36.js";
3
+ function e(r) {
4
+ return r != null && i(r.length) && !t(r);
5
+ }
6
+ export {
7
+ e as default
8
+ };
package/index35.js ADDED
@@ -0,0 +1,12 @@
1
+ import o from "./index40.js";
2
+ import r from "./index41.js";
3
+ var e = "[object AsyncFunction]", a = "[object Function]", c = "[object GeneratorFunction]", i = "[object Proxy]";
4
+ function g(n) {
5
+ if (!r(n))
6
+ return !1;
7
+ var t = o(n);
8
+ return t == a || t == c || t == e || t == i;
9
+ }
10
+ export {
11
+ g as default
12
+ };
package/index36.js ADDED
@@ -0,0 +1,7 @@
1
+ var n = 9007199254740991;
2
+ function r(t) {
3
+ return typeof t == "number" && t > -1 && t % 1 == 0 && t <= n;
4
+ }
5
+ export {
6
+ r as default
7
+ };
package/index37.js ADDED
@@ -0,0 +1,6 @@
1
+ import f from "./index38.js";
2
+ import t from "./index39.js";
3
+ var r = typeof exports == "object" && exports && !exports.nodeType && exports, e = r && typeof module == "object" && module && !module.nodeType && module, u = e && e.exports === r, o = u ? f.Buffer : void 0, p = o ? o.isBuffer : void 0, a = p || t;
4
+ export {
5
+ a as default
6
+ };
package/index38.js ADDED
@@ -0,0 +1,5 @@
1
+ import e from "./index78.js";
2
+ var t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
3
+ export {
4
+ r as default
5
+ };
package/index39.js ADDED
@@ -0,0 +1,6 @@
1
+ function e() {
2
+ return !1;
3
+ }
4
+ export {
5
+ e as default
6
+ };