@nocobase/client 1.3.20-beta → 1.3.22-beta
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
CHANGED
|
@@ -85,7 +85,7 @@ import * as antdCssinjs from "@ant-design/cssinjs";
|
|
|
85
85
|
import { useStyleRegister } from "@ant-design/cssinjs";
|
|
86
86
|
import Handlebars from "handlebars";
|
|
87
87
|
import * as nocobaseEvaluators from "@nocobase/evaluators/client";
|
|
88
|
-
import
|
|
88
|
+
import { evaluators } from "@nocobase/evaluators/client";
|
|
89
89
|
import get$1 from "lodash/get";
|
|
90
90
|
import omit from "lodash/omit";
|
|
91
91
|
import qs from "qs";
|
|
@@ -4095,7 +4095,7 @@ function addAppVersion(e, t) {
|
|
|
4095
4095
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4096
4096
|
}), e;
|
|
4097
4097
|
}
|
|
4098
|
-
const name = "@nocobase/client", version$1 = "1.3.
|
|
4098
|
+
const name = "@nocobase/client", version$1 = "1.3.22-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4099
4099
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4100
4100
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4101
4101
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4116,9 +4116,9 @@ const name = "@nocobase/client", version$1 = "1.3.20-beta", license = "AGPL-3.0"
|
|
|
4116
4116
|
"@formily/reactive-react": "^2.2.27",
|
|
4117
4117
|
"@formily/shared": "^2.2.27",
|
|
4118
4118
|
"@formily/validator": "^2.2.27",
|
|
4119
|
-
"@nocobase/evaluators": "1.3.
|
|
4120
|
-
"@nocobase/sdk": "1.3.
|
|
4121
|
-
"@nocobase/utils": "1.3.
|
|
4119
|
+
"@nocobase/evaluators": "1.3.22-beta",
|
|
4120
|
+
"@nocobase/sdk": "1.3.22-beta",
|
|
4121
|
+
"@nocobase/utils": "1.3.22-beta",
|
|
4122
4122
|
ahooks: "^3.7.2",
|
|
4123
4123
|
antd: "^5.12.8",
|
|
4124
4124
|
"antd-style": "3.4.5",
|
|
@@ -6458,7 +6458,7 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
6458
6458
|
variableNameOfLeftCondition: a
|
|
6459
6459
|
}) => {
|
|
6460
6460
|
var h, f, x, C, S, b, y, v;
|
|
6461
|
-
const l = ((h = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : h.required) || [(f = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : f.required], c = ((x = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : x.display) || [(C = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : C.display], u = ((S = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : S.pattern) || [(b = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : b.pattern], d = ((y = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : y.value) || [(v = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : v.value], { evaluate: p } =
|
|
6461
|
+
const l = ((h = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : h.required) || [(f = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : f.required], c = ((x = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : x.display) || [(C = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : C.display], u = ((S = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : S.pattern) || [(b = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : b.pattern], d = ((y = o == null ? void 0 : o.stateOfLinkageRules) == null ? void 0 : y.value) || [(v = o == null ? void 0 : o.initStateOfLinkageRules) == null ? void 0 : v.value], { evaluate: p } = evaluators.get("formula.js"), m = { ruleGroup: n, variables: r, localVariables: i, variableNameOfLeftCondition: a };
|
|
6462
6462
|
switch (e) {
|
|
6463
6463
|
case ActionType.Required:
|
|
6464
6464
|
l.push(getTempFieldState(conditionAnalyses(m), !0)), o.stateOfLinkageRules = F(g({}, o.stateOfLinkageRules), {
|
|
@@ -9891,10 +9891,11 @@ const ActionContextProvider = (e) => {
|
|
|
9891
9891
|
*/
|
|
9892
9892
|
updatePopupContext: useCallback(
|
|
9893
9893
|
(n, r) => {
|
|
9894
|
-
|
|
9895
|
-
|
|
9894
|
+
const i = r || e, a = getPopupContextFromActionOrAssociationFieldSchema(i);
|
|
9895
|
+
if (n = _.omitBy(n, _.isNil), !(_.isEqual(n, a) || a != null && a.doNotUpdateContext))
|
|
9896
|
+
return i[CONTEXT_SCHEMA_KEY] = n, t.emit("initializeActionContext", {
|
|
9896
9897
|
schema: {
|
|
9897
|
-
"x-uid":
|
|
9898
|
+
"x-uid": i["x-uid"],
|
|
9898
9899
|
[CONTEXT_SCHEMA_KEY]: n
|
|
9899
9900
|
}
|
|
9900
9901
|
});
|
|
@@ -11,6 +11,10 @@ export interface PopupContext {
|
|
|
11
11
|
dataSource: string;
|
|
12
12
|
collection?: string;
|
|
13
13
|
association?: string;
|
|
14
|
+
/**
|
|
15
|
+
* if true, the context will never be updated
|
|
16
|
+
*/
|
|
17
|
+
doNotUpdateContext?: boolean;
|
|
14
18
|
}
|
|
15
19
|
export declare const CONTEXT_SCHEMA_KEY = "x-action-context";
|
|
16
20
|
/**
|
|
@@ -21,7 +25,7 @@ export declare const usePopupContextInActionOrAssociationField: () => {
|
|
|
21
25
|
/**
|
|
22
26
|
* update the value of the x-nb-popup-context field in the popup schema
|
|
23
27
|
*/
|
|
24
|
-
updatePopupContext: (
|
|
28
|
+
updatePopupContext: (newContext: PopupContext, customSchema?: ISchema) => Promise<any>;
|
|
25
29
|
};
|
|
26
30
|
/**
|
|
27
31
|
* @param fieldSchema support only schema of Action or AssociationField, because it depends on a specific schema structure
|