@nocobase/flow-engine 2.0.11 → 2.0.12

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.
@@ -126,6 +126,15 @@ const openStepSettingsDialog = /* @__PURE__ */ __name(async ({
126
126
  }
127
127
  };
128
128
  const openView = model.context.viewer[mode].bind(model.context.viewer);
129
+ const resolvedUiModeProps = (0, import_reactive.toJS)(uiModeProps) || {};
130
+ const { zIndex: uiModeZIndex, ...restUiModeProps } = resolvedUiModeProps;
131
+ const resolveDialogZIndex = /* @__PURE__ */ __name((rawZIndex) => {
132
+ var _a2, _b2;
133
+ const nextZIndex = typeof ((_a2 = model.context.viewer) == null ? void 0 : _a2.getNextZIndex) === "function" ? model.context.viewer.getNextZIndex() : (((_b2 = model.context.themeToken) == null ? void 0 : _b2.zIndexPopupBase) || 1e3) + 1;
134
+ const inputZIndex = Number(rawZIndex) || 0;
135
+ return Math.max(nextZIndex, inputZIndex);
136
+ }, "resolveDialogZIndex");
137
+ const mergedZIndex = resolveDialogZIndex(uiModeZIndex);
129
138
  const form = (0, import_core.createForm)({
130
139
  initialValues: (0, import_utils.compileUiSchema)(scopes, initialValues)
131
140
  });
@@ -141,7 +150,8 @@ const openStepSettingsDialog = /* @__PURE__ */ __name(async ({
141
150
  title: dialogTitle || t(title),
142
151
  width: dialogWidth,
143
152
  destroyOnClose: true,
144
- ...(0, import_reactive.toJS)(uiModeProps),
153
+ ...restUiModeProps,
154
+ zIndex: mergedZIndex,
145
155
  // 透传 navigation,便于变量元信息根据真实视图栈推断父级弹窗
146
156
  inputArgs,
147
157
  onClose: /* @__PURE__ */ __name(() => {
@@ -155,7 +165,11 @@ const openStepSettingsDialog = /* @__PURE__ */ __name(async ({
155
165
  (0, import_react2.useEffect)(() => {
156
166
  return (0, import_reactive.autorun)(() => {
157
167
  const dynamicProps = (0, import_reactive.toJS)(uiModeProps);
158
- currentDialog.update(dynamicProps);
168
+ const { zIndex, ...restDynamicProps } = dynamicProps || {};
169
+ currentDialog.update({
170
+ ...restDynamicProps,
171
+ zIndex: resolveDialogZIndex(zIndex)
172
+ });
159
173
  });
160
174
  }, []);
161
175
  const compiledFormSchema = (0, import_utils.compileUiSchema)(scopes, formSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/flow-engine",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "private": false,
5
5
  "description": "A standalone flow engine for NocoBase, managing workflows, models, and actions.",
6
6
  "main": "lib/index.js",
@@ -8,8 +8,8 @@
8
8
  "dependencies": {
9
9
  "@formily/antd-v5": "1.x",
10
10
  "@formily/reactive": "2.x",
11
- "@nocobase/sdk": "2.0.11",
12
- "@nocobase/shared": "2.0.11",
11
+ "@nocobase/sdk": "2.0.12",
12
+ "@nocobase/shared": "2.0.12",
13
13
  "ahooks": "^3.7.2",
14
14
  "dayjs": "^1.11.9",
15
15
  "dompurify": "^3.0.2",
@@ -36,5 +36,5 @@
36
36
  ],
37
37
  "author": "NocoBase Team",
38
38
  "license": "Apache-2.0",
39
- "gitHead": "657733e68b31cbb788f8b1b7c4926383c96b5889"
39
+ "gitHead": "a96acd22a9b0744b567617e3a1f1d42cb7f72368"
40
40
  }
@@ -134,6 +134,17 @@ const openStepSettingsDialog = async ({
134
134
  };
135
135
 
136
136
  const openView = model.context.viewer[mode].bind(model.context.viewer);
137
+ const resolvedUiModeProps = toJS(uiModeProps) || {};
138
+ const { zIndex: uiModeZIndex, ...restUiModeProps } = resolvedUiModeProps;
139
+ const resolveDialogZIndex = (rawZIndex?: number) => {
140
+ const nextZIndex =
141
+ typeof model.context.viewer?.getNextZIndex === 'function'
142
+ ? model.context.viewer.getNextZIndex()
143
+ : (model.context.themeToken?.zIndexPopupBase || 1000) + 1;
144
+ const inputZIndex = Number(rawZIndex) || 0;
145
+ return Math.max(nextZIndex, inputZIndex);
146
+ };
147
+ const mergedZIndex = resolveDialogZIndex(uiModeZIndex);
137
148
 
138
149
  const form = createForm({
139
150
  initialValues: compileUiSchema(scopes, initialValues),
@@ -152,7 +163,8 @@ const openStepSettingsDialog = async ({
152
163
  title: dialogTitle || t(title),
153
164
  width: dialogWidth,
154
165
  destroyOnClose: true,
155
- ...toJS(uiModeProps),
166
+ ...restUiModeProps,
167
+ zIndex: mergedZIndex,
156
168
  // 透传 navigation,便于变量元信息根据真实视图栈推断父级弹窗
157
169
  inputArgs,
158
170
  onClose: () => {
@@ -165,7 +177,11 @@ const openStepSettingsDialog = async ({
165
177
  useEffect(() => {
166
178
  return autorun(() => {
167
179
  const dynamicProps = toJS(uiModeProps);
168
- currentDialog.update(dynamicProps);
180
+ const { zIndex, ...restDynamicProps } = dynamicProps || {};
181
+ currentDialog.update({
182
+ ...restDynamicProps,
183
+ zIndex: resolveDialogZIndex(zIndex),
184
+ });
169
185
  });
170
186
  }, []);
171
187