@plusscommunities/pluss-circles-web 1.0.9 → 1.0.12
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 +198 -707
- package/dist/index.esm.js +197 -706
- package/dist/index.umd.js +201 -710
- package/package.json +10 -4
- package/src/actions/types.js +5 -3
- package/src/apis/circleActions.js +15 -12
- package/src/feature.config.js +33 -18
- package/src/index.js +3 -2
- package/src/screens/AddCircle.js +66 -10
- package/src/screens/Circle.js +9 -9
- package/src/screens/Circles.js +19 -12
- package/src/values.config.default.js +35 -0
- package/src/values.config.groups.js +35 -0
- package/src/values.config.js +35 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
1
2
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
2
3
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
3
4
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
@@ -5,7 +6,6 @@ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized
|
|
|
5
6
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
6
7
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
7
8
|
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
8
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
9
9
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
10
10
|
import React, { Component } from 'react';
|
|
11
11
|
import { connect } from 'react-redux';
|
|
@@ -18,46 +18,85 @@ import FontAwesome from 'react-fontawesome';
|
|
|
18
18
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
19
19
|
import { withRouter } from 'react-router';
|
|
20
20
|
|
|
21
|
+
var values = {
|
|
22
|
+
featureKey: 'circles',
|
|
23
|
+
entityKey: 'circle',
|
|
24
|
+
entityName: 'circle',
|
|
25
|
+
serviceKey: 'circles',
|
|
26
|
+
permission: 'circles',
|
|
27
|
+
menuIcon: 'circle-o',
|
|
28
|
+
isFontAwesome: true,
|
|
29
|
+
reducerKey: 'circles',
|
|
30
|
+
actionCircleKey: 'CIRCLE',
|
|
31
|
+
textFeatureTitle: 'Circles',
|
|
32
|
+
textAddMenuTitle: 'Circle',
|
|
33
|
+
textEmptyGroups: "You aren't in any Circles",
|
|
34
|
+
textEmptyPeople: 'Contacts will show here',
|
|
35
|
+
componentCircles: 'Circles',
|
|
36
|
+
componentAddCircle: 'AddCircle',
|
|
37
|
+
componentCircle: 'Circle',
|
|
38
|
+
inviteKey: 'circleInvite',
|
|
39
|
+
messageKey: 'circleMessage',
|
|
40
|
+
chatRoute: 'circleChat',
|
|
41
|
+
updateKeyUserCircles: 'userCircles',
|
|
42
|
+
allowPublicKey: 'circleAllowPublicCircles',
|
|
43
|
+
allowPublicKeyDefault: false,
|
|
44
|
+
settings: {
|
|
45
|
+
allowAnyCreate: false
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
21
49
|
// import * as PlussCore from '../../pluss-core/src';
|
|
22
50
|
var FeatureConfig = {
|
|
23
|
-
key:
|
|
24
|
-
singularName:
|
|
25
|
-
description:
|
|
26
|
-
emptyText: "You aren't in any
|
|
27
|
-
widgetOptions: [
|
|
51
|
+
key: values.featureKey,
|
|
52
|
+
singularName: _.capitalize(values.entityName),
|
|
53
|
+
description: "App users can create ".concat(values.entityName, "s and message each other."),
|
|
54
|
+
emptyText: "You aren't in any ".concat(_.capitalize(values.entityName), "s"),
|
|
55
|
+
widgetOptions: [{
|
|
56
|
+
widget: true,
|
|
57
|
+
main: true,
|
|
58
|
+
hideOnTabNumbers: [],
|
|
59
|
+
optionKey: values.allowPublicKey,
|
|
60
|
+
type: 'toggle',
|
|
61
|
+
inverseOption: false,
|
|
62
|
+
title: "Allow for public ".concat(values.entityName, "s"),
|
|
63
|
+
description: "Public ".concat(values.entityName, "s can be viewed and joined by anyone in the community."),
|
|
64
|
+
defaultNew: values.allowPublicKeyDefault,
|
|
65
|
+
default: values.allowPublicKeyDefault
|
|
66
|
+
}],
|
|
28
67
|
menu: {
|
|
29
68
|
order: 11,
|
|
30
|
-
text:
|
|
31
|
-
icon:
|
|
32
|
-
isFontAwesome:
|
|
33
|
-
url:
|
|
69
|
+
text: values.textFeatureTitle,
|
|
70
|
+
icon: values.menuIcon,
|
|
71
|
+
isFontAwesome: values.isFontAwesome,
|
|
72
|
+
url: "/".concat(values.featureKey),
|
|
34
73
|
countProps: null,
|
|
35
74
|
visibleExps: {
|
|
36
75
|
type: 'feature',
|
|
37
|
-
value:
|
|
76
|
+
value: values.featureKey
|
|
38
77
|
}
|
|
39
78
|
},
|
|
40
|
-
addUrl:
|
|
41
|
-
addPermission:
|
|
79
|
+
addUrl: "/".concat(values.featureKey, "/add"),
|
|
80
|
+
addPermission: values.permission,
|
|
42
81
|
permissions: [{
|
|
43
|
-
displayName:
|
|
44
|
-
key:
|
|
82
|
+
displayName: "Manage and View ".concat(_.capitalize(values.entityName), "s"),
|
|
83
|
+
key: values.permission
|
|
45
84
|
}],
|
|
46
85
|
routes: [{
|
|
47
|
-
path:
|
|
48
|
-
component:
|
|
86
|
+
path: "/".concat(values.featureKey),
|
|
87
|
+
component: values.componentCircles,
|
|
49
88
|
exact: false
|
|
50
89
|
}, {
|
|
51
|
-
path:
|
|
52
|
-
component:
|
|
90
|
+
path: "/".concat(values.featureKey, "/add"),
|
|
91
|
+
component: values.componentAddCircle,
|
|
53
92
|
exact: true
|
|
54
93
|
}, {
|
|
55
|
-
path:
|
|
56
|
-
component:
|
|
94
|
+
path: "/".concat(values.featureKey, "/").concat(values.entityKey, "/:circleId"),
|
|
95
|
+
component: values.componentCircle,
|
|
57
96
|
exact: true
|
|
58
97
|
}, {
|
|
59
|
-
path:
|
|
60
|
-
component:
|
|
98
|
+
path: "/".concat(values.featureKey, "/edit/:circleId"),
|
|
99
|
+
component: values.componentAddCircle,
|
|
61
100
|
exact: true
|
|
62
101
|
}],
|
|
63
102
|
env: {
|
|
@@ -83,9 +122,9 @@ var FeatureConfig = {
|
|
|
83
122
|
}
|
|
84
123
|
};
|
|
85
124
|
|
|
86
|
-
var CIRCLES_LOADED =
|
|
87
|
-
var CIRCLE_UPDATED =
|
|
88
|
-
var CIRCLE_REMOVED =
|
|
125
|
+
var CIRCLES_LOADED = "".concat(values.actionCircleKey, "S_LOADED");
|
|
126
|
+
var CIRCLE_UPDATED = "".concat(values.actionCircleKey, "_UPDATED");
|
|
127
|
+
var CIRCLE_REMOVED = "".concat(values.actionCircleKey, "_REMOVED");
|
|
89
128
|
|
|
90
129
|
var circlesLoaded = function circlesLoaded(circles) {
|
|
91
130
|
return {
|
|
@@ -112,7 +151,7 @@ var circleActions = {
|
|
|
112
151
|
getAll: function getAll(site) {
|
|
113
152
|
return Session$3.authedFunction({
|
|
114
153
|
method: 'GET',
|
|
115
|
-
url: Helper$3.getUrl(
|
|
154
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/all', {
|
|
116
155
|
site: site
|
|
117
156
|
})
|
|
118
157
|
});
|
|
@@ -120,7 +159,7 @@ var circleActions = {
|
|
|
120
159
|
getFiles: function getFiles(circleId) {
|
|
121
160
|
return Session$3.authedFunction({
|
|
122
161
|
method: 'GET',
|
|
123
|
-
url: Helper$3.getUrl(
|
|
162
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/files', {
|
|
124
163
|
circleId: circleId
|
|
125
164
|
})
|
|
126
165
|
});
|
|
@@ -128,39 +167,41 @@ var circleActions = {
|
|
|
128
167
|
getImages: function getImages(circleId) {
|
|
129
168
|
return Session$3.authedFunction({
|
|
130
169
|
method: 'GET',
|
|
131
|
-
url: Helper$3.getUrl(
|
|
170
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/images', {
|
|
132
171
|
circleId: circleId
|
|
133
172
|
})
|
|
134
173
|
});
|
|
135
174
|
},
|
|
136
|
-
add: function add(site, title, image, audience) {
|
|
175
|
+
add: function add(site, title, image, audience, isPublic) {
|
|
137
176
|
return Session$3.authedFunction({
|
|
138
177
|
method: 'POST',
|
|
139
|
-
url: Helper$3.getUrl(
|
|
178
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/add'),
|
|
140
179
|
data: {
|
|
141
180
|
site: site,
|
|
142
181
|
title: title,
|
|
143
182
|
image: image,
|
|
144
|
-
audience: audience
|
|
183
|
+
audience: audience,
|
|
184
|
+
isPublic: isPublic
|
|
145
185
|
}
|
|
146
186
|
});
|
|
147
187
|
},
|
|
148
|
-
edit: function edit(circleId, title, image, audience) {
|
|
188
|
+
edit: function edit(circleId, title, image, audience, isPublic) {
|
|
149
189
|
return Session$3.authedFunction({
|
|
150
190
|
method: 'POST',
|
|
151
|
-
url: Helper$3.getUrl(
|
|
191
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/edit'),
|
|
152
192
|
data: {
|
|
153
193
|
circleId: circleId,
|
|
154
194
|
title: title,
|
|
155
195
|
image: image,
|
|
156
|
-
audience: audience
|
|
196
|
+
audience: audience,
|
|
197
|
+
isPublic: isPublic
|
|
157
198
|
}
|
|
158
199
|
});
|
|
159
200
|
},
|
|
160
201
|
delete: function _delete(circleId) {
|
|
161
202
|
return Session$3.authedFunction({
|
|
162
203
|
method: 'POST',
|
|
163
|
-
url: Helper$3.getUrl(
|
|
204
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/delete'),
|
|
164
205
|
data: {
|
|
165
206
|
circleId: circleId
|
|
166
207
|
}
|
|
@@ -169,7 +210,7 @@ var circleActions = {
|
|
|
169
210
|
addAdmin: function addAdmin(circleId, userId) {
|
|
170
211
|
return Session$3.authedFunction({
|
|
171
212
|
method: 'POST',
|
|
172
|
-
url: Helper$3.getUrl(
|
|
213
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/addadmin'),
|
|
173
214
|
data: {
|
|
174
215
|
circleId: circleId,
|
|
175
216
|
userId: userId
|
|
@@ -179,7 +220,7 @@ var circleActions = {
|
|
|
179
220
|
removeAdmin: function removeAdmin(circleId, userId) {
|
|
180
221
|
return Session$3.authedFunction({
|
|
181
222
|
method: 'POST',
|
|
182
|
-
url: Helper$3.getUrl(
|
|
223
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/removeadmin'),
|
|
183
224
|
data: {
|
|
184
225
|
circleId: circleId,
|
|
185
226
|
userId: userId
|
|
@@ -211,7 +252,7 @@ var circleActions = {
|
|
|
211
252
|
|
|
212
253
|
return _context.abrupt("return", Session$3.authedFunction({
|
|
213
254
|
method: 'GET',
|
|
214
|
-
url: Helper$3.getUrl(
|
|
255
|
+
url: Helper$3.getUrl(values.serviceKey, 'getMessages', query)
|
|
215
256
|
}));
|
|
216
257
|
|
|
217
258
|
case 5:
|
|
@@ -236,7 +277,7 @@ var circleActions = {
|
|
|
236
277
|
case 0:
|
|
237
278
|
return _context2.abrupt("return", Session$3.authedFunction({
|
|
238
279
|
method: 'post',
|
|
239
|
-
url: Helper$3.getUrl(
|
|
280
|
+
url: Helper$3.getUrl(values.serviceKey, 'sendMessage'),
|
|
240
281
|
data: {
|
|
241
282
|
groupId: circleId,
|
|
242
283
|
message: message
|
|
@@ -326,14 +367,14 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
326
367
|
|
|
327
368
|
_defineProperty(_assertThisInitialized(_this), "canAddNew", function () {
|
|
328
369
|
var auth = _this.props.auth;
|
|
329
|
-
return Session$2.validateAccess(auth.site,
|
|
370
|
+
return Session$2.validateAccess(auth.site, values.permission, auth);
|
|
330
371
|
});
|
|
331
372
|
|
|
332
373
|
_defineProperty(_assertThisInitialized(_this), "onAddNew", function () {
|
|
333
374
|
var auth = _this.props.auth;
|
|
334
375
|
|
|
335
|
-
if (Session$2.validateAccess(auth.site,
|
|
336
|
-
_this.props.history.push("/
|
|
376
|
+
if (Session$2.validateAccess(auth.site, values.permission, auth)) {
|
|
377
|
+
_this.props.history.push("/".concat(values.featureKey, "/add"));
|
|
337
378
|
}
|
|
338
379
|
});
|
|
339
380
|
|
|
@@ -399,7 +440,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
399
440
|
});
|
|
400
441
|
|
|
401
442
|
_defineProperty(_assertThisInitialized(_this), "removeCircle", function (circle) {
|
|
402
|
-
if (window.confirm("Are you sure you want to delete that
|
|
443
|
+
if (window.confirm("Are you sure you want to delete that ".concat(values.entityName, "? You will no longer be able to access the messages in the ").concat(values.entityName, "."))) {
|
|
403
444
|
_this.props.circleRemoved(circle.Id);
|
|
404
445
|
|
|
405
446
|
circleActions.delete(circle.Id).then(function (res) {
|
|
@@ -415,7 +456,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
415
456
|
return 'Private Message';
|
|
416
457
|
}
|
|
417
458
|
|
|
418
|
-
return
|
|
459
|
+
return _.capitalize(values.entityName);
|
|
419
460
|
});
|
|
420
461
|
|
|
421
462
|
_defineProperty(_assertThisInitialized(_this), "getTitle", function (circle) {
|
|
@@ -489,7 +530,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
489
530
|
value: function validateCircleAdmin(circle, onlyCreator) {
|
|
490
531
|
var _this4 = this;
|
|
491
532
|
|
|
492
|
-
if (Session$2.validateAccess(this.props.auth.site,
|
|
533
|
+
if (Session$2.validateAccess(this.props.auth.site, values.permission, this.props.auth)) {
|
|
493
534
|
return true;
|
|
494
535
|
}
|
|
495
536
|
|
|
@@ -511,7 +552,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
511
552
|
}, /*#__PURE__*/React.createElement("td", {
|
|
512
553
|
className: "table-TitleColumn"
|
|
513
554
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
514
|
-
to: "/
|
|
555
|
+
to: "/".concat(values.featureKey, "/").concat(values.entityKey, "/").concat(circle.Id)
|
|
515
556
|
}, this.getTitle(circle))), /*#__PURE__*/React.createElement("td", null, moment(circle.Changed).local().format('D MMM YYYY')), /*#__PURE__*/React.createElement("td", null, circle.Audience.map(function (user) {
|
|
516
557
|
return /*#__PURE__*/React.createElement(Components$2.ProfilePic, {
|
|
517
558
|
size: 30,
|
|
@@ -527,7 +568,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
527
568
|
alignItems: 'center'
|
|
528
569
|
}
|
|
529
570
|
}, this.validateCircleAdmin(circle) && !circle.IsPrivate && /*#__PURE__*/React.createElement(Link, {
|
|
530
|
-
to: "/
|
|
571
|
+
to: "/".concat(values.featureKey, "/edit/").concat(circle.Id)
|
|
531
572
|
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
532
573
|
style: {
|
|
533
574
|
fontSize: 20,
|
|
@@ -649,7 +690,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
649
690
|
onClick: function onClick() {
|
|
650
691
|
_this7.selectTypeFilter('circle');
|
|
651
692
|
},
|
|
652
|
-
text:
|
|
693
|
+
text: _.capitalize(values.entityName),
|
|
653
694
|
className: "marginRight-10"
|
|
654
695
|
}), /*#__PURE__*/React.createElement(Components$2.Tag, {
|
|
655
696
|
onClick: function onClick() {
|
|
@@ -665,13 +706,13 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
665
706
|
|
|
666
707
|
return /*#__PURE__*/React.createElement("div", null, this.renderTypeFilterPopup(), this.renderUserFilterPopup(), /*#__PURE__*/React.createElement(Components$2.Header, null, this.canAddNew() && /*#__PURE__*/React.createElement(Components$2.AddButton, {
|
|
667
708
|
onClick: this.onAddNew,
|
|
668
|
-
text: "NEW
|
|
709
|
+
text: "NEW ".concat(_.upperCase(values.entityName))
|
|
669
710
|
})), /*#__PURE__*/React.createElement("div", {
|
|
670
711
|
className: "pageContainer paddingVertical-20 paddingHorizontal-40"
|
|
671
712
|
}, /*#__PURE__*/React.createElement(Components$2.Text, {
|
|
672
713
|
type: "h1",
|
|
673
714
|
className: ""
|
|
674
|
-
},
|
|
715
|
+
}, values.textFeatureTitle), this.renderFilters(), /*#__PURE__*/React.createElement(Table, {
|
|
675
716
|
className: "plussTable",
|
|
676
717
|
striped: true,
|
|
677
718
|
bordered: true,
|
|
@@ -696,7 +737,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
696
737
|
}(Component);
|
|
697
738
|
|
|
698
739
|
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
699
|
-
var circles = state.
|
|
740
|
+
var circles = state[values.reducerKey].circles;
|
|
700
741
|
var auth = state.auth;
|
|
701
742
|
return {
|
|
702
743
|
circles: circles,
|
|
@@ -783,6 +824,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
783
824
|
});
|
|
784
825
|
var newState = {
|
|
785
826
|
title: circle.Title,
|
|
827
|
+
isPublic: !!circle.IsPublic,
|
|
786
828
|
selectedUsers: selectedUsers
|
|
787
829
|
};
|
|
788
830
|
|
|
@@ -913,7 +955,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
913
955
|
});
|
|
914
956
|
|
|
915
957
|
if (_this.state.circleId) {
|
|
916
|
-
circleActions.edit(_this.state.circleId, _this.state.title, _this.state.image, audience).then(function (res) {
|
|
958
|
+
circleActions.edit(_this.state.circleId, _this.state.title, _this.state.image, audience, _this.state.isPublic).then(function (res) {
|
|
917
959
|
_this.setState({
|
|
918
960
|
success: true,
|
|
919
961
|
updating: false
|
|
@@ -932,7 +974,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
932
974
|
alert('Something went wrong with the request. Please try again.');
|
|
933
975
|
});
|
|
934
976
|
} else {
|
|
935
|
-
circleActions.add(_this.props.auth.site, _this.state.title, _this.state.image, audience).then(function (res) {
|
|
977
|
+
circleActions.add(_this.props.auth.site, _this.state.title, _this.state.image, audience, _this.state.isPublic).then(function (res) {
|
|
936
978
|
_this.setState({
|
|
937
979
|
success: true,
|
|
938
980
|
updating: false
|
|
@@ -980,7 +1022,9 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
980
1022
|
success: false,
|
|
981
1023
|
users: [],
|
|
982
1024
|
selectedUsers: [],
|
|
983
|
-
userSearch: ''
|
|
1025
|
+
userSearch: '',
|
|
1026
|
+
isPublic: false,
|
|
1027
|
+
selectedOption: 'visibility'
|
|
984
1028
|
};
|
|
985
1029
|
return _this;
|
|
986
1030
|
}
|
|
@@ -989,7 +1033,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
989
1033
|
key: "componentDidMount",
|
|
990
1034
|
value: function componentDidMount() {
|
|
991
1035
|
Session$1.checkLoggedIn(this, this.props.auth);
|
|
992
|
-
this.props.addRecentlyCreated(
|
|
1036
|
+
this.props.addRecentlyCreated(values.entityKey);
|
|
993
1037
|
this.getUsers();
|
|
994
1038
|
this.checkGetCircle();
|
|
995
1039
|
}
|
|
@@ -1035,13 +1079,13 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1035
1079
|
value: function renderSuccess() {
|
|
1036
1080
|
if (!this.state.success) return null;
|
|
1037
1081
|
return /*#__PURE__*/React.createElement(Components$1.SuccessPopup, {
|
|
1038
|
-
text: "
|
|
1082
|
+
text: "".concat(_.capitalize(values.entityName), " has been ").concat(this.state.circleId == null ? 'added' : 'edited'),
|
|
1039
1083
|
buttons: [{
|
|
1040
1084
|
type: 'outlined',
|
|
1041
1085
|
onClick: function onClick() {
|
|
1042
1086
|
window.history.back();
|
|
1043
1087
|
},
|
|
1044
|
-
text: "Back to
|
|
1088
|
+
text: "Back to ".concat(values.textFeatureTitle)
|
|
1045
1089
|
}]
|
|
1046
1090
|
});
|
|
1047
1091
|
}
|
|
@@ -1060,7 +1104,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1060
1104
|
inline: true,
|
|
1061
1105
|
buttonType: "tertiary",
|
|
1062
1106
|
onClick: function onClick() {
|
|
1063
|
-
return _this4.props.history.push(
|
|
1107
|
+
return _this4.props.history.push("/".concat(values.featureKey));
|
|
1064
1108
|
},
|
|
1065
1109
|
isActive: true,
|
|
1066
1110
|
style: {
|
|
@@ -1074,24 +1118,88 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1074
1118
|
}, "Save"));
|
|
1075
1119
|
}
|
|
1076
1120
|
}, {
|
|
1077
|
-
key: "
|
|
1078
|
-
value: function
|
|
1121
|
+
key: "renderVisibility",
|
|
1122
|
+
value: function renderVisibility() {
|
|
1079
1123
|
var _this5 = this;
|
|
1080
1124
|
|
|
1081
1125
|
return /*#__PURE__*/React.createElement("div", {
|
|
1126
|
+
className: "optionsContent_bottom"
|
|
1127
|
+
}, /*#__PURE__*/React.createElement(Components$1.RadioButton, {
|
|
1128
|
+
label: "Do you want to make this ".concat(values.entityName, " a public ").concat(values.entityName, "?"),
|
|
1129
|
+
isActive: this.state.isPublic,
|
|
1130
|
+
options: [{
|
|
1131
|
+
Label: 'Yes',
|
|
1132
|
+
Value: true,
|
|
1133
|
+
onChange: function onChange() {
|
|
1134
|
+
return _this5.setState({
|
|
1135
|
+
isPublic: true
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
}, {
|
|
1139
|
+
Label: 'No',
|
|
1140
|
+
Value: false,
|
|
1141
|
+
onChange: function onChange() {
|
|
1142
|
+
return _this5.setState({
|
|
1143
|
+
isPublic: false
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
}]
|
|
1147
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1148
|
+
className: "genericInput-help",
|
|
1082
1149
|
style: {
|
|
1083
|
-
|
|
1150
|
+
marginTop: 4
|
|
1084
1151
|
}
|
|
1085
|
-
},
|
|
1152
|
+
}, "This will allow anyone in the community to view and join the ".concat(values.entityName, ".")));
|
|
1153
|
+
}
|
|
1154
|
+
}, {
|
|
1155
|
+
key: "renderSelectedOption",
|
|
1156
|
+
value: function renderSelectedOption() {
|
|
1157
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1158
|
+
style: {
|
|
1159
|
+
display: this.state.selectedOption === 'visibility' ? 'block' : 'none'
|
|
1160
|
+
}
|
|
1161
|
+
}, this.renderVisibility()));
|
|
1162
|
+
}
|
|
1163
|
+
}, {
|
|
1164
|
+
key: "renderOptionsSection",
|
|
1165
|
+
value: function renderOptionsSection() {
|
|
1166
|
+
var options = [{
|
|
1167
|
+
key: 'visibility',
|
|
1168
|
+
icon: 'people3',
|
|
1169
|
+
text: 'Visibility'
|
|
1170
|
+
}];
|
|
1171
|
+
|
|
1172
|
+
if (!this.props.circleAllowPublicCircles) {
|
|
1173
|
+
options = _.filter(options, function (o) {
|
|
1174
|
+
return o.key !== 'visibility';
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
if (_.isEmpty(options)) {
|
|
1179
|
+
return null;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
return /*#__PURE__*/React.createElement(Components$1.OptionsSection, {
|
|
1183
|
+
options: options,
|
|
1184
|
+
selected: this.state.selectedOption,
|
|
1185
|
+
selectOption: this.selectOption
|
|
1186
|
+
}, this.renderSelectedOption());
|
|
1187
|
+
}
|
|
1188
|
+
}, {
|
|
1189
|
+
key: "renderMain",
|
|
1190
|
+
value: function renderMain() {
|
|
1191
|
+
var _this6 = this;
|
|
1192
|
+
|
|
1193
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1086
1194
|
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
1087
1195
|
}, /*#__PURE__*/React.createElement(Components$1.Text, {
|
|
1088
1196
|
type: "formTitleLarge",
|
|
1089
1197
|
className: "marginBottom-24"
|
|
1090
|
-
}, this.state.circleId == null ? 'New' : 'Edit', "
|
|
1198
|
+
}, this.state.circleId == null ? 'New' : 'Edit', " ", _.capitalize(values.entityName)), /*#__PURE__*/React.createElement("div", {
|
|
1091
1199
|
className: "flex flex-reverse"
|
|
1092
1200
|
}, /*#__PURE__*/React.createElement(Components$1.ImageInput, {
|
|
1093
1201
|
ref: function ref(_ref2) {
|
|
1094
|
-
|
|
1202
|
+
_this6.imageInput = _ref2;
|
|
1095
1203
|
},
|
|
1096
1204
|
label: "IMAGE",
|
|
1097
1205
|
limit: 1,
|
|
@@ -1105,18 +1213,18 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1105
1213
|
id: "title",
|
|
1106
1214
|
type: "text",
|
|
1107
1215
|
label: "Title",
|
|
1108
|
-
placeholder: "Name the
|
|
1216
|
+
placeholder: "Name the ".concat(_.capitalize(values.entityName)),
|
|
1109
1217
|
value: this.state.title,
|
|
1110
1218
|
onChange: function onChange(e) {
|
|
1111
|
-
return
|
|
1219
|
+
return _this6.onHandleChange(e);
|
|
1112
1220
|
},
|
|
1113
1221
|
isRequired: true,
|
|
1114
1222
|
alwaysShowLabel: true,
|
|
1115
1223
|
isValid: function isValid() {
|
|
1116
|
-
return !_.isEmpty(
|
|
1224
|
+
return !_.isEmpty(_this6.state.title);
|
|
1117
1225
|
},
|
|
1118
1226
|
showError: function showError() {
|
|
1119
|
-
return
|
|
1227
|
+
return _this6.state.showWarnings && _.isEmpty(_this6.state.title);
|
|
1120
1228
|
}
|
|
1121
1229
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
1122
1230
|
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
@@ -1136,7 +1244,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1136
1244
|
placeholder: "Enter name",
|
|
1137
1245
|
value: this.state.userSearch,
|
|
1138
1246
|
onChange: function onChange(e) {
|
|
1139
|
-
return
|
|
1247
|
+
return _this6.onHandleChange(e);
|
|
1140
1248
|
},
|
|
1141
1249
|
alwaysShowLabel: true
|
|
1142
1250
|
}), this.getShownUsers().map(function (user) {
|
|
@@ -1144,7 +1252,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1144
1252
|
key: user.userId,
|
|
1145
1253
|
user: user,
|
|
1146
1254
|
onClick: function onClick() {
|
|
1147
|
-
|
|
1255
|
+
_this6.onSelectUser(user);
|
|
1148
1256
|
}
|
|
1149
1257
|
});
|
|
1150
1258
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1163,15 +1271,15 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1163
1271
|
icon: "close",
|
|
1164
1272
|
colour: Colours$1.COLOUR_DUSK,
|
|
1165
1273
|
onClick: function onClick() {
|
|
1166
|
-
|
|
1274
|
+
_this6.onSelectUser(user);
|
|
1167
1275
|
}
|
|
1168
1276
|
}), /*#__PURE__*/React.createElement(Components$1.StatusButton, {
|
|
1169
1277
|
isActive: user.isAdmin,
|
|
1170
1278
|
activate: function activate() {
|
|
1171
|
-
|
|
1279
|
+
_this6.addAdmin(user);
|
|
1172
1280
|
},
|
|
1173
1281
|
deactivate: function deactivate() {
|
|
1174
|
-
|
|
1282
|
+
_this6.removeAdmin(user);
|
|
1175
1283
|
},
|
|
1176
1284
|
activeText: "Admin",
|
|
1177
1285
|
activateText: "Make Admin",
|
|
@@ -1179,7 +1287,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1179
1287
|
inactiveText: "Not Admin"
|
|
1180
1288
|
}))
|
|
1181
1289
|
});
|
|
1182
|
-
})))));
|
|
1290
|
+
})))), this.renderOptionsSection());
|
|
1183
1291
|
}
|
|
1184
1292
|
}, {
|
|
1185
1293
|
key: "render",
|
|
@@ -1197,11 +1305,12 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1197
1305
|
}(Component);
|
|
1198
1306
|
|
|
1199
1307
|
var mapStateToProps$1 = function mapStateToProps(state) {
|
|
1200
|
-
var circles = state.
|
|
1308
|
+
var circles = state[values.reducerKey].circles;
|
|
1201
1309
|
var auth = state.auth;
|
|
1202
1310
|
return {
|
|
1203
1311
|
circles: circles,
|
|
1204
|
-
auth: auth
|
|
1312
|
+
auth: auth,
|
|
1313
|
+
circleAllowPublicCircles: Helper$1.getSiteSettingFromState(state, values.allowPublicKey)
|
|
1205
1314
|
};
|
|
1206
1315
|
};
|
|
1207
1316
|
|
|
@@ -1211,619 +1320,6 @@ var AddCircle$1 = connect(mapStateToProps$1, {
|
|
|
1211
1320
|
addRecentlyCreated: Actions$1.addRecentlyCreated
|
|
1212
1321
|
})(withRouter(AddCircle));
|
|
1213
1322
|
|
|
1214
|
-
var getFileName = function getFileName(url, noExtension) {
|
|
1215
|
-
if (!url) {
|
|
1216
|
-
return null;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
var fileSplit = url.split('/');
|
|
1220
|
-
var name = fileSplit[fileSplit.length - 1].toLowerCase();
|
|
1221
|
-
|
|
1222
|
-
if (!noExtension) {
|
|
1223
|
-
return name;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
return name.split('.')[0];
|
|
1227
|
-
};
|
|
1228
|
-
|
|
1229
|
-
var getPluralS = function getPluralS(count) {
|
|
1230
|
-
if (count === 1) {
|
|
1231
|
-
return '';
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
return 's';
|
|
1235
|
-
};
|
|
1236
|
-
// if (!count) {
|
|
1237
|
-
// return '0%';
|
|
1238
|
-
// }
|
|
1239
|
-
// if (!total) {
|
|
1240
|
-
// return '100%';
|
|
1241
|
-
// }
|
|
1242
|
-
// return `${Math.round((100 * count) / total)}%`;
|
|
1243
|
-
// };
|
|
1244
|
-
// export const getUserPreview = (user) => {
|
|
1245
|
-
// return {
|
|
1246
|
-
// displayName: user.displayName,
|
|
1247
|
-
// id: user.Id,
|
|
1248
|
-
// profilePic: user.profilePic || defaultProfileImage,
|
|
1249
|
-
// };
|
|
1250
|
-
// };
|
|
1251
|
-
// export const usersToPreviews = (users) => {
|
|
1252
|
-
// return _.map(users, getUserPreview);
|
|
1253
|
-
// };
|
|
1254
|
-
// export const getSiteNameFromRoles = (site, roles) => {
|
|
1255
|
-
// return getSiteName(
|
|
1256
|
-
// site,
|
|
1257
|
-
// roles.map((r) => {
|
|
1258
|
-
// return r.siteInfo;
|
|
1259
|
-
// }),
|
|
1260
|
-
// );
|
|
1261
|
-
// };
|
|
1262
|
-
// export const getSiteName = (site, sites) => {
|
|
1263
|
-
// if (site === 'hq') {
|
|
1264
|
-
// return 'HQ';
|
|
1265
|
-
// }
|
|
1266
|
-
// const siteObject = _.find(sites, (t) => {
|
|
1267
|
-
// return t.Id === site;
|
|
1268
|
-
// });
|
|
1269
|
-
// if (siteObject) {
|
|
1270
|
-
// return siteObject.siteName;
|
|
1271
|
-
// }
|
|
1272
|
-
// return site;
|
|
1273
|
-
// };
|
|
1274
|
-
// export const formatCurrency = (number, locale = 'en-AU', curencyCode = 'AUD', shouldFix = false) => {
|
|
1275
|
-
// const formatter = Intl.NumberFormat(locale, { style: 'currency', currency: curencyCode, minimumFractionDigits: 2 });
|
|
1276
|
-
// let formattedNumber = number;
|
|
1277
|
-
// if (shouldFix && formatter.format(formattedNumber).indexOf('NaN') > -1) {
|
|
1278
|
-
// formattedNumber = number.replace(/[^\d.-]/g, '');
|
|
1279
|
-
// }
|
|
1280
|
-
// return formatter.format(formattedNumber);
|
|
1281
|
-
// };
|
|
1282
|
-
// export const currencyToFloat = (number) => {
|
|
1283
|
-
// let result = parseFloat(number);
|
|
1284
|
-
// if (isNaN(result)) {
|
|
1285
|
-
// result = parseFloat(number.replace(/[^\d.-]/g, ''));
|
|
1286
|
-
// if (isNaN(result)) {
|
|
1287
|
-
// result = 0;
|
|
1288
|
-
// }
|
|
1289
|
-
// }
|
|
1290
|
-
// return result;
|
|
1291
|
-
// };
|
|
1292
|
-
// export const getCurrencySymbol = () => {
|
|
1293
|
-
// return formatCurrency(0).replace(/[0-9.]+/g, '');
|
|
1294
|
-
// };
|
|
1295
|
-
// export const isCurrency = (text) => {
|
|
1296
|
-
// if (!text) return false;
|
|
1297
|
-
// const price = parseFloat(typeof text === 'string' ? text.replace(getCurrencySymbol(), '') : text, 10);
|
|
1298
|
-
// return _.isNumber(price) && !Number.isNaN(price) ? price : false;
|
|
1299
|
-
// };
|
|
1300
|
-
// export const isPaidItem = (enabled, tickets) => {
|
|
1301
|
-
// // console.log('isPaidItem', enabled, tickets);
|
|
1302
|
-
// return (
|
|
1303
|
-
// enabled &&
|
|
1304
|
-
// tickets &&
|
|
1305
|
-
// tickets.merchant &&
|
|
1306
|
-
// tickets.categories &&
|
|
1307
|
-
// tickets.categories.length > 0 &&
|
|
1308
|
-
// tickets.categories.every((t) => !t.price || _.isNumber(t.price))
|
|
1309
|
-
// );
|
|
1310
|
-
// };
|
|
1311
|
-
// export const getTotalQuantity = (tickets) => _.sumBy(tickets, (t) => t.quantity || 0);
|
|
1312
|
-
// export const getTotalPrice = (tickets) => _.sumBy(tickets, (t) => t.price * (t.quantity || 0));
|
|
1313
|
-
// export const parseTickets = (tickets, merchant) => {
|
|
1314
|
-
// if (Array.isArray(tickets)) return { merchant, categories: tickets };
|
|
1315
|
-
// if (tickets && typeof tickets === 'object') return tickets;
|
|
1316
|
-
// return { merchant, categories: [{ category: 'Default', price: tickets }] };
|
|
1317
|
-
// };
|
|
1318
|
-
// export const compileTickets = (tickets, merchant) => {
|
|
1319
|
-
// const newTickets = _.cloneDeep(tickets);
|
|
1320
|
-
// newTickets.merchant = merchant;
|
|
1321
|
-
// newTickets.categories = newTickets.categories.map((ticket) => {
|
|
1322
|
-
// ticket.price = isCurrency(ticket.price);
|
|
1323
|
-
// return ticket;
|
|
1324
|
-
// });
|
|
1325
|
-
// return newTickets;
|
|
1326
|
-
// };
|
|
1327
|
-
// export const getTicketPriceText = (ticket) => {
|
|
1328
|
-
// return typeof ticket.price === 'string' ? ticket.price : formatCurrency(ticket.price);
|
|
1329
|
-
// };
|
|
1330
|
-
// export const isTicketCategoryValid = (ticket, ticketDetail) => {
|
|
1331
|
-
// return !_.isEmpty(ticket.category) && ticketDetail.categories.filter((t) => t.category === ticket.category).length === 1;
|
|
1332
|
-
// };
|
|
1333
|
-
// export const isTicketPriceValid = (ticket) => {
|
|
1334
|
-
// return ticket.price && isCurrency(ticket.price) !== false;
|
|
1335
|
-
// };
|
|
1336
|
-
// export const isTicketsValid = (tickets) => {
|
|
1337
|
-
// if (tickets && tickets.categories && tickets.categories.length > 0) {
|
|
1338
|
-
// return tickets.categories.every((ticket) => isTicketCategoryValid(ticket, tickets) && isTicketPriceValid(ticket));
|
|
1339
|
-
// }
|
|
1340
|
-
// return true;
|
|
1341
|
-
// };
|
|
1342
|
-
// export const getFee = (feeInfo, amount) => {
|
|
1343
|
-
// if (!feeInfo.fee) return 0;
|
|
1344
|
-
// return feeInfo.isPercentage ? (feeInfo.fee / 100) * amount : feeInfo.fee;
|
|
1345
|
-
// };
|
|
1346
|
-
// export const isRefund = (transaction) => transaction.TransactionType === 'REFUND';
|
|
1347
|
-
// export const combineTickets = (ticketsArray, diff = false) => {
|
|
1348
|
-
// if (_.isNil(ticketsArray) || ticketsArray.length === 0) return [];
|
|
1349
|
-
// const combined = ticketsArray.reduce((a, c) => {
|
|
1350
|
-
// if (_.isNil(a) || a.length === 0) return c;
|
|
1351
|
-
// const summed = a.map((cat) => {
|
|
1352
|
-
// const cloned = _.clone(cat);
|
|
1353
|
-
// const match = c.find((i) => i.category === cloned.category);
|
|
1354
|
-
// cloned.quantity = (diff ? -1 : 1) * (cloned.quantity || 0) + (match ? match.quantity || 0 : 0);
|
|
1355
|
-
// return cloned;
|
|
1356
|
-
// });
|
|
1357
|
-
// return summed;
|
|
1358
|
-
// });
|
|
1359
|
-
// return combined;
|
|
1360
|
-
// };
|
|
1361
|
-
// export const combineTransactions = (transactionsArray) => {
|
|
1362
|
-
// if (_.isNil(transactionsArray) || transactionsArray.length === 0) return null;
|
|
1363
|
-
// const combined = _.orderBy(transactionsArray, 'UnixTimestamp', 'desc').reduce((a, c) => {
|
|
1364
|
-
// // console.log('transaction a', a.TransactionType, a.TransactionId, a.Amount, a.Fee.amount);
|
|
1365
|
-
// // console.log('transaction c', c.TransactionType, c.TransactionId, c.Amount, c.Fee.amount);
|
|
1366
|
-
// const cloned = _.cloneDeep(c);
|
|
1367
|
-
// cloned.Amount = cloned.Amount + a.Amount;
|
|
1368
|
-
// cloned.Fee.amount = cloned.Fee.amount + a.Fee.amount;
|
|
1369
|
-
// cloned.Item.categories = combineTickets([cloned.Item.categories, a.Item.categories]);
|
|
1370
|
-
// return cloned;
|
|
1371
|
-
// });
|
|
1372
|
-
// // console.log('combined', combined.TransactionType, combined.TransactionId, combined.Amount, combined.Fee.amount);
|
|
1373
|
-
// return combined;
|
|
1374
|
-
// };
|
|
1375
|
-
// export const consolidateTransactions = (transactionsArray) => {
|
|
1376
|
-
// const transactions = transactionsArray
|
|
1377
|
-
// .filter((pt) => pt.TransactionType === 'PAYMENT')
|
|
1378
|
-
// .map((p) => {
|
|
1379
|
-
// // Combine with all refunds for the transaction
|
|
1380
|
-
// const refunds = transactionsArray.filter((rt) => rt.TransactionType === 'REFUND' && rt.TransactionId === p.TransactionId);
|
|
1381
|
-
// return combineTransactions([...refunds, p]);
|
|
1382
|
-
// })
|
|
1383
|
-
// .filter((p) => getTotalQuantity(p.Item.categories) > 0);
|
|
1384
|
-
// return transactions;
|
|
1385
|
-
// };
|
|
1386
|
-
// export const isKiosk = (type) => {
|
|
1387
|
-
// return type === 'KIOSK' || type === 'FORMKIOSK' || type === 'SIGNINKIOSK';
|
|
1388
|
-
// };
|
|
1389
|
-
// export const isContentSource = (site) => {
|
|
1390
|
-
// if (`${baseClient}-${baseStage}` !== contentSource) {
|
|
1391
|
-
// return false;
|
|
1392
|
-
// }
|
|
1393
|
-
// return site === contentSourceSite;
|
|
1394
|
-
// };
|
|
1395
|
-
// export const formatDuration = (msDuration) => {
|
|
1396
|
-
// const diff = moment.duration(msDuration);
|
|
1397
|
-
// let result = '';
|
|
1398
|
-
// const days = Math.floor(diff.asDays());
|
|
1399
|
-
// if (days > 0) {
|
|
1400
|
-
// result += `${days} day${getPluralS(days)} `;
|
|
1401
|
-
// diff.add(-days, 'd');
|
|
1402
|
-
// }
|
|
1403
|
-
// const hours = Math.floor(diff.asHours());
|
|
1404
|
-
// if (hours > 0) {
|
|
1405
|
-
// result += `${hours} hour${getPluralS(hours)} `;
|
|
1406
|
-
// diff.add(-hours, 'h');
|
|
1407
|
-
// }
|
|
1408
|
-
// const minutes = Math.floor(diff.asMinutes());
|
|
1409
|
-
// if (minutes > 0) {
|
|
1410
|
-
// result += `${minutes} minute${getPluralS(minutes)} `;
|
|
1411
|
-
// diff.add(-minutes, 'm');
|
|
1412
|
-
// }
|
|
1413
|
-
// if (_.isEmpty(result)) {
|
|
1414
|
-
// return 'Less than a minute';
|
|
1415
|
-
// }
|
|
1416
|
-
// return result.trim();
|
|
1417
|
-
// };
|
|
1418
|
-
// export const readJSONFromStorage = (storage, key, fallback) => {
|
|
1419
|
-
// const value = storage.getItem(key);
|
|
1420
|
-
// if (value) {
|
|
1421
|
-
// return JSON.parse(value);
|
|
1422
|
-
// }
|
|
1423
|
-
// return fallback;
|
|
1424
|
-
// };
|
|
1425
|
-
// export const readStorageWithCookie = (key, isJson) => {
|
|
1426
|
-
// const value = window.localStorage.getItem(key);
|
|
1427
|
-
// if (value) {
|
|
1428
|
-
// if (isJson) {
|
|
1429
|
-
// try {
|
|
1430
|
-
// return JSON.parse(value);
|
|
1431
|
-
// } catch (e) {
|
|
1432
|
-
// console.log('parse error', e);
|
|
1433
|
-
// }
|
|
1434
|
-
// return null;
|
|
1435
|
-
// }
|
|
1436
|
-
// return value;
|
|
1437
|
-
// }
|
|
1438
|
-
// if (isJson) {
|
|
1439
|
-
// return Cookies.getJSON(key);
|
|
1440
|
-
// }
|
|
1441
|
-
// return Cookies.get(key);
|
|
1442
|
-
// };
|
|
1443
|
-
// export const clearLocalStorage = (key) => {
|
|
1444
|
-
// window.localStorage.removeItem(key);
|
|
1445
|
-
// Cookies.remove(key);
|
|
1446
|
-
// };
|
|
1447
|
-
// export const setLocalStorage = (key, value, isJson) => {
|
|
1448
|
-
// window.localStorage.setItem(key, isJson ? JSON.stringify(value) : value);
|
|
1449
|
-
// };
|
|
1450
|
-
// export const TIMESTAMPFORMAT = 'D MMM YYYY h:mma';
|
|
1451
|
-
// export const featureInfo = [
|
|
1452
|
-
// ...extensionFeatureInfo,
|
|
1453
|
-
// {
|
|
1454
|
-
// key: 'dashboard',
|
|
1455
|
-
// order: 1,
|
|
1456
|
-
// text: 'Dashboard',
|
|
1457
|
-
// icon: 'dashboard',
|
|
1458
|
-
// isFontAwesome: false,
|
|
1459
|
-
// url: '/mastermenu',
|
|
1460
|
-
// countProps: null,
|
|
1461
|
-
// visibleExps: null,
|
|
1462
|
-
// },
|
|
1463
|
-
// {
|
|
1464
|
-
// key: 'events',
|
|
1465
|
-
// order: 2,
|
|
1466
|
-
// text: 'Events',
|
|
1467
|
-
// icon: 'event',
|
|
1468
|
-
// isFontAwesome: false,
|
|
1469
|
-
// url: '/events',
|
|
1470
|
-
// addUrl: '/events/event',
|
|
1471
|
-
// addPermission: 'events',
|
|
1472
|
-
// singularName: 'event',
|
|
1473
|
-
// countProps: ['eventSubmissions', 'length'],
|
|
1474
|
-
// visibleExps: {
|
|
1475
|
-
// type: 'and',
|
|
1476
|
-
// exps: [
|
|
1477
|
-
// { type: 'feature', value: 'events' },
|
|
1478
|
-
// {
|
|
1479
|
-
// type: 'or',
|
|
1480
|
-
// exps: [
|
|
1481
|
-
// { type: 'permission', value: 'events' },
|
|
1482
|
-
// { type: 'permission', value: 'eventAttendance' },
|
|
1483
|
-
// { type: 'permission', value: 'eventSubmit' },
|
|
1484
|
-
// ],
|
|
1485
|
-
// },
|
|
1486
|
-
// ],
|
|
1487
|
-
// },
|
|
1488
|
-
// },
|
|
1489
|
-
// {
|
|
1490
|
-
// key: 'news',
|
|
1491
|
-
// order: 3,
|
|
1492
|
-
// text: 'News',
|
|
1493
|
-
// icon: 'news',
|
|
1494
|
-
// isFontAwesome: false,
|
|
1495
|
-
// url: '/news',
|
|
1496
|
-
// addUrl: '/news/article',
|
|
1497
|
-
// addPermission: 'newsletter',
|
|
1498
|
-
// singularName: 'news',
|
|
1499
|
-
// countProps: ['newsSubmissions', 'length'],
|
|
1500
|
-
// visibleExps: {
|
|
1501
|
-
// type: 'and',
|
|
1502
|
-
// exps: [
|
|
1503
|
-
// { type: 'feature', value: 'news' },
|
|
1504
|
-
// {
|
|
1505
|
-
// type: 'or',
|
|
1506
|
-
// exps: [
|
|
1507
|
-
// { type: 'permission', value: 'newsletter' },
|
|
1508
|
-
// { type: 'permission', value: 'newsletterSubmit' },
|
|
1509
|
-
// ],
|
|
1510
|
-
// },
|
|
1511
|
-
// ],
|
|
1512
|
-
// },
|
|
1513
|
-
// },
|
|
1514
|
-
// {
|
|
1515
|
-
// key: 'alerts',
|
|
1516
|
-
// order: 4,
|
|
1517
|
-
// text: 'Alerts',
|
|
1518
|
-
// icon: 'exclamation-triangle',
|
|
1519
|
-
// isFontAwesome: true,
|
|
1520
|
-
// url: '/alerts',
|
|
1521
|
-
// addUrl: '/alerts/addalert',
|
|
1522
|
-
// addPermission: 'alerts',
|
|
1523
|
-
// singularName: 'alert',
|
|
1524
|
-
// countProps: null,
|
|
1525
|
-
// visibleExps: {
|
|
1526
|
-
// type: 'and',
|
|
1527
|
-
// exps: [
|
|
1528
|
-
// { type: 'feature', value: 'alerts' },
|
|
1529
|
-
// { type: 'permission', value: 'alerts' },
|
|
1530
|
-
// ],
|
|
1531
|
-
// },
|
|
1532
|
-
// },
|
|
1533
|
-
// {
|
|
1534
|
-
// key: 'users',
|
|
1535
|
-
// order: 5,
|
|
1536
|
-
// text: 'Users',
|
|
1537
|
-
// icon: 'people',
|
|
1538
|
-
// isFontAwesome: false,
|
|
1539
|
-
// url: '/usershub',
|
|
1540
|
-
// addUrl: '/usershub/adduser',
|
|
1541
|
-
// addPermission: 'userManagement',
|
|
1542
|
-
// singularName: 'user',
|
|
1543
|
-
// countProps: null,
|
|
1544
|
-
// visibleExps: {
|
|
1545
|
-
// type: 'and',
|
|
1546
|
-
// exps: [
|
|
1547
|
-
// { type: 'feature', value: 'users' },
|
|
1548
|
-
// { type: 'permission', value: 'userManagement' },
|
|
1549
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1550
|
-
// ],
|
|
1551
|
-
// },
|
|
1552
|
-
// },
|
|
1553
|
-
// {
|
|
1554
|
-
// key: 'gallery',
|
|
1555
|
-
// order: 6,
|
|
1556
|
-
// text: 'Gallery',
|
|
1557
|
-
// icon: 'picture-o',
|
|
1558
|
-
// isFontAwesome: true,
|
|
1559
|
-
// url: '/imageLibrary',
|
|
1560
|
-
// addPermission: 'addToPublishingImageLibrary',
|
|
1561
|
-
// singularName: 'gallery image',
|
|
1562
|
-
// countProps: null,
|
|
1563
|
-
// visibleExps: {
|
|
1564
|
-
// type: 'and',
|
|
1565
|
-
// exps: [
|
|
1566
|
-
// { type: 'feature', value: 'gallery' },
|
|
1567
|
-
// { type: 'permission', value: 'addToPublishingImageLibrary' },
|
|
1568
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1569
|
-
// ],
|
|
1570
|
-
// },
|
|
1571
|
-
// },
|
|
1572
|
-
// {
|
|
1573
|
-
// key: 'services',
|
|
1574
|
-
// order: 7,
|
|
1575
|
-
// text: 'Services',
|
|
1576
|
-
// icon: 'stethoscope',
|
|
1577
|
-
// isFontAwesome: true,
|
|
1578
|
-
// url: '/services',
|
|
1579
|
-
// addUrl: '/services/service',
|
|
1580
|
-
// addPermission: 'services',
|
|
1581
|
-
// singularName: 'service',
|
|
1582
|
-
// countProps: null,
|
|
1583
|
-
// visibleExps: {
|
|
1584
|
-
// type: 'and',
|
|
1585
|
-
// exps: [
|
|
1586
|
-
// { type: 'feature', value: 'services' },
|
|
1587
|
-
// { type: 'permission', value: 'services' },
|
|
1588
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1589
|
-
// ],
|
|
1590
|
-
// },
|
|
1591
|
-
// },
|
|
1592
|
-
// {
|
|
1593
|
-
// key: 'sponsors',
|
|
1594
|
-
// order: 8,
|
|
1595
|
-
// text: 'Sponsors',
|
|
1596
|
-
// icon: 'star-o',
|
|
1597
|
-
// isFontAwesome: true,
|
|
1598
|
-
// url: '/sponsors',
|
|
1599
|
-
// addUrl: '/sponsors/sponsor',
|
|
1600
|
-
// addPermission: 'services',
|
|
1601
|
-
// singularName: 'sponsor',
|
|
1602
|
-
// countProps: null,
|
|
1603
|
-
// visibleExps: {
|
|
1604
|
-
// type: 'and',
|
|
1605
|
-
// exps: [
|
|
1606
|
-
// { type: 'feature', value: 'services' },
|
|
1607
|
-
// { type: 'permission', value: 'services' },
|
|
1608
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1609
|
-
// ],
|
|
1610
|
-
// },
|
|
1611
|
-
// },
|
|
1612
|
-
// {
|
|
1613
|
-
// key: 'info',
|
|
1614
|
-
// order: 9,
|
|
1615
|
-
// text: 'Information',
|
|
1616
|
-
// icon: 'info',
|
|
1617
|
-
// isFontAwesome: false,
|
|
1618
|
-
// url: '/info',
|
|
1619
|
-
// addUrl: '/info/infopage',
|
|
1620
|
-
// addPermission: 'infoPages',
|
|
1621
|
-
// singularName: CONST_STRINGS.FAQ_ENTRY,
|
|
1622
|
-
// countProps: null,
|
|
1623
|
-
// visibleExps: {
|
|
1624
|
-
// type: 'or',
|
|
1625
|
-
// exps: [
|
|
1626
|
-
// {
|
|
1627
|
-
// type: 'and',
|
|
1628
|
-
// exps: [
|
|
1629
|
-
// { type: 'feature', value: 'importantContacts' },
|
|
1630
|
-
// { type: 'permission', value: 'importantContacts' },
|
|
1631
|
-
// ],
|
|
1632
|
-
// },
|
|
1633
|
-
// {
|
|
1634
|
-
// type: 'and',
|
|
1635
|
-
// exps: [
|
|
1636
|
-
// { type: 'feature', value: 'maps' },
|
|
1637
|
-
// { type: 'permission', value: 'maps' },
|
|
1638
|
-
// ],
|
|
1639
|
-
// },
|
|
1640
|
-
// {
|
|
1641
|
-
// type: 'and',
|
|
1642
|
-
// exps: [
|
|
1643
|
-
// { type: 'feature', value: 'infoPages' },
|
|
1644
|
-
// { type: 'permission', value: 'infoPages' },
|
|
1645
|
-
// ],
|
|
1646
|
-
// },
|
|
1647
|
-
// {
|
|
1648
|
-
// type: 'and',
|
|
1649
|
-
// exps: [
|
|
1650
|
-
// { type: 'feature', value: 'news' },
|
|
1651
|
-
// { type: 'permission', value: 'welcomePages' },
|
|
1652
|
-
// ],
|
|
1653
|
-
// },
|
|
1654
|
-
// { type: 'permission', value: 'terms' },
|
|
1655
|
-
// ],
|
|
1656
|
-
// },
|
|
1657
|
-
// },
|
|
1658
|
-
// {
|
|
1659
|
-
// key: 'surveys',
|
|
1660
|
-
// order: 11,
|
|
1661
|
-
// text: 'Surveys',
|
|
1662
|
-
// icon: 'pie-chart',
|
|
1663
|
-
// isFontAwesome: true,
|
|
1664
|
-
// url: '/polls',
|
|
1665
|
-
// addUrl: '/polls/poll',
|
|
1666
|
-
// addPermission: 'polls',
|
|
1667
|
-
// singularName: 'survey',
|
|
1668
|
-
// countProps: null,
|
|
1669
|
-
// visibleExps: {
|
|
1670
|
-
// type: 'and',
|
|
1671
|
-
// exps: [
|
|
1672
|
-
// { type: 'feature', value: 'surveys' },
|
|
1673
|
-
// { type: 'permission', value: 'polls' },
|
|
1674
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1675
|
-
// ],
|
|
1676
|
-
// },
|
|
1677
|
-
// },
|
|
1678
|
-
// {
|
|
1679
|
-
// key: 'facilities',
|
|
1680
|
-
// order: 12,
|
|
1681
|
-
// text: CONST_STRINGS.FACILITIES,
|
|
1682
|
-
// icon: 'facility',
|
|
1683
|
-
// isFontAwesome: false,
|
|
1684
|
-
// url: '/facilities',
|
|
1685
|
-
// addUrl: '/facilities/facility',
|
|
1686
|
-
// addPermission: 'facilities',
|
|
1687
|
-
// singularName: 'facility',
|
|
1688
|
-
// countProps: null,
|
|
1689
|
-
// visibleExps: {
|
|
1690
|
-
// type: 'and',
|
|
1691
|
-
// exps: [
|
|
1692
|
-
// { type: 'feature', value: 'facilities' },
|
|
1693
|
-
// { type: 'permission', value: 'facilities' },
|
|
1694
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1695
|
-
// ],
|
|
1696
|
-
// },
|
|
1697
|
-
// },
|
|
1698
|
-
// {
|
|
1699
|
-
// key: 'offers',
|
|
1700
|
-
// order: 13,
|
|
1701
|
-
// text: 'Offers',
|
|
1702
|
-
// icon: 'shopping-bag',
|
|
1703
|
-
// isFontAwesome: true,
|
|
1704
|
-
// url: '/offers',
|
|
1705
|
-
// addUrl: '/offers/offer',
|
|
1706
|
-
// addPermission: 'offers',
|
|
1707
|
-
// singularName: 'offer',
|
|
1708
|
-
// countProps: null,
|
|
1709
|
-
// visibleExps: {
|
|
1710
|
-
// type: 'and',
|
|
1711
|
-
// exps: [
|
|
1712
|
-
// { type: 'feature', value: 'offers' },
|
|
1713
|
-
// { type: 'permission', value: 'offers' },
|
|
1714
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1715
|
-
// ],
|
|
1716
|
-
// },
|
|
1717
|
-
// },
|
|
1718
|
-
// {
|
|
1719
|
-
// key: 'signin',
|
|
1720
|
-
// order: 14,
|
|
1721
|
-
// text: 'Sign Ins',
|
|
1722
|
-
// icon: 'signin',
|
|
1723
|
-
// isFontAwesome: false,
|
|
1724
|
-
// url: '/signinHub',
|
|
1725
|
-
// addUrl: null,
|
|
1726
|
-
// addPermission: 'visitors',
|
|
1727
|
-
// singularName: 'visitor',
|
|
1728
|
-
// countProps: null,
|
|
1729
|
-
// visibleExps: {
|
|
1730
|
-
// type: 'and',
|
|
1731
|
-
// exps: [
|
|
1732
|
-
// { type: 'feature', value: 'visitors' },
|
|
1733
|
-
// { type: 'permission', value: 'visitors' },
|
|
1734
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1735
|
-
// ],
|
|
1736
|
-
// },
|
|
1737
|
-
// },
|
|
1738
|
-
// {
|
|
1739
|
-
// key: 'food',
|
|
1740
|
-
// order: 15,
|
|
1741
|
-
// text: 'Restaurant Manager',
|
|
1742
|
-
// icon: 'cutlery',
|
|
1743
|
-
// isFontAwesome: true,
|
|
1744
|
-
// url: '/food',
|
|
1745
|
-
// addUrl: null,
|
|
1746
|
-
// addPermission: 'food',
|
|
1747
|
-
// singularName: 'dish',
|
|
1748
|
-
// countProps: null,
|
|
1749
|
-
// visibleExps: {
|
|
1750
|
-
// type: 'and',
|
|
1751
|
-
// exps: [
|
|
1752
|
-
// { type: 'feature', value: 'food' },
|
|
1753
|
-
// { type: 'permission', value: 'food' },
|
|
1754
|
-
// ],
|
|
1755
|
-
// },
|
|
1756
|
-
// },
|
|
1757
|
-
// {
|
|
1758
|
-
// key: 'payment',
|
|
1759
|
-
// order: 16,
|
|
1760
|
-
// text: 'Payment',
|
|
1761
|
-
// icon: 'usd',
|
|
1762
|
-
// isFontAwesome: true,
|
|
1763
|
-
// url: '/payment',
|
|
1764
|
-
// addUrl: null,
|
|
1765
|
-
// addPermission: null,
|
|
1766
|
-
// singularName: 'payment',
|
|
1767
|
-
// countProps: null,
|
|
1768
|
-
// visibleExps: {
|
|
1769
|
-
// type: 'and',
|
|
1770
|
-
// exps: [
|
|
1771
|
-
// { type: 'props', value: 'paymentEnabled' },
|
|
1772
|
-
// {
|
|
1773
|
-
// type: 'or',
|
|
1774
|
-
// exps: [
|
|
1775
|
-
// { type: 'feature', value: 'managePayments' },
|
|
1776
|
-
// { type: 'permission', value: 'viewPayments' },
|
|
1777
|
-
// ],
|
|
1778
|
-
// },
|
|
1779
|
-
// ],
|
|
1780
|
-
// },
|
|
1781
|
-
// },
|
|
1782
|
-
// {
|
|
1783
|
-
// key: 'automation',
|
|
1784
|
-
// order: 17,
|
|
1785
|
-
// text: 'Automation',
|
|
1786
|
-
// icon: 'bolt',
|
|
1787
|
-
// isFontAwesome: true,
|
|
1788
|
-
// url: '/automationHub',
|
|
1789
|
-
// addUrl: null,
|
|
1790
|
-
// addPermission: null,
|
|
1791
|
-
// singularName: 'automation',
|
|
1792
|
-
// countProps: null,
|
|
1793
|
-
// visibleExps: { type: 'master', value: true },
|
|
1794
|
-
// },
|
|
1795
|
-
// ];
|
|
1796
|
-
// export const getFeatureInfo = (type) => {
|
|
1797
|
-
// switch (type) {
|
|
1798
|
-
// case 'maps':
|
|
1799
|
-
// return {
|
|
1800
|
-
// key: 'maps',
|
|
1801
|
-
// icon: 'map',
|
|
1802
|
-
// isFontAwesome: true,
|
|
1803
|
-
// url: '/info',
|
|
1804
|
-
// addUrl: '/info/map',
|
|
1805
|
-
// addPermission: 'maps',
|
|
1806
|
-
// singularName: 'map',
|
|
1807
|
-
// };
|
|
1808
|
-
// case 'importantContacts':
|
|
1809
|
-
// return {
|
|
1810
|
-
// key: 'importantContacts',
|
|
1811
|
-
// icon: 'address-card-o',
|
|
1812
|
-
// isFontAwesome: true,
|
|
1813
|
-
// url: '/info',
|
|
1814
|
-
// addUrl: '/info/importantcontact',
|
|
1815
|
-
// addPermission: 'importantContacts',
|
|
1816
|
-
// singularName: 'contact',
|
|
1817
|
-
// };
|
|
1818
|
-
// case 'info':
|
|
1819
|
-
// case 'infoPages':
|
|
1820
|
-
// return featureInfo.find((n) => n.key === 'info');
|
|
1821
|
-
// default:
|
|
1822
|
-
// const info = featureInfo.find((n) => n.key === type);
|
|
1823
|
-
// return info || { key: type, icon: type };
|
|
1824
|
-
// }
|
|
1825
|
-
// };
|
|
1826
|
-
|
|
1827
1323
|
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); 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); }; }
|
|
1828
1324
|
|
|
1829
1325
|
function _isNativeReflectConstruct$5() { 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; } }
|
|
@@ -2233,7 +1729,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2233
1729
|
value: function validateCircleAdmin() {
|
|
2234
1730
|
var _this4 = this;
|
|
2235
1731
|
|
|
2236
|
-
if (Session.validateAccess(this.props.auth.site,
|
|
1732
|
+
if (Session.validateAccess(this.props.auth.site, values.permission, this.props.auth)) {
|
|
2237
1733
|
return true;
|
|
2238
1734
|
}
|
|
2239
1735
|
|
|
@@ -2250,7 +1746,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2250
1746
|
return /*#__PURE__*/React.createElement(Components.Text, {
|
|
2251
1747
|
type: "highlightedHelp",
|
|
2252
1748
|
className: "chat_noMessage"
|
|
2253
|
-
}, "You can't send a message to this
|
|
1749
|
+
}, "You can't send a message to this ", _.capitalize(values.entityName), " as you are not a member.");
|
|
2254
1750
|
}
|
|
2255
1751
|
|
|
2256
1752
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2381,7 +1877,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2381
1877
|
return /*#__PURE__*/React.createElement("div", {
|
|
2382
1878
|
className: "flex flex-center"
|
|
2383
1879
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
2384
|
-
to: "/
|
|
1880
|
+
to: "/".concat(values.featureKey, "/edit/").concat(this.state.circleId)
|
|
2385
1881
|
}, /*#__PURE__*/React.createElement(FontAwesome, {
|
|
2386
1882
|
className: "header_back",
|
|
2387
1883
|
name: "cog"
|
|
@@ -2413,7 +1909,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2413
1909
|
className: "flex-1"
|
|
2414
1910
|
}, /*#__PURE__*/React.createElement(Components.Text, {
|
|
2415
1911
|
type: "formTitleMedium"
|
|
2416
|
-
}, "Member", getPluralS(members.length), " (", members.length, ")"))), this.state.membersExpanded && /*#__PURE__*/React.createElement("div", {
|
|
1912
|
+
}, "Member", Helper.getPluralS(members.length), " (", members.length, ")"))), this.state.membersExpanded && /*#__PURE__*/React.createElement("div", {
|
|
2417
1913
|
className: "paddingTop-8"
|
|
2418
1914
|
}, members.map(function (user) {
|
|
2419
1915
|
return /*#__PURE__*/React.createElement(Components.UserListing, {
|
|
@@ -2431,7 +1927,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2431
1927
|
className: "flex-1"
|
|
2432
1928
|
}, /*#__PURE__*/React.createElement(Components.Text, {
|
|
2433
1929
|
type: "formTitleMedium"
|
|
2434
|
-
}, "Image", getPluralS(this.state.images.length), " (", this.state.images.length, ")"))), this.state.imagesExpanded && /*#__PURE__*/React.createElement("div", {
|
|
1930
|
+
}, "Image", Helper.getPluralS(this.state.images.length), " (", this.state.images.length, ")"))), this.state.imagesExpanded && /*#__PURE__*/React.createElement("div", {
|
|
2435
1931
|
className: "paddingTop-8"
|
|
2436
1932
|
}, this.state.images.map(function (image, i) {
|
|
2437
1933
|
return /*#__PURE__*/React.createElement("a", {
|
|
@@ -2440,7 +1936,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2440
1936
|
}, /*#__PURE__*/React.createElement("img", {
|
|
2441
1937
|
src: image.Url,
|
|
2442
1938
|
className: "chat_section_image",
|
|
2443
|
-
alt: getFileName(image.Url)
|
|
1939
|
+
alt: Helper.getFileName(image.Url)
|
|
2444
1940
|
}));
|
|
2445
1941
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2446
1942
|
className: "chat_section"
|
|
@@ -2454,7 +1950,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2454
1950
|
className: "flex-1"
|
|
2455
1951
|
}, /*#__PURE__*/React.createElement(Components.Text, {
|
|
2456
1952
|
type: "formTitleMedium"
|
|
2457
|
-
}, "File", getPluralS(this.state.files.length), " (", this.state.files.length, ")"))), this.state.filesExpanded && /*#__PURE__*/React.createElement("div", {
|
|
1953
|
+
}, "File", Helper.getPluralS(this.state.files.length), " (", this.state.files.length, ")"))), this.state.filesExpanded && /*#__PURE__*/React.createElement("div", {
|
|
2458
1954
|
className: "paddingTop-8"
|
|
2459
1955
|
}, this.state.files.map(function (file, i) {
|
|
2460
1956
|
return /*#__PURE__*/React.createElement(Components.Attachment, {
|
|
@@ -2536,7 +2032,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2536
2032
|
}(Component);
|
|
2537
2033
|
|
|
2538
2034
|
var mapStateToProps = function mapStateToProps(state) {
|
|
2539
|
-
var circles = state.
|
|
2035
|
+
var circles = state[values.reducerKey].circles;
|
|
2540
2036
|
var auth = state.auth;
|
|
2541
2037
|
return {
|
|
2542
2038
|
circles: circles,
|
|
@@ -2804,13 +2300,8 @@ var PreviewGrid = /*#__PURE__*/function (_Component) {
|
|
|
2804
2300
|
return PreviewGrid;
|
|
2805
2301
|
}(Component);
|
|
2806
2302
|
|
|
2807
|
-
var
|
|
2808
|
-
|
|
2809
|
-
};
|
|
2810
|
-
var Screens = {
|
|
2811
|
-
Circles: Circles$1,
|
|
2812
|
-
AddCircle: AddCircle$1,
|
|
2813
|
-
Circle: Circle$1
|
|
2814
|
-
};
|
|
2303
|
+
var _Screens;
|
|
2304
|
+
var Reducers = _defineProperty({}, values.reducerKey, CircleReducer);
|
|
2305
|
+
var Screens = (_Screens = {}, _defineProperty(_Screens, values.componentCircles, Circles$1), _defineProperty(_Screens, values.componentAddCircle, AddCircle$1), _defineProperty(_Screens, values.componentCircle, Circle$1), _Screens);
|
|
2815
2306
|
|
|
2816
2307
|
export { FeatureConfig as Config, PreviewFull, PreviewGrid, PreviewWidget, Reducers, Screens, ViewFull, ViewWidget };
|