@quidgest/ui 0.16.35 → 0.16.36
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/json/api.json +1 -1
- package/dist/ui.css +24 -6
- package/dist/ui.esm.js +619 -621
- package/dist/ui.js +4 -4
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +3 -3
- package/dist/ui.scss +23 -5
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.vue.js +58 -60
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QPropertyListGroup as
|
|
3
|
-
import { DEFAULT_TEXTS as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as A, ref as p, computed as g, watch as G, nextTick as Q, createElementBlock as u, openBlock as s, normalizeClass as h, createElementVNode as a, createBlock as f, createCommentVNode as c, Fragment as y, renderList as k, unref as m, withCtx as _, renderSlot as F } from "vue";
|
|
2
|
+
import { QPropertyListGroup as W, QPropertyListRow as N, QPropertyListPanel as O } from "./index.js";
|
|
3
|
+
import { DEFAULT_TEXTS as V, DEFAULT_ICONS as $ } from "./types.js";
|
|
4
|
+
const D = ["id"], U = { class: "q-property-list__table" }, j = /* @__PURE__ */ A({
|
|
5
5
|
__name: "QPropertyList",
|
|
6
6
|
props: {
|
|
7
7
|
id: {},
|
|
@@ -13,14 +13,14 @@ const U = ["id"], W = { class: "q-property-list__table" }, j = /* @__PURE__ */ G
|
|
|
13
13
|
noPanel: { type: Boolean },
|
|
14
14
|
noToggle: { type: Boolean },
|
|
15
15
|
readonly: { type: Boolean },
|
|
16
|
-
icons: { default: () =>
|
|
17
|
-
texts: { default: () =>
|
|
16
|
+
icons: { default: () => $ },
|
|
17
|
+
texts: { default: () => V }
|
|
18
18
|
},
|
|
19
19
|
emits: ["field-change", "select-field"],
|
|
20
|
-
setup(
|
|
21
|
-
const t =
|
|
20
|
+
setup(C, { emit: b }) {
|
|
21
|
+
const t = C, v = b, d = p(t.groups.map((e) => e.id)), n = p(void 0), r = p(null), x = g(() => t.groups.length ? t.groups.filter(
|
|
22
22
|
(e) => t.fields.some((o) => o.group === e.id)
|
|
23
|
-
) : [{ id: "", title: "" }]),
|
|
23
|
+
) : [{ id: "", title: "" }]), P = g(() => [
|
|
24
24
|
"q-property-list",
|
|
25
25
|
{
|
|
26
26
|
"q-property-list--side-panel": t.panelPosition === "right",
|
|
@@ -28,54 +28,52 @@ const U = ["id"], W = { class: "q-property-list__table" }, j = /* @__PURE__ */ G
|
|
|
28
28
|
},
|
|
29
29
|
t.class
|
|
30
30
|
]);
|
|
31
|
-
function
|
|
32
|
-
if (!r.value) return;
|
|
33
|
-
const e = r.value.offsetWidth;
|
|
34
|
-
r.value.style.width = `${e}px`;
|
|
35
|
-
}
|
|
36
|
-
function q() {
|
|
31
|
+
function B() {
|
|
37
32
|
var e;
|
|
38
|
-
(e = r.value) != null && e.contains(document.activeElement) || (
|
|
39
|
-
}
|
|
40
|
-
function B(e) {
|
|
41
|
-
return e ? t.fields.filter((o) => o.group === e) : t.fields;
|
|
33
|
+
(e = r.value) != null && e.contains(document.activeElement) || (n.value = void 0);
|
|
42
34
|
}
|
|
43
35
|
function L(e) {
|
|
44
|
-
|
|
45
|
-
o === -1 ? u.value.push(e) : u.value.splice(o, 1);
|
|
36
|
+
return e ? t.fields.filter((o) => o.group === e) : t.fields;
|
|
46
37
|
}
|
|
47
38
|
function T(e) {
|
|
39
|
+
const o = d.value.indexOf(e);
|
|
40
|
+
o === -1 ? d.value.push(e) : d.value.splice(o, 1);
|
|
41
|
+
}
|
|
42
|
+
function q(e) {
|
|
48
43
|
var l;
|
|
49
|
-
const o = e.group && !u.value.includes(e.group), n = ((l = s.value) == null ? void 0 : l.id) === e.id;
|
|
50
44
|
return [
|
|
51
45
|
{
|
|
52
|
-
"q-property-list__row--
|
|
53
|
-
"q-property-list__row--selected": n
|
|
46
|
+
"q-property-list__row--selected": ((l = n.value) == null ? void 0 : l.id) === e.id
|
|
54
47
|
}
|
|
55
48
|
];
|
|
56
49
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
50
|
+
function w(e) {
|
|
51
|
+
n.value = e, v("select-field", n.value.id);
|
|
59
52
|
}
|
|
60
|
-
function
|
|
53
|
+
function E(e, o) {
|
|
61
54
|
t.readonly || (e.props.readonly ?? !1) || v("field-change", e, o);
|
|
62
55
|
}
|
|
63
|
-
|
|
56
|
+
function R() {
|
|
57
|
+
if (!r.value) return;
|
|
58
|
+
const e = r.value.offsetWidth;
|
|
59
|
+
r.value.style.minWidth = `${e}px`;
|
|
60
|
+
}
|
|
61
|
+
return G(
|
|
64
62
|
() => t.block,
|
|
65
63
|
async (e) => {
|
|
66
64
|
var o;
|
|
67
|
-
await
|
|
65
|
+
await Q(), e ? (o = r.value) == null || o.removeAttribute("style") : R();
|
|
68
66
|
},
|
|
69
67
|
{ immediate: !0 }
|
|
70
|
-
), (e, o) => (
|
|
68
|
+
), (e, o) => (s(), u("div", {
|
|
71
69
|
id: t.id,
|
|
72
70
|
ref_key: "componentRoot",
|
|
73
71
|
ref: r,
|
|
74
72
|
tabindex: "0",
|
|
75
|
-
class: h(
|
|
76
|
-
onFocusout:
|
|
73
|
+
class: h(P.value),
|
|
74
|
+
onFocusout: B
|
|
77
75
|
}, [
|
|
78
|
-
a("table",
|
|
76
|
+
a("table", U, [
|
|
79
77
|
o[0] || (o[0] = a(
|
|
80
78
|
"thead",
|
|
81
79
|
{ class: "q-property-list__header" },
|
|
@@ -88,44 +86,44 @@ const U = ["id"], W = { class: "q-property-list__table" }, j = /* @__PURE__ */ G
|
|
|
88
86
|
/* HOISTED */
|
|
89
87
|
)),
|
|
90
88
|
a("tbody", null, [
|
|
91
|
-
(
|
|
89
|
+
(s(!0), u(
|
|
92
90
|
y,
|
|
93
91
|
null,
|
|
94
|
-
|
|
92
|
+
k(x.value, (l) => (s(), u(
|
|
95
93
|
y,
|
|
96
94
|
{
|
|
97
|
-
key:
|
|
95
|
+
key: l.id
|
|
98
96
|
},
|
|
99
97
|
[
|
|
100
|
-
|
|
98
|
+
l.title ? (s(), f(m(W), {
|
|
101
99
|
key: 0,
|
|
102
|
-
"data-key":
|
|
103
|
-
title:
|
|
100
|
+
"data-key": l.id,
|
|
101
|
+
title: l.title,
|
|
104
102
|
icons: t.icons,
|
|
105
103
|
"no-toggle": t.noToggle,
|
|
106
|
-
onClick: () =>
|
|
107
|
-
}, null, 8, ["data-key", "title", "icons", "no-toggle", "onClick"])) :
|
|
108
|
-
(
|
|
104
|
+
onClick: () => T(l.id)
|
|
105
|
+
}, null, 8, ["data-key", "title", "icons", "no-toggle", "onClick"])) : c("v-if", !0),
|
|
106
|
+
l.id === "" || d.value.includes(l.id) ? (s(!0), u(
|
|
109
107
|
y,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
key:
|
|
113
|
-
class: h(
|
|
114
|
-
field:
|
|
115
|
-
"model-value":
|
|
108
|
+
{ key: 1 },
|
|
109
|
+
k(L(l.id), (i) => (s(), f(m(N), {
|
|
110
|
+
key: i.id,
|
|
111
|
+
class: h(q(i)),
|
|
112
|
+
field: i,
|
|
113
|
+
"model-value": i.props.modelValue,
|
|
116
114
|
readonly: t.readonly,
|
|
117
|
-
onFocus:
|
|
118
|
-
onFieldChange: (
|
|
115
|
+
onFocus: w,
|
|
116
|
+
onFieldChange: (S) => E(i, S)
|
|
119
117
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
118
|
+
default: _(() => [
|
|
119
|
+
F(e.$slots, i.id, { field: i })
|
|
122
120
|
]),
|
|
123
121
|
_: 2
|
|
124
122
|
/* DYNAMIC */
|
|
125
123
|
}, 1032, ["class", "field", "model-value", "readonly", "onFieldChange"]))),
|
|
126
124
|
128
|
|
127
125
|
/* KEYED_FRAGMENT */
|
|
128
|
-
))
|
|
126
|
+
)) : c("v-if", !0)
|
|
129
127
|
],
|
|
130
128
|
64
|
|
131
129
|
/* STABLE_FRAGMENT */
|
|
@@ -135,21 +133,21 @@ const U = ["id"], W = { class: "q-property-list__table" }, j = /* @__PURE__ */ G
|
|
|
135
133
|
))
|
|
136
134
|
])
|
|
137
135
|
]),
|
|
138
|
-
t.noPanel ?
|
|
136
|
+
t.noPanel ? c("v-if", !0) : (s(), f(m(O), {
|
|
139
137
|
key: 0,
|
|
140
|
-
field:
|
|
138
|
+
field: n.value,
|
|
141
139
|
texts: t.texts
|
|
142
140
|
}, {
|
|
143
|
-
default:
|
|
144
|
-
|
|
141
|
+
default: _(() => [
|
|
142
|
+
n.value ? F(e.$slots, "panel", {
|
|
145
143
|
key: 0,
|
|
146
|
-
field:
|
|
147
|
-
}) :
|
|
144
|
+
field: n.value
|
|
145
|
+
}) : c("v-if", !0)
|
|
148
146
|
]),
|
|
149
147
|
_: 3
|
|
150
148
|
/* FORWARDED */
|
|
151
149
|
}, 8, ["field", "texts"]))
|
|
152
|
-
], 42,
|
|
150
|
+
], 42, D));
|
|
153
151
|
}
|
|
154
152
|
});
|
|
155
153
|
export {
|