@nocobase/flow-engine 2.0.0-alpha.37 → 2.0.0-alpha.38
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/lib/flowContext.js +2 -0
- package/package.json +5 -4
- package/src/flowContext.ts +2 -0
package/lib/flowContext.js
CHANGED
|
@@ -75,6 +75,7 @@ var import_params_resolvers = require("./utils/params-resolvers");
|
|
|
75
75
|
var import_serverContextParams = require("./utils/serverContextParams");
|
|
76
76
|
var import_registry = require("./runjs-context/registry");
|
|
77
77
|
var import_createEphemeralContext = require("./utils/createEphemeralContext");
|
|
78
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
78
79
|
var _proxy, _FlowContext_instances, createChildNodes_fn, findMetaByPath_fn, findMetaInDelegatesDeep_fn, findMetaInProperty_fn, resolvePathInMeta_fn, resolvePathInMetaAsync_fn, buildParentTitles_fn, toTreeNode_fn;
|
|
79
80
|
function isRecordRefLike(val) {
|
|
80
81
|
return !!(val && typeof val === "object" && "collection" in val && "filterByTk" in val);
|
|
@@ -1284,6 +1285,7 @@ const _FlowRunJSContext = class _FlowRunJSContext extends FlowContext {
|
|
|
1284
1285
|
this.addDelegate(delegate);
|
|
1285
1286
|
this.defineProperty("React", { value: import_react.default });
|
|
1286
1287
|
this.defineProperty("antd", { value: antd });
|
|
1288
|
+
this.defineProperty("dayjs", { value: import_dayjs.default });
|
|
1287
1289
|
const ReactDOMShim = {
|
|
1288
1290
|
...ReactDOMClient,
|
|
1289
1291
|
createRoot: /* @__PURE__ */ __name((container, options) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/flow-engine",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.38",
|
|
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,9 +8,10 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@formily/antd-v5": "1.x",
|
|
10
10
|
"@formily/reactive": "2.x",
|
|
11
|
-
"@nocobase/sdk": "2.0.0-alpha.
|
|
12
|
-
"@nocobase/shared": "2.0.0-alpha.
|
|
11
|
+
"@nocobase/sdk": "2.0.0-alpha.38",
|
|
12
|
+
"@nocobase/shared": "2.0.0-alpha.38",
|
|
13
13
|
"ahooks": "^3.7.2",
|
|
14
|
+
"dayjs": "^1.11.9",
|
|
14
15
|
"dompurify": "^3.0.2",
|
|
15
16
|
"lodash": "^4.x",
|
|
16
17
|
"pino": "^8.0.0",
|
|
@@ -35,5 +36,5 @@
|
|
|
35
36
|
],
|
|
36
37
|
"author": "NocoBase Team",
|
|
37
38
|
"license": "AGPL-3.0",
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "30b1723601099007f7641c6ffa4111c880cb44e4"
|
|
39
40
|
}
|
package/src/flowContext.ts
CHANGED
|
@@ -47,6 +47,7 @@ import { buildServerContextParams as _buildServerContextParams } from './utils/s
|
|
|
47
47
|
import { FlowView, FlowViewer } from './views/FlowView';
|
|
48
48
|
import { RunJSContextRegistry, getModelClassName } from './runjs-context/registry';
|
|
49
49
|
import { createEphemeralContext } from './utils/createEphemeralContext';
|
|
50
|
+
import dayjs from 'dayjs';
|
|
50
51
|
|
|
51
52
|
// Helper: detect a RecordRef-like object
|
|
52
53
|
function isRecordRefLike(val: any): boolean {
|
|
@@ -1706,6 +1707,7 @@ export class FlowRunJSContext extends FlowContext {
|
|
|
1706
1707
|
this.addDelegate(delegate);
|
|
1707
1708
|
this.defineProperty('React', { value: React });
|
|
1708
1709
|
this.defineProperty('antd', { value: antd });
|
|
1710
|
+
this.defineProperty('dayjs', { value: dayjs });
|
|
1709
1711
|
// 为 JS 运行时代码提供带有 antd/App/ConfigProvider 包裹的 React 根
|
|
1710
1712
|
// 保持与 ReactDOMClient 接口一致,优先覆盖 createRoot,其余方法透传
|
|
1711
1713
|
const ReactDOMShim: any = {
|