@mobilizehub/payload-plugin 0.5.0 → 0.5.2
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/collections/form-submissions/generateFormSubmissionsCollection.js +1 -1
- package/dist/collections/form-submissions/generateFormSubmissionsCollection.js.map +1 -1
- package/dist/collections/forms/generateFormsCollection.js +1 -1
- package/dist/collections/forms/generateFormsCollection.js.map +1 -1
- package/dist/collections/pages/generatePagesCollection.js +2 -2
- package/dist/collections/pages/generatePagesCollection.js.map +1 -1
- package/dist/fields/contact-fields.js +18 -6
- package/dist/fields/contact-fields.js.map +1 -1
- package/package.json +8 -8
|
@@ -35,7 +35,7 @@ export const generateFormSubmissionsCollection = (formSubmissionsConfig)=>{
|
|
|
35
35
|
}
|
|
36
36
|
];
|
|
37
37
|
const config = {
|
|
38
|
-
...formSubmissionsConfig.formSubmissionsOverrides
|
|
38
|
+
...formSubmissionsConfig.formSubmissionsOverrides || {},
|
|
39
39
|
slug: formSubmissionsConfig.formSubmissionsOverrides?.slug || 'formSubmissions',
|
|
40
40
|
access: {
|
|
41
41
|
create: ()=>false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/form-submissions/generateFormSubmissionsCollection.ts"],"sourcesContent":["import type { CollectionConfig, Field } from 'payload'\n\nimport type { MobilizehubPluginConfig } from '../../types/index.js'\n\nimport { authenticated } from '../../access/authenticated.js'\n\nexport const generateFormSubmissionsCollection = (\n formSubmissionsConfig: MobilizehubPluginConfig,\n) => {\n const defaultFields: Field[] = [\n {\n name: 'form',\n type: 'relationship',\n admin: {\n position: 'sidebar',\n readOnly: true,\n },\n relationTo: 'forms',\n required: true,\n },\n {\n name: 'contact',\n type: 'relationship',\n admin: {\n position: 'sidebar',\n readOnly: true,\n },\n relationTo: 'contacts',\n },\n {\n name: 'createdAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n readOnly: true,\n },\n },\n {\n name: 'data',\n type: 'json',\n label: 'Data',\n },\n ]\n\n const config: CollectionConfig = {\n ...(formSubmissionsConfig.formSubmissionsOverrides
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/form-submissions/generateFormSubmissionsCollection.ts"],"sourcesContent":["import type { CollectionConfig, Field } from 'payload'\n\nimport type { MobilizehubPluginConfig } from '../../types/index.js'\n\nimport { authenticated } from '../../access/authenticated.js'\n\nexport const generateFormSubmissionsCollection = (\n formSubmissionsConfig: MobilizehubPluginConfig,\n) => {\n const defaultFields: Field[] = [\n {\n name: 'form',\n type: 'relationship',\n admin: {\n position: 'sidebar',\n readOnly: true,\n },\n relationTo: 'forms',\n required: true,\n },\n {\n name: 'contact',\n type: 'relationship',\n admin: {\n position: 'sidebar',\n readOnly: true,\n },\n relationTo: 'contacts',\n },\n {\n name: 'createdAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n readOnly: true,\n },\n },\n {\n name: 'data',\n type: 'json',\n label: 'Data',\n },\n ]\n\n const config: CollectionConfig = {\n ...(formSubmissionsConfig.formSubmissionsOverrides || {}),\n slug: formSubmissionsConfig.formSubmissionsOverrides?.slug || 'formSubmissions',\n access: {\n create: () => false,\n read: authenticated,\n update: () => false,\n ...(formSubmissionsConfig.formSubmissionsOverrides?.access || {}),\n },\n admin: {\n ...(formSubmissionsConfig.formSubmissionsOverrides?.admin || {}),\n hidden: formSubmissionsConfig.formSubmissionsOverrides?.admin?.hidden || true,\n },\n fields: formSubmissionsConfig.formSubmissionsOverrides?.fields\n ? formSubmissionsConfig.formSubmissionsOverrides.fields({ defaultFields })\n : defaultFields,\n hooks: {\n ...(formSubmissionsConfig.formSubmissionsOverrides?.hooks || {}),\n afterChange: [...(formSubmissionsConfig.formSubmissionsOverrides?.hooks?.afterChange || [])],\n },\n }\n\n return config\n}\n"],"names":["authenticated","generateFormSubmissionsCollection","formSubmissionsConfig","defaultFields","name","type","admin","position","readOnly","relationTo","required","label","config","formSubmissionsOverrides","slug","access","create","read","update","hidden","fields","hooks","afterChange"],"mappings":"AAIA,SAASA,aAAa,QAAQ,gCAA+B;AAE7D,OAAO,MAAMC,oCAAoC,CAC/CC;IAEA,MAAMC,gBAAyB;QAC7B;YACEC,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,UAAU;gBACVC,UAAU;YACZ;YACAC,YAAY;YACZC,UAAU;QACZ;QACA;YACEN,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,UAAU;gBACVC,UAAU;YACZ;YACAC,YAAY;QACd;QACA;YACEL,MAAM;YACNC,MAAM;YACNC,OAAO;gBACLC,UAAU;gBACVC,UAAU;YACZ;QACF;QACA;YACEJ,MAAM;YACNC,MAAM;YACNM,OAAO;QACT;KACD;IAED,MAAMC,SAA2B;QAC/B,GAAIV,sBAAsBW,wBAAwB,IAAI,CAAC,CAAC;QACxDC,MAAMZ,sBAAsBW,wBAAwB,EAAEC,QAAQ;QAC9DC,QAAQ;YACNC,QAAQ,IAAM;YACdC,MAAMjB;YACNkB,QAAQ,IAAM;YACd,GAAIhB,sBAAsBW,wBAAwB,EAAEE,UAAU,CAAC,CAAC;QAClE;QACAT,OAAO;YACL,GAAIJ,sBAAsBW,wBAAwB,EAAEP,SAAS,CAAC,CAAC;YAC/Da,QAAQjB,sBAAsBW,wBAAwB,EAAEP,OAAOa,UAAU;QAC3E;QACAC,QAAQlB,sBAAsBW,wBAAwB,EAAEO,SACpDlB,sBAAsBW,wBAAwB,CAACO,MAAM,CAAC;YAAEjB;QAAc,KACtEA;QACJkB,OAAO;YACL,GAAInB,sBAAsBW,wBAAwB,EAAEQ,SAAS,CAAC,CAAC;YAC/DC,aAAa;mBAAKpB,sBAAsBW,wBAAwB,EAAEQ,OAAOC,eAAe,EAAE;aAAE;QAC9F;IACF;IAEA,OAAOV;AACT,EAAC"}
|
|
@@ -196,7 +196,7 @@ export const generateFormsCollection = (formsConfig)=>{
|
|
|
196
196
|
}
|
|
197
197
|
];
|
|
198
198
|
const config = {
|
|
199
|
-
...formsConfig.formsOverrides
|
|
199
|
+
...formsConfig.formsOverrides || {},
|
|
200
200
|
slug: formsConfig.formsOverrides?.slug || 'forms',
|
|
201
201
|
access: {
|
|
202
202
|
read: ()=>true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/forms/generateFormsCollection.ts"],"sourcesContent":["import type { CollectionConfig, Field } from 'payload'\n\nimport type { MobilizehubPluginConfig } from '../../types/index.js'\n\nimport { createContactFieldsConfig } from '../../fields/contact-fields.js'\nimport { createNameField } from '../../fields/name.js'\nimport { createPublishedAtField } from '../../fields/publishedAt.js'\nimport { createSlugField } from '../../fields/slug.js'\nimport { createStatusField } from '../../fields/status.js'\n\nexport const generateFormsCollection = (formsConfig: MobilizehubPluginConfig) => {\n const defaultFields: Field[] = [\n createStatusField(),\n {\n type: 'tabs',\n tabs: [\n {\n fields: [createNameField(), createSlugField(), createPublishedAtField()],\n label: 'Settings',\n },\n {\n fields: [\n {\n name: 'headline',\n type: 'text',\n label: 'Headline',\n },\n {\n name: 'content',\n type: 'richText',\n label: 'Content',\n },\n ],\n label: 'Content',\n },\n {\n fields: [\n {\n name: 'legend',\n type: 'text',\n localized: true,\n },\n createContactFieldsConfig(),\n {\n name: 'submitButtonLabel',\n type: 'text',\n localized: true,\n },\n {\n name: 'confirmationType',\n type: 'radio',\n admin: {\n description:\n 'Choose whether to display an on-page message or redirect to a different page after they submit the form.',\n layout: 'horizontal',\n },\n defaultValue: 'message',\n options: [\n {\n label: 'Message',\n value: 'message',\n },\n {\n label: 'Redirect',\n value: 'redirect',\n },\n ],\n },\n {\n name: 'confirmationMessage',\n type: 'richText',\n admin: {\n condition: (_, siblingData) => siblingData?.confirmationType === 'message',\n },\n localized: true,\n },\n {\n name: 'type',\n type: 'radio',\n admin: {\n condition: (_, siblingData) => siblingData?.confirmationType === 'redirect',\n layout: 'horizontal',\n },\n defaultValue: 'reference',\n options: [\n {\n label: 'Internal link',\n value: 'reference',\n },\n {\n label: 'Custom URL',\n value: 'custom',\n },\n ],\n },\n {\n name: 'reference',\n type: 'relationship',\n admin: {\n condition: (_, siblingData) =>\n siblingData?.confirmationType === 'redirect' && siblingData?.type === 'reference',\n },\n label: 'Document to link to',\n maxDepth: 2,\n relationTo: ['pages', 'forms'],\n required: true,\n },\n {\n name: 'url',\n type: 'text',\n admin: {\n condition: (_, siblingData) =>\n siblingData?.confirmationType === 'redirect' && siblingData?.type === 'custom',\n },\n label: 'URL to redirect to',\n required: true,\n },\n {\n name: 'tags',\n type: 'relationship',\n admin: {\n description: 'Tag all contacts submitted via this form with these tags.',\n },\n hasMany: true,\n relationTo: 'tags',\n },\n {\n name: 'autoresponse',\n type: 'group',\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n style: {\n marginTop: '1.5rem',\n },\n },\n defaultValue: false,\n label: 'Automatically send an autoresponse email to the submitter',\n },\n {\n name: 'fromName',\n type: 'text',\n defaultValue: ({ req }) => formsConfig.email(req).defaultFromName || '',\n label: 'Name',\n required: true,\n },\n {\n name: 'fromAddress',\n type: 'text',\n admin: {\n description: 'The from address is set in the email configuration.',\n readOnly: true,\n },\n defaultValue: ({ req }) => formsConfig.email(req).defaultFromAddress || '',\n label: 'Address',\n required: true,\n },\n {\n name: 'replyTo',\n type: 'text',\n localized: true,\n },\n {\n name: 'subject',\n type: 'text',\n localized: true,\n },\n {\n name: 'previewText',\n type: 'text',\n localized: true,\n },\n {\n name: 'content',\n type: 'richText',\n localized: true,\n },\n ],\n },\n ],\n label: 'Form',\n },\n {\n fields: [\n {\n name: 'formSubmissions',\n type: 'join',\n collection: 'formSubmissions',\n on: 'form',\n },\n ],\n label: 'Submissions',\n },\n ],\n },\n ]\n\n const config: CollectionConfig = {\n ...(formsConfig.formsOverrides = {}),\n slug: formsConfig.formsOverrides?.slug || 'forms',\n access: {\n read: () => true,\n ...(formsConfig.formsOverrides?.access || {}),\n },\n admin: {\n ...(formsConfig.formsOverrides?.admin || {}),\n defaultColumns: formsConfig.formsOverrides?.admin?.defaultColumns || [\n 'id',\n 'name',\n 'slug',\n 'status',\n ],\n hidden: formsConfig.formsOverrides?.admin?.hidden || false,\n useAsTitle: formsConfig.formsOverrides?.admin?.useAsTitle || 'name',\n },\n fields: formsConfig.formsOverrides?.fields\n ? formsConfig.formsOverrides.fields({ defaultFields })\n : defaultFields,\n hooks: {\n ...(formsConfig.formsOverrides?.hooks || {}),\n },\n }\n\n return config\n}\n"],"names":["createContactFieldsConfig","createNameField","createPublishedAtField","createSlugField","createStatusField","generateFormsCollection","formsConfig","defaultFields","type","tabs","fields","label","name","localized","admin","description","layout","defaultValue","options","value","condition","_","siblingData","confirmationType","maxDepth","relationTo","required","hasMany","style","marginTop","req","email","defaultFromName","readOnly","defaultFromAddress","collection","on","config","formsOverrides","slug","access","read","defaultColumns","hidden","useAsTitle","hooks"],"mappings":"AAIA,SAASA,yBAAyB,QAAQ,iCAAgC;AAC1E,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SAASC,sBAAsB,QAAQ,8BAA6B;AACpE,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SAASC,iBAAiB,QAAQ,yBAAwB;AAE1D,OAAO,MAAMC,0BAA0B,CAACC;IACtC,MAAMC,gBAAyB;QAC7BH;QACA;YACEI,MAAM;YACNC,MAAM;gBACJ;oBACEC,QAAQ;wBAACT;wBAAmBE;wBAAmBD;qBAAyB;oBACxES,OAAO;gBACT;gBACA;oBACED,QAAQ;wBACN;4BACEE,MAAM;4BACNJ,MAAM;4BACNG,OAAO;wBACT;wBACA;4BACEC,MAAM;4BACNJ,MAAM;4BACNG,OAAO;wBACT;qBACD;oBACDA,OAAO;gBACT;gBACA;oBACED,QAAQ;wBACN;4BACEE,MAAM;4BACNJ,MAAM;4BACNK,WAAW;wBACb;wBACAb;wBACA;4BACEY,MAAM;4BACNJ,MAAM;4BACNK,WAAW;wBACb;wBACA;4BACED,MAAM;4BACNJ,MAAM;4BACNM,OAAO;gCACLC,aACE;gCACFC,QAAQ;4BACV;4BACAC,cAAc;4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C;QAC7C;IACF;IAEA,OAAOR;AACT,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/forms/generateFormsCollection.ts"],"sourcesContent":["import type { CollectionConfig, Field } from 'payload'\n\nimport type { MobilizehubPluginConfig } from '../../types/index.js'\n\nimport { createContactFieldsConfig } from '../../fields/contact-fields.js'\nimport { createNameField } from '../../fields/name.js'\nimport { createPublishedAtField } from '../../fields/publishedAt.js'\nimport { createSlugField } from '../../fields/slug.js'\nimport { createStatusField } from '../../fields/status.js'\n\nexport const generateFormsCollection = (formsConfig: MobilizehubPluginConfig) => {\n const defaultFields: Field[] = [\n createStatusField(),\n {\n type: 'tabs',\n tabs: [\n {\n fields: [createNameField(), createSlugField(), createPublishedAtField()],\n label: 'Settings',\n },\n {\n fields: [\n {\n name: 'headline',\n type: 'text',\n label: 'Headline',\n },\n {\n name: 'content',\n type: 'richText',\n label: 'Content',\n },\n ],\n label: 'Content',\n },\n {\n fields: [\n {\n name: 'legend',\n type: 'text',\n localized: true,\n },\n createContactFieldsConfig(),\n {\n name: 'submitButtonLabel',\n type: 'text',\n localized: true,\n },\n {\n name: 'confirmationType',\n type: 'radio',\n admin: {\n description:\n 'Choose whether to display an on-page message or redirect to a different page after they submit the form.',\n layout: 'horizontal',\n },\n defaultValue: 'message',\n options: [\n {\n label: 'Message',\n value: 'message',\n },\n {\n label: 'Redirect',\n value: 'redirect',\n },\n ],\n },\n {\n name: 'confirmationMessage',\n type: 'richText',\n admin: {\n condition: (_, siblingData) => siblingData?.confirmationType === 'message',\n },\n localized: true,\n },\n {\n name: 'type',\n type: 'radio',\n admin: {\n condition: (_, siblingData) => siblingData?.confirmationType === 'redirect',\n layout: 'horizontal',\n },\n defaultValue: 'reference',\n options: [\n {\n label: 'Internal link',\n value: 'reference',\n },\n {\n label: 'Custom URL',\n value: 'custom',\n },\n ],\n },\n {\n name: 'reference',\n type: 'relationship',\n admin: {\n condition: (_, siblingData) =>\n siblingData?.confirmationType === 'redirect' && siblingData?.type === 'reference',\n },\n label: 'Document to link to',\n maxDepth: 2,\n relationTo: ['pages', 'forms'],\n required: true,\n },\n {\n name: 'url',\n type: 'text',\n admin: {\n condition: (_, siblingData) =>\n siblingData?.confirmationType === 'redirect' && siblingData?.type === 'custom',\n },\n label: 'URL to redirect to',\n required: true,\n },\n {\n name: 'tags',\n type: 'relationship',\n admin: {\n description: 'Tag all contacts submitted via this form with these tags.',\n },\n hasMany: true,\n relationTo: 'tags',\n },\n {\n name: 'autoresponse',\n type: 'group',\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n style: {\n marginTop: '1.5rem',\n },\n },\n defaultValue: false,\n label: 'Automatically send an autoresponse email to the submitter',\n },\n {\n name: 'fromName',\n type: 'text',\n defaultValue: ({ req }) => formsConfig.email(req).defaultFromName || '',\n label: 'Name',\n required: true,\n },\n {\n name: 'fromAddress',\n type: 'text',\n admin: {\n description: 'The from address is set in the email configuration.',\n readOnly: true,\n },\n defaultValue: ({ req }) => formsConfig.email(req).defaultFromAddress || '',\n label: 'Address',\n required: true,\n },\n {\n name: 'replyTo',\n type: 'text',\n localized: true,\n },\n {\n name: 'subject',\n type: 'text',\n localized: true,\n },\n {\n name: 'previewText',\n type: 'text',\n localized: true,\n },\n {\n name: 'content',\n type: 'richText',\n localized: true,\n },\n ],\n },\n ],\n label: 'Form',\n },\n {\n fields: [\n {\n name: 'formSubmissions',\n type: 'join',\n collection: 'formSubmissions',\n on: 'form',\n },\n ],\n label: 'Submissions',\n },\n ],\n },\n ]\n\n const config: CollectionConfig = {\n ...(formsConfig.formsOverrides || {}),\n slug: formsConfig.formsOverrides?.slug || 'forms',\n access: {\n read: () => true,\n ...(formsConfig.formsOverrides?.access || {}),\n },\n admin: {\n ...(formsConfig.formsOverrides?.admin || {}),\n defaultColumns: formsConfig.formsOverrides?.admin?.defaultColumns || [\n 'id',\n 'name',\n 'slug',\n 'status',\n ],\n hidden: formsConfig.formsOverrides?.admin?.hidden || false,\n useAsTitle: formsConfig.formsOverrides?.admin?.useAsTitle || 'name',\n },\n fields: formsConfig.formsOverrides?.fields\n ? formsConfig.formsOverrides.fields({ defaultFields })\n : defaultFields,\n hooks: {\n ...(formsConfig.formsOverrides?.hooks || {}),\n },\n }\n\n return config\n}\n"],"names":["createContactFieldsConfig","createNameField","createPublishedAtField","createSlugField","createStatusField","generateFormsCollection","formsConfig","defaultFields","type","tabs","fields","label","name","localized","admin","description","layout","defaultValue","options","value","condition","_","siblingData","confirmationType","maxDepth","relationTo","required","hasMany","style","marginTop","req","email","defaultFromName","readOnly","defaultFromAddress","collection","on","config","formsOverrides","slug","access","read","defaultColumns","hidden","useAsTitle","hooks"],"mappings":"AAIA,SAASA,yBAAyB,QAAQ,iCAAgC;AAC1E,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SAASC,sBAAsB,QAAQ,8BAA6B;AACpE,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SAASC,iBAAiB,QAAQ,yBAAwB;AAE1D,OAAO,MAAMC,0BAA0B,CAACC;IACtC,MAAMC,gBAAyB;QAC7BH;QACA;YACEI,MAAM;YACNC,MAAM;gBACJ;oBACEC,QAAQ;wBAACT;wBAAmBE;wBAAmBD;qBAAyB;oBACxES,OAAO;gBACT;gBACA;oBACED,QAAQ;wBACN;4BACEE,MAAM;4BACNJ,MAAM;4BACNG,OAAO;wBACT;wBACA;4BACEC,MAAM;4BACNJ,MAAM;4BACNG,OAAO;wBACT;qBACD;oBACDA,OAAO;gBACT;gBACA;oBACED,QAAQ;wBACN;4BACEE,MAAM;4BACNJ,MAAM;4BACNK,WAAW;wBACb;wBACAb;wBACA;4BACEY,MAAM;4BACNJ,MAAM;4BACNK,WAAW;wBACb;wBACA;4BACED,MAAM;4BACNJ,MAAM;4BACNM,OAAO;gCACLC,aACE;gCACFC,QAAQ;4BACV;4BACAC,cAAc;4BACdC,SAAS;gCACP;oCACEP,OAAO;oCACPQ,OAAO;gCACT;gCACA;oCACER,OAAO;oCACPQ,OAAO;gCACT;6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
|
|
|
47
47
|
}
|
|
48
48
|
];
|
|
49
49
|
const config = {
|
|
50
|
+
...pagesConfig.pagesOverrides || {},
|
|
50
51
|
slug: pagesConfig.pagesOverrides?.slug || 'pages',
|
|
51
52
|
access: {
|
|
52
53
|
read: ()=>true,
|
|
@@ -68,8 +69,7 @@ export const generatePagesCollection = (pagesConfig)=>{
|
|
|
68
69
|
}) : defaultFields,
|
|
69
70
|
hooks: {
|
|
70
71
|
...pagesConfig.pagesOverrides?.hooks || {}
|
|
71
|
-
}
|
|
72
|
-
...pagesConfig.pagesOverrides = {}
|
|
72
|
+
}
|
|
73
73
|
};
|
|
74
74
|
return config;
|
|
75
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/collections/pages/generatePagesCollection.ts"],"sourcesContent":["import type { Block, CollectionConfig, Field } from 'payload'\n\nimport type { MobilizehubPluginConfig } from '../../types/index.js'\n\nimport { createNameField } from '../../fields/name.js'\nimport { createPublishedAtField } from '../../fields/publishedAt.js'\nimport { createSlugField } from '../../fields/slug.js'\nimport { createStatusField } from '../../fields/status.js'\n\nexport const generatePagesCollection = (pagesConfig: MobilizehubPluginConfig) => {\n const defaultBlocks: Block[] = [\n {\n slug: 'content',\n fields: [\n {\n name: 'richText',\n type: 'richText',\n label: false,\n },\n ],\n interfaceName: 'ContentBlock',\n },\n ]\n\n const blocks = pagesConfig.pagesOverrides?.blocks\n ? pagesConfig.pagesOverrides.blocks({ defaultBlocks })\n : defaultBlocks\n\n const defaultFields: Field[] = [\n createStatusField(),\n {\n type: 'tabs',\n tabs: [\n {\n fields: [createNameField(), createSlugField(), createPublishedAtField()],\n label: 'Settings',\n },\n {\n fields: [\n {\n name: 'blocks',\n type: 'blocks',\n blocks,\n label: 'Blocks',\n },\n ],\n label: 'Content',\n },\n ],\n },\n ]\n\n const config: CollectionConfig = {\n slug: pagesConfig.pagesOverrides?.slug || 'pages',\n access: {\n read: () => true,\n ...(pagesConfig.pagesOverrides?.access || {}),\n },\n admin: {\n ...(pagesConfig.pagesOverrides?.admin || {}),\n defaultColumns: pagesConfig.pagesOverrides?.admin?.defaultColumns || [\n 'id',\n 'name',\n 'slug',\n 'status',\n ],\n hidden: pagesConfig.pagesOverrides?.admin?.hidden || false,\n useAsTitle: pagesConfig.pagesOverrides?.admin?.useAsTitle || 'name',\n },\n fields: pagesConfig.pagesOverrides?.fields\n ? pagesConfig.pagesOverrides.fields({ defaultFields })\n : defaultFields,\n hooks: {\n ...(pagesConfig.pagesOverrides?.hooks || {}),\n },\n
|
|
1
|
+
{"version":3,"sources":["../../../src/collections/pages/generatePagesCollection.ts"],"sourcesContent":["import type { Block, CollectionConfig, Field } from 'payload'\n\nimport type { MobilizehubPluginConfig } from '../../types/index.js'\n\nimport { createNameField } from '../../fields/name.js'\nimport { createPublishedAtField } from '../../fields/publishedAt.js'\nimport { createSlugField } from '../../fields/slug.js'\nimport { createStatusField } from '../../fields/status.js'\n\nexport const generatePagesCollection = (pagesConfig: MobilizehubPluginConfig) => {\n const defaultBlocks: Block[] = [\n {\n slug: 'content',\n fields: [\n {\n name: 'richText',\n type: 'richText',\n label: false,\n },\n ],\n interfaceName: 'ContentBlock',\n },\n ]\n\n const blocks = pagesConfig.pagesOverrides?.blocks\n ? pagesConfig.pagesOverrides.blocks({ defaultBlocks })\n : defaultBlocks\n\n const defaultFields: Field[] = [\n createStatusField(),\n {\n type: 'tabs',\n tabs: [\n {\n fields: [createNameField(), createSlugField(), createPublishedAtField()],\n label: 'Settings',\n },\n {\n fields: [\n {\n name: 'blocks',\n type: 'blocks',\n blocks,\n label: 'Blocks',\n },\n ],\n label: 'Content',\n },\n ],\n },\n ]\n\n const config: CollectionConfig = {\n ...(pagesConfig.pagesOverrides || {}),\n slug: pagesConfig.pagesOverrides?.slug || 'pages',\n access: {\n read: () => true,\n ...(pagesConfig.pagesOverrides?.access || {}),\n },\n admin: {\n ...(pagesConfig.pagesOverrides?.admin || {}),\n defaultColumns: pagesConfig.pagesOverrides?.admin?.defaultColumns || [\n 'id',\n 'name',\n 'slug',\n 'status',\n ],\n hidden: pagesConfig.pagesOverrides?.admin?.hidden || false,\n useAsTitle: pagesConfig.pagesOverrides?.admin?.useAsTitle || 'name',\n },\n fields: pagesConfig.pagesOverrides?.fields\n ? pagesConfig.pagesOverrides.fields({ defaultFields })\n : defaultFields,\n hooks: {\n ...(pagesConfig.pagesOverrides?.hooks || {}),\n },\n }\n\n return config\n}\n"],"names":["createNameField","createPublishedAtField","createSlugField","createStatusField","generatePagesCollection","pagesConfig","defaultBlocks","slug","fields","name","type","label","interfaceName","blocks","pagesOverrides","defaultFields","tabs","config","access","read","admin","defaultColumns","hidden","useAsTitle","hooks"],"mappings":"AAIA,SAASA,eAAe,QAAQ,uBAAsB;AACtD,SAASC,sBAAsB,QAAQ,8BAA6B;AACpE,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SAASC,iBAAiB,QAAQ,yBAAwB;AAE1D,OAAO,MAAMC,0BAA0B,CAACC;IACtC,MAAMC,gBAAyB;QAC7B;YACEC,MAAM;YACNC,QAAQ;gBACN;oBACEC,MAAM;oBACNC,MAAM;oBACNC,OAAO;gBACT;aACD;YACDC,eAAe;QACjB;KACD;IAED,MAAMC,SAASR,YAAYS,cAAc,EAAED,SACvCR,YAAYS,cAAc,CAACD,MAAM,CAAC;QAAEP;IAAc,KAClDA;IAEJ,MAAMS,gBAAyB;QAC7BZ;QACA;YACEO,MAAM;YACNM,MAAM;gBACJ;oBACER,QAAQ;wBAACR;wBAAmBE;wBAAmBD;qBAAyB;oBACxEU,OAAO;gBACT;gBACA;oBACEH,QAAQ;wBACN;4BACEC,MAAM;4BACNC,MAAM;4BACNG;4BACAF,OAAO;wBACT;qBACD;oBACDA,OAAO;gBACT;aACD;QACH;KACD;IAED,MAAMM,SAA2B;QAC/B,GAAIZ,YAAYS,cAAc,IAAI,CAAC,CAAC;QACpCP,MAAMF,YAAYS,cAAc,EAAEP,QAAQ;QAC1CW,QAAQ;YACNC,MAAM,IAAM;YACZ,GAAId,YAAYS,cAAc,EAAEI,UAAU,CAAC,CAAC;QAC9C;QACAE,OAAO;YACL,GAAIf,YAAYS,cAAc,EAAEM,SAAS,CAAC,CAAC;YAC3CC,gBAAgBhB,YAAYS,cAAc,EAAEM,OAAOC,kBAAkB;gBACnE;gBACA;gBACA;gBACA;aACD;YACDC,QAAQjB,YAAYS,cAAc,EAAEM,OAAOE,UAAU;YACrDC,YAAYlB,YAAYS,cAAc,EAAEM,OAAOG,cAAc;QAC/D;QACAf,QAAQH,YAAYS,cAAc,EAAEN,SAChCH,YAAYS,cAAc,CAACN,MAAM,CAAC;YAAEO;QAAc,KAClDA;QACJS,OAAO;YACL,GAAInB,YAAYS,cAAc,EAAEU,SAAS,CAAC,CAAC;QAC7C;IACF;IAEA,OAAOP;AACT,EAAC"}
|
|
@@ -104,17 +104,29 @@
|
|
|
104
104
|
}
|
|
105
105
|
],
|
|
106
106
|
filterOptions: ({ siblingData })=>{
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const usedSlugs = blocks?.map((block)=>block.blockType) || [];
|
|
112
|
-
return CONTACT_FIELD_DEFINITIONS.map((def)=>def.name).filter((slug)=>!usedSlugs.includes(slug));
|
|
107
|
+
const allFieldNames = CONTACT_FIELD_DEFINITIONS.map((def)=>def.name);
|
|
108
|
+
const existingBlocks = siblingData?.contactFields ?? [];
|
|
109
|
+
const usedFieldNames = new Set(existingBlocks.map((block)=>block.blockType));
|
|
110
|
+
return allFieldNames.filter((name)=>!usedFieldNames.has(name));
|
|
113
111
|
},
|
|
114
112
|
label: 'Fields',
|
|
115
113
|
labels: {
|
|
116
114
|
plural: 'Fields',
|
|
117
115
|
singular: 'Field'
|
|
116
|
+
},
|
|
117
|
+
validate: (value)=>{
|
|
118
|
+
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
119
|
+
return 'Email field is required';
|
|
120
|
+
}
|
|
121
|
+
const blockTypes = value.map((block)=>block.blockType);
|
|
122
|
+
if (!blockTypes.includes('email')) {
|
|
123
|
+
return 'Email field is required';
|
|
124
|
+
}
|
|
125
|
+
const uniqueTypes = new Set(blockTypes);
|
|
126
|
+
if (blockTypes.length !== uniqueTypes.size) {
|
|
127
|
+
return 'Each contact field can only be added once';
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
118
130
|
}
|
|
119
131
|
};
|
|
120
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fields/contact-fields.ts"],"sourcesContent":["import type { Field } from 'payload'\n\n/**\n * Definitions for each contact field, including default required status and label.\n */\nexport const CONTACT_FIELD_DEFINITIONS = [\n { name: 'email', defaultLabel: 'Email', defaultRequired: true, label: 'Email' },\n {\n name: 'emailOptIn',\n defaultLabel: 'Receive emails',\n defaultRequired: false,\n label: 'Email Opt-In',\n },\n { name: 'firstName', defaultLabel: 'First Name', defaultRequired: false, label: 'First Name' },\n { name: 'lastName', defaultLabel: 'Last Name', defaultRequired: false, label: 'Last Name' },\n {\n name: 'mobileNumber',\n defaultLabel: 'Mobile Number',\n defaultRequired: false,\n label: 'Mobile Number',\n },\n {\n name: 'mobileOptIn',\n defaultLabel: 'Receive SMS',\n defaultRequired: false,\n label: 'Mobile Opt-In',\n },\n { name: 'address', defaultLabel: 'Address', defaultRequired: false, label: 'Address' },\n { name: 'city', defaultLabel: 'City', defaultRequired: false, label: 'City' },\n { name: 'state', defaultLabel: 'State', defaultRequired: false, label: 'State' },\n { name: 'zip', defaultLabel: 'Zip Code', defaultRequired: false, label: 'Zip Code' },\n { name: 'country', defaultLabel: 'Country', defaultRequired: false, label: 'Country' },\n] as const\n\n/**\n * Creates the contact fields configuration for a Payload CMS collection.\n * Each field can be customized with a label and whether it is required.\n */\nexport const createContactFieldsConfig = (): Field => {\n return {\n name: 'contactFields',\n type: 'blocks',\n admin: {\n description: 'Configure the fields to be included in the contact form.',\n },\n blocks: CONTACT_FIELD_DEFINITIONS.map((def) => ({\n slug: def.name,\n fields: [\n {\n name: 'label',\n type: 'text',\n admin: {\n placeholder: def.label,\n },\n defaultValue: def.defaultLabel,\n },\n {\n name: 'required',\n type: 'checkbox',\n defaultValue: def.defaultRequired,\n },\n ],\n })),\n defaultValue: [\n {\n blockType: 'email',\n label: 'Email',\n required: true,\n },\n ],\n filterOptions: ({ siblingData }) => {\n const
|
|
1
|
+
{"version":3,"sources":["../../src/fields/contact-fields.ts"],"sourcesContent":["import type { Field } from 'payload'\n\n/**\n * Definitions for each contact field, including default required status and label.\n */\nexport const CONTACT_FIELD_DEFINITIONS = [\n { name: 'email', defaultLabel: 'Email', defaultRequired: true, label: 'Email' },\n {\n name: 'emailOptIn',\n defaultLabel: 'Receive emails',\n defaultRequired: false,\n label: 'Email Opt-In',\n },\n { name: 'firstName', defaultLabel: 'First Name', defaultRequired: false, label: 'First Name' },\n { name: 'lastName', defaultLabel: 'Last Name', defaultRequired: false, label: 'Last Name' },\n {\n name: 'mobileNumber',\n defaultLabel: 'Mobile Number',\n defaultRequired: false,\n label: 'Mobile Number',\n },\n {\n name: 'mobileOptIn',\n defaultLabel: 'Receive SMS',\n defaultRequired: false,\n label: 'Mobile Opt-In',\n },\n { name: 'address', defaultLabel: 'Address', defaultRequired: false, label: 'Address' },\n { name: 'city', defaultLabel: 'City', defaultRequired: false, label: 'City' },\n { name: 'state', defaultLabel: 'State', defaultRequired: false, label: 'State' },\n { name: 'zip', defaultLabel: 'Zip Code', defaultRequired: false, label: 'Zip Code' },\n { name: 'country', defaultLabel: 'Country', defaultRequired: false, label: 'Country' },\n] as const\n\n/**\n * Creates the contact fields configuration for a Payload CMS collection.\n * Each field can be customized with a label and whether it is required.\n */\nexport const createContactFieldsConfig = (): Field => {\n return {\n name: 'contactFields',\n type: 'blocks',\n admin: {\n description: 'Configure the fields to be included in the contact form.',\n },\n blocks: CONTACT_FIELD_DEFINITIONS.map((def) => ({\n slug: def.name,\n fields: [\n {\n name: 'label',\n type: 'text',\n admin: {\n placeholder: def.label,\n },\n defaultValue: def.defaultLabel,\n },\n {\n name: 'required',\n type: 'checkbox',\n defaultValue: def.defaultRequired,\n },\n ],\n })),\n defaultValue: [\n {\n blockType: 'email',\n label: 'Email',\n required: true,\n },\n ],\n filterOptions: ({ siblingData }) => {\n const allFieldNames = CONTACT_FIELD_DEFINITIONS.map((def) => def.name)\n const existingBlocks =\n (siblingData as { contactFields?: { blockType: string }[] })?.contactFields ?? []\n const usedFieldNames = new Set(existingBlocks.map((block) => block.blockType))\n\n return allFieldNames.filter((name) => !usedFieldNames.has(name))\n },\n label: 'Fields',\n labels: {\n plural: 'Fields',\n singular: 'Field',\n },\n validate: (value) => {\n if (!value || !Array.isArray(value) || value.length === 0) {\n return 'Email field is required'\n }\n const blockTypes = value.map((block: { blockType: string }) => block.blockType)\n if (!blockTypes.includes('email')) {\n return 'Email field is required'\n }\n const uniqueTypes = new Set(blockTypes)\n if (blockTypes.length !== uniqueTypes.size) {\n return 'Each contact field can only be added once'\n }\n return true\n },\n }\n}\n"],"names":["CONTACT_FIELD_DEFINITIONS","name","defaultLabel","defaultRequired","label","createContactFieldsConfig","type","admin","description","blocks","map","def","slug","fields","placeholder","defaultValue","blockType","required","filterOptions","siblingData","allFieldNames","existingBlocks","contactFields","usedFieldNames","Set","block","filter","has","labels","plural","singular","validate","value","Array","isArray","length","blockTypes","includes","uniqueTypes","size"],"mappings":"AAEA;;CAEC,GACD,OAAO,MAAMA,4BAA4B;IACvC;QAAEC,MAAM;QAASC,cAAc;QAASC,iBAAiB;QAAMC,OAAO;IAAQ;IAC9E;QACEH,MAAM;QACNC,cAAc;QACdC,iBAAiB;QACjBC,OAAO;IACT;IACA;QAAEH,MAAM;QAAaC,cAAc;QAAcC,iBAAiB;QAAOC,OAAO;IAAa;IAC7F;QAAEH,MAAM;QAAYC,cAAc;QAAaC,iBAAiB;QAAOC,OAAO;IAAY;IAC1F;QACEH,MAAM;QACNC,cAAc;QACdC,iBAAiB;QACjBC,OAAO;IACT;IACA;QACEH,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C,QAAQ;YACRC,UAAU;QACZ;QACAC,UAAU,CAACC;YACT,IAAI,CAACA,SAAS,CAACC,MAAMC,OAAO,CAACF,UAAUA,MAAMG,MAAM,KAAK,GAAG;gBACzD,OAAO;YACT;YACA,MAAMC,aAAaJ,MAAMtB,GAAG,CAAC,CAACe,QAAiCA,MAAMT,SAAS;YAC9E,IAAI,CAACoB,WAAWC,QAAQ,CAAC,UAAU;gBACjC,OAAO;YACT;YACA,MAAMC,cAAc,IAAId,IAAIY;YAC5B,IAAIA,WAAWD,MAAM,KAAKG,YAAYC,IAAI,EAAE;gBAC1C,OAAO;YACT;YACA,OAAO;QACT;IACF;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilizehub/payload-plugin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Edvocacy plugin for Payload",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@changesets/cli": "^2.29.8",
|
|
42
42
|
"@eslint/eslintrc": "^3.2.0",
|
|
43
|
-
"@payloadcms/db-postgres": "3.
|
|
44
|
-
"@payloadcms/db-sqlite": "3.
|
|
43
|
+
"@payloadcms/db-postgres": "3.70.0",
|
|
44
|
+
"@payloadcms/db-sqlite": "3.70.0",
|
|
45
45
|
"@payloadcms/eslint-config": "3.9.0",
|
|
46
|
-
"@payloadcms/next": "3.
|
|
47
|
-
"@payloadcms/richtext-lexical": "3.
|
|
48
|
-
"@payloadcms/ui": "3.
|
|
46
|
+
"@payloadcms/next": "3.70.0",
|
|
47
|
+
"@payloadcms/richtext-lexical": "3.70.0",
|
|
48
|
+
"@payloadcms/ui": "3.70.0",
|
|
49
49
|
"@playwright/test": "1.56.1",
|
|
50
50
|
"@swc-node/register": "1.10.9",
|
|
51
51
|
"@swc/cli": "0.6.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"husky": "^9.1.7",
|
|
61
61
|
"next": "15.4.10",
|
|
62
62
|
"open": "^10.1.0",
|
|
63
|
-
"payload": "3.
|
|
63
|
+
"payload": "3.70.0",
|
|
64
64
|
"prettier": "^3.4.2",
|
|
65
65
|
"qs-esm": "7.0.2",
|
|
66
66
|
"react": "19.2.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"vitest": "^3.1.2"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"payload": "^3.
|
|
76
|
+
"payload": "^3.70.0"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|
|
79
79
|
"node": "^18.20.2 || >=20.9.0",
|