@nocobase/client 1.6.17 → 1.6.18
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/es/index.mjs +547 -523
- package/es/schema-component/antd/action/Action.Modal.d.ts +1 -0
- package/es/schema-component/antd/variable/Input.d.ts +1 -0
- package/lib/index.js +58 -58
- package/lib/locale/de-DE.js +3 -1
- package/lib/locale/en-US.js +3 -1
- package/lib/locale/es-ES.js +3 -1
- package/lib/locale/fr-FR.js +3 -1
- package/lib/locale/it-IT.js +3 -1
- package/lib/locale/ja-JP.js +3 -1
- package/lib/locale/ko-KR.js +3 -1
- package/lib/locale/pt-BR.js +3 -1
- package/lib/locale/ru-RU.js +3 -1
- package/lib/locale/tr-TR.js +3 -1
- package/lib/locale/uk-UA.js +3 -1
- package/lib/locale/zh-CN.js +3 -1
- package/lib/locale/zh-TW.js +3 -1
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ var Y = (e, t) => {
|
|
|
21
21
|
return n;
|
|
22
22
|
};
|
|
23
23
|
var A = (e, t, n) => (Re(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
24
|
-
var
|
|
24
|
+
var V = (e, t, n) => new Promise((o, r) => {
|
|
25
25
|
var i = (c) => {
|
|
26
26
|
try {
|
|
27
27
|
l(n.next(c));
|
|
@@ -4193,7 +4193,7 @@ class APIClient extends APIClient$1 {
|
|
|
4193
4193
|
return (a = (i = n == null ? void 0 : n.response) == null ? void 0 : i.data) != null && a.error ? [(c = (l = n == null ? void 0 : n.response) == null ? void 0 : l.data) == null ? void 0 : c.error] : ((d = (u = n == null ? void 0 : n.response) == null ? void 0 : u.data) == null ? void 0 : d.errors) || ((m = (p = n == null ? void 0 : n.response) == null ? void 0 : p.data) == null ? void 0 : m.messages) || ((h = n == null ? void 0 : n.response) == null ? void 0 : h.error) || [{ message: n.message || "Server error" }];
|
|
4194
4194
|
}
|
|
4195
4195
|
handleNotificationError(n) {
|
|
4196
|
-
return
|
|
4196
|
+
return V(this, null, function* () {
|
|
4197
4197
|
var i, a, l, c, u, d, p, m, h, g;
|
|
4198
4198
|
if (this.silence)
|
|
4199
4199
|
throw n;
|
|
@@ -4282,13 +4282,13 @@ function assign(e, t, n = {}) {
|
|
|
4282
4282
|
function useRequest(e, t = {}) {
|
|
4283
4283
|
const [n, o] = useSetState({}), r = useAPIClient();
|
|
4284
4284
|
let i;
|
|
4285
|
-
typeof e == "function" ? i = e : e ? i = (...u) =>
|
|
4285
|
+
typeof e == "function" ? i = e : e ? i = (...u) => V(this, [...u], function* (c = {}) {
|
|
4286
4286
|
const { resource: d, url: p } = e;
|
|
4287
4287
|
let m = cloneDeep(e);
|
|
4288
4288
|
d || p ? (m.params = m.params || {}, assign(m.params, c)) : m = merge(m, c);
|
|
4289
4289
|
const h = yield r.request(m);
|
|
4290
4290
|
return h == null ? void 0 : h.data;
|
|
4291
|
-
}) : i = () =>
|
|
4291
|
+
}) : i = () => V(this, null, function* () {
|
|
4292
4292
|
});
|
|
4293
4293
|
const a = P(x({}, t), {
|
|
4294
4294
|
onSuccess(...c) {
|
|
@@ -4490,7 +4490,7 @@ class Collection {
|
|
|
4490
4490
|
const { ConfigContext } = ConfigProvider, useConfig = () => useContext(ConfigContext), usePrefixCls = (e, t) => {
|
|
4491
4491
|
const { getPrefixCls: n } = useContext(ConfigProvider.ConfigContext) || {};
|
|
4492
4492
|
return "ConfigContext" in ConfigProvider ? (n == null ? void 0 : n(e, t == null ? void 0 : t.prefixCls)) || "" : `ant-${e != null ? e : ""}`;
|
|
4493
|
-
}, useToken$1 = () => theme.useToken(), loading = (e = "Loading...", t) =>
|
|
4493
|
+
}, useToken$1 = () => theme.useToken(), loading = (e = "Loading...", t) => V(void 0, null, function* () {
|
|
4494
4494
|
let n = null;
|
|
4495
4495
|
const o = setTimeout(() => {
|
|
4496
4496
|
n = message.loading(e);
|
|
@@ -4530,7 +4530,7 @@ function legacyUnmount(e) {
|
|
|
4530
4530
|
return unmountComponentAtNode(e);
|
|
4531
4531
|
}
|
|
4532
4532
|
function concurrentUnmount(e) {
|
|
4533
|
-
return
|
|
4533
|
+
return V(this, null, function* () {
|
|
4534
4534
|
return Promise.resolve().then(() => {
|
|
4535
4535
|
var t;
|
|
4536
4536
|
(t = e[MARK]) == null || t.unmount(), delete e[MARK];
|
|
@@ -4789,7 +4789,7 @@ class DataSource {
|
|
|
4789
4789
|
this.reloadCallbacks = this.reloadCallbacks.filter((n) => n !== t);
|
|
4790
4790
|
}
|
|
4791
4791
|
reload() {
|
|
4792
|
-
return
|
|
4792
|
+
return V(this, null, function* () {
|
|
4793
4793
|
const t = yield this.getDataSource();
|
|
4794
4794
|
return this.setOptions(t), this.collectionManager.setCollections(t.collections || []), this.reloadCallbacks.forEach((n) => n(t.collections)), this.options;
|
|
4795
4795
|
});
|
|
@@ -5972,7 +5972,7 @@ class DataSourceManager {
|
|
|
5972
5972
|
return this.dataSourceInstancesMap[o.key] = o, o;
|
|
5973
5973
|
}
|
|
5974
5974
|
addDataSources(t, n) {
|
|
5975
|
-
return
|
|
5975
|
+
return V(this, null, function* () {
|
|
5976
5976
|
this.multiDataSources.some(([o, r]) => o === t && r === n) || this.multiDataSources.push([t, n]);
|
|
5977
5977
|
});
|
|
5978
5978
|
}
|
|
@@ -5995,9 +5995,9 @@ class DataSourceManager {
|
|
|
5995
5995
|
this.collectionFieldInterfaceManager.addFieldInterfaces(t);
|
|
5996
5996
|
}
|
|
5997
5997
|
reload() {
|
|
5998
|
-
return
|
|
5998
|
+
return V(this, null, function* () {
|
|
5999
5999
|
return yield Promise.all(
|
|
6000
|
-
this.multiDataSources.map((o) =>
|
|
6000
|
+
this.multiDataSources.map((o) => V(this, [o], function* ([t, n]) {
|
|
6001
6001
|
(yield t()).map((i) => this.addDataSource(n, i));
|
|
6002
6002
|
}))
|
|
6003
6003
|
), Promise.all(this.getDataSources().map((t) => t.reload()));
|
|
@@ -6634,7 +6634,7 @@ function useRecordRequest(e) {
|
|
|
6634
6634
|
const F = r.filterByTk === void 0 ? _.omit(r, "filterByTk") : r;
|
|
6635
6635
|
return (I = n[o]) == null ? void 0 : I.call(n, x(x({}, F), v)).then((w) => w.data);
|
|
6636
6636
|
};
|
|
6637
|
-
return useRequest((...v) =>
|
|
6637
|
+
return useRequest((...v) => V(this, null, function* () {
|
|
6638
6638
|
const [F, I] = yield Promise.all([
|
|
6639
6639
|
(a || b)(...v),
|
|
6640
6640
|
requestParentRecordData({ sourceId: c, association: u, parentRecord: d, api: p, headers: h, sourceKey: g })
|
|
@@ -6647,7 +6647,7 @@ function useRecordRequest(e) {
|
|
|
6647
6647
|
}));
|
|
6648
6648
|
}
|
|
6649
6649
|
function requestParentRecordData(a) {
|
|
6650
|
-
return
|
|
6650
|
+
return V(this, arguments, function* ({
|
|
6651
6651
|
sourceId: e,
|
|
6652
6652
|
association: t,
|
|
6653
6653
|
parentRecord: n,
|
|
@@ -7181,14 +7181,14 @@ function getAllKeys(e) {
|
|
|
7181
7181
|
}
|
|
7182
7182
|
return n(e), t;
|
|
7183
7183
|
}
|
|
7184
|
-
const conditionAnalyses = (i, a) =>
|
|
7184
|
+
const conditionAnalyses = (i, a) => V(void 0, [i, a], function* ({
|
|
7185
7185
|
ruleGroup: e,
|
|
7186
7186
|
variables: t,
|
|
7187
7187
|
localVariables: n,
|
|
7188
7188
|
variableNameOfLeftCondition: o
|
|
7189
7189
|
}, r) {
|
|
7190
7190
|
const l = Object.keys(e)[0] || "$and";
|
|
7191
|
-
let u = e[l].map((d) =>
|
|
7191
|
+
let u = e[l].map((d) => V(void 0, null, function* () {
|
|
7192
7192
|
if ("$and" in d || "$or" in d)
|
|
7193
7193
|
return yield conditionAnalyses({ ruleGroup: d, variables: t, localVariables: n }, r);
|
|
7194
7194
|
const p = getInnermostKeyAndValue(d), m = p == null ? void 0 : p.key;
|
|
@@ -7224,7 +7224,7 @@ const getVariablesData = (e) => {
|
|
|
7224
7224
|
}), t;
|
|
7225
7225
|
};
|
|
7226
7226
|
function getRenderContent(e, t, n, o, r) {
|
|
7227
|
-
return
|
|
7227
|
+
return V(this, null, function* () {
|
|
7228
7228
|
var i, a;
|
|
7229
7229
|
if (t && e === "handlebars")
|
|
7230
7230
|
try {
|
|
@@ -7342,7 +7342,7 @@ function getSubscriber({
|
|
|
7342
7342
|
variableNameOfLeftCondition: i
|
|
7343
7343
|
},
|
|
7344
7344
|
a
|
|
7345
|
-
), setTimeout(() =>
|
|
7345
|
+
), setTimeout(() => V(this, null, function* () {
|
|
7346
7346
|
var d;
|
|
7347
7347
|
const l = getFieldNameByOperator(e.operator);
|
|
7348
7348
|
if (!((d = t.stateOfLinkageRules) != null && d[l]))
|
|
@@ -7411,7 +7411,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
|
|
|
7411
7411
|
break;
|
|
7412
7412
|
case ActionType.Value:
|
|
7413
7413
|
{
|
|
7414
|
-
const I = () =>
|
|
7414
|
+
const I = () => V(void 0, null, function* () {
|
|
7415
7415
|
var w;
|
|
7416
7416
|
if ((t == null ? void 0 : t.mode) === "express") {
|
|
7417
7417
|
if ((t.value || t.result) == null)
|
|
@@ -7438,7 +7438,7 @@ const collectFieldStateOfLinkageRules = ({ operator: e, value: t, field: n, cond
|
|
|
7438
7438
|
}
|
|
7439
7439
|
};
|
|
7440
7440
|
function getTempFieldState(e, t) {
|
|
7441
|
-
return
|
|
7441
|
+
return V(this, null, function* () {
|
|
7442
7442
|
return [e, t] = yield Promise.all([e, t]), {
|
|
7443
7443
|
condition: e,
|
|
7444
7444
|
value: t
|
|
@@ -7450,7 +7450,7 @@ function isConditionEmpty(e) {
|
|
|
7450
7450
|
return _.isEmpty(n);
|
|
7451
7451
|
}
|
|
7452
7452
|
function replaceVariables(o, r) {
|
|
7453
|
-
return
|
|
7453
|
+
return V(this, arguments, function* (e, {
|
|
7454
7454
|
variables: t,
|
|
7455
7455
|
localVariables: n
|
|
7456
7456
|
}) {
|
|
@@ -7458,7 +7458,7 @@ function replaceVariables(o, r) {
|
|
|
7458
7458
|
const i = {}, a = {};
|
|
7459
7459
|
if (e == null)
|
|
7460
7460
|
return;
|
|
7461
|
-
const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) =>
|
|
7461
|
+
const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => V(this, null, function* () {
|
|
7462
7462
|
const { value: d } = yield t.parseVariable(u, n, {
|
|
7463
7463
|
doNotRequest: u.includes("$nForm")
|
|
7464
7464
|
}), p = `_${uid$1()}`;
|
|
@@ -7931,7 +7931,7 @@ function getRemotePlugins(e, t = []) {
|
|
|
7931
7931
|
});
|
|
7932
7932
|
}
|
|
7933
7933
|
function getPlugins(e) {
|
|
7934
|
-
return
|
|
7934
|
+
return V(this, null, function* () {
|
|
7935
7935
|
const { requirejs: t, pluginData: n, devDynamicImport: o } = e;
|
|
7936
7936
|
if (n.length === 0)
|
|
7937
7937
|
return [];
|
|
@@ -7976,12 +7976,12 @@ let PluginManager$1 = class {
|
|
|
7976
7976
|
* @internal
|
|
7977
7977
|
*/
|
|
7978
7978
|
init(t) {
|
|
7979
|
-
return
|
|
7979
|
+
return V(this, null, function* () {
|
|
7980
7980
|
yield this.initStaticPlugins(t), this.loadRemotePlugins && (yield this.initRemotePlugins());
|
|
7981
7981
|
});
|
|
7982
7982
|
}
|
|
7983
7983
|
initStaticPlugins() {
|
|
7984
|
-
return
|
|
7984
|
+
return V(this, arguments, function* (t = []) {
|
|
7985
7985
|
try {
|
|
7986
7986
|
for (var n = ke(t), o, r, i; o = !(r = yield n.next()).done; o = !1) {
|
|
7987
7987
|
const a = r.value;
|
|
@@ -8001,7 +8001,7 @@ let PluginManager$1 = class {
|
|
|
8001
8001
|
});
|
|
8002
8002
|
}
|
|
8003
8003
|
initRemotePlugins() {
|
|
8004
|
-
return
|
|
8004
|
+
return V(this, null, function* () {
|
|
8005
8005
|
var r;
|
|
8006
8006
|
const t = yield this.app.apiClient.request({ url: "pm:listEnabled" }), n = ((r = t == null ? void 0 : t.data) == null ? void 0 : r.data) || [], o = yield getPlugins({
|
|
8007
8007
|
requirejs: this.app.requirejs,
|
|
@@ -8027,7 +8027,7 @@ let PluginManager$1 = class {
|
|
|
8027
8027
|
});
|
|
8028
8028
|
}
|
|
8029
8029
|
add(o) {
|
|
8030
|
-
return
|
|
8030
|
+
return V(this, arguments, function* (t, n = {}) {
|
|
8031
8031
|
const r = this.getInstance(t, n);
|
|
8032
8032
|
this.pluginInstances.set(t, r), n.name && (this.pluginsAliases[n.name] = r), n.packageName && (this.pluginsAliases[n.packageName] = r), yield r.afterAdd();
|
|
8033
8033
|
});
|
|
@@ -8042,7 +8042,7 @@ let PluginManager$1 = class {
|
|
|
8042
8042
|
* @internal
|
|
8043
8043
|
*/
|
|
8044
8044
|
load() {
|
|
8045
|
-
return
|
|
8045
|
+
return V(this, null, function* () {
|
|
8046
8046
|
yield this.initPlugins;
|
|
8047
8047
|
for (const t of this.pluginInstances.values())
|
|
8048
8048
|
yield t.beforeLoad();
|
|
@@ -8407,9 +8407,9 @@ class WebSocketClient {
|
|
|
8407
8407
|
for (const { type: o, listener: r, options: i } of this.events)
|
|
8408
8408
|
this._ws.addEventListener(o, r, i);
|
|
8409
8409
|
n = setInterval(() => this.send("ping"), this.pingInterval), this.connected = !0, this.emit("open", {});
|
|
8410
|
-
}, t.onerror = () =>
|
|
8410
|
+
}, t.onerror = () => V(this, null, function* () {
|
|
8411
8411
|
console.log("onerror", this.readyState, this._reconnectTimes);
|
|
8412
|
-
}), t.onclose = (o) =>
|
|
8412
|
+
}), t.onclose = (o) => V(this, null, function* () {
|
|
8413
8413
|
setTimeout(() => this.connect(), this.reconnectInterval), console.log("onclose", this.readyState, this._reconnectTimes, this.serverDown), this.connected = !1, clearInterval(n);
|
|
8414
8414
|
});
|
|
8415
8415
|
}
|
|
@@ -8703,7 +8703,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
8703
8703
|
const n = useLocationNoUpdate(), [o, r] = React.useState(!1), i = useAPIClient();
|
|
8704
8704
|
return {
|
|
8705
8705
|
loading: o,
|
|
8706
|
-
download: () =>
|
|
8706
|
+
download: () => V(void 0, null, function* () {
|
|
8707
8707
|
r(!0);
|
|
8708
8708
|
try {
|
|
8709
8709
|
const a = yield i.request({
|
|
@@ -8792,7 +8792,7 @@ const options$1 = {
|
|
|
8792
8792
|
const t = useAPIClient(), n = useIsAdminPage(), o = t.auth.getToken() || "", r = useRequest(options$1, {
|
|
8793
8793
|
refreshDeps: [n, o],
|
|
8794
8794
|
ready: !!(n && o)
|
|
8795
|
-
}), i = useCallback(() =>
|
|
8795
|
+
}), i = useCallback(() => V(void 0, null, function* () {
|
|
8796
8796
|
const { data: c } = yield t.request(options$1);
|
|
8797
8797
|
return r.mutate(c), (c == null ? void 0 : c.data) || [];
|
|
8798
8798
|
}), [r]), a = useMemo(() => {
|
|
@@ -8944,7 +8944,7 @@ const useSelectedRowKeys = () => {
|
|
|
8944
8944
|
const e = useContext(DataSourceContext_deprecated), t = useForm(), { setVisible: n } = useActionContext();
|
|
8945
8945
|
return {
|
|
8946
8946
|
run() {
|
|
8947
|
-
return
|
|
8947
|
+
return V(this, null, function* () {
|
|
8948
8948
|
console.log("form.values", t.values);
|
|
8949
8949
|
const r = e.dataSource || [];
|
|
8950
8950
|
r.push(cloneDeep$1(t.values)), e.setDataSource([...r]), n(!1), yield t.reset();
|
|
@@ -8955,7 +8955,7 @@ const useSelectedRowKeys = () => {
|
|
|
8955
8955
|
const e = useContext(DataSourceContext_deprecated), { selectedRowKeys: t, setSelectedRowKeys: n } = e;
|
|
8956
8956
|
return {
|
|
8957
8957
|
run() {
|
|
8958
|
-
return
|
|
8958
|
+
return V(this, null, function* () {
|
|
8959
8959
|
const r = e.dataSource || [];
|
|
8960
8960
|
e.setDataSource(
|
|
8961
8961
|
r.filter((i, a) => !t.includes(a))
|
|
@@ -8967,7 +8967,7 @@ const useSelectedRowKeys = () => {
|
|
|
8967
8967
|
const e = useRecordIndex(), t = useForm(), { setVisible: n } = useActionContext(), o = useContext(DataSourceContext_deprecated);
|
|
8968
8968
|
return {
|
|
8969
8969
|
run() {
|
|
8970
|
-
return
|
|
8970
|
+
return V(this, null, function* () {
|
|
8971
8971
|
const a = ((o == null ? void 0 : o.dataSource) || []).map((l, c) => c === e ? x({}, t.values) : l);
|
|
8972
8972
|
o.setDataSource([...a]), n(!1);
|
|
8973
8973
|
});
|
|
@@ -8977,7 +8977,7 @@ const useSelectedRowKeys = () => {
|
|
|
8977
8977
|
const e = useRecordIndex(), t = useContext(DataSourceContext_deprecated);
|
|
8978
8978
|
return {
|
|
8979
8979
|
run() {
|
|
8980
|
-
return
|
|
8980
|
+
return V(this, null, function* () {
|
|
8981
8981
|
const o = t.dataSource || [];
|
|
8982
8982
|
t.setDataSource(
|
|
8983
8983
|
o.filter((r, i) => e !== i)
|
|
@@ -9184,7 +9184,7 @@ function addAppVersion(e, t) {
|
|
|
9184
9184
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9185
9185
|
}), e;
|
|
9186
9186
|
}
|
|
9187
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9187
|
+
const name = "@nocobase/client", version = "1.6.18", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9188
9188
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9189
9189
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9190
9190
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9206,9 +9206,9 @@ const name = "@nocobase/client", version = "1.6.17", license = "AGPL-3.0", main
|
|
|
9206
9206
|
"@formily/reactive-react": "^2.2.27",
|
|
9207
9207
|
"@formily/shared": "^2.2.27",
|
|
9208
9208
|
"@formily/validator": "^2.2.27",
|
|
9209
|
-
"@nocobase/evaluators": "1.6.
|
|
9210
|
-
"@nocobase/sdk": "1.6.
|
|
9211
|
-
"@nocobase/utils": "1.6.
|
|
9209
|
+
"@nocobase/evaluators": "1.6.18",
|
|
9210
|
+
"@nocobase/sdk": "1.6.18",
|
|
9211
|
+
"@nocobase/utils": "1.6.18",
|
|
9212
9212
|
ahooks: "^3.7.2",
|
|
9213
9213
|
antd: "5.12.8",
|
|
9214
9214
|
"antd-style": "3.7.1",
|
|
@@ -9332,7 +9332,7 @@ class Designable {
|
|
|
9332
9332
|
});
|
|
9333
9333
|
}), r["x-uid"] && a.length ? a : [];
|
|
9334
9334
|
};
|
|
9335
|
-
this.on("insertAdjacent", (p) =>
|
|
9335
|
+
this.on("insertAdjacent", (p) => V(this, [p], function* ({ onSuccess: r, current: i, position: a, schema: l, wrap: c, wrapped: u, removed: d }) {
|
|
9336
9336
|
var g;
|
|
9337
9337
|
let m = [];
|
|
9338
9338
|
if ((u == null ? void 0 : u["x-component"]) === "Grid.Col" && (m = m.concat(o(u.parent))), (d == null ? void 0 : d["x-component"]) === "Grid.Col" && (m = m.concat(o(d.parent))), this.refresh(), !i["x-uid"])
|
|
@@ -9353,25 +9353,25 @@ class Designable {
|
|
|
9353
9353
|
url: `/uiSchemas:remove/${d["x-uid"]}`,
|
|
9354
9354
|
method: "post"
|
|
9355
9355
|
})), r == null || r((g = h == null ? void 0 : h.data) == null ? void 0 : g.data), message.success(n("Saved successfully"), 0.2);
|
|
9356
|
-
})), this.on("patch", (i) =>
|
|
9356
|
+
})), this.on("patch", (i) => V(this, [i], function* ({ schema: r }) {
|
|
9357
9357
|
this.refresh(), r != null && r["x-uid"] && (yield t.request({
|
|
9358
9358
|
url: "/uiSchemas:patch",
|
|
9359
9359
|
method: "post",
|
|
9360
9360
|
data: x({}, r)
|
|
9361
9361
|
}), message.success(n("Saved successfully"), 0.2));
|
|
9362
|
-
})), this.on("initializeActionContext", (i) =>
|
|
9362
|
+
})), this.on("initializeActionContext", (i) => V(this, [i], function* ({ schema: r }) {
|
|
9363
9363
|
r != null && r["x-uid"] && (yield t.request({
|
|
9364
9364
|
url: "/uiSchemas:initializeActionContext",
|
|
9365
9365
|
method: "post",
|
|
9366
9366
|
data: x({}, r)
|
|
9367
9367
|
}));
|
|
9368
|
-
})), this.on("batchPatch", (i) =>
|
|
9368
|
+
})), this.on("batchPatch", (i) => V(this, [i], function* ({ schemas: r }) {
|
|
9369
9369
|
this.refresh(), yield t.request({
|
|
9370
9370
|
url: "/uiSchemas:batchPatch",
|
|
9371
9371
|
method: "post",
|
|
9372
9372
|
data: r
|
|
9373
9373
|
}), message.success(n("Saved successfully"), 0.2);
|
|
9374
|
-
})), this.on("remove", (i) =>
|
|
9374
|
+
})), this.on("remove", (i) => V(this, [i], function* ({ removed: r }) {
|
|
9375
9375
|
let a = [];
|
|
9376
9376
|
(r == null ? void 0 : r["x-component"]) === "Grid.Col" && (a = o(r.parent)), this.refresh(), r != null && r["x-uid"] && (yield t.request({
|
|
9377
9377
|
url: `/uiSchemas:remove/${r["x-uid"]}`,
|
|
@@ -9390,7 +9390,7 @@ class Designable {
|
|
|
9390
9390
|
this.events[t] || (this.events[t] = []), this.events[t].push(n);
|
|
9391
9391
|
}
|
|
9392
9392
|
emit(t, ...n) {
|
|
9393
|
-
return
|
|
9393
|
+
return V(this, null, function* () {
|
|
9394
9394
|
if (!this.events[t])
|
|
9395
9395
|
return;
|
|
9396
9396
|
const [o, ...r] = n;
|
|
@@ -9854,7 +9854,7 @@ function useParsedFilter({ filterOption: e }) {
|
|
|
9854
9854
|
return useEffect(() => {
|
|
9855
9855
|
if (!e)
|
|
9856
9856
|
return;
|
|
9857
|
-
const l = () =>
|
|
9857
|
+
const l = () => V(this, null, function* () {
|
|
9858
9858
|
a(!0);
|
|
9859
9859
|
const u = yield t(e);
|
|
9860
9860
|
a(!1), r(u);
|
|
@@ -9940,17 +9940,17 @@ const key = "__isNewRecord__", isNewRecord = (e) => untracked(() => !!(e != null
|
|
|
9940
9940
|
default:
|
|
9941
9941
|
return null;
|
|
9942
9942
|
}
|
|
9943
|
-
}, getSatisfiedActions = (r, i) =>
|
|
9943
|
+
}, getSatisfiedActions = (r, i) => V(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
|
|
9944
9944
|
return (yield Promise.all(
|
|
9945
|
-
e.filter((l) => !l.disabled).map((l) =>
|
|
9945
|
+
e.filter((l) => !l.disabled).map((l) => V(void 0, null, function* () {
|
|
9946
9946
|
return (yield conditionAnalyses({ ruleGroup: l.condition, variables: t, localVariables: n }, o)) ? l : null;
|
|
9947
9947
|
}))
|
|
9948
9948
|
)).filter(Boolean).map((l) => l.actions).flat();
|
|
9949
|
-
}), getSatisfiedValues = (r, i) =>
|
|
9949
|
+
}), getSatisfiedValues = (r, i) => V(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
|
|
9950
9950
|
return (yield getSatisfiedActions({ rules: e, variables: t, localVariables: n }, o)).map((a) => P(x({}, a), {
|
|
9951
9951
|
value: getActionValue(a.operator, a.value)
|
|
9952
9952
|
}));
|
|
9953
|
-
}), getSatisfiedValueMap = (r, i) =>
|
|
9953
|
+
}), getSatisfiedValueMap = (r, i) => V(void 0, [r, i], function* ({ rules: e, variables: t, localVariables: n }, o) {
|
|
9954
9954
|
return (yield getSatisfiedValues({ rules: e, variables: t, localVariables: n }, o)).reduce((c, u) => P(x({}, c), { [u.operator]: u.value }), {});
|
|
9955
9955
|
});
|
|
9956
9956
|
function useSatisfiedActionValues({
|
|
@@ -10631,7 +10631,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10631
10631
|
"onClickRow",
|
|
10632
10632
|
"value"
|
|
10633
10633
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: O } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10634
|
-
})), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [R, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, E] = useState([]),
|
|
10634
|
+
})), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [R, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, E] = useState([]), q = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
10635
10635
|
& > td {
|
|
10636
10636
|
background-color: ${t.controlItemBgActive} !important;
|
|
10637
10637
|
}
|
|
@@ -10727,14 +10727,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10727
10727
|
role: "button",
|
|
10728
10728
|
"aria-label": `table-index-${oe}`,
|
|
10729
10729
|
className: cls(Q ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10730
|
-
[rowSelectCheckboxWrapperClassHover$1]:
|
|
10730
|
+
[rowSelectCheckboxWrapperClassHover$1]: q
|
|
10731
10731
|
}),
|
|
10732
10732
|
children: [
|
|
10733
10733
|
/* @__PURE__ */ jsxs("div", { className: cls(Q ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10734
10734
|
l && /* @__PURE__ */ jsx(SortHandle$2, { id: K(te) }),
|
|
10735
10735
|
c && /* @__PURE__ */ jsx(TableIndex$3, { index: oe })
|
|
10736
10736
|
] }),
|
|
10737
|
-
|
|
10737
|
+
q && /* @__PURE__ */ jsx(
|
|
10738
10738
|
"div",
|
|
10739
10739
|
{
|
|
10740
10740
|
className: cls(
|
|
@@ -10759,7 +10759,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10759
10759
|
l,
|
|
10760
10760
|
y,
|
|
10761
10761
|
K,
|
|
10762
|
-
|
|
10762
|
+
q,
|
|
10763
10763
|
ne,
|
|
10764
10764
|
N,
|
|
10765
10765
|
U
|
|
@@ -11253,15 +11253,15 @@ class Plugin {
|
|
|
11253
11253
|
return this.app.dataSourceManager;
|
|
11254
11254
|
}
|
|
11255
11255
|
afterAdd() {
|
|
11256
|
-
return
|
|
11256
|
+
return V(this, null, function* () {
|
|
11257
11257
|
});
|
|
11258
11258
|
}
|
|
11259
11259
|
beforeLoad() {
|
|
11260
|
-
return
|
|
11260
|
+
return V(this, null, function* () {
|
|
11261
11261
|
});
|
|
11262
11262
|
}
|
|
11263
11263
|
load() {
|
|
11264
|
-
return
|
|
11264
|
+
return V(this, null, function* () {
|
|
11265
11265
|
});
|
|
11266
11266
|
}
|
|
11267
11267
|
t(t, n = {}) {
|
|
@@ -11271,7 +11271,7 @@ class Plugin {
|
|
|
11271
11271
|
}
|
|
11272
11272
|
class SchemaComponentPlugin extends Plugin {
|
|
11273
11273
|
load() {
|
|
11274
|
-
return
|
|
11274
|
+
return V(this, null, function* () {
|
|
11275
11275
|
this.addComponents();
|
|
11276
11276
|
});
|
|
11277
11277
|
}
|
|
@@ -11304,7 +11304,7 @@ const ActionContextProvider = React.memo(
|
|
|
11304
11304
|
(e) => {
|
|
11305
11305
|
const [t, n] = useState(!1), { visible: o } = x(x({}, e), e.value), { setSubmitted: r } = x(x({}, e), e.value), i = useBlockServiceInActionButton(), { isSubPageClosedByPageMenu: a, reset: l } = useIsSubPageClosedByPageMenu(useFieldSchema());
|
|
11306
11306
|
useEffect(() => {
|
|
11307
|
-
|
|
11307
|
+
V(void 0, null, function* () {
|
|
11308
11308
|
o === !1 && i && !i.loading && (t || a()) && (l(), i.loading = !0, yield i.refreshAsync(), i.loading = !1, n(!1), r == null || r(!0));
|
|
11309
11309
|
});
|
|
11310
11310
|
}, [o, i, r, a, t, l]);
|
|
@@ -11399,12 +11399,12 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11399
11399
|
collection: z,
|
|
11400
11400
|
puid: E
|
|
11401
11401
|
}) => {
|
|
11402
|
-
const
|
|
11402
|
+
const q = c.getFilterByTK(u || l, $);
|
|
11403
11403
|
return getPopupPathFromParams({
|
|
11404
11404
|
popupuid: M,
|
|
11405
11405
|
puid: E,
|
|
11406
11406
|
collection: z,
|
|
11407
|
-
filterbytk:
|
|
11407
|
+
filterbytk: q,
|
|
11408
11408
|
sourceid: k,
|
|
11409
11409
|
tab: R
|
|
11410
11410
|
});
|
|
@@ -11427,17 +11427,17 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11427
11427
|
} = {}) => {
|
|
11428
11428
|
if (!f())
|
|
11429
11429
|
return I == null ? void 0 : I(!0);
|
|
11430
|
-
const E = z || o,
|
|
11430
|
+
const E = z || o, q = E == null ? void 0 : E["x-uid"], L = y(M);
|
|
11431
11431
|
R = R || (i == null ? void 0 : i.data);
|
|
11432
11432
|
const G = w({
|
|
11433
|
-
popupUid:
|
|
11433
|
+
popupUid: q,
|
|
11434
11434
|
recordData: R,
|
|
11435
11435
|
sourceId: L,
|
|
11436
11436
|
collection: $,
|
|
11437
11437
|
puid: k
|
|
11438
11438
|
});
|
|
11439
11439
|
let U = n.pathname;
|
|
11440
|
-
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(
|
|
11440
|
+
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(q, {
|
|
11441
11441
|
schema: E,
|
|
11442
11442
|
record: new CollectionRecord({ isNew: !1, data: R }),
|
|
11443
11443
|
parentRecord: M ? new CollectionRecord({ isNew: !1, data: M }) : a,
|
|
@@ -11644,12 +11644,12 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
|
|
|
11644
11644
|
}, InternalPagePopups = (e) => {
|
|
11645
11645
|
const t = useFieldSchema(), n = useLocation(), o = e.paramsList || getPopupParamsFromPath(getPopupPath(n)), { requestSchema: r } = useRequestSchema(), [i, a] = useState(null), l = useRef([]), { savePopupSchemaToSchema: c, getPopupSchemaFromSchema: u } = usePopupUtils();
|
|
11646
11646
|
useEffect(() => {
|
|
11647
|
-
|
|
11647
|
+
V(void 0, null, function* () {
|
|
11648
11648
|
const m = o.map((C) => {
|
|
11649
11649
|
var b;
|
|
11650
11650
|
return ((b = getStoredPopupContext(C.popupuid)) == null ? void 0 : b.schema) || findSchemaByUid(C.popupuid, t == null ? void 0 : t.root) || r(C.popupuid);
|
|
11651
11651
|
}), h = yield Promise.all(m), g = yield Promise.all(
|
|
11652
|
-
h.map((C, b) =>
|
|
11652
|
+
h.map((C, b) => V(void 0, null, function* () {
|
|
11653
11653
|
if (_.isEmpty(C))
|
|
11654
11654
|
return get404Schema();
|
|
11655
11655
|
const S = o[b];
|
|
@@ -11714,7 +11714,7 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
|
|
|
11714
11714
|
return t ? /* @__PURE__ */ jsx(InternalPagePopups, x({}, e)) : null;
|
|
11715
11715
|
}, useRequestSchema = () => {
|
|
11716
11716
|
const e = useAPIClient();
|
|
11717
|
-
return { requestSchema: useCallback((n) =>
|
|
11717
|
+
return { requestSchema: useCallback((n) => V(void 0, null, function* () {
|
|
11718
11718
|
var o;
|
|
11719
11719
|
try {
|
|
11720
11720
|
return (o = (yield e.request({
|
|
@@ -11898,7 +11898,7 @@ const useStyles$h = genStyleHook("nb-action-drawer", (e) => {
|
|
|
11898
11898
|
title: t("Unsaved changes"),
|
|
11899
11899
|
content: t("Are you sure you don't want to save?"),
|
|
11900
11900
|
onOk() {
|
|
11901
|
-
return
|
|
11901
|
+
return V(this, null, function* () {
|
|
11902
11902
|
var c;
|
|
11903
11903
|
e.setFormValueChanged(!1), (c = e.setVisible) == null || c.call(e, !1);
|
|
11904
11904
|
});
|
|
@@ -11915,7 +11915,7 @@ const useStyles$h = genStyleHook("nb-action-drawer", (e) => {
|
|
|
11915
11915
|
const { setVisible: e } = useContext(ActionContext), t = useForm();
|
|
11916
11916
|
return {
|
|
11917
11917
|
run() {
|
|
11918
|
-
return
|
|
11918
|
+
return V(this, null, function* () {
|
|
11919
11919
|
e(!1), t.submit((o) => {
|
|
11920
11920
|
console.log(o);
|
|
11921
11921
|
});
|
|
@@ -12064,9 +12064,20 @@ const useGetAriaLabelOfModal = () => {
|
|
|
12064
12064
|
}
|
|
12065
12065
|
) : null;
|
|
12066
12066
|
}
|
|
12067
|
-
)
|
|
12067
|
+
);
|
|
12068
|
+
function useDelayedVisible(e, t = 200) {
|
|
12069
|
+
const [n, o] = useState(!1);
|
|
12070
|
+
return useEffect(() => {
|
|
12071
|
+
if (e) {
|
|
12072
|
+
const r = setTimeout(() => o(!0), t);
|
|
12073
|
+
return () => clearTimeout(r);
|
|
12074
|
+
} else
|
|
12075
|
+
o(!1);
|
|
12076
|
+
}, [e]), n;
|
|
12077
|
+
}
|
|
12078
|
+
const InternalActionModal = observer$1(
|
|
12068
12079
|
(e) => {
|
|
12069
|
-
const
|
|
12080
|
+
const v = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o } = v, r = Y(v, ["footerNodeName", "width", "zIndex"]), { visible: i, setVisible: a, openSize: l = "middle", modalProps: c } = useActionContext(), u = n != null ? n : openSizeWidthMap.get(l), d = useFieldSchema(), p = useField(), { token: m } = useToken(), h = useTabsContext(), g = useZIndexContext(), f = d.reduceProperties((F, I) => I["x-component"] === t ? I : F), { hidden: C } = useCurrentPopupContext(), b = !!f, S = getZIndex("modal", o || g, e.level || 0), y = useDelayedVisible(i, 200);
|
|
12070
12081
|
return /* @__PURE__ */ jsx(ActionContextNoRerender, { children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: S, children: /* @__PURE__ */ jsx(TabsContextProvider, P(x({}, h), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
|
|
12071
12082
|
Modal,
|
|
12072
12083
|
P(x(x({
|
|
@@ -12115,10 +12126,10 @@ const useGetAriaLabelOfModal = () => {
|
|
|
12115
12126
|
basePath: p.address,
|
|
12116
12127
|
schema: d,
|
|
12117
12128
|
onlyRenderProperties: !0,
|
|
12118
|
-
filterProperties: (
|
|
12129
|
+
filterProperties: (F) => F["x-component"] === t
|
|
12119
12130
|
}
|
|
12120
12131
|
) : !1,
|
|
12121
|
-
children: /* @__PURE__ */ jsx(ActionModalContent, { footerNodeName: t, field: p, schema: d })
|
|
12132
|
+
children: y ? /* @__PURE__ */ jsx(ActionModalContent, { footerNodeName: t, field: p, schema: d }) : /* @__PURE__ */ jsx(Skeleton, { active: !0, paragraph: { rows: 6 } })
|
|
12122
12133
|
})
|
|
12123
12134
|
) })) }) });
|
|
12124
12135
|
},
|
|
@@ -12452,7 +12463,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
12452
12463
|
const b = useForm(), S = useActionContext();
|
|
12453
12464
|
return {
|
|
12454
12465
|
run() {
|
|
12455
|
-
return
|
|
12466
|
+
return V(this, null, function* () {
|
|
12456
12467
|
yield u == null ? void 0 : u(), S.setVisible(!1), b.reset();
|
|
12457
12468
|
});
|
|
12458
12469
|
}
|
|
@@ -12461,7 +12472,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
12461
12472
|
const b = useForm(), S = useActionContext();
|
|
12462
12473
|
return {
|
|
12463
12474
|
run() {
|
|
12464
|
-
return
|
|
12475
|
+
return V(this, null, function* () {
|
|
12465
12476
|
yield b.validate();
|
|
12466
12477
|
try {
|
|
12467
12478
|
yield d == null ? void 0 : d(b.values), S.setVisible(!1), b.reset();
|
|
@@ -13006,7 +13017,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13006
13017
|
}
|
|
13007
13018
|
}
|
|
13008
13019
|
function b(k, z, E) {
|
|
13009
|
-
var
|
|
13020
|
+
var q, L, G, U, H, J, W, K, X, ee, Z, ne, re = z && z.split("/"), se = a.map, le = se && se["*"];
|
|
13010
13021
|
if (k && (k = k.split("/"), W = k.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(k[W]) && (k[W] = k[W].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && re && (ne = re.slice(0, re.length - 1), k = ne.concat(k)), C(k), k = k.join("/")), E && se && (re || le)) {
|
|
13011
13022
|
G = k.split("/");
|
|
13012
13023
|
e:
|
|
@@ -13022,7 +13033,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13022
13033
|
}
|
|
13023
13034
|
!K && ee && (K = ee, X = Z), K && (G.splice(0, X, K), k = G.join("/"));
|
|
13024
13035
|
}
|
|
13025
|
-
return
|
|
13036
|
+
return q = getOwn(a.pkgs, k), q || k;
|
|
13026
13037
|
}
|
|
13027
13038
|
function S(k) {
|
|
13028
13039
|
isBrowser && each(scripts(), function(z) {
|
|
@@ -13041,11 +13052,11 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13041
13052
|
var z, E = k ? k.indexOf("!") : -1;
|
|
13042
13053
|
return E > -1 && (z = k.substring(0, E), k = k.substring(E + 1, k.length)), [z, k];
|
|
13043
13054
|
}
|
|
13044
|
-
function F(k, z, E,
|
|
13055
|
+
function F(k, z, E, q) {
|
|
13045
13056
|
var L, G, U, H, J = null, W = z ? z.name : null, K = k, X = !0, ee = "";
|
|
13046
|
-
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), J = H[0], k = H[1], J && (J = b(J, W,
|
|
13047
|
-
return b(Z, W,
|
|
13048
|
-
}) : ee = k.indexOf("!") === -1 ? b(k, W,
|
|
13057
|
+
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), J = H[0], k = H[1], J && (J = b(J, W, q), G = getOwn(p, J)), k && (J ? E ? ee = k : G && G.normalize ? ee = G.normalize(k, function(Z) {
|
|
13058
|
+
return b(Z, W, q);
|
|
13059
|
+
}) : ee = k.indexOf("!") === -1 ? b(k, W, q) : k : (ee = b(k, W, q), H = v(ee), J = H[0], ee = H[1], E = !0, L = o.nameToUrl(ee))), U = J && !G && !E ? "_unnormalized" + (f += 1) : "", {
|
|
13049
13060
|
prefix: J,
|
|
13050
13061
|
name: ee,
|
|
13051
13062
|
parentMap: z,
|
|
@@ -13061,15 +13072,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13061
13072
|
return E || (E = l[z] = new o.Module(k)), E;
|
|
13062
13073
|
}
|
|
13063
13074
|
function w(k, z, E) {
|
|
13064
|
-
var
|
|
13065
|
-
hasProp(p,
|
|
13075
|
+
var q = k.id, L = getOwn(l, q);
|
|
13076
|
+
hasProp(p, q) && (!L || L.defineEmitComplete) ? z === "defined" && E(p[q]) : (L = I(k), L.error && z === "error" ? E(L.error) : L.on(z, E));
|
|
13066
13077
|
}
|
|
13067
13078
|
function T(k, z) {
|
|
13068
|
-
var E = k.requireModules,
|
|
13079
|
+
var E = k.requireModules, q = !1;
|
|
13069
13080
|
z ? z(k) : (each(E, function(L) {
|
|
13070
13081
|
var G = getOwn(l, L);
|
|
13071
|
-
G && (G.error = k, G.events.error && (
|
|
13072
|
-
}),
|
|
13082
|
+
G && (G.error = k, G.events.error && (q = !0, G.emit("error", k)));
|
|
13083
|
+
}), q || req.onError(k));
|
|
13073
13084
|
}
|
|
13074
13085
|
function D() {
|
|
13075
13086
|
globalDefQueue.length && (each(globalDefQueue, function(k) {
|
|
@@ -13100,28 +13111,28 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13100
13111
|
delete l[k], delete c[k];
|
|
13101
13112
|
}
|
|
13102
13113
|
function j(k, z, E) {
|
|
13103
|
-
var
|
|
13104
|
-
k.error ? k.emit("error", k.error) : (z[
|
|
13114
|
+
var q = k.map.id;
|
|
13115
|
+
k.error ? k.emit("error", k.error) : (z[q] = !0, each(k.depMaps, function(L, G) {
|
|
13105
13116
|
var U = L.id, H = getOwn(l, U);
|
|
13106
13117
|
H && !k.depMatched[G] && !E[U] && (getOwn(z, U) ? (k.defineDep(G, p[U]), k.check()) : j(H, z, E));
|
|
13107
|
-
}), E[
|
|
13118
|
+
}), E[q] = !0);
|
|
13108
13119
|
}
|
|
13109
13120
|
function N() {
|
|
13110
|
-
var k, z, E = a.waitSeconds * 1e3,
|
|
13121
|
+
var k, z, E = a.waitSeconds * 1e3, q = E && o.startTime + E < (/* @__PURE__ */ new Date()).getTime(), L = [], G = [], U = !1, H = !0;
|
|
13111
13122
|
if (!t) {
|
|
13112
13123
|
if (t = !0, eachProp(c, function(J) {
|
|
13113
13124
|
var W = J.map, K = W.id;
|
|
13114
13125
|
if (J.enabled && (W.isDefine || G.push(J), !J.error)) {
|
|
13115
|
-
if (!J.inited &&
|
|
13126
|
+
if (!J.inited && q)
|
|
13116
13127
|
y(K) ? (z = !0, U = !0) : (L.push(K), S(K));
|
|
13117
13128
|
else if (!J.inited && J.fetched && W.isDefine && (U = !0, !W.prefix))
|
|
13118
13129
|
return H = !1;
|
|
13119
13130
|
}
|
|
13120
|
-
}),
|
|
13131
|
+
}), q && L.length)
|
|
13121
13132
|
return k = makeError("timeout", "Load timeout for modules: " + L, null, L), k.contextName = o.contextName, T(k);
|
|
13122
13133
|
H && each(G, function(J) {
|
|
13123
13134
|
j(J, {}, {});
|
|
13124
|
-
}), (!
|
|
13135
|
+
}), (!q || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
13125
13136
|
i = 0, N();
|
|
13126
13137
|
}, 50)), t = !1;
|
|
13127
13138
|
}
|
|
@@ -13129,10 +13140,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13129
13140
|
n = function(k) {
|
|
13130
13141
|
this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(a.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
13131
13142
|
}, n.prototype = {
|
|
13132
|
-
init: function(k, z, E,
|
|
13133
|
-
|
|
13143
|
+
init: function(k, z, E, q) {
|
|
13144
|
+
q = q || {}, !this.inited && (this.factory = z, E ? this.on("error", E) : this.events.error && (E = bind(this, function(L) {
|
|
13134
13145
|
this.emit("error", L);
|
|
13135
|
-
})), this.depMaps = k && k.slice(0), this.errback = E, this.inited = !0, this.ignore =
|
|
13146
|
+
})), this.depMaps = k && k.slice(0), this.errback = E, this.inited = !0, this.ignore = q.ignore, q.enabled || this.enabled ? this.enable() : this.check());
|
|
13136
13147
|
},
|
|
13137
13148
|
defineDep: function(k, z) {
|
|
13138
13149
|
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = z);
|
|
@@ -13161,7 +13172,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13161
13172
|
*/
|
|
13162
13173
|
check: function() {
|
|
13163
13174
|
if (!(!this.enabled || this.enabling)) {
|
|
13164
|
-
var k, z, E = this.map.id,
|
|
13175
|
+
var k, z, E = this.map.id, q = this.depExports, L = this.exports, G = this.factory;
|
|
13165
13176
|
if (!this.inited)
|
|
13166
13177
|
hasProp(o.defQueueMap, E) || this.fetch();
|
|
13167
13178
|
else if (this.error)
|
|
@@ -13171,12 +13182,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13171
13182
|
if (isFunction(G)) {
|
|
13172
13183
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
13173
13184
|
try {
|
|
13174
|
-
L = o.execCb(E, G,
|
|
13185
|
+
L = o.execCb(E, G, q, L);
|
|
13175
13186
|
} catch (H) {
|
|
13176
13187
|
k = H;
|
|
13177
13188
|
}
|
|
13178
13189
|
else
|
|
13179
|
-
L = o.execCb(E, G,
|
|
13190
|
+
L = o.execCb(E, G, q, L);
|
|
13180
13191
|
if (this.map.isDefine && L === void 0 && (z = this.module, z ? L = z.exports : this.usingExports && (L = this.exports)), k)
|
|
13181
13192
|
return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", T(this.error = k);
|
|
13182
13193
|
} else
|
|
@@ -13195,12 +13206,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13195
13206
|
},
|
|
13196
13207
|
callPlugin: function() {
|
|
13197
13208
|
var k = this.map, z = k.id, E = F(k.prefix);
|
|
13198
|
-
this.depMaps.push(E), w(E, "defined", bind(this, function(
|
|
13209
|
+
this.depMaps.push(E), w(E, "defined", bind(this, function(q) {
|
|
13199
13210
|
var L, G, U, H = getOwn(h, this.map.id), J = this.map.name, W = this.map.parentMap ? this.map.parentMap.name : null, K = o.makeRequire(k.parentMap, {
|
|
13200
13211
|
enableBuildCallback: !0
|
|
13201
13212
|
});
|
|
13202
13213
|
if (this.map.unnormalized) {
|
|
13203
|
-
|
|
13214
|
+
q.normalize && (J = q.normalize(J, function(X) {
|
|
13204
13215
|
return b(X, W, !0);
|
|
13205
13216
|
}) || ""), G = F(
|
|
13206
13217
|
k.prefix + "!" + J,
|
|
@@ -13250,12 +13261,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13250
13261
|
));
|
|
13251
13262
|
}
|
|
13252
13263
|
re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z), K([Z], L);
|
|
13253
|
-
}),
|
|
13264
|
+
}), q.load(k.name, K, L, a);
|
|
13254
13265
|
})), o.enable(E, this), this.pluginMaps[E.id] = E;
|
|
13255
13266
|
},
|
|
13256
13267
|
enable: function() {
|
|
13257
13268
|
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, z) {
|
|
13258
|
-
var E,
|
|
13269
|
+
var E, q, L;
|
|
13259
13270
|
if (typeof k == "string") {
|
|
13260
13271
|
if (k = F(
|
|
13261
13272
|
k,
|
|
@@ -13272,7 +13283,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13272
13283
|
this.emit("error", G);
|
|
13273
13284
|
}));
|
|
13274
13285
|
}
|
|
13275
|
-
E = k.id,
|
|
13286
|
+
E = k.id, q = l[E], !hasProp(r, E) && q && !q.enabled && o.enable(k, this);
|
|
13276
13287
|
})), eachProp(this.pluginMaps, bind(this, function(k) {
|
|
13277
13288
|
var z = getOwn(l, k.id);
|
|
13278
13289
|
z && !z.enabled && o.enable(k, this);
|
|
@@ -13291,8 +13302,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13291
13302
|
function B(k) {
|
|
13292
13303
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
13293
13304
|
}
|
|
13294
|
-
function R(k, z, E,
|
|
13295
|
-
k.detachEvent && !isOpera ?
|
|
13305
|
+
function R(k, z, E, q) {
|
|
13306
|
+
k.detachEvent && !isOpera ? q && k.detachEvent(q, z) : k.removeEventListener(E, z, !1);
|
|
13296
13307
|
}
|
|
13297
13308
|
function M(k) {
|
|
13298
13309
|
var z = k.currentTarget || k.srcElement;
|
|
@@ -13333,14 +13344,14 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13333
13344
|
return (G.indexOf("?") === -1 ? "?" : "&") + z;
|
|
13334
13345
|
};
|
|
13335
13346
|
}
|
|
13336
|
-
var E = a.shim,
|
|
13347
|
+
var E = a.shim, q = {
|
|
13337
13348
|
paths: !0,
|
|
13338
13349
|
bundles: !0,
|
|
13339
13350
|
config: !0,
|
|
13340
13351
|
map: !0
|
|
13341
13352
|
};
|
|
13342
13353
|
eachProp(k, function(L, G) {
|
|
13343
|
-
|
|
13354
|
+
q[G] ? (a[G] || (a[G] = {}), mixin(a[G], L, !0, !0)) : a[G] = L;
|
|
13344
13355
|
}), k.bundles && eachProp(k.bundles, function(L, G) {
|
|
13345
13356
|
each(L, function(U) {
|
|
13346
13357
|
U !== G && (h[U] = G);
|
|
@@ -13365,10 +13376,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13365
13376
|
},
|
|
13366
13377
|
makeRequire: function(k, z) {
|
|
13367
13378
|
z = z || {};
|
|
13368
|
-
function E(
|
|
13379
|
+
function E(q, L, G) {
|
|
13369
13380
|
var U, H, J;
|
|
13370
|
-
return z.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof
|
|
13371
|
-
$(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(
|
|
13381
|
+
return z.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof q == "string" ? isFunction(L) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, E) : (H = F(q, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
|
|
13382
|
+
$(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(q, L, G, {
|
|
13372
13383
|
enabled: !0
|
|
13373
13384
|
}), N();
|
|
13374
13385
|
}), E);
|
|
@@ -13380,26 +13391,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13380
13391
|
* *Requires* the use of a module name. It does not support using
|
|
13381
13392
|
* plain URLs like nameToUrl.
|
|
13382
13393
|
*/
|
|
13383
|
-
toUrl: function(
|
|
13384
|
-
var L, G =
|
|
13385
|
-
return G !== -1 && (!H || G > 1) && (L =
|
|
13386
|
-
|
|
13394
|
+
toUrl: function(q) {
|
|
13395
|
+
var L, G = q.lastIndexOf("."), U = q.split("/")[0], H = U === "." || U === "..";
|
|
13396
|
+
return G !== -1 && (!H || G > 1) && (L = q.substring(G, q.length), q = q.substring(0, G)), o.nameToUrl(b(
|
|
13397
|
+
q,
|
|
13387
13398
|
k && k.id,
|
|
13388
13399
|
!0
|
|
13389
13400
|
), L, !0);
|
|
13390
13401
|
},
|
|
13391
|
-
defined: function(
|
|
13392
|
-
return hasProp(p, F(
|
|
13402
|
+
defined: function(q) {
|
|
13403
|
+
return hasProp(p, F(q, k, !1, !0).id);
|
|
13393
13404
|
},
|
|
13394
|
-
specified: function(
|
|
13395
|
-
return
|
|
13405
|
+
specified: function(q) {
|
|
13406
|
+
return q = F(q, k, !1, !0).id, hasProp(p, q) || hasProp(l, q);
|
|
13396
13407
|
}
|
|
13397
|
-
}), k || (E.undef = function(
|
|
13408
|
+
}), k || (E.undef = function(q) {
|
|
13398
13409
|
D();
|
|
13399
|
-
var L = F(
|
|
13400
|
-
G.undefed = !0, S(
|
|
13401
|
-
U[0] ===
|
|
13402
|
-
}), delete o.defQueueMap[
|
|
13410
|
+
var L = F(q, k, !0), G = getOwn(l, q);
|
|
13411
|
+
G.undefed = !0, S(q), delete p[q], delete m[L.url], delete u[q], eachReverse(d, function(U, H) {
|
|
13412
|
+
U[0] === q && d.splice(H, 1);
|
|
13413
|
+
}), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), O(q));
|
|
13403
13414
|
}), E;
|
|
13404
13415
|
},
|
|
13405
13416
|
/**
|
|
@@ -13419,7 +13430,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13419
13430
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
13420
13431
|
*/
|
|
13421
13432
|
completeLoad: function(k) {
|
|
13422
|
-
var z, E,
|
|
13433
|
+
var z, E, q, L = getOwn(a.shim, k) || {}, G = L.exports;
|
|
13423
13434
|
for (D(); d.length; ) {
|
|
13424
13435
|
if (E = d.shift(), E[0] === null) {
|
|
13425
13436
|
if (E[0] = k, z)
|
|
@@ -13429,7 +13440,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13429
13440
|
E[0] === k && (z = !0);
|
|
13430
13441
|
B(E);
|
|
13431
13442
|
}
|
|
13432
|
-
if (o.defQueueMap = {},
|
|
13443
|
+
if (o.defQueueMap = {}, q = getOwn(l, k), !z && !hasProp(p, k) && q && !q.inited) {
|
|
13433
13444
|
if (a.enforceDefine && (!G || !getGlobal(G)))
|
|
13434
13445
|
return y(k) ? void 0 : T(makeError(
|
|
13435
13446
|
"nodefine",
|
|
@@ -13449,14 +13460,14 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13449
13460
|
* internal API, not a public one. Use toUrl for the public API.
|
|
13450
13461
|
*/
|
|
13451
13462
|
nameToUrl: function(k, z, E) {
|
|
13452
|
-
var
|
|
13463
|
+
var q, L, G, U, H, J, W, K = getOwn(a.pkgs, k);
|
|
13453
13464
|
if (K && (k = K), W = getOwn(h, k), W)
|
|
13454
13465
|
return o.nameToUrl(W, z, E);
|
|
13455
13466
|
if (req.jsExtRegExp.test(k))
|
|
13456
13467
|
H = k + (z || "");
|
|
13457
13468
|
else {
|
|
13458
|
-
for (
|
|
13459
|
-
if (U = L.slice(0, G).join("/"), J = getOwn(
|
|
13469
|
+
for (q = a.paths, L = k.split("/"), G = L.length; G > 0; G -= 1)
|
|
13470
|
+
if (U = L.slice(0, G).join("/"), J = getOwn(q, U), J) {
|
|
13460
13471
|
isArray(J) && (J = J[0]), L.splice(0, G, J);
|
|
13461
13472
|
break;
|
|
13462
13473
|
}
|
|
@@ -13476,8 +13487,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13476
13487
|
*
|
|
13477
13488
|
* @private
|
|
13478
13489
|
*/
|
|
13479
|
-
execCb: function(k, z, E,
|
|
13480
|
-
return z.apply(
|
|
13490
|
+
execCb: function(k, z, E, q) {
|
|
13491
|
+
return z.apply(q, E);
|
|
13481
13492
|
},
|
|
13482
13493
|
/**
|
|
13483
13494
|
* callback for script loads, used to check status of loading.
|
|
@@ -13499,8 +13510,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13499
13510
|
var z = M(k);
|
|
13500
13511
|
if (!y(z.id)) {
|
|
13501
13512
|
var E = [];
|
|
13502
|
-
return eachProp(l, function(
|
|
13503
|
-
L.indexOf("_@r") !== 0 && each(
|
|
13513
|
+
return eachProp(l, function(q, L) {
|
|
13514
|
+
L.indexOf("_@r") !== 0 && each(q.depMaps, function(G) {
|
|
13504
13515
|
if (G.id === z.id)
|
|
13505
13516
|
return E.push(L), !0;
|
|
13506
13517
|
});
|
|
@@ -14221,7 +14232,7 @@ class Application {
|
|
|
14221
14232
|
});
|
|
14222
14233
|
}
|
|
14223
14234
|
load() {
|
|
14224
|
-
return
|
|
14235
|
+
return V(this, null, function* () {
|
|
14225
14236
|
var t, n, o, r, i;
|
|
14226
14237
|
try {
|
|
14227
14238
|
this.loading = !0, yield this.loadWebSocket(), yield this.pm.load();
|
|
@@ -14236,7 +14247,7 @@ class Application {
|
|
|
14236
14247
|
});
|
|
14237
14248
|
}
|
|
14238
14249
|
loadWebSocket() {
|
|
14239
|
-
return
|
|
14250
|
+
return V(this, null, function* () {
|
|
14240
14251
|
this.eventBus.addEventListener("ws:message:authorized", () => {
|
|
14241
14252
|
this.setWsAuthorized(!0);
|
|
14242
14253
|
}), this.ws.on("message", (t) => {
|
|
@@ -15481,7 +15492,7 @@ const useTableBlockProps = () => {
|
|
|
15481
15492
|
i && (i.field.data = ((v = i.field) == null ? void 0 : v.data) || {}, i.field.data.selectedRowKeys = S, i.field.data.selectedRowData = y, (I = (F = i.field) == null ? void 0 : F.onRowSelect) == null || I.call(F, S));
|
|
15482
15493
|
}, []),
|
|
15483
15494
|
onRowDragEnd: useCallback(
|
|
15484
|
-
(v) =>
|
|
15495
|
+
(v) => V(void 0, [v], function* ({ from: S, to: y }) {
|
|
15485
15496
|
yield a.current.resource.move({
|
|
15486
15497
|
sourceId: S[i.rowKey || "id"],
|
|
15487
15498
|
targetId: y[i.rowKey || "id"],
|
|
@@ -15512,7 +15523,7 @@ const useTableBlockProps = () => {
|
|
|
15512
15523
|
const T = w.find((D) => D.uid === t.parent["x-uid"]);
|
|
15513
15524
|
w.forEach((D) => {
|
|
15514
15525
|
var $, k, z, E;
|
|
15515
|
-
const O = F.find((
|
|
15526
|
+
const O = F.find((q) => q.uid === D.uid);
|
|
15516
15527
|
if (!O)
|
|
15517
15528
|
return;
|
|
15518
15529
|
const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, R = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
|
|
@@ -15531,7 +15542,7 @@ const useTableBlockProps = () => {
|
|
|
15531
15542
|
]
|
|
15532
15543
|
};
|
|
15533
15544
|
const M = mergeFilter([
|
|
15534
|
-
...Object.values(R).map((
|
|
15545
|
+
...Object.values(R).map((q) => removeNullCondition(q)),
|
|
15535
15546
|
D.defaultFilter
|
|
15536
15547
|
]);
|
|
15537
15548
|
return D.doFilter(
|
|
@@ -15733,7 +15744,7 @@ class TableFieldResource {
|
|
|
15733
15744
|
this.field = t.field, this.api = t.api, this.sourceId = t.sourceId, this.resource = this.api.resource(t.resource, this.sourceId);
|
|
15734
15745
|
}
|
|
15735
15746
|
list(t) {
|
|
15736
|
-
return
|
|
15747
|
+
return V(this, null, function* () {
|
|
15737
15748
|
if (this.field.data = this.field.data || {}, this.field.data.changed)
|
|
15738
15749
|
return console.log("list.dataSource", this.field.data.dataSource), {
|
|
15739
15750
|
data: {
|
|
@@ -15755,7 +15766,7 @@ class TableFieldResource {
|
|
|
15755
15766
|
});
|
|
15756
15767
|
}
|
|
15757
15768
|
get(t) {
|
|
15758
|
-
return
|
|
15769
|
+
return V(this, null, function* () {
|
|
15759
15770
|
console.log("get", t);
|
|
15760
15771
|
const { filterByTk: n } = t;
|
|
15761
15772
|
return {
|
|
@@ -15766,21 +15777,21 @@ class TableFieldResource {
|
|
|
15766
15777
|
});
|
|
15767
15778
|
}
|
|
15768
15779
|
create(t) {
|
|
15769
|
-
return
|
|
15780
|
+
return V(this, null, function* () {
|
|
15770
15781
|
console.log("create", t);
|
|
15771
15782
|
const { values: n } = t;
|
|
15772
15783
|
this.field.data.dataSource.push(n), this.field.data.changed = !0;
|
|
15773
15784
|
});
|
|
15774
15785
|
}
|
|
15775
15786
|
update(t) {
|
|
15776
|
-
return
|
|
15787
|
+
return V(this, null, function* () {
|
|
15777
15788
|
console.log("update", t);
|
|
15778
15789
|
const { filterByTk: n, values: o } = t;
|
|
15779
15790
|
this.field.data.dataSource[n] = o, this.field.data.changed = !0;
|
|
15780
15791
|
});
|
|
15781
15792
|
}
|
|
15782
15793
|
destroy(t) {
|
|
15783
|
-
return
|
|
15794
|
+
return V(this, null, function* () {
|
|
15784
15795
|
console.log("destroy", t);
|
|
15785
15796
|
let { filterByTk: n } = t;
|
|
15786
15797
|
Array.isArray(n) || (n = [n]), this.field.data.dataSource = this.field.data.dataSource.filter((o, r) => !n.includes(r)), this.field.data.changed = !0;
|
|
@@ -15937,8 +15948,8 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15937
15948
|
return useEffect(() => {
|
|
15938
15949
|
var w, T, D, O, j, N, B, R, M, $, k, z, E;
|
|
15939
15950
|
if (!((w = t == null ? void 0 : t.service) != null && w.loading)) {
|
|
15940
|
-
const
|
|
15941
|
-
e.value =
|
|
15951
|
+
const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
|
|
15952
|
+
e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (E = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : E.page;
|
|
15942
15953
|
}
|
|
15943
15954
|
}, [
|
|
15944
15955
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -15960,7 +15971,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15960
15971
|
t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys = w, t.field.data.selectedRowData = T;
|
|
15961
15972
|
},
|
|
15962
15973
|
onRowDragEnd(D) {
|
|
15963
|
-
return
|
|
15974
|
+
return V(this, arguments, function* ({ from: w, to: T }) {
|
|
15964
15975
|
yield t.resource.move({
|
|
15965
15976
|
sourceId: w[t.rowKey || "id"],
|
|
15966
15977
|
targetId: T[t.rowKey || "id"]
|
|
@@ -16019,7 +16030,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
16019
16030
|
);
|
|
16020
16031
|
class BlockSchemaComponentPlugin extends Plugin {
|
|
16021
16032
|
load() {
|
|
16022
|
-
return
|
|
16033
|
+
return V(this, null, function* () {
|
|
16023
16034
|
this.addComponents(), this.addScopes();
|
|
16024
16035
|
});
|
|
16025
16036
|
}
|
|
@@ -16113,7 +16124,7 @@ const regenerateUid = (e) => {
|
|
|
16113
16124
|
templates: n,
|
|
16114
16125
|
refresh: t,
|
|
16115
16126
|
getTemplateSchemaByMode: useCallback(
|
|
16116
|
-
(r) =>
|
|
16127
|
+
(r) => V(void 0, null, function* () {
|
|
16117
16128
|
const { mode: i, template: a } = r;
|
|
16118
16129
|
if (i === "copy") {
|
|
16119
16130
|
const { data: l } = yield o.request({
|
|
@@ -16132,7 +16143,7 @@ const regenerateUid = (e) => {
|
|
|
16132
16143
|
[o]
|
|
16133
16144
|
),
|
|
16134
16145
|
copyTemplateSchema: useCallback(
|
|
16135
|
-
(r) =>
|
|
16146
|
+
(r) => V(void 0, null, function* () {
|
|
16136
16147
|
const { data: i } = yield o.request({
|
|
16137
16148
|
url: `/uiSchemas:getJsonSchema/${r.uid}?includeAsyncNode=true`
|
|
16138
16149
|
}), a = (i == null ? void 0 : i.data) || {};
|
|
@@ -16141,7 +16152,7 @@ const regenerateUid = (e) => {
|
|
|
16141
16152
|
[o]
|
|
16142
16153
|
),
|
|
16143
16154
|
saveAsTemplate: useCallback(
|
|
16144
|
-
(r) =>
|
|
16155
|
+
(r) => V(void 0, null, function* () {
|
|
16145
16156
|
const { uid: i } = r, a = uid();
|
|
16146
16157
|
return yield o.resource("uiSchemas").saveAsTemplate({
|
|
16147
16158
|
filterByTk: i,
|
|
@@ -16202,7 +16213,7 @@ const regenerateUid = (e) => {
|
|
|
16202
16213
|
refreshDeps: []
|
|
16203
16214
|
}, RemoteSchemaTemplateManagerProvider = (e) => {
|
|
16204
16215
|
var i;
|
|
16205
|
-
const t = useAPIClient(), n = useRequest(options), o = useCallback(() =>
|
|
16216
|
+
const t = useAPIClient(), n = useRequest(options), o = useCallback(() => V(void 0, null, function* () {
|
|
16206
16217
|
const { data: a } = yield t.request(options);
|
|
16207
16218
|
n.mutate(a);
|
|
16208
16219
|
}), [t, n]), r = useMemo(() => {
|
|
@@ -16213,7 +16224,7 @@ const regenerateUid = (e) => {
|
|
|
16213
16224
|
};
|
|
16214
16225
|
class RemoteSchemaTemplateManagerPlugin extends Plugin {
|
|
16215
16226
|
load() {
|
|
16216
|
-
return
|
|
16227
|
+
return V(this, null, function* () {
|
|
16217
16228
|
this.addRoutes(), this.addComponents();
|
|
16218
16229
|
});
|
|
16219
16230
|
}
|
|
@@ -16249,7 +16260,7 @@ const CollectionTitle = (e) => {
|
|
|
16249
16260
|
const e = useUpdateActionProps(), { __parent: t } = useBlockRequestContext();
|
|
16250
16261
|
return {
|
|
16251
16262
|
onClick() {
|
|
16252
|
-
return
|
|
16263
|
+
return V(this, null, function* () {
|
|
16253
16264
|
var o, r;
|
|
16254
16265
|
yield e.onClick(), (r = (o = t == null ? void 0 : t.service) == null ? void 0 : o.refresh) == null || r.call(o);
|
|
16255
16266
|
});
|
|
@@ -16259,7 +16270,7 @@ const CollectionTitle = (e) => {
|
|
|
16259
16270
|
const e = useBulkDestroyActionProps(), t = useSchemaTemplateManager(), { service: n } = useBlockRequestContext();
|
|
16260
16271
|
return {
|
|
16261
16272
|
onClick() {
|
|
16262
|
-
return
|
|
16273
|
+
return V(this, null, function* () {
|
|
16263
16274
|
var r;
|
|
16264
16275
|
yield e.onClick(), yield t.refresh(), (r = n == null ? void 0 : n.refresh) == null || r.call(n);
|
|
16265
16276
|
});
|
|
@@ -16269,7 +16280,7 @@ const CollectionTitle = (e) => {
|
|
|
16269
16280
|
const e = useDestroyActionProps(), { service: t } = useBlockRequestContext(), n = useSchemaTemplateManager();
|
|
16270
16281
|
return {
|
|
16271
16282
|
onClick() {
|
|
16272
|
-
return
|
|
16283
|
+
return V(this, null, function* () {
|
|
16273
16284
|
var r;
|
|
16274
16285
|
yield e.onClick(), yield n.refresh(), (r = t == null ? void 0 : t.refresh) == null || r.call(t);
|
|
16275
16286
|
});
|
|
@@ -18030,7 +18041,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18030
18041
|
})
|
|
18031
18042
|
)
|
|
18032
18043
|
};
|
|
18033
|
-
}, [v, (J = $ == null ? void 0 : $.cols) == null ? void 0 : J.length]), E = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]),
|
|
18044
|
+
}, [v, (J = $ == null ? void 0 : $.cols) == null ? void 0 : J.length]), E = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), q = useMemo(() => {
|
|
18034
18045
|
var W;
|
|
18035
18046
|
if (o === !1)
|
|
18036
18047
|
return null;
|
|
@@ -18079,7 +18090,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18079
18090
|
] }) }),
|
|
18080
18091
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", a), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
18081
18092
|
E,
|
|
18082
|
-
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children:
|
|
18093
|
+
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children: q }),
|
|
18083
18094
|
L
|
|
18084
18095
|
] }) })
|
|
18085
18096
|
]
|
|
@@ -18193,7 +18204,7 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18193
18204
|
const {
|
|
18194
18205
|
association: z = !1,
|
|
18195
18206
|
cached: E = {},
|
|
18196
|
-
collectionNames:
|
|
18207
|
+
collectionNames: q = [R],
|
|
18197
18208
|
maxDepth: L = 1,
|
|
18198
18209
|
allowAllTypes: G = !1,
|
|
18199
18210
|
exceptInterfaces: U = [],
|
|
@@ -18201,7 +18212,7 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18201
18212
|
usePrefix: J = !1,
|
|
18202
18213
|
dataSource: W
|
|
18203
18214
|
} = k || {};
|
|
18204
|
-
if (
|
|
18215
|
+
if (q.length - 1 > L)
|
|
18205
18216
|
return;
|
|
18206
18217
|
if (E[R])
|
|
18207
18218
|
return _.cloneDeep(E[R]);
|
|
@@ -18214,10 +18225,10 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18214
18225
|
value: J && H ? `${H}.${Z.name}` : Z.name,
|
|
18215
18226
|
label: f((re = Z == null ? void 0 : Z.uiSchema) == null ? void 0 : re.title) || Z.name
|
|
18216
18227
|
}, Z);
|
|
18217
|
-
return z && Z.target && (ne.children =
|
|
18228
|
+
return z && Z.target && (ne.children = q.includes(Z.target) ? [] : I(Z.target, M, $, P(x({}, k), {
|
|
18218
18229
|
cached: E,
|
|
18219
18230
|
dataSource: W,
|
|
18220
|
-
collectionNames: [...
|
|
18231
|
+
collectionNames: [...q, Z.target],
|
|
18221
18232
|
prefixFieldValue: J ? H ? `${H}.${Z.name}` : Z.name : "",
|
|
18222
18233
|
usePrefix: J
|
|
18223
18234
|
})), !((se = ne.children) != null && se.length)) ? null : ne;
|
|
@@ -18379,7 +18390,7 @@ function FormDialog(e, t, n, o) {
|
|
|
18379
18390
|
var b;
|
|
18380
18391
|
((b = l == null ? void 0 : l.onCancel) == null ? void 0 : b.call(l, C)) !== !1 && (h == null || h());
|
|
18381
18392
|
},
|
|
18382
|
-
onOk: (C) =>
|
|
18393
|
+
onOk: (C) => V(this, null, function* () {
|
|
18383
18394
|
var b;
|
|
18384
18395
|
((b = l == null ? void 0 : l.onOk) == null ? void 0 : b.call(l, C)) !== !1 && (m == null || m());
|
|
18385
18396
|
}),
|
|
@@ -18393,8 +18404,8 @@ function FormDialog(e, t, n, o) {
|
|
|
18393
18404
|
forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
|
|
18394
18405
|
forConfirm: (p) => (isFn(p) && r.confirmMiddlewares.push(p), d),
|
|
18395
18406
|
forCancel: (p) => (isFn(p) && r.cancelMiddlewares.push(p), d),
|
|
18396
|
-
open: (p) =>
|
|
18397
|
-
return r.promise || (r.promise = new Promise((m, h) =>
|
|
18407
|
+
open: (p) => V(this, null, function* () {
|
|
18408
|
+
return r.promise || (r.promise = new Promise((m, h) => V(this, null, function* () {
|
|
18398
18409
|
try {
|
|
18399
18410
|
p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
|
|
18400
18411
|
} catch (g) {
|
|
@@ -18405,7 +18416,7 @@ function FormDialog(e, t, n, o) {
|
|
|
18405
18416
|
!0,
|
|
18406
18417
|
() => {
|
|
18407
18418
|
var g;
|
|
18408
|
-
(g = r.form) == null || g.submit(() =>
|
|
18419
|
+
(g = r.form) == null || g.submit(() => V(this, null, function* () {
|
|
18409
18420
|
yield applyMiddleware(r.form, r.confirmMiddlewares), untracked(() => {
|
|
18410
18421
|
var f;
|
|
18411
18422
|
m(x({}, (f = r.form) == null ? void 0 : f.values));
|
|
@@ -18413,7 +18424,7 @@ function FormDialog(e, t, n, o) {
|
|
|
18413
18424
|
})).catch(() => {
|
|
18414
18425
|
});
|
|
18415
18426
|
},
|
|
18416
|
-
() =>
|
|
18427
|
+
() => V(this, null, function* () {
|
|
18417
18428
|
yield loading(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
|
|
18418
18429
|
})
|
|
18419
18430
|
)
|
|
@@ -18579,7 +18590,7 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
|
|
|
18579
18590
|
}), () => {
|
|
18580
18591
|
u.current();
|
|
18581
18592
|
}), [e._maxDate, e._minDate, r, o]);
|
|
18582
|
-
const d = () =>
|
|
18593
|
+
const d = () => V(void 0, null, function* () {
|
|
18583
18594
|
let m = e._minDate ? Promise.resolve(dayjs(e._minDate)) : Promise.resolve(null), h = e._maxDate ? Promise.resolve(dayjs(e._maxDate)) : Promise.resolve(null);
|
|
18584
18595
|
isVariable$1(e._maxDate) && (h = o(e._maxDate, r).then((y) => dayjs(y.value))), isVariable$1(e._minDate) && (m = o(e._minDate, r).then((y) => dayjs(y.value)));
|
|
18585
18596
|
const [g, f] = yield Promise.all([m, h]), C = Array.from({ length: 60 }, (y, v) => v), b = (y) => {
|
|
@@ -19109,7 +19120,7 @@ const useDateVariable = ({ operator: e, schema: t, noDisabled: n }) => {
|
|
|
19109
19120
|
key: t,
|
|
19110
19121
|
isLeaf: !1,
|
|
19111
19122
|
disabled: a,
|
|
19112
|
-
loadChildren: (c, u) =>
|
|
19123
|
+
loadChildren: (c, u) => V(void 0, null, function* () {
|
|
19113
19124
|
const d = u ? {
|
|
19114
19125
|
[u]: void 0
|
|
19115
19126
|
} : {};
|
|
@@ -19672,7 +19683,7 @@ const findOption$1 = (e = [], t) => {
|
|
|
19672
19683
|
(T, D) => {
|
|
19673
19684
|
if (!u)
|
|
19674
19685
|
return n(T);
|
|
19675
|
-
setTimeout(() =>
|
|
19686
|
+
setTimeout(() => V(void 0, null, function* () {
|
|
19676
19687
|
(yield u(T, D)) && n(T);
|
|
19677
19688
|
}));
|
|
19678
19689
|
},
|
|
@@ -19702,7 +19713,7 @@ const findOption$1 = (e = [], t) => {
|
|
|
19702
19713
|
getAllCollectionsInheritChain: o
|
|
19703
19714
|
}) => {
|
|
19704
19715
|
const r = e ? o(e.target) : [];
|
|
19705
|
-
return (i, a) =>
|
|
19716
|
+
return (i, a) => V(void 0, null, function* () {
|
|
19706
19717
|
if (_.isString(i) && i.includes("$nRole") || !isVariable$1(i) || !t || !e || e.interface === "json")
|
|
19707
19718
|
return !0;
|
|
19708
19719
|
const l = a[a.length - 1];
|
|
@@ -20369,7 +20380,7 @@ const EnableChildCollections = withDynamicSchemaProps(
|
|
|
20369
20380
|
d.dataSource = m, d.loading = !1, d.initialValue && (d.disabled = !0);
|
|
20370
20381
|
})
|
|
20371
20382
|
);
|
|
20372
|
-
}, c = (u) =>
|
|
20383
|
+
}, c = (u) => V(void 0, null, function* () {
|
|
20373
20384
|
var p, m;
|
|
20374
20385
|
const { childrenCollections: d } = ((p = o.values) == null ? void 0 : p.enableChildren) || {};
|
|
20375
20386
|
return (m = a.filter((h) => !d.find((g) => g.collection === h.name) || u.initialValue || h.name === u.value)) == null ? void 0 : m.map((h) => ({
|
|
@@ -21314,7 +21325,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
21314
21325
|
SchemaSettingsItem,
|
|
21315
21326
|
{
|
|
21316
21327
|
title: "Convert reference to duplicate",
|
|
21317
|
-
onClick: () =>
|
|
21328
|
+
onClick: () => V(this, null, function* () {
|
|
21318
21329
|
const b = yield f(p), S = findBlockTemplateSchema(m), y = createDesignable({
|
|
21319
21330
|
t: a,
|
|
21320
21331
|
api: h,
|
|
@@ -21322,7 +21333,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
21322
21333
|
});
|
|
21323
21334
|
y.loadAPIClientEvents(), y.removeWithoutEmit(S), y.insertAdjacent(n, b, {
|
|
21324
21335
|
onSuccess() {
|
|
21325
|
-
return
|
|
21336
|
+
return V(this, null, function* () {
|
|
21326
21337
|
yield h.request({
|
|
21327
21338
|
url: `/uiSchemas:remove/${S["x-uid"]}`
|
|
21328
21339
|
});
|
|
@@ -21343,7 +21354,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
21343
21354
|
SchemaSettingsItem,
|
|
21344
21355
|
{
|
|
21345
21356
|
title: "Save as block template",
|
|
21346
|
-
onClick: () =>
|
|
21357
|
+
onClick: () => V(this, null, function* () {
|
|
21347
21358
|
d(!1);
|
|
21348
21359
|
const b = r && (c == null ? void 0 : c.getCollection(r)), S = findGridSchema(m), y = yield FormDialog(
|
|
21349
21360
|
a("Save as template"),
|
|
@@ -21457,7 +21468,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
21457
21468
|
content: c("Are you sure you want to delete it?")
|
|
21458
21469
|
}, n), {
|
|
21459
21470
|
onOk() {
|
|
21460
|
-
return
|
|
21471
|
+
return V(this, null, function* () {
|
|
21461
21472
|
var y;
|
|
21462
21473
|
const S = {
|
|
21463
21474
|
removeParentsIfNoChildren: r,
|
|
@@ -21568,7 +21579,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21568
21579
|
}, [JSON.stringify(r || {})]);
|
|
21569
21580
|
const O = useCallback(() => {
|
|
21570
21581
|
h(!1), D.reset();
|
|
21571
|
-
}, [D]), j = useCallback(() =>
|
|
21582
|
+
}, [D]), j = useCallback(() => V(void 0, null, function* () {
|
|
21572
21583
|
yield D.submit();
|
|
21573
21584
|
try {
|
|
21574
21585
|
const M = D.values, $ = Object.keys(M).reduce((k, z) => (D.query(z).take() && (k[z] = M[z]), k), {});
|
|
@@ -21576,7 +21587,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21576
21587
|
} catch (M) {
|
|
21577
21588
|
console.error(M);
|
|
21578
21589
|
}
|
|
21579
|
-
}), [D, n]), N = useCallback(() =>
|
|
21590
|
+
}), [D, n]), N = useCallback(() => V(void 0, null, function* () {
|
|
21580
21591
|
!g && (a != null && a["x-uid"]) && (b["x-action-settings"].schemaUid = a["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: a }), f(a["x-uid"])), typeof i == "function" && (i == null || i()), S.setVisible(!1), h(!0);
|
|
21581
21592
|
}), [F, S, y, b, a, g]), B = useCallback((M) => M.stopPropagation(), []);
|
|
21582
21593
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: T, children: [
|
|
@@ -21619,7 +21630,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21619
21630
|
});
|
|
21620
21631
|
SchemaSettingsActionModalItem.displayName = "SchemaSettingsActionModalItem";
|
|
21621
21632
|
const SchemaSettingsModalItem = (e) => {
|
|
21622
|
-
const
|
|
21633
|
+
const q = e, {
|
|
21623
21634
|
hidden: t,
|
|
21624
21635
|
title: n,
|
|
21625
21636
|
components: o,
|
|
@@ -21631,7 +21642,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21631
21642
|
width: u = "fit-content",
|
|
21632
21643
|
noRecord: d = !1,
|
|
21633
21644
|
ModalContextProvider: p = (L) => /* @__PURE__ */ jsx(Fragment$1, { children: L.children })
|
|
21634
|
-
} =
|
|
21645
|
+
} = q, m = Y(q, [
|
|
21635
21646
|
"hidden",
|
|
21636
21647
|
"title",
|
|
21637
21648
|
"components",
|
|
@@ -21649,7 +21660,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21649
21660
|
P(x({
|
|
21650
21661
|
title: n
|
|
21651
21662
|
}, m), {
|
|
21652
|
-
onClick: () =>
|
|
21663
|
+
onClick: () => V(void 0, null, function* () {
|
|
21653
21664
|
const L = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21654
21665
|
FormDialog(
|
|
21655
21666
|
{ title: G.title || n, width: u },
|
|
@@ -21722,7 +21733,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21722
21733
|
} : {
|
|
21723
21734
|
field: h,
|
|
21724
21735
|
direction: "asc"
|
|
21725
|
-
}), p = useSortFields(t.name || (c == null ? void 0 : c.name)), m = (g) =>
|
|
21736
|
+
}), p = useSortFields(t.name || (c == null ? void 0 : c.name)), m = (g) => V(this, [g], function* ({ sort: h }) {
|
|
21726
21737
|
var C;
|
|
21727
21738
|
if (t != null && t.onSubmit)
|
|
21728
21739
|
return t.onSubmit({ sort: h });
|
|
@@ -22555,18 +22566,18 @@ const getActionContext = (e) => {
|
|
|
22555
22566
|
`${w.target}.${((E = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : E.label) || "id"}`
|
|
22556
22567
|
));
|
|
22557
22568
|
const D = (w == null ? void 0 : w.interface) === "m2o" && findParentFieldSchema(o), O = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), N = (w == null ? void 0 : w.interface) === "m2m" || (w == null ? void 0 : w.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (w == null ? void 0 : w.interface) === "m2o", B = useCallback(
|
|
22558
|
-
(
|
|
22559
|
-
const L =
|
|
22560
|
-
return !(G != null && G.length) && L && (L.children = formatVariableScop(y())),
|
|
22569
|
+
(q) => {
|
|
22570
|
+
const L = q.find((U) => U.value === "$nForm"), G = m(I);
|
|
22571
|
+
return !(G != null && G.length) && L && (L.children = formatVariableScop(y())), q;
|
|
22561
22572
|
},
|
|
22562
22573
|
[y, I]
|
|
22563
22574
|
), R = useMemo(() => ({
|
|
22564
22575
|
ArrayCollapse: ArrayCollapse$2,
|
|
22565
22576
|
FormLayout,
|
|
22566
|
-
VariableInput: (
|
|
22577
|
+
VariableInput: (q) => /* @__PURE__ */ jsx(
|
|
22567
22578
|
VariableInput,
|
|
22568
|
-
P(x({},
|
|
22569
|
-
value:
|
|
22579
|
+
P(x({}, q), {
|
|
22580
|
+
value: q.value || void 0,
|
|
22570
22581
|
hideVariableButton: t == null ? void 0 : t.hideVariableButton
|
|
22571
22582
|
})
|
|
22572
22583
|
)
|
|
@@ -22636,12 +22647,12 @@ const getActionContext = (e) => {
|
|
|
22636
22647
|
u,
|
|
22637
22648
|
g
|
|
22638
22649
|
]), $ = useCallback(
|
|
22639
|
-
(
|
|
22650
|
+
(q) => {
|
|
22640
22651
|
var G, U, H;
|
|
22641
22652
|
const L = {
|
|
22642
22653
|
"x-uid": o["x-uid"]
|
|
22643
22654
|
};
|
|
22644
|
-
o.default = (G =
|
|
22655
|
+
o.default = (G = q.default) != null ? G : null, isVariable$1(q.default) || (U = r.setInitialValue) == null || U.call(r, q.default), L.default = (H = q.default) != null ? H : null, i.emit("patch", {
|
|
22645
22656
|
schema: L,
|
|
22646
22657
|
currentSchema: n
|
|
22647
22658
|
});
|
|
@@ -22656,7 +22667,7 @@ const getActionContext = (e) => {
|
|
|
22656
22667
|
width: 800,
|
|
22657
22668
|
schema: M,
|
|
22658
22669
|
onSubmit: $,
|
|
22659
|
-
ModalContextProvider: (
|
|
22670
|
+
ModalContextProvider: (q) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: v, isInSubTable: F, isInSetDefaultValueDialog: !0, children: q.children })
|
|
22660
22671
|
}
|
|
22661
22672
|
);
|
|
22662
22673
|
}, SchemaSettingsSortingRule = function e(t) {
|
|
@@ -22977,7 +22988,7 @@ const SaveConditions = () => {
|
|
|
22977
22988
|
/* @__PURE__ */ jsx(
|
|
22978
22989
|
Button,
|
|
22979
22990
|
{
|
|
22980
|
-
onClick: () =>
|
|
22991
|
+
onClick: () => V(void 0, null, function* () {
|
|
22981
22992
|
yield e.reset(), r == null || r(e.values), n.title = l(o.title) || c("Filter"), i(!1);
|
|
22982
22993
|
}),
|
|
22983
22994
|
children: c("Reset")
|
|
@@ -23424,7 +23435,7 @@ const useGetFilterOptions = () => {
|
|
|
23424
23435
|
};
|
|
23425
23436
|
});
|
|
23426
23437
|
}, TableColumnDesigner$1 = (e) => {
|
|
23427
|
-
var j, N, B, R, M, $, k, z, E,
|
|
23438
|
+
var j, N, B, R, M, $, k, z, E, q, L, G;
|
|
23428
23439
|
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((B = o == null ? void 0 : o.target) != null ? B : o == null ? void 0 : o.targetCollection), h = useColorFields((R = o == null ? void 0 : o.target) != null ? R : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
23429
23440
|
o == null ? void 0 : o.interface
|
|
23430
23441
|
), I = useFieldModeOptions({ fieldSchema: n }), w = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
|
|
@@ -23493,7 +23504,7 @@ const useGetFilterOptions = () => {
|
|
|
23493
23504
|
title: c("Column width"),
|
|
23494
23505
|
properties: {
|
|
23495
23506
|
width: {
|
|
23496
|
-
default: ((
|
|
23507
|
+
default: ((q = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : q.width) || 100,
|
|
23497
23508
|
"x-decorator": "FormItem",
|
|
23498
23509
|
"x-component": "InputNumber",
|
|
23499
23510
|
"x-component-props": {}
|
|
@@ -24816,7 +24827,7 @@ function VariableSelect({
|
|
|
24816
24827
|
}) {
|
|
24817
24828
|
const { t: l } = useTranslation(), [c, u] = useState([]), { wrapSSR: d, componentCls: p, hashId: m } = useStyles$d(), { token: h } = useToken$1();
|
|
24818
24829
|
function g(f) {
|
|
24819
|
-
return
|
|
24830
|
+
return V(this, null, function* () {
|
|
24820
24831
|
var b;
|
|
24821
24832
|
const C = f[f.length - 1];
|
|
24822
24833
|
!((b = C.children) != null && b.length) && !C.isLeaf && C.loadChildren && (yield C.loadChildren(C), t((S) => [...S]));
|
|
@@ -25053,7 +25064,7 @@ const useStyles$c = genStyleHook("nb-markdown", (e, { isDarkTheme: t }) => {
|
|
|
25053
25064
|
".field-interface-datetime": { minWidth: "100px" }
|
|
25054
25065
|
}, t ? i : r)
|
|
25055
25066
|
};
|
|
25056
|
-
}), parseMarkdown = _.memoize((e) =>
|
|
25067
|
+
}), parseMarkdown = _.memoize((e) => V(void 0, null, function* () {
|
|
25057
25068
|
return e && (yield import("./md-oH2RssNY.mjs")).default.render(e);
|
|
25058
25069
|
}));
|
|
25059
25070
|
function useParseMarkdown(e) {
|
|
@@ -25154,8 +25165,8 @@ const MarkdownEditor = (e) => {
|
|
|
25154
25165
|
observer$1((e) => {
|
|
25155
25166
|
const { isDarkTheme: t } = useGlobalTheme(), { componentCls: n, hashId: o } = useStyles$c({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables$1(), C = useLocalVariables$1(), { engine: b } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [S, y] = useState(!1);
|
|
25156
25167
|
useCompile(), useEffect(() => {
|
|
25157
|
-
y(!0),
|
|
25158
|
-
setTimeout(() =>
|
|
25168
|
+
y(!0), V(void 0, null, function* () {
|
|
25169
|
+
setTimeout(() => V(void 0, null, function* () {
|
|
25159
25170
|
const w = yield getRenderContent(b, r, f, C, parseMarkdown);
|
|
25160
25171
|
g(w);
|
|
25161
25172
|
})), y(!1);
|
|
@@ -25180,7 +25191,7 @@ const MarkdownEditor = (e) => {
|
|
|
25180
25191
|
onCancel: () => {
|
|
25181
25192
|
a.editable = !1, d == null || d();
|
|
25182
25193
|
},
|
|
25183
|
-
onSubmit: (I) =>
|
|
25194
|
+
onSubmit: (I) => V(void 0, null, function* () {
|
|
25184
25195
|
var w;
|
|
25185
25196
|
a.editable = !1, (w = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = I, a.componentProps.content = I, u == null || u(l), c.emit("patch", {
|
|
25186
25197
|
schema: {
|
|
@@ -25350,13 +25361,14 @@ const useStyles$b = genStyleHook("nb-menu-item", (e) => {
|
|
|
25350
25361
|
};
|
|
25351
25362
|
}), JT_VALUE_RE = /^\s*{{\s*([^{}]+)\s*}}\s*$/;
|
|
25352
25363
|
function parseValue(e, t = {}) {
|
|
25364
|
+
var o;
|
|
25353
25365
|
if (e == null)
|
|
25354
|
-
return "null";
|
|
25366
|
+
return (o = t.defaultTypeOnNull) != null ? o : "null";
|
|
25355
25367
|
const n = typeof e;
|
|
25356
25368
|
if (n === "string") {
|
|
25357
|
-
const
|
|
25358
|
-
if (
|
|
25359
|
-
return
|
|
25369
|
+
const r = e.match(JT_VALUE_RE);
|
|
25370
|
+
if (r)
|
|
25371
|
+
return r[1].split(".");
|
|
25360
25372
|
if (t.stringToDate && !Number.isNaN(Date.parse(e)))
|
|
25361
25373
|
return "date";
|
|
25362
25374
|
}
|
|
@@ -25522,7 +25534,7 @@ function Input$1(e) {
|
|
|
25522
25534
|
].filter((ne) => !ne.deprecated || (R == null ? void 0 : R[0]) === ne[M.value]);
|
|
25523
25535
|
I(ee);
|
|
25524
25536
|
}, [h, R, $, a]);
|
|
25525
|
-
const
|
|
25537
|
+
const q = (K) => V(this, null, function* () {
|
|
25526
25538
|
var ee;
|
|
25527
25539
|
const X = K[K.length - 1];
|
|
25528
25540
|
if (!((ee = X.children) != null && ee.length) && !X.isLeaf && X.loadChildren) {
|
|
@@ -25564,7 +25576,7 @@ function Input$1(e) {
|
|
|
25564
25576
|
n(null);
|
|
25565
25577
|
}, [$]);
|
|
25566
25578
|
useEffect(() => {
|
|
25567
|
-
|
|
25579
|
+
V(this, null, function* () {
|
|
25568
25580
|
var Z;
|
|
25569
25581
|
if (!R || F.length <= 1)
|
|
25570
25582
|
return;
|
|
@@ -25659,7 +25671,7 @@ function Input$1(e) {
|
|
|
25659
25671
|
options: F,
|
|
25660
25672
|
value: R != null ? R : E,
|
|
25661
25673
|
onChange: L,
|
|
25662
|
-
loadData:
|
|
25674
|
+
loadData: q,
|
|
25663
25675
|
changeOnSelect: u,
|
|
25664
25676
|
fieldNames: d,
|
|
25665
25677
|
disabled: U,
|
|
@@ -25940,7 +25952,7 @@ function TextArea(e) {
|
|
|
25940
25952
|
F(!0), pasteHTML(L.currentTarget, U), D(getCurrentRange(L.currentTarget)), N(L.currentTarget);
|
|
25941
25953
|
},
|
|
25942
25954
|
[N]
|
|
25943
|
-
),
|
|
25955
|
+
), q = e.disabled || C.disabled;
|
|
25944
25956
|
return t(
|
|
25945
25957
|
/* @__PURE__ */ jsxs(
|
|
25946
25958
|
Space$1.Compact,
|
|
@@ -25999,7 +26011,7 @@ function TextArea(e) {
|
|
|
25999
26011
|
className: cx(
|
|
26000
26012
|
n,
|
|
26001
26013
|
"ant-input",
|
|
26002
|
-
{ "ant-input-disabled":
|
|
26014
|
+
{ "ant-input-disabled": q },
|
|
26003
26015
|
// NOTE: `pre-wrap` here for avoid the ` ` (\x160) issue when paste content, we need normal space (\x32).
|
|
26004
26016
|
css`
|
|
26005
26017
|
min-height: ${O.controlHeight}px;
|
|
@@ -26021,7 +26033,7 @@ function TextArea(e) {
|
|
|
26021
26033
|
`
|
|
26022
26034
|
),
|
|
26023
26035
|
ref: h,
|
|
26024
|
-
contentEditable: !
|
|
26036
|
+
contentEditable: !q,
|
|
26025
26037
|
dangerouslySetInnerHTML: { __html: I }
|
|
26026
26038
|
}
|
|
26027
26039
|
),
|
|
@@ -26033,7 +26045,7 @@ function TextArea(e) {
|
|
|
26033
26045
|
onInsert: B,
|
|
26034
26046
|
changeOnSelect: i,
|
|
26035
26047
|
fieldNames: l || defaultFieldNames$2,
|
|
26036
|
-
disabled:
|
|
26048
|
+
disabled: q
|
|
26037
26049
|
}
|
|
26038
26050
|
)
|
|
26039
26051
|
]
|
|
@@ -26042,7 +26054,7 @@ function TextArea(e) {
|
|
|
26042
26054
|
);
|
|
26043
26055
|
}
|
|
26044
26056
|
function preloadOptions(e, t) {
|
|
26045
|
-
return
|
|
26057
|
+
return V(this, null, function* () {
|
|
26046
26058
|
var r;
|
|
26047
26059
|
let n = [...e != null ? e : []];
|
|
26048
26060
|
const o = t.map((i) => i.split("."));
|
|
@@ -26236,7 +26248,7 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26236
26248
|
}), [e]);
|
|
26237
26249
|
return { urlSchema: n, paramsSchema: i, openInNewWindowSchema: a, modeSchema: o, htmlSchema: r };
|
|
26238
26250
|
}, LinkMenuItem = () => {
|
|
26239
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(), l = useParentRoute(), { createRoute: c } = useNocoBaseRoutes(), u = useDataSourceManager(), d = useCollectionManager(), p = useCallback(() =>
|
|
26251
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(), l = useParentRoute(), { createRoute: c } = useNocoBaseRoutes(), u = useDataSourceManager(), d = useCollectionManager(), p = useCallback(() => V(void 0, null, function* () {
|
|
26240
26252
|
const m = yield FormDialog(
|
|
26241
26253
|
e("Add link"),
|
|
26242
26254
|
() => {
|
|
@@ -26284,7 +26296,7 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26284
26296
|
}, useInsertPageSchema = () => {
|
|
26285
26297
|
const e = useAPIClient();
|
|
26286
26298
|
return useCallback(
|
|
26287
|
-
(t) =>
|
|
26299
|
+
(t) => V(void 0, null, function* () {
|
|
26288
26300
|
yield e.request({
|
|
26289
26301
|
method: "POST",
|
|
26290
26302
|
url: "/uiSchemas:insert",
|
|
@@ -26294,7 +26306,7 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26294
26306
|
[e]
|
|
26295
26307
|
);
|
|
26296
26308
|
}, PageMenuItem = () => {
|
|
26297
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() =>
|
|
26309
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() => V(void 0, null, function* () {
|
|
26298
26310
|
const u = yield FormDialog(
|
|
26299
26311
|
e("Add page"),
|
|
26300
26312
|
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
@@ -26359,7 +26371,7 @@ function getPageMenuSchema({ pageSchemaUid: e, tabSchemaUid: t, tabSchemaName: n
|
|
|
26359
26371
|
};
|
|
26360
26372
|
}
|
|
26361
26373
|
const GroupItem$1 = () => {
|
|
26362
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useCallback(() =>
|
|
26374
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), i = useParentRoute(), { createRoute: a } = useNocoBaseRoutes(), l = useCallback(() => V(void 0, null, function* () {
|
|
26363
26375
|
const c = yield FormDialog(
|
|
26364
26376
|
e("Add group"),
|
|
26365
26377
|
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
@@ -26485,7 +26497,7 @@ const GroupItem$1 = () => {
|
|
|
26485
26497
|
t.confirm({
|
|
26486
26498
|
title: e("Delete menu item"),
|
|
26487
26499
|
content: e("Are you sure you want to delete it?"),
|
|
26488
|
-
onOk: () =>
|
|
26500
|
+
onOk: () => V(void 0, null, function* () {
|
|
26489
26501
|
if ((o == null ? void 0 : o.id) != null && (yield n(o.id)), a !== (o == null ? void 0 : o.schemaUid) && !findRouteBySchemaUid(a, o == null ? void 0 : o.children))
|
|
26490
26502
|
return;
|
|
26491
26503
|
const l = findPrevSibling(r, o), c = findNextSibling(r, o);
|
|
@@ -26522,7 +26534,7 @@ const GroupItem$1 = () => {
|
|
|
26522
26534
|
}
|
|
26523
26535
|
}
|
|
26524
26536
|
},
|
|
26525
|
-
onSubmit: (g) =>
|
|
26537
|
+
onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
|
|
26526
26538
|
var S;
|
|
26527
26539
|
const f = uid(), C = o === "beforeEnd" ? l == null ? void 0 : l.id : l == null ? void 0 : l.parentId, { data: b } = yield u({
|
|
26528
26540
|
type: NocoBaseDesktopRouteType.group,
|
|
@@ -26564,7 +26576,7 @@ const GroupItem$1 = () => {
|
|
|
26564
26576
|
}
|
|
26565
26577
|
}
|
|
26566
26578
|
},
|
|
26567
|
-
onSubmit: (g) =>
|
|
26579
|
+
onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
|
|
26568
26580
|
var F;
|
|
26569
26581
|
const f = uid(), C = uid(), b = uid(), S = uid(), y = o === "beforeEnd" ? l == null ? void 0 : l.id : l == null ? void 0 : l.parentId, { data: v } = yield u({
|
|
26570
26582
|
type: NocoBaseDesktopRouteType.page,
|
|
@@ -26617,7 +26629,7 @@ const GroupItem$1 = () => {
|
|
|
26617
26629
|
params: a
|
|
26618
26630
|
}
|
|
26619
26631
|
},
|
|
26620
|
-
onSubmit: (C) =>
|
|
26632
|
+
onSubmit: (C) => V(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
|
|
26621
26633
|
var v;
|
|
26622
26634
|
const b = uid(), S = o === "beforeEnd" ? l == null ? void 0 : l.id : l == null ? void 0 : l.parentId, { data: y } = yield u({
|
|
26623
26635
|
type: NocoBaseDesktopRouteType.link,
|
|
@@ -26699,7 +26711,7 @@ const GroupItem$1 = () => {
|
|
|
26699
26711
|
"After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it."
|
|
26700
26712
|
),
|
|
26701
26713
|
onOk() {
|
|
26702
|
-
return
|
|
26714
|
+
return V(this, null, function* () {
|
|
26703
26715
|
t.id !== void 0 && (yield n(t.id, {
|
|
26704
26716
|
hideInMenu: !!r
|
|
26705
26717
|
}));
|
|
@@ -26753,7 +26765,7 @@ const GroupItem$1 = () => {
|
|
|
26753
26765
|
}
|
|
26754
26766
|
}
|
|
26755
26767
|
}), [r, e]), { moveRoute: a } = useNocoBaseRoutes(), l = useCurrentRoute(), c = useCallback(
|
|
26756
|
-
(p) =>
|
|
26768
|
+
(p) => V(void 0, [p], function* ({ target: u, position: d }) {
|
|
26757
26769
|
var f;
|
|
26758
26770
|
const [m] = ((f = u == null ? void 0 : u.split) == null ? void 0 : f.call(u, "||")) || [];
|
|
26759
26771
|
if (!m || m === void 0 || !l)
|
|
@@ -26940,7 +26952,7 @@ const LanguageSettings = () => {
|
|
|
26940
26952
|
value: a
|
|
26941
26953
|
})),
|
|
26942
26954
|
value: t.language,
|
|
26943
|
-
onChange: (a) =>
|
|
26955
|
+
onChange: (a) => V(void 0, null, function* () {
|
|
26944
26956
|
yield n.resource("users").updateLang({
|
|
26945
26957
|
values: {
|
|
26946
26958
|
appLang: a
|
|
@@ -27022,7 +27034,20 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
|
|
|
27022
27034
|
`, pageContentStyle = {
|
|
27023
27035
|
flex: 1,
|
|
27024
27036
|
overflowY: "auto"
|
|
27025
|
-
},
|
|
27037
|
+
}, ShowTipWhenNoPages = () => {
|
|
27038
|
+
const { allAccessRoutes: e } = useAllAccessDesktopRoutes(), { designable: t } = useDesignable(), { token: n } = useToken(), { t: o } = useTranslation(), r = useLocation();
|
|
27039
|
+
return e.length === 0 && !t && ["/admin", "/admin/"].includes(r.pathname) ? /* @__PURE__ */ jsx(
|
|
27040
|
+
Result,
|
|
27041
|
+
{
|
|
27042
|
+
icon: /* @__PURE__ */ jsx(HighlightOutlined, { style: { fontSize: "8em", color: n.colorText } }),
|
|
27043
|
+
title: o("No pages yet, please configure first"),
|
|
27044
|
+
subTitle: o('Click the "UI Editor" icon in the upper right corner to enter the UI Editor mode')
|
|
27045
|
+
}
|
|
27046
|
+
) : null;
|
|
27047
|
+
}, LayoutContent = () => /* @__PURE__ */ jsx("div", { className: `${layoutContentClass} nb-subpages-slot-without-header-and-side`, children: /* @__PURE__ */ jsxs("div", { style: pageContentStyle, children: [
|
|
27048
|
+
/* @__PURE__ */ jsx(Outlet, {}),
|
|
27049
|
+
/* @__PURE__ */ jsx(ShowTipWhenNoPages, {})
|
|
27050
|
+
] }) }), NocoBaseLogo = () => {
|
|
27026
27051
|
var r, i, a, l, c, u, d, p;
|
|
27027
27052
|
const e = useSystemSettings(), { token: t } = useToken(), n = useMemo(() => ({ fontSize: t.fontSizeHeading3 }), [t.fontSizeHeading3]), o = (a = (i = (r = e == null ? void 0 : e.data) == null ? void 0 : r.data) == null ? void 0 : i.logo) != null && a.url ? /* @__PURE__ */ jsx("img", { className: className2, src: (u = (c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.data) == null ? void 0 : c.logo) == null ? void 0 : u.url }) : /* @__PURE__ */ jsx("span", { style: n, className: className3, children: (p = (d = e == null ? void 0 : e.data) == null ? void 0 : d.data) == null ? void 0 : p.title });
|
|
27028
27053
|
return /* @__PURE__ */ jsx("div", { className: className1$1, children: e != null && e.loading ? null : o });
|
|
@@ -27050,7 +27075,7 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
|
|
|
27050
27075
|
o.current && (o.current.parentElement.parentElement.style.order = 999, o.current.parentElement.parentElement.style.paddingLeft = 0, o.current.parentElement.parentElement.style.padding = 0);
|
|
27051
27076
|
}, []);
|
|
27052
27077
|
const i = useCallback(
|
|
27053
|
-
(u) =>
|
|
27078
|
+
(u) => V(void 0, null, function* () {
|
|
27054
27079
|
var m, h;
|
|
27055
27080
|
const d = (m = t._route.options) == null ? void 0 : m.href, p = (h = t._route.options) == null ? void 0 : h.params;
|
|
27056
27081
|
u.preventDefault(), u.stopPropagation();
|
|
@@ -27244,12 +27269,12 @@ const NavigateToDefaultPage = (e) => {
|
|
|
27244
27269
|
}, AdminProvider = (e) => /* @__PURE__ */ jsx(CurrentPageUidProvider, { children: /* @__PURE__ */ jsx(CurrentTabUidProvider, { children: /* @__PURE__ */ jsx(IsSubPageClosedByPageMenuProvider, { children: /* @__PURE__ */ jsx(ACLRolesCheckProvider, { children: /* @__PURE__ */ jsx(RoutesRequestProvider, { children: /* @__PURE__ */ jsx(NavigateToDefaultPage, { children: /* @__PURE__ */ jsx(LegacyRouteCompat, { children: /* @__PURE__ */ jsx(RemoteCollectionManagerProvider, { children: /* @__PURE__ */ jsx(CurrentAppInfoProvider, { children: /* @__PURE__ */ jsx(RemoteSchemaTemplateManagerProvider, { children: e.children }) }) }) }) }) }) }) }) }) }), AdminLayout = (e) => /* @__PURE__ */ jsx(AdminProvider, { children: /* @__PURE__ */ jsx(InternalAdminLayout, x({}, e)) });
|
|
27245
27270
|
class AdminLayoutPlugin extends Plugin {
|
|
27246
27271
|
afterAdd() {
|
|
27247
|
-
return
|
|
27272
|
+
return V(this, null, function* () {
|
|
27248
27273
|
yield this.app.pm.add(RemoteSchemaTemplateManagerPlugin);
|
|
27249
27274
|
});
|
|
27250
27275
|
}
|
|
27251
27276
|
load() {
|
|
27252
|
-
return
|
|
27277
|
+
return V(this, null, function* () {
|
|
27253
27278
|
this.app.schemaSettingsManager.add(userCenterSettings), this.app.addComponents({ AdminLayout, AdminDynamicPage });
|
|
27254
27279
|
});
|
|
27255
27280
|
}
|
|
@@ -27411,7 +27436,7 @@ function getFormValues({
|
|
|
27411
27436
|
}
|
|
27412
27437
|
function useCollectValuesToSubmit() {
|
|
27413
27438
|
const e = useForm(), t = useFilterByTk(), { field: n, resource: o } = useBlockRequestContext(), { fields: r, getField: i, getTreeParentField: a, name: l } = useCollection_deprecated(), c = r.map((f) => f.name), { fieldSchema: u } = useActionContext(), { getActiveFieldsName: d } = useFormActiveFields() || {}, p = useVariables$1(), m = useLocalVariables$1({ currentForm: e }), h = useFieldSchema(), g = useTreeParentRecord();
|
|
27414
|
-
return useCallback(() =>
|
|
27439
|
+
return useCallback(() => V(this, null, function* () {
|
|
27415
27440
|
var F, I, w, T;
|
|
27416
27441
|
const { assignedValues: f = {}, overwriteValues: C } = (F = h == null ? void 0 : h["x-action-settings"]) != null ? F : {}, b = getFormValues({
|
|
27417
27442
|
filterByTk: t,
|
|
@@ -27421,7 +27446,7 @@ function useCollectValuesToSubmit() {
|
|
|
27421
27446
|
getField: i,
|
|
27422
27447
|
resource: o,
|
|
27423
27448
|
actionFields: (d == null ? void 0 : d("form")) || []
|
|
27424
|
-
}), S = {}, y = Object.keys(f).map((D) =>
|
|
27449
|
+
}), S = {}, y = Object.keys(f).map((D) => V(this, null, function* () {
|
|
27425
27450
|
const O = f[D], j = i(D);
|
|
27426
27451
|
if (isVariable$1(O)) {
|
|
27427
27452
|
const { value: N } = (yield p == null ? void 0 : p.parseVariable(O, m)) || {};
|
|
@@ -27456,7 +27481,7 @@ const useCreateActionProps = () => {
|
|
|
27456
27481
|
const e = useFilterByTk(), t = useCollectionRecord(), n = useForm(), { field: o, resource: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext(), c = useNavigateNoUpdate(), u = useFieldSchema(), d = useField(), p = useCompile(), { modal: m } = App.useApp(), { t: h } = useTranslation(), { updateAssociationValues: g } = useFormBlockContext(), f = useCollectValuesToSubmit(), C = t.isNew ? d.componentProps.saveMode || "create" : "update", b = ((S = d.componentProps.filterKeys) == null ? void 0 : S.checked) || [];
|
|
27457
27482
|
return {
|
|
27458
27483
|
onClick() {
|
|
27459
|
-
return
|
|
27484
|
+
return V(this, null, function* () {
|
|
27460
27485
|
var B;
|
|
27461
27486
|
const { onSuccess: v, skipValidator: F, triggerWorkflows: I } = (B = u == null ? void 0 : u["x-action-settings"]) != null ? B : {}, { manualClose: w, redirecting: T, redirectTo: D, successMessage: O, actionAfterSuccess: j } = v || {};
|
|
27462
27487
|
F || (yield n.submit());
|
|
@@ -27477,7 +27502,7 @@ const useCreateActionProps = () => {
|
|
|
27477
27502
|
}
|
|
27478
27503
|
w ? m.success({
|
|
27479
27504
|
title: p(O),
|
|
27480
|
-
onOk: () =>
|
|
27505
|
+
onOk: () => V(this, null, function* () {
|
|
27481
27506
|
yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D));
|
|
27482
27507
|
})
|
|
27483
27508
|
}) : (message.success(p(O)), yield resetFormCorrectly(n), (T && !j || j === "redirect") && D && (isURL(D) ? window.location.href = D : c(D)));
|
|
@@ -27492,15 +27517,15 @@ const useCreateActionProps = () => {
|
|
|
27492
27517
|
const e = useForm(), { field: t, resource: n, __parent: o } = useBlockRequestContext(), { setVisible: r, fieldSchema: i, setSubmitted: a } = useActionContext(), l = useFieldSchema(), c = useField(), { fields: u, getField: d, getTreeParentField: p, name: m } = useCollection_deprecated(), h = useCompile(), g = useFilterByTk(), f = useRecord(), C = useVariables$1(), b = useLocalVariables$1({ currentForm: e }), { getActiveFieldsName: S } = useFormActiveFields() || {}, y = c.componentProps.saveMode || "create", v = ((F = c.componentProps.filterKeys) == null ? void 0 : F.checked) || [];
|
|
27493
27518
|
return {
|
|
27494
27519
|
onClick() {
|
|
27495
|
-
return
|
|
27496
|
-
var z, E,
|
|
27520
|
+
return V(this, null, function* () {
|
|
27521
|
+
var z, E, q, L, G, U;
|
|
27497
27522
|
const w = u.map((H) => H.name), {
|
|
27498
27523
|
assignedValues: T = {},
|
|
27499
27524
|
onSuccess: D,
|
|
27500
27525
|
overwriteValues: O,
|
|
27501
27526
|
skipValidator: j,
|
|
27502
27527
|
triggerWorkflows: N
|
|
27503
|
-
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: R } = D || {}, M = {}, $ = Object.keys(T).map((H) =>
|
|
27528
|
+
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (E = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : E.addChild, { successMessage: R } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
|
|
27504
27529
|
const J = T[H], W = d(H);
|
|
27505
27530
|
if (isVariable$1(J)) {
|
|
27506
27531
|
const { value: K } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
|
|
@@ -27520,7 +27545,7 @@ const useCreateActionProps = () => {
|
|
|
27520
27545
|
});
|
|
27521
27546
|
if (B) {
|
|
27522
27547
|
const H = p();
|
|
27523
|
-
k[(
|
|
27548
|
+
k[(q = H == null ? void 0 : H.name) != null ? q : "parent"] = f, k[(L = H == null ? void 0 : H.foreignKey) != null ? L : "parentId"] = f.id;
|
|
27524
27549
|
}
|
|
27525
27550
|
c.data = t.data || {}, c.data.loading = !0;
|
|
27526
27551
|
try {
|
|
@@ -27559,10 +27584,10 @@ const useCreateActionProps = () => {
|
|
|
27559
27584
|
}
|
|
27560
27585
|
}, useDoFilter = () => {
|
|
27561
27586
|
const e = useForm(), { getDataBlocks: t } = useFilterBlock(), n = useCollectionManager(), { getOperators: o } = useOperators(), r = useFieldSchema(), { name: i } = useCollection(), { targets: a = [], uid: l } = useMemo(() => findFilterTargets(r), [r]), c = useCallback(() => removeNullCondition(transformToFilter(e.values, o(), n.getCollectionField.bind(n), i)), [e.values, n, o, i]), u = useCallback(
|
|
27562
|
-
(...p) =>
|
|
27587
|
+
(...p) => V(void 0, [...p], function* ({ doNothingWhenFilterIsEmpty: d = !1 } = {}) {
|
|
27563
27588
|
try {
|
|
27564
27589
|
yield Promise.all(
|
|
27565
|
-
t().map((m) =>
|
|
27590
|
+
t().map((m) => V(void 0, null, function* () {
|
|
27566
27591
|
var b, S, y, v;
|
|
27567
27592
|
if (!a.find((F) => F.uid === m.uid))
|
|
27568
27593
|
return;
|
|
@@ -27606,7 +27631,7 @@ const useCreateActionProps = () => {
|
|
|
27606
27631
|
const { doFilter: e } = useDoFilter(), t = useField();
|
|
27607
27632
|
return t.data = t.data || {}, {
|
|
27608
27633
|
onClick() {
|
|
27609
|
-
return
|
|
27634
|
+
return V(this, null, function* () {
|
|
27610
27635
|
t.data.loading = !0, yield e(), t.data.loading = !1;
|
|
27611
27636
|
});
|
|
27612
27637
|
}
|
|
@@ -27614,7 +27639,7 @@ const useCreateActionProps = () => {
|
|
|
27614
27639
|
}, useDoReset = () => {
|
|
27615
27640
|
const e = useForm(), t = useFieldSchema(), { getDataBlocks: n } = useFilterBlock(), { targets: o, uid: r } = findFilterTargets(t), { doFilter: i, getFilterFromCurrentForm: a } = useDoFilter();
|
|
27616
27641
|
return {
|
|
27617
|
-
doReset: () =>
|
|
27642
|
+
doReset: () => V(void 0, null, function* () {
|
|
27618
27643
|
var l;
|
|
27619
27644
|
if (yield e.reset(void 0, {
|
|
27620
27645
|
forceClear: !!((l = t == null ? void 0 : t["x-component-props"]) != null && l.clearDefaultValue)
|
|
@@ -27627,7 +27652,7 @@ const useCreateActionProps = () => {
|
|
|
27627
27652
|
const e = useField(), { doReset: t } = useDoReset();
|
|
27628
27653
|
return e.data = e.data || {}, {
|
|
27629
27654
|
onClick() {
|
|
27630
|
-
return
|
|
27655
|
+
return V(this, null, function* () {
|
|
27631
27656
|
e.data.loading = !0, yield t(), e.data.loading = !1;
|
|
27632
27657
|
});
|
|
27633
27658
|
}
|
|
@@ -27636,14 +27661,14 @@ const useCreateActionProps = () => {
|
|
|
27636
27661
|
const { resource: e, __parent: t, service: n } = useBlockRequestContext(), o = useFilterByTk(), r = useFieldSchema(), i = useNavigateNoUpdate(), a = useCompile(), l = useForm(), { modal: c } = App.useApp(), u = useVariables$1(), d = useLocalVariables$1({ currentForm: l }), { name: p, getField: m } = useCollection_deprecated(), { setVisible: h } = useActionContext();
|
|
27637
27662
|
return {
|
|
27638
27663
|
onClick(f, C) {
|
|
27639
|
-
return
|
|
27664
|
+
return V(this, null, function* () {
|
|
27640
27665
|
var N, B, R;
|
|
27641
27666
|
const {
|
|
27642
27667
|
assignedValues: b = {},
|
|
27643
27668
|
onSuccess: S,
|
|
27644
27669
|
skipValidator: y,
|
|
27645
27670
|
triggerWorkflows: v
|
|
27646
|
-
} = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: w, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) =>
|
|
27671
|
+
} = (N = r == null ? void 0 : r["x-action-settings"]) != null ? N : {}, { manualClose: F, redirecting: I, redirectTo: w, successMessage: T, actionAfterSuccess: D } = S || {}, O = {}, j = Object.keys(b).map((M) => V(this, null, function* () {
|
|
27647
27672
|
const $ = b[M], k = m(M);
|
|
27648
27673
|
if (isVariable$1($)) {
|
|
27649
27674
|
const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
|
|
@@ -27658,7 +27683,7 @@ const useCreateActionProps = () => {
|
|
|
27658
27683
|
triggerWorkflows: v != null && v.length ? v.map((M) => [M.workflowKey, M.context].filter(Boolean).join("!")).join(",") : void 0
|
|
27659
27684
|
}), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (R = (B = t == null ? void 0 : t.service) == null ? void 0 : B.refresh) == null || R.call(B), T && (F ? c.success({
|
|
27660
27685
|
title: a(T),
|
|
27661
|
-
onOk: () =>
|
|
27686
|
+
onOk: () => V(this, null, function* () {
|
|
27662
27687
|
(I && !D || D === "redirect") && w && (isURL(w) ? window.location.href = w : i(w));
|
|
27663
27688
|
})
|
|
27664
27689
|
}) : (message.success(a(T)), (I && !D || D === "redirect") && w && (isURL(w) ? window.location.href = w : i(w))));
|
|
@@ -27672,7 +27697,7 @@ const useCreateActionProps = () => {
|
|
|
27672
27697
|
const { name: f, getField: C } = useCollection_deprecated(), b = useLocalVariables$1(), { setVisible: S } = useActionContext();
|
|
27673
27698
|
return {
|
|
27674
27699
|
onClick() {
|
|
27675
|
-
return
|
|
27700
|
+
return V(this, null, function* () {
|
|
27676
27701
|
var z;
|
|
27677
27702
|
const {
|
|
27678
27703
|
assignedValues: T = {},
|
|
@@ -27680,23 +27705,23 @@ const useCreateActionProps = () => {
|
|
|
27680
27705
|
updateMode: O
|
|
27681
27706
|
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: R, actionAfterSuccess: M } = D || {};
|
|
27682
27707
|
m.data = e.data || {}, m.data.loading = !0;
|
|
27683
|
-
const $ = {}, k = Object.keys(T).map((
|
|
27684
|
-
const L = T[
|
|
27708
|
+
const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
|
|
27709
|
+
const L = T[q], G = C(q);
|
|
27685
27710
|
if (isVariable$1(L)) {
|
|
27686
27711
|
const { value: U } = (yield g == null ? void 0 : g.parseVariable(L, b)) || {};
|
|
27687
|
-
U && ($[
|
|
27712
|
+
U && ($[q] = transformVariableValue(U, { targetCollectionField: G }));
|
|
27688
27713
|
} else
|
|
27689
|
-
L !== "" && ($[
|
|
27714
|
+
L !== "" && ($[q] = L);
|
|
27690
27715
|
}));
|
|
27691
27716
|
yield Promise.all(k), (M === "previous" || !M && N !== !0) && (S == null || S(!1)), h.confirm({
|
|
27692
27717
|
title: p("Bulk update"),
|
|
27693
27718
|
content: p(O === "selected" ? "Update selected data?" : "Update all data?"),
|
|
27694
27719
|
onOk() {
|
|
27695
|
-
return
|
|
27720
|
+
return V(this, null, function* () {
|
|
27696
27721
|
var G, U, H, J;
|
|
27697
|
-
const { filter:
|
|
27722
|
+
const { filter: q } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {}, L = {
|
|
27698
27723
|
values: x({}, $),
|
|
27699
|
-
filter:
|
|
27724
|
+
filter: q,
|
|
27700
27725
|
forceUpdate: !1
|
|
27701
27726
|
};
|
|
27702
27727
|
if (O === "selected") {
|
|
@@ -27715,14 +27740,14 @@ const useCreateActionProps = () => {
|
|
|
27715
27740
|
}
|
|
27716
27741
|
t instanceof TableFieldResource || (J = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || J.call(H), R && (j ? h.success({
|
|
27717
27742
|
title: d(R),
|
|
27718
|
-
onOk: () =>
|
|
27743
|
+
onOk: () => V(this, null, function* () {
|
|
27719
27744
|
(N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B));
|
|
27720
27745
|
})
|
|
27721
27746
|
}) : (message.success(d(R)), (N && !M || M === "redirect") && B && (isURL(B) ? window.location.href = B : u(B))));
|
|
27722
27747
|
});
|
|
27723
27748
|
},
|
|
27724
27749
|
onCancel() {
|
|
27725
|
-
return
|
|
27750
|
+
return V(this, null, function* () {
|
|
27726
27751
|
m.data.loading = !1;
|
|
27727
27752
|
});
|
|
27728
27753
|
}
|
|
@@ -27735,9 +27760,9 @@ const useCreateActionProps = () => {
|
|
|
27735
27760
|
const e = useAPIClient(), t = useNavigateNoUpdate(), n = useFilterByTk(), o = useFieldSchema(), r = useCompile(), i = useForm(), { fields: a, getField: l } = useCollection_deprecated(), { field: c, resource: u, __parent: d, service: p } = useBlockRequestContext(), m = useRecord(), h = useCurrentUserContext(), g = (v = h == null ? void 0 : h.data) == null ? void 0 : v.data, f = useField(), { t: C } = useTranslation(), { setVisible: b } = useActionContext(), { modal: S } = App.useApp(), { getActiveFieldsName: y } = useFormActiveFields() || {};
|
|
27736
27761
|
return {
|
|
27737
27762
|
onClick() {
|
|
27738
|
-
return
|
|
27739
|
-
var
|
|
27740
|
-
const { skipValidator: I, onSuccess: w, requestSettings: T } = (
|
|
27763
|
+
return V(this, null, function* () {
|
|
27764
|
+
var q, L, G, U;
|
|
27765
|
+
const { skipValidator: I, onSuccess: w, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = w || {}, R = o == null ? void 0 : o["x-action"];
|
|
27741
27766
|
if (!T.url)
|
|
27742
27767
|
return;
|
|
27743
27768
|
I !== !0 && R === "customize:form:request" && (yield i.submit());
|
|
@@ -27765,7 +27790,7 @@ const useCreateActionProps = () => {
|
|
|
27765
27790
|
try {
|
|
27766
27791
|
yield e.request(x({}, E)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (U = p == null ? void 0 : p.refresh) == null || U.call(p), R === "customize:form:request" && (B === "previous" || !B && O !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
|
|
27767
27792
|
title: r(N),
|
|
27768
|
-
onOk: () =>
|
|
27793
|
+
onOk: () => V(this, null, function* () {
|
|
27769
27794
|
(O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
|
|
27770
27795
|
})
|
|
27771
27796
|
}) : message.success(r(N));
|
|
@@ -27779,7 +27804,7 @@ const useCreateActionProps = () => {
|
|
|
27779
27804
|
const e = useForm(), t = useFilterByTk(), { field: n, resource: o, __parent: r } = useBlockRequestContext(), { setVisible: i, setFormValueChanged: a } = useActionContext(), l = useFieldSchema(), c = useNavigateNoUpdate(), { fields: u, getField: d, name: p } = useCollection_deprecated(), m = useCompile(), h = useField(), { updateAssociationValues: g } = useFormBlockContext(), { modal: f } = App.useApp(), C = useParamsFromRecord(), b = useVariables$1(), S = useLocalVariables$1({ currentForm: e }), { getActiveFieldsName: y } = useFormActiveFields() || {};
|
|
27780
27805
|
return {
|
|
27781
27806
|
onClick(F, I) {
|
|
27782
|
-
return
|
|
27807
|
+
return V(this, null, function* () {
|
|
27783
27808
|
var L;
|
|
27784
27809
|
const {
|
|
27785
27810
|
assignedValues: w = {},
|
|
@@ -27787,7 +27812,7 @@ const useCreateActionProps = () => {
|
|
|
27787
27812
|
overwriteValues: D,
|
|
27788
27813
|
skipValidator: O,
|
|
27789
27814
|
triggerWorkflows: j
|
|
27790
|
-
} = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: R, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(w).map((G) =>
|
|
27815
|
+
} = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, { manualClose: N, redirecting: B, redirectTo: R, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(w).map((G) => V(this, null, function* () {
|
|
27791
27816
|
const U = w[G], H = d(G);
|
|
27792
27817
|
if (isVariable$1(U)) {
|
|
27793
27818
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
@@ -27796,7 +27821,7 @@ const useCreateActionProps = () => {
|
|
|
27796
27821
|
U !== "" && (k[G] = U);
|
|
27797
27822
|
}));
|
|
27798
27823
|
yield Promise.all(z), O || (yield e.submit());
|
|
27799
|
-
const E = u.map((G) => G.name),
|
|
27824
|
+
const E = u.map((G) => G.name), q = getFormValues({
|
|
27800
27825
|
filterByTk: t,
|
|
27801
27826
|
field: n,
|
|
27802
27827
|
form: e,
|
|
@@ -27809,7 +27834,7 @@ const useCreateActionProps = () => {
|
|
|
27809
27834
|
try {
|
|
27810
27835
|
if (yield o.update(P(x({
|
|
27811
27836
|
filterByTk: t,
|
|
27812
|
-
values: x(x(x({},
|
|
27837
|
+
values: x(x(x({}, q), D), k)
|
|
27813
27838
|
}, C), {
|
|
27814
27839
|
updateAssociationValues: g,
|
|
27815
27840
|
// TODO(refactor): should change to inject by plugin
|
|
@@ -27818,7 +27843,7 @@ const useCreateActionProps = () => {
|
|
|
27818
27843
|
return;
|
|
27819
27844
|
N ? f.success({
|
|
27820
27845
|
title: m(M),
|
|
27821
|
-
onOk: () =>
|
|
27846
|
+
onOk: () => V(this, null, function* () {
|
|
27822
27847
|
yield e.reset(), (B && !$ || $ === "redirect") && R && (isURL(R) ? window.location.href = R : c(R));
|
|
27823
27848
|
})
|
|
27824
27849
|
}) : (message.success(m(M)), (B && !$ || $ === "redirect" || $ === "redirect") && R && (isURL(R) ? window.location.href = R : c(R)));
|
|
@@ -27832,7 +27857,7 @@ const useCreateActionProps = () => {
|
|
|
27832
27857
|
const e = useFilterByTk(), { resource: t, service: n, block: o, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a } = useActionContext(), l = useParamsFromRecord(), c = useFieldSchema();
|
|
27833
27858
|
return {
|
|
27834
27859
|
onClick(d, p) {
|
|
27835
|
-
return
|
|
27860
|
+
return V(this, null, function* () {
|
|
27836
27861
|
var C, b, S, y, v;
|
|
27837
27862
|
const { triggerWorkflows: m } = (C = c == null ? void 0 : c["x-action-settings"]) != null ? C : {};
|
|
27838
27863
|
yield t.destroy(x({
|
|
@@ -27851,7 +27876,7 @@ const useCreateActionProps = () => {
|
|
|
27851
27876
|
const t = useFilterByTk(), o = useAPIClient().resource(e, t);
|
|
27852
27877
|
return {
|
|
27853
27878
|
onClick(i) {
|
|
27854
|
-
return
|
|
27879
|
+
return V(this, null, function* () {
|
|
27855
27880
|
yield o.remove({
|
|
27856
27881
|
values: [i.id]
|
|
27857
27882
|
});
|
|
@@ -27862,7 +27887,7 @@ const useCreateActionProps = () => {
|
|
|
27862
27887
|
const e = useFilterByTk(), { resource: t, service: n, block: o, __parent: r } = useBlockRequestContext(), { setVisible: i, setSubmitted: a, setFormValueChanged: l } = useActionContext();
|
|
27863
27888
|
return {
|
|
27864
27889
|
onClick(u, d) {
|
|
27865
|
-
return
|
|
27890
|
+
return V(this, null, function* () {
|
|
27866
27891
|
var g, f, C, b;
|
|
27867
27892
|
yield t.remove({
|
|
27868
27893
|
values: [e]
|
|
@@ -27878,7 +27903,7 @@ const useCreateActionProps = () => {
|
|
|
27878
27903
|
const { field: e } = useBlockRequestContext(), { resource: t, service: n } = useBlockRequestContext(), { setSubmitted: o } = useActionContext(), r = useCollection_deprecated(), { filterTargetKey: i } = r;
|
|
27879
27904
|
return {
|
|
27880
27905
|
onClick(l, c) {
|
|
27881
|
-
return
|
|
27906
|
+
return V(this, null, function* () {
|
|
27882
27907
|
var m, h, g, f, C, b, S;
|
|
27883
27908
|
let u = (m = e.data) == null ? void 0 : m.selectedRowKeys;
|
|
27884
27909
|
if (Array.isArray(i) && (u = e.data.selectedRowData.map((y) => {
|
|
@@ -27900,7 +27925,7 @@ const useCreateActionProps = () => {
|
|
|
27900
27925
|
const { service: e } = useBlockRequestContext();
|
|
27901
27926
|
return {
|
|
27902
27927
|
onClick() {
|
|
27903
|
-
return
|
|
27928
|
+
return V(this, null, function* () {
|
|
27904
27929
|
var n;
|
|
27905
27930
|
(n = e == null ? void 0 : e.refresh) == null || n.call(e);
|
|
27906
27931
|
});
|
|
@@ -27917,7 +27942,7 @@ const useCreateActionProps = () => {
|
|
|
27917
27942
|
pageSize: 1,
|
|
27918
27943
|
showSizeChanger: !1,
|
|
27919
27944
|
onChange(v) {
|
|
27920
|
-
return
|
|
27945
|
+
return V(this, null, function* () {
|
|
27921
27946
|
var I, w;
|
|
27922
27947
|
const F = (w = (I = e.service) == null ? void 0 : I.params) == null ? void 0 : w[0];
|
|
27923
27948
|
e.service.run(P(x({}, F), { page: v }));
|
|
@@ -27945,7 +27970,7 @@ const useCreateActionProps = () => {
|
|
|
27945
27970
|
pageSize: 1,
|
|
27946
27971
|
showSizeChanger: !1,
|
|
27947
27972
|
onChange(y) {
|
|
27948
|
-
return
|
|
27973
|
+
return V(this, null, function* () {
|
|
27949
27974
|
var F, I;
|
|
27950
27975
|
const v = (I = (F = e.service) == null ? void 0 : F.params) == null ? void 0 : I[0];
|
|
27951
27976
|
e.service.run(P(x({}, v), { page: y }));
|
|
@@ -28047,7 +28072,7 @@ const useCreateActionProps = () => {
|
|
|
28047
28072
|
var U, H, J, W;
|
|
28048
28073
|
if (!M.find((K) => K.uid === k.uid))
|
|
28049
28074
|
return;
|
|
28050
|
-
const E = `${$}${t.name}`,
|
|
28075
|
+
const E = `${$}${t.name}`, q = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
28051
28076
|
(J = (H = k.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(k.service.params, "[1].filters", {});
|
|
28052
28077
|
const L = k.service.params[1].filters;
|
|
28053
28078
|
if (R.length)
|
|
@@ -28061,7 +28086,7 @@ const useCreateActionProps = () => {
|
|
|
28061
28086
|
}
|
|
28062
28087
|
const G = mergeFilter([...Object.values(L), k.defaultFilter]);
|
|
28063
28088
|
return k.doFilter(
|
|
28064
|
-
P(x({},
|
|
28089
|
+
P(x({}, q), {
|
|
28065
28090
|
page: 1,
|
|
28066
28091
|
filter: G
|
|
28067
28092
|
}),
|
|
@@ -28109,14 +28134,14 @@ const useCreateActionProps = () => {
|
|
|
28109
28134
|
};
|
|
28110
28135
|
};
|
|
28111
28136
|
function doReset(o) {
|
|
28112
|
-
return
|
|
28137
|
+
return V(this, arguments, function* ({
|
|
28113
28138
|
getDataBlocks: e,
|
|
28114
28139
|
targets: t,
|
|
28115
28140
|
uid: n
|
|
28116
28141
|
}) {
|
|
28117
28142
|
try {
|
|
28118
28143
|
yield Promise.all(
|
|
28119
|
-
e().map((r) =>
|
|
28144
|
+
e().map((r) => V(this, null, function* () {
|
|
28120
28145
|
var u, d, p, m;
|
|
28121
28146
|
if (!t.find((h) => h.uid === r.uid))
|
|
28122
28147
|
return;
|
|
@@ -28255,7 +28280,7 @@ function getTargetField(e) {
|
|
|
28255
28280
|
return n.slice(0, o);
|
|
28256
28281
|
}
|
|
28257
28282
|
function resetFormCorrectly(e) {
|
|
28258
|
-
return
|
|
28283
|
+
return V(this, null, function* () {
|
|
28259
28284
|
untracked(() => {
|
|
28260
28285
|
Object.keys(e.fields).forEach((t) => {
|
|
28261
28286
|
isSubMode(e.fields[t]) && (e.fields[t].initialValue = null);
|
|
@@ -28269,7 +28294,7 @@ function appendQueryStringToUrl(e, t) {
|
|
|
28269
28294
|
const useParseURLAndParams = () => {
|
|
28270
28295
|
const e = useVariables$1(), t = useLocalVariables$1();
|
|
28271
28296
|
return { parseURLAndParams: useCallback(
|
|
28272
|
-
(o, r) =>
|
|
28297
|
+
(o, r) => V(void 0, null, function* () {
|
|
28273
28298
|
const i = yield parseVariablesAndChangeParamsToQueryString({
|
|
28274
28299
|
searchParams: r,
|
|
28275
28300
|
variables: e,
|
|
@@ -28287,7 +28312,7 @@ function useLinkActionProps(e) {
|
|
|
28287
28312
|
return {
|
|
28288
28313
|
type: l,
|
|
28289
28314
|
onClick() {
|
|
28290
|
-
return
|
|
28315
|
+
return V(this, null, function* () {
|
|
28291
28316
|
if (!i) {
|
|
28292
28317
|
message.warning(r("Please configure the URL"));
|
|
28293
28318
|
return;
|
|
@@ -28299,7 +28324,7 @@ function useLinkActionProps(e) {
|
|
|
28299
28324
|
};
|
|
28300
28325
|
}
|
|
28301
28326
|
function replaceVariableValue(e, t, n) {
|
|
28302
|
-
return
|
|
28327
|
+
return V(this, null, function* () {
|
|
28303
28328
|
if (!e)
|
|
28304
28329
|
return;
|
|
28305
28330
|
const { evaluate: o } = evaluators.get("string"), { exp: r, scope: i } = yield replaceVariables(e, {
|
|
@@ -28314,14 +28339,14 @@ function replaceVariableValue(e, t, n) {
|
|
|
28314
28339
|
});
|
|
28315
28340
|
}
|
|
28316
28341
|
function parseVariablesAndChangeParamsToQueryString(r) {
|
|
28317
|
-
return
|
|
28342
|
+
return V(this, arguments, function* ({
|
|
28318
28343
|
searchParams: e,
|
|
28319
28344
|
variables: t,
|
|
28320
28345
|
localVariables: n,
|
|
28321
28346
|
replaceVariableValue: o
|
|
28322
28347
|
}) {
|
|
28323
28348
|
const i = yield Promise.all(
|
|
28324
|
-
e.map((u) =>
|
|
28349
|
+
e.map((u) => V(this, [u], function* ({ name: l, value: c }) {
|
|
28325
28350
|
if (typeof c == "string") {
|
|
28326
28351
|
if (isVariable$1(c)) {
|
|
28327
28352
|
const { value: p } = (yield t.parseVariable(c, n)) || {};
|
|
@@ -28449,7 +28474,7 @@ const useSyncFromForm = (e, t, n) => {
|
|
|
28449
28474
|
}, []);
|
|
28450
28475
|
return {
|
|
28451
28476
|
run() {
|
|
28452
|
-
return
|
|
28477
|
+
return V(this, null, function* () {
|
|
28453
28478
|
var y;
|
|
28454
28479
|
const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
|
|
28455
28480
|
var I;
|
|
@@ -29563,7 +29588,7 @@ const useParseDefaultValue = () => {
|
|
|
29563
29588
|
var F, I;
|
|
29564
29589
|
if (g === "update" && t.default && e.form === f && ((I = e.setValue) == null || I.call(e, (F = r == null ? void 0 : r.data) == null ? void 0 : F[t.name])), t.default == null || a || l || isSubMode(t) || !(r != null && r.isNew) && !i)
|
|
29565
29590
|
return;
|
|
29566
|
-
const y = (...T) =>
|
|
29591
|
+
const y = (...T) => V(void 0, [...T], function* ({ forceUpdate: w = !1 } = {}) {
|
|
29567
29592
|
if (n && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || w)) {
|
|
29568
29593
|
isVariable$1(e.value) && (yield e.reset({ forceClear: !0 })), e.loading = !0;
|
|
29569
29594
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
@@ -29699,11 +29724,11 @@ function SchemaSettingsTemplate(e) {
|
|
|
29699
29724
|
SchemaSettingsItem,
|
|
29700
29725
|
{
|
|
29701
29726
|
title: "Convert reference to duplicate",
|
|
29702
|
-
onClick: () =>
|
|
29727
|
+
onClick: () => V(this, null, function* () {
|
|
29703
29728
|
const S = yield C(d), y = g.removeWithoutEmit();
|
|
29704
29729
|
g.insertAfterEnd(S, {
|
|
29705
29730
|
onSuccess() {
|
|
29706
|
-
return
|
|
29731
|
+
return V(this, null, function* () {
|
|
29707
29732
|
yield h.request({
|
|
29708
29733
|
url: `/uiSchemas:remove/${y["x-uid"]}`
|
|
29709
29734
|
});
|
|
@@ -29717,7 +29742,7 @@ function SchemaSettingsTemplate(e) {
|
|
|
29717
29742
|
SchemaSettingsItem,
|
|
29718
29743
|
{
|
|
29719
29744
|
title: "Save as template",
|
|
29720
|
-
onClick: () =>
|
|
29745
|
+
onClick: () => V(this, null, function* () {
|
|
29721
29746
|
u(!1);
|
|
29722
29747
|
const S = n && l(n), y = yield FormDialog(
|
|
29723
29748
|
a("Save as template"),
|
|
@@ -30078,7 +30103,7 @@ function AccessControl() {
|
|
|
30078
30103
|
roles: l == null ? void 0 : l.data
|
|
30079
30104
|
},
|
|
30080
30105
|
beforeOpen: () => !l && a(),
|
|
30081
|
-
onSubmit: (p) =>
|
|
30106
|
+
onSubmit: (p) => V(this, [p], function* ({ roles: d }) {
|
|
30082
30107
|
return yield o.set({ values: d.map((m) => m.name) }), yield c(), r.success(e("Saved successfully"));
|
|
30083
30108
|
})
|
|
30084
30109
|
}
|
|
@@ -30096,7 +30121,7 @@ const SchemaSettingAccessControl = {
|
|
|
30096
30121
|
[t, n]
|
|
30097
30122
|
);
|
|
30098
30123
|
return { parseFilter: useCallback(
|
|
30099
|
-
(i) =>
|
|
30124
|
+
(i) => V(void 0, null, function* () {
|
|
30100
30125
|
const a = flatten(i, {
|
|
30101
30126
|
breakOn({ key: c }) {
|
|
30102
30127
|
return c.startsWith("$") && c !== "$and" && c !== "$or";
|
|
@@ -30106,7 +30131,7 @@ const SchemaSettingAccessControl = {
|
|
|
30106
30131
|
}
|
|
30107
30132
|
});
|
|
30108
30133
|
return yield Promise.all(
|
|
30109
|
-
Object.keys(a).map((c) =>
|
|
30134
|
+
Object.keys(a).map((c) => V(void 0, null, function* () {
|
|
30110
30135
|
return a[c] = yield a[c], a[c] === void 0 && delete a[c], a[c];
|
|
30111
30136
|
}))
|
|
30112
30137
|
), unflatten$1(a);
|
|
@@ -30555,7 +30580,7 @@ const createSubmitActionSettings = new SchemaSettings({
|
|
|
30555
30580
|
"x-validator": validateJSON$1
|
|
30556
30581
|
}
|
|
30557
30582
|
}
|
|
30558
|
-
}, linkageAction = (a, l) =>
|
|
30583
|
+
}, linkageAction = (a, l) => V(void 0, [a, l], function* ({
|
|
30559
30584
|
operator: e,
|
|
30560
30585
|
field: t,
|
|
30561
30586
|
condition: n,
|
|
@@ -33674,7 +33699,7 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33674
33699
|
return {
|
|
33675
33700
|
title: r("Enable drag and drop sorting"),
|
|
33676
33701
|
checked: t.decoratorProps.dragSort,
|
|
33677
|
-
onChange: (u) =>
|
|
33702
|
+
onChange: (u) => V(void 0, null, function* () {
|
|
33678
33703
|
var d, p, m;
|
|
33679
33704
|
if (u && l) {
|
|
33680
33705
|
const { data: h } = yield c.resource("collections.fields", l.collectionName).update({
|
|
@@ -34819,7 +34844,7 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
34819
34844
|
title: i("Ellipsis overflow content"),
|
|
34820
34845
|
checked: !!((c = a["x-component-props"]) != null && c.ellipsis),
|
|
34821
34846
|
hidden: l,
|
|
34822
|
-
onChange: (u) =>
|
|
34847
|
+
onChange: (u) => V(this, null, function* () {
|
|
34823
34848
|
e && t ? t.forEach((d) => {
|
|
34824
34849
|
d.componentProps.ellipsis = u;
|
|
34825
34850
|
}) : o.componentProps.ellipsis = u, _.set(a, "x-component-props.ellipsis", u), yield r.emit("patch", {
|
|
@@ -35193,10 +35218,10 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35193
35218
|
name: "fieldSettings:component:CascadeSelect",
|
|
35194
35219
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
35195
35220
|
}), SchemaSettingsDateRange = function e(t) {
|
|
35196
|
-
var w, T, D, O, j, N, B, R, M, $, k, z, E,
|
|
35221
|
+
var w, T, D, O, j, N, B, R, M, $, k, z, E, q, L, G;
|
|
35197
35222
|
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((w = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : w.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.dateFormat) || ((N = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.timeFormat) || ((M = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : M.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((z = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : z.picker) || "date";
|
|
35198
35223
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
35199
|
-
const g = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._minDate, f = (
|
|
35224
|
+
const g = (E = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : E._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
35200
35225
|
(U) => /* @__PURE__ */ jsx(
|
|
35201
35226
|
SchemaComponent,
|
|
35202
35227
|
{
|
|
@@ -36556,7 +36581,7 @@ const dividerSettings = new SchemaSettings({
|
|
|
36556
36581
|
});
|
|
36557
36582
|
class SchemaSettingsPlugin extends Plugin {
|
|
36558
36583
|
load() {
|
|
36559
|
-
return
|
|
36584
|
+
return V(this, null, function* () {
|
|
36560
36585
|
this.schemaSettingsManager.add(tableBlockSettings), this.schemaSettingsManager.add(createFormBlockSettings), this.schemaSettingsManager.add(editFormBlockSettings), this.schemaSettingsManager.add(filterFormBlockSettings), this.schemaSettingsManager.add(filterFormItemFieldSettings), this.schemaSettingsManager.add(multiDataDetailsBlockSettings), this.schemaSettingsManager.add(detailsWithPaginationSettings), this.schemaSettingsManager.add(singleDataDetailsBlockSettings), this.schemaSettingsManager.add(detailsBlockSettings), this.schemaSettingsManager.add(tableSelectorBlockSettings), this.schemaSettingsManager.add(listBlockSettings), this.schemaSettingsManager.add(gridCardBlockSettings), this.schemaSettingsManager.add(filterCollapseBlockSettings), this.schemaSettingsManager.add(markdownBlockSettings), this.schemaSettingsManager.add(addNewActionSettings), this.schemaSettingsManager.add(filterActionSettings), this.schemaSettingsManager.add(refreshActionSettings), this.schemaSettingsManager.add(viewActionSettings), this.schemaSettingsManager.add(editActionSettings), this.schemaSettingsManager.add(deleteActionSettings), this.schemaSettingsManager.add(disassociateActionSettings), this.schemaSettingsManager.add(associateActionSettings), this.schemaSettingsManager.add(bulkDeleteActionSettings), this.schemaSettingsManager.add(customizeAddRecordActionSettings), this.schemaSettingsManager.add(customizePopupActionSettings), this.schemaSettingsManager.add(customizeLinkActionSettings), this.schemaSettingsManager.add(customizeUpdateRecordActionSettings), this.schemaSettingsManager.add(createSubmitActionSettings), this.schemaSettingsManager.add(updateSubmitActionSettings), this.schemaSettingsManager.add(submitActionSettings), this.schemaSettingsManager.add(customizeSaveRecordActionSettings), this.schemaSettingsManager.add(addChildActionSettings), this.schemaSettingsManager.add(expendableActionSettings), this.schemaSettingsManager.add(fieldSettingsFormItem), this.schemaSettingsManager.add(tableColumnSettings), this.schemaSettingsManager.add(filterCollapseItemFieldSettings), this.schemaSettingsManager.add(selectComponentFieldSettings), this.schemaSettingsManager.add(filterSelectComponentFieldSettings), this.schemaSettingsManager.add(recordPickerComponentFieldSettings), this.schemaSettingsManager.add(subformComponentFieldSettings), this.schemaSettingsManager.add(subformPopoverComponentFieldSettings), this.schemaSettingsManager.add(subTablePopoverComponentFieldSettings), this.schemaSettingsManager.add(datePickerComponentFieldSettings), this.schemaSettingsManager.add(rangePickerPickerComponentFieldSettings), this.schemaSettingsManager.add(unixTimestampComponentFieldSettings), this.schemaSettingsManager.add(inputNumberComponentFieldSettings), this.schemaSettingsManager.add(inputComponentSettings), this.schemaSettingsManager.add(inputURLSettings), this.schemaSettingsManager.add(inputTextAreaSettings), this.schemaSettingsManager.add(inputJSONSettings), this.schemaSettingsManager.add(markdownSettings), this.schemaSettingsManager.add(markdownVditorSettings), this.schemaSettingsManager.add(richTextSettings), this.schemaSettingsManager.add(fileManagerComponentFieldSettings), this.schemaSettingsManager.add(tagComponentFieldSettings), this.schemaSettingsManager.add(cascadeSelectComponentFieldSettings), this.schemaSettingsManager.add(inputPreviewComponentFieldSettings), this.schemaSettingsManager.add(uploadAttachmentComponentFieldSettings), this.schemaSettingsManager.add(previewComponentFieldSettings), this.schemaSettingsManager.add(dividerSettings), this.schemaSettingsManager.add(timePickerComponentFieldSettings);
|
|
36561
36586
|
});
|
|
36562
36587
|
}
|
|
@@ -36648,7 +36673,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36648
36673
|
const n = useRef({}), o = useAPIClient(), { getCollectionJoinField: r, getCollection: i } = useCollectionManager_deprecated(), a = useCompile(), { builtinVariables: l } = useBuiltInVariables(), c = useCallback((C) => {
|
|
36649
36674
|
_.isFunction(C) ? n.current = C(n.current) : n.current = C;
|
|
36650
36675
|
}, []), u = useCallback(
|
|
36651
|
-
(C, b, S) =>
|
|
36676
|
+
(C, b, S) => V(void 0, null, function* () {
|
|
36652
36677
|
var R, M;
|
|
36653
36678
|
const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
|
|
36654
36679
|
let I = mergeCtxWithLocalVariables(n.current, b);
|
|
@@ -36664,11 +36689,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36664
36689
|
dataSource: T,
|
|
36665
36690
|
collectionName: N
|
|
36666
36691
|
};
|
|
36667
|
-
const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: E } = getFieldPath$1(z, F),
|
|
36692
|
+
const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: E } = getFieldPath$1(z, F), q = r(E, T), L = (M = i(O, T)) == null ? void 0 : M.getPrimaryKey();
|
|
36668
36693
|
if (Array.isArray(I)) {
|
|
36669
36694
|
const G = I.map((U) => {
|
|
36670
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[L]) != null &&
|
|
36671
|
-
const H = `/${O}/${U[
|
|
36695
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[L]) != null && q != null && q.target) {
|
|
36696
|
+
const H = `/${O}/${U[q.sourceKey || L]}/${k}:${getAction(q.type)}`;
|
|
36672
36697
|
if (hasRequested(H))
|
|
36673
36698
|
return getRequested(H);
|
|
36674
36699
|
const J = o.request({
|
|
@@ -36682,9 +36707,9 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36682
36707
|
}
|
|
36683
36708
|
return U == null ? void 0 : U[k];
|
|
36684
36709
|
});
|
|
36685
|
-
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)),
|
|
36686
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[L] != null && (
|
|
36687
|
-
const G = `/${O}/${I[
|
|
36710
|
+
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), q);
|
|
36711
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[L] != null && (q != null && q.target)) {
|
|
36712
|
+
const G = `/${O}/${I[q.sourceKey || L]}/${k}:${getAction(q.type)}`;
|
|
36688
36713
|
let U = null;
|
|
36689
36714
|
if (hasRequested(G))
|
|
36690
36715
|
U = yield getRequested(G);
|
|
@@ -36699,10 +36724,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36699
36724
|
stashRequested(G, J), U = yield J, clearRequested(G);
|
|
36700
36725
|
}
|
|
36701
36726
|
const H = U.data.data;
|
|
36702
|
-
I = removeThroughCollectionFields(H,
|
|
36727
|
+
I = removeThroughCollectionFields(H, q);
|
|
36703
36728
|
} else
|
|
36704
|
-
I = removeThroughCollectionFields(getValuesByPath(I, k),
|
|
36705
|
-
|
|
36729
|
+
I = removeThroughCollectionFields(getValuesByPath(I, k), q);
|
|
36730
|
+
q != null && q.target && (O = q.target);
|
|
36706
36731
|
}
|
|
36707
36732
|
const B = a(
|
|
36708
36733
|
_.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
|
|
@@ -36740,7 +36765,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36740
36765
|
* @param localVariables Local variables, will be cleared after parsing
|
|
36741
36766
|
* @returns
|
|
36742
36767
|
*/
|
|
36743
|
-
(C, b, S) =>
|
|
36768
|
+
(C, b, S) => V(void 0, null, function* () {
|
|
36744
36769
|
if (!isVariable$1(C))
|
|
36745
36770
|
return C;
|
|
36746
36771
|
b && (b = _.isArray(b) ? b : [b]);
|
|
@@ -36751,7 +36776,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36751
36776
|
}),
|
|
36752
36777
|
[u]
|
|
36753
36778
|
), g = useCallback(
|
|
36754
|
-
(C, b) =>
|
|
36779
|
+
(C, b) => V(void 0, null, function* () {
|
|
36755
36780
|
var w;
|
|
36756
36781
|
if (!isVariable$1(C))
|
|
36757
36782
|
throw new Error(`VariablesProvider: ${C} is not a variable string`);
|
|
@@ -37110,7 +37135,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37110
37135
|
};
|
|
37111
37136
|
}, useA = () => ({
|
|
37112
37137
|
run() {
|
|
37113
|
-
return
|
|
37138
|
+
return V(this, null, function* () {
|
|
37114
37139
|
});
|
|
37115
37140
|
}
|
|
37116
37141
|
}), handleError = console.log, Action = withDynamicSchemaProps(
|
|
@@ -37155,7 +37180,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37155
37180
|
"onMouseEnter",
|
|
37156
37181
|
"refreshDataBlockRequest",
|
|
37157
37182
|
"confirmTitle"
|
|
37158
|
-
]), v = useDesigner(), F = useField(), I = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), R = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), E = useCollectionParentRecordData(),
|
|
37183
|
+
]), v = useDesigner(), F = useField(), I = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), R = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), E = useCollectionParentRecordData(), q = useApp();
|
|
37159
37184
|
useEffect(() => {
|
|
37160
37185
|
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
|
|
37161
37186
|
var J;
|
|
@@ -37168,7 +37193,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37168
37193
|
variables: B,
|
|
37169
37194
|
localVariables: R
|
|
37170
37195
|
},
|
|
37171
|
-
|
|
37196
|
+
q.jsonLogic
|
|
37172
37197
|
);
|
|
37173
37198
|
});
|
|
37174
37199
|
});
|
|
@@ -37271,7 +37296,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37271
37296
|
"setSubmitted",
|
|
37272
37297
|
"getAriaLabel",
|
|
37273
37298
|
"parentRecordData"
|
|
37274
|
-
]), [R, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E,
|
|
37299
|
+
]), [R, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [E, q] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), W = useForm(), K = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(w)) || {}, ne = W.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
|
|
37275
37300
|
var ce;
|
|
37276
37301
|
return P(x({}, v), {
|
|
37277
37302
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !K) && 0.1,
|
|
@@ -37318,7 +37343,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37318
37343
|
visible: R || T,
|
|
37319
37344
|
setVisible: le,
|
|
37320
37345
|
formValueChanged: E,
|
|
37321
|
-
setFormValueChanged:
|
|
37346
|
+
setFormValueChanged: q,
|
|
37322
37347
|
openMode: G,
|
|
37323
37348
|
openSize: U,
|
|
37324
37349
|
containerRefKey: n,
|
|
@@ -37411,8 +37436,8 @@ const RenderButton = ({
|
|
|
37411
37436
|
if (!(z && isPortalInBody(k.target)) && (k.preventDefault(), k.stopPropagation(), !i && n)) {
|
|
37412
37437
|
const E = () => {
|
|
37413
37438
|
b ? b(k, () => {
|
|
37414
|
-
var
|
|
37415
|
-
S !== !1 && (T == null || T(!0), (L = (
|
|
37439
|
+
var q, L;
|
|
37440
|
+
S !== !1 && (T == null || T(!0), (L = (q = j()) == null ? void 0 : q.refresh) == null || L.call(q));
|
|
37416
37441
|
}) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? M.current() : (v(!0), F == null || F());
|
|
37417
37442
|
};
|
|
37418
37443
|
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? w.confirm({
|
|
@@ -37622,7 +37647,7 @@ const ActionBarContext = React.createContext({
|
|
|
37622
37647
|
[r, n, i]
|
|
37623
37648
|
) };
|
|
37624
37649
|
}, requestChartData = (e) => function() {
|
|
37625
|
-
return
|
|
37650
|
+
return V(this, null, function* () {
|
|
37626
37651
|
var t;
|
|
37627
37652
|
try {
|
|
37628
37653
|
const n = yield this.api.request(e);
|
|
@@ -37652,7 +37677,7 @@ const Form$1 = observer$1(
|
|
|
37652
37677
|
{
|
|
37653
37678
|
uid: a["x-uid"],
|
|
37654
37679
|
onSuccess(h) {
|
|
37655
|
-
return
|
|
37680
|
+
return V(this, null, function* () {
|
|
37656
37681
|
yield c.reset(), c.setValues(h == null ? void 0 : h.data), c.setInitialValues(h == null ? void 0 : h.data);
|
|
37657
37682
|
});
|
|
37658
37683
|
}
|
|
@@ -37934,7 +37959,7 @@ Select.ReadPretty = ReadPretty$b;
|
|
|
37934
37959
|
const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typeof n == "object" ? n[t.value] : n), ReadPretty$a = observer$1(
|
|
37935
37960
|
(e) => {
|
|
37936
37961
|
const t = x(x({}, defaultFieldNames$1), e.fieldNames), n = useField(), o = useFieldSchema(), r = useRecord(), { snapshot: i } = useActionContext(), { data: a } = useRequest(
|
|
37937
|
-
i ? () =>
|
|
37962
|
+
i ? () => V(void 0, null, function* () {
|
|
37938
37963
|
return {
|
|
37939
37964
|
data: r[o.name]
|
|
37940
37965
|
};
|
|
@@ -38060,7 +38085,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38060
38085
|
useEffect(() => {
|
|
38061
38086
|
S.current && $();
|
|
38062
38087
|
}, [z]);
|
|
38063
|
-
const
|
|
38088
|
+
const q = (W) => V(void 0, null, function* () {
|
|
38064
38089
|
var K;
|
|
38065
38090
|
$({
|
|
38066
38091
|
filter: mergeFilter([
|
|
@@ -38088,7 +38113,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38088
38113
|
filterOption: !1,
|
|
38089
38114
|
filterSort: null,
|
|
38090
38115
|
fieldNames: t,
|
|
38091
|
-
onSearch:
|
|
38116
|
+
onSearch: q,
|
|
38092
38117
|
onDropdownVisibleChange: (W) => {
|
|
38093
38118
|
I.current = null, W && $(), S.current = !0;
|
|
38094
38119
|
},
|
|
@@ -38171,9 +38196,9 @@ const useFormDataTemplates = () => {
|
|
|
38171
38196
|
alignItems: "center",
|
|
38172
38197
|
backgroundColor: n.colorFillAlter,
|
|
38173
38198
|
padding: n.padding
|
|
38174
|
-
}, e), [e, n.colorFillAlter]), S = useMemo(() => ({ fontSize: n.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: n.marginXS }), [n.fontSize, n.marginXS]), y = useCallback((I) =>
|
|
38199
|
+
}, e), [e, n.colorFillAlter]), S = useMemo(() => ({ fontSize: n.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: n.marginXS }), [n.fontSize, n.marginXS]), y = useCallback((I) => V(void 0, null, function* () {
|
|
38175
38200
|
d(I), m(null), t == null || t.reset();
|
|
38176
|
-
}), []), v = useCallback((I, w, T) =>
|
|
38201
|
+
}), []), v = useCallback((I, w, T) => V(void 0, null, function* () {
|
|
38177
38202
|
const D = P(x({}, w), { dataId: I });
|
|
38178
38203
|
m(w), fetchTemplateData(h, D, T).then((O) => (t && O && (t.reset(), t.__template = !0, forEach(O, (j, N) => {
|
|
38179
38204
|
var B;
|
|
@@ -38228,7 +38253,7 @@ function findDataTemplates(e) {
|
|
|
38228
38253
|
return t ? _.cloneDeep(t["x-data-templates"]) || {} : {};
|
|
38229
38254
|
}
|
|
38230
38255
|
function fetchTemplateData(e, t, n) {
|
|
38231
|
-
return
|
|
38256
|
+
return V(this, null, function* () {
|
|
38232
38257
|
if (!(t.fields.length === 0 || !t.dataId))
|
|
38233
38258
|
return e.resource(t.collection, void 0, n).get({
|
|
38234
38259
|
filterByTk: t.dataId,
|
|
@@ -38709,7 +38734,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
|
|
|
38709
38734
|
const { setVisible: e } = useActionContext();
|
|
38710
38735
|
return {
|
|
38711
38736
|
run() {
|
|
38712
|
-
return
|
|
38737
|
+
return V(this, null, function* () {
|
|
38713
38738
|
e(!1);
|
|
38714
38739
|
});
|
|
38715
38740
|
}
|
|
@@ -38723,7 +38748,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
|
|
|
38723
38748
|
const { setVisible: e } = useActionContext(), t = useForm(), { mutate: n, data: o } = useSystemSettings() || {}, r = useAPIClient(), { t: i } = useTranslation();
|
|
38724
38749
|
return {
|
|
38725
38750
|
run() {
|
|
38726
|
-
return
|
|
38751
|
+
return V(this, null, function* () {
|
|
38727
38752
|
var u;
|
|
38728
38753
|
yield t.submit();
|
|
38729
38754
|
const l = cloneDeep(t.values);
|
|
@@ -38844,7 +38869,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
|
|
|
38844
38869
|
) });
|
|
38845
38870
|
class SystemSettingsPlugin extends Plugin {
|
|
38846
38871
|
load() {
|
|
38847
|
-
return
|
|
38872
|
+
return V(this, null, function* () {
|
|
38848
38873
|
this.app.use(SystemSettingsProvider, this.options);
|
|
38849
38874
|
});
|
|
38850
38875
|
}
|
|
@@ -38880,7 +38905,7 @@ const RemoteDocumentTitleProvider = (e) => {
|
|
|
38880
38905
|
};
|
|
38881
38906
|
class RemoteDocumentTitlePlugin extends Plugin {
|
|
38882
38907
|
load() {
|
|
38883
|
-
return
|
|
38908
|
+
return V(this, null, function* () {
|
|
38884
38909
|
this.app.use(RemoteDocumentTitleProvider, this.options);
|
|
38885
38910
|
});
|
|
38886
38911
|
}
|
|
@@ -39078,7 +39103,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
39078
39103
|
PinnedPluginList.displayName = "PinnedPluginList";
|
|
39079
39104
|
class PinnedListPlugin extends Plugin {
|
|
39080
39105
|
load() {
|
|
39081
|
-
return
|
|
39106
|
+
return V(this, null, function* () {
|
|
39082
39107
|
this.app.use(PinnedPluginListProvider, this.options.config);
|
|
39083
39108
|
});
|
|
39084
39109
|
}
|
|
@@ -39318,7 +39343,7 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
|
|
|
39318
39343
|
const u = useForm();
|
|
39319
39344
|
return {
|
|
39320
39345
|
run() {
|
|
39321
|
-
return
|
|
39346
|
+
return V(this, null, function* () {
|
|
39322
39347
|
yield u.submit(), c.request({
|
|
39323
39348
|
url: t ? "pm:update" : "pm:add",
|
|
39324
39349
|
method: "post",
|
|
@@ -39424,7 +39449,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: n }) => {
|
|
|
39424
39449
|
const l = useAPIClient(), { t: c } = useTranslation(), u = useForm();
|
|
39425
39450
|
return {
|
|
39426
39451
|
run() {
|
|
39427
|
-
return
|
|
39452
|
+
return V(this, null, function* () {
|
|
39428
39453
|
var h, g;
|
|
39429
39454
|
yield u.submit();
|
|
39430
39455
|
const p = new FormData();
|
|
@@ -39525,7 +39550,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: n }) => {
|
|
|
39525
39550
|
const c = useForm();
|
|
39526
39551
|
return {
|
|
39527
39552
|
run() {
|
|
39528
|
-
return
|
|
39553
|
+
return V(this, null, function* () {
|
|
39529
39554
|
const d = c.values.compressedFileUrl;
|
|
39530
39555
|
if (!d)
|
|
39531
39556
|
return;
|
|
@@ -39725,7 +39750,7 @@ function PluginInfo(e) {
|
|
|
39725
39750
|
{
|
|
39726
39751
|
disabled: u,
|
|
39727
39752
|
title: S("Are you sure to delete this plugin?"),
|
|
39728
|
-
onConfirm: (T) =>
|
|
39753
|
+
onConfirm: (T) => V(this, null, function* () {
|
|
39729
39754
|
T.stopPropagation(), yield y.request({
|
|
39730
39755
|
url: "pm:remove",
|
|
39731
39756
|
params: {
|
|
@@ -39782,14 +39807,14 @@ function PluginInfo(e) {
|
|
|
39782
39807
|
"aria-label": "enable",
|
|
39783
39808
|
size: "small",
|
|
39784
39809
|
disabled: u || h,
|
|
39785
|
-
onChange: (T, D) =>
|
|
39810
|
+
onChange: (T, D) => V(this, null, function* () {
|
|
39786
39811
|
if (D.stopPropagation(), !a && T) {
|
|
39787
39812
|
v.confirm({
|
|
39788
39813
|
title: S("Plugin dependency version mismatch"),
|
|
39789
39814
|
content: S(
|
|
39790
39815
|
"The current dependency version of the plugin does not match the version of the application and may not work properly. Are you sure you want to continue enabling the plugin?"
|
|
39791
39816
|
),
|
|
39792
|
-
onOk: () =>
|
|
39817
|
+
onOk: () => V(this, null, function* () {
|
|
39793
39818
|
yield y.request({
|
|
39794
39819
|
url: "pm:enable",
|
|
39795
39820
|
params: {
|
|
@@ -39807,7 +39832,7 @@ function PluginInfo(e) {
|
|
|
39807
39832
|
}
|
|
39808
39833
|
}) : v.confirm({
|
|
39809
39834
|
title: S("Are you sure to disable this plugin?"),
|
|
39810
|
-
onOk: () =>
|
|
39835
|
+
onOk: () => V(this, null, function* () {
|
|
39811
39836
|
yield y.request({
|
|
39812
39837
|
url: "pm:disable",
|
|
39813
39838
|
params: {
|
|
@@ -39880,7 +39905,7 @@ function BulkEnableButton({ plugins: e = [] }) {
|
|
|
39880
39905
|
width: 1e3,
|
|
39881
39906
|
title: t("Bulk enable"),
|
|
39882
39907
|
open: i,
|
|
39883
|
-
onOk: () =>
|
|
39908
|
+
onOk: () => V(this, null, function* () {
|
|
39884
39909
|
yield n.request({
|
|
39885
39910
|
url: "pm:enable",
|
|
39886
39911
|
params: {
|
|
@@ -40295,7 +40320,7 @@ const AdminSettingsLayout = () => {
|
|
|
40295
40320
|
};
|
|
40296
40321
|
class PMPlugin extends Plugin {
|
|
40297
40322
|
load() {
|
|
40298
|
-
return
|
|
40323
|
+
return V(this, null, function* () {
|
|
40299
40324
|
this.addComponents(), this.addRoutes(), this.addSettings();
|
|
40300
40325
|
});
|
|
40301
40326
|
}
|
|
@@ -41939,7 +41964,7 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
|
|
|
41939
41964
|
J.stopPropagation();
|
|
41940
41965
|
}, E = (J) => {
|
|
41941
41966
|
m(J);
|
|
41942
|
-
},
|
|
41967
|
+
}, q = (H = a.title) != null ? H : (U = i == null ? void 0 : i.uiSchema) == null ? void 0 : U.title;
|
|
41943
41968
|
return t(
|
|
41944
41969
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
|
|
41945
41970
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -41956,7 +41981,7 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
|
|
|
41956
41981
|
},
|
|
41957
41982
|
gutter: 5,
|
|
41958
41983
|
children: [
|
|
41959
|
-
/* @__PURE__ */ jsx(Col, { title: c(
|
|
41984
|
+
/* @__PURE__ */ jsx(Col, { title: c(q), className: "headerCol", children: S ? /* @__PURE__ */ jsx(
|
|
41960
41985
|
Input$3,
|
|
41961
41986
|
{
|
|
41962
41987
|
bordered: !1,
|
|
@@ -41966,7 +41991,7 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
|
|
|
41966
41991
|
onClick: z,
|
|
41967
41992
|
onChange: E
|
|
41968
41993
|
}
|
|
41969
|
-
) : c(
|
|
41994
|
+
) : c(q) }),
|
|
41970
41995
|
/* @__PURE__ */ jsx(
|
|
41971
41996
|
Col,
|
|
41972
41997
|
{
|
|
@@ -42179,7 +42204,7 @@ AssociationFilter.useAssociationField = () => {
|
|
|
42179
42204
|
};
|
|
42180
42205
|
class AssociationFilterPlugin extends Plugin {
|
|
42181
42206
|
load() {
|
|
42182
|
-
return
|
|
42207
|
+
return V(this, null, function* () {
|
|
42183
42208
|
this.app.schemaInitializerManager.add(associationFilterFilterBlockInitializer), this.app.schemaInitializerManager.add(filterCollapseItemInitializer_deprecated), this.app.schemaInitializerManager.add(filterCollapseItemInitializer), this.app.schemaInitializerManager.add(associationFilterInitializer);
|
|
42184
42209
|
});
|
|
42185
42210
|
}
|
|
@@ -42393,15 +42418,15 @@ const DataBlockInitializer = (e) => {
|
|
|
42393
42418
|
otherText: S,
|
|
42394
42419
|
alwaysRenderMenu: y
|
|
42395
42420
|
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: w } = useSchemaTemplateManager(), T = useCallback(
|
|
42396
|
-
(z) =>
|
|
42397
|
-
const { item: E, fromOthersInPopup:
|
|
42421
|
+
(z) => V(void 0, null, function* () {
|
|
42422
|
+
const { item: E, fromOthersInPopup: q } = z;
|
|
42398
42423
|
if (f)
|
|
42399
42424
|
return f(z);
|
|
42400
42425
|
if (E.template) {
|
|
42401
42426
|
const L = yield w(E);
|
|
42402
|
-
v(t ? t(L, { item: E, fromOthersInPopup:
|
|
42427
|
+
v(t ? t(L, { item: E, fromOthersInPopup: q }) : L);
|
|
42403
42428
|
} else
|
|
42404
|
-
n && n({ item: E, fromOthersInPopup:
|
|
42429
|
+
n && n({ item: E, fromOthersInPopup: q });
|
|
42405
42430
|
F(!1);
|
|
42406
42431
|
}),
|
|
42407
42432
|
[w, v, F, n, f, t]
|
|
@@ -42535,7 +42560,7 @@ const DataBlockInitializer = (e) => {
|
|
|
42535
42560
|
P(x({
|
|
42536
42561
|
icon: /* @__PURE__ */ jsx(TableOutlined, {})
|
|
42537
42562
|
}, r), {
|
|
42538
|
-
onClick: (h) =>
|
|
42563
|
+
onClick: (h) => V(void 0, [h], function* ({ item: m }) {
|
|
42539
42564
|
if (m.template) {
|
|
42540
42565
|
const g = yield a(m);
|
|
42541
42566
|
i(g);
|
|
@@ -42631,7 +42656,7 @@ const RecordAssociationDetailsBlockInitializer = () => {
|
|
|
42631
42656
|
P(x({
|
|
42632
42657
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
42633
42658
|
}, r), {
|
|
42634
|
-
onClick: (h) =>
|
|
42659
|
+
onClick: (h) => V(void 0, [h], function* ({ item: m }) {
|
|
42635
42660
|
if (m.template) {
|
|
42636
42661
|
const g = yield a(m);
|
|
42637
42662
|
i(g);
|
|
@@ -42717,7 +42742,7 @@ const RecordAssociationFormBlockInitializer = () => {
|
|
|
42717
42742
|
P(x({
|
|
42718
42743
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
42719
42744
|
}, r), {
|
|
42720
|
-
onClick: (h) =>
|
|
42745
|
+
onClick: (h) => V(void 0, [h], function* ({ item: m }) {
|
|
42721
42746
|
if (m.template) {
|
|
42722
42747
|
const g = yield l(m);
|
|
42723
42748
|
if (m.template.componentName === "FormItem") {
|
|
@@ -42849,7 +42874,7 @@ const createGridCardBlockUISchema = (e) => {
|
|
|
42849
42874
|
P(x({
|
|
42850
42875
|
icon: /* @__PURE__ */ jsx(TableOutlined, {})
|
|
42851
42876
|
}, r), {
|
|
42852
|
-
onClick: (h) =>
|
|
42877
|
+
onClick: (h) => V(void 0, [h], function* ({ item: m }) {
|
|
42853
42878
|
if (m.template) {
|
|
42854
42879
|
const g = yield a(m);
|
|
42855
42880
|
i(g);
|
|
@@ -42954,7 +42979,7 @@ const createListBlockUISchema = (e) => {
|
|
|
42954
42979
|
P(x({
|
|
42955
42980
|
icon: /* @__PURE__ */ jsx(TableOutlined, {})
|
|
42956
42981
|
}, r), {
|
|
42957
|
-
onClick: (h) =>
|
|
42982
|
+
onClick: (h) => V(void 0, [h], function* ({ item: m }) {
|
|
42958
42983
|
if (m.template) {
|
|
42959
42984
|
const g = yield a(m);
|
|
42960
42985
|
i(g);
|
|
@@ -43043,7 +43068,7 @@ const RecordReadPrettyAssociationFormBlockInitializer = () => {
|
|
|
43043
43068
|
P(x({
|
|
43044
43069
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
43045
43070
|
}, r), {
|
|
43046
|
-
onClick: (g) =>
|
|
43071
|
+
onClick: (g) => V(void 0, [g], function* ({ item: h }) {
|
|
43047
43072
|
if (h.template) {
|
|
43048
43073
|
const f = yield l(h);
|
|
43049
43074
|
if (h.template.componentName === "ReadPrettyFormItem") {
|
|
@@ -43232,7 +43257,7 @@ function ModalActionSchemaInitializerItem(e) {
|
|
|
43232
43257
|
const m = useForm();
|
|
43233
43258
|
return {
|
|
43234
43259
|
onClick() {
|
|
43235
|
-
return
|
|
43260
|
+
return V(this, null, function* () {
|
|
43236
43261
|
var g;
|
|
43237
43262
|
yield m.submit(), l(!1), (g = e == null ? void 0 : e.onSubmit) == null || g.call(e, m.values);
|
|
43238
43263
|
});
|
|
@@ -43573,7 +43598,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
43573
43598
|
P(x({}, c), {
|
|
43574
43599
|
icon: /* @__PURE__ */ jsx(ProfileOutlined, {}),
|
|
43575
43600
|
componentType: o,
|
|
43576
|
-
onCreateBlockSchema: (d) =>
|
|
43601
|
+
onCreateBlockSchema: (d) => V(void 0, null, function* () {
|
|
43577
43602
|
if (r)
|
|
43578
43603
|
return r(d);
|
|
43579
43604
|
u(d);
|
|
@@ -43823,7 +43848,7 @@ function useCreateSingleDetailsSchema() {
|
|
|
43823
43848
|
[n, o, r]
|
|
43824
43849
|
);
|
|
43825
43850
|
return { createSingleDetailsSchema: useCallback(
|
|
43826
|
-
(c) =>
|
|
43851
|
+
(c) => V(this, [c], function* ({ item: l }) {
|
|
43827
43852
|
if (l.template) {
|
|
43828
43853
|
const u = yield t(l);
|
|
43829
43854
|
e(i(u, { item: l }));
|
|
@@ -43993,7 +44018,7 @@ const RecordFormBlockInitializer = () => {
|
|
|
43993
44018
|
P(x({
|
|
43994
44019
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
43995
44020
|
}, n), {
|
|
43996
|
-
onClick: (p) =>
|
|
44021
|
+
onClick: (p) => V(void 0, [p], function* ({ item: d }) {
|
|
43997
44022
|
if (d.template) {
|
|
43998
44023
|
const m = yield r(d);
|
|
43999
44024
|
o(c(m, { item: d }));
|
|
@@ -44313,7 +44338,7 @@ const commonOptions$h = {
|
|
|
44313
44338
|
P(x({}, l), {
|
|
44314
44339
|
icon: /* @__PURE__ */ jsx(AppstoreOutlined, {}),
|
|
44315
44340
|
componentType: "GridCard",
|
|
44316
|
-
onCreateBlockSchema: (u) =>
|
|
44341
|
+
onCreateBlockSchema: (u) => V(void 0, null, function* () {
|
|
44317
44342
|
if (o)
|
|
44318
44343
|
return o(u);
|
|
44319
44344
|
c(u);
|
|
@@ -44510,7 +44535,7 @@ const commonOptions$h = {
|
|
|
44510
44535
|
P(x({}, l), {
|
|
44511
44536
|
icon: /* @__PURE__ */ jsx(OrderedListOutlined, {}),
|
|
44512
44537
|
componentType: "List",
|
|
44513
|
-
onCreateBlockSchema: (u) =>
|
|
44538
|
+
onCreateBlockSchema: (u) => V(void 0, null, function* () {
|
|
44514
44539
|
if (o)
|
|
44515
44540
|
return o(u);
|
|
44516
44541
|
c(u);
|
|
@@ -44665,7 +44690,7 @@ const commonOptions$h = {
|
|
|
44665
44690
|
P(x({
|
|
44666
44691
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
44667
44692
|
}, r), {
|
|
44668
|
-
onClick: () =>
|
|
44693
|
+
onClick: () => V(void 0, null, function* () {
|
|
44669
44694
|
i(
|
|
44670
44695
|
createTableSelectorUISchema({
|
|
44671
44696
|
rowKey: a.filterTargetKey,
|
|
@@ -45014,7 +45039,7 @@ const commonOptions$h = {
|
|
|
45014
45039
|
P(x({}, a), {
|
|
45015
45040
|
icon: /* @__PURE__ */ jsx(TableOutlined, {}),
|
|
45016
45041
|
componentType: "Table",
|
|
45017
|
-
onCreateBlockSchema: (c) =>
|
|
45042
|
+
onCreateBlockSchema: (c) => V(void 0, null, function* () {
|
|
45018
45043
|
if (o)
|
|
45019
45044
|
return o(c);
|
|
45020
45045
|
l(c);
|
|
@@ -45155,7 +45180,7 @@ const commonOptions$h = {
|
|
|
45155
45180
|
onlyCurrentDataSource: t,
|
|
45156
45181
|
icon: /* @__PURE__ */ jsx(RightSquareOutlined, {}),
|
|
45157
45182
|
componentType: "FilterCollapse",
|
|
45158
|
-
onCreateBlockSchema: (a) =>
|
|
45183
|
+
onCreateBlockSchema: (a) => V(void 0, [a], function* ({ item: i }) {
|
|
45159
45184
|
const l = createCollapseBlockSchema({
|
|
45160
45185
|
dataSource: i.dataSource,
|
|
45161
45186
|
collectionName: i.collectionName || i.name,
|
|
@@ -45612,7 +45637,7 @@ const commonOptions$h = {
|
|
|
45612
45637
|
const { selectedRows: h } = useContext(RecordPickerContext), { setVisible: g, setSubmitted: f, setFormValueChanged: C } = useActionContext();
|
|
45613
45638
|
return {
|
|
45614
45639
|
onClick(S, y) {
|
|
45615
|
-
return
|
|
45640
|
+
return V(this, null, function* () {
|
|
45616
45641
|
var v, F;
|
|
45617
45642
|
yield r.add({
|
|
45618
45643
|
values: h
|
|
@@ -45934,7 +45959,7 @@ const commonOptions$2 = {
|
|
|
45934
45959
|
let f = a;
|
|
45935
45960
|
return d || (f = "page:addBlock", c && (f = "mobile:addBlock")), f || (f = "popup:common:addBlock", o || !u ? f = "popup:addNew:addBlock" : r && (f = "popup:bulkEdit:addBlock")), {
|
|
45936
45961
|
run() {
|
|
45937
|
-
return
|
|
45962
|
+
return V(this, null, function* () {
|
|
45938
45963
|
yield h.submit();
|
|
45939
45964
|
const { title: b, icon: S } = h.values;
|
|
45940
45965
|
n({
|
|
@@ -46007,7 +46032,7 @@ const commonOptions$2 = {
|
|
|
46007
46032
|
const h = useActionContext();
|
|
46008
46033
|
return {
|
|
46009
46034
|
run() {
|
|
46010
|
-
return
|
|
46035
|
+
return V(this, null, function* () {
|
|
46011
46036
|
h.setVisible(!1);
|
|
46012
46037
|
});
|
|
46013
46038
|
}
|
|
@@ -46316,7 +46341,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
46316
46341
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
46317
46342
|
class SchemaInitializerPlugin extends Plugin {
|
|
46318
46343
|
load() {
|
|
46319
|
-
return
|
|
46344
|
+
return V(this, null, function* () {
|
|
46320
46345
|
this.app.addComponents(P(x(x({}, initializerComponents), items), {
|
|
46321
46346
|
DestroyActionInitializer,
|
|
46322
46347
|
FormBlockInitializer,
|
|
@@ -46531,7 +46556,7 @@ class LocalePlugin extends Plugin {
|
|
|
46531
46556
|
A(this, "locales", {});
|
|
46532
46557
|
}
|
|
46533
46558
|
afterAdd() {
|
|
46534
|
-
return
|
|
46559
|
+
return V(this, null, function* () {
|
|
46535
46560
|
var r, i, a, l, c, u, d;
|
|
46536
46561
|
const n = this.app.apiClient, o = n.auth.locale;
|
|
46537
46562
|
try {
|
|
@@ -46715,7 +46740,7 @@ const AppSpin = () => /* @__PURE__ */ jsx(Spin, { style: { position: "fixed", to
|
|
|
46715
46740
|
};
|
|
46716
46741
|
class NocoBaseBuildInPlugin extends Plugin {
|
|
46717
46742
|
afterAdd() {
|
|
46718
|
-
return
|
|
46743
|
+
return V(this, null, function* () {
|
|
46719
46744
|
this.app.addComponents({
|
|
46720
46745
|
AppSpin,
|
|
46721
46746
|
AppError,
|
|
@@ -46726,7 +46751,7 @@ class NocoBaseBuildInPlugin extends Plugin {
|
|
|
46726
46751
|
});
|
|
46727
46752
|
}
|
|
46728
46753
|
load() {
|
|
46729
|
-
return
|
|
46754
|
+
return V(this, null, function* () {
|
|
46730
46755
|
this.addComponents(), this.addRoutes(), this.app.use(CurrentUserProvider), this.app.use(CurrentUserSettingsMenuProvider), this.app.pluginSettingsManager.add("security", {
|
|
46731
46756
|
title: tval$1("Security"),
|
|
46732
46757
|
icon: "SafetyOutlined"
|
|
@@ -46766,7 +46791,7 @@ class NocoBaseBuildInPlugin extends Plugin {
|
|
|
46766
46791
|
});
|
|
46767
46792
|
}
|
|
46768
46793
|
addPlugins() {
|
|
46769
|
-
return
|
|
46794
|
+
return V(this, null, function* () {
|
|
46770
46795
|
yield this.app.pm.add(AssociationFilterPlugin), yield this.app.pm.add(LocalePlugin, { name: "builtin-locale" }), yield this.app.pm.add(AdminLayoutPlugin, { name: "admin-layout" }), yield this.app.pm.add(SystemSettingsPlugin, { name: "system-setting" }), yield this.app.pm.add(PinnedListPlugin, {
|
|
46771
46796
|
name: "pinned-list",
|
|
46772
46797
|
config: {
|
|
@@ -46862,7 +46887,7 @@ const insertPositionToMethod = {
|
|
|
46862
46887
|
}
|
|
46863
46888
|
}
|
|
46864
46889
|
},
|
|
46865
|
-
onSubmit: (g) =>
|
|
46890
|
+
onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
|
|
46866
46891
|
var y, v;
|
|
46867
46892
|
const f = i.__route__, C = (y = i.parent) == null ? void 0 : y.__route__, b = uid(), { data: S } = yield u({
|
|
46868
46893
|
type: NocoBaseDesktopRouteType.group,
|
|
@@ -46904,7 +46929,7 @@ const insertPositionToMethod = {
|
|
|
46904
46929
|
}
|
|
46905
46930
|
}
|
|
46906
46931
|
},
|
|
46907
|
-
onSubmit: (g) =>
|
|
46932
|
+
onSubmit: (g) => V(void 0, [g], function* ({ title: m, icon: h }) {
|
|
46908
46933
|
var I, w;
|
|
46909
46934
|
const f = i.__route__, C = (I = i.parent) == null ? void 0 : I.__route__, b = uid(), S = uid(), y = uid(), v = uid(), { data: F } = yield u({
|
|
46910
46935
|
type: NocoBaseDesktopRouteType.page,
|
|
@@ -46957,7 +46982,7 @@ const insertPositionToMethod = {
|
|
|
46957
46982
|
params: l
|
|
46958
46983
|
}
|
|
46959
46984
|
},
|
|
46960
|
-
onSubmit: (C) =>
|
|
46985
|
+
onSubmit: (C) => V(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
|
|
46961
46986
|
var F, I;
|
|
46962
46987
|
const b = i.__route__, S = (F = i.parent) == null ? void 0 : F.__route__, y = uid(), { data: v } = yield u(
|
|
46963
46988
|
{
|
|
@@ -47101,7 +47126,7 @@ const insertPositionToMethod = {
|
|
|
47101
47126
|
}
|
|
47102
47127
|
}
|
|
47103
47128
|
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), w = useCallback(
|
|
47104
|
-
(B) =>
|
|
47129
|
+
(B) => V(void 0, [B], function* ({ target: j, position: N }) {
|
|
47105
47130
|
var E;
|
|
47106
47131
|
const [R] = ((E = j == null ? void 0 : j.split) == null ? void 0 : E.call(j, "||")) || [];
|
|
47107
47132
|
if (!R)
|
|
@@ -47169,7 +47194,7 @@ const insertPositionToMethod = {
|
|
|
47169
47194
|
"After hiding, this menu will no longer appear in the menu bar. To show it again, you need to go to the route management page to configure it."
|
|
47170
47195
|
),
|
|
47171
47196
|
onOk() {
|
|
47172
|
-
return
|
|
47197
|
+
return V(this, null, function* () {
|
|
47173
47198
|
var B;
|
|
47174
47199
|
o["x-component-props"].hidden = !!j, n.componentProps.hidden = !!j, (B = o.__route__) != null && B.id && (yield e(o.__route__.id, {
|
|
47175
47200
|
hideInMenu: !!j
|
|
@@ -47355,7 +47380,7 @@ const insertPositionToMethod = {
|
|
|
47355
47380
|
ParentRouteContext.displayName = "ParentRouteContext";
|
|
47356
47381
|
const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes = (e = "desktopRoutes") => {
|
|
47357
47382
|
const t = useAPIClient(), n = useMemo(() => t.resource(e), [t, e]), { refresh: o } = useAllAccessDesktopRoutes(), r = useCallback(
|
|
47358
|
-
(c, u = !0) =>
|
|
47383
|
+
(c, u = !0) => V(void 0, null, function* () {
|
|
47359
47384
|
const d = yield n.create({
|
|
47360
47385
|
values: c
|
|
47361
47386
|
});
|
|
@@ -47363,7 +47388,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
47363
47388
|
}),
|
|
47364
47389
|
[n, o]
|
|
47365
47390
|
), i = useCallback(
|
|
47366
|
-
(c, u, d = !0) =>
|
|
47391
|
+
(c, u, d = !0) => V(void 0, null, function* () {
|
|
47367
47392
|
const p = yield n.update({
|
|
47368
47393
|
filterByTk: c,
|
|
47369
47394
|
values: u
|
|
@@ -47372,7 +47397,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
47372
47397
|
}),
|
|
47373
47398
|
[n, o]
|
|
47374
47399
|
), a = useCallback(
|
|
47375
|
-
(c, u = !0) =>
|
|
47400
|
+
(c, u = !0) => V(void 0, null, function* () {
|
|
47376
47401
|
const d = yield n.destroy({
|
|
47377
47402
|
filterByTk: c
|
|
47378
47403
|
});
|
|
@@ -47380,7 +47405,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
47380
47405
|
}),
|
|
47381
47406
|
[o, n]
|
|
47382
47407
|
), l = useCallback(
|
|
47383
|
-
(f) =>
|
|
47408
|
+
(f) => V(void 0, [f], function* ({
|
|
47384
47409
|
sourceId: c,
|
|
47385
47410
|
targetId: u,
|
|
47386
47411
|
targetScope: d,
|
|
@@ -47692,7 +47717,7 @@ const MenuURLButton = ({ href: e, params: t, icon: n }) => {
|
|
|
47692
47717
|
var u;
|
|
47693
47718
|
const o = useField(), r = useFieldSchema(), { t: i } = useMenuTranslation(), a = useContext(MenuItemDesignerContext), { parseURLAndParams: l } = useParseURLAndParams(), c = useRef(e);
|
|
47694
47719
|
return useEffect(() => {
|
|
47695
|
-
|
|
47720
|
+
V(void 0, null, function* () {
|
|
47696
47721
|
try {
|
|
47697
47722
|
c.current = yield l(e, t || []);
|
|
47698
47723
|
} catch (p) {
|
|
@@ -47995,7 +48020,7 @@ const className1 = css`
|
|
|
47995
48020
|
icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
47996
48021
|
className: "addTabBtn",
|
|
47997
48022
|
type: "dashed",
|
|
47998
|
-
onClick: () =>
|
|
48023
|
+
onClick: () => V(void 0, null, function* () {
|
|
47999
48024
|
const F = yield FormDialog(
|
|
48000
48025
|
o("Add tab"),
|
|
48001
48026
|
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: p.scope, components: x({}, p.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
@@ -48237,7 +48262,7 @@ const pageSettings = new SchemaSettings({
|
|
|
48237
48262
|
title: t("Enable page tabs"),
|
|
48238
48263
|
checked: o.enableTabs,
|
|
48239
48264
|
onChange(a) {
|
|
48240
|
-
return
|
|
48265
|
+
return V(this, null, function* () {
|
|
48241
48266
|
yield r(o.id, {
|
|
48242
48267
|
enableTabs: a
|
|
48243
48268
|
}), n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].enablePageTabs = a, e.emit("patch", {
|
|
@@ -48307,7 +48332,7 @@ const pageSettings = new SchemaSettings({
|
|
|
48307
48332
|
"After hiding, this tab will no longer appear in the tab bar. To show it again, you need to go to the route management page to set it."
|
|
48308
48333
|
),
|
|
48309
48334
|
onOk() {
|
|
48310
|
-
return
|
|
48335
|
+
return V(this, null, function* () {
|
|
48311
48336
|
yield t(n.id, {
|
|
48312
48337
|
hideInMenu: !!o
|
|
48313
48338
|
});
|
|
@@ -48336,7 +48361,7 @@ const pageSettings = new SchemaSettings({
|
|
|
48336
48361
|
content: n("Are you sure you want to delete it?")
|
|
48337
48362
|
}, confirm), {
|
|
48338
48363
|
onOk() {
|
|
48339
|
-
return
|
|
48364
|
+
return V(this, null, function* () {
|
|
48340
48365
|
yield o(r.id), t.emit("remove", {
|
|
48341
48366
|
removed: {
|
|
48342
48367
|
"x-uid": r.schemaUid
|
|
@@ -48364,7 +48389,7 @@ const pageSettings = new SchemaSettings({
|
|
|
48364
48389
|
};
|
|
48365
48390
|
class AntdSchemaComponentPlugin extends Plugin {
|
|
48366
48391
|
load() {
|
|
48367
|
-
return
|
|
48392
|
+
return V(this, null, function* () {
|
|
48368
48393
|
this.addComponents(), this.addScopes(), this.addSchemaSettings();
|
|
48369
48394
|
});
|
|
48370
48395
|
}
|
|
@@ -48435,7 +48460,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
48435
48460
|
const R = S.getCollection(N);
|
|
48436
48461
|
return R ? R.getAllFields(B) : [];
|
|
48437
48462
|
}, v = Object.values(m), F = useMemo(() => e.multiple ? (n || []).map((N) => m[N]).filter(Boolean) : n, [n, e.multiple, m]), I = useCallback(
|
|
48438
|
-
(N) =>
|
|
48463
|
+
(N) => V(void 0, null, function* () {
|
|
48439
48464
|
if (c != null)
|
|
48440
48465
|
return c(N);
|
|
48441
48466
|
if (!N.isLeaf && N.loadChildren) {
|
|
@@ -48470,7 +48495,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
48470
48495
|
}
|
|
48471
48496
|
if (!$.isLeaf && $.loadChildren) {
|
|
48472
48497
|
const E = $.loadChildren($);
|
|
48473
|
-
E != null && E.length && (B.push(...E), $ = E.find((
|
|
48498
|
+
E != null && E.length && (B.push(...E), $ = E.find((q) => q.value === M.slice(0, k + 1).join(".")));
|
|
48474
48499
|
}
|
|
48475
48500
|
}
|
|
48476
48501
|
}), h((R) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, R)));
|
|
@@ -48560,15 +48585,15 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
48560
48585
|
const j = uid();
|
|
48561
48586
|
return f.addEffects(j, () => {
|
|
48562
48587
|
onFieldInputValueChange("*", (N) => {
|
|
48563
|
-
var $, k, z, E,
|
|
48588
|
+
var $, k, z, E, q, L;
|
|
48564
48589
|
const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], R = getFieldPath(N.address.entire), M = getFieldPath(r.address.entire);
|
|
48565
|
-
B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((
|
|
48590
|
+
B.includes((E = N == null ? void 0 : N.props) == null ? void 0 : E.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, M)) && (r.setValue(null), p(null));
|
|
48566
48591
|
});
|
|
48567
48592
|
}), () => {
|
|
48568
48593
|
f.removeEffects(j);
|
|
48569
48594
|
};
|
|
48570
48595
|
}, []);
|
|
48571
|
-
const w = (j) =>
|
|
48596
|
+
const w = (j) => V(void 0, null, function* () {
|
|
48572
48597
|
var M, $;
|
|
48573
48598
|
const { search: N, callBack: B } = j, {
|
|
48574
48599
|
data: { data: R }
|
|
@@ -48965,13 +48990,13 @@ const InternalFileManager = (e) => {
|
|
|
48965
48990
|
let M = p(R[y.label]);
|
|
48966
48991
|
if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
|
|
48967
48992
|
if (Array.isArray(M))
|
|
48968
|
-
M = M.map((E,
|
|
48993
|
+
M = M.map((E, q) => {
|
|
48969
48994
|
var G, U;
|
|
48970
48995
|
const L = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === E);
|
|
48971
|
-
return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || E },
|
|
48996
|
+
return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || E }, q) : /* @__PURE__ */ jsx(Tag, { children: E }, E);
|
|
48972
48997
|
}).reverse();
|
|
48973
48998
|
else {
|
|
48974
|
-
const E = (z = (k = v.uiSchema.enum).find) == null ? void 0 : z.call(k, (
|
|
48999
|
+
const E = (z = (k = v.uiSchema.enum).find) == null ? void 0 : z.call(k, (q) => q.value === M);
|
|
48975
49000
|
E && (M = /* @__PURE__ */ jsx(Tag, { color: E.color, children: E.label }));
|
|
48976
49001
|
}
|
|
48977
49002
|
return (v == null ? void 0 : v.type) === "date" && (M = dayjs(M).format("YYYY-MM-DD")), n ? n({
|
|
@@ -48987,7 +49012,7 @@ const InternalFileManager = (e) => {
|
|
|
48987
49012
|
}
|
|
48988
49013
|
},
|
|
48989
49014
|
[v == null ? void 0 : v.uiSchema, y]
|
|
48990
|
-
), T = (B) =>
|
|
49015
|
+
), T = (B) => V(void 0, null, function* () {
|
|
48991
49016
|
var M, $;
|
|
48992
49017
|
const R = yield C.list({
|
|
48993
49018
|
pageSize: 200,
|
|
@@ -48996,7 +49021,7 @@ const InternalFileManager = (e) => {
|
|
|
48996
49021
|
tree: B.parentId ? void 0 : !0
|
|
48997
49022
|
});
|
|
48998
49023
|
return ($ = R == null ? void 0 : R.data) == null ? void 0 : $.data;
|
|
48999
|
-
}), D = (B, R, M) =>
|
|
49024
|
+
}), D = (B, R, M) => V(void 0, null, function* () {
|
|
49000
49025
|
const $ = yield T({ parentId: R == null ? void 0 : R.id }), k = [...i];
|
|
49001
49026
|
if (k.splice(M + 1), k[M] = P(x({}, k[M]), { value: R }), R != null && R.id && (k[M + 1] = { key: R == null ? void 0 : R.id, children: ($ == null ? void 0 : $.length) > 0 ? $ : null }), a(k), ["o2m", "m2m"].includes(g.interface)) {
|
|
49002
49027
|
const z = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
@@ -49004,17 +49029,17 @@ const InternalFileManager = (e) => {
|
|
|
49004
49029
|
} else
|
|
49005
49030
|
f.value = R;
|
|
49006
49031
|
k.length === 1 && !k[0].value ? o == null || o(null) : o == null || o(k);
|
|
49007
|
-
}), O = (B, R, M) =>
|
|
49032
|
+
}), O = (B, R, M) => V(void 0, null, function* () {
|
|
49008
49033
|
var $, k, z;
|
|
49009
49034
|
if (B) {
|
|
49010
49035
|
d(!0);
|
|
49011
49036
|
const E = yield T({ parentId: R == null ? void 0 : R.key });
|
|
49012
49037
|
if (d(!1), c(E), M === (i == null ? void 0 : i.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
|
|
49013
|
-
const
|
|
49014
|
-
L.splice(M + 1), L[M] = P(x({}, L[M]), { value: R == null ? void 0 : R.value }), L[M + 1] = { key: (z = R == null ? void 0 : R.value) == null ? void 0 : z.id, children: (
|
|
49038
|
+
const q = yield T({ parentId: (k = R == null ? void 0 : R.value) == null ? void 0 : k.id }), L = [...i];
|
|
49039
|
+
L.splice(M + 1), L[M] = P(x({}, L[M]), { value: R == null ? void 0 : R.value }), L[M + 1] = { key: (z = R == null ? void 0 : R.value) == null ? void 0 : z.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(L), o == null || o(L);
|
|
49015
49040
|
}
|
|
49016
49041
|
}
|
|
49017
|
-
}), j = (B, R) =>
|
|
49042
|
+
}), j = (B, R) => V(void 0, null, function* () {
|
|
49018
49043
|
const M = B ? {
|
|
49019
49044
|
[y.label]: {
|
|
49020
49045
|
[F]: B
|
|
@@ -49799,7 +49824,7 @@ const defaultModeToComponent = {
|
|
|
49799
49824
|
const { onClick: u } = useAssociationCreateActionProps(), d = useField(), { getPrimaryKey: p } = useCollection_deprecated(), m = p();
|
|
49800
49825
|
return {
|
|
49801
49826
|
onClick() {
|
|
49802
|
-
return
|
|
49827
|
+
return V(this, null, function* () {
|
|
49803
49828
|
var f, C;
|
|
49804
49829
|
yield u();
|
|
49805
49830
|
const { data: g } = ((C = (f = d.data) == null ? void 0 : f.data) == null ? void 0 : C.data) || {};
|
|
@@ -50441,7 +50466,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50441
50466
|
"loading",
|
|
50442
50467
|
"onClickRow"
|
|
50443
50468
|
]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), w = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = w, O = useMemoizedFn(b.onRowDragEnd || (() => {
|
|
50444
|
-
})), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, R] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none",
|
|
50469
|
+
})), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, R] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), E = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), L = useMemo(() => css`
|
|
50445
50470
|
& > td {
|
|
50446
50471
|
background-color: ${t.controlItemBgActive} !important;
|
|
50447
50472
|
}
|
|
@@ -50463,10 +50488,10 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50463
50488
|
return J(Q);
|
|
50464
50489
|
if (Q.key)
|
|
50465
50490
|
return Q.key;
|
|
50466
|
-
if (
|
|
50467
|
-
return
|
|
50491
|
+
if (q.current.has(Q))
|
|
50492
|
+
return q.current.get(Q);
|
|
50468
50493
|
const te = uid();
|
|
50469
|
-
return
|
|
50494
|
+
return q.current.set(Q, te), te;
|
|
50470
50495
|
}, []), J = useCallback(
|
|
50471
50496
|
(Q) => {
|
|
50472
50497
|
var te;
|
|
@@ -50655,24 +50680,24 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50655
50680
|
}
|
|
50656
50681
|
`, SubTable = observer$1(
|
|
50657
50682
|
(e) => {
|
|
50658
|
-
var M, $, k
|
|
50683
|
+
var M, $, k;
|
|
50659
50684
|
const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: i } = useTranslation(), [a, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S } = n.componentProps;
|
|
50660
50685
|
useSubTableSpecialCase({ rootField: n, rootSchema: r });
|
|
50661
|
-
const y = (
|
|
50662
|
-
if (
|
|
50686
|
+
const y = (z, E) => {
|
|
50687
|
+
if (E !== void 0 && isArr(n.value) && z !== E)
|
|
50663
50688
|
return action(() => {
|
|
50664
|
-
const
|
|
50665
|
-
return n.value.splice(
|
|
50666
|
-
fromIndex:
|
|
50667
|
-
toIndex:
|
|
50689
|
+
const q = n.value[z];
|
|
50690
|
+
return n.value.splice(z, 1), n.value.splice(E, 0, q), exchangeArrayState(n, {
|
|
50691
|
+
fromIndex: z,
|
|
50692
|
+
toIndex: E
|
|
50668
50693
|
}), n.onInput(n.value);
|
|
50669
50694
|
});
|
|
50670
50695
|
};
|
|
50671
50696
|
n.move = y;
|
|
50672
|
-
const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((
|
|
50673
|
-
const
|
|
50674
|
-
return P(x({},
|
|
50675
|
-
[d.label]: getLabelFormatValue$1(m(h), m(
|
|
50697
|
+
const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((E) => {
|
|
50698
|
+
const q = E == null ? void 0 : E[d.label];
|
|
50699
|
+
return P(x({}, E), {
|
|
50700
|
+
[d.label]: getLabelFormatValue$1(m(h), m(q))
|
|
50676
50701
|
});
|
|
50677
50702
|
}) : [], [n.value, d == null ? void 0 : d.label]), F = {
|
|
50678
50703
|
size: "small",
|
|
@@ -50687,45 +50712,45 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50687
50712
|
setSelectedRows: u,
|
|
50688
50713
|
collectionField: o
|
|
50689
50714
|
}, I = () => {
|
|
50690
|
-
const { setVisible:
|
|
50715
|
+
const { setVisible: z } = useActionContext(), { selectedRows: E, setSelectedRows: q } = useContext(RecordPickerContext);
|
|
50691
50716
|
return {
|
|
50692
50717
|
onClick() {
|
|
50693
|
-
var
|
|
50694
|
-
Array.isArray(n.value) || (n.value = []),
|
|
50695
|
-
const
|
|
50696
|
-
D(
|
|
50718
|
+
var G;
|
|
50719
|
+
Array.isArray(n.value) || (n.value = []), E.forEach((U) => n.value.push(markRecordAsNew(U))), n.onInput(n.value), n.initialValue = n.value, q([]), z(!1);
|
|
50720
|
+
const L = Math.ceil(n.value.length / (((G = n.componentProps) == null ? void 0 : G.pageSize) || 10));
|
|
50721
|
+
D(L);
|
|
50697
50722
|
}
|
|
50698
50723
|
};
|
|
50699
50724
|
}, w = () => {
|
|
50700
|
-
const
|
|
50701
|
-
return
|
|
50725
|
+
const z = (o == null ? void 0 : o.targetKey) || "id", E = (n.value || []).map((L) => L == null ? void 0 : L[z]).filter(Boolean);
|
|
50726
|
+
return E.length ? { $and: [{ [`${z}.$ne`]: E }] } : {};
|
|
50702
50727
|
}, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
|
|
50703
50728
|
useEffect(() => {
|
|
50704
|
-
var
|
|
50705
|
-
j((
|
|
50729
|
+
var z;
|
|
50730
|
+
j((z = n.componentProps) == null ? void 0 : z.pageSize);
|
|
50706
50731
|
}, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
|
|
50707
50732
|
const N = useMemo(() => {
|
|
50708
|
-
var
|
|
50709
|
-
const
|
|
50733
|
+
var E;
|
|
50734
|
+
const z = Math.ceil(((E = n.value) == null ? void 0 : E.length) / 10);
|
|
50710
50735
|
return {
|
|
50711
|
-
current: T >
|
|
50736
|
+
current: T > z ? z : T,
|
|
50712
50737
|
pageSize: O || 10,
|
|
50713
50738
|
total: n == null ? void 0 : n.value,
|
|
50714
|
-
onChange: (
|
|
50715
|
-
D(
|
|
50739
|
+
onChange: (q, L) => {
|
|
50740
|
+
D(q), j(L), n.componentProps.pageSize = L, n.onInput(n.value);
|
|
50716
50741
|
},
|
|
50717
50742
|
showSizeChanger: !0,
|
|
50718
50743
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
50719
50744
|
hideOnSinglePage: !1
|
|
50720
50745
|
};
|
|
50721
50746
|
}, [(k = n.value) == null ? void 0 : k.length, O, T]), B = () => {
|
|
50722
|
-
const { field:
|
|
50747
|
+
const { field: z } = useAssociationFieldContext();
|
|
50723
50748
|
return {
|
|
50724
50749
|
run() {
|
|
50725
|
-
var
|
|
50726
|
-
|
|
50727
|
-
const
|
|
50728
|
-
return D(
|
|
50750
|
+
var q;
|
|
50751
|
+
z.value = z.value || [], z.value.push(markRecordAsNew({}));
|
|
50752
|
+
const E = Math.ceil(z.value.length / (((q = z.componentProps) == null ? void 0 : q.pageSize) || 10));
|
|
50753
|
+
return D(E), z.onInput(z.value);
|
|
50729
50754
|
}
|
|
50730
50755
|
};
|
|
50731
50756
|
}, R = () => ({
|
|
@@ -50743,7 +50768,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50743
50768
|
field: n,
|
|
50744
50769
|
showIndex: !0,
|
|
50745
50770
|
dragSort: !1,
|
|
50746
|
-
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (
|
|
50771
|
+
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (z) => n.editable ? S !== !1 ? !0 : z == null ? void 0 : z.__isNewRecord__ : !1 : !1,
|
|
50747
50772
|
pagination: N,
|
|
50748
50773
|
rowSelection: { type: "none", hideSelectAll: !0 },
|
|
50749
50774
|
isSubTable: !0,
|
|
@@ -50759,8 +50784,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50759
50784
|
Space$1,
|
|
50760
50785
|
{
|
|
50761
50786
|
style: {
|
|
50762
|
-
|
|
50763
|
-
position: (z = n.value) != null && z.length ? "absolute" : "relative",
|
|
50787
|
+
position: "relative",
|
|
50764
50788
|
bottom: "0",
|
|
50765
50789
|
gap: 15
|
|
50766
50790
|
},
|
|
@@ -50814,7 +50838,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50814
50838
|
onlyRenderProperties: !0,
|
|
50815
50839
|
basePath: n.address,
|
|
50816
50840
|
schema: p.parent,
|
|
50817
|
-
filterProperties: (
|
|
50841
|
+
filterProperties: (z) => z["x-component"] === "AssociationField.Selector"
|
|
50818
50842
|
}
|
|
50819
50843
|
)
|
|
50820
50844
|
}
|
|
@@ -50913,7 +50937,7 @@ const ReadPretty$7 = observer$1(
|
|
|
50913
50937
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
50914
50938
|
const AssociationSelect = InternalAssociationSelect;
|
|
50915
50939
|
AssociationSelect.Designer = function e() {
|
|
50916
|
-
var M, $, k, z, E,
|
|
50940
|
+
var M, $, k, z, E, q, L, G, U, H, J;
|
|
50917
50941
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), w = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
50918
50942
|
c.title === w || c.title;
|
|
50919
50943
|
const D = useSortFields(S == null ? void 0 : S.target), O = ((E = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : E.sort) || [];
|
|
@@ -51127,7 +51151,7 @@ AssociationSelect.Designer = function e() {
|
|
|
51127
51151
|
SchemaSettingsSwitchItem,
|
|
51128
51152
|
{
|
|
51129
51153
|
title: d("Allow multiple"),
|
|
51130
|
-
checked: ((
|
|
51154
|
+
checked: ((q = u["x-component-props"]) == null ? void 0 : q.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
51131
51155
|
onChange: (W) => {
|
|
51132
51156
|
const K = {
|
|
51133
51157
|
"x-uid": u["x-uid"]
|
|
@@ -51419,7 +51443,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
51419
51443
|
}
|
|
51420
51444
|
},
|
|
51421
51445
|
onSubmit: ($) => {
|
|
51422
|
-
var
|
|
51446
|
+
var q;
|
|
51423
51447
|
const k = [];
|
|
51424
51448
|
for (const L of $.rules)
|
|
51425
51449
|
k.push(_.pickBy(L, _.identity));
|
|
@@ -51429,7 +51453,7 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
51429
51453
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
51430
51454
|
for (const L of k)
|
|
51431
51455
|
(L.maxValue || L.minValue) && (L.percentMode = !0), L.percentFormat && (L.percentFormats = !0);
|
|
51432
|
-
const E = _.concat([], ((
|
|
51456
|
+
const E = _.concat([], ((q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-validator"]) || [], k);
|
|
51433
51457
|
a.validator = E, l["x-validator"] = k, z["x-validator"] = k, u.emit("patch", {
|
|
51434
51458
|
schema: z
|
|
51435
51459
|
}), d();
|
|
@@ -51571,10 +51595,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
51571
51595
|
options: v,
|
|
51572
51596
|
value: (M = (R = a == null ? void 0 : a.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : M.label,
|
|
51573
51597
|
onChange: ($) => {
|
|
51574
|
-
var E,
|
|
51598
|
+
var E, q;
|
|
51575
51599
|
const k = {
|
|
51576
51600
|
"x-uid": l["x-uid"]
|
|
51577
|
-
}, z = P(x(x({}, (
|
|
51601
|
+
}, z = P(x(x({}, (q = (E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-component-props"]) == null ? void 0 : q.fieldNames), a.componentProps.fieldNames), {
|
|
51578
51602
|
label: $
|
|
51579
51603
|
});
|
|
51580
51604
|
a.componentProps.fieldNames = z, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = z, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
@@ -52300,7 +52324,7 @@ const validateJSON = {
|
|
|
52300
52324
|
}
|
|
52301
52325
|
}
|
|
52302
52326
|
},
|
|
52303
|
-
onSubmit: (m) =>
|
|
52327
|
+
onSubmit: (m) => V(void 0, [m], function* ({ plot: u, title: d, config: p }) {
|
|
52304
52328
|
o.title = r(d), o.componentProps.plot = u;
|
|
52305
52329
|
const h = r(JSON.parse(p)), g = h == null ? void 0 : h.data;
|
|
52306
52330
|
if (typeof g == "function") {
|
|
@@ -54256,7 +54280,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
|
|
|
54256
54280
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t + 1 }));
|
|
54257
54281
|
}, useDefAction = () => ({
|
|
54258
54282
|
move() {
|
|
54259
|
-
return
|
|
54283
|
+
return V(this, null, function* () {
|
|
54260
54284
|
});
|
|
54261
54285
|
}
|
|
54262
54286
|
}), TableArray = observer$1(
|
|
@@ -54383,7 +54407,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
|
|
|
54383
54407
|
ReactDragListView,
|
|
54384
54408
|
{
|
|
54385
54409
|
handleSelector: ".drag-handle",
|
|
54386
|
-
onDragEnd: (y, v) =>
|
|
54410
|
+
onDragEnd: (y, v) => V(void 0, null, function* () {
|
|
54387
54411
|
const F = n.value[y], I = n.value[v];
|
|
54388
54412
|
n.move(y, v), yield h(F, I);
|
|
54389
54413
|
}),
|
|
@@ -54472,7 +54496,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
|
|
|
54472
54496
|
const m = useActionContext();
|
|
54473
54497
|
return {
|
|
54474
54498
|
run() {
|
|
54475
|
-
return
|
|
54499
|
+
return V(this, null, function* () {
|
|
54476
54500
|
m.setVisible(!1);
|
|
54477
54501
|
});
|
|
54478
54502
|
}
|
|
@@ -54490,7 +54514,7 @@ const useStyles = genStyleHook("nb-rich-text", (e) => {
|
|
|
54490
54514
|
const m = useForm(), h = useActionContext();
|
|
54491
54515
|
return {
|
|
54492
54516
|
run() {
|
|
54493
|
-
return
|
|
54517
|
+
return V(this, null, function* () {
|
|
54494
54518
|
const { title: f } = m.values;
|
|
54495
54519
|
f && (r.title = f, i.title = f, a.emit("patch", {
|
|
54496
54520
|
schema: {
|
|
@@ -54889,8 +54913,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
54889
54913
|
}), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S, resource: y } = r.decoratorProps, v = y && n(y), F = y != null && y.includes(".") ? (B = o(v == null ? void 0 : v.target)) == null ? void 0 : B.tree : !!(b != null && b.tree), I = useCallback(
|
|
54890
54914
|
({ filter: E }) => {
|
|
54891
54915
|
E = removeNullCondition(E);
|
|
54892
|
-
const
|
|
54893
|
-
|
|
54916
|
+
const q = r.decoratorProps.params || {};
|
|
54917
|
+
q.filter = E, r.decoratorProps.params = q, i["x-decorator-props"].params = q, d.emit("patch", {
|
|
54894
54918
|
schema: {
|
|
54895
54919
|
"x-uid": i["x-uid"],
|
|
54896
54920
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -54911,12 +54935,12 @@ const TableActionColumnDesigner = (e) => {
|
|
|
54911
54935
|
onChange: (E) => {
|
|
54912
54936
|
var L;
|
|
54913
54937
|
r.decoratorProps.treeTable = E, i["x-decorator-props"].treeTable = E;
|
|
54914
|
-
const
|
|
54938
|
+
const q = P(x({}, (L = c.params) == null ? void 0 : L[0]), {
|
|
54915
54939
|
tree: E ? !0 : null
|
|
54916
54940
|
});
|
|
54917
54941
|
d.emit("patch", {
|
|
54918
54942
|
schema: i
|
|
54919
|
-
}), d.refresh(), c.run(
|
|
54943
|
+
}), d.refresh(), c.run(q);
|
|
54920
54944
|
}
|
|
54921
54945
|
}
|
|
54922
54946
|
),
|
|
@@ -54925,7 +54949,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
54925
54949
|
{
|
|
54926
54950
|
title: u("Enable drag and drop sorting"),
|
|
54927
54951
|
checked: r.decoratorProps.dragSort,
|
|
54928
|
-
onChange: (E) =>
|
|
54952
|
+
onChange: (E) => V(void 0, null, function* () {
|
|
54929
54953
|
E && v && (yield w.resource("collections.fields", v.collectionName).update({
|
|
54930
54954
|
filterByTk: v.name,
|
|
54931
54955
|
values: {
|
|
@@ -55027,13 +55051,13 @@ const TableActionColumnDesigner = (e) => {
|
|
|
55027
55051
|
},
|
|
55028
55052
|
onSubmit: ({ sort: E }) => {
|
|
55029
55053
|
var G;
|
|
55030
|
-
const
|
|
55031
|
-
L.sort =
|
|
55054
|
+
const q = E.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), L = r.decoratorProps.params || {};
|
|
55055
|
+
L.sort = q, r.decoratorProps.params = L, i["x-decorator-props"].params = L, d.emit("patch", {
|
|
55032
55056
|
schema: {
|
|
55033
55057
|
"x-uid": i["x-uid"],
|
|
55034
55058
|
"x-decorator-props": i["x-decorator-props"]
|
|
55035
55059
|
}
|
|
55036
|
-
}), c.run(P(x({}, (G = c.params) == null ? void 0 : G[0]), { sort:
|
|
55060
|
+
}), c.run(P(x({}, (G = c.params) == null ? void 0 : G[0]), { sort: q }));
|
|
55037
55061
|
}
|
|
55038
55062
|
}
|
|
55039
55063
|
),
|
|
@@ -55053,8 +55077,8 @@ const TableActionColumnDesigner = (e) => {
|
|
|
55053
55077
|
],
|
|
55054
55078
|
onChange: (E) => {
|
|
55055
55079
|
var L;
|
|
55056
|
-
const
|
|
55057
|
-
|
|
55080
|
+
const q = r.decoratorProps.params || {};
|
|
55081
|
+
q.pageSize = E, r.decoratorProps.params = q, i["x-decorator-props"].params = q, c.run(P(x({}, (L = c.params) == null ? void 0 : L[0]), { pageSize: E, page: 1 })), d.emit("patch", {
|
|
55058
55082
|
schema: {
|
|
55059
55083
|
"x-uid": i["x-uid"],
|
|
55060
55084
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -55074,14 +55098,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
55074
55098
|
{ label: u("Small"), value: "small" }
|
|
55075
55099
|
],
|
|
55076
55100
|
onChange: (E) => {
|
|
55077
|
-
const
|
|
55101
|
+
const q = i.reduceProperties((L, G) => {
|
|
55078
55102
|
if (G["x-component"] === "TableV2")
|
|
55079
55103
|
return G;
|
|
55080
55104
|
}, null);
|
|
55081
|
-
|
|
55105
|
+
q["x-component-props"] = q["x-component-props"] || {}, q["x-component-props"].size = E, d.emit("patch", {
|
|
55082
55106
|
schema: {
|
|
55083
|
-
"x-uid":
|
|
55084
|
-
"x-decorator-props":
|
|
55107
|
+
"x-uid": q["x-uid"],
|
|
55108
|
+
"x-decorator-props": q["x-component-props"]
|
|
55085
55109
|
}
|
|
55086
55110
|
});
|
|
55087
55111
|
}
|
|
@@ -55569,7 +55593,7 @@ function FormDrawer(e, t, n, o) {
|
|
|
55569
55593
|
document.body.appendChild(r.host);
|
|
55570
55594
|
const d = {
|
|
55571
55595
|
forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
|
|
55572
|
-
open: (p) => (r.promise || (r.promise = new Promise((m, h) =>
|
|
55596
|
+
open: (p) => (r.promise || (r.promise = new Promise((m, h) => V(this, null, function* () {
|
|
55573
55597
|
try {
|
|
55574
55598
|
p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(P(x({}, p), {
|
|
55575
55599
|
effects(g) {
|
|
@@ -56193,7 +56217,7 @@ const useRecordIsOwn = () => {
|
|
|
56193
56217
|
const e = useForm(), t = useActionContext();
|
|
56194
56218
|
return {
|
|
56195
56219
|
run() {
|
|
56196
|
-
return
|
|
56220
|
+
return V(this, null, function* () {
|
|
56197
56221
|
t.setVisible(!1), e.reset();
|
|
56198
56222
|
});
|
|
56199
56223
|
}
|
|
@@ -56212,7 +56236,7 @@ const useRecordIsOwn = () => {
|
|
|
56212
56236
|
const { run: e } = useResourceActionContext(), t = useForm(), n = useActionContext();
|
|
56213
56237
|
return {
|
|
56214
56238
|
run() {
|
|
56215
|
-
return
|
|
56239
|
+
return V(this, null, function* () {
|
|
56216
56240
|
t.reset(), e(), n.setVisible(!1);
|
|
56217
56241
|
});
|
|
56218
56242
|
}
|
|
@@ -56221,7 +56245,7 @@ const useRecordIsOwn = () => {
|
|
|
56221
56245
|
const { resource: e } = useCollection_deprecated();
|
|
56222
56246
|
return {
|
|
56223
56247
|
onCardDragEnd(c, u, d) {
|
|
56224
|
-
return
|
|
56248
|
+
return V(this, arguments, function* ({ columns: n, groupField: o }, { fromColumnId: r, fromPosition: i }, { toColumnId: a, toPosition: l }) {
|
|
56225
56249
|
var C, b;
|
|
56226
56250
|
const p = n.find((S) => S.id === r), m = n.find((S) => S.id === a), h = (C = p == null ? void 0 : p.cards) == null ? void 0 : C[i], g = (b = m == null ? void 0 : m.cards) == null ? void 0 : b[l], f = {
|
|
56227
56251
|
sourceId: h.id,
|
|
@@ -56412,7 +56436,7 @@ const useRecordIsOwn = () => {
|
|
|
56412
56436
|
const { run: e, params: t, defaultRequest: n } = useResourceActionContext(), o = useForm(), r = useActionContext(), [i, ...a] = t;
|
|
56413
56437
|
return {
|
|
56414
56438
|
run() {
|
|
56415
|
-
return
|
|
56439
|
+
return V(this, null, function* () {
|
|
56416
56440
|
var d;
|
|
56417
56441
|
const c = (d = n == null ? void 0 : n.params) == null ? void 0 : d.filter, u = c ? { $and: [c, o.values.filter] } : o.values.filter;
|
|
56418
56442
|
e(P(x({}, i), { filter: u }), ...a), r.setVisible(!1);
|
|
@@ -56423,7 +56447,7 @@ const useRecordIsOwn = () => {
|
|
|
56423
56447
|
const t = useForm(), n = useField(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i } = useResourceContext();
|
|
56424
56448
|
return {
|
|
56425
56449
|
run() {
|
|
56426
|
-
return
|
|
56450
|
+
return V(this, null, function* () {
|
|
56427
56451
|
var l;
|
|
56428
56452
|
try {
|
|
56429
56453
|
yield t.submit(), n.data = n.data || {}, n.data.loading = !0;
|
|
@@ -56439,7 +56463,7 @@ const useRecordIsOwn = () => {
|
|
|
56439
56463
|
const t = useForm(), { resource: n } = useResourceContext();
|
|
56440
56464
|
return {
|
|
56441
56465
|
run() {
|
|
56442
|
-
return
|
|
56466
|
+
return V(this, null, function* () {
|
|
56443
56467
|
var i;
|
|
56444
56468
|
yield t.submit();
|
|
56445
56469
|
const r = yield n.create({ values: t.values });
|
|
@@ -56453,7 +56477,7 @@ const useRecordIsOwn = () => {
|
|
|
56453
56477
|
const { resource: n, targetKey: o } = useResourceContext(), { [o]: r } = useRecord();
|
|
56454
56478
|
return {
|
|
56455
56479
|
run() {
|
|
56456
|
-
return
|
|
56480
|
+
return V(this, null, function* () {
|
|
56457
56481
|
var l;
|
|
56458
56482
|
yield t.submit();
|
|
56459
56483
|
const a = yield n.update({ filterByTk: r, values: t.values });
|
|
@@ -56465,7 +56489,7 @@ const useRecordIsOwn = () => {
|
|
|
56465
56489
|
const { resource: e } = useResourceContext(), { refresh: t } = useResourceActionContext();
|
|
56466
56490
|
return {
|
|
56467
56491
|
move(o, r) {
|
|
56468
|
-
return
|
|
56492
|
+
return V(this, null, function* () {
|
|
56469
56493
|
yield e.move({
|
|
56470
56494
|
sourceId: o.id,
|
|
56471
56495
|
targetId: r.id
|
|
@@ -56477,7 +56501,7 @@ const useRecordIsOwn = () => {
|
|
|
56477
56501
|
const t = useField(), n = useForm(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i, targetKey: a } = useResourceContext(), { [a]: l } = useRecord();
|
|
56478
56502
|
return {
|
|
56479
56503
|
run() {
|
|
56480
|
-
return
|
|
56504
|
+
return V(this, null, function* () {
|
|
56481
56505
|
var u;
|
|
56482
56506
|
yield n.submit(), t.data = t.data || {}, t.data.loading = !0;
|
|
56483
56507
|
try {
|
|
@@ -56495,7 +56519,7 @@ const useRecordIsOwn = () => {
|
|
|
56495
56519
|
const { refresh: t } = useResourceActionContext(), { resource: n, targetKey: o } = useResourceContext(), { [o]: r } = useRecord();
|
|
56496
56520
|
return {
|
|
56497
56521
|
run() {
|
|
56498
|
-
return
|
|
56522
|
+
return V(this, null, function* () {
|
|
56499
56523
|
yield n.destroy({ filterByTk: r }), e == null || e(r), t();
|
|
56500
56524
|
});
|
|
56501
56525
|
}
|
|
@@ -56504,7 +56528,7 @@ const useRecordIsOwn = () => {
|
|
|
56504
56528
|
const { state: t, setState: n, refresh: o } = useResourceActionContext(), { resource: r } = useResourceContext(), { t: i } = useTranslation();
|
|
56505
56529
|
return {
|
|
56506
56530
|
run() {
|
|
56507
|
-
return
|
|
56531
|
+
return V(this, null, function* () {
|
|
56508
56532
|
var l;
|
|
56509
56533
|
if (!((l = t == null ? void 0 : t.selectedRowKeys) != null && l.length))
|
|
56510
56534
|
return message.error(i("Please select the records you want to delete"));
|
|
@@ -56523,7 +56547,7 @@ const useRecordIsOwn = () => {
|
|
|
56523
56547
|
const { run: e } = useCreateAction(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
56524
56548
|
return {
|
|
56525
56549
|
run() {
|
|
56526
|
-
return
|
|
56550
|
+
return V(this, null, function* () {
|
|
56527
56551
|
yield e(), yield t();
|
|
56528
56552
|
});
|
|
56529
56553
|
}
|
|
@@ -56532,7 +56556,7 @@ const useRecordIsOwn = () => {
|
|
|
56532
56556
|
const { run: e } = useUpdateAction(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
56533
56557
|
return {
|
|
56534
56558
|
run() {
|
|
56535
|
-
return
|
|
56559
|
+
return V(this, null, function* () {
|
|
56536
56560
|
yield e(), yield t();
|
|
56537
56561
|
});
|
|
56538
56562
|
}
|
|
@@ -56541,7 +56565,7 @@ const useRecordIsOwn = () => {
|
|
|
56541
56565
|
const { run: e } = useDestroyAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
56542
56566
|
return {
|
|
56543
56567
|
run() {
|
|
56544
|
-
return
|
|
56568
|
+
return V(this, null, function* () {
|
|
56545
56569
|
yield e(), yield t();
|
|
56546
56570
|
});
|
|
56547
56571
|
}
|
|
@@ -56556,7 +56580,7 @@ const useRecordIsOwn = () => {
|
|
|
56556
56580
|
const { run: e } = useBulkDestroyAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
56557
56581
|
return {
|
|
56558
56582
|
run() {
|
|
56559
|
-
return
|
|
56583
|
+
return V(this, null, function* () {
|
|
56560
56584
|
yield e(), yield t();
|
|
56561
56585
|
});
|
|
56562
56586
|
}
|
|
@@ -56708,7 +56732,7 @@ const useRecordIsOwn = () => {
|
|
|
56708
56732
|
{
|
|
56709
56733
|
showSearch: !0,
|
|
56710
56734
|
options: l,
|
|
56711
|
-
onDropdownVisibleChange: (g) =>
|
|
56735
|
+
onDropdownVisibleChange: (g) => V(void 0, null, function* () {
|
|
56712
56736
|
var b;
|
|
56713
56737
|
const { target: f, type: C } = p.values;
|
|
56714
56738
|
f && g && c(
|
|
@@ -56758,7 +56782,7 @@ const useRecordIsOwn = () => {
|
|
|
56758
56782
|
value: C,
|
|
56759
56783
|
options: n,
|
|
56760
56784
|
showSearch: !0,
|
|
56761
|
-
onDropdownVisibleChange: (F) =>
|
|
56785
|
+
onDropdownVisibleChange: (F) => V(void 0, null, function* () {
|
|
56762
56786
|
var O;
|
|
56763
56787
|
const { target: I, type: w, through: T } = f.values, D = ["belongsTo"].includes(w) ? l || p : ["belongsToMany"].includes(w) ? T : I;
|
|
56764
56788
|
if (D && F) {
|
|
@@ -56941,7 +56965,7 @@ const useRecordIsOwn = () => {
|
|
|
56941
56965
|
const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: o } = useResourceActionContext(), { resource: r } = useResourceContext(), i = useField();
|
|
56942
56966
|
return {
|
|
56943
56967
|
run() {
|
|
56944
|
-
return
|
|
56968
|
+
return V(this, null, function* () {
|
|
56945
56969
|
yield e.submit(), i.data = i.data || {}, i.data.loading = !0;
|
|
56946
56970
|
const l = cloneDeep$1(e.values);
|
|
56947
56971
|
l.autoCreateReverseField || delete l.reverseField, delete l.autoCreateReverseField;
|
|
@@ -56967,18 +56991,18 @@ const useRecordIsOwn = () => {
|
|
|
56967
56991
|
var E;
|
|
56968
56992
|
if (z.key === "systemInfo")
|
|
56969
56993
|
k.push(P(x({}, z), {
|
|
56970
|
-
children: z.children.filter((
|
|
56994
|
+
children: z.children.filter((q) => q.hidden ? !1 : q.value === "tableoid" ? $ != null && $.length ? $.includes(q.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[q.value] == "boolean" ? o[q.value] : !0)
|
|
56971
56995
|
}));
|
|
56972
56996
|
else {
|
|
56973
|
-
let
|
|
56997
|
+
let q = [];
|
|
56974
56998
|
$ != null && $.length ? $.forEach((L) => {
|
|
56975
56999
|
var U;
|
|
56976
57000
|
const G = (U = z == null ? void 0 : z.children) == null ? void 0 : U.find((H) => [L, L.interface].includes(H.name));
|
|
56977
|
-
G &&
|
|
57001
|
+
G && q.push(P(x({}, G), {
|
|
56978
57002
|
targetScope: L == null ? void 0 : L.targetScope
|
|
56979
57003
|
}));
|
|
56980
|
-
}) : M != null && M.length ?
|
|
56981
|
-
children:
|
|
57004
|
+
}) : M != null && M.length ? q = (E = z == null ? void 0 : z.children) == null ? void 0 : E.filter((L) => !M.includes(L.name)) : q = z == null ? void 0 : z.children, q != null && q.length && k.push(P(x({}, z), {
|
|
57005
|
+
children: q
|
|
56982
57006
|
}));
|
|
56983
57007
|
}
|
|
56984
57008
|
}), k;
|
|
@@ -57127,7 +57151,7 @@ const useRecordIsOwn = () => {
|
|
|
57127
57151
|
const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: o } = useResourceActionContext(), { resource: r, targetKey: i } = useResourceContext(), { [i]: a } = useRecord();
|
|
57128
57152
|
return {
|
|
57129
57153
|
run() {
|
|
57130
|
-
return
|
|
57154
|
+
return V(this, null, function* () {
|
|
57131
57155
|
yield e.submit();
|
|
57132
57156
|
const c = cloneDeep(e.values);
|
|
57133
57157
|
c.autoCreateReverseField || delete c.reverseField, delete c.autoCreateReverseField, yield r.update({ filterByTk: a, values: c }), n.setVisible(!1), yield e.reset(), o(), yield t();
|
|
@@ -57155,7 +57179,7 @@ const useRecordIsOwn = () => {
|
|
|
57155
57179
|
/* @__PURE__ */ jsx(
|
|
57156
57180
|
"a",
|
|
57157
57181
|
P(x({}, a), {
|
|
57158
|
-
onClick: () =>
|
|
57182
|
+
onClick: () => V(void 0, null, function* () {
|
|
57159
57183
|
var j, N;
|
|
57160
57184
|
const { data: w } = yield g.resource("collections.fields", o.collectionName).get({
|
|
57161
57185
|
filterByTk: o.name,
|
|
@@ -57267,9 +57291,9 @@ const useRecordIsOwn = () => {
|
|
|
57267
57291
|
const B = useForm(), { refresh: R } = useResourceActionContext(), { refreshCM: M } = useCollectionManager_deprecated(), $ = useActionContext(), { resource: k } = useResourceContext();
|
|
57268
57292
|
return {
|
|
57269
57293
|
run() {
|
|
57270
|
-
return
|
|
57294
|
+
return V(this, null, function* () {
|
|
57271
57295
|
yield B.submit();
|
|
57272
|
-
const E = cloneDeep(B.values),
|
|
57296
|
+
const E = cloneDeep(B.values), q = omit(E, [
|
|
57273
57297
|
"key",
|
|
57274
57298
|
"uiSchemaUid",
|
|
57275
57299
|
"collectionName",
|
|
@@ -57282,7 +57306,7 @@ const useRecordIsOwn = () => {
|
|
|
57282
57306
|
// 'reverseField.uiSchemaUid',
|
|
57283
57307
|
]);
|
|
57284
57308
|
yield k.create({
|
|
57285
|
-
values:
|
|
57309
|
+
values: q
|
|
57286
57310
|
}), yield B.reset(), yield M(), yield R(), $.setVisible(!1);
|
|
57287
57311
|
});
|
|
57288
57312
|
}
|
|
@@ -57302,7 +57326,7 @@ const useRecordIsOwn = () => {
|
|
|
57302
57326
|
"a",
|
|
57303
57327
|
{
|
|
57304
57328
|
disabled: D,
|
|
57305
|
-
onClick: () =>
|
|
57329
|
+
onClick: () => V(void 0, null, function* () {
|
|
57306
57330
|
var B;
|
|
57307
57331
|
if (!D) {
|
|
57308
57332
|
const { data: R } = yield S.resource("collections.fields", o.collectionName).get({
|
|
@@ -57402,7 +57426,7 @@ const useRecordIsOwn = () => {
|
|
|
57402
57426
|
/* @__PURE__ */ jsx(
|
|
57403
57427
|
"a",
|
|
57404
57428
|
{
|
|
57405
|
-
onClick: () =>
|
|
57429
|
+
onClick: () => V(void 0, null, function* () {
|
|
57406
57430
|
var I;
|
|
57407
57431
|
const { data: S } = yield m.resource("collections.fields", o.collectionName).get({
|
|
57408
57432
|
filterByTk: o.name,
|
|
@@ -57549,7 +57573,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57549
57573
|
const t = useForm(), { refreshCM: n } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i } = useResourceContext(), a = useField();
|
|
57550
57574
|
return {
|
|
57551
57575
|
run() {
|
|
57552
|
-
return
|
|
57576
|
+
return V(this, null, function* () {
|
|
57553
57577
|
var c;
|
|
57554
57578
|
a.data = a.data || {}, a.data.loading = !0;
|
|
57555
57579
|
try {
|
|
@@ -57697,7 +57721,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57697
57721
|
const { refreshCM: t } = useCollectionManager_deprecated(), n = useForm(), o = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: i, targetKey: a } = useResourceContext(), { [a]: l, template: c } = useRecord(), u = useAPIClient(), d = c === "sql" ? u.resource("sqlCollection") : i;
|
|
57698
57722
|
return {
|
|
57699
57723
|
run() {
|
|
57700
|
-
return
|
|
57724
|
+
return V(this, null, function* () {
|
|
57701
57725
|
yield n.submit(), yield d.update({
|
|
57702
57726
|
filterByTk: l,
|
|
57703
57727
|
values: c === "sql" ? n.values : omit$1(n.values, ["fields"])
|
|
@@ -57714,7 +57738,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57714
57738
|
/* @__PURE__ */ jsx(
|
|
57715
57739
|
"a",
|
|
57716
57740
|
P(x({}, i), {
|
|
57717
|
-
onClick: () =>
|
|
57741
|
+
onClick: () => V(void 0, null, function* () {
|
|
57718
57742
|
const g = a(o.template), f = getSchema$3(
|
|
57719
57743
|
x({}, g),
|
|
57720
57744
|
o,
|
|
@@ -57776,7 +57800,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57776
57800
|
useEffect(() => {
|
|
57777
57801
|
const R = [];
|
|
57778
57802
|
g.forEach((M) => {
|
|
57779
|
-
var
|
|
57803
|
+
var q;
|
|
57780
57804
|
const $ = v(M), z = w(M).map((L) => {
|
|
57781
57805
|
const G = T(L, M);
|
|
57782
57806
|
return {
|
|
@@ -57791,7 +57815,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57791
57815
|
};
|
|
57792
57816
|
})
|
|
57793
57817
|
};
|
|
57794
|
-
}), E = (
|
|
57818
|
+
}), E = (q = $.fields.filter((L) => !["obo", "oho", "m2m", "o2m"].includes(L == null ? void 0 : L.interface))) == null ? void 0 : q.map((L) => {
|
|
57795
57819
|
var G;
|
|
57796
57820
|
return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
|
|
57797
57821
|
}).concat(z);
|
|
@@ -57807,7 +57831,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57807
57831
|
if (R) {
|
|
57808
57832
|
u(!1), p([]);
|
|
57809
57833
|
const k = ($ = Object.values((M = R == null ? void 0 : R.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
|
|
57810
|
-
var E,
|
|
57834
|
+
var E, q;
|
|
57811
57835
|
if (z.source) {
|
|
57812
57836
|
const L = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
|
|
57813
57837
|
return P(x({}, z), {
|
|
@@ -57816,21 +57840,21 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57816
57840
|
} else {
|
|
57817
57841
|
const L = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
|
|
57818
57842
|
return P(x({}, L), {
|
|
57819
|
-
uiSchema: P(x({}, omit(L.uiSchema, "rawTitle")), { title: ((
|
|
57843
|
+
uiSchema: P(x({}, omit(L.uiSchema, "rawTitle")), { title: ((q = L.uiSchema) == null ? void 0 : q.title) || L.name })
|
|
57820
57844
|
});
|
|
57821
57845
|
}
|
|
57822
57846
|
});
|
|
57823
57847
|
S.value = k, setTimeout(() => {
|
|
57824
|
-
var z, E,
|
|
57825
|
-
p(k), y.setValuesIn("sources", (z = R.data) == null ? void 0 : z.sources), f((E = R.data) == null ? void 0 : E.sources), b((
|
|
57848
|
+
var z, E, q;
|
|
57849
|
+
p(k), y.setValuesIn("sources", (z = R.data) == null ? void 0 : z.sources), f((E = R.data) == null ? void 0 : E.sources), b((q = R == null ? void 0 : R.data) == null ? void 0 : q.unsupportedFields);
|
|
57826
57850
|
});
|
|
57827
57851
|
}
|
|
57828
57852
|
}).catch);
|
|
57829
57853
|
}, [t]);
|
|
57830
57854
|
const N = (R, M) => {
|
|
57831
57855
|
d.splice(M, 1, R), p(d), S.value = d.map(($) => {
|
|
57832
|
-
var z, E,
|
|
57833
|
-
const k = typeof $.source == "string" ? $.source : (
|
|
57856
|
+
var z, E, q;
|
|
57857
|
+
const k = typeof $.source == "string" ? $.source : (q = (E = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : E.call(z, Boolean)) == null ? void 0 : q.join(".");
|
|
57834
57858
|
return P(x({}, $), {
|
|
57835
57859
|
source: k
|
|
57836
57860
|
});
|
|
@@ -57855,8 +57879,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57855
57879
|
style: { width: "100%" },
|
|
57856
57880
|
options: D(m),
|
|
57857
57881
|
onChange: (k, z) => {
|
|
57858
|
-
var
|
|
57859
|
-
const E = (
|
|
57882
|
+
var q;
|
|
57883
|
+
const E = (q = I(k == null ? void 0 : k[0])) == null ? void 0 : q.find((L) => L.name === last(k));
|
|
57860
57884
|
N(P(x({}, M), { source: k, uiSchema: E == null ? void 0 : E.uiSchema }), $);
|
|
57861
57885
|
},
|
|
57862
57886
|
placeholder: l("Select field source")
|
|
@@ -57897,10 +57921,10 @@ const getSchema$4 = (e, t, n) => {
|
|
|
57897
57921
|
popupMatchSelectWidth: !1,
|
|
57898
57922
|
onChange: (E) => {
|
|
57899
57923
|
var L;
|
|
57900
|
-
const
|
|
57901
|
-
N(P(x({}, k), { interface: E, uiSchema: (L =
|
|
57924
|
+
const q = F(E);
|
|
57925
|
+
N(P(x({}, k), { interface: E, uiSchema: (L = q == null ? void 0 : q.default) == null ? void 0 : L.uiSchema }), $);
|
|
57902
57926
|
},
|
|
57903
|
-
children: z.map((E) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(E.label), children: E.children.map((
|
|
57927
|
+
children: z.map((E) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(E.label), children: E.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, E.key))
|
|
57904
57928
|
}
|
|
57905
57929
|
);
|
|
57906
57930
|
}
|
|
@@ -57980,7 +58004,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
57980
58004
|
key: F.name,
|
|
57981
58005
|
width: 200,
|
|
57982
58006
|
render: ($, k, z) => {
|
|
57983
|
-
const E = k[F.name],
|
|
58007
|
+
const E = k[F.name], q = {
|
|
57984
58008
|
type: "object",
|
|
57985
58009
|
properties: {
|
|
57986
58010
|
[F.name]: {
|
|
@@ -57992,7 +58016,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
57992
58016
|
}
|
|
57993
58017
|
}
|
|
57994
58018
|
};
|
|
57995
|
-
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema:
|
|
58019
|
+
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: q, name: z, onlyRenderProperties: !0 }) });
|
|
57996
58020
|
}
|
|
57997
58021
|
};
|
|
57998
58022
|
});
|
|
@@ -58123,7 +58147,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
58123
58147
|
const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: o } = useResourceActionContext(), { targetKey: r } = useResourceContext(), { [r]: i } = useRecord(), a = useAPIClient(), l = useField();
|
|
58124
58148
|
return {
|
|
58125
58149
|
run() {
|
|
58126
|
-
return
|
|
58150
|
+
return V(this, null, function* () {
|
|
58127
58151
|
yield e.submit(), l.data = l.data || {}, l.data.loading = !0;
|
|
58128
58152
|
try {
|
|
58129
58153
|
yield a.resource("collections").setFields({
|
|
@@ -58551,7 +58575,7 @@ const AsyncDataProvider = (e) => {
|
|
|
58551
58575
|
const t = useForm(), n = useActionContext(), { refreshCM: o } = useCollectionManager_deprecated(), { refresh: r } = useResourceActionContext(), { targetKey: i } = useResourceContext(), { [i]: a } = useRecord(), l = useAPIClient(), c = useField();
|
|
58552
58576
|
return {
|
|
58553
58577
|
run() {
|
|
58554
|
-
return
|
|
58578
|
+
return V(this, null, function* () {
|
|
58555
58579
|
yield t.submit(), c.data = c.data || {}, c.data.loading = !0;
|
|
58556
58580
|
try {
|
|
58557
58581
|
yield l.resource("sqlCollection").setFields({
|
|
@@ -58595,7 +58619,7 @@ const AsyncDataProvider = (e) => {
|
|
|
58595
58619
|
const { run: e } = useDestroyAction(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
58596
58620
|
return {
|
|
58597
58621
|
run() {
|
|
58598
|
-
return
|
|
58622
|
+
return V(this, null, function* () {
|
|
58599
58623
|
yield e(), yield t();
|
|
58600
58624
|
});
|
|
58601
58625
|
}
|
|
@@ -58604,7 +58628,7 @@ const AsyncDataProvider = (e) => {
|
|
|
58604
58628
|
const { run: t } = useBulkDestroyAction(), { refreshCM: n } = useCollectionManager_deprecated();
|
|
58605
58629
|
return {
|
|
58606
58630
|
run() {
|
|
58607
|
-
return
|
|
58631
|
+
return V(this, null, function* () {
|
|
58608
58632
|
yield t(e), yield n();
|
|
58609
58633
|
});
|
|
58610
58634
|
}
|
|
@@ -58613,7 +58637,7 @@ const AsyncDataProvider = (e) => {
|
|
|
58613
58637
|
const { refresh: e } = useResourceActionContext(), { resource: t, targetKey: n } = useResourceContext(), { [n]: o } = useRecord(), r = useForm(), { cascade: i } = (r == null ? void 0 : r.values) || {};
|
|
58614
58638
|
return {
|
|
58615
58639
|
run() {
|
|
58616
|
-
return
|
|
58640
|
+
return V(this, null, function* () {
|
|
58617
58641
|
yield t.destroy({ filterByTk: o, cascade: i }), e();
|
|
58618
58642
|
});
|
|
58619
58643
|
}
|
|
@@ -58622,7 +58646,7 @@ const AsyncDataProvider = (e) => {
|
|
|
58622
58646
|
const { state: e, setState: t, refresh: n } = useResourceActionContext(), { resource: o } = useResourceContext(), r = useActionContext(), { t: i } = useTranslation(), a = useForm(), { cascade: l } = (a == null ? void 0 : a.values) || {}, c = Object.values(e).flat();
|
|
58623
58647
|
return {
|
|
58624
58648
|
run(d) {
|
|
58625
|
-
return
|
|
58649
|
+
return V(this, null, function* () {
|
|
58626
58650
|
var p;
|
|
58627
58651
|
if (!(c != null && c.length))
|
|
58628
58652
|
return message.error(i("Please select the records you want to delete"));
|
|
@@ -58772,7 +58796,7 @@ const getSchema$1 = (e) => {
|
|
|
58772
58796
|
};
|
|
58773
58797
|
}, useCreateSubField = () => (useActionContext(), {
|
|
58774
58798
|
run() {
|
|
58775
|
-
return
|
|
58799
|
+
return V(this, null, function* () {
|
|
58776
58800
|
});
|
|
58777
58801
|
}
|
|
58778
58802
|
}), AddSubFieldAction = () => {
|
|
@@ -58857,7 +58881,7 @@ const getSchema$1 = (e) => {
|
|
|
58857
58881
|
const e = useForm(), { run: t } = useUpdateAction(), { refreshCM: n } = useCollectionManager_deprecated();
|
|
58858
58882
|
return {
|
|
58859
58883
|
run() {
|
|
58860
|
-
return
|
|
58884
|
+
return V(this, null, function* () {
|
|
58861
58885
|
var i, a, l;
|
|
58862
58886
|
yield e.submit();
|
|
58863
58887
|
const r = ((l = (a = (i = e == null ? void 0 : e.values) == null ? void 0 : i.uiSchema) == null ? void 0 : a.enum) == null ? void 0 : l.slice()) || [];
|
|
@@ -58878,7 +58902,7 @@ const getSchema$1 = (e) => {
|
|
|
58878
58902
|
/* @__PURE__ */ jsx(
|
|
58879
58903
|
"a",
|
|
58880
58904
|
{
|
|
58881
|
-
onClick: () =>
|
|
58905
|
+
onClick: () => V(void 0, null, function* () {
|
|
58882
58906
|
const c = getSchema(P(x({}, n(t.interface)), {
|
|
58883
58907
|
default: t
|
|
58884
58908
|
}));
|
|
@@ -62765,7 +62789,7 @@ class SqlCollectionTemplate extends CollectionTemplate {
|
|
|
62765
62789
|
}
|
|
62766
62790
|
class MainDataSource extends DataSource {
|
|
62767
62791
|
getDataSource() {
|
|
62768
|
-
return
|
|
62792
|
+
return V(this, null, function* () {
|
|
62769
62793
|
var o;
|
|
62770
62794
|
const t = yield this.app.apiClient.request({
|
|
62771
62795
|
resource: "collections",
|
|
@@ -62779,7 +62803,7 @@ class MainDataSource extends DataSource {
|
|
|
62779
62803
|
}
|
|
62780
62804
|
class CollectionPlugin extends Plugin {
|
|
62781
62805
|
load() {
|
|
62782
|
-
return
|
|
62806
|
+
return V(this, null, function* () {
|
|
62783
62807
|
this.dataSourceManager.addCollectionMixins([InheritanceCollectionMixin]), this.addFieldInterfaces(), this.addCollectionTemplates(), this.addFieldInterfaces(), this.addFieldInterfaceGroups(), this.addMainDataSource();
|
|
62784
62808
|
});
|
|
62785
62809
|
}
|
|
@@ -63260,7 +63284,7 @@ const toItems = (e = {}) => {
|
|
|
63260
63284
|
a(((g = h == null ? void 0 : h.data) == null ? void 0 : g.map((f) => f["x-uid"])) || []);
|
|
63261
63285
|
}
|
|
63262
63286
|
}
|
|
63263
|
-
), u = t.resource("roles.menuUiSchemas", e.name), d = r.length === i.length, p = (h, g) =>
|
|
63287
|
+
), u = t.resource("roles.menuUiSchemas", e.name), d = r.length === i.length, p = (h, g) => V(void 0, null, function* () {
|
|
63264
63288
|
const f = getParentUids(n, (b) => b.uid === g.uid), C = getChildrenUids(g == null ? void 0 : g.children, []);
|
|
63265
63289
|
if (h) {
|
|
63266
63290
|
const b = C.concat(g.uid), S = i.filter((y) => !b.includes(y));
|
|
@@ -63305,7 +63329,7 @@ const toItems = (e = {}) => {
|
|
|
63305
63329
|
Checkbox$1,
|
|
63306
63330
|
{
|
|
63307
63331
|
checked: d,
|
|
63308
|
-
onChange: (h) =>
|
|
63332
|
+
onChange: (h) => V(void 0, null, function* () {
|
|
63309
63333
|
d ? yield u.set({
|
|
63310
63334
|
values: []
|
|
63311
63335
|
}) : yield u.set({
|
|
@@ -63343,7 +63367,7 @@ const PermissionProvider = (e) => {
|
|
|
63343
63367
|
{
|
|
63344
63368
|
value: {
|
|
63345
63369
|
currentRecord: i,
|
|
63346
|
-
update: (l, c) =>
|
|
63370
|
+
update: (l, c) => V(void 0, null, function* () {
|
|
63347
63371
|
const { path: u, value: d } = l.getState();
|
|
63348
63372
|
if (["ui.*", "pm", "pm.*"].includes(u)) {
|
|
63349
63373
|
const p = t.resource("roles.snippets", n.name);
|
|
@@ -63414,7 +63438,7 @@ const PermissionProvider = (e) => {
|
|
|
63414
63438
|
);
|
|
63415
63439
|
},
|
|
63416
63440
|
effects() {
|
|
63417
|
-
onFieldChange("*", (o, r) =>
|
|
63441
|
+
onFieldChange("*", (o, r) => V(this, null, function* () {
|
|
63418
63442
|
r.modified && (yield e(o, r));
|
|
63419
63443
|
}));
|
|
63420
63444
|
}
|
|
@@ -64458,7 +64482,7 @@ const SettingCenterProvider = (e) => {
|
|
|
64458
64482
|
l((g == null ? void 0 : g.data) || []);
|
|
64459
64483
|
}
|
|
64460
64484
|
}
|
|
64461
|
-
), m = n.resource("roles.snippets", t.name), h = (g, f) =>
|
|
64485
|
+
), m = n.resource("roles.snippets", t.name), h = (g, f) => V(void 0, null, function* () {
|
|
64462
64486
|
const b = getChildrenKeys(f == null ? void 0 : f.children, []).concat(f.aclSnippet);
|
|
64463
64487
|
g ? (yield m.add({
|
|
64464
64488
|
values: b.map((S) => "!" + S)
|
|
@@ -64489,7 +64513,7 @@ const SettingCenterProvider = (e) => {
|
|
|
64489
64513
|
Checkbox$1,
|
|
64490
64514
|
{
|
|
64491
64515
|
checked: c,
|
|
64492
|
-
onChange: () =>
|
|
64516
|
+
onChange: () => V(void 0, null, function* () {
|
|
64493
64517
|
const g = i.map((f) => "!" + f);
|
|
64494
64518
|
c ? yield m.add({
|
|
64495
64519
|
values: g
|
|
@@ -64536,7 +64560,7 @@ const SettingCenterProvider = (e) => {
|
|
|
64536
64560
|
}, ACLPane = () => /* @__PURE__ */ jsx(Card, { "data-testid": "acl-pane-card", bordered: !1, children: /* @__PURE__ */ jsx(SchemaComponent, { components, schema: schema2 }) });
|
|
64537
64561
|
class ACLPlugin extends Plugin {
|
|
64538
64562
|
load() {
|
|
64539
|
-
return
|
|
64563
|
+
return V(this, null, function* () {
|
|
64540
64564
|
this.app.addComponents({
|
|
64541
64565
|
ACLCollectionFieldProvider,
|
|
64542
64566
|
ACLActionProvider,
|
|
@@ -64574,7 +64598,7 @@ function AntdConfigProvider(e) {
|
|
|
64574
64598
|
}
|
|
64575
64599
|
class AntdConfigPlugin extends Plugin {
|
|
64576
64600
|
load() {
|
|
64577
|
-
return
|
|
64601
|
+
return V(this, null, function* () {
|
|
64578
64602
|
var t;
|
|
64579
64603
|
this.app.use(AntdConfigProvider, ((t = this.options) == null ? void 0 : t.config) || {});
|
|
64580
64604
|
});
|