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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1193,12 +1193,12 @@ function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t
1193
1193
  class CheckBox extends PureComponent {
1194
1194
  constructor() {
1195
1195
  super(...arguments);
1196
- _defineProperty(this, "onChange", e => {
1196
+ this.onChange = e => {
1197
1197
  if (this.props.disabled) {
1198
1198
  return;
1199
1199
  }
1200
1200
  return this.props.onChange(e);
1201
- });
1201
+ };
1202
1202
  }
1203
1203
  generateClassNames() {
1204
1204
  var result = 'checkBox';
@@ -1550,12 +1550,12 @@ class CommentSection extends Component {
1550
1550
  var _this;
1551
1551
  super(props);
1552
1552
  _this = this;
1553
- _defineProperty(this, "onHandleChange", event => {
1553
+ this.onHandleChange = event => {
1554
1554
  var stateChange = {};
1555
1555
  stateChange[event.target.getAttribute('id')] = event.target.value;
1556
1556
  this.setState(stateChange);
1557
- });
1558
- _defineProperty(this, "onAddComment", /*#__PURE__*/_asyncToGenerator(function* () {
1557
+ };
1558
+ this.onAddComment = /*#__PURE__*/_asyncToGenerator(function* () {
1559
1559
  var {
1560
1560
  commentInput
1561
1561
  } = _this.state;
@@ -1563,16 +1563,16 @@ class CommentSection extends Component {
1563
1563
  commentInput: ''
1564
1564
  });
1565
1565
  _this.props.onAddComment(commentInput);
1566
- }));
1567
- _defineProperty(this, "getComments", () => {
1566
+ });
1567
+ this.getComments = () => {
1568
1568
  if (!this.props.onlyParents) {
1569
1569
  return this.props.comments;
1570
1570
  }
1571
1571
  return _.filter(this.props.comments, c => {
1572
1572
  return !c.ParentId;
1573
1573
  });
1574
- });
1575
- _defineProperty(this, "renderReplyText", c => {
1574
+ };
1575
+ this.renderReplyText = c => {
1576
1576
  if (!this.props.onOpenThread) {
1577
1577
  return null;
1578
1578
  }
@@ -1610,7 +1610,7 @@ class CommentSection extends Component {
1610
1610
  children: "".concat(threadComments.length, " repl").concat(getPluralOptions(threadComments.length, 'y', 'ies'))
1611
1611
  })]
1612
1612
  });
1613
- });
1613
+ };
1614
1614
  this.state = {
1615
1615
  commentInput: ''
1616
1616
  };
@@ -1654,10 +1654,10 @@ function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t
1654
1654
  class P60Icon extends Component {
1655
1655
  constructor() {
1656
1656
  super(...arguments);
1657
- _defineProperty(this, "state", {
1657
+ this.state = {
1658
1658
  doublePaths: ['add-image', 'add-circle', 'facility', 'news'],
1659
1659
  triplePaths: []
1660
- });
1660
+ };
1661
1661
  }
1662
1662
  renderIconPaths() {
1663
1663
  if (_.includes(this.state.doublePaths, this.props.icon)) {
@@ -1693,10 +1693,10 @@ class P60Icon extends Component {
1693
1693
  class DatePicker extends Component {
1694
1694
  constructor() {
1695
1695
  super(...arguments);
1696
- _defineProperty(this, "state", {
1696
+ this.state = {
1697
1697
  shownMonth: new Date(),
1698
1698
  grid: []
1699
- });
1699
+ };
1700
1700
  }
1701
1701
  UNSAFE_componentWillMount() {
1702
1702
  this.onNewProps(this.props, true);
@@ -3147,13 +3147,13 @@ class FileInputComponent extends Component {
3147
3147
  var _this;
3148
3148
  super(...arguments);
3149
3149
  _this = this;
3150
- _defineProperty(this, "state", {
3150
+ this.state = {
3151
3151
  inputs: [{
3152
3152
  uploadingFile: false,
3153
3153
  value: ""
3154
3154
  }]
3155
- });
3156
- _defineProperty(this, "getAccept", () => {
3155
+ };
3156
+ this.getAccept = () => {
3157
3157
  if (typeof this.props.accept === "object") {
3158
3158
  return this.props.accept;
3159
3159
  }
@@ -3164,8 +3164,8 @@ class FileInputComponent extends Component {
3164
3164
  return accept;
3165
3165
  }
3166
3166
  return null;
3167
- });
3168
- _defineProperty(this, "checkRefreshCallback", inputs => {
3167
+ };
3168
+ this.checkRefreshCallback = inputs => {
3169
3169
  if (_.isUndefined(this.props.refreshCallback)) {
3170
3170
  return;
3171
3171
  }
@@ -3182,8 +3182,8 @@ class FileInputComponent extends Component {
3182
3182
  });
3183
3183
  this.props.refreshCallback(files);
3184
3184
  }
3185
- });
3186
- _defineProperty(this, "onDrop", files => {
3185
+ };
3186
+ this.onDrop = files => {
3187
3187
  if (this.props.multiple) {
3188
3188
  var newInputs = _.clone(this.state.inputs);
3189
3189
  files.forEach(file => {
@@ -3206,8 +3206,8 @@ class FileInputComponent extends Component {
3206
3206
  } else {
3207
3207
  this.handleFile(this.state.inputs[0], files[0]);
3208
3208
  }
3209
- });
3210
- _defineProperty(this, "handleFile", /*#__PURE__*/function () {
3209
+ };
3210
+ this.handleFile = /*#__PURE__*/function () {
3211
3211
  var _ref = _asyncToGenerator(function* (input, file) {
3212
3212
  if (!file || input.uploadingFile) {
3213
3213
  return;
@@ -3237,7 +3237,7 @@ class FileInputComponent extends Component {
3237
3237
  return function (_x, _x2) {
3238
3238
  return _ref.apply(this, arguments);
3239
3239
  };
3240
- }());
3240
+ }();
3241
3241
  }
3242
3242
  componentDidMount() {
3243
3243
  setTimeout(() => {
@@ -3676,14 +3676,14 @@ var setNavData = data => {
3676
3676
  class Header extends Component {
3677
3677
  constructor() {
3678
3678
  super(...arguments);
3679
- _defineProperty(this, "goToHelpGuide", () => {
3679
+ this.goToHelpGuide = () => {
3680
3680
  window.open('https://www.plusscommunities.com/user-guide', '_blank');
3681
- });
3682
- _defineProperty(this, "toggleSideMenu", () => {
3681
+ };
3682
+ this.toggleSideMenu = () => {
3683
3683
  this.props.setNavData({
3684
3684
  isSideMenuOpen: !this.props.isSideMenuOpen
3685
3685
  });
3686
- });
3686
+ };
3687
3687
  }
3688
3688
  getHomeLink() {
3689
3689
  this.props.history.replace('/');
@@ -3770,7 +3770,7 @@ function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t
3770
3770
  class SideNavItem extends Component {
3771
3771
  constructor(props) {
3772
3772
  super(props);
3773
- _defineProperty(this, "goTo", () => {
3773
+ this.goTo = () => {
3774
3774
  if (this.props.onClick) {
3775
3775
  return this.props.onClick();
3776
3776
  }
@@ -3778,7 +3778,7 @@ class SideNavItem extends Component {
3778
3778
  this.props.onUrlChange();
3779
3779
  }
3780
3780
  this.props.history.push(this.props.Link);
3781
- });
3781
+ };
3782
3782
  this.state = {
3783
3783
  url: window.location.pathname
3784
3784
  };
@@ -3882,7 +3882,7 @@ function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t
3882
3882
  class HubSidebar extends PureComponent {
3883
3883
  constructor(props) {
3884
3884
  super(props);
3885
- _defineProperty(this, "renderHelpGuide", () => {
3885
+ this.renderHelpGuide = () => {
3886
3886
  if (!this.props.helpGuide) return null;
3887
3887
  var {
3888
3888
  text,
@@ -3903,7 +3903,7 @@ class HubSidebar extends PureComponent {
3903
3903
  children: text || 'Help Guide'
3904
3904
  })
3905
3905
  });
3906
- });
3906
+ };
3907
3907
  this.state = {
3908
3908
  showSidebar: false
3909
3909
  };
@@ -4109,7 +4109,7 @@ class ImageInputComponent extends Component {
4109
4109
  var _this;
4110
4110
  super(...arguments);
4111
4111
  _this = this;
4112
- _defineProperty(this, "state", {
4112
+ this.state = {
4113
4113
  selectedTab: "upload",
4114
4114
  inputs: [{
4115
4115
  uploadingImage: false,
@@ -4128,8 +4128,8 @@ class ImageInputComponent extends Component {
4128
4128
  addFolderInput: "",
4129
4129
  selectedFolder: null,
4130
4130
  saveErrorMessage: ""
4131
- });
4132
- _defineProperty(this, "getAccept", () => {
4131
+ };
4132
+ this.getAccept = () => {
4133
4133
  var accept = {
4134
4134
  "image/*": [".jpeg", ".png"]
4135
4135
  };
@@ -4137,12 +4137,12 @@ class ImageInputComponent extends Component {
4137
4137
  accept["video/*"] = [".mp4"];
4138
4138
  }
4139
4139
  return accept;
4140
- });
4141
- _defineProperty(this, "refreshFolders", /*#__PURE__*/_asyncToGenerator(function* () {
4140
+ };
4141
+ this.refreshFolders = /*#__PURE__*/_asyncToGenerator(function* () {
4142
4142
  var res = yield fileActions.getMediaFolders(_this.props.auth.site);
4143
4143
  return res.data;
4144
- }));
4145
- _defineProperty(this, "checkRefreshCallback", inputs => {
4144
+ });
4145
+ this.checkRefreshCallback = inputs => {
4146
4146
  if (_.isUndefined(this.props.refreshCallback)) {
4147
4147
  return;
4148
4148
  }
@@ -4159,8 +4159,8 @@ class ImageInputComponent extends Component {
4159
4159
  });
4160
4160
  this.props.refreshCallback(images);
4161
4161
  }
4162
- });
4163
- _defineProperty(this, "parseImagesArray", images => {
4162
+ };
4163
+ this.parseImagesArray = images => {
4164
4164
  return _.map(images, f => {
4165
4165
  var uri = typeof f === "string" ? f : f.uri;
4166
4166
  var image1400 = get1400(uri);
@@ -4171,24 +4171,24 @@ class ImageInputComponent extends Component {
4171
4171
  Selected: _.some(this.state.inputs, input => input.value === uri || input.value === image1400)
4172
4172
  };
4173
4173
  });
4174
- });
4175
- _defineProperty(this, "addFolder", () => {
4174
+ };
4175
+ this.addFolder = () => {
4176
4176
  this.setState({
4177
4177
  addFolderOpen: true
4178
4178
  }, () => {
4179
4179
  var input = document.getElementById("addFolderInput");
4180
4180
  if (input) input.focus();
4181
4181
  });
4182
- });
4183
- _defineProperty(this, "cancelAddStates", {
4182
+ };
4183
+ this.cancelAddStates = {
4184
4184
  addFolderOpen: false,
4185
4185
  addFolderInput: "",
4186
4186
  saveErrorMessage: ""
4187
- });
4188
- _defineProperty(this, "cancelAddFolder", () => {
4187
+ };
4188
+ this.cancelAddFolder = () => {
4189
4189
  this.setState(this.cancelAddStates);
4190
- });
4191
- _defineProperty(this, "saveFolder", () => {
4190
+ };
4191
+ this.saveFolder = () => {
4192
4192
  this.setState({
4193
4193
  addingFolder: true
4194
4194
  }, /*#__PURE__*/_asyncToGenerator(function* () {
@@ -4207,26 +4207,26 @@ class ImageInputComponent extends Component {
4207
4207
  });
4208
4208
  }
4209
4209
  }));
4210
- });
4211
- _defineProperty(this, "isStockFolder", folder => {
4210
+ };
4211
+ this.isStockFolder = folder => {
4212
4212
  if (!folder) folder = this.state.selectedFolder;
4213
4213
  return folder && _.isNil(folder.RowId);
4214
- });
4215
- _defineProperty(this, "selectFolder", selectedFolder => {
4214
+ };
4215
+ this.selectFolder = selectedFolder => {
4216
4216
  if (!this.isStockFolder(selectedFolder)) {
4217
4217
  selectedFolder.parsedImages = this.parseImagesArray(selectedFolder.Images);
4218
4218
  }
4219
4219
  this.setState({
4220
4220
  selectedFolder
4221
4221
  });
4222
- });
4223
- _defineProperty(this, "selectRoot", () => {
4222
+ };
4223
+ this.selectRoot = () => {
4224
4224
  this.getFolders();
4225
4225
  this.setState({
4226
4226
  selectedFolder: null
4227
4227
  });
4228
- });
4229
- _defineProperty(this, "onDrop", function (files) {
4228
+ };
4229
+ this.onDrop = function (files) {
4230
4230
  var fromLibrary = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4231
4231
  if (_this.props.multiple) {
4232
4232
  var newInputs = _.clone(_this.state.inputs);
@@ -4252,8 +4252,8 @@ class ImageInputComponent extends Component {
4252
4252
  } else {
4253
4253
  _this.handleFile(_this.state.inputs[0], files[0]);
4254
4254
  }
4255
- });
4256
- _defineProperty(this, "handleFile", /*#__PURE__*/function () {
4255
+ };
4256
+ this.handleFile = /*#__PURE__*/function () {
4257
4257
  var _ref3 = _asyncToGenerator(function* (input, file) {
4258
4258
  if (!file || input.uploadingImage) {
4259
4259
  return;
@@ -4281,13 +4281,13 @@ class ImageInputComponent extends Component {
4281
4281
  return function (_x, _x2) {
4282
4282
  return _ref3.apply(this, arguments);
4283
4283
  };
4284
- }());
4285
- _defineProperty(this, "handleChange", event => {
4284
+ }();
4285
+ this.handleChange = event => {
4286
4286
  var stateChange = {};
4287
4287
  stateChange[event.target.getAttribute("id")] = event.target.value;
4288
4288
  this.setState(stateChange);
4289
- });
4290
- _defineProperty(this, "deleteFolder", (event, folder) => {
4289
+ };
4290
+ this.deleteFolder = (event, folder) => {
4291
4291
  event.stopPropagation();
4292
4292
  if (window.confirm("Are you sure you want to delete ".concat(folder.Name, "?"))) {
4293
4293
  var deletingFolder = _objectSpread$b({}, this.state.deletingFolder);
@@ -4312,8 +4312,8 @@ class ImageInputComponent extends Component {
4312
4312
  }
4313
4313
  }));
4314
4314
  }
4315
- });
4316
- _defineProperty(this, "deleteImage", (event, image) => {
4315
+ };
4316
+ this.deleteImage = (event, image) => {
4317
4317
  if (window.confirm("Are you sure you want to delete the image?")) {
4318
4318
  // Unselect the image first if selected
4319
4319
  if (image.Selected) this.toggleLibraryItem(image);
@@ -4348,13 +4348,13 @@ class ImageInputComponent extends Component {
4348
4348
  }
4349
4349
  }));
4350
4350
  }
4351
- });
4352
- _defineProperty(this, "canManageLibrary", () => {
4351
+ };
4352
+ this.canManageLibrary = () => {
4353
4353
  return validateAccess(this.props.auth.site, "manageImageLibrary", this.props.auth);
4354
- });
4355
- _defineProperty(this, "canAddImageToLibrary", () => {
4354
+ };
4355
+ this.canAddImageToLibrary = () => {
4356
4356
  return validateAccess(this.props.auth.site, "addToImageLibrary", this.props.auth);
4357
- });
4357
+ };
4358
4358
  }
4359
4359
  UNSAFE_componentWillMount() {
4360
4360
  setTimeout(() => {
@@ -5600,9 +5600,9 @@ var getReactions = () => {
5600
5600
  class Reactions extends Component {
5601
5601
  constructor() {
5602
5602
  super(...arguments);
5603
- _defineProperty(this, "state", {
5603
+ this.state = {
5604
5604
  reactions: getReactions()
5605
- });
5605
+ };
5606
5606
  }
5607
5607
  getReaction(key) {
5608
5608
  if (this.props.reactions) {
@@ -5695,7 +5695,7 @@ var getAnalyticsFilterOptions = () => {
5695
5695
  class AnalyticsFilter extends PureComponent {
5696
5696
  constructor(props) {
5697
5697
  super(props);
5698
- _defineProperty(this, "renderOptions", () => {
5698
+ this.renderOptions = () => {
5699
5699
  return this.state.filterOptions.map(ev => {
5700
5700
  if (this.props.hideOptions && _.includes(this.props.hideOptions, ev.dayCount)) {
5701
5701
  return null;
@@ -5706,8 +5706,8 @@ class AnalyticsFilter extends PureComponent {
5706
5706
  children: ev.text
5707
5707
  }, ev.dayCount);
5708
5708
  });
5709
- });
5710
- _defineProperty(this, "selectFilter", key => {
5709
+ };
5710
+ this.selectFilter = key => {
5711
5711
  var selectedFilter = _.find(this.state.filterOptions, o => {
5712
5712
  return o.dayCount === key;
5713
5713
  });
@@ -5720,16 +5720,16 @@ class AnalyticsFilter extends PureComponent {
5720
5720
  }, () => {
5721
5721
  this.props.filterChanged(selectedFilter);
5722
5722
  });
5723
- });
5724
- _defineProperty(this, "getDateRangeText", (start, end) => {
5723
+ };
5724
+ this.getDateRangeText = (start, end) => {
5725
5725
  return "".concat(moment(start).format("DD/MM/YYYY"), " to ").concat(moment(end).format("DD/MM/YYYY"));
5726
- });
5727
- _defineProperty(this, "toggleDateSelectors", () => {
5726
+ };
5727
+ this.toggleDateSelectors = () => {
5728
5728
  this.setState({
5729
5729
  calendarVisible: !this.state.calendarVisible
5730
5730
  });
5731
- });
5732
- _defineProperty(this, "startDateChanged", date => {
5731
+ };
5732
+ this.startDateChanged = date => {
5733
5733
  if (moment(date).isSameOrBefore(this.state.endDate)) {
5734
5734
  this.setState({
5735
5735
  startDate: date,
@@ -5738,8 +5738,8 @@ class AnalyticsFilter extends PureComponent {
5738
5738
  this.props.filterDateRangeChanged(this.state.startDate, this.state.endDate);
5739
5739
  });
5740
5740
  }
5741
- });
5742
- _defineProperty(this, "endDateChanged", date => {
5741
+ };
5742
+ this.endDateChanged = date => {
5743
5743
  if (moment(date).isSameOrAfter(this.state.startDate)) {
5744
5744
  this.setState({
5745
5745
  endDate: date,
@@ -5748,7 +5748,7 @@ class AnalyticsFilter extends PureComponent {
5748
5748
  this.props.filterDateRangeChanged(this.state.startDate, this.state.endDate);
5749
5749
  });
5750
5750
  }
5751
- });
5751
+ };
5752
5752
  var filterOptions = getAnalyticsFilterOptions();
5753
5753
  var _selectedFilter = this.props.defaultFilter || filterOptions[1];
5754
5754
  this.state = {
@@ -5901,17 +5901,17 @@ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t
5901
5901
  class TimePicker extends Component {
5902
5902
  constructor() {
5903
5903
  super(...arguments);
5904
- _defineProperty(this, "state", {
5904
+ this.state = {
5905
5905
  id: randomString(),
5906
5906
  selectedTime: this.props.optional ? this.props.selectedTime : moment(),
5907
5907
  grid: [],
5908
5908
  hourInput: "",
5909
5909
  minuteInput: "",
5910
5910
  mInput: ""
5911
- });
5912
- _defineProperty(this, "onClear", () => {
5911
+ };
5912
+ this.onClear = () => {
5913
5913
  this.props.selectTime(undefined);
5914
- });
5914
+ };
5915
5915
  }
5916
5916
  UNSAFE_componentWillMount() {
5917
5917
  this.onNewProps(this.props, !this.props.optional);
@@ -43026,7 +43026,7 @@ class DropdownInput extends Component {
43026
43026
  * Handle value selection from dropdown
43027
43027
  * @param {string} newValue - The selected option key
43028
43028
  */
43029
- _defineProperty(this, "handleValueChange", newValue => {
43029
+ this.handleValueChange = newValue => {
43030
43030
  this.setState({
43031
43031
  selectedValue: newValue
43032
43032
  });
@@ -43041,7 +43041,7 @@ class DropdownInput extends Component {
43041
43041
  };
43042
43042
  this.props.onChange(syntheticEvent);
43043
43043
  }
43044
- });
43044
+ };
43045
43045
  this.state = {
43046
43046
  selectedValue: props.value || ''
43047
43047
  };
@@ -43248,7 +43248,7 @@ class AudienceSelector extends Component {
43248
43248
  var _this;
43249
43249
  super(props);
43250
43250
  _this = this;
43251
- _defineProperty(this, "onChangeSelection", () => {
43251
+ this.onChangeSelection = () => {
43252
43252
  var {
43253
43253
  updateValidation,
43254
43254
  onChange
@@ -43256,19 +43256,19 @@ class AudienceSelector extends Component {
43256
43256
  var isValid = this.validateAudienceSelection();
43257
43257
  if (updateValidation) updateValidation(isValid);
43258
43258
  if (onChange) onChange(this.getAudienceType(), this.getAudienceTypeSelection(), isValid);
43259
- });
43260
- _defineProperty(this, "selectTag", key => {
43259
+ };
43260
+ this.selectTag = key => {
43261
43261
  this.setState({
43262
43262
  Tag: key,
43263
43263
  includeList: [],
43264
43264
  excludeList: []
43265
43265
  });
43266
43266
  setTimeout(this.onChangeSelection, 50);
43267
- });
43268
- _defineProperty(this, "validateCustom", () => {
43267
+ };
43268
+ this.validateCustom = () => {
43269
43269
  return !_.isEmpty(this.state.AudienceTagList);
43270
- });
43271
- _defineProperty(this, "getAvailableAudienceTags", function () {
43270
+ };
43271
+ this.getAvailableAudienceTags = function () {
43272
43272
  var includeSelected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
43273
43273
  var {
43274
43274
  categories,
@@ -43302,19 +43302,19 @@ class AudienceSelector extends Component {
43302
43302
  });
43303
43303
  var result = [...categoryTags, ...userTypeTags, ...userTagTags];
43304
43304
  return includeSelected ? result : result.filter(t => !_.some(AudienceTagList, at => at.Id === t.Id));
43305
- });
43306
- _defineProperty(this, "onAttachAudienceTag", tag => {
43305
+ };
43306
+ this.onAttachAudienceTag = tag => {
43307
43307
  var AudienceTagList = [...this.state.AudienceTagList, tag];
43308
43308
  this.setState({
43309
43309
  AudienceTagList
43310
43310
  }, this.onChangeSelection);
43311
- });
43312
- _defineProperty(this, "onDetachAudienceTag", tag => {
43311
+ };
43312
+ this.onDetachAudienceTag = tag => {
43313
43313
  var AudienceTagList = _.filter(this.state.AudienceTagList, at => at.Id !== tag.Id);
43314
43314
  this.setState({
43315
43315
  AudienceTagList
43316
43316
  }, this.onChangeSelection);
43317
- });
43317
+ };
43318
43318
  this.state = {
43319
43319
  categories: [{
43320
43320
  Title: "All Primary Users",
@@ -44082,27 +44082,27 @@ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t
44082
44082
  class MakerPopup extends Component {
44083
44083
  constructor(props) {
44084
44084
  super(props);
44085
- _defineProperty(this, "selectSize", size => {
44085
+ this.selectSize = size => {
44086
44086
  this.setState({
44087
44087
  selectedSize: size
44088
44088
  });
44089
- });
44090
- _defineProperty(this, "getSelectedSizeTitle", () => {
44089
+ };
44090
+ this.getSelectedSizeTitle = () => {
44091
44091
  return _.find(this.sizes, f => {
44092
44092
  return f.Key === this.state.selectedSize;
44093
44093
  }).Title;
44094
- });
44095
- _defineProperty(this, "selectFormat", format => {
44094
+ };
44095
+ this.selectFormat = format => {
44096
44096
  this.setState({
44097
44097
  selectedFormat: format
44098
44098
  });
44099
- });
44100
- _defineProperty(this, "getSelectedFormatTitle", () => {
44099
+ };
44100
+ this.getSelectedFormatTitle = () => {
44101
44101
  return _.find(this.formats, f => {
44102
44102
  return f.Key === this.state.selectedFormat;
44103
44103
  }).Title;
44104
- });
44105
- _defineProperty(this, "compileData", () => {
44104
+ };
44105
+ this.compileData = () => {
44106
44106
  var result = {};
44107
44107
  this.props.inputs.forEach(input => {
44108
44108
  result[input.key] = this.state[input.key];
@@ -44111,8 +44111,8 @@ class MakerPopup extends Component {
44111
44111
  result.logo = this.state.logo;
44112
44112
  result.headerType = this.state.headerType;
44113
44113
  return _objectSpread$1(_objectSpread$1({}, result), this.props.requestData);
44114
- });
44115
- _defineProperty(this, "compileRequestData", () => {
44114
+ };
44115
+ this.compileRequestData = () => {
44116
44116
  var result = {};
44117
44117
  if (!this.props.hideFormat) {
44118
44118
  result.format = this.state.selectedFormat;
@@ -44123,8 +44123,8 @@ class MakerPopup extends Component {
44123
44123
  return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, result), this.props.requestData), {}, {
44124
44124
  data: this.compileData()
44125
44125
  });
44126
- });
44127
- _defineProperty(this, "isReadyToSubmit", () => {
44126
+ };
44127
+ this.isReadyToSubmit = () => {
44128
44128
  if (this.state.loadingBranding) {
44129
44129
  return false;
44130
44130
  }
@@ -44132,8 +44132,8 @@ class MakerPopup extends Component {
44132
44132
  return false;
44133
44133
  }
44134
44134
  return true;
44135
- });
44136
- _defineProperty(this, "onGenerateAsset", () => {
44135
+ };
44136
+ this.onGenerateAsset = () => {
44137
44137
  if (!this.isReadyToSubmit()) {
44138
44138
  return;
44139
44139
  }
@@ -44151,10 +44151,10 @@ class MakerPopup extends Component {
44151
44151
  submitting: false
44152
44152
  });
44153
44153
  });
44154
- });
44155
- _defineProperty(this, "downloadAsset", () => {
44154
+ };
44155
+ this.downloadAsset = () => {
44156
44156
  window.open(this.state.asset, "_blank");
44157
- });
44157
+ };
44158
44158
  this.sizes = [{
44159
44159
  Key: "A3",
44160
44160
  Title: "A3"
@@ -44349,16 +44349,16 @@ var exportObj = connect(mapStateToProps, {})(MakerPopup);
44349
44349
  class ExportCsvPopup extends Component {
44350
44350
  constructor(props) {
44351
44351
  super(props);
44352
- _defineProperty(this, "canSave", () => {
44352
+ this.canSave = () => {
44353
44353
  return _.some(this.state.columns, c => c.selected);
44354
- });
44355
- _defineProperty(this, "onConfirm", () => {
44354
+ };
44355
+ this.onConfirm = () => {
44356
44356
  return this.canSave();
44357
- });
44358
- _defineProperty(this, "onClose", () => {
44357
+ };
44358
+ this.onClose = () => {
44359
44359
  if (this.props.onClose) this.props.onClose();
44360
- });
44361
- _defineProperty(this, "onToggleColumn", key => {
44360
+ };
44361
+ this.onToggleColumn = key => {
44362
44362
  var columns = _.cloneDeep(this.state.columns);
44363
44363
  var column = columns.find(c => c.key === key);
44364
44364
  if (column) {
@@ -44370,8 +44370,8 @@ class ExportCsvPopup extends Component {
44370
44370
  selectedHeaders
44371
44371
  });
44372
44372
  }
44373
- });
44374
- _defineProperty(this, "onToggleStartDateFilter", () => {
44373
+ };
44374
+ this.onToggleStartDateFilter = () => {
44375
44375
  var {
44376
44376
  filterDateStartVisible
44377
44377
  } = this.state;
@@ -44384,8 +44384,8 @@ class ExportCsvPopup extends Component {
44384
44384
  filterDateStartVisible: true
44385
44385
  });
44386
44386
  }
44387
- });
44388
- _defineProperty(this, "onToggleEndDateFilter", () => {
44387
+ };
44388
+ this.onToggleEndDateFilter = () => {
44389
44389
  var {
44390
44390
  filterDateEndVisible
44391
44391
  } = this.state;
@@ -44398,8 +44398,8 @@ class ExportCsvPopup extends Component {
44398
44398
  filterDateEndVisible: true
44399
44399
  });
44400
44400
  }
44401
- });
44402
- _defineProperty(this, "onDateFilterStartChanged", date => {
44401
+ };
44402
+ this.onDateFilterStartChanged = date => {
44403
44403
  var {
44404
44404
  filterDateEnd
44405
44405
  } = this.state;
@@ -44410,8 +44410,8 @@ class ExportCsvPopup extends Component {
44410
44410
  filterDateStartVisible: false
44411
44411
  });
44412
44412
  }
44413
- });
44414
- _defineProperty(this, "onDateFilterEndChanged", date => {
44413
+ };
44414
+ this.onDateFilterEndChanged = date => {
44415
44415
  var {
44416
44416
  filterDateStart
44417
44417
  } = this.state;
@@ -44422,8 +44422,8 @@ class ExportCsvPopup extends Component {
44422
44422
  filterDateEndVisible: false
44423
44423
  });
44424
44424
  }
44425
- });
44426
- _defineProperty(this, "getSelectedSource", () => {
44425
+ };
44426
+ this.getSelectedSource = () => {
44427
44427
  var {
44428
44428
  source
44429
44429
  } = this.props;
@@ -44451,8 +44451,8 @@ class ExportCsvPopup extends Component {
44451
44451
  // map result to columns
44452
44452
  var selectedheaderKeys = selectedHeaders.map(h => h.key);
44453
44453
  return result.map(i => _.pick(i, selectedheaderKeys));
44454
- });
44455
- _defineProperty(this, "renderTimestampFilter", () => {
44454
+ };
44455
+ this.renderTimestampFilter = () => {
44456
44456
  if (!this.props.timestampFilter) {
44457
44457
  return null;
44458
44458
  }
@@ -44483,8 +44483,8 @@ class ExportCsvPopup extends Component {
44483
44483
  selectDate: this.onDateFilterEndChanged
44484
44484
  }) : null]
44485
44485
  });
44486
- });
44487
- _defineProperty(this, "renderContent", () => {
44486
+ };
44487
+ this.renderContent = () => {
44488
44488
  var {
44489
44489
  saving,
44490
44490
  columns
@@ -44518,7 +44518,7 @@ class ExportCsvPopup extends Component {
44518
44518
  }, c.key);
44519
44519
  })
44520
44520
  });
44521
- });
44521
+ };
44522
44522
  var state = {
44523
44523
  columns: props.columns,
44524
44524
  selectedHeaders: props.columns.filter(c => c.key && c.selected),
@@ -44657,14 +44657,14 @@ class Tabs extends Component {
44657
44657
  class ColourOptions extends Component {
44658
44658
  constructor(props) {
44659
44659
  super(props);
44660
- _defineProperty(this, "setColourCircle", () => {
44660
+ this.setColourCircle = () => {
44661
44661
  var tc = tinycolor(this.state.colour);
44662
44662
  this.setState({
44663
44663
  colourCircleTop: 100 - 100 * tc.getBrightness() / 255,
44664
44664
  colourCircleLeft: 100 * tc.toHsv().h / 360
44665
44665
  });
44666
- });
44667
- _defineProperty(this, "onColourChange", color => {
44666
+ };
44667
+ this.onColourChange = color => {
44668
44668
  // console.log('onColourChange', color);
44669
44669
  var colour = (typeof color === 'object' ? color.hex : color).toUpperCase();
44670
44670
  this.setState({
@@ -44677,12 +44677,12 @@ class ColourOptions extends Component {
44677
44677
  } = this.props;
44678
44678
  if (onColourSelected) onColourSelected(this.state.colour);
44679
44679
  });
44680
- });
44681
- _defineProperty(this, "onSelectOption", selectedOption => {
44680
+ };
44681
+ this.onSelectOption = selectedOption => {
44682
44682
  this.setState({
44683
44683
  selectedOption
44684
44684
  });
44685
- });
44685
+ };
44686
44686
  this.state = {
44687
44687
  selectedColour: props.value || '',
44688
44688
  colour: props.value,
@@ -44835,20 +44835,20 @@ class ColourOptions extends Component {
44835
44835
  class ColourPicker extends Component {
44836
44836
  constructor(props) {
44837
44837
  super(props);
44838
- _defineProperty(this, "setColourCircle", () => {
44838
+ this.setColourCircle = () => {
44839
44839
  var tc = tinycolor(this.state.colour);
44840
44840
  this.setState({
44841
44841
  colourCircleTop: 100 - 100 * tc.getBrightness() / 255,
44842
44842
  colourCircleLeft: 100 * tc.toHsv().h / 360
44843
44843
  });
44844
- });
44845
- _defineProperty(this, "onTogglePopup", () => {
44844
+ };
44845
+ this.onTogglePopup = () => {
44846
44846
  if (this.props.disabled) return;
44847
44847
  this.setState({
44848
44848
  colourPickerOpen: !this.state.colourPickerOpen
44849
44849
  });
44850
- });
44851
- _defineProperty(this, "onColourChange", color => {
44850
+ };
44851
+ this.onColourChange = color => {
44852
44852
  // console.log('onColourChange', color);
44853
44853
  var colour = color;
44854
44854
  if (typeof color === 'object') {
@@ -44857,13 +44857,13 @@ class ColourPicker extends Component {
44857
44857
  this.setState({
44858
44858
  selectedColour: colour.toUpperCase()
44859
44859
  });
44860
- });
44861
- _defineProperty(this, "onSelectOption", selectedOption => {
44860
+ };
44861
+ this.onSelectOption = selectedOption => {
44862
44862
  this.setState({
44863
44863
  selectedOption
44864
44864
  });
44865
- });
44866
- _defineProperty(this, "onDone", () => {
44865
+ };
44866
+ this.onDone = () => {
44867
44867
  var {
44868
44868
  colourPickerOpen,
44869
44869
  selectedColour
@@ -44878,8 +44878,8 @@ class ColourPicker extends Component {
44878
44878
  } = this.props;
44879
44879
  if (onColourSelected) onColourSelected(this.state.colour);
44880
44880
  });
44881
- });
44882
- _defineProperty(this, "onCancel", () => {
44881
+ };
44882
+ this.onCancel = () => {
44883
44883
  var {
44884
44884
  colourPickerOpen,
44885
44885
  colour
@@ -44888,7 +44888,7 @@ class ColourPicker extends Component {
44888
44888
  colourPickerOpen: !colourPickerOpen,
44889
44889
  selectedColour: colour
44890
44890
  });
44891
- });
44891
+ };
44892
44892
  this.state = {
44893
44893
  selectedColour: props.value,
44894
44894
  colour: props.value,