@plusscommunities/pluss-newsletter-web-sharing 1.2.13 → 1.2.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-newsletter-web-sharing",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "Extension package to enable newsletter on Pluss Communities Platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -0,0 +1,235 @@
1
+ // import * as PlussCore from '../../pluss-core/src';
2
+ import * as PlussCore from '@plusscommunities/pluss-core-web';
3
+
4
+ const values = {
5
+ featureKey: 'coaching',
6
+ serviceKey: 'newsletterCoaching',
7
+ reducerKey: 'newsCoaching',
8
+ analyticsKey: 'newsCoaching',
9
+ actionNewsLoaded: 'NEWS_LOADEDCoaching',
10
+ actionNewsUpdated: 'NEWS_UPDATEDCoaching',
11
+ actionNewsRemoved: 'NEWS_REMOVEDCoaching',
12
+ actionNewsSubmissionsLoaded: 'NEWS_SUBMISSIONS_LOADEDCoaching',
13
+ actionNewsSubmissionRemoved: 'NEWS_SUBMISSION_REMOVEDCoaching',
14
+ actionNewsPurge: 'NEWS_PURGECoaching',
15
+ actionNewsDashboardLoading: 'NEWS_DASHBOARD_LOADINGCoaching',
16
+ actionNewsSubmissionsDashboardLoading: 'NEWS_SUBMISSIONS_DASHBOARD_LOADINGCoaching',
17
+ permissionNewsletter: 'newsletterCoaching',
18
+ permissionNewsletterSubmit: 'newsletterSubmitCoaching',
19
+ activityAddNewsSubmission: 'AddNewsSubmissionCoaching',
20
+ activityApproveNewsSubmission: 'ApproveNewsSubmissionCoaching',
21
+ activityRejectNewsSubmission: 'RejectNewsSubmissionCoaching',
22
+ activityAddNews: 'AddNewsCoaching',
23
+ activityEditNews: 'EditNewsCoaching',
24
+ acitivtyDeleteNews: 'DeleteNewsCoaching',
25
+ routeNewsHub: '/newsCoaching',
26
+ routeAddNewsletterEntry: '/newsCoaching/article',
27
+ routePublishAvailableNews: '/newsCoaching/content/',
28
+ routeNewsletterSubmission: '/newsCoaching/newslettersubmission/',
29
+ routeNewsletterAnalytics: '/newsCoaching/analytics/',
30
+ routeGenerateNewsletter: '/newsletterCoaching/generate',
31
+ routeNewsletterTemplate: '/embed/newsletterCoaching',
32
+ screenNewsHub: 'NewsHubCoaching',
33
+ screenAddNewsletterEntry: 'AddNewsletterEntryCoaching',
34
+ screenPublishAvailableNews: 'PublishAvailableNewsCoaching',
35
+ screenNewsletterSubmission: 'NewsletterSubmissionCoaching',
36
+ screenNewsletterAnalytics: 'NewsletterAnalyticsCoaching',
37
+ screenGenerateNewsletter: 'GenerateNewsletterCoaching',
38
+ screenNewsletterTemplate: 'NewsletterTemplateCoaching',
39
+ svgPathGridIcon:
40
+ 'M12 3.75C9.1084 3.75 6.75 6.1084 6.75 9C6.75 10.8076 7.67285 12.4131 9.07031 13.3594C6.39551 14.5078 4.5 17.1621 4.5 20.25H6C6 18.082 7.14551 16.1953 8.85938 15.1406C9.36328 16.377 10.5908 17.25 12 17.25C13.4092 17.25 14.6367 16.377 15.1406 15.1406C16.8545 16.1953 18 18.082 18 20.25H19.5C19.5 17.1621 17.6045 14.5078 14.9297 13.3594C16.3271 12.4131 17.25 10.8076 17.25 9C17.25 6.1084 14.8916 3.75 12 3.75ZM12 5.25C14.0801 5.25 15.75 6.91992 15.75 9C15.75 11.0801 14.0801 12.75 12 12.75C9.91992 12.75 8.25 11.0801 8.25 9C8.25 6.91992 9.91992 5.25 12 5.25ZM12 14.25C12.6152 14.25 13.2012 14.3379 13.7578 14.5078C13.4971 15.2314 12.8174 15.75 12 15.75C11.1826 15.75 10.5029 15.2314 10.2422 14.5078C10.7988 14.3379 11.3848 14.25 12 14.25Z',
41
+ svgPathGridIconViewBox: '0 0 24 24',
42
+ optionForceNewsAuthorName: 'forceNewsAuthorNameCoaching',
43
+ optionNewsComments: 'newsCommentsCoaching',
44
+ optionNewsNotifications: 'newsNotificationsCoaching',
45
+ optionUseLargeNews: 'useLargeNewsCoaching',
46
+ localStorageNewsletterBrandData: `newsletterBrandDataCoaching`,
47
+ localStorageNewsletterMakerLastUpdate: `newsletterMakerLastUpdateCoaching`,
48
+ localStorageNewsletterMakerData: `newsletterMakerDataCoaching`,
49
+ stringPostfixSubmissionEmail: 'newssubmissionemailCoaching',
50
+ menuOrder: 3.6,
51
+ textTipKeepYourTVNewsFeedActiveAndCurrent:
52
+ 'Tip: Keep your TV Coaching feed active and current, but don’t flood\nit with so much content that important posts get lost.',
53
+ textFeaturedNews: 'Featured Coaching',
54
+ textIsThisAFeaturedNewsArticle: 'Is this a featured coaching?',
55
+ textFeaturedNewsArticlesWillBeHighlighted: 'Featured coachings will be highlighted on the Home page.',
56
+ textThisPostHasPreviouslyBeenPublished: `This coaching has previously been published to this village. Are you sure you want to continue?`,
57
+ textNewsletterTitlePostfix: 'Coaching',
58
+ textCreateNewsletter: 'Create Coaching',
59
+ textNoSelectedNews: 'No selected coachings yet',
60
+ textNewsletterTitle: 'Coaching Title',
61
+ textSelectNews: 'Select Coaching',
62
+ textSelectedNews: 'Selected Coaching',
63
+ textAddEditNewsPostfix: 'coaching',
64
+ textNoteThisWillNotChangeInTheApp: (changeText) => `Note: This will not ${changeText} the coaching in the app`,
65
+ textAreYouSureYouWantToDelete: `Are you sure you want to delete that coaching?`,
66
+ textThereAreNoNews: 'There are no coachings',
67
+ textTitleNews: 'Coachings',
68
+ textSubmitYourNewNewsPostHere: 'Submit your new coaching here. You will be notified once your post has been approved.',
69
+ textPrintNewsletter: 'Print Coachings',
70
+ textBackToNews: 'Back to Coachings',
71
+ textNewsAnalytics: 'COACHINGS ANALYTICS',
72
+ textNewsSubmission: 'COACHING SUBMISSION',
73
+ textNewsPost: 'COACHING',
74
+ textNewsPostTitle: 'News coaching title',
75
+ textWhenANewsletterSubmissionIsAdded: 'When a coaching submission is added, the entered address will recieve an email notification.',
76
+ textIsThisAFeaturedNewsPost: 'Is this a featured coaching?',
77
+ textFeaturedNewsPostWillBeHighlighted: 'Featured coachings will be highlighted on the Home page.',
78
+ textSubmittedANewsletterPostForReview: 'submitted a coaching for review:',
79
+ textApprovedANewsSubmission: 'approved a coaching submission:',
80
+ textRejectedANewsSubmission: 'rejected a coaching submission:',
81
+ textAddedANewsletterPost: 'added a coaching:',
82
+ textEditedANewsletterPost: 'edited a coaching:',
83
+ textDeletedANewsletterPost: 'deleted a coaching:',
84
+ textSingularName: 'Coaching',
85
+ textThereIsNoNews: 'There is no Coaching',
86
+ textTheAuthorOfANewsPostWillAlwaysDisplay: 'The author of a coaching will always display.',
87
+ textAllowNewsComments: 'Allow Coaching Comments',
88
+ textUsersCanPostCommentsOnNews: 'Users can post comments on Coachings within the app.',
89
+ textAllowNewsNotification: 'Allow Coaching Notifications',
90
+ textWhenSettingUpANewsPost: 'When setting up a coaching, the creator may choose to send a push notification to users of the app.',
91
+ textCondensedNewsStyle: 'Condensed Coachings Style',
92
+ textTheNewsSectionUsesCondensedNewsItems:
93
+ 'The Coachings section uses condensed Coaching items - smaller images, less information and less scrolling.',
94
+ textMenuTitle: 'Coaching',
95
+ textPermissionNewsletterManagement: 'Coaching Management',
96
+ textPermissionNewsletterSubmission: 'Coaching Submission (Approval Required)',
97
+ };
98
+
99
+ export { PlussCore, values };
100
+
101
+ const FeatureConfig = {
102
+ key: values.featureKey,
103
+ singularName: values.textSingularName,
104
+ description: 'Publish rich information, articles, and media to keep the village up-to-date at all times.',
105
+ emptyText: values.textThereIsNoNews,
106
+ widgetOptions: [
107
+ {
108
+ key: values.featureKey,
109
+ widget: true,
110
+ main: true,
111
+ hideOnTabNumbers: [],
112
+ optionKey: values.optionForceNewsAuthorName,
113
+ type: 'toggle',
114
+ inverseOption: false,
115
+ title: "Always Show Author's Name",
116
+ description: values.textTheAuthorOfANewsPostWillAlwaysDisplay,
117
+ defaultNew: false,
118
+ default: false,
119
+ },
120
+ {
121
+ key: values.featureKey,
122
+ widget: true,
123
+ main: true,
124
+ hideOnTabNumbers: [],
125
+ optionKey: values.optionNewsComments,
126
+ type: 'show',
127
+ inverseOption: true,
128
+ title: values.textAllowNewsComments,
129
+ description: values.textUsersCanPostCommentsOnNews,
130
+ defaultNew: false,
131
+ default: false,
132
+ },
133
+ {
134
+ key: values.featureKey,
135
+ widget: true,
136
+ main: true,
137
+ hideOnTabNumbers: [],
138
+ optionKey: values.optionNewsNotifications,
139
+ type: 'show',
140
+ inverseOption: true,
141
+ title: values.textAllowNewsNotification,
142
+ description: values.textWhenSettingUpANewsPost,
143
+ defaultNew: false,
144
+ default: false,
145
+ },
146
+ {
147
+ key: values.featureKey,
148
+ widget: false,
149
+ main: true,
150
+ hideOnTabNumbers: [],
151
+ optionKey: values.optionUseLargeNews,
152
+ type: 'toggle',
153
+ inverseOption: true,
154
+ title: values.textCondensedNewsStyle,
155
+ description: values.textTheNewsSectionUsesCondensedNewsItems,
156
+ defaultNew: true,
157
+ default: true,
158
+ },
159
+ ],
160
+ menu: {
161
+ order: values.menuOrder,
162
+ text: values.textMenuTitle,
163
+ icon: 'news',
164
+ isFontAwesome: false,
165
+ url: values.routeNewsHub,
166
+ countProps: [values.reducerKey, 'submissions', 'length'],
167
+ visibleExps: {
168
+ type: 'and',
169
+ exps: [
170
+ { type: 'feature', value: values.featureKey },
171
+ {
172
+ type: 'or',
173
+ exps: [
174
+ { type: 'permission', value: values.permissionNewsletter },
175
+ { type: 'permission', value: values.permissionNewsletterSubmit },
176
+ ],
177
+ },
178
+ ],
179
+ },
180
+ },
181
+ addUrl: values.routeAddNewsletterEntry,
182
+ addPermission: values.permissionNewsletter,
183
+ activities: [
184
+ values.activityAddNewsSubmission,
185
+ values.activityApproveNewsSubmission,
186
+ values.activityRejectNewsSubmission,
187
+ values.activityAddNews,
188
+ values.activityEditNews,
189
+ values.acitivtyDeleteNews,
190
+ ],
191
+ permissions: [
192
+ {
193
+ displayName: values.textPermissionNewsletterManagement,
194
+ key: values.permissionNewsletter,
195
+ hq: true,
196
+ },
197
+ {
198
+ displayName: values.textPermissionNewsletterSubmission,
199
+ key: values.permissionNewsletterSubmit,
200
+ hq: false,
201
+ },
202
+ ],
203
+ routes: [
204
+ { path: values.routeNewsHub, component: values.screenNewsHub, exact: false },
205
+ { path: values.routeAddNewsletterEntry, component: values.screenAddNewsletterEntry, exact: true },
206
+ { path: `${values.routeAddNewsletterEntry}/:updateId`, component: values.screenAddNewsletterEntry, exact: true },
207
+ { path: `${values.routePublishAvailableNews}:updateId`, component: values.screenPublishAvailableNews, exact: true },
208
+ { path: `${values.routeNewsletterSubmission}:updateId`, component: values.screenNewsletterSubmission, exact: true },
209
+ { path: `${values.routeNewsletterAnalytics}:infoId`, component: values.screenNewsletterAnalytics, exact: true },
210
+ { path: values.routeGenerateNewsletter, component: values.screenGenerateNewsletter, exact: true },
211
+ { path: values.routeNewsletterTemplate, component: values.screenNewsletterTemplate, exact: true },
212
+ ],
213
+ env: {
214
+ baseStage: '',
215
+ baseAPIUrl: '',
216
+ baseUploadsUrl: '',
217
+ uploadBucket: '',
218
+ colourBrandingMain: '',
219
+ colourBrandingOff: '',
220
+ colourBrandingApp: '',
221
+ defaultProfileImage: '',
222
+ utcOffset: '',
223
+ hasAvailableNews: false,
224
+ newsHaveTags: true,
225
+ defaultAllowComments: true,
226
+ makeApiKey: '',
227
+ logo: '',
228
+ clientName: '',
229
+ },
230
+ init: (environment) => {
231
+ FeatureConfig.env = environment;
232
+ PlussCore.Config.init(environment);
233
+ },
234
+ };
235
+ export default FeatureConfig;