super-page-runtime 2.3.19 → 2.3.21
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/components/runtime/utils/anchor-util.d.ts +13 -0
- package/dist/es/components/runtime/utils/anchor-util.js +69 -0
- package/dist/es/components/runtime/utils/api/page-expose-util.js +27 -23
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +395 -355
- package/dist/es/components/runtime/utils/page-store.d.ts +13 -1
- package/dist/es/components/runtime/utils/page-store.js +46 -19
- package/dist/es/components/runtime/utils/table-utils.d.ts +2 -0
- package/dist/es/components/runtime/utils/table-utils.js +63 -54
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +20 -18
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +10 -11
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +3 -2
- package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue.d.ts +27 -0
- package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue.js +35 -0
- package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue.d.ts +59 -0
- package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue.js +32 -0
- package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +176 -156
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +35 -37
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +180 -179
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +79 -78
- package/dist/es.zip +0 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 滚动到指定 UUID 的组件
|
|
3
|
+
* @param uuid 组件 UUID
|
|
4
|
+
* @param pageContext 页面上下文
|
|
5
|
+
*/
|
|
6
|
+
export declare function scrollIntoComponentWithUuid(pageContext: any, uuid: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* 滚动到指定 code 的组件
|
|
9
|
+
* @param pageContext 页面上下文
|
|
10
|
+
* @param code 组件 code
|
|
11
|
+
*/
|
|
12
|
+
export declare function scrollIntoComponentWithCode(pageContext: any, code: string): void;
|
|
13
|
+
export declare function scrollIntoViewWithContainer(anchorConditions: any[], pageContext: any): void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { caculateShowCondition as t } from "./page-helper-util.js";
|
|
2
|
+
import { getComponentRefByCode as o, getComponentRef as e } from "./global-refs.js";
|
|
3
|
+
import { nextTick as n } from "vue";
|
|
4
|
+
function l(t2, o2) {
|
|
5
|
+
const l2 = e(t2, o2);
|
|
6
|
+
l2 && n(() => {
|
|
7
|
+
s(l2);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function i(t2, e2) {
|
|
11
|
+
const l2 = o(t2, e2);
|
|
12
|
+
l2 && n(() => {
|
|
13
|
+
s(l2);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function c(o2, n2) {
|
|
17
|
+
if (o2 && 0 !== o2.length) for (let l2 = 0; l2 < o2.length; l2++) {
|
|
18
|
+
const { uuid: i2, conditions: c2 } = o2[l2];
|
|
19
|
+
if (t(n2, c2)) {
|
|
20
|
+
r(() => {
|
|
21
|
+
const t2 = e(n2, i2);
|
|
22
|
+
t2 && s(t2);
|
|
23
|
+
});
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function r(t2, o2 = {}) {
|
|
29
|
+
const { checkInterval: e2 = 50, stableCount: l2 = 2, maxWaitTime: i2 = 3e3 } = o2;
|
|
30
|
+
let c2 = -1, r2 = 0, s2 = 0;
|
|
31
|
+
const u = () => {
|
|
32
|
+
const o3 = document.documentElement.scrollHeight || document.body.scrollHeight;
|
|
33
|
+
if (o3 === c2) {
|
|
34
|
+
if (r2++, r2 >= l2) return void n(() => {
|
|
35
|
+
t2();
|
|
36
|
+
});
|
|
37
|
+
} else c2 = o3, r2 = 0;
|
|
38
|
+
s2 += e2, s2 >= i2 ? n(() => {
|
|
39
|
+
t2();
|
|
40
|
+
}) : setTimeout(u, e2);
|
|
41
|
+
};
|
|
42
|
+
n(() => {
|
|
43
|
+
u();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function s(t2) {
|
|
47
|
+
let o2 = null;
|
|
48
|
+
if (t2 && t2.$el ? o2 = t2.$el : t2 instanceof HTMLElement && (o2 = t2), o2) {
|
|
49
|
+
o2.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" });
|
|
50
|
+
const t3 = function(t4) {
|
|
51
|
+
let o3 = t4.parentElement;
|
|
52
|
+
for (; o3; ) {
|
|
53
|
+
const t5 = window.getComputedStyle(o3).overflowY;
|
|
54
|
+
if ("auto" === t5 || "scroll" === t5) return o3;
|
|
55
|
+
o3 = o3.parentElement;
|
|
56
|
+
}
|
|
57
|
+
return document.documentElement || document.body;
|
|
58
|
+
}(o2);
|
|
59
|
+
if (t3) {
|
|
60
|
+
const e2 = o2.offsetTop;
|
|
61
|
+
t3.scrollTo({ top: e2 - 20, behavior: "smooth" });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
i as scrollIntoComponentWithCode,
|
|
67
|
+
l as scrollIntoComponentWithUuid,
|
|
68
|
+
c as scrollIntoViewWithContainer
|
|
69
|
+
};
|
|
@@ -6,22 +6,22 @@ import { getFormData as c, getAdditionalParamMap as u, refreshPage as m } from "
|
|
|
6
6
|
import { dynamicControlTableEdit as f, disabledAllFields as p, updateFormItemEditState as d } from "../events/validator-util.js";
|
|
7
7
|
import { deepCopy as g, getBaseUrl as y } from "../common-util.js";
|
|
8
8
|
import { replacePrefix as b, isMobileBrowser as h } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
-
import { getFormModelFields as E, getModelFields as
|
|
10
|
-
import { getCustomFunc as
|
|
9
|
+
import { getFormModelFields as E, getModelFields as C } from "../page-init-util.js";
|
|
10
|
+
import { getCustomFunc as P } from "../events/event-util.js";
|
|
11
11
|
import { isHasFieldPermissionAuth as k } from "../table-utils.js";
|
|
12
|
-
import "
|
|
13
|
-
const
|
|
14
|
-
n2 ?
|
|
12
|
+
import { scrollIntoComponentWithCode as T, scrollIntoComponentWithUuid as $ } from "../anchor-util.js";
|
|
13
|
+
const v = { showElement: function(e2, t2, n2) {
|
|
14
|
+
n2 ? A(e2, "showElement", t2) : t2.forEach((t3) => {
|
|
15
15
|
const n3 = r(e2, t3);
|
|
16
16
|
n3 ? n3.show() : console.error(`未找到code为${t3}的组件`);
|
|
17
17
|
});
|
|
18
18
|
}, hideElement: function(e2, t2, n2) {
|
|
19
|
-
n2 ?
|
|
19
|
+
n2 ? A(e2, "hideElement", t2) : t2.forEach((t3) => {
|
|
20
20
|
const n3 = r(e2, t3);
|
|
21
21
|
n3 ? n3.hide() : console.error(`未找到code为${t3}的组件`);
|
|
22
22
|
});
|
|
23
23
|
}, enableElement: function(e2, t2, n2) {
|
|
24
|
-
n2 ?
|
|
24
|
+
n2 ? A(e2, "enableElement", t2) : t2.forEach((t3) => {
|
|
25
25
|
const n3 = r(e2, t3);
|
|
26
26
|
if (n3) {
|
|
27
27
|
const e3 = n3.getConfigure();
|
|
@@ -29,7 +29,7 @@ const T = { showElement: function(e2, t2, n2) {
|
|
|
29
29
|
} else console.error(`未找到code为${t3}的组件`);
|
|
30
30
|
});
|
|
31
31
|
}, disableElement: function(e2, t2, n2) {
|
|
32
|
-
n2 ?
|
|
32
|
+
n2 ? A(e2, "disableElement", t2) : t2.forEach((t3) => {
|
|
33
33
|
const n3 = r(e2, t3);
|
|
34
34
|
if (n3) {
|
|
35
35
|
const e3 = n3.getConfigure();
|
|
@@ -49,7 +49,7 @@ const T = { showElement: function(e2, t2, n2) {
|
|
|
49
49
|
i(e2.entity, o2.startsWith("${") ? o2 : "${" + t2 + "." + o2 + "}", n2[o2]);
|
|
50
50
|
});
|
|
51
51
|
}, dynamicControlFormEdit: function(e2, t2, n2) {
|
|
52
|
-
n2 ?
|
|
52
|
+
n2 ? A(e2, "dynamicControlFormEdit", t2) : d(e2, t2);
|
|
53
53
|
}, disabledAllFields(e2) {
|
|
54
54
|
p(e2);
|
|
55
55
|
}, dynamicControlTableEdit(e2, t2, n2) {
|
|
@@ -97,11 +97,11 @@ const T = { showElement: function(e2, t2, n2) {
|
|
|
97
97
|
} else if (e3.name && ("select" === e3.name && ((_j = (_i = e3.props) == null ? void 0 : _i.base) == null ? void 0 : _j.multiple) || "checkbox" === e3.name)) {
|
|
98
98
|
const t2 = E(i2, e3), a2 = n(s2, t2);
|
|
99
99
|
if (a2) {
|
|
100
|
-
const e4 =
|
|
100
|
+
const e4 = O(a2.split(","), r3);
|
|
101
101
|
o(s2, t2, e4);
|
|
102
102
|
}
|
|
103
103
|
} else {
|
|
104
|
-
const t2 = E(i2, e3), a2 =
|
|
104
|
+
const t2 = E(i2, e3), a2 = O(n(s2, t2), r3);
|
|
105
105
|
o(s2, t2, a2);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -112,23 +112,27 @@ const T = { showElement: function(e2, t2, n2) {
|
|
|
112
112
|
if (e2.indexOf("__") > 0 && (t2 = e2.substring(e2.lastIndexOf("__") + 2)), t2) {
|
|
113
113
|
const o2 = a(i2, t2);
|
|
114
114
|
if (o2) {
|
|
115
|
-
const t3 = o2.getConfigure(), i3 = t3.code ? t3.code : e2, a2 =
|
|
115
|
+
const t3 = o2.getConfigure(), i3 = t3.code ? t3.code : e2, a2 = C(t3, i3), r3 = n(s2, a2), l3 = o2.getTableSelectOptions(e2), c3 = o2.getColumns(), u2 = {}, m2 = {};
|
|
116
116
|
c3 && c3.length > 0 && c3.forEach((e3) => {
|
|
117
117
|
"DATE" !== e3.dataType && "TIME" !== e3.dataType || (m2[e3.prop] = e3);
|
|
118
|
-
}), u2.formatDateColumns = m2,
|
|
118
|
+
}), u2.formatDateColumns = m2, j(l3, r3, u2, o2);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
return s2.data;
|
|
123
|
-
}, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) =>
|
|
123
|
+
}, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) => P(e2, t2), replaceUrlPrefix: (e2) => b(e2), isHasFieldAuthPermission: (e2) => {
|
|
124
124
|
var _a, _b, _c, _d;
|
|
125
125
|
return !(void 0 !== ((_b = (_a = e2 == null ? void 0 : e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isHasFieldAuthPermission) && !((_d = (_c = e2 == null ? void 0 : e2.props) == null ? void 0 : _c.base) == null ? void 0 : _d.isHasFieldAuthPermission));
|
|
126
126
|
}, isHasFieldAuth(e2, t2) {
|
|
127
127
|
k(e2, null, t2);
|
|
128
128
|
}, isHasFieldAuthWithTable(e2, t2, n2) {
|
|
129
129
|
k(e2, t2, n2);
|
|
130
|
+
}, scrollIntoComponentWithUuid(e2, t2) {
|
|
131
|
+
$(e2, t2);
|
|
132
|
+
}, scrollIntoComponentWithCode(e2, t2) {
|
|
133
|
+
T(e2, t2);
|
|
130
134
|
} };
|
|
131
|
-
function
|
|
135
|
+
function j(e2, t2, n2, o2) {
|
|
132
136
|
if (e2 && t2) {
|
|
133
137
|
const i2 = o2.getSuperGridRef();
|
|
134
138
|
t2.forEach((t3) => {
|
|
@@ -144,21 +148,21 @@ function $(e2, t2, n2, o2) {
|
|
|
144
148
|
let s2;
|
|
145
149
|
if (r2 && r2.componentType && ("multiselect" === r2.componentType || "checkbox" === r2.componentType)) {
|
|
146
150
|
if (o3) {
|
|
147
|
-
s2 =
|
|
151
|
+
s2 = O(o3.split(","), a2);
|
|
148
152
|
}
|
|
149
|
-
} else s2 =
|
|
153
|
+
} else s2 = O(o3, a2);
|
|
150
154
|
t3[n3] = s2;
|
|
151
155
|
});
|
|
152
156
|
});
|
|
153
157
|
}
|
|
154
158
|
}
|
|
155
|
-
function
|
|
159
|
+
function O(e2, t2) {
|
|
156
160
|
let n2;
|
|
157
161
|
return null != e2 && t2 && (Array.isArray(e2) ? (n2 = "", e2.forEach((o2) => {
|
|
158
|
-
n2 = n2 +
|
|
159
|
-
}), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 =
|
|
162
|
+
n2 = n2 + V(e2, t2) + ",";
|
|
163
|
+
}), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 = V(e2, t2))), n2;
|
|
160
164
|
}
|
|
161
|
-
function
|
|
165
|
+
function V(e2, t2) {
|
|
162
166
|
let n2 = e2;
|
|
163
167
|
if (null != e2 && t2) for (let o2 = 0; o2 < t2.length; o2++) {
|
|
164
168
|
const i2 = t2[o2].value, a2 = t2[o2].label ? t2[o2].label : t2[o2].name;
|
|
@@ -169,9 +173,9 @@ function j(e2, t2) {
|
|
|
169
173
|
}
|
|
170
174
|
return n2;
|
|
171
175
|
}
|
|
172
|
-
function
|
|
176
|
+
function A(e2, t2, n2) {
|
|
173
177
|
e2.initInfo || (e2.initInfo = {}), e2.initInfo[t2] = n2;
|
|
174
178
|
}
|
|
175
179
|
export {
|
|
176
|
-
|
|
180
|
+
v as functions
|
|
177
181
|
};
|
|
@@ -96,3 +96,4 @@ export declare function getFormData(pageContext: PageContext, id?: any, isNeedId
|
|
|
96
96
|
export declare function saveChartConditionBase(pageContext: any, conditionName: string): any;
|
|
97
97
|
export declare function listChartConditions(pageContext: any): any;
|
|
98
98
|
export declare function deleteChartCondition(conditionId: any): any;
|
|
99
|
+
export declare function doFileTaskFunc(pageContext: any): void;
|