@plusscommunities/pluss-core-web 1.2.5 → 1.2.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -8286,7 +8286,8 @@
8286
8286
 
8287
8287
  if (disabled) {
8288
8288
  return /*#__PURE__*/React__default['default'].createElement("div", {
8289
- className: "timepicker disabled"
8289
+ className: "timepicker disabled",
8290
+ style: this.props.style
8290
8291
  }, /*#__PURE__*/React__default['default'].createElement("span", {
8291
8292
  className: "timepicker__span",
8292
8293
  style: this.props.inputStyle
@@ -8294,7 +8295,8 @@
8294
8295
  }
8295
8296
 
8296
8297
  return /*#__PURE__*/React__default['default'].createElement("div", {
8297
- className: "timepicker ".concat(this.props.className)
8298
+ className: "timepicker ".concat(this.props.className),
8299
+ style: this.props.style
8298
8300
  }, /*#__PURE__*/React__default['default'].createElement("input", {
8299
8301
  className: "timepicker__input",
8300
8302
  maxLength: "2",
@@ -8828,42 +8830,22 @@
8828
8830
 
8829
8831
  var _super = _createSuper$4(AudienceSelector);
8830
8832
 
8831
- function AudienceSelector() {
8833
+ function AudienceSelector(props) {
8832
8834
  var _this;
8833
8835
 
8834
8836
  _classCallCheck__default['default'](this, AudienceSelector);
8835
8837
 
8836
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8837
- args[_key] = arguments[_key];
8838
- }
8838
+ _this = _super.call(this, props);
8839
8839
 
8840
- _this = _super.call.apply(_super, [this].concat(args));
8840
+ _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "onChangeSelection", function () {
8841
+ var _this$props = _this.props,
8842
+ updateValidation = _this$props.updateValidation,
8843
+ onChange = _this$props.onChange;
8841
8844
 
8842
- _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "state", {
8843
- categories: [{
8844
- Title: 'All Primary Users',
8845
- Key: 'resident',
8846
- ShortName: 'Primary'
8847
- }, {
8848
- Title: 'All Staff Users',
8849
- Key: 'staff',
8850
- ShortName: 'Staff'
8851
- }, {
8852
- Title: 'All Linked Users',
8853
- Key: 'family',
8854
- ShortName: 'Linked'
8855
- }],
8856
- types: [],
8857
- AudienceType: 'All',
8858
- showInclude: false,
8859
- includeList: [],
8860
- showExclude: false,
8861
- excludeList: [],
8862
- Type: '',
8863
- Category: '',
8864
- userList: [],
8865
- tagList: [],
8866
- AudienceTagList: []
8845
+ var isValid = _this.validateAudienceSelection();
8846
+
8847
+ if (updateValidation) updateValidation(isValid);
8848
+ if (onChange) onChange(_this.getAudienceType(), _this.getAudienceTypeSelection(), isValid);
8867
8849
  });
8868
8850
 
8869
8851
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "selectTag", function (key) {
@@ -8873,9 +8855,7 @@
8873
8855
  excludeList: []
8874
8856
  });
8875
8857
 
8876
- setTimeout(function () {
8877
- _this.props.updateValidation(_this.validateAudienceSelection());
8878
- }, 50);
8858
+ setTimeout(_this.onChangeSelection, 50);
8879
8859
  });
8880
8860
 
8881
8861
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "validateCustom", function () {
@@ -8883,6 +8863,7 @@
8883
8863
  });
8884
8864
 
8885
8865
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "getAvailableAudienceTags", function () {
8866
+ var includeSelected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
8886
8867
  var _this$state = _this.state,
8887
8868
  categories = _this$state.categories,
8888
8869
  types = _this$state.types,
@@ -8912,7 +8893,8 @@
8912
8893
  Title: "User Tag: ".concat(t.Title)
8913
8894
  };
8914
8895
  });
8915
- return [].concat(_toConsumableArray__default['default'](categoryTags), _toConsumableArray__default['default'](userTypeTags), _toConsumableArray__default['default'](userTagTags)).filter(function (t) {
8896
+ var result = [].concat(_toConsumableArray__default['default'](categoryTags), _toConsumableArray__default['default'](userTypeTags), _toConsumableArray__default['default'](userTagTags));
8897
+ return includeSelected ? result : result.filter(function (t) {
8916
8898
  return !___default['default'].some(AudienceTagList, function (at) {
8917
8899
  return at.Id === t.Id;
8918
8900
  });
@@ -8924,9 +8906,7 @@
8924
8906
 
8925
8907
  _this.setState({
8926
8908
  AudienceTagList: AudienceTagList
8927
- }, function () {
8928
- return _this.props.updateValidation(_this.validateAudienceSelection());
8929
- });
8909
+ }, _this.onChangeSelection);
8930
8910
  });
8931
8911
 
8932
8912
  _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "onDetachAudienceTag", function (tag) {
@@ -8936,26 +8916,58 @@
8936
8916
 
8937
8917
  _this.setState({
8938
8918
  AudienceTagList: AudienceTagList
8939
- }, function () {
8940
- return _this.props.updateValidation(_this.validateAudienceSelection());
8941
- });
8919
+ }, _this.onChangeSelection);
8942
8920
  });
8943
8921
 
8922
+ _this.state = {
8923
+ categories: [{
8924
+ Title: 'All Primary Users',
8925
+ Key: 'resident',
8926
+ ShortName: 'Primary'
8927
+ }, {
8928
+ Title: 'All Staff Users',
8929
+ Key: 'staff',
8930
+ ShortName: 'Staff'
8931
+ }, {
8932
+ Title: 'All Linked Users',
8933
+ Key: 'family',
8934
+ ShortName: 'Linked'
8935
+ }],
8936
+ types: [],
8937
+ AudienceType: props.audienceType || 'All',
8938
+ showInclude: false,
8939
+ includeList: [],
8940
+ showExclude: false,
8941
+ excludeList: [],
8942
+ Type: '',
8943
+ Category: '',
8944
+ userList: [],
8945
+ tagList: [],
8946
+ AudienceTagList: props.audienceTypeSelection || []
8947
+ };
8944
8948
  return _this;
8945
8949
  }
8946
8950
 
8947
8951
  _createClass__default['default'](AudienceSelector, [{
8948
8952
  key: "componentDidMount",
8949
8953
  value: function componentDidMount() {
8950
- var _this$props = this.props,
8951
- disallowUserType = _this$props.disallowUserType,
8952
- custom = _this$props.custom,
8953
- disallowSingleUsers = _this$props.disallowSingleUsers,
8954
- allowTags = _this$props.allowTags;
8954
+ var _this$props2 = this.props,
8955
+ disallowUserType = _this$props2.disallowUserType,
8956
+ custom = _this$props2.custom,
8957
+ disallowSingleUsers = _this$props2.disallowSingleUsers,
8958
+ allowTags = _this$props2.allowTags;
8955
8959
  if (!disallowUserType || custom) this.getUserTypes();
8956
8960
  if (!disallowSingleUsers) this.getUsers();
8957
8961
  if (allowTags || custom) this.getUserTags();
8958
8962
  }
8963
+ }, {
8964
+ key: "componentDidUpdate",
8965
+ value: function componentDidUpdate(prevProps) {
8966
+ var newState = {};
8967
+ if (prevProps.audienceType !== this.props.audienceType) newState.AudienceType = this.props.audienceType;
8968
+ if (!___default['default'].isEqual(prevProps.audienceTypeSelection, this.props.audienceTypeSelection)) newState.AudienceTagList = this.props.audienceTypeSelection;
8969
+ if (!___default['default'].isEmpty(newState)) this.setState(newState);
8970
+ }
8959
8971
  }, {
8960
8972
  key: "onSubmit",
8961
8973
  value: function onSubmit() {
@@ -8979,12 +8991,7 @@
8979
8991
  Category = _this$state2.Category,
8980
8992
  Tag = _this$state2.Tag,
8981
8993
  Type = _this$state2.Type;
8982
- if (AudienceType === 'Custom') return AudienceTagList.map(function (at) {
8983
- return {
8984
- AudienceType: at.AudienceType,
8985
- AudienceTypeSelection: at.AudienceTypeSelection
8986
- };
8987
- });
8994
+ if (AudienceType === 'Custom') return AudienceTagList || [];
8988
8995
  if (AudienceType === 'Category') return Category;
8989
8996
  if (AudienceType === 'UserTags') return Tag;
8990
8997
  return Type;
@@ -9039,29 +9046,26 @@
9039
9046
  }, {
9040
9047
  key: "onChangeOption",
9041
9048
  value: function onChangeOption(type) {
9042
- var _this4 = this;
9043
-
9044
9049
  this.setState({
9045
9050
  AudienceType: type,
9046
9051
  Type: '',
9047
9052
  Category: '',
9048
9053
  includeList: [],
9049
- excludeList: []
9054
+ excludeList: [],
9055
+ AudienceTagList: []
9050
9056
  });
9051
- setTimeout(function () {
9052
- _this4.props.updateValidation(_this4.validateAudienceSelection());
9053
- }, 50);
9057
+ setTimeout(this.onChangeSelection, 50);
9054
9058
  }
9055
9059
  }, {
9056
9060
  key: "getOptions",
9057
9061
  value: function getOptions() {
9058
- var _this5 = this;
9062
+ var _this4 = this;
9059
9063
 
9060
9064
  var options = [{
9061
9065
  Label: 'All users',
9062
9066
  Value: 'All',
9063
9067
  onChange: function onChange() {
9064
- return _this5.onChangeOption('All');
9068
+ return _this4.onChangeOption('All');
9065
9069
  }
9066
9070
  }];
9067
9071
 
@@ -9070,7 +9074,7 @@
9070
9074
  Label: 'Custom',
9071
9075
  Value: 'Custom',
9072
9076
  onChange: function onChange() {
9073
- return _this5.onChangeOption('Custom');
9077
+ return _this4.onChangeOption('Custom');
9074
9078
  }
9075
9079
  });
9076
9080
  } else {
@@ -9078,7 +9082,7 @@
9078
9082
  Label: 'By user category',
9079
9083
  Value: 'Category',
9080
9084
  onChange: function onChange() {
9081
- return _this5.onChangeOption('Category');
9085
+ return _this4.onChangeOption('Category');
9082
9086
  }
9083
9087
  });
9084
9088
  }
@@ -9088,7 +9092,7 @@
9088
9092
  Label: 'By user type',
9089
9093
  Value: 'UserType',
9090
9094
  onChange: function onChange() {
9091
- return _this5.onChangeOption('UserType');
9095
+ return _this4.onChangeOption('UserType');
9092
9096
  }
9093
9097
  });
9094
9098
  }
@@ -9098,7 +9102,7 @@
9098
9102
  Label: 'By user tag',
9099
9103
  Value: 'UserTags',
9100
9104
  onChange: function onChange() {
9101
- return _this5.onChangeOption('UserTags');
9105
+ return _this4.onChangeOption('UserTags');
9102
9106
  }
9103
9107
  });
9104
9108
  }
@@ -9108,7 +9112,7 @@
9108
9112
  Label: 'To single users',
9109
9113
  Value: 'User',
9110
9114
  onChange: function onChange() {
9111
- return _this5.onChangeOption('User');
9115
+ return _this4.onChangeOption('User');
9112
9116
  }
9113
9117
  });
9114
9118
  }
@@ -9131,24 +9135,20 @@
9131
9135
  }, {
9132
9136
  key: "selectType",
9133
9137
  value: function selectType(key) {
9134
- var _this6 = this;
9135
-
9136
9138
  this.setState({
9137
9139
  Type: key,
9138
9140
  includeList: [],
9139
9141
  excludeList: []
9140
9142
  });
9141
- setTimeout(function () {
9142
- _this6.props.updateValidation(_this6.validateAudienceSelection());
9143
- }, 50);
9143
+ setTimeout(this.onChangeSelection, 50);
9144
9144
  }
9145
9145
  }, {
9146
9146
  key: "getTypeTitle",
9147
9147
  value: function getTypeTitle() {
9148
- var _this7 = this;
9148
+ var _this5 = this;
9149
9149
 
9150
9150
  var typeObject = ___default['default'].find(this.state.types, function (t) {
9151
- return t.typeName === _this7.state.Type;
9151
+ return t.typeName === _this5.state.Type;
9152
9152
  });
9153
9153
 
9154
9154
  if (typeObject) {
@@ -9160,10 +9160,10 @@
9160
9160
  }, {
9161
9161
  key: "getTagTitle",
9162
9162
  value: function getTagTitle() {
9163
- var _this8 = this;
9163
+ var _this6 = this;
9164
9164
 
9165
9165
  var tag = ___default['default'].find(this.state.tagList, function (t) {
9166
- return t.Id === _this8.state.Tag;
9166
+ return t.Id === _this6.state.Tag;
9167
9167
  });
9168
9168
 
9169
9169
  if (tag) {
@@ -9175,10 +9175,10 @@
9175
9175
  }, {
9176
9176
  key: "getUserTypes",
9177
9177
  value: function getUserTypes() {
9178
- var _this9 = this;
9178
+ var _this7 = this;
9179
9179
 
9180
9180
  typeActions.getUserTypes(this.props.auth.site).then(function (res) {
9181
- _this9.props.setAuth({
9181
+ _this7.props.setAuth({
9182
9182
  userTypes: ___default['default'].cloneDeep(res.data)
9183
9183
  });
9184
9184
 
@@ -9187,7 +9187,7 @@
9187
9187
  e.Key = e.typeName;
9188
9188
 
9189
9189
  if (e.category) {
9190
- var category = ___default['default'].find(_this9.state.categories, function (c) {
9190
+ var category = ___default['default'].find(_this7.state.categories, function (c) {
9191
9191
  return c.Key === e.category;
9192
9192
  });
9193
9193
 
@@ -9196,7 +9196,7 @@
9196
9196
  }
9197
9197
  });
9198
9198
 
9199
- _this9.setState({
9199
+ _this7.setState({
9200
9200
  types: res.data
9201
9201
  });
9202
9202
  }).catch(function (error) {});
@@ -9204,12 +9204,12 @@
9204
9204
  }, {
9205
9205
  key: "getUserList",
9206
9206
  value: function getUserList() {
9207
- var _this10 = this;
9207
+ var _this8 = this;
9208
9208
 
9209
9209
  if (this.state.AudienceType === 'UserType' && !___default['default'].isEmpty(this.state.Type)) {
9210
9210
  var users = [];
9211
9211
  this.state.userList.forEach(function (element) {
9212
- if (element.type !== _this10.state.Type) users.push(element);
9212
+ if (element.type !== _this8.state.Type) users.push(element);
9213
9213
  });
9214
9214
  return ___default['default'].sortBy(users, 'displayName');
9215
9215
  }
@@ -9218,7 +9218,7 @@
9218
9218
  var _users = [];
9219
9219
 
9220
9220
  var types = ___default['default'].filter(this.state.types, function (type) {
9221
- return type.category === _this10.state.Category;
9221
+ return type.category === _this8.state.Category;
9222
9222
  }).map(function (type) {
9223
9223
  return type.typeName;
9224
9224
  });
@@ -9236,24 +9236,20 @@
9236
9236
  }, {
9237
9237
  key: "selectCat",
9238
9238
  value: function selectCat(key, e) {
9239
- var _this11 = this;
9240
-
9241
9239
  this.setState({
9242
9240
  Category: key,
9243
9241
  includeList: [],
9244
9242
  excludeList: []
9245
9243
  });
9246
- setTimeout(function () {
9247
- _this11.props.updateValidation(_this11.validateAudienceSelection());
9248
- }, 50);
9244
+ setTimeout(this.onChangeSelection, 50);
9249
9245
  }
9250
9246
  }, {
9251
9247
  key: "getCatTitle",
9252
9248
  value: function getCatTitle() {
9253
- var _this12 = this;
9249
+ var _this9 = this;
9254
9250
 
9255
9251
  var typeObject = ___default['default'].find(this.state.categories, function (t) {
9256
- return t.Key === _this12.state.Category;
9252
+ return t.Key === _this9.state.Category;
9257
9253
  });
9258
9254
 
9259
9255
  if (typeObject) {
@@ -9309,12 +9305,12 @@
9309
9305
  }, {
9310
9306
  key: "getUserExcludeList",
9311
9307
  value: function getUserExcludeList() {
9312
- var _this13 = this;
9308
+ var _this10 = this;
9313
9309
 
9314
9310
  if (this.state.AudienceType === 'UserType' && !___default['default'].isEmpty(this.state.Type)) {
9315
9311
  var users = [];
9316
9312
  this.state.userList.forEach(function (element) {
9317
- if (element.type === _this13.state.Type) users.push(element);
9313
+ if (element.type === _this10.state.Type) users.push(element);
9318
9314
  });
9319
9315
  return ___default['default'].sortBy(users, 'displayName');
9320
9316
  }
@@ -9323,7 +9319,7 @@
9323
9319
  var _users2 = [];
9324
9320
 
9325
9321
  var types = ___default['default'].filter(this.state.types, function (type) {
9326
- return type.category === _this13.state.Category;
9322
+ return type.category === _this10.state.Category;
9327
9323
  }).map(function (type) {
9328
9324
  return type.typeName;
9329
9325
  });
@@ -9341,8 +9337,6 @@
9341
9337
  }, {
9342
9338
  key: "addToInc",
9343
9339
  value: function addToInc(user) {
9344
- var _this14 = this;
9345
-
9346
9340
  var list = _toConsumableArray__default['default'](this.state.includeList);
9347
9341
 
9348
9342
  list.push({
@@ -9353,23 +9347,17 @@
9353
9347
  this.setState({
9354
9348
  includeList: list
9355
9349
  });
9356
- setTimeout(function () {
9357
- _this14.props.updateValidation(_this14.validateAudienceSelection());
9358
- }, 50);
9350
+ setTimeout(this.onChangeSelection, 50);
9359
9351
  }
9360
9352
  }, {
9361
9353
  key: "removeUserInc",
9362
9354
  value: function removeUserInc(user) {
9363
- var _this15 = this;
9364
-
9365
9355
  this.setState({
9366
9356
  includeList: ___default['default'].filter(this.state.includeList, function (ev) {
9367
9357
  return ev.Id !== user.Id;
9368
9358
  })
9369
9359
  });
9370
- setTimeout(function () {
9371
- _this15.props.updateValidation(_this15.validateAudienceSelection());
9372
- }, 50);
9360
+ setTimeout(this.onChangeSelection, 50);
9373
9361
  }
9374
9362
  }, {
9375
9363
  key: "addToEx",
@@ -9397,7 +9385,7 @@
9397
9385
  }, {
9398
9386
  key: "renderExcludes",
9399
9387
  value: function renderExcludes() {
9400
- var _this16 = this;
9388
+ var _this11 = this;
9401
9389
 
9402
9390
  if (!this.showUserPickers(false)) {
9403
9391
  return null;
@@ -9409,8 +9397,8 @@
9409
9397
  }, /*#__PURE__*/React__default['default'].createElement("div", {
9410
9398
  className: "flex flex-between pointer",
9411
9399
  onClick: function onClick() {
9412
- _this16.setState({
9413
- showExclude: !_this16.state.showExclude
9400
+ _this11.setState({
9401
+ showExclude: !_this11.state.showExclude
9414
9402
  });
9415
9403
  }
9416
9404
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -9434,7 +9422,7 @@
9434
9422
  }, {
9435
9423
  key: "renderIncludes",
9436
9424
  value: function renderIncludes() {
9437
- var _this17 = this;
9425
+ var _this12 = this;
9438
9426
 
9439
9427
  if (!this.showUserPickers(true)) {
9440
9428
  return null;
@@ -9446,8 +9434,8 @@
9446
9434
  }, /*#__PURE__*/React__default['default'].createElement("div", {
9447
9435
  className: "flex flex-between pointer",
9448
9436
  onClick: function onClick() {
9449
- _this17.setState({
9450
- showInclude: !_this17.state.showInclude
9437
+ _this12.setState({
9438
+ showInclude: !_this12.state.showInclude
9451
9439
  });
9452
9440
  }
9453
9441
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -9471,7 +9459,7 @@
9471
9459
  }, {
9472
9460
  key: "renderAssignedAudiences",
9473
9461
  value: function renderAssignedAudiences() {
9474
- var _this18 = this;
9462
+ var _this13 = this;
9475
9463
 
9476
9464
  var AudienceTagList = this.state.AudienceTagList;
9477
9465
  var maxWidth = this.props.maxWidth;
@@ -9490,7 +9478,7 @@
9490
9478
  text: t.Title,
9491
9479
  rightIcon: "remove",
9492
9480
  rightClick: function rightClick() {
9493
- return _this18.onDetachAudienceTag(t);
9481
+ return _this13.onDetachAudienceTag(t);
9494
9482
  }
9495
9483
  });
9496
9484
  }));
@@ -9498,7 +9486,7 @@
9498
9486
  }, {
9499
9487
  key: "renderAvailableAudiences",
9500
9488
  value: function renderAvailableAudiences() {
9501
- var _this19 = this;
9489
+ var _this14 = this;
9502
9490
 
9503
9491
  var maxWidth = this.props.maxWidth;
9504
9492
  var tags = this.getAvailableAudienceTags();
@@ -9513,7 +9501,7 @@
9513
9501
  className: "marginLeft-16 marginBottom-8",
9514
9502
  text: t.Title,
9515
9503
  onClick: function onClick() {
9516
- return _this19.onAttachAudienceTag(t);
9504
+ return _this14.onAttachAudienceTag(t);
9517
9505
  }
9518
9506
  });
9519
9507
  }));
@@ -9534,7 +9522,7 @@
9534
9522
  }, {
9535
9523
  key: "render",
9536
9524
  value: function render() {
9537
- var _this20 = this;
9525
+ var _this15 = this;
9538
9526
 
9539
9527
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Text, {
9540
9528
  type: "formTitleSmall",
@@ -9556,10 +9544,10 @@
9556
9544
  placeholder: "User Category",
9557
9545
  value: this.getCatTitle(),
9558
9546
  isValid: function isValid() {
9559
- return _this20.validateCategory();
9547
+ return _this15.validateCategory();
9560
9548
  },
9561
9549
  showError: function showError() {
9562
- return _this20.state.showWarnings && !_this20.validateCategory();
9550
+ return _this15.state.showWarnings && !_this15.validateCategory();
9563
9551
  },
9564
9552
  options: this.state.categories,
9565
9553
  onSelect: this.selectCat.bind(this),
@@ -9576,10 +9564,10 @@
9576
9564
  placeholder: "User Type",
9577
9565
  value: this.getTypeTitle(),
9578
9566
  isValid: function isValid() {
9579
- return _this20.validateType();
9567
+ return _this15.validateType();
9580
9568
  },
9581
9569
  showError: function showError() {
9582
- return _this20.state.showWarnings && !_this20.validateType();
9570
+ return _this15.state.showWarnings && !_this15.validateType();
9583
9571
  },
9584
9572
  options: this.state.types,
9585
9573
  onSelect: this.selectType.bind(this),
@@ -9595,10 +9583,10 @@
9595
9583
  placeholder: "User Tag",
9596
9584
  value: this.getTagTitle(),
9597
9585
  isValid: function isValid() {
9598
- return _this20.validateTag();
9586
+ return _this15.validateTag();
9599
9587
  },
9600
9588
  showError: function showError() {
9601
- return _this20.state.showWarnings && !_this20.validateTag();
9589
+ return _this15.state.showWarnings && !_this15.validateTag();
9602
9590
  },
9603
9591
  options: this.state.tagList,
9604
9592
  onSelect: this.selectTag,
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-web",
3
- "version": "1.2.5",
3
+ "version": "1.2.9-beta.0",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
7
7
  "build": "npm i && rollup -c",
8
+ "betapatch": "npm version prepatch --preid=beta",
8
9
  "patch": "npm version patch",
9
- "upload": "npm run build && npm publish --access public && rm -rf node_modules",
10
+ "betaupload": "npm run build && npm publish --access public --tag beta",
11
+ "betaupload:p": "npm run betapatch && npm run betaupload",
12
+ "upload": "npm run build && npm publish --access public",
10
13
  "upload:p": "npm run patch && npm run upload"
11
14
  },
12
15
  "author": "Phillip Suh",