@plusscommunities/pluss-core-web 1.7.4-beta.1 → 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.
package/dist/index.js CHANGED
@@ -3560,12 +3560,12 @@ function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t
3560
3560
  class CheckBox extends PureComponent {
3561
3561
  constructor() {
3562
3562
  super(...arguments);
3563
- _defineProperty(this, "onChange", e => {
3563
+ this.onChange = e => {
3564
3564
  if (this.props.disabled) {
3565
3565
  return;
3566
3566
  }
3567
3567
  return this.props.onChange(e);
3568
- });
3568
+ };
3569
3569
  }
3570
3570
  generateClassNames() {
3571
3571
  var result = 'checkBox';
@@ -3748,12 +3748,12 @@ class CommentSection extends Component {
3748
3748
  var _this;
3749
3749
  super(props);
3750
3750
  _this = this;
3751
- _defineProperty(this, "onHandleChange", event => {
3751
+ this.onHandleChange = event => {
3752
3752
  var stateChange = {};
3753
3753
  stateChange[event.target.getAttribute('id')] = event.target.value;
3754
3754
  this.setState(stateChange);
3755
- });
3756
- _defineProperty(this, "onAddComment", /*#__PURE__*/_asyncToGenerator(function* () {
3755
+ };
3756
+ this.onAddComment = /*#__PURE__*/_asyncToGenerator(function* () {
3757
3757
  var {
3758
3758
  commentInput
3759
3759
  } = _this.state;
@@ -3761,16 +3761,16 @@ class CommentSection extends Component {
3761
3761
  commentInput: ''
3762
3762
  });
3763
3763
  _this.props.onAddComment(commentInput);
3764
- }));
3765
- _defineProperty(this, "getComments", () => {
3764
+ });
3765
+ this.getComments = () => {
3766
3766
  if (!this.props.onlyParents) {
3767
3767
  return this.props.comments;
3768
3768
  }
3769
3769
  return _.filter(this.props.comments, c => {
3770
3770
  return !c.ParentId;
3771
3771
  });
3772
- });
3773
- _defineProperty(this, "renderReplyText", c => {
3772
+ };
3773
+ this.renderReplyText = c => {
3774
3774
  if (!this.props.onOpenThread) {
3775
3775
  return null;
3776
3776
  }
@@ -3808,7 +3808,7 @@ class CommentSection extends Component {
3808
3808
  children: "".concat(threadComments.length, " repl").concat(getPluralOptions(threadComments.length, 'y', 'ies'))
3809
3809
  })]
3810
3810
  });
3811
- });
3811
+ };
3812
3812
  this.state = {
3813
3813
  commentInput: ''
3814
3814
  };
@@ -3852,10 +3852,10 @@ function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t
3852
3852
  class P60Icon extends Component {
3853
3853
  constructor() {
3854
3854
  super(...arguments);
3855
- _defineProperty(this, "state", {
3855
+ this.state = {
3856
3856
  doublePaths: ['add-image', 'add-circle', 'facility', 'news'],
3857
3857
  triplePaths: []
3858
- });
3858
+ };
3859
3859
  }
3860
3860
  renderIconPaths() {
3861
3861
  if (_.includes(this.state.doublePaths, this.props.icon)) {
@@ -3891,10 +3891,10 @@ class P60Icon extends Component {
3891
3891
  class DatePicker extends Component {
3892
3892
  constructor() {
3893
3893
  super(...arguments);
3894
- _defineProperty(this, "state", {
3894
+ this.state = {
3895
3895
  shownMonth: new Date(),
3896
3896
  grid: []
3897
- });
3897
+ };
3898
3898
  }
3899
3899
  UNSAFE_componentWillMount() {
3900
3900
  this.onNewProps(this.props, true);
@@ -4245,13 +4245,13 @@ class FileInputComponent extends Component {
4245
4245
  var _this;
4246
4246
  super(...arguments);
4247
4247
  _this = this;
4248
- _defineProperty(this, "state", {
4248
+ this.state = {
4249
4249
  inputs: [{
4250
4250
  uploadingFile: false,
4251
4251
  value: ""
4252
4252
  }]
4253
- });
4254
- _defineProperty(this, "getAccept", () => {
4253
+ };
4254
+ this.getAccept = () => {
4255
4255
  if (typeof this.props.accept === "object") {
4256
4256
  return this.props.accept;
4257
4257
  }
@@ -4262,8 +4262,8 @@ class FileInputComponent extends Component {
4262
4262
  return accept;
4263
4263
  }
4264
4264
  return null;
4265
- });
4266
- _defineProperty(this, "checkRefreshCallback", inputs => {
4265
+ };
4266
+ this.checkRefreshCallback = inputs => {
4267
4267
  if (_.isUndefined(this.props.refreshCallback)) {
4268
4268
  return;
4269
4269
  }
@@ -4280,8 +4280,8 @@ class FileInputComponent extends Component {
4280
4280
  });
4281
4281
  this.props.refreshCallback(files);
4282
4282
  }
4283
- });
4284
- _defineProperty(this, "onDrop", files => {
4283
+ };
4284
+ this.onDrop = files => {
4285
4285
  if (this.props.multiple) {
4286
4286
  var newInputs = _.clone(this.state.inputs);
4287
4287
  files.forEach(file => {
@@ -4304,8 +4304,8 @@ class FileInputComponent extends Component {
4304
4304
  } else {
4305
4305
  this.handleFile(this.state.inputs[0], files[0]);
4306
4306
  }
4307
- });
4308
- _defineProperty(this, "handleFile", /*#__PURE__*/function () {
4307
+ };
4308
+ this.handleFile = /*#__PURE__*/function () {
4309
4309
  var _ref = _asyncToGenerator(function* (input, file) {
4310
4310
  if (!file || input.uploadingFile) {
4311
4311
  return;
@@ -4335,7 +4335,7 @@ class FileInputComponent extends Component {
4335
4335
  return function (_x, _x2) {
4336
4336
  return _ref.apply(this, arguments);
4337
4337
  };
4338
- }());
4338
+ }();
4339
4339
  }
4340
4340
  componentDidMount() {
4341
4341
  setTimeout(() => {
@@ -4728,14 +4728,14 @@ var styles$7 = {
4728
4728
  class Header extends Component {
4729
4729
  constructor() {
4730
4730
  super(...arguments);
4731
- _defineProperty(this, "goToHelpGuide", () => {
4731
+ this.goToHelpGuide = () => {
4732
4732
  window.open('https://www.plusscommunities.com/user-guide', '_blank');
4733
- });
4734
- _defineProperty(this, "toggleSideMenu", () => {
4733
+ };
4734
+ this.toggleSideMenu = () => {
4735
4735
  this.props.setNavData({
4736
4736
  isSideMenuOpen: !this.props.isSideMenuOpen
4737
4737
  });
4738
- });
4738
+ };
4739
4739
  }
4740
4740
  getHomeLink() {
4741
4741
  this.props.history.replace('/');
@@ -4822,7 +4822,7 @@ function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t
4822
4822
  class SideNavItem extends Component {
4823
4823
  constructor(props) {
4824
4824
  super(props);
4825
- _defineProperty(this, "goTo", () => {
4825
+ this.goTo = () => {
4826
4826
  if (this.props.onClick) {
4827
4827
  return this.props.onClick();
4828
4828
  }
@@ -4830,7 +4830,7 @@ class SideNavItem extends Component {
4830
4830
  this.props.onUrlChange();
4831
4831
  }
4832
4832
  this.props.history.push(this.props.Link);
4833
- });
4833
+ };
4834
4834
  this.state = {
4835
4835
  url: window.location.pathname
4836
4836
  };
@@ -4934,7 +4934,7 @@ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t
4934
4934
  class HubSidebar extends PureComponent {
4935
4935
  constructor(props) {
4936
4936
  super(props);
4937
- _defineProperty(this, "renderHelpGuide", () => {
4937
+ this.renderHelpGuide = () => {
4938
4938
  if (!this.props.helpGuide) return null;
4939
4939
  var {
4940
4940
  text,
@@ -4955,7 +4955,7 @@ class HubSidebar extends PureComponent {
4955
4955
  children: text || 'Help Guide'
4956
4956
  })
4957
4957
  });
4958
- });
4958
+ };
4959
4959
  this.state = {
4960
4960
  showSidebar: false
4961
4961
  };
@@ -5161,7 +5161,7 @@ class ImageInputComponent extends Component {
5161
5161
  var _this;
5162
5162
  super(...arguments);
5163
5163
  _this = this;
5164
- _defineProperty(this, "state", {
5164
+ this.state = {
5165
5165
  selectedTab: "upload",
5166
5166
  inputs: [{
5167
5167
  uploadingImage: false,
@@ -5180,8 +5180,8 @@ class ImageInputComponent extends Component {
5180
5180
  addFolderInput: "",
5181
5181
  selectedFolder: null,
5182
5182
  saveErrorMessage: ""
5183
- });
5184
- _defineProperty(this, "getAccept", () => {
5183
+ };
5184
+ this.getAccept = () => {
5185
5185
  var accept = {
5186
5186
  "image/*": [".jpeg", ".png"]
5187
5187
  };
@@ -5189,12 +5189,12 @@ class ImageInputComponent extends Component {
5189
5189
  accept["video/*"] = [".mp4"];
5190
5190
  }
5191
5191
  return accept;
5192
- });
5193
- _defineProperty(this, "refreshFolders", /*#__PURE__*/_asyncToGenerator(function* () {
5192
+ };
5193
+ this.refreshFolders = /*#__PURE__*/_asyncToGenerator(function* () {
5194
5194
  var res = yield fileActions.getMediaFolders(_this.props.auth.site);
5195
5195
  return res.data;
5196
- }));
5197
- _defineProperty(this, "checkRefreshCallback", inputs => {
5196
+ });
5197
+ this.checkRefreshCallback = inputs => {
5198
5198
  if (_.isUndefined(this.props.refreshCallback)) {
5199
5199
  return;
5200
5200
  }
@@ -5211,8 +5211,8 @@ class ImageInputComponent extends Component {
5211
5211
  });
5212
5212
  this.props.refreshCallback(images);
5213
5213
  }
5214
- });
5215
- _defineProperty(this, "parseImagesArray", images => {
5214
+ };
5215
+ this.parseImagesArray = images => {
5216
5216
  return _.map(images, f => {
5217
5217
  var uri = typeof f === "string" ? f : f.uri;
5218
5218
  var image1400 = get1400(uri);
@@ -5223,24 +5223,24 @@ class ImageInputComponent extends Component {
5223
5223
  Selected: _.some(this.state.inputs, input => input.value === uri || input.value === image1400)
5224
5224
  };
5225
5225
  });
5226
- });
5227
- _defineProperty(this, "addFolder", () => {
5226
+ };
5227
+ this.addFolder = () => {
5228
5228
  this.setState({
5229
5229
  addFolderOpen: true
5230
5230
  }, () => {
5231
5231
  var input = document.getElementById("addFolderInput");
5232
5232
  if (input) input.focus();
5233
5233
  });
5234
- });
5235
- _defineProperty(this, "cancelAddStates", {
5234
+ };
5235
+ this.cancelAddStates = {
5236
5236
  addFolderOpen: false,
5237
5237
  addFolderInput: "",
5238
5238
  saveErrorMessage: ""
5239
- });
5240
- _defineProperty(this, "cancelAddFolder", () => {
5239
+ };
5240
+ this.cancelAddFolder = () => {
5241
5241
  this.setState(this.cancelAddStates);
5242
- });
5243
- _defineProperty(this, "saveFolder", () => {
5242
+ };
5243
+ this.saveFolder = () => {
5244
5244
  this.setState({
5245
5245
  addingFolder: true
5246
5246
  }, /*#__PURE__*/_asyncToGenerator(function* () {
@@ -5259,26 +5259,26 @@ class ImageInputComponent extends Component {
5259
5259
  });
5260
5260
  }
5261
5261
  }));
5262
- });
5263
- _defineProperty(this, "isStockFolder", folder => {
5262
+ };
5263
+ this.isStockFolder = folder => {
5264
5264
  if (!folder) folder = this.state.selectedFolder;
5265
5265
  return folder && _.isNil(folder.RowId);
5266
- });
5267
- _defineProperty(this, "selectFolder", selectedFolder => {
5266
+ };
5267
+ this.selectFolder = selectedFolder => {
5268
5268
  if (!this.isStockFolder(selectedFolder)) {
5269
5269
  selectedFolder.parsedImages = this.parseImagesArray(selectedFolder.Images);
5270
5270
  }
5271
5271
  this.setState({
5272
5272
  selectedFolder
5273
5273
  });
5274
- });
5275
- _defineProperty(this, "selectRoot", () => {
5274
+ };
5275
+ this.selectRoot = () => {
5276
5276
  this.getFolders();
5277
5277
  this.setState({
5278
5278
  selectedFolder: null
5279
5279
  });
5280
- });
5281
- _defineProperty(this, "onDrop", function (files) {
5280
+ };
5281
+ this.onDrop = function (files) {
5282
5282
  var fromLibrary = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
5283
5283
  if (_this.props.multiple) {
5284
5284
  var newInputs = _.clone(_this.state.inputs);
@@ -5304,8 +5304,8 @@ class ImageInputComponent extends Component {
5304
5304
  } else {
5305
5305
  _this.handleFile(_this.state.inputs[0], files[0]);
5306
5306
  }
5307
- });
5308
- _defineProperty(this, "handleFile", /*#__PURE__*/function () {
5307
+ };
5308
+ this.handleFile = /*#__PURE__*/function () {
5309
5309
  var _ref3 = _asyncToGenerator(function* (input, file) {
5310
5310
  if (!file || input.uploadingImage) {
5311
5311
  return;
@@ -5333,13 +5333,13 @@ class ImageInputComponent extends Component {
5333
5333
  return function (_x, _x2) {
5334
5334
  return _ref3.apply(this, arguments);
5335
5335
  };
5336
- }());
5337
- _defineProperty(this, "handleChange", event => {
5336
+ }();
5337
+ this.handleChange = event => {
5338
5338
  var stateChange = {};
5339
5339
  stateChange[event.target.getAttribute("id")] = event.target.value;
5340
5340
  this.setState(stateChange);
5341
- });
5342
- _defineProperty(this, "deleteFolder", (event, folder) => {
5341
+ };
5342
+ this.deleteFolder = (event, folder) => {
5343
5343
  event.stopPropagation();
5344
5344
  if (window.confirm("Are you sure you want to delete ".concat(folder.Name, "?"))) {
5345
5345
  var deletingFolder = _objectSpread$d({}, this.state.deletingFolder);
@@ -5364,8 +5364,8 @@ class ImageInputComponent extends Component {
5364
5364
  }
5365
5365
  }));
5366
5366
  }
5367
- });
5368
- _defineProperty(this, "deleteImage", (event, image) => {
5367
+ };
5368
+ this.deleteImage = (event, image) => {
5369
5369
  if (window.confirm("Are you sure you want to delete the image?")) {
5370
5370
  // Unselect the image first if selected
5371
5371
  if (image.Selected) this.toggleLibraryItem(image);
@@ -5400,13 +5400,13 @@ class ImageInputComponent extends Component {
5400
5400
  }
5401
5401
  }));
5402
5402
  }
5403
- });
5404
- _defineProperty(this, "canManageLibrary", () => {
5403
+ };
5404
+ this.canManageLibrary = () => {
5405
5405
  return validateAccess(this.props.auth.site, "manageImageLibrary", this.props.auth);
5406
- });
5407
- _defineProperty(this, "canAddImageToLibrary", () => {
5406
+ };
5407
+ this.canAddImageToLibrary = () => {
5408
5408
  return validateAccess(this.props.auth.site, "addToImageLibrary", this.props.auth);
5409
- });
5409
+ };
5410
5410
  }
5411
5411
  UNSAFE_componentWillMount() {
5412
5412
  setTimeout(() => {
@@ -6652,9 +6652,9 @@ var getReactions = () => {
6652
6652
  class Reactions extends Component {
6653
6653
  constructor() {
6654
6654
  super(...arguments);
6655
- _defineProperty(this, "state", {
6655
+ this.state = {
6656
6656
  reactions: getReactions()
6657
- });
6657
+ };
6658
6658
  }
6659
6659
  getReaction(key) {
6660
6660
  if (this.props.reactions) {
@@ -6715,7 +6715,7 @@ class Reactions extends Component {
6715
6715
  class AnalyticsFilter extends PureComponent {
6716
6716
  constructor(props) {
6717
6717
  super(props);
6718
- _defineProperty(this, "renderOptions", () => {
6718
+ this.renderOptions = () => {
6719
6719
  return this.state.filterOptions.map(ev => {
6720
6720
  if (this.props.hideOptions && _.includes(this.props.hideOptions, ev.dayCount)) {
6721
6721
  return null;
@@ -6726,8 +6726,8 @@ class AnalyticsFilter extends PureComponent {
6726
6726
  children: ev.text
6727
6727
  }, ev.dayCount);
6728
6728
  });
6729
- });
6730
- _defineProperty(this, "selectFilter", key => {
6729
+ };
6730
+ this.selectFilter = key => {
6731
6731
  var selectedFilter = _.find(this.state.filterOptions, o => {
6732
6732
  return o.dayCount === key;
6733
6733
  });
@@ -6740,16 +6740,16 @@ class AnalyticsFilter extends PureComponent {
6740
6740
  }, () => {
6741
6741
  this.props.filterChanged(selectedFilter);
6742
6742
  });
6743
- });
6744
- _defineProperty(this, "getDateRangeText", (start, end) => {
6743
+ };
6744
+ this.getDateRangeText = (start, end) => {
6745
6745
  return "".concat(moment(start).format("DD/MM/YYYY"), " to ").concat(moment(end).format("DD/MM/YYYY"));
6746
- });
6747
- _defineProperty(this, "toggleDateSelectors", () => {
6746
+ };
6747
+ this.toggleDateSelectors = () => {
6748
6748
  this.setState({
6749
6749
  calendarVisible: !this.state.calendarVisible
6750
6750
  });
6751
- });
6752
- _defineProperty(this, "startDateChanged", date => {
6751
+ };
6752
+ this.startDateChanged = date => {
6753
6753
  if (moment(date).isSameOrBefore(this.state.endDate)) {
6754
6754
  this.setState({
6755
6755
  startDate: date,
@@ -6758,8 +6758,8 @@ class AnalyticsFilter extends PureComponent {
6758
6758
  this.props.filterDateRangeChanged(this.state.startDate, this.state.endDate);
6759
6759
  });
6760
6760
  }
6761
- });
6762
- _defineProperty(this, "endDateChanged", date => {
6761
+ };
6762
+ this.endDateChanged = date => {
6763
6763
  if (moment(date).isSameOrAfter(this.state.startDate)) {
6764
6764
  this.setState({
6765
6765
  endDate: date,
@@ -6768,7 +6768,7 @@ class AnalyticsFilter extends PureComponent {
6768
6768
  this.props.filterDateRangeChanged(this.state.startDate, this.state.endDate);
6769
6769
  });
6770
6770
  }
6771
- });
6771
+ };
6772
6772
  var filterOptions = getAnalyticsFilterOptions();
6773
6773
  var _selectedFilter = this.props.defaultFilter || filterOptions[1];
6774
6774
  this.state = {
@@ -6921,17 +6921,17 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
6921
6921
  class TimePicker extends Component {
6922
6922
  constructor() {
6923
6923
  super(...arguments);
6924
- _defineProperty(this, "state", {
6924
+ this.state = {
6925
6925
  id: randomString(),
6926
6926
  selectedTime: this.props.optional ? this.props.selectedTime : moment(),
6927
6927
  grid: [],
6928
6928
  hourInput: "",
6929
6929
  minuteInput: "",
6930
6930
  mInput: ""
6931
- });
6932
- _defineProperty(this, "onClear", () => {
6931
+ };
6932
+ this.onClear = () => {
6933
6933
  this.props.selectTime(undefined);
6934
- });
6934
+ };
6935
6935
  }
6936
6936
  UNSAFE_componentWillMount() {
6937
6937
  this.onNewProps(this.props, !this.props.optional);
@@ -44046,7 +44046,7 @@ class DropdownInput extends Component {
44046
44046
  * Handle value selection from dropdown
44047
44047
  * @param {string} newValue - The selected option key
44048
44048
  */
44049
- _defineProperty(this, "handleValueChange", newValue => {
44049
+ this.handleValueChange = newValue => {
44050
44050
  this.setState({
44051
44051
  selectedValue: newValue
44052
44052
  });
@@ -44061,7 +44061,7 @@ class DropdownInput extends Component {
44061
44061
  };
44062
44062
  this.props.onChange(syntheticEvent);
44063
44063
  }
44064
- });
44064
+ };
44065
44065
  this.state = {
44066
44066
  selectedValue: props.value || ''
44067
44067
  };
@@ -44268,7 +44268,7 @@ class AudienceSelector extends Component {
44268
44268
  var _this;
44269
44269
  super(props);
44270
44270
  _this = this;
44271
- _defineProperty(this, "onChangeSelection", () => {
44271
+ this.onChangeSelection = () => {
44272
44272
  var {
44273
44273
  updateValidation,
44274
44274
  onChange
@@ -44276,19 +44276,19 @@ class AudienceSelector extends Component {
44276
44276
  var isValid = this.validateAudienceSelection();
44277
44277
  if (updateValidation) updateValidation(isValid);
44278
44278
  if (onChange) onChange(this.getAudienceType(), this.getAudienceTypeSelection(), isValid);
44279
- });
44280
- _defineProperty(this, "selectTag", key => {
44279
+ };
44280
+ this.selectTag = key => {
44281
44281
  this.setState({
44282
44282
  Tag: key,
44283
44283
  includeList: [],
44284
44284
  excludeList: []
44285
44285
  });
44286
44286
  setTimeout(this.onChangeSelection, 50);
44287
- });
44288
- _defineProperty(this, "validateCustom", () => {
44287
+ };
44288
+ this.validateCustom = () => {
44289
44289
  return !_.isEmpty(this.state.AudienceTagList);
44290
- });
44291
- _defineProperty(this, "getAvailableAudienceTags", function () {
44290
+ };
44291
+ this.getAvailableAudienceTags = function () {
44292
44292
  var includeSelected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
44293
44293
  var {
44294
44294
  categories,
@@ -44322,19 +44322,19 @@ class AudienceSelector extends Component {
44322
44322
  });
44323
44323
  var result = [...categoryTags, ...userTypeTags, ...userTagTags];
44324
44324
  return includeSelected ? result : result.filter(t => !_.some(AudienceTagList, at => at.Id === t.Id));
44325
- });
44326
- _defineProperty(this, "onAttachAudienceTag", tag => {
44325
+ };
44326
+ this.onAttachAudienceTag = tag => {
44327
44327
  var AudienceTagList = [...this.state.AudienceTagList, tag];
44328
44328
  this.setState({
44329
44329
  AudienceTagList
44330
44330
  }, this.onChangeSelection);
44331
- });
44332
- _defineProperty(this, "onDetachAudienceTag", tag => {
44331
+ };
44332
+ this.onDetachAudienceTag = tag => {
44333
44333
  var AudienceTagList = _.filter(this.state.AudienceTagList, at => at.Id !== tag.Id);
44334
44334
  this.setState({
44335
44335
  AudienceTagList
44336
44336
  }, this.onChangeSelection);
44337
- });
44337
+ };
44338
44338
  this.state = {
44339
44339
  categories: [{
44340
44340
  Title: "All Primary Users",
@@ -45102,27 +45102,27 @@ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t
45102
45102
  class MakerPopup extends Component {
45103
45103
  constructor(props) {
45104
45104
  super(props);
45105
- _defineProperty(this, "selectSize", size => {
45105
+ this.selectSize = size => {
45106
45106
  this.setState({
45107
45107
  selectedSize: size
45108
45108
  });
45109
- });
45110
- _defineProperty(this, "getSelectedSizeTitle", () => {
45109
+ };
45110
+ this.getSelectedSizeTitle = () => {
45111
45111
  return _.find(this.sizes, f => {
45112
45112
  return f.Key === this.state.selectedSize;
45113
45113
  }).Title;
45114
- });
45115
- _defineProperty(this, "selectFormat", format => {
45114
+ };
45115
+ this.selectFormat = format => {
45116
45116
  this.setState({
45117
45117
  selectedFormat: format
45118
45118
  });
45119
- });
45120
- _defineProperty(this, "getSelectedFormatTitle", () => {
45119
+ };
45120
+ this.getSelectedFormatTitle = () => {
45121
45121
  return _.find(this.formats, f => {
45122
45122
  return f.Key === this.state.selectedFormat;
45123
45123
  }).Title;
45124
- });
45125
- _defineProperty(this, "compileData", () => {
45124
+ };
45125
+ this.compileData = () => {
45126
45126
  var result = {};
45127
45127
  this.props.inputs.forEach(input => {
45128
45128
  result[input.key] = this.state[input.key];
@@ -45131,8 +45131,8 @@ class MakerPopup extends Component {
45131
45131
  result.logo = this.state.logo;
45132
45132
  result.headerType = this.state.headerType;
45133
45133
  return _objectSpread$3(_objectSpread$3({}, result), this.props.requestData);
45134
- });
45135
- _defineProperty(this, "compileRequestData", () => {
45134
+ };
45135
+ this.compileRequestData = () => {
45136
45136
  var result = {};
45137
45137
  if (!this.props.hideFormat) {
45138
45138
  result.format = this.state.selectedFormat;
@@ -45143,8 +45143,8 @@ class MakerPopup extends Component {
45143
45143
  return _objectSpread$3(_objectSpread$3(_objectSpread$3({}, result), this.props.requestData), {}, {
45144
45144
  data: this.compileData()
45145
45145
  });
45146
- });
45147
- _defineProperty(this, "isReadyToSubmit", () => {
45146
+ };
45147
+ this.isReadyToSubmit = () => {
45148
45148
  if (this.state.loadingBranding) {
45149
45149
  return false;
45150
45150
  }
@@ -45152,8 +45152,8 @@ class MakerPopup extends Component {
45152
45152
  return false;
45153
45153
  }
45154
45154
  return true;
45155
- });
45156
- _defineProperty(this, "onGenerateAsset", () => {
45155
+ };
45156
+ this.onGenerateAsset = () => {
45157
45157
  if (!this.isReadyToSubmit()) {
45158
45158
  return;
45159
45159
  }
@@ -45171,10 +45171,10 @@ class MakerPopup extends Component {
45171
45171
  submitting: false
45172
45172
  });
45173
45173
  });
45174
- });
45175
- _defineProperty(this, "downloadAsset", () => {
45174
+ };
45175
+ this.downloadAsset = () => {
45176
45176
  window.open(this.state.asset, "_blank");
45177
- });
45177
+ };
45178
45178
  this.sizes = [{
45179
45179
  Key: "A3",
45180
45180
  Title: "A3"
@@ -45369,16 +45369,16 @@ var exportObj = connect(mapStateToProps, {})(MakerPopup);
45369
45369
  class ExportCsvPopup extends Component {
45370
45370
  constructor(props) {
45371
45371
  super(props);
45372
- _defineProperty(this, "canSave", () => {
45372
+ this.canSave = () => {
45373
45373
  return _.some(this.state.columns, c => c.selected);
45374
- });
45375
- _defineProperty(this, "onConfirm", () => {
45374
+ };
45375
+ this.onConfirm = () => {
45376
45376
  return this.canSave();
45377
- });
45378
- _defineProperty(this, "onClose", () => {
45377
+ };
45378
+ this.onClose = () => {
45379
45379
  if (this.props.onClose) this.props.onClose();
45380
- });
45381
- _defineProperty(this, "onToggleColumn", key => {
45380
+ };
45381
+ this.onToggleColumn = key => {
45382
45382
  var columns = _.cloneDeep(this.state.columns);
45383
45383
  var column = columns.find(c => c.key === key);
45384
45384
  if (column) {
@@ -45390,8 +45390,8 @@ class ExportCsvPopup extends Component {
45390
45390
  selectedHeaders
45391
45391
  });
45392
45392
  }
45393
- });
45394
- _defineProperty(this, "onToggleStartDateFilter", () => {
45393
+ };
45394
+ this.onToggleStartDateFilter = () => {
45395
45395
  var {
45396
45396
  filterDateStartVisible
45397
45397
  } = this.state;
@@ -45404,8 +45404,8 @@ class ExportCsvPopup extends Component {
45404
45404
  filterDateStartVisible: true
45405
45405
  });
45406
45406
  }
45407
- });
45408
- _defineProperty(this, "onToggleEndDateFilter", () => {
45407
+ };
45408
+ this.onToggleEndDateFilter = () => {
45409
45409
  var {
45410
45410
  filterDateEndVisible
45411
45411
  } = this.state;
@@ -45418,8 +45418,8 @@ class ExportCsvPopup extends Component {
45418
45418
  filterDateEndVisible: true
45419
45419
  });
45420
45420
  }
45421
- });
45422
- _defineProperty(this, "onDateFilterStartChanged", date => {
45421
+ };
45422
+ this.onDateFilterStartChanged = date => {
45423
45423
  var {
45424
45424
  filterDateEnd
45425
45425
  } = this.state;
@@ -45430,8 +45430,8 @@ class ExportCsvPopup extends Component {
45430
45430
  filterDateStartVisible: false
45431
45431
  });
45432
45432
  }
45433
- });
45434
- _defineProperty(this, "onDateFilterEndChanged", date => {
45433
+ };
45434
+ this.onDateFilterEndChanged = date => {
45435
45435
  var {
45436
45436
  filterDateStart
45437
45437
  } = this.state;
@@ -45442,8 +45442,8 @@ class ExportCsvPopup extends Component {
45442
45442
  filterDateEndVisible: false
45443
45443
  });
45444
45444
  }
45445
- });
45446
- _defineProperty(this, "getSelectedSource", () => {
45445
+ };
45446
+ this.getSelectedSource = () => {
45447
45447
  var {
45448
45448
  source
45449
45449
  } = this.props;
@@ -45471,8 +45471,8 @@ class ExportCsvPopup extends Component {
45471
45471
  // map result to columns
45472
45472
  var selectedheaderKeys = selectedHeaders.map(h => h.key);
45473
45473
  return result.map(i => _.pick(i, selectedheaderKeys));
45474
- });
45475
- _defineProperty(this, "renderTimestampFilter", () => {
45474
+ };
45475
+ this.renderTimestampFilter = () => {
45476
45476
  if (!this.props.timestampFilter) {
45477
45477
  return null;
45478
45478
  }
@@ -45503,8 +45503,8 @@ class ExportCsvPopup extends Component {
45503
45503
  selectDate: this.onDateFilterEndChanged
45504
45504
  }) : null]
45505
45505
  });
45506
- });
45507
- _defineProperty(this, "renderContent", () => {
45506
+ };
45507
+ this.renderContent = () => {
45508
45508
  var {
45509
45509
  saving,
45510
45510
  columns
@@ -45538,7 +45538,7 @@ class ExportCsvPopup extends Component {
45538
45538
  }, c.key);
45539
45539
  })
45540
45540
  });
45541
- });
45541
+ };
45542
45542
  var state = {
45543
45543
  columns: props.columns,
45544
45544
  selectedHeaders: props.columns.filter(c => c.key && c.selected),
@@ -45677,14 +45677,14 @@ class Tabs extends Component {
45677
45677
  class ColourOptions extends Component {
45678
45678
  constructor(props) {
45679
45679
  super(props);
45680
- _defineProperty(this, "setColourCircle", () => {
45680
+ this.setColourCircle = () => {
45681
45681
  var tc = tinycolor(this.state.colour);
45682
45682
  this.setState({
45683
45683
  colourCircleTop: 100 - 100 * tc.getBrightness() / 255,
45684
45684
  colourCircleLeft: 100 * tc.toHsv().h / 360
45685
45685
  });
45686
- });
45687
- _defineProperty(this, "onColourChange", color => {
45686
+ };
45687
+ this.onColourChange = color => {
45688
45688
  // console.log('onColourChange', color);
45689
45689
  var colour = (typeof color === 'object' ? color.hex : color).toUpperCase();
45690
45690
  this.setState({
@@ -45697,12 +45697,12 @@ class ColourOptions extends Component {
45697
45697
  } = this.props;
45698
45698
  if (onColourSelected) onColourSelected(this.state.colour);
45699
45699
  });
45700
- });
45701
- _defineProperty(this, "onSelectOption", selectedOption => {
45700
+ };
45701
+ this.onSelectOption = selectedOption => {
45702
45702
  this.setState({
45703
45703
  selectedOption
45704
45704
  });
45705
- });
45705
+ };
45706
45706
  this.state = {
45707
45707
  selectedColour: props.value || '',
45708
45708
  colour: props.value,
@@ -45855,20 +45855,20 @@ class ColourOptions extends Component {
45855
45855
  class ColourPicker extends Component {
45856
45856
  constructor(props) {
45857
45857
  super(props);
45858
- _defineProperty(this, "setColourCircle", () => {
45858
+ this.setColourCircle = () => {
45859
45859
  var tc = tinycolor(this.state.colour);
45860
45860
  this.setState({
45861
45861
  colourCircleTop: 100 - 100 * tc.getBrightness() / 255,
45862
45862
  colourCircleLeft: 100 * tc.toHsv().h / 360
45863
45863
  });
45864
- });
45865
- _defineProperty(this, "onTogglePopup", () => {
45864
+ };
45865
+ this.onTogglePopup = () => {
45866
45866
  if (this.props.disabled) return;
45867
45867
  this.setState({
45868
45868
  colourPickerOpen: !this.state.colourPickerOpen
45869
45869
  });
45870
- });
45871
- _defineProperty(this, "onColourChange", color => {
45870
+ };
45871
+ this.onColourChange = color => {
45872
45872
  // console.log('onColourChange', color);
45873
45873
  var colour = color;
45874
45874
  if (typeof color === 'object') {
@@ -45877,13 +45877,13 @@ class ColourPicker extends Component {
45877
45877
  this.setState({
45878
45878
  selectedColour: colour.toUpperCase()
45879
45879
  });
45880
- });
45881
- _defineProperty(this, "onSelectOption", selectedOption => {
45880
+ };
45881
+ this.onSelectOption = selectedOption => {
45882
45882
  this.setState({
45883
45883
  selectedOption
45884
45884
  });
45885
- });
45886
- _defineProperty(this, "onDone", () => {
45885
+ };
45886
+ this.onDone = () => {
45887
45887
  var {
45888
45888
  colourPickerOpen,
45889
45889
  selectedColour
@@ -45898,8 +45898,8 @@ class ColourPicker extends Component {
45898
45898
  } = this.props;
45899
45899
  if (onColourSelected) onColourSelected(this.state.colour);
45900
45900
  });
45901
- });
45902
- _defineProperty(this, "onCancel", () => {
45901
+ };
45902
+ this.onCancel = () => {
45903
45903
  var {
45904
45904
  colourPickerOpen,
45905
45905
  colour
@@ -45908,7 +45908,7 @@ class ColourPicker extends Component {
45908
45908
  colourPickerOpen: !colourPickerOpen,
45909
45909
  selectedColour: colour
45910
45910
  });
45911
- });
45911
+ };
45912
45912
  this.state = {
45913
45913
  selectedColour: props.value,
45914
45914
  colour: props.value,