@plusscommunities/pluss-core-web 1.1.1 → 1.1.5
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 +1533 -1454
- package/dist/index.esm.js +1533 -1454
- package/dist/index.umd.js +1533 -1454
- package/package.json +4 -4
- package/src/apis/fileActions.js +25 -29
- package/src/components/AnalyticsFilter.js +2 -1
- package/src/components/AudienceIncluder.js +2 -1
- package/src/components/AudienceSelector.js +3 -2
- package/src/components/DatePicker.js +1 -1
- package/src/components/FileInput.js +1 -1
- package/src/components/GenericInput.js +4 -2
- package/src/components/Header.js +22 -6
- package/src/components/ImageInput.js +4 -5
- package/src/components/MakerPopup.js +1 -1
- package/src/components/OptionsSection.js +1 -1
- package/src/components/OverlayPage.js +12 -1
- package/src/components/ProfilePic.js +1 -1
- package/src/components/StatusButton.js +22 -0
- package/src/components/UserListing.js +10 -23
- package/src/components/index.js +3 -0
- package/src/config.js +1 -2
- package/src/helper/auth/getUserFromState.js +8 -0
- package/src/helper/{colours.js → colours}/getAppColourFromState.js +1 -1
- package/src/helper/files/generateImageName.js +10 -0
- package/src/helper/index.js +7 -0
- package/src/session.js +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -33,7 +33,7 @@ var CoreConfig = {
|
|
|
33
33
|
colourBrandingMain: '',
|
|
34
34
|
colourBrandingOff: '',
|
|
35
35
|
colourBrandingApp: '',
|
|
36
|
-
defaultProfileImage: 'https://
|
|
36
|
+
defaultProfileImage: 'https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-uploads/android/TinyDefaultProfile.png',
|
|
37
37
|
utcOffset: '',
|
|
38
38
|
hasAvailableNews: false,
|
|
39
39
|
newsHaveTags: true,
|
|
@@ -112,8 +112,9 @@ var authedFunction = /*#__PURE__*/function () {
|
|
|
112
112
|
_context2.prev = 11;
|
|
113
113
|
_context2.t0 = _context2["catch"](0);
|
|
114
114
|
console.error('authedFunction error', _context2.t0, request);
|
|
115
|
+
throw _context2.t0;
|
|
115
116
|
|
|
116
|
-
case
|
|
117
|
+
case 15:
|
|
117
118
|
case "end":
|
|
118
119
|
return _context2.stop();
|
|
119
120
|
}
|
|
@@ -548,6 +549,22 @@ var safeReadParams = function safeReadParams(props, key) {
|
|
|
548
549
|
return null;
|
|
549
550
|
};
|
|
550
551
|
|
|
552
|
+
var getUserFromState = function getUserFromState(state) {
|
|
553
|
+
if (!state || !state.auth || !state.auth.user) {
|
|
554
|
+
return {};
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return state.auth.user;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
var getAppColourFromState = function getAppColourFromState(state) {
|
|
561
|
+
if (!state || !state.auth || !state.auth.siteBranding || !state.auth.siteBranding.MainBrandingColour) {
|
|
562
|
+
return CoreConfig.env.colourBrandingApp;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
return state.auth.siteBranding.MainBrandingColour;
|
|
566
|
+
};
|
|
567
|
+
|
|
551
568
|
var getExtension = function getExtension(url) {
|
|
552
569
|
if (!url) {
|
|
553
570
|
return null;
|
|
@@ -588,6 +605,15 @@ var get1400 = function get1400(url) {
|
|
|
588
605
|
return url;
|
|
589
606
|
};
|
|
590
607
|
|
|
608
|
+
var generateImageName = function generateImageName(name) {
|
|
609
|
+
return "xxxxxxxx4xxxyxxxxxxxxxxxxx".concat(name).replace(/[xy]/g, function (c) {
|
|
610
|
+
// eslint-disable-next-line
|
|
611
|
+
var r = Math.random() * 16 | 0,
|
|
612
|
+
v = c === 'x' ? r : r & 0x3 | 0x8;
|
|
613
|
+
return v.toString(16);
|
|
614
|
+
});
|
|
615
|
+
};
|
|
616
|
+
|
|
591
617
|
var getFileName = function getFileName(url, noExtension) {
|
|
592
618
|
if (!url) {
|
|
593
619
|
return null;
|
|
@@ -1493,7 +1519,10 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
1493
1519
|
getUrl: getUrl,
|
|
1494
1520
|
getUrlParams: getUrlParams,
|
|
1495
1521
|
safeReadParams: safeReadParams,
|
|
1522
|
+
getUserFromState: getUserFromState,
|
|
1523
|
+
getAppColourFromState: getAppColourFromState,
|
|
1496
1524
|
get1400: get1400,
|
|
1525
|
+
generateImageName: generateImageName,
|
|
1497
1526
|
getExtension: getExtension,
|
|
1498
1527
|
getFileName: getFileName,
|
|
1499
1528
|
getThumb300: getThumb300,
|
|
@@ -2035,30 +2064,30 @@ var fileActions = {
|
|
|
2035
2064
|
});
|
|
2036
2065
|
});
|
|
2037
2066
|
},
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2067
|
+
blobToFile: function blobToFile(theBlob, fileName) {
|
|
2068
|
+
var file = new File([theBlob], fileName, {
|
|
2069
|
+
lastModified: new Date()
|
|
2070
|
+
});
|
|
2071
|
+
console.log(file);
|
|
2072
|
+
return file;
|
|
2073
|
+
},
|
|
2074
|
+
putCanvas: function putCanvas(canvas, filename) {
|
|
2075
|
+
return new Promise(function (resolve, reject) {
|
|
2076
|
+
var img = canvas.getTrimmedCanvas().toDataURL('image/png');
|
|
2077
|
+
var imageData = Buffer.from(img.replace(/^data:image\/\w+;base64,/, ''), 'base64');
|
|
2078
|
+
canvas.off();
|
|
2079
|
+
var imgName = generateImageName(filename);
|
|
2080
|
+
Storage.put("images/".concat(imgName, ".png"), imageData, {
|
|
2081
|
+
contentType: 'image/png',
|
|
2082
|
+
level: 'public'
|
|
2083
|
+
}).then(function (res) {
|
|
2084
|
+
console.log('put the image');
|
|
2085
|
+
return resolve(res);
|
|
2086
|
+
}).catch(function (err) {
|
|
2087
|
+
return reject(err);
|
|
2088
|
+
});
|
|
2089
|
+
});
|
|
2090
|
+
},
|
|
2062
2091
|
getMediaFolders: function getMediaFolders(site) {
|
|
2063
2092
|
// console.log('getMediaFolders', 'site', site);
|
|
2064
2093
|
var query = {
|
|
@@ -2946,14 +2975,14 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
2946
2975
|
setNavData: setNavData
|
|
2947
2976
|
});
|
|
2948
2977
|
|
|
2949
|
-
function _createSuper$
|
|
2978
|
+
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); }; }
|
|
2950
2979
|
|
|
2951
|
-
function _isNativeReflectConstruct$
|
|
2980
|
+
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; } }
|
|
2952
2981
|
|
|
2953
2982
|
var AddButton = /*#__PURE__*/function (_Component) {
|
|
2954
2983
|
_inherits(AddButton, _Component);
|
|
2955
2984
|
|
|
2956
|
-
var _super = _createSuper$
|
|
2985
|
+
var _super = _createSuper$x(AddButton);
|
|
2957
2986
|
|
|
2958
2987
|
function AddButton() {
|
|
2959
2988
|
_classCallCheck(this, AddButton);
|
|
@@ -3930,14 +3959,14 @@ var icons = {
|
|
|
3930
3959
|
template_sportingClub: template_sportingClub
|
|
3931
3960
|
};
|
|
3932
3961
|
|
|
3933
|
-
function _createSuper$
|
|
3962
|
+
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); }; }
|
|
3934
3963
|
|
|
3935
|
-
function _isNativeReflectConstruct$
|
|
3964
|
+
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; } }
|
|
3936
3965
|
|
|
3937
3966
|
var SVGIcon = /*#__PURE__*/function (_Component) {
|
|
3938
3967
|
_inherits(SVGIcon, _Component);
|
|
3939
3968
|
|
|
3940
|
-
var _super = _createSuper$
|
|
3969
|
+
var _super = _createSuper$w(SVGIcon);
|
|
3941
3970
|
|
|
3942
3971
|
function SVGIcon() {
|
|
3943
3972
|
_classCallCheck(this, SVGIcon);
|
|
@@ -3985,14 +4014,14 @@ var SVGIcon = /*#__PURE__*/function (_Component) {
|
|
|
3985
4014
|
return SVGIcon;
|
|
3986
4015
|
}(Component);
|
|
3987
4016
|
|
|
3988
|
-
function _createSuper$
|
|
4017
|
+
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); }; }
|
|
3989
4018
|
|
|
3990
|
-
function _isNativeReflectConstruct$
|
|
4019
|
+
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; } }
|
|
3991
4020
|
|
|
3992
4021
|
var Attachment = /*#__PURE__*/function (_Component) {
|
|
3993
4022
|
_inherits(Attachment, _Component);
|
|
3994
4023
|
|
|
3995
|
-
var _super = _createSuper$
|
|
4024
|
+
var _super = _createSuper$v(Attachment);
|
|
3996
4025
|
|
|
3997
4026
|
function Attachment() {
|
|
3998
4027
|
_classCallCheck(this, Attachment);
|
|
@@ -4030,14 +4059,14 @@ function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
4030
4059
|
|
|
4031
4060
|
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; }
|
|
4032
4061
|
|
|
4033
|
-
function _createSuper$
|
|
4062
|
+
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); }; }
|
|
4034
4063
|
|
|
4035
|
-
function _isNativeReflectConstruct$
|
|
4064
|
+
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; } }
|
|
4036
4065
|
|
|
4037
4066
|
var Button = /*#__PURE__*/function (_Component) {
|
|
4038
4067
|
_inherits(Button, _Component);
|
|
4039
4068
|
|
|
4040
|
-
var _super = _createSuper$
|
|
4069
|
+
var _super = _createSuper$u(Button);
|
|
4041
4070
|
|
|
4042
4071
|
function Button() {
|
|
4043
4072
|
_classCallCheck(this, Button);
|
|
@@ -4137,14 +4166,14 @@ function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
4137
4166
|
|
|
4138
4167
|
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; }
|
|
4139
4168
|
|
|
4140
|
-
function _createSuper$
|
|
4169
|
+
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); }; }
|
|
4141
4170
|
|
|
4142
|
-
function _isNativeReflectConstruct$
|
|
4171
|
+
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; } }
|
|
4143
4172
|
|
|
4144
4173
|
var CheckBox = /*#__PURE__*/function (_PureComponent) {
|
|
4145
4174
|
_inherits(CheckBox, _PureComponent);
|
|
4146
4175
|
|
|
4147
|
-
var _super = _createSuper$
|
|
4176
|
+
var _super = _createSuper$t(CheckBox);
|
|
4148
4177
|
|
|
4149
4178
|
function CheckBox() {
|
|
4150
4179
|
var _this;
|
|
@@ -4250,27 +4279,19 @@ var styles$8 = {
|
|
|
4250
4279
|
}
|
|
4251
4280
|
};
|
|
4252
4281
|
|
|
4253
|
-
function
|
|
4254
|
-
|
|
4255
|
-
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; }
|
|
4256
|
-
|
|
4257
|
-
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); }; }
|
|
4282
|
+
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); }; }
|
|
4258
4283
|
|
|
4259
|
-
function _isNativeReflectConstruct$
|
|
4260
|
-
var DEFAULT_INPUT$1 = {
|
|
4261
|
-
uploadingFile: false,
|
|
4262
|
-
value: ''
|
|
4263
|
-
};
|
|
4284
|
+
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; } }
|
|
4264
4285
|
|
|
4265
|
-
var
|
|
4266
|
-
_inherits(
|
|
4286
|
+
var P60Icon = /*#__PURE__*/function (_Component) {
|
|
4287
|
+
_inherits(P60Icon, _Component);
|
|
4267
4288
|
|
|
4268
|
-
var _super = _createSuper$
|
|
4289
|
+
var _super = _createSuper$s(P60Icon);
|
|
4269
4290
|
|
|
4270
|
-
function
|
|
4291
|
+
function P60Icon() {
|
|
4271
4292
|
var _this;
|
|
4272
4293
|
|
|
4273
|
-
_classCallCheck(this,
|
|
4294
|
+
_classCallCheck(this, P60Icon);
|
|
4274
4295
|
|
|
4275
4296
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4276
4297
|
args[_key] = arguments[_key];
|
|
@@ -4279,472 +4300,863 @@ var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
4279
4300
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
4280
4301
|
|
|
4281
4302
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
value: ''
|
|
4285
|
-
}]
|
|
4303
|
+
doublePaths: ['add-image', 'add-circle', 'facility', 'news'],
|
|
4304
|
+
triplePaths: []
|
|
4286
4305
|
});
|
|
4287
4306
|
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
return;
|
|
4291
|
-
}
|
|
4292
|
-
|
|
4293
|
-
if (!_this.props.multiple) {
|
|
4294
|
-
var file = _.find(inputs, function (i) {
|
|
4295
|
-
return !i.uploadingFile && !_.isEmpty(i.value);
|
|
4296
|
-
});
|
|
4297
|
-
|
|
4298
|
-
_this.props.refreshCallback(file ? file.value : undefined);
|
|
4299
|
-
} else {
|
|
4300
|
-
var files = _.filter(inputs, function (i) {
|
|
4301
|
-
return !i.uploadingFile && !_.isEmpty(i.value);
|
|
4302
|
-
}).map(function (i) {
|
|
4303
|
-
return i.value;
|
|
4304
|
-
});
|
|
4307
|
+
return _this;
|
|
4308
|
+
}
|
|
4305
4309
|
|
|
4306
|
-
|
|
4310
|
+
_createClass(P60Icon, [{
|
|
4311
|
+
key: "renderIconPaths",
|
|
4312
|
+
value: function renderIconPaths() {
|
|
4313
|
+
if (_.includes(this.state.doublePaths, this.props.icon)) {
|
|
4314
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
|
|
4315
|
+
className: "path1"
|
|
4316
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
4317
|
+
className: "path2".concat(this.props.icon !== 'add-image' ? ' text-white' : '')
|
|
4318
|
+
}));
|
|
4307
4319
|
}
|
|
4308
|
-
});
|
|
4309
|
-
|
|
4310
|
-
_defineProperty(_assertThisInitialized(_this), "onDrop", function (files) {
|
|
4311
|
-
if (_this.props.multiple) {
|
|
4312
|
-
var newInputs = _.clone(_this.state.inputs);
|
|
4313
|
-
|
|
4314
|
-
files.forEach(function (file) {
|
|
4315
|
-
if (_this.props.limit && newInputs.length === _this.props.limit) {
|
|
4316
|
-
// hit limit - replace last input if it's empty
|
|
4317
|
-
if (_.isEmpty(newInputs[newInputs.length - 1].value)) {
|
|
4318
|
-
var newInput = newInputs[newInputs.length - 1];
|
|
4319
|
-
|
|
4320
|
-
_this.handleFile(newInput, file);
|
|
4321
|
-
}
|
|
4322
|
-
} else {
|
|
4323
|
-
var _newInput = _objectSpread$c({}, DEFAULT_INPUT$1);
|
|
4324
|
-
|
|
4325
|
-
newInputs.splice(newInputs.length - 1, 0, _newInput);
|
|
4326
|
-
|
|
4327
|
-
_this.handleFile(_newInput, file);
|
|
4328
|
-
}
|
|
4329
|
-
});
|
|
4330
|
-
|
|
4331
|
-
_this.setState({
|
|
4332
|
-
inputs: newInputs
|
|
4333
|
-
});
|
|
4334
4320
|
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4321
|
+
if (_.includes(this.state.triplePaths, this.props.icon)) {
|
|
4322
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
|
|
4323
|
+
className: "path1"
|
|
4324
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
4325
|
+
className: "path2"
|
|
4326
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
4327
|
+
className: "path3"
|
|
4328
|
+
}));
|
|
4338
4329
|
}
|
|
4339
|
-
});
|
|
4340
|
-
|
|
4341
|
-
_defineProperty(_assertThisInitialized(_this), "handleFile", /*#__PURE__*/function () {
|
|
4342
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(input, file) {
|
|
4343
|
-
var newInputs, uploadFile, url;
|
|
4344
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4345
|
-
while (1) {
|
|
4346
|
-
switch (_context.prev = _context.next) {
|
|
4347
|
-
case 0:
|
|
4348
|
-
if (!(!file || input.uploadingFile)) {
|
|
4349
|
-
_context.next = 2;
|
|
4350
|
-
break;
|
|
4351
|
-
}
|
|
4352
|
-
|
|
4353
|
-
return _context.abrupt("return");
|
|
4354
4330
|
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4331
|
+
return null;
|
|
4332
|
+
}
|
|
4333
|
+
}, {
|
|
4334
|
+
key: "render",
|
|
4335
|
+
value: function render() {
|
|
4336
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, this.props, {
|
|
4337
|
+
className: "".concat(this.props.className, " p60icon-").concat(this.props.icon)
|
|
4338
|
+
}), this.renderIconPaths());
|
|
4339
|
+
}
|
|
4340
|
+
}]);
|
|
4358
4341
|
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
});
|
|
4342
|
+
return P60Icon;
|
|
4343
|
+
}(Component);
|
|
4362
4344
|
|
|
4363
|
-
|
|
4345
|
+
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); }; }
|
|
4364
4346
|
|
|
4365
|
-
|
|
4366
|
-
uploadFile = file;
|
|
4367
|
-
_context.next = 10;
|
|
4368
|
-
return fileActions.uploadMediaAsync(uploadFile, uploadFile.name);
|
|
4347
|
+
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; } }
|
|
4369
4348
|
|
|
4370
|
-
|
|
4371
|
-
|
|
4349
|
+
var DatePicker = /*#__PURE__*/function (_Component) {
|
|
4350
|
+
_inherits(DatePicker, _Component);
|
|
4372
4351
|
|
|
4373
|
-
|
|
4352
|
+
var _super = _createSuper$r(DatePicker);
|
|
4374
4353
|
|
|
4375
|
-
|
|
4376
|
-
|
|
4354
|
+
function DatePicker() {
|
|
4355
|
+
var _this;
|
|
4377
4356
|
|
|
4378
|
-
|
|
4379
|
-
_context.prev = 14;
|
|
4380
|
-
_context.t0 = _context["catch"](6);
|
|
4381
|
-
console.log('handleFile error', _context.t0);
|
|
4357
|
+
_classCallCheck(this, DatePicker);
|
|
4382
4358
|
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4359
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4360
|
+
args[_key] = arguments[_key];
|
|
4361
|
+
}
|
|
4386
4362
|
|
|
4387
|
-
|
|
4388
|
-
case "end":
|
|
4389
|
-
return _context.stop();
|
|
4390
|
-
}
|
|
4391
|
-
}
|
|
4392
|
-
}, _callee, null, [[6, 14]]);
|
|
4393
|
-
}));
|
|
4363
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4394
4364
|
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
}
|
|
4365
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
4366
|
+
shownMonth: new Date(),
|
|
4367
|
+
grid: []
|
|
4368
|
+
});
|
|
4399
4369
|
|
|
4400
4370
|
return _this;
|
|
4401
4371
|
}
|
|
4402
4372
|
|
|
4403
|
-
_createClass(
|
|
4404
|
-
key: "
|
|
4405
|
-
value: function
|
|
4406
|
-
|
|
4373
|
+
_createClass(DatePicker, [{
|
|
4374
|
+
key: "UNSAFE_componentWillMount",
|
|
4375
|
+
value: function UNSAFE_componentWillMount() {
|
|
4376
|
+
this.onNewProps(this.props, true);
|
|
4377
|
+
}
|
|
4378
|
+
}, {
|
|
4379
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
4380
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
4381
|
+
this.onNewProps(nextProps);
|
|
4382
|
+
}
|
|
4383
|
+
}, {
|
|
4384
|
+
key: "onNewProps",
|
|
4385
|
+
value: function onNewProps(nextProps, forceUpdate) {
|
|
4386
|
+
if (this.props.multiple && nextProps.selectedDates !== this.props.selectedDates) {
|
|
4387
|
+
this.generateGrid(this.state.shownMonth, nextProps.selectedDates);
|
|
4388
|
+
} else if (forceUpdate || nextProps.selectedDate !== this.props.selectedDate) {
|
|
4389
|
+
var dateToUse = nextProps.selectedDate;
|
|
4407
4390
|
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
inputs: [{
|
|
4412
|
-
uploadingFile: false,
|
|
4413
|
-
value: _this2.props.hasDefault
|
|
4414
|
-
}]
|
|
4415
|
-
});
|
|
4391
|
+
if (!(dateToUse instanceof Date)) {
|
|
4392
|
+
dateToUse = new Date(dateToUse);
|
|
4393
|
+
}
|
|
4416
4394
|
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
}
|
|
4395
|
+
if (isNaN(dateToUse)) {
|
|
4396
|
+
dateToUse = new Date();
|
|
4420
4397
|
}
|
|
4421
|
-
}, 100);
|
|
4422
|
-
}
|
|
4423
|
-
}, {
|
|
4424
|
-
key: "setValue",
|
|
4425
|
-
value: function setValue(val) {
|
|
4426
|
-
if (typeof val === 'string') {
|
|
4427
|
-
this.setState({
|
|
4428
|
-
inputs: [{
|
|
4429
|
-
uploadingImage: false,
|
|
4430
|
-
value: val
|
|
4431
|
-
}]
|
|
4432
|
-
});
|
|
4433
|
-
} else {
|
|
4434
|
-
var inputs = [];
|
|
4435
|
-
|
|
4436
|
-
_.forEach(val, function (str) {
|
|
4437
|
-
inputs.push({
|
|
4438
|
-
uploadingImage: false,
|
|
4439
|
-
value: str
|
|
4440
|
-
});
|
|
4441
|
-
});
|
|
4442
4398
|
|
|
4443
|
-
if (!this.props.limit || this.props.limit > inputs.length) inputs.push(DEFAULT_INPUT$1);
|
|
4444
4399
|
this.setState({
|
|
4445
|
-
|
|
4400
|
+
shownMonth: dateToUse,
|
|
4401
|
+
selectedDate: dateToUse
|
|
4446
4402
|
});
|
|
4403
|
+
this.generateGrid(dateToUse, dateToUse);
|
|
4447
4404
|
}
|
|
4448
4405
|
}
|
|
4449
4406
|
}, {
|
|
4450
|
-
key: "
|
|
4451
|
-
value: function
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
if (input.uploadingFile) {
|
|
4455
|
-
classes += ' imageInput-uploading';
|
|
4456
|
-
} else if (!_.isEmpty(input.value) && !this.props.onlyAllowUpload) {
|
|
4457
|
-
classes += ' imageInput-hasImage';
|
|
4407
|
+
key: "getDate",
|
|
4408
|
+
value: function getDate() {
|
|
4409
|
+
if (!this.props.selectedDate) {
|
|
4410
|
+
return 'Select day';
|
|
4458
4411
|
}
|
|
4459
4412
|
|
|
4460
|
-
|
|
4461
|
-
|
|
4413
|
+
return moment(this.props.selectedDate).format('dddd, Do MMMM');
|
|
4414
|
+
}
|
|
4415
|
+
}, {
|
|
4416
|
+
key: "getShortDate",
|
|
4417
|
+
value: function getShortDate() {
|
|
4418
|
+
if (!this.props.selectedDate) {
|
|
4419
|
+
return '';
|
|
4462
4420
|
}
|
|
4463
4421
|
|
|
4464
|
-
|
|
4465
|
-
|
|
4422
|
+
return moment(this.props.selectedDate).format('DD/MM/YYYY');
|
|
4423
|
+
}
|
|
4424
|
+
}, {
|
|
4425
|
+
key: "getMonth",
|
|
4426
|
+
value: function getMonth() {
|
|
4427
|
+
return moment(this.state.shownMonth).format('MMMM YYYY');
|
|
4428
|
+
}
|
|
4429
|
+
}, {
|
|
4430
|
+
key: "isDateSelected",
|
|
4431
|
+
value: function isDateSelected(date, selectedDate) {
|
|
4432
|
+
if (this.props.multiple) {
|
|
4433
|
+
return _.includes(selectedDate, date.format('DD-MM-YYYY'));
|
|
4466
4434
|
}
|
|
4467
4435
|
|
|
4468
|
-
return
|
|
4436
|
+
return date.isSame(selectedDate, 'date');
|
|
4469
4437
|
}
|
|
4470
4438
|
}, {
|
|
4471
|
-
key: "
|
|
4472
|
-
value: function
|
|
4473
|
-
|
|
4474
|
-
|
|
4439
|
+
key: "changeMonth",
|
|
4440
|
+
value: function changeMonth(change) {
|
|
4441
|
+
var newShownDate = new Date(this.state.shownMonth.getFullYear(), this.state.shownMonth.getMonth() + 1 + change, 0);
|
|
4442
|
+
this.setState({
|
|
4443
|
+
shownMonth: newShownDate
|
|
4444
|
+
});
|
|
4445
|
+
this.generateGrid(newShownDate);
|
|
4446
|
+
}
|
|
4447
|
+
}, {
|
|
4448
|
+
key: "selectRange",
|
|
4449
|
+
value: function selectRange(date) {
|
|
4450
|
+
var _this2 = this;
|
|
4451
|
+
|
|
4452
|
+
var d1 = moment(this.state.lastSelected, 'DD-MM-YYYY');
|
|
4453
|
+
var d2 = moment(date, 'DD-MM-YYYY');
|
|
4454
|
+
var startDate, endDate;
|
|
4455
|
+
|
|
4456
|
+
if (d1.valueOf() > d2.valueOf()) {
|
|
4457
|
+
// clicked an earlier day
|
|
4458
|
+
startDate = moment(d2);
|
|
4459
|
+
endDate = moment(d1);
|
|
4460
|
+
} else {
|
|
4461
|
+
// clicked a later day
|
|
4462
|
+
startDate = moment(d1);
|
|
4463
|
+
endDate = moment(d2);
|
|
4475
4464
|
}
|
|
4476
4465
|
|
|
4477
|
-
|
|
4466
|
+
var dateRange = [startDate.format('DD-MM-YYYY')];
|
|
4467
|
+
|
|
4468
|
+
while (startDate.format('DD-MM-YYYY') !== endDate.format('DD-MM-YYYY')) {
|
|
4469
|
+
startDate.add(1, 'd');
|
|
4470
|
+
dateRange.push(startDate.format('DD-MM-YYYY'));
|
|
4471
|
+
}
|
|
4472
|
+
|
|
4473
|
+
if (_.includes(this.props.selectedDates, d2.format('DD-MM-YYYY')) && !_.includes(this.props.selectedDates, d1.format('DD-MM-YYYY')) || !_.some(dateRange, function (d) {
|
|
4474
|
+
return !_.includes(_this2.props.selectedDates, d);
|
|
4475
|
+
})) {
|
|
4476
|
+
// the first clicked date was just de-selected and then clicked on a selected date
|
|
4477
|
+
// or every date in the range is already selected, then
|
|
4478
|
+
// de-select the range
|
|
4479
|
+
this.props.selectDate(_.filter(this.props.selectedDates, function (d) {
|
|
4480
|
+
return !_.includes(dateRange, d);
|
|
4481
|
+
}));
|
|
4482
|
+
} else {
|
|
4483
|
+
// select the range
|
|
4484
|
+
var newSelection = [].concat(_toConsumableArray(this.props.selectedDates), dateRange);
|
|
4485
|
+
this.props.selectDate(_.uniq(newSelection));
|
|
4486
|
+
}
|
|
4478
4487
|
}
|
|
4479
4488
|
}, {
|
|
4480
|
-
key: "
|
|
4481
|
-
value: function
|
|
4482
|
-
|
|
4483
|
-
input.uploadingFile = false;
|
|
4489
|
+
key: "selectDate",
|
|
4490
|
+
value: function selectDate(date, e) {
|
|
4491
|
+
console.log('selected a date');
|
|
4484
4492
|
|
|
4485
|
-
|
|
4493
|
+
if (this.props.multiple) {
|
|
4494
|
+
var dateKey = moment(date).format('DD-MM-YYYY');
|
|
4486
4495
|
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4496
|
+
if (e.shiftKey && this.state.lastSelected && this.state.lastSelected !== dateKey) {
|
|
4497
|
+
// shift-click to select range
|
|
4498
|
+
this.selectRange(dateKey);
|
|
4499
|
+
} else {
|
|
4500
|
+
// toggle single date
|
|
4501
|
+
var index = this.props.selectedDates.indexOf(dateKey);
|
|
4502
|
+
|
|
4503
|
+
var newSelection = _toConsumableArray(this.props.selectedDates);
|
|
4504
|
+
|
|
4505
|
+
if (index > -1) {
|
|
4506
|
+
newSelection.splice(index, 1);
|
|
4507
|
+
} else {
|
|
4508
|
+
newSelection.push(dateKey);
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4511
|
+
this.props.selectDate(newSelection);
|
|
4512
|
+
}
|
|
4513
|
+
|
|
4514
|
+
this.setState({
|
|
4515
|
+
lastSelected: dateKey
|
|
4516
|
+
});
|
|
4517
|
+
} else {
|
|
4518
|
+
this.props.selectDate(moment(date).format('YYYY-MM-DD'));
|
|
4519
|
+
}
|
|
4491
4520
|
}
|
|
4492
4521
|
}, {
|
|
4493
|
-
key: "
|
|
4494
|
-
value: function
|
|
4495
|
-
var
|
|
4496
|
-
|
|
4522
|
+
key: "generateGrid",
|
|
4523
|
+
value: function generateGrid(date, selectedDate) {
|
|
4524
|
+
var month = moment(date);
|
|
4525
|
+
var dateToTarget = moment(date).endOf('month');
|
|
4526
|
+
var dateToModify = moment(date).startOf('month');
|
|
4527
|
+
var selectedDateToUse = this.props.multiple ? selectedDate || this.props.selectedDates || [] : moment(selectedDate || this.state.selectedDate); // set dateToModify to be Sunday of that week
|
|
4497
4528
|
|
|
4498
|
-
|
|
4529
|
+
while (dateToModify.day() !== 0) {
|
|
4530
|
+
dateToModify = dateToModify.add(-1, 'day');
|
|
4531
|
+
}
|
|
4499
4532
|
|
|
4500
|
-
|
|
4501
|
-
newInputs.splice(newInputs.indexOf(input), 1);
|
|
4533
|
+
var rows = [[]];
|
|
4502
4534
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
newInputs.push(DEFAULT_INPUT$1);
|
|
4506
|
-
}
|
|
4535
|
+
while (dateToTarget.day() !== 6) {
|
|
4536
|
+
dateToTarget = dateToTarget.add(1, 'day');
|
|
4507
4537
|
}
|
|
4508
4538
|
|
|
4509
|
-
|
|
4510
|
-
this.setState(newState); // for single item
|
|
4539
|
+
dateToTarget = dateToTarget.add(1, 'day'); // add an extra day to complete the week
|
|
4511
4540
|
|
|
4512
|
-
|
|
4513
|
-
|
|
4541
|
+
while (!dateToModify.isSame(dateToTarget, 'day')) {
|
|
4542
|
+
if (rows[rows.length - 1].length === 7) {
|
|
4543
|
+
// week has filled - add new row
|
|
4544
|
+
rows.push([]);
|
|
4545
|
+
}
|
|
4546
|
+
|
|
4547
|
+
var thisDate = moment(dateToModify);
|
|
4548
|
+
rows[rows.length - 1].push({
|
|
4549
|
+
date: thisDate,
|
|
4550
|
+
dateKey: thisDate.format('DD-MM-YYYY'),
|
|
4551
|
+
display: thisDate.date(),
|
|
4552
|
+
isFaded: !thisDate.isSame(month, 'month'),
|
|
4553
|
+
isToday: thisDate.isSame(moment(), 'date'),
|
|
4554
|
+
isSelected: this.isDateSelected(thisDate, selectedDateToUse)
|
|
4555
|
+
});
|
|
4556
|
+
dateToModify = dateToModify.add(1, 'day');
|
|
4514
4557
|
}
|
|
4558
|
+
|
|
4559
|
+
this.setState({
|
|
4560
|
+
grid: rows
|
|
4561
|
+
});
|
|
4515
4562
|
}
|
|
4516
4563
|
}, {
|
|
4517
|
-
key: "
|
|
4518
|
-
value: function
|
|
4564
|
+
key: "renderGrid",
|
|
4565
|
+
value: function renderGrid() {
|
|
4519
4566
|
var _this3 = this;
|
|
4520
4567
|
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4568
|
+
return this.state.grid.map(function (row, index) {
|
|
4569
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4570
|
+
className: "datepicker__row marginTop-8",
|
|
4571
|
+
key: index
|
|
4572
|
+
}, row.map(function (date) {
|
|
4573
|
+
var classes = 'datepicker__date';
|
|
4574
|
+
|
|
4575
|
+
if (date.isFaded) {
|
|
4576
|
+
classes += ' datepicker__date--faded';
|
|
4577
|
+
}
|
|
4578
|
+
|
|
4579
|
+
if (date.isToday) {
|
|
4580
|
+
classes += ' datepicker__date--today';
|
|
4581
|
+
}
|
|
4582
|
+
|
|
4583
|
+
if (date.isSelected) {
|
|
4584
|
+
classes += ' datepicker__date--selected';
|
|
4585
|
+
}
|
|
4525
4586
|
|
|
4526
|
-
if (!_.isEmpty(input.value) && !input.uploadingFile) {
|
|
4527
4587
|
return /*#__PURE__*/React.createElement("div", {
|
|
4528
|
-
className:
|
|
4588
|
+
className: classes,
|
|
4589
|
+
key: date.dateKey
|
|
4529
4590
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4530
|
-
className: "
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
})
|
|
4534
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
4535
|
-
src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
|
|
4536
|
-
className: "imageInput_icon",
|
|
4537
|
-
alt: "file"
|
|
4538
|
-
}), /*#__PURE__*/React.createElement("p", {
|
|
4539
|
-
className: "imageInput_text"
|
|
4540
|
-
}, getFileName(input.value))), /*#__PURE__*/React.createElement(Dropzone, {
|
|
4541
|
-
accept: _this3.props.accept,
|
|
4542
|
-
onDrop: function onDrop(files) {
|
|
4543
|
-
return _this3.onDrop(files, true);
|
|
4544
|
-
},
|
|
4545
|
-
style: {
|
|
4546
|
-
padding: 10
|
|
4591
|
+
className: "datepicker__date__inner",
|
|
4592
|
+
onClick: function onClick(e) {
|
|
4593
|
+
_this3.selectDate(date.date, e);
|
|
4547
4594
|
}
|
|
4548
|
-
},
|
|
4549
|
-
buttonType: "secondary",
|
|
4550
|
-
className: "imageInput_button",
|
|
4551
|
-
disabled: true
|
|
4552
|
-
}, "Change file")));
|
|
4553
|
-
}
|
|
4554
|
-
|
|
4555
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4556
|
-
className: "imageInput_image",
|
|
4557
|
-
style: _objectSpread$c({}, _this3.props.style)
|
|
4558
|
-
});
|
|
4559
|
-
};
|
|
4560
|
-
|
|
4561
|
-
var renderRemove = function renderRemove() {
|
|
4562
|
-
return !_this3.props.disableRemove && !_this3.props.disabled && (_this3.props.simpleStyle ? /*#__PURE__*/React.createElement(FontAwesome, {
|
|
4563
|
-
name: "remove",
|
|
4564
|
-
className: "imageInput_removeIcon",
|
|
4565
|
-
onClick: _this3.removeFile.bind(_this3, input)
|
|
4566
|
-
}) : /*#__PURE__*/React.createElement("p", {
|
|
4567
|
-
className: "imageInput_remove",
|
|
4568
|
-
onClick: _this3.removeFile.bind(_this3, input)
|
|
4569
|
-
}, "remove"));
|
|
4570
|
-
};
|
|
4571
|
-
|
|
4572
|
-
var renderDownload = function renderDownload() {
|
|
4573
|
-
if (_this3.props.noDownload) return null;
|
|
4574
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
4575
|
-
href: input.value,
|
|
4576
|
-
target: "_blank",
|
|
4577
|
-
className: "imageInput_download"
|
|
4578
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
4579
|
-
alt: "",
|
|
4580
|
-
className: "dlicon",
|
|
4581
|
-
src: "https://pluss60-dev-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:efbab8db-136a-446e-b14a-d00af0067841/public/025971e94153af280049fdf3e3/downloadicon.png"
|
|
4595
|
+
}, date.display));
|
|
4582
4596
|
}));
|
|
4583
|
-
};
|
|
4584
|
-
|
|
4585
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4586
|
-
key: index,
|
|
4587
|
-
className: this.getClassNames(input, inputsLength),
|
|
4588
|
-
style: _objectSpread$c({}, this.props.style)
|
|
4589
|
-
}, /*#__PURE__*/React.createElement(Dropzone, {
|
|
4590
|
-
className: "imageInput_upload ".concat(this.getErrorState()),
|
|
4591
|
-
accept: this.props.accept,
|
|
4592
|
-
onDrop: this.onDrop,
|
|
4593
|
-
style: _objectSpread$c({}, this.props.style)
|
|
4594
|
-
}, function (_ref2) {
|
|
4595
|
-
var isDragActive = _ref2.isDragActive;
|
|
4596
|
-
_ref2.isDragReject;
|
|
4597
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4598
|
-
className: "".concat(isDragActive ? 'imageInput_dropZoneActive' : '')
|
|
4599
|
-
}, !_this3.props.simpleStyle && /*#__PURE__*/React.createElement("img", {
|
|
4600
|
-
src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
|
|
4601
|
-
className: "imageInput_icon",
|
|
4602
|
-
alt: "file"
|
|
4603
|
-
}), /*#__PURE__*/React.createElement("p", {
|
|
4604
|
-
className: "imageInput_helpText"
|
|
4605
|
-
}, isDragActive ? "Drop file here" : "Drag and drop file or"), !isDragActive && /*#__PURE__*/React.createElement(Button, {
|
|
4606
|
-
buttonType: "secondary",
|
|
4607
|
-
className: "imageInput_button",
|
|
4608
|
-
disabled: true
|
|
4609
|
-
}, _this3.props.multiple ? "Upload files" : "Upload a file"));
|
|
4610
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
4611
|
-
className: "imageInput_uploading",
|
|
4612
|
-
style: _objectSpread$c({}, this.props.style)
|
|
4613
|
-
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
4614
|
-
className: "spinner imageInput_spinner",
|
|
4615
|
-
name: "spinner fa-pulse fa-fw"
|
|
4616
|
-
})), renderContent(), renderRemove(), renderDownload());
|
|
4597
|
+
});
|
|
4617
4598
|
}
|
|
4618
4599
|
}, {
|
|
4619
|
-
key: "
|
|
4620
|
-
value: function
|
|
4621
|
-
|
|
4600
|
+
key: "renderTop",
|
|
4601
|
+
value: function renderTop() {
|
|
4602
|
+
if (this.props.hideTop) {
|
|
4603
|
+
return null;
|
|
4604
|
+
}
|
|
4605
|
+
|
|
4606
|
+
if (this.props.multiple) {
|
|
4607
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4608
|
+
className: "datepicker__multitop"
|
|
4609
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
4610
|
+
className: "datepicker__multitop__text"
|
|
4611
|
+
}, "Shift + Click to select a range of dates"));
|
|
4612
|
+
}
|
|
4622
4613
|
|
|
4623
4614
|
return /*#__PURE__*/React.createElement("div", {
|
|
4624
|
-
className: "
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
}));
|
|
4629
|
-
}
|
|
4630
|
-
}, {
|
|
4631
|
-
key: "renderContent",
|
|
4632
|
-
value: function renderContent() {
|
|
4633
|
-
return this.renderUploadFiles(this.state.inputs);
|
|
4615
|
+
className: "datepicker__top"
|
|
4616
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
4617
|
+
className: "datepicker__title truncate"
|
|
4618
|
+
}, this.getDate()));
|
|
4634
4619
|
}
|
|
4635
4620
|
}, {
|
|
4636
4621
|
key: "render",
|
|
4637
4622
|
value: function render() {
|
|
4638
4623
|
return /*#__PURE__*/React.createElement("div", {
|
|
4639
|
-
|
|
4640
|
-
|
|
4624
|
+
className: "datepicker noselect",
|
|
4625
|
+
style: this.props.style
|
|
4626
|
+
}, this.renderTop(), /*#__PURE__*/React.createElement("div", {
|
|
4627
|
+
className: "datepicker__bottom"
|
|
4628
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
4629
|
+
className: "datepicker__bottomHeader"
|
|
4630
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
4631
|
+
className: "datepicker__monthSelector"
|
|
4632
|
+
}, /*#__PURE__*/React.createElement(P60Icon, {
|
|
4633
|
+
className: "datepicker__monthChevron",
|
|
4634
|
+
icon: "chevron_left",
|
|
4635
|
+
onClick: this.changeMonth.bind(this, -1)
|
|
4636
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
4637
|
+
className: "datepicker__selectedMonth"
|
|
4638
|
+
}, this.getMonth()), /*#__PURE__*/React.createElement(P60Icon, {
|
|
4639
|
+
className: "datepicker__monthChevron",
|
|
4640
|
+
icon: "chevron_right",
|
|
4641
|
+
onClick: this.changeMonth.bind(this, 1)
|
|
4642
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
4643
|
+
className: "datepicker__row marginTop-16"
|
|
4644
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
4645
|
+
className: "datepicker__colHeader"
|
|
4646
|
+
}, "SUN"), /*#__PURE__*/React.createElement("p", {
|
|
4647
|
+
className: "datepicker__colHeader"
|
|
4648
|
+
}, "MON"), /*#__PURE__*/React.createElement("p", {
|
|
4649
|
+
className: "datepicker__colHeader"
|
|
4650
|
+
}, "TUE"), /*#__PURE__*/React.createElement("p", {
|
|
4651
|
+
className: "datepicker__colHeader"
|
|
4652
|
+
}, "WED"), /*#__PURE__*/React.createElement("p", {
|
|
4653
|
+
className: "datepicker__colHeader"
|
|
4654
|
+
}, "THU"), /*#__PURE__*/React.createElement("p", {
|
|
4655
|
+
className: "datepicker__colHeader"
|
|
4656
|
+
}, "FRI"), /*#__PURE__*/React.createElement("p", {
|
|
4657
|
+
className: "datepicker__colHeader"
|
|
4658
|
+
}, "SAT")), this.renderGrid()));
|
|
4641
4659
|
}
|
|
4642
4660
|
}]);
|
|
4643
4661
|
|
|
4644
|
-
return
|
|
4662
|
+
return DatePicker;
|
|
4645
4663
|
}(Component);
|
|
4646
4664
|
|
|
4647
|
-
|
|
4648
|
-
return {};
|
|
4649
|
-
};
|
|
4650
|
-
|
|
4651
|
-
var FileInput = connect(mapStateToProps$5, {}, null, {
|
|
4652
|
-
withRef: true
|
|
4653
|
-
})(FileInputComponent);
|
|
4654
|
-
|
|
4655
|
-
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; }
|
|
4665
|
+
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; }
|
|
4656
4666
|
|
|
4657
|
-
function _objectSpread$
|
|
4667
|
+
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; }
|
|
4658
4668
|
|
|
4659
4669
|
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); }; }
|
|
4660
4670
|
|
|
4661
4671
|
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; } }
|
|
4672
|
+
var DEFAULT_INPUT$1 = {
|
|
4673
|
+
uploadingFile: false,
|
|
4674
|
+
value: ''
|
|
4675
|
+
};
|
|
4662
4676
|
|
|
4663
|
-
var
|
|
4664
|
-
_inherits(
|
|
4677
|
+
var FileInputComponent = /*#__PURE__*/function (_Component) {
|
|
4678
|
+
_inherits(FileInputComponent, _Component);
|
|
4665
4679
|
|
|
4666
|
-
var _super = _createSuper$q(
|
|
4680
|
+
var _super = _createSuper$q(FileInputComponent);
|
|
4667
4681
|
|
|
4668
|
-
function
|
|
4669
|
-
|
|
4682
|
+
function FileInputComponent() {
|
|
4683
|
+
var _this;
|
|
4670
4684
|
|
|
4671
|
-
|
|
4672
|
-
}
|
|
4685
|
+
_classCallCheck(this, FileInputComponent);
|
|
4673
4686
|
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
4677
|
-
if (!_.isUndefined(this.props.autofocus) && this.props.autofocus) {
|
|
4678
|
-
this._input.focus();
|
|
4679
|
-
}
|
|
4687
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4688
|
+
args[_key] = arguments[_key];
|
|
4680
4689
|
}
|
|
4681
|
-
}, {
|
|
4682
|
-
key: "getAutoComplete",
|
|
4683
|
-
value: function getAutoComplete() {
|
|
4684
|
-
if (!_.isUndefined(this.props.autoComplete)) {
|
|
4685
|
-
return this.props.autoComplete ? 'on' : 'off';
|
|
4686
|
-
}
|
|
4687
4690
|
|
|
4688
|
-
|
|
4689
|
-
}
|
|
4690
|
-
}, {
|
|
4691
|
-
key: "isValid",
|
|
4692
|
-
value: function isValid() {
|
|
4693
|
-
if (!_.isUndefined(this.props.isValid) && typeof this.props.isValid === 'function') {
|
|
4694
|
-
return this.props.isValid();
|
|
4695
|
-
}
|
|
4691
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
4696
4692
|
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
}
|
|
4704
|
-
}, {
|
|
4705
|
-
key: "getClassNames",
|
|
4706
|
-
value: function getClassNames() {
|
|
4707
|
-
var string = "".concat(this.props.className, " genericInputContainer");
|
|
4693
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
4694
|
+
inputs: [{
|
|
4695
|
+
uploadingFile: false,
|
|
4696
|
+
value: ''
|
|
4697
|
+
}]
|
|
4698
|
+
});
|
|
4708
4699
|
|
|
4709
|
-
|
|
4710
|
-
|
|
4700
|
+
_defineProperty(_assertThisInitialized(_this), "checkRefreshCallback", function (inputs) {
|
|
4701
|
+
if (_.isUndefined(_this.props.refreshCallback)) {
|
|
4702
|
+
return;
|
|
4711
4703
|
}
|
|
4712
4704
|
|
|
4713
|
-
if (
|
|
4714
|
-
|
|
4715
|
-
|
|
4705
|
+
if (!_this.props.multiple) {
|
|
4706
|
+
var file = _.find(inputs, function (i) {
|
|
4707
|
+
return !i.uploadingFile && !_.isEmpty(i.value);
|
|
4708
|
+
});
|
|
4716
4709
|
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4710
|
+
_this.props.refreshCallback(file ? file.value : undefined);
|
|
4711
|
+
} else {
|
|
4712
|
+
var files = _.filter(inputs, function (i) {
|
|
4713
|
+
return !i.uploadingFile && !_.isEmpty(i.value);
|
|
4714
|
+
}).map(function (i) {
|
|
4715
|
+
return i.value;
|
|
4716
|
+
});
|
|
4720
4717
|
|
|
4721
|
-
|
|
4722
|
-
return string + ' genericInput-valid';
|
|
4718
|
+
_this.props.refreshCallback(files);
|
|
4723
4719
|
}
|
|
4720
|
+
});
|
|
4724
4721
|
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4722
|
+
_defineProperty(_assertThisInitialized(_this), "onDrop", function (files) {
|
|
4723
|
+
if (_this.props.multiple) {
|
|
4724
|
+
var newInputs = _.clone(_this.state.inputs);
|
|
4728
4725
|
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
var style = {};
|
|
4726
|
+
files.forEach(function (file) {
|
|
4727
|
+
if (_this.props.limit && newInputs.length === _this.props.limit) {
|
|
4728
|
+
// hit limit - replace last input if it's empty
|
|
4729
|
+
if (_.isEmpty(newInputs[newInputs.length - 1].value)) {
|
|
4730
|
+
var newInput = newInputs[newInputs.length - 1];
|
|
4735
4731
|
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4732
|
+
_this.handleFile(newInput, file);
|
|
4733
|
+
}
|
|
4734
|
+
} else {
|
|
4735
|
+
var _newInput = _objectSpread$c({}, DEFAULT_INPUT$1);
|
|
4739
4736
|
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4737
|
+
newInputs.splice(newInputs.length - 1, 0, _newInput);
|
|
4738
|
+
|
|
4739
|
+
_this.handleFile(_newInput, file);
|
|
4740
|
+
}
|
|
4741
|
+
});
|
|
4742
|
+
|
|
4743
|
+
_this.setState({
|
|
4744
|
+
inputs: newInputs
|
|
4745
|
+
});
|
|
4746
|
+
|
|
4747
|
+
_this.checkRefreshCallback(newInputs);
|
|
4748
|
+
} else {
|
|
4749
|
+
_this.handleFile(_this.state.inputs[0], files[0]);
|
|
4750
|
+
}
|
|
4751
|
+
});
|
|
4752
|
+
|
|
4753
|
+
_defineProperty(_assertThisInitialized(_this), "handleFile", /*#__PURE__*/function () {
|
|
4754
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(input, file) {
|
|
4755
|
+
var newInputs, uploadFile, url;
|
|
4756
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
4757
|
+
while (1) {
|
|
4758
|
+
switch (_context.prev = _context.next) {
|
|
4759
|
+
case 0:
|
|
4760
|
+
if (!(!file || input.uploadingFile)) {
|
|
4761
|
+
_context.next = 2;
|
|
4762
|
+
break;
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
return _context.abrupt("return");
|
|
4766
|
+
|
|
4767
|
+
case 2:
|
|
4768
|
+
input.uploadingFile = true;
|
|
4769
|
+
newInputs = _.clone(_this.state.inputs);
|
|
4770
|
+
|
|
4771
|
+
_this.setState({
|
|
4772
|
+
inputs: newInputs
|
|
4773
|
+
});
|
|
4774
|
+
|
|
4775
|
+
_this.checkRefreshCallback(newInputs);
|
|
4776
|
+
|
|
4777
|
+
_context.prev = 6;
|
|
4778
|
+
uploadFile = file;
|
|
4779
|
+
_context.next = 10;
|
|
4780
|
+
return fileActions.uploadMediaAsync(uploadFile, uploadFile.name);
|
|
4781
|
+
|
|
4782
|
+
case 10:
|
|
4783
|
+
url = _context.sent;
|
|
4784
|
+
|
|
4785
|
+
_this.checkSetDisplayValue(input, url);
|
|
4786
|
+
|
|
4787
|
+
_context.next = 18;
|
|
4788
|
+
break;
|
|
4789
|
+
|
|
4790
|
+
case 14:
|
|
4791
|
+
_context.prev = 14;
|
|
4792
|
+
_context.t0 = _context["catch"](6);
|
|
4793
|
+
console.log('handleFile error', _context.t0);
|
|
4794
|
+
|
|
4795
|
+
_this.setState({
|
|
4796
|
+
uploadingFile: false
|
|
4797
|
+
});
|
|
4798
|
+
|
|
4799
|
+
case 18:
|
|
4800
|
+
case "end":
|
|
4801
|
+
return _context.stop();
|
|
4802
|
+
}
|
|
4803
|
+
}
|
|
4804
|
+
}, _callee, null, [[6, 14]]);
|
|
4805
|
+
}));
|
|
4806
|
+
|
|
4807
|
+
return function (_x, _x2) {
|
|
4808
|
+
return _ref.apply(this, arguments);
|
|
4809
|
+
};
|
|
4810
|
+
}());
|
|
4811
|
+
|
|
4812
|
+
return _this;
|
|
4813
|
+
}
|
|
4814
|
+
|
|
4815
|
+
_createClass(FileInputComponent, [{
|
|
4816
|
+
key: "componentDidMount",
|
|
4817
|
+
value: function componentDidMount() {
|
|
4818
|
+
var _this2 = this;
|
|
4819
|
+
|
|
4820
|
+
setTimeout(function () {
|
|
4821
|
+
if (_this2.props.hasDefault) {
|
|
4822
|
+
_this2.setState({
|
|
4823
|
+
inputs: [{
|
|
4824
|
+
uploadingFile: false,
|
|
4825
|
+
value: _this2.props.hasDefault
|
|
4826
|
+
}]
|
|
4827
|
+
});
|
|
4828
|
+
|
|
4829
|
+
if (_this2.props.refreshCallback) {
|
|
4830
|
+
_this2.props.refreshCallback(_this2.props.hasDefault);
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
}, 100);
|
|
4834
|
+
}
|
|
4835
|
+
}, {
|
|
4836
|
+
key: "setValue",
|
|
4837
|
+
value: function setValue(val) {
|
|
4838
|
+
if (typeof val === 'string') {
|
|
4839
|
+
this.setState({
|
|
4840
|
+
inputs: [{
|
|
4841
|
+
uploadingImage: false,
|
|
4842
|
+
value: val
|
|
4843
|
+
}]
|
|
4844
|
+
});
|
|
4845
|
+
} else {
|
|
4846
|
+
var inputs = [];
|
|
4847
|
+
|
|
4848
|
+
_.forEach(val, function (str) {
|
|
4849
|
+
inputs.push({
|
|
4850
|
+
uploadingImage: false,
|
|
4851
|
+
value: str
|
|
4852
|
+
});
|
|
4853
|
+
});
|
|
4854
|
+
|
|
4855
|
+
if (!this.props.limit || this.props.limit > inputs.length) inputs.push(DEFAULT_INPUT$1);
|
|
4856
|
+
this.setState({
|
|
4857
|
+
inputs: inputs
|
|
4858
|
+
});
|
|
4859
|
+
}
|
|
4860
|
+
}
|
|
4861
|
+
}, {
|
|
4862
|
+
key: "getClassNames",
|
|
4863
|
+
value: function getClassNames(input, inputsLength) {
|
|
4864
|
+
var classes = 'clearfix imageInput';
|
|
4865
|
+
|
|
4866
|
+
if (input.uploadingFile) {
|
|
4867
|
+
classes += ' imageInput-uploading';
|
|
4868
|
+
} else if (!_.isEmpty(input.value) && !this.props.onlyAllowUpload) {
|
|
4869
|
+
classes += ' imageInput-hasImage';
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4872
|
+
if (inputsLength === 1) {
|
|
4873
|
+
classes += ' imageInput-only';
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4876
|
+
if (this.props.style && this.props.style.height && this.props.style.height < 150) {
|
|
4877
|
+
classes += ' imageInput-condensed';
|
|
4878
|
+
}
|
|
4879
|
+
|
|
4880
|
+
return classes;
|
|
4881
|
+
}
|
|
4882
|
+
}, {
|
|
4883
|
+
key: "getErrorState",
|
|
4884
|
+
value: function getErrorState() {
|
|
4885
|
+
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
4886
|
+
return ' imageInput_upload--error';
|
|
4887
|
+
}
|
|
4888
|
+
|
|
4889
|
+
return '';
|
|
4890
|
+
}
|
|
4891
|
+
}, {
|
|
4892
|
+
key: "checkSetDisplayValue",
|
|
4893
|
+
value: function checkSetDisplayValue(input, value) {
|
|
4894
|
+
input.value = value;
|
|
4895
|
+
input.uploadingFile = false;
|
|
4896
|
+
|
|
4897
|
+
var newInputs = _.clone(this.state.inputs);
|
|
4898
|
+
|
|
4899
|
+
this.setState({
|
|
4900
|
+
inputs: newInputs
|
|
4901
|
+
});
|
|
4902
|
+
this.checkRefreshCallback(newInputs);
|
|
4903
|
+
}
|
|
4904
|
+
}, {
|
|
4905
|
+
key: "removeFile",
|
|
4906
|
+
value: function removeFile(input) {
|
|
4907
|
+
var newState = {};
|
|
4908
|
+
input.value = '';
|
|
4909
|
+
|
|
4910
|
+
var newInputs = _.clone(this.state.inputs);
|
|
4911
|
+
|
|
4912
|
+
if (newInputs.length > 1) {
|
|
4913
|
+
newInputs.splice(newInputs.indexOf(input), 1);
|
|
4914
|
+
|
|
4915
|
+
if (newInputs.length === this.props.limit - 1 && !_.isEmpty(newInputs[newInputs.length - 1].value)) {
|
|
4916
|
+
// was full
|
|
4917
|
+
newInputs.push(DEFAULT_INPUT$1);
|
|
4918
|
+
}
|
|
4919
|
+
}
|
|
4920
|
+
|
|
4921
|
+
newState.inputs = newInputs;
|
|
4922
|
+
this.setState(newState); // for single item
|
|
4923
|
+
|
|
4924
|
+
if (!_.isUndefined(this.props.refreshCallback)) {
|
|
4925
|
+
this.props.refreshCallback();
|
|
4926
|
+
}
|
|
4927
|
+
}
|
|
4928
|
+
}, {
|
|
4929
|
+
key: "renderInput",
|
|
4930
|
+
value: function renderInput(input, index, inputsLength) {
|
|
4931
|
+
var _this3 = this;
|
|
4932
|
+
|
|
4933
|
+
var renderContent = function renderContent() {
|
|
4934
|
+
if (_this3.props.onlyAllowUpload) {
|
|
4935
|
+
return null;
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
if (!_.isEmpty(input.value) && !input.uploadingFile) {
|
|
4939
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4940
|
+
className: "imageInput_simpleContainer"
|
|
4941
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
4942
|
+
className: "imageInput_image",
|
|
4943
|
+
style: _objectSpread$c(_objectSpread$c({}, _this3.props.style), {}, {
|
|
4944
|
+
height: _this3.props.style && _this3.props.style.height ? _this3.props.style.height - 62 : 80
|
|
4945
|
+
})
|
|
4946
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
4947
|
+
src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
|
|
4948
|
+
className: "imageInput_icon",
|
|
4949
|
+
alt: "file"
|
|
4950
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
4951
|
+
className: "imageInput_text"
|
|
4952
|
+
}, getFileName(input.value))), /*#__PURE__*/React.createElement(Dropzone, {
|
|
4953
|
+
accept: _this3.props.accept,
|
|
4954
|
+
onDrop: function onDrop(files) {
|
|
4955
|
+
return _this3.onDrop(files, true);
|
|
4956
|
+
},
|
|
4957
|
+
style: {
|
|
4958
|
+
padding: 10
|
|
4959
|
+
}
|
|
4960
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
4961
|
+
buttonType: "secondary",
|
|
4962
|
+
className: "imageInput_button",
|
|
4963
|
+
disabled: true
|
|
4964
|
+
}, "Change file")));
|
|
4965
|
+
}
|
|
4966
|
+
|
|
4967
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4968
|
+
className: "imageInput_image",
|
|
4969
|
+
style: _objectSpread$c({}, _this3.props.style)
|
|
4970
|
+
});
|
|
4971
|
+
};
|
|
4972
|
+
|
|
4973
|
+
var renderRemove = function renderRemove() {
|
|
4974
|
+
return !_this3.props.disableRemove && !_this3.props.disabled && (_this3.props.simpleStyle ? /*#__PURE__*/React.createElement(FontAwesome, {
|
|
4975
|
+
name: "remove",
|
|
4976
|
+
className: "imageInput_removeIcon",
|
|
4977
|
+
onClick: _this3.removeFile.bind(_this3, input)
|
|
4978
|
+
}) : /*#__PURE__*/React.createElement("p", {
|
|
4979
|
+
className: "imageInput_remove",
|
|
4980
|
+
onClick: _this3.removeFile.bind(_this3, input)
|
|
4981
|
+
}, "remove"));
|
|
4982
|
+
};
|
|
4983
|
+
|
|
4984
|
+
var renderDownload = function renderDownload() {
|
|
4985
|
+
if (_this3.props.noDownload) return null;
|
|
4986
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
4987
|
+
href: input.value,
|
|
4988
|
+
target: "_blank",
|
|
4989
|
+
className: "imageInput_download"
|
|
4990
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
4991
|
+
alt: "",
|
|
4992
|
+
className: "dlicon",
|
|
4993
|
+
src: "https://pluss60-dev-uploads.s3.ap-southeast-2.amazonaws.com/uploads/users/ap-southeast-2:efbab8db-136a-446e-b14a-d00af0067841/public/025971e94153af280049fdf3e3/downloadicon.png"
|
|
4994
|
+
}));
|
|
4995
|
+
};
|
|
4996
|
+
|
|
4997
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4998
|
+
key: index,
|
|
4999
|
+
className: this.getClassNames(input, inputsLength),
|
|
5000
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5001
|
+
}, /*#__PURE__*/React.createElement(Dropzone, {
|
|
5002
|
+
className: "imageInput_upload ".concat(this.getErrorState()),
|
|
5003
|
+
accept: this.props.accept,
|
|
5004
|
+
onDrop: this.onDrop,
|
|
5005
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5006
|
+
}, function (_ref2) {
|
|
5007
|
+
var isDragActive = _ref2.isDragActive;
|
|
5008
|
+
_ref2.isDragReject;
|
|
5009
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5010
|
+
className: "".concat(isDragActive ? 'imageInput_dropZoneActive' : '')
|
|
5011
|
+
}, !_this3.props.simpleStyle && /*#__PURE__*/React.createElement("img", {
|
|
5012
|
+
src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
|
|
5013
|
+
className: "imageInput_icon",
|
|
5014
|
+
alt: "file"
|
|
5015
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
5016
|
+
className: "imageInput_helpText"
|
|
5017
|
+
}, isDragActive ? "Drop file here" : "Drag and drop file or"), !isDragActive && /*#__PURE__*/React.createElement(Button, {
|
|
5018
|
+
buttonType: "secondary",
|
|
5019
|
+
className: "imageInput_button",
|
|
5020
|
+
disabled: true
|
|
5021
|
+
}, _this3.props.multiple ? "Upload files" : "Upload a file"));
|
|
5022
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
5023
|
+
className: "imageInput_uploading",
|
|
5024
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5025
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
5026
|
+
className: "spinner imageInput_spinner",
|
|
5027
|
+
name: "spinner fa-pulse fa-fw"
|
|
5028
|
+
})), renderContent(), renderRemove(), renderDownload());
|
|
5029
|
+
}
|
|
5030
|
+
}, {
|
|
5031
|
+
key: "renderUploadFiles",
|
|
5032
|
+
value: function renderUploadFiles(inputs) {
|
|
5033
|
+
var _this4 = this;
|
|
5034
|
+
|
|
5035
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5036
|
+
className: "imageInputContainer clearfix ".concat(inputs.length === 1 ? 'imageInputContainer-noPadding' : '', " ").concat(this.props.simpleStyle ? 'imageInputContainer-simple' : ''),
|
|
5037
|
+
style: _objectSpread$c({}, this.props.style)
|
|
5038
|
+
}, inputs.map(function (input, index) {
|
|
5039
|
+
return _this4.renderInput(input, index, inputs.length);
|
|
5040
|
+
}));
|
|
5041
|
+
}
|
|
5042
|
+
}, {
|
|
5043
|
+
key: "renderContent",
|
|
5044
|
+
value: function renderContent() {
|
|
5045
|
+
return this.renderUploadFiles(this.state.inputs);
|
|
5046
|
+
}
|
|
5047
|
+
}, {
|
|
5048
|
+
key: "render",
|
|
5049
|
+
value: function render() {
|
|
5050
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5051
|
+
style: this.props.containerStyle
|
|
5052
|
+
}, this.renderContent());
|
|
5053
|
+
}
|
|
5054
|
+
}]);
|
|
5055
|
+
|
|
5056
|
+
return FileInputComponent;
|
|
5057
|
+
}(Component);
|
|
5058
|
+
|
|
5059
|
+
var mapStateToProps$5 = function mapStateToProps() {
|
|
5060
|
+
return {};
|
|
5061
|
+
};
|
|
5062
|
+
|
|
5063
|
+
var FileInput = connect(mapStateToProps$5, {}, null, {
|
|
5064
|
+
withRef: true
|
|
5065
|
+
})(FileInputComponent);
|
|
5066
|
+
|
|
5067
|
+
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; }
|
|
5068
|
+
|
|
5069
|
+
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; }
|
|
5070
|
+
|
|
5071
|
+
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); }; }
|
|
5072
|
+
|
|
5073
|
+
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; } }
|
|
5074
|
+
|
|
5075
|
+
var GenericInput = /*#__PURE__*/function (_Component) {
|
|
5076
|
+
_inherits(GenericInput, _Component);
|
|
5077
|
+
|
|
5078
|
+
var _super = _createSuper$p(GenericInput);
|
|
5079
|
+
|
|
5080
|
+
function GenericInput() {
|
|
5081
|
+
_classCallCheck(this, GenericInput);
|
|
5082
|
+
|
|
5083
|
+
return _super.apply(this, arguments);
|
|
5084
|
+
}
|
|
5085
|
+
|
|
5086
|
+
_createClass(GenericInput, [{
|
|
5087
|
+
key: "componentDidUpdate",
|
|
5088
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
5089
|
+
if (!_.isUndefined(this.props.autofocus) && this.props.autofocus) {
|
|
5090
|
+
this._input.focus();
|
|
5091
|
+
}
|
|
5092
|
+
}
|
|
5093
|
+
}, {
|
|
5094
|
+
key: "getAutoComplete",
|
|
5095
|
+
value: function getAutoComplete() {
|
|
5096
|
+
if (!_.isUndefined(this.props.autoComplete)) {
|
|
5097
|
+
return this.props.autoComplete ? 'on' : 'off';
|
|
5098
|
+
}
|
|
5099
|
+
|
|
5100
|
+
return 'off';
|
|
5101
|
+
}
|
|
5102
|
+
}, {
|
|
5103
|
+
key: "isValid",
|
|
5104
|
+
value: function isValid() {
|
|
5105
|
+
if (!_.isUndefined(this.props.isValid) && typeof this.props.isValid === 'function') {
|
|
5106
|
+
return this.props.isValid();
|
|
5107
|
+
}
|
|
5108
|
+
|
|
5109
|
+
return this.props.isValid;
|
|
5110
|
+
}
|
|
5111
|
+
}, {
|
|
5112
|
+
key: "showError",
|
|
5113
|
+
value: function showError() {
|
|
5114
|
+
return !_.isUndefined(this.props.showError) && (typeof this.props.showError === 'function' && this.props.showError() || typeof this.props.showError === 'boolean' && this.props.showError);
|
|
5115
|
+
}
|
|
5116
|
+
}, {
|
|
5117
|
+
key: "getClassNames",
|
|
5118
|
+
value: function getClassNames() {
|
|
5119
|
+
var string = "".concat(this.props.className, " genericInputContainer");
|
|
5120
|
+
|
|
5121
|
+
if (!_.isUndefined(this.props.disabled) && this.props.disabled) {
|
|
5122
|
+
string += ' genericInput-disabled';
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5125
|
+
if (this.props.large) {
|
|
5126
|
+
string += ' genericInput-large';
|
|
5127
|
+
}
|
|
5128
|
+
|
|
5129
|
+
if (!_.isUndefined(this.props.type) && this.props.type === 'textarea') {
|
|
5130
|
+
string += ' genericInput-textarea';
|
|
5131
|
+
}
|
|
5132
|
+
|
|
5133
|
+
if (this.isValid()) {
|
|
5134
|
+
return string + ' genericInput-valid';
|
|
5135
|
+
}
|
|
5136
|
+
|
|
5137
|
+
if (this.showError()) {
|
|
5138
|
+
return string + ' genericInput-error';
|
|
5139
|
+
}
|
|
5140
|
+
|
|
5141
|
+
return string;
|
|
5142
|
+
}
|
|
5143
|
+
}, {
|
|
5144
|
+
key: "getLabelStyle",
|
|
5145
|
+
value: function getLabelStyle() {
|
|
5146
|
+
var style = {};
|
|
5147
|
+
|
|
5148
|
+
if (_.isEmpty(this.props.value) && !this.props.alwaysShowLabel) {
|
|
5149
|
+
style.opacity = 0;
|
|
5150
|
+
}
|
|
5151
|
+
|
|
5152
|
+
return style;
|
|
5153
|
+
}
|
|
5154
|
+
}, {
|
|
5155
|
+
key: "renderError",
|
|
5156
|
+
value: function renderError() {
|
|
5157
|
+
if (this.showError() && !this.isValid()) {
|
|
5158
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5159
|
+
className: 'fieldLabel fieldLabel-warning'
|
|
4748
5160
|
}, this.props.errorMessage ? this.props.errorMessage : 'Required');
|
|
4749
5161
|
}
|
|
4750
5162
|
|
|
@@ -4791,7 +5203,8 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
4791
5203
|
className: "genericInput ".concat(this.props.inputClass),
|
|
4792
5204
|
value: this.props.value || '',
|
|
4793
5205
|
onChange: this.props.onChange,
|
|
4794
|
-
onKeyPress: this.props.onEnter,
|
|
5206
|
+
onKeyPress: this.props.onKeyPress || this.props.onEnter,
|
|
5207
|
+
onKeyDown: this.props.onKeyDown,
|
|
4795
5208
|
style: _objectSpread$b({}, this.props.inputStyle),
|
|
4796
5209
|
readOnly: !_.isUndefined(this.props.readOnly) ? this.props.readOnly : false,
|
|
4797
5210
|
disabled: !_.isUndefined(this.props.disabled) ? this.props.disabled : false,
|
|
@@ -4818,7 +5231,8 @@ var GenericInput = /*#__PURE__*/function (_Component) {
|
|
|
4818
5231
|
value: this.props.value || '',
|
|
4819
5232
|
onChange: this.props.onChange,
|
|
4820
5233
|
onClick: this.props.onClick,
|
|
4821
|
-
onKeyPress: this.props.onEnter,
|
|
5234
|
+
onKeyPress: this.props.onKeyPress || this.props.onEnter,
|
|
5235
|
+
onKeyDown: this.props.onKeyDown,
|
|
4822
5236
|
style: _objectSpread$b({}, this.props.inputStyle),
|
|
4823
5237
|
readOnly: !_.isUndefined(this.props.readOnly) ? this.props.readOnly : false,
|
|
4824
5238
|
disabled: !_.isUndefined(this.props.disabled) ? this.props.disabled : false,
|
|
@@ -4859,14 +5273,14 @@ var styles$7 = {
|
|
|
4859
5273
|
}
|
|
4860
5274
|
};
|
|
4861
5275
|
|
|
4862
|
-
function _createSuper$
|
|
5276
|
+
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); }; }
|
|
4863
5277
|
|
|
4864
|
-
function _isNativeReflectConstruct$
|
|
5278
|
+
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; } }
|
|
4865
5279
|
|
|
4866
5280
|
var Header = /*#__PURE__*/function (_Component) {
|
|
4867
5281
|
_inherits(Header, _Component);
|
|
4868
5282
|
|
|
4869
|
-
var _super = _createSuper$
|
|
5283
|
+
var _super = _createSuper$o(Header);
|
|
4870
5284
|
|
|
4871
5285
|
function Header() {
|
|
4872
5286
|
var _this;
|
|
@@ -4897,6 +5311,25 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
4897
5311
|
value: function getHomeLink() {
|
|
4898
5312
|
this.props.history.replace('/');
|
|
4899
5313
|
}
|
|
5314
|
+
}, {
|
|
5315
|
+
key: "renderRight",
|
|
5316
|
+
value: function renderRight() {
|
|
5317
|
+
if (this.props.rightContent) {
|
|
5318
|
+
return this.props.rightContent;
|
|
5319
|
+
}
|
|
5320
|
+
|
|
5321
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5322
|
+
className: "flex flex-center"
|
|
5323
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
5324
|
+
buttonType: "primary",
|
|
5325
|
+
onClick: this.goToRoadmap,
|
|
5326
|
+
narrow: true,
|
|
5327
|
+
isActive: true,
|
|
5328
|
+
className: "marginRight-16"
|
|
5329
|
+
}, "Roadmap"), /*#__PURE__*/React.createElement("div", {
|
|
5330
|
+
className: "sideMenuButtonContainer"
|
|
5331
|
+
}));
|
|
5332
|
+
}
|
|
4900
5333
|
}, {
|
|
4901
5334
|
key: "renderHeader",
|
|
4902
5335
|
value: function renderHeader() {
|
|
@@ -4914,17 +5347,7 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
4914
5347
|
alignItems: 'center',
|
|
4915
5348
|
marginLeft: 16
|
|
4916
5349
|
}
|
|
4917
|
-
}, this.props.children)),
|
|
4918
|
-
className: "flex flex-center"
|
|
4919
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
4920
|
-
buttonType: "primary",
|
|
4921
|
-
onClick: this.goToRoadmap,
|
|
4922
|
-
narrow: true,
|
|
4923
|
-
isActive: true,
|
|
4924
|
-
className: "marginRight-16"
|
|
4925
|
-
}, "Roadmap"), /*#__PURE__*/React.createElement("div", {
|
|
4926
|
-
className: "sideMenuButtonContainer"
|
|
4927
|
-
})));
|
|
5350
|
+
}, this.props.children)), this.renderRight());
|
|
4928
5351
|
}
|
|
4929
5352
|
}, {
|
|
4930
5353
|
key: "renderSimpleHeader",
|
|
@@ -4939,6 +5362,13 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
4939
5362
|
alt: "logo"
|
|
4940
5363
|
})));
|
|
4941
5364
|
}
|
|
5365
|
+
}, {
|
|
5366
|
+
key: "renderContainerHeader",
|
|
5367
|
+
value: function renderContainerHeader() {
|
|
5368
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5369
|
+
className: "header header-simple ".concat(this.props.fixed ? 'header-fixed' : '')
|
|
5370
|
+
}, this.props.children);
|
|
5371
|
+
}
|
|
4942
5372
|
}, {
|
|
4943
5373
|
key: "render",
|
|
4944
5374
|
value: function render() {
|
|
@@ -4946,6 +5376,10 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
4946
5376
|
return this.renderSimpleHeader();
|
|
4947
5377
|
}
|
|
4948
5378
|
|
|
5379
|
+
if (this.props.onlyContainer) {
|
|
5380
|
+
return this.renderContainerHeader();
|
|
5381
|
+
}
|
|
5382
|
+
|
|
4949
5383
|
return this.renderHeader();
|
|
4950
5384
|
}
|
|
4951
5385
|
}]);
|
|
@@ -4968,14 +5402,14 @@ function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
4968
5402
|
|
|
4969
5403
|
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; }
|
|
4970
5404
|
|
|
4971
|
-
function _createSuper$
|
|
5405
|
+
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); }; }
|
|
4972
5406
|
|
|
4973
|
-
function _isNativeReflectConstruct$
|
|
5407
|
+
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; } }
|
|
4974
5408
|
|
|
4975
5409
|
var Popup = /*#__PURE__*/function (_Component) {
|
|
4976
5410
|
_inherits(Popup, _Component);
|
|
4977
5411
|
|
|
4978
|
-
var _super = _createSuper$
|
|
5412
|
+
var _super = _createSuper$n(Popup);
|
|
4979
5413
|
|
|
4980
5414
|
function Popup() {
|
|
4981
5415
|
_classCallCheck(this, Popup);
|
|
@@ -5089,9 +5523,9 @@ function ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
5089
5523
|
|
|
5090
5524
|
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; }
|
|
5091
5525
|
|
|
5092
|
-
function _createSuper$
|
|
5526
|
+
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); }; }
|
|
5093
5527
|
|
|
5094
|
-
function _isNativeReflectConstruct$
|
|
5528
|
+
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; } }
|
|
5095
5529
|
var DEFAULT_INPUT = {
|
|
5096
5530
|
uploadingImage: false,
|
|
5097
5531
|
value: '',
|
|
@@ -5101,7 +5535,7 @@ var DEFAULT_INPUT = {
|
|
|
5101
5535
|
var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
5102
5536
|
_inherits(ImageInputComponent, _Component);
|
|
5103
5537
|
|
|
5104
|
-
var _super = _createSuper$
|
|
5538
|
+
var _super = _createSuper$m(ImageInputComponent);
|
|
5105
5539
|
|
|
5106
5540
|
function ImageInputComponent() {
|
|
5107
5541
|
var _this;
|
|
@@ -5884,11 +6318,8 @@ var ImageInputComponent = /*#__PURE__*/function (_Component) {
|
|
|
5884
6318
|
}
|
|
5885
6319
|
|
|
5886
6320
|
newState.inputs = newInputs;
|
|
5887
|
-
this.setState(newState);
|
|
5888
|
-
|
|
5889
|
-
if (!_.isUndefined(this.props.refreshCallback)) {
|
|
5890
|
-
this.props.refreshCallback();
|
|
5891
|
-
}
|
|
6321
|
+
this.setState(newState);
|
|
6322
|
+
this.checkRefreshCallback(newInputs);
|
|
5892
6323
|
}
|
|
5893
6324
|
}, {
|
|
5894
6325
|
key: "selectTab",
|
|
@@ -6397,14 +6828,14 @@ var ImageInput = connect(mapStateToProps$3, {}, null, {
|
|
|
6397
6828
|
withRef: true
|
|
6398
6829
|
})(ImageInputComponent);
|
|
6399
6830
|
|
|
6400
|
-
function _createSuper$
|
|
6831
|
+
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); }; }
|
|
6401
6832
|
|
|
6402
|
-
function _isNativeReflectConstruct$
|
|
6833
|
+
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; } }
|
|
6403
6834
|
|
|
6404
6835
|
var MoreMenu = /*#__PURE__*/function (_Component) {
|
|
6405
6836
|
_inherits(MoreMenu, _Component);
|
|
6406
6837
|
|
|
6407
|
-
var _super = _createSuper$
|
|
6838
|
+
var _super = _createSuper$l(MoreMenu);
|
|
6408
6839
|
|
|
6409
6840
|
function MoreMenu() {
|
|
6410
6841
|
_classCallCheck(this, MoreMenu);
|
|
@@ -6438,14 +6869,14 @@ function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
6438
6869
|
|
|
6439
6870
|
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; }
|
|
6440
6871
|
|
|
6441
|
-
function _createSuper$
|
|
6872
|
+
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); }; }
|
|
6442
6873
|
|
|
6443
|
-
function _isNativeReflectConstruct$
|
|
6874
|
+
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; } }
|
|
6444
6875
|
|
|
6445
6876
|
var OverlayPage = /*#__PURE__*/function (_Component) {
|
|
6446
6877
|
_inherits(OverlayPage, _Component);
|
|
6447
6878
|
|
|
6448
|
-
var _super = _createSuper$
|
|
6879
|
+
var _super = _createSuper$k(OverlayPage);
|
|
6449
6880
|
|
|
6450
6881
|
function OverlayPage(props) {
|
|
6451
6882
|
var _this;
|
|
@@ -6482,6 +6913,18 @@ var OverlayPage = /*#__PURE__*/function (_Component) {
|
|
|
6482
6913
|
height: window.innerHeight
|
|
6483
6914
|
});
|
|
6484
6915
|
}
|
|
6916
|
+
}, {
|
|
6917
|
+
key: "renderContent",
|
|
6918
|
+
value: function renderContent() {
|
|
6919
|
+
if (this.props.fullPage) {
|
|
6920
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6921
|
+
className: "overlayPage-full",
|
|
6922
|
+
style: this.props.fullPageStyle
|
|
6923
|
+
}, this.props.children);
|
|
6924
|
+
}
|
|
6925
|
+
|
|
6926
|
+
return this.props.children;
|
|
6927
|
+
}
|
|
6485
6928
|
}, {
|
|
6486
6929
|
key: "render",
|
|
6487
6930
|
value: function render() {
|
|
@@ -6489,7 +6932,7 @@ var OverlayPage = /*#__PURE__*/function (_Component) {
|
|
|
6489
6932
|
style: _objectSpread$8(_objectSpread$8({}, styles$5.pageWrapper), this.props.style)
|
|
6490
6933
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6491
6934
|
style: _objectSpread$8(_objectSpread$8({}, styles$5.backgroundOverlay), this.props.backgroundStyle)
|
|
6492
|
-
}), this.
|
|
6935
|
+
}), this.renderContent());
|
|
6493
6936
|
}
|
|
6494
6937
|
}]);
|
|
6495
6938
|
|
|
@@ -6519,14 +6962,14 @@ function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
6519
6962
|
|
|
6520
6963
|
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; }
|
|
6521
6964
|
|
|
6522
|
-
function _createSuper$
|
|
6965
|
+
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); }; }
|
|
6523
6966
|
|
|
6524
|
-
function _isNativeReflectConstruct$
|
|
6967
|
+
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; } }
|
|
6525
6968
|
|
|
6526
6969
|
var OverlayPageContents = /*#__PURE__*/function (_Component) {
|
|
6527
6970
|
_inherits(OverlayPageContents, _Component);
|
|
6528
6971
|
|
|
6529
|
-
var _super = _createSuper$
|
|
6972
|
+
var _super = _createSuper$j(OverlayPageContents);
|
|
6530
6973
|
|
|
6531
6974
|
function OverlayPageContents(props) {
|
|
6532
6975
|
var _this;
|
|
@@ -6585,14 +7028,14 @@ function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
6585
7028
|
|
|
6586
7029
|
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; }
|
|
6587
7030
|
|
|
6588
|
-
function _createSuper$
|
|
7031
|
+
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); }; }
|
|
6589
7032
|
|
|
6590
|
-
function _isNativeReflectConstruct$
|
|
7033
|
+
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; } }
|
|
6591
7034
|
|
|
6592
7035
|
var OverlayPageSection = /*#__PURE__*/function (_Component) {
|
|
6593
7036
|
_inherits(OverlayPageSection, _Component);
|
|
6594
7037
|
|
|
6595
|
-
var _super = _createSuper$
|
|
7038
|
+
var _super = _createSuper$i(OverlayPageSection);
|
|
6596
7039
|
|
|
6597
7040
|
function OverlayPageSection() {
|
|
6598
7041
|
_classCallCheck(this, OverlayPageSection);
|
|
@@ -6637,14 +7080,14 @@ function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
6637
7080
|
|
|
6638
7081
|
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; }
|
|
6639
7082
|
|
|
6640
|
-
function _createSuper$
|
|
7083
|
+
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); }; }
|
|
6641
7084
|
|
|
6642
|
-
function _isNativeReflectConstruct$
|
|
7085
|
+
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; } }
|
|
6643
7086
|
|
|
6644
7087
|
var OverlayPageBottomButtons = /*#__PURE__*/function (_Component) {
|
|
6645
7088
|
_inherits(OverlayPageBottomButtons, _Component);
|
|
6646
7089
|
|
|
6647
|
-
var _super = _createSuper$
|
|
7090
|
+
var _super = _createSuper$h(OverlayPageBottomButtons);
|
|
6648
7091
|
|
|
6649
7092
|
function OverlayPageBottomButtons(props) {
|
|
6650
7093
|
var _this;
|
|
@@ -6698,14 +7141,14 @@ var styles$2 = {
|
|
|
6698
7141
|
}
|
|
6699
7142
|
};
|
|
6700
7143
|
|
|
6701
|
-
function _createSuper$
|
|
7144
|
+
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); }; }
|
|
6702
7145
|
|
|
6703
|
-
function _isNativeReflectConstruct$
|
|
7146
|
+
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; } }
|
|
6704
7147
|
|
|
6705
7148
|
var PageTitle = /*#__PURE__*/function (_Component) {
|
|
6706
7149
|
_inherits(PageTitle, _Component);
|
|
6707
7150
|
|
|
6708
|
-
var _super = _createSuper$
|
|
7151
|
+
var _super = _createSuper$g(PageTitle);
|
|
6709
7152
|
|
|
6710
7153
|
function PageTitle() {
|
|
6711
7154
|
_classCallCheck(this, PageTitle);
|
|
@@ -6725,26 +7168,18 @@ var PageTitle = /*#__PURE__*/function (_Component) {
|
|
|
6725
7168
|
return PageTitle;
|
|
6726
7169
|
}(Component);
|
|
6727
7170
|
|
|
6728
|
-
var getAppColourFromState = function getAppColourFromState(state) {
|
|
6729
|
-
if (!state || !state.auth || !state.auth.siteBranding || !state.auth.siteBranding.MainBrandingColour) {
|
|
6730
|
-
return CoreConfig.env.colourBrandingApp;
|
|
6731
|
-
}
|
|
6732
|
-
|
|
6733
|
-
return state.auth.siteBranding.MainBrandingColour;
|
|
6734
|
-
};
|
|
6735
|
-
|
|
6736
7171
|
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; }
|
|
6737
7172
|
|
|
6738
7173
|
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; }
|
|
6739
7174
|
|
|
6740
|
-
function _createSuper$
|
|
7175
|
+
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); }; }
|
|
6741
7176
|
|
|
6742
|
-
function _isNativeReflectConstruct$
|
|
7177
|
+
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; } }
|
|
6743
7178
|
|
|
6744
7179
|
var ProfilePicComponent = /*#__PURE__*/function (_Component) {
|
|
6745
7180
|
_inherits(ProfilePicComponent, _Component);
|
|
6746
7181
|
|
|
6747
|
-
var _super = _createSuper$
|
|
7182
|
+
var _super = _createSuper$f(ProfilePicComponent);
|
|
6748
7183
|
|
|
6749
7184
|
function ProfilePicComponent() {
|
|
6750
7185
|
_classCallCheck(this, ProfilePicComponent);
|
|
@@ -6786,14 +7221,14 @@ function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
6786
7221
|
|
|
6787
7222
|
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; }
|
|
6788
7223
|
|
|
6789
|
-
function _createSuper$
|
|
7224
|
+
function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); 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); }; }
|
|
6790
7225
|
|
|
6791
|
-
function _isNativeReflectConstruct$
|
|
7226
|
+
function _isNativeReflectConstruct$e() { 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; } }
|
|
6792
7227
|
|
|
6793
7228
|
var RadioButton = /*#__PURE__*/function (_Component) {
|
|
6794
7229
|
_inherits(RadioButton, _Component);
|
|
6795
7230
|
|
|
6796
|
-
var _super = _createSuper$
|
|
7231
|
+
var _super = _createSuper$e(RadioButton);
|
|
6797
7232
|
|
|
6798
7233
|
function RadioButton() {
|
|
6799
7234
|
_classCallCheck(this, RadioButton);
|
|
@@ -6951,14 +7386,14 @@ var styles$1 = {
|
|
|
6951
7386
|
}
|
|
6952
7387
|
};
|
|
6953
7388
|
|
|
6954
|
-
function _createSuper$
|
|
7389
|
+
function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); 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); }; }
|
|
6955
7390
|
|
|
6956
|
-
function _isNativeReflectConstruct$
|
|
7391
|
+
function _isNativeReflectConstruct$d() { 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; } }
|
|
6957
7392
|
|
|
6958
7393
|
var Tag = /*#__PURE__*/function (_Component) {
|
|
6959
7394
|
_inherits(Tag, _Component);
|
|
6960
7395
|
|
|
6961
|
-
var _super = _createSuper$
|
|
7396
|
+
var _super = _createSuper$d(Tag);
|
|
6962
7397
|
|
|
6963
7398
|
function Tag() {
|
|
6964
7399
|
_classCallCheck(this, Tag);
|
|
@@ -6973,659 +7408,319 @@ var Tag = /*#__PURE__*/function (_Component) {
|
|
|
6973
7408
|
return null;
|
|
6974
7409
|
}
|
|
6975
7410
|
|
|
6976
|
-
return /*#__PURE__*/React.createElement(FontAwesome, {
|
|
6977
|
-
name: this.props.leftIcon,
|
|
6978
|
-
className: "tag_icon tag_icon-left ".concat(this.props.leftClick ? 'tag_icon-clickable' : ''),
|
|
6979
|
-
style: this.props.leftIconStyle,
|
|
6980
|
-
onClick: this.props.leftClick
|
|
6981
|
-
});
|
|
6982
|
-
}
|
|
6983
|
-
}, {
|
|
6984
|
-
key: "renderRight",
|
|
6985
|
-
value: function renderRight() {
|
|
6986
|
-
if (!this.props.rightIcon) {
|
|
6987
|
-
return null;
|
|
6988
|
-
}
|
|
6989
|
-
|
|
6990
|
-
return /*#__PURE__*/React.createElement(FontAwesome, {
|
|
6991
|
-
name: this.props.rightIcon,
|
|
6992
|
-
className: "tag_icon tag_icon-right ".concat(this.props.rightClick ? 'tag_icon-clickable' : ''),
|
|
6993
|
-
style: this.props.rightIconStyle,
|
|
6994
|
-
onClick: this.props.rightClick
|
|
6995
|
-
});
|
|
6996
|
-
}
|
|
6997
|
-
}, {
|
|
6998
|
-
key: "renderText",
|
|
6999
|
-
value: function renderText() {
|
|
7000
|
-
if (!this.props.text) {
|
|
7001
|
-
return null;
|
|
7002
|
-
}
|
|
7003
|
-
|
|
7004
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
7005
|
-
className: "tag_text"
|
|
7006
|
-
}, this.props.text);
|
|
7007
|
-
}
|
|
7008
|
-
}, {
|
|
7009
|
-
key: "render",
|
|
7010
|
-
value: function render() {
|
|
7011
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7012
|
-
onClick: this.props.onClick,
|
|
7013
|
-
className: "tag ".concat(this.props.onClick ? 'tag-clickable' : '', " ").concat(this.props.className || '', " ").concat(this.props.leftIcon || this.props.rightIcon ? 'tag-hasIcon' : ''),
|
|
7014
|
-
style: this.props.style
|
|
7015
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7016
|
-
className: "tag_inner"
|
|
7017
|
-
}, this.renderLeft(), /*#__PURE__*/React.createElement("div", {
|
|
7018
|
-
className: "tag_center ".concat(this.props.centerClass)
|
|
7019
|
-
}, this.renderText(), this.props.children), this.renderRight()));
|
|
7020
|
-
}
|
|
7021
|
-
}]);
|
|
7022
|
-
|
|
7023
|
-
return Tag;
|
|
7024
|
-
}(Component);
|
|
7025
|
-
|
|
7026
|
-
function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); 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); }; }
|
|
7027
|
-
|
|
7028
|
-
function _isNativeReflectConstruct$d() { 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; } }
|
|
7029
|
-
|
|
7030
|
-
var Text = /*#__PURE__*/function (_Component) {
|
|
7031
|
-
_inherits(Text, _Component);
|
|
7032
|
-
|
|
7033
|
-
var _super = _createSuper$d(Text);
|
|
7034
|
-
|
|
7035
|
-
function Text() {
|
|
7036
|
-
_classCallCheck(this, Text);
|
|
7037
|
-
|
|
7038
|
-
return _super.apply(this, arguments);
|
|
7039
|
-
}
|
|
7040
|
-
|
|
7041
|
-
_createClass(Text, [{
|
|
7042
|
-
key: "getClassName",
|
|
7043
|
-
value: function getClassName() {
|
|
7044
|
-
if (this.props.className) {
|
|
7045
|
-
return " ".concat(this.props.className);
|
|
7046
|
-
}
|
|
7047
|
-
|
|
7048
|
-
return '';
|
|
7049
|
-
}
|
|
7050
|
-
}, {
|
|
7051
|
-
key: "render",
|
|
7052
|
-
value: function render() {
|
|
7053
|
-
return /*#__PURE__*/React.createElement("p", {
|
|
7054
|
-
className: "text-".concat(this.props.type).concat(this.getClassName()),
|
|
7055
|
-
style: this.props.style
|
|
7056
|
-
}, this.props.children);
|
|
7057
|
-
}
|
|
7058
|
-
}]);
|
|
7059
|
-
|
|
7060
|
-
return Text;
|
|
7061
|
-
}(Component);
|
|
7062
|
-
|
|
7063
|
-
function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); 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); }; }
|
|
7064
|
-
|
|
7065
|
-
function _isNativeReflectConstruct$c() { 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; } }
|
|
7066
|
-
|
|
7067
|
-
var SuccessPopup = /*#__PURE__*/function (_Component) {
|
|
7068
|
-
_inherits(SuccessPopup, _Component);
|
|
7069
|
-
|
|
7070
|
-
var _super = _createSuper$c(SuccessPopup);
|
|
7071
|
-
|
|
7072
|
-
function SuccessPopup() {
|
|
7073
|
-
_classCallCheck(this, SuccessPopup);
|
|
7074
|
-
|
|
7075
|
-
return _super.apply(this, arguments);
|
|
7076
|
-
}
|
|
7077
|
-
|
|
7078
|
-
_createClass(SuccessPopup, [{
|
|
7079
|
-
key: "getBackgroundClasses",
|
|
7080
|
-
value: function getBackgroundClasses() {
|
|
7081
|
-
return this.props.backgroundClose ? 'successPopupBackground pointer' : 'successPopupBackground';
|
|
7082
|
-
}
|
|
7083
|
-
}, {
|
|
7084
|
-
key: "renderButtons",
|
|
7085
|
-
value: function renderButtons() {
|
|
7086
|
-
if (_.isEmpty(this.props.buttons)) return null;
|
|
7087
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7088
|
-
className: "successPopup_buttons"
|
|
7089
|
-
}, this.props.buttons.map(function (b, i) {
|
|
7090
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
7091
|
-
key: i,
|
|
7092
|
-
buttonClassName: "successPopup_button",
|
|
7093
|
-
buttonType: b.type,
|
|
7094
|
-
isActive: !b.inactive,
|
|
7095
|
-
onClick: b.onClick
|
|
7096
|
-
}, b.text);
|
|
7097
|
-
}));
|
|
7098
|
-
}
|
|
7099
|
-
}, {
|
|
7100
|
-
key: "renderClose",
|
|
7101
|
-
value: function renderClose() {
|
|
7102
|
-
if (!this.props.closeAction) {
|
|
7103
|
-
return null;
|
|
7104
|
-
}
|
|
7105
|
-
|
|
7106
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
7107
|
-
style: {
|
|
7108
|
-
position: 'absolute',
|
|
7109
|
-
top: 16,
|
|
7110
|
-
right: 16,
|
|
7111
|
-
cursor: 'pointer'
|
|
7112
|
-
},
|
|
7113
|
-
onClick: this.props.closeAction
|
|
7114
|
-
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
7115
|
-
name: "remove"
|
|
7116
|
-
}));
|
|
7117
|
-
}
|
|
7118
|
-
}, {
|
|
7119
|
-
key: "render",
|
|
7120
|
-
value: function render() {
|
|
7121
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7122
|
-
className: this.getBackgroundClasses()
|
|
7123
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7124
|
-
className: "successPopup"
|
|
7125
|
-
}, this.props.noIcon || /*#__PURE__*/React.createElement("div", {
|
|
7126
|
-
className: "successPopup_tick"
|
|
7127
|
-
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
7128
|
-
className: "successPopup_tick_icon",
|
|
7129
|
-
name: 'check'
|
|
7130
|
-
})), this.renderClose(), !_.isEmpty(this.props.text) && /*#__PURE__*/React.createElement("p", {
|
|
7131
|
-
className: "successPopup_text"
|
|
7132
|
-
}, this.props.text), this.props.children, this.renderButtons()));
|
|
7133
|
-
}
|
|
7134
|
-
}]);
|
|
7135
|
-
|
|
7136
|
-
return SuccessPopup;
|
|
7137
|
-
}(Component);
|
|
7138
|
-
|
|
7139
|
-
function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); 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); }; }
|
|
7140
|
-
|
|
7141
|
-
function _isNativeReflectConstruct$b() { 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; } }
|
|
7142
|
-
|
|
7143
|
-
var getReactions = function getReactions() {
|
|
7144
|
-
return [{
|
|
7145
|
-
key: 'heart',
|
|
7146
|
-
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/heart.png'
|
|
7147
|
-
}, {
|
|
7148
|
-
key: 'smile',
|
|
7149
|
-
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/smile.png'
|
|
7150
|
-
}, {
|
|
7151
|
-
key: 'sad',
|
|
7152
|
-
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/sad.png'
|
|
7153
|
-
}, {
|
|
7154
|
-
key: 'party',
|
|
7155
|
-
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/party.png'
|
|
7156
|
-
}];
|
|
7157
|
-
};
|
|
7158
|
-
|
|
7159
|
-
var Reactions = /*#__PURE__*/function (_Component) {
|
|
7160
|
-
_inherits(Reactions, _Component);
|
|
7161
|
-
|
|
7162
|
-
var _super = _createSuper$b(Reactions);
|
|
7163
|
-
|
|
7164
|
-
function Reactions() {
|
|
7165
|
-
var _this;
|
|
7166
|
-
|
|
7167
|
-
_classCallCheck(this, Reactions);
|
|
7168
|
-
|
|
7169
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7170
|
-
args[_key] = arguments[_key];
|
|
7171
|
-
}
|
|
7172
|
-
|
|
7173
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
7174
|
-
|
|
7175
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
7176
|
-
reactions: getReactions()
|
|
7177
|
-
});
|
|
7178
|
-
|
|
7179
|
-
return _this;
|
|
7180
|
-
}
|
|
7181
|
-
|
|
7182
|
-
_createClass(Reactions, [{
|
|
7183
|
-
key: "getReaction",
|
|
7184
|
-
value: function getReaction(key) {
|
|
7185
|
-
if (this.props.reactions) {
|
|
7186
|
-
if (!this.props.reactions[key]) {
|
|
7187
|
-
return 0;
|
|
7188
|
-
}
|
|
7189
|
-
|
|
7190
|
-
return this.props.reactions[key];
|
|
7191
|
-
}
|
|
7192
|
-
|
|
7193
|
-
if (!this.props.entity) {
|
|
7194
|
-
return 0;
|
|
7195
|
-
}
|
|
7196
|
-
|
|
7197
|
-
if (!this.props.entity.Reactions) {
|
|
7198
|
-
return 0;
|
|
7199
|
-
}
|
|
7200
|
-
|
|
7201
|
-
if (!this.props.entity.Reactions[key]) {
|
|
7202
|
-
return 0;
|
|
7411
|
+
return /*#__PURE__*/React.createElement(FontAwesome, {
|
|
7412
|
+
name: this.props.leftIcon,
|
|
7413
|
+
className: "tag_icon tag_icon-left ".concat(this.props.leftClick ? 'tag_icon-clickable' : ''),
|
|
7414
|
+
style: this.props.leftIconStyle,
|
|
7415
|
+
onClick: this.props.leftClick
|
|
7416
|
+
});
|
|
7417
|
+
}
|
|
7418
|
+
}, {
|
|
7419
|
+
key: "renderRight",
|
|
7420
|
+
value: function renderRight() {
|
|
7421
|
+
if (!this.props.rightIcon) {
|
|
7422
|
+
return null;
|
|
7203
7423
|
}
|
|
7204
7424
|
|
|
7205
|
-
return
|
|
7425
|
+
return /*#__PURE__*/React.createElement(FontAwesome, {
|
|
7426
|
+
name: this.props.rightIcon,
|
|
7427
|
+
className: "tag_icon tag_icon-right ".concat(this.props.rightClick ? 'tag_icon-clickable' : ''),
|
|
7428
|
+
style: this.props.rightIconStyle,
|
|
7429
|
+
onClick: this.props.rightClick
|
|
7430
|
+
});
|
|
7206
7431
|
}
|
|
7207
7432
|
}, {
|
|
7208
|
-
key: "
|
|
7209
|
-
value: function
|
|
7210
|
-
|
|
7433
|
+
key: "renderText",
|
|
7434
|
+
value: function renderText() {
|
|
7435
|
+
if (!this.props.text) {
|
|
7436
|
+
return null;
|
|
7437
|
+
}
|
|
7211
7438
|
|
|
7212
|
-
return
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
key: r.key
|
|
7216
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
7217
|
-
src: r.icon,
|
|
7218
|
-
className: "polloverview_iconImage",
|
|
7219
|
-
alt: r.key
|
|
7220
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
7221
|
-
className: "polloverview_right"
|
|
7222
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
7223
|
-
className: "polloverview_count"
|
|
7224
|
-
}, _this2.getReaction(r.key))));
|
|
7225
|
-
});
|
|
7439
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
7440
|
+
className: "tag_text"
|
|
7441
|
+
}, this.props.text);
|
|
7226
7442
|
}
|
|
7227
7443
|
}, {
|
|
7228
7444
|
key: "render",
|
|
7229
7445
|
value: function render() {
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
}
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
}, "Reactions"), /*#__PURE__*/React.createElement("div", {
|
|
7240
|
-
className: "polloverview"
|
|
7241
|
-
}, this.renderReactions()));
|
|
7446
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7447
|
+
onClick: this.props.onClick,
|
|
7448
|
+
className: "tag ".concat(this.props.onClick ? 'tag-clickable' : '', " ").concat(this.props.className || '', " ").concat(this.props.leftIcon || this.props.rightIcon ? 'tag-hasIcon' : ''),
|
|
7449
|
+
style: this.props.style
|
|
7450
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7451
|
+
className: "tag_inner"
|
|
7452
|
+
}, this.renderLeft(), /*#__PURE__*/React.createElement("div", {
|
|
7453
|
+
className: "tag_center ".concat(this.props.centerClass)
|
|
7454
|
+
}, this.renderText(), this.props.children), this.renderRight()));
|
|
7242
7455
|
}
|
|
7243
7456
|
}]);
|
|
7244
7457
|
|
|
7245
|
-
return
|
|
7458
|
+
return Tag;
|
|
7246
7459
|
}(Component);
|
|
7247
7460
|
|
|
7248
|
-
function _createSuper$
|
|
7249
|
-
|
|
7250
|
-
function _isNativeReflectConstruct$a() { 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; } }
|
|
7251
|
-
|
|
7252
|
-
var P60Icon = /*#__PURE__*/function (_Component) {
|
|
7253
|
-
_inherits(P60Icon, _Component);
|
|
7254
|
-
|
|
7255
|
-
var _super = _createSuper$a(P60Icon);
|
|
7256
|
-
|
|
7257
|
-
function P60Icon() {
|
|
7258
|
-
var _this;
|
|
7461
|
+
function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); 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); }; }
|
|
7259
7462
|
|
|
7260
|
-
|
|
7463
|
+
function _isNativeReflectConstruct$c() { 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; } }
|
|
7261
7464
|
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
}
|
|
7465
|
+
var Text = /*#__PURE__*/function (_Component) {
|
|
7466
|
+
_inherits(Text, _Component);
|
|
7265
7467
|
|
|
7266
|
-
|
|
7468
|
+
var _super = _createSuper$c(Text);
|
|
7267
7469
|
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
triplePaths: []
|
|
7271
|
-
});
|
|
7470
|
+
function Text() {
|
|
7471
|
+
_classCallCheck(this, Text);
|
|
7272
7472
|
|
|
7273
|
-
return
|
|
7473
|
+
return _super.apply(this, arguments);
|
|
7274
7474
|
}
|
|
7275
7475
|
|
|
7276
|
-
_createClass(
|
|
7277
|
-
key: "
|
|
7278
|
-
value: function
|
|
7279
|
-
if (
|
|
7280
|
-
return
|
|
7281
|
-
className: "path1"
|
|
7282
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
7283
|
-
className: "path2".concat(this.props.icon !== 'add-image' ? ' text-white' : '')
|
|
7284
|
-
}));
|
|
7285
|
-
}
|
|
7286
|
-
|
|
7287
|
-
if (_.includes(this.state.triplePaths, this.props.icon)) {
|
|
7288
|
-
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
|
|
7289
|
-
className: "path1"
|
|
7290
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
7291
|
-
className: "path2"
|
|
7292
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
7293
|
-
className: "path3"
|
|
7294
|
-
}));
|
|
7476
|
+
_createClass(Text, [{
|
|
7477
|
+
key: "getClassName",
|
|
7478
|
+
value: function getClassName() {
|
|
7479
|
+
if (this.props.className) {
|
|
7480
|
+
return " ".concat(this.props.className);
|
|
7295
7481
|
}
|
|
7296
7482
|
|
|
7297
|
-
return
|
|
7483
|
+
return '';
|
|
7298
7484
|
}
|
|
7299
7485
|
}, {
|
|
7300
7486
|
key: "render",
|
|
7301
7487
|
value: function render() {
|
|
7302
|
-
return /*#__PURE__*/React.createElement("
|
|
7303
|
-
className: "".concat(this.props.
|
|
7304
|
-
|
|
7488
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
7489
|
+
className: "text-".concat(this.props.type).concat(this.getClassName()),
|
|
7490
|
+
style: this.props.style
|
|
7491
|
+
}, this.props.children);
|
|
7305
7492
|
}
|
|
7306
7493
|
}]);
|
|
7307
7494
|
|
|
7308
|
-
return
|
|
7495
|
+
return Text;
|
|
7309
7496
|
}(Component);
|
|
7310
7497
|
|
|
7311
|
-
function _createSuper$
|
|
7498
|
+
function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); 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); }; }
|
|
7312
7499
|
|
|
7313
|
-
function _isNativeReflectConstruct$
|
|
7500
|
+
function _isNativeReflectConstruct$b() { 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; } }
|
|
7314
7501
|
|
|
7315
|
-
var
|
|
7316
|
-
_inherits(
|
|
7502
|
+
var StatusButton = /*#__PURE__*/function (_Component) {
|
|
7503
|
+
_inherits(StatusButton, _Component);
|
|
7317
7504
|
|
|
7318
|
-
var _super = _createSuper$
|
|
7505
|
+
var _super = _createSuper$b(StatusButton);
|
|
7319
7506
|
|
|
7320
|
-
function
|
|
7321
|
-
|
|
7507
|
+
function StatusButton() {
|
|
7508
|
+
_classCallCheck(this, StatusButton);
|
|
7322
7509
|
|
|
7323
|
-
|
|
7510
|
+
return _super.apply(this, arguments);
|
|
7511
|
+
}
|
|
7324
7512
|
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7513
|
+
_createClass(StatusButton, [{
|
|
7514
|
+
key: "render",
|
|
7515
|
+
value: function render() {
|
|
7516
|
+
if (this.props.isActive) {
|
|
7517
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7518
|
+
className: "tagWrapper tagWrapper--active",
|
|
7519
|
+
onClick: this.props.deactivate
|
|
7520
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
7521
|
+
className: "tagWrapper__content tagWrapper__text"
|
|
7522
|
+
}, this.props.activeText), /*#__PURE__*/React.createElement("p", {
|
|
7523
|
+
className: "tagWrapper__hoverContent tagWrapper__text"
|
|
7524
|
+
}, this.props.deactivateText));
|
|
7525
|
+
}
|
|
7328
7526
|
|
|
7329
|
-
|
|
7527
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7528
|
+
className: "tagWrapper tagWrapper--inactive",
|
|
7529
|
+
onClick: this.props.activate
|
|
7530
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
7531
|
+
className: "tagWrapper__content tagWrapper__text"
|
|
7532
|
+
}, this.props.inactiveText), /*#__PURE__*/React.createElement("p", {
|
|
7533
|
+
className: "tagWrapper__hoverContent tagWrapper__text"
|
|
7534
|
+
}, this.props.activateText));
|
|
7535
|
+
}
|
|
7536
|
+
}]);
|
|
7330
7537
|
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
grid: []
|
|
7334
|
-
});
|
|
7538
|
+
return StatusButton;
|
|
7539
|
+
}(Component);
|
|
7335
7540
|
|
|
7336
|
-
|
|
7337
|
-
}
|
|
7541
|
+
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); 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); }; }
|
|
7338
7542
|
|
|
7339
|
-
|
|
7340
|
-
key: "UNSAFE_componentWillMount",
|
|
7341
|
-
value: function UNSAFE_componentWillMount() {
|
|
7342
|
-
this.onNewProps(this.props, true);
|
|
7343
|
-
}
|
|
7344
|
-
}, {
|
|
7345
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
7346
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
7347
|
-
this.onNewProps(nextProps);
|
|
7348
|
-
}
|
|
7349
|
-
}, {
|
|
7350
|
-
key: "onNewProps",
|
|
7351
|
-
value: function onNewProps(nextProps, forceUpdate) {
|
|
7352
|
-
if (this.props.multiple && nextProps.selectedDates !== this.props.selectedDates) {
|
|
7353
|
-
this.generateGrid(this.state.shownMonth, nextProps.selectedDates);
|
|
7354
|
-
} else if (forceUpdate || nextProps.selectedDate !== this.props.selectedDate) {
|
|
7355
|
-
var dateToUse = nextProps.selectedDate;
|
|
7543
|
+
function _isNativeReflectConstruct$a() { 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; } }
|
|
7356
7544
|
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
}
|
|
7545
|
+
var SuccessPopup = /*#__PURE__*/function (_Component) {
|
|
7546
|
+
_inherits(SuccessPopup, _Component);
|
|
7360
7547
|
|
|
7361
|
-
|
|
7362
|
-
dateToUse = new Date();
|
|
7363
|
-
}
|
|
7548
|
+
var _super = _createSuper$a(SuccessPopup);
|
|
7364
7549
|
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
selectedDate: dateToUse
|
|
7368
|
-
});
|
|
7369
|
-
this.generateGrid(dateToUse, dateToUse);
|
|
7370
|
-
}
|
|
7371
|
-
}
|
|
7372
|
-
}, {
|
|
7373
|
-
key: "getDate",
|
|
7374
|
-
value: function getDate() {
|
|
7375
|
-
if (!this.props.selectedDate) {
|
|
7376
|
-
return 'Select day';
|
|
7377
|
-
}
|
|
7550
|
+
function SuccessPopup() {
|
|
7551
|
+
_classCallCheck(this, SuccessPopup);
|
|
7378
7552
|
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
}, {
|
|
7382
|
-
key: "getShortDate",
|
|
7383
|
-
value: function getShortDate() {
|
|
7384
|
-
if (!this.props.selectedDate) {
|
|
7385
|
-
return '';
|
|
7386
|
-
}
|
|
7553
|
+
return _super.apply(this, arguments);
|
|
7554
|
+
}
|
|
7387
7555
|
|
|
7388
|
-
|
|
7556
|
+
_createClass(SuccessPopup, [{
|
|
7557
|
+
key: "getBackgroundClasses",
|
|
7558
|
+
value: function getBackgroundClasses() {
|
|
7559
|
+
return this.props.backgroundClose ? 'successPopupBackground pointer' : 'successPopupBackground';
|
|
7389
7560
|
}
|
|
7390
7561
|
}, {
|
|
7391
|
-
key: "
|
|
7392
|
-
value: function
|
|
7393
|
-
|
|
7562
|
+
key: "renderButtons",
|
|
7563
|
+
value: function renderButtons() {
|
|
7564
|
+
if (_.isEmpty(this.props.buttons)) return null;
|
|
7565
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7566
|
+
className: "successPopup_buttons"
|
|
7567
|
+
}, this.props.buttons.map(function (b, i) {
|
|
7568
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
7569
|
+
key: i,
|
|
7570
|
+
buttonClassName: "successPopup_button",
|
|
7571
|
+
buttonType: b.type,
|
|
7572
|
+
isActive: !b.inactive,
|
|
7573
|
+
onClick: b.onClick
|
|
7574
|
+
}, b.text);
|
|
7575
|
+
}));
|
|
7394
7576
|
}
|
|
7395
7577
|
}, {
|
|
7396
|
-
key: "
|
|
7397
|
-
value: function
|
|
7398
|
-
if (this.props.
|
|
7399
|
-
return
|
|
7578
|
+
key: "renderClose",
|
|
7579
|
+
value: function renderClose() {
|
|
7580
|
+
if (!this.props.closeAction) {
|
|
7581
|
+
return null;
|
|
7400
7582
|
}
|
|
7401
7583
|
|
|
7402
|
-
return
|
|
7584
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
7585
|
+
style: {
|
|
7586
|
+
position: 'absolute',
|
|
7587
|
+
top: 16,
|
|
7588
|
+
right: 16,
|
|
7589
|
+
cursor: 'pointer'
|
|
7590
|
+
},
|
|
7591
|
+
onClick: this.props.closeAction
|
|
7592
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
7593
|
+
name: "remove"
|
|
7594
|
+
}));
|
|
7403
7595
|
}
|
|
7404
7596
|
}, {
|
|
7405
|
-
key: "
|
|
7406
|
-
value: function
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
this.
|
|
7597
|
+
key: "render",
|
|
7598
|
+
value: function render() {
|
|
7599
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7600
|
+
className: this.getBackgroundClasses()
|
|
7601
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7602
|
+
className: "successPopup"
|
|
7603
|
+
}, this.props.noIcon || /*#__PURE__*/React.createElement("div", {
|
|
7604
|
+
className: "successPopup_tick"
|
|
7605
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
7606
|
+
className: "successPopup_tick_icon",
|
|
7607
|
+
name: 'check'
|
|
7608
|
+
})), this.renderClose(), !_.isEmpty(this.props.text) && /*#__PURE__*/React.createElement("p", {
|
|
7609
|
+
className: "successPopup_text"
|
|
7610
|
+
}, this.props.text), this.props.children, this.renderButtons()));
|
|
7412
7611
|
}
|
|
7413
|
-
}
|
|
7414
|
-
key: "selectRange",
|
|
7415
|
-
value: function selectRange(date) {
|
|
7416
|
-
var _this2 = this;
|
|
7417
|
-
|
|
7418
|
-
var d1 = moment(this.state.lastSelected, 'DD-MM-YYYY');
|
|
7419
|
-
var d2 = moment(date, 'DD-MM-YYYY');
|
|
7420
|
-
var startDate, endDate;
|
|
7612
|
+
}]);
|
|
7421
7613
|
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
startDate = moment(d2);
|
|
7425
|
-
endDate = moment(d1);
|
|
7426
|
-
} else {
|
|
7427
|
-
// clicked a later day
|
|
7428
|
-
startDate = moment(d1);
|
|
7429
|
-
endDate = moment(d2);
|
|
7430
|
-
}
|
|
7614
|
+
return SuccessPopup;
|
|
7615
|
+
}(Component);
|
|
7431
7616
|
|
|
7432
|
-
|
|
7617
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); 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); }; }
|
|
7433
7618
|
|
|
7434
|
-
|
|
7435
|
-
startDate.add(1, 'd');
|
|
7436
|
-
dateRange.push(startDate.format('DD-MM-YYYY'));
|
|
7437
|
-
}
|
|
7619
|
+
function _isNativeReflectConstruct$9() { 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; } }
|
|
7438
7620
|
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
// or every date in the range is already selected, then
|
|
7444
|
-
// de-select the range
|
|
7445
|
-
this.props.selectDate(_.filter(this.props.selectedDates, function (d) {
|
|
7446
|
-
return !_.includes(dateRange, d);
|
|
7447
|
-
}));
|
|
7448
|
-
} else {
|
|
7449
|
-
// select the range
|
|
7450
|
-
var newSelection = [].concat(_toConsumableArray(this.props.selectedDates), dateRange);
|
|
7451
|
-
this.props.selectDate(_.uniq(newSelection));
|
|
7452
|
-
}
|
|
7453
|
-
}
|
|
7621
|
+
var getReactions = function getReactions() {
|
|
7622
|
+
return [{
|
|
7623
|
+
key: 'heart',
|
|
7624
|
+
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/heart.png'
|
|
7454
7625
|
}, {
|
|
7455
|
-
key:
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7626
|
+
key: 'smile',
|
|
7627
|
+
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/smile.png'
|
|
7628
|
+
}, {
|
|
7629
|
+
key: 'sad',
|
|
7630
|
+
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/sad.png'
|
|
7631
|
+
}, {
|
|
7632
|
+
key: 'party',
|
|
7633
|
+
icon: 'https://pluss60-demo-media.s3-ap-southeast-2.amazonaws.com/assets/emojis/party.png'
|
|
7634
|
+
}];
|
|
7635
|
+
};
|
|
7461
7636
|
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
this.selectRange(dateKey);
|
|
7465
|
-
} else {
|
|
7466
|
-
// toggle single date
|
|
7467
|
-
var index = this.props.selectedDates.indexOf(dateKey);
|
|
7637
|
+
var Reactions = /*#__PURE__*/function (_Component) {
|
|
7638
|
+
_inherits(Reactions, _Component);
|
|
7468
7639
|
|
|
7469
|
-
|
|
7640
|
+
var _super = _createSuper$9(Reactions);
|
|
7470
7641
|
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
} else {
|
|
7474
|
-
newSelection.push(dateKey);
|
|
7475
|
-
}
|
|
7642
|
+
function Reactions() {
|
|
7643
|
+
var _this;
|
|
7476
7644
|
|
|
7477
|
-
|
|
7478
|
-
}
|
|
7645
|
+
_classCallCheck(this, Reactions);
|
|
7479
7646
|
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
});
|
|
7483
|
-
} else {
|
|
7484
|
-
this.props.selectDate(moment(date).format('YYYY-MM-DD'));
|
|
7485
|
-
}
|
|
7647
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7648
|
+
args[_key] = arguments[_key];
|
|
7486
7649
|
}
|
|
7487
|
-
}, {
|
|
7488
|
-
key: "generateGrid",
|
|
7489
|
-
value: function generateGrid(date, selectedDate) {
|
|
7490
|
-
var month = moment(date);
|
|
7491
|
-
var dateToTarget = moment(date).endOf('month');
|
|
7492
|
-
var dateToModify = moment(date).startOf('month');
|
|
7493
|
-
var selectedDateToUse = this.props.multiple ? selectedDate || this.props.selectedDates || [] : moment(selectedDate || this.state.selectedDate); // set dateToModify to be Sunday of that week
|
|
7494
|
-
|
|
7495
|
-
while (dateToModify.day() !== 0) {
|
|
7496
|
-
dateToModify = dateToModify.add(-1, 'day');
|
|
7497
|
-
}
|
|
7498
7650
|
|
|
7499
|
-
|
|
7651
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
7500
7652
|
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7653
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
7654
|
+
reactions: getReactions()
|
|
7655
|
+
});
|
|
7504
7656
|
|
|
7505
|
-
|
|
7657
|
+
return _this;
|
|
7658
|
+
}
|
|
7506
7659
|
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7660
|
+
_createClass(Reactions, [{
|
|
7661
|
+
key: "getReaction",
|
|
7662
|
+
value: function getReaction(key) {
|
|
7663
|
+
if (this.props.reactions) {
|
|
7664
|
+
if (!this.props.reactions[key]) {
|
|
7665
|
+
return 0;
|
|
7511
7666
|
}
|
|
7512
7667
|
|
|
7513
|
-
|
|
7514
|
-
rows[rows.length - 1].push({
|
|
7515
|
-
date: thisDate,
|
|
7516
|
-
dateKey: thisDate.format('DD-MM-YYYY'),
|
|
7517
|
-
display: thisDate.date(),
|
|
7518
|
-
isFaded: !thisDate.isSame(month, 'month'),
|
|
7519
|
-
isToday: thisDate.isSame(moment(), 'date'),
|
|
7520
|
-
isSelected: this.isDateSelected(thisDate, selectedDateToUse)
|
|
7521
|
-
});
|
|
7522
|
-
dateToModify = dateToModify.add(1, 'day');
|
|
7668
|
+
return this.props.reactions[key];
|
|
7523
7669
|
}
|
|
7524
7670
|
|
|
7525
|
-
this.
|
|
7526
|
-
|
|
7527
|
-
}
|
|
7528
|
-
}
|
|
7529
|
-
}, {
|
|
7530
|
-
key: "renderGrid",
|
|
7531
|
-
value: function renderGrid() {
|
|
7532
|
-
var _this3 = this;
|
|
7533
|
-
|
|
7534
|
-
return this.state.grid.map(function (row, index) {
|
|
7535
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7536
|
-
className: "datepicker__row marginTop-8",
|
|
7537
|
-
key: index
|
|
7538
|
-
}, row.map(function (date) {
|
|
7539
|
-
var classes = 'datepicker__date';
|
|
7540
|
-
|
|
7541
|
-
if (date.isFaded) {
|
|
7542
|
-
classes += ' datepicker__date--faded';
|
|
7543
|
-
}
|
|
7544
|
-
|
|
7545
|
-
if (date.isToday) {
|
|
7546
|
-
classes += ' datepicker__date--today';
|
|
7547
|
-
}
|
|
7548
|
-
|
|
7549
|
-
if (date.isSelected) {
|
|
7550
|
-
classes += ' datepicker__date--selected';
|
|
7551
|
-
}
|
|
7671
|
+
if (!this.props.entity) {
|
|
7672
|
+
return 0;
|
|
7673
|
+
}
|
|
7552
7674
|
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
key: date.dateKey
|
|
7556
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7557
|
-
className: "datepicker__date__inner",
|
|
7558
|
-
onClick: function onClick(e) {
|
|
7559
|
-
_this3.selectDate(date.date, e);
|
|
7560
|
-
}
|
|
7561
|
-
}, date.display));
|
|
7562
|
-
}));
|
|
7563
|
-
});
|
|
7564
|
-
}
|
|
7565
|
-
}, {
|
|
7566
|
-
key: "renderTop",
|
|
7567
|
-
value: function renderTop() {
|
|
7568
|
-
if (this.props.hideTop) {
|
|
7569
|
-
return null;
|
|
7675
|
+
if (!this.props.entity.Reactions) {
|
|
7676
|
+
return 0;
|
|
7570
7677
|
}
|
|
7571
7678
|
|
|
7572
|
-
if (this.props.
|
|
7573
|
-
return
|
|
7574
|
-
className: "datepicker__multitop"
|
|
7575
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
7576
|
-
className: "datepicker__multitop__text"
|
|
7577
|
-
}, "Shift + Click to select a range of dates"));
|
|
7679
|
+
if (!this.props.entity.Reactions[key]) {
|
|
7680
|
+
return 0;
|
|
7578
7681
|
}
|
|
7579
7682
|
|
|
7580
|
-
return
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
className: "
|
|
7614
|
-
}, "
|
|
7615
|
-
className: "
|
|
7616
|
-
},
|
|
7617
|
-
className: "datepicker__colHeader"
|
|
7618
|
-
}, "WED"), /*#__PURE__*/React.createElement("p", {
|
|
7619
|
-
className: "datepicker__colHeader"
|
|
7620
|
-
}, "THU"), /*#__PURE__*/React.createElement("p", {
|
|
7621
|
-
className: "datepicker__colHeader"
|
|
7622
|
-
}, "FRI"), /*#__PURE__*/React.createElement("p", {
|
|
7623
|
-
className: "datepicker__colHeader"
|
|
7624
|
-
}, "SAT")), this.renderGrid()));
|
|
7683
|
+
return Object.keys(this.props.entity.Reactions[key]).length;
|
|
7684
|
+
}
|
|
7685
|
+
}, {
|
|
7686
|
+
key: "renderReactions",
|
|
7687
|
+
value: function renderReactions() {
|
|
7688
|
+
var _this2 = this;
|
|
7689
|
+
|
|
7690
|
+
return this.state.reactions.map(function (r, i) {
|
|
7691
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7692
|
+
className: "polloverview_section",
|
|
7693
|
+
key: r.key
|
|
7694
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
7695
|
+
src: r.icon,
|
|
7696
|
+
className: "polloverview_iconImage",
|
|
7697
|
+
alt: r.key
|
|
7698
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
7699
|
+
className: "polloverview_right"
|
|
7700
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
7701
|
+
className: "polloverview_count"
|
|
7702
|
+
}, _this2.getReaction(r.key))));
|
|
7703
|
+
});
|
|
7704
|
+
}
|
|
7705
|
+
}, {
|
|
7706
|
+
key: "render",
|
|
7707
|
+
value: function render() {
|
|
7708
|
+
if (this.props.compact) {
|
|
7709
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7710
|
+
className: "compactreactions"
|
|
7711
|
+
}, this.renderReactions());
|
|
7712
|
+
}
|
|
7713
|
+
|
|
7714
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
|
|
7715
|
+
type: "formTitleSmall",
|
|
7716
|
+
className: "marginBottom-16"
|
|
7717
|
+
}, "Reactions"), /*#__PURE__*/React.createElement("div", {
|
|
7718
|
+
className: "polloverview"
|
|
7719
|
+
}, this.renderReactions()));
|
|
7625
7720
|
}
|
|
7626
7721
|
}]);
|
|
7627
7722
|
|
|
7628
|
-
return
|
|
7723
|
+
return Reactions;
|
|
7629
7724
|
}(Component);
|
|
7630
7725
|
|
|
7631
7726
|
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); 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); }; }
|
|
@@ -7794,48 +7889,31 @@ var UserListing = /*#__PURE__*/function (_Component) {
|
|
|
7794
7889
|
key: "render",
|
|
7795
7890
|
value: function render() {
|
|
7796
7891
|
return /*#__PURE__*/React.createElement("div", {
|
|
7892
|
+
key: this.props.user.userId || this.props.user.Id || this.props.user.id,
|
|
7893
|
+
className: "userListing",
|
|
7797
7894
|
style: {
|
|
7798
7895
|
minHeight: this.getSize() + 5,
|
|
7799
|
-
|
|
7800
|
-
cursor: this.props.onClick ? 'pointer' : 'default',
|
|
7801
|
-
flexDirection: 'row',
|
|
7802
|
-
justifyContent: 'space-between',
|
|
7803
|
-
alignItems: 'center',
|
|
7804
|
-
marginTop: 10,
|
|
7896
|
+
cursor: this.props.onClick ? 'pointer' : 'inherit',
|
|
7805
7897
|
opacity: this.props.user && this.props.user.loading ? 0.5 : 1
|
|
7806
7898
|
},
|
|
7807
7899
|
onClick: this.props.onClick
|
|
7808
7900
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
}
|
|
7815
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7816
|
-
style: {
|
|
7817
|
-
height: this.getSize(),
|
|
7818
|
-
width: this.getSize(),
|
|
7819
|
-
borderRadius: this.getSize() / 2,
|
|
7820
|
-
marginRight: 16,
|
|
7821
|
-
backgroundSize: 'cover',
|
|
7822
|
-
backgroundPosition: 'center',
|
|
7823
|
-
backgroundImage: "url(".concat(this.props.user.profilePic != null ? this.props.user.profilePic : CoreConfig.env.defaultProfileImage, ")")
|
|
7824
|
-
},
|
|
7825
|
-
alt: "user profile pic"
|
|
7901
|
+
className: "userListing_inner"
|
|
7902
|
+
}, /*#__PURE__*/React.createElement(ProfilePic, {
|
|
7903
|
+
size: this.getSize(),
|
|
7904
|
+
className: "userListing_profilePic",
|
|
7905
|
+
image: this.props.user.profilePic
|
|
7826
7906
|
}), /*#__PURE__*/React.createElement("div", {
|
|
7907
|
+
className: "userListing_middle",
|
|
7827
7908
|
style: {
|
|
7828
|
-
flex: 1,
|
|
7829
|
-
display: 'flex',
|
|
7830
|
-
flexDirection: 'column',
|
|
7831
|
-
justifyContent: 'center',
|
|
7832
7909
|
height: this.getSize()
|
|
7833
7910
|
}
|
|
7834
|
-
}, /*#__PURE__*/React.createElement(
|
|
7835
|
-
|
|
7836
|
-
style: {
|
|
7837
|
-
|
|
7838
|
-
}
|
|
7911
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
7912
|
+
type: "name",
|
|
7913
|
+
style: this.props.whiteText ? {
|
|
7914
|
+
color: '#fff'
|
|
7915
|
+
} : null,
|
|
7916
|
+
className: this.props.textClass
|
|
7839
7917
|
}, this.props.user.displayName), this.renderSub())), this.renderRight());
|
|
7840
7918
|
}
|
|
7841
7919
|
}]);
|
|
@@ -8290,33 +8368,294 @@ var AudienceIncluder = /*#__PURE__*/function (_Component) {
|
|
|
8290
8368
|
}, {
|
|
8291
8369
|
key: "render",
|
|
8292
8370
|
value: function render() {
|
|
8293
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, this.renderUserAdd()), /*#__PURE__*/React.createElement("div", null, this.renderAttendees()));
|
|
8371
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, this.renderUserAdd()), /*#__PURE__*/React.createElement("div", null, this.renderAttendees()));
|
|
8372
|
+
}
|
|
8373
|
+
}]);
|
|
8374
|
+
|
|
8375
|
+
return AudienceIncluder;
|
|
8376
|
+
}(Component);
|
|
8377
|
+
|
|
8378
|
+
var mapStateToProps$1 = function mapStateToProps(state) {
|
|
8379
|
+
return {
|
|
8380
|
+
auth: state.auth
|
|
8381
|
+
};
|
|
8382
|
+
};
|
|
8383
|
+
|
|
8384
|
+
var exportObj$1 = connect(mapStateToProps$1, {})(withRouter(AudienceIncluder));
|
|
8385
|
+
|
|
8386
|
+
function ownKeys$2(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; }
|
|
8387
|
+
|
|
8388
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8389
|
+
|
|
8390
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); 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); }; }
|
|
8391
|
+
|
|
8392
|
+
function _isNativeReflectConstruct$4() { 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; } }
|
|
8393
|
+
|
|
8394
|
+
var DropdownInput = /*#__PURE__*/function (_Component) {
|
|
8395
|
+
_inherits(DropdownInput, _Component);
|
|
8396
|
+
|
|
8397
|
+
var _super = _createSuper$4(DropdownInput);
|
|
8398
|
+
|
|
8399
|
+
function DropdownInput(props) {
|
|
8400
|
+
var _this;
|
|
8401
|
+
|
|
8402
|
+
_classCallCheck(this, DropdownInput);
|
|
8403
|
+
|
|
8404
|
+
_this = _super.call(this, props);
|
|
8405
|
+
_this.state = {
|
|
8406
|
+
width: 0,
|
|
8407
|
+
height: 0,
|
|
8408
|
+
open: false
|
|
8409
|
+
};
|
|
8410
|
+
_this.setWrapperRef = _this.setWrapperRef.bind(_assertThisInitialized(_this));
|
|
8411
|
+
_this.handleClickOutside = _this.handleClickOutside.bind(_assertThisInitialized(_this));
|
|
8412
|
+
return _this;
|
|
8413
|
+
}
|
|
8414
|
+
|
|
8415
|
+
_createClass(DropdownInput, [{
|
|
8416
|
+
key: "componentDidMount",
|
|
8417
|
+
value: function componentDidMount() {
|
|
8418
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
|
8419
|
+
}
|
|
8420
|
+
}, {
|
|
8421
|
+
key: "componentWillUnmount",
|
|
8422
|
+
value: function componentWillUnmount() {
|
|
8423
|
+
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
8424
|
+
}
|
|
8425
|
+
}, {
|
|
8426
|
+
key: "setWrapperRef",
|
|
8427
|
+
value: function setWrapperRef(node) {
|
|
8428
|
+
this.wrapperRef = node;
|
|
8429
|
+
}
|
|
8430
|
+
}, {
|
|
8431
|
+
key: "handleClickOutside",
|
|
8432
|
+
value: function handleClickOutside(event) {
|
|
8433
|
+
if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
|
|
8434
|
+
this.setState({
|
|
8435
|
+
open: false
|
|
8436
|
+
});
|
|
8437
|
+
}
|
|
8438
|
+
}
|
|
8439
|
+
}, {
|
|
8440
|
+
key: "getAutoComplete",
|
|
8441
|
+
value: function getAutoComplete() {
|
|
8442
|
+
if (!_.isUndefined(this.props.autoComplete)) {
|
|
8443
|
+
return this.props.autoComplete ? 'on' : 'off';
|
|
8444
|
+
}
|
|
8445
|
+
|
|
8446
|
+
return 'off';
|
|
8447
|
+
}
|
|
8448
|
+
}, {
|
|
8449
|
+
key: "getClassNames",
|
|
8450
|
+
value: function getClassNames() {
|
|
8451
|
+
var string = '';
|
|
8452
|
+
|
|
8453
|
+
if (this.props.className) {
|
|
8454
|
+
string += "".concat(this.props.className, " ");
|
|
8455
|
+
}
|
|
8456
|
+
|
|
8457
|
+
if (!_.isUndefined(this.props.disabled) && this.props.disabled) {
|
|
8458
|
+
string = 'genericInput-disabled ';
|
|
8459
|
+
}
|
|
8460
|
+
|
|
8461
|
+
if (this.props.large) {
|
|
8462
|
+
string += 'genericInput-large ';
|
|
8463
|
+
}
|
|
8464
|
+
|
|
8465
|
+
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
8466
|
+
return string + 'genericInput-error';
|
|
8467
|
+
}
|
|
8468
|
+
|
|
8469
|
+
if (!_.isUndefined(this.props.isValid) && this.props.isValid()) {
|
|
8470
|
+
return string + 'genericInput-valid';
|
|
8471
|
+
}
|
|
8472
|
+
|
|
8473
|
+
return string;
|
|
8474
|
+
}
|
|
8475
|
+
}, {
|
|
8476
|
+
key: "getLabelStyle",
|
|
8477
|
+
value: function getLabelStyle() {
|
|
8478
|
+
var style = {};
|
|
8479
|
+
|
|
8480
|
+
if (_.isEmpty(this.props.value) && !this.props.alwaysShowLabel) {
|
|
8481
|
+
style.opacity = 0;
|
|
8482
|
+
}
|
|
8483
|
+
|
|
8484
|
+
if (!_.isUndefined(this.props.ignoreValue) && this.props.value === this.props.ignoreValue && !this.props.alwaysShowLabel) {
|
|
8485
|
+
style.opacity = 0;
|
|
8486
|
+
} // if (this.props.isRequired) {
|
|
8487
|
+
// style.marginLeft = 12;
|
|
8488
|
+
// }
|
|
8489
|
+
|
|
8490
|
+
|
|
8491
|
+
return style;
|
|
8492
|
+
}
|
|
8493
|
+
}, {
|
|
8494
|
+
key: "renderError",
|
|
8495
|
+
value: function renderError() {
|
|
8496
|
+
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
8497
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8498
|
+
className: 'fieldLabel fieldLabel-warning'
|
|
8499
|
+
}, this.props.errorMessage ? this.props.errorMessage : 'Required');
|
|
8500
|
+
}
|
|
8501
|
+
|
|
8502
|
+
return null;
|
|
8503
|
+
}
|
|
8504
|
+
}, {
|
|
8505
|
+
key: "renderHelp",
|
|
8506
|
+
value: function renderHelp() {
|
|
8507
|
+
if (!_.isUndefined(this.props.help)) {
|
|
8508
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8509
|
+
className: "genericInput-help"
|
|
8510
|
+
}, this.props.help);
|
|
8511
|
+
}
|
|
8512
|
+
|
|
8513
|
+
return null;
|
|
8514
|
+
}
|
|
8515
|
+
}, {
|
|
8516
|
+
key: "open",
|
|
8517
|
+
value: function open() {
|
|
8518
|
+
if (this.props.disabled) {
|
|
8519
|
+
return;
|
|
8520
|
+
}
|
|
8521
|
+
|
|
8522
|
+
this.setState({
|
|
8523
|
+
open: !this.state.open
|
|
8524
|
+
});
|
|
8525
|
+
}
|
|
8526
|
+
}, {
|
|
8527
|
+
key: "renderOption",
|
|
8528
|
+
value: function renderOption() {
|
|
8529
|
+
var _this2 = this;
|
|
8530
|
+
|
|
8531
|
+
if (!this.state.open) {
|
|
8532
|
+
return null;
|
|
8533
|
+
}
|
|
8534
|
+
|
|
8535
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8536
|
+
style: styles.dropdownItemsWrapper
|
|
8537
|
+
}, _.values(this.props.options).map(function (cat) {
|
|
8538
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8539
|
+
key: cat.Key,
|
|
8540
|
+
className: "subtleHover fontRegular fontSize-16 text-dark",
|
|
8541
|
+
style: styles.dropDownOption,
|
|
8542
|
+
onClick: function onClick() {
|
|
8543
|
+
_this2.props.onSelect(cat.Key);
|
|
8544
|
+
}
|
|
8545
|
+
}, cat.Title);
|
|
8546
|
+
}));
|
|
8547
|
+
}
|
|
8548
|
+
}, {
|
|
8549
|
+
key: "getBottomBorder",
|
|
8550
|
+
value: function getBottomBorder() {
|
|
8551
|
+
if (!_.isUndefined(this.props.disabled) && this.props.disabled) {
|
|
8552
|
+
return 'dropdownInput-bottomBorder--disabled';
|
|
8553
|
+
}
|
|
8554
|
+
|
|
8555
|
+
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
8556
|
+
return 'dropdownInput-bottomBorder--error';
|
|
8557
|
+
}
|
|
8558
|
+
|
|
8559
|
+
return '';
|
|
8560
|
+
}
|
|
8561
|
+
}, {
|
|
8562
|
+
key: "renderInput",
|
|
8563
|
+
value: function renderInput() {
|
|
8564
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8565
|
+
style: styles.row
|
|
8566
|
+
}, this.props.isRequired && /*#__PURE__*/React.createElement("div", {
|
|
8567
|
+
className: "inputRequired "
|
|
8568
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
8569
|
+
onClick: this.open.bind(this),
|
|
8570
|
+
className: "dropdownInput-bottomBorder ".concat(this.getBottomBorder(), " ").concat(!this.props.disabled ? 'pointer' : '')
|
|
8571
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
8572
|
+
id: this.props.id,
|
|
8573
|
+
placeholder: !_.isUndefined(this.props.placeholder) ? this.props.placeholder : this.props.label,
|
|
8574
|
+
type: !_.isUndefined(this.props.type) ? this.props.type : 'text',
|
|
8575
|
+
className: "genericInput ".concat(!this.props.disabled ? 'pointer' : ''),
|
|
8576
|
+
value: this.props.value,
|
|
8577
|
+
onChange: this.props.onChange,
|
|
8578
|
+
onKeyPress: this.props.onEnter,
|
|
8579
|
+
style: _objectSpread$2({}, this.props.inputStyle),
|
|
8580
|
+
disabled: true,
|
|
8581
|
+
autoComplete: "false"
|
|
8582
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
8583
|
+
style: styles.chevronWrapper
|
|
8584
|
+
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
8585
|
+
style: _objectSpread$2(_objectSpread$2({}, styles.chevron), {}, {
|
|
8586
|
+
color: !_.isUndefined(this.props.disabled) && this.props.disabled ? 'transparent' : INACTIVE_TEXT
|
|
8587
|
+
}),
|
|
8588
|
+
name: this.state.open ? 'chevron-up' : 'chevron-down'
|
|
8589
|
+
})), this.renderOption()));
|
|
8590
|
+
}
|
|
8591
|
+
}, {
|
|
8592
|
+
key: "render",
|
|
8593
|
+
value: function render() {
|
|
8594
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8595
|
+
ref: this.setWrapperRef,
|
|
8596
|
+
className: "dropdownInput ".concat(this.getClassNames()),
|
|
8597
|
+
style: _objectSpread$2({
|
|
8598
|
+
marginBottom: 16,
|
|
8599
|
+
position: 'relative'
|
|
8600
|
+
}, this.props.style)
|
|
8601
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8602
|
+
style: _objectSpread$2(_objectSpread$2({}, styles.row), {}, {
|
|
8603
|
+
marginBottom: 0,
|
|
8604
|
+
justifyContent: 'space-between'
|
|
8605
|
+
})
|
|
8606
|
+
}, !_.isUndefined(this.props.label) && /*#__PURE__*/React.createElement("div", {
|
|
8607
|
+
className: "fieldLabel",
|
|
8608
|
+
style: this.getLabelStyle()
|
|
8609
|
+
}, this.props.label), this.renderError()), this.renderInput(), this.renderHelp());
|
|
8294
8610
|
}
|
|
8295
8611
|
}]);
|
|
8296
8612
|
|
|
8297
|
-
return
|
|
8613
|
+
return DropdownInput;
|
|
8298
8614
|
}(Component);
|
|
8299
8615
|
|
|
8300
|
-
var
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8616
|
+
var styles = {
|
|
8617
|
+
row: {
|
|
8618
|
+
display: 'flex',
|
|
8619
|
+
flexDirection: 'row',
|
|
8620
|
+
alignItems: 'center'
|
|
8621
|
+
},
|
|
8622
|
+
chevronWrapper: {
|
|
8623
|
+
display: 'flex',
|
|
8624
|
+
flexDirection: 'column',
|
|
8625
|
+
justifyContent: 'center'
|
|
8626
|
+
},
|
|
8627
|
+
chevron: {
|
|
8628
|
+
fontSize: 12,
|
|
8629
|
+
paddingBottom: 4
|
|
8630
|
+
},
|
|
8631
|
+
dropdownItemsWrapper: {
|
|
8632
|
+
backgroundColor: '#fff',
|
|
8633
|
+
position: 'absolute',
|
|
8634
|
+
width: '100%',
|
|
8635
|
+
top: 35,
|
|
8636
|
+
boxShadow: '2px 2px 10px rgba(106, 163, 216, 0.7)',
|
|
8637
|
+
zIndex: 90,
|
|
8638
|
+
borderRadius: 4,
|
|
8639
|
+
paddingTop: 4,
|
|
8640
|
+
paddingBottom: 4
|
|
8641
|
+
},
|
|
8642
|
+
dropDownOption: {
|
|
8643
|
+
padding: '4px 16px'
|
|
8644
|
+
}
|
|
8304
8645
|
};
|
|
8305
8646
|
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
function ownKeys$2(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; }
|
|
8647
|
+
function ownKeys$1(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; }
|
|
8309
8648
|
|
|
8310
|
-
function _objectSpread$
|
|
8649
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8311
8650
|
|
|
8312
|
-
function _createSuper$
|
|
8651
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); 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); }; }
|
|
8313
8652
|
|
|
8314
|
-
function _isNativeReflectConstruct$
|
|
8653
|
+
function _isNativeReflectConstruct$3() { 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; } }
|
|
8315
8654
|
|
|
8316
8655
|
var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
8317
8656
|
_inherits(AudienceSelector, _Component);
|
|
8318
8657
|
|
|
8319
|
-
var _super = _createSuper$
|
|
8658
|
+
var _super = _createSuper$3(AudienceSelector);
|
|
8320
8659
|
|
|
8321
8660
|
function AudienceSelector() {
|
|
8322
8661
|
var _this;
|
|
@@ -8441,7 +8780,7 @@ var AudienceSelector = /*#__PURE__*/function (_Component) {
|
|
|
8441
8780
|
profileActions.getUserTagsBySite(this.props.auth.site).then(function (res) {
|
|
8442
8781
|
_this3.setState({
|
|
8443
8782
|
tagList: res.data.map(function (t) {
|
|
8444
|
-
return _objectSpread$
|
|
8783
|
+
return _objectSpread$1(_objectSpread$1({}, t), {}, {
|
|
8445
8784
|
Key: t.Id
|
|
8446
8785
|
});
|
|
8447
8786
|
})
|
|
@@ -8983,14 +9322,14 @@ var toExport = connect(null, {
|
|
|
8983
9322
|
withRef: true
|
|
8984
9323
|
})(AudienceSelector);
|
|
8985
9324
|
|
|
8986
|
-
function _createSuper$
|
|
9325
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); 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); }; }
|
|
8987
9326
|
|
|
8988
|
-
function _isNativeReflectConstruct$
|
|
9327
|
+
function _isNativeReflectConstruct$2() { 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; } }
|
|
8989
9328
|
|
|
8990
9329
|
var TextFormatPopup = /*#__PURE__*/function (_Component) {
|
|
8991
9330
|
_inherits(TextFormatPopup, _Component);
|
|
8992
9331
|
|
|
8993
|
-
var _super = _createSuper$
|
|
9332
|
+
var _super = _createSuper$2(TextFormatPopup);
|
|
8994
9333
|
|
|
8995
9334
|
function TextFormatPopup() {
|
|
8996
9335
|
_classCallCheck(this, TextFormatPopup);
|
|
@@ -9066,382 +9405,121 @@ var TextFormatPopup = /*#__PURE__*/function (_Component) {
|
|
|
9066
9405
|
fontWeight: 600,
|
|
9067
9406
|
fontSize: 16
|
|
9068
9407
|
}
|
|
9069
|
-
}, "Some Text"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Create links with ", /*#__PURE__*/React.createElement("span", {
|
|
9070
|
-
style: {
|
|
9071
|
-
fontWeight: 400
|
|
9072
|
-
}
|
|
9073
|
-
}, "[website|text]"), ":", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("span", {
|
|
9074
|
-
style: {
|
|
9075
|
-
fontWeight: 400
|
|
9076
|
-
}
|
|
9077
|
-
}, "[https://example.com|Click here]"), " =", ' ', /*#__PURE__*/React.createElement("a", {
|
|
9078
|
-
href: "https://example.com",
|
|
9079
|
-
target: "_blank",
|
|
9080
|
-
rel: "noopener noreferrer",
|
|
9081
|
-
style: {
|
|
9082
|
-
fontWeight: 600,
|
|
9083
|
-
fontSize: 16
|
|
9084
|
-
}
|
|
9085
|
-
}, "Click here")), /*#__PURE__*/React.createElement("div", {
|
|
9086
|
-
className: "successPopup_buttons"
|
|
9087
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
9088
|
-
buttonClassName: "successPopup_button",
|
|
9089
|
-
buttonType: "primary",
|
|
9090
|
-
isActive: true,
|
|
9091
|
-
onClick: this.props.onClose
|
|
9092
|
-
}, "Close"))));
|
|
9093
|
-
}
|
|
9094
|
-
}]);
|
|
9095
|
-
|
|
9096
|
-
return TextFormatPopup;
|
|
9097
|
-
}(Component);
|
|
9098
|
-
|
|
9099
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); 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); }; }
|
|
9100
|
-
|
|
9101
|
-
function _isNativeReflectConstruct$2() { 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; } }
|
|
9102
|
-
|
|
9103
|
-
var OptionsSection = /*#__PURE__*/function (_Component) {
|
|
9104
|
-
_inherits(OptionsSection, _Component);
|
|
9105
|
-
|
|
9106
|
-
var _super = _createSuper$2(OptionsSection);
|
|
9107
|
-
|
|
9108
|
-
function OptionsSection() {
|
|
9109
|
-
_classCallCheck(this, OptionsSection);
|
|
9110
|
-
|
|
9111
|
-
return _super.apply(this, arguments);
|
|
9112
|
-
}
|
|
9113
|
-
|
|
9114
|
-
_createClass(OptionsSection, [{
|
|
9115
|
-
key: "getTitle",
|
|
9116
|
-
value: function getTitle() {
|
|
9117
|
-
var _this = this;
|
|
9118
|
-
|
|
9119
|
-
var selectedOption = _.find(this.props.options, function (o) {
|
|
9120
|
-
return _this.props.selected === o.key;
|
|
9121
|
-
});
|
|
9122
|
-
|
|
9123
|
-
if (!selectedOption) {
|
|
9124
|
-
return '';
|
|
9125
|
-
}
|
|
9126
|
-
|
|
9127
|
-
return selectedOption.text;
|
|
9128
|
-
}
|
|
9129
|
-
}, {
|
|
9130
|
-
key: "renderOptionButton",
|
|
9131
|
-
value: function renderOptionButton(o) {
|
|
9132
|
-
var _this2 = this;
|
|
9133
|
-
|
|
9134
|
-
var isSelected = this.props.selected === o.key;
|
|
9135
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9136
|
-
className: "optionsButton".concat(isSelected ? ' optionsButton-selected' : ''),
|
|
9137
|
-
key: o.key,
|
|
9138
|
-
onClick: function onClick() {
|
|
9139
|
-
_this2.props.selectOption(o.key);
|
|
9140
|
-
}
|
|
9141
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
9142
|
-
className: "optionsButton_iconContainer"
|
|
9143
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
9144
|
-
icon: o.icon,
|
|
9145
|
-
colour: isSelected ? '#fff' : COLOUR_BRANDING_MAIN
|
|
9146
|
-
})), /*#__PURE__*/React.createElement(Text, {
|
|
9147
|
-
type: "formLabelSmall",
|
|
9148
|
-
className: "optionsButton_text"
|
|
9149
|
-
}, o.text));
|
|
9150
|
-
}
|
|
9151
|
-
}, {
|
|
9152
|
-
key: "render",
|
|
9153
|
-
value: function render() {
|
|
9154
|
-
var _this3 = this;
|
|
9155
|
-
|
|
9156
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9157
|
-
className: "optionsSection".concat(this.props.overflowButtons ? ' optionsSection-overflowButtons' : '')
|
|
9158
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
9159
|
-
className: "optionsSection_banner"
|
|
9160
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
9161
|
-
className: "optionsSection_banner_top"
|
|
9162
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
9163
|
-
type: "formTitleMedium",
|
|
9164
|
-
className: "optionsSection_banner_top_title"
|
|
9165
|
-
}, "More Options")), /*#__PURE__*/React.createElement("div", {
|
|
9166
|
-
className: "optionsSection_banner_buttonSection"
|
|
9167
|
-
}, this.props.options.map(function (o) {
|
|
9168
|
-
return _this3.renderOptionButton(o);
|
|
9169
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
9170
|
-
className: "optionsContent"
|
|
9171
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
9172
|
-
className: "optionsContent_box"
|
|
9173
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
9174
|
-
className: "optionsContent_box_top"
|
|
9175
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
9176
|
-
type: "formTitleSmall"
|
|
9177
|
-
}, this.getTitle())), this.props.children)));
|
|
9178
|
-
}
|
|
9179
|
-
}]);
|
|
9180
|
-
|
|
9181
|
-
return OptionsSection;
|
|
9182
|
-
}(Component);
|
|
9183
|
-
|
|
9184
|
-
function ownKeys$1(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; }
|
|
9185
|
-
|
|
9186
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9187
|
-
|
|
9188
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); 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); }; }
|
|
9189
|
-
|
|
9190
|
-
function _isNativeReflectConstruct$1() { 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; } }
|
|
9191
|
-
|
|
9192
|
-
var DropdownInput = /*#__PURE__*/function (_Component) {
|
|
9193
|
-
_inherits(DropdownInput, _Component);
|
|
9194
|
-
|
|
9195
|
-
var _super = _createSuper$1(DropdownInput);
|
|
9196
|
-
|
|
9197
|
-
function DropdownInput(props) {
|
|
9198
|
-
var _this;
|
|
9199
|
-
|
|
9200
|
-
_classCallCheck(this, DropdownInput);
|
|
9201
|
-
|
|
9202
|
-
_this = _super.call(this, props);
|
|
9203
|
-
_this.state = {
|
|
9204
|
-
width: 0,
|
|
9205
|
-
height: 0,
|
|
9206
|
-
open: false
|
|
9207
|
-
};
|
|
9208
|
-
_this.setWrapperRef = _this.setWrapperRef.bind(_assertThisInitialized(_this));
|
|
9209
|
-
_this.handleClickOutside = _this.handleClickOutside.bind(_assertThisInitialized(_this));
|
|
9210
|
-
return _this;
|
|
9211
|
-
}
|
|
9212
|
-
|
|
9213
|
-
_createClass(DropdownInput, [{
|
|
9214
|
-
key: "componentDidMount",
|
|
9215
|
-
value: function componentDidMount() {
|
|
9216
|
-
document.addEventListener('mousedown', this.handleClickOutside);
|
|
9217
|
-
}
|
|
9218
|
-
}, {
|
|
9219
|
-
key: "componentWillUnmount",
|
|
9220
|
-
value: function componentWillUnmount() {
|
|
9221
|
-
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
9222
|
-
}
|
|
9223
|
-
}, {
|
|
9224
|
-
key: "setWrapperRef",
|
|
9225
|
-
value: function setWrapperRef(node) {
|
|
9226
|
-
this.wrapperRef = node;
|
|
9227
|
-
}
|
|
9228
|
-
}, {
|
|
9229
|
-
key: "handleClickOutside",
|
|
9230
|
-
value: function handleClickOutside(event) {
|
|
9231
|
-
if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
|
|
9232
|
-
this.setState({
|
|
9233
|
-
open: false
|
|
9234
|
-
});
|
|
9235
|
-
}
|
|
9236
|
-
}
|
|
9237
|
-
}, {
|
|
9238
|
-
key: "getAutoComplete",
|
|
9239
|
-
value: function getAutoComplete() {
|
|
9240
|
-
if (!_.isUndefined(this.props.autoComplete)) {
|
|
9241
|
-
return this.props.autoComplete ? 'on' : 'off';
|
|
9242
|
-
}
|
|
9243
|
-
|
|
9244
|
-
return 'off';
|
|
9408
|
+
}, "Some Text"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Create links with ", /*#__PURE__*/React.createElement("span", {
|
|
9409
|
+
style: {
|
|
9410
|
+
fontWeight: 400
|
|
9411
|
+
}
|
|
9412
|
+
}, "[website|text]"), ":", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("span", {
|
|
9413
|
+
style: {
|
|
9414
|
+
fontWeight: 400
|
|
9415
|
+
}
|
|
9416
|
+
}, "[https://example.com|Click here]"), " =", ' ', /*#__PURE__*/React.createElement("a", {
|
|
9417
|
+
href: "https://example.com",
|
|
9418
|
+
target: "_blank",
|
|
9419
|
+
rel: "noopener noreferrer",
|
|
9420
|
+
style: {
|
|
9421
|
+
fontWeight: 600,
|
|
9422
|
+
fontSize: 16
|
|
9423
|
+
}
|
|
9424
|
+
}, "Click here")), /*#__PURE__*/React.createElement("div", {
|
|
9425
|
+
className: "successPopup_buttons"
|
|
9426
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
9427
|
+
buttonClassName: "successPopup_button",
|
|
9428
|
+
buttonType: "primary",
|
|
9429
|
+
isActive: true,
|
|
9430
|
+
onClick: this.props.onClose
|
|
9431
|
+
}, "Close"))));
|
|
9245
9432
|
}
|
|
9246
|
-
}
|
|
9247
|
-
key: "getClassNames",
|
|
9248
|
-
value: function getClassNames() {
|
|
9249
|
-
var string = '';
|
|
9250
|
-
|
|
9251
|
-
if (this.props.className) {
|
|
9252
|
-
string += "".concat(this.props.className, " ");
|
|
9253
|
-
}
|
|
9254
|
-
|
|
9255
|
-
if (!_.isUndefined(this.props.disabled) && this.props.disabled) {
|
|
9256
|
-
string = 'genericInput-disabled ';
|
|
9257
|
-
}
|
|
9258
|
-
|
|
9259
|
-
if (this.props.large) {
|
|
9260
|
-
string += 'genericInput-large ';
|
|
9261
|
-
}
|
|
9262
|
-
|
|
9263
|
-
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
9264
|
-
return string + 'genericInput-error';
|
|
9265
|
-
}
|
|
9433
|
+
}]);
|
|
9266
9434
|
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
}
|
|
9435
|
+
return TextFormatPopup;
|
|
9436
|
+
}(Component);
|
|
9270
9437
|
|
|
9271
|
-
|
|
9272
|
-
}
|
|
9273
|
-
}, {
|
|
9274
|
-
key: "getLabelStyle",
|
|
9275
|
-
value: function getLabelStyle() {
|
|
9276
|
-
var style = {};
|
|
9438
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); 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); }; }
|
|
9277
9439
|
|
|
9278
|
-
|
|
9279
|
-
style.opacity = 0;
|
|
9280
|
-
}
|
|
9440
|
+
function _isNativeReflectConstruct$1() { 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; } }
|
|
9281
9441
|
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
} // if (this.props.isRequired) {
|
|
9285
|
-
// style.marginLeft = 12;
|
|
9286
|
-
// }
|
|
9442
|
+
var OptionsSection = /*#__PURE__*/function (_Component) {
|
|
9443
|
+
_inherits(OptionsSection, _Component);
|
|
9287
9444
|
|
|
9445
|
+
var _super = _createSuper$1(OptionsSection);
|
|
9288
9446
|
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
}, {
|
|
9292
|
-
key: "renderError",
|
|
9293
|
-
value: function renderError() {
|
|
9294
|
-
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
9295
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9296
|
-
className: 'fieldLabel fieldLabel-warning'
|
|
9297
|
-
}, this.props.errorMessage ? this.props.errorMessage : 'Required');
|
|
9298
|
-
}
|
|
9447
|
+
function OptionsSection() {
|
|
9448
|
+
_classCallCheck(this, OptionsSection);
|
|
9299
9449
|
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
}, {
|
|
9303
|
-
key: "renderHelp",
|
|
9304
|
-
value: function renderHelp() {
|
|
9305
|
-
if (!_.isUndefined(this.props.help)) {
|
|
9306
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9307
|
-
className: "genericInput-help"
|
|
9308
|
-
}, this.props.help);
|
|
9309
|
-
}
|
|
9450
|
+
return _super.apply(this, arguments);
|
|
9451
|
+
}
|
|
9310
9452
|
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
value: function open() {
|
|
9316
|
-
if (this.props.disabled) {
|
|
9317
|
-
return;
|
|
9318
|
-
}
|
|
9453
|
+
_createClass(OptionsSection, [{
|
|
9454
|
+
key: "getTitle",
|
|
9455
|
+
value: function getTitle() {
|
|
9456
|
+
var _this = this;
|
|
9319
9457
|
|
|
9320
|
-
this.
|
|
9321
|
-
|
|
9458
|
+
var selectedOption = _.find(this.props.options, function (o) {
|
|
9459
|
+
return _this.props.selected === o.key;
|
|
9322
9460
|
});
|
|
9323
|
-
}
|
|
9324
|
-
}, {
|
|
9325
|
-
key: "renderOption",
|
|
9326
|
-
value: function renderOption() {
|
|
9327
|
-
var _this2 = this;
|
|
9328
9461
|
|
|
9329
|
-
if (!
|
|
9330
|
-
return
|
|
9462
|
+
if (!selectedOption) {
|
|
9463
|
+
return '';
|
|
9331
9464
|
}
|
|
9332
9465
|
|
|
9333
|
-
return
|
|
9334
|
-
style: styles.dropdownItemsWrapper
|
|
9335
|
-
}, _.values(this.props.options).map(function (cat) {
|
|
9336
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
9337
|
-
key: cat.Key,
|
|
9338
|
-
className: "subtleHover fontRegular fontSize-16 text-dark",
|
|
9339
|
-
style: styles.dropDownOption,
|
|
9340
|
-
onClick: function onClick() {
|
|
9341
|
-
_this2.props.onSelect(cat.Key);
|
|
9342
|
-
}
|
|
9343
|
-
}, cat.Title);
|
|
9344
|
-
}));
|
|
9466
|
+
return selectedOption.text;
|
|
9345
9467
|
}
|
|
9346
9468
|
}, {
|
|
9347
|
-
key: "
|
|
9348
|
-
value: function
|
|
9349
|
-
|
|
9350
|
-
return 'dropdownInput-bottomBorder--disabled';
|
|
9351
|
-
}
|
|
9352
|
-
|
|
9353
|
-
if (!_.isUndefined(this.props.showError) && this.props.showError()) {
|
|
9354
|
-
return 'dropdownInput-bottomBorder--error';
|
|
9355
|
-
}
|
|
9469
|
+
key: "renderOptionButton",
|
|
9470
|
+
value: function renderOptionButton(o) {
|
|
9471
|
+
var _this2 = this;
|
|
9356
9472
|
|
|
9357
|
-
|
|
9358
|
-
}
|
|
9359
|
-
}, {
|
|
9360
|
-
key: "renderInput",
|
|
9361
|
-
value: function renderInput() {
|
|
9473
|
+
var isSelected = this.props.selected === o.key;
|
|
9362
9474
|
return /*#__PURE__*/React.createElement("div", {
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
style: _objectSpread$1({}, this.props.inputStyle),
|
|
9378
|
-
disabled: true,
|
|
9379
|
-
autoComplete: "false"
|
|
9380
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
9381
|
-
style: styles.chevronWrapper
|
|
9382
|
-
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
9383
|
-
style: _objectSpread$1(_objectSpread$1({}, styles.chevron), {}, {
|
|
9384
|
-
color: !_.isUndefined(this.props.disabled) && this.props.disabled ? 'transparent' : INACTIVE_TEXT
|
|
9385
|
-
}),
|
|
9386
|
-
name: this.state.open ? 'chevron-up' : 'chevron-down'
|
|
9387
|
-
})), this.renderOption()));
|
|
9475
|
+
className: "optionsButton".concat(isSelected ? ' optionsButton-selected' : ''),
|
|
9476
|
+
key: o.key,
|
|
9477
|
+
onClick: function onClick() {
|
|
9478
|
+
_this2.props.selectOption(o.key);
|
|
9479
|
+
}
|
|
9480
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9481
|
+
className: "optionsButton_iconContainer"
|
|
9482
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
9483
|
+
icon: o.icon,
|
|
9484
|
+
colour: isSelected ? '#fff' : COLOUR_BRANDING_MAIN
|
|
9485
|
+
})), /*#__PURE__*/React.createElement(Text, {
|
|
9486
|
+
type: "formLabelSmall",
|
|
9487
|
+
className: "optionsButton_text"
|
|
9488
|
+
}, o.text));
|
|
9388
9489
|
}
|
|
9389
9490
|
}, {
|
|
9390
9491
|
key: "render",
|
|
9391
9492
|
value: function render() {
|
|
9493
|
+
var _this3 = this;
|
|
9494
|
+
|
|
9392
9495
|
return /*#__PURE__*/React.createElement("div", {
|
|
9393
|
-
|
|
9394
|
-
className: "dropdownInput ".concat(this.getClassNames()),
|
|
9395
|
-
style: _objectSpread$1({
|
|
9396
|
-
marginBottom: 16,
|
|
9397
|
-
position: 'relative'
|
|
9398
|
-
}, this.props.style)
|
|
9496
|
+
className: "optionsSection".concat(this.props.overflowButtons ? ' optionsSection-overflowButtons' : '')
|
|
9399
9497
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
className: "
|
|
9406
|
-
|
|
9407
|
-
|
|
9498
|
+
className: "optionsSection_banner"
|
|
9499
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9500
|
+
className: "optionsSection_banner_top"
|
|
9501
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
9502
|
+
type: "formTitleMedium",
|
|
9503
|
+
className: "optionsSection_banner_top_title"
|
|
9504
|
+
}, "More Options")), /*#__PURE__*/React.createElement("div", {
|
|
9505
|
+
className: "optionsSection_banner_buttonSection"
|
|
9506
|
+
}, this.props.options.map(function (o) {
|
|
9507
|
+
return _this3.renderOptionButton(o);
|
|
9508
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
9509
|
+
className: "optionsContent"
|
|
9510
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9511
|
+
className: "optionsContent_box"
|
|
9512
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
9513
|
+
className: "optionsContent_box_top"
|
|
9514
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
9515
|
+
type: "formTitleSmall"
|
|
9516
|
+
}, this.getTitle())), this.props.children)));
|
|
9408
9517
|
}
|
|
9409
9518
|
}]);
|
|
9410
9519
|
|
|
9411
|
-
return
|
|
9520
|
+
return OptionsSection;
|
|
9412
9521
|
}(Component);
|
|
9413
9522
|
|
|
9414
|
-
var styles = {
|
|
9415
|
-
row: {
|
|
9416
|
-
display: 'flex',
|
|
9417
|
-
flexDirection: 'row',
|
|
9418
|
-
alignItems: 'center'
|
|
9419
|
-
},
|
|
9420
|
-
chevronWrapper: {
|
|
9421
|
-
display: 'flex',
|
|
9422
|
-
flexDirection: 'column',
|
|
9423
|
-
justifyContent: 'center'
|
|
9424
|
-
},
|
|
9425
|
-
chevron: {
|
|
9426
|
-
fontSize: 12,
|
|
9427
|
-
paddingBottom: 4
|
|
9428
|
-
},
|
|
9429
|
-
dropdownItemsWrapper: {
|
|
9430
|
-
backgroundColor: '#fff',
|
|
9431
|
-
position: 'absolute',
|
|
9432
|
-
width: '100%',
|
|
9433
|
-
top: 35,
|
|
9434
|
-
boxShadow: '2px 2px 10px rgba(106, 163, 216, 0.7)',
|
|
9435
|
-
zIndex: 90,
|
|
9436
|
-
borderRadius: 4,
|
|
9437
|
-
paddingTop: 4,
|
|
9438
|
-
paddingBottom: 4
|
|
9439
|
-
},
|
|
9440
|
-
dropDownOption: {
|
|
9441
|
-
padding: '4px 16px'
|
|
9442
|
-
}
|
|
9443
|
-
};
|
|
9444
|
-
|
|
9445
9523
|
function ownKeys(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; }
|
|
9446
9524
|
|
|
9447
9525
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -9775,6 +9853,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
9775
9853
|
Attachment: Attachment,
|
|
9776
9854
|
Button: Button,
|
|
9777
9855
|
CheckBox: CheckBox,
|
|
9856
|
+
DatePicker: DatePicker,
|
|
9778
9857
|
FileInput: FileInput,
|
|
9779
9858
|
GenericInput: GenericInput,
|
|
9780
9859
|
Header: exportObj$2,
|
|
@@ -9786,15 +9865,15 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
9786
9865
|
OverlayPageBottomButtons: OverlayPageBottomButtons,
|
|
9787
9866
|
PageTitle: PageTitle,
|
|
9788
9867
|
Popup: Popup,
|
|
9868
|
+
P60Icon: P60Icon,
|
|
9789
9869
|
ProfilePic: ProfilePic,
|
|
9790
9870
|
RadioButton: RadioButton,
|
|
9791
9871
|
SVGIcon: SVGIcon,
|
|
9792
9872
|
Tag: Tag,
|
|
9793
9873
|
Text: Text,
|
|
9874
|
+
StatusButton: StatusButton,
|
|
9794
9875
|
SuccessPopup: SuccessPopup,
|
|
9795
9876
|
Reactions: Reactions,
|
|
9796
|
-
P60Icon: P60Icon,
|
|
9797
|
-
DatePicker: DatePicker,
|
|
9798
9877
|
AnalyticsFilter: AnalyticsFilter,
|
|
9799
9878
|
UserListing: UserListing,
|
|
9800
9879
|
TimePicker: TimePicker,
|