@zhubangyun/lowcode-core 5.4.21 → 5.4.102

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.
Files changed (90) hide show
  1. package/es/index.d.ts +0 -1
  2. package/es/index.js +0 -1
  3. package/es/style.js +4 -4
  4. package/es/utils/api/RestApi.d.ts +1 -1
  5. package/es/utils/api/RestApi.js +86 -60
  6. package/es/utils/{common → api}/UserInfo.d.ts +1 -1
  7. package/es/utils/api/UserInfo.js +39 -0
  8. package/es/utils/api/index.d.ts +4 -3
  9. package/es/utils/api/index.js +25 -12
  10. package/es/utils/cache/index.d.ts +12 -4
  11. package/es/utils/cache/index.js +23 -17
  12. package/es/utils/cache/schema.d.ts +29 -0
  13. package/es/utils/cache/schema.js +42 -0
  14. package/es/utils/common/SingletonInstanceMap.d.ts +3 -3
  15. package/es/utils/common/SingletonInstanceMap.js +5 -5
  16. package/es/utils/designer/assets/assets.data.base.js +1 -1
  17. package/es/utils/form/form.api.d.ts +4 -9
  18. package/es/utils/form/form.api.js +14 -135
  19. package/es/utils/index.d.ts +2 -0
  20. package/es/utils/index.js +2 -0
  21. package/es/utils/page/index.d.ts +1 -0
  22. package/es/utils/page/index.js +1 -0
  23. package/es/utils/page/page.form.d.ts +14 -0
  24. package/es/utils/page/page.form.js +66 -0
  25. package/es/utils/page/page.layout.d.ts +15 -0
  26. package/es/utils/page/page.layout.js +56 -0
  27. package/es/utils/page/page.load-schema.d.ts +4 -0
  28. package/es/utils/page/page.load-schema.js +37 -0
  29. package/es/utils/page/page.render.d.ts +2 -0
  30. package/es/utils/page/page.render.js +6 -0
  31. package/lib/index.d.ts +0 -1
  32. package/lib/index.js +1 -3
  33. package/lib/style.js +4 -4
  34. package/lib/utils/api/RestApi.d.ts +1 -1
  35. package/lib/utils/api/RestApi.js +86 -60
  36. package/lib/utils/{common → api}/UserInfo.d.ts +1 -1
  37. package/lib/utils/{common → api}/UserInfo.js +22 -2
  38. package/lib/utils/api/index.d.ts +4 -3
  39. package/lib/utils/api/index.js +28 -13
  40. package/lib/utils/cache/index.d.ts +12 -4
  41. package/lib/utils/cache/index.js +23 -17
  42. package/lib/utils/cache/schema.d.ts +29 -0
  43. package/lib/utils/cache/schema.js +47 -0
  44. package/lib/utils/common/SingletonInstanceMap.d.ts +3 -3
  45. package/lib/utils/common/SingletonInstanceMap.js +5 -5
  46. package/lib/utils/designer/assets/assets.data.base.js +1 -1
  47. package/lib/utils/form/form.api.d.ts +4 -9
  48. package/lib/utils/form/form.api.js +14 -135
  49. package/lib/utils/index.d.ts +2 -0
  50. package/lib/utils/index.js +2 -0
  51. package/lib/utils/page/index.d.ts +1 -0
  52. package/lib/utils/page/index.js +6 -0
  53. package/lib/utils/page/page.form.d.ts +14 -0
  54. package/lib/utils/page/page.form.js +71 -0
  55. package/lib/utils/page/page.layout.d.ts +15 -0
  56. package/lib/utils/page/page.layout.js +63 -0
  57. package/lib/utils/page/page.load-schema.d.ts +4 -0
  58. package/lib/utils/page/page.load-schema.js +42 -0
  59. package/lib/utils/page/page.render.d.ts +2 -0
  60. package/lib/utils/page/page.render.js +10 -0
  61. package/package.json +1 -1
  62. package/es/components/schema-render/components/assets.d.ts +0 -32
  63. package/es/components/schema-render/components/assets.js +0 -53
  64. package/es/components/schema-render/components/demo-schema.d.ts +0 -85
  65. package/es/components/schema-render/components/demo-schema.js +0 -107
  66. package/es/components/schema-render/components/schema-render-base.d.ts +0 -43
  67. package/es/components/schema-render/components/schema-render-base.js +0 -142
  68. package/es/components/schema-render/components/schema-render-layout.d.ts +0 -6
  69. package/es/components/schema-render/components/schema-render-layout.js +0 -46
  70. package/es/components/schema-render/index.d.ts +0 -31
  71. package/es/components/schema-render/index.js +0 -46
  72. package/es/utils/common/SubFormInstance.d.ts +0 -26
  73. package/es/utils/common/SubFormInstance.js +0 -100
  74. package/es/utils/common/UserInfo.js +0 -19
  75. package/es/utils/form/form.process.js +0 -0
  76. package/lib/components/schema-render/components/assets.d.ts +0 -32
  77. package/lib/components/schema-render/components/assets.js +0 -57
  78. package/lib/components/schema-render/components/demo-schema.d.ts +0 -85
  79. package/lib/components/schema-render/components/demo-schema.js +0 -111
  80. package/lib/components/schema-render/components/schema-render-base.d.ts +0 -43
  81. package/lib/components/schema-render/components/schema-render-base.js +0 -149
  82. package/lib/components/schema-render/components/schema-render-layout.d.ts +0 -6
  83. package/lib/components/schema-render/components/schema-render-layout.js +0 -51
  84. package/lib/components/schema-render/index.d.ts +0 -31
  85. package/lib/components/schema-render/index.js +0 -53
  86. package/lib/utils/common/SubFormInstance.d.ts +0 -26
  87. package/lib/utils/common/SubFormInstance.js +0 -105
  88. package/lib/utils/form/form.process.js +0 -1
  89. /package/es/utils/{form/form.handler.js → page/page.utils.js} +0 -0
  90. /package/lib/utils/{form/form.handler.js → page/page.utils.js} +0 -0
@@ -1,107 +0,0 @@
1
- export default {
2
- "componentName": "Page",
3
- "props": {
4
- "ref": "root",
5
- "style": {
6
- "height": "100%"
7
- }
8
- },
9
- "dataSource": {
10
- "list": []
11
- },
12
- "css": "",
13
- "hidden": false,
14
- "title": "",
15
- "isLocked": false,
16
- "condition": true,
17
- "conditionGroup": "",
18
- "state": {
19
- "isShowDialog": {
20
- "type": "JSExpression",
21
- "value": "false"
22
- }
23
- },
24
- "methods": {
25
- "openDialog": {
26
- "type": "JSFunction",
27
- "value": "function openDialog() {\n this.setState({\n isShowDialog: true\n });\n}",
28
- "source": "function openDialog() {\n this.setState({\n isShowDialog: true\n });\n}"
29
- },
30
- "closeDialog": {
31
- "type": "JSFunction",
32
- "value": "function closeDialog() {\n this.setState({\n isShowDialog: false\n });\n}",
33
- "source": "function closeDialog() {\n this.setState({\n isShowDialog: false\n });\n}"
34
- }
35
- },
36
- "lifeCycles": {
37
- "componentDidMount": {
38
- "type": "JSFunction",
39
- "value": "function componentDidMount() {\n console.log('did mount');\n}",
40
- "source": "function componentDidMount() {\n console.log('did mount');\n}"
41
- },
42
- "componentWillUnmount": {
43
- "type": "JSFunction",
44
- "value": "function componentWillUnmount() {\n console.log('will unmount');\n}",
45
- "source": "function componentWillUnmount() {\n console.log('will unmount');\n}"
46
- }
47
- },
48
- "children": [{
49
- "componentName": "Layout",
50
- "props": {},
51
- "hidden": false,
52
- "title": "",
53
- "isLocked": false,
54
- "condition": true,
55
- "conditionGroup": "",
56
- "children": [{
57
- "componentName": "LayoutHeader",
58
- "props": {},
59
- "hidden": false,
60
- "title": "",
61
- "isLocked": false,
62
- "condition": true,
63
- "conditionGroup": ""
64
- }, {
65
- "componentName": "LayoutContent",
66
- "props": {},
67
- "hidden": false,
68
- "title": "",
69
- "isLocked": false,
70
- "condition": true,
71
- "conditionGroup": "",
72
- "children": [{
73
- "componentName": "LayoutLeft",
74
- "props": {},
75
- "hidden": false,
76
- "title": "",
77
- "isLocked": false,
78
- "condition": true,
79
- "conditionGroup": ""
80
- }, {
81
- "componentName": "LayoutMain",
82
- "props": {},
83
- "hidden": false,
84
- "title": "",
85
- "isLocked": false,
86
- "condition": true,
87
- "conditionGroup": ""
88
- }, {
89
- "componentName": "LayoutRight",
90
- "props": {},
91
- "hidden": false,
92
- "title": "",
93
- "isLocked": false,
94
- "condition": true,
95
- "conditionGroup": ""
96
- }]
97
- }, {
98
- "componentName": "LayoutFooter",
99
- "props": {},
100
- "hidden": false,
101
- "title": "",
102
- "isLocked": false,
103
- "condition": true,
104
- "conditionGroup": ""
105
- }]
106
- }]
107
- };
@@ -1,43 +0,0 @@
1
- import { Component } from "react";
2
- import { ResultProps } from "antd";
3
- import { FormInstance } from "antd/lib";
4
- import { SchemaFormMode } from "../index";
5
- export interface FormProps {
6
- mode: SchemaFormMode;
7
- /**
8
- * 继续提交按钮 新增模式有效
9
- */
10
- submitContinue?: boolean;
11
- /**
12
- * 数据id
13
- */
14
- dataId?: string;
15
- /**
16
- * 展示那些列
17
- */
18
- showFields?: "all" | string[];
19
- /**
20
- * 表单初期话回调
21
- * @param values
22
- */
23
- onInit?: (values: any, form: FormInstance) => Promise<void>;
24
- }
25
- export interface SchemaBaseRenderProps {
26
- schemaId: string;
27
- params?: FormProps;
28
- }
29
- export interface SchemaBaseRenderState {
30
- key?: string;
31
- result?: ResultProps;
32
- schema?: any;
33
- }
34
- export declare class SchemaRenderBase extends Component<SchemaBaseRenderProps, SchemaBaseRenderState> {
35
- state: SchemaBaseRenderState;
36
- constructor(props: Readonly<SchemaBaseRenderProps> | SchemaBaseRenderProps);
37
- componentDidMount(): Promise<void>;
38
- page: any;
39
- loadSchema: () => Promise<void>;
40
- components: any;
41
- loadComponent: () => Promise<void>;
42
- render(): JSX.Element;
43
- }
@@ -1,142 +0,0 @@
1
- import _Result from "antd/es/result";
2
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
- import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
4
- import _ConfigProvider from "antd/es/config-provider";
5
- var _window$antd, _window$antd2;
6
- import _regeneratorRuntime from "@babel/runtime/regenerator";
7
- import React, { Component, Fragment } from "react";
8
- import ReactRenderer, { adapter } from "@zhubangyun/lowcode-render-core";
9
- import { createFetchHandler } from "@alilc/lowcode-datasource-fetch-handler";
10
- import utils from "../../../utils";
11
- import assets from "./assets";
12
- import demoSchema from "./demo-schema";
13
- import zhCN from "antd/locale/zh_CN";
14
- // @ts-ignore
15
- adapter.setConfigProvider(((_window$antd = window.antd) === null || _window$antd === void 0 ? void 0 : _window$antd.ConfigProvider) || _ConfigProvider);
16
- // @ts-ignore
17
- var LocalConfig = ((_window$antd2 = window.antd) === null || _window$antd2 === void 0 ? void 0 : _window$antd2.ConfigProvider) || _ConfigProvider;
18
- export var SchemaRenderBase = /*#__PURE__*/function (_Component) {
19
- function SchemaRenderBase(props) {
20
- var _this;
21
- _this = _Component.call(this, props) || this;
22
- _this.state = {
23
- result: undefined
24
- };
25
- _this.page = void 0;
26
- _this.loadSchema = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27
- var schemaId, schema;
28
- return _regeneratorRuntime.wrap(function _callee$(_context) {
29
- while (1) switch (_context.prev = _context.next) {
30
- case 0:
31
- _context.next = 2;
32
- return _this.loadComponent();
33
- case 2:
34
- schemaId = _this.props.schemaId;
35
- if (!(schemaId == "test")) {
36
- _context.next = 6;
37
- break;
38
- }
39
- _this.setState({
40
- schema: demoSchema
41
- });
42
- return _context.abrupt("return");
43
- case 6:
44
- _context.next = 8;
45
- return utils.request.getSchema(schemaId);
46
- case 8:
47
- schema = _context.sent;
48
- _this.setState({
49
- schema: schema,
50
- result: schema ? undefined : {
51
- status: 404,
52
- title: "404",
53
- subTitle: "\u89C6\u56FE:" + schemaId + "\u4E0D\u5B58\u5728!"
54
- }
55
- });
56
- case 10:
57
- case "end":
58
- return _context.stop();
59
- }
60
- }, _callee);
61
- }));
62
- _this.components = void 0;
63
- _this.loadComponent = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
64
- var _yield$utils$designer, components;
65
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
66
- while (1) switch (_context2.prev = _context2.next) {
67
- case 0:
68
- _context2.next = 2;
69
- return utils.designer.assetsParse(assets);
70
- case 2:
71
- _yield$utils$designer = _context2.sent;
72
- components = _yield$utils$designer.components;
73
- _this.components = components;
74
- case 5:
75
- case "end":
76
- return _context2.stop();
77
- }
78
- }, _callee2);
79
- }));
80
- _this.setState({
81
- key: utils.common.uuid("key.")
82
- });
83
- return _this;
84
- }
85
- _inheritsLoose(SchemaRenderBase, _Component);
86
- var _proto = SchemaRenderBase.prototype;
87
- _proto.componentDidMount = /*#__PURE__*/function () {
88
- var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
89
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
90
- while (1) switch (_context3.prev = _context3.next) {
91
- case 0:
92
- _context3.next = 2;
93
- return this.loadSchema();
94
- case 2:
95
- case "end":
96
- return _context3.stop();
97
- }
98
- }, _callee3, this);
99
- }));
100
- function componentDidMount() {
101
- return _componentDidMount.apply(this, arguments);
102
- }
103
- return componentDidMount;
104
- }();
105
- _proto.render = function render() {
106
- var _this2 = this;
107
- var components = this.components;
108
- var _this$state = this.state,
109
- key = _this$state.key,
110
- result = _this$state.result,
111
- schema = _this$state.schema;
112
- var params = this.props.params;
113
- if (result) {
114
- return /*#__PURE__*/React.createElement(_Result, result);
115
- }
116
- if (schema) {
117
- return /*#__PURE__*/React.createElement(LocalConfig, {
118
- locale: zhCN
119
- }, /*#__PURE__*/React.createElement(ReactRenderer, {
120
- key: key,
121
- ref: function ref(page) {
122
- _this2.page = page === null || page === void 0 ? void 0 : page.__ref;
123
- }
124
- // @ts-ignore
125
- ,
126
- params: params,
127
- schema: schema,
128
- thisRequiredInJSE: true,
129
- className: "schema-render",
130
- components: components,
131
- appHelper: {
132
- utils: utils,
133
- requestHandlersMap: {
134
- fetch: createFetchHandler()
135
- }
136
- }
137
- }));
138
- }
139
- return /*#__PURE__*/React.createElement(Fragment, null);
140
- };
141
- return SchemaRenderBase;
142
- }(Component);
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { SchemaRender } from "../index";
3
- export declare function SchemaRenderLayout(props: {
4
- root: SchemaRender;
5
- children: any;
6
- }): JSX.Element;
@@ -1,46 +0,0 @@
1
- import _Drawer from "antd/es/drawer";
2
- import _Modal from "antd/es/modal";
3
- import React from "react";
4
- import { Layout } from "../../layout";
5
- export function SchemaRenderLayout(props) {
6
- var root = props.root;
7
- var state = root.state,
8
- hidePage = root.hidePage;
9
- var _root$props = root.props,
10
- layout = _root$props.layout,
11
- header = _root$props.header,
12
- footer = _root$props.footer,
13
- left = _root$props.left,
14
- right = _root$props.right;
15
- var children = /*#__PURE__*/React.createElement(Layout, {
16
- header: header === null || header === void 0 ? void 0 : header(root),
17
- footer: footer === null || footer === void 0 ? void 0 : footer(root),
18
- left: left === null || left === void 0 ? void 0 : left(root),
19
- right: right === null || right === void 0 ? void 0 : right(root)
20
- }, props.children);
21
- var restProps = {
22
- open: state.show,
23
- footer: false,
24
- closable: false,
25
- styles: {
26
- header: {
27
- display: "none"
28
- },
29
- body: {
30
- padding: 0
31
- },
32
- content: {
33
- padding: 0
34
- }
35
- },
36
- onClose: hidePage,
37
- keyboard: false,
38
- maskClosable: false
39
- };
40
- if (layout == "modal") {
41
- return /*#__PURE__*/React.createElement(_Modal, restProps, children);
42
- } else if (layout == "drawer") {
43
- return /*#__PURE__*/React.createElement(_Drawer, restProps, children);
44
- }
45
- return children;
46
- }
@@ -1,31 +0,0 @@
1
- import { SchemaBaseRenderProps } from "./components/schema-render-base";
2
- import { Component, ReactNode } from "react";
3
- export declare type SchemaFormMode = "create" | "update" | "detail" | "copy";
4
- export declare type RenderLayout = "drawer" | "modal";
5
- export declare type RenderChild = (props: SchemaRender) => ReactNode;
6
- export interface SchemaRenderProps extends SchemaBaseRenderProps {
7
- layout?: RenderLayout;
8
- header?: RenderChild;
9
- footer?: RenderChild;
10
- left?: RenderChild;
11
- right?: RenderChild;
12
- defaultShow?: boolean;
13
- width?: number;
14
- }
15
- export interface SchemaRenderState {
16
- show: boolean;
17
- }
18
- export declare class SchemaRender extends Component<SchemaRenderProps, SchemaRenderState> {
19
- state: SchemaRenderState;
20
- page: any;
21
- constructor(props: SchemaRenderProps);
22
- /**
23
- * 显示页面
24
- */
25
- showPage: () => void;
26
- /**
27
- * 隐藏页面
28
- */
29
- hidePage: () => void;
30
- render(): JSX.Element;
31
- }
@@ -1,46 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
3
- import { SchemaRenderBase } from "./components/schema-render-base";
4
- import React, { Component } from "react";
5
- import { SchemaRenderLayout } from "./components/schema-render-layout";
6
- export var SchemaRender = /*#__PURE__*/function (_Component) {
7
- function SchemaRender(props) {
8
- var _this;
9
- _this = _Component.call(this, props) || this;
10
- _this.state = {
11
- show: true
12
- };
13
- _this.page = void 0;
14
- /**
15
- * 显示页面
16
- */
17
- _this.showPage = function () {
18
- _this.setState({
19
- show: true
20
- });
21
- };
22
- /**
23
- * 隐藏页面
24
- */
25
- _this.hidePage = function () {
26
- _this.setState({
27
- show: false
28
- });
29
- };
30
- _this.state.show = !!props.defaultShow;
31
- return _this;
32
- }
33
- _inheritsLoose(SchemaRender, _Component);
34
- var _proto = SchemaRender.prototype;
35
- _proto.render = function render() {
36
- var _this2 = this;
37
- return /*#__PURE__*/React.createElement(SchemaRenderLayout, {
38
- root: this
39
- }, /*#__PURE__*/React.createElement(SchemaRenderBase, _extends({}, this.props, {
40
- ref: function ref(base) {
41
- _this2.page = base === null || base === void 0 ? void 0 : base.page;
42
- }
43
- })));
44
- };
45
- return SchemaRender;
46
- }(Component);
@@ -1,26 +0,0 @@
1
- import { FormInstance } from "antd/lib";
2
- import { NamePath, StoreValue } from "antd/es/form/interface";
3
- declare type NamePaths = (string | number)[];
4
- export declare class SubFormInstance implements FormInstance {
5
- parentForm: FormInstance;
6
- namePath: NamePaths;
7
- constructor(form: FormInstance, namePath: NamePaths);
8
- overwritePathName(name: NamePath): any[];
9
- overwriteFields(fields: any[]): any[];
10
- getFieldError(name: NamePath): string[];
11
- getFieldValue(name: NamePath): StoreValue;
12
- getFieldWarning(name: NamePath): string[];
13
- getFieldsError(nameList: NamePath[] | undefined): any[];
14
- getFieldsValue(nameList?: NamePath[] | true, filterFunc?: (meta: any) => boolean): any;
15
- isFieldTouched(name: NamePath): boolean;
16
- isFieldValidating(name: NamePath): boolean;
17
- isFieldsTouched(): boolean;
18
- isFieldsValidating(nameList: NamePath[]): boolean;
19
- resetFields(fields: NamePath[] | undefined): void;
20
- setFieldValue(name: NamePath, value: any): void;
21
- setFields(fields: any[]): void;
22
- setFieldsValue(values: any): void;
23
- submit(): void;
24
- validateFields(nameList: NamePath[] | undefined): Promise<any>;
25
- }
26
- export {};
@@ -1,100 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- export var SubFormInstance = /*#__PURE__*/function () {
3
- function SubFormInstance(form, namePath) {
4
- this.parentForm = void 0;
5
- this.namePath = void 0;
6
- this.parentForm = form;
7
- this.namePath = namePath;
8
- }
9
- var _proto = SubFormInstance.prototype;
10
- _proto.overwritePathName = function overwritePathName(name) {
11
- if (Array.isArray(name)) {
12
- return [].concat(this.namePath, name);
13
- } else {
14
- return [].concat(this.namePath, [name]);
15
- }
16
- };
17
- _proto.overwriteFields = function overwriteFields(fields) {
18
- var _this = this;
19
- return fields === null || fields === void 0 ? void 0 : fields.map(function (field) {
20
- return _extends({}, field, {
21
- name: _this.overwritePathName(field.name)
22
- });
23
- });
24
- };
25
- _proto.getFieldError = function getFieldError(name) {
26
- return this.parentForm.getFieldError(this.overwritePathName(name));
27
- };
28
- _proto.getFieldValue = function getFieldValue(name) {
29
- return this.parentForm.getFieldValue(this.overwritePathName(name));
30
- };
31
- _proto.getFieldWarning = function getFieldWarning(name) {
32
- return this.parentForm.getFieldWarning(this.overwritePathName(name));
33
- }
34
-
35
- // @ts-ignore
36
- ;
37
- _proto.getFieldsError = function getFieldsError(nameList) {
38
- var _this2 = this;
39
- return this.parentForm.getFieldsError(nameList === null || nameList === void 0 ? void 0 : nameList.map(function (name) {
40
- return _this2.overwritePathName(name);
41
- }));
42
- }
43
-
44
- // @ts-ignore
45
- ;
46
- _proto.getFieldsValue = function getFieldsValue(nameList, filterFunc) {
47
- var values = _extends({}, this.parentForm.getFieldValue(this.namePath));
48
- values.parent = this.parentForm.getFieldsValue(true);
49
- return values;
50
- };
51
- _proto.isFieldTouched = function isFieldTouched(name) {
52
- return this.parentForm.isFieldTouched(this.overwritePathName(name));
53
- };
54
- _proto.isFieldValidating = function isFieldValidating(name) {
55
- return this.parentForm.isFieldValidating(this.overwritePathName(name));
56
- };
57
- _proto.isFieldsTouched = function isFieldsTouched() {
58
- return this.parentForm.isFieldsTouched();
59
- };
60
- // @ts-ignore
61
- _proto.isFieldsValidating = function isFieldsValidating(nameList) {
62
- var _this3 = this;
63
- return this.parentForm.isFieldsValidating(nameList.map(function (name) {
64
- return _this3.overwritePathName(name);
65
- }));
66
- };
67
- _proto.resetFields = function resetFields(fields) {
68
- if (Array.isArray(fields)) {
69
- // @ts-ignore
70
- this.parentForm.resetFields(this.overwriteFields(fields));
71
- } else {
72
- this.parentForm.resetFields();
73
- }
74
- };
75
- _proto.setFieldValue = function setFieldValue(name, value) {
76
- return this.parentForm.setFieldValue(this.overwritePathName(name), value);
77
- };
78
- _proto.setFields = function setFields(fields) {
79
- this.parentForm.setFields(this.overwriteFields(fields));
80
- };
81
- _proto.setFieldsValue = function setFieldsValue(values) {
82
- var _this4 = this;
83
- if (!values) return;
84
- //删除父值
85
- delete values.parent;
86
- Object.keys(values).forEach(function (name) {
87
- return _this4.parentForm.setFieldValue(_this4.overwritePathName(name), values[name]);
88
- });
89
- };
90
- _proto.submit = function submit() {
91
- this.parentForm.submit();
92
- }
93
-
94
- // @ts-ignore
95
- ;
96
- _proto.validateFields = function validateFields(nameList) {
97
- return this.parentForm.validateFields(nameList);
98
- };
99
- return SubFormInstance;
100
- }();
@@ -1,19 +0,0 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- export function loadUserInfo() {
4
- return _loadUserInfo.apply(this, arguments);
5
- }
6
- function _loadUserInfo() {
7
- _loadUserInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
8
- return _regeneratorRuntime.wrap(function _callee$(_context) {
9
- while (1) switch (_context.prev = _context.next) {
10
- case 0:
11
- return _context.abrupt("return", {});
12
- case 1:
13
- case "end":
14
- return _context.stop();
15
- }
16
- }, _callee);
17
- }));
18
- return _loadUserInfo.apply(this, arguments);
19
- }
File without changes
@@ -1,32 +0,0 @@
1
- declare const _default: {
2
- packages: ({
3
- package: string;
4
- version: string;
5
- library: string;
6
- urls: string[];
7
- title?: undefined;
8
- description?: undefined;
9
- } | {
10
- title: string;
11
- package: string;
12
- version: string;
13
- description: string;
14
- urls: string[];
15
- library: string;
16
- })[];
17
- components: {
18
- exportName: string;
19
- npm: {
20
- package: string;
21
- version: string;
22
- };
23
- url: string;
24
- }[];
25
- sort: {
26
- groupList: string[];
27
- categoryList: string[];
28
- };
29
- groupList: string[];
30
- ignoreComponents: {};
31
- };
32
- export default _default;
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports["default"] = void 0;
5
- var _default = exports["default"] = {
6
- "packages": [{
7
- "package": "root-material",
8
- "version": "0.1.0",
9
- "library": "RootMaterial",
10
- "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css"]
11
- }, {
12
- "package": "antd-material",
13
- "version": "0.1.0",
14
- "library": "AntdMaterial",
15
- "urls": ["https://cdn.zhiyunhe.com/plugin/dayjs/dayjs.min.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
16
- }, {
17
- "title": "fusion组件库",
18
- "package": "@alifd/next",
19
- "version": "1.26.4",
20
- "description": "不可删除否则会出问题",
21
- "urls": ["https://g.alicdn.com/code/lib/alifd__next/1.26.4/next-with-locales.min.js"],
22
- "library": "Next"
23
- }, {
24
- "package": "chart-material",
25
- "version": "0.1.0",
26
- "library": "ChartMaterial",
27
- "urls": ["https://cdn.zhiyunhe.com/plugin/antv/g2/5.1.19/g2.min.js", "https://cdn.zhiyunhe.com/plugin/datav/1.2.5/datav.min.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/chart/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/chart/view.css"]
28
- }],
29
- "components": [{
30
- "exportName": "RootMaterialMeta",
31
- "npm": {
32
- "package": "root-material",
33
- "version": "1.0.0"
34
- },
35
- "url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/meta.js"
36
- }, {
37
- "exportName": "AntdMaterialMeta",
38
- "npm": {
39
- "package": "antd-material",
40
- "version": "1.0.0"
41
- },
42
- "url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/meta.js"
43
- }, {
44
- "exportName": "ChartMaterialMeta",
45
- "npm": {
46
- "package": "chart-material",
47
- "version": "1.0.0"
48
- },
49
- "url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/chart/meta.js"
50
- }],
51
- "sort": {
52
- "groupList": ["", "默认分组", "原子组件", "精选组件", "图表组件"],
53
- "categoryList": ["布局", "通用", "导航", "数据录入", "数据展示", "反馈", "大屏组件", "图表", "基础元素", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "引导", "信息输入", "信息展示", "信息反馈", "布局容器类"]
54
- },
55
- "groupList": ["默认分组", "原子组件", "精选组件", "图表组件"],
56
- "ignoreComponents": {}
57
- };