@nocobase/client 1.7.2 → 1.7.3
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 +791 -789
- package/lib/index.js +71 -71
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ var W = (e, t) => {
|
|
|
21
21
|
return o;
|
|
22
22
|
};
|
|
23
23
|
var A = (e, t, o) => (we(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
24
|
-
var
|
|
24
|
+
var z = (e, t, o) => new Promise((n, r) => {
|
|
25
25
|
var a = (c) => {
|
|
26
26
|
try {
|
|
27
27
|
l(o.next(c));
|
|
@@ -4294,7 +4294,7 @@ class APIClient extends APIClient$1 {
|
|
|
4294
4294
|
return (i = (a = o == null ? void 0 : o.response) == null ? void 0 : a.data) != null && i.error ? [(c = (l = o == null ? void 0 : o.response) == null ? void 0 : l.data) == null ? void 0 : c.error] : ((d = (u = o == null ? void 0 : o.response) == null ? void 0 : u.data) == null ? void 0 : d.errors) || ((m = (p = o == null ? void 0 : o.response) == null ? void 0 : p.data) == null ? void 0 : m.messages) || ((h = o == null ? void 0 : o.response) == null ? void 0 : h.error) || [{ message: o.message || "Server error" }];
|
|
4295
4295
|
}
|
|
4296
4296
|
handleNotificationError(o) {
|
|
4297
|
-
return
|
|
4297
|
+
return z(this, null, function* () {
|
|
4298
4298
|
var a, i, l, c, u, d, p, m, h, g;
|
|
4299
4299
|
if (this.silence)
|
|
4300
4300
|
throw o;
|
|
@@ -4383,13 +4383,13 @@ function assign(e, t, o = {}) {
|
|
|
4383
4383
|
function useRequest(e, t = {}) {
|
|
4384
4384
|
const [o, n] = useSetState({}), r = useAPIClient();
|
|
4385
4385
|
let a;
|
|
4386
|
-
typeof e == "function" ? a = e : e ? a = (...u) =>
|
|
4386
|
+
typeof e == "function" ? a = e : e ? a = (...u) => z(this, [...u], function* (c = {}) {
|
|
4387
4387
|
const { resource: d, url: p } = e;
|
|
4388
4388
|
let m = cloneDeep(e);
|
|
4389
4389
|
d || p ? (m.params = m.params || {}, assign(m.params, c)) : m = merge(m, c);
|
|
4390
4390
|
const h = yield r.request(m);
|
|
4391
4391
|
return h == null ? void 0 : h.data;
|
|
4392
|
-
}) : a = () =>
|
|
4392
|
+
}) : a = () => z(this, null, function* () {
|
|
4393
4393
|
});
|
|
4394
4394
|
const i = P(x({}, t), {
|
|
4395
4395
|
onSuccess(...c) {
|
|
@@ -4591,7 +4591,7 @@ class Collection {
|
|
|
4591
4591
|
const { ConfigContext } = ConfigProvider, useConfig = () => useContext(ConfigContext), usePrefixCls = (e, t) => {
|
|
4592
4592
|
const { getPrefixCls: o } = useContext(ConfigProvider.ConfigContext) || {};
|
|
4593
4593
|
return "ConfigContext" in ConfigProvider ? (o == null ? void 0 : o(e, t == null ? void 0 : t.prefixCls)) || "" : `ant-${e != null ? e : ""}`;
|
|
4594
|
-
}, useToken$1 = () => theme.useToken(), loading = (e = "Loading...", t) =>
|
|
4594
|
+
}, useToken$1 = () => theme.useToken(), loading = (e = "Loading...", t) => z(void 0, null, function* () {
|
|
4595
4595
|
let o = null;
|
|
4596
4596
|
const n = setTimeout(() => {
|
|
4597
4597
|
o = message.loading(e);
|
|
@@ -4631,7 +4631,7 @@ function legacyUnmount(e) {
|
|
|
4631
4631
|
return unmountComponentAtNode(e);
|
|
4632
4632
|
}
|
|
4633
4633
|
function concurrentUnmount(e) {
|
|
4634
|
-
return
|
|
4634
|
+
return z(this, null, function* () {
|
|
4635
4635
|
return Promise.resolve().then(() => {
|
|
4636
4636
|
var t;
|
|
4637
4637
|
(t = e[MARK]) == null || t.unmount(), delete e[MARK];
|
|
@@ -4890,7 +4890,7 @@ class DataSource {
|
|
|
4890
4890
|
this.reloadCallbacks = this.reloadCallbacks.filter((o) => o !== t);
|
|
4891
4891
|
}
|
|
4892
4892
|
reload() {
|
|
4893
|
-
return
|
|
4893
|
+
return z(this, null, function* () {
|
|
4894
4894
|
const t = yield this.getDataSource();
|
|
4895
4895
|
return this.setOptions(t), this.collectionManager.setCollections(t.collections || []), this.reloadCallbacks.forEach((o) => o(t.collections)), this.options;
|
|
4896
4896
|
});
|
|
@@ -6128,7 +6128,7 @@ class DataSourceManager {
|
|
|
6128
6128
|
return this.dataSourceInstancesMap[n.key] = n, n;
|
|
6129
6129
|
}
|
|
6130
6130
|
addDataSources(t, o) {
|
|
6131
|
-
return
|
|
6131
|
+
return z(this, null, function* () {
|
|
6132
6132
|
this.multiDataSources.some(([n, r]) => n === t && r === o) || this.multiDataSources.push([t, o]);
|
|
6133
6133
|
});
|
|
6134
6134
|
}
|
|
@@ -6151,9 +6151,9 @@ class DataSourceManager {
|
|
|
6151
6151
|
this.collectionFieldInterfaceManager.addFieldInterfaces(t);
|
|
6152
6152
|
}
|
|
6153
6153
|
reload() {
|
|
6154
|
-
return
|
|
6154
|
+
return z(this, null, function* () {
|
|
6155
6155
|
return yield Promise.all(
|
|
6156
|
-
this.multiDataSources.map((n) =>
|
|
6156
|
+
this.multiDataSources.map((n) => z(this, [n], function* ([t, o]) {
|
|
6157
6157
|
(yield t()).map((a) => this.addDataSource(o, a));
|
|
6158
6158
|
}))
|
|
6159
6159
|
), Promise.all(this.getDataSources().map((t) => t.reload()));
|
|
@@ -6914,7 +6914,7 @@ function getAllKeys(e) {
|
|
|
6914
6914
|
}
|
|
6915
6915
|
return o(e), t;
|
|
6916
6916
|
}
|
|
6917
|
-
const parseVariableValue = (e, t, o) =>
|
|
6917
|
+
const parseVariableValue = (e, t, o) => z(void 0, null, function* () {
|
|
6918
6918
|
const n = isVariable$1(e) ? [t.parseVariable(e, o).then(({ value: r }) => r)] : [e];
|
|
6919
6919
|
try {
|
|
6920
6920
|
const [r] = yield Promise.all(n);
|
|
@@ -6922,7 +6922,7 @@ const parseVariableValue = (e, t, o) => q(void 0, null, function* () {
|
|
|
6922
6922
|
} catch (r) {
|
|
6923
6923
|
throw console.error("Error in parseVariableValue:", r), r;
|
|
6924
6924
|
}
|
|
6925
|
-
}), conditionAnalyses = (i, l) =>
|
|
6925
|
+
}), conditionAnalyses = (i, l) => z(void 0, [i, l], function* ({
|
|
6926
6926
|
ruleGroup: e,
|
|
6927
6927
|
variables: t,
|
|
6928
6928
|
localVariables: o,
|
|
@@ -6935,12 +6935,12 @@ const parseVariableValue = (e, t, o) => q(void 0, null, function* () {
|
|
|
6935
6935
|
)
|
|
6936
6936
|
);
|
|
6937
6937
|
return c === "$and" ? every(d, (p) => p) : d.length ? some(d, (p) => p) : !0;
|
|
6938
|
-
}), processCondition = (e, t, o, n, r, a) =>
|
|
6938
|
+
}), processCondition = (e, t, o, n, r, a) => z(void 0, null, function* () {
|
|
6939
6939
|
return "$and" in e || "$or" in e ? yield conditionAnalyses({ ruleGroup: e, variables: t, localVariables: o, conditionType: r }, a) : r === "advanced" ? processAdvancedCondition(e, t, o, a) : processBasicCondition(e, t, o, n, a);
|
|
6940
|
-
}), processAdvancedCondition = (e, t, o, n) =>
|
|
6940
|
+
}), processAdvancedCondition = (e, t, o, n) => z(void 0, null, function* () {
|
|
6941
6941
|
const r = e.op, a = yield parseVariableValue(e.rightVar, t, o), i = yield parseVariableValue(e.leftVar, t, o);
|
|
6942
6942
|
return r ? n.apply({ [r]: [i, a] }) : !0;
|
|
6943
|
-
}), processBasicCondition = (e, t, o, n, r) =>
|
|
6943
|
+
}), processBasicCondition = (e, t, o, n, r) => z(void 0, null, function* () {
|
|
6944
6944
|
const a = getInnermostKeyAndValue(e), i = a == null ? void 0 : a.key;
|
|
6945
6945
|
if (!i)
|
|
6946
6946
|
return !0;
|
|
@@ -6968,7 +6968,7 @@ const getVariablesData = (e) => {
|
|
|
6968
6968
|
}), t;
|
|
6969
6969
|
};
|
|
6970
6970
|
function getRenderContent(e, t, o, n, r) {
|
|
6971
|
-
return
|
|
6971
|
+
return z(this, null, function* () {
|
|
6972
6972
|
var a, i;
|
|
6973
6973
|
if (t && e === "handlebars")
|
|
6974
6974
|
try {
|
|
@@ -7312,7 +7312,7 @@ function getRemotePlugins(e, t = []) {
|
|
|
7312
7312
|
});
|
|
7313
7313
|
}
|
|
7314
7314
|
function getPlugins(e) {
|
|
7315
|
-
return
|
|
7315
|
+
return z(this, null, function* () {
|
|
7316
7316
|
const { requirejs: t, pluginData: o, devDynamicImport: n } = e;
|
|
7317
7317
|
if (o.length === 0)
|
|
7318
7318
|
return [];
|
|
@@ -7357,12 +7357,12 @@ let PluginManager$1 = class {
|
|
|
7357
7357
|
* @internal
|
|
7358
7358
|
*/
|
|
7359
7359
|
init(t) {
|
|
7360
|
-
return
|
|
7360
|
+
return z(this, null, function* () {
|
|
7361
7361
|
yield this.initStaticPlugins(t), this.loadRemotePlugins && (yield this.initRemotePlugins());
|
|
7362
7362
|
});
|
|
7363
7363
|
}
|
|
7364
7364
|
initStaticPlugins() {
|
|
7365
|
-
return
|
|
7365
|
+
return z(this, arguments, function* (t = []) {
|
|
7366
7366
|
try {
|
|
7367
7367
|
for (var o = Te(t), n, r, a; n = !(r = yield o.next()).done; n = !1) {
|
|
7368
7368
|
const i = r.value;
|
|
@@ -7382,7 +7382,7 @@ let PluginManager$1 = class {
|
|
|
7382
7382
|
});
|
|
7383
7383
|
}
|
|
7384
7384
|
initRemotePlugins() {
|
|
7385
|
-
return
|
|
7385
|
+
return z(this, null, function* () {
|
|
7386
7386
|
var r;
|
|
7387
7387
|
const t = yield this.app.apiClient.request({ url: "pm:listEnabled" }), o = ((r = t == null ? void 0 : t.data) == null ? void 0 : r.data) || [], n = yield getPlugins({
|
|
7388
7388
|
requirejs: this.app.requirejs,
|
|
@@ -7408,7 +7408,7 @@ let PluginManager$1 = class {
|
|
|
7408
7408
|
});
|
|
7409
7409
|
}
|
|
7410
7410
|
add(n) {
|
|
7411
|
-
return
|
|
7411
|
+
return z(this, arguments, function* (t, o = {}) {
|
|
7412
7412
|
const r = this.getInstance(t, o);
|
|
7413
7413
|
this.pluginInstances.set(t, r), o.name && (this.pluginsAliases[o.name] = r), o.packageName && (this.pluginsAliases[o.packageName] = r), yield r.afterAdd();
|
|
7414
7414
|
});
|
|
@@ -7423,7 +7423,7 @@ let PluginManager$1 = class {
|
|
|
7423
7423
|
* @internal
|
|
7424
7424
|
*/
|
|
7425
7425
|
load() {
|
|
7426
|
-
return
|
|
7426
|
+
return z(this, null, function* () {
|
|
7427
7427
|
yield this.initPlugins;
|
|
7428
7428
|
for (const t of this.pluginInstances.values())
|
|
7429
7429
|
yield t.beforeLoad();
|
|
@@ -7822,9 +7822,9 @@ class WebSocketClient {
|
|
|
7822
7822
|
for (const { type: n, listener: r, options: a } of this.events)
|
|
7823
7823
|
this._ws.addEventListener(n, r, a);
|
|
7824
7824
|
o = setInterval(() => this.send("ping"), this.pingInterval), this.connected = !0, this.emit("open", {});
|
|
7825
|
-
}, t.onerror = () =>
|
|
7825
|
+
}, t.onerror = () => z(this, null, function* () {
|
|
7826
7826
|
console.log("onerror", this.readyState, this._reconnectTimes);
|
|
7827
|
-
}), t.onclose = (n) =>
|
|
7827
|
+
}), t.onclose = (n) => z(this, null, function* () {
|
|
7828
7828
|
setTimeout(() => this.connect(), this.reconnectInterval), console.log("onclose", this.readyState, this._reconnectTimes, this.serverDown), this.connected = !1, clearInterval(o);
|
|
7829
7829
|
});
|
|
7830
7830
|
}
|
|
@@ -8129,7 +8129,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
8129
8129
|
const o = useLocationNoUpdate(), [n, r] = React.useState(!1), a = useAPIClient();
|
|
8130
8130
|
return {
|
|
8131
8131
|
loading: n,
|
|
8132
|
-
download: () =>
|
|
8132
|
+
download: () => z(void 0, null, function* () {
|
|
8133
8133
|
r(!0);
|
|
8134
8134
|
try {
|
|
8135
8135
|
const i = yield a.request({
|
|
@@ -8210,15 +8210,15 @@ class Plugin {
|
|
|
8210
8210
|
return this.app.dataSourceManager;
|
|
8211
8211
|
}
|
|
8212
8212
|
afterAdd() {
|
|
8213
|
-
return
|
|
8213
|
+
return z(this, null, function* () {
|
|
8214
8214
|
});
|
|
8215
8215
|
}
|
|
8216
8216
|
beforeLoad() {
|
|
8217
|
-
return
|
|
8217
|
+
return z(this, null, function* () {
|
|
8218
8218
|
});
|
|
8219
8219
|
}
|
|
8220
8220
|
load() {
|
|
8221
|
-
return
|
|
8221
|
+
return z(this, null, function* () {
|
|
8222
8222
|
});
|
|
8223
8223
|
}
|
|
8224
8224
|
t(t, o = {}) {
|
|
@@ -8385,7 +8385,7 @@ function addAppVersion(e, t) {
|
|
|
8385
8385
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
8386
8386
|
}), e;
|
|
8387
8387
|
}
|
|
8388
|
-
const name = "@nocobase/client", version = "1.7.
|
|
8388
|
+
const name = "@nocobase/client", version = "1.7.3", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8389
8389
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8390
8390
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8391
8391
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8406,9 +8406,9 @@ const name = "@nocobase/client", version = "1.7.2", license = "AGPL-3.0", main =
|
|
|
8406
8406
|
"@formily/reactive-react": "^2.2.27",
|
|
8407
8407
|
"@formily/shared": "^2.2.27",
|
|
8408
8408
|
"@formily/validator": "^2.2.27",
|
|
8409
|
-
"@nocobase/evaluators": "1.7.
|
|
8410
|
-
"@nocobase/sdk": "1.7.
|
|
8411
|
-
"@nocobase/utils": "1.7.
|
|
8409
|
+
"@nocobase/evaluators": "1.7.3",
|
|
8410
|
+
"@nocobase/sdk": "1.7.3",
|
|
8411
|
+
"@nocobase/utils": "1.7.3",
|
|
8412
8412
|
ahooks: "^3.7.2",
|
|
8413
8413
|
antd: "5.24.2",
|
|
8414
8414
|
"antd-style": "3.7.1",
|
|
@@ -8532,7 +8532,7 @@ class Designable {
|
|
|
8532
8532
|
});
|
|
8533
8533
|
}), r["x-uid"] && i.length ? i : [];
|
|
8534
8534
|
};
|
|
8535
|
-
this.on("insertAdjacent", (p) =>
|
|
8535
|
+
this.on("insertAdjacent", (p) => z(this, [p], function* ({ onSuccess: r, current: a, position: i, schema: l, wrap: c, wrapped: u, removed: d }) {
|
|
8536
8536
|
var g;
|
|
8537
8537
|
let m = [];
|
|
8538
8538
|
if ((u == null ? void 0 : u["x-component"]) === "Grid.Col" && (m = m.concat(n(u.parent))), (d == null ? void 0 : d["x-component"]) === "Grid.Col" && (m = m.concat(n(d.parent))), this.refresh(), !a["x-uid"])
|
|
@@ -8553,25 +8553,25 @@ class Designable {
|
|
|
8553
8553
|
url: `/uiSchemas:remove/${d["x-uid"]}`,
|
|
8554
8554
|
method: "post"
|
|
8555
8555
|
})), r == null || r((g = h == null ? void 0 : h.data) == null ? void 0 : g.data), message.success(o("Saved successfully"), 0.2);
|
|
8556
|
-
})), this.on("patch", (a) =>
|
|
8556
|
+
})), this.on("patch", (a) => z(this, [a], function* ({ schema: r }) {
|
|
8557
8557
|
this.refresh(), r != null && r["x-uid"] && (yield t.request({
|
|
8558
8558
|
url: "/uiSchemas:patch",
|
|
8559
8559
|
method: "post",
|
|
8560
8560
|
data: x({}, r)
|
|
8561
8561
|
}), message.success(o("Saved successfully"), 0.2));
|
|
8562
|
-
})), this.on("initializeActionContext", (a) =>
|
|
8562
|
+
})), this.on("initializeActionContext", (a) => z(this, [a], function* ({ schema: r }) {
|
|
8563
8563
|
r != null && r["x-uid"] && (yield t.request({
|
|
8564
8564
|
url: "/uiSchemas:initializeActionContext",
|
|
8565
8565
|
method: "post",
|
|
8566
8566
|
data: x({}, r)
|
|
8567
8567
|
}));
|
|
8568
|
-
})), this.on("batchPatch", (a) =>
|
|
8568
|
+
})), this.on("batchPatch", (a) => z(this, [a], function* ({ schemas: r }) {
|
|
8569
8569
|
this.refresh(), yield t.request({
|
|
8570
8570
|
url: "/uiSchemas:batchPatch",
|
|
8571
8571
|
method: "post",
|
|
8572
8572
|
data: r
|
|
8573
8573
|
}), message.success(o("Saved successfully"), 0.2);
|
|
8574
|
-
})), this.on("remove", (a) =>
|
|
8574
|
+
})), this.on("remove", (a) => z(this, [a], function* ({ removed: r }) {
|
|
8575
8575
|
let i = [];
|
|
8576
8576
|
(r == null ? void 0 : r["x-component"]) === "Grid.Col" && (i = n(r.parent)), this.refresh(), r != null && r["x-uid"] && (yield t.request({
|
|
8577
8577
|
url: `/uiSchemas:remove/${r["x-uid"]}`,
|
|
@@ -8590,7 +8590,7 @@ class Designable {
|
|
|
8590
8590
|
this.events[t] || (this.events[t] = []), this.events[t].push(o);
|
|
8591
8591
|
}
|
|
8592
8592
|
emit(t, ...o) {
|
|
8593
|
-
return
|
|
8593
|
+
return z(this, null, function* () {
|
|
8594
8594
|
if (!this.events[t])
|
|
8595
8595
|
return;
|
|
8596
8596
|
const [n, ...r] = o;
|
|
@@ -9056,7 +9056,7 @@ function useParsedFilter({ filterOption: e }) {
|
|
|
9056
9056
|
return useEffect(() => {
|
|
9057
9057
|
if (!e)
|
|
9058
9058
|
return;
|
|
9059
|
-
const l = () =>
|
|
9059
|
+
const l = () => z(this, null, function* () {
|
|
9060
9060
|
i(!0);
|
|
9061
9061
|
const u = yield t(e);
|
|
9062
9062
|
i(!1), r(u);
|
|
@@ -9158,20 +9158,20 @@ const LinkageRuleDataKeyMap = {
|
|
|
9158
9158
|
default:
|
|
9159
9159
|
return null;
|
|
9160
9160
|
}
|
|
9161
|
-
}, getSatisfiedActions = (r, a) =>
|
|
9161
|
+
}, getSatisfiedActions = (r, a) => z(void 0, [r, a], function* ({ rules: e, variables: t, localVariables: o }, n) {
|
|
9162
9162
|
return (yield Promise.all(
|
|
9163
|
-
e.filter((l) => !l.disabled).map((l) =>
|
|
9163
|
+
e.filter((l) => !l.disabled).map((l) => z(void 0, null, function* () {
|
|
9164
9164
|
return (yield conditionAnalyses(
|
|
9165
9165
|
{ ruleGroup: l.condition, variables: t, localVariables: o, conditionType: l.conditionType },
|
|
9166
9166
|
n
|
|
9167
9167
|
)) ? l : null;
|
|
9168
9168
|
}))
|
|
9169
9169
|
)).filter(Boolean).map((l) => l.actions).flat();
|
|
9170
|
-
}), getSatisfiedValues = (r, a) =>
|
|
9170
|
+
}), getSatisfiedValues = (r, a) => z(void 0, [r, a], function* ({ rules: e, variables: t, localVariables: o }, n) {
|
|
9171
9171
|
return (yield getSatisfiedActions({ rules: e, variables: t, localVariables: o }, n)).map((i) => P(x({}, i), {
|
|
9172
9172
|
value: getActionValue(i.operator, i.value)
|
|
9173
9173
|
}));
|
|
9174
|
-
}), getSatisfiedValueMap = (r, a) =>
|
|
9174
|
+
}), getSatisfiedValueMap = (r, a) => z(void 0, [r, a], function* ({ rules: e, variables: t, localVariables: o }, n) {
|
|
9175
9175
|
return (yield getSatisfiedValues({ rules: e, variables: t, localVariables: o }, n)).reduce((c, u) => P(x({}, c), { [u.operator]: u.value }), {});
|
|
9176
9176
|
});
|
|
9177
9177
|
function useSatisfiedActionValues({
|
|
@@ -9972,7 +9972,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
9972
9972
|
"onClickRow",
|
|
9973
9973
|
"value"
|
|
9974
9974
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((be = v == null ? void 0 : v.parent) == null ? void 0 : be["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexÏColumn: N } = R, $ = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
9975
|
-
})), L = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k, M] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [
|
|
9975
|
+
})), L = usePaginationProps$3(o, a, e), w = useTableColumns$2(S, L), [O, j] = useState(() => D ? B : []), [k, M] = useState(((Se = y == null ? void 0 : y.data) == null ? void 0 : Se.selectedRowKeys) || []), [q, E] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), U = useMemo(() => css`
|
|
9976
9976
|
& > td {
|
|
9977
9977
|
background-color: ${t.controlItemBgActive} !important;
|
|
9978
9978
|
}
|
|
@@ -9988,14 +9988,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
9988
9988
|
}, [H == null ? void 0 : H.field]);
|
|
9989
9989
|
const Y = useMemo(() => C ? U : "", [U, C]), J = useMemo(() => C ? (Z, ne) => ({
|
|
9990
9990
|
onClick: (re) => {
|
|
9991
|
-
isPortalInBody(re.target) || C(Z,
|
|
9991
|
+
isPortalInBody(re.target) || C(Z, E, q);
|
|
9992
9992
|
},
|
|
9993
9993
|
rowIndex: ne,
|
|
9994
9994
|
record: Z
|
|
9995
9995
|
}) : (Z, ne) => ({
|
|
9996
9996
|
rowIndex: ne,
|
|
9997
9997
|
record: Z
|
|
9998
|
-
}), [C,
|
|
9998
|
+
}), [C, q]);
|
|
9999
9999
|
useDeepCompareEffect(() => {
|
|
10000
10000
|
const Z = D ? B : [];
|
|
10001
10001
|
_.isEqual(Z, O) || j(Z);
|
|
@@ -10068,14 +10068,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10068
10068
|
role: "button",
|
|
10069
10069
|
"aria-label": `table-index-${re}`,
|
|
10070
10070
|
className: cls(Z ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10071
|
-
[rowSelectCheckboxWrapperClassHover$1]:
|
|
10071
|
+
[rowSelectCheckboxWrapperClassHover$1]: V
|
|
10072
10072
|
}),
|
|
10073
10073
|
children: [
|
|
10074
10074
|
/* @__PURE__ */ jsxs("div", { className: cls(Z ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10075
10075
|
l && /* @__PURE__ */ jsx(SortHandle$2, { id: X(ne) }),
|
|
10076
10076
|
c && /* @__PURE__ */ jsx(TableIndex$3, { index: re })
|
|
10077
10077
|
] }),
|
|
10078
|
-
|
|
10078
|
+
V && /* @__PURE__ */ jsx(
|
|
10079
10079
|
"div",
|
|
10080
10080
|
{
|
|
10081
10081
|
className: cls(
|
|
@@ -10100,7 +10100,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10100
10100
|
l,
|
|
10101
10101
|
y,
|
|
10102
10102
|
X,
|
|
10103
|
-
|
|
10103
|
+
V,
|
|
10104
10104
|
te,
|
|
10105
10105
|
L,
|
|
10106
10106
|
H,
|
|
@@ -10123,8 +10123,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10123
10123
|
x: "max-content",
|
|
10124
10124
|
y: ue
|
|
10125
10125
|
}), [ue, Q]), pe = useCallback(
|
|
10126
|
-
(Z) =>
|
|
10127
|
-
[
|
|
10126
|
+
(Z) => q.includes(Z[m]) ? Y : "",
|
|
10127
|
+
[q, Y, JSON.stringify(m)]
|
|
10128
10128
|
), me = useCallback(
|
|
10129
10129
|
(Z, ne) => {
|
|
10130
10130
|
const re = Z ? [...O, ne[I.getPrimaryKey()]] : O.filter((ae) => ne[I.getPrimaryKey()] !== ae);
|
|
@@ -10373,10 +10373,10 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10373
10373
|
[t, p]
|
|
10374
10374
|
), v = useCallback(
|
|
10375
10375
|
(w, O = !1, j) => {
|
|
10376
|
-
var
|
|
10376
|
+
var q;
|
|
10377
10377
|
if (!w)
|
|
10378
10378
|
return [];
|
|
10379
|
-
const k = (
|
|
10379
|
+
const k = (q = p(j)) == null ? void 0 : q.getCollection(w);
|
|
10380
10380
|
return (k == null ? void 0 : k.getChildrenCollections(O)) || [];
|
|
10381
10381
|
},
|
|
10382
10382
|
[t, p]
|
|
@@ -10391,19 +10391,19 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10391
10391
|
var Q;
|
|
10392
10392
|
const {
|
|
10393
10393
|
association: M = !1,
|
|
10394
|
-
cached:
|
|
10395
|
-
collectionNames:
|
|
10396
|
-
maxDepth:
|
|
10394
|
+
cached: q = {},
|
|
10395
|
+
collectionNames: E = [w],
|
|
10396
|
+
maxDepth: V = 1,
|
|
10397
10397
|
allowAllTypes: G = !1,
|
|
10398
10398
|
exceptInterfaces: U = [],
|
|
10399
10399
|
prefixFieldValue: H = "",
|
|
10400
10400
|
usePrefix: Y = !1,
|
|
10401
10401
|
dataSource: J
|
|
10402
10402
|
} = k || {};
|
|
10403
|
-
if (
|
|
10403
|
+
if (E.length - 1 > V)
|
|
10404
10404
|
return;
|
|
10405
|
-
if (
|
|
10406
|
-
return _.cloneDeep(
|
|
10405
|
+
if (q[w])
|
|
10406
|
+
return _.cloneDeep(q[w]);
|
|
10407
10407
|
O && typeof O == "string" && (O = [O]), j && typeof j == "string" && (j = [j]);
|
|
10408
10408
|
const K = b(w, J), X = (Q = K == null ? void 0 : K.filter(
|
|
10409
10409
|
(ee) => ee.interface && !U.includes(ee.interface) && (G || O && O.includes(ee.type) || j && j.includes(ee.interface) || (M && ee.target && ee.target !== w && Array.isArray(M) ? M.includes(ee.interface) : !1))
|
|
@@ -10413,15 +10413,15 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10413
10413
|
value: Y && H ? `${H}.${ee.name}` : ee.name,
|
|
10414
10414
|
label: f((te = ee == null ? void 0 : ee.uiSchema) == null ? void 0 : te.title) || ee.name
|
|
10415
10415
|
}, ee);
|
|
10416
|
-
return M && ee.target && (oe.children =
|
|
10417
|
-
cached:
|
|
10416
|
+
return M && ee.target && (oe.children = E.includes(ee.target) ? [] : I(ee.target, O, j, P(x({}, k), {
|
|
10417
|
+
cached: q,
|
|
10418
10418
|
dataSource: J,
|
|
10419
|
-
collectionNames: [...
|
|
10419
|
+
collectionNames: [...E, ee.target],
|
|
10420
10420
|
prefixFieldValue: Y ? H ? `${H}.${ee.name}` : ee.name : "",
|
|
10421
10421
|
usePrefix: Y
|
|
10422
10422
|
})), !((se = oe.children) != null && se.length)) ? null : oe;
|
|
10423
10423
|
}).filter(Boolean);
|
|
10424
|
-
return
|
|
10424
|
+
return q[w] = X, X;
|
|
10425
10425
|
},
|
|
10426
10426
|
[b]
|
|
10427
10427
|
), T = useCallback(
|
|
@@ -10691,14 +10691,14 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10691
10691
|
recordData: j,
|
|
10692
10692
|
sourceId: k,
|
|
10693
10693
|
collection: M,
|
|
10694
|
-
puid:
|
|
10694
|
+
puid: q
|
|
10695
10695
|
}) => {
|
|
10696
|
-
const
|
|
10696
|
+
const E = c.getFilterByTK(u || l, j);
|
|
10697
10697
|
return getPopupPathFromParams({
|
|
10698
10698
|
popupuid: O,
|
|
10699
|
-
puid:
|
|
10699
|
+
puid: q,
|
|
10700
10700
|
collection: M,
|
|
10701
|
-
filterbytk:
|
|
10701
|
+
filterbytk: E,
|
|
10702
10702
|
sourceid: k,
|
|
10703
10703
|
tab: w
|
|
10704
10704
|
});
|
|
@@ -10721,27 +10721,27 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10721
10721
|
} = {}) => {
|
|
10722
10722
|
if (!f())
|
|
10723
10723
|
return I == null ? void 0 : I(!0);
|
|
10724
|
-
const
|
|
10724
|
+
const q = M || n, E = q == null ? void 0 : q["x-uid"], V = y(O);
|
|
10725
10725
|
w = w || (a == null ? void 0 : a.data);
|
|
10726
10726
|
const G = T({
|
|
10727
|
-
popupUid:
|
|
10727
|
+
popupUid: E,
|
|
10728
10728
|
recordData: w,
|
|
10729
|
-
sourceId:
|
|
10729
|
+
sourceId: V,
|
|
10730
10730
|
collection: j,
|
|
10731
10731
|
puid: k
|
|
10732
10732
|
});
|
|
10733
10733
|
let U = o.pathname;
|
|
10734
|
-
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(
|
|
10735
|
-
schema:
|
|
10734
|
+
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(E, {
|
|
10735
|
+
schema: q,
|
|
10736
10736
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
10737
10737
|
parentRecord: O ? new CollectionRecord({ isNew: !1, data: O }) : i,
|
|
10738
10738
|
service: g(),
|
|
10739
10739
|
dataSource: r,
|
|
10740
10740
|
collection: l == null ? void 0 : l.name,
|
|
10741
10741
|
association: u,
|
|
10742
|
-
sourceId:
|
|
10742
|
+
sourceId: V,
|
|
10743
10743
|
tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
10744
|
-
}), b(R(), M),
|
|
10744
|
+
}), b(R(), M), q.properties) {
|
|
10745
10745
|
const H = h + 1;
|
|
10746
10746
|
if (getPopupLayerState(H))
|
|
10747
10747
|
return;
|
|
@@ -10749,7 +10749,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10749
10749
|
} else
|
|
10750
10750
|
console.error(
|
|
10751
10751
|
`[NocoBase] The popup schema is invalid, please check the schema:
|
|
10752
|
-
${JSON.stringify(
|
|
10752
|
+
${JSON.stringify(q, null, 2)}`
|
|
10753
10753
|
);
|
|
10754
10754
|
},
|
|
10755
10755
|
[
|
|
@@ -10860,7 +10860,7 @@ const ActionContextProvider = React.memo(
|
|
|
10860
10860
|
(e) => {
|
|
10861
10861
|
const [t, o] = useState(!1), { visible: n } = x(x({}, e), e.value), { setSubmitted: r } = x(x({}, e), e.value), a = useBlockServiceInActionButton(), { isSubPageClosedByPageMenu: i, reset: l } = useIsSubPageClosedByPageMenu(useFieldSchema());
|
|
10862
10862
|
useEffect(() => {
|
|
10863
|
-
|
|
10863
|
+
z(void 0, null, function* () {
|
|
10864
10864
|
n === !1 && a && !a.loading && (t || i()) && (l(), a.loading = !0, yield a.refreshAsync(), a.loading = !1, o(!1), r == null || r(!0));
|
|
10865
10865
|
});
|
|
10866
10866
|
}, [n, a, r, i, t, l]);
|
|
@@ -10915,7 +10915,7 @@ function FormDialog(e, t, o, n) {
|
|
|
10915
10915
|
var b;
|
|
10916
10916
|
((b = l == null ? void 0 : l.onCancel) == null ? void 0 : b.call(l, C)) !== !1 && (h == null || h());
|
|
10917
10917
|
},
|
|
10918
|
-
onOk: (C) =>
|
|
10918
|
+
onOk: (C) => z(this, null, function* () {
|
|
10919
10919
|
var b;
|
|
10920
10920
|
((b = l == null ? void 0 : l.onOk) == null ? void 0 : b.call(l, C)) !== !1 && (m == null || m());
|
|
10921
10921
|
}),
|
|
@@ -10929,8 +10929,8 @@ function FormDialog(e, t, o, n) {
|
|
|
10929
10929
|
forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
|
|
10930
10930
|
forConfirm: (p) => (isFn(p) && r.confirmMiddlewares.push(p), d),
|
|
10931
10931
|
forCancel: (p) => (isFn(p) && r.cancelMiddlewares.push(p), d),
|
|
10932
|
-
open: (p) =>
|
|
10933
|
-
return r.promise || (r.promise = new Promise((m, h) =>
|
|
10932
|
+
open: (p) => z(this, null, function* () {
|
|
10933
|
+
return r.promise || (r.promise = new Promise((m, h) => z(this, null, function* () {
|
|
10934
10934
|
try {
|
|
10935
10935
|
p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
|
|
10936
10936
|
} catch (g) {
|
|
@@ -10941,7 +10941,7 @@ function FormDialog(e, t, o, n) {
|
|
|
10941
10941
|
!0,
|
|
10942
10942
|
() => {
|
|
10943
10943
|
var g;
|
|
10944
|
-
(g = r.form) == null || g.submit(() =>
|
|
10944
|
+
(g = r.form) == null || g.submit(() => z(this, null, function* () {
|
|
10945
10945
|
yield applyMiddleware(r.form, r.confirmMiddlewares), untracked(() => {
|
|
10946
10946
|
var f;
|
|
10947
10947
|
m(x({}, (f = r.form) == null ? void 0 : f.values));
|
|
@@ -10949,7 +10949,7 @@ function FormDialog(e, t, o, n) {
|
|
|
10949
10949
|
})).catch(() => {
|
|
10950
10950
|
});
|
|
10951
10951
|
},
|
|
10952
|
-
() =>
|
|
10952
|
+
() => z(this, null, function* () {
|
|
10953
10953
|
yield loading(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
|
|
10954
10954
|
})
|
|
10955
10955
|
)
|
|
@@ -11041,7 +11041,7 @@ const options$2 = {
|
|
|
11041
11041
|
const t = useAPIClient(), o = useIsAdminPage(), n = t.auth.getToken() || "", r = useRequest(options$2, {
|
|
11042
11042
|
refreshDeps: [o, n],
|
|
11043
11043
|
ready: !!(o && n)
|
|
11044
|
-
}), a = useCallback(() =>
|
|
11044
|
+
}), a = useCallback(() => z(void 0, null, function* () {
|
|
11045
11045
|
const { data: c } = yield t.request(options$2);
|
|
11046
11046
|
return r.mutate(c), (c == null ? void 0 : c.data) || [];
|
|
11047
11047
|
}), [r]), i = useMemo(() => {
|
|
@@ -11193,7 +11193,7 @@ const useSelectedRowKeys = () => {
|
|
|
11193
11193
|
const e = useContext(DataSourceContext_deprecated), t = useForm(), { setVisible: o } = useActionContext();
|
|
11194
11194
|
return {
|
|
11195
11195
|
run() {
|
|
11196
|
-
return
|
|
11196
|
+
return z(this, null, function* () {
|
|
11197
11197
|
console.log("form.values", t.values);
|
|
11198
11198
|
const r = e.dataSource || [];
|
|
11199
11199
|
r.push(cloneDeep$1(t.values)), e.setDataSource([...r]), o(!1), yield t.reset();
|
|
@@ -11204,7 +11204,7 @@ const useSelectedRowKeys = () => {
|
|
|
11204
11204
|
const e = useContext(DataSourceContext_deprecated), { selectedRowKeys: t, setSelectedRowKeys: o } = e;
|
|
11205
11205
|
return {
|
|
11206
11206
|
run() {
|
|
11207
|
-
return
|
|
11207
|
+
return z(this, null, function* () {
|
|
11208
11208
|
const r = e.dataSource || [];
|
|
11209
11209
|
e.setDataSource(
|
|
11210
11210
|
r.filter((a, i) => !t.includes(i))
|
|
@@ -11216,7 +11216,7 @@ const useSelectedRowKeys = () => {
|
|
|
11216
11216
|
const e = useRecordIndex(), t = useForm(), { setVisible: o } = useActionContext(), n = useContext(DataSourceContext_deprecated);
|
|
11217
11217
|
return {
|
|
11218
11218
|
run() {
|
|
11219
|
-
return
|
|
11219
|
+
return z(this, null, function* () {
|
|
11220
11220
|
const i = ((n == null ? void 0 : n.dataSource) || []).map((l, c) => c === e ? x({}, t.values) : l);
|
|
11221
11221
|
n.setDataSource([...i]), o(!1);
|
|
11222
11222
|
});
|
|
@@ -11226,7 +11226,7 @@ const useSelectedRowKeys = () => {
|
|
|
11226
11226
|
const e = useRecordIndex(), t = useContext(DataSourceContext_deprecated);
|
|
11227
11227
|
return {
|
|
11228
11228
|
run() {
|
|
11229
|
-
return
|
|
11229
|
+
return z(this, null, function* () {
|
|
11230
11230
|
const n = t.dataSource || [];
|
|
11231
11231
|
t.setDataSource(
|
|
11232
11232
|
n.filter((r, a) => e !== a)
|
|
@@ -11970,7 +11970,7 @@ function getSubscriber({
|
|
|
11970
11970
|
conditionType: o.conditionType
|
|
11971
11971
|
},
|
|
11972
11972
|
i
|
|
11973
|
-
), setTimeout(() =>
|
|
11973
|
+
), setTimeout(() => z(this, null, function* () {
|
|
11974
11974
|
var d, p, m, h, g, f, C, b;
|
|
11975
11975
|
const l = getFieldNameByOperator(e.operator);
|
|
11976
11976
|
if (!((d = t.stateOfLinkageRules) != null && d[l]))
|
|
@@ -12084,19 +12084,19 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
12084
12084
|
break;
|
|
12085
12085
|
case ActionType.Value:
|
|
12086
12086
|
{
|
|
12087
|
-
const j = () =>
|
|
12087
|
+
const j = () => z(void 0, null, function* () {
|
|
12088
12088
|
var k;
|
|
12089
12089
|
if ((t == null ? void 0 : t.mode) === "express") {
|
|
12090
12090
|
if ((t.value || t.result) == null)
|
|
12091
12091
|
return;
|
|
12092
|
-
const { exp: M, scope:
|
|
12092
|
+
const { exp: M, scope: q } = yield replaceVariables(t.value || t.result, {
|
|
12093
12093
|
variables: r,
|
|
12094
12094
|
localVariables: a
|
|
12095
12095
|
});
|
|
12096
12096
|
try {
|
|
12097
|
-
return f(M, x({ now: () => (/* @__PURE__ */ new Date()).toString() },
|
|
12098
|
-
} catch (
|
|
12099
|
-
console.error(
|
|
12097
|
+
return f(M, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, q));
|
|
12098
|
+
} catch (E) {
|
|
12099
|
+
console.error(E);
|
|
12100
12100
|
}
|
|
12101
12101
|
} else
|
|
12102
12102
|
return (t == null ? void 0 : t.mode) === "constant" ? (k = t == null ? void 0 : t.value) != null ? k : t : null;
|
|
@@ -12130,7 +12130,7 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
12130
12130
|
}
|
|
12131
12131
|
};
|
|
12132
12132
|
function getTempFieldState(e, t) {
|
|
12133
|
-
return
|
|
12133
|
+
return z(this, null, function* () {
|
|
12134
12134
|
return [e, t] = yield Promise.all([e, t]), {
|
|
12135
12135
|
condition: e,
|
|
12136
12136
|
value: t
|
|
@@ -12142,7 +12142,7 @@ function isConditionEmpty(e) {
|
|
|
12142
12142
|
return _.isEmpty(o);
|
|
12143
12143
|
}
|
|
12144
12144
|
function replaceVariables(n, r) {
|
|
12145
|
-
return
|
|
12145
|
+
return z(this, arguments, function* (e, {
|
|
12146
12146
|
variables: t,
|
|
12147
12147
|
localVariables: o
|
|
12148
12148
|
}) {
|
|
@@ -12150,7 +12150,7 @@ function replaceVariables(n, r) {
|
|
|
12150
12150
|
const a = {}, i = {};
|
|
12151
12151
|
if (e == null)
|
|
12152
12152
|
return;
|
|
12153
|
-
const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) =>
|
|
12153
|
+
const l = (c = e.match(REGEX_OF_VARIABLE_IN_EXPRESSION)) == null ? void 0 : c.map((u) => z(this, null, function* () {
|
|
12154
12154
|
const { value: d } = yield t.parseVariable(u, o, {
|
|
12155
12155
|
doNotRequest: u.includes("$nForm") || u.includes("$iteration")
|
|
12156
12156
|
}), p = `_${uid$1()}`;
|
|
@@ -12639,7 +12639,7 @@ const CurrentRecordContext = createContext(null), CurrentRecordContextProvider =
|
|
|
12639
12639
|
/** 当前记录对应的 collection name */
|
|
12640
12640
|
collectionName: r
|
|
12641
12641
|
};
|
|
12642
|
-
}, getVariableValue = (e, t) =>
|
|
12642
|
+
}, getVariableValue = (e, t) => z(void 0, null, function* () {
|
|
12643
12643
|
if (!e)
|
|
12644
12644
|
return e;
|
|
12645
12645
|
const { evaluate: o } = evaluators.get("string"), { exp: n, scope: r } = yield replaceVariables(e, t);
|
|
@@ -12903,7 +12903,7 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
|
|
|
12903
12903
|
}), () => {
|
|
12904
12904
|
u.current();
|
|
12905
12905
|
}), [e._maxDate, e._minDate, r, n]);
|
|
12906
|
-
const d = () =>
|
|
12906
|
+
const d = () => z(void 0, null, function* () {
|
|
12907
12907
|
let m = e._minDate ? Promise.resolve(dayjs(e._minDate)) : Promise.resolve(null), h = e._maxDate ? Promise.resolve(dayjs(e._maxDate)) : Promise.resolve(null);
|
|
12908
12908
|
isVariable$1(e._maxDate) && (h = n(e._maxDate, r).then((y) => dayjs(Array.isArray(y.value) ? last(y.value) : y.value))), isVariable$1(e._minDate) && (m = n(e._minDate, r).then((y) => dayjs(Array.isArray(y.value) ? first(y.value) : y.value)));
|
|
12909
12909
|
const [g, f] = yield Promise.all([m, h]), C = Array.from({ length: 60 }, (y, v) => v), b = (y) => {
|
|
@@ -13751,7 +13751,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13751
13751
|
key: t,
|
|
13752
13752
|
isLeaf: !1,
|
|
13753
13753
|
disabled: i,
|
|
13754
|
-
loadChildren: (c, u) =>
|
|
13754
|
+
loadChildren: (c, u) => z(void 0, null, function* () {
|
|
13755
13755
|
const d = u ? {
|
|
13756
13756
|
[u]: void 0
|
|
13757
13757
|
} : {};
|
|
@@ -13909,7 +13909,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13909
13909
|
(L, w) => {
|
|
13910
13910
|
if (!u)
|
|
13911
13911
|
return o(L, w);
|
|
13912
|
-
setTimeout(() =>
|
|
13912
|
+
setTimeout(() => z(void 0, null, function* () {
|
|
13913
13913
|
(yield u(L, w)) && o(L, w);
|
|
13914
13914
|
}));
|
|
13915
13915
|
},
|
|
@@ -13941,7 +13941,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
13941
13941
|
variables: t,
|
|
13942
13942
|
localVariables: o,
|
|
13943
13943
|
getAllCollectionsInheritChain: n
|
|
13944
|
-
}) => (e && n(e.target), (r, a) =>
|
|
13944
|
+
}) => (e && n(e.target), (r, a) => z(void 0, null, function* () {
|
|
13945
13945
|
return !0;
|
|
13946
13946
|
}));
|
|
13947
13947
|
function useCompatOldVariables(e) {
|
|
@@ -14252,7 +14252,7 @@ const getActionContext = (e) => {
|
|
|
14252
14252
|
var o;
|
|
14253
14253
|
return ((o = e.fieldSchema) == null ? void 0 : o["x-action-context"]) || {};
|
|
14254
14254
|
}, SchemaSettingsDefaultValue = function(t) {
|
|
14255
|
-
var k, M,
|
|
14255
|
+
var k, M, q;
|
|
14256
14256
|
const o = useFieldSchema(), n = (k = t == null ? void 0 : t.fieldSchema) != null ? k : o, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
14257
14257
|
let u;
|
|
14258
14258
|
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, T = useMemo(
|
|
@@ -14260,21 +14260,21 @@ const getActionContext = (e) => {
|
|
|
14260
14260
|
[n, p, d]
|
|
14261
14261
|
), R = _.omit(n, "required");
|
|
14262
14262
|
T != null && T.target && (u = p(
|
|
14263
|
-
`${T.target}.${((
|
|
14263
|
+
`${T.target}.${((q = (M = n["x-component-props"]) == null ? void 0 : M.fieldNames) == null ? void 0 : q.label) || "id"}`
|
|
14264
14264
|
));
|
|
14265
14265
|
const D = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(n), B = D && p(D == null ? void 0 : D["x-collection-field"]), N = useTableBlockContext(), $ = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (B == null ? void 0 : B.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", L = useCallback(
|
|
14266
|
-
(
|
|
14267
|
-
const
|
|
14268
|
-
return !(G != null && G.length) &&
|
|
14266
|
+
(E) => {
|
|
14267
|
+
const V = E.find((U) => U.value === "$nForm"), G = m(I);
|
|
14268
|
+
return !(G != null && G.length) && V && (V.children = formatVariableScop(y())), E;
|
|
14269
14269
|
},
|
|
14270
14270
|
[y, I]
|
|
14271
14271
|
), w = useMemo(() => ({
|
|
14272
14272
|
ArrayCollapse: ArrayCollapse$2,
|
|
14273
14273
|
FormLayout,
|
|
14274
|
-
VariableInput: (
|
|
14274
|
+
VariableInput: (E) => /* @__PURE__ */ jsx(
|
|
14275
14275
|
VariableInput,
|
|
14276
|
-
P(x({},
|
|
14277
|
-
value:
|
|
14276
|
+
P(x({}, E), {
|
|
14277
|
+
value: E.value || void 0,
|
|
14278
14278
|
hideVariableButton: t == null ? void 0 : t.hideVariableButton
|
|
14279
14279
|
})
|
|
14280
14280
|
)
|
|
@@ -14300,7 +14300,7 @@ const getActionContext = (e) => {
|
|
|
14300
14300
|
localVariables: f,
|
|
14301
14301
|
getAllCollectionsInheritChain: h
|
|
14302
14302
|
}),
|
|
14303
|
-
renderSchemaComponent: function(
|
|
14303
|
+
renderSchemaComponent: function(V) {
|
|
14304
14304
|
const G = useMemo(() => _.cloneDeep(R) || {}, []);
|
|
14305
14305
|
G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
|
|
14306
14306
|
const U = getFieldDefaultValue(G, T);
|
|
@@ -14322,7 +14322,7 @@ const getActionContext = (e) => {
|
|
|
14322
14322
|
}),
|
|
14323
14323
|
[G, U]
|
|
14324
14324
|
);
|
|
14325
|
-
return _.set(H, "x-component-props.onChange",
|
|
14325
|
+
return _.set(H, "x-component-props.onChange", V.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: H }) });
|
|
14326
14326
|
}
|
|
14327
14327
|
}),
|
|
14328
14328
|
title: i("Default value"),
|
|
@@ -14344,13 +14344,13 @@ const getActionContext = (e) => {
|
|
|
14344
14344
|
u,
|
|
14345
14345
|
g
|
|
14346
14346
|
]), j = useCallback(
|
|
14347
|
-
(
|
|
14347
|
+
(E) => {
|
|
14348
14348
|
var G, U, H;
|
|
14349
|
-
const
|
|
14349
|
+
const V = {
|
|
14350
14350
|
"x-uid": n["x-uid"]
|
|
14351
14351
|
};
|
|
14352
|
-
n.default = (G =
|
|
14353
|
-
schema:
|
|
14352
|
+
n.default = (G = E.default) != null ? G : null, isVariable$1(E.default) || (U = r.setInitialValue) == null || U.call(r, E.default), V.default = (H = E.default) != null ? H : null, a.emit("patch", {
|
|
14353
|
+
schema: V,
|
|
14354
14354
|
currentSchema: o
|
|
14355
14355
|
});
|
|
14356
14356
|
},
|
|
@@ -14364,14 +14364,14 @@ const getActionContext = (e) => {
|
|
|
14364
14364
|
width: 800,
|
|
14365
14365
|
schema: O,
|
|
14366
14366
|
onSubmit: j,
|
|
14367
|
-
ModalContextProvider: (
|
|
14367
|
+
ModalContextProvider: (E) => /* @__PURE__ */ jsx(
|
|
14368
14368
|
FlagProvider,
|
|
14369
14369
|
{
|
|
14370
14370
|
isInSubForm: v,
|
|
14371
14371
|
isInSubTable: F,
|
|
14372
14372
|
isInSetDefaultValueDialog: !0,
|
|
14373
14373
|
collectionField: T,
|
|
14374
|
-
children:
|
|
14374
|
+
children: E.children
|
|
14375
14375
|
}
|
|
14376
14376
|
)
|
|
14377
14377
|
}
|
|
@@ -14755,7 +14755,7 @@ const SaveConditions = () => {
|
|
|
14755
14755
|
/* @__PURE__ */ jsx(
|
|
14756
14756
|
Button,
|
|
14757
14757
|
{
|
|
14758
|
-
onClick: () =>
|
|
14758
|
+
onClick: () => z(void 0, null, function* () {
|
|
14759
14759
|
yield e.reset(), r == null || r(e.values), o.title = l(n.title) || c("Filter"), a(!1);
|
|
14760
14760
|
}),
|
|
14761
14761
|
children: c("Reset")
|
|
@@ -14866,7 +14866,7 @@ const DynamicComponent$2 = (e) => {
|
|
|
14866
14866
|
d(R);
|
|
14867
14867
|
},
|
|
14868
14868
|
[d]
|
|
14869
|
-
), F = useMemo(() => ({ color: "#bfbfbf" }), []), I = (R) =>
|
|
14869
|
+
), F = useMemo(() => ({ color: "#bfbfbf" }), []), I = (R) => z(void 0, null, function* () {
|
|
14870
14870
|
if (R) {
|
|
14871
14871
|
const D = o(g).filter((B) => B[S.label].toLowerCase().includes(R.toLowerCase()));
|
|
14872
14872
|
C(D);
|
|
@@ -15230,7 +15230,7 @@ const useGetFilterOptions = () => {
|
|
|
15230
15230
|
};
|
|
15231
15231
|
});
|
|
15232
15232
|
}, TableColumnDesigner$1 = (e) => {
|
|
15233
|
-
var N, $, L, w, O, j, k, M, E, V,
|
|
15233
|
+
var N, $, L, w, O, j, k, M, q, E, V, G;
|
|
15234
15234
|
const { uiSchema: t, fieldSchema: o, collectionField: n } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : N.fieldNames) || (($ = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : $.fieldNames), m = useLabelFields$1((L = n == null ? void 0 : n.target) != null ? L : n == null ? void 0 : n.targetCollection), h = useColorFields((w = n == null ? void 0 : n.target) != null ? w : n == null ? void 0 : n.targetCollection), g = a(n == null ? void 0 : n.interface), f = i(n == null ? void 0 : n.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(o["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: n, fieldSchema: o }), v = ["datetime", "createdAt", "updatedAt"].includes(n == null ? void 0 : n.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
15235
15235
|
n == null ? void 0 : n.interface
|
|
15236
15236
|
), I = useFieldModeOptions({ fieldSchema: o }), T = ((O = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : O.mode) || "Select";
|
|
@@ -15273,7 +15273,7 @@ const useGetFilterOptions = () => {
|
|
|
15273
15273
|
SchemaSettingsDataScope,
|
|
15274
15274
|
{
|
|
15275
15275
|
collectionName: n == null ? void 0 : n.target,
|
|
15276
|
-
defaultFilter: ((
|
|
15276
|
+
defaultFilter: ((q = (M = (k = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : M.params) == null ? void 0 : q.filter) || {},
|
|
15277
15277
|
form: r,
|
|
15278
15278
|
onSubmit: ({ filter: U }) => {
|
|
15279
15279
|
var Y, J;
|
|
@@ -15299,7 +15299,7 @@ const useGetFilterOptions = () => {
|
|
|
15299
15299
|
title: c("Column width"),
|
|
15300
15300
|
properties: {
|
|
15301
15301
|
width: {
|
|
15302
|
-
default: ((
|
|
15302
|
+
default: ((E = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : E.width) || 100,
|
|
15303
15303
|
"x-decorator": "FormItem",
|
|
15304
15304
|
"x-component": "InputNumber",
|
|
15305
15305
|
"x-component-props": {}
|
|
@@ -15342,7 +15342,7 @@ const useGetFilterOptions = () => {
|
|
|
15342
15342
|
SchemaSettingsSwitchItem,
|
|
15343
15343
|
{
|
|
15344
15344
|
title: c("Enable link"),
|
|
15345
|
-
checked: ((
|
|
15345
|
+
checked: ((V = o["x-component-props"]) == null ? void 0 : V.enableLink) !== !1,
|
|
15346
15346
|
onChange: (U) => {
|
|
15347
15347
|
o["x-component-props"] = P(x({}, o == null ? void 0 : o["x-component-props"]), {
|
|
15348
15348
|
enableLink: U
|
|
@@ -17894,7 +17894,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17894
17894
|
), { render: O, exists: j } = useSchemaInitializerRender(
|
|
17895
17895
|
n || (t == null ? void 0 : t["x-initializer"]),
|
|
17896
17896
|
t == null ? void 0 : t["x-initializer-props"]
|
|
17897
|
-
), k = useGridRowContext(), M = useGridContext(),
|
|
17897
|
+
), k = useGridRowContext(), M = useGridContext(), q = useMemo(() => {
|
|
17898
17898
|
var K;
|
|
17899
17899
|
return {
|
|
17900
17900
|
insertPosition: "afterEnd",
|
|
@@ -17908,15 +17908,15 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17908
17908
|
})
|
|
17909
17909
|
)
|
|
17910
17910
|
};
|
|
17911
|
-
}, [v, (J = k == null ? void 0 : k.cols) == null ? void 0 : J.length]),
|
|
17911
|
+
}, [v, (J = k == null ? void 0 : k.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]), V = useMemo(() => {
|
|
17912
17912
|
var K;
|
|
17913
17913
|
if (n === !1)
|
|
17914
17914
|
return null;
|
|
17915
17915
|
if (j)
|
|
17916
|
-
return O(
|
|
17916
|
+
return O(q);
|
|
17917
17917
|
if (M != null && M.InitializerComponent || M != null && M.renderSchemaInitializer)
|
|
17918
|
-
return M != null && M.InitializerComponent ? /* @__PURE__ */ jsx(M.InitializerComponent, x({},
|
|
17919
|
-
}, [M, n,
|
|
17918
|
+
return M != null && M.InitializerComponent ? /* @__PURE__ */ jsx(M.InitializerComponent, x({}, q)) : (K = M.renderSchemaInitializer) == null ? void 0 : K.call(M, q);
|
|
17919
|
+
}, [M, n, q, j, O]), G = useMemo(() => r !== !1 && w ? L() : null, [w, L, r]), U = useRef(null), H = "hidden";
|
|
17920
17920
|
useEffect(() => {
|
|
17921
17921
|
const K = U.current;
|
|
17922
17922
|
let X = K == null ? void 0 : K.parentElement;
|
|
@@ -17956,8 +17956,8 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
17956
17956
|
$[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${$[1]}` || y("Untitled")}` })
|
|
17957
17957
|
] }) }),
|
|
17958
17958
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
17959
|
-
|
|
17960
|
-
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children:
|
|
17959
|
+
E,
|
|
17960
|
+
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: V }),
|
|
17961
17961
|
G
|
|
17962
17962
|
] }) })
|
|
17963
17963
|
]
|
|
@@ -18648,7 +18648,7 @@ const useTableBlockProps = () => {
|
|
|
18648
18648
|
a && (a.field.data = ((v = a.field) == null ? void 0 : v.data) || {}, a.field.data.selectedRowKeys = S, a.field.data.selectedRowData = y, (I = (F = a.field) == null ? void 0 : F.onRowSelect) == null || I.call(F, S));
|
|
18649
18649
|
}, []),
|
|
18650
18650
|
onRowDragEnd: useCallback(
|
|
18651
|
-
(v) =>
|
|
18651
|
+
(v) => z(void 0, [v], function* ({ from: S, to: y }) {
|
|
18652
18652
|
yield i.current.resource.move({
|
|
18653
18653
|
sourceId: S[a.rowKey || "id"],
|
|
18654
18654
|
targetId: y[a.rowKey || "id"],
|
|
@@ -18663,9 +18663,9 @@ const useTableBlockProps = () => {
|
|
|
18663
18663
|
),
|
|
18664
18664
|
onChange: useCallback(
|
|
18665
18665
|
({ current: S, pageSize: y }, v, F) => {
|
|
18666
|
-
var B, N, $, L, w, O, j, k, M,
|
|
18666
|
+
var B, N, $, L, w, O, j, k, M, q;
|
|
18667
18667
|
const I = ($ = (N = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : N.params) == null ? void 0 : $.sort, T = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || a.dragSortBy, R = y || ((O = (w = (L = t.parent) == null ? void 0 : L["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : O.pageSize), D = P(x({}, (M = (k = (j = i.current) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : M[0]), { page: S || 1, pageSize: R });
|
|
18668
|
-
T && (D.sort = T), (
|
|
18668
|
+
T && (D.sort = T), (q = i.current) == null || q.service.run(D);
|
|
18669
18669
|
},
|
|
18670
18670
|
[t.parent]
|
|
18671
18671
|
),
|
|
@@ -18678,13 +18678,13 @@ const useTableBlockProps = () => {
|
|
|
18678
18678
|
}
|
|
18679
18679
|
const R = T.find((D) => D.uid === t.parent["x-uid"]);
|
|
18680
18680
|
T.forEach((D) => {
|
|
18681
|
-
var j, k, M,
|
|
18682
|
-
const B = F.find((
|
|
18681
|
+
var j, k, M, q;
|
|
18682
|
+
const B = F.find((E) => E.uid === D.uid);
|
|
18683
18683
|
if (!B)
|
|
18684
18684
|
return;
|
|
18685
18685
|
const N = getSourceKey(R, B.field) || a.rowKey || "id", $ = [S[N]], L = ((j = D.service.params) == null ? void 0 : j[0]) || {}, w = ((M = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : M.filters) || {};
|
|
18686
18686
|
if (v.includes(S[a.rowKey])) {
|
|
18687
|
-
if ((
|
|
18687
|
+
if ((q = D.clearSelection) == null || q.call(D), D.dataLoadingMode === "manual")
|
|
18688
18688
|
return D.clearData();
|
|
18689
18689
|
delete w[I];
|
|
18690
18690
|
} else
|
|
@@ -18698,7 +18698,7 @@ const useTableBlockProps = () => {
|
|
|
18698
18698
|
]
|
|
18699
18699
|
};
|
|
18700
18700
|
const O = mergeFilter([
|
|
18701
|
-
...Object.values(w).map((
|
|
18701
|
+
...Object.values(w).map((E) => removeNullCondition(E)),
|
|
18702
18702
|
D.defaultFilter
|
|
18703
18703
|
]);
|
|
18704
18704
|
return D.doFilter(
|
|
@@ -18856,7 +18856,7 @@ class TableFieldResource {
|
|
|
18856
18856
|
this.field = t.field, this.api = t.api, this.sourceId = t.sourceId, this.resource = this.api.resource(t.resource, this.sourceId);
|
|
18857
18857
|
}
|
|
18858
18858
|
list(t) {
|
|
18859
|
-
return
|
|
18859
|
+
return z(this, null, function* () {
|
|
18860
18860
|
if (this.field.data = this.field.data || {}, this.field.data.changed)
|
|
18861
18861
|
return console.log("list.dataSource", this.field.data.dataSource), {
|
|
18862
18862
|
data: {
|
|
@@ -18878,7 +18878,7 @@ class TableFieldResource {
|
|
|
18878
18878
|
});
|
|
18879
18879
|
}
|
|
18880
18880
|
get(t) {
|
|
18881
|
-
return
|
|
18881
|
+
return z(this, null, function* () {
|
|
18882
18882
|
console.log("get", t);
|
|
18883
18883
|
const { filterByTk: o } = t;
|
|
18884
18884
|
return {
|
|
@@ -18889,21 +18889,21 @@ class TableFieldResource {
|
|
|
18889
18889
|
});
|
|
18890
18890
|
}
|
|
18891
18891
|
create(t) {
|
|
18892
|
-
return
|
|
18892
|
+
return z(this, null, function* () {
|
|
18893
18893
|
console.log("create", t);
|
|
18894
18894
|
const { values: o } = t;
|
|
18895
18895
|
this.field.data.dataSource.push(o), this.field.data.changed = !0;
|
|
18896
18896
|
});
|
|
18897
18897
|
}
|
|
18898
18898
|
update(t) {
|
|
18899
|
-
return
|
|
18899
|
+
return z(this, null, function* () {
|
|
18900
18900
|
console.log("update", t);
|
|
18901
18901
|
const { filterByTk: o, values: n } = t;
|
|
18902
18902
|
this.field.data.dataSource[o] = n, this.field.data.changed = !0;
|
|
18903
18903
|
});
|
|
18904
18904
|
}
|
|
18905
18905
|
destroy(t) {
|
|
18906
|
-
return
|
|
18906
|
+
return z(this, null, function* () {
|
|
18907
18907
|
console.log("destroy", t);
|
|
18908
18908
|
let { filterByTk: o } = t;
|
|
18909
18909
|
Array.isArray(o) || (o = [o]), this.field.data.dataSource = this.field.data.dataSource.filter((n, r) => !o.includes(r)), this.field.data.changed = !0;
|
|
@@ -19058,10 +19058,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19058
19058
|
var i, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
19059
19059
|
const e = useField(), t = useTableSelectorContext(), o = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), r = recursiveParent(o, "CollectionField"), a = n(r == null ? void 0 : r["x-collection-field"]);
|
|
19060
19060
|
return useEffect(() => {
|
|
19061
|
-
var T, R, D, B, N, $, L, w, O, j, k, M,
|
|
19061
|
+
var T, R, D, B, N, $, L, w, O, j, k, M, q;
|
|
19062
19062
|
if (!((T = t == null ? void 0 : t.service) != null && T.loading)) {
|
|
19063
|
-
const
|
|
19064
|
-
e.value =
|
|
19063
|
+
const E = (D = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : D.data.map((V) => V);
|
|
19064
|
+
e.value = E, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, E), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (L = ($ = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : $.meta) == null ? void 0 : L.pageSize, e.componentProps.pagination.total = (j = (O = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : O.meta) == null ? void 0 : j.count, e.componentProps.pagination.current = (q = (M = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : M.meta) == null ? void 0 : q.page;
|
|
19065
19065
|
}
|
|
19066
19066
|
}, [
|
|
19067
19067
|
a == null ? void 0 : a.foreignKey,
|
|
@@ -19083,7 +19083,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19083
19083
|
t.field.data = ((D = t == null ? void 0 : t.field) == null ? void 0 : D.data) || {}, t.field.data.selectedRowKeys = T, t.field.data.selectedRowData = R;
|
|
19084
19084
|
},
|
|
19085
19085
|
onRowDragEnd(D) {
|
|
19086
|
-
return
|
|
19086
|
+
return z(this, arguments, function* ({ from: T, to: R }) {
|
|
19087
19087
|
yield t.resource.move({
|
|
19088
19088
|
sourceId: T[t.rowKey || "id"],
|
|
19089
19089
|
targetId: R[t.rowKey || "id"]
|
|
@@ -19145,7 +19145,7 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19145
19145
|
);
|
|
19146
19146
|
class BlockSchemaComponentPlugin extends Plugin {
|
|
19147
19147
|
load() {
|
|
19148
|
-
return
|
|
19148
|
+
return z(this, null, function* () {
|
|
19149
19149
|
this.addComponents(), this.addScopes();
|
|
19150
19150
|
});
|
|
19151
19151
|
}
|
|
@@ -19250,7 +19250,7 @@ const regenerateUid = (e) => {
|
|
|
19250
19250
|
templates: o,
|
|
19251
19251
|
refresh: t,
|
|
19252
19252
|
getTemplateSchemaByMode: useCallback(
|
|
19253
|
-
(r) =>
|
|
19253
|
+
(r) => z(void 0, null, function* () {
|
|
19254
19254
|
const { mode: a, template: i } = r;
|
|
19255
19255
|
if (a === "copy") {
|
|
19256
19256
|
const { data: l } = yield n.request({
|
|
@@ -19269,7 +19269,7 @@ const regenerateUid = (e) => {
|
|
|
19269
19269
|
[n]
|
|
19270
19270
|
),
|
|
19271
19271
|
copyTemplateSchema: useCallback(
|
|
19272
|
-
(r) =>
|
|
19272
|
+
(r) => z(void 0, null, function* () {
|
|
19273
19273
|
const { data: a } = yield n.request({
|
|
19274
19274
|
url: `/uiSchemas:getJsonSchema/${r.uid}?includeAsyncNode=true`
|
|
19275
19275
|
}), i = (a == null ? void 0 : a.data) || {};
|
|
@@ -19278,7 +19278,7 @@ const regenerateUid = (e) => {
|
|
|
19278
19278
|
[n]
|
|
19279
19279
|
),
|
|
19280
19280
|
saveAsTemplate: useCallback(
|
|
19281
|
-
(r) =>
|
|
19281
|
+
(r) => z(void 0, null, function* () {
|
|
19282
19282
|
const { uid: a } = r, i = uid();
|
|
19283
19283
|
return yield n.resource("uiSchemas").saveAsTemplate({
|
|
19284
19284
|
filterByTk: a,
|
|
@@ -19339,7 +19339,7 @@ const regenerateUid = (e) => {
|
|
|
19339
19339
|
refreshDeps: []
|
|
19340
19340
|
}, RemoteSchemaTemplateManagerProvider = (e) => {
|
|
19341
19341
|
var a;
|
|
19342
|
-
const t = useAPIClient(), o = useRequest(options$1), n = useCallback(() =>
|
|
19342
|
+
const t = useAPIClient(), o = useRequest(options$1), n = useCallback(() => z(void 0, null, function* () {
|
|
19343
19343
|
const { data: i } = yield t.request(options$1);
|
|
19344
19344
|
o.mutate(i);
|
|
19345
19345
|
}), [t, o]), r = useMemo(() => {
|
|
@@ -19350,7 +19350,7 @@ const regenerateUid = (e) => {
|
|
|
19350
19350
|
};
|
|
19351
19351
|
class RemoteSchemaTemplateManagerPlugin extends Plugin {
|
|
19352
19352
|
load() {
|
|
19353
|
-
return
|
|
19353
|
+
return z(this, null, function* () {
|
|
19354
19354
|
this.addRoutes(), this.addComponents();
|
|
19355
19355
|
});
|
|
19356
19356
|
}
|
|
@@ -19386,7 +19386,7 @@ const CollectionTitle = (e) => {
|
|
|
19386
19386
|
const e = useUpdateActionProps(), { __parent: t } = useBlockRequestContext();
|
|
19387
19387
|
return {
|
|
19388
19388
|
onClick() {
|
|
19389
|
-
return
|
|
19389
|
+
return z(this, null, function* () {
|
|
19390
19390
|
var n, r;
|
|
19391
19391
|
yield e.onClick(), (r = (n = t == null ? void 0 : t.service) == null ? void 0 : n.refresh) == null || r.call(n);
|
|
19392
19392
|
});
|
|
@@ -19396,7 +19396,7 @@ const CollectionTitle = (e) => {
|
|
|
19396
19396
|
const e = useBulkDestroyActionProps(), t = useSchemaTemplateManager(), { service: o } = useBlockRequestContext();
|
|
19397
19397
|
return {
|
|
19398
19398
|
onClick() {
|
|
19399
|
-
return
|
|
19399
|
+
return z(this, null, function* () {
|
|
19400
19400
|
var r;
|
|
19401
19401
|
yield e.onClick(), yield t.refresh(), (r = o == null ? void 0 : o.refresh) == null || r.call(o);
|
|
19402
19402
|
});
|
|
@@ -19406,7 +19406,7 @@ const CollectionTitle = (e) => {
|
|
|
19406
19406
|
const e = useDestroyActionProps(), { service: t } = useBlockRequestContext(), o = useSchemaTemplateManager();
|
|
19407
19407
|
return {
|
|
19408
19408
|
onClick() {
|
|
19409
|
-
return
|
|
19409
|
+
return z(this, null, function* () {
|
|
19410
19410
|
var r;
|
|
19411
19411
|
yield e.onClick(), yield o.refresh(), (r = t == null ? void 0 : t.refresh) == null || r.call(t);
|
|
19412
19412
|
});
|
|
@@ -20154,7 +20154,7 @@ const EnableChildCollections = withDynamicSchemaProps(
|
|
|
20154
20154
|
d.dataSource = m, d.loading = !1, d.initialValue && (d.disabled = !0);
|
|
20155
20155
|
})
|
|
20156
20156
|
);
|
|
20157
|
-
}, c = (u) =>
|
|
20157
|
+
}, c = (u) => z(void 0, null, function* () {
|
|
20158
20158
|
var p, m;
|
|
20159
20159
|
const { childrenCollections: d } = ((p = n.values) == null ? void 0 : p.enableChildren) || {};
|
|
20160
20160
|
return (m = i.filter((h) => !d.find((g) => g.collection === h.name) || u.initialValue || h.name === u.value)) == null ? void 0 : m.map((h) => ({
|
|
@@ -21479,7 +21479,7 @@ const findGridSchema = (e) => e.reduceProperties((t, o) => {
|
|
|
21479
21479
|
SchemaSettingsItem,
|
|
21480
21480
|
{
|
|
21481
21481
|
title: "Convert reference to duplicate",
|
|
21482
|
-
onClick: () =>
|
|
21482
|
+
onClick: () => z(this, null, function* () {
|
|
21483
21483
|
const b = yield f(p), S = findBlockTemplateSchema(m), y = createDesignable({
|
|
21484
21484
|
t: i,
|
|
21485
21485
|
api: h,
|
|
@@ -21487,7 +21487,7 @@ const findGridSchema = (e) => e.reduceProperties((t, o) => {
|
|
|
21487
21487
|
});
|
|
21488
21488
|
y.loadAPIClientEvents(), y.removeWithoutEmit(S), y.insertAdjacent(o, b, {
|
|
21489
21489
|
onSuccess() {
|
|
21490
|
-
return
|
|
21490
|
+
return z(this, null, function* () {
|
|
21491
21491
|
yield h.request({
|
|
21492
21492
|
url: `/uiSchemas:remove/${S["x-uid"]}`
|
|
21493
21493
|
});
|
|
@@ -21508,7 +21508,7 @@ const findGridSchema = (e) => e.reduceProperties((t, o) => {
|
|
|
21508
21508
|
SchemaSettingsItem,
|
|
21509
21509
|
{
|
|
21510
21510
|
title: i("Save as reference template"),
|
|
21511
|
-
onClick: () =>
|
|
21511
|
+
onClick: () => z(this, null, function* () {
|
|
21512
21512
|
d(!1);
|
|
21513
21513
|
const b = r && (c == null ? void 0 : c.getCollection(r)), S = findGridSchema(m), y = yield FormDialog(
|
|
21514
21514
|
i("Save as reference template"),
|
|
@@ -21622,7 +21622,7 @@ const findGridSchema = (e) => e.reduceProperties((t, o) => {
|
|
|
21622
21622
|
content: c("Are you sure you want to delete it?")
|
|
21623
21623
|
}, o), {
|
|
21624
21624
|
onOk() {
|
|
21625
|
-
return
|
|
21625
|
+
return z(this, null, function* () {
|
|
21626
21626
|
var y;
|
|
21627
21627
|
const S = {
|
|
21628
21628
|
removeParentsIfNoChildren: r,
|
|
@@ -21735,7 +21735,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21735
21735
|
}, [JSON.stringify(r || {})]);
|
|
21736
21736
|
const B = useCallback(() => {
|
|
21737
21737
|
h(!1), D.reset();
|
|
21738
|
-
}, [D]), N = useCallback(() =>
|
|
21738
|
+
}, [D]), N = useCallback(() => z(void 0, null, function* () {
|
|
21739
21739
|
yield D.submit();
|
|
21740
21740
|
try {
|
|
21741
21741
|
const O = D.values, j = Object.keys(O).reduce((k, M) => (D.query(M).take() && (k[M] = O[M]), k), {});
|
|
@@ -21743,7 +21743,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
21743
21743
|
} catch (O) {
|
|
21744
21744
|
console.error(O);
|
|
21745
21745
|
}
|
|
21746
|
-
}), [D, o]), $ = useCallback(() =>
|
|
21746
|
+
}), [D, o]), $ = useCallback(() => z(void 0, null, function* () {
|
|
21747
21747
|
!g && (i != null && i["x-uid"]) && (b["x-action-settings"].schemaUid = i["x-uid"], y.emit("patch", { schema: b }), yield F.resource("uiSchemas").insert({ values: i }), f(i["x-uid"])), typeof a == "function" && (a == null || a()), S.setVisible(!1), h(!0);
|
|
21748
21748
|
}), [F, S, y, b, i, g]), L = useCallback((O) => O.stopPropagation(), []);
|
|
21749
21749
|
return /* @__PURE__ */ jsxs(zIndexContext.Provider, { value: R, children: [
|
|
@@ -21812,26 +21812,26 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21812
21812
|
"noRecord",
|
|
21813
21813
|
"ModalContextProvider",
|
|
21814
21814
|
"dialogRootClassName"
|
|
21815
|
-
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), T = useDataSourceKey(), R = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), $ = useBlockContext(), { getOperators: L } = useOperators(), w = useLocationSearch(), O = useVariables$1(), j = useContext(AllDataBlocksContext), { formValue: k, collection: M, parent:
|
|
21815
|
+
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: F } = useContext(ConfigProvider.ConfigContext), I = useDataSourceManager(), T = useDataSourceKey(), R = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), $ = useBlockContext(), { getOperators: L } = useOperators(), w = useLocationSearch(), O = useVariables$1(), j = useContext(AllDataBlocksContext), { formValue: k, collection: M, parent: q } = useSubFormValue(), E = useCurrentPopupRecord(), V = useParentPopupRecord();
|
|
21816
21816
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21817
21817
|
SchemaSettingsItem,
|
|
21818
21818
|
P(x({
|
|
21819
21819
|
title: o
|
|
21820
21820
|
}, h), {
|
|
21821
|
-
onClick: () =>
|
|
21821
|
+
onClick: () => z(void 0, null, function* () {
|
|
21822
21822
|
const U = l ? yield l() : c, H = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21823
21823
|
FormDialog(
|
|
21824
21824
|
{ title: H.title || o, width: u, rootClassName: m },
|
|
21825
21825
|
() => /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: j, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: $, children: /* @__PURE__ */ jsx(
|
|
21826
21826
|
VariablePopupRecordProvider,
|
|
21827
21827
|
{
|
|
21828
|
-
recordData:
|
|
21829
|
-
collection:
|
|
21828
|
+
recordData: E == null ? void 0 : E.value,
|
|
21829
|
+
collection: E == null ? void 0 : E.collection,
|
|
21830
21830
|
parent: {
|
|
21831
|
-
recordData:
|
|
21832
|
-
collection:
|
|
21831
|
+
recordData: V == null ? void 0 : V.value,
|
|
21832
|
+
collection: V == null ? void 0 : V.collection
|
|
21833
21833
|
},
|
|
21834
|
-
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: M, parent:
|
|
21834
|
+
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: k, collection: M, parent: q }, children: /* @__PURE__ */ jsx(
|
|
21835
21835
|
FormActiveFieldsProvider,
|
|
21836
21836
|
{
|
|
21837
21837
|
name: "form",
|
|
@@ -21905,7 +21905,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21905
21905
|
} : {
|
|
21906
21906
|
field: h,
|
|
21907
21907
|
direction: "asc"
|
|
21908
|
-
}), p = useSortFields(t.name || (c == null ? void 0 : c.name)), m = (g) =>
|
|
21908
|
+
}), p = useSortFields(t.name || (c == null ? void 0 : c.name)), m = (g) => z(this, [g], function* ({ sort: h }) {
|
|
21909
21909
|
var C;
|
|
21910
21910
|
if (t != null && t.onSubmit)
|
|
21911
21911
|
return t.onSubmit({ sort: h });
|
|
@@ -22028,15 +22028,15 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22028
22028
|
[o, c, u, y, g, f, p, h, R, r]
|
|
22029
22029
|
), $ = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), L = useCallback(
|
|
22030
22030
|
(O) => {
|
|
22031
|
-
var
|
|
22031
|
+
var E;
|
|
22032
22032
|
const j = [];
|
|
22033
|
-
for (const
|
|
22034
|
-
j.push(_.omit(_.pickBy(
|
|
22035
|
-
const k = y["x-component"] === "BlockTemplate" && ((
|
|
22033
|
+
for (const V of O.fieldReaction.rules)
|
|
22034
|
+
j.push(_.omit(_.pickBy(V, _.identity), ["conditionBasic", "conditionAdvanced"]));
|
|
22035
|
+
const k = y["x-component"] === "BlockTemplate" && ((E = y["x-component-props"]) == null ? void 0 : E.templateId), q = {
|
|
22036
22036
|
"x-uid": b !== LinkageRuleCategory.block ? k && m(k).uid || y["x-uid"] : c["x-uid"]
|
|
22037
22037
|
};
|
|
22038
|
-
y[T] = j,
|
|
22039
|
-
schema:
|
|
22038
|
+
y[T] = j, q[T] = j, c[T] = j, d.emit("patch", {
|
|
22039
|
+
schema: q
|
|
22040
22040
|
}), d.refresh(), a == null || a();
|
|
22041
22041
|
},
|
|
22042
22042
|
[d, m, y, T, a, b]
|
|
@@ -22930,9 +22930,9 @@ function Input$1(e) {
|
|
|
22930
22930
|
label: v("Constant"),
|
|
22931
22931
|
[j.value]: "$",
|
|
22932
22932
|
[j.label]: v("Constant")
|
|
22933
|
-
} : a ? getTypedConstantOption(w, a, j) : null : null, [w, a]), M = (Y = k == null ? void 0 : k.component) != null ? Y : NullComponent,
|
|
22934
|
-
let
|
|
22935
|
-
t == null ? i ? n && B ?
|
|
22933
|
+
} : a ? getTypedConstantOption(w, a, j) : null : null, [w, a]), M = (Y = k == null ? void 0 : k.component) != null ? Y : NullComponent, q = Array.isArray(a) ? (K = (J = a.find((X) => Array.isArray(X) && X[0] === w)) == null ? void 0 : J[1]) != null ? K : {} : {};
|
|
22934
|
+
let E;
|
|
22935
|
+
t == null ? i ? n && B ? E = ["$"] : E = [""] : n ? E = ["$"] : E = [" ", w] : E = n ? ["$"] : [" ", w], m && (E = ["$"]), useEffect(() => {
|
|
22936
22936
|
const oe = k != null ? k : {}, { component: X } = oe, Q = W(oe, ["component"]), ee = [
|
|
22937
22937
|
...i ? [
|
|
22938
22938
|
{
|
|
@@ -22947,7 +22947,7 @@ function Input$1(e) {
|
|
|
22947
22947
|
].filter((te) => !te.deprecated || (O == null ? void 0 : O[0]) === te[j.value]);
|
|
22948
22948
|
T(ee);
|
|
22949
22949
|
}, [g, O, k, i]);
|
|
22950
|
-
const
|
|
22950
|
+
const V = (X) => z(this, null, function* () {
|
|
22951
22951
|
var ee;
|
|
22952
22952
|
const Q = X[X.length - 1];
|
|
22953
22953
|
if (!((ee = Q.children) != null && ee.length) && !Q.isLeaf && Q.loadChildren) {
|
|
@@ -22989,7 +22989,7 @@ function Input$1(e) {
|
|
|
22989
22989
|
o(null);
|
|
22990
22990
|
}, [k]);
|
|
22991
22991
|
useEffect(() => {
|
|
22992
|
-
|
|
22992
|
+
z(this, null, function* () {
|
|
22993
22993
|
var oe;
|
|
22994
22994
|
if (!O || I.length <= 1)
|
|
22995
22995
|
return;
|
|
@@ -23074,7 +23074,7 @@ function Input$1(e) {
|
|
|
23074
23074
|
P(x({
|
|
23075
23075
|
role: "button",
|
|
23076
23076
|
"aria-label": "variable-constant"
|
|
23077
|
-
},
|
|
23077
|
+
}, q), {
|
|
23078
23078
|
value: t,
|
|
23079
23079
|
onChange: o
|
|
23080
23080
|
})
|
|
@@ -23083,9 +23083,9 @@ function Input$1(e) {
|
|
|
23083
23083
|
Cascader$1,
|
|
23084
23084
|
{
|
|
23085
23085
|
options: I,
|
|
23086
|
-
value: O != null ? O :
|
|
23086
|
+
value: O != null ? O : E,
|
|
23087
23087
|
onChange: G,
|
|
23088
|
-
loadData:
|
|
23088
|
+
loadData: V,
|
|
23089
23089
|
changeOnSelect: u != null ? u : !0,
|
|
23090
23090
|
fieldNames: d,
|
|
23091
23091
|
disabled: H,
|
|
@@ -23144,7 +23144,7 @@ function VariableSelect({
|
|
|
23144
23144
|
}) {
|
|
23145
23145
|
const { t: l } = useTranslation(), [c, u] = useState([]), { wrapSSR: d, componentCls: p, hashId: m } = useStyles$c(), { token: h } = useToken$1();
|
|
23146
23146
|
function g(f) {
|
|
23147
|
-
return
|
|
23147
|
+
return z(this, null, function* () {
|
|
23148
23148
|
var b;
|
|
23149
23149
|
const C = f[f.length - 1];
|
|
23150
23150
|
!((b = C.children) != null && b.length) && !C.isLeaf && C.loadChildren && (yield C.loadChildren(C), t((S) => [...S]));
|
|
@@ -23367,23 +23367,23 @@ function TextArea(e) {
|
|
|
23367
23367
|
), [S, y] = useState(!1), [v, F] = useState(!1), [I, T] = useState(() => renderHTML(p != null ? p : "", b, c)), [R, D] = useState([-1, 0, -1, 0]);
|
|
23368
23368
|
useAntdInputStyle("ant-input");
|
|
23369
23369
|
const { token: B } = theme.useToken(), N = c.join(" "), $ = useCallback(
|
|
23370
|
-
(
|
|
23370
|
+
(V) => {
|
|
23371
23371
|
var U;
|
|
23372
|
-
const G = getValue(
|
|
23372
|
+
const G = getValue(V, c);
|
|
23373
23373
|
(U = e.onChange) == null || U.call(e, d ? G.trim() : G);
|
|
23374
23374
|
},
|
|
23375
23375
|
[N, e.onChange, d]
|
|
23376
23376
|
);
|
|
23377
23377
|
useEffect(() => {
|
|
23378
|
-
preloadOptions(r, m).then((
|
|
23379
|
-
f(
|
|
23378
|
+
preloadOptions(r, m).then((V) => {
|
|
23379
|
+
f(V);
|
|
23380
23380
|
}).catch(console.error);
|
|
23381
23381
|
}, [r, JSON.stringify(m)]), useEffect(() => {
|
|
23382
23382
|
T(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
|
|
23383
23383
|
}, [p, b, N]), useEffect(() => {
|
|
23384
23384
|
var U;
|
|
23385
|
-
const { current:
|
|
23386
|
-
if (!
|
|
23385
|
+
const { current: V } = h;
|
|
23386
|
+
if (!V)
|
|
23387
23387
|
return;
|
|
23388
23388
|
const G = new Range();
|
|
23389
23389
|
if (v) {
|
|
@@ -23392,22 +23392,22 @@ function TextArea(e) {
|
|
|
23392
23392
|
const H = (U = window.getSelection) == null ? void 0 : U.call(window);
|
|
23393
23393
|
if (H)
|
|
23394
23394
|
try {
|
|
23395
|
-
const Y = Array.from(
|
|
23395
|
+
const Y = Array.from(V.childNodes);
|
|
23396
23396
|
Y.length && (R[0] === -1 ? R[1] && G.setStartAfter(Y[R[1] - 1]) : G.setStart(Y[R[0]], R[1]), R[2] === -1 ? R[3] && G.setEndAfter(Y[R[3] - 1]) : G.setEnd(Y[R[2]], R[3])), G.collapse(!0), H.removeAllRanges(), H.addRange(G);
|
|
23397
23397
|
} catch (Y) {
|
|
23398
23398
|
}
|
|
23399
23399
|
} else {
|
|
23400
|
-
const { lastChild: H } =
|
|
23400
|
+
const { lastChild: H } = V;
|
|
23401
23401
|
if (H) {
|
|
23402
23402
|
G.setStartAfter(H), G.setEndAfter(H);
|
|
23403
|
-
const Y = Array.from(
|
|
23403
|
+
const Y = Array.from(V.childNodes), J = G.startContainer === V ? -1 : Y.indexOf(H), K = G.startContainer === V ? -1 : Y.indexOf(H);
|
|
23404
23404
|
D([J, G.startOffset, K, G.endOffset]);
|
|
23405
23405
|
}
|
|
23406
23406
|
}
|
|
23407
23407
|
}, [I]);
|
|
23408
23408
|
const L = useCallback(
|
|
23409
|
-
function(
|
|
23410
|
-
const G =
|
|
23409
|
+
function(V) {
|
|
23410
|
+
const G = V.filter((Y) => !!Y.trim()), { current: U } = h;
|
|
23411
23411
|
if (!U || !G)
|
|
23412
23412
|
return;
|
|
23413
23413
|
U.focus();
|
|
@@ -23418,25 +23418,25 @@ function TextArea(e) {
|
|
|
23418
23418
|
},
|
|
23419
23419
|
[b, $, R]
|
|
23420
23420
|
), w = useCallback(
|
|
23421
|
-
function({ currentTarget:
|
|
23422
|
-
S || (F(!0), D(getCurrentRange(
|
|
23421
|
+
function({ currentTarget: V }) {
|
|
23422
|
+
S || (F(!0), D(getCurrentRange(V)), $(V));
|
|
23423
23423
|
},
|
|
23424
23424
|
[S, $]
|
|
23425
|
-
), O = useCallback(function({ currentTarget:
|
|
23426
|
-
D(getCurrentRange(
|
|
23427
|
-
}, []), j = useCallback(function(
|
|
23428
|
-
|
|
23425
|
+
), O = useCallback(function({ currentTarget: V }) {
|
|
23426
|
+
D(getCurrentRange(V));
|
|
23427
|
+
}, []), j = useCallback(function(V) {
|
|
23428
|
+
V.key === "Enter" && V.preventDefault();
|
|
23429
23429
|
}, []), k = useCallback(function() {
|
|
23430
23430
|
y(!0);
|
|
23431
23431
|
}, []), M = useCallback(
|
|
23432
|
-
({ currentTarget:
|
|
23433
|
-
y(!1), F(!0), D(getCurrentRange(
|
|
23432
|
+
({ currentTarget: V }) => {
|
|
23433
|
+
y(!1), F(!0), D(getCurrentRange(V)), $(V);
|
|
23434
23434
|
},
|
|
23435
23435
|
[$]
|
|
23436
|
-
),
|
|
23437
|
-
function(
|
|
23438
|
-
|
|
23439
|
-
const G =
|
|
23436
|
+
), q = useCallback(
|
|
23437
|
+
function(V) {
|
|
23438
|
+
V.preventDefault();
|
|
23439
|
+
const G = V.clipboardData.getData("text/html") || V.clipboardData.getData("text"), U = sanitizeHTML(G, {
|
|
23440
23440
|
allowedTags: ["span"],
|
|
23441
23441
|
allowedAttributes: {
|
|
23442
23442
|
span: ["data-variable", "contenteditable"]
|
|
@@ -23453,10 +23453,10 @@ function TextArea(e) {
|
|
|
23453
23453
|
}
|
|
23454
23454
|
}
|
|
23455
23455
|
}).replace(/\n/g, " ");
|
|
23456
|
-
F(!0), pasteHTML(
|
|
23456
|
+
F(!0), pasteHTML(V.currentTarget, U), D(getCurrentRange(V.currentTarget)), $(V.currentTarget);
|
|
23457
23457
|
},
|
|
23458
23458
|
[$]
|
|
23459
|
-
),
|
|
23459
|
+
), E = e.disabled || C.disabled;
|
|
23460
23460
|
return t(
|
|
23461
23461
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
23462
23462
|
/* @__PURE__ */ jsxs(
|
|
@@ -23508,7 +23508,7 @@ function TextArea(e) {
|
|
|
23508
23508
|
onInput: w,
|
|
23509
23509
|
onBlur: O,
|
|
23510
23510
|
onKeyDown: j,
|
|
23511
|
-
onPaste:
|
|
23511
|
+
onPaste: q,
|
|
23512
23512
|
onCompositionStart: k,
|
|
23513
23513
|
onCompositionEnd: M,
|
|
23514
23514
|
placeholder: e.placeholder,
|
|
@@ -23516,7 +23516,7 @@ function TextArea(e) {
|
|
|
23516
23516
|
className: cx(
|
|
23517
23517
|
o,
|
|
23518
23518
|
"ant-input ant-input-outlined",
|
|
23519
|
-
{ "ant-input-disabled":
|
|
23519
|
+
{ "ant-input-disabled": E },
|
|
23520
23520
|
// NOTE: `pre-wrap` here for avoid the ` ` (\x160) issue when paste content, we need normal space (\x32).
|
|
23521
23521
|
css`
|
|
23522
23522
|
min-height: ${B.controlHeight}px;
|
|
@@ -23538,7 +23538,7 @@ function TextArea(e) {
|
|
|
23538
23538
|
`
|
|
23539
23539
|
),
|
|
23540
23540
|
ref: h,
|
|
23541
|
-
contentEditable: !
|
|
23541
|
+
contentEditable: !E,
|
|
23542
23542
|
dangerouslySetInnerHTML: { __html: I }
|
|
23543
23543
|
}
|
|
23544
23544
|
),
|
|
@@ -23550,7 +23550,7 @@ function TextArea(e) {
|
|
|
23550
23550
|
onInsert: L,
|
|
23551
23551
|
changeOnSelect: a,
|
|
23552
23552
|
fieldNames: l || defaultFieldNames$2,
|
|
23553
|
-
disabled:
|
|
23553
|
+
disabled: E
|
|
23554
23554
|
}
|
|
23555
23555
|
)
|
|
23556
23556
|
]
|
|
@@ -23561,7 +23561,7 @@ function TextArea(e) {
|
|
|
23561
23561
|
);
|
|
23562
23562
|
}
|
|
23563
23563
|
function preloadOptions(e, t) {
|
|
23564
|
-
return
|
|
23564
|
+
return z(this, null, function* () {
|
|
23565
23565
|
var r;
|
|
23566
23566
|
let o = [...e != null ? e : []];
|
|
23567
23567
|
const n = t.map((a) => a.split("."));
|
|
@@ -23764,7 +23764,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
23764
23764
|
}), [e]);
|
|
23765
23765
|
return { urlSchema: n, paramsSchema: i, openInNewWindowSchema: l, modeSchema: r, htmlSchema: a };
|
|
23766
23766
|
}, LinkMenuItem = () => {
|
|
23767
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), { urlSchema: a, paramsSchema: i, openInNewWindowSchema: l } = useURLAndHTMLSchema(), c = useParentRoute(), { createRoute: u } = useNocoBaseRoutes(), d = useDataSourceManager(), p = useCollectionManager(), m = useCallback(() =>
|
|
23767
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), { urlSchema: a, paramsSchema: i, openInNewWindowSchema: l } = useURLAndHTMLSchema(), c = useParentRoute(), { createRoute: u } = useNocoBaseRoutes(), d = useDataSourceManager(), p = useCollectionManager(), m = useCallback(() => z(void 0, null, function* () {
|
|
23768
23768
|
const h = yield FormDialog(
|
|
23769
23769
|
e("Add link"),
|
|
23770
23770
|
() => {
|
|
@@ -23814,7 +23814,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
23814
23814
|
}, useInsertPageSchema = () => {
|
|
23815
23815
|
const e = useAPIClient();
|
|
23816
23816
|
return useCallback(
|
|
23817
|
-
(t) =>
|
|
23817
|
+
(t) => z(void 0, null, function* () {
|
|
23818
23818
|
yield e.request({
|
|
23819
23819
|
method: "POST",
|
|
23820
23820
|
url: "/uiSchemas:insert",
|
|
@@ -23824,7 +23824,7 @@ const getVariableComponentWithScope = (e, t = []) => (o) => {
|
|
|
23824
23824
|
[e]
|
|
23825
23825
|
);
|
|
23826
23826
|
}, PageMenuItem = () => {
|
|
23827
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() =>
|
|
23827
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useInsertPageSchema(), c = useCallback(() => z(void 0, null, function* () {
|
|
23828
23828
|
const u = yield FormDialog(
|
|
23829
23829
|
e("Add page"),
|
|
23830
23830
|
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
@@ -23889,7 +23889,7 @@ function getPageMenuSchema({ pageSchemaUid: e, tabSchemaUid: t, tabSchemaName: o
|
|
|
23889
23889
|
};
|
|
23890
23890
|
}
|
|
23891
23891
|
const GroupItem$1 = () => {
|
|
23892
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useCallback(() =>
|
|
23892
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: o } = useGlobalTheme(), { componentCls: n, hashId: r } = useStyles$h(), a = useParentRoute(), { createRoute: i } = useNocoBaseRoutes(), l = useCallback(() => z(void 0, null, function* () {
|
|
23893
23893
|
const c = yield FormDialog(
|
|
23894
23894
|
e("Add group"),
|
|
23895
23895
|
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
@@ -24017,7 +24017,7 @@ const GroupItem$1 = () => {
|
|
|
24017
24017
|
t.confirm({
|
|
24018
24018
|
title: e("Delete menu item"),
|
|
24019
24019
|
content: e("Are you sure you want to delete it?"),
|
|
24020
|
-
onOk: () =>
|
|
24020
|
+
onOk: () => z(void 0, null, function* () {
|
|
24021
24021
|
if ((n == null ? void 0 : n.id) != null && (yield o(n.id)), i !== (n == null ? void 0 : n.schemaUid) && !findRouteBySchemaUid(i, n == null ? void 0 : n.children))
|
|
24022
24022
|
return;
|
|
24023
24023
|
const l = findPrevSibling(r, n), c = findNextSibling(r, n);
|
|
@@ -24054,7 +24054,7 @@ const GroupItem$1 = () => {
|
|
|
24054
24054
|
}
|
|
24055
24055
|
}
|
|
24056
24056
|
},
|
|
24057
|
-
onSubmit: (f) =>
|
|
24057
|
+
onSubmit: (f) => z(void 0, [f], function* ({ title: h, icon: g }) {
|
|
24058
24058
|
var y;
|
|
24059
24059
|
const C = uid(), b = n === "beforeEnd" ? c == null ? void 0 : c.id : c == null ? void 0 : c.parentId, { data: S } = yield d({
|
|
24060
24060
|
type: NocoBaseDesktopRouteType.group,
|
|
@@ -24096,7 +24096,7 @@ const GroupItem$1 = () => {
|
|
|
24096
24096
|
}
|
|
24097
24097
|
}
|
|
24098
24098
|
},
|
|
24099
|
-
onSubmit: (f) =>
|
|
24099
|
+
onSubmit: (f) => z(void 0, [f], function* ({ title: h, icon: g }) {
|
|
24100
24100
|
var I;
|
|
24101
24101
|
const C = uid(), b = uid(), S = uid(), y = uid(), v = n === "beforeEnd" ? c == null ? void 0 : c.id : c == null ? void 0 : c.parentId, { data: F } = yield d({
|
|
24102
24102
|
type: NocoBaseDesktopRouteType.page,
|
|
@@ -24150,7 +24150,7 @@ const GroupItem$1 = () => {
|
|
|
24150
24150
|
openInNewWindow: l
|
|
24151
24151
|
}
|
|
24152
24152
|
},
|
|
24153
|
-
onSubmit: (S) =>
|
|
24153
|
+
onSubmit: (S) => z(void 0, [S], function* ({ title: h, icon: g, href: f, params: C, openInNewWindow: b }) {
|
|
24154
24154
|
var I;
|
|
24155
24155
|
const y = uid(), v = n === "beforeEnd" ? c == null ? void 0 : c.id : c == null ? void 0 : c.parentId, { data: F } = yield d({
|
|
24156
24156
|
type: NocoBaseDesktopRouteType.link,
|
|
@@ -24234,7 +24234,7 @@ const GroupItem$1 = () => {
|
|
|
24234
24234
|
"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."
|
|
24235
24235
|
),
|
|
24236
24236
|
onOk() {
|
|
24237
|
-
return
|
|
24237
|
+
return z(this, null, function* () {
|
|
24238
24238
|
t.id !== void 0 && (yield o(t.id, {
|
|
24239
24239
|
hideInMenu: !!r
|
|
24240
24240
|
}));
|
|
@@ -24288,7 +24288,7 @@ const GroupItem$1 = () => {
|
|
|
24288
24288
|
}
|
|
24289
24289
|
}
|
|
24290
24290
|
}), [r, e]), { moveRoute: i } = useNocoBaseRoutes(), l = useCurrentRoute(), c = useCallback(
|
|
24291
|
-
(p) =>
|
|
24291
|
+
(p) => z(void 0, [p], function* ({ target: u, position: d }) {
|
|
24292
24292
|
var f;
|
|
24293
24293
|
const [m] = ((f = u == null ? void 0 : u.split) == null ? void 0 : f.call(u, "||")) || [];
|
|
24294
24294
|
if (!m || m === void 0 || !l)
|
|
@@ -24475,7 +24475,7 @@ const LanguageSettings = () => {
|
|
|
24475
24475
|
value: i
|
|
24476
24476
|
})),
|
|
24477
24477
|
value: t.language,
|
|
24478
|
-
onChange: (i) =>
|
|
24478
|
+
onChange: (i) => z(void 0, null, function* () {
|
|
24479
24479
|
yield o.resource("users").updateLang({
|
|
24480
24480
|
values: {
|
|
24481
24481
|
appLang: i
|
|
@@ -24608,7 +24608,7 @@ const LayoutContent = () => {
|
|
|
24608
24608
|
n.current && (n.current.parentElement.parentElement.style.order = 999, n.current.parentElement.parentElement.style.paddingLeft = 0, n.current.parentElement.parentElement.style.padding = 0);
|
|
24609
24609
|
}, []);
|
|
24610
24610
|
const l = useCallback(
|
|
24611
|
-
(p) =>
|
|
24611
|
+
(p) => z(void 0, null, function* () {
|
|
24612
24612
|
var f, C, b;
|
|
24613
24613
|
const m = (f = t._route.options) == null ? void 0 : f.href, h = (C = t._route.options) == null ? void 0 : C.params, g = (b = t._route.options) == null ? void 0 : b.openInNewWindow;
|
|
24614
24614
|
p.preventDefault(), p.stopPropagation();
|
|
@@ -24835,12 +24835,12 @@ const LayoutContent = () => {
|
|
|
24835
24835
|
}, 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)) });
|
|
24836
24836
|
class AdminLayoutPlugin extends Plugin {
|
|
24837
24837
|
afterAdd() {
|
|
24838
|
-
return
|
|
24838
|
+
return z(this, null, function* () {
|
|
24839
24839
|
yield this.app.pm.add(RemoteSchemaTemplateManagerPlugin);
|
|
24840
24840
|
});
|
|
24841
24841
|
}
|
|
24842
24842
|
load() {
|
|
24843
|
-
return
|
|
24843
|
+
return z(this, null, function* () {
|
|
24844
24844
|
this.app.schemaSettingsManager.add(userCenterSettings), this.app.addComponents({ AdminLayout, AdminDynamicPage }), this.app.use(MobileLayoutProvider);
|
|
24845
24845
|
});
|
|
24846
24846
|
}
|
|
@@ -25007,7 +25007,7 @@ const SchemaComponentProvider = (e) => {
|
|
|
25007
25007
|
SchemaComponentProvider.displayName = "SchemaComponentProvider";
|
|
25008
25008
|
class SchemaComponentPlugin extends Plugin {
|
|
25009
25009
|
load() {
|
|
25010
|
-
return
|
|
25010
|
+
return z(this, null, function* () {
|
|
25011
25011
|
this.addComponents();
|
|
25012
25012
|
});
|
|
25013
25013
|
}
|
|
@@ -25104,12 +25104,12 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
|
|
|
25104
25104
|
}, InternalPagePopups = (e) => {
|
|
25105
25105
|
const t = useFieldSchema(), o = useLocation(), n = e.paramsList || getPopupParamsFromPath(getPopupPath(o)), { requestSchema: r } = useRequestSchema(), [a, i] = useState(null), l = useRef([]), { savePopupSchemaToSchema: c, getPopupSchemaFromSchema: u } = usePopupUtils();
|
|
25106
25106
|
useEffect(() => {
|
|
25107
|
-
|
|
25107
|
+
z(void 0, null, function* () {
|
|
25108
25108
|
const m = n.map((C) => {
|
|
25109
25109
|
var b;
|
|
25110
25110
|
return ((b = getStoredPopupContext(C.popupuid)) == null ? void 0 : b.schema) || findSchemaByUid(C.popupuid, t == null ? void 0 : t.root) || r(C.popupuid);
|
|
25111
25111
|
}), h = yield Promise.all(m), g = yield Promise.all(
|
|
25112
|
-
h.map((C, b) =>
|
|
25112
|
+
h.map((C, b) => z(void 0, null, function* () {
|
|
25113
25113
|
if (_.isEmpty(C))
|
|
25114
25114
|
return get404Schema();
|
|
25115
25115
|
const S = n[b];
|
|
@@ -25174,7 +25174,7 @@ const VisibleProvider = React.memo(({ children: e, popupuid: t }) => {
|
|
|
25174
25174
|
return t ? /* @__PURE__ */ jsx(InternalPagePopups, x({}, e)) : null;
|
|
25175
25175
|
}, useRequestSchema = () => {
|
|
25176
25176
|
const e = useAPIClient();
|
|
25177
|
-
return { requestSchema: useCallback((o) =>
|
|
25177
|
+
return { requestSchema: useCallback((o) => z(void 0, null, function* () {
|
|
25178
25178
|
var n;
|
|
25179
25179
|
try {
|
|
25180
25180
|
return (n = (yield e.request({
|
|
@@ -25357,7 +25357,7 @@ const useStyles$b = genStyleHook("nb-action-drawer", (e) => {
|
|
|
25357
25357
|
title: t("Unsaved changes"),
|
|
25358
25358
|
content: t("Are you sure you don't want to save?"),
|
|
25359
25359
|
onOk() {
|
|
25360
|
-
return
|
|
25360
|
+
return z(this, null, function* () {
|
|
25361
25361
|
var c;
|
|
25362
25362
|
e.setFormValueChanged(!1), (c = e.setVisible) == null || c.call(e, !1);
|
|
25363
25363
|
});
|
|
@@ -25374,7 +25374,7 @@ const useStyles$b = genStyleHook("nb-action-drawer", (e) => {
|
|
|
25374
25374
|
const { setVisible: e } = useContext(ActionContext), t = useForm();
|
|
25375
25375
|
return {
|
|
25376
25376
|
run() {
|
|
25377
|
-
return
|
|
25377
|
+
return z(this, null, function* () {
|
|
25378
25378
|
e(!1), t.submit((n) => {
|
|
25379
25379
|
console.log(n);
|
|
25380
25380
|
});
|
|
@@ -25931,7 +25931,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
25931
25931
|
const b = useForm(), S = useActionContext();
|
|
25932
25932
|
return {
|
|
25933
25933
|
run() {
|
|
25934
|
-
return
|
|
25934
|
+
return z(this, null, function* () {
|
|
25935
25935
|
yield u == null ? void 0 : u(), S.setVisible(!1), b.reset();
|
|
25936
25936
|
});
|
|
25937
25937
|
}
|
|
@@ -25940,7 +25940,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
25940
25940
|
const b = useForm(), S = useActionContext();
|
|
25941
25941
|
return {
|
|
25942
25942
|
run() {
|
|
25943
|
-
return
|
|
25943
|
+
return z(this, null, function* () {
|
|
25944
25944
|
yield b.validate();
|
|
25945
25945
|
try {
|
|
25946
25946
|
yield d == null ? void 0 : d(b.values), S.setVisible(!1), b.reset();
|
|
@@ -26422,26 +26422,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26422
26422
|
config: {}
|
|
26423
26423
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
26424
26424
|
function C(k) {
|
|
26425
|
-
var M,
|
|
26425
|
+
var M, q;
|
|
26426
26426
|
for (M = 0; M < k.length; M++)
|
|
26427
|
-
if (
|
|
26427
|
+
if (q = k[M], q === ".")
|
|
26428
26428
|
k.splice(M, 1), M -= 1;
|
|
26429
|
-
else if (
|
|
26429
|
+
else if (q === "..") {
|
|
26430
26430
|
if (M === 0 || M === 1 && k[2] === ".." || k[M - 1] === "..")
|
|
26431
26431
|
continue;
|
|
26432
26432
|
M > 0 && (k.splice(M - 1, 2), M -= 2);
|
|
26433
26433
|
}
|
|
26434
26434
|
}
|
|
26435
|
-
function b(k, M,
|
|
26436
|
-
var
|
|
26437
|
-
if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), k = oe.concat(k)), C(k), k = k.join("/")),
|
|
26435
|
+
function b(k, M, q) {
|
|
26436
|
+
var E, V, G, U, H, Y, J, K, X, Q, ee, oe, te = M && M.split("/"), se = i.map, ie = se && se["*"];
|
|
26437
|
+
if (k && (k = k.split("/"), J = k.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(k[J]) && (k[J] = k[J].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), k = oe.concat(k)), C(k), k = k.join("/")), q && se && (te || ie)) {
|
|
26438
26438
|
G = k.split("/");
|
|
26439
26439
|
e:
|
|
26440
26440
|
for (U = G.length; U > 0; U -= 1) {
|
|
26441
26441
|
if (Y = G.slice(0, U).join("/"), te) {
|
|
26442
26442
|
for (H = te.length; H > 0; H -= 1)
|
|
26443
|
-
if (
|
|
26444
|
-
K =
|
|
26443
|
+
if (V = getOwn(se, te.slice(0, H).join("/")), V && (V = getOwn(V, Y), V)) {
|
|
26444
|
+
K = V, X = U;
|
|
26445
26445
|
break e;
|
|
26446
26446
|
}
|
|
26447
26447
|
}
|
|
@@ -26449,7 +26449,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26449
26449
|
}
|
|
26450
26450
|
!K && Q && (K = Q, X = ee), K && (G.splice(0, X, K), k = G.join("/"));
|
|
26451
26451
|
}
|
|
26452
|
-
return
|
|
26452
|
+
return E = getOwn(i.pkgs, k), E || k;
|
|
26453
26453
|
}
|
|
26454
26454
|
function S(k) {
|
|
26455
26455
|
isBrowser && each(scripts(), function(M) {
|
|
@@ -26465,38 +26465,38 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26465
26465
|
})([k]), !0;
|
|
26466
26466
|
}
|
|
26467
26467
|
function v(k) {
|
|
26468
|
-
var M,
|
|
26469
|
-
return
|
|
26470
|
-
}
|
|
26471
|
-
function F(k, M,
|
|
26472
|
-
var
|
|
26473
|
-
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), Y = H[0], k = H[1], Y && (Y = b(Y, J,
|
|
26474
|
-
return b(ee, J,
|
|
26475
|
-
}) : Q = k.indexOf("!") === -1 ? b(k, J,
|
|
26468
|
+
var M, q = k ? k.indexOf("!") : -1;
|
|
26469
|
+
return q > -1 && (M = k.substring(0, q), k = k.substring(q + 1, k.length)), [M, k];
|
|
26470
|
+
}
|
|
26471
|
+
function F(k, M, q, E) {
|
|
26472
|
+
var V, G, U, H, Y = null, J = M ? M.name : null, K = k, X = !0, Q = "";
|
|
26473
|
+
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), Y = H[0], k = H[1], Y && (Y = b(Y, J, E), G = getOwn(p, Y)), k && (Y ? q ? Q = k : G && G.normalize ? Q = G.normalize(k, function(ee) {
|
|
26474
|
+
return b(ee, J, E);
|
|
26475
|
+
}) : Q = k.indexOf("!") === -1 ? b(k, J, E) : k : (Q = b(k, J, E), H = v(Q), Y = H[0], Q = H[1], q = !0, V = n.nameToUrl(Q))), U = Y && !G && !q ? "_unnormalized" + (f += 1) : "", {
|
|
26476
26476
|
prefix: Y,
|
|
26477
26477
|
name: Q,
|
|
26478
26478
|
parentMap: M,
|
|
26479
26479
|
unnormalized: !!U,
|
|
26480
|
-
url:
|
|
26480
|
+
url: V,
|
|
26481
26481
|
originalName: K,
|
|
26482
26482
|
isDefine: X,
|
|
26483
26483
|
id: (Y ? Y + "!" + Q : Q) + U
|
|
26484
26484
|
};
|
|
26485
26485
|
}
|
|
26486
26486
|
function I(k) {
|
|
26487
|
-
var M = k.id,
|
|
26488
|
-
return
|
|
26487
|
+
var M = k.id, q = getOwn(l, M);
|
|
26488
|
+
return q || (q = l[M] = new n.Module(k)), q;
|
|
26489
26489
|
}
|
|
26490
|
-
function T(k, M,
|
|
26491
|
-
var
|
|
26492
|
-
hasProp(p,
|
|
26490
|
+
function T(k, M, q) {
|
|
26491
|
+
var E = k.id, V = getOwn(l, E);
|
|
26492
|
+
hasProp(p, E) && (!V || V.defineEmitComplete) ? M === "defined" && q(p[E]) : (V = I(k), V.error && M === "error" ? q(V.error) : V.on(M, q));
|
|
26493
26493
|
}
|
|
26494
26494
|
function R(k, M) {
|
|
26495
|
-
var
|
|
26496
|
-
M ? M(k) : (each(
|
|
26497
|
-
var G = getOwn(l,
|
|
26498
|
-
G && (G.error = k, G.events.error && (
|
|
26499
|
-
}),
|
|
26495
|
+
var q = k.requireModules, E = !1;
|
|
26496
|
+
M ? M(k) : (each(q, function(V) {
|
|
26497
|
+
var G = getOwn(l, V);
|
|
26498
|
+
G && (G.error = k, G.events.error && (E = !0, G.emit("error", k)));
|
|
26499
|
+
}), E || req.onError(k));
|
|
26500
26500
|
}
|
|
26501
26501
|
function D() {
|
|
26502
26502
|
globalDefQueue.length && (each(globalDefQueue, function(k) {
|
|
@@ -26526,29 +26526,29 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26526
26526
|
function B(k) {
|
|
26527
26527
|
delete l[k], delete c[k];
|
|
26528
26528
|
}
|
|
26529
|
-
function N(k, M,
|
|
26530
|
-
var
|
|
26531
|
-
k.error ? k.emit("error", k.error) : (M[
|
|
26532
|
-
var U =
|
|
26533
|
-
H && !k.depMatched[G] && !
|
|
26534
|
-
}), E
|
|
26529
|
+
function N(k, M, q) {
|
|
26530
|
+
var E = k.map.id;
|
|
26531
|
+
k.error ? k.emit("error", k.error) : (M[E] = !0, each(k.depMaps, function(V, G) {
|
|
26532
|
+
var U = V.id, H = getOwn(l, U);
|
|
26533
|
+
H && !k.depMatched[G] && !q[U] && (getOwn(M, U) ? (k.defineDep(G, p[U]), k.check()) : N(H, M, q));
|
|
26534
|
+
}), q[E] = !0);
|
|
26535
26535
|
}
|
|
26536
26536
|
function $() {
|
|
26537
|
-
var k, M,
|
|
26537
|
+
var k, M, q = i.waitSeconds * 1e3, E = q && n.startTime + q < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], U = !1, H = !0;
|
|
26538
26538
|
if (!t) {
|
|
26539
26539
|
if (t = !0, eachProp(c, function(Y) {
|
|
26540
26540
|
var J = Y.map, K = J.id;
|
|
26541
26541
|
if (Y.enabled && (J.isDefine || G.push(Y), !Y.error)) {
|
|
26542
|
-
if (!Y.inited &&
|
|
26543
|
-
y(K) ? (M = !0, U = !0) : (
|
|
26542
|
+
if (!Y.inited && E)
|
|
26543
|
+
y(K) ? (M = !0, U = !0) : (V.push(K), S(K));
|
|
26544
26544
|
else if (!Y.inited && Y.fetched && J.isDefine && (U = !0, !J.prefix))
|
|
26545
26545
|
return H = !1;
|
|
26546
26546
|
}
|
|
26547
|
-
}),
|
|
26548
|
-
return k = makeError("timeout", "Load timeout for modules: " +
|
|
26547
|
+
}), E && V.length)
|
|
26548
|
+
return k = makeError("timeout", "Load timeout for modules: " + V, null, V), k.contextName = n.contextName, R(k);
|
|
26549
26549
|
H && each(G, function(Y) {
|
|
26550
26550
|
N(Y, {}, {});
|
|
26551
|
-
}), (!
|
|
26551
|
+
}), (!E || M) && U && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
|
|
26552
26552
|
a = 0, $();
|
|
26553
26553
|
}, 50)), t = !1;
|
|
26554
26554
|
}
|
|
@@ -26556,10 +26556,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26556
26556
|
o = function(k) {
|
|
26557
26557
|
this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(i.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
26558
26558
|
}, o.prototype = {
|
|
26559
|
-
init: function(k, M,
|
|
26560
|
-
|
|
26561
|
-
this.emit("error",
|
|
26562
|
-
})), this.depMaps = k && k.slice(0), this.errback =
|
|
26559
|
+
init: function(k, M, q, E) {
|
|
26560
|
+
E = E || {}, !this.inited && (this.factory = M, q ? this.on("error", q) : this.events.error && (q = bind(this, function(V) {
|
|
26561
|
+
this.emit("error", V);
|
|
26562
|
+
})), this.depMaps = k && k.slice(0), this.errback = q, this.inited = !0, this.ignore = E.ignore, E.enabled || this.enabled ? this.enable() : this.check());
|
|
26563
26563
|
},
|
|
26564
26564
|
defineDep: function(k, M) {
|
|
26565
26565
|
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = M);
|
|
@@ -26588,9 +26588,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26588
26588
|
*/
|
|
26589
26589
|
check: function() {
|
|
26590
26590
|
if (!(!this.enabled || this.enabling)) {
|
|
26591
|
-
var k, M,
|
|
26591
|
+
var k, M, q = this.map.id, E = this.depExports, V = this.exports, G = this.factory;
|
|
26592
26592
|
if (!this.inited)
|
|
26593
|
-
hasProp(n.defQueueMap,
|
|
26593
|
+
hasProp(n.defQueueMap, q) || this.fetch();
|
|
26594
26594
|
else if (this.error)
|
|
26595
26595
|
this.emit("error", this.error);
|
|
26596
26596
|
else if (!this.defining) {
|
|
@@ -26598,36 +26598,36 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26598
26598
|
if (isFunction(G)) {
|
|
26599
26599
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
26600
26600
|
try {
|
|
26601
|
-
|
|
26601
|
+
V = n.execCb(q, G, E, V);
|
|
26602
26602
|
} catch (H) {
|
|
26603
26603
|
k = H;
|
|
26604
26604
|
}
|
|
26605
26605
|
else
|
|
26606
|
-
|
|
26607
|
-
if (this.map.isDefine &&
|
|
26606
|
+
V = n.execCb(q, G, E, V);
|
|
26607
|
+
if (this.map.isDefine && V === void 0 && (M = this.module, M ? V = M.exports : this.usingExports && (V = this.exports)), k)
|
|
26608
26608
|
return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", R(this.error = k);
|
|
26609
26609
|
} else
|
|
26610
|
-
|
|
26611
|
-
if (this.exports =
|
|
26610
|
+
V = G;
|
|
26611
|
+
if (this.exports = V, this.map.isDefine && !this.ignore && (p[q] = V, req.onResourceLoad)) {
|
|
26612
26612
|
var U = [];
|
|
26613
26613
|
each(this.depMaps, function(H) {
|
|
26614
26614
|
U.push(H.normalizedMap || H);
|
|
26615
26615
|
}), req.onResourceLoad(n, this.map, U);
|
|
26616
26616
|
}
|
|
26617
|
-
B(
|
|
26617
|
+
B(q), this.defined = !0;
|
|
26618
26618
|
}
|
|
26619
26619
|
this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
|
|
26620
26620
|
}
|
|
26621
26621
|
}
|
|
26622
26622
|
},
|
|
26623
26623
|
callPlugin: function() {
|
|
26624
|
-
var k = this.map, M = k.id,
|
|
26625
|
-
this.depMaps.push(
|
|
26626
|
-
var
|
|
26624
|
+
var k = this.map, M = k.id, q = F(k.prefix);
|
|
26625
|
+
this.depMaps.push(q), T(q, "defined", bind(this, function(E) {
|
|
26626
|
+
var V, G, U, H = getOwn(h, this.map.id), Y = this.map.name, J = this.map.parentMap ? this.map.parentMap.name : null, K = n.makeRequire(k.parentMap, {
|
|
26627
26627
|
enableBuildCallback: !0
|
|
26628
26628
|
});
|
|
26629
26629
|
if (this.map.unnormalized) {
|
|
26630
|
-
|
|
26630
|
+
E.normalize && (Y = E.normalize(Y, function(X) {
|
|
26631
26631
|
return b(X, J, !0);
|
|
26632
26632
|
}) || ""), G = F(
|
|
26633
26633
|
k.prefix + "!" + Y,
|
|
@@ -26653,17 +26653,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26653
26653
|
this.map.url = n.nameToUrl(H), this.load();
|
|
26654
26654
|
return;
|
|
26655
26655
|
}
|
|
26656
|
-
|
|
26656
|
+
V = bind(this, function(X) {
|
|
26657
26657
|
this.init([], function() {
|
|
26658
26658
|
return X;
|
|
26659
26659
|
}, null, {
|
|
26660
26660
|
enabled: !0
|
|
26661
26661
|
});
|
|
26662
|
-
}),
|
|
26662
|
+
}), V.error = bind(this, function(X) {
|
|
26663
26663
|
this.inited = !0, this.error = X, X.requireModules = [M], eachProp(l, function(Q) {
|
|
26664
26664
|
Q.map.id.indexOf(M + "_unnormalized") === 0 && B(Q.map.id);
|
|
26665
26665
|
}), R(X);
|
|
26666
|
-
}),
|
|
26666
|
+
}), V.fromText = bind(this, function(X, Q) {
|
|
26667
26667
|
var ee = k.name, oe = F(ee), te = useInteractive;
|
|
26668
26668
|
Q && (X = Q), te && (useInteractive = !1), I(oe), hasProp(i.config, M) && (i.config[ee] = i.config[M]);
|
|
26669
26669
|
try {
|
|
@@ -26676,21 +26676,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26676
26676
|
[M]
|
|
26677
26677
|
));
|
|
26678
26678
|
}
|
|
26679
|
-
te && (useInteractive = !0), this.depMaps.push(oe), n.completeLoad(ee), K([ee],
|
|
26680
|
-
}),
|
|
26681
|
-
})), n.enable(
|
|
26679
|
+
te && (useInteractive = !0), this.depMaps.push(oe), n.completeLoad(ee), K([ee], V);
|
|
26680
|
+
}), E.load(k.name, K, V, i);
|
|
26681
|
+
})), n.enable(q, this), this.pluginMaps[q.id] = q;
|
|
26682
26682
|
},
|
|
26683
26683
|
enable: function() {
|
|
26684
26684
|
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, M) {
|
|
26685
|
-
var E, V
|
|
26685
|
+
var q, E, V;
|
|
26686
26686
|
if (typeof k == "string") {
|
|
26687
26687
|
if (k = F(
|
|
26688
26688
|
k,
|
|
26689
26689
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
26690
26690
|
!1,
|
|
26691
26691
|
!this.skipMap
|
|
26692
|
-
), this.depMaps[M] = k,
|
|
26693
|
-
this.depExports[M] =
|
|
26692
|
+
), this.depMaps[M] = k, V = getOwn(r, k.id), V) {
|
|
26693
|
+
this.depExports[M] = V(this);
|
|
26694
26694
|
return;
|
|
26695
26695
|
}
|
|
26696
26696
|
this.depCount += 1, T(k, "defined", bind(this, function(G) {
|
|
@@ -26699,27 +26699,27 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26699
26699
|
this.emit("error", G);
|
|
26700
26700
|
}));
|
|
26701
26701
|
}
|
|
26702
|
-
|
|
26702
|
+
q = k.id, E = l[q], !hasProp(r, q) && E && !E.enabled && n.enable(k, this);
|
|
26703
26703
|
})), eachProp(this.pluginMaps, bind(this, function(k) {
|
|
26704
26704
|
var M = getOwn(l, k.id);
|
|
26705
26705
|
M && !M.enabled && n.enable(k, this);
|
|
26706
26706
|
})), this.enabling = !1, this.check();
|
|
26707
26707
|
},
|
|
26708
26708
|
on: function(k, M) {
|
|
26709
|
-
var
|
|
26710
|
-
|
|
26709
|
+
var q = this.events[k];
|
|
26710
|
+
q || (q = this.events[k] = []), q.push(M);
|
|
26711
26711
|
},
|
|
26712
26712
|
emit: function(k, M) {
|
|
26713
|
-
each(this.events[k], function(
|
|
26714
|
-
|
|
26713
|
+
each(this.events[k], function(q) {
|
|
26714
|
+
q(M);
|
|
26715
26715
|
}), k === "error" && delete this.events[k];
|
|
26716
26716
|
}
|
|
26717
26717
|
};
|
|
26718
26718
|
function L(k) {
|
|
26719
26719
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
26720
26720
|
}
|
|
26721
|
-
function w(k, M,
|
|
26722
|
-
k.detachEvent && !isOpera ?
|
|
26721
|
+
function w(k, M, q, E) {
|
|
26722
|
+
k.detachEvent && !isOpera ? E && k.detachEvent(E, M) : k.removeEventListener(q, M, !1);
|
|
26723
26723
|
}
|
|
26724
26724
|
function O(k) {
|
|
26725
26725
|
var M = k.currentTarget || k.srcElement;
|
|
@@ -26756,78 +26756,78 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26756
26756
|
configure: function(k) {
|
|
26757
26757
|
if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
|
|
26758
26758
|
var M = k.urlArgs;
|
|
26759
|
-
k.urlArgs = function(
|
|
26759
|
+
k.urlArgs = function(V, G) {
|
|
26760
26760
|
return (G.indexOf("?") === -1 ? "?" : "&") + M;
|
|
26761
26761
|
};
|
|
26762
26762
|
}
|
|
26763
|
-
var
|
|
26763
|
+
var q = i.shim, E = {
|
|
26764
26764
|
paths: !0,
|
|
26765
26765
|
bundles: !0,
|
|
26766
26766
|
config: !0,
|
|
26767
26767
|
map: !0
|
|
26768
26768
|
};
|
|
26769
|
-
eachProp(k, function(
|
|
26770
|
-
|
|
26771
|
-
}), k.bundles && eachProp(k.bundles, function(
|
|
26772
|
-
each(
|
|
26769
|
+
eachProp(k, function(V, G) {
|
|
26770
|
+
E[G] ? (i[G] || (i[G] = {}), mixin(i[G], V, !0, !0)) : i[G] = V;
|
|
26771
|
+
}), k.bundles && eachProp(k.bundles, function(V, G) {
|
|
26772
|
+
each(V, function(U) {
|
|
26773
26773
|
U !== G && (h[U] = G);
|
|
26774
26774
|
});
|
|
26775
|
-
}), k.shim && (eachProp(k.shim, function(
|
|
26776
|
-
isArray(
|
|
26777
|
-
deps:
|
|
26778
|
-
}), (
|
|
26779
|
-
}), i.shim =
|
|
26775
|
+
}), k.shim && (eachProp(k.shim, function(V, G) {
|
|
26776
|
+
isArray(V) && (V = {
|
|
26777
|
+
deps: V
|
|
26778
|
+
}), (V.exports || V.init) && !V.exportsFn && (V.exportsFn = n.makeShimExports(V)), q[G] = V;
|
|
26779
|
+
}), i.shim = q), k.packages && each(k.packages, function(V) {
|
|
26780
26780
|
var G, U;
|
|
26781
|
-
|
|
26782
|
-
}), eachProp(l, function(
|
|
26783
|
-
!
|
|
26781
|
+
V = typeof V == "string" ? { name: V } : V, U = V.name, G = V.location, G && (i.paths[U] = V.location), i.pkgs[U] = V.name + "/" + (V.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
26782
|
+
}), eachProp(l, function(V, G) {
|
|
26783
|
+
!V.inited && !V.map.unnormalized && (V.map = F(G, null, !0));
|
|
26784
26784
|
}), (k.deps || k.callback) && n.require(k.deps || [], k.callback);
|
|
26785
26785
|
},
|
|
26786
26786
|
makeShimExports: function(k) {
|
|
26787
26787
|
function M() {
|
|
26788
|
-
var
|
|
26789
|
-
return k.init && (
|
|
26788
|
+
var q;
|
|
26789
|
+
return k.init && (q = k.init.apply(global, arguments)), q || k.exports && getGlobal(k.exports);
|
|
26790
26790
|
}
|
|
26791
26791
|
return M;
|
|
26792
26792
|
},
|
|
26793
26793
|
makeRequire: function(k, M) {
|
|
26794
26794
|
M = M || {};
|
|
26795
|
-
function E
|
|
26795
|
+
function q(E, V, G) {
|
|
26796
26796
|
var U, H, Y;
|
|
26797
|
-
return M.enableBuildCallback &&
|
|
26798
|
-
j(), Y = I(F(null, k)), Y.skipMap = M.skipMap, Y.init(
|
|
26797
|
+
return M.enableBuildCallback && V && isFunction(V) && (V.__requireJsBuild = !0), typeof E == "string" ? isFunction(V) ? R(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, E) ? r[E](l[k.id]) : req.get ? req.get(n, E, k, q) : (H = F(E, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : R(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : (j(), n.nextTick(function() {
|
|
26798
|
+
j(), Y = I(F(null, k)), Y.skipMap = M.skipMap, Y.init(E, V, G, {
|
|
26799
26799
|
enabled: !0
|
|
26800
26800
|
}), $();
|
|
26801
|
-
}),
|
|
26801
|
+
}), q);
|
|
26802
26802
|
}
|
|
26803
|
-
return mixin(
|
|
26803
|
+
return mixin(q, {
|
|
26804
26804
|
isBrowser,
|
|
26805
26805
|
/**
|
|
26806
26806
|
* Converts a module name + .extension into an URL path.
|
|
26807
26807
|
* *Requires* the use of a module name. It does not support using
|
|
26808
26808
|
* plain URLs like nameToUrl.
|
|
26809
26809
|
*/
|
|
26810
|
-
toUrl: function(
|
|
26811
|
-
var
|
|
26812
|
-
return G !== -1 && (!H || G > 1) && (
|
|
26813
|
-
|
|
26810
|
+
toUrl: function(E) {
|
|
26811
|
+
var V, G = E.lastIndexOf("."), U = E.split("/")[0], H = U === "." || U === "..";
|
|
26812
|
+
return G !== -1 && (!H || G > 1) && (V = E.substring(G, E.length), E = E.substring(0, G)), n.nameToUrl(b(
|
|
26813
|
+
E,
|
|
26814
26814
|
k && k.id,
|
|
26815
26815
|
!0
|
|
26816
|
-
),
|
|
26816
|
+
), V, !0);
|
|
26817
26817
|
},
|
|
26818
|
-
defined: function(
|
|
26819
|
-
return hasProp(p, F(
|
|
26818
|
+
defined: function(E) {
|
|
26819
|
+
return hasProp(p, F(E, k, !1, !0).id);
|
|
26820
26820
|
},
|
|
26821
|
-
specified: function(
|
|
26822
|
-
return
|
|
26821
|
+
specified: function(E) {
|
|
26822
|
+
return E = F(E, k, !1, !0).id, hasProp(p, E) || hasProp(l, E);
|
|
26823
26823
|
}
|
|
26824
|
-
}), k || (
|
|
26824
|
+
}), k || (q.undef = function(E) {
|
|
26825
26825
|
D();
|
|
26826
|
-
var
|
|
26827
|
-
G.undefed = !0, S(
|
|
26828
|
-
U[0] ===
|
|
26829
|
-
}), delete n.defQueueMap[
|
|
26830
|
-
}),
|
|
26826
|
+
var V = F(E, k, !0), G = getOwn(l, E);
|
|
26827
|
+
G.undefed = !0, S(E), delete p[E], delete m[V.url], delete u[E], eachReverse(d, function(U, H) {
|
|
26828
|
+
U[0] === E && d.splice(H, 1);
|
|
26829
|
+
}), delete n.defQueueMap[E], G && (G.events.defined && (u[E] = G.events), B(E));
|
|
26830
|
+
}), q;
|
|
26831
26831
|
},
|
|
26832
26832
|
/**
|
|
26833
26833
|
* Called to enable a module if it is still in the registry
|
|
@@ -26846,17 +26846,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26846
26846
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
26847
26847
|
*/
|
|
26848
26848
|
completeLoad: function(k) {
|
|
26849
|
-
var M, E, V
|
|
26849
|
+
var M, q, E, V = getOwn(i.shim, k) || {}, G = V.exports;
|
|
26850
26850
|
for (D(); d.length; ) {
|
|
26851
|
-
if (
|
|
26852
|
-
if (
|
|
26851
|
+
if (q = d.shift(), q[0] === null) {
|
|
26852
|
+
if (q[0] = k, M)
|
|
26853
26853
|
break;
|
|
26854
26854
|
M = !0;
|
|
26855
26855
|
} else
|
|
26856
|
-
|
|
26857
|
-
L(
|
|
26856
|
+
q[0] === k && (M = !0);
|
|
26857
|
+
L(q);
|
|
26858
26858
|
}
|
|
26859
|
-
if (n.defQueueMap = {},
|
|
26859
|
+
if (n.defQueueMap = {}, E = getOwn(l, k), !M && !hasProp(p, k) && E && !E.inited) {
|
|
26860
26860
|
if (i.enforceDefine && (!G || !getGlobal(G)))
|
|
26861
26861
|
return y(k) ? void 0 : R(makeError(
|
|
26862
26862
|
"nodefine",
|
|
@@ -26864,7 +26864,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26864
26864
|
null,
|
|
26865
26865
|
[k]
|
|
26866
26866
|
));
|
|
26867
|
-
L([k,
|
|
26867
|
+
L([k, V.deps || [], V.exportsFn]);
|
|
26868
26868
|
}
|
|
26869
26869
|
$();
|
|
26870
26870
|
},
|
|
@@ -26875,19 +26875,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26875
26875
|
* it is assumed to have already been normalized. This is an
|
|
26876
26876
|
* internal API, not a public one. Use toUrl for the public API.
|
|
26877
26877
|
*/
|
|
26878
|
-
nameToUrl: function(k, M,
|
|
26879
|
-
var
|
|
26878
|
+
nameToUrl: function(k, M, q) {
|
|
26879
|
+
var E, V, G, U, H, Y, J, K = getOwn(i.pkgs, k);
|
|
26880
26880
|
if (K && (k = K), J = getOwn(h, k), J)
|
|
26881
|
-
return n.nameToUrl(J, M,
|
|
26881
|
+
return n.nameToUrl(J, M, q);
|
|
26882
26882
|
if (req.jsExtRegExp.test(k))
|
|
26883
26883
|
H = k + (M || "");
|
|
26884
26884
|
else {
|
|
26885
|
-
for (
|
|
26886
|
-
if (U =
|
|
26887
|
-
isArray(Y) && (Y = Y[0]),
|
|
26885
|
+
for (E = i.paths, V = k.split("/"), G = V.length; G > 0; G -= 1)
|
|
26886
|
+
if (U = V.slice(0, G).join("/"), Y = getOwn(E, U), Y) {
|
|
26887
|
+
isArray(Y) && (Y = Y[0]), V.splice(0, G, Y);
|
|
26888
26888
|
break;
|
|
26889
26889
|
}
|
|
26890
|
-
H =
|
|
26890
|
+
H = V.join("/"), H += M || (/^data\:|^blob\:|\?/.test(H) || q ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + H;
|
|
26891
26891
|
}
|
|
26892
26892
|
return i.urlArgs && !/^blob\:/.test(H) ? H + i.urlArgs(k, H) : H;
|
|
26893
26893
|
},
|
|
@@ -26903,8 +26903,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26903
26903
|
*
|
|
26904
26904
|
* @private
|
|
26905
26905
|
*/
|
|
26906
|
-
execCb: function(k, M,
|
|
26907
|
-
return M.apply(
|
|
26906
|
+
execCb: function(k, M, q, E) {
|
|
26907
|
+
return M.apply(E, q);
|
|
26908
26908
|
},
|
|
26909
26909
|
/**
|
|
26910
26910
|
* callback for script loads, used to check status of loading.
|
|
@@ -26925,13 +26925,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
26925
26925
|
onScriptError: function(k) {
|
|
26926
26926
|
var M = O(k);
|
|
26927
26927
|
if (!y(M.id)) {
|
|
26928
|
-
var
|
|
26929
|
-
return eachProp(l, function(
|
|
26930
|
-
|
|
26928
|
+
var q = [];
|
|
26929
|
+
return eachProp(l, function(E, V) {
|
|
26930
|
+
V.indexOf("_@r") !== 0 && each(E.depMaps, function(G) {
|
|
26931
26931
|
if (G.id === M.id)
|
|
26932
|
-
return
|
|
26932
|
+
return q.push(V), !0;
|
|
26933
26933
|
});
|
|
26934
|
-
}), R(makeError("scripterror", 'Script error for "' + M.id + (
|
|
26934
|
+
}), R(makeError("scripterror", 'Script error for "' + M.id + (q.length ? '", needed by: ' + q.join(", ") : '"'), k, [M.id]));
|
|
26935
26935
|
}
|
|
26936
26936
|
}
|
|
26937
26937
|
}, n.require = n.makeRequire(), n;
|
|
@@ -27410,7 +27410,7 @@ function getOperators() {
|
|
|
27410
27410
|
}, o;
|
|
27411
27411
|
}
|
|
27412
27412
|
function parseFullDate(e) {
|
|
27413
|
-
return /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
27413
|
+
return e.includes("T") && e.endsWith("Z") ? new Date(e) : e.includes(" ") ? new Date(e.replace(" ", "T")) : /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
27414
27414
|
}
|
|
27415
27415
|
function parseMonth(e) {
|
|
27416
27416
|
const [t, o] = e.split("-").map(Number);
|
|
@@ -27584,7 +27584,7 @@ class Application {
|
|
|
27584
27584
|
});
|
|
27585
27585
|
}
|
|
27586
27586
|
load() {
|
|
27587
|
-
return
|
|
27587
|
+
return z(this, null, function* () {
|
|
27588
27588
|
var t, o, n, r, a;
|
|
27589
27589
|
try {
|
|
27590
27590
|
this.loading = !0, yield this.loadWebSocket(), yield this.pm.load();
|
|
@@ -27599,7 +27599,7 @@ class Application {
|
|
|
27599
27599
|
});
|
|
27600
27600
|
}
|
|
27601
27601
|
loadWebSocket() {
|
|
27602
|
-
return
|
|
27602
|
+
return z(this, null, function* () {
|
|
27603
27603
|
this.eventBus.addEventListener("ws:message:authorized", () => {
|
|
27604
27604
|
this.setWsAuthorized(!0);
|
|
27605
27605
|
}), this.ws.on("message", (t) => {
|
|
@@ -27855,7 +27855,7 @@ function createTextSettingsItem(e) {
|
|
|
27855
27855
|
}
|
|
27856
27856
|
};
|
|
27857
27857
|
}
|
|
27858
|
-
const linkageAction$1 = (l, c) =>
|
|
27858
|
+
const linkageAction$1 = (l, c) => z(void 0, [l, c], function* ({
|
|
27859
27859
|
operator: e,
|
|
27860
27860
|
condition: t,
|
|
27861
27861
|
variables: o,
|
|
@@ -27880,7 +27880,7 @@ const linkageAction$1 = (l, c) => q(void 0, [l, c], function* ({
|
|
|
27880
27880
|
}), useReactiveLinkageEffect = (e, t, o, n) => {
|
|
27881
27881
|
const a = useApp().jsonLogic, [i, l] = useState(null), c = useCollectionRecord();
|
|
27882
27882
|
return useEffect(() => {
|
|
27883
|
-
|
|
27883
|
+
z(void 0, null, function* () {
|
|
27884
27884
|
const d = [];
|
|
27885
27885
|
for (const p of e.filter((m) => !m.disabled))
|
|
27886
27886
|
for (const m of p.actions || [])
|
|
@@ -28002,7 +28002,7 @@ function useRecordRequest(e) {
|
|
|
28002
28002
|
const F = r.filterByTk === void 0 ? _.omit(r, "filterByTk") : r, I = x(x({}, F), v);
|
|
28003
28003
|
return (T = o[n]) == null ? void 0 : T.call(o, I).then((R) => R.data);
|
|
28004
28004
|
};
|
|
28005
|
-
return useRequest((...v) =>
|
|
28005
|
+
return useRequest((...v) => z(this, null, function* () {
|
|
28006
28006
|
const [F, I] = yield Promise.all([
|
|
28007
28007
|
(i || b)(...v),
|
|
28008
28008
|
requestParentRecordData({ sourceId: c, association: u, parentRecord: d, api: p, headers: h, sourceKey: g })
|
|
@@ -28015,7 +28015,7 @@ function useRecordRequest(e) {
|
|
|
28015
28015
|
}));
|
|
28016
28016
|
}
|
|
28017
28017
|
function requestParentRecordData(i) {
|
|
28018
|
-
return
|
|
28018
|
+
return z(this, arguments, function* ({
|
|
28019
28019
|
sourceId: e,
|
|
28020
28020
|
association: t,
|
|
28021
28021
|
parentRecord: o,
|
|
@@ -28391,7 +28391,7 @@ const useStyles$a = genStyleHook("nb-markdown", (e, { isDarkTheme: t }) => {
|
|
|
28391
28391
|
".field-interface-datetime": { minWidth: "100px" }
|
|
28392
28392
|
}, t ? a : r)
|
|
28393
28393
|
};
|
|
28394
|
-
}), parseMarkdown = _.memoize((e) =>
|
|
28394
|
+
}), parseMarkdown = _.memoize((e) => z(void 0, null, function* () {
|
|
28395
28395
|
return e && (yield import("./md-oH2RssNY.mjs")).default.render(e);
|
|
28396
28396
|
}));
|
|
28397
28397
|
function useParseMarkdown(e) {
|
|
@@ -28492,8 +28492,8 @@ const MarkdownEditor = (e) => {
|
|
|
28492
28492
|
observer$1((e) => {
|
|
28493
28493
|
const { isDarkTheme: t } = useGlobalTheme(), { componentCls: o, hashId: n } = useStyles$a({ isDarkTheme: t }), { content: r, className: a } = e, i = 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);
|
|
28494
28494
|
useCompile(), useEffect(() => {
|
|
28495
|
-
y(!0),
|
|
28496
|
-
setTimeout(() =>
|
|
28495
|
+
y(!0), z(void 0, null, function* () {
|
|
28496
|
+
setTimeout(() => z(void 0, null, function* () {
|
|
28497
28497
|
const T = yield getRenderContent(b, r, f, C, parseMarkdown);
|
|
28498
28498
|
g(T);
|
|
28499
28499
|
})), y(!1);
|
|
@@ -28518,7 +28518,7 @@ const MarkdownEditor = (e) => {
|
|
|
28518
28518
|
onCancel: () => {
|
|
28519
28519
|
i.editable = !1, d == null || d();
|
|
28520
28520
|
},
|
|
28521
|
-
onSubmit: (I) =>
|
|
28521
|
+
onSubmit: (I) => z(void 0, null, function* () {
|
|
28522
28522
|
var T;
|
|
28523
28523
|
i.editable = !1, (T = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = I, i.componentProps.content = I, u == null || u(l), c.emit("patch", {
|
|
28524
28524
|
schema: {
|
|
@@ -28676,7 +28676,7 @@ function getFormValues({
|
|
|
28676
28676
|
}
|
|
28677
28677
|
function useCollectValuesToSubmit() {
|
|
28678
28678
|
const e = useForm(), t = useFilterByTk(), { field: o, resource: n } = useBlockRequestContext(), { fields: r, getField: a, getTreeParentField: i, 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();
|
|
28679
|
-
return useCallback(() =>
|
|
28679
|
+
return useCallback(() => z(this, null, function* () {
|
|
28680
28680
|
var F, I, T, R;
|
|
28681
28681
|
const { assignedValues: f = {}, overwriteValues: C } = (F = h == null ? void 0 : h["x-action-settings"]) != null ? F : {}, b = getFormValues({
|
|
28682
28682
|
filterByTk: t,
|
|
@@ -28686,7 +28686,7 @@ function useCollectValuesToSubmit() {
|
|
|
28686
28686
|
getField: a,
|
|
28687
28687
|
resource: n,
|
|
28688
28688
|
actionFields: (d == null ? void 0 : d("form")) || []
|
|
28689
|
-
}), S = {}, y = Object.keys(f).map((D) =>
|
|
28689
|
+
}), S = {}, y = Object.keys(f).map((D) => z(this, null, function* () {
|
|
28690
28690
|
const B = f[D], N = a(D);
|
|
28691
28691
|
if (isVariable$1(B)) {
|
|
28692
28692
|
const { value: $ } = (yield p == null ? void 0 : p.parseVariable(B, m)) || {};
|
|
@@ -28721,7 +28721,7 @@ const useCreateActionProps = () => {
|
|
|
28721
28721
|
const e = useFilterByTk(), t = useCollectionRecord(), o = useForm(), { field: n, resource: r } = useBlockRequestContext(), { setVisible: a, setSubmitted: i, 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 = ((v = d.componentProps.filterKeys) == null ? void 0 : v.checked) || [], S = useLocalVariables$1(), y = useVariables$1();
|
|
28722
28722
|
return {
|
|
28723
28723
|
onClick() {
|
|
28724
|
-
return
|
|
28724
|
+
return z(this, null, function* () {
|
|
28725
28725
|
var O, j;
|
|
28726
28726
|
const { onSuccess: I, skipValidator: T, triggerWorkflows: R } = (O = u == null ? void 0 : u["x-action-settings"]) != null ? O : {}, {
|
|
28727
28727
|
manualClose: D,
|
|
@@ -28739,7 +28739,7 @@ const useCreateActionProps = () => {
|
|
|
28739
28739
|
filterKeys: b,
|
|
28740
28740
|
filterByTk: e,
|
|
28741
28741
|
// TODO(refactor): should change to inject by plugin
|
|
28742
|
-
triggerWorkflows: R != null && R.length ? R.map((
|
|
28742
|
+
triggerWorkflows: R != null && R.length ? R.map((q) => [q.workflowKey, q.context].filter(Boolean).join("!")).join(",") : void 0,
|
|
28743
28743
|
updateAssociationValues: g
|
|
28744
28744
|
});
|
|
28745
28745
|
let M = N;
|
|
@@ -28752,7 +28752,7 @@ const useCreateActionProps = () => {
|
|
|
28752
28752
|
}
|
|
28753
28753
|
D ? m.success({
|
|
28754
28754
|
title: p($),
|
|
28755
|
-
onOk: () =>
|
|
28755
|
+
onOk: () => z(this, null, function* () {
|
|
28756
28756
|
yield resetFormCorrectly(o), (B && !L || L === "redirect") && M && (isURL(M) ? window.location.href = M : c(M));
|
|
28757
28757
|
})
|
|
28758
28758
|
}) : (message.success(p($)), yield resetFormCorrectly(o), (B && !L || L === "redirect") && M && (isURL(M) ? window.location.href = M : c(M)));
|
|
@@ -28767,15 +28767,15 @@ const useCreateActionProps = () => {
|
|
|
28767
28767
|
const e = useForm(), { field: t, resource: o, __parent: n } = useBlockRequestContext(), { setVisible: r, fieldSchema: a, setSubmitted: i } = 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) || [];
|
|
28768
28768
|
return {
|
|
28769
28769
|
onClick() {
|
|
28770
|
-
return
|
|
28771
|
-
var M, E, V,
|
|
28770
|
+
return z(this, null, function* () {
|
|
28771
|
+
var M, q, E, V, G, U;
|
|
28772
28772
|
const T = u.map((H) => H.name), {
|
|
28773
28773
|
assignedValues: R = {},
|
|
28774
28774
|
onSuccess: D,
|
|
28775
28775
|
overwriteValues: B,
|
|
28776
28776
|
skipValidator: N,
|
|
28777
28777
|
triggerWorkflows: $
|
|
28778
|
-
} = (M = l == null ? void 0 : l["x-action-settings"]) != null ? M : {}, L = (
|
|
28778
|
+
} = (M = l == null ? void 0 : l["x-action-settings"]) != null ? M : {}, L = (q = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : q.addChild, { successMessage: w } = D || {}, O = {}, j = Object.keys(R).map((H) => z(this, null, function* () {
|
|
28779
28779
|
const Y = R[H], J = d(H);
|
|
28780
28780
|
if (isVariable$1(Y)) {
|
|
28781
28781
|
const { value: K } = (yield C == null ? void 0 : C.parseVariable(Y, b)) || {};
|
|
@@ -28795,7 +28795,7 @@ const useCreateActionProps = () => {
|
|
|
28795
28795
|
});
|
|
28796
28796
|
if (L) {
|
|
28797
28797
|
const H = p();
|
|
28798
|
-
k[(
|
|
28798
|
+
k[(E = H == null ? void 0 : H.name) != null ? E : "parent"] = f, k[(V = H == null ? void 0 : H.foreignKey) != null ? V : "parentId"] = f.id;
|
|
28799
28799
|
}
|
|
28800
28800
|
c.data = t.data || {}, c.data.loading = !0;
|
|
28801
28801
|
try {
|
|
@@ -28834,10 +28834,10 @@ const useCreateActionProps = () => {
|
|
|
28834
28834
|
}
|
|
28835
28835
|
}, useDoFilter = () => {
|
|
28836
28836
|
const e = useForm(), { getDataBlocks: t } = useFilterBlock(), o = useCollectionManager(), { getOperators: n } = useOperators(), r = useFieldSchema(), { name: a } = useCollection(), { targets: i = [], uid: l } = useMemo(() => findFilterTargets(r), [r]), c = useCallback(() => removeNullCondition(transformToFilter(e.values, n(), o.getCollectionField.bind(o), a)), [e.values, o, n, a]), u = useCallback(
|
|
28837
|
-
(...p) =>
|
|
28837
|
+
(...p) => z(void 0, [...p], function* ({ doNothingWhenFilterIsEmpty: d = !1 } = {}) {
|
|
28838
28838
|
try {
|
|
28839
28839
|
yield Promise.all(
|
|
28840
|
-
t().map((m) =>
|
|
28840
|
+
t().map((m) => z(void 0, null, function* () {
|
|
28841
28841
|
var b, S, y, v;
|
|
28842
28842
|
if (!i.find((F) => F.uid === m.uid))
|
|
28843
28843
|
return;
|
|
@@ -28883,7 +28883,7 @@ const useCreateActionProps = () => {
|
|
|
28883
28883
|
const o = useForm();
|
|
28884
28884
|
return {
|
|
28885
28885
|
onClick() {
|
|
28886
|
-
return
|
|
28886
|
+
return z(this, null, function* () {
|
|
28887
28887
|
yield o.submit(), t.data.loading = !0, yield e(), t.data.loading = !1;
|
|
28888
28888
|
});
|
|
28889
28889
|
}
|
|
@@ -28891,7 +28891,7 @@ const useCreateActionProps = () => {
|
|
|
28891
28891
|
}, useDoReset = () => {
|
|
28892
28892
|
const e = useForm(), t = useFieldSchema(), { getDataBlocks: o } = useFilterBlock(), { targets: n, uid: r } = findFilterTargets(t), { doFilter: a, getFilterFromCurrentForm: i } = useDoFilter();
|
|
28893
28893
|
return {
|
|
28894
|
-
doReset: () =>
|
|
28894
|
+
doReset: () => z(void 0, null, function* () {
|
|
28895
28895
|
var l;
|
|
28896
28896
|
if (yield e.reset(void 0, {
|
|
28897
28897
|
forceClear: !!((l = t == null ? void 0 : t["x-component-props"]) != null && l.clearDefaultValue)
|
|
@@ -28904,7 +28904,7 @@ const useCreateActionProps = () => {
|
|
|
28904
28904
|
const e = useField(), { doReset: t } = useDoReset();
|
|
28905
28905
|
return e.data = e.data || {}, {
|
|
28906
28906
|
onClick() {
|
|
28907
|
-
return
|
|
28907
|
+
return z(this, null, function* () {
|
|
28908
28908
|
e.data.loading = !0, yield t(), e.data.loading = !1;
|
|
28909
28909
|
});
|
|
28910
28910
|
}
|
|
@@ -28913,7 +28913,7 @@ const useCreateActionProps = () => {
|
|
|
28913
28913
|
const { resource: e, __parent: t, service: o } = useBlockRequestContext(), n = useFilterByTk(), r = useFieldSchema(), a = useNavigateNoUpdate(), i = useCompile(), l = useForm(), { modal: c } = App.useApp(), u = useVariables$1(), d = useLocalVariables$1({ currentForm: l }), { name: p, getField: m } = useCollection_deprecated(), { setVisible: h } = useActionContext();
|
|
28914
28914
|
return {
|
|
28915
28915
|
onClick(f, C) {
|
|
28916
|
-
return
|
|
28916
|
+
return z(this, null, function* () {
|
|
28917
28917
|
var w, O, j, k;
|
|
28918
28918
|
const {
|
|
28919
28919
|
assignedValues: b = {},
|
|
@@ -28926,13 +28926,13 @@ const useCreateActionProps = () => {
|
|
|
28926
28926
|
redirectTo: T,
|
|
28927
28927
|
successMessage: R,
|
|
28928
28928
|
actionAfterSuccess: D
|
|
28929
|
-
} = S || {}, B = {}, N = Object.keys(b).map((M) =>
|
|
28930
|
-
const
|
|
28931
|
-
if (isVariable$1(
|
|
28932
|
-
const { value:
|
|
28933
|
-
|
|
28929
|
+
} = S || {}, B = {}, N = Object.keys(b).map((M) => z(this, null, function* () {
|
|
28930
|
+
const q = b[M], E = m(M);
|
|
28931
|
+
if (isVariable$1(q)) {
|
|
28932
|
+
const { value: V } = (yield u == null ? void 0 : u.parseVariable(q, d)) || {};
|
|
28933
|
+
V && (B[M] = transformVariableValue(V, { targetCollectionField: E }));
|
|
28934
28934
|
} else
|
|
28935
|
-
|
|
28935
|
+
q !== "" && (B[M] = q);
|
|
28936
28936
|
}));
|
|
28937
28937
|
yield Promise.all(N), y === !1 && (yield l.submit());
|
|
28938
28938
|
const $ = yield e.update({
|
|
@@ -28947,7 +28947,7 @@ const useCreateActionProps = () => {
|
|
|
28947
28947
|
localVariables: [...d, { name: "$record", ctx: new Proxy((O = $ == null ? void 0 : $.data) == null ? void 0 : O.data, {}) }]
|
|
28948
28948
|
})), (D === "previous" || !D && I !== !0) && (h == null || h(!1)), C && (C == null || C()), e instanceof TableFieldResource || (k = (j = t == null ? void 0 : t.service) == null ? void 0 : j.refresh) == null || k.call(j), R && (F ? c.success({
|
|
28949
28949
|
title: i(R),
|
|
28950
|
-
onOk: () =>
|
|
28950
|
+
onOk: () => z(this, null, function* () {
|
|
28951
28951
|
(I && !D || D === "redirect") && L && (isURL(L) ? window.location.href = L : a(L));
|
|
28952
28952
|
})
|
|
28953
28953
|
}) : (message.success(i(R)), (I && !D || D === "redirect") && L && (isURL(L) ? window.location.href = L : a(L))));
|
|
@@ -28961,7 +28961,7 @@ const useCreateActionProps = () => {
|
|
|
28961
28961
|
const { name: f, getField: C } = useCollection_deprecated(), b = useLocalVariables$1(), { setVisible: S } = useActionContext();
|
|
28962
28962
|
return {
|
|
28963
28963
|
onClick() {
|
|
28964
|
-
return
|
|
28964
|
+
return z(this, null, function* () {
|
|
28965
28965
|
var M;
|
|
28966
28966
|
const {
|
|
28967
28967
|
assignedValues: R = {},
|
|
@@ -28969,23 +28969,23 @@ const useCreateActionProps = () => {
|
|
|
28969
28969
|
updateMode: B
|
|
28970
28970
|
} = (M = a == null ? void 0 : a["x-action-settings"]) != null ? M : {}, { manualClose: N, redirecting: $, redirectTo: L, successMessage: w, actionAfterSuccess: O } = D || {};
|
|
28971
28971
|
m.data = e.data || {}, m.data.loading = !0;
|
|
28972
|
-
const j = {}, k = Object.keys(R).map((
|
|
28973
|
-
const
|
|
28974
|
-
if (isVariable$1(
|
|
28975
|
-
const { value: U } = (yield g == null ? void 0 : g.parseVariable(
|
|
28976
|
-
U && (j[
|
|
28972
|
+
const j = {}, k = Object.keys(R).map((E) => z(this, null, function* () {
|
|
28973
|
+
const V = R[E], G = C(E);
|
|
28974
|
+
if (isVariable$1(V)) {
|
|
28975
|
+
const { value: U } = (yield g == null ? void 0 : g.parseVariable(V, b)) || {};
|
|
28976
|
+
U && (j[E] = transformVariableValue(U, { targetCollectionField: G }));
|
|
28977
28977
|
} else
|
|
28978
|
-
|
|
28978
|
+
V !== "" && (j[E] = V);
|
|
28979
28979
|
}));
|
|
28980
28980
|
yield Promise.all(k), (O === "previous" || !O && $ !== !0) && (S == null || S(!1)), h.confirm({
|
|
28981
28981
|
title: p("Bulk update"),
|
|
28982
28982
|
content: p(B === "selected" ? "Update selected data?" : "Update all data?"),
|
|
28983
28983
|
onOk() {
|
|
28984
|
-
return
|
|
28984
|
+
return z(this, null, function* () {
|
|
28985
28985
|
var G, U, H, Y;
|
|
28986
|
-
const { filter:
|
|
28986
|
+
const { filter: E } = (U = (G = n.params) == null ? void 0 : G[0]) != null ? U : {}, V = {
|
|
28987
28987
|
values: x({}, j),
|
|
28988
|
-
filter:
|
|
28988
|
+
filter: E,
|
|
28989
28989
|
forceUpdate: !1
|
|
28990
28990
|
};
|
|
28991
28991
|
if (B === "selected") {
|
|
@@ -28993,25 +28993,25 @@ const useCreateActionProps = () => {
|
|
|
28993
28993
|
message.error(p("Please select the records to be updated")), m.data.loading = !1;
|
|
28994
28994
|
return;
|
|
28995
28995
|
}
|
|
28996
|
-
|
|
28996
|
+
V.filter = { $and: [{ [l || "id"]: { $in: c } }] };
|
|
28997
28997
|
}
|
|
28998
|
-
|
|
28998
|
+
V.filter || (V.forceUpdate = !0);
|
|
28999
28999
|
try {
|
|
29000
|
-
yield t.update(
|
|
29000
|
+
yield t.update(V);
|
|
29001
29001
|
} catch (J) {
|
|
29002
29002
|
} finally {
|
|
29003
29003
|
m.data.loading = !1;
|
|
29004
29004
|
}
|
|
29005
29005
|
t instanceof TableFieldResource || (Y = (H = o == null ? void 0 : o.service) == null ? void 0 : H.refresh) == null || Y.call(H), w && (N ? h.success({
|
|
29006
29006
|
title: d(w),
|
|
29007
|
-
onOk: () =>
|
|
29007
|
+
onOk: () => z(this, null, function* () {
|
|
29008
29008
|
($ && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L));
|
|
29009
29009
|
})
|
|
29010
29010
|
}) : (message.success(d(w)), ($ && !O || O === "redirect") && L && (isURL(L) ? window.location.href = L : u(L))));
|
|
29011
29011
|
});
|
|
29012
29012
|
},
|
|
29013
29013
|
onCancel() {
|
|
29014
|
-
return
|
|
29014
|
+
return z(this, null, function* () {
|
|
29015
29015
|
m.data.loading = !1;
|
|
29016
29016
|
});
|
|
29017
29017
|
}
|
|
@@ -29024,9 +29024,9 @@ const useCreateActionProps = () => {
|
|
|
29024
29024
|
const e = useAPIClient(), t = useNavigateNoUpdate(), o = useFilterByTk(), n = useFieldSchema(), r = useCompile(), a = useForm(), { fields: i, 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() || {};
|
|
29025
29025
|
return {
|
|
29026
29026
|
onClick() {
|
|
29027
|
-
return
|
|
29028
|
-
var
|
|
29029
|
-
const { skipValidator: I, onSuccess: T, requestSettings: R } = (
|
|
29027
|
+
return z(this, null, function* () {
|
|
29028
|
+
var E, V, G, U;
|
|
29029
|
+
const { skipValidator: I, onSuccess: T, requestSettings: R } = (E = n == null ? void 0 : n["x-action-settings"]) != null ? E : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: $, actionAfterSuccess: L } = T || {}, w = n == null ? void 0 : n["x-action"];
|
|
29030
29030
|
if (!R.url)
|
|
29031
29031
|
return;
|
|
29032
29032
|
I !== !0 && w === "customize:form:request" && (yield a.submit());
|
|
@@ -29043,7 +29043,7 @@ const useCreateActionProps = () => {
|
|
|
29043
29043
|
});
|
|
29044
29044
|
Object.assign(k, Y);
|
|
29045
29045
|
}
|
|
29046
|
-
const
|
|
29046
|
+
const q = {
|
|
29047
29047
|
url: renderTemplate(R.url, { currentRecord: m, currentUser: g }),
|
|
29048
29048
|
method: R.method,
|
|
29049
29049
|
headers: parse(O)({ currentRecord: m, currentUser: g }),
|
|
@@ -29052,9 +29052,9 @@ const useCreateActionProps = () => {
|
|
|
29052
29052
|
};
|
|
29053
29053
|
f.data = c.data || {}, f.data.loading = !0;
|
|
29054
29054
|
try {
|
|
29055
|
-
yield e.request(x({},
|
|
29055
|
+
yield e.request(x({}, q)), f.data.loading = !1, u instanceof TableFieldResource || (G = (V = d == null ? void 0 : d.service) == null ? void 0 : V.refresh) == null || G.call(V), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (L === "previous" || !L && B !== !0) && (b == null || b(!1)), $ || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
|
|
29056
29056
|
title: r($),
|
|
29057
|
-
onOk: () =>
|
|
29057
|
+
onOk: () => z(this, null, function* () {
|
|
29058
29058
|
(B && !L || L === "redirect") && N && (isURL(N) ? window.location.href = N : t(N));
|
|
29059
29059
|
})
|
|
29060
29060
|
}) : message.success(r($));
|
|
@@ -29068,21 +29068,21 @@ const useCreateActionProps = () => {
|
|
|
29068
29068
|
const e = useForm(), t = useFilterByTk(), { field: o, resource: n, __parent: r } = useBlockRequestContext(), { setVisible: a, setFormValueChanged: i } = 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() || {};
|
|
29069
29069
|
return {
|
|
29070
29070
|
onClick(F, I) {
|
|
29071
|
-
return
|
|
29072
|
-
var
|
|
29071
|
+
return z(this, null, function* () {
|
|
29072
|
+
var V, G;
|
|
29073
29073
|
const {
|
|
29074
29074
|
assignedValues: T = {},
|
|
29075
29075
|
onSuccess: R,
|
|
29076
29076
|
overwriteValues: D,
|
|
29077
29077
|
skipValidator: B,
|
|
29078
29078
|
triggerWorkflows: N
|
|
29079
|
-
} = (
|
|
29079
|
+
} = (V = l == null ? void 0 : l["x-action-settings"]) != null ? V : {}, {
|
|
29080
29080
|
manualClose: $,
|
|
29081
29081
|
redirecting: L,
|
|
29082
29082
|
redirectTo: w,
|
|
29083
29083
|
successMessage: O,
|
|
29084
29084
|
actionAfterSuccess: j
|
|
29085
|
-
} = R || {}, k = {}, M = Object.keys(T).map((U) =>
|
|
29085
|
+
} = R || {}, k = {}, M = Object.keys(T).map((U) => z(this, null, function* () {
|
|
29086
29086
|
const H = T[U], Y = d(U);
|
|
29087
29087
|
if (isVariable$1(H)) {
|
|
29088
29088
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(H, S)) || {};
|
|
@@ -29091,11 +29091,11 @@ const useCreateActionProps = () => {
|
|
|
29091
29091
|
H !== "" && (k[U] = H);
|
|
29092
29092
|
}));
|
|
29093
29093
|
yield Promise.all(M), B || (yield e.submit());
|
|
29094
|
-
const
|
|
29094
|
+
const q = u.map((U) => U.name), E = getFormValues({
|
|
29095
29095
|
filterByTk: t,
|
|
29096
29096
|
field: o,
|
|
29097
29097
|
form: e,
|
|
29098
|
-
fieldNames:
|
|
29098
|
+
fieldNames: q,
|
|
29099
29099
|
getField: d,
|
|
29100
29100
|
resource: n,
|
|
29101
29101
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
@@ -29104,7 +29104,7 @@ const useCreateActionProps = () => {
|
|
|
29104
29104
|
try {
|
|
29105
29105
|
const U = yield n.update(P(x({
|
|
29106
29106
|
filterByTk: t,
|
|
29107
|
-
values: x(x(x({},
|
|
29107
|
+
values: x(x(x({}, E), D), k)
|
|
29108
29108
|
}, C), {
|
|
29109
29109
|
updateAssociationValues: g,
|
|
29110
29110
|
// TODO(refactor): should change to inject by plugin
|
|
@@ -29119,7 +29119,7 @@ const useCreateActionProps = () => {
|
|
|
29119
29119
|
return;
|
|
29120
29120
|
$ ? f.success({
|
|
29121
29121
|
title: m(O),
|
|
29122
|
-
onOk: () =>
|
|
29122
|
+
onOk: () => z(this, null, function* () {
|
|
29123
29123
|
yield e.reset(), (L && !j || j === "redirect") && H && (isURL(H) ? window.location.href = H : c(H));
|
|
29124
29124
|
})
|
|
29125
29125
|
}) : (message.success(m(O)), (L && !j || j === "redirect" || j === "redirect") && H && (isURL(H) ? window.location.href = H : c(H)));
|
|
@@ -29133,7 +29133,7 @@ const useCreateActionProps = () => {
|
|
|
29133
29133
|
const e = useFilterByTk(), { resource: t, service: o, block: n, __parent: r } = useBlockRequestContext(), { setVisible: a, setSubmitted: i } = useActionContext(), l = useParamsFromRecord(), c = useFieldSchema();
|
|
29134
29134
|
return {
|
|
29135
29135
|
onClick(d, p) {
|
|
29136
|
-
return
|
|
29136
|
+
return z(this, null, function* () {
|
|
29137
29137
|
var C, b, S, y, v, F, I;
|
|
29138
29138
|
const { triggerWorkflows: m } = (C = c == null ? void 0 : c["x-action-settings"]) != null ? C : {};
|
|
29139
29139
|
yield t.destroy(x({
|
|
@@ -29154,7 +29154,7 @@ const useCreateActionProps = () => {
|
|
|
29154
29154
|
const t = useFilterByTk(), n = useAPIClient().resource(e, t);
|
|
29155
29155
|
return {
|
|
29156
29156
|
onClick(a) {
|
|
29157
|
-
return
|
|
29157
|
+
return z(this, null, function* () {
|
|
29158
29158
|
yield n.remove({
|
|
29159
29159
|
values: [a.id]
|
|
29160
29160
|
});
|
|
@@ -29165,7 +29165,7 @@ const useCreateActionProps = () => {
|
|
|
29165
29165
|
const e = useFilterByTk(), { resource: t, service: o, block: n, __parent: r } = useBlockRequestContext(), { setVisible: a, setSubmitted: i, setFormValueChanged: l } = useActionContext();
|
|
29166
29166
|
return {
|
|
29167
29167
|
onClick(u, d) {
|
|
29168
|
-
return
|
|
29168
|
+
return z(this, null, function* () {
|
|
29169
29169
|
var g, f, C, b;
|
|
29170
29170
|
yield t.remove({
|
|
29171
29171
|
values: [e]
|
|
@@ -29181,7 +29181,7 @@ const useCreateActionProps = () => {
|
|
|
29181
29181
|
const { field: e } = useBlockRequestContext(), { resource: t, service: o } = useBlockRequestContext(), { setSubmitted: n } = useActionContext(), r = useCollection_deprecated(), { filterTargetKey: a } = r;
|
|
29182
29182
|
return {
|
|
29183
29183
|
onClick(l, c) {
|
|
29184
|
-
return
|
|
29184
|
+
return z(this, null, function* () {
|
|
29185
29185
|
var m, h, g, f, C, b, S;
|
|
29186
29186
|
let u = (m = e.data) == null ? void 0 : m.selectedRowKeys;
|
|
29187
29187
|
if (Array.isArray(a) && (u = e.data.selectedRowData.map((y) => {
|
|
@@ -29203,7 +29203,7 @@ const useCreateActionProps = () => {
|
|
|
29203
29203
|
const { service: e } = useBlockRequestContext();
|
|
29204
29204
|
return {
|
|
29205
29205
|
onClick() {
|
|
29206
|
-
return
|
|
29206
|
+
return z(this, null, function* () {
|
|
29207
29207
|
var o;
|
|
29208
29208
|
(o = e == null ? void 0 : e.refresh) == null || o.call(e);
|
|
29209
29209
|
});
|
|
@@ -29221,7 +29221,7 @@ const useCreateActionProps = () => {
|
|
|
29221
29221
|
showSizeChanger: !1,
|
|
29222
29222
|
align: "center",
|
|
29223
29223
|
onChange(v) {
|
|
29224
|
-
return
|
|
29224
|
+
return z(this, null, function* () {
|
|
29225
29225
|
var I, T;
|
|
29226
29226
|
const F = (T = (I = e.service) == null ? void 0 : I.params) == null ? void 0 : T[0];
|
|
29227
29227
|
e.service.run(P(x({}, F), { page: v }));
|
|
@@ -29250,7 +29250,7 @@ const useCreateActionProps = () => {
|
|
|
29250
29250
|
showSizeChanger: !1,
|
|
29251
29251
|
align: "center",
|
|
29252
29252
|
onChange(y) {
|
|
29253
|
-
return
|
|
29253
|
+
return z(this, null, function* () {
|
|
29254
29254
|
var F, I;
|
|
29255
29255
|
const v = (I = (F = e.service) == null ? void 0 : F.params) == null ? void 0 : I[0];
|
|
29256
29256
|
e.service.run(P(x({}, v), { page: y }));
|
|
@@ -29352,25 +29352,25 @@ const useCreateActionProps = () => {
|
|
|
29352
29352
|
var U, H, Y, J;
|
|
29353
29353
|
if (!O.find((K) => K.uid === k.uid))
|
|
29354
29354
|
return;
|
|
29355
|
-
const
|
|
29355
|
+
const q = `${j}${t.name}`, E = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
29356
29356
|
(Y = (H = k.service.params) == null ? void 0 : H[1]) != null && Y.filters || _.set(k.service.params, "[1].filters", {});
|
|
29357
|
-
const
|
|
29357
|
+
const V = k.service.params[1].filters;
|
|
29358
29358
|
if (w.length)
|
|
29359
|
-
|
|
29359
|
+
V[q] = {
|
|
29360
29360
|
[S]: w
|
|
29361
29361
|
};
|
|
29362
29362
|
else {
|
|
29363
29363
|
if ((J = k.clearSelection) == null || J.call(k), k.dataLoadingMode === "manual")
|
|
29364
29364
|
return k.clearData();
|
|
29365
|
-
delete
|
|
29365
|
+
delete V[q];
|
|
29366
29366
|
}
|
|
29367
|
-
const G = mergeFilter([...Object.values(
|
|
29367
|
+
const G = mergeFilter([...Object.values(V), k.defaultFilter]);
|
|
29368
29368
|
return k.doFilter(
|
|
29369
|
-
P(x({},
|
|
29369
|
+
P(x({}, E), {
|
|
29370
29370
|
page: 1,
|
|
29371
29371
|
filter: G
|
|
29372
29372
|
}),
|
|
29373
|
-
{ filters:
|
|
29373
|
+
{ filters: V }
|
|
29374
29374
|
);
|
|
29375
29375
|
});
|
|
29376
29376
|
},
|
|
@@ -29392,7 +29392,7 @@ const useCreateActionProps = () => {
|
|
|
29392
29392
|
p = j;
|
|
29393
29393
|
return;
|
|
29394
29394
|
}
|
|
29395
|
-
p = j.filter((
|
|
29395
|
+
p = j.filter((q) => q.label.includes(M));
|
|
29396
29396
|
};
|
|
29397
29397
|
} else
|
|
29398
29398
|
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
@@ -29415,14 +29415,14 @@ const useCreateActionProps = () => {
|
|
|
29415
29415
|
};
|
|
29416
29416
|
};
|
|
29417
29417
|
function doReset(n) {
|
|
29418
|
-
return
|
|
29418
|
+
return z(this, arguments, function* ({
|
|
29419
29419
|
getDataBlocks: e,
|
|
29420
29420
|
targets: t,
|
|
29421
29421
|
uid: o
|
|
29422
29422
|
}) {
|
|
29423
29423
|
try {
|
|
29424
29424
|
yield Promise.all(
|
|
29425
|
-
e().map((r) =>
|
|
29425
|
+
e().map((r) => z(this, null, function* () {
|
|
29426
29426
|
var u, d, p, m;
|
|
29427
29427
|
if (!t.find((h) => h.uid === r.uid))
|
|
29428
29428
|
return;
|
|
@@ -29561,7 +29561,7 @@ function getTargetField(e) {
|
|
|
29561
29561
|
return o.slice(0, n);
|
|
29562
29562
|
}
|
|
29563
29563
|
function resetFormCorrectly(e) {
|
|
29564
|
-
return
|
|
29564
|
+
return z(this, null, function* () {
|
|
29565
29565
|
untracked(() => {
|
|
29566
29566
|
Object.keys(e.fields).forEach((t) => {
|
|
29567
29567
|
isSubMode(e.fields[t]) && (e.fields[t].initialValue = null);
|
|
@@ -29575,7 +29575,7 @@ function appendQueryStringToUrl(e, t) {
|
|
|
29575
29575
|
const useParseURLAndParams = () => {
|
|
29576
29576
|
const e = useVariables$1(), t = useLocalVariables$1();
|
|
29577
29577
|
return { parseURLAndParams: useCallback(
|
|
29578
|
-
(n, r) =>
|
|
29578
|
+
(n, r) => z(void 0, null, function* () {
|
|
29579
29579
|
const a = yield parseVariablesAndChangeParamsToQueryString({
|
|
29580
29580
|
searchParams: r,
|
|
29581
29581
|
variables: e,
|
|
@@ -29593,7 +29593,7 @@ function useLinkActionProps(e) {
|
|
|
29593
29593
|
return {
|
|
29594
29594
|
type: l,
|
|
29595
29595
|
onClick() {
|
|
29596
|
-
return
|
|
29596
|
+
return z(this, null, function* () {
|
|
29597
29597
|
if (!a) {
|
|
29598
29598
|
message.warning(r("Please configure the URL"));
|
|
29599
29599
|
return;
|
|
@@ -29605,7 +29605,7 @@ function useLinkActionProps(e) {
|
|
|
29605
29605
|
};
|
|
29606
29606
|
}
|
|
29607
29607
|
function replaceVariableValue(e, t, o) {
|
|
29608
|
-
return
|
|
29608
|
+
return z(this, null, function* () {
|
|
29609
29609
|
if (!e)
|
|
29610
29610
|
return;
|
|
29611
29611
|
const { evaluate: n } = evaluators.get("string"), { exp: r, scope: a } = yield replaceVariables(e, {
|
|
@@ -29620,14 +29620,14 @@ function replaceVariableValue(e, t, o) {
|
|
|
29620
29620
|
});
|
|
29621
29621
|
}
|
|
29622
29622
|
function parseVariablesAndChangeParamsToQueryString(r) {
|
|
29623
|
-
return
|
|
29623
|
+
return z(this, arguments, function* ({
|
|
29624
29624
|
searchParams: e,
|
|
29625
29625
|
variables: t,
|
|
29626
29626
|
localVariables: o,
|
|
29627
29627
|
replaceVariableValue: n
|
|
29628
29628
|
}) {
|
|
29629
29629
|
const a = yield Promise.all(
|
|
29630
|
-
e.map((u) =>
|
|
29630
|
+
e.map((u) => z(this, [u], function* ({ name: l, value: c }) {
|
|
29631
29631
|
if (typeof c == "string") {
|
|
29632
29632
|
if (isVariable$1(c)) {
|
|
29633
29633
|
const { value: p } = (yield t.parseVariable(c, o)) || {};
|
|
@@ -29755,7 +29755,7 @@ const useSyncFromForm = (e, t, o) => {
|
|
|
29755
29755
|
}, []);
|
|
29756
29756
|
return {
|
|
29757
29757
|
run() {
|
|
29758
|
-
return
|
|
29758
|
+
return z(this, null, function* () {
|
|
29759
29759
|
var y;
|
|
29760
29760
|
const f = /* @__PURE__ */ new Set([]), C = /* @__PURE__ */ new Set([]), b = (v, F) => {
|
|
29761
29761
|
var I;
|
|
@@ -30982,7 +30982,7 @@ const useParseDefaultValue = () => {
|
|
|
30982
30982
|
var F, I;
|
|
30983
30983
|
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 || i || l || isSubMode(t) || !(r != null && r.isNew) && !a)
|
|
30984
30984
|
return;
|
|
30985
|
-
const y = (...R) =>
|
|
30985
|
+
const y = (...R) => z(void 0, [...R], function* ({ forceUpdate: T = !1 } = {}) {
|
|
30986
30986
|
if (o && e && (isVariable$1(t.default) && e.value == null || e.value === t.default || T)) {
|
|
30987
30987
|
e.loading = !0;
|
|
30988
30988
|
const D = !t.name.toString().includes(".") && (d == null ? void 0 : d.getField(t.name)), {
|
|
@@ -31118,11 +31118,11 @@ function SchemaSettingsTemplate(e) {
|
|
|
31118
31118
|
SchemaSettingsItem,
|
|
31119
31119
|
{
|
|
31120
31120
|
title: i("Convert reference to duplicate"),
|
|
31121
|
-
onClick: () =>
|
|
31121
|
+
onClick: () => z(this, null, function* () {
|
|
31122
31122
|
const S = yield C(d), y = g.removeWithoutEmit();
|
|
31123
31123
|
g.insertAfterEnd(S, {
|
|
31124
31124
|
onSuccess() {
|
|
31125
|
-
return
|
|
31125
|
+
return z(this, null, function* () {
|
|
31126
31126
|
yield h.request({
|
|
31127
31127
|
url: `/uiSchemas:remove/${y["x-uid"]}`
|
|
31128
31128
|
});
|
|
@@ -31136,7 +31136,7 @@ function SchemaSettingsTemplate(e) {
|
|
|
31136
31136
|
SchemaSettingsItem,
|
|
31137
31137
|
{
|
|
31138
31138
|
title: i("Save as reference template"),
|
|
31139
|
-
onClick: () =>
|
|
31139
|
+
onClick: () => z(this, null, function* () {
|
|
31140
31140
|
u(!1);
|
|
31141
31141
|
const S = o && l(o), y = yield FormDialog(
|
|
31142
31142
|
i("Save as reference template"),
|
|
@@ -31505,7 +31505,7 @@ function AccessControl() {
|
|
|
31505
31505
|
roles: l == null ? void 0 : l.data
|
|
31506
31506
|
},
|
|
31507
31507
|
beforeOpen: () => !l && i(),
|
|
31508
|
-
onSubmit: (p) =>
|
|
31508
|
+
onSubmit: (p) => z(this, [p], function* ({ roles: d }) {
|
|
31509
31509
|
return yield n.set({ values: d.map((m) => m.name) }), yield c(), r.success(e("Saved successfully"));
|
|
31510
31510
|
})
|
|
31511
31511
|
}
|
|
@@ -31523,7 +31523,7 @@ const SchemaSettingAccessControl = {
|
|
|
31523
31523
|
[t, o]
|
|
31524
31524
|
);
|
|
31525
31525
|
return { parseFilter: useCallback(
|
|
31526
|
-
(a) =>
|
|
31526
|
+
(a) => z(void 0, null, function* () {
|
|
31527
31527
|
const i = flatten(a, {
|
|
31528
31528
|
breakOn({ key: c }) {
|
|
31529
31529
|
return c.startsWith("$") && c !== "$and" && c !== "$or";
|
|
@@ -31533,7 +31533,7 @@ const SchemaSettingAccessControl = {
|
|
|
31533
31533
|
}
|
|
31534
31534
|
});
|
|
31535
31535
|
return yield Promise.all(
|
|
31536
|
-
Object.keys(i).map((c) =>
|
|
31536
|
+
Object.keys(i).map((c) => z(void 0, null, function* () {
|
|
31537
31537
|
return i[c] = yield i[c], i[c] === void 0 && delete i[c], i[c];
|
|
31538
31538
|
}))
|
|
31539
31539
|
), unflatten$1(i);
|
|
@@ -32034,7 +32034,7 @@ const createSubmitActionSettings = new SchemaSettings({
|
|
|
32034
32034
|
"x-validator": validateJSON$1
|
|
32035
32035
|
}
|
|
32036
32036
|
}
|
|
32037
|
-
}, linkageAction = (c, u) =>
|
|
32037
|
+
}, linkageAction = (c, u) => z(void 0, [c, u], function* ({
|
|
32038
32038
|
operator: e,
|
|
32039
32039
|
field: t,
|
|
32040
32040
|
condition: o,
|
|
@@ -35328,7 +35328,7 @@ const enabledIndexColumn$1 = {
|
|
|
35328
35328
|
return {
|
|
35329
35329
|
title: o("Enable index column"),
|
|
35330
35330
|
checked: e.decoratorProps.enableIndexÏColumn !== !1,
|
|
35331
|
-
onChange: (r) =>
|
|
35331
|
+
onChange: (r) => z(void 0, null, function* () {
|
|
35332
35332
|
e.decoratorProps = e.decoratorProps || {}, e.decoratorProps.enableIndexÏColumn = r, t["x-decorator-props"].enableIndexÏColumn = r, n.emit("patch", {
|
|
35333
35333
|
schema: {
|
|
35334
35334
|
"x-uid": t["x-uid"],
|
|
@@ -35405,7 +35405,7 @@ const enabledIndexColumn$1 = {
|
|
|
35405
35405
|
return {
|
|
35406
35406
|
title: r("Enable drag and drop sorting"),
|
|
35407
35407
|
checked: t.decoratorProps.dragSort,
|
|
35408
|
-
onChange: (u) =>
|
|
35408
|
+
onChange: (u) => z(void 0, null, function* () {
|
|
35409
35409
|
var d, p, m;
|
|
35410
35410
|
if (u && l) {
|
|
35411
35411
|
const { data: h } = yield c.resource("collections.fields", l.collectionName).update({
|
|
@@ -36588,7 +36588,7 @@ const enabledIndexColumn$1 = {
|
|
|
36588
36588
|
title: a("Ellipsis overflow content"),
|
|
36589
36589
|
checked: !!((c = i["x-component-props"]) != null && c.ellipsis),
|
|
36590
36590
|
hidden: l,
|
|
36591
|
-
onChange: (u) =>
|
|
36591
|
+
onChange: (u) => z(this, null, function* () {
|
|
36592
36592
|
e && t ? t.forEach((d) => {
|
|
36593
36593
|
d.componentProps.ellipsis = u;
|
|
36594
36594
|
}) : n.componentProps.ellipsis = u, _.set(i, "x-component-props.ellipsis", u), yield r.emit("patch", {
|
|
@@ -36962,10 +36962,10 @@ const enabledIndexColumn$1 = {
|
|
|
36962
36962
|
name: "fieldSettings:component:CascadeSelect",
|
|
36963
36963
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
36964
36964
|
}), SchemaSettingsDateRange = function e(t) {
|
|
36965
|
-
var T, R, D, B, N, $, L, w, O, j, k, M, E, V,
|
|
36965
|
+
var T, R, D, B, N, $, L, w, O, j, k, M, q, E, V, G;
|
|
36966
36966
|
const { fieldSchema: o } = t, n = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(o == null ? void 0 : o["x-collection-field"]) || {}, d = ((T = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : T.showTime) || ((D = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : B.dateFormat) || (($ = (N = u == null ? void 0 : u.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : $.dateFormat) || "YYYY-MM-DD", m = ((L = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : L.timeFormat) || ((O = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = ((j = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : j.picker) || ((M = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : M.picker) || "date";
|
|
36967
36967
|
o["x-read-pretty"] || n.readOnly || n.readPretty;
|
|
36968
|
-
const g = (
|
|
36968
|
+
const g = (q = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : q._minDate, f = (E = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : E._maxDate, C = ((V = u == null ? void 0 : u.uiSchema) == null ? void 0 : V["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(
|
|
36969
36969
|
(U) => /* @__PURE__ */ jsx(
|
|
36970
36970
|
SchemaComponent,
|
|
36971
36971
|
{
|
|
@@ -37651,7 +37651,7 @@ const dividerSettings = new SchemaSettings({
|
|
|
37651
37651
|
return {
|
|
37652
37652
|
title: o("Enable index column"),
|
|
37653
37653
|
checked: e.componentProps.enableIndexÏColumn !== !1,
|
|
37654
|
-
onChange: (r) =>
|
|
37654
|
+
onChange: (r) => z(void 0, null, function* () {
|
|
37655
37655
|
e.componentProps = e.componentProps || {}, e.componentProps.enableIndexÏColumn = r, t["x-component-props"].enableIndexÏColumn = r, n.emit("patch", {
|
|
37656
37656
|
schema: {
|
|
37657
37657
|
"x-uid": t["x-uid"],
|
|
@@ -38337,7 +38337,7 @@ const dividerSettings = new SchemaSettings({
|
|
|
38337
38337
|
});
|
|
38338
38338
|
class SchemaSettingsPlugin extends Plugin {
|
|
38339
38339
|
load() {
|
|
38340
|
-
return
|
|
38340
|
+
return z(this, null, function* () {
|
|
38341
38341
|
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(filterRecordPickerComponentFieldSettings), 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);
|
|
38342
38342
|
});
|
|
38343
38343
|
}
|
|
@@ -38443,7 +38443,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38443
38443
|
const o = useRef({}), n = useAPIClient(), { getCollectionJoinField: r, getCollection: a } = useCollectionManager_deprecated(), i = useCompile(), { builtinVariables: l } = useBuiltInVariables(), c = useCallback((C) => {
|
|
38444
38444
|
_.isFunction(C) ? o.current = C(o.current) : o.current = C;
|
|
38445
38445
|
}, []), u = useCallback(
|
|
38446
|
-
(C, b, S) =>
|
|
38446
|
+
(C, b, S) => z(void 0, null, function* () {
|
|
38447
38447
|
var w, O;
|
|
38448
38448
|
const y = C.split("."), v = y[0], F = mergeVariableToCollectionNameWithLocalVariables(variablesStore, b);
|
|
38449
38449
|
let I = mergeCtxWithLocalVariables(o.current, b);
|
|
@@ -38459,11 +38459,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38459
38459
|
dataSource: R,
|
|
38460
38460
|
collectionName: $
|
|
38461
38461
|
};
|
|
38462
|
-
const k = y[j], M = y.slice(0, j + 1).join("."), { fieldPath:
|
|
38462
|
+
const k = y[j], M = y.slice(0, j + 1).join("."), { fieldPath: q } = getFieldPath$1(M, F), E = r(q, R), V = (O = a(B, R)) == null ? void 0 : O.getPrimaryKey();
|
|
38463
38463
|
if (Array.isArray(I)) {
|
|
38464
38464
|
const G = I.map((U) => {
|
|
38465
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[
|
|
38466
|
-
const H = `/${B}/${U[
|
|
38465
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[V]) != null && E != null && E.target) {
|
|
38466
|
+
const H = `/${B}/${U[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
|
|
38467
38467
|
if (hasRequested(H))
|
|
38468
38468
|
return getRequested(H);
|
|
38469
38469
|
const Y = n.request({
|
|
@@ -38477,9 +38477,9 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38477
38477
|
}
|
|
38478
38478
|
return U == null ? void 0 : U[k];
|
|
38479
38479
|
});
|
|
38480
|
-
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)),
|
|
38481
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[
|
|
38482
|
-
const G = `/${B}/${I[
|
|
38480
|
+
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), E);
|
|
38481
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[V] != null && (E != null && E.target)) {
|
|
38482
|
+
const G = `/${B}/${I[E.sourceKey || V]}/${k}:${getAction(E.type)}`;
|
|
38483
38483
|
let U = null;
|
|
38484
38484
|
if (hasRequested(G))
|
|
38485
38485
|
U = yield getRequested(G);
|
|
@@ -38494,10 +38494,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38494
38494
|
stashRequested(G, Y), U = yield Y, clearRequested(G);
|
|
38495
38495
|
}
|
|
38496
38496
|
const H = U.data.data;
|
|
38497
|
-
I = removeThroughCollectionFields(H,
|
|
38497
|
+
I = removeThroughCollectionFields(H, E);
|
|
38498
38498
|
} else
|
|
38499
|
-
I = removeThroughCollectionFields(getValuesByPath(I, k),
|
|
38500
|
-
|
|
38499
|
+
I = removeThroughCollectionFields(getValuesByPath(I, k), E);
|
|
38500
|
+
E != null && E.target && (B = E.target);
|
|
38501
38501
|
}
|
|
38502
38502
|
const L = i(
|
|
38503
38503
|
_.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
|
|
@@ -38535,7 +38535,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38535
38535
|
* @param localVariables Local variables, will be cleared after parsing
|
|
38536
38536
|
* @returns
|
|
38537
38537
|
*/
|
|
38538
|
-
(C, b, S) =>
|
|
38538
|
+
(C, b, S) => z(void 0, null, function* () {
|
|
38539
38539
|
if (!isVariable$1(C))
|
|
38540
38540
|
return C;
|
|
38541
38541
|
b && (b = _.isArray(b) ? b : [b]);
|
|
@@ -38546,7 +38546,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
38546
38546
|
}),
|
|
38547
38547
|
[u]
|
|
38548
38548
|
), g = useCallback(
|
|
38549
|
-
(C, b) =>
|
|
38549
|
+
(C, b) => z(void 0, null, function* () {
|
|
38550
38550
|
var T;
|
|
38551
38551
|
if (!isVariable$1(C))
|
|
38552
38552
|
throw new Error(`VariablesProvider: ${C} is not a variable string`);
|
|
@@ -38908,7 +38908,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
38908
38908
|
};
|
|
38909
38909
|
}, useA = () => ({
|
|
38910
38910
|
run() {
|
|
38911
|
-
return
|
|
38911
|
+
return z(this, null, function* () {
|
|
38912
38912
|
});
|
|
38913
38913
|
}
|
|
38914
38914
|
}), handleError = console.log, Action = withDynamicSchemaProps(
|
|
@@ -38959,7 +38959,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
38959
38959
|
return ((K = I == null ? void 0 : I["x-linkage-rules"]) == null ? void 0 : K.filter((X) => !X.disabled)) || [];
|
|
38960
38960
|
},
|
|
38961
38961
|
[I == null ? void 0 : I["x-linkage-rules"]]
|
|
38962
|
-
), { designable: N } = useDesignable(), $ = useComponent(n) || n, L = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: M } = useGetAriaLabelOfAction(l),
|
|
38962
|
+
), { designable: N } = useDesignable(), $ = useComponent(n) || n, L = useVariables$1(), w = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: M } = useGetAriaLabelOfAction(l), q = useCollectionParentRecordData(), E = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
|
|
38963
38963
|
useEffect(() => {
|
|
38964
38964
|
F.stateOfLinkageRules && setInitialActionState(F);
|
|
38965
38965
|
const K = uid(), X = [];
|
|
@@ -38980,7 +38980,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
38980
38980
|
conditionType: ee.conditionType,
|
|
38981
38981
|
variableNameOfLeftCondition: "$nRecord"
|
|
38982
38982
|
},
|
|
38983
|
-
|
|
38983
|
+
E.jsonLogic
|
|
38984
38984
|
);
|
|
38985
38985
|
},
|
|
38986
38986
|
{ fireImmediately: !0, equals: isEqual }
|
|
@@ -38999,11 +38999,11 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
38999
38999
|
C == null || C(K);
|
|
39000
39000
|
},
|
|
39001
39001
|
[C]
|
|
39002
|
-
), H = useMemo(() => c && ((K, X) =>
|
|
39002
|
+
), H = useMemo(() => c && ((K, X) => z(void 0, null, function* () {
|
|
39003
39003
|
var ee, oe;
|
|
39004
39004
|
yield c == null ? void 0 : c(K, X);
|
|
39005
39005
|
const Q = ((oe = (ee = I["x-action-settings"]) == null ? void 0 : ee.onSuccess) == null ? void 0 : oe.blocksToRefresh) || [];
|
|
39006
|
-
Q.length > 0 &&
|
|
39006
|
+
Q.length > 0 && V().forEach((te) => {
|
|
39007
39007
|
var se;
|
|
39008
39008
|
if (Q.includes(te.uid))
|
|
39009
39009
|
try {
|
|
@@ -39012,7 +39012,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39012
39012
|
console.error("Failed to refresh block:", te.uid, ie);
|
|
39013
39013
|
}
|
|
39014
39014
|
});
|
|
39015
|
-
})), [c, I,
|
|
39015
|
+
})), [c, I, V]);
|
|
39016
39016
|
return /* @__PURE__ */ jsx(
|
|
39017
39017
|
InternalAction,
|
|
39018
39018
|
x({
|
|
@@ -39041,7 +39041,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39041
39041
|
setVisibleWithURL: j,
|
|
39042
39042
|
setSubmitted: k,
|
|
39043
39043
|
getAriaLabel: M,
|
|
39044
|
-
parentRecordData:
|
|
39044
|
+
parentRecordData: q,
|
|
39045
39045
|
actionCallback: h
|
|
39046
39046
|
}, y)
|
|
39047
39047
|
);
|
|
@@ -39105,7 +39105,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39105
39105
|
"setSubmitted",
|
|
39106
39106
|
"getAriaLabel",
|
|
39107
39107
|
"parentRecordData"
|
|
39108
|
-
]), [w, O] = useState(!1), { wrapSSR: j, componentCls: k, hashId: M } = useStyles$8(), [
|
|
39108
|
+
]), [w, O] = useState(!1), { wrapSSR: j, componentCls: k, hashId: M } = useStyles$8(), [q, E] = useState(!1), V = n["x-toolbar-props"] || n["x-designer-props"], G = (fe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : fe.openMode, U = (pe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : pe.openSize, H = (me = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: Y } = App.useApp(), J = useForm(), K = useACLActionParamsContext(), { run: X, element: Q, disabled: ee } = (I == null ? void 0 : I(T)) || {}, oe = J.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || F || ee, te = useMemo(() => {
|
|
39109
39109
|
var ce;
|
|
39110
39110
|
return P(x({}, v), {
|
|
39111
39111
|
opacity: r && (((ce = a == null ? void 0 : a.data) == null ? void 0 : ce.hidden) || !K) && 0.1,
|
|
@@ -39121,7 +39121,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39121
39121
|
buttonStyle: te,
|
|
39122
39122
|
handleMouseEnter: c,
|
|
39123
39123
|
tarComponent: u,
|
|
39124
|
-
designerProps:
|
|
39124
|
+
designerProps: V,
|
|
39125
39125
|
componentCls: k,
|
|
39126
39126
|
hashId: M,
|
|
39127
39127
|
className: d,
|
|
@@ -39151,8 +39151,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
39151
39151
|
button: RenderButton(se),
|
|
39152
39152
|
visible: w || R,
|
|
39153
39153
|
setVisible: ie,
|
|
39154
|
-
formValueChanged:
|
|
39155
|
-
setFormValueChanged:
|
|
39154
|
+
formValueChanged: q,
|
|
39155
|
+
setFormValueChanged: E,
|
|
39156
39156
|
openMode: G,
|
|
39157
39157
|
openSize: U,
|
|
39158
39158
|
containerRefKey: o,
|
|
@@ -39236,18 +39236,18 @@ const RenderButton = ({
|
|
|
39236
39236
|
confirmTitle: D,
|
|
39237
39237
|
title: B
|
|
39238
39238
|
}) => {
|
|
39239
|
-
const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: $ } = useTranslation(), { isPopupVisibleControlledByURL: L } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useVariables$1(), j = useLocalVariables$1(), k = useRef(null), M = useCompile(),
|
|
39239
|
+
const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: $ } = useTranslation(), { isPopupVisibleControlledByURL: L } = usePopupSettings(), { openPopup: w } = usePopupUtils(), O = useVariables$1(), j = useLocalVariables$1(), k = useRef(null), M = useCompile(), q = useForm();
|
|
39240
39240
|
k.current = w;
|
|
39241
|
-
const
|
|
39241
|
+
const E = {
|
|
39242
39242
|
variables: O,
|
|
39243
39243
|
localVariables: j
|
|
39244
|
-
},
|
|
39245
|
-
(G, U = !0) =>
|
|
39244
|
+
}, V = useCallback(
|
|
39245
|
+
(G, U = !0) => z(void 0, null, function* () {
|
|
39246
39246
|
var J;
|
|
39247
39247
|
if (U && isPortalInBody(G.target))
|
|
39248
39248
|
return;
|
|
39249
39249
|
G.preventDefault(), G.stopPropagation();
|
|
39250
|
-
const H = yield getVariableValue($(I == null ? void 0 : I.title, { title: M(y.title) }),
|
|
39250
|
+
const H = yield getVariableValue($(I == null ? void 0 : I.title, { title: M(y.title) }), E), Y = yield getVariableValue($(I == null ? void 0 : I.content, { title: M(y.title) }), E);
|
|
39251
39251
|
if (!a && o) {
|
|
39252
39252
|
const K = () => {
|
|
39253
39253
|
b ? b(G, () => {
|
|
@@ -39255,7 +39255,7 @@ const RenderButton = ({
|
|
|
39255
39255
|
S !== !1 && (R == null || R(!0), (Q = (X = N()) == null ? void 0 : X.refresh) == null || Q.call(X));
|
|
39256
39256
|
}) : isBulkEditAction(y) || !L() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? k.current() : (v(!0), F == null || F());
|
|
39257
39257
|
};
|
|
39258
|
-
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (J =
|
|
39258
|
+
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (J = q == null ? void 0 : q.submit) == null ? void 0 : J.call(q), T.confirm({
|
|
39259
39259
|
title: $(H, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
39260
39260
|
content: $(Y, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
39261
39261
|
onOk: K
|
|
@@ -39295,7 +39295,7 @@ const RenderButton = ({
|
|
|
39295
39295
|
buttonStyle: i,
|
|
39296
39296
|
handleMouseEnter: l,
|
|
39297
39297
|
getAriaLabel: g,
|
|
39298
|
-
handleButtonClick:
|
|
39298
|
+
handleButtonClick: V,
|
|
39299
39299
|
tarComponent: c,
|
|
39300
39300
|
componentCls: d,
|
|
39301
39301
|
hashId: p,
|
|
@@ -39355,8 +39355,8 @@ const RenderButtonInner = observer$1(
|
|
|
39355
39355
|
"onlyIcon"
|
|
39356
39356
|
]), { t: I } = useTranslation(), T = useCallback(
|
|
39357
39357
|
debounce$1(
|
|
39358
|
-
(M,
|
|
39359
|
-
d(M,
|
|
39358
|
+
(M, q = !0) => {
|
|
39359
|
+
d(M, q);
|
|
39360
39360
|
},
|
|
39361
39361
|
300,
|
|
39362
39362
|
{ leading: !0, trailing: !1 }
|
|
@@ -39369,10 +39369,10 @@ const RenderButtonInner = observer$1(
|
|
|
39369
39369
|
return null;
|
|
39370
39370
|
const R = S != null ? S : o == null ? void 0 : o.title, D = typeof R == "string" ? I(R, { ns: NAMESPACE_UI_SCHEMA }) : R, j = l, { opacity: B } = j, N = W(j, ["opacity"]), $ = y && B ? { opacity: B } : void 0, L = React.forwardRef(
|
|
39371
39371
|
(H, U) => {
|
|
39372
|
-
var Y = H, { component: M = p || Button, icon:
|
|
39372
|
+
var Y = H, { component: M = p || Button, icon: q, onlyIcon: E, children: V } = Y, G = W(Y, ["component", "icon", "onlyIcon", "children"]);
|
|
39373
39373
|
return /* @__PURE__ */ jsxs(M, P(x({ ref: U }, G), { children: [
|
|
39374
|
-
|
|
39375
|
-
|
|
39374
|
+
E ? /* @__PURE__ */ jsx(Tooltip, { title: G.title, children: /* @__PURE__ */ jsx("span", { children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }) }) : /* @__PURE__ */ jsx("span", { children: q && typeof q == "string" ? /* @__PURE__ */ jsx(Icon, { type: q }) : q }),
|
|
39375
|
+
E ? V[1] : V
|
|
39376
39376
|
] }));
|
|
39377
39377
|
}
|
|
39378
39378
|
);
|
|
@@ -39474,7 +39474,7 @@ const ActionBarContext = React.createContext({
|
|
|
39474
39474
|
[r, o, a]
|
|
39475
39475
|
) };
|
|
39476
39476
|
}, requestChartData = (e) => function() {
|
|
39477
|
-
return
|
|
39477
|
+
return z(this, null, function* () {
|
|
39478
39478
|
var t;
|
|
39479
39479
|
try {
|
|
39480
39480
|
const o = yield this.api.request(e);
|
|
@@ -39504,7 +39504,7 @@ const Form$1 = observer$1(
|
|
|
39504
39504
|
{
|
|
39505
39505
|
uid: i["x-uid"],
|
|
39506
39506
|
onSuccess(h) {
|
|
39507
|
-
return
|
|
39507
|
+
return z(this, null, function* () {
|
|
39508
39508
|
yield c.reset(), c.setValues(h == null ? void 0 : h.data), c.setInitialValues(h == null ? void 0 : h.data);
|
|
39509
39509
|
});
|
|
39510
39510
|
}
|
|
@@ -39791,7 +39791,7 @@ Select.ReadPretty = ReadPretty$b;
|
|
|
39791
39791
|
const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typeof o == "object" ? o[t.value] : o), ReadPretty$a = observer$1(
|
|
39792
39792
|
(e) => {
|
|
39793
39793
|
const t = x(x({}, defaultFieldNames$1), e.fieldNames), o = useField(), n = useFieldSchema(), r = useRecord(), { snapshot: a } = useActionContext(), { data: i } = useRequest(
|
|
39794
|
-
a ? () =>
|
|
39794
|
+
a ? () => z(void 0, null, function* () {
|
|
39795
39795
|
return {
|
|
39796
39796
|
data: r[n.name]
|
|
39797
39797
|
};
|
|
@@ -39902,13 +39902,13 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39902
39902
|
debounceWait: n,
|
|
39903
39903
|
onSuccess: f
|
|
39904
39904
|
}, o.defaultParams ? { defaultParams: [o.defaultParams] } : {})
|
|
39905
|
-
),
|
|
39905
|
+
), q = useMemo(
|
|
39906
39906
|
() => JSON.stringify({
|
|
39907
39907
|
service: o,
|
|
39908
39908
|
fieldNames: t
|
|
39909
39909
|
}),
|
|
39910
39910
|
[o, t]
|
|
39911
|
-
),
|
|
39911
|
+
), E = useCallback(() => T.current && d ? /* @__PURE__ */ jsx(
|
|
39912
39912
|
d,
|
|
39913
39913
|
{
|
|
39914
39914
|
search: T.current,
|
|
@@ -39919,8 +39919,8 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39919
39919
|
) : null, [T.current]);
|
|
39920
39920
|
useEffect(() => {
|
|
39921
39921
|
y.current && k();
|
|
39922
|
-
}, [
|
|
39923
|
-
const
|
|
39922
|
+
}, [q]);
|
|
39923
|
+
const V = (K) => z(void 0, null, function* () {
|
|
39924
39924
|
var X;
|
|
39925
39925
|
k({
|
|
39926
39926
|
filter: mergeFilter([
|
|
@@ -39948,7 +39948,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39948
39948
|
filterOption: !1,
|
|
39949
39949
|
filterSort: null,
|
|
39950
39950
|
fieldNames: t,
|
|
39951
|
-
onSearch:
|
|
39951
|
+
onSearch: V,
|
|
39952
39952
|
onDropdownVisibleChange: (K) => {
|
|
39953
39953
|
T.current = null, K && k(), y.current = !0;
|
|
39954
39954
|
},
|
|
@@ -39964,7 +39964,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
39964
39964
|
return /* @__PURE__ */ jsx(Fragment$1, { children: F ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
39965
39965
|
!((j == null ? void 0 : j.data.length) === 0 && (T != null && T.current)) && K,
|
|
39966
39966
|
(j == null ? void 0 : j.data.length) > 0 && (T == null ? void 0 : T.current) && !X && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
39967
|
-
!X && /* @__PURE__ */ jsx(
|
|
39967
|
+
!X && /* @__PURE__ */ jsx(E, {})
|
|
39968
39968
|
] }) : K });
|
|
39969
39969
|
}
|
|
39970
39970
|
})
|
|
@@ -40031,9 +40031,9 @@ const useFormDataTemplates = () => {
|
|
|
40031
40031
|
alignItems: "center",
|
|
40032
40032
|
backgroundColor: o.colorFillAlter,
|
|
40033
40033
|
padding: o.padding
|
|
40034
|
-
}, e), [e, o.colorFillAlter]), S = useMemo(() => ({ fontSize: o.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: o.marginXS }), [o.fontSize, o.marginXS]), y = useCallback((I) =>
|
|
40034
|
+
}, e), [e, o.colorFillAlter]), S = useMemo(() => ({ fontSize: o.fontSize, fontWeight: "bold", whiteSpace: "nowrap", marginRight: o.marginXS }), [o.fontSize, o.marginXS]), y = useCallback((I) => z(void 0, null, function* () {
|
|
40035
40035
|
d(I), m(null), t == null || t.reset();
|
|
40036
|
-
}), []), v = useCallback((I, T, R) =>
|
|
40036
|
+
}), []), v = useCallback((I, T, R) => z(void 0, null, function* () {
|
|
40037
40037
|
const D = P(x({}, T), { dataId: I });
|
|
40038
40038
|
m(T), fetchTemplateData(h, D, R).then((B) => (t && B && (t.reset(), t.__template = !0, forEach(B, (N, $) => {
|
|
40039
40039
|
var L;
|
|
@@ -40088,7 +40088,7 @@ function findDataTemplates(e) {
|
|
|
40088
40088
|
return t ? _.cloneDeep(t["x-data-templates"]) || {} : {};
|
|
40089
40089
|
}
|
|
40090
40090
|
function fetchTemplateData(e, t, o) {
|
|
40091
|
-
return
|
|
40091
|
+
return z(this, null, function* () {
|
|
40092
40092
|
if (!(t.fields.length === 0 || !t.dataId))
|
|
40093
40093
|
return e.resource(t.collection, void 0, o).get({
|
|
40094
40094
|
filterByTk: t.dataId,
|
|
@@ -40572,7 +40572,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
|
|
|
40572
40572
|
const { setVisible: e } = useActionContext();
|
|
40573
40573
|
return {
|
|
40574
40574
|
run() {
|
|
40575
|
-
return
|
|
40575
|
+
return z(this, null, function* () {
|
|
40576
40576
|
e(!1);
|
|
40577
40577
|
});
|
|
40578
40578
|
}
|
|
@@ -40586,7 +40586,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
|
|
|
40586
40586
|
const { setVisible: e } = useActionContext(), t = useForm(), { mutate: o, data: n } = useSystemSettings() || {}, r = useAPIClient(), { t: a } = useTranslation();
|
|
40587
40587
|
return {
|
|
40588
40588
|
run() {
|
|
40589
|
-
return
|
|
40589
|
+
return z(this, null, function* () {
|
|
40590
40590
|
var u;
|
|
40591
40591
|
yield t.submit();
|
|
40592
40592
|
const l = cloneDeep(t.values);
|
|
@@ -40707,7 +40707,7 @@ const useSystemSettings = () => useContext(SystemSettingsContext), SystemSetting
|
|
|
40707
40707
|
) });
|
|
40708
40708
|
class SystemSettingsPlugin extends Plugin {
|
|
40709
40709
|
load() {
|
|
40710
|
-
return
|
|
40710
|
+
return z(this, null, function* () {
|
|
40711
40711
|
this.app.use(SystemSettingsProvider, this.options);
|
|
40712
40712
|
});
|
|
40713
40713
|
}
|
|
@@ -40743,7 +40743,7 @@ const RemoteDocumentTitleProvider = (e) => {
|
|
|
40743
40743
|
};
|
|
40744
40744
|
class RemoteDocumentTitlePlugin extends Plugin {
|
|
40745
40745
|
load() {
|
|
40746
|
-
return
|
|
40746
|
+
return z(this, null, function* () {
|
|
40747
40747
|
this.app.use(RemoteDocumentTitleProvider, this.options);
|
|
40748
40748
|
});
|
|
40749
40749
|
}
|
|
@@ -40830,7 +40830,7 @@ const insertPositionToMethod = {
|
|
|
40830
40830
|
}
|
|
40831
40831
|
}
|
|
40832
40832
|
},
|
|
40833
|
-
onSubmit: (g) =>
|
|
40833
|
+
onSubmit: (g) => z(void 0, [g], function* ({ title: m, icon: h }) {
|
|
40834
40834
|
var y, v;
|
|
40835
40835
|
const f = a.__route__, C = (y = a.parent) == null ? void 0 : y.__route__, b = uid(), { data: S } = yield u({
|
|
40836
40836
|
type: NocoBaseDesktopRouteType.group,
|
|
@@ -40872,7 +40872,7 @@ const insertPositionToMethod = {
|
|
|
40872
40872
|
}
|
|
40873
40873
|
}
|
|
40874
40874
|
},
|
|
40875
|
-
onSubmit: (g) =>
|
|
40875
|
+
onSubmit: (g) => z(void 0, [g], function* ({ title: m, icon: h }) {
|
|
40876
40876
|
var I, T;
|
|
40877
40877
|
const f = a.__route__, C = (I = a.parent) == null ? void 0 : I.__route__, b = uid(), S = uid(), y = uid(), v = uid(), { data: F } = yield u({
|
|
40878
40878
|
type: NocoBaseDesktopRouteType.page,
|
|
@@ -40925,7 +40925,7 @@ const insertPositionToMethod = {
|
|
|
40925
40925
|
params: l
|
|
40926
40926
|
}
|
|
40927
40927
|
},
|
|
40928
|
-
onSubmit: (C) =>
|
|
40928
|
+
onSubmit: (C) => z(void 0, [C], function* ({ title: m, icon: h, href: g, params: f }) {
|
|
40929
40929
|
var F, I;
|
|
40930
40930
|
const b = a.__route__, S = (F = a.parent) == null ? void 0 : F.__route__, y = uid(), { data: v } = yield u(
|
|
40931
40931
|
{
|
|
@@ -41069,9 +41069,9 @@ const insertPositionToMethod = {
|
|
|
41069
41069
|
}
|
|
41070
41070
|
}
|
|
41071
41071
|
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), T = useCallback(
|
|
41072
|
-
(L) =>
|
|
41073
|
-
var
|
|
41074
|
-
const [w] = ((
|
|
41072
|
+
(L) => z(void 0, [L], function* ({ target: N, position: $ }) {
|
|
41073
|
+
var q;
|
|
41074
|
+
const [w] = ((q = N == null ? void 0 : N.split) == null ? void 0 : q.call(N, "||")) || [];
|
|
41075
41075
|
if (!w)
|
|
41076
41076
|
return;
|
|
41077
41077
|
const O = findByUid(c, w), j = createDesignable({
|
|
@@ -41137,7 +41137,7 @@ const insertPositionToMethod = {
|
|
|
41137
41137
|
"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."
|
|
41138
41138
|
),
|
|
41139
41139
|
onOk() {
|
|
41140
|
-
return
|
|
41140
|
+
return z(this, null, function* () {
|
|
41141
41141
|
var L;
|
|
41142
41142
|
n["x-component-props"].hidden = !!N, o.componentProps.hidden = !!N, (L = n.__route__) != null && L.id && (yield e(n.__route__.id, {
|
|
41143
41143
|
hideInMenu: !!N
|
|
@@ -41323,7 +41323,7 @@ const insertPositionToMethod = {
|
|
|
41323
41323
|
ParentRouteContext.displayName = "ParentRouteContext";
|
|
41324
41324
|
const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes = (e = "desktopRoutes") => {
|
|
41325
41325
|
const t = useAPIClient(), o = useMemo(() => t.resource(e), [t, e]), { refresh: n } = useAllAccessDesktopRoutes(), r = useCallback(
|
|
41326
|
-
(c, u = !0) =>
|
|
41326
|
+
(c, u = !0) => z(void 0, null, function* () {
|
|
41327
41327
|
const d = yield o.create({
|
|
41328
41328
|
values: c
|
|
41329
41329
|
});
|
|
@@ -41331,7 +41331,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
41331
41331
|
}),
|
|
41332
41332
|
[o, n]
|
|
41333
41333
|
), a = useCallback(
|
|
41334
|
-
(c, u, d = !0) =>
|
|
41334
|
+
(c, u, d = !0) => z(void 0, null, function* () {
|
|
41335
41335
|
const p = yield o.update({
|
|
41336
41336
|
filterByTk: c,
|
|
41337
41337
|
values: u
|
|
@@ -41340,7 +41340,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
41340
41340
|
}),
|
|
41341
41341
|
[o, n]
|
|
41342
41342
|
), i = useCallback(
|
|
41343
|
-
(c, u = !0) =>
|
|
41343
|
+
(c, u = !0) => z(void 0, null, function* () {
|
|
41344
41344
|
const d = yield o.destroy({
|
|
41345
41345
|
filterByTk: c
|
|
41346
41346
|
});
|
|
@@ -41348,7 +41348,7 @@ const useParentRoute = () => useContext(ParentRouteContext), useNocoBaseRoutes =
|
|
|
41348
41348
|
}),
|
|
41349
41349
|
[n, o]
|
|
41350
41350
|
), l = useCallback(
|
|
41351
|
-
(f) =>
|
|
41351
|
+
(f) => z(void 0, [f], function* ({
|
|
41352
41352
|
sourceId: c,
|
|
41353
41353
|
targetId: u,
|
|
41354
41354
|
targetScope: d,
|
|
@@ -41660,7 +41660,7 @@ const MenuURLButton = ({ href: e, params: t, icon: o }) => {
|
|
|
41660
41660
|
var u;
|
|
41661
41661
|
const n = useField(), r = useFieldSchema(), { t: a } = useMenuTranslation(), i = useContext(MenuItemDesignerContext), { parseURLAndParams: l } = useParseURLAndParams(), c = useRef(e);
|
|
41662
41662
|
return useEffect(() => {
|
|
41663
|
-
|
|
41663
|
+
z(void 0, null, function* () {
|
|
41664
41664
|
try {
|
|
41665
41665
|
c.current = yield l(e, t || []);
|
|
41666
41666
|
} catch (p) {
|
|
@@ -41966,7 +41966,7 @@ const className1 = css`
|
|
|
41966
41966
|
icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
41967
41967
|
className: "addTabBtn",
|
|
41968
41968
|
type: "dashed",
|
|
41969
|
-
onClick: () =>
|
|
41969
|
+
onClick: () => z(void 0, null, function* () {
|
|
41970
41970
|
const F = yield FormDialog(
|
|
41971
41971
|
n("Add tab"),
|
|
41972
41972
|
() => /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: p.scope, components: x({}, p.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
@@ -42212,7 +42212,7 @@ const pageSettings = new SchemaSettings({
|
|
|
42212
42212
|
title: t("Enable page tabs"),
|
|
42213
42213
|
checked: n.enableTabs,
|
|
42214
42214
|
onChange(i) {
|
|
42215
|
-
return
|
|
42215
|
+
return z(this, null, function* () {
|
|
42216
42216
|
yield r(n.id, {
|
|
42217
42217
|
enableTabs: i
|
|
42218
42218
|
}), o["x-component-props"] = o["x-component-props"] || {}, o["x-component-props"].enablePageTabs = i, e.emit("patch", {
|
|
@@ -42282,7 +42282,7 @@ const pageSettings = new SchemaSettings({
|
|
|
42282
42282
|
"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."
|
|
42283
42283
|
),
|
|
42284
42284
|
onOk() {
|
|
42285
|
-
return
|
|
42285
|
+
return z(this, null, function* () {
|
|
42286
42286
|
yield t(o.id, {
|
|
42287
42287
|
hideInMenu: !!n
|
|
42288
42288
|
});
|
|
@@ -42311,7 +42311,7 @@ const pageSettings = new SchemaSettings({
|
|
|
42311
42311
|
content: o("Are you sure you want to delete it?")
|
|
42312
42312
|
}, confirm), {
|
|
42313
42313
|
onOk() {
|
|
42314
|
-
return
|
|
42314
|
+
return z(this, null, function* () {
|
|
42315
42315
|
yield n(r.id), t.emit("remove", {
|
|
42316
42316
|
removed: {
|
|
42317
42317
|
"x-uid": r.schemaUid
|
|
@@ -42339,7 +42339,7 @@ const pageSettings = new SchemaSettings({
|
|
|
42339
42339
|
};
|
|
42340
42340
|
class AntdSchemaComponentPlugin extends Plugin {
|
|
42341
42341
|
load() {
|
|
42342
|
-
return
|
|
42342
|
+
return z(this, null, function* () {
|
|
42343
42343
|
this.addComponents(), this.addScopes(), this.addSchemaSettings();
|
|
42344
42344
|
});
|
|
42345
42345
|
}
|
|
@@ -42410,7 +42410,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
42410
42410
|
const w = S.getCollection($);
|
|
42411
42411
|
return w ? w.getAllFields(L) : [];
|
|
42412
42412
|
}, v = Object.values(m), F = useMemo(() => e.multiple ? (o || []).map(($) => m[$]).filter(Boolean) : o, [o, e.multiple, m]), I = useCallback(
|
|
42413
|
-
($) =>
|
|
42413
|
+
($) => z(void 0, null, function* () {
|
|
42414
42414
|
if (c != null)
|
|
42415
42415
|
return c($);
|
|
42416
42416
|
if (!$.isLeaf && $.loadChildren) {
|
|
@@ -42444,8 +42444,8 @@ const AppendsTreeSelect = (e) => {
|
|
|
42444
42444
|
break;
|
|
42445
42445
|
}
|
|
42446
42446
|
if (!j.isLeaf && j.loadChildren) {
|
|
42447
|
-
const
|
|
42448
|
-
|
|
42447
|
+
const q = j.loadChildren(j);
|
|
42448
|
+
q != null && q.length && (L.push(...q), j = q.find((E) => E.value === O.slice(0, k + 1).join(".")));
|
|
42449
42449
|
}
|
|
42450
42450
|
}
|
|
42451
42451
|
}), h((w) => L.reduce((O, j) => Object.assign(O, { [j.value]: j }), x({}, w)));
|
|
@@ -42537,15 +42537,15 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
42537
42537
|
const N = uid();
|
|
42538
42538
|
return f.addEffects(N, () => {
|
|
42539
42539
|
onFieldInputValueChange("*", ($) => {
|
|
42540
|
-
var j, k, M, E, V
|
|
42540
|
+
var j, k, M, q, E, V;
|
|
42541
42541
|
const L = filterAnalyses((M = (k = (j = r.componentProps) == null ? void 0 : j.service) == null ? void 0 : k.params) == null ? void 0 : M.filter) || [], w = getFieldPath($.address.entire), O = getFieldPath(r.address.entire);
|
|
42542
|
-
L.includes((
|
|
42542
|
+
L.includes((q = $ == null ? void 0 : $.props) == null ? void 0 : q.name) && r.value && isEqual($ == null ? void 0 : $.indexes, r == null ? void 0 : r.indexes) && ((E = $ == null ? void 0 : $.props) == null ? void 0 : E.name) !== r.props.name && (!((V = r == null ? void 0 : r.indexes) != null && V.length) || isEqual(w, O)) && (r.setValue(null), p(null));
|
|
42543
42543
|
});
|
|
42544
42544
|
}), () => {
|
|
42545
42545
|
f.removeEffects(N);
|
|
42546
42546
|
};
|
|
42547
42547
|
}, []);
|
|
42548
|
-
const T = (N) =>
|
|
42548
|
+
const T = (N) => z(void 0, null, function* () {
|
|
42549
42549
|
var O, j;
|
|
42550
42550
|
const { search: $, callBack: L } = N, {
|
|
42551
42551
|
data: { data: w }
|
|
@@ -43633,14 +43633,14 @@ const InternalFileManager = (e) => {
|
|
|
43633
43633
|
let O = p(w[y.label]);
|
|
43634
43634
|
if ((j = v == null ? void 0 : v.uiSchema) != null && j.enum)
|
|
43635
43635
|
if (Array.isArray(O))
|
|
43636
|
-
O = O.map((
|
|
43636
|
+
O = O.map((q, E) => {
|
|
43637
43637
|
var G, U;
|
|
43638
|
-
const
|
|
43639
|
-
return
|
|
43638
|
+
const V = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === q);
|
|
43639
|
+
return V ? /* @__PURE__ */ jsx(Tag, { color: V.color, style: { marginRight: 3 }, children: (V == null ? void 0 : V.label) || q }, E) : /* @__PURE__ */ jsx(Tag, { children: q }, q);
|
|
43640
43640
|
}).reverse();
|
|
43641
43641
|
else {
|
|
43642
|
-
const
|
|
43643
|
-
|
|
43642
|
+
const q = (M = (k = v.uiSchema.enum).find) == null ? void 0 : M.call(k, (E) => E.value === O);
|
|
43643
|
+
q && (O = /* @__PURE__ */ jsx(Tag, { color: q.color, children: q.label }));
|
|
43644
43644
|
}
|
|
43645
43645
|
return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), o ? o({
|
|
43646
43646
|
[y.label]: O || EMPTY,
|
|
@@ -43655,7 +43655,7 @@ const InternalFileManager = (e) => {
|
|
|
43655
43655
|
}
|
|
43656
43656
|
},
|
|
43657
43657
|
[v == null ? void 0 : v.uiSchema, y]
|
|
43658
|
-
), R = (L) =>
|
|
43658
|
+
), R = (L) => z(void 0, null, function* () {
|
|
43659
43659
|
var O, j;
|
|
43660
43660
|
const w = yield C.list({
|
|
43661
43661
|
pageSize: 200,
|
|
@@ -43664,7 +43664,7 @@ const InternalFileManager = (e) => {
|
|
|
43664
43664
|
tree: L.parentId ? void 0 : !0
|
|
43665
43665
|
});
|
|
43666
43666
|
return (j = w == null ? void 0 : w.data) == null ? void 0 : j.data;
|
|
43667
|
-
}), D = (L, w, O) =>
|
|
43667
|
+
}), D = (L, w, O) => z(void 0, null, function* () {
|
|
43668
43668
|
const j = yield R({ parentId: w == null ? void 0 : w.id }), k = [...a];
|
|
43669
43669
|
if (k.splice(O + 1), k[O] = P(x({}, k[O]), { value: w }), w != null && w.id && (k[O + 1] = { key: w == null ? void 0 : w.id, children: (j == null ? void 0 : j.length) > 0 ? j : null }), i(k), ["o2m", "m2m"].includes(g.interface)) {
|
|
43670
43670
|
const M = Array.isArray(f.fieldValue) ? f.fieldValue : [];
|
|
@@ -43672,17 +43672,17 @@ const InternalFileManager = (e) => {
|
|
|
43672
43672
|
} else
|
|
43673
43673
|
f.value = w;
|
|
43674
43674
|
k.length === 1 && !k[0].value ? n == null || n(null) : n == null || n(k);
|
|
43675
|
-
}), B = (L, w, O) =>
|
|
43675
|
+
}), B = (L, w, O) => z(void 0, null, function* () {
|
|
43676
43676
|
var j, k, M;
|
|
43677
43677
|
if (L) {
|
|
43678
43678
|
d(!0);
|
|
43679
|
-
const
|
|
43680
|
-
if (d(!1), c(
|
|
43681
|
-
const
|
|
43682
|
-
|
|
43679
|
+
const q = yield R({ parentId: w == null ? void 0 : w.key });
|
|
43680
|
+
if (d(!1), c(q), O === (a == null ? void 0 : a.length) - 1 && ((j = w == null ? void 0 : w.value) != null && j.id)) {
|
|
43681
|
+
const E = yield R({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), V = [...a];
|
|
43682
|
+
V.splice(O + 1), V[O] = P(x({}, V[O]), { value: w == null ? void 0 : w.value }), V[O + 1] = { key: (M = w == null ? void 0 : w.value) == null ? void 0 : M.id, children: (E == null ? void 0 : E.length) > 0 ? E : null }, i(V), n == null || n(V);
|
|
43683
43683
|
}
|
|
43684
43684
|
}
|
|
43685
|
-
}), N = (L, w) =>
|
|
43685
|
+
}), N = (L, w) => z(void 0, null, function* () {
|
|
43686
43686
|
const O = L ? {
|
|
43687
43687
|
[y.label]: {
|
|
43688
43688
|
[F]: L
|
|
@@ -43713,7 +43713,7 @@ const InternalFileManager = (e) => {
|
|
|
43713
43713
|
onSearch: (M) => N(M, L),
|
|
43714
43714
|
fieldNames: y,
|
|
43715
43715
|
style: { minWidth: 150 },
|
|
43716
|
-
onChange: (M,
|
|
43716
|
+
onChange: (M, q) => D(M, q, w),
|
|
43717
43717
|
options: u ? [] : T(l),
|
|
43718
43718
|
onDropdownVisibleChange: (M) => B(M, L, w),
|
|
43719
43719
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
@@ -43957,9 +43957,9 @@ const InternalNesterCardCss = css`
|
|
|
43957
43957
|
(e) => {
|
|
43958
43958
|
var j;
|
|
43959
43959
|
const O = e, { value: t, multiple: o, openSize: n, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = O, c = W(O, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, F] = useState([]), I = useCollectionRecordData(), T = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((M) => {
|
|
43960
|
-
const
|
|
43960
|
+
const q = M == null ? void 0 : M[d.label];
|
|
43961
43961
|
return P(x({}, M), {
|
|
43962
|
-
[d.label]: getLabelFormatValue$1(b(S), b(
|
|
43962
|
+
[d.label]: getLabelFormatValue$1(b(S), b(q))
|
|
43963
43963
|
});
|
|
43964
43964
|
}) : [], [t, d == null ? void 0 : d.label]), R = {
|
|
43965
43965
|
size: "small",
|
|
@@ -43978,13 +43978,13 @@ const InternalNesterCardCss = css`
|
|
|
43978
43978
|
var k;
|
|
43979
43979
|
return o == null ? null : Array.isArray(t) ? (k = t.filter(Boolean)) == null ? void 0 : k.map((M) => M == null ? void 0 : M[d.value]) : t == null ? void 0 : t[d.value];
|
|
43980
43980
|
}, N = () => {
|
|
43981
|
-
const k = (f == null ? void 0 : f.targetKey) || "id", M = T.map((
|
|
43981
|
+
const k = (f == null ? void 0 : f.targetKey) || "id", M = T.map((E) => E[k]).filter(Boolean);
|
|
43982
43982
|
return M.length ? { $and: [{ [`${k}.$ne`]: M }] } : {};
|
|
43983
43983
|
}, $ = () => {
|
|
43984
|
-
const { setVisible: k } = useActionContext(), { multiple: M, selectedRows:
|
|
43984
|
+
const { setVisible: k } = useActionContext(), { multiple: M, selectedRows: q, onChange: E, options: V, collectionField: G } = useContext(RecordPickerContext);
|
|
43985
43985
|
return {
|
|
43986
43986
|
onClick() {
|
|
43987
|
-
|
|
43987
|
+
E(M ? unionBy(q, V, (G == null ? void 0 : G.targetKey) || "id") : (q == null ? void 0 : q[0]) || null), k(!1);
|
|
43988
43988
|
},
|
|
43989
43989
|
style: {
|
|
43990
43990
|
display: M === !1 ? "none" : "block"
|
|
@@ -44023,7 +44023,7 @@ const InternalNesterCardCss = css`
|
|
|
44023
44023
|
r([]), F([]);
|
|
44024
44024
|
return;
|
|
44025
44025
|
}
|
|
44026
|
-
const M = T == null ? void 0 : T.filter((
|
|
44026
|
+
const M = T == null ? void 0 : T.filter((q) => k.includes(q[d.value]));
|
|
44027
44027
|
r(M), F(M);
|
|
44028
44028
|
}
|
|
44029
44029
|
} else {
|
|
@@ -44489,30 +44489,32 @@ const defaultModeToComponent = {
|
|
|
44489
44489
|
};
|
|
44490
44490
|
var AssignedFieldValueType = /* @__PURE__ */ ((e) => (e.ConstantValue = "constantValue", e.DynamicValue = "dynamicValue", e))(AssignedFieldValueType || {});
|
|
44491
44491
|
const AssignedFieldInner = (e) => {
|
|
44492
|
-
const { value: t, onChange: o } = e, { getCollectionFields: n, getAllCollectionsInheritChain: r } = useCollectionManager_deprecated(), a = useCollection_deprecated(), { form: i } = useFormBlockContext(), l = useFieldSchema(), c =
|
|
44493
|
-
() => getShouldChange({ collectionField:
|
|
44494
|
-
[
|
|
44495
|
-
),
|
|
44496
|
-
(
|
|
44497
|
-
const
|
|
44498
|
-
return !(
|
|
44492
|
+
const { value: t, onChange: o } = e, { getCollectionFields: n, getAllCollectionsInheritChain: r } = useCollectionManager_deprecated(), a = useCollection_deprecated(), { form: i } = useFormBlockContext(), l = useFieldSchema(), c = useField(), u = useRecord(), d = useVariables$1(), p = useLocalVariables$1(), m = useCollectionFilterOptions(a), { name: h, getField: g } = a, f = g(l.name), { uiSchema: C } = useCollectionField_deprecated(), b = useMemo(
|
|
44493
|
+
() => getShouldChange({ collectionField: f, variables: d, localVariables: p, getAllCollectionsInheritChain: r }),
|
|
44494
|
+
[f, r, p, d]
|
|
44495
|
+
), S = useCallback(
|
|
44496
|
+
(v) => {
|
|
44497
|
+
const F = v.find((T) => T.value === "$nForm"), I = n(h);
|
|
44498
|
+
return !(I != null && I.length) && F && (F.children = formatVariableScop(m)), v;
|
|
44499
44499
|
},
|
|
44500
|
-
[
|
|
44501
|
-
),
|
|
44502
|
-
({ value:
|
|
44500
|
+
[m, h]
|
|
44501
|
+
), y = useCallback(
|
|
44502
|
+
({ value: v, onChange: F }) => /* @__PURE__ */ jsx(CollectionField, P(x({}, e), { value: v, onChange: F })),
|
|
44503
44503
|
[JSON.stringify(_.omit(e, "value"))]
|
|
44504
44504
|
);
|
|
44505
|
-
return
|
|
44505
|
+
return useEffect(() => {
|
|
44506
|
+
C && (c.title = typeof c.title == "undefined" ? (C == null ? void 0 : C.title) || c.name : c.title);
|
|
44507
|
+
}, [JSON.stringify(C)]), /* @__PURE__ */ jsx(FlagProvider, { collectionField: f, children: /* @__PURE__ */ jsx(
|
|
44506
44508
|
VariableInput,
|
|
44507
44509
|
{
|
|
44508
44510
|
form: i,
|
|
44509
|
-
record:
|
|
44511
|
+
record: u,
|
|
44510
44512
|
value: t,
|
|
44511
44513
|
onChange: o,
|
|
44512
|
-
renderSchemaComponent:
|
|
44513
|
-
collectionField:
|
|
44514
|
-
shouldChange:
|
|
44515
|
-
returnScope:
|
|
44514
|
+
renderSchemaComponent: y,
|
|
44515
|
+
collectionField: f,
|
|
44516
|
+
shouldChange: b,
|
|
44517
|
+
returnScope: S,
|
|
44516
44518
|
targetFieldSchema: l
|
|
44517
44519
|
}
|
|
44518
44520
|
) });
|
|
@@ -44774,7 +44776,7 @@ const CreateRecordAction$1 = forwardRef(InternalCreateRecordAction), initializer
|
|
|
44774
44776
|
const { onClick: u } = useAssociationCreateActionProps(), d = useField(), { getPrimaryKey: p } = useCollection_deprecated(), m = p();
|
|
44775
44777
|
return {
|
|
44776
44778
|
onClick() {
|
|
44777
|
-
return
|
|
44779
|
+
return z(this, null, function* () {
|
|
44778
44780
|
var f, C;
|
|
44779
44781
|
yield u();
|
|
44780
44782
|
const { data: g } = ((C = (f = d.data) == null ? void 0 : f.data) == null ? void 0 : C.data) || {};
|
|
@@ -45424,7 +45426,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45424
45426
|
"onClickRow",
|
|
45425
45427
|
"enableIndexÏColumn"
|
|
45426
45428
|
]), y = useArrayField(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), R = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = R, N = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
45427
|
-
})), $ = usePaginationProps$2(o, a), L = useTableColumns$1(S, $), [w, O] = useState(() => D ? B : []), [j, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [M,
|
|
45429
|
+
})), $ = usePaginationProps$2(o, a), L = useTableColumns$1(S, $), [w, O] = useState(() => D ? B : []), [j, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [M, q] = useState([]), E = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
45428
45430
|
& > td {
|
|
45429
45431
|
background-color: ${t.controlItemBgActive} !important;
|
|
45430
45432
|
}
|
|
@@ -45433,7 +45435,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45433
45435
|
}
|
|
45434
45436
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (Z, ne) => ({
|
|
45435
45437
|
onClick: (re) => {
|
|
45436
|
-
isPortalInBody(re.target) || C(Z,
|
|
45438
|
+
isPortalInBody(re.target) || C(Z, q, M);
|
|
45437
45439
|
},
|
|
45438
45440
|
rowIndex: ne
|
|
45439
45441
|
}) : null, [C, M]);
|
|
@@ -45446,10 +45448,10 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45446
45448
|
return J(Z);
|
|
45447
45449
|
if (Z.key)
|
|
45448
45450
|
return Z.key;
|
|
45449
|
-
if (
|
|
45450
|
-
return
|
|
45451
|
+
if (V.current.has(Z))
|
|
45452
|
+
return V.current.get(Z);
|
|
45451
45453
|
const ne = uid();
|
|
45452
|
-
return
|
|
45454
|
+
return V.current.set(Z, ne), ne;
|
|
45453
45455
|
}, []), J = useCallback(
|
|
45454
45456
|
(Z) => {
|
|
45455
45457
|
var ne;
|
|
@@ -45505,14 +45507,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45505
45507
|
role: "button",
|
|
45506
45508
|
"aria-label": `table-index-${re}`,
|
|
45507
45509
|
className: cls(Z ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
45508
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
45510
|
+
[rowSelectCheckboxWrapperClassHover]: E
|
|
45509
45511
|
}),
|
|
45510
45512
|
children: [
|
|
45511
45513
|
/* @__PURE__ */ jsxs("div", { className: cls(Z ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
45512
45514
|
l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(ne) }),
|
|
45513
45515
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: re })
|
|
45514
45516
|
] }),
|
|
45515
|
-
|
|
45517
|
+
E && /* @__PURE__ */ jsx(
|
|
45516
45518
|
"div",
|
|
45517
45519
|
{
|
|
45518
45520
|
className: cls(
|
|
@@ -45537,7 +45539,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45537
45539
|
l,
|
|
45538
45540
|
y,
|
|
45539
45541
|
J,
|
|
45540
|
-
|
|
45542
|
+
E,
|
|
45541
45543
|
ee,
|
|
45542
45544
|
$,
|
|
45543
45545
|
b
|
|
@@ -45649,14 +45651,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45649
45651
|
}
|
|
45650
45652
|
`, SubTable = observer$1(
|
|
45651
45653
|
(e) => {
|
|
45652
|
-
var
|
|
45654
|
+
var k, M, q;
|
|
45653
45655
|
const { openSize: t } = e, { field: o, options: n, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(n, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S, enableIndexÏColumn: y } = o.componentProps;
|
|
45654
45656
|
useSubTableSpecialCase({ rootField: o, rootSchema: r });
|
|
45655
45657
|
const v = (E, V) => {
|
|
45656
45658
|
if (V !== void 0 && isArr(o.value) && E !== V)
|
|
45657
45659
|
return action(() => {
|
|
45658
|
-
const
|
|
45659
|
-
return o.value.splice(E, 1), o.value.splice(V, 0,
|
|
45660
|
+
const G = o.value[E];
|
|
45661
|
+
return o.value.splice(E, 1), o.value.splice(V, 0, G), exchangeArrayState(o, {
|
|
45660
45662
|
fromIndex: E,
|
|
45661
45663
|
toIndex: V
|
|
45662
45664
|
}), o.onInput(o.value);
|
|
@@ -45664,9 +45666,9 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45664
45666
|
};
|
|
45665
45667
|
o.move = v;
|
|
45666
45668
|
const F = useMemo(() => o.value && Object.keys(o.value).length > 0 ? (Array.isArray(o.value) ? o.value : o.value ? [o.value] : []).filter(Boolean).map((V) => {
|
|
45667
|
-
const
|
|
45669
|
+
const G = V == null ? void 0 : V[d.label];
|
|
45668
45670
|
return P(x({}, V), {
|
|
45669
|
-
[d.label]: getLabelFormatValue$1(m(h), m(
|
|
45671
|
+
[d.label]: getLabelFormatValue$1(m(h), m(G))
|
|
45670
45672
|
});
|
|
45671
45673
|
}) : [], [o.value, d == null ? void 0 : d.label]), I = {
|
|
45672
45674
|
size: "small",
|
|
@@ -45681,48 +45683,48 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45681
45683
|
setSelectedRows: u,
|
|
45682
45684
|
collectionField: n
|
|
45683
45685
|
}, T = () => {
|
|
45684
|
-
const { setVisible: E } = useActionContext(), { selectedRows: V, setSelectedRows:
|
|
45686
|
+
const { setVisible: E } = useActionContext(), { selectedRows: V, setSelectedRows: G } = useContext(RecordPickerContext);
|
|
45685
45687
|
return {
|
|
45686
45688
|
onClick() {
|
|
45687
|
-
var
|
|
45688
|
-
Array.isArray(o.value) || (o.value = []), V.forEach((
|
|
45689
|
-
const
|
|
45690
|
-
B(
|
|
45689
|
+
var H;
|
|
45690
|
+
Array.isArray(o.value) || (o.value = []), V.forEach((Y) => o.value.push(markRecordAsNew(Y))), o.onInput(o.value), o.initialValue = o.value, G([]), E(!1);
|
|
45691
|
+
const U = Math.ceil(o.value.length / (((H = o.componentProps) == null ? void 0 : H.pageSize) || 10));
|
|
45692
|
+
B(U);
|
|
45691
45693
|
}
|
|
45692
45694
|
};
|
|
45693
45695
|
}, R = () => {
|
|
45694
|
-
const E = (n == null ? void 0 : n.targetKey) || "id", V = (o.value || []).map((
|
|
45696
|
+
const E = (n == null ? void 0 : n.targetKey) || "id", V = (o.value || []).map((U) => U == null ? void 0 : U[E]).filter(Boolean);
|
|
45695
45697
|
return V.length ? { $and: [{ [`${E}.$ne`]: V }] } : {};
|
|
45696
|
-
}, [D, B] = useState(1), [N, $] = useState(((
|
|
45698
|
+
}, [D, B] = useState(1), [N, $] = useState(((k = o.componentProps) == null ? void 0 : k.pageSize) || 10), { setFormValueChanged: L } = useActionContext();
|
|
45697
45699
|
useEffect(() => {
|
|
45698
45700
|
var E;
|
|
45699
45701
|
$((E = o.componentProps) == null ? void 0 : E.pageSize);
|
|
45700
|
-
}, [(
|
|
45701
|
-
const
|
|
45702
|
+
}, [(M = o.componentProps) == null ? void 0 : M.pageSize]);
|
|
45703
|
+
const w = useMemo(() => {
|
|
45702
45704
|
var V;
|
|
45703
45705
|
const E = Math.ceil(((V = o.value) == null ? void 0 : V.length) / 10);
|
|
45704
45706
|
return {
|
|
45705
45707
|
current: D > E ? E : D,
|
|
45706
45708
|
pageSize: N || 10,
|
|
45707
45709
|
total: o == null ? void 0 : o.value,
|
|
45708
|
-
onChange: (
|
|
45709
|
-
B(
|
|
45710
|
+
onChange: (G, U) => {
|
|
45711
|
+
B(G), $(U), o.componentProps.pageSize = U, o.onInput(o.value), L(!1);
|
|
45710
45712
|
},
|
|
45711
45713
|
showSizeChanger: !0,
|
|
45712
45714
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
45713
45715
|
hideOnSinglePage: !1
|
|
45714
45716
|
};
|
|
45715
|
-
}, [(
|
|
45717
|
+
}, [(q = o.value) == null ? void 0 : q.length, N, D]), O = () => {
|
|
45716
45718
|
const { field: E } = useAssociationFieldContext();
|
|
45717
45719
|
return {
|
|
45718
45720
|
run() {
|
|
45719
|
-
var
|
|
45721
|
+
var G;
|
|
45720
45722
|
E.value = E.value || [], E.value.push(markRecordAsNew({}));
|
|
45721
|
-
const V = Math.ceil(E.value.length / (((
|
|
45723
|
+
const V = Math.ceil(E.value.length / (((G = E.componentProps) == null ? void 0 : G.pageSize) || 10));
|
|
45722
45724
|
return B(V), E.onInput(E.value);
|
|
45723
45725
|
}
|
|
45724
45726
|
};
|
|
45725
|
-
},
|
|
45727
|
+
}, j = () => ({
|
|
45726
45728
|
run() {
|
|
45727
45729
|
l(!0);
|
|
45728
45730
|
}
|
|
@@ -45737,7 +45739,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45737
45739
|
showIndex: !0,
|
|
45738
45740
|
dragSort: !1,
|
|
45739
45741
|
showDel: o.editable && (b !== !1 || C !== !1 || S !== !1) ? (E) => o.editable ? S !== !1 ? !0 : E == null ? void 0 : E.__isNewRecord__ : !1 : !1,
|
|
45740
|
-
pagination:
|
|
45742
|
+
pagination: w,
|
|
45741
45743
|
rowSelection: { type: "none", hideSelectAll: !0 },
|
|
45742
45744
|
isSubTable: !0,
|
|
45743
45745
|
locale: {
|
|
@@ -45757,7 +45759,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45757
45759
|
b !== !1 && /* @__PURE__ */ jsx(
|
|
45758
45760
|
Action.Link,
|
|
45759
45761
|
{
|
|
45760
|
-
useAction:
|
|
45762
|
+
useAction: O,
|
|
45761
45763
|
title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, className: "nb-sub-table-addNew", children: [
|
|
45762
45764
|
/* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
45763
45765
|
" ",
|
|
@@ -45768,7 +45770,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
45768
45770
|
C && /* @__PURE__ */ jsx(
|
|
45769
45771
|
Action.Link,
|
|
45770
45772
|
{
|
|
45771
|
-
useAction:
|
|
45773
|
+
useAction: j,
|
|
45772
45774
|
title: /* @__PURE__ */ jsxs(Space$1, { style: { gap: 2 }, children: [
|
|
45773
45775
|
/* @__PURE__ */ jsx(ZoomInOutlined, {}),
|
|
45774
45776
|
" ",
|
|
@@ -45903,10 +45905,10 @@ const ReadPretty$7 = observer$1(
|
|
|
45903
45905
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
45904
45906
|
const AssociationSelect = InternalAssociationSelect;
|
|
45905
45907
|
AssociationSelect.Designer = function e() {
|
|
45906
|
-
var O, j, k, M, E, V,
|
|
45908
|
+
var O, j, k, M, q, E, V, G, U, H, Y;
|
|
45907
45909
|
const { getCollectionFields: t, getInterface: o, getCollectionJoinField: n, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = 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 = i(u.name) || n(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = o(S == null ? void 0 : S.interface), I = (O = F == null ? void 0 : F.validateSchema) == null ? void 0 : O.call(F, u), T = (j = S == null ? void 0 : S.uiSchema) == null ? void 0 : j.title, R = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
45908
45910
|
c.title === T || c.title;
|
|
45909
|
-
const D = useSortFields(S == null ? void 0 : S.target), B = ((
|
|
45911
|
+
const D = useSortFields(S == null ? void 0 : S.target), B = ((q = (M = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : M.params) == null ? void 0 : q.sort) || [];
|
|
45910
45912
|
useEffect(() => {
|
|
45911
45913
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
45912
45914
|
}, [u["x-read-pretty"]]);
|
|
@@ -46117,7 +46119,7 @@ AssociationSelect.Designer = function e() {
|
|
|
46117
46119
|
SchemaSettingsSwitchItem,
|
|
46118
46120
|
{
|
|
46119
46121
|
title: d("Allow multiple"),
|
|
46120
|
-
checked: ((
|
|
46122
|
+
checked: ((E = u["x-component-props"]) == null ? void 0 : E.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
46121
46123
|
onChange: (J) => {
|
|
46122
46124
|
const K = {
|
|
46123
46125
|
"x-uid": u["x-uid"]
|
|
@@ -46133,7 +46135,7 @@ AssociationSelect.Designer = function e() {
|
|
|
46133
46135
|
SchemaSettingsDataScope,
|
|
46134
46136
|
{
|
|
46135
46137
|
collectionName: S == null ? void 0 : S.target,
|
|
46136
|
-
defaultFilter: ((U = (G = (
|
|
46138
|
+
defaultFilter: ((U = (G = (V = c.componentProps) == null ? void 0 : V.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
|
|
46137
46139
|
form: l,
|
|
46138
46140
|
onSubmit: ({ filter: J }) => {
|
|
46139
46141
|
J = removeNullCondition(J), _.set(c.componentProps, "service.params.filter", J), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
@@ -46409,18 +46411,18 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
46409
46411
|
}
|
|
46410
46412
|
},
|
|
46411
46413
|
onSubmit: (j) => {
|
|
46412
|
-
var
|
|
46414
|
+
var E;
|
|
46413
46415
|
const k = [];
|
|
46414
|
-
for (const
|
|
46415
|
-
k.push(_.pickBy(
|
|
46416
|
+
for (const V of j.rules)
|
|
46417
|
+
k.push(_.pickBy(V, _.identity));
|
|
46416
46418
|
const M = {
|
|
46417
46419
|
"x-uid": l["x-uid"]
|
|
46418
46420
|
};
|
|
46419
46421
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
46420
|
-
for (const
|
|
46421
|
-
(
|
|
46422
|
-
const
|
|
46423
|
-
i.validator =
|
|
46422
|
+
for (const V of k)
|
|
46423
|
+
(V.maxValue || V.minValue) && (V.percentMode = !0), V.percentFormat && (V.percentFormats = !0);
|
|
46424
|
+
const q = _.concat([], ((E = m == null ? void 0 : m.uiSchema) == null ? void 0 : E["x-validator"]) || [], k);
|
|
46425
|
+
i.validator = q, l["x-validator"] = k, M["x-validator"] = k, u.emit("patch", {
|
|
46424
46426
|
schema: M
|
|
46425
46427
|
}), d();
|
|
46426
46428
|
}
|
|
@@ -46561,10 +46563,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
46561
46563
|
options: v,
|
|
46562
46564
|
value: (O = (w = i == null ? void 0 : i.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : O.label,
|
|
46563
46565
|
onChange: (j) => {
|
|
46564
|
-
var
|
|
46566
|
+
var q, E;
|
|
46565
46567
|
const k = {
|
|
46566
46568
|
"x-uid": l["x-uid"]
|
|
46567
|
-
}, M = P(x(x({}, (
|
|
46569
|
+
}, M = P(x(x({}, (E = (q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-component-props"]) == null ? void 0 : E.fieldNames), i.componentProps.fieldNames), {
|
|
46568
46570
|
label: j
|
|
46569
46571
|
});
|
|
46570
46572
|
i.componentProps.fieldNames = M, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = M, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
@@ -47295,7 +47297,7 @@ const validateJSON = {
|
|
|
47295
47297
|
}
|
|
47296
47298
|
}
|
|
47297
47299
|
},
|
|
47298
|
-
onSubmit: (m) =>
|
|
47300
|
+
onSubmit: (m) => z(void 0, [m], function* ({ plot: u, title: d, config: p }) {
|
|
47299
47301
|
n.title = r(d), n.componentProps.plot = u;
|
|
47300
47302
|
const h = r(JSON.parse(p)), g = h == null ? void 0 : h.data;
|
|
47301
47303
|
if (typeof g == "function") {
|
|
@@ -48186,7 +48188,7 @@ const InternalListBlockProvider = (e) => {
|
|
|
48186
48188
|
display: none !important;
|
|
48187
48189
|
}
|
|
48188
48190
|
`,
|
|
48189
|
-
itemRender: (M,
|
|
48191
|
+
itemRender: (M, q, E) => q === "prev" ? /* @__PURE__ */ jsxs(
|
|
48190
48192
|
"div",
|
|
48191
48193
|
{
|
|
48192
48194
|
style: { display: "flex" },
|
|
@@ -48196,12 +48198,12 @@ const InternalListBlockProvider = (e) => {
|
|
|
48196
48198
|
}
|
|
48197
48199
|
`,
|
|
48198
48200
|
children: [
|
|
48199
|
-
|
|
48201
|
+
E,
|
|
48200
48202
|
" ",
|
|
48201
48203
|
/* @__PURE__ */ jsx("div", { style: { marginLeft: "7px" }, children: d })
|
|
48202
48204
|
]
|
|
48203
48205
|
}
|
|
48204
|
-
) :
|
|
48206
|
+
) : E
|
|
48205
48207
|
};
|
|
48206
48208
|
})(), { isMobileLayout: $ } = useMobileLayout();
|
|
48207
48209
|
return h(
|
|
@@ -49484,7 +49486,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
49484
49486
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, o), { children: t + 1 }));
|
|
49485
49487
|
}, useDefAction = () => ({
|
|
49486
49488
|
move() {
|
|
49487
|
-
return
|
|
49489
|
+
return z(this, null, function* () {
|
|
49488
49490
|
});
|
|
49489
49491
|
}
|
|
49490
49492
|
}), TableArray = observer$1(
|
|
@@ -49611,7 +49613,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
49611
49613
|
ReactDragListView,
|
|
49612
49614
|
{
|
|
49613
49615
|
handleSelector: ".drag-handle",
|
|
49614
|
-
onDragEnd: (y, v) =>
|
|
49616
|
+
onDragEnd: (y, v) => z(void 0, null, function* () {
|
|
49615
49617
|
const F = o.value[y], I = o.value[v];
|
|
49616
49618
|
o.move(y, v), yield h(F, I);
|
|
49617
49619
|
}),
|
|
@@ -49700,7 +49702,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
49700
49702
|
const m = useActionContext();
|
|
49701
49703
|
return {
|
|
49702
49704
|
run() {
|
|
49703
|
-
return
|
|
49705
|
+
return z(this, null, function* () {
|
|
49704
49706
|
m.setVisible(!1);
|
|
49705
49707
|
});
|
|
49706
49708
|
}
|
|
@@ -49718,7 +49720,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
49718
49720
|
const m = useForm(), h = useActionContext();
|
|
49719
49721
|
return {
|
|
49720
49722
|
run() {
|
|
49721
|
-
return
|
|
49723
|
+
return z(this, null, function* () {
|
|
49722
49724
|
const { title: f } = m.values;
|
|
49723
49725
|
f && (r.title = f, a.title = f, i.emit("patch", {
|
|
49724
49726
|
schema: {
|
|
@@ -50142,9 +50144,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50142
50144
|
defaultChecked: !0,
|
|
50143
50145
|
checked: S ? r.decoratorProps.treeTable : !1,
|
|
50144
50146
|
onChange: (k) => {
|
|
50145
|
-
var
|
|
50147
|
+
var q;
|
|
50146
50148
|
r.decoratorProps.treeTable = k, a["x-decorator-props"].treeTable = k;
|
|
50147
|
-
const M = P(x({}, (
|
|
50149
|
+
const M = P(x({}, (q = c.params) == null ? void 0 : q[0]), {
|
|
50148
50150
|
tree: k ? !0 : null
|
|
50149
50151
|
});
|
|
50150
50152
|
d.emit("patch", {
|
|
@@ -50158,7 +50160,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50158
50160
|
{
|
|
50159
50161
|
title: u("Enable drag and drop sorting"),
|
|
50160
50162
|
checked: r.decoratorProps.dragSort,
|
|
50161
|
-
onChange: (k) =>
|
|
50163
|
+
onChange: (k) => z(void 0, null, function* () {
|
|
50162
50164
|
k && b && (yield v.resource("collections.fields", b.collectionName).update({
|
|
50163
50165
|
filterByTk: b.name,
|
|
50164
50166
|
values: {
|
|
@@ -50178,7 +50180,7 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50178
50180
|
{
|
|
50179
50181
|
title: u("Enable index column"),
|
|
50180
50182
|
checked: ((N = r.decoratorProps) == null ? void 0 : N.enableSelectColumn) !== !1,
|
|
50181
|
-
onChange: (k) =>
|
|
50183
|
+
onChange: (k) => z(void 0, null, function* () {
|
|
50182
50184
|
r.decoratorProps = r.decoratorProps || {}, r.decoratorProps.enableIndexÏColumn = k, a["x-decorator-props"].enableIndexÏColumn = k, d.emit("patch", {
|
|
50183
50185
|
schema: {
|
|
50184
50186
|
"x-uid": a["x-uid"],
|
|
@@ -50274,14 +50276,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50274
50276
|
}
|
|
50275
50277
|
},
|
|
50276
50278
|
onSubmit: ({ sort: k }) => {
|
|
50277
|
-
var
|
|
50278
|
-
const M = k.map((
|
|
50279
|
-
|
|
50279
|
+
var E;
|
|
50280
|
+
const M = k.map((V) => V.direction === "desc" ? `-${V.field}` : V.field), q = r.decoratorProps.params || {};
|
|
50281
|
+
q.sort = M, r.decoratorProps.params = q, a["x-decorator-props"].params = q, d.emit("patch", {
|
|
50280
50282
|
schema: {
|
|
50281
50283
|
"x-uid": a["x-uid"],
|
|
50282
50284
|
"x-decorator-props": a["x-decorator-props"]
|
|
50283
50285
|
}
|
|
50284
|
-
}), c.run(P(x({}, (
|
|
50286
|
+
}), c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { sort: M }));
|
|
50285
50287
|
}
|
|
50286
50288
|
}
|
|
50287
50289
|
),
|
|
@@ -50300,9 +50302,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50300
50302
|
{ label: "200", value: 200 }
|
|
50301
50303
|
],
|
|
50302
50304
|
onChange: (k) => {
|
|
50303
|
-
var
|
|
50305
|
+
var q;
|
|
50304
50306
|
const M = r.decoratorProps.params || {};
|
|
50305
|
-
M.pageSize = k, r.decoratorProps.params = M, a["x-decorator-props"].params = M, c.run(P(x({}, (
|
|
50307
|
+
M.pageSize = k, r.decoratorProps.params = M, a["x-decorator-props"].params = M, c.run(P(x({}, (q = c.params) == null ? void 0 : q[0]), { pageSize: k, page: 1 })), d.emit("patch", {
|
|
50306
50308
|
schema: {
|
|
50307
50309
|
"x-uid": a["x-uid"],
|
|
50308
50310
|
"x-decorator-props": a["x-decorator-props"]
|
|
@@ -50322,9 +50324,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
50322
50324
|
{ label: u("Small"), value: "small" }
|
|
50323
50325
|
],
|
|
50324
50326
|
onChange: (k) => {
|
|
50325
|
-
const M = a.reduceProperties((
|
|
50326
|
-
if (
|
|
50327
|
-
return
|
|
50327
|
+
const M = a.reduceProperties((q, E) => {
|
|
50328
|
+
if (E["x-component"] === "TableV2")
|
|
50329
|
+
return E;
|
|
50328
50330
|
}, null);
|
|
50329
50331
|
M["x-component-props"] = M["x-component-props"] || {}, M["x-component-props"].size = k, d.emit("patch", {
|
|
50330
50332
|
schema: {
|
|
@@ -50821,7 +50823,7 @@ function FormDrawer(e, t, o, n) {
|
|
|
50821
50823
|
document.body.appendChild(r.host);
|
|
50822
50824
|
const d = {
|
|
50823
50825
|
forOpen: (p) => (isFn(p) && r.openMiddlewares.push(p), d),
|
|
50824
|
-
open: (p) => (r.promise || (r.promise = new Promise((m, h) =>
|
|
50826
|
+
open: (p) => (r.promise || (r.promise = new Promise((m, h) => z(this, null, function* () {
|
|
50825
50827
|
try {
|
|
50826
50828
|
p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(P(x({}, p), {
|
|
50827
50829
|
effects(g) {
|
|
@@ -51753,7 +51755,7 @@ const useRecordIsOwn = () => {
|
|
|
51753
51755
|
const e = useForm(), t = useActionContext();
|
|
51754
51756
|
return {
|
|
51755
51757
|
run() {
|
|
51756
|
-
return
|
|
51758
|
+
return z(this, null, function* () {
|
|
51757
51759
|
t.setVisible(!1), e.reset();
|
|
51758
51760
|
});
|
|
51759
51761
|
}
|
|
@@ -51772,7 +51774,7 @@ const useRecordIsOwn = () => {
|
|
|
51772
51774
|
const { run: e } = useResourceActionContext(), t = useForm(), o = useActionContext();
|
|
51773
51775
|
return {
|
|
51774
51776
|
run() {
|
|
51775
|
-
return
|
|
51777
|
+
return z(this, null, function* () {
|
|
51776
51778
|
t.reset(), e(), o.setVisible(!1);
|
|
51777
51779
|
});
|
|
51778
51780
|
}
|
|
@@ -51781,7 +51783,7 @@ const useRecordIsOwn = () => {
|
|
|
51781
51783
|
const { resource: e } = useCollection_deprecated();
|
|
51782
51784
|
return {
|
|
51783
51785
|
onCardDragEnd(c, u, d) {
|
|
51784
|
-
return
|
|
51786
|
+
return z(this, arguments, function* ({ columns: o, groupField: n }, { fromColumnId: r, fromPosition: a }, { toColumnId: i, toPosition: l }) {
|
|
51785
51787
|
var C, b;
|
|
51786
51788
|
const p = o.find((S) => S.id === r), m = o.find((S) => S.id === i), h = (C = p == null ? void 0 : p.cards) == null ? void 0 : C[a], g = (b = m == null ? void 0 : m.cards) == null ? void 0 : b[l], f = {
|
|
51787
51789
|
sourceId: h.id,
|
|
@@ -51974,7 +51976,7 @@ const useRecordIsOwn = () => {
|
|
|
51974
51976
|
const { run: e, params: t, defaultRequest: o } = useResourceActionContext(), n = useForm(), r = useActionContext(), [a, ...i] = t;
|
|
51975
51977
|
return {
|
|
51976
51978
|
run() {
|
|
51977
|
-
return
|
|
51979
|
+
return z(this, null, function* () {
|
|
51978
51980
|
var d;
|
|
51979
51981
|
const c = (d = o == null ? void 0 : o.params) == null ? void 0 : d.filter, u = c ? { $and: [c, n.values.filter] } : n.values.filter;
|
|
51980
51982
|
e(P(x({}, a), { filter: u }), ...i), r.setVisible(!1);
|
|
@@ -51985,7 +51987,7 @@ const useRecordIsOwn = () => {
|
|
|
51985
51987
|
const t = useForm(), o = useField(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: a } = useResourceContext();
|
|
51986
51988
|
return {
|
|
51987
51989
|
run() {
|
|
51988
|
-
return
|
|
51990
|
+
return z(this, null, function* () {
|
|
51989
51991
|
var l;
|
|
51990
51992
|
try {
|
|
51991
51993
|
yield t.submit(), o.data = o.data || {}, o.data.loading = !0;
|
|
@@ -52001,7 +52003,7 @@ const useRecordIsOwn = () => {
|
|
|
52001
52003
|
const t = useForm(), { resource: o } = useResourceContext();
|
|
52002
52004
|
return {
|
|
52003
52005
|
run() {
|
|
52004
|
-
return
|
|
52006
|
+
return z(this, null, function* () {
|
|
52005
52007
|
var a;
|
|
52006
52008
|
yield t.submit();
|
|
52007
52009
|
const r = yield o.create({ values: t.values });
|
|
@@ -52015,7 +52017,7 @@ const useRecordIsOwn = () => {
|
|
|
52015
52017
|
const { resource: o, targetKey: n } = useResourceContext(), { [n]: r } = useRecord();
|
|
52016
52018
|
return {
|
|
52017
52019
|
run() {
|
|
52018
|
-
return
|
|
52020
|
+
return z(this, null, function* () {
|
|
52019
52021
|
var l;
|
|
52020
52022
|
yield t.submit();
|
|
52021
52023
|
const i = yield o.update({ filterByTk: r, values: t.values });
|
|
@@ -52027,7 +52029,7 @@ const useRecordIsOwn = () => {
|
|
|
52027
52029
|
const { resource: e } = useResourceContext(), { refresh: t } = useResourceActionContext();
|
|
52028
52030
|
return {
|
|
52029
52031
|
move(n, r) {
|
|
52030
|
-
return
|
|
52032
|
+
return z(this, null, function* () {
|
|
52031
52033
|
yield e.move({
|
|
52032
52034
|
sourceId: n.id,
|
|
52033
52035
|
targetId: r.id
|
|
@@ -52039,7 +52041,7 @@ const useRecordIsOwn = () => {
|
|
|
52039
52041
|
const t = useField(), o = useForm(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: a, targetKey: i } = useResourceContext(), { [i]: l } = useRecord();
|
|
52040
52042
|
return {
|
|
52041
52043
|
run() {
|
|
52042
|
-
return
|
|
52044
|
+
return z(this, null, function* () {
|
|
52043
52045
|
var u;
|
|
52044
52046
|
yield o.submit(), t.data = t.data || {}, t.data.loading = !0;
|
|
52045
52047
|
try {
|
|
@@ -52057,7 +52059,7 @@ const useRecordIsOwn = () => {
|
|
|
52057
52059
|
const { refresh: t } = useResourceActionContext(), { resource: o, targetKey: n } = useResourceContext(), { [n]: r } = useRecord();
|
|
52058
52060
|
return {
|
|
52059
52061
|
run() {
|
|
52060
|
-
return
|
|
52062
|
+
return z(this, null, function* () {
|
|
52061
52063
|
yield o.destroy({ filterByTk: r }), e == null || e(r), t();
|
|
52062
52064
|
});
|
|
52063
52065
|
}
|
|
@@ -52066,7 +52068,7 @@ const useRecordIsOwn = () => {
|
|
|
52066
52068
|
const { state: t, setState: o, refresh: n } = useResourceActionContext(), { resource: r } = useResourceContext(), { t: a } = useTranslation();
|
|
52067
52069
|
return {
|
|
52068
52070
|
run() {
|
|
52069
|
-
return
|
|
52071
|
+
return z(this, null, function* () {
|
|
52070
52072
|
var l;
|
|
52071
52073
|
if (!((l = t == null ? void 0 : t.selectedRowKeys) != null && l.length))
|
|
52072
52074
|
return message.error(a("Please select the records you want to delete"));
|
|
@@ -52085,7 +52087,7 @@ const useRecordIsOwn = () => {
|
|
|
52085
52087
|
const { run: e } = useCreateAction(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
52086
52088
|
return {
|
|
52087
52089
|
run() {
|
|
52088
|
-
return
|
|
52090
|
+
return z(this, null, function* () {
|
|
52089
52091
|
yield e(), yield t();
|
|
52090
52092
|
});
|
|
52091
52093
|
}
|
|
@@ -52094,7 +52096,7 @@ const useRecordIsOwn = () => {
|
|
|
52094
52096
|
const { run: e } = useUpdateAction(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
52095
52097
|
return {
|
|
52096
52098
|
run() {
|
|
52097
|
-
return
|
|
52099
|
+
return z(this, null, function* () {
|
|
52098
52100
|
yield e(), yield t();
|
|
52099
52101
|
});
|
|
52100
52102
|
}
|
|
@@ -52103,7 +52105,7 @@ const useRecordIsOwn = () => {
|
|
|
52103
52105
|
const { run: e } = useDestroyAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
52104
52106
|
return {
|
|
52105
52107
|
run() {
|
|
52106
|
-
return
|
|
52108
|
+
return z(this, null, function* () {
|
|
52107
52109
|
yield e(), yield t();
|
|
52108
52110
|
});
|
|
52109
52111
|
}
|
|
@@ -52118,7 +52120,7 @@ const useRecordIsOwn = () => {
|
|
|
52118
52120
|
const { run: e } = useBulkDestroyAction$1(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
52119
52121
|
return {
|
|
52120
52122
|
run() {
|
|
52121
|
-
return
|
|
52123
|
+
return z(this, null, function* () {
|
|
52122
52124
|
yield e(), yield t();
|
|
52123
52125
|
});
|
|
52124
52126
|
}
|
|
@@ -52277,7 +52279,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52277
52279
|
{
|
|
52278
52280
|
showSearch: !0,
|
|
52279
52281
|
options: l,
|
|
52280
|
-
onDropdownVisibleChange: (g) =>
|
|
52282
|
+
onDropdownVisibleChange: (g) => z(void 0, null, function* () {
|
|
52281
52283
|
var b;
|
|
52282
52284
|
const { target: f, type: C } = p.values;
|
|
52283
52285
|
f && g && c(
|
|
@@ -52327,7 +52329,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52327
52329
|
value: C,
|
|
52328
52330
|
options: o,
|
|
52329
52331
|
showSearch: !0,
|
|
52330
|
-
onDropdownVisibleChange: (F) =>
|
|
52332
|
+
onDropdownVisibleChange: (F) => z(void 0, null, function* () {
|
|
52331
52333
|
var B;
|
|
52332
52334
|
const { target: I, type: T, through: R } = f.values, D = ["belongsTo"].includes(T) ? l || p : ["belongsToMany"].includes(T) ? R : I;
|
|
52333
52335
|
if (D && F) {
|
|
@@ -52510,7 +52512,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52510
52512
|
const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: n } = useResourceActionContext(), { resource: r } = useResourceContext(), a = useField();
|
|
52511
52513
|
return {
|
|
52512
52514
|
run() {
|
|
52513
|
-
return
|
|
52515
|
+
return z(this, null, function* () {
|
|
52514
52516
|
yield e.submit(), a.data = a.data || {}, a.data.loading = !0;
|
|
52515
52517
|
const l = cloneDeep$1(e.values);
|
|
52516
52518
|
l.autoCreateReverseField || delete l.reverseField, delete l.autoCreateReverseField;
|
|
@@ -52533,21 +52535,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52533
52535
|
})), []), R = useCallback(() => {
|
|
52534
52536
|
const { availableFieldInterfaces: w } = u(n.template) || {}, { exclude: O, include: j } = w || {}, k = [];
|
|
52535
52537
|
return F.forEach((M) => {
|
|
52536
|
-
var
|
|
52538
|
+
var q;
|
|
52537
52539
|
if (M.key === "systemInfo")
|
|
52538
52540
|
k.push(P(x({}, M), {
|
|
52539
|
-
children: M.children.filter((
|
|
52541
|
+
children: M.children.filter((E) => E.hidden ? !1 : E.value === "tableoid" ? j != null && j.length ? j.includes(E.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof n[E.value] == "boolean" ? n[E.value] : !0)
|
|
52540
52542
|
}));
|
|
52541
52543
|
else {
|
|
52542
|
-
let
|
|
52543
|
-
j != null && j.length ? j.forEach((
|
|
52544
|
+
let E = [];
|
|
52545
|
+
j != null && j.length ? j.forEach((V) => {
|
|
52544
52546
|
var U;
|
|
52545
|
-
const G = (U = M == null ? void 0 : M.children) == null ? void 0 : U.find((H) => [
|
|
52546
|
-
G &&
|
|
52547
|
-
targetScope:
|
|
52547
|
+
const G = (U = M == null ? void 0 : M.children) == null ? void 0 : U.find((H) => [V, V.interface].includes(H.name));
|
|
52548
|
+
G && E.push(P(x({}, G), {
|
|
52549
|
+
targetScope: V == null ? void 0 : V.targetScope
|
|
52548
52550
|
}));
|
|
52549
|
-
}) : O != null && O.length ?
|
|
52550
|
-
children:
|
|
52551
|
+
}) : O != null && O.length ? E = (q = M == null ? void 0 : M.children) == null ? void 0 : q.filter((V) => !O.includes(V.name)) : E = M == null ? void 0 : M.children, E != null && E.length && k.push(P(x({}, M), {
|
|
52552
|
+
children: E
|
|
52551
52553
|
}));
|
|
52552
52554
|
}
|
|
52553
52555
|
}), k;
|
|
@@ -52696,7 +52698,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52696
52698
|
const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: n } = useResourceActionContext(), { resource: r, targetKey: a } = useResourceContext(), { [a]: i } = useRecord();
|
|
52697
52699
|
return {
|
|
52698
52700
|
run() {
|
|
52699
|
-
return
|
|
52701
|
+
return z(this, null, function* () {
|
|
52700
52702
|
yield e.submit();
|
|
52701
52703
|
const c = cloneDeep(e.values);
|
|
52702
52704
|
c.autoCreateReverseField || delete c.reverseField, delete c.autoCreateReverseField, yield r.update({ filterByTk: i, values: c }), o.setVisible(!1), yield e.reset(), n(), yield t();
|
|
@@ -52724,7 +52726,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52724
52726
|
/* @__PURE__ */ jsx(
|
|
52725
52727
|
"a",
|
|
52726
52728
|
P(x({}, i), {
|
|
52727
|
-
onClick: () =>
|
|
52729
|
+
onClick: () => z(void 0, null, function* () {
|
|
52728
52730
|
var N, $;
|
|
52729
52731
|
const { data: T } = yield g.resource("collections.fields", n.collectionName).get({
|
|
52730
52732
|
filterByTk: n.name,
|
|
@@ -52836,9 +52838,9 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52836
52838
|
const L = useForm(), { refresh: w } = useResourceActionContext(), { refreshCM: O } = useCollectionManager_deprecated(), j = useActionContext(), { resource: k } = useResourceContext();
|
|
52837
52839
|
return {
|
|
52838
52840
|
run() {
|
|
52839
|
-
return
|
|
52841
|
+
return z(this, null, function* () {
|
|
52840
52842
|
yield L.submit();
|
|
52841
|
-
const
|
|
52843
|
+
const q = cloneDeep(L.values), E = omit(q, [
|
|
52842
52844
|
"key",
|
|
52843
52845
|
"uiSchemaUid",
|
|
52844
52846
|
"collectionName",
|
|
@@ -52851,7 +52853,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52851
52853
|
// 'reverseField.uiSchemaUid',
|
|
52852
52854
|
]);
|
|
52853
52855
|
yield k.create({
|
|
52854
|
-
values:
|
|
52856
|
+
values: E
|
|
52855
52857
|
}), yield L.reset(), yield O(), yield w(), j.setVisible(!1);
|
|
52856
52858
|
});
|
|
52857
52859
|
}
|
|
@@ -52871,7 +52873,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52871
52873
|
"a",
|
|
52872
52874
|
{
|
|
52873
52875
|
disabled: D,
|
|
52874
|
-
onClick: () =>
|
|
52876
|
+
onClick: () => z(void 0, null, function* () {
|
|
52875
52877
|
var L;
|
|
52876
52878
|
if (!D) {
|
|
52877
52879
|
const { data: w } = yield S.resource("collections.fields", n.collectionName).get({
|
|
@@ -52971,7 +52973,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
52971
52973
|
/* @__PURE__ */ jsx(
|
|
52972
52974
|
"a",
|
|
52973
52975
|
{
|
|
52974
|
-
onClick: () =>
|
|
52976
|
+
onClick: () => z(void 0, null, function* () {
|
|
52975
52977
|
var I;
|
|
52976
52978
|
const { data: S } = yield m.resource("collections.fields", n.collectionName).get({
|
|
52977
52979
|
filterByTk: n.name,
|
|
@@ -53118,7 +53120,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53118
53120
|
const t = useForm(), { refreshCM: o } = useCollectionManager_deprecated(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: a } = useResourceContext(), i = useField();
|
|
53119
53121
|
return {
|
|
53120
53122
|
run() {
|
|
53121
|
-
return
|
|
53123
|
+
return z(this, null, function* () {
|
|
53122
53124
|
var c;
|
|
53123
53125
|
i.data = i.data || {}, i.data.loading = !0;
|
|
53124
53126
|
try {
|
|
@@ -53266,7 +53268,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53266
53268
|
const { refreshCM: t } = useCollectionManager_deprecated(), o = useForm(), n = useActionContext(), { refresh: r } = useResourceActionContext(), { resource: a, targetKey: i } = useResourceContext(), { [i]: l, template: c } = useRecord(), u = useAPIClient(), d = c === "sql" ? u.resource("sqlCollection") : a;
|
|
53267
53269
|
return {
|
|
53268
53270
|
run() {
|
|
53269
|
-
return
|
|
53271
|
+
return z(this, null, function* () {
|
|
53270
53272
|
yield o.submit(), yield d.update({
|
|
53271
53273
|
filterByTk: l,
|
|
53272
53274
|
values: c === "sql" ? o.values : omit$1(o.values, ["fields"])
|
|
@@ -53283,7 +53285,7 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53283
53285
|
/* @__PURE__ */ jsx(
|
|
53284
53286
|
"a",
|
|
53285
53287
|
P(x({}, a), {
|
|
53286
|
-
onClick: () =>
|
|
53288
|
+
onClick: () => z(void 0, null, function* () {
|
|
53287
53289
|
const g = i(n.template), f = getSchema$3(
|
|
53288
53290
|
x({}, g),
|
|
53289
53291
|
n,
|
|
@@ -53345,13 +53347,13 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53345
53347
|
useEffect(() => {
|
|
53346
53348
|
const w = [];
|
|
53347
53349
|
g.forEach((O) => {
|
|
53348
|
-
var
|
|
53349
|
-
const j = v(O), M = T(O).map((
|
|
53350
|
-
const G = R(
|
|
53350
|
+
var E;
|
|
53351
|
+
const j = v(O), M = T(O).map((V) => {
|
|
53352
|
+
const G = R(V, O);
|
|
53351
53353
|
return {
|
|
53352
53354
|
type: "group",
|
|
53353
|
-
key:
|
|
53354
|
-
label: l("Parent collection fields") + l(`(${v(
|
|
53355
|
+
key: V,
|
|
53356
|
+
label: l("Parent collection fields") + l(`(${v(V).title})`),
|
|
53355
53357
|
children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
|
|
53356
53358
|
var H;
|
|
53357
53359
|
return {
|
|
@@ -53360,14 +53362,14 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53360
53362
|
};
|
|
53361
53363
|
})
|
|
53362
53364
|
};
|
|
53363
|
-
}),
|
|
53365
|
+
}), q = (E = j.fields.filter((V) => !["obo", "oho", "m2m", "o2m"].includes(V == null ? void 0 : V.interface))) == null ? void 0 : E.map((V) => {
|
|
53364
53366
|
var G;
|
|
53365
|
-
return { value:
|
|
53367
|
+
return { value: V.name, key: V.name, label: l(((G = V.uiSchema) == null ? void 0 : G.title) || V.name) };
|
|
53366
53368
|
}).concat(M);
|
|
53367
53369
|
w.push({
|
|
53368
53370
|
value: O,
|
|
53369
53371
|
label: l(j.title || j.name),
|
|
53370
|
-
children:
|
|
53372
|
+
children: q
|
|
53371
53373
|
});
|
|
53372
53374
|
}), h(w);
|
|
53373
53375
|
}, [g, t]), useEffect(() => {
|
|
@@ -53376,30 +53378,30 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53376
53378
|
if (w) {
|
|
53377
53379
|
u(!1), p([]);
|
|
53378
53380
|
const k = (j = Object.values((O = w == null ? void 0 : w.data) == null ? void 0 : O.fields)) == null ? void 0 : j.map((M) => {
|
|
53379
|
-
var
|
|
53381
|
+
var q, E;
|
|
53380
53382
|
if (M.source) {
|
|
53381
|
-
const
|
|
53383
|
+
const V = (a == null ? void 0 : a.data.find((G) => G.name === M.name)) || M;
|
|
53382
53384
|
return P(x({}, M), {
|
|
53383
|
-
uiSchema: P(x({}, omit(
|
|
53385
|
+
uiSchema: P(x({}, omit(V.uiSchema, "rawTitle")), { title: ((q = V.uiSchema) == null ? void 0 : q.title) || V.name })
|
|
53384
53386
|
});
|
|
53385
53387
|
} else {
|
|
53386
|
-
const
|
|
53387
|
-
return P(x({},
|
|
53388
|
-
uiSchema: P(x({}, omit(
|
|
53388
|
+
const V = (a == null ? void 0 : a.data.find((G) => G.name === M.name)) || M;
|
|
53389
|
+
return P(x({}, V), {
|
|
53390
|
+
uiSchema: P(x({}, omit(V.uiSchema, "rawTitle")), { title: ((E = V.uiSchema) == null ? void 0 : E.title) || V.name })
|
|
53389
53391
|
});
|
|
53390
53392
|
}
|
|
53391
53393
|
});
|
|
53392
53394
|
S.value = k, setTimeout(() => {
|
|
53393
|
-
var M,
|
|
53394
|
-
p(k), y.setValuesIn("sources", (M = w.data) == null ? void 0 : M.sources), f((
|
|
53395
|
+
var M, q, E;
|
|
53396
|
+
p(k), y.setValuesIn("sources", (M = w.data) == null ? void 0 : M.sources), f((q = w.data) == null ? void 0 : q.sources), b((E = w == null ? void 0 : w.data) == null ? void 0 : E.unsupportedFields);
|
|
53395
53397
|
});
|
|
53396
53398
|
}
|
|
53397
53399
|
}).catch);
|
|
53398
53400
|
}, [t]);
|
|
53399
53401
|
const $ = (w, O) => {
|
|
53400
53402
|
d.splice(O, 1, w), p(d), S.value = d.map((j) => {
|
|
53401
|
-
var M,
|
|
53402
|
-
const k = typeof j.source == "string" ? j.source : (
|
|
53403
|
+
var M, q, E;
|
|
53404
|
+
const k = typeof j.source == "string" ? j.source : (E = (q = (M = j.source) == null ? void 0 : M.filter) == null ? void 0 : q.call(M, Boolean)) == null ? void 0 : E.join(".");
|
|
53403
53405
|
return P(x({}, j), {
|
|
53404
53406
|
source: k
|
|
53405
53407
|
});
|
|
@@ -53424,9 +53426,9 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53424
53426
|
style: { width: "100%" },
|
|
53425
53427
|
options: D(m),
|
|
53426
53428
|
onChange: (k, M) => {
|
|
53427
|
-
var
|
|
53428
|
-
const
|
|
53429
|
-
$(P(x({}, O), { source: k, uiSchema:
|
|
53429
|
+
var E;
|
|
53430
|
+
const q = (E = I(k == null ? void 0 : k[0])) == null ? void 0 : E.find((V) => V.name === last(k));
|
|
53431
|
+
$(P(x({}, O), { source: k, uiSchema: q == null ? void 0 : q.uiSchema }), j);
|
|
53430
53432
|
},
|
|
53431
53433
|
placeholder: l("Select field source")
|
|
53432
53434
|
}
|
|
@@ -53464,12 +53466,12 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53464
53466
|
defaultValue: w,
|
|
53465
53467
|
style: { width: "100%" },
|
|
53466
53468
|
popupMatchSelectWidth: !1,
|
|
53467
|
-
onChange: (
|
|
53468
|
-
var
|
|
53469
|
-
const
|
|
53470
|
-
$(P(x({}, k), { interface:
|
|
53469
|
+
onChange: (q) => {
|
|
53470
|
+
var V;
|
|
53471
|
+
const E = F(q);
|
|
53472
|
+
$(P(x({}, k), { interface: q, uiSchema: (V = E == null ? void 0 : E.default) == null ? void 0 : V.uiSchema }), j);
|
|
53471
53473
|
},
|
|
53472
|
-
children: M.map((
|
|
53474
|
+
children: M.map((q) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(q.label), children: q.children.map((E) => /* @__PURE__ */ jsx(Select$1.Option, { value: E.name, children: D(E.label) }, E.value)) }, q.key))
|
|
53473
53475
|
}
|
|
53474
53476
|
);
|
|
53475
53477
|
}
|
|
@@ -53486,8 +53488,8 @@ const getSchema$4 = (e, t, o) => {
|
|
|
53486
53488
|
Input$3,
|
|
53487
53489
|
{
|
|
53488
53490
|
defaultValue: ((M = k == null ? void 0 : k.uiSchema) == null ? void 0 : M.title) || w,
|
|
53489
|
-
onChange: (
|
|
53490
|
-
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title:
|
|
53491
|
+
onChange: (q) => $(
|
|
53492
|
+
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: q.target.value }) }),
|
|
53491
53493
|
j
|
|
53492
53494
|
)
|
|
53493
53495
|
}
|
|
@@ -53549,7 +53551,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
53549
53551
|
key: F.name,
|
|
53550
53552
|
width: 200,
|
|
53551
53553
|
render: (j, k, M) => {
|
|
53552
|
-
const
|
|
53554
|
+
const q = k[F.name], E = {
|
|
53553
53555
|
type: "object",
|
|
53554
53556
|
properties: {
|
|
53555
53557
|
[F.name]: {
|
|
@@ -53557,11 +53559,11 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
53557
53559
|
"x-component": D && I ? "CollectionField" : "Input",
|
|
53558
53560
|
"x-read-pretty": !0,
|
|
53559
53561
|
"x-collection-field": I == null ? void 0 : I.join("."),
|
|
53560
|
-
default: F.interface === "json" ? JSON.stringify(
|
|
53562
|
+
default: F.interface === "json" ? JSON.stringify(q) : q
|
|
53561
53563
|
}
|
|
53562
53564
|
}
|
|
53563
53565
|
};
|
|
53564
|
-
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema:
|
|
53566
|
+
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: E, name: M, onlyRenderProperties: !0 }) });
|
|
53565
53567
|
}
|
|
53566
53568
|
};
|
|
53567
53569
|
});
|
|
@@ -53692,7 +53694,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
53692
53694
|
const e = useForm(), { refreshCM: t } = useCollectionManager_deprecated(), o = useActionContext(), { refresh: n } = useResourceActionContext(), { targetKey: r } = useResourceContext(), { [r]: a } = useRecord(), i = useAPIClient(), l = useField();
|
|
53693
53695
|
return {
|
|
53694
53696
|
run() {
|
|
53695
|
-
return
|
|
53697
|
+
return z(this, null, function* () {
|
|
53696
53698
|
yield e.submit(), l.data = l.data || {}, l.data.loading = !0;
|
|
53697
53699
|
try {
|
|
53698
53700
|
yield i.resource("collections").setFields({
|
|
@@ -53890,7 +53892,7 @@ const AsyncDataProvider = (e) => {
|
|
|
53890
53892
|
style: { width: "100%" },
|
|
53891
53893
|
popupMatchSelectWidth: !1,
|
|
53892
53894
|
onChange: (L) => {
|
|
53893
|
-
var O, j, k, M,
|
|
53895
|
+
var O, j, k, M, q;
|
|
53894
53896
|
const w = p(L);
|
|
53895
53897
|
S(
|
|
53896
53898
|
P(x({}, N), {
|
|
@@ -53898,7 +53900,7 @@ const AsyncDataProvider = (e) => {
|
|
|
53898
53900
|
uiSchema: P(x({}, (O = w == null ? void 0 : w.default) == null ? void 0 : O.uiSchema), {
|
|
53899
53901
|
title: ((k = (j = w == null ? void 0 : w.default) == null ? void 0 : j.uiSchema) == null ? void 0 : k.title) || ((M = N.uiSchema) == null ? void 0 : M.title)
|
|
53900
53902
|
}),
|
|
53901
|
-
type: (
|
|
53903
|
+
type: (q = w == null ? void 0 : w.default) == null ? void 0 : q.type
|
|
53902
53904
|
}),
|
|
53903
53905
|
B
|
|
53904
53906
|
);
|
|
@@ -54120,7 +54122,7 @@ const AsyncDataProvider = (e) => {
|
|
|
54120
54122
|
const t = useForm(), o = useActionContext(), { refreshCM: n } = useCollectionManager_deprecated(), { refresh: r } = useResourceActionContext(), { targetKey: a } = useResourceContext(), { [a]: i } = useRecord(), l = useAPIClient(), c = useField();
|
|
54121
54123
|
return {
|
|
54122
54124
|
run() {
|
|
54123
|
-
return
|
|
54125
|
+
return z(this, null, function* () {
|
|
54124
54126
|
yield t.submit(), c.data = c.data || {}, c.data.loading = !0;
|
|
54125
54127
|
try {
|
|
54126
54128
|
yield l.resource("sqlCollection").setFields({
|
|
@@ -54164,7 +54166,7 @@ const AsyncDataProvider = (e) => {
|
|
|
54164
54166
|
const { run: e } = useDestroyAction(), { refreshCM: t } = useCollectionManager_deprecated();
|
|
54165
54167
|
return {
|
|
54166
54168
|
run() {
|
|
54167
|
-
return
|
|
54169
|
+
return z(this, null, function* () {
|
|
54168
54170
|
yield e(), yield t();
|
|
54169
54171
|
});
|
|
54170
54172
|
}
|
|
@@ -54173,7 +54175,7 @@ const AsyncDataProvider = (e) => {
|
|
|
54173
54175
|
const { run: t } = useBulkDestroyAction(), { refreshCM: o } = useCollectionManager_deprecated();
|
|
54174
54176
|
return {
|
|
54175
54177
|
run() {
|
|
54176
|
-
return
|
|
54178
|
+
return z(this, null, function* () {
|
|
54177
54179
|
yield t(e), yield o();
|
|
54178
54180
|
});
|
|
54179
54181
|
}
|
|
@@ -54182,7 +54184,7 @@ const AsyncDataProvider = (e) => {
|
|
|
54182
54184
|
const { refresh: e } = useResourceActionContext(), { resource: t, targetKey: o } = useResourceContext(), { [o]: n } = useRecord(), r = useForm(), { cascade: a } = (r == null ? void 0 : r.values) || {};
|
|
54183
54185
|
return {
|
|
54184
54186
|
run() {
|
|
54185
|
-
return
|
|
54187
|
+
return z(this, null, function* () {
|
|
54186
54188
|
yield t.destroy({ filterByTk: n, cascade: a }), e();
|
|
54187
54189
|
});
|
|
54188
54190
|
}
|
|
@@ -54191,7 +54193,7 @@ const AsyncDataProvider = (e) => {
|
|
|
54191
54193
|
const { state: e, setState: t, refresh: o } = useResourceActionContext(), { resource: n } = useResourceContext(), r = useActionContext(), { t: a } = useTranslation(), i = useForm(), { cascade: l } = (i == null ? void 0 : i.values) || {}, c = Object.values(e).flat();
|
|
54192
54194
|
return {
|
|
54193
54195
|
run(d) {
|
|
54194
|
-
return
|
|
54196
|
+
return z(this, null, function* () {
|
|
54195
54197
|
var p;
|
|
54196
54198
|
if (!(c != null && c.length))
|
|
54197
54199
|
return message.error(a("Please select the records you want to delete"));
|
|
@@ -54341,7 +54343,7 @@ const getSchema$1 = (e) => {
|
|
|
54341
54343
|
};
|
|
54342
54344
|
}, useCreateSubField = () => (useActionContext(), {
|
|
54343
54345
|
run() {
|
|
54344
|
-
return
|
|
54346
|
+
return z(this, null, function* () {
|
|
54345
54347
|
});
|
|
54346
54348
|
}
|
|
54347
54349
|
}), AddSubFieldAction = () => {
|
|
@@ -54426,7 +54428,7 @@ const getSchema$1 = (e) => {
|
|
|
54426
54428
|
const e = useForm(), { run: t } = useUpdateAction(), { refreshCM: o } = useCollectionManager_deprecated();
|
|
54427
54429
|
return {
|
|
54428
54430
|
run() {
|
|
54429
|
-
return
|
|
54431
|
+
return z(this, null, function* () {
|
|
54430
54432
|
var a, i, l;
|
|
54431
54433
|
yield e.submit();
|
|
54432
54434
|
const r = ((l = (i = (a = e == null ? void 0 : e.values) == null ? void 0 : a.uiSchema) == null ? void 0 : i.enum) == null ? void 0 : l.slice()) || [];
|
|
@@ -54447,7 +54449,7 @@ const getSchema$1 = (e) => {
|
|
|
54447
54449
|
/* @__PURE__ */ jsx(
|
|
54448
54450
|
"a",
|
|
54449
54451
|
{
|
|
54450
|
-
onClick: () =>
|
|
54452
|
+
onClick: () => z(void 0, null, function* () {
|
|
54451
54453
|
const c = getSchema(P(x({}, o(t.interface)), {
|
|
54452
54454
|
default: t
|
|
54453
54455
|
}));
|
|
@@ -58358,7 +58360,7 @@ class SqlCollectionTemplate extends CollectionTemplate {
|
|
|
58358
58360
|
}
|
|
58359
58361
|
class MainDataSource extends DataSource {
|
|
58360
58362
|
getDataSource() {
|
|
58361
|
-
return
|
|
58363
|
+
return z(this, null, function* () {
|
|
58362
58364
|
var n;
|
|
58363
58365
|
const t = yield this.app.apiClient.request({
|
|
58364
58366
|
resource: "collections",
|
|
@@ -58372,7 +58374,7 @@ class MainDataSource extends DataSource {
|
|
|
58372
58374
|
}
|
|
58373
58375
|
class CollectionPlugin extends Plugin {
|
|
58374
58376
|
load() {
|
|
58375
|
-
return
|
|
58377
|
+
return z(this, null, function* () {
|
|
58376
58378
|
this.dataSourceManager.addCollectionMixins([InheritanceCollectionMixin]), this.addFieldInterfaces(), this.addCollectionTemplates(), this.addFieldInterfaces(), this.addFieldInterfaceGroups(), this.addMainDataSource();
|
|
58377
58379
|
});
|
|
58378
58380
|
}
|
|
@@ -58858,7 +58860,7 @@ const toItems = (e = {}) => {
|
|
|
58858
58860
|
i(((g = h == null ? void 0 : h.data) == null ? void 0 : g.map((f) => f["x-uid"])) || []);
|
|
58859
58861
|
}
|
|
58860
58862
|
}
|
|
58861
|
-
), u = t.resource("roles.menuUiSchemas", e.name), d = r.length === a.length, p = (h, g) =>
|
|
58863
|
+
), u = t.resource("roles.menuUiSchemas", e.name), d = r.length === a.length, p = (h, g) => z(void 0, null, function* () {
|
|
58862
58864
|
const f = getParentUids(o, (b) => b.uid === g.uid), C = getChildrenUids(g == null ? void 0 : g.children, []);
|
|
58863
58865
|
if (h) {
|
|
58864
58866
|
const b = C.concat(g.uid), S = a.filter((y) => !b.includes(y));
|
|
@@ -58903,7 +58905,7 @@ const toItems = (e = {}) => {
|
|
|
58903
58905
|
Checkbox$1,
|
|
58904
58906
|
{
|
|
58905
58907
|
checked: d,
|
|
58906
|
-
onChange: (h) =>
|
|
58908
|
+
onChange: (h) => z(void 0, null, function* () {
|
|
58907
58909
|
d ? yield u.set({
|
|
58908
58910
|
values: []
|
|
58909
58911
|
}) : yield u.set({
|
|
@@ -58941,7 +58943,7 @@ const PermissionProvider = (e) => {
|
|
|
58941
58943
|
{
|
|
58942
58944
|
value: {
|
|
58943
58945
|
currentRecord: a,
|
|
58944
|
-
update: (l, c) =>
|
|
58946
|
+
update: (l, c) => z(void 0, null, function* () {
|
|
58945
58947
|
const { path: u, value: d } = l.getState();
|
|
58946
58948
|
if (["ui.*", "pm", "pm.*"].includes(u)) {
|
|
58947
58949
|
const p = t.resource("roles.snippets", o.name);
|
|
@@ -59012,7 +59014,7 @@ const PermissionProvider = (e) => {
|
|
|
59012
59014
|
);
|
|
59013
59015
|
},
|
|
59014
59016
|
effects() {
|
|
59015
|
-
onFieldChange("*", (n, r) =>
|
|
59017
|
+
onFieldChange("*", (n, r) => z(this, null, function* () {
|
|
59016
59018
|
r.modified && (yield e(n, r));
|
|
59017
59019
|
}));
|
|
59018
59020
|
}
|
|
@@ -60265,7 +60267,7 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
|
|
|
60265
60267
|
const u = useForm();
|
|
60266
60268
|
return {
|
|
60267
60269
|
run() {
|
|
60268
|
-
return
|
|
60270
|
+
return z(this, null, function* () {
|
|
60269
60271
|
yield u.submit(), c.request({
|
|
60270
60272
|
url: t ? "pm:update" : "pm:add",
|
|
60271
60273
|
method: "post",
|
|
@@ -60371,7 +60373,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: o }) => {
|
|
|
60371
60373
|
const l = useAPIClient(), { t: c } = useTranslation(), u = useForm();
|
|
60372
60374
|
return {
|
|
60373
60375
|
run() {
|
|
60374
|
-
return
|
|
60376
|
+
return z(this, null, function* () {
|
|
60375
60377
|
var h, g;
|
|
60376
60378
|
yield u.submit();
|
|
60377
60379
|
const p = new FormData();
|
|
@@ -60472,7 +60474,7 @@ const PluginUploadForm = ({ onClose: e, pluginData: t, isUpgrade: o }) => {
|
|
|
60472
60474
|
const c = useForm();
|
|
60473
60475
|
return {
|
|
60474
60476
|
run() {
|
|
60475
|
-
return
|
|
60477
|
+
return z(this, null, function* () {
|
|
60476
60478
|
const d = c.values.compressedFileUrl;
|
|
60477
60479
|
if (!d)
|
|
60478
60480
|
return;
|
|
@@ -60672,7 +60674,7 @@ function PluginInfo(e) {
|
|
|
60672
60674
|
{
|
|
60673
60675
|
disabled: u,
|
|
60674
60676
|
title: S("Are you sure to delete this plugin?"),
|
|
60675
|
-
onConfirm: (R) =>
|
|
60677
|
+
onConfirm: (R) => z(this, null, function* () {
|
|
60676
60678
|
R.stopPropagation(), yield y.request({
|
|
60677
60679
|
url: "pm:remove",
|
|
60678
60680
|
params: {
|
|
@@ -60729,14 +60731,14 @@ function PluginInfo(e) {
|
|
|
60729
60731
|
"aria-label": "enable",
|
|
60730
60732
|
size: "small",
|
|
60731
60733
|
disabled: u || h,
|
|
60732
|
-
onChange: (R, D) =>
|
|
60734
|
+
onChange: (R, D) => z(this, null, function* () {
|
|
60733
60735
|
if (D.stopPropagation(), !i && R) {
|
|
60734
60736
|
v.confirm({
|
|
60735
60737
|
title: S("Plugin dependency version mismatch"),
|
|
60736
60738
|
content: S(
|
|
60737
60739
|
"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?"
|
|
60738
60740
|
),
|
|
60739
|
-
onOk: () =>
|
|
60741
|
+
onOk: () => z(this, null, function* () {
|
|
60740
60742
|
yield y.request({
|
|
60741
60743
|
url: "pm:enable",
|
|
60742
60744
|
params: {
|
|
@@ -60754,7 +60756,7 @@ function PluginInfo(e) {
|
|
|
60754
60756
|
}
|
|
60755
60757
|
}) : v.confirm({
|
|
60756
60758
|
title: S("Are you sure to disable this plugin?"),
|
|
60757
|
-
onOk: () =>
|
|
60759
|
+
onOk: () => z(this, null, function* () {
|
|
60758
60760
|
yield y.request({
|
|
60759
60761
|
url: "pm:disable",
|
|
60760
60762
|
params: {
|
|
@@ -60827,7 +60829,7 @@ function BulkEnableButton({ plugins: e = [] }) {
|
|
|
60827
60829
|
width: 1e3,
|
|
60828
60830
|
title: t("Bulk enable"),
|
|
60829
60831
|
open: a,
|
|
60830
|
-
onOk: () =>
|
|
60832
|
+
onOk: () => z(this, null, function* () {
|
|
60831
60833
|
yield o.request({
|
|
60832
60834
|
url: "pm:enable",
|
|
60833
60835
|
params: {
|
|
@@ -61242,7 +61244,7 @@ const AdminSettingsLayout = () => {
|
|
|
61242
61244
|
};
|
|
61243
61245
|
class PMPlugin extends Plugin {
|
|
61244
61246
|
load() {
|
|
61245
|
-
return
|
|
61247
|
+
return z(this, null, function* () {
|
|
61246
61248
|
this.addComponents(), this.addRoutes(), this.addSettings();
|
|
61247
61249
|
});
|
|
61248
61250
|
}
|
|
@@ -61303,7 +61305,7 @@ const SettingCenterProvider = (e) => {
|
|
|
61303
61305
|
l((g == null ? void 0 : g.data) || []);
|
|
61304
61306
|
}
|
|
61305
61307
|
}
|
|
61306
|
-
), m = o.resource("roles.snippets", t.name), h = (g, f) =>
|
|
61308
|
+
), m = o.resource("roles.snippets", t.name), h = (g, f) => z(void 0, null, function* () {
|
|
61307
61309
|
const b = getChildrenKeys(f == null ? void 0 : f.children, []).concat(f.aclSnippet);
|
|
61308
61310
|
g ? (yield m.add({
|
|
61309
61311
|
values: b.map((S) => "!" + S)
|
|
@@ -61334,7 +61336,7 @@ const SettingCenterProvider = (e) => {
|
|
|
61334
61336
|
Checkbox$1,
|
|
61335
61337
|
{
|
|
61336
61338
|
checked: c,
|
|
61337
|
-
onChange: () =>
|
|
61339
|
+
onChange: () => z(void 0, null, function* () {
|
|
61338
61340
|
const g = a.map((f) => "!" + f);
|
|
61339
61341
|
c ? yield m.add({
|
|
61340
61342
|
values: g
|
|
@@ -61381,7 +61383,7 @@ const SettingCenterProvider = (e) => {
|
|
|
61381
61383
|
}, ACLPane = () => /* @__PURE__ */ jsx(Card, { "data-testid": "acl-pane-card", bordered: !1, children: /* @__PURE__ */ jsx(SchemaComponent, { components, schema: schema2 }) });
|
|
61382
61384
|
class ACLPlugin extends Plugin {
|
|
61383
61385
|
load() {
|
|
61384
|
-
return
|
|
61386
|
+
return z(this, null, function* () {
|
|
61385
61387
|
this.app.addComponents({
|
|
61386
61388
|
ACLCollectionFieldProvider,
|
|
61387
61389
|
ACLActionProvider,
|
|
@@ -61589,7 +61591,7 @@ function AntdConfigProvider(e) {
|
|
|
61589
61591
|
}
|
|
61590
61592
|
class AntdConfigPlugin extends Plugin {
|
|
61591
61593
|
load() {
|
|
61592
|
-
return
|
|
61594
|
+
return z(this, null, function* () {
|
|
61593
61595
|
var t;
|
|
61594
61596
|
this.app.use(AntdConfigProvider, ((t = this.options) == null ? void 0 : t.config) || {});
|
|
61595
61597
|
});
|
|
@@ -61781,7 +61783,7 @@ const SettingsMenu = () => {
|
|
|
61781
61783
|
PinnedPluginList.displayName = "PinnedPluginList";
|
|
61782
61784
|
class PinnedListPlugin extends Plugin {
|
|
61783
61785
|
load() {
|
|
61784
|
-
return
|
|
61786
|
+
return z(this, null, function* () {
|
|
61785
61787
|
this.app.use(PinnedPluginListProvider, this.options.config);
|
|
61786
61788
|
});
|
|
61787
61789
|
}
|
|
@@ -62442,11 +62444,11 @@ const ActionInitializerItem = (e) => {
|
|
|
62442
62444
|
(y || K) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
62443
62445
|
filter: f
|
|
62444
62446
|
})), v(!y), J.stopPropagation();
|
|
62445
|
-
},
|
|
62447
|
+
}, q = (J) => {
|
|
62446
62448
|
J.stopPropagation();
|
|
62447
|
-
},
|
|
62449
|
+
}, E = (J) => {
|
|
62448
62450
|
m(J);
|
|
62449
|
-
},
|
|
62451
|
+
}, V = (Y = i.title) != null ? Y : (H = a == null ? void 0 : a.uiSchema) == null ? void 0 : H.title;
|
|
62450
62452
|
return t(
|
|
62451
62453
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(o, n, "nb-block-item", e.className, "SortableItem"), children: [
|
|
62452
62454
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -62463,17 +62465,17 @@ const ActionInitializerItem = (e) => {
|
|
|
62463
62465
|
},
|
|
62464
62466
|
gutter: 5,
|
|
62465
62467
|
children: [
|
|
62466
|
-
/* @__PURE__ */ jsx(Col, { title: c(
|
|
62468
|
+
/* @__PURE__ */ jsx(Col, { title: c(V), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
|
|
62467
62469
|
Input$3,
|
|
62468
62470
|
{
|
|
62469
62471
|
bordered: !1,
|
|
62470
62472
|
autoFocus: !0,
|
|
62471
62473
|
placeholder: "Search...",
|
|
62472
62474
|
className: "search",
|
|
62473
|
-
onClick:
|
|
62474
|
-
onChange:
|
|
62475
|
+
onClick: q,
|
|
62476
|
+
onChange: E
|
|
62475
62477
|
}
|
|
62476
|
-
) : c(
|
|
62478
|
+
) : c(V) }),
|
|
62477
62479
|
/* @__PURE__ */ jsx(
|
|
62478
62480
|
Col,
|
|
62479
62481
|
{
|
|
@@ -62686,7 +62688,7 @@ AssociationFilter.useAssociationField = () => {
|
|
|
62686
62688
|
};
|
|
62687
62689
|
class AssociationFilterPlugin extends Plugin {
|
|
62688
62690
|
load() {
|
|
62689
|
-
return
|
|
62691
|
+
return z(this, null, function* () {
|
|
62690
62692
|
this.app.schemaInitializerManager.add(associationFilterFilterBlockInitializer), this.app.schemaInitializerManager.add(filterCollapseItemInitializer_deprecated), this.app.schemaInitializerManager.add(filterCollapseItemInitializer), this.app.schemaInitializerManager.add(associationFilterInitializer);
|
|
62691
62693
|
});
|
|
62692
62694
|
}
|
|
@@ -62913,21 +62915,21 @@ const DataBlockInitializer = (e) => {
|
|
|
62913
62915
|
otherText: S,
|
|
62914
62916
|
alwaysRenderMenu: y
|
|
62915
62917
|
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: T } = useSchemaTemplateManager(), R = useTemplateBlockNotifier(), D = useCallback(
|
|
62916
|
-
(
|
|
62918
|
+
(q) => z(void 0, null, function* () {
|
|
62917
62919
|
R({
|
|
62918
|
-
collection:
|
|
62919
|
-
dataSource:
|
|
62920
|
+
collection: q.item.name,
|
|
62921
|
+
dataSource: q.item.dataSource,
|
|
62920
62922
|
componentType: n,
|
|
62921
62923
|
menuName: a
|
|
62922
62924
|
});
|
|
62923
|
-
const { item:
|
|
62925
|
+
const { item: E, fromOthersInPopup: V } = q;
|
|
62924
62926
|
if (f)
|
|
62925
|
-
return f(
|
|
62926
|
-
if (
|
|
62927
|
-
const G = yield T(
|
|
62928
|
-
v(t ? t(G, { item:
|
|
62927
|
+
return f(q);
|
|
62928
|
+
if (E.template) {
|
|
62929
|
+
const G = yield T(E);
|
|
62930
|
+
v(t ? t(G, { item: E, fromOthersInPopup: V }) : G);
|
|
62929
62931
|
} else
|
|
62930
|
-
|
|
62932
|
+
E.schemaInsertor ? yield E.schemaInsertor(v, { item: E, name: a, fromOthersInPopup: V }) : o && o({ item: E, fromOthersInPopup: V });
|
|
62931
62933
|
F(!1);
|
|
62932
62934
|
}),
|
|
62933
62935
|
[
|
|
@@ -62956,24 +62958,24 @@ const DataBlockInitializer = (e) => {
|
|
|
62956
62958
|
currentText: b,
|
|
62957
62959
|
otherText: S
|
|
62958
62960
|
}), N = useGetSchemaInitializerMenuItems(D), $ = useMemo(() => N(B, a), [N, B, a]), [L, w] = useState([]), O = useMenuSearch({ data: $, openKeys: L, hideSearch: u }), j = useMemo(() => {
|
|
62959
|
-
let
|
|
62960
|
-
return p &&
|
|
62961
|
+
let q = O.filter((E) => E.key !== "search" && E.key !== "empty");
|
|
62962
|
+
return p && q.length === 1 ? q = q[0].children : q = O, [
|
|
62961
62963
|
{
|
|
62962
62964
|
key: a,
|
|
62963
62965
|
label: I(i),
|
|
62964
62966
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
|
|
62965
|
-
onClick: (
|
|
62966
|
-
|
|
62967
|
+
onClick: (E) => {
|
|
62968
|
+
E.key === a && D(P(x({}, E), { item: e }));
|
|
62967
62969
|
},
|
|
62968
|
-
children:
|
|
62970
|
+
children: q
|
|
62969
62971
|
}
|
|
62970
62972
|
];
|
|
62971
62973
|
}, [O, p, a, I, i, r, D, e]);
|
|
62972
62974
|
return $.length > 1 || $.length === 1 && ((M = (k = $[0]) == null ? void 0 : k.children) == null ? void 0 : M.length) > 0 || y ? /* @__PURE__ */ jsx(
|
|
62973
62975
|
SchemaInitializerMenu,
|
|
62974
62976
|
{
|
|
62975
|
-
onOpenChange: (
|
|
62976
|
-
w(
|
|
62977
|
+
onOpenChange: (q) => {
|
|
62978
|
+
w(q);
|
|
62977
62979
|
},
|
|
62978
62980
|
items: j
|
|
62979
62981
|
}
|
|
@@ -63070,7 +63072,7 @@ const DataBlockInitializer = (e) => {
|
|
|
63070
63072
|
P(x({
|
|
63071
63073
|
icon: /* @__PURE__ */ jsx(TableOutlined, {})
|
|
63072
63074
|
}, r), {
|
|
63073
|
-
onClick: (h) =>
|
|
63075
|
+
onClick: (h) => z(void 0, [h], function* ({ item: m }) {
|
|
63074
63076
|
if (m.template) {
|
|
63075
63077
|
const g = yield i(m);
|
|
63076
63078
|
a(g);
|
|
@@ -63164,7 +63166,7 @@ const RecordAssociationDetailsBlockInitializer = () => {
|
|
|
63164
63166
|
P(x({
|
|
63165
63167
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
63166
63168
|
}, r), {
|
|
63167
|
-
onClick: (h) =>
|
|
63169
|
+
onClick: (h) => z(void 0, [h], function* ({ item: m }) {
|
|
63168
63170
|
if (m.template) {
|
|
63169
63171
|
const g = yield i(m);
|
|
63170
63172
|
a(g);
|
|
@@ -63250,7 +63252,7 @@ const RecordAssociationFormBlockInitializer = () => {
|
|
|
63250
63252
|
P(x({
|
|
63251
63253
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
63252
63254
|
}, r), {
|
|
63253
|
-
onClick: (h) =>
|
|
63255
|
+
onClick: (h) => z(void 0, [h], function* ({ item: m }) {
|
|
63254
63256
|
if (m.template) {
|
|
63255
63257
|
const g = yield l(m);
|
|
63256
63258
|
if (m.template.componentName === "FormItem") {
|
|
@@ -63382,7 +63384,7 @@ const createGridCardBlockUISchema = (e) => {
|
|
|
63382
63384
|
P(x({
|
|
63383
63385
|
icon: /* @__PURE__ */ jsx(TableOutlined, {})
|
|
63384
63386
|
}, r), {
|
|
63385
|
-
onClick: (h) =>
|
|
63387
|
+
onClick: (h) => z(void 0, [h], function* ({ item: m }) {
|
|
63386
63388
|
if (m.template) {
|
|
63387
63389
|
const g = yield i(m);
|
|
63388
63390
|
a(g);
|
|
@@ -63487,7 +63489,7 @@ const createListBlockUISchema = (e) => {
|
|
|
63487
63489
|
P(x({
|
|
63488
63490
|
icon: /* @__PURE__ */ jsx(TableOutlined, {})
|
|
63489
63491
|
}, r), {
|
|
63490
|
-
onClick: (h) =>
|
|
63492
|
+
onClick: (h) => z(void 0, [h], function* ({ item: m }) {
|
|
63491
63493
|
if (m.template) {
|
|
63492
63494
|
const g = yield i(m);
|
|
63493
63495
|
a(g);
|
|
@@ -63576,7 +63578,7 @@ const RecordReadPrettyAssociationFormBlockInitializer = () => {
|
|
|
63576
63578
|
P(x({
|
|
63577
63579
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
63578
63580
|
}, r), {
|
|
63579
|
-
onClick: (g) =>
|
|
63581
|
+
onClick: (g) => z(void 0, [g], function* ({ item: h }) {
|
|
63580
63582
|
if (h.template) {
|
|
63581
63583
|
const f = yield l(h);
|
|
63582
63584
|
if (h.template.componentName === "ReadPrettyFormItem") {
|
|
@@ -63765,7 +63767,7 @@ function ModalActionSchemaInitializerItem(e) {
|
|
|
63765
63767
|
const m = useForm();
|
|
63766
63768
|
return {
|
|
63767
63769
|
onClick() {
|
|
63768
|
-
return
|
|
63770
|
+
return z(this, null, function* () {
|
|
63769
63771
|
var g;
|
|
63770
63772
|
yield m.submit(), l(!1), (g = e == null ? void 0 : e.onSubmit) == null || g.call(e, m.values);
|
|
63771
63773
|
});
|
|
@@ -64042,7 +64044,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
64042
64044
|
const { selectedRows: C } = useContext(RecordPickerContext), { setVisible: b, setSubmitted: S, setFormValueChanged: y } = useActionContext();
|
|
64043
64045
|
return {
|
|
64044
64046
|
onClick(F, I) {
|
|
64045
|
-
return
|
|
64047
|
+
return z(this, null, function* () {
|
|
64046
64048
|
var T, R;
|
|
64047
64049
|
yield r.add({
|
|
64048
64050
|
values: C
|
|
@@ -64263,7 +64265,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
64263
64265
|
P(x({}, c), {
|
|
64264
64266
|
icon: /* @__PURE__ */ jsx(ProfileOutlined, {}),
|
|
64265
64267
|
componentType: n,
|
|
64266
|
-
onCreateBlockSchema: (d) =>
|
|
64268
|
+
onCreateBlockSchema: (d) => z(void 0, null, function* () {
|
|
64267
64269
|
if (r)
|
|
64268
64270
|
return r(d);
|
|
64269
64271
|
u(d);
|
|
@@ -64513,7 +64515,7 @@ function useCreateSingleDetailsSchema() {
|
|
|
64513
64515
|
[o, n, r]
|
|
64514
64516
|
);
|
|
64515
64517
|
return { createSingleDetailsSchema: useCallback(
|
|
64516
|
-
(c) =>
|
|
64518
|
+
(c) => z(this, [c], function* ({ item: l }) {
|
|
64517
64519
|
if (l.template) {
|
|
64518
64520
|
const u = yield t(l);
|
|
64519
64521
|
e(a(u, { item: l }));
|
|
@@ -64683,7 +64685,7 @@ const RecordFormBlockInitializer = () => {
|
|
|
64683
64685
|
P(x({
|
|
64684
64686
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
64685
64687
|
}, o), {
|
|
64686
|
-
onClick: (p) =>
|
|
64688
|
+
onClick: (p) => z(void 0, [p], function* ({ item: d }) {
|
|
64687
64689
|
if (d.template) {
|
|
64688
64690
|
const m = yield r(d);
|
|
64689
64691
|
n(c(m, { item: d }));
|
|
@@ -65003,7 +65005,7 @@ const commonOptions$h = {
|
|
|
65003
65005
|
P(x({}, l), {
|
|
65004
65006
|
icon: /* @__PURE__ */ jsx(AppstoreOutlined, {}),
|
|
65005
65007
|
componentType: "GridCard",
|
|
65006
|
-
onCreateBlockSchema: (u) =>
|
|
65008
|
+
onCreateBlockSchema: (u) => z(void 0, null, function* () {
|
|
65007
65009
|
if (n)
|
|
65008
65010
|
return n(u);
|
|
65009
65011
|
c(u);
|
|
@@ -65200,7 +65202,7 @@ const commonOptions$h = {
|
|
|
65200
65202
|
P(x({}, l), {
|
|
65201
65203
|
icon: /* @__PURE__ */ jsx(OrderedListOutlined, {}),
|
|
65202
65204
|
componentType: "List",
|
|
65203
|
-
onCreateBlockSchema: (u) =>
|
|
65205
|
+
onCreateBlockSchema: (u) => z(void 0, null, function* () {
|
|
65204
65206
|
if (n)
|
|
65205
65207
|
return n(u);
|
|
65206
65208
|
c(u);
|
|
@@ -65355,7 +65357,7 @@ const commonOptions$h = {
|
|
|
65355
65357
|
P(x({
|
|
65356
65358
|
icon: /* @__PURE__ */ jsx(FormOutlined, {})
|
|
65357
65359
|
}, r), {
|
|
65358
|
-
onClick: () =>
|
|
65360
|
+
onClick: () => z(void 0, null, function* () {
|
|
65359
65361
|
a(
|
|
65360
65362
|
createTableSelectorUISchema({
|
|
65361
65363
|
rowKey: i.filterTargetKey,
|
|
@@ -65704,7 +65706,7 @@ const commonOptions$h = {
|
|
|
65704
65706
|
P(x({}, i), {
|
|
65705
65707
|
icon: /* @__PURE__ */ jsx(TableOutlined, {}),
|
|
65706
65708
|
componentType: "Table",
|
|
65707
|
-
onCreateBlockSchema: (c) =>
|
|
65709
|
+
onCreateBlockSchema: (c) => z(void 0, null, function* () {
|
|
65708
65710
|
if (n)
|
|
65709
65711
|
return n(c);
|
|
65710
65712
|
l(c);
|
|
@@ -65844,7 +65846,7 @@ const commonOptions$h = {
|
|
|
65844
65846
|
onlyCurrentDataSource: t,
|
|
65845
65847
|
icon: /* @__PURE__ */ jsx(RightSquareOutlined, {}),
|
|
65846
65848
|
componentType: "FilterCollapse",
|
|
65847
|
-
onCreateBlockSchema: (i) =>
|
|
65849
|
+
onCreateBlockSchema: (i) => z(void 0, [i], function* ({ item: a }) {
|
|
65848
65850
|
const l = createCollapseBlockSchema({
|
|
65849
65851
|
dataSource: a.dataSource,
|
|
65850
65852
|
collectionName: a.collectionName || a.name,
|
|
@@ -66518,7 +66520,7 @@ const commonOptions$2 = {
|
|
|
66518
66520
|
let f = i;
|
|
66519
66521
|
return d || (f = "page:addBlock", c && (f = "mobile:addBlock")), f || (f = "popup:common:addBlock", n || !u ? f = "popup:addNew:addBlock" : r && (f = "popup:bulkEdit:addBlock")), {
|
|
66520
66522
|
run() {
|
|
66521
|
-
return
|
|
66523
|
+
return z(this, null, function* () {
|
|
66522
66524
|
yield h.submit();
|
|
66523
66525
|
const { title: b, icon: S } = h.values;
|
|
66524
66526
|
o({
|
|
@@ -66591,7 +66593,7 @@ const commonOptions$2 = {
|
|
|
66591
66593
|
const h = useActionContext();
|
|
66592
66594
|
return {
|
|
66593
66595
|
run() {
|
|
66594
|
-
return
|
|
66596
|
+
return z(this, null, function* () {
|
|
66595
66597
|
h.setVisible(!1);
|
|
66596
66598
|
});
|
|
66597
66599
|
}
|
|
@@ -66634,7 +66636,7 @@ const commonOptions$2 = {
|
|
|
66634
66636
|
});
|
|
66635
66637
|
class SchemaInitializerPlugin extends Plugin {
|
|
66636
66638
|
load() {
|
|
66637
|
-
return
|
|
66639
|
+
return z(this, null, function* () {
|
|
66638
66640
|
this.app.addComponents(P(x(x({}, initializerComponents), items), {
|
|
66639
66641
|
DestroyActionInitializer,
|
|
66640
66642
|
FormBlockInitializer,
|
|
@@ -66679,7 +66681,7 @@ class LocalePlugin extends Plugin {
|
|
|
66679
66681
|
A(this, "locales", {});
|
|
66680
66682
|
}
|
|
66681
66683
|
afterAdd() {
|
|
66682
|
-
return
|
|
66684
|
+
return z(this, null, function* () {
|
|
66683
66685
|
var r, a, i, l, c, u, d;
|
|
66684
66686
|
const o = this.app.apiClient, n = o.auth.locale;
|
|
66685
66687
|
try {
|
|
@@ -66852,7 +66854,7 @@ const AppSpin = () => /* @__PURE__ */ jsx(Spin, { style: { position: "fixed", to
|
|
|
66852
66854
|
);
|
|
66853
66855
|
class NocoBaseBuildInPlugin extends Plugin {
|
|
66854
66856
|
afterAdd() {
|
|
66855
|
-
return
|
|
66857
|
+
return z(this, null, function* () {
|
|
66856
66858
|
this.app.addComponents({
|
|
66857
66859
|
AppSpin,
|
|
66858
66860
|
AppError,
|
|
@@ -66863,7 +66865,7 @@ class NocoBaseBuildInPlugin extends Plugin {
|
|
|
66863
66865
|
});
|
|
66864
66866
|
}
|
|
66865
66867
|
load() {
|
|
66866
|
-
return
|
|
66868
|
+
return z(this, null, function* () {
|
|
66867
66869
|
this.addComponents(), this.addRoutes(), this.app.use(CurrentUserProvider), this.app.use(CurrentUserSettingsMenuProvider), this.app.pluginSettingsManager.add("security", {
|
|
66868
66870
|
title: tval$1("Security"),
|
|
66869
66871
|
icon: "SafetyOutlined"
|
|
@@ -66903,7 +66905,7 @@ class NocoBaseBuildInPlugin extends Plugin {
|
|
|
66903
66905
|
});
|
|
66904
66906
|
}
|
|
66905
66907
|
addPlugins() {
|
|
66906
|
-
return
|
|
66908
|
+
return z(this, null, function* () {
|
|
66907
66909
|
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, {
|
|
66908
66910
|
name: "pinned-list",
|
|
66909
66911
|
config: {
|