@nocobase/plugin-public-forms 1.4.0-alpha

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 (39) hide show
  1. package/LICENSE.txt +159 -0
  2. package/client.d.ts +2 -0
  3. package/client.js +1 -0
  4. package/dist/client/collections/index.d.ts +9 -0
  5. package/dist/client/collections/publicForms.d.ts +72 -0
  6. package/dist/client/components/AdminPublicFormList.d.ts +10 -0
  7. package/dist/client/components/AdminPublicFormPage.d.ts +10 -0
  8. package/dist/client/components/ConfigureLink.d.ts +10 -0
  9. package/dist/client/components/PublicFormPage.d.ts +12 -0
  10. package/dist/client/components/UnEnabledFormPlaceholder.d.ts +11 -0
  11. package/dist/client/hooks/index.d.ts +12 -0
  12. package/dist/client/hooks/useDeleteActionProps.d.ts +10 -0
  13. package/dist/client/hooks/useEditFormProps.d.ts +11 -0
  14. package/dist/client/hooks/usePublicSubmitActionProps.d.ts +4 -0
  15. package/dist/client/hooks/useSubmitActionProps.d.ts +12 -0
  16. package/dist/client/index.d.ts +20 -0
  17. package/dist/client/index.js +17 -0
  18. package/dist/client/locale.d.ts +12 -0
  19. package/dist/client/schemas/createActionSchema.d.ts +70 -0
  20. package/dist/client/schemas/editActionSchema.d.ts +81 -0
  21. package/dist/client/schemas/formSchemaCallback.d.ts +46 -0
  22. package/dist/client/schemas/index.d.ts +9 -0
  23. package/dist/client/schemas/publicForms.d.ts +10 -0
  24. package/dist/client/settings/index.d.ts +11 -0
  25. package/dist/externalVersion.js +26 -0
  26. package/dist/index.d.ts +10 -0
  27. package/dist/index.js +48 -0
  28. package/dist/locale/zh-CN.json +18 -0
  29. package/dist/server/collections/publicForms.d.ts +10 -0
  30. package/dist/server/collections/publicForms.js +69 -0
  31. package/dist/server/hook.d.ts +21 -0
  32. package/dist/server/hook.js +121 -0
  33. package/dist/server/index.d.ts +9 -0
  34. package/dist/server/index.js +42 -0
  35. package/dist/server/plugin.d.ts +47 -0
  36. package/dist/server/plugin.js +224 -0
  37. package/package.json +20 -0
  38. package/server.d.ts +2 -0
  39. package/server.js +1 -0
@@ -0,0 +1,70 @@
1
+ export declare const createActionSchema: {
2
+ type: string;
3
+ 'x-component': string;
4
+ title: string;
5
+ 'x-align': string;
6
+ 'x-component-props': {
7
+ type: string;
8
+ icon: string;
9
+ };
10
+ properties: {
11
+ drawer: {
12
+ type: string;
13
+ 'x-component': string;
14
+ title: string;
15
+ 'x-decorator': string;
16
+ properties: {
17
+ form: {
18
+ type: string;
19
+ properties: {
20
+ title: {
21
+ type: string;
22
+ 'x-decorator': string;
23
+ 'x-component': string;
24
+ };
25
+ collection: {
26
+ type: string;
27
+ 'x-decorator': string;
28
+ 'x-component': string;
29
+ };
30
+ type: {
31
+ type: string;
32
+ 'x-decorator': string;
33
+ title: string;
34
+ 'x-component': string;
35
+ default: string;
36
+ enum: string;
37
+ };
38
+ description: {
39
+ type: string;
40
+ 'x-decorator': string;
41
+ 'x-component': string;
42
+ };
43
+ password: {
44
+ type: string;
45
+ 'x-decorator': string;
46
+ 'x-component': string;
47
+ };
48
+ enabled: {
49
+ type: string;
50
+ 'x-decorator': string;
51
+ 'x-component': string;
52
+ default: boolean;
53
+ };
54
+ };
55
+ };
56
+ footer: {
57
+ type: string;
58
+ 'x-component': string;
59
+ properties: {
60
+ submit: {
61
+ title: string;
62
+ 'x-component': string;
63
+ 'x-use-component-props': string;
64
+ };
65
+ };
66
+ };
67
+ };
68
+ };
69
+ };
70
+ };
@@ -0,0 +1,81 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const editActionSchema: {
10
+ type: string;
11
+ title: string;
12
+ 'x-component': string;
13
+ 'x-component-props': {
14
+ openMode: string;
15
+ icon: string;
16
+ };
17
+ properties: {
18
+ drawer: {
19
+ type: string;
20
+ title: string;
21
+ 'x-component': string;
22
+ 'x-decorator': string;
23
+ 'x-use-decorator-props': string;
24
+ properties: {
25
+ form: {
26
+ type: string;
27
+ properties: {
28
+ title: {
29
+ type: string;
30
+ 'x-decorator': string;
31
+ 'x-component': string;
32
+ };
33
+ collection: {
34
+ type: string;
35
+ 'x-decorator': string;
36
+ 'x-component': string;
37
+ 'x-component-props': {
38
+ disabled: boolean;
39
+ };
40
+ };
41
+ type: {
42
+ type: string;
43
+ 'x-decorator': string;
44
+ title: string;
45
+ 'x-component': string;
46
+ default: string;
47
+ enum: string;
48
+ };
49
+ description: {
50
+ type: string;
51
+ 'x-decorator': string;
52
+ 'x-component': string;
53
+ };
54
+ password: {
55
+ type: string;
56
+ 'x-decorator': string;
57
+ 'x-component': string;
58
+ };
59
+ enabled: {
60
+ type: string;
61
+ 'x-decorator': string;
62
+ 'x-component': string;
63
+ default: boolean;
64
+ };
65
+ };
66
+ };
67
+ footer: {
68
+ type: string;
69
+ 'x-component': string;
70
+ properties: {
71
+ submit: {
72
+ title: string;
73
+ 'x-component': string;
74
+ 'x-use-component-props': string;
75
+ };
76
+ };
77
+ };
78
+ };
79
+ };
80
+ };
81
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const formSchemaCallback: (options: any) => {
10
+ type: string;
11
+ 'x-toolbar': string;
12
+ 'x-toolbar-props': {
13
+ draggable: boolean;
14
+ };
15
+ 'x-settings': string;
16
+ 'x-component': string;
17
+ 'x-decorator': string;
18
+ 'x-decorator-props': {
19
+ collection: any;
20
+ dataSource: any;
21
+ type: string;
22
+ };
23
+ 'x-use-decorator-props': string;
24
+ properties: {
25
+ a69vmspkv8h: {
26
+ type: string;
27
+ 'x-component': string;
28
+ 'x-use-component-props': string;
29
+ properties: {
30
+ grid: {
31
+ type: string;
32
+ 'x-component': string;
33
+ 'x-initializer': string;
34
+ };
35
+ l9xfwp6cfh1: {
36
+ type: string;
37
+ 'x-component': string;
38
+ 'x-initializer': string;
39
+ 'x-component-props': {
40
+ layout: string;
41
+ };
42
+ };
43
+ };
44
+ };
45
+ };
46
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './publicForms';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { ISchema } from '@nocobase/client';
10
+ export declare const publicFormsSchema: ISchema;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { SchemaSettings } from '@nocobase/client';
10
+ export declare const publicFormBlockSettings: SchemaSettings<{}>;
11
+ export declare const publicMarkdownBlockSettings: SchemaSettings<{}>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ module.exports = {
11
+ "@nocobase/client": "1.4.0-alpha",
12
+ "react-i18next": "11.18.6",
13
+ "@nocobase/plugin-ui-schema-storage": "1.4.0-alpha",
14
+ "@nocobase/server": "1.4.0-alpha",
15
+ "react": "18.2.0",
16
+ "@ant-design/icons": "5.2.6",
17
+ "antd": "5.12.8",
18
+ "react-router": "6.27.0",
19
+ "react-router-dom": "6.21.0",
20
+ "@formily/antd-v5": "1.1.9",
21
+ "@emotion/css": "11.13.0",
22
+ "@formily/react": "2.3.0",
23
+ "@formily/core": "2.3.0",
24
+ "@formily/shared": "2.3.0",
25
+ "@nocobase/database": "1.4.0-alpha"
26
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './server';
10
+ export { default } from './server';
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
+ // If the importer is in node compatibility mode or this is not an ESM
31
+ // file that has been converted to a CommonJS file using a Babel-
32
+ // compatible transform (i.e. "__esModule" has not been set), then set
33
+ // "default" to the CommonJS "module.exports" for node compatibility.
34
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
+ mod
36
+ ));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
+ var src_exports = {};
39
+ __export(src_exports, {
40
+ default: () => import_server.default
41
+ });
42
+ module.exports = __toCommonJS(src_exports);
43
+ __reExport(src_exports, require("./server"), module.exports);
44
+ var import_server = __toESM(require("./server"));
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ ...require("./server")
48
+ });
@@ -0,0 +1,18 @@
1
+ {
2
+ "Enable form": "启用表单",
3
+ "Public forms": "公开表单",
4
+ "Add New": "添加",
5
+ "Type": "类型",
6
+ "Open form": "查看公开表单",
7
+ "Set password": "设置密码",
8
+ "Copy link": "复制链接",
9
+ "QR code": "二维码",
10
+ "The form is not enabled and cannot be accessed": "该表单未启用,无法访问",
11
+ "Link copied successfully": "复制地址成功",
12
+ "After successful submission": "提交成功后",
13
+ "Enable password": "启用密码",
14
+ "Prompt after successful submission": "提交成功后的信息提示",
15
+ "Form": "普通表单",
16
+ "# Submitted successfully!\nThis is a demo text, **supports Markdown syntax**.": "# 提交成功!\n这是一段演示文本,**支持 Markdown 语法**。",
17
+ "The form is not found": "未找到该表单"
18
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: import("@nocobase/database").CollectionOptions;
10
+ export default _default;
@@ -0,0 +1,69 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var publicForms_exports = {};
28
+ __export(publicForms_exports, {
29
+ default: () => publicForms_default
30
+ });
31
+ module.exports = __toCommonJS(publicForms_exports);
32
+ var import_database = require("@nocobase/database");
33
+ var publicForms_default = (0, import_database.defineCollection)({
34
+ name: "publicForms",
35
+ filterTargetKey: "key",
36
+ createdBy: true,
37
+ updatedBy: true,
38
+ fields: [
39
+ {
40
+ type: "uid",
41
+ name: "key",
42
+ unique: true
43
+ },
44
+ {
45
+ type: "string",
46
+ name: "title"
47
+ },
48
+ {
49
+ type: "string",
50
+ name: "type"
51
+ },
52
+ {
53
+ type: "string",
54
+ name: "collection"
55
+ },
56
+ {
57
+ type: "string",
58
+ name: "description"
59
+ },
60
+ {
61
+ type: "boolean",
62
+ name: "enabled"
63
+ },
64
+ {
65
+ type: "string",
66
+ name: "password"
67
+ }
68
+ ]
69
+ });
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare function getAssociationPath(str: any): any;
10
+ /**
11
+ * 为多层级的关系字段补充上父级字段
12
+ * e.g. ['a', 'b.c'] => ['a', 'b', 'b.c']
13
+ * @param appends
14
+ * @returns
15
+ */
16
+ export declare function fillParentFields(appends: Set<string>): Set<string>;
17
+ export declare const parseAssociationNames: (dataSourceKey: string, collectionName: string, app: any, fieldSchema: any) => {
18
+ getAssociationAppends: () => {
19
+ appends: any[];
20
+ };
21
+ };
@@ -0,0 +1,121 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var hook_exports = {};
28
+ __export(hook_exports, {
29
+ fillParentFields: () => fillParentFields,
30
+ getAssociationPath: () => getAssociationPath,
31
+ parseAssociationNames: () => parseAssociationNames
32
+ });
33
+ module.exports = __toCommonJS(hook_exports);
34
+ function getAssociationPath(str) {
35
+ const lastIndex = str.lastIndexOf(".");
36
+ if (lastIndex !== -1) {
37
+ return str.substring(0, lastIndex);
38
+ }
39
+ return str;
40
+ }
41
+ function fillParentFields(appends) {
42
+ const depFields = Array.from(appends).filter((field) => {
43
+ var _a;
44
+ return (_a = field == null ? void 0 : field.includes) == null ? void 0 : _a.call(field, ".");
45
+ });
46
+ depFields.forEach((field) => {
47
+ const fields = field.split(".");
48
+ fields.pop();
49
+ const parentField = fields.join(".");
50
+ appends.add(parentField);
51
+ });
52
+ return appends;
53
+ }
54
+ const parseAssociationNames = (dataSourceKey, collectionName, app, fieldSchema) => {
55
+ let appends = /* @__PURE__ */ new Set([]);
56
+ const dataSource = app.dataSourceManager.dataSources.get(dataSourceKey);
57
+ const _getAssociationAppends = (schema, str) => {
58
+ const reduceProperties = (schema2, reducer, initialValue) => {
59
+ if (!schema2 || typeof schema2 !== "object") {
60
+ return initialValue;
61
+ }
62
+ if (schema2.properties && typeof schema2.properties === "object") {
63
+ for (const key in schema2.properties) {
64
+ if (schema2.properties[key]) {
65
+ const property = schema2.properties[key];
66
+ initialValue = reducer(initialValue, property, key);
67
+ initialValue = reduceProperties(property, reducer, initialValue);
68
+ }
69
+ }
70
+ }
71
+ return initialValue;
72
+ };
73
+ const customReducer = (pre, s, key) => {
74
+ var _a, _b, _c, _d;
75
+ const prefix = pre || str;
76
+ const collection = dataSource.collectionManager.getCollection(
77
+ ((_b = (_a = s == null ? void 0 : s["x-collection-field"]) == null ? void 0 : _a.split(".")) == null ? void 0 : _b[0]) || collectionName
78
+ );
79
+ if (!collection) {
80
+ throw new Error("The collection is not found");
81
+ }
82
+ const collectionField = s["x-collection-field"] && collection.getField((_c = s["x-collection-field"]) == null ? void 0 : _c.split(".")[1]);
83
+ const isAssociationField = collectionField && ["hasOne", "hasMany", "belongsTo", "belongsToMany", "belongsToArray"].includes(collectionField.type);
84
+ if (collectionField && isAssociationField) {
85
+ appends.add(collectionField.target);
86
+ if (["Nester", "SubTable", "PopoverNester"].includes((_d = s["x-component-props"]) == null ? void 0 : _d.mode)) {
87
+ const bufPrefix = prefix && prefix !== "" ? `${prefix}.${s.name}` : s.name;
88
+ _getAssociationAppends(s, bufPrefix);
89
+ }
90
+ } else if (![
91
+ "ActionBar",
92
+ "Action",
93
+ "Action.Link",
94
+ "Action.Modal",
95
+ "Selector",
96
+ "Viewer",
97
+ "AddNewer",
98
+ "AssociationField.Selector",
99
+ "AssociationField.AddNewer",
100
+ "TableField"
101
+ ].includes(s["x-component"])) {
102
+ _getAssociationAppends(s, str);
103
+ }
104
+ return pre;
105
+ };
106
+ reduceProperties(schema, customReducer, str);
107
+ };
108
+ const getAssociationAppends = () => {
109
+ appends = /* @__PURE__ */ new Set([]);
110
+ _getAssociationAppends(fieldSchema.properties.form, "");
111
+ appends = fillParentFields(appends);
112
+ return { appends: [...appends] };
113
+ };
114
+ return { getAssociationAppends };
115
+ };
116
+ // Annotate the CommonJS export names for ESM import in node:
117
+ 0 && (module.exports = {
118
+ fillParentFields,
119
+ getAssociationPath,
120
+ parseAssociationNames
121
+ });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export { default } from './plugin';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var server_exports = {};
38
+ __export(server_exports, {
39
+ default: () => import_plugin.default
40
+ });
41
+ module.exports = __toCommonJS(server_exports);
42
+ var import_plugin = __toESM(require("./plugin"));
@@ -0,0 +1,47 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { Plugin } from '@nocobase/server';
10
+ export declare class PluginPublicFormsServer extends Plugin {
11
+ parseCollectionData(formCollection: any, appends: any): Promise<{
12
+ name: string;
13
+ fields: any[];
14
+ template: string;
15
+ }[]>;
16
+ getMetaByTk(filterByTk: string, options: {
17
+ password?: string;
18
+ token?: string;
19
+ }): Promise<{
20
+ passwordRequired: boolean;
21
+ dataSource?: undefined;
22
+ token?: undefined;
23
+ schema?: undefined;
24
+ } | {
25
+ dataSource: {
26
+ key: any;
27
+ displayName: any;
28
+ collections: {
29
+ name: string;
30
+ fields: any[];
31
+ template: string;
32
+ }[];
33
+ };
34
+ token: string;
35
+ schema: any;
36
+ passwordRequired?: undefined;
37
+ }>;
38
+ getPublicFormsMeta: (ctx: any, next: any) => Promise<void>;
39
+ parseToken: (ctx: any, next: any) => Promise<any>;
40
+ parseACL: (ctx: any, next: any) => Promise<any>;
41
+ load(): Promise<void>;
42
+ install(): Promise<void>;
43
+ afterEnable(): Promise<void>;
44
+ afterDisable(): Promise<void>;
45
+ remove(): Promise<void>;
46
+ }
47
+ export default PluginPublicFormsServer;