@payloadcms/plugin-form-builder 3.0.0-beta.9 → 3.0.0-canary.0d307b1

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 (68) hide show
  1. package/dist/collections/FormSubmissions/hooks/createCharge.d.ts +3 -0
  2. package/dist/collections/FormSubmissions/hooks/createCharge.d.ts.map +1 -0
  3. package/dist/collections/FormSubmissions/hooks/createCharge.js.map +1 -1
  4. package/dist/collections/FormSubmissions/hooks/sendEmail.d.ts +3 -0
  5. package/dist/collections/FormSubmissions/hooks/sendEmail.d.ts.map +1 -0
  6. package/dist/collections/FormSubmissions/hooks/sendEmail.js.map +1 -1
  7. package/dist/collections/FormSubmissions/index.d.ts +4 -0
  8. package/dist/collections/FormSubmissions/index.d.ts.map +1 -0
  9. package/dist/collections/FormSubmissions/index.js +64 -62
  10. package/dist/collections/FormSubmissions/index.js.map +1 -1
  11. package/dist/collections/Forms/DynamicFieldSelector.d.ts +4 -0
  12. package/dist/collections/Forms/DynamicFieldSelector.d.ts.map +1 -0
  13. package/dist/collections/Forms/DynamicFieldSelector.js +3 -3
  14. package/dist/collections/Forms/DynamicFieldSelector.js.map +1 -1
  15. package/dist/collections/Forms/DynamicPriceSelector.d.ts +4 -0
  16. package/dist/collections/Forms/DynamicPriceSelector.d.ts.map +1 -0
  17. package/dist/collections/Forms/DynamicPriceSelector.js +18 -9
  18. package/dist/collections/Forms/DynamicPriceSelector.js.map +1 -1
  19. package/dist/collections/Forms/fields.d.ts +6 -0
  20. package/dist/collections/Forms/fields.d.ts.map +1 -0
  21. package/dist/collections/Forms/fields.js.map +1 -1
  22. package/dist/collections/Forms/index.d.ts +4 -0
  23. package/dist/collections/Forms/index.d.ts.map +1 -0
  24. package/dist/collections/Forms/index.js +146 -144
  25. package/dist/collections/Forms/index.js.map +1 -1
  26. package/dist/exports/types.d.ts +2 -0
  27. package/dist/exports/types.d.ts.map +1 -0
  28. package/dist/exports/types.js +3 -0
  29. package/dist/exports/types.js.map +1 -0
  30. package/dist/index.d.ts +6 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +1 -16
  33. package/dist/index.js.map +1 -1
  34. package/dist/types.d.ts +182 -0
  35. package/dist/types.d.ts.map +1 -0
  36. package/dist/types.js.map +1 -1
  37. package/dist/utilities/getPaymentTotal.d.ts +5 -0
  38. package/dist/utilities/getPaymentTotal.d.ts.map +1 -0
  39. package/dist/utilities/lexical/converters/heading.d.ts +3 -0
  40. package/dist/utilities/lexical/converters/heading.d.ts.map +1 -0
  41. package/dist/utilities/lexical/converters/linebreak.d.ts +3 -0
  42. package/dist/utilities/lexical/converters/linebreak.d.ts.map +1 -0
  43. package/dist/utilities/lexical/converters/link.d.ts +3 -0
  44. package/dist/utilities/lexical/converters/link.d.ts.map +1 -0
  45. package/dist/utilities/lexical/converters/list.d.ts +4 -0
  46. package/dist/utilities/lexical/converters/list.d.ts.map +1 -0
  47. package/dist/utilities/lexical/converters/paragraph.d.ts +3 -0
  48. package/dist/utilities/lexical/converters/paragraph.d.ts.map +1 -0
  49. package/dist/utilities/lexical/converters/quote.d.ts +3 -0
  50. package/dist/utilities/lexical/converters/quote.d.ts.map +1 -0
  51. package/dist/utilities/lexical/converters/text.d.ts +3 -0
  52. package/dist/utilities/lexical/converters/text.d.ts.map +1 -0
  53. package/dist/utilities/lexical/defaultConverters.d.ts +3 -0
  54. package/dist/utilities/lexical/defaultConverters.d.ts.map +1 -0
  55. package/dist/utilities/lexical/nodeFormat.d.ts +39 -0
  56. package/dist/utilities/lexical/nodeFormat.d.ts.map +1 -0
  57. package/dist/utilities/lexical/serializeLexical.d.ts +9 -0
  58. package/dist/utilities/lexical/serializeLexical.d.ts.map +1 -0
  59. package/dist/utilities/lexical/types.d.ts +14 -0
  60. package/dist/utilities/lexical/types.d.ts.map +1 -0
  61. package/dist/utilities/replaceDoubleCurlys.d.ts +8 -0
  62. package/dist/utilities/replaceDoubleCurlys.d.ts.map +1 -0
  63. package/dist/utilities/slate/serializeSlate.d.ts +12 -0
  64. package/dist/utilities/slate/serializeSlate.d.ts.map +1 -0
  65. package/package.json +48 -37
  66. package/src/index.ts +0 -55
  67. package/types.d.ts +0 -1
  68. package/types.js +0 -1
@@ -0,0 +1,5 @@
1
+ import type { FieldValues, PaymentField } from '../types.js';
2
+ export declare const getPaymentTotal: (args: Partial<PaymentField> & {
3
+ fieldValues: FieldValues;
4
+ }) => number;
5
+ //# sourceMappingURL=getPaymentTotal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPaymentTotal.d.ts","sourceRoot":"","sources":["../../src/utilities/getPaymentTotal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAA;AAE5E,eAAO,MAAM,eAAe,SACpB,OAAO,CAAC,YAAY,CAAC,GAAG;IAC5B,WAAW,EAAE,WAAW,CAAA;CACzB,KACA,MA8CF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const HeadingHTMLConverter: HTMLConverter<any>;
3
+ //# sourceMappingURL=heading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/heading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,GAAG,CAenD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const LinebreakHTMLConverter: HTMLConverter<any>;
3
+ //# sourceMappingURL=linebreak.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linebreak.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/linebreak.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,GAAG,CAKrD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const LinkHTMLConverter: HTMLConverter<any>;
3
+ //# sourceMappingURL=link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAKhD,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,GAAG,CAyBhD,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const ListHTMLConverter: HTMLConverter<any>;
3
+ export declare const ListItemHTMLConverter: HTMLConverter<any>;
4
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,GAAG,CAehD,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,GAAG,CA4BpD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const ParagraphHTMLConverter: HTMLConverter<any>;
3
+ //# sourceMappingURL=paragraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/paragraph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,GAAG,CAcrD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const QuoteHTMLConverter: HTMLConverter<any>;
3
+ //# sourceMappingURL=quote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/quote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,GAAG,CAejD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from '../types.js';
2
+ export declare const TextHTMLConverter: HTMLConverter<any>;
3
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/utilities/lexical/converters/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAKhD,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,GAAG,CAiChD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { HTMLConverter } from './types.js';
2
+ export declare const defaultHTMLConverters: HTMLConverter[];
3
+ //# sourceMappingURL=defaultConverters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultConverters.d.ts","sourceRoot":"","sources":["../../../src/utilities/lexical/defaultConverters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAU/C,eAAO,MAAM,qBAAqB,EAAE,aAAa,EAShD,CAAA"}
@@ -0,0 +1,39 @@
1
+ export declare const NodeFormat: {
2
+ readonly DOM_ELEMENT_TYPE: 1;
3
+ readonly DOM_TEXT_TYPE: 3;
4
+ readonly NO_DIRTY_NODES: 0;
5
+ readonly HAS_DIRTY_NODES: 1;
6
+ readonly FULL_RECONCILE: 2;
7
+ readonly IS_NORMAL: 0;
8
+ readonly IS_TOKEN: 1;
9
+ readonly IS_SEGMENTED: 2;
10
+ readonly IS_INERT: 3;
11
+ readonly IS_BOLD: 1;
12
+ readonly IS_ITALIC: number;
13
+ readonly IS_STRIKETHROUGH: number;
14
+ readonly IS_UNDERLINE: number;
15
+ readonly IS_CODE: number;
16
+ readonly IS_SUBSCRIPT: number;
17
+ readonly IS_SUPERSCRIPT: number;
18
+ readonly IS_HIGHLIGHT: number;
19
+ readonly IS_DIRECTIONLESS: 1;
20
+ readonly IS_UNMERGEABLE: number;
21
+ readonly IS_ALIGN_LEFT: 1;
22
+ readonly IS_ALIGN_CENTER: 2;
23
+ readonly IS_ALIGN_RIGHT: 3;
24
+ readonly IS_ALIGN_JUSTIFY: 4;
25
+ readonly IS_ALIGN_START: 5;
26
+ readonly IS_ALIGN_END: 6;
27
+ };
28
+ export declare const IS_ALL_FORMATTING: number;
29
+ export declare const NON_BREAKING_SPACE = "\u00A0";
30
+ export declare const DOUBLE_LINE_BREAK = "\n\n";
31
+ export declare const RTL_REGEX: RegExp;
32
+ export declare const LTR_REGEX: RegExp;
33
+ export declare const TEXT_TYPE_TO_FORMAT: Record<any | string, number>;
34
+ export declare const DETAIL_TYPE_TO_DETAIL: Record<any | string, number>;
35
+ export declare const ELEMENT_TYPE_TO_FORMAT: Record<Exclude<any, ''>, number>;
36
+ export declare const ELEMENT_FORMAT_TO_TYPE: Record<number, any>;
37
+ export declare const TEXT_MODE_TO_TYPE: Record<any, 0 | 1 | 2>;
38
+ export declare const TEXT_TYPE_TO_MODE: Record<number, any>;
39
+ //# sourceMappingURL=nodeFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeFormat.d.ts","sourceRoot":"","sources":["../../../src/utilities/lexical/nodeFormat.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bb,CAAA;AAEV,eAAO,MAAM,iBAAiB,QAQL,CAAA;AAGzB,eAAO,MAAM,kBAAkB,WAAW,CAAA;AAE1C,eAAO,MAAM,iBAAiB,SAAS,CAAA;AAYvC,eAAO,MAAM,SAAS,QAA8C,CAAA;AAEpE,eAAO,MAAM,SAAS,QAA8C,CAAA;AAEpE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,MAAM,CAS5D,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,GAAG,GAAG,MAAM,EAAE,MAAM,CAG9D,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,MAAM,CAOnE,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAOtD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAIpD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAIjD,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { HTMLConverter, SerializedLexicalNodeWithParent } from './types.js';
2
+ export declare function serializeLexical(data?: any, submissionData?: any): Promise<string>;
3
+ export declare function convertLexicalNodesToHTML({ converters, lexicalNodes, parent, submissionData, }: {
4
+ converters: HTMLConverter[];
5
+ lexicalNodes: any[];
6
+ parent: SerializedLexicalNodeWithParent;
7
+ submissionData?: any;
8
+ }): Promise<string>;
9
+ //# sourceMappingURL=serializeLexical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializeLexical.d.ts","sourceRoot":"","sources":["../../../src/utilities/lexical/serializeLexical.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAA;AAIhF,wBAAsB,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAYxF;AAED,wBAAsB,yBAAyB,CAAC,EAC9C,UAAU,EACV,YAAY,EACZ,MAAM,EACN,cAAc,GACf,EAAE;IACD,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,YAAY,EAAE,GAAG,EAAE,CAAA;IACnB,MAAM,EAAE,+BAA+B,CAAA;IACvC,cAAc,CAAC,EAAE,GAAG,CAAA;CACrB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgClB"}
@@ -0,0 +1,14 @@
1
+ export type HTMLConverter<T = any> = {
2
+ converter: ({ childIndex, converters, node, parent, submissionData, }: {
3
+ childIndex: number;
4
+ converters: HTMLConverter[];
5
+ node: T;
6
+ parent: SerializedLexicalNodeWithParent;
7
+ submissionData?: any;
8
+ }) => Promise<string> | string;
9
+ nodeTypes: string[];
10
+ };
11
+ export type SerializedLexicalNodeWithParent = any & {
12
+ parent?: any;
13
+ };
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utilities/lexical/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,GAAG,IAAI;IACnC,SAAS,EAAE,CAAC,EACV,UAAU,EACV,UAAU,EACV,IAAI,EACJ,MAAM,EACN,cAAc,GACf,EAAE;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,EAAE,aAAa,EAAE,CAAA;QAC3B,IAAI,EAAE,CAAC,CAAA;QACP,MAAM,EAAE,+BAA+B,CAAA;QACvC,cAAc,CAAC,EAAE,GAAG,CAAA;KACrB,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG,GAAG,GAAG;IAClD,MAAM,CAAC,EAAE,GAAG,CAAA;CACb,CAAA"}
@@ -0,0 +1,8 @@
1
+ interface EmailVariable {
2
+ field: string;
3
+ value: string;
4
+ }
5
+ type EmailVariables = EmailVariable[];
6
+ export declare const replaceDoubleCurlys: (str: string, variables?: EmailVariables) => string;
7
+ export {};
8
+ //# sourceMappingURL=replaceDoubleCurlys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replaceDoubleCurlys.d.ts","sourceRoot":"","sources":["../../src/utilities/replaceDoubleCurlys.ts"],"names":[],"mappings":"AAAA,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,KAAK,cAAc,GAAG,aAAa,EAAE,CAAA;AAErC,eAAO,MAAM,mBAAmB,QAAS,MAAM,cAAc,cAAc,KAAG,MAU7E,CAAA"}
@@ -0,0 +1,12 @@
1
+ interface Node {
2
+ bold?: boolean;
3
+ children?: Node[];
4
+ code?: boolean;
5
+ italic?: boolean;
6
+ text?: string;
7
+ type?: string;
8
+ url?: string;
9
+ }
10
+ export declare const serializeSlate: (children?: Node[], submissionData?: any) => string | undefined;
11
+ export {};
12
+ //# sourceMappingURL=serializeSlate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializeSlate.d.ts","sourceRoot":"","sources":["../../../src/utilities/slate/serializeSlate.ts"],"names":[],"mappings":"AAIA,UAAU,IAAI;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAMD,eAAO,MAAM,cAAc,cAAe,IAAI,EAAE,mBAAmB,GAAG,KAAG,MAAM,GAAG,SAwHrE,CAAA"}
package/package.json CHANGED
@@ -1,66 +1,77 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-form-builder",
3
+ "version": "3.0.0-canary.0d307b1",
3
4
  "description": "Form builder plugin for Payload CMS",
4
- "version": "3.0.0-beta.9",
5
- "homepage:": "https://payloadcms.com",
5
+ "keywords": [
6
+ "payload",
7
+ "cms",
8
+ "plugin",
9
+ "typescript",
10
+ "react",
11
+ "forms",
12
+ "fields",
13
+ "form builder",
14
+ "payments"
15
+ ],
6
16
  "repository": {
7
17
  "type": "git",
8
18
  "url": "https://github.com/payloadcms/payload.git",
9
19
  "directory": "packages/plugin-form-builder"
10
20
  },
11
- "main": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
13
21
  "license": "MIT",
14
- "author": "dev@payloadcms.com",
22
+ "author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
15
23
  "type": "module",
16
- "peerDependencies": {
17
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
18
- "payload": "3.0.0-beta.9"
24
+ "exports": {
25
+ ".": {
26
+ "import": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.js"
29
+ },
30
+ "./types": {
31
+ "import": "./dist/exports/types.js",
32
+ "types": "./dist/exports/types.d.ts",
33
+ "default": "./dist/exports/types.js"
34
+ }
19
35
  },
36
+ "main": "./dist/index.js",
37
+ "types": "./dist/index.d.ts",
38
+ "files": [
39
+ "dist"
40
+ ],
20
41
  "dependencies": {
21
42
  "deepmerge": "^4.2.2",
22
43
  "escape-html": "^1.0.3",
23
- "@payloadcms/ui": "3.0.0-beta.9"
44
+ "@payloadcms/ui": "3.0.0-canary.0d307b1"
24
45
  },
25
46
  "devDependencies": {
26
47
  "@types/escape-html": "^1.0.4",
27
48
  "@types/express": "^4.17.21",
28
- "@types/react": "18.2.74",
49
+ "@types/react": "npm:types-react@19.0.0-beta.2",
50
+ "@types/react-dom": "npm:types-react-dom@19.0.0-beta.2",
29
51
  "copyfiles": "^2.4.1",
30
52
  "cross-env": "^7.0.3",
31
53
  "nodemon": "3.0.3",
32
- "react": "^18.0.0",
33
54
  "ts-node": "10.9.1",
34
- "@payloadcms/eslint-config": "1.1.1",
35
- "payload": "3.0.0-beta.9"
55
+ "payload": "3.0.0-canary.0d307b1",
56
+ "@payloadcms/eslint-config": "1.1.1"
36
57
  },
37
- "exports": {
38
- ".": {
39
- "import": "./dist/index.js",
40
- "require": "./dist/index.js",
41
- "types": "./dist/index.d.ts"
42
- }
58
+ "peerDependencies": {
59
+ "react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
60
+ "react-dom": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
61
+ "payload": "3.0.0-canary.0d307b1"
62
+ },
63
+ "publishConfig": {
64
+ "registry": "https://registry.npmjs.org/"
65
+ },
66
+ "homepage:": "https://payloadcms.com",
67
+ "overrides": {
68
+ "@types/react": "npm:types-react@19.0.0-beta.2",
69
+ "@types/react-dom": "npm:types-react-dom@19.0.0-beta.2"
43
70
  },
44
- "files": [
45
- "dist",
46
- "types.js",
47
- "types.d.ts"
48
- ],
49
- "keywords": [
50
- "payload",
51
- "cms",
52
- "plugin",
53
- "typescript",
54
- "react",
55
- "forms",
56
- "fields",
57
- "form builder",
58
- "payments"
59
- ],
60
71
  "scripts": {
61
- "build:swc": "swc ./src -d ./dist --config-file .swcrc",
72
+ "build": "pnpm build:types && pnpm build:swc",
73
+ "build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
62
74
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
63
- "build": "swc ./src -d ./dist --config-file .swcrc",
64
75
  "clean": "rimraf {dist,*.tsbuildinfo}",
65
76
  "test": "echo \"No tests available.\""
66
77
  }
package/src/index.ts DELETED
@@ -1,55 +0,0 @@
1
- import type { Config } from 'payload/config'
2
-
3
- import type { PluginConfig } from './types.js'
4
-
5
- import { generateSubmissionCollection } from './collections/FormSubmissions/index.js'
6
- import { generateFormCollection } from './collections/Forms/index.js'
7
-
8
- export { fields } from './collections/Forms/fields.js'
9
- export { getPaymentTotal } from './utilities/getPaymentTotal.js'
10
-
11
- const FormBuilder =
12
- (incomingFormConfig: PluginConfig) =>
13
- (config: Config): Config => {
14
- const formConfig: PluginConfig = {
15
- ...incomingFormConfig,
16
- fields: {
17
- checkbox: true,
18
- country: true,
19
- email: true,
20
- message: true,
21
- number: true,
22
- payment: false,
23
- select: true,
24
- state: true,
25
- text: true,
26
- textarea: true,
27
- ...incomingFormConfig.fields,
28
- },
29
- }
30
-
31
- return {
32
- ...config,
33
- // admin: {
34
- // ...config.admin,
35
- // webpack: (webpackConfig) => ({
36
- // ...webpackConfig,
37
- // resolve: {
38
- // ...webpackConfig.resolve,
39
- // alias: {
40
- // ...webpackConfig.resolve.alias,
41
- // [path.resolve(__dirname, 'collections/FormSubmissions/hooks/sendEmail.ts')]: path.resolve(__dirname, 'mocks/serverModule.js'),
42
- // [path.resolve(__dirname, 'collections/FormSubmissions/hooks/createCharge.ts')]: path.resolve(__dirname, 'mocks/serverModule.js'),
43
- // },
44
- // },
45
- // })
46
- // },
47
- collections: [
48
- ...(config?.collections || []),
49
- generateFormCollection(formConfig),
50
- generateSubmissionCollection(formConfig),
51
- ],
52
- }
53
- }
54
-
55
- export default FormBuilder
package/types.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types'
package/types.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('./dist/types')