@plusscommunities/pluss-core-web 1.7.6-beta.2 → 1.8.2-beta.0

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
@@ -8,7 +8,7 @@ import { Component, PureComponent } from 'react';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
  import $ from 'jquery';
10
10
  import Cookies from 'js-cookie';
11
- import { Icon } from '@plusscommunities/pluss-icons';
11
+ import { Icon as Icon$1 } from '@plusscommunities/pluss-icons';
12
12
  import { connect } from 'react-redux';
13
13
  import Textarea from 'react-textarea-autosize';
14
14
  import Dropzone from 'react-dropzone';
@@ -20,6 +20,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
20
20
  import { ChromePicker } from 'react-color';
21
21
  import tinycolor from 'tinycolor2';
22
22
  import { Link } from 'react-router-dom';
23
+ import { ResponsiveContainer, BarChart, XAxis, YAxis, Tooltip, Bar, Cell } from 'recharts';
23
24
 
24
25
  var CoreConfig = {
25
26
  env: {
@@ -354,6 +355,61 @@ var session = /*#__PURE__*/Object.freeze({
354
355
  isTVEnabled: isTVEnabled
355
356
  });
356
357
 
358
+ // Distinct colour palette for multi-site comparison charts.
359
+ // Uses a fixed palette rather than each site's MainBrandingColour because:
360
+ // 1. Site branding colours aren't pre-loaded — only the active site's branding is in Redux state.
361
+ // Fetching branding for each comparison site would require extra API calls.
362
+ // 2. Two sites could share the same or similar branding colour, making bars indistinguishable.
363
+ // 3. A curated palette guarantees contrast and visual distinctiveness.
364
+ // Future enhancement: use site branding colours with collision fallback to this palette.
365
+ // Wraps around via modulo for 10+ sites (unlikely in practice).
366
+ var SITE_COLOURS = ["#5e9efc",
367
+ // Blue
368
+ "#49bdbb",
369
+ // Teal
370
+ "#ff8c75",
371
+ // Tangerine
372
+ "#6e79c5",
373
+ // Purple
374
+ "#00cc9c",
375
+ // Green
376
+ "#c02743",
377
+ // Red
378
+ "#bdbd27",
379
+ // Citron
380
+ "#191e78",
381
+ // Dark Blue
382
+ "#ff6363",
383
+ // Grapefruit
384
+ "#536280" // Dusk
385
+ ];
386
+ var getSiteColour = index => {
387
+ return SITE_COLOURS[index % SITE_COLOURS.length];
388
+ };
389
+ var fetchMultiSiteData = /*#__PURE__*/function () {
390
+ var _ref = _asyncToGenerator(function* (sites, fetchFn) {
391
+ var results = {};
392
+ var promises = sites.map(/*#__PURE__*/function () {
393
+ var _ref2 = _asyncToGenerator(function* (site) {
394
+ try {
395
+ var data = yield fetchFn(site);
396
+ results[site] = data;
397
+ } catch (error) {
398
+ console.log("fetchMultiSiteData failed for site ".concat(site, ":"), error);
399
+ results[site] = null;
400
+ }
401
+ });
402
+ return function (_x3) {
403
+ return _ref2.apply(this, arguments);
404
+ };
405
+ }());
406
+ yield Promise.all(promises);
407
+ return results;
408
+ });
409
+ return function fetchMultiSiteData(_x, _x2) {
410
+ return _ref.apply(this, arguments);
411
+ };
412
+ }();
357
413
  var compileStats = stats => {
358
414
  var totalStats = {};
359
415
  Object.keys(stats).forEach(id => {
@@ -463,7 +519,6 @@ var countActivities = (data, activityKey, countType) => {
463
519
  switch (countType) {
464
520
  case "unique":
465
521
  case "uniquearray":
466
- console.log(countType, set);
467
522
  return set.size;
468
523
  case "total":
469
524
  return count;
@@ -514,12 +569,13 @@ var generateDateActivities = function generateDateActivities(data, activityKey,
514
569
  };
515
570
  result.push(compiledValue);
516
571
  });
517
- console.log(result);
518
572
  return result;
519
573
  };
520
574
 
521
575
  var analytics = /*#__PURE__*/Object.freeze({
522
576
  __proto__: null,
577
+ getSiteColour: getSiteColour,
578
+ fetchMultiSiteData: fetchMultiSiteData,
523
579
  compileStats: compileStats,
524
580
  getInsight: getInsight,
525
581
  getAnalyticsFilterOptions: getAnalyticsFilterOptions,
@@ -707,7 +763,7 @@ var toParagraphed = (text, style) => {
707
763
  var textSplit = text.split("\n");
708
764
  return _.map(textSplit, (t, i) => {
709
765
  return /*#__PURE__*/jsx("span", {
710
- style: _objectSpread$p({
766
+ iconStyle: _objectSpread$p({
711
767
  display: "block"
712
768
  }, style),
713
769
  children: t || "\u00A0"
@@ -1179,7 +1235,11 @@ var analyticsActions = {
1179
1235
  })
1180
1236
  });
1181
1237
  },
1182
- getActivityLog: (entityId, entityType, actionType, minTime, maxTime) => {
1238
+ getActivityLog: function getActivityLog(entityId, entityType, actionType, minTime, maxTime) {
1239
+ var {
1240
+ userType,
1241
+ userCategory
1242
+ } = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
1183
1243
  var query = {
1184
1244
  entityId,
1185
1245
  entityType,
@@ -1191,6 +1251,8 @@ var analyticsActions = {
1191
1251
  if (maxTime) {
1192
1252
  query.maxTime = maxTime;
1193
1253
  }
1254
+ if (userType) query.userType = userType;
1255
+ if (userCategory) query.userCategory = userCategory;
1194
1256
  return authedFunction({
1195
1257
  method: "GET",
1196
1258
  url: getUrl("analytics", "activity", query)
@@ -1204,20 +1266,39 @@ var analyticsActions = {
1204
1266
  })
1205
1267
  });
1206
1268
  },
1207
- getAggregateEntityStats: (site, type, minTime, maxTime, raw) => {
1269
+ getAggregateEntityStats: function getAggregateEntityStats(site, type, minTime, maxTime, raw) {
1270
+ var {
1271
+ userType,
1272
+ userCategory
1273
+ } = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
1208
1274
  var query = {
1209
1275
  site,
1210
1276
  type,
1211
1277
  minTime,
1212
1278
  maxTime
1213
1279
  };
1214
- if (raw) {
1215
- query.raw = raw;
1216
- }
1280
+ if (raw) query.raw = raw;
1281
+ if (userType) query.userType = userType;
1282
+ if (userCategory) query.userCategory = userCategory;
1217
1283
  return authedFunction({
1218
1284
  method: "GET",
1219
1285
  url: getUrl("analytics", "aggregate", query)
1220
1286
  });
1287
+ },
1288
+ getUserRetention: function getUserRetention(site) {
1289
+ var {
1290
+ userType,
1291
+ userCategory
1292
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1293
+ var query = {
1294
+ site
1295
+ };
1296
+ if (userType) query.userType = userType;
1297
+ if (userCategory) query.userCategory = userCategory;
1298
+ return authedFunction({
1299
+ method: "GET",
1300
+ url: getUrl("analytics", "get/userretention", query)
1301
+ });
1221
1302
  }
1222
1303
  };
1223
1304
 
@@ -2442,9 +2523,9 @@ class AddButton extends Component {
2442
2523
  return classes;
2443
2524
  }
2444
2525
  renderIcon() {
2445
- return /*#__PURE__*/jsx(Icon, {
2526
+ return /*#__PURE__*/jsx(Icon$1, {
2446
2527
  className: "addButton__icon",
2447
- icon: this.props.icon || "plus"
2528
+ icon: this.props.icon || "fa-plus"
2448
2529
  });
2449
2530
  }
2450
2531
  render() {
@@ -2471,16 +2552,16 @@ class Attachment extends Component {
2471
2552
  href: this.props.source,
2472
2553
  target: "_blank",
2473
2554
  className: "pdfAttachment_container",
2474
- children: [/*#__PURE__*/jsx(Icon, {
2555
+ children: [/*#__PURE__*/jsx(Icon$1, {
2475
2556
  className: "pdfAttachment_icon",
2476
2557
  pulse: this.props.uploading,
2477
2558
  fixedWidth: true,
2478
- icon: "".concat(this.props.uploading ? "spinner" : "paperclip")
2559
+ icon: "".concat(this.props.uploading ? "fa-spinner" : "fa-paperclip")
2479
2560
  }), /*#__PURE__*/jsx("p", {
2480
2561
  className: "pdfAttachment_title",
2481
2562
  children: this.props.title || getFileName(this.props.source)
2482
2563
  })]
2483
- }), this.props.onRemove && /*#__PURE__*/jsx(Icon, {
2564
+ }), this.props.onRemove && /*#__PURE__*/jsx(Icon$1, {
2484
2565
  colour: COLOUR_DUSK_LIGHT,
2485
2566
  icon: "xmark",
2486
2567
  className: "pdfAttachment_close",
@@ -2529,8 +2610,8 @@ class Button extends Component {
2529
2610
  if (!this.props.leftIcon) {
2530
2611
  return null;
2531
2612
  }
2532
- return /*#__PURE__*/jsx(Icon, {
2533
- icon: this.props.leftIcon,
2613
+ return /*#__PURE__*/jsx(Icon$1, {
2614
+ name: this.props.leftIcon,
2534
2615
  className: "buttonTextWithIcon_icon"
2535
2616
  });
2536
2617
  }
@@ -2604,9 +2685,9 @@ class CheckBox extends PureComponent {
2604
2685
  style: this.getBoxStyle(),
2605
2686
  children: /*#__PURE__*/jsx("div", {
2606
2687
  className: "checkBoxTick",
2607
- children: /*#__PURE__*/jsx(Icon, {
2688
+ children: /*#__PURE__*/jsx(Icon$1, {
2608
2689
  className: "checkBoxTick-font",
2609
- icon: "check"
2690
+ icon: "fa-check"
2610
2691
  })
2611
2692
  })
2612
2693
  }), !_.isEmpty(this.props.label) && /*#__PURE__*/jsx("div", {
@@ -2633,7 +2714,7 @@ var styles$9 = {
2633
2714
 
2634
2715
  function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2635
2716
  function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2636
- class Text extends Component {
2717
+ class Text$1 extends Component {
2637
2718
  getClassName() {
2638
2719
  if (this.props.className) {
2639
2720
  return " ".concat(this.props.className);
@@ -2671,7 +2752,7 @@ class ProfilePicComponent extends Component {
2671
2752
  if (this.props.hoverText) {
2672
2753
  return /*#__PURE__*/jsxs("div", {
2673
2754
  className: "profilePicHover ".concat(this.props.containerClass),
2674
- children: [this.renderPic(), /*#__PURE__*/jsx(Text, {
2755
+ children: [this.renderPic(), /*#__PURE__*/jsx(Text$1, {
2675
2756
  type: "h5",
2676
2757
  className: "profilePicHover_text",
2677
2758
  children: this.props.hoverText
@@ -2777,7 +2858,7 @@ class CommentSection extends Component {
2777
2858
  if (_.isEmpty(threadComments)) {
2778
2859
  return /*#__PURE__*/jsx("div", {
2779
2860
  className: "comment_reply",
2780
- children: /*#__PURE__*/jsx(Text, {
2861
+ children: /*#__PURE__*/jsx(Text$1, {
2781
2862
  className: "comment_reply_button",
2782
2863
  type: "button",
2783
2864
  onClick: () => {
@@ -2796,7 +2877,7 @@ class CommentSection extends Component {
2796
2877
  size: 20,
2797
2878
  image: c.User.profilePic
2798
2879
  });
2799
- }), /*#__PURE__*/jsx(Text, {
2880
+ }), /*#__PURE__*/jsx(Text$1, {
2800
2881
  className: "comment_reply_button",
2801
2882
  type: "button",
2802
2883
  onClick: () => {
@@ -2812,7 +2893,7 @@ class CommentSection extends Component {
2812
2893
  }
2813
2894
  render() {
2814
2895
  return /*#__PURE__*/jsxs("div", {
2815
- children: [this.props.includeTitle && /*#__PURE__*/jsx(Text, {
2896
+ children: [this.props.includeTitle && /*#__PURE__*/jsx(Text$1, {
2816
2897
  type: "formTitleSmall",
2817
2898
  className: "marginBottom-16",
2818
2899
  children: "Comments"
@@ -2827,7 +2908,7 @@ class CommentSection extends Component {
2827
2908
  children: [/*#__PURE__*/jsx("div", {
2828
2909
  className: "commentReply_button".concat(!_.isEmpty(this.state.commentInput) ? " commentReply_button-active" : ""),
2829
2910
  onClick: this.onAddComment,
2830
- children: /*#__PURE__*/jsx(Icon, {
2911
+ children: /*#__PURE__*/jsx(Icon$1, {
2831
2912
  className: "commentReply_icon",
2832
2913
  icon: "paper-plane"
2833
2914
  })
@@ -3085,14 +3166,14 @@ class DatePicker extends Component {
3085
3166
  className: "datepicker__bottomHeader",
3086
3167
  children: /*#__PURE__*/jsxs("div", {
3087
3168
  className: "datepicker__monthSelector",
3088
- children: [/*#__PURE__*/jsx(Icon, {
3169
+ children: [/*#__PURE__*/jsx(Icon$1, {
3089
3170
  className: "datepicker__monthChevron",
3090
3171
  icon: "chevron-left",
3091
3172
  onClick: this.changeMonth.bind(this, -1)
3092
3173
  }), /*#__PURE__*/jsx("p", {
3093
3174
  className: "datepicker__selectedMonth",
3094
3175
  children: this.getMonth()
3095
- }), /*#__PURE__*/jsx(Icon, {
3176
+ }), /*#__PURE__*/jsx(Icon$1, {
3096
3177
  className: "datepicker__monthChevron",
3097
3178
  icon: "chevron-right",
3098
3179
  onClick: this.changeMonth.bind(this, 1)
@@ -3148,7 +3229,7 @@ function DurationInput(_ref) {
3148
3229
  };
3149
3230
  return /*#__PURE__*/jsxs("div", {
3150
3231
  className: "flex flex-center ".concat(className ? className : ""),
3151
- children: [label && /*#__PURE__*/jsx(Text, {
3232
+ children: [label && /*#__PURE__*/jsx(Text$1, {
3152
3233
  type: "formTitleSmall",
3153
3234
  style: {
3154
3235
  marginRight: "10px",
@@ -3166,9 +3247,9 @@ function DurationInput(_ref) {
3166
3247
  width: 50,
3167
3248
  marginRight: 5
3168
3249
  }
3169
- }), /*#__PURE__*/jsx(Text, {
3250
+ }), /*#__PURE__*/jsx(Text$1, {
3170
3251
  type: "formTitleSmall",
3171
- style: {
3252
+ iconStyle: {
3172
3253
  marginRight: 10
3173
3254
  },
3174
3255
  children: "Hour(s)"
@@ -3183,7 +3264,7 @@ function DurationInput(_ref) {
3183
3264
  width: 50,
3184
3265
  marginRight: 5
3185
3266
  }
3186
- }), /*#__PURE__*/jsx(Text, {
3267
+ }), /*#__PURE__*/jsx(Text$1, {
3187
3268
  type: "formTitleSmall",
3188
3269
  children: "Minute(s)"
3189
3270
  })]
@@ -3408,7 +3489,7 @@ class FileInputComponent extends Component {
3408
3489
  getInputProps
3409
3490
  } = state;
3410
3491
  return /*#__PURE__*/jsxs("div", _objectSpread$i(_objectSpread$i({
3411
- style: {
3492
+ iconStyle: {
3412
3493
  padding: 10
3413
3494
  }
3414
3495
  }, getRootProps()), {}, {
@@ -3425,11 +3506,11 @@ class FileInputComponent extends Component {
3425
3506
  }
3426
3507
  return /*#__PURE__*/jsx("div", {
3427
3508
  className: "imageInput_image",
3428
- style: _objectSpread$i({}, this.props.style)
3509
+ iconStyle: _objectSpread$i({}, this.props.style)
3429
3510
  });
3430
3511
  };
3431
3512
  var renderRemove = () => {
3432
- return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon, {
3513
+ return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon$1, {
3433
3514
  icon: "xmark",
3434
3515
  className: "imageInput_removeIcon",
3435
3516
  onClick: this.removeFile.bind(this, input)
@@ -3488,8 +3569,8 @@ class FileInputComponent extends Component {
3488
3569
  }
3489
3570
  }), /*#__PURE__*/jsx("div", {
3490
3571
  className: "imageInput_uploading",
3491
- style: _objectSpread$i({}, this.props.style),
3492
- children: /*#__PURE__*/jsx(Icon, {
3572
+ iconStyle: _objectSpread$i({}, this.props.style),
3573
+ children: /*#__PURE__*/jsx(Icon$1, {
3493
3574
  className: "spinner imageInput_spinner",
3494
3575
  icon: "spinner",
3495
3576
  fixedWidth: true,
@@ -3594,7 +3675,7 @@ class GenericInput extends Component {
3594
3675
  renderInput() {
3595
3676
  if (!_.isUndefined(this.props.inputComponent)) {
3596
3677
  return /*#__PURE__*/jsxs("div", {
3597
- style: _objectSpread$h(_objectSpread$h({}, styles$8.row), {}, {
3678
+ iconStyle: _objectSpread$h(_objectSpread$h({}, styles$8.row), {}, {
3598
3679
  alignItems: "flex-start"
3599
3680
  }),
3600
3681
  children: [this.props.isRequired && /*#__PURE__*/jsx("div", {
@@ -3605,7 +3686,7 @@ class GenericInput extends Component {
3605
3686
  if (!_.isUndefined(this.props.type) && this.props.type === "textarea") {
3606
3687
  // Render expandable text area
3607
3688
  return /*#__PURE__*/jsxs("div", {
3608
- style: _objectSpread$h(_objectSpread$h({}, styles$8.row), {}, {
3689
+ iconStyle: _objectSpread$h(_objectSpread$h({}, styles$8.row), {}, {
3609
3690
  alignItems: "flex-start"
3610
3691
  }),
3611
3692
  children: [this.props.isRequired && /*#__PURE__*/jsx("div", {
@@ -3631,7 +3712,7 @@ class GenericInput extends Component {
3631
3712
  }
3632
3713
  // Render default input
3633
3714
  return /*#__PURE__*/jsxs("div", {
3634
- style: _objectSpread$h(_objectSpread$h({}, styles$8.row), this.props.textWrapperStyle),
3715
+ iconStyle: _objectSpread$h(_objectSpread$h({}, styles$8.row), this.props.textWrapperStyle),
3635
3716
  children: [this.props.isRequired && /*#__PURE__*/jsx("div", {
3636
3717
  className: "inputRequired "
3637
3718
  }), /*#__PURE__*/jsx("input", {
@@ -3659,7 +3740,7 @@ class GenericInput extends Component {
3659
3740
  render() {
3660
3741
  return /*#__PURE__*/jsxs("div", {
3661
3742
  className: this.getClassNames(),
3662
- style: _objectSpread$h({}, this.props.style),
3743
+ iconStyle: _objectSpread$h({}, this.props.style),
3663
3744
  children: [/*#__PURE__*/jsxs("div", {
3664
3745
  style: _objectSpread$h(_objectSpread$h({}, styles$8.row), {}, {
3665
3746
  marginBottom: 0,
@@ -3721,7 +3802,7 @@ class Header extends Component {
3721
3802
  className: "header",
3722
3803
  children: [/*#__PURE__*/jsx("div", {
3723
3804
  id: "leftContainer",
3724
- style: {
3805
+ iconStyle: {
3725
3806
  display: "inline-block"
3726
3807
  },
3727
3808
  children: this.props.children && /*#__PURE__*/jsx("div", {
@@ -3818,14 +3899,14 @@ class SideNavItem extends Component {
3818
3899
  return null;
3819
3900
  }
3820
3901
  return /*#__PURE__*/jsx("div", {
3821
- style: _objectSpread$g(_objectSpread$g({}, styles$7.section), {}, {
3902
+ iconStyle: _objectSpread$g(_objectSpread$g({}, styles$7.section), {}, {
3822
3903
  width: 18,
3823
3904
  marginRight: 16
3824
3905
  }),
3825
- children: /*#__PURE__*/jsx(Icon, {
3906
+ children: /*#__PURE__*/jsx(Icon$1, {
3826
3907
  className: "sideNav-item-icon",
3827
3908
  icon: this.props.Icon,
3828
- style: this.props.style
3909
+ style: this.props.iconStyle
3829
3910
  })
3830
3911
  });
3831
3912
  }
@@ -3835,7 +3916,7 @@ class SideNavItem extends Component {
3835
3916
  style: this.props.style,
3836
3917
  onClick: this.goTo,
3837
3918
  children: [!this.props.noSideDot && /*#__PURE__*/jsx("div", {
3838
- style: _objectSpread$g(_objectSpread$g({}, styles$7.section), {}, {
3919
+ iconStyle: _objectSpread$g(_objectSpread$g({}, styles$7.section), {}, {
3839
3920
  marginRight: 15
3840
3921
  }),
3841
3922
  children: /*#__PURE__*/jsx("div", {
@@ -3938,7 +4019,7 @@ class HubSidebar extends PureComponent {
3938
4019
  }), index);
3939
4020
  }
3940
4021
  renderNavItem(item, index) {
3941
- return /*#__PURE__*/jsx(exportObj$3, {
4022
+ return /*#__PURE__*/jsx(Icon, {
3942
4023
  Text: item.text,
3943
4024
  Icon: item.icon,
3944
4025
  Link: item.url,
@@ -3951,7 +4032,7 @@ class HubSidebar extends PureComponent {
3951
4032
  renderSection(section, index) {
3952
4033
  return /*#__PURE__*/jsxs("div", {
3953
4034
  className: "hubSidebar_section",
3954
- children: [/*#__PURE__*/jsx(Text, {
4035
+ children: [/*#__PURE__*/jsx(Text$1, {
3955
4036
  type: "h3",
3956
4037
  className: "hubSidebar_sectionTitle",
3957
4038
  children: section.title
@@ -3999,7 +4080,7 @@ class Popup extends Component {
3999
4080
  if (!this.props.onClose) {
4000
4081
  return null;
4001
4082
  }
4002
- return /*#__PURE__*/jsx(Icon, {
4083
+ return /*#__PURE__*/jsx(Icon$1, {
4003
4084
  colour: COLOUR_DUSK_LIGHT,
4004
4085
  icon: "xmark",
4005
4086
  className: "popup_closeIcon",
@@ -4041,7 +4122,7 @@ class Popup extends Component {
4041
4122
  className: b.className,
4042
4123
  onClick: b.onClick,
4043
4124
  isActive: b.isActive,
4044
- children: b.loading ? /*#__PURE__*/jsx(Icon, {
4125
+ children: b.loading ? /*#__PURE__*/jsx(Icon$1, {
4045
4126
  pulse: true,
4046
4127
  fixedWidth: true,
4047
4128
  icon: "spinner"
@@ -4065,7 +4146,7 @@ class Popup extends Component {
4065
4146
  leftIcon: b.leftIcon,
4066
4147
  leftIconType: b.leftIconType,
4067
4148
  leftIconColour: b.leftIconColour,
4068
- children: b.loading ? /*#__PURE__*/jsx(Icon, {
4149
+ children: b.loading ? /*#__PURE__*/jsx(Icon$1, {
4069
4150
  pulse: true,
4070
4151
  fixedWidth: true,
4071
4152
  icon: "spinner"
@@ -4658,7 +4739,7 @@ class ImageInputComponent extends Component {
4658
4739
  });
4659
4740
  };
4660
4741
  var renderRemove = () => {
4661
- return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon, {
4742
+ return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon$1, {
4662
4743
  icon: "xmark",
4663
4744
  className: "imageInput_removeIcon",
4664
4745
  onClick: this.removeImage.bind(this, input)
@@ -4720,8 +4801,8 @@ class ImageInputComponent extends Component {
4720
4801
  }
4721
4802
  }), /*#__PURE__*/jsx("div", {
4722
4803
  className: "imageInput_uploading",
4723
- style: _objectSpread$d({}, this.props.style),
4724
- children: /*#__PURE__*/jsx(Icon, {
4804
+ iconStyle: _objectSpread$d({}, this.props.style),
4805
+ children: /*#__PURE__*/jsx(Icon$1, {
4725
4806
  pulse: true,
4726
4807
  fixedWidth: true,
4727
4808
  className: "spinner imageInput_spinner",
@@ -4747,18 +4828,18 @@ class ImageInputComponent extends Component {
4747
4828
  onClick: this.toggleLibraryItem.bind(this, image)
4748
4829
  }), /*#__PURE__*/jsx("div", {
4749
4830
  className: "imageInput_selected",
4750
- children: /*#__PURE__*/jsx(Icon, {
4831
+ children: /*#__PURE__*/jsx(Icon$1, {
4751
4832
  className: "imageInput_selectedIcon",
4752
- icon: "check"
4833
+ icon: "fa-check"
4753
4834
  })
4754
4835
  }), allowDelete && /*#__PURE__*/jsx("div", {
4755
4836
  className: "imageInput_delete",
4756
- children: this.state.deletingImage[image.Value] ? /*#__PURE__*/jsx(Icon, {
4757
- style: styles$6.saveImageSpinner,
4837
+ children: this.state.deletingImage[image.Value] ? /*#__PURE__*/jsx(Icon$1, {
4838
+ iconStyle: styles$6.saveImageSpinner,
4758
4839
  fixedWidth: true,
4759
4840
  pulse: true,
4760
4841
  icon: "spinner"
4761
- }) : /*#__PURE__*/jsx(Icon, {
4842
+ }) : /*#__PURE__*/jsx(Icon$1, {
4762
4843
  className: "imageInput_deleteIcon",
4763
4844
  icon: "circle-minus",
4764
4845
  onClick: event => this.deleteImage(event, image)
@@ -4801,8 +4882,8 @@ class ImageInputComponent extends Component {
4801
4882
  if (this.state.addFolderOpen) {
4802
4883
  return /*#__PURE__*/jsxs("div", {
4803
4884
  className: "imageFolderContainer",
4804
- children: [/*#__PURE__*/jsx(Icon, {
4805
- icon: "folder",
4885
+ children: [/*#__PURE__*/jsx(Icon$1, {
4886
+ name: "folder",
4806
4887
  className: "folderIcon"
4807
4888
  }), /*#__PURE__*/jsx(GenericInput, {
4808
4889
  id: "addFolderInput",
@@ -4817,8 +4898,8 @@ class ImageInputComponent extends Component {
4817
4898
  errorMessage: this.state.saveErrorMessage
4818
4899
  }), isSaving ? /*#__PURE__*/jsx("div", {
4819
4900
  className: "addControlContainer",
4820
- children: /*#__PURE__*/jsx(Icon, {
4821
- style: styles$6.saveFolderSpinner,
4901
+ children: /*#__PURE__*/jsx(Icon$1, {
4902
+ iconStyle: styles$6.saveFolderSpinner,
4822
4903
  icon: "spinner",
4823
4904
  pulse: true,
4824
4905
  fixedWidth: true
@@ -4845,8 +4926,8 @@ class ImageInputComponent extends Component {
4845
4926
  return /*#__PURE__*/jsxs("div", {
4846
4927
  className: "imageFolderContainer",
4847
4928
  onClick: this.addFolder,
4848
- children: [/*#__PURE__*/jsx(Icon, {
4849
- icon: "plus",
4929
+ children: [/*#__PURE__*/jsx(Icon$1, {
4930
+ name: "plus",
4850
4931
  className: "addIcon"
4851
4932
  }), /*#__PURE__*/jsx("div", {
4852
4933
  className: "addText",
@@ -4860,8 +4941,8 @@ class ImageInputComponent extends Component {
4860
4941
  return /*#__PURE__*/jsxs("div", {
4861
4942
  className: "imageFolderContainer",
4862
4943
  onClick: this.selectFolder.bind(this, folder),
4863
- children: [/*#__PURE__*/jsx(Icon, {
4864
- icon: "folder",
4944
+ children: [/*#__PURE__*/jsx(Icon$1, {
4945
+ name: "folder",
4865
4946
  className: "folderIcon"
4866
4947
  }), /*#__PURE__*/jsx("div", {
4867
4948
  className: "folderTitle",
@@ -4873,7 +4954,7 @@ class ImageInputComponent extends Component {
4873
4954
  children: folder.User && folder.User.displayName
4874
4955
  }), /*#__PURE__*/jsx("div", {
4875
4956
  className: "folderAttribute",
4876
- style: {
4957
+ iconStyle: {
4877
4958
  width: "130px"
4878
4959
  },
4879
4960
  children: timeStamp
@@ -4884,15 +4965,15 @@ class ImageInputComponent extends Component {
4884
4965
  paddingRight: "5px"
4885
4966
  },
4886
4967
  children: countText
4887
- }), this.state.deletingFolder[folder.RowId] ? /*#__PURE__*/jsx(Icon, {
4888
- style: styles$6.saveFolderSpinner,
4968
+ }), this.state.deletingFolder[folder.RowId] ? /*#__PURE__*/jsx(Icon$1, {
4969
+ iconStyle: styles$6.saveFolderSpinner,
4889
4970
  icon: "spinner",
4890
4971
  pulse: true,
4891
4972
  fixedWidth: true
4892
4973
  }) : this.canManageLibrary() && /*#__PURE__*/jsx("a", {
4893
4974
  onClick: event => this.deleteFolder(event, folder),
4894
- children: /*#__PURE__*/jsx(Icon, {
4895
- style: styles$6.removeFolderButton,
4975
+ children: /*#__PURE__*/jsx(Icon$1, {
4976
+ iconStyle: styles$6.removeFolderButton,
4896
4977
  icon: "circle-minus"
4897
4978
  })
4898
4979
  })]
@@ -4914,8 +4995,8 @@ class ImageInputComponent extends Component {
4914
4995
  className: "root",
4915
4996
  onClick: this.selectRoot,
4916
4997
  children: "Library"
4917
- }), /*#__PURE__*/jsx(Icon, {
4918
- icon: "angle-left",
4998
+ }), /*#__PURE__*/jsx(Icon$1, {
4999
+ name: "angle-left",
4919
5000
  className: "separator"
4920
5001
  }), /*#__PURE__*/jsx("div", {
4921
5002
  className: "folder",
@@ -4975,7 +5056,7 @@ class ImageInputComponent extends Component {
4975
5056
  className: this.getClassNames(input),
4976
5057
  children: /*#__PURE__*/jsx("div", {
4977
5058
  className: "imageInput_uploading",
4978
- children: /*#__PURE__*/jsx(Icon, {
5059
+ children: /*#__PURE__*/jsx(Icon$1, {
4979
5060
  className: "spinner imageInput_spinner",
4980
5061
  icon: "spinner",
4981
5062
  pulse: true,
@@ -5043,7 +5124,7 @@ class ImageInputComponent extends Component {
5043
5124
  } = state;
5044
5125
  return /*#__PURE__*/jsxs("div", _objectSpread$d(_objectSpread$d({}, getRootProps()), {}, {
5045
5126
  className: "imageInputRight_button",
5046
- children: [/*#__PURE__*/jsx("input", _objectSpread$d({}, getInputProps())), /*#__PURE__*/jsx(Icon, {
5127
+ children: [/*#__PURE__*/jsx("input", _objectSpread$d({}, getInputProps())), /*#__PURE__*/jsx(Icon$1, {
5047
5128
  className: "imageInputRight_button_icon",
5048
5129
  icon: "circle-plus"
5049
5130
  }), /*#__PURE__*/jsx("p", {
@@ -5057,7 +5138,7 @@ class ImageInputComponent extends Component {
5057
5138
  onClick: () => {
5058
5139
  this.selectTab("library");
5059
5140
  },
5060
- children: [/*#__PURE__*/jsx(Icon, {
5141
+ children: [/*#__PURE__*/jsx(Icon$1, {
5061
5142
  className: "imageInputRight_button_icon",
5062
5143
  icon: "image"
5063
5144
  }), /*#__PURE__*/jsx("p", {
@@ -5175,7 +5256,7 @@ class OverlayPage extends Component {
5175
5256
  }
5176
5257
  render() {
5177
5258
  return /*#__PURE__*/jsxs("div", {
5178
- style: _objectSpread$c(_objectSpread$c({}, styles$5.pageWrapper), this.props.style),
5259
+ iconStyle: _objectSpread$c(_objectSpread$c({}, styles$5.pageWrapper), this.props.style),
5179
5260
  children: [/*#__PURE__*/jsx("div", {
5180
5261
  style: _objectSpread$c(_objectSpread$c({}, styles$5.backgroundOverlay), this.props.backgroundStyle)
5181
5262
  }), this.renderContent()]
@@ -5396,7 +5477,7 @@ class RadioButton extends Component {
5396
5477
  return null;
5397
5478
  }
5398
5479
  return /*#__PURE__*/jsx("div", {
5399
- style: _objectSpread$7(_objectSpread$7({}, styles$1.row), this.props.rowStyle),
5480
+ iconStyle: _objectSpread$7(_objectSpread$7({}, styles$1.row), this.props.rowStyle),
5400
5481
  children: this.props.options.map(e => {
5401
5482
  return /*#__PURE__*/jsxs("div", {
5402
5483
  className: this.generateWrapperClassNames(),
@@ -5419,7 +5500,7 @@ class RadioButton extends Component {
5419
5500
  if (!_.isEmpty(this.props.help)) {
5420
5501
  return /*#__PURE__*/jsx("div", {
5421
5502
  className: "genericInput-help",
5422
- style: {
5503
+ iconStyle: {
5423
5504
  marginTop: 4
5424
5505
  },
5425
5506
  children: this.props.help
@@ -5461,7 +5542,7 @@ class Tag extends Component {
5461
5542
  if (!this.props.leftIcon) {
5462
5543
  return null;
5463
5544
  }
5464
- return /*#__PURE__*/jsx(Icon, {
5545
+ return /*#__PURE__*/jsx(Icon$1, {
5465
5546
  icon: this.props.leftIcon,
5466
5547
  className: "tag_icon tag_icon-left ".concat(this.props.leftClick ? "tag_icon-clickable" : ""),
5467
5548
  style: this.props.leftIconStyle,
@@ -5472,7 +5553,7 @@ class Tag extends Component {
5472
5553
  if (!this.props.rightIcon) {
5473
5554
  return null;
5474
5555
  }
5475
- return /*#__PURE__*/jsx(Icon, {
5556
+ return /*#__PURE__*/jsx(Icon$1, {
5476
5557
  icon: this.props.rightIcon,
5477
5558
  className: "tag_icon tag_icon-right ".concat(this.props.rightClick ? "tag_icon-clickable" : ""),
5478
5559
  style: this.props.rightIconStyle,
@@ -5564,7 +5645,7 @@ class SuccessPopup extends Component {
5564
5645
  cursor: "pointer"
5565
5646
  },
5566
5647
  onClick: this.props.closeAction,
5567
- children: /*#__PURE__*/jsx(Icon, {
5648
+ children: /*#__PURE__*/jsx(Icon$1, {
5568
5649
  icon: "xmark"
5569
5650
  })
5570
5651
  });
@@ -5576,9 +5657,9 @@ class SuccessPopup extends Component {
5576
5657
  className: "successPopup",
5577
5658
  children: [this.props.noIcon || /*#__PURE__*/jsx("div", {
5578
5659
  className: "successPopup_tick",
5579
- children: /*#__PURE__*/jsx(Icon, {
5660
+ children: /*#__PURE__*/jsx(Icon$1, {
5580
5661
  className: "successPopup_tick_icon",
5581
- icon: "check"
5662
+ icon: "fa-check"
5582
5663
  })
5583
5664
  }), this.renderClose(), !_.isEmpty(this.props.text) && /*#__PURE__*/jsx("p", {
5584
5665
  className: "successPopup_text",
@@ -5655,7 +5736,7 @@ class Reactions extends Component {
5655
5736
  });
5656
5737
  }
5657
5738
  return /*#__PURE__*/jsxs("div", {
5658
- children: [/*#__PURE__*/jsx(Text, {
5739
+ children: [/*#__PURE__*/jsx(Text$1, {
5659
5740
  type: "formTitleSmall",
5660
5741
  className: "marginBottom-16",
5661
5742
  children: "Reactions"
@@ -5857,7 +5938,7 @@ class UserListing extends Component {
5857
5938
  style: {
5858
5939
  height: this.getSize()
5859
5940
  },
5860
- children: [/*#__PURE__*/jsx(Text, {
5941
+ children: [/*#__PURE__*/jsx(Text$1, {
5861
5942
  type: "name",
5862
5943
  style: this.props.whiteText ? {
5863
5944
  color: "#fff"
@@ -6007,7 +6088,7 @@ class TimePicker extends Component {
6007
6088
  }
6008
6089
  renderClear() {
6009
6090
  if (!this.props.hasClear) return null;
6010
- return /*#__PURE__*/jsx(Icon, {
6091
+ return /*#__PURE__*/jsx(Icon$1, {
6011
6092
  colour: COLOUR_DUSK_LIGHT,
6012
6093
  icon: "xmark",
6013
6094
  className: "timepicker_clear",
@@ -6129,7 +6210,7 @@ class AudienceIncluder extends Component {
6129
6210
  }
6130
6211
  renderSearch() {
6131
6212
  return /*#__PURE__*/jsx("div", {
6132
- style: {},
6213
+ iconStyle: {},
6133
6214
  children: this.state.returnList.map((user, index) => {
6134
6215
  return /*#__PURE__*/jsxs("div", {
6135
6216
  onClick: () => {
@@ -6162,7 +6243,7 @@ class AudienceIncluder extends Component {
6162
6243
  renderUserAdd() {
6163
6244
  return /*#__PURE__*/jsxs("div", {
6164
6245
  className: "",
6165
- style: {
6246
+ iconStyle: {
6166
6247
  backgroundColor: "#fff"
6167
6248
  },
6168
6249
  children: [" ", /*#__PURE__*/jsx(GenericInput, {
@@ -6179,10 +6260,10 @@ class AudienceIncluder extends Component {
6179
6260
  renderAttendees() {
6180
6261
  if (this.state.selectionList && !_.isEmpty(this.state.selectionList)) {
6181
6262
  return /*#__PURE__*/jsxs("div", {
6182
- style: {
6263
+ iconStyle: {
6183
6264
  marginTop: 16
6184
6265
  },
6185
- children: [/*#__PURE__*/jsx(Text, {
6266
+ children: [/*#__PURE__*/jsx(Text$1, {
6186
6267
  type: "formLabel",
6187
6268
  className: "marginBottom-8",
6188
6269
  children: "Selected Users"
@@ -6197,7 +6278,7 @@ class AudienceIncluder extends Component {
6197
6278
  },
6198
6279
  children: [/*#__PURE__*/jsxs("div", {
6199
6280
  className: "flex",
6200
- style: {
6281
+ iconStyle: {
6201
6282
  alignItems: "center"
6202
6283
  },
6203
6284
  children: [/*#__PURE__*/jsx("img", {
@@ -6213,7 +6294,7 @@ class AudienceIncluder extends Component {
6213
6294
  className: "fontMedium fontSize-16 text-dark'",
6214
6295
  children: user.displayName
6215
6296
  })]
6216
- }), /*#__PURE__*/jsx(Icon, {
6297
+ }), /*#__PURE__*/jsx(Icon$1, {
6217
6298
  className: "removeIcon",
6218
6299
  icon: "xmark",
6219
6300
  onClick: () => {
@@ -6385,7 +6466,7 @@ class DropdownInput extends Component {
6385
6466
  autoComplete: "false"
6386
6467
  }), /*#__PURE__*/jsx("div", {
6387
6468
  style: styles.chevronWrapper,
6388
- children: /*#__PURE__*/jsx(Icon, {
6469
+ children: /*#__PURE__*/jsx(Icon$1, {
6389
6470
  style: _objectSpread$5(_objectSpread$5({}, styles.chevron), {}, {
6390
6471
  color: !_.isUndefined(this.props.disabled) && this.props.disabled ? "transparent" : INACTIVE_TEXT
6391
6472
  }),
@@ -6885,12 +6966,12 @@ class AudienceSelector extends Component {
6885
6966
  },
6886
6967
  children: [/*#__PURE__*/jsx("div", {
6887
6968
  className: "flex",
6888
- children: /*#__PURE__*/jsxs(Text, {
6969
+ children: /*#__PURE__*/jsxs(Text$1, {
6889
6970
  type: "formTitleSmall",
6890
6971
  className: "marginBottom-16",
6891
6972
  children: ["Exclude Users From Selection", " ", "(".concat(this.state.excludeList.length, ")")]
6892
6973
  })
6893
- }), /*#__PURE__*/jsx(Icon, {
6974
+ }), /*#__PURE__*/jsx(Icon$1, {
6894
6975
  style: {
6895
6976
  color: COLOUR_DUSK,
6896
6977
  fontSize: 12
@@ -6920,12 +7001,12 @@ class AudienceSelector extends Component {
6920
7001
  },
6921
7002
  children: [/*#__PURE__*/jsx("div", {
6922
7003
  className: "flex",
6923
- children: /*#__PURE__*/jsxs(Text, {
7004
+ children: /*#__PURE__*/jsxs(Text$1, {
6924
7005
  type: "formTitleSmall",
6925
7006
  className: "marginBottom-16",
6926
7007
  children: [this.state.AudienceType !== "User" ? "Add Other" : "Select", " ", "Users ", "(".concat(this.state.includeList.length, ")")]
6927
7008
  })
6928
- }), /*#__PURE__*/jsx(Icon, {
7009
+ }), /*#__PURE__*/jsx(Icon$1, {
6929
7010
  style: {
6930
7011
  color: COLOUR_DUSK,
6931
7012
  fontSize: 12
@@ -6949,10 +7030,10 @@ class AudienceSelector extends Component {
6949
7030
  } = this.props;
6950
7031
  return /*#__PURE__*/jsxs("div", {
6951
7032
  className: "selectedAudienceTags",
6952
- style: {
7033
+ iconStyle: {
6953
7034
  maxWidth
6954
7035
  },
6955
- children: [_.isEmpty(AudienceTagList) && /*#__PURE__*/jsx(Text, {
7036
+ children: [_.isEmpty(AudienceTagList) && /*#__PURE__*/jsx(Text$1, {
6956
7037
  type: "body",
6957
7038
  className: "text-italic",
6958
7039
  children: "No audiences selected"
@@ -6973,7 +7054,7 @@ class AudienceSelector extends Component {
6973
7054
  var tags = this.getAvailableAudienceTags();
6974
7055
  return /*#__PURE__*/jsx("div", {
6975
7056
  className: "availableAudienceTags",
6976
- style: {
7057
+ iconStyle: {
6977
7058
  maxWidth
6978
7059
  },
6979
7060
  children: tags.map(t => {
@@ -6989,10 +7070,10 @@ class AudienceSelector extends Component {
6989
7070
  if (this.state.AudienceType !== "Custom") return null;
6990
7071
  return /*#__PURE__*/jsxs("div", {
6991
7072
  className: "optionsContent_bottom",
6992
- children: [/*#__PURE__*/jsx(Text, {
7073
+ children: [/*#__PURE__*/jsx(Text$1, {
6993
7074
  type: "formLabel",
6994
7075
  children: "Selected Audience"
6995
- }), this.renderAssignedAudiences(), /*#__PURE__*/jsx(Text, {
7076
+ }), this.renderAssignedAudiences(), /*#__PURE__*/jsx(Text$1, {
6996
7077
  type: "formLabel",
6997
7078
  className: "marginTop-32",
6998
7079
  children: "Select Audience"
@@ -7001,7 +7082,7 @@ class AudienceSelector extends Component {
7001
7082
  }
7002
7083
  render() {
7003
7084
  return /*#__PURE__*/jsxs("div", {
7004
- children: [/*#__PURE__*/jsx(Text, {
7085
+ children: [/*#__PURE__*/jsx(Text$1, {
7005
7086
  type: "formTitleSmall",
7006
7087
  className: "marginBottom-16",
7007
7088
  children: this.props.title || "Target Audience"
@@ -7098,42 +7179,42 @@ class TextFormatPopup extends Component {
7098
7179
  children: [/*#__PURE__*/jsxs("p", {
7099
7180
  className: "successPopup_text successPopup_text-small",
7100
7181
  children: [/*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
7101
- style: {
7182
+ iconStyle: {
7102
7183
  fontWeight: 600
7103
7184
  },
7104
7185
  children: "Text formatting:"
7105
7186
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Surround text with ", /*#__PURE__*/jsx("span", {
7106
- style: {
7187
+ iconStyle: {
7107
7188
  fontWeight: 400
7108
7189
  },
7109
7190
  children: "**"
7110
7191
  }), " to create bold text:", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
7111
- style: {
7192
+ iconStyle: {
7112
7193
  fontWeight: 400
7113
7194
  },
7114
7195
  children: "**"
7115
7196
  }), "Some Text", /*#__PURE__*/jsx("span", {
7116
- style: {
7197
+ iconStyle: {
7117
7198
  fontWeight: 400
7118
7199
  },
7119
7200
  children: "**"
7120
7201
  }), " =", " ", /*#__PURE__*/jsx("span", {
7121
- style: {
7202
+ iconStyle: {
7122
7203
  fontWeight: 600
7123
7204
  },
7124
7205
  children: "Some Text"
7125
7206
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Surround text with ", /*#__PURE__*/jsx("span", {
7126
- style: {
7207
+ iconStyle: {
7127
7208
  fontWeight: 400
7128
7209
  },
7129
7210
  children: "*t*"
7130
7211
  }), " to create a title:", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
7131
- style: {
7212
+ iconStyle: {
7132
7213
  fontWeight: 400
7133
7214
  },
7134
7215
  children: "*t*"
7135
7216
  }), "Some Text", /*#__PURE__*/jsx("span", {
7136
- style: {
7217
+ iconStyle: {
7137
7218
  fontWeight: 400
7138
7219
  },
7139
7220
  children: "*t*"
@@ -7145,33 +7226,33 @@ class TextFormatPopup extends Component {
7145
7226
  },
7146
7227
  children: "Some Text"
7147
7228
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Surround text with ", /*#__PURE__*/jsx("span", {
7148
- style: {
7229
+ iconStyle: {
7149
7230
  fontWeight: 400
7150
7231
  },
7151
7232
  children: "*s*"
7152
7233
  }), " to create a smaller title:", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
7153
- style: {
7234
+ iconStyle: {
7154
7235
  fontWeight: 400
7155
7236
  },
7156
7237
  children: "*s*"
7157
7238
  }), "Some Text", /*#__PURE__*/jsx("span", {
7158
- style: {
7239
+ iconStyle: {
7159
7240
  fontWeight: 400
7160
7241
  },
7161
7242
  children: "*s*"
7162
7243
  }), " =", " ", /*#__PURE__*/jsx("span", {
7163
- style: {
7244
+ iconStyle: {
7164
7245
  fontWeight: 600,
7165
7246
  fontSize: 16
7166
7247
  },
7167
7248
  children: "Some Text"
7168
7249
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Create links with", " ", /*#__PURE__*/jsx("span", {
7169
- style: {
7250
+ iconStyle: {
7170
7251
  fontWeight: 400
7171
7252
  },
7172
7253
  children: "[website|text]"
7173
7254
  }), ":", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
7174
- style: {
7255
+ iconStyle: {
7175
7256
  fontWeight: 400
7176
7257
  },
7177
7258
  children: "[https://example.com|Click here]"
@@ -7220,7 +7301,7 @@ class OptionsSection extends Component {
7220
7301
  },
7221
7302
  children: [/*#__PURE__*/jsx("div", {
7222
7303
  className: "optionsButton_iconContainer",
7223
- children: /*#__PURE__*/jsx(Icon, {
7304
+ children: /*#__PURE__*/jsx(Icon$1, {
7224
7305
  className: "optionsButton_icon",
7225
7306
  icon: o.icon
7226
7307
  })
@@ -7448,10 +7529,10 @@ class MakerPopup extends Component {
7448
7529
  if (input.type === "array") {
7449
7530
  return /*#__PURE__*/jsxs("div", {
7450
7531
  className: "marginTop-16",
7451
- children: [/*#__PURE__*/jsx(Text, {
7532
+ children: [/*#__PURE__*/jsx(Text$1, {
7452
7533
  type: "formLabel",
7453
7534
  children: input.title
7454
- }), /*#__PURE__*/jsxs(Text, {
7535
+ }), /*#__PURE__*/jsxs(Text$1, {
7455
7536
  type: "body",
7456
7537
  children: [this.state[input.key].length, " ", getPluralOptions(this.state[input.key].length, "entry", "entries")]
7457
7538
  })]
@@ -7479,7 +7560,7 @@ class MakerPopup extends Component {
7479
7560
  width: 260,
7480
7561
  options: this.state.lottieConfig,
7481
7562
  isClickToPauseDisabled: true
7482
- }, "lottie-layout"), /*#__PURE__*/jsx(Text, {
7563
+ }, "lottie-layout"), /*#__PURE__*/jsx(Text$1, {
7483
7564
  type: "h3",
7484
7565
  className: "marginTop-16",
7485
7566
  children: "Generating"
@@ -7488,7 +7569,7 @@ class MakerPopup extends Component {
7488
7569
  }
7489
7570
  if (this.state.asset) {
7490
7571
  return /*#__PURE__*/jsxs("div", {
7491
- children: [/*#__PURE__*/jsx(Text, {
7572
+ children: [/*#__PURE__*/jsx(Text$1, {
7492
7573
  type: "h4",
7493
7574
  children: "Your file is ready"
7494
7575
  }), /*#__PURE__*/jsx(Button, {
@@ -7692,8 +7773,8 @@ class ExportCsvPopup extends Component {
7692
7773
  maxWidth: 500,
7693
7774
  textAlign: "center"
7694
7775
  },
7695
- children: /*#__PURE__*/jsx(Icon, {
7696
- style: {
7776
+ children: /*#__PURE__*/jsx(Icon$1, {
7777
+ iconStyle: {
7697
7778
  fontSize: 30
7698
7779
  },
7699
7780
  icon: "spinner",
@@ -7767,7 +7848,7 @@ class ExportCsvPopup extends Component {
7767
7848
  hasPadding: true,
7768
7849
  onClose: this.onClose,
7769
7850
  buttons: buttons,
7770
- children: [this.renderTimestampFilter(), /*#__PURE__*/jsx(Text, {
7851
+ children: [this.renderTimestampFilter(), /*#__PURE__*/jsx(Text$1, {
7771
7852
  type: "bodyLarge",
7772
7853
  children: "Select which columns to include in the export"
7773
7854
  }), this.renderContent()]
@@ -7928,7 +8009,7 @@ class ColourOptions extends Component {
7928
8009
  backgroundColor: colour
7929
8010
  },
7930
8011
  onClick: () => this.onColourChange(colour),
7931
- children: /*#__PURE__*/jsx(Icon, {
8012
+ children: /*#__PURE__*/jsx(Icon$1, {
7932
8013
  icon: "check",
7933
8014
  className: "colourQuickChoices_circle_tick"
7934
8015
  })
@@ -8135,7 +8216,7 @@ class ColourPicker extends Component {
8135
8216
  backgroundColor: colour
8136
8217
  },
8137
8218
  onClick: () => this.onColourChange(colour),
8138
- children: /*#__PURE__*/jsx(Icon, {
8219
+ children: /*#__PURE__*/jsx(Icon$1, {
8139
8220
  icon: "check",
8140
8221
  className: "colourQuickChoices_circle_tick"
8141
8222
  })
@@ -8300,6 +8381,148 @@ class ColourPicker extends Component {
8300
8381
  }
8301
8382
  }
8302
8383
 
8384
+ var BAR_HEIGHT = 48;
8385
+ var CHART_PADDING = 10;
8386
+ var BarLabel = _ref => {
8387
+ var {
8388
+ x,
8389
+ y,
8390
+ width,
8391
+ height,
8392
+ value
8393
+ } = _ref;
8394
+ if (!width || width < 30) return null;
8395
+ return /*#__PURE__*/jsx("text", {
8396
+ x: x + 10,
8397
+ y: y + height / 2,
8398
+ fill: "#fff",
8399
+ fontSize: 13,
8400
+ fontWeight: "bold",
8401
+ dominantBaseline: "middle",
8402
+ children: value
8403
+ });
8404
+ };
8405
+ var ComparisonStatBox = _ref2 => {
8406
+ var {
8407
+ title,
8408
+ data,
8409
+ prevText,
8410
+ viewGraphLink,
8411
+ isLoading,
8412
+ borderless,
8413
+ hideTotal
8414
+ } = _ref2;
8415
+ var total = data.reduce((sum, d) => sum + (d.value || 0), 0);
8416
+ var chartHeight = data.length * BAR_HEIGHT + CHART_PADDING;
8417
+ var maxLabelLength = data.reduce((max, d) => Math.max(max, d.name.length), 0);
8418
+ var yAxisWidth = Math.min(Math.max(maxLabelLength * 7, 80), 160);
8419
+ var opacity = isLoading ? 0.3 : 1;
8420
+ var wrapperStyle = borderless ? {
8421
+ opacity,
8422
+ padding: "12px 0"
8423
+ } : {
8424
+ opacity,
8425
+ padding: 20
8426
+ };
8427
+ var wrapperClass = borderless ? "" : "dashboardBox";
8428
+ return /*#__PURE__*/jsxs("div", {
8429
+ className: wrapperClass,
8430
+ style: wrapperStyle,
8431
+ children: [/*#__PURE__*/jsxs("div", {
8432
+ style: {
8433
+ display: "flex",
8434
+ justifyContent: "space-between",
8435
+ alignItems: "center",
8436
+ marginBottom: 8
8437
+ },
8438
+ children: [/*#__PURE__*/jsx(Text$1, {
8439
+ type: "h6",
8440
+ children: title
8441
+ }), !hideTotal && /*#__PURE__*/jsxs("div", {
8442
+ style: {
8443
+ border: "1px solid #e0e0e0",
8444
+ borderRadius: 4,
8445
+ padding: "4px 10px",
8446
+ fontSize: 13
8447
+ },
8448
+ children: ["Total: ", /*#__PURE__*/jsx("strong", {
8449
+ children: total.toLocaleString()
8450
+ })]
8451
+ })]
8452
+ }), /*#__PURE__*/jsx("div", {
8453
+ style: {
8454
+ marginLeft: -8
8455
+ },
8456
+ children: /*#__PURE__*/jsx(ResponsiveContainer, {
8457
+ width: "100%",
8458
+ height: chartHeight,
8459
+ children: /*#__PURE__*/jsxs(BarChart, {
8460
+ data: data,
8461
+ layout: "vertical",
8462
+ margin: {
8463
+ top: 4,
8464
+ right: 4,
8465
+ bottom: 0,
8466
+ left: 0
8467
+ },
8468
+ barCategoryGap: "20%",
8469
+ children: [/*#__PURE__*/jsx(XAxis, {
8470
+ type: "number",
8471
+ hide: true
8472
+ }), /*#__PURE__*/jsx(YAxis, {
8473
+ type: "category",
8474
+ dataKey: "name",
8475
+ width: yAxisWidth,
8476
+ tick: {
8477
+ fontSize: 13
8478
+ },
8479
+ axisLine: false,
8480
+ tickLine: false
8481
+ }), /*#__PURE__*/jsx(Tooltip, {
8482
+ formatter: value => [value.toLocaleString(), title]
8483
+ }), /*#__PURE__*/jsx(Bar, {
8484
+ dataKey: "value",
8485
+ radius: [4, 4, 4, 4],
8486
+ background: {
8487
+ fill: "#f0f0f4",
8488
+ radius: 4
8489
+ },
8490
+ label: BarLabel,
8491
+ children: data.map((entry, index) => /*#__PURE__*/jsx(Cell, {
8492
+ fill: getSiteColour(index)
8493
+ }, entry.name))
8494
+ })]
8495
+ })
8496
+ })
8497
+ }), !borderless && /*#__PURE__*/jsxs("div", {
8498
+ style: {
8499
+ display: "flex",
8500
+ justifyContent: "space-between",
8501
+ alignItems: "center",
8502
+ marginTop: 8,
8503
+ borderTop: "1px solid #f0f0f0",
8504
+ paddingTop: 12
8505
+ },
8506
+ children: [/*#__PURE__*/jsx(Text$1, {
8507
+ type: "help",
8508
+ children: prevText ? "Compared to " + prevText : ""
8509
+ }), viewGraphLink ? /*#__PURE__*/jsx(Link, {
8510
+ to: viewGraphLink + "&title=" + title,
8511
+ children: /*#__PURE__*/jsxs(Text$1, {
8512
+ type: "h5-noUpper",
8513
+ className: "text-link",
8514
+ children: [/*#__PURE__*/jsx(Icon$1, {
8515
+ icon: "chart-line",
8516
+ iconStyle: {
8517
+ marginRight: 4
8518
+ }
8519
+ }), "View Graph"]
8520
+ })
8521
+ }) : /*#__PURE__*/jsx("div", {})]
8522
+ })]
8523
+ });
8524
+ };
8525
+
8303
8526
  var StatBox = _ref => {
8304
8527
  var {
8305
8528
  title,
@@ -8323,19 +8546,19 @@ var StatBox = _ref => {
8323
8546
  className: "dashboardBox dashboardBox-stats dashboardBox-inline".concat(change > 0 ? " dashboardBox-stats-positive" : "").concat(change < 0 ? " dashboardBox-stats-negative" : ""),
8324
8547
  children: [/*#__PURE__*/jsx("div", {
8325
8548
  className: "dashboardBox-stats_title",
8326
- children: /*#__PURE__*/jsx(Text, {
8549
+ children: /*#__PURE__*/jsx(Text$1, {
8327
8550
  type: "h6",
8328
8551
  children: title
8329
8552
  })
8330
8553
  }), /*#__PURE__*/jsxs("div", {
8331
8554
  className: "dashboardBox-stats_mid",
8332
- style: {
8555
+ iconStyle: {
8333
8556
  opacity
8334
8557
  },
8335
- children: [/*#__PURE__*/jsx(Icon, {
8558
+ children: [/*#__PURE__*/jsx(Icon$1, {
8336
8559
  className: "dashboardBox-stats_icon",
8337
8560
  icon: icon
8338
- }), /*#__PURE__*/jsx(Text, {
8561
+ }), /*#__PURE__*/jsx(Text$1, {
8339
8562
  type: "h2",
8340
8563
  className: "dashboardBox-stats_count",
8341
8564
  children: value
@@ -8343,20 +8566,20 @@ var StatBox = _ref => {
8343
8566
  className: "dashboardBox-stats_change",
8344
8567
  children: change === 0 ? "No change" : "".concat(change, "% ").concat(change < 0 ? "↓" : "↑")
8345
8568
  })]
8346
- }), /*#__PURE__*/jsxs(Text, {
8569
+ }), /*#__PURE__*/jsxs(Text$1, {
8347
8570
  type: "help",
8348
- style: {
8571
+ iconStyle: {
8349
8572
  opacity
8350
8573
  },
8351
8574
  children: ["Compared to ", prevText]
8352
8575
  }), viewGraphLink && /*#__PURE__*/jsx(Link, {
8353
8576
  to: "".concat(viewGraphLink, "&title=").concat(title),
8354
- children: /*#__PURE__*/jsxs(Text, {
8577
+ children: /*#__PURE__*/jsxs(Text$1, {
8355
8578
  type: "h5-noUpper",
8356
8579
  className: "text-link marginTop-10",
8357
- children: [/*#__PURE__*/jsx(Icon, {
8580
+ children: [/*#__PURE__*/jsx(Icon$1, {
8358
8581
  icon: "chart-line",
8359
- style: {
8582
+ iconStyle: {
8360
8583
  marginRight: 4
8361
8584
  }
8362
8585
  }), "View Graph"]
@@ -8389,8 +8612,9 @@ var index = /*#__PURE__*/Object.freeze({
8389
8612
  Popup: Popup,
8390
8613
  ProfilePic: ProfilePic,
8391
8614
  RadioButton: RadioButton,
8615
+ Icon: Icon$1,
8392
8616
  Tag: Tag,
8393
- Text: Text,
8617
+ Text: Text$1,
8394
8618
  SideNavItem: exportObj$3,
8395
8619
  StatusButton: StatusButton,
8396
8620
  SuccessPopup: SuccessPopup,
@@ -8407,6 +8631,7 @@ var index = /*#__PURE__*/Object.freeze({
8407
8631
  InputGroup: InputGroup,
8408
8632
  ColourOptions: ColourOptions,
8409
8633
  ColourPicker: ColourPicker,
8634
+ ComparisonStatBox: ComparisonStatBox,
8410
8635
  StatBox: StatBox,
8411
8636
  Tabs: Tabs
8412
8637
  });
@@ -8488,26 +8713,5 @@ var Reducers = {
8488
8713
  scheduledActions: ScheduledActionsReducer
8489
8714
  };
8490
8715
 
8491
- // Categories for organising permissions
8492
- var PERMISSION_CATEGORIES = {
8493
- USER_MANAGEMENT: "User Management",
8494
- EVENTS: "Events",
8495
- COMMUNICATION: "Communication",
8496
- FACILITIES_BOOKINGS: "Facilities & Bookings",
8497
- SITE_ADMINISTRATION: "Site Administration",
8498
- PAYMENTS: "Payments",
8499
- CONTENT: "Content Management",
8500
- EXTRAS: "Extras",
8501
- PROFILE_SETTINGS: "Profile Settings",
8502
- USER_FEATURES: "User Features"
8503
- };
8504
-
8505
- // NOTE: important and optional are currently hidden
8506
- var IMPORTANCE_LEVELS = {
8507
- CRITICAL: "critical",
8508
- IMPORTANT: "important",
8509
- OPTIONAL: "optional"
8510
- };
8511
-
8512
- export { index$1 as Actions, AddButton, analytics as Analytics, AnalyticsFilter, index$2 as Apis, Attachment, toExport as AudienceSelector, Button, CheckBox, ColourOptions, ColourPicker, colours as Colours, Comment, CommentSection, index as Components, CoreConfig as Config, DatePicker, DropdownInput, DurationInput, ExportCsvPopup, FileInput, GenericInput, exportObj$4 as Header, index$3 as Helper, exportObj$2 as HubSidebar, IMPORTANCE_LEVELS, ImageInput, InputGroup, exportObj as MakerPopup, MoreMenu, OptionsSection, OverlayPage, OverlayPageBottomButtons, OverlayPageContents, OverlayPageSection, PERMISSION_CATEGORIES, PageTitle, Popup, ProfilePic, RadioButton, Reactions, Reducers, session as Session, exportObj$3 as SideNavItem, StatBox, StatusButton, SuccessPopup, Tabs, Tag, Text, TextFormatPopup, TimePicker, Urls, UserListing, analyticsActions, authActions, fileActions, profileActions, scheduledActionsActions, stringActions, templateActions, typeActions, userActions, utilityActions };
8716
+ export { index$1 as Actions, analytics as Analytics, index$2 as Apis, colours as Colours, index as Components, CoreConfig as Config, index$3 as Helper, Reducers, session as Session, Urls };
8513
8717
  //# sourceMappingURL=index.js.map