@leaflink/stash 48.13.1 → 48.15.0
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/assets/icons/loading-empty.svg +3 -0
- package/assets/spritesheet.svg +1 -1
- package/dist/Accordion.vue.d.ts +2 -2
- package/dist/AppNavigationItem.vue.d.ts +1 -1
- package/dist/Icon.js +1 -0
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/QuickAction.vue.d.ts +1 -1
- package/dist/SearchBar.js +60 -51
- package/dist/SearchBar.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +1 -1
- package/dist/TextEditor.vue.d.ts +1 -1
- package/dist/colors-8d9b9429.js +7 -0
- package/dist/colors-8d9b9429.js.map +1 -0
- package/dist/components.css +1 -1
- package/dist/getContrastingTextColor.d.ts +4 -0
- package/dist/index.js +164 -165
- package/dist/index.js.map +1 -1
- package/dist/utils/getContrastingTextColor.js +40 -0
- package/dist/utils/getContrastingTextColor.js.map +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
1
|
+
import w from "./locale.js";
|
|
2
|
+
import { defineComponent as y, computed as X, openBlock as x, createBlock as Y, mergeProps as D, createSlots as P, renderList as N, unref as _, withCtx as I, createVNode as j, h as $, render as H } from "vue";
|
|
3
|
+
import B from "lodash-es/omit";
|
|
4
4
|
import F from "./useDialog.js";
|
|
5
5
|
import q from "./CustomRender.js";
|
|
6
6
|
import A from "./Dialog.js";
|
|
7
|
-
import { M as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { overridePersistentStorage as
|
|
11
|
-
import { persistentStorage as
|
|
12
|
-
import { S as
|
|
13
|
-
import {
|
|
7
|
+
import { M as R } from "./MenusPlugin-9288029a.js";
|
|
8
|
+
import G from "./ModalsPlugin.js";
|
|
9
|
+
import U from "./ToastsPlugin.js";
|
|
10
|
+
import { overridePersistentStorage as V } from "./storage.js";
|
|
11
|
+
import { persistentStorage as Dt } from "./storage.js";
|
|
12
|
+
import { S as Nt, a as _t, b as It } from "./colors-8d9b9429.js";
|
|
13
|
+
import { S as Ht, a as Bt } from "./misc-76697f61.js";
|
|
14
|
+
import { a as qt, S as At, b as Rt } from "./statusLevels-a8b041f4.js";
|
|
14
15
|
import "lodash-es/get";
|
|
15
16
|
import "lodash-es/capitalize";
|
|
16
17
|
import "lodash-es/uniqueId";
|
|
@@ -33,27 +34,27 @@ import "lodash-es/camelCase";
|
|
|
33
34
|
import "lodash-es/isFinite";
|
|
34
35
|
import "lodash-es/isPlainObject";
|
|
35
36
|
import "./constants.js";
|
|
36
|
-
function
|
|
37
|
-
return
|
|
37
|
+
function L(s) {
|
|
38
|
+
return s.type.indexOf("mouse") !== -1 ? s.clientX : s.touches[0].clientX;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
40
|
+
function M(s) {
|
|
41
|
+
return s.type.indexOf("mouse") !== -1 ? s.clientY : s.touches[0].clientY;
|
|
41
42
|
}
|
|
42
|
-
var
|
|
43
|
-
var
|
|
43
|
+
var z = function() {
|
|
44
|
+
var s = !1;
|
|
44
45
|
try {
|
|
45
|
-
var
|
|
46
|
+
var o = Object.defineProperty({}, "passive", {
|
|
46
47
|
get: function() {
|
|
47
|
-
|
|
48
|
+
s = !0;
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
|
-
window.addEventListener("test", null,
|
|
51
|
+
window.addEventListener("test", null, o);
|
|
51
52
|
} catch {
|
|
52
53
|
}
|
|
53
|
-
return
|
|
54
|
-
}(),
|
|
55
|
-
install: function(
|
|
56
|
-
var
|
|
54
|
+
return s;
|
|
55
|
+
}(), J = {
|
|
56
|
+
install: function(s, o) {
|
|
57
|
+
var d = Object.assign({}, {
|
|
57
58
|
disableClick: !1,
|
|
58
59
|
tapTolerance: 10,
|
|
59
60
|
// px
|
|
@@ -68,215 +69,213 @@ var J = function() {
|
|
|
68
69
|
// ms
|
|
69
70
|
rollOverFrequency: 100
|
|
70
71
|
// ms
|
|
71
|
-
},
|
|
72
|
-
function
|
|
73
|
-
var t = this.$$touchObj, r =
|
|
74
|
-
r && (t.lastTouchStartTime =
|
|
75
|
-
t.touchHoldTimer = null,
|
|
76
|
-
}, t.options.touchHoldTolerance)),
|
|
72
|
+
}, o);
|
|
73
|
+
function a(e) {
|
|
74
|
+
var t = this.$$touchObj, r = e.type.indexOf("touch") >= 0, m = e.type.indexOf("mouse") >= 0, f = this;
|
|
75
|
+
r && (t.lastTouchStartTime = e.timeStamp), !(m && t.lastTouchStartTime && e.timeStamp - t.lastTouchStartTime < 350) && (t.touchStarted || (C(this), t.touchStarted = !0, t.touchMoved = !1, t.swipeOutBounded = !1, t.startX = L(e), t.startY = M(e), t.currentX = 0, t.currentY = 0, t.touchStartTime = e.timeStamp, t.hasSwipe = c(this, "swipe") || c(this, "swipe.left") || c(this, "swipe.right") || c(this, "swipe.top") || c(this, "swipe.bottom"), c(this, "hold") && (t.touchHoldTimer = setTimeout(function() {
|
|
76
|
+
t.touchHoldTimer = null, T(e, f, "hold");
|
|
77
|
+
}, t.options.touchHoldTolerance)), T(e, this, "press")));
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
var t = this.$$touchObj, r =
|
|
80
|
-
if (t.currentX = r, t.currentY =
|
|
79
|
+
function p(e) {
|
|
80
|
+
var t = this.$$touchObj, r = L(e), m = M(e), f = t.currentX != r || t.currentY != m;
|
|
81
|
+
if (t.currentX = r, t.currentY = m, t.touchMoved) {
|
|
81
82
|
if (t.hasSwipe && !t.swipeOutBounded) {
|
|
82
|
-
var
|
|
83
|
-
t.swipeOutBounded = Math.abs(t.startX - t.currentX) >
|
|
83
|
+
var n = t.options.swipeTolerance;
|
|
84
|
+
t.swipeOutBounded = Math.abs(t.startX - t.currentX) > n && Math.abs(t.startY - t.currentY) > n;
|
|
84
85
|
}
|
|
85
86
|
} else {
|
|
86
|
-
var
|
|
87
|
-
t.touchMoved = Math.abs(t.startX - t.currentX) >
|
|
87
|
+
var u = t.options.tapTolerance;
|
|
88
|
+
t.touchMoved = Math.abs(t.startX - t.currentX) > u || Math.abs(t.startY - t.currentY) > u, t.touchMoved && (g(t), T(e, this, "drag.once"));
|
|
88
89
|
}
|
|
89
|
-
if (
|
|
90
|
-
var
|
|
91
|
-
(t.touchRollTime == null ||
|
|
90
|
+
if (c(this, "rollover") && f) {
|
|
91
|
+
var i = e.timeStamp, E = t.options.rollOverFrequency;
|
|
92
|
+
(t.touchRollTime == null || i > t.touchRollTime + E) && (t.touchRollTime = i, T(e, this, "rollover"));
|
|
92
93
|
}
|
|
93
|
-
if (
|
|
94
|
-
var
|
|
95
|
-
(t.touchDragTime == null ||
|
|
94
|
+
if (c(this, "drag") && t.touchStarted && t.touchMoved && f) {
|
|
95
|
+
var i = e.timeStamp, E = t.options.dragFrequency;
|
|
96
|
+
(t.touchDragTime == null || i > t.touchDragTime + E) && (t.touchDragTime = i, T(e, this, "drag"));
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
-
var
|
|
100
|
-
|
|
99
|
+
function v() {
|
|
100
|
+
var e = this.$$touchObj;
|
|
101
|
+
g(e), S(this), e.touchStarted = e.touchMoved = !1, e.startX = e.startY = 0;
|
|
101
102
|
}
|
|
102
|
-
function
|
|
103
|
-
var t = this.$$touchObj, r =
|
|
104
|
-
r && (t.lastTouchEndTime =
|
|
105
|
-
var
|
|
106
|
-
if (
|
|
107
|
-
if (
|
|
103
|
+
function l(e) {
|
|
104
|
+
var t = this.$$touchObj, r = e.type.indexOf("touch") >= 0, m = e.type.indexOf("mouse") >= 0;
|
|
105
|
+
r && (t.lastTouchEndTime = e.timeStamp);
|
|
106
|
+
var f = r && !t.touchHoldTimer;
|
|
107
|
+
if (g(t), t.touchStarted = !1, S(this), !(m && t.lastTouchEndTime && e.timeStamp - t.lastTouchEndTime < 350))
|
|
108
|
+
if (T(e, this, "release"), t.touchMoved) {
|
|
108
109
|
if (t.hasSwipe && !t.swipeOutBounded) {
|
|
109
|
-
var
|
|
110
|
-
(
|
|
110
|
+
var u = t.options.swipeTolerance, n, i = Math.abs(t.startY - t.currentY), E = Math.abs(t.startX - t.currentX);
|
|
111
|
+
(i > u || E > u) && (i > u ? n = t.startY > t.currentY ? "top" : "bottom" : n = t.startX > t.currentX ? "left" : "right", c(this, "swipe." + n) ? T(e, this, "swipe." + n, n) : T(e, this, "swipe", n));
|
|
111
112
|
}
|
|
112
|
-
} else if (
|
|
113
|
-
|
|
114
|
-
else if (
|
|
115
|
-
|
|
113
|
+
} else if (c(this, "longtap") && e.timeStamp - t.touchStartTime > t.options.longTapTimeInterval)
|
|
114
|
+
e.cancelable && e.preventDefault(), T(e, this, "longtap");
|
|
115
|
+
else if (c(this, "hold") && f) {
|
|
116
|
+
e.cancelable && e.preventDefault();
|
|
116
117
|
return;
|
|
117
118
|
} else
|
|
118
|
-
|
|
119
|
+
T(e, this, "tap");
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
121
|
+
function h() {
|
|
122
|
+
C(this);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
124
|
+
function b() {
|
|
125
|
+
S(this);
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
-
var r =
|
|
127
|
+
function c(e, t) {
|
|
128
|
+
var r = e.$$touchObj.callbacks[t];
|
|
128
129
|
return r != null && r.length > 0;
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
131
|
+
function T(e, t, r, m) {
|
|
132
|
+
var f = t.$$touchObj, u = f.callbacks[r];
|
|
133
|
+
if (u == null || u.length === 0)
|
|
133
134
|
return null;
|
|
134
|
-
for (var
|
|
135
|
-
var
|
|
136
|
-
|
|
135
|
+
for (var n = 0; n < u.length; n++) {
|
|
136
|
+
var i = u[n];
|
|
137
|
+
i.modifiers.stop && e.stopPropagation(), i.modifiers.prevent && e.preventDefault(), !(i.modifiers.self && e.target !== e.currentTarget) && typeof i.value == "function" && (m ? i.value(m, e) : i.value(e));
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
var t =
|
|
141
|
-
t &&
|
|
140
|
+
function C(e) {
|
|
141
|
+
var t = e.$$touchObj.options.touchClass;
|
|
142
|
+
t && e.classList.add(t);
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
-
var t =
|
|
145
|
-
t &&
|
|
144
|
+
function S(e) {
|
|
145
|
+
var t = e.$$touchObj.options.touchClass;
|
|
146
|
+
t && e.classList.remove(t);
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
148
|
+
function g(e) {
|
|
149
|
+
e.touchHoldTimer && (clearTimeout(e.touchHoldTimer), e.touchHoldTimer = null);
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
-
var r =
|
|
151
|
+
function O(e, t) {
|
|
152
|
+
var r = e.$$touchObj || {
|
|
152
153
|
// an object contains all callbacks registered,
|
|
153
154
|
// key is event name, value is an array
|
|
154
155
|
callbacks: {},
|
|
155
156
|
// prevent bind twice, set to true when event bound
|
|
156
157
|
hasBindTouchEvents: !1,
|
|
157
158
|
// default options, would be override by v-touch-options
|
|
158
|
-
options:
|
|
159
|
+
options: d
|
|
159
160
|
};
|
|
160
|
-
return t && (r.options = Object.assign({}, r.options, t)),
|
|
161
|
+
return t && (r.options = Object.assign({}, r.options, t)), e.$$touchObj = r, e.$$touchObj;
|
|
161
162
|
}
|
|
162
|
-
|
|
163
|
-
beforeMount: function(
|
|
164
|
-
var r =
|
|
165
|
-
switch (
|
|
163
|
+
s.directive("touch", {
|
|
164
|
+
beforeMount: function(e, t) {
|
|
165
|
+
var r = O(e), m = z ? { passive: !0 } : !1, f = t.arg || "tap";
|
|
166
|
+
switch (f) {
|
|
166
167
|
case "swipe":
|
|
167
|
-
var
|
|
168
|
-
if (
|
|
169
|
-
for (var
|
|
170
|
-
if (["left", "right", "top", "bottom"].indexOf(
|
|
171
|
-
var
|
|
172
|
-
r.callbacks[
|
|
168
|
+
var u = t.modifiers;
|
|
169
|
+
if (u.left || u.right || u.top || u.bottom) {
|
|
170
|
+
for (var n in t.modifiers)
|
|
171
|
+
if (["left", "right", "top", "bottom"].indexOf(n) >= 0) {
|
|
172
|
+
var i = "swipe." + n;
|
|
173
|
+
r.callbacks[i] = r.callbacks[i] || [], r.callbacks[i].push(t);
|
|
173
174
|
}
|
|
174
175
|
} else
|
|
175
176
|
r.callbacks.swipe = r.callbacks.swipe || [], r.callbacks.swipe.push(t);
|
|
176
177
|
break;
|
|
177
178
|
case "press":
|
|
178
179
|
case "drag":
|
|
179
|
-
t.modifiers.disablePassive && (
|
|
180
|
+
t.modifiers.disablePassive && (m = !1);
|
|
180
181
|
default:
|
|
181
|
-
r.callbacks[
|
|
182
|
+
r.callbacks[f] = r.callbacks[f] || [], r.callbacks[f].push(t);
|
|
182
183
|
}
|
|
183
|
-
r.hasBindTouchEvents || (
|
|
184
|
+
r.hasBindTouchEvents || (e.addEventListener("touchstart", a, m), e.addEventListener("touchmove", p, m), e.addEventListener("touchcancel", v), e.addEventListener("touchend", l), r.options.disableClick || (e.addEventListener("mousedown", a), e.addEventListener("mousemove", p), e.addEventListener("mouseup", l), e.addEventListener("mouseenter", h), e.addEventListener("mouseleave", b)), r.hasBindTouchEvents = !0);
|
|
184
185
|
},
|
|
185
|
-
unmounted: function(
|
|
186
|
-
|
|
186
|
+
unmounted: function(e) {
|
|
187
|
+
e.removeEventListener("touchstart", a), e.removeEventListener("touchmove", p), e.removeEventListener("touchcancel", v), e.removeEventListener("touchend", l), e.$$touchObj && !e.$$touchObj.options.disableClick && (e.removeEventListener("mousedown", a), e.removeEventListener("mousemove", p), e.removeEventListener("mouseup", l), e.removeEventListener("mouseenter", h), e.removeEventListener("mouseleave", b)), delete e.$$touchObj;
|
|
187
188
|
}
|
|
188
|
-
}),
|
|
189
|
-
beforeMount: function(
|
|
190
|
-
|
|
189
|
+
}), s.directive("touch-class", {
|
|
190
|
+
beforeMount: function(e, t) {
|
|
191
|
+
O(e, {
|
|
191
192
|
touchClass: t.value
|
|
192
193
|
});
|
|
193
194
|
}
|
|
194
|
-
}),
|
|
195
|
-
beforeMount: function(
|
|
196
|
-
|
|
195
|
+
}), s.directive("touch-options", {
|
|
196
|
+
beforeMount: function(e, t) {
|
|
197
|
+
O(e, t.value);
|
|
197
198
|
}
|
|
198
199
|
});
|
|
199
200
|
}
|
|
200
201
|
};
|
|
201
|
-
const
|
|
202
|
+
const K = /* @__PURE__ */ y({
|
|
202
203
|
__name: "Dialogs",
|
|
203
|
-
setup(
|
|
204
|
-
const
|
|
205
|
-
function
|
|
206
|
-
var
|
|
207
|
-
(
|
|
204
|
+
setup(s) {
|
|
205
|
+
const o = F(), d = X(() => o.active ? B(o.active, ["deferred", "onConfirm", "onCancel", "slots"]) : null);
|
|
206
|
+
function a() {
|
|
207
|
+
var v, l, h;
|
|
208
|
+
(v = o.active) != null && v.onCancel && o.active.onCancel(), (h = (l = o.active) == null ? void 0 : l.deferred) == null || h.resolve({
|
|
208
209
|
isCanceled: !0
|
|
209
|
-
}),
|
|
210
|
+
}), o.close();
|
|
210
211
|
}
|
|
211
|
-
async function
|
|
212
|
-
var
|
|
213
|
-
(
|
|
212
|
+
async function p() {
|
|
213
|
+
var v, l, h;
|
|
214
|
+
(v = o.active) != null && v.onConfirm && await o.active.onConfirm(), (h = (l = o.active) == null ? void 0 : l.deferred) == null || h.resolve({
|
|
214
215
|
isConfirmed: !0
|
|
215
|
-
}),
|
|
216
|
+
}), o.close();
|
|
216
217
|
}
|
|
217
|
-
return (
|
|
218
|
-
var
|
|
219
|
-
return
|
|
220
|
-
open: !!
|
|
221
|
-
},
|
|
222
|
-
onConfirm:
|
|
223
|
-
onCancel:
|
|
224
|
-
}),
|
|
225
|
-
|
|
226
|
-
name:
|
|
227
|
-
fn:
|
|
228
|
-
|
|
218
|
+
return (v, l) => {
|
|
219
|
+
var h;
|
|
220
|
+
return x(), Y(A, D({
|
|
221
|
+
open: !!d.value
|
|
222
|
+
}, d.value, {
|
|
223
|
+
onConfirm: p,
|
|
224
|
+
onCancel: a
|
|
225
|
+
}), P({ _: 2 }, [
|
|
226
|
+
N((h = _(o).active) == null ? void 0 : h.slots, (b, c) => ({
|
|
227
|
+
name: c,
|
|
228
|
+
fn: I(() => [
|
|
229
|
+
j(q, { render: b }, null, 8, ["render"])
|
|
229
230
|
])
|
|
230
231
|
}))
|
|
231
232
|
]), 1040, ["open"]);
|
|
232
233
|
};
|
|
233
234
|
}
|
|
234
|
-
}), k = "stash-dialogs-mount-node",
|
|
235
|
-
install(
|
|
236
|
-
const
|
|
237
|
-
let
|
|
238
|
-
if (
|
|
235
|
+
}), k = "stash-dialogs-mount-node", Q = {
|
|
236
|
+
install(s, o) {
|
|
237
|
+
const d = (o == null ? void 0 : o.mountNodeId) || k;
|
|
238
|
+
let a = document.getElementById(d);
|
|
239
|
+
if (a)
|
|
239
240
|
return;
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
document.body.appendChild(
|
|
241
|
+
a = document.createElement("div"), a.id = d, a.dataset.test = k, o != null && o.mountNodeClass && a.classList.add(o.mountNodeClass);
|
|
242
|
+
const p = j($(K));
|
|
243
|
+
document.body.appendChild(a), p.appContext = s._context, H(p, a);
|
|
243
244
|
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
staticPath: c = "/static",
|
|
251
|
-
images: g = {
|
|
245
|
+
}, Xt = {
|
|
246
|
+
install(s, {
|
|
247
|
+
i18n: o = void 0,
|
|
248
|
+
storage: d = void 0,
|
|
249
|
+
staticPath: a = "/static",
|
|
250
|
+
images: p = {
|
|
252
251
|
provider: "static"
|
|
253
252
|
},
|
|
254
|
-
googleMapsApiKey:
|
|
255
|
-
menus:
|
|
256
|
-
modals:
|
|
257
|
-
toasts:
|
|
258
|
-
dialogs:
|
|
253
|
+
googleMapsApiKey: v = void 0,
|
|
254
|
+
menus: l,
|
|
255
|
+
modals: h,
|
|
256
|
+
toasts: b,
|
|
257
|
+
dialogs: c
|
|
259
258
|
} = {}) {
|
|
260
|
-
|
|
261
|
-
i18n:
|
|
262
|
-
images:
|
|
263
|
-
storage:
|
|
264
|
-
staticPath:
|
|
265
|
-
googleMapsApiKey:
|
|
266
|
-
}),
|
|
259
|
+
s.use(J), o && (w.use(o.locale), w.i18n(o && o.t)), d && V(d), s.provide("stashOptions", {
|
|
260
|
+
i18n: o,
|
|
261
|
+
images: p,
|
|
262
|
+
storage: d,
|
|
263
|
+
staticPath: a,
|
|
264
|
+
googleMapsApiKey: v
|
|
265
|
+
}), l !== !1 && s.use(R, l), h !== !1 && s.use(G, h), b !== !1 && s.use(U, b), c !== !1 && s.use(Q, c);
|
|
267
266
|
}
|
|
268
267
|
};
|
|
269
268
|
export {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
269
|
+
Ht as SpacingDensity,
|
|
270
|
+
Nt as StashColors,
|
|
271
|
+
_t as StashCommonColors,
|
|
272
|
+
Bt as StashImageProvider,
|
|
273
|
+
It as StashPrimaryColors,
|
|
274
|
+
qt as StatusColors,
|
|
275
|
+
At as StatusIcons,
|
|
276
|
+
Rt as StatusSeverities,
|
|
277
|
+
Xt as default,
|
|
278
|
+
V as overridePersistentStorage,
|
|
279
|
+
Dt as persistentStorage
|
|
281
280
|
};
|
|
282
281
|
//# sourceMappingURL=index.js.map
|