@plusscommunities/pluss-core-web 1.7.6-beta.1 → 1.8.1-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.
@@ -1,5 +1,6 @@
1
1
  import { Component, PureComponent } from 'react';
2
- import { Icon } from '@plusscommunities/pluss-icons';
2
+ import { Icon as Icon$1 } from '@plusscommunities/pluss-icons';
3
+ export { Icon } from '@plusscommunities/pluss-icons';
3
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
6
  import _ from 'lodash';
@@ -20,6 +21,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
20
21
  import { ChromePicker } from 'react-color';
21
22
  import tinycolor from 'tinycolor2';
22
23
  import { Link } from 'react-router-dom';
24
+ import { ResponsiveContainer, BarChart, XAxis, YAxis, Tooltip, Bar, Cell } from 'recharts';
23
25
 
24
26
  class AddButton extends Component {
25
27
  getClasses() {
@@ -30,9 +32,9 @@ class AddButton extends Component {
30
32
  return classes;
31
33
  }
32
34
  renderIcon() {
33
- return /*#__PURE__*/jsx(Icon, {
35
+ return /*#__PURE__*/jsx(Icon$1, {
34
36
  className: "addButton__icon",
35
- icon: this.props.icon || "plus"
37
+ icon: this.props.icon || "fa-plus"
36
38
  });
37
39
  }
38
40
  render() {
@@ -103,16 +105,16 @@ class Attachment extends Component {
103
105
  href: this.props.source,
104
106
  target: "_blank",
105
107
  className: "pdfAttachment_container",
106
- children: [/*#__PURE__*/jsx(Icon, {
108
+ children: [/*#__PURE__*/jsx(Icon$1, {
107
109
  className: "pdfAttachment_icon",
108
110
  pulse: this.props.uploading,
109
111
  fixedWidth: true,
110
- icon: "".concat(this.props.uploading ? "spinner" : "paperclip")
112
+ icon: "".concat(this.props.uploading ? "fa-spinner" : "fa-paperclip")
111
113
  }), /*#__PURE__*/jsx("p", {
112
114
  className: "pdfAttachment_title",
113
115
  children: this.props.title || getFileName(this.props.source)
114
116
  })]
115
- }), this.props.onRemove && /*#__PURE__*/jsx(Icon, {
117
+ }), this.props.onRemove && /*#__PURE__*/jsx(Icon$1, {
116
118
  colour: COLOUR_DUSK_LIGHT,
117
119
  icon: "xmark",
118
120
  className: "pdfAttachment_close",
@@ -161,8 +163,8 @@ class Button extends Component {
161
163
  if (!this.props.leftIcon) {
162
164
  return null;
163
165
  }
164
- return /*#__PURE__*/jsx(Icon, {
165
- icon: this.props.leftIcon,
166
+ return /*#__PURE__*/jsx(Icon$1, {
167
+ name: this.props.leftIcon,
166
168
  className: "buttonTextWithIcon_icon"
167
169
  });
168
170
  }
@@ -236,9 +238,9 @@ class CheckBox extends PureComponent {
236
238
  style: this.getBoxStyle(),
237
239
  children: /*#__PURE__*/jsx("div", {
238
240
  className: "checkBoxTick",
239
- children: /*#__PURE__*/jsx(Icon, {
241
+ children: /*#__PURE__*/jsx(Icon$1, {
240
242
  className: "checkBoxTick-font",
241
- icon: "check"
243
+ icon: "fa-check"
242
244
  })
243
245
  })
244
246
  }), !_.isEmpty(this.props.label) && /*#__PURE__*/jsx("div", {
@@ -417,7 +419,7 @@ var toParagraphed = (text, style) => {
417
419
  var textSplit = text.split("\n");
418
420
  return _.map(textSplit, (t, i) => {
419
421
  return /*#__PURE__*/jsx("span", {
420
- style: _objectSpread$k({
422
+ iconStyle: _objectSpread$k({
421
423
  display: "block"
422
424
  }, style),
423
425
  children: t || "\u00A0"
@@ -434,7 +436,7 @@ var getPluralOptions = (count, singular, plural) => {
434
436
 
435
437
  function ownKeys$j(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; }
436
438
  function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
437
- class Text extends Component {
439
+ class Text$1 extends Component {
438
440
  getClassName() {
439
441
  if (this.props.className) {
440
442
  return " ".concat(this.props.className);
@@ -472,7 +474,7 @@ class ProfilePicComponent extends Component {
472
474
  if (this.props.hoverText) {
473
475
  return /*#__PURE__*/jsxs("div", {
474
476
  className: "profilePicHover ".concat(this.props.containerClass),
475
- children: [this.renderPic(), /*#__PURE__*/jsx(Text, {
477
+ children: [this.renderPic(), /*#__PURE__*/jsx(Text$1, {
476
478
  type: "h5",
477
479
  className: "profilePicHover_text",
478
480
  children: this.props.hoverText
@@ -578,7 +580,7 @@ class CommentSection extends Component {
578
580
  if (_.isEmpty(threadComments)) {
579
581
  return /*#__PURE__*/jsx("div", {
580
582
  className: "comment_reply",
581
- children: /*#__PURE__*/jsx(Text, {
583
+ children: /*#__PURE__*/jsx(Text$1, {
582
584
  className: "comment_reply_button",
583
585
  type: "button",
584
586
  onClick: () => {
@@ -597,7 +599,7 @@ class CommentSection extends Component {
597
599
  size: 20,
598
600
  image: c.User.profilePic
599
601
  });
600
- }), /*#__PURE__*/jsx(Text, {
602
+ }), /*#__PURE__*/jsx(Text$1, {
601
603
  className: "comment_reply_button",
602
604
  type: "button",
603
605
  onClick: () => {
@@ -613,7 +615,7 @@ class CommentSection extends Component {
613
615
  }
614
616
  render() {
615
617
  return /*#__PURE__*/jsxs("div", {
616
- children: [this.props.includeTitle && /*#__PURE__*/jsx(Text, {
618
+ children: [this.props.includeTitle && /*#__PURE__*/jsx(Text$1, {
617
619
  type: "formTitleSmall",
618
620
  className: "marginBottom-16",
619
621
  children: "Comments"
@@ -628,7 +630,7 @@ class CommentSection extends Component {
628
630
  children: [/*#__PURE__*/jsx("div", {
629
631
  className: "commentReply_button".concat(!_.isEmpty(this.state.commentInput) ? " commentReply_button-active" : ""),
630
632
  onClick: this.onAddComment,
631
- children: /*#__PURE__*/jsx(Icon, {
633
+ children: /*#__PURE__*/jsx(Icon$1, {
632
634
  className: "commentReply_icon",
633
635
  icon: "paper-plane"
634
636
  })
@@ -886,14 +888,14 @@ class DatePicker extends Component {
886
888
  className: "datepicker__bottomHeader",
887
889
  children: /*#__PURE__*/jsxs("div", {
888
890
  className: "datepicker__monthSelector",
889
- children: [/*#__PURE__*/jsx(Icon, {
891
+ children: [/*#__PURE__*/jsx(Icon$1, {
890
892
  className: "datepicker__monthChevron",
891
893
  icon: "chevron-left",
892
894
  onClick: this.changeMonth.bind(this, -1)
893
895
  }), /*#__PURE__*/jsx("p", {
894
896
  className: "datepicker__selectedMonth",
895
897
  children: this.getMonth()
896
- }), /*#__PURE__*/jsx(Icon, {
898
+ }), /*#__PURE__*/jsx(Icon$1, {
897
899
  className: "datepicker__monthChevron",
898
900
  icon: "chevron-right",
899
901
  onClick: this.changeMonth.bind(this, 1)
@@ -949,7 +951,7 @@ function DurationInput(_ref) {
949
951
  };
950
952
  return /*#__PURE__*/jsxs("div", {
951
953
  className: "flex flex-center ".concat(className ? className : ""),
952
- children: [label && /*#__PURE__*/jsx(Text, {
954
+ children: [label && /*#__PURE__*/jsx(Text$1, {
953
955
  type: "formTitleSmall",
954
956
  style: {
955
957
  marginRight: "10px",
@@ -967,9 +969,9 @@ function DurationInput(_ref) {
967
969
  width: 50,
968
970
  marginRight: 5
969
971
  }
970
- }), /*#__PURE__*/jsx(Text, {
972
+ }), /*#__PURE__*/jsx(Text$1, {
971
973
  type: "formTitleSmall",
972
- style: {
974
+ iconStyle: {
973
975
  marginRight: 10
974
976
  },
975
977
  children: "Hour(s)"
@@ -984,7 +986,7 @@ function DurationInput(_ref) {
984
986
  width: 50,
985
987
  marginRight: 5
986
988
  }
987
- }), /*#__PURE__*/jsx(Text, {
989
+ }), /*#__PURE__*/jsx(Text$1, {
988
990
  type: "formTitleSmall",
989
991
  children: "Minute(s)"
990
992
  })]
@@ -2309,7 +2311,7 @@ class FileInputComponent extends Component {
2309
2311
  getInputProps
2310
2312
  } = state;
2311
2313
  return /*#__PURE__*/jsxs("div", _objectSpread$g(_objectSpread$g({
2312
- style: {
2314
+ iconStyle: {
2313
2315
  padding: 10
2314
2316
  }
2315
2317
  }, getRootProps()), {}, {
@@ -2326,11 +2328,11 @@ class FileInputComponent extends Component {
2326
2328
  }
2327
2329
  return /*#__PURE__*/jsx("div", {
2328
2330
  className: "imageInput_image",
2329
- style: _objectSpread$g({}, this.props.style)
2331
+ iconStyle: _objectSpread$g({}, this.props.style)
2330
2332
  });
2331
2333
  };
2332
2334
  var renderRemove = () => {
2333
- return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon, {
2335
+ return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon$1, {
2334
2336
  icon: "xmark",
2335
2337
  className: "imageInput_removeIcon",
2336
2338
  onClick: this.removeFile.bind(this, input)
@@ -2389,8 +2391,8 @@ class FileInputComponent extends Component {
2389
2391
  }
2390
2392
  }), /*#__PURE__*/jsx("div", {
2391
2393
  className: "imageInput_uploading",
2392
- style: _objectSpread$g({}, this.props.style),
2393
- children: /*#__PURE__*/jsx(Icon, {
2394
+ iconStyle: _objectSpread$g({}, this.props.style),
2395
+ children: /*#__PURE__*/jsx(Icon$1, {
2394
2396
  className: "spinner imageInput_spinner",
2395
2397
  icon: "spinner",
2396
2398
  fixedWidth: true,
@@ -2495,7 +2497,7 @@ class GenericInput extends Component {
2495
2497
  renderInput() {
2496
2498
  if (!_.isUndefined(this.props.inputComponent)) {
2497
2499
  return /*#__PURE__*/jsxs("div", {
2498
- style: _objectSpread$f(_objectSpread$f({}, styles$8.row), {}, {
2500
+ iconStyle: _objectSpread$f(_objectSpread$f({}, styles$8.row), {}, {
2499
2501
  alignItems: "flex-start"
2500
2502
  }),
2501
2503
  children: [this.props.isRequired && /*#__PURE__*/jsx("div", {
@@ -2506,7 +2508,7 @@ class GenericInput extends Component {
2506
2508
  if (!_.isUndefined(this.props.type) && this.props.type === "textarea") {
2507
2509
  // Render expandable text area
2508
2510
  return /*#__PURE__*/jsxs("div", {
2509
- style: _objectSpread$f(_objectSpread$f({}, styles$8.row), {}, {
2511
+ iconStyle: _objectSpread$f(_objectSpread$f({}, styles$8.row), {}, {
2510
2512
  alignItems: "flex-start"
2511
2513
  }),
2512
2514
  children: [this.props.isRequired && /*#__PURE__*/jsx("div", {
@@ -2532,7 +2534,7 @@ class GenericInput extends Component {
2532
2534
  }
2533
2535
  // Render default input
2534
2536
  return /*#__PURE__*/jsxs("div", {
2535
- style: _objectSpread$f(_objectSpread$f({}, styles$8.row), this.props.textWrapperStyle),
2537
+ iconStyle: _objectSpread$f(_objectSpread$f({}, styles$8.row), this.props.textWrapperStyle),
2536
2538
  children: [this.props.isRequired && /*#__PURE__*/jsx("div", {
2537
2539
  className: "inputRequired "
2538
2540
  }), /*#__PURE__*/jsx("input", {
@@ -2560,7 +2562,7 @@ class GenericInput extends Component {
2560
2562
  render() {
2561
2563
  return /*#__PURE__*/jsxs("div", {
2562
2564
  className: this.getClassNames(),
2563
- style: _objectSpread$f({}, this.props.style),
2565
+ iconStyle: _objectSpread$f({}, this.props.style),
2564
2566
  children: [/*#__PURE__*/jsxs("div", {
2565
2567
  style: _objectSpread$f(_objectSpread$f({}, styles$8.row), {}, {
2566
2568
  marginBottom: 0,
@@ -2668,7 +2670,7 @@ class Header extends Component {
2668
2670
  className: "header",
2669
2671
  children: [/*#__PURE__*/jsx("div", {
2670
2672
  id: "leftContainer",
2671
- style: {
2673
+ iconStyle: {
2672
2674
  display: "inline-block"
2673
2675
  },
2674
2676
  children: this.props.children && /*#__PURE__*/jsx("div", {
@@ -2765,14 +2767,14 @@ class SideNavItem extends Component {
2765
2767
  return null;
2766
2768
  }
2767
2769
  return /*#__PURE__*/jsx("div", {
2768
- style: _objectSpread$e(_objectSpread$e({}, styles$7.section), {}, {
2770
+ iconStyle: _objectSpread$e(_objectSpread$e({}, styles$7.section), {}, {
2769
2771
  width: 18,
2770
2772
  marginRight: 16
2771
2773
  }),
2772
- children: /*#__PURE__*/jsx(Icon, {
2774
+ children: /*#__PURE__*/jsx(Icon$1, {
2773
2775
  className: "sideNav-item-icon",
2774
2776
  icon: this.props.Icon,
2775
- style: this.props.style
2777
+ style: this.props.iconStyle
2776
2778
  })
2777
2779
  });
2778
2780
  }
@@ -2782,7 +2784,7 @@ class SideNavItem extends Component {
2782
2784
  style: this.props.style,
2783
2785
  onClick: this.goTo,
2784
2786
  children: [!this.props.noSideDot && /*#__PURE__*/jsx("div", {
2785
- style: _objectSpread$e(_objectSpread$e({}, styles$7.section), {}, {
2787
+ iconStyle: _objectSpread$e(_objectSpread$e({}, styles$7.section), {}, {
2786
2788
  marginRight: 15
2787
2789
  }),
2788
2790
  children: /*#__PURE__*/jsx("div", {
@@ -2806,6 +2808,7 @@ class SideNavItem extends Component {
2806
2808
  var styles$7 = {
2807
2809
  section: {
2808
2810
  display: "flex",
2811
+ alignItems: "center",
2809
2812
  minHeight: 22
2810
2813
  },
2811
2814
  sideNavDot: {
@@ -2884,7 +2887,7 @@ class HubSidebar extends PureComponent {
2884
2887
  }), index);
2885
2888
  }
2886
2889
  renderNavItem(item, index) {
2887
- return /*#__PURE__*/jsx(exportObj$3, {
2890
+ return /*#__PURE__*/jsx(Icon, {
2888
2891
  Text: item.text,
2889
2892
  Icon: item.icon,
2890
2893
  Link: item.url,
@@ -2897,7 +2900,7 @@ class HubSidebar extends PureComponent {
2897
2900
  renderSection(section, index) {
2898
2901
  return /*#__PURE__*/jsxs("div", {
2899
2902
  className: "hubSidebar_section",
2900
- children: [/*#__PURE__*/jsx(Text, {
2903
+ children: [/*#__PURE__*/jsx(Text$1, {
2901
2904
  type: "h3",
2902
2905
  className: "hubSidebar_sectionTitle",
2903
2906
  children: section.title
@@ -2945,7 +2948,7 @@ class Popup extends Component {
2945
2948
  if (!this.props.onClose) {
2946
2949
  return null;
2947
2950
  }
2948
- return /*#__PURE__*/jsx(Icon, {
2951
+ return /*#__PURE__*/jsx(Icon$1, {
2949
2952
  colour: COLOUR_DUSK_LIGHT,
2950
2953
  icon: "xmark",
2951
2954
  className: "popup_closeIcon",
@@ -2987,7 +2990,7 @@ class Popup extends Component {
2987
2990
  className: b.className,
2988
2991
  onClick: b.onClick,
2989
2992
  isActive: b.isActive,
2990
- children: b.loading ? /*#__PURE__*/jsx(Icon, {
2993
+ children: b.loading ? /*#__PURE__*/jsx(Icon$1, {
2991
2994
  pulse: true,
2992
2995
  fixedWidth: true,
2993
2996
  icon: "spinner"
@@ -3011,7 +3014,7 @@ class Popup extends Component {
3011
3014
  leftIcon: b.leftIcon,
3012
3015
  leftIconType: b.leftIconType,
3013
3016
  leftIconColour: b.leftIconColour,
3014
- children: b.loading ? /*#__PURE__*/jsx(Icon, {
3017
+ children: b.loading ? /*#__PURE__*/jsx(Icon$1, {
3015
3018
  pulse: true,
3016
3019
  fixedWidth: true,
3017
3020
  icon: "spinner"
@@ -3604,7 +3607,7 @@ class ImageInputComponent extends Component {
3604
3607
  });
3605
3608
  };
3606
3609
  var renderRemove = () => {
3607
- return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon, {
3610
+ return !this.props.disableRemove && !this.props.disabled && (this.props.simpleStyle ? /*#__PURE__*/jsx(Icon$1, {
3608
3611
  icon: "xmark",
3609
3612
  className: "imageInput_removeIcon",
3610
3613
  onClick: this.removeImage.bind(this, input)
@@ -3666,8 +3669,8 @@ class ImageInputComponent extends Component {
3666
3669
  }
3667
3670
  }), /*#__PURE__*/jsx("div", {
3668
3671
  className: "imageInput_uploading",
3669
- style: _objectSpread$b({}, this.props.style),
3670
- children: /*#__PURE__*/jsx(Icon, {
3672
+ iconStyle: _objectSpread$b({}, this.props.style),
3673
+ children: /*#__PURE__*/jsx(Icon$1, {
3671
3674
  pulse: true,
3672
3675
  fixedWidth: true,
3673
3676
  className: "spinner imageInput_spinner",
@@ -3693,18 +3696,18 @@ class ImageInputComponent extends Component {
3693
3696
  onClick: this.toggleLibraryItem.bind(this, image)
3694
3697
  }), /*#__PURE__*/jsx("div", {
3695
3698
  className: "imageInput_selected",
3696
- children: /*#__PURE__*/jsx(Icon, {
3699
+ children: /*#__PURE__*/jsx(Icon$1, {
3697
3700
  className: "imageInput_selectedIcon",
3698
- icon: "check"
3701
+ icon: "fa-check"
3699
3702
  })
3700
3703
  }), allowDelete && /*#__PURE__*/jsx("div", {
3701
3704
  className: "imageInput_delete",
3702
- children: this.state.deletingImage[image.Value] ? /*#__PURE__*/jsx(Icon, {
3703
- style: styles$6.saveImageSpinner,
3705
+ children: this.state.deletingImage[image.Value] ? /*#__PURE__*/jsx(Icon$1, {
3706
+ iconStyle: styles$6.saveImageSpinner,
3704
3707
  fixedWidth: true,
3705
3708
  pulse: true,
3706
3709
  icon: "spinner"
3707
- }) : /*#__PURE__*/jsx(Icon, {
3710
+ }) : /*#__PURE__*/jsx(Icon$1, {
3708
3711
  className: "imageInput_deleteIcon",
3709
3712
  icon: "circle-minus",
3710
3713
  onClick: event => this.deleteImage(event, image)
@@ -3747,8 +3750,8 @@ class ImageInputComponent extends Component {
3747
3750
  if (this.state.addFolderOpen) {
3748
3751
  return /*#__PURE__*/jsxs("div", {
3749
3752
  className: "imageFolderContainer",
3750
- children: [/*#__PURE__*/jsx(Icon, {
3751
- icon: "folder",
3753
+ children: [/*#__PURE__*/jsx(Icon$1, {
3754
+ name: "folder",
3752
3755
  className: "folderIcon"
3753
3756
  }), /*#__PURE__*/jsx(GenericInput, {
3754
3757
  id: "addFolderInput",
@@ -3763,8 +3766,8 @@ class ImageInputComponent extends Component {
3763
3766
  errorMessage: this.state.saveErrorMessage
3764
3767
  }), isSaving ? /*#__PURE__*/jsx("div", {
3765
3768
  className: "addControlContainer",
3766
- children: /*#__PURE__*/jsx(Icon, {
3767
- style: styles$6.saveFolderSpinner,
3769
+ children: /*#__PURE__*/jsx(Icon$1, {
3770
+ iconStyle: styles$6.saveFolderSpinner,
3768
3771
  icon: "spinner",
3769
3772
  pulse: true,
3770
3773
  fixedWidth: true
@@ -3791,8 +3794,8 @@ class ImageInputComponent extends Component {
3791
3794
  return /*#__PURE__*/jsxs("div", {
3792
3795
  className: "imageFolderContainer",
3793
3796
  onClick: this.addFolder,
3794
- children: [/*#__PURE__*/jsx(Icon, {
3795
- icon: "plus",
3797
+ children: [/*#__PURE__*/jsx(Icon$1, {
3798
+ name: "plus",
3796
3799
  className: "addIcon"
3797
3800
  }), /*#__PURE__*/jsx("div", {
3798
3801
  className: "addText",
@@ -3806,8 +3809,8 @@ class ImageInputComponent extends Component {
3806
3809
  return /*#__PURE__*/jsxs("div", {
3807
3810
  className: "imageFolderContainer",
3808
3811
  onClick: this.selectFolder.bind(this, folder),
3809
- children: [/*#__PURE__*/jsx(Icon, {
3810
- icon: "folder",
3812
+ children: [/*#__PURE__*/jsx(Icon$1, {
3813
+ name: "folder",
3811
3814
  className: "folderIcon"
3812
3815
  }), /*#__PURE__*/jsx("div", {
3813
3816
  className: "folderTitle",
@@ -3819,7 +3822,7 @@ class ImageInputComponent extends Component {
3819
3822
  children: folder.User && folder.User.displayName
3820
3823
  }), /*#__PURE__*/jsx("div", {
3821
3824
  className: "folderAttribute",
3822
- style: {
3825
+ iconStyle: {
3823
3826
  width: "130px"
3824
3827
  },
3825
3828
  children: timeStamp
@@ -3830,15 +3833,15 @@ class ImageInputComponent extends Component {
3830
3833
  paddingRight: "5px"
3831
3834
  },
3832
3835
  children: countText
3833
- }), this.state.deletingFolder[folder.RowId] ? /*#__PURE__*/jsx(Icon, {
3834
- style: styles$6.saveFolderSpinner,
3836
+ }), this.state.deletingFolder[folder.RowId] ? /*#__PURE__*/jsx(Icon$1, {
3837
+ iconStyle: styles$6.saveFolderSpinner,
3835
3838
  icon: "spinner",
3836
3839
  pulse: true,
3837
3840
  fixedWidth: true
3838
3841
  }) : this.canManageLibrary() && /*#__PURE__*/jsx("a", {
3839
3842
  onClick: event => this.deleteFolder(event, folder),
3840
- children: /*#__PURE__*/jsx(Icon, {
3841
- style: styles$6.removeFolderButton,
3843
+ children: /*#__PURE__*/jsx(Icon$1, {
3844
+ iconStyle: styles$6.removeFolderButton,
3842
3845
  icon: "circle-minus"
3843
3846
  })
3844
3847
  })]
@@ -3860,8 +3863,8 @@ class ImageInputComponent extends Component {
3860
3863
  className: "root",
3861
3864
  onClick: this.selectRoot,
3862
3865
  children: "Library"
3863
- }), /*#__PURE__*/jsx(Icon, {
3864
- icon: "angle-left",
3866
+ }), /*#__PURE__*/jsx(Icon$1, {
3867
+ name: "angle-left",
3865
3868
  className: "separator"
3866
3869
  }), /*#__PURE__*/jsx("div", {
3867
3870
  className: "folder",
@@ -3921,7 +3924,7 @@ class ImageInputComponent extends Component {
3921
3924
  className: this.getClassNames(input),
3922
3925
  children: /*#__PURE__*/jsx("div", {
3923
3926
  className: "imageInput_uploading",
3924
- children: /*#__PURE__*/jsx(Icon, {
3927
+ children: /*#__PURE__*/jsx(Icon$1, {
3925
3928
  className: "spinner imageInput_spinner",
3926
3929
  icon: "spinner",
3927
3930
  pulse: true,
@@ -3989,7 +3992,7 @@ class ImageInputComponent extends Component {
3989
3992
  } = state;
3990
3993
  return /*#__PURE__*/jsxs("div", _objectSpread$b(_objectSpread$b({}, getRootProps()), {}, {
3991
3994
  className: "imageInputRight_button",
3992
- children: [/*#__PURE__*/jsx("input", _objectSpread$b({}, getInputProps())), /*#__PURE__*/jsx(Icon, {
3995
+ children: [/*#__PURE__*/jsx("input", _objectSpread$b({}, getInputProps())), /*#__PURE__*/jsx(Icon$1, {
3993
3996
  className: "imageInputRight_button_icon",
3994
3997
  icon: "circle-plus"
3995
3998
  }), /*#__PURE__*/jsx("p", {
@@ -4003,7 +4006,7 @@ class ImageInputComponent extends Component {
4003
4006
  onClick: () => {
4004
4007
  this.selectTab("library");
4005
4008
  },
4006
- children: [/*#__PURE__*/jsx(Icon, {
4009
+ children: [/*#__PURE__*/jsx(Icon$1, {
4007
4010
  className: "imageInputRight_button_icon",
4008
4011
  icon: "image"
4009
4012
  }), /*#__PURE__*/jsx("p", {
@@ -4121,7 +4124,7 @@ class OverlayPage extends Component {
4121
4124
  }
4122
4125
  render() {
4123
4126
  return /*#__PURE__*/jsxs("div", {
4124
- style: _objectSpread$a(_objectSpread$a({}, styles$5.pageWrapper), this.props.style),
4127
+ iconStyle: _objectSpread$a(_objectSpread$a({}, styles$5.pageWrapper), this.props.style),
4125
4128
  children: [/*#__PURE__*/jsx("div", {
4126
4129
  style: _objectSpread$a(_objectSpread$a({}, styles$5.backgroundOverlay), this.props.backgroundStyle)
4127
4130
  }), this.renderContent()]
@@ -4342,7 +4345,7 @@ class RadioButton extends Component {
4342
4345
  return null;
4343
4346
  }
4344
4347
  return /*#__PURE__*/jsx("div", {
4345
- style: _objectSpread$5(_objectSpread$5({}, styles$1.row), this.props.rowStyle),
4348
+ iconStyle: _objectSpread$5(_objectSpread$5({}, styles$1.row), this.props.rowStyle),
4346
4349
  children: this.props.options.map(e => {
4347
4350
  return /*#__PURE__*/jsxs("div", {
4348
4351
  className: this.generateWrapperClassNames(),
@@ -4365,7 +4368,7 @@ class RadioButton extends Component {
4365
4368
  if (!_.isEmpty(this.props.help)) {
4366
4369
  return /*#__PURE__*/jsx("div", {
4367
4370
  className: "genericInput-help",
4368
- style: {
4371
+ iconStyle: {
4369
4372
  marginTop: 4
4370
4373
  },
4371
4374
  children: this.props.help
@@ -4407,7 +4410,7 @@ class Tag extends Component {
4407
4410
  if (!this.props.leftIcon) {
4408
4411
  return null;
4409
4412
  }
4410
- return /*#__PURE__*/jsx(Icon, {
4413
+ return /*#__PURE__*/jsx(Icon$1, {
4411
4414
  icon: this.props.leftIcon,
4412
4415
  className: "tag_icon tag_icon-left ".concat(this.props.leftClick ? "tag_icon-clickable" : ""),
4413
4416
  style: this.props.leftIconStyle,
@@ -4418,7 +4421,7 @@ class Tag extends Component {
4418
4421
  if (!this.props.rightIcon) {
4419
4422
  return null;
4420
4423
  }
4421
- return /*#__PURE__*/jsx(Icon, {
4424
+ return /*#__PURE__*/jsx(Icon$1, {
4422
4425
  icon: this.props.rightIcon,
4423
4426
  className: "tag_icon tag_icon-right ".concat(this.props.rightClick ? "tag_icon-clickable" : ""),
4424
4427
  style: this.props.rightIconStyle,
@@ -4510,7 +4513,7 @@ class SuccessPopup extends Component {
4510
4513
  cursor: "pointer"
4511
4514
  },
4512
4515
  onClick: this.props.closeAction,
4513
- children: /*#__PURE__*/jsx(Icon, {
4516
+ children: /*#__PURE__*/jsx(Icon$1, {
4514
4517
  icon: "xmark"
4515
4518
  })
4516
4519
  });
@@ -4522,9 +4525,9 @@ class SuccessPopup extends Component {
4522
4525
  className: "successPopup",
4523
4526
  children: [this.props.noIcon || /*#__PURE__*/jsx("div", {
4524
4527
  className: "successPopup_tick",
4525
- children: /*#__PURE__*/jsx(Icon, {
4528
+ children: /*#__PURE__*/jsx(Icon$1, {
4526
4529
  className: "successPopup_tick_icon",
4527
- icon: "check"
4530
+ icon: "fa-check"
4528
4531
  })
4529
4532
  }), this.renderClose(), !_.isEmpty(this.props.text) && /*#__PURE__*/jsx("p", {
4530
4533
  className: "successPopup_text",
@@ -4601,7 +4604,7 @@ class Reactions extends Component {
4601
4604
  });
4602
4605
  }
4603
4606
  return /*#__PURE__*/jsxs("div", {
4604
- children: [/*#__PURE__*/jsx(Text, {
4607
+ children: [/*#__PURE__*/jsx(Text$1, {
4605
4608
  type: "formTitleSmall",
4606
4609
  className: "marginBottom-16",
4607
4610
  children: "Reactions"
@@ -4613,6 +4616,37 @@ class Reactions extends Component {
4613
4616
  }
4614
4617
  }
4615
4618
 
4619
+ // Distinct colour palette for multi-site comparison charts.
4620
+ // Uses a fixed palette rather than each site's MainBrandingColour because:
4621
+ // 1. Site branding colours aren't pre-loaded — only the active site's branding is in Redux state.
4622
+ // Fetching branding for each comparison site would require extra API calls.
4623
+ // 2. Two sites could share the same or similar branding colour, making bars indistinguishable.
4624
+ // 3. A curated palette guarantees contrast and visual distinctiveness.
4625
+ // Future enhancement: use site branding colours with collision fallback to this palette.
4626
+ // Wraps around via modulo for 10+ sites (unlikely in practice).
4627
+ var SITE_COLOURS = ["#5e9efc",
4628
+ // Blue
4629
+ "#49bdbb",
4630
+ // Teal
4631
+ "#ff8c75",
4632
+ // Tangerine
4633
+ "#6e79c5",
4634
+ // Purple
4635
+ "#00cc9c",
4636
+ // Green
4637
+ "#c02743",
4638
+ // Red
4639
+ "#bdbd27",
4640
+ // Citron
4641
+ "#191e78",
4642
+ // Dark Blue
4643
+ "#ff6363",
4644
+ // Grapefruit
4645
+ "#536280" // Dusk
4646
+ ];
4647
+ var getSiteColour = index => {
4648
+ return SITE_COLOURS[index % SITE_COLOURS.length];
4649
+ };
4616
4650
  var getAnalyticsFilterOptions = () => {
4617
4651
  return [{
4618
4652
  text: "Yesterday",
@@ -4835,7 +4869,7 @@ class UserListing extends Component {
4835
4869
  style: {
4836
4870
  height: this.getSize()
4837
4871
  },
4838
- children: [/*#__PURE__*/jsx(Text, {
4872
+ children: [/*#__PURE__*/jsx(Text$1, {
4839
4873
  type: "name",
4840
4874
  style: this.props.whiteText ? {
4841
4875
  color: "#fff"
@@ -4985,7 +5019,7 @@ class TimePicker extends Component {
4985
5019
  }
4986
5020
  renderClear() {
4987
5021
  if (!this.props.hasClear) return null;
4988
- return /*#__PURE__*/jsx(Icon, {
5022
+ return /*#__PURE__*/jsx(Icon$1, {
4989
5023
  colour: COLOUR_DUSK_LIGHT,
4990
5024
  icon: "xmark",
4991
5025
  className: "timepicker_clear",
@@ -5107,7 +5141,7 @@ class AudienceIncluder extends Component {
5107
5141
  }
5108
5142
  renderSearch() {
5109
5143
  return /*#__PURE__*/jsx("div", {
5110
- style: {},
5144
+ iconStyle: {},
5111
5145
  children: this.state.returnList.map((user, index) => {
5112
5146
  return /*#__PURE__*/jsxs("div", {
5113
5147
  onClick: () => {
@@ -5140,7 +5174,7 @@ class AudienceIncluder extends Component {
5140
5174
  renderUserAdd() {
5141
5175
  return /*#__PURE__*/jsxs("div", {
5142
5176
  className: "",
5143
- style: {
5177
+ iconStyle: {
5144
5178
  backgroundColor: "#fff"
5145
5179
  },
5146
5180
  children: [" ", /*#__PURE__*/jsx(GenericInput, {
@@ -5157,10 +5191,10 @@ class AudienceIncluder extends Component {
5157
5191
  renderAttendees() {
5158
5192
  if (this.state.selectionList && !_.isEmpty(this.state.selectionList)) {
5159
5193
  return /*#__PURE__*/jsxs("div", {
5160
- style: {
5194
+ iconStyle: {
5161
5195
  marginTop: 16
5162
5196
  },
5163
- children: [/*#__PURE__*/jsx(Text, {
5197
+ children: [/*#__PURE__*/jsx(Text$1, {
5164
5198
  type: "formLabel",
5165
5199
  className: "marginBottom-8",
5166
5200
  children: "Selected Users"
@@ -5175,7 +5209,7 @@ class AudienceIncluder extends Component {
5175
5209
  },
5176
5210
  children: [/*#__PURE__*/jsxs("div", {
5177
5211
  className: "flex",
5178
- style: {
5212
+ iconStyle: {
5179
5213
  alignItems: "center"
5180
5214
  },
5181
5215
  children: [/*#__PURE__*/jsx("img", {
@@ -5191,7 +5225,7 @@ class AudienceIncluder extends Component {
5191
5225
  className: "fontMedium fontSize-16 text-dark'",
5192
5226
  children: user.displayName
5193
5227
  })]
5194
- }), /*#__PURE__*/jsx(Icon, {
5228
+ }), /*#__PURE__*/jsx(Icon$1, {
5195
5229
  className: "removeIcon",
5196
5230
  icon: "xmark",
5197
5231
  onClick: () => {
@@ -5363,7 +5397,7 @@ class DropdownInput extends Component {
5363
5397
  autoComplete: "false"
5364
5398
  }), /*#__PURE__*/jsx("div", {
5365
5399
  style: styles.chevronWrapper,
5366
- children: /*#__PURE__*/jsx(Icon, {
5400
+ children: /*#__PURE__*/jsx(Icon$1, {
5367
5401
  style: _objectSpread$3(_objectSpread$3({}, styles.chevron), {}, {
5368
5402
  color: !_.isUndefined(this.props.disabled) && this.props.disabled ? "transparent" : INACTIVE_TEXT
5369
5403
  }),
@@ -5863,12 +5897,12 @@ class AudienceSelector extends Component {
5863
5897
  },
5864
5898
  children: [/*#__PURE__*/jsx("div", {
5865
5899
  className: "flex",
5866
- children: /*#__PURE__*/jsxs(Text, {
5900
+ children: /*#__PURE__*/jsxs(Text$1, {
5867
5901
  type: "formTitleSmall",
5868
5902
  className: "marginBottom-16",
5869
5903
  children: ["Exclude Users From Selection", " ", "(".concat(this.state.excludeList.length, ")")]
5870
5904
  })
5871
- }), /*#__PURE__*/jsx(Icon, {
5905
+ }), /*#__PURE__*/jsx(Icon$1, {
5872
5906
  style: {
5873
5907
  color: COLOUR_DUSK,
5874
5908
  fontSize: 12
@@ -5898,12 +5932,12 @@ class AudienceSelector extends Component {
5898
5932
  },
5899
5933
  children: [/*#__PURE__*/jsx("div", {
5900
5934
  className: "flex",
5901
- children: /*#__PURE__*/jsxs(Text, {
5935
+ children: /*#__PURE__*/jsxs(Text$1, {
5902
5936
  type: "formTitleSmall",
5903
5937
  className: "marginBottom-16",
5904
5938
  children: [this.state.AudienceType !== "User" ? "Add Other" : "Select", " ", "Users ", "(".concat(this.state.includeList.length, ")")]
5905
5939
  })
5906
- }), /*#__PURE__*/jsx(Icon, {
5940
+ }), /*#__PURE__*/jsx(Icon$1, {
5907
5941
  style: {
5908
5942
  color: COLOUR_DUSK,
5909
5943
  fontSize: 12
@@ -5927,10 +5961,10 @@ class AudienceSelector extends Component {
5927
5961
  } = this.props;
5928
5962
  return /*#__PURE__*/jsxs("div", {
5929
5963
  className: "selectedAudienceTags",
5930
- style: {
5964
+ iconStyle: {
5931
5965
  maxWidth
5932
5966
  },
5933
- children: [_.isEmpty(AudienceTagList) && /*#__PURE__*/jsx(Text, {
5967
+ children: [_.isEmpty(AudienceTagList) && /*#__PURE__*/jsx(Text$1, {
5934
5968
  type: "body",
5935
5969
  className: "text-italic",
5936
5970
  children: "No audiences selected"
@@ -5951,7 +5985,7 @@ class AudienceSelector extends Component {
5951
5985
  var tags = this.getAvailableAudienceTags();
5952
5986
  return /*#__PURE__*/jsx("div", {
5953
5987
  className: "availableAudienceTags",
5954
- style: {
5988
+ iconStyle: {
5955
5989
  maxWidth
5956
5990
  },
5957
5991
  children: tags.map(t => {
@@ -5967,10 +6001,10 @@ class AudienceSelector extends Component {
5967
6001
  if (this.state.AudienceType !== "Custom") return null;
5968
6002
  return /*#__PURE__*/jsxs("div", {
5969
6003
  className: "optionsContent_bottom",
5970
- children: [/*#__PURE__*/jsx(Text, {
6004
+ children: [/*#__PURE__*/jsx(Text$1, {
5971
6005
  type: "formLabel",
5972
6006
  children: "Selected Audience"
5973
- }), this.renderAssignedAudiences(), /*#__PURE__*/jsx(Text, {
6007
+ }), this.renderAssignedAudiences(), /*#__PURE__*/jsx(Text$1, {
5974
6008
  type: "formLabel",
5975
6009
  className: "marginTop-32",
5976
6010
  children: "Select Audience"
@@ -5979,7 +6013,7 @@ class AudienceSelector extends Component {
5979
6013
  }
5980
6014
  render() {
5981
6015
  return /*#__PURE__*/jsxs("div", {
5982
- children: [/*#__PURE__*/jsx(Text, {
6016
+ children: [/*#__PURE__*/jsx(Text$1, {
5983
6017
  type: "formTitleSmall",
5984
6018
  className: "marginBottom-16",
5985
6019
  children: this.props.title || "Target Audience"
@@ -6076,42 +6110,42 @@ class TextFormatPopup extends Component {
6076
6110
  children: [/*#__PURE__*/jsxs("p", {
6077
6111
  className: "successPopup_text successPopup_text-small",
6078
6112
  children: [/*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
6079
- style: {
6113
+ iconStyle: {
6080
6114
  fontWeight: 600
6081
6115
  },
6082
6116
  children: "Text formatting:"
6083
6117
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Surround text with ", /*#__PURE__*/jsx("span", {
6084
- style: {
6118
+ iconStyle: {
6085
6119
  fontWeight: 400
6086
6120
  },
6087
6121
  children: "**"
6088
6122
  }), " to create bold text:", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
6089
- style: {
6123
+ iconStyle: {
6090
6124
  fontWeight: 400
6091
6125
  },
6092
6126
  children: "**"
6093
6127
  }), "Some Text", /*#__PURE__*/jsx("span", {
6094
- style: {
6128
+ iconStyle: {
6095
6129
  fontWeight: 400
6096
6130
  },
6097
6131
  children: "**"
6098
6132
  }), " =", " ", /*#__PURE__*/jsx("span", {
6099
- style: {
6133
+ iconStyle: {
6100
6134
  fontWeight: 600
6101
6135
  },
6102
6136
  children: "Some Text"
6103
6137
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Surround text with ", /*#__PURE__*/jsx("span", {
6104
- style: {
6138
+ iconStyle: {
6105
6139
  fontWeight: 400
6106
6140
  },
6107
6141
  children: "*t*"
6108
6142
  }), " to create a title:", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
6109
- style: {
6143
+ iconStyle: {
6110
6144
  fontWeight: 400
6111
6145
  },
6112
6146
  children: "*t*"
6113
6147
  }), "Some Text", /*#__PURE__*/jsx("span", {
6114
- style: {
6148
+ iconStyle: {
6115
6149
  fontWeight: 400
6116
6150
  },
6117
6151
  children: "*t*"
@@ -6123,33 +6157,33 @@ class TextFormatPopup extends Component {
6123
6157
  },
6124
6158
  children: "Some Text"
6125
6159
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Surround text with ", /*#__PURE__*/jsx("span", {
6126
- style: {
6160
+ iconStyle: {
6127
6161
  fontWeight: 400
6128
6162
  },
6129
6163
  children: "*s*"
6130
6164
  }), " to create a smaller title:", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
6131
- style: {
6165
+ iconStyle: {
6132
6166
  fontWeight: 400
6133
6167
  },
6134
6168
  children: "*s*"
6135
6169
  }), "Some Text", /*#__PURE__*/jsx("span", {
6136
- style: {
6170
+ iconStyle: {
6137
6171
  fontWeight: 400
6138
6172
  },
6139
6173
  children: "*s*"
6140
6174
  }), " =", " ", /*#__PURE__*/jsx("span", {
6141
- style: {
6175
+ iconStyle: {
6142
6176
  fontWeight: 600,
6143
6177
  fontSize: 16
6144
6178
  },
6145
6179
  children: "Some Text"
6146
6180
  }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("br", {}), "Create links with", " ", /*#__PURE__*/jsx("span", {
6147
- style: {
6181
+ iconStyle: {
6148
6182
  fontWeight: 400
6149
6183
  },
6150
6184
  children: "[website|text]"
6151
6185
  }), ":", /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx("span", {
6152
- style: {
6186
+ iconStyle: {
6153
6187
  fontWeight: 400
6154
6188
  },
6155
6189
  children: "[https://example.com|Click here]"
@@ -6198,7 +6232,7 @@ class OptionsSection extends Component {
6198
6232
  },
6199
6233
  children: [/*#__PURE__*/jsx("div", {
6200
6234
  className: "optionsButton_iconContainer",
6201
- children: /*#__PURE__*/jsx(Icon, {
6235
+ children: /*#__PURE__*/jsx(Icon$1, {
6202
6236
  className: "optionsButton_icon",
6203
6237
  icon: o.icon
6204
6238
  })
@@ -6426,10 +6460,10 @@ class MakerPopup extends Component {
6426
6460
  if (input.type === "array") {
6427
6461
  return /*#__PURE__*/jsxs("div", {
6428
6462
  className: "marginTop-16",
6429
- children: [/*#__PURE__*/jsx(Text, {
6463
+ children: [/*#__PURE__*/jsx(Text$1, {
6430
6464
  type: "formLabel",
6431
6465
  children: input.title
6432
- }), /*#__PURE__*/jsxs(Text, {
6466
+ }), /*#__PURE__*/jsxs(Text$1, {
6433
6467
  type: "body",
6434
6468
  children: [this.state[input.key].length, " ", getPluralOptions(this.state[input.key].length, "entry", "entries")]
6435
6469
  })]
@@ -6457,7 +6491,7 @@ class MakerPopup extends Component {
6457
6491
  width: 260,
6458
6492
  options: this.state.lottieConfig,
6459
6493
  isClickToPauseDisabled: true
6460
- }, "lottie-layout"), /*#__PURE__*/jsx(Text, {
6494
+ }, "lottie-layout"), /*#__PURE__*/jsx(Text$1, {
6461
6495
  type: "h3",
6462
6496
  className: "marginTop-16",
6463
6497
  children: "Generating"
@@ -6466,7 +6500,7 @@ class MakerPopup extends Component {
6466
6500
  }
6467
6501
  if (this.state.asset) {
6468
6502
  return /*#__PURE__*/jsxs("div", {
6469
- children: [/*#__PURE__*/jsx(Text, {
6503
+ children: [/*#__PURE__*/jsx(Text$1, {
6470
6504
  type: "h4",
6471
6505
  children: "Your file is ready"
6472
6506
  }), /*#__PURE__*/jsx(Button, {
@@ -6670,8 +6704,8 @@ class ExportCsvPopup extends Component {
6670
6704
  maxWidth: 500,
6671
6705
  textAlign: "center"
6672
6706
  },
6673
- children: /*#__PURE__*/jsx(Icon, {
6674
- style: {
6707
+ children: /*#__PURE__*/jsx(Icon$1, {
6708
+ iconStyle: {
6675
6709
  fontSize: 30
6676
6710
  },
6677
6711
  icon: "spinner",
@@ -6745,7 +6779,7 @@ class ExportCsvPopup extends Component {
6745
6779
  hasPadding: true,
6746
6780
  onClose: this.onClose,
6747
6781
  buttons: buttons,
6748
- children: [this.renderTimestampFilter(), /*#__PURE__*/jsx(Text, {
6782
+ children: [this.renderTimestampFilter(), /*#__PURE__*/jsx(Text$1, {
6749
6783
  type: "bodyLarge",
6750
6784
  children: "Select which columns to include in the export"
6751
6785
  }), this.renderContent()]
@@ -6906,7 +6940,7 @@ class ColourOptions extends Component {
6906
6940
  backgroundColor: colour
6907
6941
  },
6908
6942
  onClick: () => this.onColourChange(colour),
6909
- children: /*#__PURE__*/jsx(Icon, {
6943
+ children: /*#__PURE__*/jsx(Icon$1, {
6910
6944
  icon: "check",
6911
6945
  className: "colourQuickChoices_circle_tick"
6912
6946
  })
@@ -7113,7 +7147,7 @@ class ColourPicker extends Component {
7113
7147
  backgroundColor: colour
7114
7148
  },
7115
7149
  onClick: () => this.onColourChange(colour),
7116
- children: /*#__PURE__*/jsx(Icon, {
7150
+ children: /*#__PURE__*/jsx(Icon$1, {
7117
7151
  icon: "check",
7118
7152
  className: "colourQuickChoices_circle_tick"
7119
7153
  })
@@ -7278,6 +7312,148 @@ class ColourPicker extends Component {
7278
7312
  }
7279
7313
  }
7280
7314
 
7315
+ var BAR_HEIGHT = 48;
7316
+ var CHART_PADDING = 10;
7317
+ var BarLabel = _ref => {
7318
+ var {
7319
+ x,
7320
+ y,
7321
+ width,
7322
+ height,
7323
+ value
7324
+ } = _ref;
7325
+ if (!width || width < 30) return null;
7326
+ return /*#__PURE__*/jsx("text", {
7327
+ x: x + 10,
7328
+ y: y + height / 2,
7329
+ fill: "#fff",
7330
+ fontSize: 13,
7331
+ fontWeight: "bold",
7332
+ dominantBaseline: "middle",
7333
+ children: value
7334
+ });
7335
+ };
7336
+ var ComparisonStatBox = _ref2 => {
7337
+ var {
7338
+ title,
7339
+ data,
7340
+ prevText,
7341
+ viewGraphLink,
7342
+ isLoading,
7343
+ borderless,
7344
+ hideTotal
7345
+ } = _ref2;
7346
+ var total = data.reduce((sum, d) => sum + (d.value || 0), 0);
7347
+ var chartHeight = data.length * BAR_HEIGHT + CHART_PADDING;
7348
+ var maxLabelLength = data.reduce((max, d) => Math.max(max, d.name.length), 0);
7349
+ var yAxisWidth = Math.min(Math.max(maxLabelLength * 7, 80), 160);
7350
+ var opacity = isLoading ? 0.3 : 1;
7351
+ var wrapperStyle = borderless ? {
7352
+ opacity,
7353
+ padding: "12px 0"
7354
+ } : {
7355
+ opacity,
7356
+ padding: 20
7357
+ };
7358
+ var wrapperClass = borderless ? "" : "dashboardBox";
7359
+ return /*#__PURE__*/jsxs("div", {
7360
+ className: wrapperClass,
7361
+ style: wrapperStyle,
7362
+ children: [/*#__PURE__*/jsxs("div", {
7363
+ style: {
7364
+ display: "flex",
7365
+ justifyContent: "space-between",
7366
+ alignItems: "center",
7367
+ marginBottom: 8
7368
+ },
7369
+ children: [/*#__PURE__*/jsx(Text$1, {
7370
+ type: "h6",
7371
+ children: title
7372
+ }), !hideTotal && /*#__PURE__*/jsxs("div", {
7373
+ style: {
7374
+ border: "1px solid #e0e0e0",
7375
+ borderRadius: 4,
7376
+ padding: "4px 10px",
7377
+ fontSize: 13
7378
+ },
7379
+ children: ["Total: ", /*#__PURE__*/jsx("strong", {
7380
+ children: total.toLocaleString()
7381
+ })]
7382
+ })]
7383
+ }), /*#__PURE__*/jsx("div", {
7384
+ style: {
7385
+ marginLeft: -8
7386
+ },
7387
+ children: /*#__PURE__*/jsx(ResponsiveContainer, {
7388
+ width: "100%",
7389
+ height: chartHeight,
7390
+ children: /*#__PURE__*/jsxs(BarChart, {
7391
+ data: data,
7392
+ layout: "vertical",
7393
+ margin: {
7394
+ top: 4,
7395
+ right: 4,
7396
+ bottom: 0,
7397
+ left: 0
7398
+ },
7399
+ barCategoryGap: "20%",
7400
+ children: [/*#__PURE__*/jsx(XAxis, {
7401
+ type: "number",
7402
+ hide: true
7403
+ }), /*#__PURE__*/jsx(YAxis, {
7404
+ type: "category",
7405
+ dataKey: "name",
7406
+ width: yAxisWidth,
7407
+ tick: {
7408
+ fontSize: 13
7409
+ },
7410
+ axisLine: false,
7411
+ tickLine: false
7412
+ }), /*#__PURE__*/jsx(Tooltip, {
7413
+ formatter: value => [value.toLocaleString(), title]
7414
+ }), /*#__PURE__*/jsx(Bar, {
7415
+ dataKey: "value",
7416
+ radius: [4, 4, 4, 4],
7417
+ background: {
7418
+ fill: "#f0f0f4",
7419
+ radius: 4
7420
+ },
7421
+ label: BarLabel,
7422
+ children: data.map((entry, index) => /*#__PURE__*/jsx(Cell, {
7423
+ fill: getSiteColour(index)
7424
+ }, entry.name))
7425
+ })]
7426
+ })
7427
+ })
7428
+ }), !borderless && /*#__PURE__*/jsxs("div", {
7429
+ style: {
7430
+ display: "flex",
7431
+ justifyContent: "space-between",
7432
+ alignItems: "center",
7433
+ marginTop: 8,
7434
+ borderTop: "1px solid #f0f0f0",
7435
+ paddingTop: 12
7436
+ },
7437
+ children: [/*#__PURE__*/jsx(Text$1, {
7438
+ type: "help",
7439
+ children: prevText ? "Compared to " + prevText : ""
7440
+ }), viewGraphLink ? /*#__PURE__*/jsx(Link, {
7441
+ to: viewGraphLink + "&title=" + title,
7442
+ children: /*#__PURE__*/jsxs(Text$1, {
7443
+ type: "h5-noUpper",
7444
+ className: "text-link",
7445
+ children: [/*#__PURE__*/jsx(Icon$1, {
7446
+ icon: "chart-line",
7447
+ iconStyle: {
7448
+ marginRight: 4
7449
+ }
7450
+ }), "View Graph"]
7451
+ })
7452
+ }) : /*#__PURE__*/jsx("div", {})]
7453
+ })]
7454
+ });
7455
+ };
7456
+
7281
7457
  var StatBox = _ref => {
7282
7458
  var {
7283
7459
  title,
@@ -7301,19 +7477,19 @@ var StatBox = _ref => {
7301
7477
  className: "dashboardBox dashboardBox-stats dashboardBox-inline".concat(change > 0 ? " dashboardBox-stats-positive" : "").concat(change < 0 ? " dashboardBox-stats-negative" : ""),
7302
7478
  children: [/*#__PURE__*/jsx("div", {
7303
7479
  className: "dashboardBox-stats_title",
7304
- children: /*#__PURE__*/jsx(Text, {
7480
+ children: /*#__PURE__*/jsx(Text$1, {
7305
7481
  type: "h6",
7306
7482
  children: title
7307
7483
  })
7308
7484
  }), /*#__PURE__*/jsxs("div", {
7309
7485
  className: "dashboardBox-stats_mid",
7310
- style: {
7486
+ iconStyle: {
7311
7487
  opacity
7312
7488
  },
7313
- children: [/*#__PURE__*/jsx(Icon, {
7489
+ children: [/*#__PURE__*/jsx(Icon$1, {
7314
7490
  className: "dashboardBox-stats_icon",
7315
7491
  icon: icon
7316
- }), /*#__PURE__*/jsx(Text, {
7492
+ }), /*#__PURE__*/jsx(Text$1, {
7317
7493
  type: "h2",
7318
7494
  className: "dashboardBox-stats_count",
7319
7495
  children: value
@@ -7321,20 +7497,20 @@ var StatBox = _ref => {
7321
7497
  className: "dashboardBox-stats_change",
7322
7498
  children: change === 0 ? "No change" : "".concat(change, "% ").concat(change < 0 ? "↓" : "↑")
7323
7499
  })]
7324
- }), /*#__PURE__*/jsxs(Text, {
7500
+ }), /*#__PURE__*/jsxs(Text$1, {
7325
7501
  type: "help",
7326
- style: {
7502
+ iconStyle: {
7327
7503
  opacity
7328
7504
  },
7329
7505
  children: ["Compared to ", prevText]
7330
7506
  }), viewGraphLink && /*#__PURE__*/jsx(Link, {
7331
7507
  to: "".concat(viewGraphLink, "&title=").concat(title),
7332
- children: /*#__PURE__*/jsxs(Text, {
7508
+ children: /*#__PURE__*/jsxs(Text$1, {
7333
7509
  type: "h5-noUpper",
7334
7510
  className: "text-link marginTop-10",
7335
- children: [/*#__PURE__*/jsx(Icon, {
7511
+ children: [/*#__PURE__*/jsx(Icon$1, {
7336
7512
  icon: "chart-line",
7337
- style: {
7513
+ iconStyle: {
7338
7514
  marginRight: 4
7339
7515
  }
7340
7516
  }), "View Graph"]
@@ -7343,5 +7519,5 @@ var StatBox = _ref => {
7343
7519
  });
7344
7520
  };
7345
7521
 
7346
- export { AddButton, AnalyticsFilter, Attachment, toExport as AudienceSelector, Button, CheckBox, ColourOptions, ColourPicker, Comment, CommentSection, DatePicker, DropdownInput, DurationInput, ExportCsvPopup, FileInput, GenericInput, exportObj$4 as Header, exportObj$2 as HubSidebar, ImageInput, InputGroup, exportObj as MakerPopup, MoreMenu, OptionsSection, OverlayPage, OverlayPageBottomButtons, OverlayPageContents, OverlayPageSection, PageTitle, Popup, ProfilePic, RadioButton, Reactions, exportObj$3 as SideNavItem, StatBox, StatusButton, SuccessPopup, Tabs, Tag, Text, TextFormatPopup, TimePicker, UserListing };
7522
+ export { AddButton, AnalyticsFilter, Attachment, toExport as AudienceSelector, Button, CheckBox, ColourOptions, ColourPicker, Comment, CommentSection, ComparisonStatBox, DatePicker, DropdownInput, DurationInput, ExportCsvPopup, FileInput, GenericInput, exportObj$4 as Header, exportObj$2 as HubSidebar, ImageInput, InputGroup, exportObj as MakerPopup, MoreMenu, OptionsSection, OverlayPage, OverlayPageBottomButtons, OverlayPageContents, OverlayPageSection, PageTitle, Popup, ProfilePic, RadioButton, Reactions, exportObj$3 as SideNavItem, StatBox, StatusButton, SuccessPopup, Tabs, Tag, Text$1 as Text, TextFormatPopup, TimePicker, UserListing };
7347
7523
  //# sourceMappingURL=components.js.map