@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.cjs.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
6
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
6
7
|
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
7
8
|
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
@@ -9,7 +10,6 @@ var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitializ
|
|
|
9
10
|
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
10
11
|
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
11
12
|
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
12
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
13
13
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var reactRedux = require('react-redux');
|
|
@@ -44,6 +44,7 @@ function _interopNamespace(e) {
|
|
|
44
44
|
return Object.freeze(n);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
47
48
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
48
49
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
49
50
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
@@ -51,7 +52,6 @@ var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assert
|
|
|
51
52
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
52
53
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
53
54
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
54
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
55
55
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
56
56
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
57
57
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
@@ -60,46 +60,85 @@ var PlussCore__namespace = /*#__PURE__*/_interopNamespace(PlussCore);
|
|
|
60
60
|
var FontAwesome__default = /*#__PURE__*/_interopDefaultLegacy(FontAwesome);
|
|
61
61
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
62
62
|
|
|
63
|
+
var values = {
|
|
64
|
+
featureKey: 'circles',
|
|
65
|
+
entityKey: 'circle',
|
|
66
|
+
entityName: 'circle',
|
|
67
|
+
serviceKey: 'circles',
|
|
68
|
+
permission: 'circles',
|
|
69
|
+
menuIcon: 'circle-o',
|
|
70
|
+
isFontAwesome: true,
|
|
71
|
+
reducerKey: 'circles',
|
|
72
|
+
actionCircleKey: 'CIRCLE',
|
|
73
|
+
textFeatureTitle: 'Circles',
|
|
74
|
+
textAddMenuTitle: 'Circle',
|
|
75
|
+
textEmptyGroups: "You aren't in any Circles",
|
|
76
|
+
textEmptyPeople: 'Contacts will show here',
|
|
77
|
+
componentCircles: 'Circles',
|
|
78
|
+
componentAddCircle: 'AddCircle',
|
|
79
|
+
componentCircle: 'Circle',
|
|
80
|
+
inviteKey: 'circleInvite',
|
|
81
|
+
messageKey: 'circleMessage',
|
|
82
|
+
chatRoute: 'circleChat',
|
|
83
|
+
updateKeyUserCircles: 'userCircles',
|
|
84
|
+
allowPublicKey: 'circleAllowPublicCircles',
|
|
85
|
+
allowPublicKeyDefault: false,
|
|
86
|
+
settings: {
|
|
87
|
+
allowAnyCreate: false
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
63
91
|
// import * as PlussCore from '../../pluss-core/src';
|
|
64
92
|
var FeatureConfig = {
|
|
65
|
-
key:
|
|
66
|
-
singularName: '
|
|
67
|
-
description:
|
|
68
|
-
emptyText: "You aren't in any
|
|
69
|
-
widgetOptions: [
|
|
93
|
+
key: values.featureKey,
|
|
94
|
+
singularName: ___default['default'].capitalize(values.entityName),
|
|
95
|
+
description: "App users can create ".concat(values.entityName, "s and message each other."),
|
|
96
|
+
emptyText: "You aren't in any ".concat(___default['default'].capitalize(values.entityName), "s"),
|
|
97
|
+
widgetOptions: [{
|
|
98
|
+
widget: true,
|
|
99
|
+
main: true,
|
|
100
|
+
hideOnTabNumbers: [],
|
|
101
|
+
optionKey: values.allowPublicKey,
|
|
102
|
+
type: 'toggle',
|
|
103
|
+
inverseOption: false,
|
|
104
|
+
title: "Allow for public ".concat(values.entityName, "s"),
|
|
105
|
+
description: "Public ".concat(values.entityName, "s can be viewed and joined by anyone in the community."),
|
|
106
|
+
defaultNew: values.allowPublicKeyDefault,
|
|
107
|
+
default: values.allowPublicKeyDefault
|
|
108
|
+
}],
|
|
70
109
|
menu: {
|
|
71
110
|
order: 11,
|
|
72
|
-
text:
|
|
73
|
-
icon:
|
|
74
|
-
isFontAwesome:
|
|
75
|
-
url:
|
|
111
|
+
text: values.textFeatureTitle,
|
|
112
|
+
icon: values.menuIcon,
|
|
113
|
+
isFontAwesome: values.isFontAwesome,
|
|
114
|
+
url: "/".concat(values.featureKey),
|
|
76
115
|
countProps: null,
|
|
77
116
|
visibleExps: {
|
|
78
117
|
type: 'feature',
|
|
79
|
-
value:
|
|
118
|
+
value: values.featureKey
|
|
80
119
|
}
|
|
81
120
|
},
|
|
82
|
-
addUrl:
|
|
83
|
-
addPermission:
|
|
121
|
+
addUrl: "/".concat(values.featureKey, "/add"),
|
|
122
|
+
addPermission: values.permission,
|
|
84
123
|
permissions: [{
|
|
85
|
-
displayName:
|
|
86
|
-
key:
|
|
124
|
+
displayName: "Manage and View ".concat(___default['default'].capitalize(values.entityName), "s"),
|
|
125
|
+
key: values.permission
|
|
87
126
|
}],
|
|
88
127
|
routes: [{
|
|
89
|
-
path:
|
|
90
|
-
component:
|
|
128
|
+
path: "/".concat(values.featureKey),
|
|
129
|
+
component: values.componentCircles,
|
|
91
130
|
exact: false
|
|
92
131
|
}, {
|
|
93
|
-
path:
|
|
94
|
-
component:
|
|
132
|
+
path: "/".concat(values.featureKey, "/add"),
|
|
133
|
+
component: values.componentAddCircle,
|
|
95
134
|
exact: true
|
|
96
135
|
}, {
|
|
97
|
-
path:
|
|
98
|
-
component:
|
|
136
|
+
path: "/".concat(values.featureKey, "/").concat(values.entityKey, "/:circleId"),
|
|
137
|
+
component: values.componentCircle,
|
|
99
138
|
exact: true
|
|
100
139
|
}, {
|
|
101
|
-
path:
|
|
102
|
-
component:
|
|
140
|
+
path: "/".concat(values.featureKey, "/edit/:circleId"),
|
|
141
|
+
component: values.componentAddCircle,
|
|
103
142
|
exact: true
|
|
104
143
|
}],
|
|
105
144
|
env: {
|
|
@@ -125,9 +164,9 @@ var FeatureConfig = {
|
|
|
125
164
|
}
|
|
126
165
|
};
|
|
127
166
|
|
|
128
|
-
var CIRCLES_LOADED =
|
|
129
|
-
var CIRCLE_UPDATED =
|
|
130
|
-
var CIRCLE_REMOVED =
|
|
167
|
+
var CIRCLES_LOADED = "".concat(values.actionCircleKey, "S_LOADED");
|
|
168
|
+
var CIRCLE_UPDATED = "".concat(values.actionCircleKey, "_UPDATED");
|
|
169
|
+
var CIRCLE_REMOVED = "".concat(values.actionCircleKey, "_REMOVED");
|
|
131
170
|
|
|
132
171
|
var circlesLoaded = function circlesLoaded(circles) {
|
|
133
172
|
return {
|
|
@@ -154,7 +193,7 @@ var circleActions = {
|
|
|
154
193
|
getAll: function getAll(site) {
|
|
155
194
|
return Session$3.authedFunction({
|
|
156
195
|
method: 'GET',
|
|
157
|
-
url: Helper$3.getUrl(
|
|
196
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/all', {
|
|
158
197
|
site: site
|
|
159
198
|
})
|
|
160
199
|
});
|
|
@@ -162,7 +201,7 @@ var circleActions = {
|
|
|
162
201
|
getFiles: function getFiles(circleId) {
|
|
163
202
|
return Session$3.authedFunction({
|
|
164
203
|
method: 'GET',
|
|
165
|
-
url: Helper$3.getUrl(
|
|
204
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/files', {
|
|
166
205
|
circleId: circleId
|
|
167
206
|
})
|
|
168
207
|
});
|
|
@@ -170,39 +209,41 @@ var circleActions = {
|
|
|
170
209
|
getImages: function getImages(circleId) {
|
|
171
210
|
return Session$3.authedFunction({
|
|
172
211
|
method: 'GET',
|
|
173
|
-
url: Helper$3.getUrl(
|
|
212
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/images', {
|
|
174
213
|
circleId: circleId
|
|
175
214
|
})
|
|
176
215
|
});
|
|
177
216
|
},
|
|
178
|
-
add: function add(site, title, image, audience) {
|
|
217
|
+
add: function add(site, title, image, audience, isPublic) {
|
|
179
218
|
return Session$3.authedFunction({
|
|
180
219
|
method: 'POST',
|
|
181
|
-
url: Helper$3.getUrl(
|
|
220
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/add'),
|
|
182
221
|
data: {
|
|
183
222
|
site: site,
|
|
184
223
|
title: title,
|
|
185
224
|
image: image,
|
|
186
|
-
audience: audience
|
|
225
|
+
audience: audience,
|
|
226
|
+
isPublic: isPublic
|
|
187
227
|
}
|
|
188
228
|
});
|
|
189
229
|
},
|
|
190
|
-
edit: function edit(circleId, title, image, audience) {
|
|
230
|
+
edit: function edit(circleId, title, image, audience, isPublic) {
|
|
191
231
|
return Session$3.authedFunction({
|
|
192
232
|
method: 'POST',
|
|
193
|
-
url: Helper$3.getUrl(
|
|
233
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/edit'),
|
|
194
234
|
data: {
|
|
195
235
|
circleId: circleId,
|
|
196
236
|
title: title,
|
|
197
237
|
image: image,
|
|
198
|
-
audience: audience
|
|
238
|
+
audience: audience,
|
|
239
|
+
isPublic: isPublic
|
|
199
240
|
}
|
|
200
241
|
});
|
|
201
242
|
},
|
|
202
243
|
delete: function _delete(circleId) {
|
|
203
244
|
return Session$3.authedFunction({
|
|
204
245
|
method: 'POST',
|
|
205
|
-
url: Helper$3.getUrl(
|
|
246
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/delete'),
|
|
206
247
|
data: {
|
|
207
248
|
circleId: circleId
|
|
208
249
|
}
|
|
@@ -211,7 +252,7 @@ var circleActions = {
|
|
|
211
252
|
addAdmin: function addAdmin(circleId, userId) {
|
|
212
253
|
return Session$3.authedFunction({
|
|
213
254
|
method: 'POST',
|
|
214
|
-
url: Helper$3.getUrl(
|
|
255
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/addadmin'),
|
|
215
256
|
data: {
|
|
216
257
|
circleId: circleId,
|
|
217
258
|
userId: userId
|
|
@@ -221,7 +262,7 @@ var circleActions = {
|
|
|
221
262
|
removeAdmin: function removeAdmin(circleId, userId) {
|
|
222
263
|
return Session$3.authedFunction({
|
|
223
264
|
method: 'POST',
|
|
224
|
-
url: Helper$3.getUrl(
|
|
265
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/removeadmin'),
|
|
225
266
|
data: {
|
|
226
267
|
circleId: circleId,
|
|
227
268
|
userId: userId
|
|
@@ -253,7 +294,7 @@ var circleActions = {
|
|
|
253
294
|
|
|
254
295
|
return _context.abrupt("return", Session$3.authedFunction({
|
|
255
296
|
method: 'GET',
|
|
256
|
-
url: Helper$3.getUrl(
|
|
297
|
+
url: Helper$3.getUrl(values.serviceKey, 'getMessages', query)
|
|
257
298
|
}));
|
|
258
299
|
|
|
259
300
|
case 5:
|
|
@@ -278,7 +319,7 @@ var circleActions = {
|
|
|
278
319
|
case 0:
|
|
279
320
|
return _context2.abrupt("return", Session$3.authedFunction({
|
|
280
321
|
method: 'post',
|
|
281
|
-
url: Helper$3.getUrl(
|
|
322
|
+
url: Helper$3.getUrl(values.serviceKey, 'sendMessage'),
|
|
282
323
|
data: {
|
|
283
324
|
groupId: circleId,
|
|
284
325
|
message: message
|
|
@@ -368,14 +409,14 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
368
409
|
|
|
369
410
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "canAddNew", function () {
|
|
370
411
|
var auth = _this.props.auth;
|
|
371
|
-
return Session$2.validateAccess(auth.site,
|
|
412
|
+
return Session$2.validateAccess(auth.site, values.permission, auth);
|
|
372
413
|
});
|
|
373
414
|
|
|
374
415
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "onAddNew", function () {
|
|
375
416
|
var auth = _this.props.auth;
|
|
376
417
|
|
|
377
|
-
if (Session$2.validateAccess(auth.site,
|
|
378
|
-
_this.props.history.push("/
|
|
418
|
+
if (Session$2.validateAccess(auth.site, values.permission, auth)) {
|
|
419
|
+
_this.props.history.push("/".concat(values.featureKey, "/add"));
|
|
379
420
|
}
|
|
380
421
|
});
|
|
381
422
|
|
|
@@ -441,7 +482,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
441
482
|
});
|
|
442
483
|
|
|
443
484
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "removeCircle", function (circle) {
|
|
444
|
-
if (window.confirm("Are you sure you want to delete that
|
|
485
|
+
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, "."))) {
|
|
445
486
|
_this.props.circleRemoved(circle.Id);
|
|
446
487
|
|
|
447
488
|
circleActions.delete(circle.Id).then(function (res) {
|
|
@@ -457,7 +498,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
457
498
|
return 'Private Message';
|
|
458
499
|
}
|
|
459
500
|
|
|
460
|
-
return '
|
|
501
|
+
return ___default['default'].capitalize(values.entityName);
|
|
461
502
|
});
|
|
462
503
|
|
|
463
504
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "getTitle", function (circle) {
|
|
@@ -531,7 +572,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
531
572
|
value: function validateCircleAdmin(circle, onlyCreator) {
|
|
532
573
|
var _this4 = this;
|
|
533
574
|
|
|
534
|
-
if (Session$2.validateAccess(this.props.auth.site,
|
|
575
|
+
if (Session$2.validateAccess(this.props.auth.site, values.permission, this.props.auth)) {
|
|
535
576
|
return true;
|
|
536
577
|
}
|
|
537
578
|
|
|
@@ -553,7 +594,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
553
594
|
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
554
595
|
className: "table-TitleColumn"
|
|
555
596
|
}, /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
556
|
-
to: "/
|
|
597
|
+
to: "/".concat(values.featureKey, "/").concat(values.entityKey, "/").concat(circle.Id)
|
|
557
598
|
}, this.getTitle(circle))), /*#__PURE__*/React__default['default'].createElement("td", null, moment__default['default'](circle.Changed).local().format('D MMM YYYY')), /*#__PURE__*/React__default['default'].createElement("td", null, circle.Audience.map(function (user) {
|
|
558
599
|
return /*#__PURE__*/React__default['default'].createElement(Components$2.ProfilePic, {
|
|
559
600
|
size: 30,
|
|
@@ -569,7 +610,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
569
610
|
alignItems: 'center'
|
|
570
611
|
}
|
|
571
612
|
}, this.validateCircleAdmin(circle) && !circle.IsPrivate && /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
572
|
-
to: "/
|
|
613
|
+
to: "/".concat(values.featureKey, "/edit/").concat(circle.Id)
|
|
573
614
|
}, /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
|
|
574
615
|
style: {
|
|
575
616
|
fontSize: 20,
|
|
@@ -691,7 +732,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
691
732
|
onClick: function onClick() {
|
|
692
733
|
_this7.selectTypeFilter('circle');
|
|
693
734
|
},
|
|
694
|
-
text:
|
|
735
|
+
text: ___default['default'].capitalize(values.entityName),
|
|
695
736
|
className: "marginRight-10"
|
|
696
737
|
}), /*#__PURE__*/React__default['default'].createElement(Components$2.Tag, {
|
|
697
738
|
onClick: function onClick() {
|
|
@@ -707,13 +748,13 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
707
748
|
|
|
708
749
|
return /*#__PURE__*/React__default['default'].createElement("div", null, this.renderTypeFilterPopup(), this.renderUserFilterPopup(), /*#__PURE__*/React__default['default'].createElement(Components$2.Header, null, this.canAddNew() && /*#__PURE__*/React__default['default'].createElement(Components$2.AddButton, {
|
|
709
750
|
onClick: this.onAddNew,
|
|
710
|
-
text: "NEW
|
|
751
|
+
text: "NEW ".concat(___default['default'].upperCase(values.entityName))
|
|
711
752
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
712
753
|
className: "pageContainer paddingVertical-20 paddingHorizontal-40"
|
|
713
754
|
}, /*#__PURE__*/React__default['default'].createElement(Components$2.Text, {
|
|
714
755
|
type: "h1",
|
|
715
756
|
className: ""
|
|
716
|
-
},
|
|
757
|
+
}, values.textFeatureTitle), this.renderFilters(), /*#__PURE__*/React__default['default'].createElement(reactBootstrap.Table, {
|
|
717
758
|
className: "plussTable",
|
|
718
759
|
striped: true,
|
|
719
760
|
bordered: true,
|
|
@@ -738,7 +779,7 @@ var Circles = /*#__PURE__*/function (_Component) {
|
|
|
738
779
|
}(React.Component);
|
|
739
780
|
|
|
740
781
|
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
741
|
-
var circles = state.
|
|
782
|
+
var circles = state[values.reducerKey].circles;
|
|
742
783
|
var auth = state.auth;
|
|
743
784
|
return {
|
|
744
785
|
circles: circles,
|
|
@@ -825,6 +866,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
825
866
|
});
|
|
826
867
|
var newState = {
|
|
827
868
|
title: circle.Title,
|
|
869
|
+
isPublic: !!circle.IsPublic,
|
|
828
870
|
selectedUsers: selectedUsers
|
|
829
871
|
};
|
|
830
872
|
|
|
@@ -955,7 +997,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
955
997
|
});
|
|
956
998
|
|
|
957
999
|
if (_this.state.circleId) {
|
|
958
|
-
circleActions.edit(_this.state.circleId, _this.state.title, _this.state.image, audience).then(function (res) {
|
|
1000
|
+
circleActions.edit(_this.state.circleId, _this.state.title, _this.state.image, audience, _this.state.isPublic).then(function (res) {
|
|
959
1001
|
_this.setState({
|
|
960
1002
|
success: true,
|
|
961
1003
|
updating: false
|
|
@@ -974,7 +1016,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
974
1016
|
alert('Something went wrong with the request. Please try again.');
|
|
975
1017
|
});
|
|
976
1018
|
} else {
|
|
977
|
-
circleActions.add(_this.props.auth.site, _this.state.title, _this.state.image, audience).then(function (res) {
|
|
1019
|
+
circleActions.add(_this.props.auth.site, _this.state.title, _this.state.image, audience, _this.state.isPublic).then(function (res) {
|
|
978
1020
|
_this.setState({
|
|
979
1021
|
success: true,
|
|
980
1022
|
updating: false
|
|
@@ -1022,7 +1064,9 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1022
1064
|
success: false,
|
|
1023
1065
|
users: [],
|
|
1024
1066
|
selectedUsers: [],
|
|
1025
|
-
userSearch: ''
|
|
1067
|
+
userSearch: '',
|
|
1068
|
+
isPublic: false,
|
|
1069
|
+
selectedOption: 'visibility'
|
|
1026
1070
|
};
|
|
1027
1071
|
return _this;
|
|
1028
1072
|
}
|
|
@@ -1031,7 +1075,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1031
1075
|
key: "componentDidMount",
|
|
1032
1076
|
value: function componentDidMount() {
|
|
1033
1077
|
Session$1.checkLoggedIn(this, this.props.auth);
|
|
1034
|
-
this.props.addRecentlyCreated(
|
|
1078
|
+
this.props.addRecentlyCreated(values.entityKey);
|
|
1035
1079
|
this.getUsers();
|
|
1036
1080
|
this.checkGetCircle();
|
|
1037
1081
|
}
|
|
@@ -1077,13 +1121,13 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1077
1121
|
value: function renderSuccess() {
|
|
1078
1122
|
if (!this.state.success) return null;
|
|
1079
1123
|
return /*#__PURE__*/React__default['default'].createElement(Components$1.SuccessPopup, {
|
|
1080
|
-
text: "
|
|
1124
|
+
text: "".concat(___default['default'].capitalize(values.entityName), " has been ").concat(this.state.circleId == null ? 'added' : 'edited'),
|
|
1081
1125
|
buttons: [{
|
|
1082
1126
|
type: 'outlined',
|
|
1083
1127
|
onClick: function onClick() {
|
|
1084
1128
|
window.history.back();
|
|
1085
1129
|
},
|
|
1086
|
-
text: "Back to
|
|
1130
|
+
text: "Back to ".concat(values.textFeatureTitle)
|
|
1087
1131
|
}]
|
|
1088
1132
|
});
|
|
1089
1133
|
}
|
|
@@ -1102,7 +1146,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1102
1146
|
inline: true,
|
|
1103
1147
|
buttonType: "tertiary",
|
|
1104
1148
|
onClick: function onClick() {
|
|
1105
|
-
return _this4.props.history.push(
|
|
1149
|
+
return _this4.props.history.push("/".concat(values.featureKey));
|
|
1106
1150
|
},
|
|
1107
1151
|
isActive: true,
|
|
1108
1152
|
style: {
|
|
@@ -1116,24 +1160,88 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1116
1160
|
}, "Save"));
|
|
1117
1161
|
}
|
|
1118
1162
|
}, {
|
|
1119
|
-
key: "
|
|
1120
|
-
value: function
|
|
1163
|
+
key: "renderVisibility",
|
|
1164
|
+
value: function renderVisibility() {
|
|
1121
1165
|
var _this5 = this;
|
|
1122
1166
|
|
|
1123
1167
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1168
|
+
className: "optionsContent_bottom"
|
|
1169
|
+
}, /*#__PURE__*/React__default['default'].createElement(Components$1.RadioButton, {
|
|
1170
|
+
label: "Do you want to make this ".concat(values.entityName, " a public ").concat(values.entityName, "?"),
|
|
1171
|
+
isActive: this.state.isPublic,
|
|
1172
|
+
options: [{
|
|
1173
|
+
Label: 'Yes',
|
|
1174
|
+
Value: true,
|
|
1175
|
+
onChange: function onChange() {
|
|
1176
|
+
return _this5.setState({
|
|
1177
|
+
isPublic: true
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
}, {
|
|
1181
|
+
Label: 'No',
|
|
1182
|
+
Value: false,
|
|
1183
|
+
onChange: function onChange() {
|
|
1184
|
+
return _this5.setState({
|
|
1185
|
+
isPublic: false
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
}]
|
|
1189
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1190
|
+
className: "genericInput-help",
|
|
1124
1191
|
style: {
|
|
1125
|
-
|
|
1192
|
+
marginTop: 4
|
|
1126
1193
|
}
|
|
1127
|
-
},
|
|
1194
|
+
}, "This will allow anyone in the community to view and join the ".concat(values.entityName, ".")));
|
|
1195
|
+
}
|
|
1196
|
+
}, {
|
|
1197
|
+
key: "renderSelectedOption",
|
|
1198
|
+
value: function renderSelectedOption() {
|
|
1199
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1200
|
+
style: {
|
|
1201
|
+
display: this.state.selectedOption === 'visibility' ? 'block' : 'none'
|
|
1202
|
+
}
|
|
1203
|
+
}, this.renderVisibility()));
|
|
1204
|
+
}
|
|
1205
|
+
}, {
|
|
1206
|
+
key: "renderOptionsSection",
|
|
1207
|
+
value: function renderOptionsSection() {
|
|
1208
|
+
var options = [{
|
|
1209
|
+
key: 'visibility',
|
|
1210
|
+
icon: 'people3',
|
|
1211
|
+
text: 'Visibility'
|
|
1212
|
+
}];
|
|
1213
|
+
|
|
1214
|
+
if (!this.props.circleAllowPublicCircles) {
|
|
1215
|
+
options = ___default['default'].filter(options, function (o) {
|
|
1216
|
+
return o.key !== 'visibility';
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
if (___default['default'].isEmpty(options)) {
|
|
1221
|
+
return null;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
return /*#__PURE__*/React__default['default'].createElement(Components$1.OptionsSection, {
|
|
1225
|
+
options: options,
|
|
1226
|
+
selected: this.state.selectedOption,
|
|
1227
|
+
selectOption: this.selectOption
|
|
1228
|
+
}, this.renderSelectedOption());
|
|
1229
|
+
}
|
|
1230
|
+
}, {
|
|
1231
|
+
key: "renderMain",
|
|
1232
|
+
value: function renderMain() {
|
|
1233
|
+
var _this6 = this;
|
|
1234
|
+
|
|
1235
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1128
1236
|
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
1129
1237
|
}, /*#__PURE__*/React__default['default'].createElement(Components$1.Text, {
|
|
1130
1238
|
type: "formTitleLarge",
|
|
1131
1239
|
className: "marginBottom-24"
|
|
1132
|
-
}, this.state.circleId == null ? 'New' : 'Edit', "
|
|
1240
|
+
}, this.state.circleId == null ? 'New' : 'Edit', " ", ___default['default'].capitalize(values.entityName)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1133
1241
|
className: "flex flex-reverse"
|
|
1134
1242
|
}, /*#__PURE__*/React__default['default'].createElement(Components$1.ImageInput, {
|
|
1135
1243
|
ref: function ref(_ref2) {
|
|
1136
|
-
|
|
1244
|
+
_this6.imageInput = _ref2;
|
|
1137
1245
|
},
|
|
1138
1246
|
label: "IMAGE",
|
|
1139
1247
|
limit: 1,
|
|
@@ -1147,18 +1255,18 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1147
1255
|
id: "title",
|
|
1148
1256
|
type: "text",
|
|
1149
1257
|
label: "Title",
|
|
1150
|
-
placeholder: "Name the
|
|
1258
|
+
placeholder: "Name the ".concat(___default['default'].capitalize(values.entityName)),
|
|
1151
1259
|
value: this.state.title,
|
|
1152
1260
|
onChange: function onChange(e) {
|
|
1153
|
-
return
|
|
1261
|
+
return _this6.onHandleChange(e);
|
|
1154
1262
|
},
|
|
1155
1263
|
isRequired: true,
|
|
1156
1264
|
alwaysShowLabel: true,
|
|
1157
1265
|
isValid: function isValid() {
|
|
1158
|
-
return !___default['default'].isEmpty(
|
|
1266
|
+
return !___default['default'].isEmpty(_this6.state.title);
|
|
1159
1267
|
},
|
|
1160
1268
|
showError: function showError() {
|
|
1161
|
-
return
|
|
1269
|
+
return _this6.state.showWarnings && ___default['default'].isEmpty(_this6.state.title);
|
|
1162
1270
|
}
|
|
1163
1271
|
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1164
1272
|
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
@@ -1178,7 +1286,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1178
1286
|
placeholder: "Enter name",
|
|
1179
1287
|
value: this.state.userSearch,
|
|
1180
1288
|
onChange: function onChange(e) {
|
|
1181
|
-
return
|
|
1289
|
+
return _this6.onHandleChange(e);
|
|
1182
1290
|
},
|
|
1183
1291
|
alwaysShowLabel: true
|
|
1184
1292
|
}), this.getShownUsers().map(function (user) {
|
|
@@ -1186,7 +1294,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1186
1294
|
key: user.userId,
|
|
1187
1295
|
user: user,
|
|
1188
1296
|
onClick: function onClick() {
|
|
1189
|
-
|
|
1297
|
+
_this6.onSelectUser(user);
|
|
1190
1298
|
}
|
|
1191
1299
|
});
|
|
1192
1300
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -1205,15 +1313,15 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1205
1313
|
icon: "close",
|
|
1206
1314
|
colour: Colours$1.COLOUR_DUSK,
|
|
1207
1315
|
onClick: function onClick() {
|
|
1208
|
-
|
|
1316
|
+
_this6.onSelectUser(user);
|
|
1209
1317
|
}
|
|
1210
1318
|
}), /*#__PURE__*/React__default['default'].createElement(Components$1.StatusButton, {
|
|
1211
1319
|
isActive: user.isAdmin,
|
|
1212
1320
|
activate: function activate() {
|
|
1213
|
-
|
|
1321
|
+
_this6.addAdmin(user);
|
|
1214
1322
|
},
|
|
1215
1323
|
deactivate: function deactivate() {
|
|
1216
|
-
|
|
1324
|
+
_this6.removeAdmin(user);
|
|
1217
1325
|
},
|
|
1218
1326
|
activeText: "Admin",
|
|
1219
1327
|
activateText: "Make Admin",
|
|
@@ -1221,7 +1329,7 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1221
1329
|
inactiveText: "Not Admin"
|
|
1222
1330
|
}))
|
|
1223
1331
|
});
|
|
1224
|
-
})))));
|
|
1332
|
+
})))), this.renderOptionsSection());
|
|
1225
1333
|
}
|
|
1226
1334
|
}, {
|
|
1227
1335
|
key: "render",
|
|
@@ -1239,11 +1347,12 @@ var AddCircle = /*#__PURE__*/function (_Component) {
|
|
|
1239
1347
|
}(React.Component);
|
|
1240
1348
|
|
|
1241
1349
|
var mapStateToProps$1 = function mapStateToProps(state) {
|
|
1242
|
-
var circles = state.
|
|
1350
|
+
var circles = state[values.reducerKey].circles;
|
|
1243
1351
|
var auth = state.auth;
|
|
1244
1352
|
return {
|
|
1245
1353
|
circles: circles,
|
|
1246
|
-
auth: auth
|
|
1354
|
+
auth: auth,
|
|
1355
|
+
circleAllowPublicCircles: Helper$1.getSiteSettingFromState(state, values.allowPublicKey)
|
|
1247
1356
|
};
|
|
1248
1357
|
};
|
|
1249
1358
|
|
|
@@ -1253,619 +1362,6 @@ var AddCircle$1 = reactRedux.connect(mapStateToProps$1, {
|
|
|
1253
1362
|
addRecentlyCreated: Actions$1.addRecentlyCreated
|
|
1254
1363
|
})(reactRouter.withRouter(AddCircle));
|
|
1255
1364
|
|
|
1256
|
-
var getFileName = function getFileName(url, noExtension) {
|
|
1257
|
-
if (!url) {
|
|
1258
|
-
return null;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
var fileSplit = url.split('/');
|
|
1262
|
-
var name = fileSplit[fileSplit.length - 1].toLowerCase();
|
|
1263
|
-
|
|
1264
|
-
if (!noExtension) {
|
|
1265
|
-
return name;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
return name.split('.')[0];
|
|
1269
|
-
};
|
|
1270
|
-
|
|
1271
|
-
var getPluralS = function getPluralS(count) {
|
|
1272
|
-
if (count === 1) {
|
|
1273
|
-
return '';
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
return 's';
|
|
1277
|
-
};
|
|
1278
|
-
// if (!count) {
|
|
1279
|
-
// return '0%';
|
|
1280
|
-
// }
|
|
1281
|
-
// if (!total) {
|
|
1282
|
-
// return '100%';
|
|
1283
|
-
// }
|
|
1284
|
-
// return `${Math.round((100 * count) / total)}%`;
|
|
1285
|
-
// };
|
|
1286
|
-
// export const getUserPreview = (user) => {
|
|
1287
|
-
// return {
|
|
1288
|
-
// displayName: user.displayName,
|
|
1289
|
-
// id: user.Id,
|
|
1290
|
-
// profilePic: user.profilePic || defaultProfileImage,
|
|
1291
|
-
// };
|
|
1292
|
-
// };
|
|
1293
|
-
// export const usersToPreviews = (users) => {
|
|
1294
|
-
// return _.map(users, getUserPreview);
|
|
1295
|
-
// };
|
|
1296
|
-
// export const getSiteNameFromRoles = (site, roles) => {
|
|
1297
|
-
// return getSiteName(
|
|
1298
|
-
// site,
|
|
1299
|
-
// roles.map((r) => {
|
|
1300
|
-
// return r.siteInfo;
|
|
1301
|
-
// }),
|
|
1302
|
-
// );
|
|
1303
|
-
// };
|
|
1304
|
-
// export const getSiteName = (site, sites) => {
|
|
1305
|
-
// if (site === 'hq') {
|
|
1306
|
-
// return 'HQ';
|
|
1307
|
-
// }
|
|
1308
|
-
// const siteObject = _.find(sites, (t) => {
|
|
1309
|
-
// return t.Id === site;
|
|
1310
|
-
// });
|
|
1311
|
-
// if (siteObject) {
|
|
1312
|
-
// return siteObject.siteName;
|
|
1313
|
-
// }
|
|
1314
|
-
// return site;
|
|
1315
|
-
// };
|
|
1316
|
-
// export const formatCurrency = (number, locale = 'en-AU', curencyCode = 'AUD', shouldFix = false) => {
|
|
1317
|
-
// const formatter = Intl.NumberFormat(locale, { style: 'currency', currency: curencyCode, minimumFractionDigits: 2 });
|
|
1318
|
-
// let formattedNumber = number;
|
|
1319
|
-
// if (shouldFix && formatter.format(formattedNumber).indexOf('NaN') > -1) {
|
|
1320
|
-
// formattedNumber = number.replace(/[^\d.-]/g, '');
|
|
1321
|
-
// }
|
|
1322
|
-
// return formatter.format(formattedNumber);
|
|
1323
|
-
// };
|
|
1324
|
-
// export const currencyToFloat = (number) => {
|
|
1325
|
-
// let result = parseFloat(number);
|
|
1326
|
-
// if (isNaN(result)) {
|
|
1327
|
-
// result = parseFloat(number.replace(/[^\d.-]/g, ''));
|
|
1328
|
-
// if (isNaN(result)) {
|
|
1329
|
-
// result = 0;
|
|
1330
|
-
// }
|
|
1331
|
-
// }
|
|
1332
|
-
// return result;
|
|
1333
|
-
// };
|
|
1334
|
-
// export const getCurrencySymbol = () => {
|
|
1335
|
-
// return formatCurrency(0).replace(/[0-9.]+/g, '');
|
|
1336
|
-
// };
|
|
1337
|
-
// export const isCurrency = (text) => {
|
|
1338
|
-
// if (!text) return false;
|
|
1339
|
-
// const price = parseFloat(typeof text === 'string' ? text.replace(getCurrencySymbol(), '') : text, 10);
|
|
1340
|
-
// return _.isNumber(price) && !Number.isNaN(price) ? price : false;
|
|
1341
|
-
// };
|
|
1342
|
-
// export const isPaidItem = (enabled, tickets) => {
|
|
1343
|
-
// // console.log('isPaidItem', enabled, tickets);
|
|
1344
|
-
// return (
|
|
1345
|
-
// enabled &&
|
|
1346
|
-
// tickets &&
|
|
1347
|
-
// tickets.merchant &&
|
|
1348
|
-
// tickets.categories &&
|
|
1349
|
-
// tickets.categories.length > 0 &&
|
|
1350
|
-
// tickets.categories.every((t) => !t.price || _.isNumber(t.price))
|
|
1351
|
-
// );
|
|
1352
|
-
// };
|
|
1353
|
-
// export const getTotalQuantity = (tickets) => _.sumBy(tickets, (t) => t.quantity || 0);
|
|
1354
|
-
// export const getTotalPrice = (tickets) => _.sumBy(tickets, (t) => t.price * (t.quantity || 0));
|
|
1355
|
-
// export const parseTickets = (tickets, merchant) => {
|
|
1356
|
-
// if (Array.isArray(tickets)) return { merchant, categories: tickets };
|
|
1357
|
-
// if (tickets && typeof tickets === 'object') return tickets;
|
|
1358
|
-
// return { merchant, categories: [{ category: 'Default', price: tickets }] };
|
|
1359
|
-
// };
|
|
1360
|
-
// export const compileTickets = (tickets, merchant) => {
|
|
1361
|
-
// const newTickets = _.cloneDeep(tickets);
|
|
1362
|
-
// newTickets.merchant = merchant;
|
|
1363
|
-
// newTickets.categories = newTickets.categories.map((ticket) => {
|
|
1364
|
-
// ticket.price = isCurrency(ticket.price);
|
|
1365
|
-
// return ticket;
|
|
1366
|
-
// });
|
|
1367
|
-
// return newTickets;
|
|
1368
|
-
// };
|
|
1369
|
-
// export const getTicketPriceText = (ticket) => {
|
|
1370
|
-
// return typeof ticket.price === 'string' ? ticket.price : formatCurrency(ticket.price);
|
|
1371
|
-
// };
|
|
1372
|
-
// export const isTicketCategoryValid = (ticket, ticketDetail) => {
|
|
1373
|
-
// return !_.isEmpty(ticket.category) && ticketDetail.categories.filter((t) => t.category === ticket.category).length === 1;
|
|
1374
|
-
// };
|
|
1375
|
-
// export const isTicketPriceValid = (ticket) => {
|
|
1376
|
-
// return ticket.price && isCurrency(ticket.price) !== false;
|
|
1377
|
-
// };
|
|
1378
|
-
// export const isTicketsValid = (tickets) => {
|
|
1379
|
-
// if (tickets && tickets.categories && tickets.categories.length > 0) {
|
|
1380
|
-
// return tickets.categories.every((ticket) => isTicketCategoryValid(ticket, tickets) && isTicketPriceValid(ticket));
|
|
1381
|
-
// }
|
|
1382
|
-
// return true;
|
|
1383
|
-
// };
|
|
1384
|
-
// export const getFee = (feeInfo, amount) => {
|
|
1385
|
-
// if (!feeInfo.fee) return 0;
|
|
1386
|
-
// return feeInfo.isPercentage ? (feeInfo.fee / 100) * amount : feeInfo.fee;
|
|
1387
|
-
// };
|
|
1388
|
-
// export const isRefund = (transaction) => transaction.TransactionType === 'REFUND';
|
|
1389
|
-
// export const combineTickets = (ticketsArray, diff = false) => {
|
|
1390
|
-
// if (_.isNil(ticketsArray) || ticketsArray.length === 0) return [];
|
|
1391
|
-
// const combined = ticketsArray.reduce((a, c) => {
|
|
1392
|
-
// if (_.isNil(a) || a.length === 0) return c;
|
|
1393
|
-
// const summed = a.map((cat) => {
|
|
1394
|
-
// const cloned = _.clone(cat);
|
|
1395
|
-
// const match = c.find((i) => i.category === cloned.category);
|
|
1396
|
-
// cloned.quantity = (diff ? -1 : 1) * (cloned.quantity || 0) + (match ? match.quantity || 0 : 0);
|
|
1397
|
-
// return cloned;
|
|
1398
|
-
// });
|
|
1399
|
-
// return summed;
|
|
1400
|
-
// });
|
|
1401
|
-
// return combined;
|
|
1402
|
-
// };
|
|
1403
|
-
// export const combineTransactions = (transactionsArray) => {
|
|
1404
|
-
// if (_.isNil(transactionsArray) || transactionsArray.length === 0) return null;
|
|
1405
|
-
// const combined = _.orderBy(transactionsArray, 'UnixTimestamp', 'desc').reduce((a, c) => {
|
|
1406
|
-
// // console.log('transaction a', a.TransactionType, a.TransactionId, a.Amount, a.Fee.amount);
|
|
1407
|
-
// // console.log('transaction c', c.TransactionType, c.TransactionId, c.Amount, c.Fee.amount);
|
|
1408
|
-
// const cloned = _.cloneDeep(c);
|
|
1409
|
-
// cloned.Amount = cloned.Amount + a.Amount;
|
|
1410
|
-
// cloned.Fee.amount = cloned.Fee.amount + a.Fee.amount;
|
|
1411
|
-
// cloned.Item.categories = combineTickets([cloned.Item.categories, a.Item.categories]);
|
|
1412
|
-
// return cloned;
|
|
1413
|
-
// });
|
|
1414
|
-
// // console.log('combined', combined.TransactionType, combined.TransactionId, combined.Amount, combined.Fee.amount);
|
|
1415
|
-
// return combined;
|
|
1416
|
-
// };
|
|
1417
|
-
// export const consolidateTransactions = (transactionsArray) => {
|
|
1418
|
-
// const transactions = transactionsArray
|
|
1419
|
-
// .filter((pt) => pt.TransactionType === 'PAYMENT')
|
|
1420
|
-
// .map((p) => {
|
|
1421
|
-
// // Combine with all refunds for the transaction
|
|
1422
|
-
// const refunds = transactionsArray.filter((rt) => rt.TransactionType === 'REFUND' && rt.TransactionId === p.TransactionId);
|
|
1423
|
-
// return combineTransactions([...refunds, p]);
|
|
1424
|
-
// })
|
|
1425
|
-
// .filter((p) => getTotalQuantity(p.Item.categories) > 0);
|
|
1426
|
-
// return transactions;
|
|
1427
|
-
// };
|
|
1428
|
-
// export const isKiosk = (type) => {
|
|
1429
|
-
// return type === 'KIOSK' || type === 'FORMKIOSK' || type === 'SIGNINKIOSK';
|
|
1430
|
-
// };
|
|
1431
|
-
// export const isContentSource = (site) => {
|
|
1432
|
-
// if (`${baseClient}-${baseStage}` !== contentSource) {
|
|
1433
|
-
// return false;
|
|
1434
|
-
// }
|
|
1435
|
-
// return site === contentSourceSite;
|
|
1436
|
-
// };
|
|
1437
|
-
// export const formatDuration = (msDuration) => {
|
|
1438
|
-
// const diff = moment.duration(msDuration);
|
|
1439
|
-
// let result = '';
|
|
1440
|
-
// const days = Math.floor(diff.asDays());
|
|
1441
|
-
// if (days > 0) {
|
|
1442
|
-
// result += `${days} day${getPluralS(days)} `;
|
|
1443
|
-
// diff.add(-days, 'd');
|
|
1444
|
-
// }
|
|
1445
|
-
// const hours = Math.floor(diff.asHours());
|
|
1446
|
-
// if (hours > 0) {
|
|
1447
|
-
// result += `${hours} hour${getPluralS(hours)} `;
|
|
1448
|
-
// diff.add(-hours, 'h');
|
|
1449
|
-
// }
|
|
1450
|
-
// const minutes = Math.floor(diff.asMinutes());
|
|
1451
|
-
// if (minutes > 0) {
|
|
1452
|
-
// result += `${minutes} minute${getPluralS(minutes)} `;
|
|
1453
|
-
// diff.add(-minutes, 'm');
|
|
1454
|
-
// }
|
|
1455
|
-
// if (_.isEmpty(result)) {
|
|
1456
|
-
// return 'Less than a minute';
|
|
1457
|
-
// }
|
|
1458
|
-
// return result.trim();
|
|
1459
|
-
// };
|
|
1460
|
-
// export const readJSONFromStorage = (storage, key, fallback) => {
|
|
1461
|
-
// const value = storage.getItem(key);
|
|
1462
|
-
// if (value) {
|
|
1463
|
-
// return JSON.parse(value);
|
|
1464
|
-
// }
|
|
1465
|
-
// return fallback;
|
|
1466
|
-
// };
|
|
1467
|
-
// export const readStorageWithCookie = (key, isJson) => {
|
|
1468
|
-
// const value = window.localStorage.getItem(key);
|
|
1469
|
-
// if (value) {
|
|
1470
|
-
// if (isJson) {
|
|
1471
|
-
// try {
|
|
1472
|
-
// return JSON.parse(value);
|
|
1473
|
-
// } catch (e) {
|
|
1474
|
-
// console.log('parse error', e);
|
|
1475
|
-
// }
|
|
1476
|
-
// return null;
|
|
1477
|
-
// }
|
|
1478
|
-
// return value;
|
|
1479
|
-
// }
|
|
1480
|
-
// if (isJson) {
|
|
1481
|
-
// return Cookies.getJSON(key);
|
|
1482
|
-
// }
|
|
1483
|
-
// return Cookies.get(key);
|
|
1484
|
-
// };
|
|
1485
|
-
// export const clearLocalStorage = (key) => {
|
|
1486
|
-
// window.localStorage.removeItem(key);
|
|
1487
|
-
// Cookies.remove(key);
|
|
1488
|
-
// };
|
|
1489
|
-
// export const setLocalStorage = (key, value, isJson) => {
|
|
1490
|
-
// window.localStorage.setItem(key, isJson ? JSON.stringify(value) : value);
|
|
1491
|
-
// };
|
|
1492
|
-
// export const TIMESTAMPFORMAT = 'D MMM YYYY h:mma';
|
|
1493
|
-
// export const featureInfo = [
|
|
1494
|
-
// ...extensionFeatureInfo,
|
|
1495
|
-
// {
|
|
1496
|
-
// key: 'dashboard',
|
|
1497
|
-
// order: 1,
|
|
1498
|
-
// text: 'Dashboard',
|
|
1499
|
-
// icon: 'dashboard',
|
|
1500
|
-
// isFontAwesome: false,
|
|
1501
|
-
// url: '/mastermenu',
|
|
1502
|
-
// countProps: null,
|
|
1503
|
-
// visibleExps: null,
|
|
1504
|
-
// },
|
|
1505
|
-
// {
|
|
1506
|
-
// key: 'events',
|
|
1507
|
-
// order: 2,
|
|
1508
|
-
// text: 'Events',
|
|
1509
|
-
// icon: 'event',
|
|
1510
|
-
// isFontAwesome: false,
|
|
1511
|
-
// url: '/events',
|
|
1512
|
-
// addUrl: '/events/event',
|
|
1513
|
-
// addPermission: 'events',
|
|
1514
|
-
// singularName: 'event',
|
|
1515
|
-
// countProps: ['eventSubmissions', 'length'],
|
|
1516
|
-
// visibleExps: {
|
|
1517
|
-
// type: 'and',
|
|
1518
|
-
// exps: [
|
|
1519
|
-
// { type: 'feature', value: 'events' },
|
|
1520
|
-
// {
|
|
1521
|
-
// type: 'or',
|
|
1522
|
-
// exps: [
|
|
1523
|
-
// { type: 'permission', value: 'events' },
|
|
1524
|
-
// { type: 'permission', value: 'eventAttendance' },
|
|
1525
|
-
// { type: 'permission', value: 'eventSubmit' },
|
|
1526
|
-
// ],
|
|
1527
|
-
// },
|
|
1528
|
-
// ],
|
|
1529
|
-
// },
|
|
1530
|
-
// },
|
|
1531
|
-
// {
|
|
1532
|
-
// key: 'news',
|
|
1533
|
-
// order: 3,
|
|
1534
|
-
// text: 'News',
|
|
1535
|
-
// icon: 'news',
|
|
1536
|
-
// isFontAwesome: false,
|
|
1537
|
-
// url: '/news',
|
|
1538
|
-
// addUrl: '/news/article',
|
|
1539
|
-
// addPermission: 'newsletter',
|
|
1540
|
-
// singularName: 'news',
|
|
1541
|
-
// countProps: ['newsSubmissions', 'length'],
|
|
1542
|
-
// visibleExps: {
|
|
1543
|
-
// type: 'and',
|
|
1544
|
-
// exps: [
|
|
1545
|
-
// { type: 'feature', value: 'news' },
|
|
1546
|
-
// {
|
|
1547
|
-
// type: 'or',
|
|
1548
|
-
// exps: [
|
|
1549
|
-
// { type: 'permission', value: 'newsletter' },
|
|
1550
|
-
// { type: 'permission', value: 'newsletterSubmit' },
|
|
1551
|
-
// ],
|
|
1552
|
-
// },
|
|
1553
|
-
// ],
|
|
1554
|
-
// },
|
|
1555
|
-
// },
|
|
1556
|
-
// {
|
|
1557
|
-
// key: 'alerts',
|
|
1558
|
-
// order: 4,
|
|
1559
|
-
// text: 'Alerts',
|
|
1560
|
-
// icon: 'exclamation-triangle',
|
|
1561
|
-
// isFontAwesome: true,
|
|
1562
|
-
// url: '/alerts',
|
|
1563
|
-
// addUrl: '/alerts/addalert',
|
|
1564
|
-
// addPermission: 'alerts',
|
|
1565
|
-
// singularName: 'alert',
|
|
1566
|
-
// countProps: null,
|
|
1567
|
-
// visibleExps: {
|
|
1568
|
-
// type: 'and',
|
|
1569
|
-
// exps: [
|
|
1570
|
-
// { type: 'feature', value: 'alerts' },
|
|
1571
|
-
// { type: 'permission', value: 'alerts' },
|
|
1572
|
-
// ],
|
|
1573
|
-
// },
|
|
1574
|
-
// },
|
|
1575
|
-
// {
|
|
1576
|
-
// key: 'users',
|
|
1577
|
-
// order: 5,
|
|
1578
|
-
// text: 'Users',
|
|
1579
|
-
// icon: 'people',
|
|
1580
|
-
// isFontAwesome: false,
|
|
1581
|
-
// url: '/usershub',
|
|
1582
|
-
// addUrl: '/usershub/adduser',
|
|
1583
|
-
// addPermission: 'userManagement',
|
|
1584
|
-
// singularName: 'user',
|
|
1585
|
-
// countProps: null,
|
|
1586
|
-
// visibleExps: {
|
|
1587
|
-
// type: 'and',
|
|
1588
|
-
// exps: [
|
|
1589
|
-
// { type: 'feature', value: 'users' },
|
|
1590
|
-
// { type: 'permission', value: 'userManagement' },
|
|
1591
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1592
|
-
// ],
|
|
1593
|
-
// },
|
|
1594
|
-
// },
|
|
1595
|
-
// {
|
|
1596
|
-
// key: 'gallery',
|
|
1597
|
-
// order: 6,
|
|
1598
|
-
// text: 'Gallery',
|
|
1599
|
-
// icon: 'picture-o',
|
|
1600
|
-
// isFontAwesome: true,
|
|
1601
|
-
// url: '/imageLibrary',
|
|
1602
|
-
// addPermission: 'addToPublishingImageLibrary',
|
|
1603
|
-
// singularName: 'gallery image',
|
|
1604
|
-
// countProps: null,
|
|
1605
|
-
// visibleExps: {
|
|
1606
|
-
// type: 'and',
|
|
1607
|
-
// exps: [
|
|
1608
|
-
// { type: 'feature', value: 'gallery' },
|
|
1609
|
-
// { type: 'permission', value: 'addToPublishingImageLibrary' },
|
|
1610
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1611
|
-
// ],
|
|
1612
|
-
// },
|
|
1613
|
-
// },
|
|
1614
|
-
// {
|
|
1615
|
-
// key: 'services',
|
|
1616
|
-
// order: 7,
|
|
1617
|
-
// text: 'Services',
|
|
1618
|
-
// icon: 'stethoscope',
|
|
1619
|
-
// isFontAwesome: true,
|
|
1620
|
-
// url: '/services',
|
|
1621
|
-
// addUrl: '/services/service',
|
|
1622
|
-
// addPermission: 'services',
|
|
1623
|
-
// singularName: 'service',
|
|
1624
|
-
// countProps: null,
|
|
1625
|
-
// visibleExps: {
|
|
1626
|
-
// type: 'and',
|
|
1627
|
-
// exps: [
|
|
1628
|
-
// { type: 'feature', value: 'services' },
|
|
1629
|
-
// { type: 'permission', value: 'services' },
|
|
1630
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1631
|
-
// ],
|
|
1632
|
-
// },
|
|
1633
|
-
// },
|
|
1634
|
-
// {
|
|
1635
|
-
// key: 'sponsors',
|
|
1636
|
-
// order: 8,
|
|
1637
|
-
// text: 'Sponsors',
|
|
1638
|
-
// icon: 'star-o',
|
|
1639
|
-
// isFontAwesome: true,
|
|
1640
|
-
// url: '/sponsors',
|
|
1641
|
-
// addUrl: '/sponsors/sponsor',
|
|
1642
|
-
// addPermission: 'services',
|
|
1643
|
-
// singularName: 'sponsor',
|
|
1644
|
-
// countProps: null,
|
|
1645
|
-
// visibleExps: {
|
|
1646
|
-
// type: 'and',
|
|
1647
|
-
// exps: [
|
|
1648
|
-
// { type: 'feature', value: 'services' },
|
|
1649
|
-
// { type: 'permission', value: 'services' },
|
|
1650
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1651
|
-
// ],
|
|
1652
|
-
// },
|
|
1653
|
-
// },
|
|
1654
|
-
// {
|
|
1655
|
-
// key: 'info',
|
|
1656
|
-
// order: 9,
|
|
1657
|
-
// text: 'Information',
|
|
1658
|
-
// icon: 'info',
|
|
1659
|
-
// isFontAwesome: false,
|
|
1660
|
-
// url: '/info',
|
|
1661
|
-
// addUrl: '/info/infopage',
|
|
1662
|
-
// addPermission: 'infoPages',
|
|
1663
|
-
// singularName: CONST_STRINGS.FAQ_ENTRY,
|
|
1664
|
-
// countProps: null,
|
|
1665
|
-
// visibleExps: {
|
|
1666
|
-
// type: 'or',
|
|
1667
|
-
// exps: [
|
|
1668
|
-
// {
|
|
1669
|
-
// type: 'and',
|
|
1670
|
-
// exps: [
|
|
1671
|
-
// { type: 'feature', value: 'importantContacts' },
|
|
1672
|
-
// { type: 'permission', value: 'importantContacts' },
|
|
1673
|
-
// ],
|
|
1674
|
-
// },
|
|
1675
|
-
// {
|
|
1676
|
-
// type: 'and',
|
|
1677
|
-
// exps: [
|
|
1678
|
-
// { type: 'feature', value: 'maps' },
|
|
1679
|
-
// { type: 'permission', value: 'maps' },
|
|
1680
|
-
// ],
|
|
1681
|
-
// },
|
|
1682
|
-
// {
|
|
1683
|
-
// type: 'and',
|
|
1684
|
-
// exps: [
|
|
1685
|
-
// { type: 'feature', value: 'infoPages' },
|
|
1686
|
-
// { type: 'permission', value: 'infoPages' },
|
|
1687
|
-
// ],
|
|
1688
|
-
// },
|
|
1689
|
-
// {
|
|
1690
|
-
// type: 'and',
|
|
1691
|
-
// exps: [
|
|
1692
|
-
// { type: 'feature', value: 'news' },
|
|
1693
|
-
// { type: 'permission', value: 'welcomePages' },
|
|
1694
|
-
// ],
|
|
1695
|
-
// },
|
|
1696
|
-
// { type: 'permission', value: 'terms' },
|
|
1697
|
-
// ],
|
|
1698
|
-
// },
|
|
1699
|
-
// },
|
|
1700
|
-
// {
|
|
1701
|
-
// key: 'surveys',
|
|
1702
|
-
// order: 11,
|
|
1703
|
-
// text: 'Surveys',
|
|
1704
|
-
// icon: 'pie-chart',
|
|
1705
|
-
// isFontAwesome: true,
|
|
1706
|
-
// url: '/polls',
|
|
1707
|
-
// addUrl: '/polls/poll',
|
|
1708
|
-
// addPermission: 'polls',
|
|
1709
|
-
// singularName: 'survey',
|
|
1710
|
-
// countProps: null,
|
|
1711
|
-
// visibleExps: {
|
|
1712
|
-
// type: 'and',
|
|
1713
|
-
// exps: [
|
|
1714
|
-
// { type: 'feature', value: 'surveys' },
|
|
1715
|
-
// { type: 'permission', value: 'polls' },
|
|
1716
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1717
|
-
// ],
|
|
1718
|
-
// },
|
|
1719
|
-
// },
|
|
1720
|
-
// {
|
|
1721
|
-
// key: 'facilities',
|
|
1722
|
-
// order: 12,
|
|
1723
|
-
// text: CONST_STRINGS.FACILITIES,
|
|
1724
|
-
// icon: 'facility',
|
|
1725
|
-
// isFontAwesome: false,
|
|
1726
|
-
// url: '/facilities',
|
|
1727
|
-
// addUrl: '/facilities/facility',
|
|
1728
|
-
// addPermission: 'facilities',
|
|
1729
|
-
// singularName: 'facility',
|
|
1730
|
-
// countProps: null,
|
|
1731
|
-
// visibleExps: {
|
|
1732
|
-
// type: 'and',
|
|
1733
|
-
// exps: [
|
|
1734
|
-
// { type: 'feature', value: 'facilities' },
|
|
1735
|
-
// { type: 'permission', value: 'facilities' },
|
|
1736
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1737
|
-
// ],
|
|
1738
|
-
// },
|
|
1739
|
-
// },
|
|
1740
|
-
// {
|
|
1741
|
-
// key: 'offers',
|
|
1742
|
-
// order: 13,
|
|
1743
|
-
// text: 'Offers',
|
|
1744
|
-
// icon: 'shopping-bag',
|
|
1745
|
-
// isFontAwesome: true,
|
|
1746
|
-
// url: '/offers',
|
|
1747
|
-
// addUrl: '/offers/offer',
|
|
1748
|
-
// addPermission: 'offers',
|
|
1749
|
-
// singularName: 'offer',
|
|
1750
|
-
// countProps: null,
|
|
1751
|
-
// visibleExps: {
|
|
1752
|
-
// type: 'and',
|
|
1753
|
-
// exps: [
|
|
1754
|
-
// { type: 'feature', value: 'offers' },
|
|
1755
|
-
// { type: 'permission', value: 'offers' },
|
|
1756
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1757
|
-
// ],
|
|
1758
|
-
// },
|
|
1759
|
-
// },
|
|
1760
|
-
// {
|
|
1761
|
-
// key: 'signin',
|
|
1762
|
-
// order: 14,
|
|
1763
|
-
// text: 'Sign Ins',
|
|
1764
|
-
// icon: 'signin',
|
|
1765
|
-
// isFontAwesome: false,
|
|
1766
|
-
// url: '/signinHub',
|
|
1767
|
-
// addUrl: null,
|
|
1768
|
-
// addPermission: 'visitors',
|
|
1769
|
-
// singularName: 'visitor',
|
|
1770
|
-
// countProps: null,
|
|
1771
|
-
// visibleExps: {
|
|
1772
|
-
// type: 'and',
|
|
1773
|
-
// exps: [
|
|
1774
|
-
// { type: 'feature', value: 'visitors' },
|
|
1775
|
-
// { type: 'permission', value: 'visitors' },
|
|
1776
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1777
|
-
// ],
|
|
1778
|
-
// },
|
|
1779
|
-
// },
|
|
1780
|
-
// {
|
|
1781
|
-
// key: 'food',
|
|
1782
|
-
// order: 15,
|
|
1783
|
-
// text: 'Restaurant Manager',
|
|
1784
|
-
// icon: 'cutlery',
|
|
1785
|
-
// isFontAwesome: true,
|
|
1786
|
-
// url: '/food',
|
|
1787
|
-
// addUrl: null,
|
|
1788
|
-
// addPermission: 'food',
|
|
1789
|
-
// singularName: 'dish',
|
|
1790
|
-
// countProps: null,
|
|
1791
|
-
// visibleExps: {
|
|
1792
|
-
// type: 'and',
|
|
1793
|
-
// exps: [
|
|
1794
|
-
// { type: 'feature', value: 'food' },
|
|
1795
|
-
// { type: 'permission', value: 'food' },
|
|
1796
|
-
// ],
|
|
1797
|
-
// },
|
|
1798
|
-
// },
|
|
1799
|
-
// {
|
|
1800
|
-
// key: 'payment',
|
|
1801
|
-
// order: 16,
|
|
1802
|
-
// text: 'Payment',
|
|
1803
|
-
// icon: 'usd',
|
|
1804
|
-
// isFontAwesome: true,
|
|
1805
|
-
// url: '/payment',
|
|
1806
|
-
// addUrl: null,
|
|
1807
|
-
// addPermission: null,
|
|
1808
|
-
// singularName: 'payment',
|
|
1809
|
-
// countProps: null,
|
|
1810
|
-
// visibleExps: {
|
|
1811
|
-
// type: 'and',
|
|
1812
|
-
// exps: [
|
|
1813
|
-
// { type: 'props', value: 'paymentEnabled' },
|
|
1814
|
-
// {
|
|
1815
|
-
// type: 'or',
|
|
1816
|
-
// exps: [
|
|
1817
|
-
// { type: 'feature', value: 'managePayments' },
|
|
1818
|
-
// { type: 'permission', value: 'viewPayments' },
|
|
1819
|
-
// ],
|
|
1820
|
-
// },
|
|
1821
|
-
// ],
|
|
1822
|
-
// },
|
|
1823
|
-
// },
|
|
1824
|
-
// {
|
|
1825
|
-
// key: 'automation',
|
|
1826
|
-
// order: 17,
|
|
1827
|
-
// text: 'Automation',
|
|
1828
|
-
// icon: 'bolt',
|
|
1829
|
-
// isFontAwesome: true,
|
|
1830
|
-
// url: '/automationHub',
|
|
1831
|
-
// addUrl: null,
|
|
1832
|
-
// addPermission: null,
|
|
1833
|
-
// singularName: 'automation',
|
|
1834
|
-
// countProps: null,
|
|
1835
|
-
// visibleExps: { type: 'master', value: true },
|
|
1836
|
-
// },
|
|
1837
|
-
// ];
|
|
1838
|
-
// export const getFeatureInfo = (type) => {
|
|
1839
|
-
// switch (type) {
|
|
1840
|
-
// case 'maps':
|
|
1841
|
-
// return {
|
|
1842
|
-
// key: 'maps',
|
|
1843
|
-
// icon: 'map',
|
|
1844
|
-
// isFontAwesome: true,
|
|
1845
|
-
// url: '/info',
|
|
1846
|
-
// addUrl: '/info/map',
|
|
1847
|
-
// addPermission: 'maps',
|
|
1848
|
-
// singularName: 'map',
|
|
1849
|
-
// };
|
|
1850
|
-
// case 'importantContacts':
|
|
1851
|
-
// return {
|
|
1852
|
-
// key: 'importantContacts',
|
|
1853
|
-
// icon: 'address-card-o',
|
|
1854
|
-
// isFontAwesome: true,
|
|
1855
|
-
// url: '/info',
|
|
1856
|
-
// addUrl: '/info/importantcontact',
|
|
1857
|
-
// addPermission: 'importantContacts',
|
|
1858
|
-
// singularName: 'contact',
|
|
1859
|
-
// };
|
|
1860
|
-
// case 'info':
|
|
1861
|
-
// case 'infoPages':
|
|
1862
|
-
// return featureInfo.find((n) => n.key === 'info');
|
|
1863
|
-
// default:
|
|
1864
|
-
// const info = featureInfo.find((n) => n.key === type);
|
|
1865
|
-
// return info || { key: type, icon: type };
|
|
1866
|
-
// }
|
|
1867
|
-
// };
|
|
1868
|
-
|
|
1869
1365
|
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
|
|
1870
1366
|
|
|
1871
1367
|
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; } }
|
|
@@ -2275,7 +1771,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2275
1771
|
value: function validateCircleAdmin() {
|
|
2276
1772
|
var _this4 = this;
|
|
2277
1773
|
|
|
2278
|
-
if (Session.validateAccess(this.props.auth.site,
|
|
1774
|
+
if (Session.validateAccess(this.props.auth.site, values.permission, this.props.auth)) {
|
|
2279
1775
|
return true;
|
|
2280
1776
|
}
|
|
2281
1777
|
|
|
@@ -2292,7 +1788,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2292
1788
|
return /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2293
1789
|
type: "highlightedHelp",
|
|
2294
1790
|
className: "chat_noMessage"
|
|
2295
|
-
}, "You can't send a message to this
|
|
1791
|
+
}, "You can't send a message to this ", ___default['default'].capitalize(values.entityName), " as you are not a member.");
|
|
2296
1792
|
}
|
|
2297
1793
|
|
|
2298
1794
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -2423,7 +1919,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2423
1919
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2424
1920
|
className: "flex flex-center"
|
|
2425
1921
|
}, /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
2426
|
-
to: "/
|
|
1922
|
+
to: "/".concat(values.featureKey, "/edit/").concat(this.state.circleId)
|
|
2427
1923
|
}, /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
|
|
2428
1924
|
className: "header_back",
|
|
2429
1925
|
name: "cog"
|
|
@@ -2455,7 +1951,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2455
1951
|
className: "flex-1"
|
|
2456
1952
|
}, /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2457
1953
|
type: "formTitleMedium"
|
|
2458
|
-
}, "Member", getPluralS(members.length), " (", members.length, ")"))), this.state.membersExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1954
|
+
}, "Member", Helper.getPluralS(members.length), " (", members.length, ")"))), this.state.membersExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2459
1955
|
className: "paddingTop-8"
|
|
2460
1956
|
}, members.map(function (user) {
|
|
2461
1957
|
return /*#__PURE__*/React__default['default'].createElement(Components.UserListing, {
|
|
@@ -2473,7 +1969,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2473
1969
|
className: "flex-1"
|
|
2474
1970
|
}, /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2475
1971
|
type: "formTitleMedium"
|
|
2476
|
-
}, "Image", getPluralS(this.state.images.length), " (", this.state.images.length, ")"))), this.state.imagesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1972
|
+
}, "Image", Helper.getPluralS(this.state.images.length), " (", this.state.images.length, ")"))), this.state.imagesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2477
1973
|
className: "paddingTop-8"
|
|
2478
1974
|
}, this.state.images.map(function (image, i) {
|
|
2479
1975
|
return /*#__PURE__*/React__default['default'].createElement("a", {
|
|
@@ -2482,7 +1978,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2482
1978
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
2483
1979
|
src: image.Url,
|
|
2484
1980
|
className: "chat_section_image",
|
|
2485
|
-
alt: getFileName(image.Url)
|
|
1981
|
+
alt: Helper.getFileName(image.Url)
|
|
2486
1982
|
}));
|
|
2487
1983
|
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2488
1984
|
className: "chat_section"
|
|
@@ -2496,7 +1992,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2496
1992
|
className: "flex-1"
|
|
2497
1993
|
}, /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2498
1994
|
type: "formTitleMedium"
|
|
2499
|
-
}, "File", getPluralS(this.state.files.length), " (", this.state.files.length, ")"))), this.state.filesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1995
|
+
}, "File", Helper.getPluralS(this.state.files.length), " (", this.state.files.length, ")"))), this.state.filesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2500
1996
|
className: "paddingTop-8"
|
|
2501
1997
|
}, this.state.files.map(function (file, i) {
|
|
2502
1998
|
return /*#__PURE__*/React__default['default'].createElement(Components.Attachment, {
|
|
@@ -2578,7 +2074,7 @@ var Circle = /*#__PURE__*/function (_Component) {
|
|
|
2578
2074
|
}(React.Component);
|
|
2579
2075
|
|
|
2580
2076
|
var mapStateToProps = function mapStateToProps(state) {
|
|
2581
|
-
var circles = state.
|
|
2077
|
+
var circles = state[values.reducerKey].circles;
|
|
2582
2078
|
var auth = state.auth;
|
|
2583
2079
|
return {
|
|
2584
2080
|
circles: circles,
|
|
@@ -2846,14 +2342,9 @@ var PreviewGrid = /*#__PURE__*/function (_Component) {
|
|
|
2846
2342
|
return PreviewGrid;
|
|
2847
2343
|
}(React.Component);
|
|
2848
2344
|
|
|
2849
|
-
var
|
|
2850
|
-
|
|
2851
|
-
};
|
|
2852
|
-
var Screens = {
|
|
2853
|
-
Circles: Circles$1,
|
|
2854
|
-
AddCircle: AddCircle$1,
|
|
2855
|
-
Circle: Circle$1
|
|
2856
|
-
};
|
|
2345
|
+
var _Screens;
|
|
2346
|
+
var Reducers = _defineProperty__default['default']({}, values.reducerKey, CircleReducer);
|
|
2347
|
+
var Screens = (_Screens = {}, _defineProperty__default['default'](_Screens, values.componentCircles, Circles$1), _defineProperty__default['default'](_Screens, values.componentAddCircle, AddCircle$1), _defineProperty__default['default'](_Screens, values.componentCircle, Circle$1), _Screens);
|
|
2857
2348
|
|
|
2858
2349
|
exports.Config = FeatureConfig;
|
|
2859
2350
|
exports.PreviewFull = PreviewFull;
|