@fewangsit/wangsvue-gsts 1.0.0-alpha.37 → 1.0.0-alpha.38
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/changelogcustomvalue/index.es.js +20 -0
- package/changelogpage/index.es.js +62 -64
- package/package.json +1 -1
- package/stats.html +1 -1
- package/wangsvue-gsts.esm.browser.js +1653 -1643
- package/wangsvue-gsts.system.js +39 -39
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as a, createElementBlock as s, createBlock as l, openBlock as o, toDisplayString as p, unref as i } from "vue";
|
|
2
|
+
import { f as m } from "../utils/date.util.es.js";
|
|
3
|
+
import "../event-bus/index.es.js";
|
|
4
|
+
import { _ as c } from "../tooltipspan/index.es.js";
|
|
5
|
+
const u = { key: 0 }, x = /* @__PURE__ */ a({
|
|
6
|
+
__name: "ChangelogCustomValue",
|
|
7
|
+
props: {
|
|
8
|
+
value: {}
|
|
9
|
+
},
|
|
10
|
+
setup(r) {
|
|
11
|
+
const e = r, n = (t) => typeof t == "string" && !isNaN(Date.parse(t));
|
|
12
|
+
return (t, f) => n(e.value) ? (o(), s("span", u, p(i(m)(new Date(e.value), { showTime: !0 })), 1)) : (o(), l(c, {
|
|
13
|
+
key: 1,
|
|
14
|
+
"full-text": e.value
|
|
15
|
+
}, null, 8, ["full-text"]));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
x as _
|
|
20
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ChangelogServices as
|
|
1
|
+
import { defineComponent as A, inject as E, shallowRef as T, ref as O, computed as N, createElementBlock as z, openBlock as f, normalizeProps as w, guardReactiveProps as B, unref as l, createElementVNode as Q, createVNode as p, createBlock as V, createCommentVNode as R, mergeProps as v } from "vue";
|
|
2
|
+
import { ChangelogServices as S } from "@tagsamurai/gsts-api-services";
|
|
3
3
|
import { u as H } from "../utils/toast.util.es.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { D as
|
|
8
|
-
import { _ as P } from "../
|
|
9
|
-
import { _ as
|
|
10
|
-
const
|
|
4
|
+
import { _ as I } from "../buttondownload/index.es.js";
|
|
5
|
+
import { _ as K } from "../buttonfilter/index.es.js";
|
|
6
|
+
import { _ as L } from "../buttonsearch/index.es.js";
|
|
7
|
+
import { D as M } from "../datatable/index.es.js";
|
|
8
|
+
import { _ as P } from "../changelogcustomvalue/index.es.js";
|
|
9
|
+
import { _ as G } from "../changelogfilter/index.es.js";
|
|
10
|
+
const oe = /* @__PURE__ */ A({
|
|
11
11
|
__name: "ChangelogPage",
|
|
12
12
|
props: {
|
|
13
13
|
useButtonDownload: { type: Boolean, default: !1 },
|
|
@@ -28,24 +28,24 @@ const le = /* @__PURE__ */ S({
|
|
|
28
28
|
},
|
|
29
29
|
emits: ["hide"],
|
|
30
30
|
setup(D) {
|
|
31
|
-
const
|
|
31
|
+
const F = H(), r = E("preset", {}).changelog, e = D, k = T(0), h = T(!1), b = O({
|
|
32
32
|
object: e.object,
|
|
33
33
|
...e.customParams
|
|
34
|
-
}),
|
|
35
|
-
if (e.isDialog &&
|
|
34
|
+
}), $ = N(() => {
|
|
35
|
+
if (e.isDialog && h.value)
|
|
36
36
|
return "calc(57vh - 126px)";
|
|
37
37
|
if (e.isDialog) return "57vh";
|
|
38
38
|
}), n = N(() => {
|
|
39
|
-
var
|
|
40
|
-
return e.tableName ?? `changelog-page-${(
|
|
41
|
-
}),
|
|
42
|
-
var
|
|
43
|
-
const
|
|
39
|
+
var t;
|
|
40
|
+
return e.tableName ?? `changelog-page-${(t = b.value.object) == null ? void 0 : t.toLowerCase().split(" ").join("-")}`;
|
|
41
|
+
}), x = (() => {
|
|
42
|
+
var o, s, i, m, u, d, c, g, C, y, j, _;
|
|
43
|
+
const t = [
|
|
44
44
|
{
|
|
45
45
|
field: "createdAt",
|
|
46
46
|
header: "Date",
|
|
47
47
|
sortable: !0,
|
|
48
|
-
visible: !((
|
|
48
|
+
visible: !((o = e.removedColumns) != null && o.includes("createdAt")),
|
|
49
49
|
dateFormatOptions: { showTime: !0 }
|
|
50
50
|
},
|
|
51
51
|
{
|
|
@@ -53,16 +53,16 @@ const le = /* @__PURE__ */ S({
|
|
|
53
53
|
header: "Action",
|
|
54
54
|
sortable: !0,
|
|
55
55
|
fixed: !0,
|
|
56
|
-
visible: !((
|
|
57
|
-
bodyTemplate: (
|
|
56
|
+
visible: !((s = e.removedColumns) != null && s.includes("action")),
|
|
57
|
+
bodyTemplate: (a) => a.action ?? "-"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
field: "object",
|
|
61
61
|
header: "Object",
|
|
62
62
|
sortable: !0,
|
|
63
63
|
fixed: !0,
|
|
64
|
-
visible: !((
|
|
65
|
-
bodyTemplate: (
|
|
64
|
+
visible: !((i = e.additionalTemplateColumns) != null && i.length) && !((m = e.removedColumns) != null && m.includes("object")),
|
|
65
|
+
bodyTemplate: (a) => a.object ?? "-"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
field: "objectName",
|
|
@@ -70,89 +70,87 @@ const le = /* @__PURE__ */ S({
|
|
|
70
70
|
sortable: !0,
|
|
71
71
|
fixed: !0,
|
|
72
72
|
visible: !((u = e.additionalTemplateColumns) != null && u.length) && !((d = e.removedColumns) != null && d.includes("objectName")),
|
|
73
|
-
bodyTemplate: (
|
|
73
|
+
bodyTemplate: (a) => a.objectName ?? "-"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
field: "field",
|
|
77
77
|
header: "Field",
|
|
78
78
|
sortable: !0,
|
|
79
79
|
fixed: !0,
|
|
80
|
-
visible: !/Testing/.test(e.object) && !((
|
|
81
|
-
bodyTemplate: (
|
|
80
|
+
visible: !/Testing/.test(e.object) && !((c = e.removedColumns) != null && c.includes("field")),
|
|
81
|
+
bodyTemplate: (a) => a.field ?? "-"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
field: "oldValue",
|
|
85
85
|
header: "Old Value",
|
|
86
86
|
sortable: !0,
|
|
87
|
-
visible: !((
|
|
88
|
-
bodyComponent: (
|
|
87
|
+
visible: !((g = e.removedColumns) != null && g.includes("oldValue")),
|
|
88
|
+
bodyComponent: (a) => ({
|
|
89
89
|
component: P,
|
|
90
|
-
props: {
|
|
91
|
-
}
|
|
92
|
-
dateFormatOptions: (t) => c(t.oldValue) ? { showTime: !0 } : void 0
|
|
90
|
+
props: { value: a.oldValue }
|
|
91
|
+
})
|
|
93
92
|
},
|
|
94
93
|
{
|
|
95
94
|
field: "newValue",
|
|
96
95
|
header: "New Value",
|
|
97
96
|
sortable: !0,
|
|
98
|
-
visible: !((
|
|
99
|
-
bodyComponent: (
|
|
97
|
+
visible: !((C = e.removedColumns) != null && C.includes("newValue")),
|
|
98
|
+
bodyComponent: (a) => ({
|
|
100
99
|
component: P,
|
|
101
|
-
props: {
|
|
102
|
-
}
|
|
103
|
-
dateFormatOptions: (t) => c(t.newValue) ? { showTime: !0 } : void 0
|
|
100
|
+
props: { value: a.newValue }
|
|
101
|
+
})
|
|
104
102
|
},
|
|
105
103
|
{
|
|
106
104
|
field: "modifiedBy",
|
|
107
105
|
header: "Modified By",
|
|
108
106
|
sortable: !0,
|
|
109
|
-
visible: !((
|
|
110
|
-
bodyTemplate: (
|
|
107
|
+
visible: !((y = e.removedColumns) != null && y.includes("modifiedBy")),
|
|
108
|
+
bodyTemplate: (a) => a.modifiedBy ?? "-"
|
|
111
109
|
}
|
|
112
|
-
].filter((
|
|
113
|
-
return (
|
|
114
|
-
|
|
115
|
-
})),
|
|
116
|
-
})(),
|
|
110
|
+
].filter((a) => a.visible);
|
|
111
|
+
return (j = e.additionalTemplateColumns) != null && j.length && ((_ = e.additionalTemplateColumns) == null || _.forEach((a) => {
|
|
112
|
+
t.splice(a.index, 0, a.column);
|
|
113
|
+
})), t;
|
|
114
|
+
})(), q = async (t) => {
|
|
117
115
|
try {
|
|
118
|
-
const { data:
|
|
119
|
-
return
|
|
120
|
-
} catch (
|
|
121
|
-
console.error(
|
|
122
|
-
error:
|
|
116
|
+
const { data: o } = await S.getChangelogs(t);
|
|
117
|
+
return o;
|
|
118
|
+
} catch (o) {
|
|
119
|
+
console.error(o), F.add({
|
|
120
|
+
error: o,
|
|
123
121
|
message: ""
|
|
124
122
|
});
|
|
125
123
|
}
|
|
126
124
|
};
|
|
127
|
-
return (
|
|
128
|
-
var
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
return (t, o) => {
|
|
126
|
+
var s, i, m, u, d;
|
|
127
|
+
return f(), z("div", w(B((s = l(r)) == null ? void 0 : s.root)), [
|
|
128
|
+
Q("div", w(B((i = l(r)) == null ? void 0 : i.header)), [
|
|
129
|
+
p(L, v((m = l(r)) == null ? void 0 : m.buttonsearch, { "table-name": n.value }), null, 16, ["table-name"]),
|
|
130
|
+
p(K, v((u = l(r)) == null ? void 0 : u.buttonfilter, {
|
|
133
131
|
"table-name": n.value,
|
|
134
|
-
onShowFilter:
|
|
132
|
+
onShowFilter: o[0] || (o[0] = (c) => h.value = c)
|
|
135
133
|
}), null, 16, ["table-name"]),
|
|
136
|
-
e.useButtonDownload ? (
|
|
137
|
-
"file-name":
|
|
134
|
+
e.useButtonDownload ? (f(), V(I, v({ key: 0 }, (d = l(r)) == null ? void 0 : d.buttondownload, {
|
|
135
|
+
"file-name": t.fileName ?? "Changelog",
|
|
138
136
|
"table-name": n.value
|
|
139
|
-
}), null, 16, ["file-name", "table-name"])) :
|
|
137
|
+
}), null, 16, ["file-name", "table-name"])) : R("", !0)
|
|
140
138
|
], 16),
|
|
141
|
-
|
|
142
|
-
"additional-template-filters":
|
|
139
|
+
p(G, {
|
|
140
|
+
"additional-template-filters": t.additionalTemplateFilters,
|
|
143
141
|
"custom-params": e.customParams,
|
|
144
142
|
"default-params-query": b.value,
|
|
145
143
|
object: e.object,
|
|
146
144
|
"object-name-column": e.objectNameColumn,
|
|
147
|
-
"removed-filters":
|
|
145
|
+
"removed-filters": t.removedFilters,
|
|
148
146
|
"table-name": n.value
|
|
149
147
|
}, null, 8, ["additional-template-filters", "custom-params", "default-params-query", "object", "object-name-column", "removed-filters", "table-name"]),
|
|
150
|
-
(
|
|
148
|
+
(f(), V(M, {
|
|
151
149
|
key: k.value,
|
|
152
|
-
columns: l(
|
|
150
|
+
columns: l(x),
|
|
153
151
|
"default-query-params": b.value,
|
|
154
152
|
"fetch-function": q,
|
|
155
|
-
"scroll-height":
|
|
153
|
+
"scroll-height": $.value,
|
|
156
154
|
"table-name": n.value,
|
|
157
155
|
"use-option": !1,
|
|
158
156
|
"data-key": "_id",
|
|
@@ -165,5 +163,5 @@ const le = /* @__PURE__ */ S({
|
|
|
165
163
|
}
|
|
166
164
|
});
|
|
167
165
|
export {
|
|
168
|
-
|
|
166
|
+
oe as _
|
|
169
167
|
};
|