@plusscommunities/pluss-core-web 1.2.5 → 1.2.6
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.cjs.js +311 -459
- package/dist/index.esm.js +310 -458
- package/dist/index.umd.js +314 -462
- package/package.json +1 -1
- package/src/components/AudienceSelector.js +62 -63
- package/src/components/index.js +0 -2
- package/src/components/Comment.js +0 -22
- package/src/components/CommentSection.js +0 -63
package/dist/index.esm.js
CHANGED
|
@@ -18,8 +18,8 @@ import FontAwesome from 'react-fontawesome';
|
|
|
18
18
|
import _extends from '@babel/runtime/helpers/extends';
|
|
19
19
|
import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
|
|
20
20
|
import { connect } from 'react-redux';
|
|
21
|
-
import Textarea from 'react-textarea-autosize';
|
|
22
21
|
import Dropzone from 'react-dropzone';
|
|
22
|
+
import Textarea from 'react-textarea-autosize';
|
|
23
23
|
import { withRouter } from 'react-router';
|
|
24
24
|
import { MenuItem, DropdownButton } from 'react-bootstrap';
|
|
25
25
|
import { Lottie } from '@crello/react-lottie';
|
|
@@ -2984,14 +2984,14 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
2984
2984
|
setNavData: setNavData
|
|
2985
2985
|
});
|
|
2986
2986
|
|
|
2987
|
-
function _createSuper$
|
|
2987
|
+
function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$y(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
2988
2988
|
|
|
2989
|
-
function _isNativeReflectConstruct$
|
|
2989
|
+
function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2990
2990
|
|
|
2991
2991
|
var AddButton = /*#__PURE__*/function (_Component) {
|
|
2992
2992
|
_inherits(AddButton, _Component);
|
|
2993
2993
|
|
|
2994
|
-
var _super = _createSuper$
|
|
2994
|
+
var _super = _createSuper$y(AddButton);
|
|
2995
2995
|
|
|
2996
2996
|
function AddButton() {
|
|
2997
2997
|
_classCallCheck(this, AddButton);
|
|
@@ -3968,14 +3968,14 @@ var icons = {
|
|
|
3968
3968
|
template_sportingClub: template_sportingClub
|
|
3969
3969
|
};
|
|
3970
3970
|
|
|
3971
|
-
function _createSuper$
|
|
3971
|
+
function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3972
3972
|
|
|
3973
|
-
function _isNativeReflectConstruct$
|
|
3973
|
+
function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3974
3974
|
|
|
3975
3975
|
var SVGIcon = /*#__PURE__*/function (_Component) {
|
|
3976
3976
|
_inherits(SVGIcon, _Component);
|
|
3977
3977
|
|
|
3978
|
-
var _super = _createSuper$
|
|
3978
|
+
var _super = _createSuper$x(SVGIcon);
|
|
3979
3979
|
|
|
3980
3980
|
function SVGIcon() {
|
|
3981
3981
|
_classCallCheck(this, SVGIcon);
|
|
@@ -4023,14 +4023,14 @@ var SVGIcon = /*#__PURE__*/function (_Component) {
|
|
|
4023
4023
|
return SVGIcon;
|
|
4024
4024
|
}(Component);
|
|
4025
4025
|
|
|
4026
|
-
function _createSuper$
|
|
4026
|
+
function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4027
4027
|
|
|
4028
|
-
function _isNativeReflectConstruct$
|
|
4028
|
+
function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4029
4029
|
|
|
4030
4030
|
var Attachment = /*#__PURE__*/function (_Component) {
|
|
4031
4031
|
_inherits(Attachment, _Component);
|
|
4032
4032
|
|
|
4033
|
-
var _super = _createSuper$
|
|
4033
|
+
var _super = _createSuper$w(Attachment);
|
|
4034
4034
|
|
|
4035
4035
|
function Attachment() {
|
|
4036
4036
|
_classCallCheck(this, Attachment);
|
|
@@ -4068,14 +4068,14 @@ function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
4068
4068
|
|
|
4069
4069
|
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$e(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4070
4070
|
|
|
4071
|
-
function _createSuper$
|
|
4071
|
+
function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4072
4072
|
|
|
4073
|
-
function _isNativeReflectConstruct$
|
|
4073
|
+
function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4074
4074
|
|
|
4075
4075
|
var Button = /*#__PURE__*/function (_Component) {
|
|
4076
4076
|
_inherits(Button, _Component);
|
|
4077
4077
|
|
|
4078
|
-
var _super = _createSuper$
|
|
4078
|
+
var _super = _createSuper$v(Button);
|
|
4079
4079
|
|
|
4080
4080
|
function Button() {
|
|
4081
4081
|
_classCallCheck(this, Button);
|
|
@@ -4175,14 +4175,14 @@ function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
4175
4175
|
|
|
4176
4176
|
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$d(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4177
4177
|
|
|
4178
|
-
function _createSuper$
|
|
4178
|
+
function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4179
4179
|
|
|
4180
|
-
function _isNativeReflectConstruct$
|
|
4180
|
+
function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4181
4181
|
|
|
4182
4182
|
var CheckBox = /*#__PURE__*/function (_PureComponent) {
|
|
4183
4183
|
_inherits(CheckBox, _PureComponent);
|
|
4184
4184
|
|
|
4185
|
-
var _super = _createSuper$
|
|
4185
|
+
var _super = _createSuper$u(CheckBox);
|
|
4186
4186
|
|
|
4187
4187
|
function CheckBox() {
|
|
4188
4188
|
var _this;
|
|
@@ -4288,245 +4288,14 @@ var styles$8 = {
|
|
|
4288
4288
|
}
|
|
4289
4289
|
};
|
|
4290
4290
|
|
|
4291
|
-
function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4292
|
-
|
|
4293
|
-
function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4294
|
-
|
|
4295
|
-
var Text = /*#__PURE__*/function (_Component) {
|
|
4296
|
-
_inherits(Text, _Component);
|
|
4297
|
-
|
|
4298
|
-
var _super = _createSuper$v(Text);
|
|
4299
|
-
|
|
4300
|
-
function Text() {
|
|
4301
|
-
_classCallCheck(this, Text);
|
|
4302
|
-
|
|
4303
|
-
return _super.apply(this, arguments);
|
|
4304
|
-
}
|
|
4305
|
-
|
|
4306
|
-
_createClass(Text, [{
|
|
4307
|
-
key: "getClassName",
|
|
4308
|
-
value: function getClassName() {
|
|
4309
|
-
if (this.props.className) {
|
|
4310
|
-
return " ".concat(this.props.className);
|
|
4311
|
-
}
|
|
4312
|
-
|
|
4313
|
-
return '';
|
|
4314
|
-
}
|
|
4315
|
-
}, {
|
|
4316
|
-
key: "render",
|
|
4317
|
-
value: function render() {
|
|
4318
|
-
return /*#__PURE__*/React.createElement("p", {
|
|
4319
|
-
className: "text-".concat(this.props.type).concat(this.getClassName()),
|
|
4320
|
-
style: this.props.style
|
|
4321
|
-
}, this.props.children);
|
|
4322
|
-
}
|
|
4323
|
-
}]);
|
|
4324
|
-
|
|
4325
|
-
return Text;
|
|
4326
|
-
}(Component);
|
|
4327
|
-
|
|
4328
|
-
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4329
|
-
|
|
4330
|
-
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$c(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4331
|
-
|
|
4332
|
-
function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4333
|
-
|
|
4334
|
-
function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4335
|
-
|
|
4336
|
-
var ProfilePicComponent = /*#__PURE__*/function (_Component) {
|
|
4337
|
-
_inherits(ProfilePicComponent, _Component);
|
|
4338
|
-
|
|
4339
|
-
var _super = _createSuper$u(ProfilePicComponent);
|
|
4340
|
-
|
|
4341
|
-
function ProfilePicComponent() {
|
|
4342
|
-
_classCallCheck(this, ProfilePicComponent);
|
|
4343
|
-
|
|
4344
|
-
return _super.apply(this, arguments);
|
|
4345
|
-
}
|
|
4346
|
-
|
|
4347
|
-
_createClass(ProfilePicComponent, [{
|
|
4348
|
-
key: "renderPic",
|
|
4349
|
-
value: function renderPic() {
|
|
4350
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4351
|
-
className: this.props.className,
|
|
4352
|
-
style: _objectSpread$c({
|
|
4353
|
-
width: this.props.size || 30,
|
|
4354
|
-
height: this.props.size || 30,
|
|
4355
|
-
borderRadius: this.props.size / 2 || 15,
|
|
4356
|
-
backgroundColor: this.props.colourBrandingApp,
|
|
4357
|
-
backgroundSize: 'cover',
|
|
4358
|
-
backgroundPosition: 'center',
|
|
4359
|
-
backgroundImage: "url(".concat(!_.isEmpty(this.props.image) ? this.props.image : CoreConfig.env.defaultProfileImage, ")")
|
|
4360
|
-
}, this.props.style),
|
|
4361
|
-
alt: "Profile Pic"
|
|
4362
|
-
});
|
|
4363
|
-
}
|
|
4364
|
-
}, {
|
|
4365
|
-
key: "render",
|
|
4366
|
-
value: function render() {
|
|
4367
|
-
if (this.props.hoverText) {
|
|
4368
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4369
|
-
className: "profilePicHover ".concat(this.props.containerClass)
|
|
4370
|
-
}, this.renderPic(), /*#__PURE__*/React.createElement(Text, {
|
|
4371
|
-
type: "h5",
|
|
4372
|
-
className: "profilePicHover_text"
|
|
4373
|
-
}, this.props.hoverText));
|
|
4374
|
-
}
|
|
4375
|
-
|
|
4376
|
-
return this.renderPic();
|
|
4377
|
-
}
|
|
4378
|
-
}]);
|
|
4379
|
-
|
|
4380
|
-
return ProfilePicComponent;
|
|
4381
|
-
}(Component);
|
|
4382
|
-
|
|
4383
|
-
var mapStateToProps$5 = function mapStateToProps(state) {
|
|
4384
|
-
return {
|
|
4385
|
-
colourBrandingApp: getAppColourFromState(state)
|
|
4386
|
-
};
|
|
4387
|
-
};
|
|
4388
|
-
|
|
4389
|
-
var ProfilePic = connect(mapStateToProps$5, {})(ProfilePicComponent);
|
|
4390
|
-
|
|
4391
4291
|
function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4392
4292
|
|
|
4393
4293
|
function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4394
4294
|
|
|
4395
|
-
var Comment = /*#__PURE__*/function (_Component) {
|
|
4396
|
-
_inherits(Comment, _Component);
|
|
4397
|
-
|
|
4398
|
-
var _super = _createSuper$t(Comment);
|
|
4399
|
-
|
|
4400
|
-
function Comment() {
|
|
4401
|
-
_classCallCheck(this, Comment);
|
|
4402
|
-
|
|
4403
|
-
return _super.apply(this, arguments);
|
|
4404
|
-
}
|
|
4405
|
-
|
|
4406
|
-
_createClass(Comment, [{
|
|
4407
|
-
key: "render",
|
|
4408
|
-
value: function render() {
|
|
4409
|
-
var comment = this.props.comment;
|
|
4410
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4411
|
-
key: comment.Id,
|
|
4412
|
-
className: "comment"
|
|
4413
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
4414
|
-
className: "comment_text"
|
|
4415
|
-
}, toParagraphed(comment.Comment)), /*#__PURE__*/React.createElement("div", {
|
|
4416
|
-
className: "comment_bottom"
|
|
4417
|
-
}, /*#__PURE__*/React.createElement(ProfilePic, {
|
|
4418
|
-
className: "comment_profilePic",
|
|
4419
|
-
size: 25,
|
|
4420
|
-
image: comment.User.profilePic
|
|
4421
|
-
}), /*#__PURE__*/React.createElement("p", {
|
|
4422
|
-
className: "comment_name"
|
|
4423
|
-
}, comment.User.displayName), /*#__PURE__*/React.createElement("p", {
|
|
4424
|
-
className: "comment_time"
|
|
4425
|
-
}, moment.utc(comment.Timestamp).local().format('D MMM YYYY • h:mma'))));
|
|
4426
|
-
}
|
|
4427
|
-
}]);
|
|
4428
|
-
|
|
4429
|
-
return Comment;
|
|
4430
|
-
}(Component);
|
|
4431
|
-
|
|
4432
|
-
function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4433
|
-
|
|
4434
|
-
function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4435
|
-
|
|
4436
|
-
var CommentSection = /*#__PURE__*/function (_Component) {
|
|
4437
|
-
_inherits(CommentSection, _Component);
|
|
4438
|
-
|
|
4439
|
-
var _super = _createSuper$s(CommentSection);
|
|
4440
|
-
|
|
4441
|
-
function CommentSection(props) {
|
|
4442
|
-
var _this;
|
|
4443
|
-
|
|
4444
|
-
_classCallCheck(this, CommentSection);
|
|
4445
|
-
|
|
4446
|
-
_this = _super.call(this, props);
|
|
4447
|
-
|
|
4448
|
-
_defineProperty(_assertThisInitialized(_this), "onHandleChange", function (event) {
|
|
4449
|
-
var stateChange = {};
|
|
4450
|
-
stateChange[event.target.getAttribute('id')] = event.target.value;
|
|
4451
|
-
|
|
4452
|
-
_this.setState(stateChange);
|
|
4453
|
-
});
|
|
4454
|
-
|
|
4455
|
-
_defineProperty(_assertThisInitialized(_this), "onAddComment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
4456
|
-
var commentInput;
|
|
4457
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4458
|
-
while (1) {
|
|
4459
|
-
switch (_context.prev = _context.next) {
|
|
4460
|
-
case 0:
|
|
4461
|
-
commentInput = _this.state.commentInput;
|
|
4462
|
-
|
|
4463
|
-
_this.setState({
|
|
4464
|
-
commentInput: ''
|
|
4465
|
-
});
|
|
4466
|
-
|
|
4467
|
-
_this.props.onAddComment(commentInput);
|
|
4468
|
-
|
|
4469
|
-
case 3:
|
|
4470
|
-
case "end":
|
|
4471
|
-
return _context.stop();
|
|
4472
|
-
}
|
|
4473
|
-
}
|
|
4474
|
-
}, _callee);
|
|
4475
|
-
})));
|
|
4476
|
-
|
|
4477
|
-
_this.state = {
|
|
4478
|
-
commentInput: ''
|
|
4479
|
-
};
|
|
4480
|
-
return _this;
|
|
4481
|
-
}
|
|
4482
|
-
|
|
4483
|
-
_createClass(CommentSection, [{
|
|
4484
|
-
key: "render",
|
|
4485
|
-
value: function render() {
|
|
4486
|
-
var _this2 = this;
|
|
4487
|
-
|
|
4488
|
-
return /*#__PURE__*/React.createElement("div", null, this.props.includeTitle && /*#__PURE__*/React.createElement(Text, {
|
|
4489
|
-
type: "formTitleSmall",
|
|
4490
|
-
className: "marginBottom-16"
|
|
4491
|
-
}, "Comments"), /*#__PURE__*/React.createElement("div", {
|
|
4492
|
-
className: "commentSection"
|
|
4493
|
-
}, this.props.comments.map(function (c) {
|
|
4494
|
-
return /*#__PURE__*/React.createElement(Comment, {
|
|
4495
|
-
key: c.Id,
|
|
4496
|
-
comment: c
|
|
4497
|
-
});
|
|
4498
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
4499
|
-
className: "commentReply"
|
|
4500
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
4501
|
-
className: "commentReply_button".concat(!_.isEmpty(this.state.commentInput) ? ' commentReply_button-active' : ''),
|
|
4502
|
-
onClick: this.onAddComment
|
|
4503
|
-
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
4504
|
-
className: "commentReply_icon",
|
|
4505
|
-
name: "paper-plane-o"
|
|
4506
|
-
})), /*#__PURE__*/React.createElement(Textarea, {
|
|
4507
|
-
id: "commentInput",
|
|
4508
|
-
placeholder: "Reply here...",
|
|
4509
|
-
type: "text",
|
|
4510
|
-
className: "commentReply_input",
|
|
4511
|
-
value: this.state.commentInput,
|
|
4512
|
-
onChange: function onChange(e) {
|
|
4513
|
-
return _this2.onHandleChange(e);
|
|
4514
|
-
}
|
|
4515
|
-
})));
|
|
4516
|
-
}
|
|
4517
|
-
}]);
|
|
4518
|
-
|
|
4519
|
-
return CommentSection;
|
|
4520
|
-
}(Component);
|
|
4521
|
-
|
|
4522
|
-
function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4523
|
-
|
|
4524
|
-
function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4525
|
-
|
|
4526
4295
|
var P60Icon = /*#__PURE__*/function (_Component) {
|
|
4527
4296
|
_inherits(P60Icon, _Component);
|
|
4528
4297
|
|
|
4529
|
-
var _super = _createSuper$
|
|
4298
|
+
var _super = _createSuper$t(P60Icon);
|
|
4530
4299
|
|
|
4531
4300
|
function P60Icon() {
|
|
4532
4301
|
var _this;
|
|
@@ -4582,14 +4351,14 @@ var P60Icon = /*#__PURE__*/function (_Component) {
|
|
|
4582
4351
|
return P60Icon;
|
|
4583
4352
|
}(Component);
|
|
4584
4353
|
|
|
4585
|
-
function _createSuper$
|
|
4354
|
+
function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4586
4355
|
|
|
4587
|
-
function _isNativeReflectConstruct$
|
|
4356
|
+
function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4588
4357
|
|
|
4589
4358
|
var DatePicker = /*#__PURE__*/function (_Component) {
|
|
4590
4359
|
_inherits(DatePicker, _Component);
|
|
4591
4360
|
|
|
4592
|
-
var _super = _createSuper$
|
|
4361
|
+
var _super = _createSuper$s(DatePicker);
|
|
4593
4362
|
|
|
4594
4363
|
function DatePicker() {
|
|
4595
4364
|
var _this;
|
|
@@ -4902,13 +4671,13 @@ var DatePicker = /*#__PURE__*/function (_Component) {
|
|
|
4902
4671
|
return DatePicker;
|
|
4903
4672
|
}(Component);
|
|
4904
4673
|
|
|
4905
|
-
function ownKeys$
|
|
4674
|
+
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4906
4675
|
|
|
4907
|
-
function _objectSpread$
|
|
4676
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$c(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4908
4677
|
|
|
4909
|
-
function _createSuper$
|
|
4678
|
+
function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4910
4679
|
|
|
4911
|
-
function _isNativeReflectConstruct$
|
|
4680
|
+
function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4912
4681
|
var DEFAULT_INPUT$1 = {
|
|
4913
4682
|
uploadingFile: false,
|
|
4914
4683
|
value: ''
|
|
@@ -4917,7 +4686,7 @@ var DEFAULT_INPUT$1 = {
|
|
|
4917
4686
|
var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
4918
4687
|
_inherits(FileInputComponent, _Component);
|
|
4919
4688
|
|
|
4920
|
-
var _super = _createSuper$
|
|
4689
|
+
var _super = _createSuper$r(FileInputComponent);
|
|
4921
4690
|
|
|
4922
4691
|
function FileInputComponent() {
|
|
4923
4692
|
var _this;
|
|
@@ -4972,7 +4741,7 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
4972
4741
|
_this.handleFile(newInput, file);
|
|
4973
4742
|
}
|
|
4974
4743
|
} else {
|
|
4975
|
-
var _newInput = _objectSpread$
|
|
4744
|
+
var _newInput = _objectSpread$c({}, DEFAULT_INPUT$1);
|
|
4976
4745
|
|
|
4977
4746
|
newInputs.splice(newInputs.length - 1, 0, _newInput);
|
|
4978
4747
|
|
|
@@ -5195,7 +4964,7 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5195
4964
|
className: "imageInput_simpleContainer"
|
|
5196
4965
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5197
4966
|
className: "imageInput_image",
|
|
5198
|
-
style: _objectSpread$
|
|
4967
|
+
style: _objectSpread$c(_objectSpread$c({}, _this3.props.style), {}, {
|
|
5199
4968
|
height: _this3.props.style && _this3.props.style.height ? _this3.props.style.height - 62 : 80
|
|
5200
4969
|
})
|
|
5201
4970
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -5221,7 +4990,7 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5221
4990
|
|
|
5222
4991
|
return /*#__PURE__*/React.createElement("div", {
|
|
5223
4992
|
className: "imageInput_image",
|
|
5224
|
-
style: _objectSpread$
|
|
4993
|
+
style: _objectSpread$c({}, _this3.props.style)
|
|
5225
4994
|
});
|
|
5226
4995
|
};
|
|
5227
4996
|
|
|
@@ -5252,12 +5021,12 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5252
5021
|
return /*#__PURE__*/React.createElement("div", {
|
|
5253
5022
|
key: index,
|
|
5254
5023
|
className: this.getClassNames(input, inputsLength),
|
|
5255
|
-
style: _objectSpread$
|
|
5024
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5256
5025
|
}, /*#__PURE__*/React.createElement(Dropzone, {
|
|
5257
5026
|
className: "imageInput_upload ".concat(this.getErrorState()),
|
|
5258
5027
|
accept: this.props.accept,
|
|
5259
5028
|
onDrop: this.onDrop,
|
|
5260
|
-
style: _objectSpread$
|
|
5029
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5261
5030
|
}, function (_ref2) {
|
|
5262
5031
|
var isDragActive = _ref2.isDragActive;
|
|
5263
5032
|
_ref2.isDragReject;
|
|
@@ -5276,7 +5045,7 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5276
5045
|
}, _this3.props.multiple ? "Upload files" : "Upload a file"));
|
|
5277
5046
|
}), /*#__PURE__*/React.createElement("div", {
|
|
5278
5047
|
className: "imageInput_uploading",
|
|
5279
|
-
style: _objectSpread$
|
|
5048
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5280
5049
|
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
5281
5050
|
className: "spinner imageInput_spinner",
|
|
5282
5051
|
name: "spinner fa-pulse fa-fw"
|
|
@@ -5289,7 +5058,7 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5289
5058
|
|
|
5290
5059
|
return /*#__PURE__*/React.createElement("div", {
|
|
5291
5060
|
className: "imageInputContainer clearfix ".concat(inputs.length === 1 ? 'imageInputContainer-noPadding' : '', " ").concat(this.props.simpleStyle ? 'imageInputContainer-simple' : ''),
|
|
5292
|
-
style: _objectSpread$
|
|
5061
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5293
5062
|
}, inputs.map(function (input, index) {
|
|
5294
5063
|
return _this4.renderInput(input, index, inputs.length);
|
|
5295
5064
|
}));
|
|
@@ -5311,26 +5080,26 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5311
5080
|
return FileInputComponent;
|
|
5312
5081
|
}(Component);
|
|
5313
5082
|
|
|
5314
|
-
var mapStateToProps$
|
|
5083
|
+
var mapStateToProps$5 = function mapStateToProps() {
|
|
5315
5084
|
return {};
|
|
5316
5085
|
};
|
|
5317
5086
|
|
|
5318
|
-
var FileInput = connect(mapStateToProps$
|
|
5087
|
+
var FileInput = connect(mapStateToProps$5, {}, null, {
|
|
5319
5088
|
withRef: true
|
|
5320
5089
|
})(FileInputComponent);
|
|
5321
5090
|
|
|
5322
|
-
function ownKeys$
|
|
5091
|
+
function ownKeys$b(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
5323
5092
|
|
|
5324
|
-
function _objectSpread$
|
|
5093
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$b(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5325
5094
|
|
|
5326
|
-
function _createSuper$
|
|
5095
|
+
function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5327
5096
|
|
|
5328
|
-
function _isNativeReflectConstruct$
|
|
5097
|
+
function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5329
5098
|
|
|
5330
5099
|
var GenericInput = /*#__PURE__*/function (_Component) {
|
|
5331
5100
|
_inherits(GenericInput, _Component);
|
|
5332
5101
|
|
|
5333
|
-
var _super = _createSuper$
|
|
5102
|
+
var _super = _createSuper$q(GenericInput);
|
|
5334
5103
|
|
|
5335
5104
|
function GenericInput() {
|
|
5336
5105
|
_classCallCheck(this, GenericInput);
|
|
@@ -5435,7 +5204,7 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
5435
5204
|
|
|
5436
5205
|
if (!_.isUndefined(this.props.inputComponent)) {
|
|
5437
5206
|
return /*#__PURE__*/React.createElement("div", {
|
|
5438
|
-
style: _objectSpread$
|
|
5207
|
+
style: _objectSpread$b(_objectSpread$b({}, styles$7.row), {}, {
|
|
5439
5208
|
alignItems: 'flex-start'
|
|
5440
5209
|
})
|
|
5441
5210
|
}, this.props.isRequired && /*#__PURE__*/React.createElement("div", {
|
|
@@ -5446,7 +5215,7 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
5446
5215
|
if (!_.isUndefined(this.props.type) && this.props.type === 'textarea') {
|
|
5447
5216
|
// Render expandable text area
|
|
5448
5217
|
return /*#__PURE__*/React.createElement("div", {
|
|
5449
|
-
style: _objectSpread$
|
|
5218
|
+
style: _objectSpread$b(_objectSpread$b({}, styles$7.row), {}, {
|
|
5450
5219
|
alignItems: 'flex-start'
|
|
5451
5220
|
})
|
|
5452
5221
|
}, this.props.isRequired && /*#__PURE__*/React.createElement("div", {
|
|
@@ -5460,7 +5229,7 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
5460
5229
|
onChange: this.props.onChange,
|
|
5461
5230
|
onKeyPress: this.props.onKeyPress || this.props.onEnter,
|
|
5462
5231
|
onKeyDown: this.props.onKeyDown,
|
|
5463
|
-
style: _objectSpread$
|
|
5232
|
+
style: _objectSpread$b({}, this.props.inputStyle),
|
|
5464
5233
|
readOnly: !_.isUndefined(this.props.readOnly) ? this.props.readOnly : false,
|
|
5465
5234
|
disabled: !_.isUndefined(this.props.disabled) ? this.props.disabled : false,
|
|
5466
5235
|
autoComplete: this.getAutoComplete(),
|
|
@@ -5472,7 +5241,7 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
5472
5241
|
|
|
5473
5242
|
|
|
5474
5243
|
return /*#__PURE__*/React.createElement("div", {
|
|
5475
|
-
style: _objectSpread$
|
|
5244
|
+
style: _objectSpread$b(_objectSpread$b({}, styles$7.row), this.props.textWrapperStyle)
|
|
5476
5245
|
}, this.props.isRequired && /*#__PURE__*/React.createElement("div", {
|
|
5477
5246
|
className: "inputRequired "
|
|
5478
5247
|
}), /*#__PURE__*/React.createElement("input", {
|
|
@@ -5488,7 +5257,7 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
5488
5257
|
onClick: this.props.onClick,
|
|
5489
5258
|
onKeyPress: this.props.onKeyPress || this.props.onEnter,
|
|
5490
5259
|
onKeyDown: this.props.onKeyDown,
|
|
5491
|
-
style: _objectSpread$
|
|
5260
|
+
style: _objectSpread$b({}, this.props.inputStyle),
|
|
5492
5261
|
readOnly: !_.isUndefined(this.props.readOnly) ? this.props.readOnly : false,
|
|
5493
5262
|
disabled: !_.isUndefined(this.props.disabled) ? this.props.disabled : false,
|
|
5494
5263
|
autoComplete: this.getAutoComplete(),
|
|
@@ -5503,9 +5272,9 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
5503
5272
|
value: function render() {
|
|
5504
5273
|
return /*#__PURE__*/React.createElement("div", {
|
|
5505
5274
|
className: this.getClassNames(),
|
|
5506
|
-
style: _objectSpread$
|
|
5275
|
+
style: _objectSpread$b({}, this.props.style)
|
|
5507
5276
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5508
|
-
style: _objectSpread$
|
|
5277
|
+
style: _objectSpread$b(_objectSpread$b({}, styles$7.row), {}, {
|
|
5509
5278
|
marginBottom: 0,
|
|
5510
5279
|
justifyContent: 'space-between'
|
|
5511
5280
|
})
|
|
@@ -5528,14 +5297,14 @@ var styles$7 = {
|
|
|
5528
5297
|
}
|
|
5529
5298
|
};
|
|
5530
5299
|
|
|
5531
|
-
function _createSuper$
|
|
5300
|
+
function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5532
5301
|
|
|
5533
|
-
function _isNativeReflectConstruct$
|
|
5302
|
+
function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5534
5303
|
|
|
5535
5304
|
var Header = /*#__PURE__*/function (_Component) {
|
|
5536
5305
|
_inherits(Header, _Component);
|
|
5537
5306
|
|
|
5538
|
-
var _super = _createSuper$
|
|
5307
|
+
var _super = _createSuper$p(Header);
|
|
5539
5308
|
|
|
5540
5309
|
function Header() {
|
|
5541
5310
|
var _this;
|
|
@@ -5642,29 +5411,29 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
5642
5411
|
return Header;
|
|
5643
5412
|
}(Component);
|
|
5644
5413
|
|
|
5645
|
-
var mapStateToProps$
|
|
5414
|
+
var mapStateToProps$4 = function mapStateToProps(state) {
|
|
5646
5415
|
return {
|
|
5647
5416
|
auth: state.auth,
|
|
5648
5417
|
isSideMenuOpen: state.nav.isSideMenuOpen
|
|
5649
5418
|
};
|
|
5650
5419
|
};
|
|
5651
5420
|
|
|
5652
|
-
var exportObj$2 = connect(mapStateToProps$
|
|
5421
|
+
var exportObj$2 = connect(mapStateToProps$4, {
|
|
5653
5422
|
setNavData: setNavData
|
|
5654
5423
|
})(withRouter(Header));
|
|
5655
5424
|
|
|
5656
|
-
function ownKeys$
|
|
5425
|
+
function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
5657
5426
|
|
|
5658
|
-
function _objectSpread$
|
|
5427
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$a(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5659
5428
|
|
|
5660
|
-
function _createSuper$
|
|
5429
|
+
function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5661
5430
|
|
|
5662
|
-
function _isNativeReflectConstruct$
|
|
5431
|
+
function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5663
5432
|
|
|
5664
5433
|
var Popup = /*#__PURE__*/function (_Component) {
|
|
5665
5434
|
_inherits(Popup, _Component);
|
|
5666
5435
|
|
|
5667
|
-
var _super = _createSuper$
|
|
5436
|
+
var _super = _createSuper$o(Popup);
|
|
5668
5437
|
|
|
5669
5438
|
function Popup() {
|
|
5670
5439
|
_classCallCheck(this, Popup);
|
|
@@ -5722,7 +5491,7 @@ var Popup = /*#__PURE__*/function (_Component) {
|
|
|
5722
5491
|
return /*#__PURE__*/React.createElement(Button, {
|
|
5723
5492
|
key: index,
|
|
5724
5493
|
buttonType: b.type,
|
|
5725
|
-
style: _objectSpread$
|
|
5494
|
+
style: _objectSpread$a({
|
|
5726
5495
|
marginLeft: 8,
|
|
5727
5496
|
marginRight: 8
|
|
5728
5497
|
}, b.style),
|
|
@@ -5741,7 +5510,7 @@ var Popup = /*#__PURE__*/function (_Component) {
|
|
|
5741
5510
|
return /*#__PURE__*/React.createElement(Button, {
|
|
5742
5511
|
key: index,
|
|
5743
5512
|
buttonType: b.type,
|
|
5744
|
-
style: _objectSpread$
|
|
5513
|
+
style: _objectSpread$a({
|
|
5745
5514
|
marginLeft: 16
|
|
5746
5515
|
}, b.style),
|
|
5747
5516
|
className: b.className,
|
|
@@ -5774,13 +5543,13 @@ var Popup = /*#__PURE__*/function (_Component) {
|
|
|
5774
5543
|
return Popup;
|
|
5775
5544
|
}(Component);
|
|
5776
5545
|
|
|
5777
|
-
function ownKeys$
|
|
5546
|
+
function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
5778
5547
|
|
|
5779
|
-
function _objectSpread$
|
|
5548
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$9(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5780
5549
|
|
|
5781
|
-
function _createSuper$
|
|
5550
|
+
function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5782
5551
|
|
|
5783
|
-
function _isNativeReflectConstruct$
|
|
5552
|
+
function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5784
5553
|
var DEFAULT_INPUT = {
|
|
5785
5554
|
uploadingImage: false,
|
|
5786
5555
|
value: '',
|
|
@@ -5790,7 +5559,7 @@ var DEFAULT_INPUT = {
|
|
|
5790
5559
|
var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
5791
5560
|
_inherits(ImageInputComponent, _Component);
|
|
5792
5561
|
|
|
5793
|
-
var _super = _createSuper$
|
|
5562
|
+
var _super = _createSuper$n(ImageInputComponent);
|
|
5794
5563
|
|
|
5795
5564
|
function ImageInputComponent() {
|
|
5796
5565
|
var _this;
|
|
@@ -5921,7 +5690,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5921
5690
|
case 5:
|
|
5922
5691
|
folders = _context2.sent;
|
|
5923
5692
|
|
|
5924
|
-
_this.setState(_objectSpread$
|
|
5693
|
+
_this.setState(_objectSpread$9({
|
|
5925
5694
|
addingFolder: false,
|
|
5926
5695
|
folders: folders
|
|
5927
5696
|
}, _this.cancelAddStates));
|
|
@@ -5986,7 +5755,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5986
5755
|
_this.handleFile(newInput, file);
|
|
5987
5756
|
}
|
|
5988
5757
|
} else {
|
|
5989
|
-
var _newInput = _objectSpread$
|
|
5758
|
+
var _newInput = _objectSpread$9(_objectSpread$9({}, DEFAULT_INPUT), {}, {
|
|
5990
5759
|
fromLibrary: fromLibrary
|
|
5991
5760
|
});
|
|
5992
5761
|
|
|
@@ -6089,11 +5858,11 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6089
5858
|
event.stopPropagation();
|
|
6090
5859
|
|
|
6091
5860
|
if (window.confirm("Are you sure you want to delete ".concat(folder.Name, "?"))) {
|
|
6092
|
-
var deletingFolder = _objectSpread$
|
|
5861
|
+
var deletingFolder = _objectSpread$9({}, _this.state.deletingFolder);
|
|
6093
5862
|
|
|
6094
5863
|
deletingFolder[folder.RowId] = true;
|
|
6095
5864
|
|
|
6096
|
-
_this.setState(_objectSpread$
|
|
5865
|
+
_this.setState(_objectSpread$9({
|
|
6097
5866
|
deletingFolder: _.clone(deletingFolder)
|
|
6098
5867
|
}, _this.cancelAddStates), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
6099
5868
|
var folders;
|
|
@@ -6146,7 +5915,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6146
5915
|
// Unselect the image first if selected
|
|
6147
5916
|
if (image.Selected) _this.toggleLibraryItem(image);
|
|
6148
5917
|
|
|
6149
|
-
var deletingImage = _objectSpread$
|
|
5918
|
+
var deletingImage = _objectSpread$9({}, _this.state.deletingImage);
|
|
6150
5919
|
|
|
6151
5920
|
deletingImage[image.Value] = true;
|
|
6152
5921
|
|
|
@@ -6607,7 +6376,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6607
6376
|
className: "imageInput_simpleContainer"
|
|
6608
6377
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6609
6378
|
className: "imageInput_image",
|
|
6610
|
-
style: _objectSpread$
|
|
6379
|
+
style: _objectSpread$9(_objectSpread$9({}, _this6.getImageStyle(input.displayValue)), _this6.props.style)
|
|
6611
6380
|
}, /*#__PURE__*/React.createElement(Dropzone, {
|
|
6612
6381
|
accept: "image/jpeg, image/png".concat(_this6.props.allowVideo ? ', video/*' : ''),
|
|
6613
6382
|
onDrop: function onDrop(files) {
|
|
@@ -6623,7 +6392,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6623
6392
|
|
|
6624
6393
|
return /*#__PURE__*/React.createElement("div", {
|
|
6625
6394
|
className: "imageInput_image",
|
|
6626
|
-
style: _objectSpread$
|
|
6395
|
+
style: _objectSpread$9(_objectSpread$9({}, _this6.getImageStyle(input.displayValue)), _this6.props.style)
|
|
6627
6396
|
});
|
|
6628
6397
|
};
|
|
6629
6398
|
|
|
@@ -6656,12 +6425,12 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6656
6425
|
return /*#__PURE__*/React.createElement("div", {
|
|
6657
6426
|
key: index,
|
|
6658
6427
|
className: this.getClassNames(input, inputsLength),
|
|
6659
|
-
style: _objectSpread$
|
|
6428
|
+
style: _objectSpread$9({}, this.props.style)
|
|
6660
6429
|
}, /*#__PURE__*/React.createElement(Dropzone, {
|
|
6661
6430
|
className: "imageInput_upload ".concat(this.getErrorState()),
|
|
6662
6431
|
accept: "image/jpeg, image/png".concat(this.props.allowVideo ? ', video/*' : ''),
|
|
6663
6432
|
onDrop: this.onDrop,
|
|
6664
|
-
style: _objectSpread$
|
|
6433
|
+
style: _objectSpread$9({}, this.props.style)
|
|
6665
6434
|
}, function (_ref8) {
|
|
6666
6435
|
var isDragActive = _ref8.isDragActive;
|
|
6667
6436
|
_ref8.isDragReject;
|
|
@@ -6680,7 +6449,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6680
6449
|
}, _this6.props.multiple ? "Upload ".concat(mediaText) : "Upload an ".concat(mediaText)));
|
|
6681
6450
|
}), /*#__PURE__*/React.createElement("div", {
|
|
6682
6451
|
className: "imageInput_uploading",
|
|
6683
|
-
style: _objectSpread$
|
|
6452
|
+
style: _objectSpread$9({}, this.props.style)
|
|
6684
6453
|
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
6685
6454
|
className: "spinner imageInput_spinner",
|
|
6686
6455
|
name: "spinner fa-pulse fa-fw"
|
|
@@ -6706,7 +6475,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6706
6475
|
className: classes
|
|
6707
6476
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6708
6477
|
className: "imageInput_image",
|
|
6709
|
-
style: _objectSpread$
|
|
6478
|
+
style: _objectSpread$9({}, this.getImageStyle(image[1400])),
|
|
6710
6479
|
onClick: this.toggleLibraryItem.bind(this, image)
|
|
6711
6480
|
}), /*#__PURE__*/React.createElement("div", {
|
|
6712
6481
|
className: "imageInput_selected"
|
|
@@ -6899,7 +6668,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6899
6668
|
var mediaText = this.props.allowVideo ? 'media' : "image".concat(this.props.multiple ? 's' : '');
|
|
6900
6669
|
return /*#__PURE__*/React.createElement("div", {
|
|
6901
6670
|
className: "imageInputContainer imageInputContainer-library",
|
|
6902
|
-
style: _objectSpread$
|
|
6671
|
+
style: _objectSpread$9({}, this.props.style)
|
|
6903
6672
|
}, this.renderBreadCrumbs(), stockFolder ? this.state.imageLibrary.map(function (image, index) {
|
|
6904
6673
|
return _this12.renderLibraryImage(image, index);
|
|
6905
6674
|
}) : /*#__PURE__*/React.createElement("div", null, this.canAddImageToLibrary() && /*#__PURE__*/React.createElement(Dropzone, {
|
|
@@ -6948,7 +6717,7 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
6948
6717
|
|
|
6949
6718
|
return /*#__PURE__*/React.createElement("div", {
|
|
6950
6719
|
className: "imageInputContainer ".concat(inputs.length === 1 ? 'imageInputContainer-noPadding' : ''),
|
|
6951
|
-
style: _objectSpread$
|
|
6720
|
+
style: _objectSpread$9({}, this.props.style)
|
|
6952
6721
|
}, inputs.map(function (input, index) {
|
|
6953
6722
|
return _this13.renderInput(input, index, inputs.length);
|
|
6954
6723
|
}));
|
|
@@ -7073,24 +6842,24 @@ var styles$6 = {
|
|
|
7073
6842
|
}
|
|
7074
6843
|
};
|
|
7075
6844
|
|
|
7076
|
-
var mapStateToProps$
|
|
6845
|
+
var mapStateToProps$3 = function mapStateToProps(state) {
|
|
7077
6846
|
return {
|
|
7078
6847
|
auth: state.auth
|
|
7079
6848
|
};
|
|
7080
6849
|
};
|
|
7081
6850
|
|
|
7082
|
-
var ImageInput = connect(mapStateToProps$
|
|
6851
|
+
var ImageInput = connect(mapStateToProps$3, {}, null, {
|
|
7083
6852
|
withRef: true
|
|
7084
6853
|
})(ImageInputComponent);
|
|
7085
6854
|
|
|
7086
|
-
function _createSuper$
|
|
6855
|
+
function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7087
6856
|
|
|
7088
|
-
function _isNativeReflectConstruct$
|
|
6857
|
+
function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7089
6858
|
|
|
7090
6859
|
var MoreMenu = /*#__PURE__*/function (_Component) {
|
|
7091
6860
|
_inherits(MoreMenu, _Component);
|
|
7092
6861
|
|
|
7093
|
-
var _super = _createSuper$
|
|
6862
|
+
var _super = _createSuper$m(MoreMenu);
|
|
7094
6863
|
|
|
7095
6864
|
function MoreMenu() {
|
|
7096
6865
|
_classCallCheck(this, MoreMenu);
|
|
@@ -7120,18 +6889,18 @@ var MoreMenu = /*#__PURE__*/function (_Component) {
|
|
|
7120
6889
|
return MoreMenu;
|
|
7121
6890
|
}(Component);
|
|
7122
6891
|
|
|
7123
|
-
function ownKeys$
|
|
6892
|
+
function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7124
6893
|
|
|
7125
|
-
function _objectSpread$
|
|
6894
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$8(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7126
6895
|
|
|
7127
|
-
function _createSuper$
|
|
6896
|
+
function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7128
6897
|
|
|
7129
|
-
function _isNativeReflectConstruct$
|
|
6898
|
+
function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7130
6899
|
|
|
7131
6900
|
var OverlayPage = /*#__PURE__*/function (_Component) {
|
|
7132
6901
|
_inherits(OverlayPage, _Component);
|
|
7133
6902
|
|
|
7134
|
-
var _super = _createSuper$
|
|
6903
|
+
var _super = _createSuper$l(OverlayPage);
|
|
7135
6904
|
|
|
7136
6905
|
function OverlayPage(props) {
|
|
7137
6906
|
var _this;
|
|
@@ -7184,9 +6953,9 @@ var OverlayPage = /*#__PURE__*/function (_Component) {
|
|
|
7184
6953
|
key: "render",
|
|
7185
6954
|
value: function render() {
|
|
7186
6955
|
return /*#__PURE__*/React.createElement("div", {
|
|
7187
|
-
style: _objectSpread$
|
|
6956
|
+
style: _objectSpread$8(_objectSpread$8({}, styles$5.pageWrapper), this.props.style)
|
|
7188
6957
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7189
|
-
style: _objectSpread$
|
|
6958
|
+
style: _objectSpread$8(_objectSpread$8({}, styles$5.backgroundOverlay), this.props.backgroundStyle)
|
|
7190
6959
|
}), this.renderContent());
|
|
7191
6960
|
}
|
|
7192
6961
|
}]);
|
|
@@ -7213,18 +6982,18 @@ var styles$5 = {
|
|
|
7213
6982
|
}
|
|
7214
6983
|
};
|
|
7215
6984
|
|
|
7216
|
-
function ownKeys$
|
|
6985
|
+
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7217
6986
|
|
|
7218
|
-
function _objectSpread$
|
|
6987
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$7(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7219
6988
|
|
|
7220
|
-
function _createSuper$
|
|
6989
|
+
function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7221
6990
|
|
|
7222
|
-
function _isNativeReflectConstruct$
|
|
6991
|
+
function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7223
6992
|
|
|
7224
6993
|
var OverlayPageContents = /*#__PURE__*/function (_Component) {
|
|
7225
6994
|
_inherits(OverlayPageContents, _Component);
|
|
7226
6995
|
|
|
7227
|
-
var _super = _createSuper$
|
|
6996
|
+
var _super = _createSuper$k(OverlayPageContents);
|
|
7228
6997
|
|
|
7229
6998
|
function OverlayPageContents(props) {
|
|
7230
6999
|
var _this;
|
|
@@ -7255,7 +7024,7 @@ var OverlayPageContents = /*#__PURE__*/function (_Component) {
|
|
|
7255
7024
|
return /*#__PURE__*/React.createElement("div", {
|
|
7256
7025
|
id: this.props.id,
|
|
7257
7026
|
className: "animateOpacity",
|
|
7258
|
-
style: _objectSpread$
|
|
7027
|
+
style: _objectSpread$7(_objectSpread$7({}, styles$4.wrapper), {}, {
|
|
7259
7028
|
height: this.props.noBottomButtons ? '100%' : 'calc(100% - 57px)',
|
|
7260
7029
|
opacity: this.state.opacity
|
|
7261
7030
|
}, this.props.style)
|
|
@@ -7279,18 +7048,18 @@ var styles$4 = {
|
|
|
7279
7048
|
}
|
|
7280
7049
|
};
|
|
7281
7050
|
|
|
7282
|
-
function ownKeys$
|
|
7051
|
+
function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7283
7052
|
|
|
7284
|
-
function _objectSpread$
|
|
7053
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7285
7054
|
|
|
7286
|
-
function _createSuper$
|
|
7055
|
+
function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7287
7056
|
|
|
7288
|
-
function _isNativeReflectConstruct$
|
|
7057
|
+
function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7289
7058
|
|
|
7290
7059
|
var OverlayPageSection = /*#__PURE__*/function (_Component) {
|
|
7291
7060
|
_inherits(OverlayPageSection, _Component);
|
|
7292
7061
|
|
|
7293
|
-
var _super = _createSuper$
|
|
7062
|
+
var _super = _createSuper$j(OverlayPageSection);
|
|
7294
7063
|
|
|
7295
7064
|
function OverlayPageSection() {
|
|
7296
7065
|
_classCallCheck(this, OverlayPageSection);
|
|
@@ -7312,7 +7081,7 @@ var OverlayPageSection = /*#__PURE__*/function (_Component) {
|
|
|
7312
7081
|
value: function render() {
|
|
7313
7082
|
return /*#__PURE__*/React.createElement("div", _extends({}, this.props, {
|
|
7314
7083
|
className: this.getClassName(),
|
|
7315
|
-
style: _objectSpread$
|
|
7084
|
+
style: _objectSpread$6(_objectSpread$6({}, styles$3.wrapper), this.props.style)
|
|
7316
7085
|
}), this.props.children);
|
|
7317
7086
|
}
|
|
7318
7087
|
}]);
|
|
@@ -7331,18 +7100,18 @@ var styles$3 = {
|
|
|
7331
7100
|
}
|
|
7332
7101
|
};
|
|
7333
7102
|
|
|
7334
|
-
function ownKeys$
|
|
7103
|
+
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7335
7104
|
|
|
7336
|
-
function _objectSpread$
|
|
7105
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7337
7106
|
|
|
7338
|
-
function _createSuper$
|
|
7107
|
+
function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7339
7108
|
|
|
7340
|
-
function _isNativeReflectConstruct$
|
|
7109
|
+
function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7341
7110
|
|
|
7342
7111
|
var OverlayPageBottomButtons = /*#__PURE__*/function (_Component) {
|
|
7343
7112
|
_inherits(OverlayPageBottomButtons, _Component);
|
|
7344
7113
|
|
|
7345
|
-
var _super = _createSuper$
|
|
7114
|
+
var _super = _createSuper$i(OverlayPageBottomButtons);
|
|
7346
7115
|
|
|
7347
7116
|
function OverlayPageBottomButtons(props) {
|
|
7348
7117
|
var _this;
|
|
@@ -7372,7 +7141,7 @@ var OverlayPageBottomButtons = /*#__PURE__*/function (_Component) {
|
|
|
7372
7141
|
value: function render() {
|
|
7373
7142
|
return /*#__PURE__*/React.createElement("div", {
|
|
7374
7143
|
className: "animateOpacity",
|
|
7375
|
-
style: _objectSpread$
|
|
7144
|
+
style: _objectSpread$5(_objectSpread$5({}, styles$2.wrapper), {}, {
|
|
7376
7145
|
opacity: this.state.opacity
|
|
7377
7146
|
}, this.props.style)
|
|
7378
7147
|
}, this.props.children);
|
|
@@ -7396,14 +7165,14 @@ var styles$2 = {
|
|
|
7396
7165
|
}
|
|
7397
7166
|
};
|
|
7398
7167
|
|
|
7399
|
-
function _createSuper$
|
|
7168
|
+
function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7400
7169
|
|
|
7401
|
-
function _isNativeReflectConstruct$
|
|
7170
|
+
function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7402
7171
|
|
|
7403
7172
|
var PageTitle = /*#__PURE__*/function (_Component) {
|
|
7404
7173
|
_inherits(PageTitle, _Component);
|
|
7405
7174
|
|
|
7406
|
-
var _super = _createSuper$
|
|
7175
|
+
var _super = _createSuper$h(PageTitle);
|
|
7407
7176
|
|
|
7408
7177
|
function PageTitle() {
|
|
7409
7178
|
_classCallCheck(this, PageTitle);
|
|
@@ -7423,6 +7192,106 @@ var PageTitle = /*#__PURE__*/function (_Component) {
|
|
|
7423
7192
|
return PageTitle;
|
|
7424
7193
|
}(Component);
|
|
7425
7194
|
|
|
7195
|
+
function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7196
|
+
|
|
7197
|
+
function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7198
|
+
|
|
7199
|
+
var Text = /*#__PURE__*/function (_Component) {
|
|
7200
|
+
_inherits(Text, _Component);
|
|
7201
|
+
|
|
7202
|
+
var _super = _createSuper$g(Text);
|
|
7203
|
+
|
|
7204
|
+
function Text() {
|
|
7205
|
+
_classCallCheck(this, Text);
|
|
7206
|
+
|
|
7207
|
+
return _super.apply(this, arguments);
|
|
7208
|
+
}
|
|
7209
|
+
|
|
7210
|
+
_createClass(Text, [{
|
|
7211
|
+
key: "getClassName",
|
|
7212
|
+
value: function getClassName() {
|
|
7213
|
+
if (this.props.className) {
|
|
7214
|
+
return " ".concat(this.props.className);
|
|
7215
|
+
}
|
|
7216
|
+
|
|
7217
|
+
return '';
|
|
7218
|
+
}
|
|
7219
|
+
}, {
|
|
7220
|
+
key: "render",
|
|
7221
|
+
value: function render() {
|
|
7222
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
7223
|
+
className: "text-".concat(this.props.type).concat(this.getClassName()),
|
|
7224
|
+
style: this.props.style
|
|
7225
|
+
}, this.props.children);
|
|
7226
|
+
}
|
|
7227
|
+
}]);
|
|
7228
|
+
|
|
7229
|
+
return Text;
|
|
7230
|
+
}(Component);
|
|
7231
|
+
|
|
7232
|
+
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7233
|
+
|
|
7234
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7235
|
+
|
|
7236
|
+
function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7237
|
+
|
|
7238
|
+
function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7239
|
+
|
|
7240
|
+
var ProfilePicComponent = /*#__PURE__*/function (_Component) {
|
|
7241
|
+
_inherits(ProfilePicComponent, _Component);
|
|
7242
|
+
|
|
7243
|
+
var _super = _createSuper$f(ProfilePicComponent);
|
|
7244
|
+
|
|
7245
|
+
function ProfilePicComponent() {
|
|
7246
|
+
_classCallCheck(this, ProfilePicComponent);
|
|
7247
|
+
|
|
7248
|
+
return _super.apply(this, arguments);
|
|
7249
|
+
}
|
|
7250
|
+
|
|
7251
|
+
_createClass(ProfilePicComponent, [{
|
|
7252
|
+
key: "renderPic",
|
|
7253
|
+
value: function renderPic() {
|
|
7254
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7255
|
+
className: this.props.className,
|
|
7256
|
+
style: _objectSpread$4({
|
|
7257
|
+
width: this.props.size || 30,
|
|
7258
|
+
height: this.props.size || 30,
|
|
7259
|
+
borderRadius: this.props.size / 2 || 15,
|
|
7260
|
+
backgroundColor: this.props.colourBrandingApp,
|
|
7261
|
+
backgroundSize: 'cover',
|
|
7262
|
+
backgroundPosition: 'center',
|
|
7263
|
+
backgroundImage: "url(".concat(!_.isEmpty(this.props.image) ? this.props.image : CoreConfig.env.defaultProfileImage, ")")
|
|
7264
|
+
}, this.props.style),
|
|
7265
|
+
alt: "Profile Pic"
|
|
7266
|
+
});
|
|
7267
|
+
}
|
|
7268
|
+
}, {
|
|
7269
|
+
key: "render",
|
|
7270
|
+
value: function render() {
|
|
7271
|
+
if (this.props.hoverText) {
|
|
7272
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7273
|
+
className: "profilePicHover ".concat(this.props.containerClass)
|
|
7274
|
+
}, this.renderPic(), /*#__PURE__*/React.createElement(Text, {
|
|
7275
|
+
type: "h5",
|
|
7276
|
+
className: "profilePicHover_text"
|
|
7277
|
+
}, this.props.hoverText));
|
|
7278
|
+
}
|
|
7279
|
+
|
|
7280
|
+
return this.renderPic();
|
|
7281
|
+
}
|
|
7282
|
+
}]);
|
|
7283
|
+
|
|
7284
|
+
return ProfilePicComponent;
|
|
7285
|
+
}(Component);
|
|
7286
|
+
|
|
7287
|
+
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
7288
|
+
return {
|
|
7289
|
+
colourBrandingApp: getAppColourFromState(state)
|
|
7290
|
+
};
|
|
7291
|
+
};
|
|
7292
|
+
|
|
7293
|
+
var ProfilePic = connect(mapStateToProps$2, {})(ProfilePicComponent);
|
|
7294
|
+
|
|
7426
7295
|
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7427
7296
|
|
|
7428
7297
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -8826,42 +8695,22 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8826
8695
|
|
|
8827
8696
|
var _super = _createSuper$4(AudienceSelector);
|
|
8828
8697
|
|
|
8829
|
-
function AudienceSelector() {
|
|
8698
|
+
function AudienceSelector(props) {
|
|
8830
8699
|
var _this;
|
|
8831
8700
|
|
|
8832
8701
|
_classCallCheck(this, AudienceSelector);
|
|
8833
8702
|
|
|
8834
|
-
|
|
8835
|
-
args[_key] = arguments[_key];
|
|
8836
|
-
}
|
|
8703
|
+
_this = _super.call(this, props);
|
|
8837
8704
|
|
|
8838
|
-
_this
|
|
8705
|
+
_defineProperty(_assertThisInitialized(_this), "onChangeSelection", function () {
|
|
8706
|
+
var _this$props = _this.props,
|
|
8707
|
+
updateValidation = _this$props.updateValidation,
|
|
8708
|
+
onChange = _this$props.onChange;
|
|
8839
8709
|
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
ShortName: 'Primary'
|
|
8845
|
-
}, {
|
|
8846
|
-
Title: 'All Staff Users',
|
|
8847
|
-
Key: 'staff',
|
|
8848
|
-
ShortName: 'Staff'
|
|
8849
|
-
}, {
|
|
8850
|
-
Title: 'All Linked Users',
|
|
8851
|
-
Key: 'family',
|
|
8852
|
-
ShortName: 'Linked'
|
|
8853
|
-
}],
|
|
8854
|
-
types: [],
|
|
8855
|
-
AudienceType: 'All',
|
|
8856
|
-
showInclude: false,
|
|
8857
|
-
includeList: [],
|
|
8858
|
-
showExclude: false,
|
|
8859
|
-
excludeList: [],
|
|
8860
|
-
Type: '',
|
|
8861
|
-
Category: '',
|
|
8862
|
-
userList: [],
|
|
8863
|
-
tagList: [],
|
|
8864
|
-
AudienceTagList: []
|
|
8710
|
+
var isValid = _this.validateAudienceSelection();
|
|
8711
|
+
|
|
8712
|
+
if (updateValidation) updateValidation(isValid);
|
|
8713
|
+
if (onChange) onChange(_this.getAudienceType(), _this.getAudienceTypeSelection(), isValid);
|
|
8865
8714
|
});
|
|
8866
8715
|
|
|
8867
8716
|
_defineProperty(_assertThisInitialized(_this), "selectTag", function (key) {
|
|
@@ -8871,9 +8720,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8871
8720
|
excludeList: []
|
|
8872
8721
|
});
|
|
8873
8722
|
|
|
8874
|
-
setTimeout(
|
|
8875
|
-
_this.props.updateValidation(_this.validateAudienceSelection());
|
|
8876
|
-
}, 50);
|
|
8723
|
+
setTimeout(_this.onChangeSelection, 50);
|
|
8877
8724
|
});
|
|
8878
8725
|
|
|
8879
8726
|
_defineProperty(_assertThisInitialized(_this), "validateCustom", function () {
|
|
@@ -8881,6 +8728,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8881
8728
|
});
|
|
8882
8729
|
|
|
8883
8730
|
_defineProperty(_assertThisInitialized(_this), "getAvailableAudienceTags", function () {
|
|
8731
|
+
var includeSelected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
8884
8732
|
var _this$state = _this.state,
|
|
8885
8733
|
categories = _this$state.categories,
|
|
8886
8734
|
types = _this$state.types,
|
|
@@ -8910,7 +8758,8 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8910
8758
|
Title: "User Tag: ".concat(t.Title)
|
|
8911
8759
|
};
|
|
8912
8760
|
});
|
|
8913
|
-
|
|
8761
|
+
var result = [].concat(_toConsumableArray(categoryTags), _toConsumableArray(userTypeTags), _toConsumableArray(userTagTags));
|
|
8762
|
+
return includeSelected ? result : result.filter(function (t) {
|
|
8914
8763
|
return !_.some(AudienceTagList, function (at) {
|
|
8915
8764
|
return at.Id === t.Id;
|
|
8916
8765
|
});
|
|
@@ -8922,9 +8771,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8922
8771
|
|
|
8923
8772
|
_this.setState({
|
|
8924
8773
|
AudienceTagList: AudienceTagList
|
|
8925
|
-
},
|
|
8926
|
-
return _this.props.updateValidation(_this.validateAudienceSelection());
|
|
8927
|
-
});
|
|
8774
|
+
}, _this.onChangeSelection);
|
|
8928
8775
|
});
|
|
8929
8776
|
|
|
8930
8777
|
_defineProperty(_assertThisInitialized(_this), "onDetachAudienceTag", function (tag) {
|
|
@@ -8934,26 +8781,58 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8934
8781
|
|
|
8935
8782
|
_this.setState({
|
|
8936
8783
|
AudienceTagList: AudienceTagList
|
|
8937
|
-
},
|
|
8938
|
-
return _this.props.updateValidation(_this.validateAudienceSelection());
|
|
8939
|
-
});
|
|
8784
|
+
}, _this.onChangeSelection);
|
|
8940
8785
|
});
|
|
8941
8786
|
|
|
8787
|
+
_this.state = {
|
|
8788
|
+
categories: [{
|
|
8789
|
+
Title: 'All Primary Users',
|
|
8790
|
+
Key: 'resident',
|
|
8791
|
+
ShortName: 'Primary'
|
|
8792
|
+
}, {
|
|
8793
|
+
Title: 'All Staff Users',
|
|
8794
|
+
Key: 'staff',
|
|
8795
|
+
ShortName: 'Staff'
|
|
8796
|
+
}, {
|
|
8797
|
+
Title: 'All Linked Users',
|
|
8798
|
+
Key: 'family',
|
|
8799
|
+
ShortName: 'Linked'
|
|
8800
|
+
}],
|
|
8801
|
+
types: [],
|
|
8802
|
+
AudienceType: props.audienceType || 'All',
|
|
8803
|
+
showInclude: false,
|
|
8804
|
+
includeList: [],
|
|
8805
|
+
showExclude: false,
|
|
8806
|
+
excludeList: [],
|
|
8807
|
+
Type: '',
|
|
8808
|
+
Category: '',
|
|
8809
|
+
userList: [],
|
|
8810
|
+
tagList: [],
|
|
8811
|
+
AudienceTagList: props.audienceTypeSelection || []
|
|
8812
|
+
};
|
|
8942
8813
|
return _this;
|
|
8943
8814
|
}
|
|
8944
8815
|
|
|
8945
8816
|
_createClass(AudienceSelector, [{
|
|
8946
8817
|
key: "componentDidMount",
|
|
8947
8818
|
value: function componentDidMount() {
|
|
8948
|
-
var _this$
|
|
8949
|
-
disallowUserType = _this$
|
|
8950
|
-
custom = _this$
|
|
8951
|
-
disallowSingleUsers = _this$
|
|
8952
|
-
allowTags = _this$
|
|
8819
|
+
var _this$props2 = this.props,
|
|
8820
|
+
disallowUserType = _this$props2.disallowUserType,
|
|
8821
|
+
custom = _this$props2.custom,
|
|
8822
|
+
disallowSingleUsers = _this$props2.disallowSingleUsers,
|
|
8823
|
+
allowTags = _this$props2.allowTags;
|
|
8953
8824
|
if (!disallowUserType || custom) this.getUserTypes();
|
|
8954
8825
|
if (!disallowSingleUsers) this.getUsers();
|
|
8955
8826
|
if (allowTags || custom) this.getUserTags();
|
|
8956
8827
|
}
|
|
8828
|
+
}, {
|
|
8829
|
+
key: "componentDidUpdate",
|
|
8830
|
+
value: function componentDidUpdate(prevProps) {
|
|
8831
|
+
var newState = {};
|
|
8832
|
+
if (prevProps.audienceType !== this.props.audienceType) newState.AudienceType = this.props.audienceType;
|
|
8833
|
+
if (!_.isEqual(prevProps.audienceTypeSelection, this.props.audienceTypeSelection)) newState.AudienceTagList = this.props.audienceTypeSelection;
|
|
8834
|
+
if (!_.isEmpty(newState)) this.setState(newState);
|
|
8835
|
+
}
|
|
8957
8836
|
}, {
|
|
8958
8837
|
key: "onSubmit",
|
|
8959
8838
|
value: function onSubmit() {
|
|
@@ -8977,12 +8856,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8977
8856
|
Category = _this$state2.Category,
|
|
8978
8857
|
Tag = _this$state2.Tag,
|
|
8979
8858
|
Type = _this$state2.Type;
|
|
8980
|
-
if (AudienceType === 'Custom') return AudienceTagList
|
|
8981
|
-
return {
|
|
8982
|
-
AudienceType: at.AudienceType,
|
|
8983
|
-
AudienceTypeSelection: at.AudienceTypeSelection
|
|
8984
|
-
};
|
|
8985
|
-
});
|
|
8859
|
+
if (AudienceType === 'Custom') return AudienceTagList;
|
|
8986
8860
|
if (AudienceType === 'Category') return Category;
|
|
8987
8861
|
if (AudienceType === 'UserTags') return Tag;
|
|
8988
8862
|
return Type;
|
|
@@ -9037,8 +8911,6 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9037
8911
|
}, {
|
|
9038
8912
|
key: "onChangeOption",
|
|
9039
8913
|
value: function onChangeOption(type) {
|
|
9040
|
-
var _this4 = this;
|
|
9041
|
-
|
|
9042
8914
|
this.setState({
|
|
9043
8915
|
AudienceType: type,
|
|
9044
8916
|
Type: '',
|
|
@@ -9046,20 +8918,18 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9046
8918
|
includeList: [],
|
|
9047
8919
|
excludeList: []
|
|
9048
8920
|
});
|
|
9049
|
-
setTimeout(
|
|
9050
|
-
_this4.props.updateValidation(_this4.validateAudienceSelection());
|
|
9051
|
-
}, 50);
|
|
8921
|
+
setTimeout(this.onChangeSelection, 50);
|
|
9052
8922
|
}
|
|
9053
8923
|
}, {
|
|
9054
8924
|
key: "getOptions",
|
|
9055
8925
|
value: function getOptions() {
|
|
9056
|
-
var
|
|
8926
|
+
var _this4 = this;
|
|
9057
8927
|
|
|
9058
8928
|
var options = [{
|
|
9059
8929
|
Label: 'All users',
|
|
9060
8930
|
Value: 'All',
|
|
9061
8931
|
onChange: function onChange() {
|
|
9062
|
-
return
|
|
8932
|
+
return _this4.onChangeOption('All');
|
|
9063
8933
|
}
|
|
9064
8934
|
}];
|
|
9065
8935
|
|
|
@@ -9068,7 +8938,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9068
8938
|
Label: 'Custom',
|
|
9069
8939
|
Value: 'Custom',
|
|
9070
8940
|
onChange: function onChange() {
|
|
9071
|
-
return
|
|
8941
|
+
return _this4.onChangeOption('Custom');
|
|
9072
8942
|
}
|
|
9073
8943
|
});
|
|
9074
8944
|
} else {
|
|
@@ -9076,7 +8946,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9076
8946
|
Label: 'By user category',
|
|
9077
8947
|
Value: 'Category',
|
|
9078
8948
|
onChange: function onChange() {
|
|
9079
|
-
return
|
|
8949
|
+
return _this4.onChangeOption('Category');
|
|
9080
8950
|
}
|
|
9081
8951
|
});
|
|
9082
8952
|
}
|
|
@@ -9086,7 +8956,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9086
8956
|
Label: 'By user type',
|
|
9087
8957
|
Value: 'UserType',
|
|
9088
8958
|
onChange: function onChange() {
|
|
9089
|
-
return
|
|
8959
|
+
return _this4.onChangeOption('UserType');
|
|
9090
8960
|
}
|
|
9091
8961
|
});
|
|
9092
8962
|
}
|
|
@@ -9096,7 +8966,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9096
8966
|
Label: 'By user tag',
|
|
9097
8967
|
Value: 'UserTags',
|
|
9098
8968
|
onChange: function onChange() {
|
|
9099
|
-
return
|
|
8969
|
+
return _this4.onChangeOption('UserTags');
|
|
9100
8970
|
}
|
|
9101
8971
|
});
|
|
9102
8972
|
}
|
|
@@ -9106,7 +8976,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9106
8976
|
Label: 'To single users',
|
|
9107
8977
|
Value: 'User',
|
|
9108
8978
|
onChange: function onChange() {
|
|
9109
|
-
return
|
|
8979
|
+
return _this4.onChangeOption('User');
|
|
9110
8980
|
}
|
|
9111
8981
|
});
|
|
9112
8982
|
}
|
|
@@ -9129,24 +8999,20 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9129
8999
|
}, {
|
|
9130
9000
|
key: "selectType",
|
|
9131
9001
|
value: function selectType(key) {
|
|
9132
|
-
var _this6 = this;
|
|
9133
|
-
|
|
9134
9002
|
this.setState({
|
|
9135
9003
|
Type: key,
|
|
9136
9004
|
includeList: [],
|
|
9137
9005
|
excludeList: []
|
|
9138
9006
|
});
|
|
9139
|
-
setTimeout(
|
|
9140
|
-
_this6.props.updateValidation(_this6.validateAudienceSelection());
|
|
9141
|
-
}, 50);
|
|
9007
|
+
setTimeout(this.onChangeSelection, 50);
|
|
9142
9008
|
}
|
|
9143
9009
|
}, {
|
|
9144
9010
|
key: "getTypeTitle",
|
|
9145
9011
|
value: function getTypeTitle() {
|
|
9146
|
-
var
|
|
9012
|
+
var _this5 = this;
|
|
9147
9013
|
|
|
9148
9014
|
var typeObject = _.find(this.state.types, function (t) {
|
|
9149
|
-
return t.typeName ===
|
|
9015
|
+
return t.typeName === _this5.state.Type;
|
|
9150
9016
|
});
|
|
9151
9017
|
|
|
9152
9018
|
if (typeObject) {
|
|
@@ -9158,10 +9024,10 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9158
9024
|
}, {
|
|
9159
9025
|
key: "getTagTitle",
|
|
9160
9026
|
value: function getTagTitle() {
|
|
9161
|
-
var
|
|
9027
|
+
var _this6 = this;
|
|
9162
9028
|
|
|
9163
9029
|
var tag = _.find(this.state.tagList, function (t) {
|
|
9164
|
-
return t.Id ===
|
|
9030
|
+
return t.Id === _this6.state.Tag;
|
|
9165
9031
|
});
|
|
9166
9032
|
|
|
9167
9033
|
if (tag) {
|
|
@@ -9173,10 +9039,10 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9173
9039
|
}, {
|
|
9174
9040
|
key: "getUserTypes",
|
|
9175
9041
|
value: function getUserTypes() {
|
|
9176
|
-
var
|
|
9042
|
+
var _this7 = this;
|
|
9177
9043
|
|
|
9178
9044
|
typeActions.getUserTypes(this.props.auth.site).then(function (res) {
|
|
9179
|
-
|
|
9045
|
+
_this7.props.setAuth({
|
|
9180
9046
|
userTypes: _.cloneDeep(res.data)
|
|
9181
9047
|
});
|
|
9182
9048
|
|
|
@@ -9185,7 +9051,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9185
9051
|
e.Key = e.typeName;
|
|
9186
9052
|
|
|
9187
9053
|
if (e.category) {
|
|
9188
|
-
var category = _.find(
|
|
9054
|
+
var category = _.find(_this7.state.categories, function (c) {
|
|
9189
9055
|
return c.Key === e.category;
|
|
9190
9056
|
});
|
|
9191
9057
|
|
|
@@ -9194,7 +9060,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9194
9060
|
}
|
|
9195
9061
|
});
|
|
9196
9062
|
|
|
9197
|
-
|
|
9063
|
+
_this7.setState({
|
|
9198
9064
|
types: res.data
|
|
9199
9065
|
});
|
|
9200
9066
|
}).catch(function (error) {});
|
|
@@ -9202,12 +9068,12 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9202
9068
|
}, {
|
|
9203
9069
|
key: "getUserList",
|
|
9204
9070
|
value: function getUserList() {
|
|
9205
|
-
var
|
|
9071
|
+
var _this8 = this;
|
|
9206
9072
|
|
|
9207
9073
|
if (this.state.AudienceType === 'UserType' && !_.isEmpty(this.state.Type)) {
|
|
9208
9074
|
var users = [];
|
|
9209
9075
|
this.state.userList.forEach(function (element) {
|
|
9210
|
-
if (element.type !==
|
|
9076
|
+
if (element.type !== _this8.state.Type) users.push(element);
|
|
9211
9077
|
});
|
|
9212
9078
|
return _.sortBy(users, 'displayName');
|
|
9213
9079
|
}
|
|
@@ -9216,7 +9082,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9216
9082
|
var _users = [];
|
|
9217
9083
|
|
|
9218
9084
|
var types = _.filter(this.state.types, function (type) {
|
|
9219
|
-
return type.category ===
|
|
9085
|
+
return type.category === _this8.state.Category;
|
|
9220
9086
|
}).map(function (type) {
|
|
9221
9087
|
return type.typeName;
|
|
9222
9088
|
});
|
|
@@ -9234,24 +9100,20 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9234
9100
|
}, {
|
|
9235
9101
|
key: "selectCat",
|
|
9236
9102
|
value: function selectCat(key, e) {
|
|
9237
|
-
var _this11 = this;
|
|
9238
|
-
|
|
9239
9103
|
this.setState({
|
|
9240
9104
|
Category: key,
|
|
9241
9105
|
includeList: [],
|
|
9242
9106
|
excludeList: []
|
|
9243
9107
|
});
|
|
9244
|
-
setTimeout(
|
|
9245
|
-
_this11.props.updateValidation(_this11.validateAudienceSelection());
|
|
9246
|
-
}, 50);
|
|
9108
|
+
setTimeout(this.onChangeSelection, 50);
|
|
9247
9109
|
}
|
|
9248
9110
|
}, {
|
|
9249
9111
|
key: "getCatTitle",
|
|
9250
9112
|
value: function getCatTitle() {
|
|
9251
|
-
var
|
|
9113
|
+
var _this9 = this;
|
|
9252
9114
|
|
|
9253
9115
|
var typeObject = _.find(this.state.categories, function (t) {
|
|
9254
|
-
return t.Key ===
|
|
9116
|
+
return t.Key === _this9.state.Category;
|
|
9255
9117
|
});
|
|
9256
9118
|
|
|
9257
9119
|
if (typeObject) {
|
|
@@ -9307,12 +9169,12 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9307
9169
|
}, {
|
|
9308
9170
|
key: "getUserExcludeList",
|
|
9309
9171
|
value: function getUserExcludeList() {
|
|
9310
|
-
var
|
|
9172
|
+
var _this10 = this;
|
|
9311
9173
|
|
|
9312
9174
|
if (this.state.AudienceType === 'UserType' && !_.isEmpty(this.state.Type)) {
|
|
9313
9175
|
var users = [];
|
|
9314
9176
|
this.state.userList.forEach(function (element) {
|
|
9315
|
-
if (element.type ===
|
|
9177
|
+
if (element.type === _this10.state.Type) users.push(element);
|
|
9316
9178
|
});
|
|
9317
9179
|
return _.sortBy(users, 'displayName');
|
|
9318
9180
|
}
|
|
@@ -9321,7 +9183,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9321
9183
|
var _users2 = [];
|
|
9322
9184
|
|
|
9323
9185
|
var types = _.filter(this.state.types, function (type) {
|
|
9324
|
-
return type.category ===
|
|
9186
|
+
return type.category === _this10.state.Category;
|
|
9325
9187
|
}).map(function (type) {
|
|
9326
9188
|
return type.typeName;
|
|
9327
9189
|
});
|
|
@@ -9339,8 +9201,6 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9339
9201
|
}, {
|
|
9340
9202
|
key: "addToInc",
|
|
9341
9203
|
value: function addToInc(user) {
|
|
9342
|
-
var _this14 = this;
|
|
9343
|
-
|
|
9344
9204
|
var list = _toConsumableArray(this.state.includeList);
|
|
9345
9205
|
|
|
9346
9206
|
list.push({
|
|
@@ -9351,23 +9211,17 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9351
9211
|
this.setState({
|
|
9352
9212
|
includeList: list
|
|
9353
9213
|
});
|
|
9354
|
-
setTimeout(
|
|
9355
|
-
_this14.props.updateValidation(_this14.validateAudienceSelection());
|
|
9356
|
-
}, 50);
|
|
9214
|
+
setTimeout(this.onChangeSelection, 50);
|
|
9357
9215
|
}
|
|
9358
9216
|
}, {
|
|
9359
9217
|
key: "removeUserInc",
|
|
9360
9218
|
value: function removeUserInc(user) {
|
|
9361
|
-
var _this15 = this;
|
|
9362
|
-
|
|
9363
9219
|
this.setState({
|
|
9364
9220
|
includeList: _.filter(this.state.includeList, function (ev) {
|
|
9365
9221
|
return ev.Id !== user.Id;
|
|
9366
9222
|
})
|
|
9367
9223
|
});
|
|
9368
|
-
setTimeout(
|
|
9369
|
-
_this15.props.updateValidation(_this15.validateAudienceSelection());
|
|
9370
|
-
}, 50);
|
|
9224
|
+
setTimeout(this.onChangeSelection, 50);
|
|
9371
9225
|
}
|
|
9372
9226
|
}, {
|
|
9373
9227
|
key: "addToEx",
|
|
@@ -9395,7 +9249,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9395
9249
|
}, {
|
|
9396
9250
|
key: "renderExcludes",
|
|
9397
9251
|
value: function renderExcludes() {
|
|
9398
|
-
var
|
|
9252
|
+
var _this11 = this;
|
|
9399
9253
|
|
|
9400
9254
|
if (!this.showUserPickers(false)) {
|
|
9401
9255
|
return null;
|
|
@@ -9407,8 +9261,8 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9407
9261
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9408
9262
|
className: "flex flex-between pointer",
|
|
9409
9263
|
onClick: function onClick() {
|
|
9410
|
-
|
|
9411
|
-
showExclude: !
|
|
9264
|
+
_this11.setState({
|
|
9265
|
+
showExclude: !_this11.state.showExclude
|
|
9412
9266
|
});
|
|
9413
9267
|
}
|
|
9414
9268
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -9432,7 +9286,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9432
9286
|
}, {
|
|
9433
9287
|
key: "renderIncludes",
|
|
9434
9288
|
value: function renderIncludes() {
|
|
9435
|
-
var
|
|
9289
|
+
var _this12 = this;
|
|
9436
9290
|
|
|
9437
9291
|
if (!this.showUserPickers(true)) {
|
|
9438
9292
|
return null;
|
|
@@ -9444,8 +9298,8 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9444
9298
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9445
9299
|
className: "flex flex-between pointer",
|
|
9446
9300
|
onClick: function onClick() {
|
|
9447
|
-
|
|
9448
|
-
showInclude: !
|
|
9301
|
+
_this12.setState({
|
|
9302
|
+
showInclude: !_this12.state.showInclude
|
|
9449
9303
|
});
|
|
9450
9304
|
}
|
|
9451
9305
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -9469,7 +9323,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9469
9323
|
}, {
|
|
9470
9324
|
key: "renderAssignedAudiences",
|
|
9471
9325
|
value: function renderAssignedAudiences() {
|
|
9472
|
-
var
|
|
9326
|
+
var _this13 = this;
|
|
9473
9327
|
|
|
9474
9328
|
var AudienceTagList = this.state.AudienceTagList;
|
|
9475
9329
|
var maxWidth = this.props.maxWidth;
|
|
@@ -9488,7 +9342,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9488
9342
|
text: t.Title,
|
|
9489
9343
|
rightIcon: "remove",
|
|
9490
9344
|
rightClick: function rightClick() {
|
|
9491
|
-
return
|
|
9345
|
+
return _this13.onDetachAudienceTag(t);
|
|
9492
9346
|
}
|
|
9493
9347
|
});
|
|
9494
9348
|
}));
|
|
@@ -9496,7 +9350,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9496
9350
|
}, {
|
|
9497
9351
|
key: "renderAvailableAudiences",
|
|
9498
9352
|
value: function renderAvailableAudiences() {
|
|
9499
|
-
var
|
|
9353
|
+
var _this14 = this;
|
|
9500
9354
|
|
|
9501
9355
|
var maxWidth = this.props.maxWidth;
|
|
9502
9356
|
var tags = this.getAvailableAudienceTags();
|
|
@@ -9511,7 +9365,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9511
9365
|
className: "marginLeft-16 marginBottom-8",
|
|
9512
9366
|
text: t.Title,
|
|
9513
9367
|
onClick: function onClick() {
|
|
9514
|
-
return
|
|
9368
|
+
return _this14.onAttachAudienceTag(t);
|
|
9515
9369
|
}
|
|
9516
9370
|
});
|
|
9517
9371
|
}));
|
|
@@ -9532,7 +9386,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9532
9386
|
}, {
|
|
9533
9387
|
key: "render",
|
|
9534
9388
|
value: function render() {
|
|
9535
|
-
var
|
|
9389
|
+
var _this15 = this;
|
|
9536
9390
|
|
|
9537
9391
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
|
|
9538
9392
|
type: "formTitleSmall",
|
|
@@ -9554,10 +9408,10 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9554
9408
|
placeholder: "User Category",
|
|
9555
9409
|
value: this.getCatTitle(),
|
|
9556
9410
|
isValid: function isValid() {
|
|
9557
|
-
return
|
|
9411
|
+
return _this15.validateCategory();
|
|
9558
9412
|
},
|
|
9559
9413
|
showError: function showError() {
|
|
9560
|
-
return
|
|
9414
|
+
return _this15.state.showWarnings && !_this15.validateCategory();
|
|
9561
9415
|
},
|
|
9562
9416
|
options: this.state.categories,
|
|
9563
9417
|
onSelect: this.selectCat.bind(this),
|
|
@@ -9574,10 +9428,10 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9574
9428
|
placeholder: "User Type",
|
|
9575
9429
|
value: this.getTypeTitle(),
|
|
9576
9430
|
isValid: function isValid() {
|
|
9577
|
-
return
|
|
9431
|
+
return _this15.validateType();
|
|
9578
9432
|
},
|
|
9579
9433
|
showError: function showError() {
|
|
9580
|
-
return
|
|
9434
|
+
return _this15.state.showWarnings && !_this15.validateType();
|
|
9581
9435
|
},
|
|
9582
9436
|
options: this.state.types,
|
|
9583
9437
|
onSelect: this.selectType.bind(this),
|
|
@@ -9593,10 +9447,10 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
9593
9447
|
placeholder: "User Tag",
|
|
9594
9448
|
value: this.getTagTitle(),
|
|
9595
9449
|
isValid: function isValid() {
|
|
9596
|
-
return
|
|
9450
|
+
return _this15.validateTag();
|
|
9597
9451
|
},
|
|
9598
9452
|
showError: function showError() {
|
|
9599
|
-
return
|
|
9453
|
+
return _this15.state.showWarnings && !_this15.validateTag();
|
|
9600
9454
|
},
|
|
9601
9455
|
options: this.state.tagList,
|
|
9602
9456
|
onSelect: this.selectTag,
|
|
@@ -10304,8 +10158,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
10304
10158
|
Attachment: Attachment,
|
|
10305
10159
|
Button: Button,
|
|
10306
10160
|
CheckBox: CheckBox,
|
|
10307
|
-
Comment: Comment,
|
|
10308
|
-
CommentSection: CommentSection,
|
|
10309
10161
|
DatePicker: DatePicker,
|
|
10310
10162
|
FileInput: FileInput,
|
|
10311
10163
|
GenericInput: GenericInput,
|