@ptlm-azulejo/pagination 1.0.0-alpha.251 → 1.0.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/dist/index.js +64 -33
- package/package.json +1 -1
- package/CHANGELOG.md +0 -10
package/dist/index.js
CHANGED
|
@@ -2,15 +2,21 @@ import { Fragment as He, computed as G, createCommentVNode as Ze, createElementB
|
|
|
2
2
|
import "@ptlm-azulejo/icons/style.css";
|
|
3
3
|
function _e(e) {
|
|
4
4
|
var r, o, t = "";
|
|
5
|
-
if (typeof e == "string" || typeof e == "number")
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
if (typeof e == "string" || typeof e == "number")
|
|
6
|
+
t += e;
|
|
7
|
+
else if (typeof e == "object")
|
|
8
|
+
if (Array.isArray(e)) {
|
|
9
|
+
var n = e.length;
|
|
10
|
+
for (r = 0; r < n; r++)
|
|
11
|
+
e[r] && (o = _e(e[r])) && (t && (t += " "), t += o);
|
|
12
|
+
} else
|
|
13
|
+
for (o in e)
|
|
14
|
+
e[o] && (t && (t += " "), t += o);
|
|
10
15
|
return t;
|
|
11
16
|
}
|
|
12
17
|
function or() {
|
|
13
|
-
for (var e, r, o = 0, t = "", n = arguments.length; o < n; o++)
|
|
18
|
+
for (var e, r, o = 0, t = "", n = arguments.length; o < n; o++)
|
|
19
|
+
(e = arguments[o]) && (r = _e(e)) && (t && (t += " "), t += r);
|
|
14
20
|
return t;
|
|
15
21
|
}
|
|
16
22
|
function H(e) {
|
|
@@ -22,11 +28,13 @@ function H(e) {
|
|
|
22
28
|
}, H(e);
|
|
23
29
|
}
|
|
24
30
|
function tr(e, r) {
|
|
25
|
-
if (H(e) != "object" || !e)
|
|
31
|
+
if (H(e) != "object" || !e)
|
|
32
|
+
return e;
|
|
26
33
|
var o = e[Symbol.toPrimitive];
|
|
27
34
|
if (o !== void 0) {
|
|
28
35
|
var t = o.call(e, r || "default");
|
|
29
|
-
if (H(t) != "object")
|
|
36
|
+
if (H(t) != "object")
|
|
37
|
+
return t;
|
|
30
38
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31
39
|
}
|
|
32
40
|
return (r === "string" ? String : Number)(e);
|
|
@@ -66,8 +74,10 @@ function nr(e) {
|
|
|
66
74
|
}
|
|
67
75
|
var ir = (e, r) => {
|
|
68
76
|
const o = new Array(e.length + r.length);
|
|
69
|
-
for (let t = 0; t < e.length; t++)
|
|
70
|
-
|
|
77
|
+
for (let t = 0; t < e.length; t++)
|
|
78
|
+
o[t] = e[t];
|
|
79
|
+
for (let t = 0; t < r.length; t++)
|
|
80
|
+
o[e.length + t] = r[t];
|
|
71
81
|
return o;
|
|
72
82
|
}, lr = (e, r) => ({
|
|
73
83
|
classGroupId: e,
|
|
@@ -80,7 +90,8 @@ var ir = (e, r) => {
|
|
|
80
90
|
const r = mr(e), { conflictingClassGroups: o, conflictingClassGroupModifiers: t } = e;
|
|
81
91
|
return {
|
|
82
92
|
getClassGroupId: (c) => {
|
|
83
|
-
if (c.startsWith("[") && c.endsWith("]"))
|
|
93
|
+
if (c.startsWith("[") && c.endsWith("]"))
|
|
94
|
+
return ur(c);
|
|
84
95
|
const b = c.split(ce), d = b[0] === "" && b.length > 1 ? 1 : 0;
|
|
85
96
|
return Ee(b, d, r);
|
|
86
97
|
},
|
|
@@ -93,18 +104,22 @@ var ir = (e, r) => {
|
|
|
93
104
|
}
|
|
94
105
|
};
|
|
95
106
|
}, Ee = (e, r, o) => {
|
|
96
|
-
if (e.length - r === 0)
|
|
107
|
+
if (e.length - r === 0)
|
|
108
|
+
return o.classGroupId;
|
|
97
109
|
const t = e[r], n = o.nextPart.get(t);
|
|
98
110
|
if (n) {
|
|
99
111
|
const d = Ee(e, r + 1, n);
|
|
100
|
-
if (d)
|
|
112
|
+
if (d)
|
|
113
|
+
return d;
|
|
101
114
|
}
|
|
102
115
|
const i = o.validators;
|
|
103
|
-
if (i === null)
|
|
116
|
+
if (i === null)
|
|
117
|
+
return;
|
|
104
118
|
const c = r === 0 ? e.join(ce) : e.slice(r).join(ce), b = i.length;
|
|
105
119
|
for (let d = 0; d < b; d++) {
|
|
106
120
|
const p = i[d];
|
|
107
|
-
if (p.validator(c))
|
|
121
|
+
if (p.validator(c))
|
|
122
|
+
return p.classGroupId;
|
|
108
123
|
}
|
|
109
124
|
}, ur = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
110
125
|
const r = e.slice(1, -1), o = r.indexOf(":"), t = r.slice(0, o);
|
|
@@ -160,12 +175,13 @@ var ir = (e, r) => {
|
|
|
160
175
|
}
|
|
161
176
|
return o;
|
|
162
177
|
}, vr = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, yr = (e) => {
|
|
163
|
-
if (e < 1)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
178
|
+
if (e < 1)
|
|
179
|
+
return {
|
|
180
|
+
get: () => {
|
|
181
|
+
},
|
|
182
|
+
set: () => {
|
|
183
|
+
}
|
|
184
|
+
};
|
|
169
185
|
let r = 0, o = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null);
|
|
170
186
|
const n = (i, c) => {
|
|
171
187
|
o[i] = c, r++, r > e && (r = 0, t = o, o = /* @__PURE__ */ Object.create(null));
|
|
@@ -173,7 +189,8 @@ var ir = (e, r) => {
|
|
|
173
189
|
return {
|
|
174
190
|
get(i) {
|
|
175
191
|
let c = o[i];
|
|
176
|
-
if (c !== void 0)
|
|
192
|
+
if (c !== void 0)
|
|
193
|
+
return c;
|
|
177
194
|
if ((c = t[i]) !== void 0)
|
|
178
195
|
return n(i, c), c;
|
|
179
196
|
},
|
|
@@ -245,7 +262,9 @@ var ir = (e, r) => {
|
|
|
245
262
|
postfixLookupClassGroupIds: Cr(e)
|
|
246
263
|
}, dr(e)), Cr = (e) => {
|
|
247
264
|
const r = /* @__PURE__ */ Object.create(null), o = e.postfixLookupClassGroups;
|
|
248
|
-
if (o)
|
|
265
|
+
if (o)
|
|
266
|
+
for (let t = 0; t < o.length; t++)
|
|
267
|
+
r[o[t]] = !0;
|
|
249
268
|
return r;
|
|
250
269
|
}, Sr = /\s+/, Pr = (e, r) => {
|
|
251
270
|
const { parseClassName: o, getClassGroupId: t, getConflictingClassGroupIds: n, sortModifiers: i, postfixLookupClassGroupIds: c } = r, b = [], d = e.trim().split(Sr);
|
|
@@ -261,7 +280,8 @@ var ir = (e, r) => {
|
|
|
261
280
|
y = t(w.substring(0, P));
|
|
262
281
|
const A = y && c[y] ? t(w) : void 0;
|
|
263
282
|
A && A !== y && (y = A, L = !1);
|
|
264
|
-
} else
|
|
283
|
+
} else
|
|
284
|
+
y = t(w);
|
|
265
285
|
if (!y) {
|
|
266
286
|
if (!L) {
|
|
267
287
|
p = v + (p.length > 0 ? " " + p : p);
|
|
@@ -274,7 +294,8 @@ var ir = (e, r) => {
|
|
|
274
294
|
L = !1;
|
|
275
295
|
}
|
|
276
296
|
const D = S.length === 0 ? "" : S.length === 1 ? S[0] : i(S).join(":"), _ = O ? D + he : D, V = _ + y;
|
|
277
|
-
if (b.indexOf(V) > -1)
|
|
297
|
+
if (b.indexOf(V) > -1)
|
|
298
|
+
continue;
|
|
278
299
|
b.push(V);
|
|
279
300
|
const E = n(y, L);
|
|
280
301
|
for (let A = 0; A < E.length; ++A) {
|
|
@@ -286,12 +307,15 @@ var ir = (e, r) => {
|
|
|
286
307
|
return p;
|
|
287
308
|
}, Ar = (...e) => {
|
|
288
309
|
let r = 0, o, t, n = "";
|
|
289
|
-
for (; r < e.length; )
|
|
310
|
+
for (; r < e.length; )
|
|
311
|
+
(o = e[r++]) && (t = Fe(o)) && (n && (n += " "), n += t);
|
|
290
312
|
return n;
|
|
291
313
|
}, Fe = (e) => {
|
|
292
|
-
if (typeof e == "string")
|
|
314
|
+
if (typeof e == "string")
|
|
315
|
+
return e;
|
|
293
316
|
let r, o = "";
|
|
294
|
-
for (let t = 0; t < e.length; t++)
|
|
317
|
+
for (let t = 0; t < e.length; t++)
|
|
318
|
+
e[t] && (r = Fe(e[t])) && (o && (o += " "), o += r);
|
|
295
319
|
return o;
|
|
296
320
|
}, Re = (e, ...r) => {
|
|
297
321
|
let o, t, n, i;
|
|
@@ -300,7 +324,8 @@ var ir = (e, r) => {
|
|
|
300
324
|
return o = zr(p), t = o.cache.get, n = o.cache.set, i = b, b(d);
|
|
301
325
|
}, b = (d) => {
|
|
302
326
|
const p = t(d);
|
|
303
|
-
if (p)
|
|
327
|
+
if (p)
|
|
328
|
+
return p;
|
|
304
329
|
const f = Pr(d, o);
|
|
305
330
|
return n(d, f), f;
|
|
306
331
|
};
|
|
@@ -1792,9 +1817,13 @@ var ir = (e, r) => {
|
|
|
1792
1817
|
}, Xr = (e, { cacheSize: r, prefix: o, experimentalParseClassName: t, extend: n = {}, override: i = {} }) => (J(e, "cacheSize", r), J(e, "prefix", o), J(e, "experimentalParseClassName", t), ie(e.theme, i.theme), ie(e.classGroups, i.classGroups), ie(e.conflictingClassGroups, i.conflictingClassGroups), ie(e.conflictingClassGroupModifiers, i.conflictingClassGroupModifiers), J(e, "postfixLookupClassGroups", i.postfixLookupClassGroups), J(e, "orderSensitiveModifiers", i.orderSensitiveModifiers), le(e.theme, n.theme), le(e.classGroups, n.classGroups), le(e.conflictingClassGroups, n.conflictingClassGroups), le(e.conflictingClassGroupModifiers, n.conflictingClassGroupModifiers), ve(e, n, "postfixLookupClassGroups"), ve(e, n, "orderSensitiveModifiers"), e), J = (e, r, o) => {
|
|
1793
1818
|
o !== void 0 && (e[r] = o);
|
|
1794
1819
|
}, ie = (e, r) => {
|
|
1795
|
-
if (r)
|
|
1820
|
+
if (r)
|
|
1821
|
+
for (const o in r)
|
|
1822
|
+
J(e, o, r[o]);
|
|
1796
1823
|
}, le = (e, r) => {
|
|
1797
|
-
if (r)
|
|
1824
|
+
if (r)
|
|
1825
|
+
for (const o in r)
|
|
1826
|
+
ve(e, r, o);
|
|
1798
1827
|
}, ve = (e, r, o) => {
|
|
1799
1828
|
const t = r[o];
|
|
1800
1829
|
t !== void 0 && (e[o] = e[o] ? e[o].concat(t) : t);
|
|
@@ -1869,11 +1898,13 @@ var Hr = ["id", "aria-label"], Zr = ["disabled"], eo = ["for"], ro = [
|
|
|
1869
1898
|
} }, d = e, p = r, f = G(() => d.options.findIndex((k) => k.value === d.modelValue)), v = G(() => f.value <= 0), R = G(() => f.value < 0 || f.value >= d.options.length - 1), S = G(() => `${d.id}-select`), O = (k) => {
|
|
1870
1899
|
k !== d.modelValue && p("update:modelValue", k);
|
|
1871
1900
|
}, w = () => {
|
|
1872
|
-
if (f.value <= 0)
|
|
1901
|
+
if (f.value <= 0)
|
|
1902
|
+
return;
|
|
1873
1903
|
const k = d.options[f.value - 1];
|
|
1874
1904
|
k && O(k.value);
|
|
1875
1905
|
}, P = () => {
|
|
1876
|
-
if (f.value < 0 || f.value >= d.options.length - 1)
|
|
1906
|
+
if (f.value < 0 || f.value >= d.options.length - 1)
|
|
1907
|
+
return;
|
|
1877
1908
|
const k = d.options[f.value + 1];
|
|
1878
1909
|
k && O(k.value);
|
|
1879
1910
|
}, L = (k) => {
|
package/package.json
CHANGED
package/CHANGELOG.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
## 1.0.0
|
|
4
|
-
|
|
5
|
-
### Major Changes
|
|
6
|
-
|
|
7
|
-
- b407df7: Add `AzPagination`, a navigation control with previous/next actions and an optional page select, including a compact variant without the dropdown.
|
|
8
|
-
|
|
9
|
-
All notable changes to this project will be documented in this file.
|
|
10
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|