@payloadcms/plugin-form-builder 3.0.0-beta.22 → 3.0.0-beta.24

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/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { generateSubmissionCollection } from './collections/FormSubmissions/inde
2
2
  import { generateFormCollection } from './collections/Forms/index.js';
3
3
  export { fields } from './collections/Forms/fields.js';
4
4
  export { getPaymentTotal } from './utilities/getPaymentTotal.js';
5
- const FormBuilder = (incomingFormConfig)=>(config)=>{
5
+ export const formBuilderPlugin = (incomingFormConfig)=>(config)=>{
6
6
  const formConfig = {
7
7
  ...incomingFormConfig,
8
8
  fields: {
@@ -42,6 +42,5 @@ const FormBuilder = (incomingFormConfig)=>(config)=>{
42
42
  ]
43
43
  };
44
44
  };
45
- export default FormBuilder;
46
45
 
47
46
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload/config'\n\nimport type { PluginConfig } from './types.js'\n\nimport { generateSubmissionCollection } from './collections/FormSubmissions/index.js'\nimport { generateFormCollection } from './collections/Forms/index.js'\n\nexport { fields } from './collections/Forms/fields.js'\nexport { getPaymentTotal } from './utilities/getPaymentTotal.js'\n\nconst FormBuilder =\n (incomingFormConfig: PluginConfig) =>\n (config: Config): Config => {\n const formConfig: PluginConfig = {\n ...incomingFormConfig,\n fields: {\n checkbox: true,\n country: true,\n email: true,\n message: true,\n number: true,\n payment: false,\n select: true,\n state: true,\n text: true,\n textarea: true,\n ...incomingFormConfig.fields,\n },\n }\n\n return {\n ...config,\n // admin: {\n // ...config.admin,\n // webpack: (webpackConfig) => ({\n // ...webpackConfig,\n // resolve: {\n // ...webpackConfig.resolve,\n // alias: {\n // ...webpackConfig.resolve.alias,\n // [path.resolve(__dirname, 'collections/FormSubmissions/hooks/sendEmail.ts')]: path.resolve(__dirname, 'mocks/serverModule.js'),\n // [path.resolve(__dirname, 'collections/FormSubmissions/hooks/createCharge.ts')]: path.resolve(__dirname, 'mocks/serverModule.js'),\n // },\n // },\n // })\n // },\n collections: [\n ...(config?.collections || []),\n generateFormCollection(formConfig),\n generateSubmissionCollection(formConfig),\n ],\n }\n }\n\nexport default FormBuilder\n"],"names":["generateSubmissionCollection","generateFormCollection","fields","getPaymentTotal","FormBuilder","incomingFormConfig","config","formConfig","checkbox","country","email","message","number","payment","select","state","text","textarea","collections"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,4BAA4B,QAAQ,yCAAwC;AACrF,SAASC,sBAAsB,QAAQ,+BAA8B;AAErE,SAASC,MAAM,QAAQ,gCAA+B;AACtD,SAASC,eAAe,QAAQ,iCAAgC;AAEhE,MAAMC,cACJ,CAACC,qBACD,CAACC;QACC,MAAMC,aAA2B;YAC/B,GAAGF,kBAAkB;YACrBH,QAAQ;gBACNM,UAAU;gBACVC,SAAS;gBACTC,OAAO;gBACPC,SAAS;gBACTC,QAAQ;gBACRC,SAAS;gBACTC,QAAQ;gBACRC,OAAO;gBACPC,MAAM;gBACNC,UAAU;gBACV,GAAGZ,mBAAmBH,MAAM;YAC9B;QACF;QAEA,OAAO;YACL,GAAGI,MAAM;YACT,WAAW;YACX,qBAAqB;YACrB,mCAAmC;YACnC,wBAAwB;YACxB,iBAAiB;YACjB,kCAAkC;YAClC,iBAAiB;YACjB,0CAA0C;YAC1C,yIAAyI;YACzI,4IAA4I;YAC5I,WAAW;YACX,SAAS;YACT,OAAO;YACP,KAAK;YACLY,aAAa;mBACPZ,QAAQY,eAAe,EAAE;gBAC7BjB,uBAAuBM;gBACvBP,6BAA6BO;aAC9B;QACH;IACF;AAEF,eAAeH,YAAW"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload/config'\n\nimport type { PluginConfig } from './types.js'\n\nimport { generateSubmissionCollection } from './collections/FormSubmissions/index.js'\nimport { generateFormCollection } from './collections/Forms/index.js'\n\nexport { fields } from './collections/Forms/fields.js'\nexport { getPaymentTotal } from './utilities/getPaymentTotal.js'\n\nexport const formBuilderPlugin =\n (incomingFormConfig: PluginConfig) =>\n (config: Config): Config => {\n const formConfig: PluginConfig = {\n ...incomingFormConfig,\n fields: {\n checkbox: true,\n country: true,\n email: true,\n message: true,\n number: true,\n payment: false,\n select: true,\n state: true,\n text: true,\n textarea: true,\n ...incomingFormConfig.fields,\n },\n }\n\n return {\n ...config,\n // admin: {\n // ...config.admin,\n // webpack: (webpackConfig) => ({\n // ...webpackConfig,\n // resolve: {\n // ...webpackConfig.resolve,\n // alias: {\n // ...webpackConfig.resolve.alias,\n // [path.resolve(__dirname, 'collections/FormSubmissions/hooks/sendEmail.ts')]: path.resolve(__dirname, 'mocks/serverModule.js'),\n // [path.resolve(__dirname, 'collections/FormSubmissions/hooks/createCharge.ts')]: path.resolve(__dirname, 'mocks/serverModule.js'),\n // },\n // },\n // })\n // },\n collections: [\n ...(config?.collections || []),\n generateFormCollection(formConfig),\n generateSubmissionCollection(formConfig),\n ],\n }\n }\n"],"names":["generateSubmissionCollection","generateFormCollection","fields","getPaymentTotal","formBuilderPlugin","incomingFormConfig","config","formConfig","checkbox","country","email","message","number","payment","select","state","text","textarea","collections"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,4BAA4B,QAAQ,yCAAwC;AACrF,SAASC,sBAAsB,QAAQ,+BAA8B;AAErE,SAASC,MAAM,QAAQ,gCAA+B;AACtD,SAASC,eAAe,QAAQ,iCAAgC;AAEhE,OAAO,MAAMC,oBACX,CAACC,qBACD,CAACC;QACC,MAAMC,aAA2B;YAC/B,GAAGF,kBAAkB;YACrBH,QAAQ;gBACNM,UAAU;gBACVC,SAAS;gBACTC,OAAO;gBACPC,SAAS;gBACTC,QAAQ;gBACRC,SAAS;gBACTC,QAAQ;gBACRC,OAAO;gBACPC,MAAM;gBACNC,UAAU;gBACV,GAAGZ,mBAAmBH,MAAM;YAC9B;QACF;QAEA,OAAO;YACL,GAAGI,MAAM;YACT,WAAW;YACX,qBAAqB;YACrB,mCAAmC;YACnC,wBAAwB;YACxB,iBAAiB;YACjB,kCAAkC;YAClC,iBAAiB;YACjB,0CAA0C;YAC1C,yIAAyI;YACzI,4IAA4I;YAC5I,WAAW;YACX,SAAS;YACT,OAAO;YACP,KAAK;YACLY,aAAa;mBACPZ,QAAQY,eAAe,EAAE;gBAC7BjB,uBAAuBM;gBACvBP,6BAA6BO;aAC9B;QACH;IACF,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-form-builder",
3
- "version": "3.0.0-beta.22",
3
+ "version": "3.0.0-beta.24",
4
4
  "description": "Form builder plugin for Payload CMS",
5
5
  "keywords": [
6
6
  "payload",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "deepmerge": "^4.2.2",
40
40
  "escape-html": "^1.0.3",
41
- "@payloadcms/ui": "3.0.0-beta.22"
41
+ "@payloadcms/ui": "3.0.0-beta.24"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/escape-html": "^1.0.4",
@@ -48,12 +48,12 @@
48
48
  "cross-env": "^7.0.3",
49
49
  "nodemon": "3.0.3",
50
50
  "ts-node": "10.9.1",
51
- "@payloadcms/eslint-config": "1.1.1",
52
- "payload": "3.0.0-beta.22"
51
+ "payload": "3.0.0-beta.24",
52
+ "@payloadcms/eslint-config": "1.1.1"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
56
- "payload": "3.0.0-beta.22"
56
+ "payload": "3.0.0-beta.24"
57
57
  },
58
58
  "homepage:": "https://payloadcms.com",
59
59
  "scripts": {