@quidgest/ui 0.27.0 → 0.27.1
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/CHANGELOG.md +10 -0
- package/dist/json/api.json +1 -1
- package/dist/ui.css +1 -1
- package/dist/ui.esm.js +531 -528
- package/dist/ui.js +530 -527
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +530 -527
- package/dist/ui.scss +2 -2
- package/esm/components/QIcon/QSvgSymbol.d.ts.map +1 -1
- package/esm/components/QIcon/QSvgSymbol.vue.js +22 -34
- package/esm/components/QIcon/utils/svgSource.d.ts +18 -0
- package/esm/components/QIcon/utils/svgSource.d.ts.map +1 -0
- package/esm/components/QIcon/utils/svgSource.js +27 -0
- package/package.json +1 -1
package/dist/ui.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Quidgest UI v0.27.
|
|
2
|
+
* Quidgest UI v0.27.1
|
|
3
3
|
* (c) 2026 Quidgest - Consultores de Gestão, S.A.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -4032,7 +4032,7 @@ $input-group-addon-background: rgb(var(--q-theme-neutral-light-rgb) / 25%);
|
|
|
4032
4032
|
overflow-y: auto;
|
|
4033
4033
|
min-height: calc(var(--q-space-1) * 12.5);
|
|
4034
4034
|
max-height: calc(var(--q-space-1) * 20);
|
|
4035
|
-
gap: var(--q-space-
|
|
4035
|
+
gap: var(--q-space-1);
|
|
4036
4036
|
}
|
|
4037
4037
|
&--side-panel {
|
|
4038
4038
|
flex-direction: row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSvgSymbol.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QIcon/QSvgSymbol.vue"],"names":[],"mappings":"AASA;
|
|
1
|
+
{"version":3,"file":"QSvgSymbol.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QIcon/QSvgSymbol.vue"],"names":[],"mappings":"AASA;AA4NC;;;GAGG;AACH,KAAK,eAAe,GAAG;IACtB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;OAKG;IACH,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,UAAU,CAAA;IAEjD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;;;;;;;;;;YAxBS,MAAM;WAOP,MAAM;qBAQI,CAAC,GAAG,EAAE,UAAU,KAAK,UAAU;uBAQ7B,OAAO;;AAyN7B,wBAQG"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadSvg as e } from "./utils/svgSource.js";
|
|
2
|
+
import { computed as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, getCurrentInstance as a, mergeProps as o, nextTick as s, normalizeProps as c, onMounted as l, openBlock as u, ref as d, unref as f, useAttrs as p, watch as m } from "vue";
|
|
2
3
|
//#region src/components/QIcon/QSvgSymbol.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
4
|
+
var h = ["innerHTML"], g = /*@__PURE__*/ i({
|
|
4
5
|
name: "QSvgSymbol",
|
|
5
6
|
inheritAttrs: !1,
|
|
6
7
|
__name: "QSvgSymbol",
|
|
@@ -22,34 +23,35 @@ var m = ["innerHTML"], h = /*@__PURE__*/ r({
|
|
|
22
23
|
"unloaded",
|
|
23
24
|
"error"
|
|
24
25
|
],
|
|
25
|
-
setup(
|
|
26
|
-
let
|
|
26
|
+
setup(i, { emit: g }) {
|
|
27
|
+
let _ = i, v = g, y = p(), b = a(), x = d(null);
|
|
27
28
|
function S(e) {
|
|
28
29
|
let t = e;
|
|
29
|
-
if (
|
|
30
|
-
let n = e.getElementById(
|
|
30
|
+
if (_.symbol) {
|
|
31
|
+
let n = e.getElementById(_.symbol);
|
|
31
32
|
if (!n) return null;
|
|
32
33
|
t = n;
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
+
return _.transformSource && (t = _.transformSource(t.cloneNode(!0))), _.title && (_.transformSource || (t = t.cloneNode(!0)), k(t, _.title)), t;
|
|
35
36
|
}
|
|
36
|
-
let C =
|
|
37
|
+
let C = t(() => x.value ? S(x.value) : null), w = t(() => x.value !== null && C.value === null), T = t(() => {
|
|
37
38
|
if (!x.value || !C.value) return {};
|
|
38
39
|
let e = {};
|
|
39
40
|
return D(e, x.value), D(e, C.value), O(e, y), y.id || delete e.id, e;
|
|
40
41
|
});
|
|
41
|
-
async function E(
|
|
42
|
+
async function E(t) {
|
|
42
43
|
try {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
let n = e(t);
|
|
45
|
+
x.value && n.getIsPending() && !_.keepDuringLoading && (x.value = null, v("unloaded")), x.value = await n, await s();
|
|
46
|
+
let r = b?.proxy?.$el;
|
|
47
|
+
r instanceof Element && v("loaded", r);
|
|
48
|
+
} catch (e) {
|
|
49
|
+
x.value && (x.value = null, v("unloaded")), v("error", e);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
|
|
51
|
-
E(
|
|
52
|
-
}),
|
|
52
|
+
l(() => {
|
|
53
|
+
E(_.src);
|
|
54
|
+
}), m(() => _.src, (e) => {
|
|
53
55
|
E(e);
|
|
54
56
|
});
|
|
55
57
|
function D(e, t) {
|
|
@@ -59,14 +61,7 @@ var m = ["innerHTML"], h = /*@__PURE__*/ r({
|
|
|
59
61
|
function O(e, t) {
|
|
60
62
|
for (let [n, r] of Object.entries(t)) r !== !1 && r != null && (e[n] = r);
|
|
61
63
|
}
|
|
62
|
-
|
|
63
|
-
let t = await fetch(e);
|
|
64
|
-
if (!t.ok) throw Error("Error loading SVG");
|
|
65
|
-
let n = await t.text(), r = new DOMParser().parseFromString(n, "text/xml").getElementsByTagName("svg")[0];
|
|
66
|
-
if (!r) throw Error("Loaded file is not a valid SVG");
|
|
67
|
-
return r;
|
|
68
|
-
}
|
|
69
|
-
function A(e, t) {
|
|
64
|
+
function k(e, t) {
|
|
70
65
|
let n = e.getElementsByTagName("title");
|
|
71
66
|
if (n.length) n[0].textContent = t;
|
|
72
67
|
else {
|
|
@@ -74,15 +69,8 @@ var m = ["innerHTML"], h = /*@__PURE__*/ r({
|
|
|
74
69
|
n.textContent = t, e.insertBefore(n, e.firstChild);
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
|
-
|
|
78
|
-
if (e.getIsPending) return e;
|
|
79
|
-
let t = !0, n = e.then((e) => (t = !1, e), (e) => {
|
|
80
|
-
throw t = !1, e;
|
|
81
|
-
});
|
|
82
|
-
return n.getIsPending = () => t, n;
|
|
83
|
-
}
|
|
84
|
-
return (e, r) => w.value ? (l(), n("div", s(a({ key: 0 }, d(y))), null, 16)) : C.value ? (l(), n("svg", a({ key: 1 }, T.value, { innerHTML: C.value.innerHTML }), null, 16, m)) : t("v-if", !0);
|
|
72
|
+
return (e, t) => w.value ? (u(), r("div", c(o({ key: 0 }, f(y))), null, 16)) : C.value ? (u(), r("svg", o({ key: 1 }, T.value, { innerHTML: C.value.innerHTML }), null, 16, h)) : n("v-if", !0);
|
|
85
73
|
}
|
|
86
74
|
});
|
|
87
75
|
//#endregion
|
|
88
|
-
export {
|
|
76
|
+
export { g as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface PromiseWithState<T> extends Promise<T> {
|
|
2
|
+
getIsPending: () => boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Returns the SVG document at `src`, downloading it only on first use.
|
|
6
|
+
* A failed download is evicted so a later call can retry it.
|
|
7
|
+
* Every caller gets the same element, so clone it before changing it.
|
|
8
|
+
*
|
|
9
|
+
* @param src - The SVG URL.
|
|
10
|
+
* @returns A promise for the root `<svg>` element, shared by all callers.
|
|
11
|
+
*/
|
|
12
|
+
export declare function loadSvg(src: string): PromiseWithState<SVGSVGElement>;
|
|
13
|
+
/**
|
|
14
|
+
* Empties the cache so the next `loadSvg` call downloads again.
|
|
15
|
+
* Used by tests to keep cached bundles from leaking between cases.
|
|
16
|
+
*/
|
|
17
|
+
export declare function clearSvgCache(): void;
|
|
18
|
+
//# sourceMappingURL=svgSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgSource.d.ts","sourceRoot":"","sources":["../../../../src/components/QIcon/utils/svgSource.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACtD,YAAY,EAAE,MAAM,OAAO,CAAA;CAC3B;AAQD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAapE;AAED;;;GAGG;AACH,wBAAgB,aAAa,SAE5B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/components/QIcon/utils/svgSource.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Map();
|
|
3
|
+
function t(t) {
|
|
4
|
+
let i = e.get(t);
|
|
5
|
+
if (!i) {
|
|
6
|
+
let a = r(n(t));
|
|
7
|
+
a.catch(() => {
|
|
8
|
+
e.get(t) === a && e.delete(t);
|
|
9
|
+
}), e.set(t, a), i = a;
|
|
10
|
+
}
|
|
11
|
+
return i;
|
|
12
|
+
}
|
|
13
|
+
async function n(e) {
|
|
14
|
+
let t = await fetch(e);
|
|
15
|
+
if (!t.ok) throw Error("Error loading SVG");
|
|
16
|
+
let n = await t.text(), r = new DOMParser().parseFromString(n, "text/xml").getElementsByTagName("svg")[0];
|
|
17
|
+
if (!r) throw Error("Loaded file is not a valid SVG");
|
|
18
|
+
return r;
|
|
19
|
+
}
|
|
20
|
+
function r(e) {
|
|
21
|
+
let t = !0, n = e.then((e) => (t = !1, e), (e) => {
|
|
22
|
+
throw t = !1, e;
|
|
23
|
+
});
|
|
24
|
+
return n.getIsPending = () => t, n;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { t as loadSvg };
|