@gsc-basic/components 1.0.2 → 1.0.4
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/es/index.js +43 -29
- package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +15 -15
- package/dist/es/node_modules/@codemirror/commands/dist/index.js +5 -5
- package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +3 -3
- package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +8 -8
- package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +6 -6
- package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +3 -3
- package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/language/dist/index.js +1 -1
- package/dist/es/node_modules/@codemirror/lint/dist/index.js +7 -7
- package/dist/es/node_modules/@codemirror/search/dist/index.js +9 -9
- package/dist/es/node_modules/@codemirror/view/dist/index.js +7 -7
- package/dist/es/node_modules/@lezer/lr/dist/index.js +4 -2
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +146 -142
- package/dist/es/node_modules/@tanstack/vue-table/build/lib/index.js +7 -7
- package/dist/es/node_modules/@vueuse/core/dist/index.js +1 -1
- package/dist/es/node_modules/codemirror/dist/index.js +3 -3
- package/dist/es/src/Button/index.js +6 -0
- package/dist/es/src/Button/src/Button.css +1 -0
- package/dist/es/src/Button/src/Button.vue.js +41 -0
- package/dist/es/src/Button/src/Button2.css +1 -0
- package/dist/es/src/CodeEditor/src/index.css +1 -1
- package/dist/es/src/CodeEditor/src/index.vue.js +54 -51
- package/dist/es/src/CodeEditor/src/index2.css +1 -1
- package/dist/es/src/ConfigProvider/index.js +1 -2
- package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +9 -9
- package/dist/es/src/Form/index.js +6 -0
- package/dist/es/src/Form/src/Form.css +1 -0
- package/dist/es/src/Form/src/Form.vue.js +208 -0
- package/dist/es/src/Form/src/styles/form.css +1 -0
- package/dist/es/src/Grid/src/Grid.css +1 -1
- package/dist/es/src/Grid/src/Grid.vue.js +77 -83
- package/dist/es/src/Grid/src/components/ActionBar.css +1 -1
- package/dist/es/src/Grid/src/components/ActionBar.vue.js +43 -36
- package/dist/es/src/Grid/src/components/CellEditor.css +1 -1
- package/dist/es/src/Grid/src/components/CellEditor.vue.js +80 -69
- package/dist/es/src/Grid/src/components/CellEditor2.css +1 -1
- package/dist/es/src/Grid/src/components/ColumnFilter.css +1 -1
- package/dist/es/src/Grid/src/components/ColumnFilter.vue.js +45 -34
- package/dist/es/src/Grid/src/components/ColumnSettings.css +1 -1
- package/dist/es/src/Grid/src/components/ColumnSettings.vue.js +72 -49
- package/dist/es/src/Grid/src/components/DataTable.css +1 -1
- package/dist/es/src/Grid/src/components/DataTable.vue.js +251 -228
- package/dist/es/src/Grid/src/components/Pager.css +1 -1
- package/dist/es/src/Grid/src/components/Pager.vue.js +40 -31
- package/dist/es/src/Grid/src/components/QueryBar.css +1 -1
- package/dist/es/src/Grid/src/components/QueryBar.vue.js +119 -147
- package/dist/es/src/Grid/src/composables/useGridTable.js +45 -44
- package/dist/es/src/Grid/src/styles/table.css +1 -0
- package/dist/es/src/Overlay/index.js +61 -0
- package/dist/es/src/Overlay/src/Message.css +1 -0
- package/dist/es/src/Overlay/src/Message.vue.js +36 -0
- package/dist/es/src/Overlay/src/Message2.css +1 -0
- package/dist/es/src/Overlay/src/Modal.css +1 -0
- package/dist/es/src/Overlay/src/Modal.vue.js +67 -0
- package/dist/es/src/Overlay/src/Modal2.css +1 -0
- package/dist/es/src/Overlay/src/Notice.css +1 -0
- package/dist/es/src/Overlay/src/Notice.vue.js +37 -0
- package/dist/es/src/Overlay/src/Notice2.css +1 -0
- package/dist/es/src/ScaleScreen/src/index.vue.js +2 -2
- package/dist/es/src/VideoBackground/src/index.vue.js +8 -8
- package/dist/es/src/index.js +39 -25
- package/dist/es/src/styles/tokens.css +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/node_modules/@lezer/lr/dist/index.js +1 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +1 -1
- package/dist/lib/src/Button/index.js +1 -0
- package/dist/lib/src/Button/src/Button.css +1 -0
- package/dist/lib/src/Button/src/Button.vue.js +1 -0
- package/dist/lib/src/Button/src/Button2.css +1 -0
- package/dist/lib/src/CodeEditor/src/index.css +1 -1
- package/dist/lib/src/CodeEditor/src/index.vue.js +1 -1
- package/dist/lib/src/CodeEditor/src/index2.css +1 -1
- package/dist/lib/src/ConfigProvider/index.js +1 -1
- package/dist/lib/src/Form/index.js +1 -0
- package/dist/lib/src/Form/src/Form.css +1 -0
- package/dist/lib/src/Form/src/Form.vue.js +1 -0
- package/dist/lib/src/Form/src/styles/form.css +1 -0
- package/dist/lib/src/Grid/src/Grid.css +1 -1
- package/dist/lib/src/Grid/src/Grid.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/ActionBar.css +1 -1
- package/dist/lib/src/Grid/src/components/ActionBar.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/CellEditor.css +1 -1
- package/dist/lib/src/Grid/src/components/CellEditor.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/CellEditor2.css +1 -1
- package/dist/lib/src/Grid/src/components/ColumnFilter.css +1 -1
- package/dist/lib/src/Grid/src/components/ColumnFilter.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/ColumnSettings.css +1 -1
- package/dist/lib/src/Grid/src/components/ColumnSettings.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/DataTable.css +1 -1
- package/dist/lib/src/Grid/src/components/DataTable.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/Pager.css +1 -1
- package/dist/lib/src/Grid/src/components/Pager.vue.js +1 -1
- package/dist/lib/src/Grid/src/components/QueryBar.css +1 -1
- package/dist/lib/src/Grid/src/components/QueryBar.vue.js +1 -1
- package/dist/lib/src/Grid/src/composables/useGridTable.js +1 -1
- package/dist/lib/src/Grid/src/styles/table.css +1 -0
- package/dist/lib/src/Overlay/index.js +1 -0
- package/dist/lib/src/Overlay/src/Message.css +1 -0
- package/dist/lib/src/Overlay/src/Message.vue.js +1 -0
- package/dist/lib/src/Overlay/src/Message2.css +1 -0
- package/dist/lib/src/Overlay/src/Modal.css +1 -0
- package/dist/lib/src/Overlay/src/Modal.vue.js +1 -0
- package/dist/lib/src/Overlay/src/Modal2.css +1 -0
- package/dist/lib/src/Overlay/src/Notice.css +1 -0
- package/dist/lib/src/Overlay/src/Notice.vue.js +1 -0
- package/dist/lib/src/Overlay/src/Notice2.css +1 -0
- package/dist/lib/src/index.js +1 -1
- package/dist/lib/src/styles/tokens.css +1 -1
- package/package.json +12 -11
- package/dist/es/src/Grid/src/styles/antd.css +0 -1
- package/dist/es/src/Grid/src/utils/exportCsv.js +0 -15
- package/dist/lib/src/Grid/src/styles/antd.css +0 -1
- package/dist/lib/src/Grid/src/utils/exportCsv.js +0 -3
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { computed as l, watch as d, createElementBlock as
|
|
1
|
+
import { computed as l, watch as d, openBlock as i, createElementBlock as b, unref as s, createBlock as C, createCommentVNode as u, createElementVNode as A, createVNode as g, createSlots as q, withCtx as p, renderSlot as m, renderList as G } from "vue";
|
|
2
2
|
import O from "./components/QueryBar.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import U from "./components/ActionBar.vue.js";
|
|
4
|
+
import E from "./components/Pager.vue.js";
|
|
5
5
|
import H from "./components/DataTable.vue.js";
|
|
6
6
|
import I from "./components/ColumnSettings.vue.js";
|
|
7
7
|
import { useGridTable as L } from "./composables/useGridTable.js";
|
|
8
|
-
import
|
|
9
|
-
import './Grid.css';import './styles/antd.css';/* empty css */
|
|
8
|
+
import './Grid.css';import './styles/table.css';/* empty css */
|
|
10
9
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
const
|
|
10
|
+
import T from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const x = { class: "gsc-grid space-y-3" }, M = { class: "gsc-card gsc-card-pad" }, J = { class: "gsc-card" }, P = {
|
|
13
12
|
key: 0,
|
|
14
13
|
class: "px-4 py-3 gsc-divider-top"
|
|
15
|
-
},
|
|
14
|
+
}, W = {
|
|
16
15
|
__name: "Grid",
|
|
17
16
|
props: {
|
|
18
17
|
data: { type: Array, default: () => [] },
|
|
@@ -33,100 +32,95 @@ const P = { class: "gsc-grid space-y-3" }, W = { class: "gsc-card gsc-card-pad"
|
|
|
33
32
|
},
|
|
34
33
|
emits: ["update:query", "selection-change", "load", "cell-change", "update:modelValue", "info"],
|
|
35
34
|
setup(k, { emit: B }) {
|
|
36
|
-
const
|
|
37
|
-
const e =
|
|
38
|
-
return Array.isArray(
|
|
35
|
+
const t = k, r = B, f = t.filterSchema || [], $ = l(() => t.columns || []), y = l(() => !!t.rowSelection), z = l(() => t.pagination !== !1), Q = l(() => {
|
|
36
|
+
const e = t.actions || {}, a = e.left || e.leftActions || [];
|
|
37
|
+
return Array.isArray(a) ? a : [];
|
|
39
38
|
}), V = l(() => {
|
|
40
|
-
const e =
|
|
41
|
-
return Array.isArray(
|
|
42
|
-
}), _ = l(() => (
|
|
43
|
-
data:
|
|
44
|
-
request:
|
|
45
|
-
mode:
|
|
46
|
-
pageSize:
|
|
47
|
-
initialQuery:
|
|
48
|
-
columns:
|
|
49
|
-
rowKey:
|
|
39
|
+
const e = t.actions || {}, a = e.right || e.rightActions || [];
|
|
40
|
+
return Array.isArray(a) ? a : [];
|
|
41
|
+
}), _ = l(() => (t.actions || {}).showColumnSettings !== !1), o = L({
|
|
42
|
+
data: t.data,
|
|
43
|
+
request: t.request,
|
|
44
|
+
mode: t.mode,
|
|
45
|
+
pageSize: t.pagination && t.pagination.pageSize || 10,
|
|
46
|
+
initialQuery: t.query,
|
|
47
|
+
columns: t.columns,
|
|
48
|
+
rowKey: t.rowKey,
|
|
50
49
|
enableRowSelection: y.value
|
|
51
|
-
}), c = l(() => !!
|
|
50
|
+
}), c = l(() => !!o.loading.value), v = l({
|
|
52
51
|
get() {
|
|
53
|
-
return
|
|
52
|
+
return o.query.value || {};
|
|
54
53
|
},
|
|
55
54
|
set(e) {
|
|
56
|
-
|
|
55
|
+
o.setQuery(e || {});
|
|
57
56
|
}
|
|
58
|
-
}),
|
|
57
|
+
}), h = l({
|
|
59
58
|
get() {
|
|
60
|
-
return
|
|
59
|
+
return o.page.value;
|
|
61
60
|
},
|
|
62
61
|
set(e) {
|
|
63
|
-
|
|
62
|
+
o.page.value = e;
|
|
64
63
|
}
|
|
65
|
-
}),
|
|
64
|
+
}), S = l({
|
|
66
65
|
get() {
|
|
67
|
-
return
|
|
66
|
+
return o.pageSize.value;
|
|
68
67
|
},
|
|
69
68
|
set(e) {
|
|
70
|
-
|
|
69
|
+
o.pageSize.value = e;
|
|
71
70
|
}
|
|
72
|
-
}), K = l(() =>
|
|
71
|
+
}), K = l(() => o.total.value || 0);
|
|
73
72
|
function N(e) {
|
|
74
|
-
const
|
|
75
|
-
|
|
73
|
+
const a = e || {};
|
|
74
|
+
o.setQuery(a), o.load();
|
|
76
75
|
}
|
|
77
76
|
function R(e) {
|
|
78
|
-
const
|
|
79
|
-
|
|
77
|
+
const a = e || {};
|
|
78
|
+
o.setQuery(a), o.load();
|
|
80
79
|
}
|
|
81
|
-
function j({ key: e, value:
|
|
82
|
-
const n = { ...
|
|
83
|
-
|
|
80
|
+
function j({ key: e, value: a }) {
|
|
81
|
+
const n = { ...o.query.value || {} };
|
|
82
|
+
a != null && a !== "" ? n[e] = a : delete n[e], o.setQuery(n), o.load();
|
|
84
83
|
}
|
|
85
84
|
function D(e) {
|
|
86
85
|
r("selection-change", e || []);
|
|
87
86
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
90
|
-
rowKey: e?.row?.[
|
|
87
|
+
function F(e) {
|
|
88
|
+
t.mode === "client" ? o.setData((o.rows.value || []).slice()) : r("cell-change", {
|
|
89
|
+
rowKey: e?.row?.[t.rowKey],
|
|
91
90
|
column: e?.column,
|
|
92
91
|
value: e?.value,
|
|
93
92
|
row: e?.row
|
|
94
|
-
}), r("update:modelValue", (
|
|
93
|
+
}), r("update:modelValue", (o.rows.value || []).slice());
|
|
95
94
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
a.setData(e || []);
|
|
102
|
-
}, { deep: !0 }), d(() => o.columns, (e) => {
|
|
103
|
-
a.setColumns(e || []);
|
|
104
|
-
}, { deep: !0 }), d(() => a.query.value, (e) => {
|
|
95
|
+
return d(() => t.data, (e) => {
|
|
96
|
+
o.setData(e || []);
|
|
97
|
+
}, { deep: !0 }), d(() => t.columns, (e) => {
|
|
98
|
+
o.setColumns(e || []);
|
|
99
|
+
}, { deep: !0 }), d(() => o.query.value, (e) => {
|
|
105
100
|
r("update:query", e);
|
|
106
|
-
}, { deep: !0 }), (e,
|
|
107
|
-
|
|
101
|
+
}, { deep: !0 }), (e, a) => (i(), b("div", x, [
|
|
102
|
+
s(f).length ? (i(), C(O, {
|
|
108
103
|
key: 0,
|
|
109
104
|
modelValue: v.value,
|
|
110
|
-
"onUpdate:modelValue":
|
|
111
|
-
schema:
|
|
105
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => v.value = n),
|
|
106
|
+
schema: s(f),
|
|
112
107
|
loading: c.value,
|
|
113
108
|
onSearch: N,
|
|
114
109
|
onReset: R
|
|
115
|
-
}, null, 8, ["modelValue", "schema", "loading"])) :
|
|
116
|
-
A("div",
|
|
117
|
-
g(
|
|
110
|
+
}, null, 8, ["modelValue", "schema", "loading"])) : u("", !0),
|
|
111
|
+
A("div", M, [
|
|
112
|
+
g(U, {
|
|
118
113
|
loading: c.value,
|
|
119
114
|
"left-actions": Q.value,
|
|
120
115
|
"right-actions": V.value,
|
|
121
|
-
|
|
122
|
-
onInfo: t[1] || (t[1] = (n) => e.$emit("info"))
|
|
116
|
+
onInfo: a[1] || (a[1] = (n) => e.$emit("info"))
|
|
123
117
|
}, q({
|
|
124
118
|
right: p(() => [
|
|
125
119
|
m(e.$slots, "actions-right", {}, () => [
|
|
126
|
-
_.value ? (i(),
|
|
120
|
+
_.value ? (i(), C(I, {
|
|
127
121
|
key: 0,
|
|
128
|
-
table:
|
|
129
|
-
}, null, 8, ["table"])) :
|
|
122
|
+
table: s(o).table
|
|
123
|
+
}, null, 8, ["table"])) : u("", !0)
|
|
130
124
|
], !0)
|
|
131
125
|
]),
|
|
132
126
|
_: 2
|
|
@@ -140,47 +134,47 @@ const P = { class: "gsc-grid space-y-3" }, W = { class: "gsc-card gsc-card-pad"
|
|
|
140
134
|
} : void 0
|
|
141
135
|
]), 1032, ["loading", "left-actions", "right-actions"])
|
|
142
136
|
]),
|
|
143
|
-
A("div",
|
|
137
|
+
A("div", J, [
|
|
144
138
|
g(H, {
|
|
145
|
-
table:
|
|
146
|
-
mode:
|
|
139
|
+
table: s(o).table,
|
|
140
|
+
mode: t.mode,
|
|
147
141
|
loading: c.value,
|
|
148
|
-
virtual:
|
|
149
|
-
height:
|
|
150
|
-
"row-height":
|
|
142
|
+
virtual: t.virtual,
|
|
143
|
+
height: t.height,
|
|
144
|
+
"row-height": t.rowHeight,
|
|
151
145
|
"enable-row-selection": y.value,
|
|
152
146
|
onSelectionChange: D,
|
|
153
|
-
onCellChange:
|
|
147
|
+
onCellChange: F,
|
|
154
148
|
onServerFilterChange: j
|
|
155
149
|
}, q({ _: 2 }, [
|
|
156
150
|
G($.value, (n) => ({
|
|
157
151
|
name: `cell-${n.key}`,
|
|
158
|
-
fn: p((
|
|
152
|
+
fn: p((w) => [
|
|
159
153
|
e.$slots[`cell-${n.key}`] ? m(e.$slots, `cell-${n.key}`, {
|
|
160
154
|
key: 0,
|
|
161
|
-
value:
|
|
162
|
-
row:
|
|
163
|
-
}, void 0, !0) :
|
|
155
|
+
value: w.value,
|
|
156
|
+
row: w.row
|
|
157
|
+
}, void 0, !0) : u("", !0)
|
|
164
158
|
])
|
|
165
159
|
}))
|
|
166
160
|
]), 1032, ["table", "mode", "loading", "virtual", "height", "row-height", "enable-row-selection"]),
|
|
167
|
-
z.value ? (i(),
|
|
168
|
-
g(
|
|
161
|
+
z.value ? (i(), b("div", P, [
|
|
162
|
+
g(E, {
|
|
169
163
|
page: h.value,
|
|
170
|
-
"page-size":
|
|
164
|
+
"page-size": S.value,
|
|
171
165
|
total: K.value,
|
|
172
|
-
"onUpdate:page":
|
|
166
|
+
"onUpdate:page": a[2] || (a[2] = (n) => {
|
|
173
167
|
h.value = n;
|
|
174
168
|
}),
|
|
175
|
-
"onUpdate:pageSize":
|
|
176
|
-
|
|
169
|
+
"onUpdate:pageSize": a[3] || (a[3] = (n) => {
|
|
170
|
+
S.value = n;
|
|
177
171
|
})
|
|
178
172
|
}, null, 8, ["page", "page-size", "total"])
|
|
179
|
-
])) :
|
|
173
|
+
])) : u("", !0)
|
|
180
174
|
])
|
|
181
175
|
]));
|
|
182
176
|
}
|
|
183
|
-
},
|
|
177
|
+
}, ie = /* @__PURE__ */ T(W, [["__scopeId", "data-v-9ebe45ca"]]);
|
|
184
178
|
export {
|
|
185
|
-
|
|
179
|
+
ie as default
|
|
186
180
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-11bc5d18],[data-v-11bc5d18]:before,[data-v-11bc5d18]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-11bc5d18]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.flex[data-v-11bc5d18]{display:flex}.items-center[data-v-11bc5d18]{align-items:center}.justify-between[data-v-11bc5d18]{justify-content:space-between}.gap-2[data-v-11bc5d18]{gap:.5rem}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { useLocale as
|
|
1
|
+
import { computed as d, openBlock as i, createElementBlock as s, createElementVNode as f, renderSlot as u, Fragment as p, renderList as m, createBlock as y, unref as v, withCtx as g, createTextVNode as A, toDisplayString as k } from "vue";
|
|
2
|
+
import { useLocale as $ } from "../../../hooks/useLocale.js";
|
|
3
|
+
import { GscButton as x } from "../../../Button/index.js";
|
|
3
4
|
import './ActionBar.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const
|
|
5
|
+
import L from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const w = { class: "flex items-center justify-between" }, E = { class: "flex items-center gap-2" }, N = { class: "flex items-center gap-2" }, S = {
|
|
6
7
|
__name: "ActionBar",
|
|
7
8
|
props: {
|
|
8
9
|
loading: { type: Boolean, default: !1 },
|
|
@@ -10,49 +11,55 @@ const C = { class: "flex items-center justify-between" }, b = { class: "flex ite
|
|
|
10
11
|
rightActions: { type: Array, default: () => [] }
|
|
11
12
|
},
|
|
12
13
|
emits: ["export", "info", "action"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
return
|
|
14
|
+
setup(a, { emit: h }) {
|
|
15
|
+
const o = a, n = h, { t: c } = $(), _ = d(() => {
|
|
16
|
+
const e = Array.isArray(o.leftActions) ? o.leftActions : [];
|
|
17
|
+
return e.length ? e : [
|
|
17
18
|
{ key: "export", text: c("gsc.grid.actionBar.export"), variant: "primary" },
|
|
18
19
|
{ key: "info", text: c("gsc.grid.actionBar.info"), variant: "default" }
|
|
19
20
|
];
|
|
20
|
-
}),
|
|
21
|
-
function l(
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
function d(t) {
|
|
26
|
-
const o = t?.key;
|
|
27
|
-
a("action", { key: o, action: t }), o === "export" && a("export"), o === "info" && a("info");
|
|
21
|
+
}), B = d(() => Array.isArray(o.rightActions) ? o.rightActions : []);
|
|
22
|
+
function l(e) {
|
|
23
|
+
const r = e?.key;
|
|
24
|
+
n("action", { key: r, action: e }), r === "export" && n("export"), r === "info" && n("info");
|
|
28
25
|
try {
|
|
29
|
-
|
|
26
|
+
e?.onClick?.();
|
|
30
27
|
} catch {
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(
|
|
37
|
-
key:
|
|
38
|
-
|
|
39
|
-
disabled:
|
|
40
|
-
onClick: (
|
|
41
|
-
},
|
|
30
|
+
return (e, r) => (i(), s("div", w, [
|
|
31
|
+
f("div", E, [
|
|
32
|
+
u(e.$slots, "left", {}, () => [
|
|
33
|
+
(i(!0), s(p, null, m(_.value, (t) => (i(), y(v(x), {
|
|
34
|
+
key: t.key,
|
|
35
|
+
variant: t.variant || "default",
|
|
36
|
+
disabled: a.loading || !!t.disabled,
|
|
37
|
+
onClick: (C) => l(t)
|
|
38
|
+
}, {
|
|
39
|
+
default: g(() => [
|
|
40
|
+
A(k(t.text), 1)
|
|
41
|
+
]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, 1032, ["variant", "disabled", "onClick"]))), 128))
|
|
42
44
|
], !0)
|
|
43
45
|
]),
|
|
44
|
-
|
|
45
|
-
(
|
|
46
|
-
key:
|
|
47
|
-
|
|
48
|
-
disabled:
|
|
49
|
-
onClick: (
|
|
50
|
-
},
|
|
51
|
-
|
|
46
|
+
f("div", N, [
|
|
47
|
+
(i(!0), s(p, null, m(B.value, (t) => (i(), y(v(x), {
|
|
48
|
+
key: t.key,
|
|
49
|
+
variant: t.variant || "default",
|
|
50
|
+
disabled: a.loading || !!t.disabled,
|
|
51
|
+
onClick: (C) => l(t)
|
|
52
|
+
}, {
|
|
53
|
+
default: g(() => [
|
|
54
|
+
A(k(t.text), 1)
|
|
55
|
+
]),
|
|
56
|
+
_: 2
|
|
57
|
+
}, 1032, ["variant", "disabled", "onClick"]))), 128)),
|
|
58
|
+
u(e.$slots, "right", {}, void 0, !0)
|
|
52
59
|
])
|
|
53
60
|
]));
|
|
54
61
|
}
|
|
55
|
-
},
|
|
62
|
+
}, I = /* @__PURE__ */ L(S, [["__scopeId", "data-v-11bc5d18"]]);
|
|
56
63
|
export {
|
|
57
|
-
|
|
64
|
+
I as default
|
|
58
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.gsc-cell-editor[data-v-
|
|
1
|
+
.gsc-cell-editor[data-v-dc815e23]{display:flex;flex-direction:column}
|
|
@@ -1,121 +1,132 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import {
|
|
1
|
+
import { ref as U, onMounted as L, openBlock as u, createElementBlock as i, renderSlot as V, unref as e, withDirectives as p, withKeys as s, withModifiers as d, isRef as v, Fragment as g, renderList as N, toDisplayString as w, vModelSelect as R, vModelText as y, createElementVNode as T, createVNode as C, withCtx as x, createTextVNode as K } from "vue";
|
|
2
|
+
import { GscButton as b } from "../../../Button/index.js";
|
|
3
|
+
import { useCellEditor as B } from "../composables/useCellEditor.js";
|
|
3
4
|
import './CellEditor2.css';import './CellEditor.css';/* empty css */
|
|
4
5
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
6
|
+
import D from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
+
const I = { class: "gsc-cell-editor" }, $ = ["value"], H = { key: 0 }, j = { class: "mt-2 flex gap-2 justify-end" }, A = {
|
|
7
8
|
__name: "CellEditor",
|
|
8
9
|
props: { modelValue: [String, Number, Date], type: { type: String, default: "text" }, options: Array },
|
|
9
10
|
emits: ["update:modelValue", "commit", "cancel"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
setup(a, { emit: M }) {
|
|
12
|
+
const c = a, E = M, { localValue: n, updateLocal: f, commit: o, cancel: r } = B(c, E), k = U(null);
|
|
13
|
+
L(() => {
|
|
14
|
+
c.type === "rich-text" && k.value && (k.value.innerHTML = n.value || "");
|
|
14
15
|
});
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
f(
|
|
16
|
+
function S(m) {
|
|
17
|
+
const t = m.target.innerHTML;
|
|
18
|
+
f(t);
|
|
18
19
|
}
|
|
19
|
-
return (
|
|
20
|
-
|
|
20
|
+
return (m, t) => (u(), i("div", I, [
|
|
21
|
+
a.type === "custom" ? V(m.$slots, "custom", {
|
|
21
22
|
key: 0,
|
|
22
|
-
modelValue:
|
|
23
|
-
update:
|
|
24
|
-
commit:
|
|
25
|
-
cancel:
|
|
26
|
-
}, void 0, !0) :
|
|
23
|
+
modelValue: a.modelValue,
|
|
24
|
+
update: e(f),
|
|
25
|
+
commit: e(o),
|
|
26
|
+
cancel: e(r)
|
|
27
|
+
}, void 0, !0) : a.type === "select" ? p((u(), i("select", {
|
|
27
28
|
key: 1,
|
|
28
|
-
"onUpdate:modelValue":
|
|
29
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => v(n) ? n.value = l : null),
|
|
29
30
|
class: "gsc-control",
|
|
30
31
|
onKeydown: [
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
t[1] || (t[1] = s(d((...l) => e(o) && e(o)(...l), ["prevent"]), ["enter"])),
|
|
33
|
+
t[2] || (t[2] = s(d((...l) => e(r) && e(r)(...l), ["prevent"]), ["esc"]))
|
|
33
34
|
]
|
|
34
35
|
}, [
|
|
35
|
-
(
|
|
36
|
-
key:
|
|
37
|
-
value:
|
|
38
|
-
}, w(
|
|
36
|
+
(u(!0), i(g, null, N(a.options || [], (l) => (u(), i("option", {
|
|
37
|
+
key: l.value,
|
|
38
|
+
value: l.value
|
|
39
|
+
}, w(l.label), 9, $))), 128))
|
|
39
40
|
], 544)), [
|
|
40
|
-
[
|
|
41
|
-
]) :
|
|
41
|
+
[R, e(n)]
|
|
42
|
+
]) : a.type === "date" ? p((u(), i("input", {
|
|
42
43
|
key: 2,
|
|
43
|
-
"onUpdate:modelValue":
|
|
44
|
+
"onUpdate:modelValue": t[3] || (t[3] = (l) => v(n) ? n.value = l : null),
|
|
44
45
|
type: "date",
|
|
45
46
|
class: "gsc-control",
|
|
46
47
|
onKeydown: [
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
t[4] || (t[4] = s(d((...l) => e(o) && e(o)(...l), ["prevent"]), ["enter"])),
|
|
49
|
+
t[5] || (t[5] = s(d((...l) => e(r) && e(r)(...l), ["prevent"]), ["esc"]))
|
|
49
50
|
]
|
|
50
51
|
}, null, 544)), [
|
|
51
|
-
[
|
|
52
|
-
]) :
|
|
52
|
+
[y, e(n)]
|
|
53
|
+
]) : a.type === "datetime-local" ? p((u(), i("input", {
|
|
53
54
|
key: 3,
|
|
54
|
-
"onUpdate:modelValue":
|
|
55
|
+
"onUpdate:modelValue": t[6] || (t[6] = (l) => v(n) ? n.value = l : null),
|
|
55
56
|
type: "datetime-local",
|
|
56
57
|
class: "gsc-control",
|
|
57
58
|
onKeydown: [
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
t[7] || (t[7] = s(d((...l) => e(o) && e(o)(...l), ["prevent"]), ["enter"])),
|
|
60
|
+
t[8] || (t[8] = s(d((...l) => e(r) && e(r)(...l), ["prevent"]), ["esc"]))
|
|
60
61
|
]
|
|
61
62
|
}, null, 544)), [
|
|
62
|
-
[
|
|
63
|
-
]) :
|
|
63
|
+
[y, e(n)]
|
|
64
|
+
]) : a.type === "number" ? p((u(), i("input", {
|
|
64
65
|
key: 4,
|
|
65
|
-
"onUpdate:modelValue":
|
|
66
|
+
"onUpdate:modelValue": t[9] || (t[9] = (l) => v(n) ? n.value = l : null),
|
|
66
67
|
type: "number",
|
|
67
68
|
class: "gsc-control",
|
|
68
69
|
onKeydown: [
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
t[10] || (t[10] = s(d((...l) => e(o) && e(o)(...l), ["prevent"]), ["enter"])),
|
|
71
|
+
t[11] || (t[11] = s(d((...l) => e(r) && e(r)(...l), ["prevent"]), ["esc"]))
|
|
71
72
|
]
|
|
72
73
|
}, null, 544)), [
|
|
73
74
|
[
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
y,
|
|
76
|
+
e(n),
|
|
76
77
|
void 0,
|
|
77
78
|
{ number: !0 }
|
|
78
79
|
]
|
|
79
|
-
]) :
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
modelValue:
|
|
83
|
-
update:
|
|
84
|
-
commit:
|
|
85
|
-
cancel:
|
|
80
|
+
]) : a.type === "rich-text" ? (u(), i(g, { key: 5 }, [
|
|
81
|
+
m.$slots.custom ? (u(), i("div", H, [
|
|
82
|
+
V(m.$slots, "custom", {
|
|
83
|
+
modelValue: e(n),
|
|
84
|
+
update: e(f),
|
|
85
|
+
commit: e(o),
|
|
86
|
+
cancel: e(r)
|
|
86
87
|
}, void 0, !0)
|
|
87
|
-
])) : (
|
|
88
|
+
])) : (u(), i("div", {
|
|
88
89
|
key: 1,
|
|
89
90
|
ref_key: "richRef",
|
|
90
|
-
ref:
|
|
91
|
+
ref: k,
|
|
91
92
|
contenteditable: "",
|
|
92
93
|
class: "gsc-textarea",
|
|
93
|
-
onInput:
|
|
94
|
-
}, w(
|
|
95
|
-
], 64)) : p((
|
|
94
|
+
onInput: S
|
|
95
|
+
}, w(e(n)), 545))
|
|
96
|
+
], 64)) : p((u(), i("input", {
|
|
96
97
|
key: 6,
|
|
97
|
-
"onUpdate:modelValue":
|
|
98
|
+
"onUpdate:modelValue": t[12] || (t[12] = (l) => v(n) ? n.value = l : null),
|
|
98
99
|
class: "gsc-control",
|
|
99
100
|
onKeydown: [
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
t[13] || (t[13] = s(d((...l) => e(o) && e(o)(...l), ["prevent"]), ["enter"])),
|
|
102
|
+
t[14] || (t[14] = s(d((...l) => e(r) && e(r)(...l), ["prevent"]), ["esc"]))
|
|
102
103
|
]
|
|
103
104
|
}, null, 544)), [
|
|
104
|
-
[
|
|
105
|
+
[y, e(n)]
|
|
105
106
|
]),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
onClick:
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
T("div", j, [
|
|
108
|
+
C(e(b), {
|
|
109
|
+
variant: "primary",
|
|
110
|
+
onClick: e(o)
|
|
111
|
+
}, {
|
|
112
|
+
default: x(() => [...t[15] || (t[15] = [
|
|
113
|
+
K(" OK ", -1)
|
|
114
|
+
])]),
|
|
115
|
+
_: 1
|
|
116
|
+
}, 8, ["onClick"]),
|
|
117
|
+
C(e(b), {
|
|
118
|
+
variant: "default",
|
|
119
|
+
onClick: e(r)
|
|
120
|
+
}, {
|
|
121
|
+
default: x(() => [...t[16] || (t[16] = [
|
|
122
|
+
K(" Cancel ", -1)
|
|
123
|
+
])]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["onClick"])
|
|
115
126
|
])
|
|
116
127
|
]));
|
|
117
128
|
}
|
|
118
|
-
},
|
|
129
|
+
}, P = /* @__PURE__ */ D(A, [["__scopeId", "data-v-dc815e23"]]);
|
|
119
130
|
export {
|
|
120
|
-
|
|
131
|
+
P as default
|
|
121
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-dc815e23],[data-v-dc815e23]:before,[data-v-dc815e23]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-dc815e23]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.mt-2[data-v-dc815e23]{margin-top:.5rem}.flex[data-v-dc815e23]{display:flex}.justify-end[data-v-dc815e23]{justify-content:flex-end}.gap-2[data-v-dc815e23]{gap:.5rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-aa324207],[data-v-aa324207]:before,[data-v-aa324207]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-aa324207]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-aa324207]{position:absolute}.left-0[data-v-aa324207]{left:0}.top-full[data-v-aa324207]{top:100%}.z-20[data-v-aa324207]{z-index:20}.mt-2[data-v-aa324207]{margin-top:.5rem}.mt-3[data-v-aa324207]{margin-top:.75rem}.min-w-44[data-v-aa324207]{min-width:11rem}.flex[data-v-aa324207]{display:flex}.justify-end[data-v-aa324207]{justify-content:flex-end}.gap-2[data-v-aa324207]{gap:.5rem}.p-3[data-v-aa324207]{padding:.75rem}
|