@plusscommunities/pluss-newsletter-web-sharing 1.2.15 → 1.3.5

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.cjs.js CHANGED
@@ -545,6 +545,14 @@ var newsletterActions = {
545
545
  method: 'GET',
546
546
  url: getUrl(values.serviceKey, 'content/published', query)
547
547
  });
548
+ },
549
+ getOpenGraph: function getOpenGraph(url) {
550
+ return authedFunction({
551
+ method: 'GET',
552
+ url: getUrl(values.serviceKey, "get2/opengraph", {
553
+ url: encodeURIComponent(url)
554
+ })
555
+ });
548
556
  }
549
557
  };
550
558
 
@@ -942,7 +950,9 @@ var ListNewsletter$1 = /*#__PURE__*/function (_Component) {
942
950
  style: {
943
951
  minWidth: '100%'
944
952
  }
945
- }, this.renderContent());
953
+ }, this.renderContent(), /*#__PURE__*/React__default['default'].createElement("div", {
954
+ className: "hub_tidioPadding"
955
+ }));
946
956
  }
947
957
  }]);
948
958
 
@@ -964,6 +974,7 @@ var ListNewsletterEntries = reactRedux.connect(mapStateToProps$9, {
964
974
 
965
975
  var Helper = PlussCore__namespace.Helper;
966
976
  var isEmail = Helper.isEmail;
977
+ var isUrl = Helper.isUrl;
967
978
  var getPluralS = Helper.getPluralS;
968
979
  var getUrlParams = Helper.getUrlParams;
969
980
  var safeReadParams = Helper.safeReadParams;
@@ -1313,7 +1324,9 @@ var NewsletterSubmissions = /*#__PURE__*/function (_Component) {
1313
1324
  onClick: function onClick() {
1314
1325
  _this7.sortByCol('SubmittedBy');
1315
1326
  }
1316
- }, "Submitted By", this.renderSort('SubmittedBy')))), /*#__PURE__*/React__default['default'].createElement("tbody", null, this.renderNewsletter())));
1327
+ }, "Submitted By", this.renderSort('SubmittedBy')))), /*#__PURE__*/React__default['default'].createElement("tbody", null, this.renderNewsletter())), /*#__PURE__*/React__default['default'].createElement("div", {
1328
+ className: "hub_tidioPadding"
1329
+ }));
1317
1330
  }
1318
1331
  }]);
1319
1332
 
@@ -2325,6 +2338,59 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
2325
2338
 
2326
2339
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "state", _objectSpread$8({}, _this.initialState));
2327
2340
 
2341
+ _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "validateLoadFromWebsite", function () {
2342
+ return isUrl(_this.state.loadFromWebsiteInput) && !_this.state.loadingFromWebsite;
2343
+ });
2344
+
2345
+ _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "handleLoadFromWebsite", function () {
2346
+ if (!_this.validateLoadFromWebsite()) {
2347
+ return;
2348
+ }
2349
+
2350
+ _this.setState({
2351
+ loadingFromWebsite: true
2352
+ });
2353
+
2354
+ newsletterActions.getOpenGraph(_this.state.loadFromWebsiteInput).then(function (res) {
2355
+ console.log(res.data);
2356
+ var newState = {
2357
+ loadingFromWebsite: false,
2358
+ loadFromWebsiteInput: '',
2359
+ titleInput: res.data.hybridGraph.title,
2360
+ textInput: res.data.hybridGraph.description
2361
+ };
2362
+
2363
+ if (res.data.hybridGraph.video) {
2364
+ newState.videoInput = res.data.hybridGraph.video;
2365
+ newState.selectedOption = 'video';
2366
+ } else {
2367
+ newState.links = [{
2368
+ Text: "Read more ".concat(res.data.hybridGraph.site_name ? "on ".concat(res.data.hybridGraph.site_name) : 'here'),
2369
+ Url: _this.state.loadFromWebsiteInput
2370
+ }];
2371
+ newState.selectedOption = 'attachments';
2372
+ }
2373
+
2374
+ _this.setState(newState);
2375
+
2376
+ if (res.data.hybridGraph.image) {
2377
+ _this.checkSetImage({
2378
+ Images: [res.data.hybridGraph.image]
2379
+ });
2380
+ } else if (res.data.hybridGraph.imageSecureUrl) {
2381
+ _this.checkSetImage({
2382
+ Images: [res.data.hybridGraph.imageSecureUrl]
2383
+ });
2384
+ }
2385
+ }).catch(function (err) {
2386
+ window.alert('Could not load website. Try again or try a different URL.');
2387
+
2388
+ _this.setState({
2389
+ loadingFromWebsite: false
2390
+ });
2391
+ });
2392
+ });
2393
+
2328
2394
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "selectOption", function (o) {
2329
2395
  _this.setState({
2330
2396
  selectedOption: o
@@ -2391,8 +2457,7 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
2391
2457
  });
2392
2458
 
2393
2459
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "handleSubmit", function () {
2394
- console.log(_this.audienceSelector);
2395
-
2460
+ // console.log(this.audienceSelector);
2396
2461
  _this.audienceSelector.getWrappedInstance().onSubmit();
2397
2462
 
2398
2463
  if (!_this.validateForm()) {
@@ -3066,8 +3131,9 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
3066
3131
  _this9.audienceSelector = a;
3067
3132
  },
3068
3133
  auth: this.props.auth,
3134
+ custom: true,
3069
3135
  disallowSingleUsers: true,
3070
- disallowUserType: this.props.auth.site === 'hq',
3136
+ disallowUserType: true,
3071
3137
  customSite: this.props.auth.site === 'hq' ? 'All sites' : false
3072
3138
  }));
3073
3139
  }
@@ -3177,7 +3243,11 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
3177
3243
  }, /*#__PURE__*/React__default['default'].createElement(Text, {
3178
3244
  type: "formTitleLarge",
3179
3245
  className: "marginBottom-24"
3180
- }, this.state.updateId == null ? 'New' : 'Edit', " Post"), /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3246
+ }, this.state.updateId == null ? 'New' : 'Edit', " Post"), /*#__PURE__*/React__default['default'].createElement("div", {
3247
+ className: "flex"
3248
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
3249
+ className: "flex-1"
3250
+ }, /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3181
3251
  id: "titleInput",
3182
3252
  type: "text",
3183
3253
  label: "Title",
@@ -3194,7 +3264,30 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
3194
3264
  },
3195
3265
  isRequired: true,
3196
3266
  alwaysShowLabel: true
3197
- }), /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3267
+ })), /*#__PURE__*/React__default['default'].createElement(Text, {
3268
+ type: "formLabel",
3269
+ className: "padding-20"
3270
+ }, "or"), /*#__PURE__*/React__default['default'].createElement("div", {
3271
+ className: "flex-1 flex flex-reverse flex-center"
3272
+ }, /*#__PURE__*/React__default['default'].createElement(Button, {
3273
+ inline: true,
3274
+ buttonType: "primary",
3275
+ className: "marginLeft-20",
3276
+ onClick: this.handleLoadFromWebsite,
3277
+ isActive: this.validateLoadFromWebsite()
3278
+ }, "Load"), /*#__PURE__*/React__default['default'].createElement("div", {
3279
+ className: "flex-1"
3280
+ }, /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3281
+ id: "loadFromWebsiteInput",
3282
+ type: "text",
3283
+ label: "Load from website",
3284
+ placeholder: "https://",
3285
+ value: this.state.loadFromWebsiteInput,
3286
+ onChange: function onChange(e) {
3287
+ return _this10.handleChange(e);
3288
+ },
3289
+ alwaysShowLabel: true
3290
+ })))), /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3198
3291
  id: "textInput",
3199
3292
  type: "textarea",
3200
3293
  label: "Text",
@@ -4121,8 +4214,10 @@ var PublishAvailableNews = /*#__PURE__*/function (_Component) {
4121
4214
  _this5.audienceSelector = a;
4122
4215
  },
4123
4216
  auth: this.props.auth,
4217
+ custom: true,
4218
+ maxWidth: 300,
4124
4219
  disallowSingleUsers: true,
4125
- disallowUserType: this.props.auth.site === 'hq',
4220
+ disallowUserType: true,
4126
4221
  customSite: this.props.auth.site === 'hq' ? 'All sites' : false
4127
4222
  })), /*#__PURE__*/React__default['default'].createElement("div", {
4128
4223
  className: "padding-60 paddingVertical-40 bottomDivideBorder"
package/dist/index.esm.js CHANGED
@@ -501,6 +501,14 @@ var newsletterActions = {
501
501
  method: 'GET',
502
502
  url: getUrl(values.serviceKey, 'content/published', query)
503
503
  });
504
+ },
505
+ getOpenGraph: function getOpenGraph(url) {
506
+ return authedFunction({
507
+ method: 'GET',
508
+ url: getUrl(values.serviceKey, "get2/opengraph", {
509
+ url: encodeURIComponent(url)
510
+ })
511
+ });
504
512
  }
505
513
  };
506
514
 
@@ -898,7 +906,9 @@ var ListNewsletter$1 = /*#__PURE__*/function (_Component) {
898
906
  style: {
899
907
  minWidth: '100%'
900
908
  }
901
- }, this.renderContent());
909
+ }, this.renderContent(), /*#__PURE__*/React.createElement("div", {
910
+ className: "hub_tidioPadding"
911
+ }));
902
912
  }
903
913
  }]);
904
914
 
@@ -920,6 +930,7 @@ var ListNewsletterEntries = connect(mapStateToProps$9, {
920
930
 
921
931
  var Helper = PlussCore.Helper;
922
932
  var isEmail = Helper.isEmail;
933
+ var isUrl = Helper.isUrl;
923
934
  var getPluralS = Helper.getPluralS;
924
935
  var getUrlParams = Helper.getUrlParams;
925
936
  var safeReadParams = Helper.safeReadParams;
@@ -1269,7 +1280,9 @@ var NewsletterSubmissions = /*#__PURE__*/function (_Component) {
1269
1280
  onClick: function onClick() {
1270
1281
  _this7.sortByCol('SubmittedBy');
1271
1282
  }
1272
- }, "Submitted By", this.renderSort('SubmittedBy')))), /*#__PURE__*/React.createElement("tbody", null, this.renderNewsletter())));
1283
+ }, "Submitted By", this.renderSort('SubmittedBy')))), /*#__PURE__*/React.createElement("tbody", null, this.renderNewsletter())), /*#__PURE__*/React.createElement("div", {
1284
+ className: "hub_tidioPadding"
1285
+ }));
1273
1286
  }
1274
1287
  }]);
1275
1288
 
@@ -2281,6 +2294,59 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
2281
2294
 
2282
2295
  _defineProperty(_assertThisInitialized(_this), "state", _objectSpread$8({}, _this.initialState));
2283
2296
 
2297
+ _defineProperty(_assertThisInitialized(_this), "validateLoadFromWebsite", function () {
2298
+ return isUrl(_this.state.loadFromWebsiteInput) && !_this.state.loadingFromWebsite;
2299
+ });
2300
+
2301
+ _defineProperty(_assertThisInitialized(_this), "handleLoadFromWebsite", function () {
2302
+ if (!_this.validateLoadFromWebsite()) {
2303
+ return;
2304
+ }
2305
+
2306
+ _this.setState({
2307
+ loadingFromWebsite: true
2308
+ });
2309
+
2310
+ newsletterActions.getOpenGraph(_this.state.loadFromWebsiteInput).then(function (res) {
2311
+ console.log(res.data);
2312
+ var newState = {
2313
+ loadingFromWebsite: false,
2314
+ loadFromWebsiteInput: '',
2315
+ titleInput: res.data.hybridGraph.title,
2316
+ textInput: res.data.hybridGraph.description
2317
+ };
2318
+
2319
+ if (res.data.hybridGraph.video) {
2320
+ newState.videoInput = res.data.hybridGraph.video;
2321
+ newState.selectedOption = 'video';
2322
+ } else {
2323
+ newState.links = [{
2324
+ Text: "Read more ".concat(res.data.hybridGraph.site_name ? "on ".concat(res.data.hybridGraph.site_name) : 'here'),
2325
+ Url: _this.state.loadFromWebsiteInput
2326
+ }];
2327
+ newState.selectedOption = 'attachments';
2328
+ }
2329
+
2330
+ _this.setState(newState);
2331
+
2332
+ if (res.data.hybridGraph.image) {
2333
+ _this.checkSetImage({
2334
+ Images: [res.data.hybridGraph.image]
2335
+ });
2336
+ } else if (res.data.hybridGraph.imageSecureUrl) {
2337
+ _this.checkSetImage({
2338
+ Images: [res.data.hybridGraph.imageSecureUrl]
2339
+ });
2340
+ }
2341
+ }).catch(function (err) {
2342
+ window.alert('Could not load website. Try again or try a different URL.');
2343
+
2344
+ _this.setState({
2345
+ loadingFromWebsite: false
2346
+ });
2347
+ });
2348
+ });
2349
+
2284
2350
  _defineProperty(_assertThisInitialized(_this), "selectOption", function (o) {
2285
2351
  _this.setState({
2286
2352
  selectedOption: o
@@ -2347,8 +2413,7 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
2347
2413
  });
2348
2414
 
2349
2415
  _defineProperty(_assertThisInitialized(_this), "handleSubmit", function () {
2350
- console.log(_this.audienceSelector);
2351
-
2416
+ // console.log(this.audienceSelector);
2352
2417
  _this.audienceSelector.getWrappedInstance().onSubmit();
2353
2418
 
2354
2419
  if (!_this.validateForm()) {
@@ -3022,8 +3087,9 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
3022
3087
  _this9.audienceSelector = a;
3023
3088
  },
3024
3089
  auth: this.props.auth,
3090
+ custom: true,
3025
3091
  disallowSingleUsers: true,
3026
- disallowUserType: this.props.auth.site === 'hq',
3092
+ disallowUserType: true,
3027
3093
  customSite: this.props.auth.site === 'hq' ? 'All sites' : false
3028
3094
  }));
3029
3095
  }
@@ -3133,7 +3199,11 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
3133
3199
  }, /*#__PURE__*/React.createElement(Text, {
3134
3200
  type: "formTitleLarge",
3135
3201
  className: "marginBottom-24"
3136
- }, this.state.updateId == null ? 'New' : 'Edit', " Post"), /*#__PURE__*/React.createElement(GenericInput, {
3202
+ }, this.state.updateId == null ? 'New' : 'Edit', " Post"), /*#__PURE__*/React.createElement("div", {
3203
+ className: "flex"
3204
+ }, /*#__PURE__*/React.createElement("div", {
3205
+ className: "flex-1"
3206
+ }, /*#__PURE__*/React.createElement(GenericInput, {
3137
3207
  id: "titleInput",
3138
3208
  type: "text",
3139
3209
  label: "Title",
@@ -3150,7 +3220,30 @@ var AddNewsletterEntry = /*#__PURE__*/function (_Component) {
3150
3220
  },
3151
3221
  isRequired: true,
3152
3222
  alwaysShowLabel: true
3153
- }), /*#__PURE__*/React.createElement(GenericInput, {
3223
+ })), /*#__PURE__*/React.createElement(Text, {
3224
+ type: "formLabel",
3225
+ className: "padding-20"
3226
+ }, "or"), /*#__PURE__*/React.createElement("div", {
3227
+ className: "flex-1 flex flex-reverse flex-center"
3228
+ }, /*#__PURE__*/React.createElement(Button, {
3229
+ inline: true,
3230
+ buttonType: "primary",
3231
+ className: "marginLeft-20",
3232
+ onClick: this.handleLoadFromWebsite,
3233
+ isActive: this.validateLoadFromWebsite()
3234
+ }, "Load"), /*#__PURE__*/React.createElement("div", {
3235
+ className: "flex-1"
3236
+ }, /*#__PURE__*/React.createElement(GenericInput, {
3237
+ id: "loadFromWebsiteInput",
3238
+ type: "text",
3239
+ label: "Load from website",
3240
+ placeholder: "https://",
3241
+ value: this.state.loadFromWebsiteInput,
3242
+ onChange: function onChange(e) {
3243
+ return _this10.handleChange(e);
3244
+ },
3245
+ alwaysShowLabel: true
3246
+ })))), /*#__PURE__*/React.createElement(GenericInput, {
3154
3247
  id: "textInput",
3155
3248
  type: "textarea",
3156
3249
  label: "Text",
@@ -4077,8 +4170,10 @@ var PublishAvailableNews = /*#__PURE__*/function (_Component) {
4077
4170
  _this5.audienceSelector = a;
4078
4171
  },
4079
4172
  auth: this.props.auth,
4173
+ custom: true,
4174
+ maxWidth: 300,
4080
4175
  disallowSingleUsers: true,
4081
- disallowUserType: this.props.auth.site === 'hq',
4176
+ disallowUserType: true,
4082
4177
  customSite: this.props.auth.site === 'hq' ? 'All sites' : false
4083
4178
  })), /*#__PURE__*/React.createElement("div", {
4084
4179
  className: "padding-60 paddingVertical-40 bottomDivideBorder"
package/dist/index.umd.js CHANGED
@@ -524,6 +524,14 @@
524
524
  method: 'GET',
525
525
  url: getUrl(values.serviceKey, 'content/published', query)
526
526
  });
527
+ },
528
+ getOpenGraph: function getOpenGraph(url) {
529
+ return authedFunction({
530
+ method: 'GET',
531
+ url: getUrl(values.serviceKey, "get2/opengraph", {
532
+ url: encodeURIComponent(url)
533
+ })
534
+ });
527
535
  }
528
536
  };
529
537
 
@@ -921,7 +929,9 @@
921
929
  style: {
922
930
  minWidth: '100%'
923
931
  }
924
- }, this.renderContent());
932
+ }, this.renderContent(), /*#__PURE__*/React__default['default'].createElement("div", {
933
+ className: "hub_tidioPadding"
934
+ }));
925
935
  }
926
936
  }]);
927
937
 
@@ -943,6 +953,7 @@
943
953
 
944
954
  var Helper = PlussCore__namespace.Helper;
945
955
  var isEmail = Helper.isEmail;
956
+ var isUrl = Helper.isUrl;
946
957
  var getPluralS = Helper.getPluralS;
947
958
  var getUrlParams = Helper.getUrlParams;
948
959
  var safeReadParams = Helper.safeReadParams;
@@ -1292,7 +1303,9 @@
1292
1303
  onClick: function onClick() {
1293
1304
  _this7.sortByCol('SubmittedBy');
1294
1305
  }
1295
- }, "Submitted By", this.renderSort('SubmittedBy')))), /*#__PURE__*/React__default['default'].createElement("tbody", null, this.renderNewsletter())));
1306
+ }, "Submitted By", this.renderSort('SubmittedBy')))), /*#__PURE__*/React__default['default'].createElement("tbody", null, this.renderNewsletter())), /*#__PURE__*/React__default['default'].createElement("div", {
1307
+ className: "hub_tidioPadding"
1308
+ }));
1296
1309
  }
1297
1310
  }]);
1298
1311
 
@@ -2304,6 +2317,59 @@
2304
2317
 
2305
2318
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "state", _objectSpread$8({}, _this.initialState));
2306
2319
 
2320
+ _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "validateLoadFromWebsite", function () {
2321
+ return isUrl(_this.state.loadFromWebsiteInput) && !_this.state.loadingFromWebsite;
2322
+ });
2323
+
2324
+ _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "handleLoadFromWebsite", function () {
2325
+ if (!_this.validateLoadFromWebsite()) {
2326
+ return;
2327
+ }
2328
+
2329
+ _this.setState({
2330
+ loadingFromWebsite: true
2331
+ });
2332
+
2333
+ newsletterActions.getOpenGraph(_this.state.loadFromWebsiteInput).then(function (res) {
2334
+ console.log(res.data);
2335
+ var newState = {
2336
+ loadingFromWebsite: false,
2337
+ loadFromWebsiteInput: '',
2338
+ titleInput: res.data.hybridGraph.title,
2339
+ textInput: res.data.hybridGraph.description
2340
+ };
2341
+
2342
+ if (res.data.hybridGraph.video) {
2343
+ newState.videoInput = res.data.hybridGraph.video;
2344
+ newState.selectedOption = 'video';
2345
+ } else {
2346
+ newState.links = [{
2347
+ Text: "Read more ".concat(res.data.hybridGraph.site_name ? "on ".concat(res.data.hybridGraph.site_name) : 'here'),
2348
+ Url: _this.state.loadFromWebsiteInput
2349
+ }];
2350
+ newState.selectedOption = 'attachments';
2351
+ }
2352
+
2353
+ _this.setState(newState);
2354
+
2355
+ if (res.data.hybridGraph.image) {
2356
+ _this.checkSetImage({
2357
+ Images: [res.data.hybridGraph.image]
2358
+ });
2359
+ } else if (res.data.hybridGraph.imageSecureUrl) {
2360
+ _this.checkSetImage({
2361
+ Images: [res.data.hybridGraph.imageSecureUrl]
2362
+ });
2363
+ }
2364
+ }).catch(function (err) {
2365
+ window.alert('Could not load website. Try again or try a different URL.');
2366
+
2367
+ _this.setState({
2368
+ loadingFromWebsite: false
2369
+ });
2370
+ });
2371
+ });
2372
+
2307
2373
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "selectOption", function (o) {
2308
2374
  _this.setState({
2309
2375
  selectedOption: o
@@ -2370,8 +2436,7 @@
2370
2436
  });
2371
2437
 
2372
2438
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "handleSubmit", function () {
2373
- console.log(_this.audienceSelector);
2374
-
2439
+ // console.log(this.audienceSelector);
2375
2440
  _this.audienceSelector.getWrappedInstance().onSubmit();
2376
2441
 
2377
2442
  if (!_this.validateForm()) {
@@ -3045,8 +3110,9 @@
3045
3110
  _this9.audienceSelector = a;
3046
3111
  },
3047
3112
  auth: this.props.auth,
3113
+ custom: true,
3048
3114
  disallowSingleUsers: true,
3049
- disallowUserType: this.props.auth.site === 'hq',
3115
+ disallowUserType: true,
3050
3116
  customSite: this.props.auth.site === 'hq' ? 'All sites' : false
3051
3117
  }));
3052
3118
  }
@@ -3156,7 +3222,11 @@
3156
3222
  }, /*#__PURE__*/React__default['default'].createElement(Text, {
3157
3223
  type: "formTitleLarge",
3158
3224
  className: "marginBottom-24"
3159
- }, this.state.updateId == null ? 'New' : 'Edit', " Post"), /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3225
+ }, this.state.updateId == null ? 'New' : 'Edit', " Post"), /*#__PURE__*/React__default['default'].createElement("div", {
3226
+ className: "flex"
3227
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
3228
+ className: "flex-1"
3229
+ }, /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3160
3230
  id: "titleInput",
3161
3231
  type: "text",
3162
3232
  label: "Title",
@@ -3173,7 +3243,30 @@
3173
3243
  },
3174
3244
  isRequired: true,
3175
3245
  alwaysShowLabel: true
3176
- }), /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3246
+ })), /*#__PURE__*/React__default['default'].createElement(Text, {
3247
+ type: "formLabel",
3248
+ className: "padding-20"
3249
+ }, "or"), /*#__PURE__*/React__default['default'].createElement("div", {
3250
+ className: "flex-1 flex flex-reverse flex-center"
3251
+ }, /*#__PURE__*/React__default['default'].createElement(Button, {
3252
+ inline: true,
3253
+ buttonType: "primary",
3254
+ className: "marginLeft-20",
3255
+ onClick: this.handleLoadFromWebsite,
3256
+ isActive: this.validateLoadFromWebsite()
3257
+ }, "Load"), /*#__PURE__*/React__default['default'].createElement("div", {
3258
+ className: "flex-1"
3259
+ }, /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3260
+ id: "loadFromWebsiteInput",
3261
+ type: "text",
3262
+ label: "Load from website",
3263
+ placeholder: "https://",
3264
+ value: this.state.loadFromWebsiteInput,
3265
+ onChange: function onChange(e) {
3266
+ return _this10.handleChange(e);
3267
+ },
3268
+ alwaysShowLabel: true
3269
+ })))), /*#__PURE__*/React__default['default'].createElement(GenericInput, {
3177
3270
  id: "textInput",
3178
3271
  type: "textarea",
3179
3272
  label: "Text",
@@ -4100,8 +4193,10 @@
4100
4193
  _this5.audienceSelector = a;
4101
4194
  },
4102
4195
  auth: this.props.auth,
4196
+ custom: true,
4197
+ maxWidth: 300,
4103
4198
  disallowSingleUsers: true,
4104
- disallowUserType: this.props.auth.site === 'hq',
4199
+ disallowUserType: true,
4105
4200
  customSite: this.props.auth.site === 'hq' ? 'All sites' : false
4106
4201
  })), /*#__PURE__*/React__default['default'].createElement("div", {
4107
4202
  className: "padding-60 paddingVertical-40 bottomDivideBorder"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-newsletter-web-sharing",
3
- "version": "1.2.15",
3
+ "version": "1.3.5",
4
4
  "description": "Extension package to enable newsletter on Pluss Communities Platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.14.0",
36
- "@plusscommunities/pluss-core-web": "^1.1.5",
36
+ "@plusscommunities/pluss-core-web": "^1.2.5",
37
37
  "lodash": "^4.17.4",
38
38
  "moment": "^2.18.1",
39
39
  "react": "^16.14.0",