@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.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/helpers/
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/helpers/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@plusscommunities/pluss-circles-web'] = {}, global._asyncToGenerator, global._classCallCheck, global._createClass, global._assertThisInitialized, global._inherits, global._possibleConstructorReturn, global._getPrototypeOf, global.
|
|
5
|
-
}(this, (function (exports, _asyncToGenerator, _classCallCheck, _createClass, _assertThisInitialized, _inherits, _possibleConstructorReturn, _getPrototypeOf,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/helpers/defineProperty'), require('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass'), require('@babel/runtime/helpers/assertThisInitialized'), require('@babel/runtime/helpers/inherits'), require('@babel/runtime/helpers/possibleConstructorReturn'), require('@babel/runtime/helpers/getPrototypeOf'), require('@babel/runtime/regenerator'), require('react'), require('react-redux'), require('lodash'), require('moment'), require('react-router-dom'), require('@plusscommunities/pluss-core-web'), require('react-bootstrap'), require('react-fontawesome'), require('@babel/runtime/helpers/toConsumableArray'), require('react-router')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/helpers/defineProperty', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass', '@babel/runtime/helpers/assertThisInitialized', '@babel/runtime/helpers/inherits', '@babel/runtime/helpers/possibleConstructorReturn', '@babel/runtime/helpers/getPrototypeOf', '@babel/runtime/regenerator', 'react', 'react-redux', 'lodash', 'moment', 'react-router-dom', '@plusscommunities/pluss-core-web', 'react-bootstrap', 'react-fontawesome', '@babel/runtime/helpers/toConsumableArray', 'react-router'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@plusscommunities/pluss-circles-web'] = {}, global._defineProperty, global._asyncToGenerator, global._classCallCheck, global._createClass, global._assertThisInitialized, global._inherits, global._possibleConstructorReturn, global._getPrototypeOf, global._regeneratorRuntime, global.React, global.reactRedux, global._, global.moment, global.reactRouterDom, global.PlussCore, global.reactBootstrap, global.FontAwesome, global._toConsumableArray, global.reactRouter));
|
|
5
|
+
}(this, (function (exports, _defineProperty, _asyncToGenerator, _classCallCheck, _createClass, _assertThisInitialized, _inherits, _possibleConstructorReturn, _getPrototypeOf, _regeneratorRuntime, React, reactRedux, _, moment, reactRouterDom, PlussCore, reactBootstrap, FontAwesome, _toConsumableArray, reactRouter) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
29
30
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
30
31
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
31
32
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
34
35
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
35
36
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
36
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
37
37
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
38
38
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
39
39
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
@@ -42,46 +42,85 @@
|
|
|
42
42
|
var FontAwesome__default = /*#__PURE__*/_interopDefaultLegacy(FontAwesome);
|
|
43
43
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
44
44
|
|
|
45
|
+
var values = {
|
|
46
|
+
featureKey: 'circles',
|
|
47
|
+
entityKey: 'circle',
|
|
48
|
+
entityName: 'circle',
|
|
49
|
+
serviceKey: 'circles',
|
|
50
|
+
permission: 'circles',
|
|
51
|
+
menuIcon: 'circle-o',
|
|
52
|
+
isFontAwesome: true,
|
|
53
|
+
reducerKey: 'circles',
|
|
54
|
+
actionCircleKey: 'CIRCLE',
|
|
55
|
+
textFeatureTitle: 'Circles',
|
|
56
|
+
textAddMenuTitle: 'Circle',
|
|
57
|
+
textEmptyGroups: "You aren't in any Circles",
|
|
58
|
+
textEmptyPeople: 'Contacts will show here',
|
|
59
|
+
componentCircles: 'Circles',
|
|
60
|
+
componentAddCircle: 'AddCircle',
|
|
61
|
+
componentCircle: 'Circle',
|
|
62
|
+
inviteKey: 'circleInvite',
|
|
63
|
+
messageKey: 'circleMessage',
|
|
64
|
+
chatRoute: 'circleChat',
|
|
65
|
+
updateKeyUserCircles: 'userCircles',
|
|
66
|
+
allowPublicKey: 'circleAllowPublicCircles',
|
|
67
|
+
allowPublicKeyDefault: false,
|
|
68
|
+
settings: {
|
|
69
|
+
allowAnyCreate: false
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
45
73
|
// import * as PlussCore from '../../pluss-core/src';
|
|
46
74
|
var FeatureConfig = {
|
|
47
|
-
key:
|
|
48
|
-
singularName: '
|
|
49
|
-
description:
|
|
50
|
-
emptyText: "You aren't in any
|
|
51
|
-
widgetOptions: [
|
|
75
|
+
key: values.featureKey,
|
|
76
|
+
singularName: ___default['default'].capitalize(values.entityName),
|
|
77
|
+
description: "App users can create ".concat(values.entityName, "s and message each other."),
|
|
78
|
+
emptyText: "You aren't in any ".concat(___default['default'].capitalize(values.entityName), "s"),
|
|
79
|
+
widgetOptions: [{
|
|
80
|
+
widget: true,
|
|
81
|
+
main: true,
|
|
82
|
+
hideOnTabNumbers: [],
|
|
83
|
+
optionKey: values.allowPublicKey,
|
|
84
|
+
type: 'toggle',
|
|
85
|
+
inverseOption: false,
|
|
86
|
+
title: "Allow for public ".concat(values.entityName, "s"),
|
|
87
|
+
description: "Public ".concat(values.entityName, "s can be viewed and joined by anyone in the community."),
|
|
88
|
+
defaultNew: values.allowPublicKeyDefault,
|
|
89
|
+
default: values.allowPublicKeyDefault
|
|
90
|
+
}],
|
|
52
91
|
menu: {
|
|
53
92
|
order: 11,
|
|
54
|
-
text:
|
|
55
|
-
icon:
|
|
56
|
-
isFontAwesome:
|
|
57
|
-
url:
|
|
93
|
+
text: values.textFeatureTitle,
|
|
94
|
+
icon: values.menuIcon,
|
|
95
|
+
isFontAwesome: values.isFontAwesome,
|
|
96
|
+
url: "/".concat(values.featureKey),
|
|
58
97
|
countProps: null,
|
|
59
98
|
visibleExps: {
|
|
60
99
|
type: 'feature',
|
|
61
|
-
value:
|
|
100
|
+
value: values.featureKey
|
|
62
101
|
}
|
|
63
102
|
},
|
|
64
|
-
addUrl:
|
|
65
|
-
addPermission:
|
|
103
|
+
addUrl: "/".concat(values.featureKey, "/add"),
|
|
104
|
+
addPermission: values.permission,
|
|
66
105
|
permissions: [{
|
|
67
|
-
displayName:
|
|
68
|
-
key:
|
|
106
|
+
displayName: "Manage and View ".concat(___default['default'].capitalize(values.entityName), "s"),
|
|
107
|
+
key: values.permission
|
|
69
108
|
}],
|
|
70
109
|
routes: [{
|
|
71
|
-
path:
|
|
72
|
-
component:
|
|
110
|
+
path: "/".concat(values.featureKey),
|
|
111
|
+
component: values.componentCircles,
|
|
73
112
|
exact: false
|
|
74
113
|
}, {
|
|
75
|
-
path:
|
|
76
|
-
component:
|
|
114
|
+
path: "/".concat(values.featureKey, "/add"),
|
|
115
|
+
component: values.componentAddCircle,
|
|
77
116
|
exact: true
|
|
78
117
|
}, {
|
|
79
|
-
path:
|
|
80
|
-
component:
|
|
118
|
+
path: "/".concat(values.featureKey, "/").concat(values.entityKey, "/:circleId"),
|
|
119
|
+
component: values.componentCircle,
|
|
81
120
|
exact: true
|
|
82
121
|
}, {
|
|
83
|
-
path:
|
|
84
|
-
component:
|
|
122
|
+
path: "/".concat(values.featureKey, "/edit/:circleId"),
|
|
123
|
+
component: values.componentAddCircle,
|
|
85
124
|
exact: true
|
|
86
125
|
}],
|
|
87
126
|
env: {
|
|
@@ -107,9 +146,9 @@
|
|
|
107
146
|
}
|
|
108
147
|
};
|
|
109
148
|
|
|
110
|
-
var CIRCLES_LOADED =
|
|
111
|
-
var CIRCLE_UPDATED =
|
|
112
|
-
var CIRCLE_REMOVED =
|
|
149
|
+
var CIRCLES_LOADED = "".concat(values.actionCircleKey, "S_LOADED");
|
|
150
|
+
var CIRCLE_UPDATED = "".concat(values.actionCircleKey, "_UPDATED");
|
|
151
|
+
var CIRCLE_REMOVED = "".concat(values.actionCircleKey, "_REMOVED");
|
|
113
152
|
|
|
114
153
|
var circlesLoaded = function circlesLoaded(circles) {
|
|
115
154
|
return {
|
|
@@ -136,7 +175,7 @@
|
|
|
136
175
|
getAll: function getAll(site) {
|
|
137
176
|
return Session$3.authedFunction({
|
|
138
177
|
method: 'GET',
|
|
139
|
-
url: Helper$3.getUrl(
|
|
178
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/all', {
|
|
140
179
|
site: site
|
|
141
180
|
})
|
|
142
181
|
});
|
|
@@ -144,7 +183,7 @@
|
|
|
144
183
|
getFiles: function getFiles(circleId) {
|
|
145
184
|
return Session$3.authedFunction({
|
|
146
185
|
method: 'GET',
|
|
147
|
-
url: Helper$3.getUrl(
|
|
186
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/files', {
|
|
148
187
|
circleId: circleId
|
|
149
188
|
})
|
|
150
189
|
});
|
|
@@ -152,39 +191,41 @@
|
|
|
152
191
|
getImages: function getImages(circleId) {
|
|
153
192
|
return Session$3.authedFunction({
|
|
154
193
|
method: 'GET',
|
|
155
|
-
url: Helper$3.getUrl(
|
|
194
|
+
url: Helper$3.getUrl(values.serviceKey, 'get/images', {
|
|
156
195
|
circleId: circleId
|
|
157
196
|
})
|
|
158
197
|
});
|
|
159
198
|
},
|
|
160
|
-
add: function add(site, title, image, audience) {
|
|
199
|
+
add: function add(site, title, image, audience, isPublic) {
|
|
161
200
|
return Session$3.authedFunction({
|
|
162
201
|
method: 'POST',
|
|
163
|
-
url: Helper$3.getUrl(
|
|
202
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/add'),
|
|
164
203
|
data: {
|
|
165
204
|
site: site,
|
|
166
205
|
title: title,
|
|
167
206
|
image: image,
|
|
168
|
-
audience: audience
|
|
207
|
+
audience: audience,
|
|
208
|
+
isPublic: isPublic
|
|
169
209
|
}
|
|
170
210
|
});
|
|
171
211
|
},
|
|
172
|
-
edit: function edit(circleId, title, image, audience) {
|
|
212
|
+
edit: function edit(circleId, title, image, audience, isPublic) {
|
|
173
213
|
return Session$3.authedFunction({
|
|
174
214
|
method: 'POST',
|
|
175
|
-
url: Helper$3.getUrl(
|
|
215
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/edit'),
|
|
176
216
|
data: {
|
|
177
217
|
circleId: circleId,
|
|
178
218
|
title: title,
|
|
179
219
|
image: image,
|
|
180
|
-
audience: audience
|
|
220
|
+
audience: audience,
|
|
221
|
+
isPublic: isPublic
|
|
181
222
|
}
|
|
182
223
|
});
|
|
183
224
|
},
|
|
184
225
|
delete: function _delete(circleId) {
|
|
185
226
|
return Session$3.authedFunction({
|
|
186
227
|
method: 'POST',
|
|
187
|
-
url: Helper$3.getUrl(
|
|
228
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/delete'),
|
|
188
229
|
data: {
|
|
189
230
|
circleId: circleId
|
|
190
231
|
}
|
|
@@ -193,7 +234,7 @@
|
|
|
193
234
|
addAdmin: function addAdmin(circleId, userId) {
|
|
194
235
|
return Session$3.authedFunction({
|
|
195
236
|
method: 'POST',
|
|
196
|
-
url: Helper$3.getUrl(
|
|
237
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/addadmin'),
|
|
197
238
|
data: {
|
|
198
239
|
circleId: circleId,
|
|
199
240
|
userId: userId
|
|
@@ -203,7 +244,7 @@
|
|
|
203
244
|
removeAdmin: function removeAdmin(circleId, userId) {
|
|
204
245
|
return Session$3.authedFunction({
|
|
205
246
|
method: 'POST',
|
|
206
|
-
url: Helper$3.getUrl(
|
|
247
|
+
url: Helper$3.getUrl(values.serviceKey, 'update/removeadmin'),
|
|
207
248
|
data: {
|
|
208
249
|
circleId: circleId,
|
|
209
250
|
userId: userId
|
|
@@ -235,7 +276,7 @@
|
|
|
235
276
|
|
|
236
277
|
return _context.abrupt("return", Session$3.authedFunction({
|
|
237
278
|
method: 'GET',
|
|
238
|
-
url: Helper$3.getUrl(
|
|
279
|
+
url: Helper$3.getUrl(values.serviceKey, 'getMessages', query)
|
|
239
280
|
}));
|
|
240
281
|
|
|
241
282
|
case 5:
|
|
@@ -260,7 +301,7 @@
|
|
|
260
301
|
case 0:
|
|
261
302
|
return _context2.abrupt("return", Session$3.authedFunction({
|
|
262
303
|
method: 'post',
|
|
263
|
-
url: Helper$3.getUrl(
|
|
304
|
+
url: Helper$3.getUrl(values.serviceKey, 'sendMessage'),
|
|
264
305
|
data: {
|
|
265
306
|
groupId: circleId,
|
|
266
307
|
message: message
|
|
@@ -350,14 +391,14 @@
|
|
|
350
391
|
|
|
351
392
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "canAddNew", function () {
|
|
352
393
|
var auth = _this.props.auth;
|
|
353
|
-
return Session$2.validateAccess(auth.site,
|
|
394
|
+
return Session$2.validateAccess(auth.site, values.permission, auth);
|
|
354
395
|
});
|
|
355
396
|
|
|
356
397
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "onAddNew", function () {
|
|
357
398
|
var auth = _this.props.auth;
|
|
358
399
|
|
|
359
|
-
if (Session$2.validateAccess(auth.site,
|
|
360
|
-
_this.props.history.push("/
|
|
400
|
+
if (Session$2.validateAccess(auth.site, values.permission, auth)) {
|
|
401
|
+
_this.props.history.push("/".concat(values.featureKey, "/add"));
|
|
361
402
|
}
|
|
362
403
|
});
|
|
363
404
|
|
|
@@ -423,7 +464,7 @@
|
|
|
423
464
|
});
|
|
424
465
|
|
|
425
466
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "removeCircle", function (circle) {
|
|
426
|
-
if (window.confirm("Are you sure you want to delete that
|
|
467
|
+
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, "."))) {
|
|
427
468
|
_this.props.circleRemoved(circle.Id);
|
|
428
469
|
|
|
429
470
|
circleActions.delete(circle.Id).then(function (res) {
|
|
@@ -439,7 +480,7 @@
|
|
|
439
480
|
return 'Private Message';
|
|
440
481
|
}
|
|
441
482
|
|
|
442
|
-
return '
|
|
483
|
+
return ___default['default'].capitalize(values.entityName);
|
|
443
484
|
});
|
|
444
485
|
|
|
445
486
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "getTitle", function (circle) {
|
|
@@ -513,7 +554,7 @@
|
|
|
513
554
|
value: function validateCircleAdmin(circle, onlyCreator) {
|
|
514
555
|
var _this4 = this;
|
|
515
556
|
|
|
516
|
-
if (Session$2.validateAccess(this.props.auth.site,
|
|
557
|
+
if (Session$2.validateAccess(this.props.auth.site, values.permission, this.props.auth)) {
|
|
517
558
|
return true;
|
|
518
559
|
}
|
|
519
560
|
|
|
@@ -535,7 +576,7 @@
|
|
|
535
576
|
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
536
577
|
className: "table-TitleColumn"
|
|
537
578
|
}, /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
538
|
-
to: "/
|
|
579
|
+
to: "/".concat(values.featureKey, "/").concat(values.entityKey, "/").concat(circle.Id)
|
|
539
580
|
}, 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) {
|
|
540
581
|
return /*#__PURE__*/React__default['default'].createElement(Components$2.ProfilePic, {
|
|
541
582
|
size: 30,
|
|
@@ -551,7 +592,7 @@
|
|
|
551
592
|
alignItems: 'center'
|
|
552
593
|
}
|
|
553
594
|
}, this.validateCircleAdmin(circle) && !circle.IsPrivate && /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
554
|
-
to: "/
|
|
595
|
+
to: "/".concat(values.featureKey, "/edit/").concat(circle.Id)
|
|
555
596
|
}, /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
|
|
556
597
|
style: {
|
|
557
598
|
fontSize: 20,
|
|
@@ -673,7 +714,7 @@
|
|
|
673
714
|
onClick: function onClick() {
|
|
674
715
|
_this7.selectTypeFilter('circle');
|
|
675
716
|
},
|
|
676
|
-
text:
|
|
717
|
+
text: ___default['default'].capitalize(values.entityName),
|
|
677
718
|
className: "marginRight-10"
|
|
678
719
|
}), /*#__PURE__*/React__default['default'].createElement(Components$2.Tag, {
|
|
679
720
|
onClick: function onClick() {
|
|
@@ -689,13 +730,13 @@
|
|
|
689
730
|
|
|
690
731
|
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, {
|
|
691
732
|
onClick: this.onAddNew,
|
|
692
|
-
text: "NEW
|
|
733
|
+
text: "NEW ".concat(___default['default'].upperCase(values.entityName))
|
|
693
734
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
694
735
|
className: "pageContainer paddingVertical-20 paddingHorizontal-40"
|
|
695
736
|
}, /*#__PURE__*/React__default['default'].createElement(Components$2.Text, {
|
|
696
737
|
type: "h1",
|
|
697
738
|
className: ""
|
|
698
|
-
},
|
|
739
|
+
}, values.textFeatureTitle), this.renderFilters(), /*#__PURE__*/React__default['default'].createElement(reactBootstrap.Table, {
|
|
699
740
|
className: "plussTable",
|
|
700
741
|
striped: true,
|
|
701
742
|
bordered: true,
|
|
@@ -720,7 +761,7 @@
|
|
|
720
761
|
}(React.Component);
|
|
721
762
|
|
|
722
763
|
var mapStateToProps$2 = function mapStateToProps(state) {
|
|
723
|
-
var circles = state.
|
|
764
|
+
var circles = state[values.reducerKey].circles;
|
|
724
765
|
var auth = state.auth;
|
|
725
766
|
return {
|
|
726
767
|
circles: circles,
|
|
@@ -807,6 +848,7 @@
|
|
|
807
848
|
});
|
|
808
849
|
var newState = {
|
|
809
850
|
title: circle.Title,
|
|
851
|
+
isPublic: !!circle.IsPublic,
|
|
810
852
|
selectedUsers: selectedUsers
|
|
811
853
|
};
|
|
812
854
|
|
|
@@ -937,7 +979,7 @@
|
|
|
937
979
|
});
|
|
938
980
|
|
|
939
981
|
if (_this.state.circleId) {
|
|
940
|
-
circleActions.edit(_this.state.circleId, _this.state.title, _this.state.image, audience).then(function (res) {
|
|
982
|
+
circleActions.edit(_this.state.circleId, _this.state.title, _this.state.image, audience, _this.state.isPublic).then(function (res) {
|
|
941
983
|
_this.setState({
|
|
942
984
|
success: true,
|
|
943
985
|
updating: false
|
|
@@ -956,7 +998,7 @@
|
|
|
956
998
|
alert('Something went wrong with the request. Please try again.');
|
|
957
999
|
});
|
|
958
1000
|
} else {
|
|
959
|
-
circleActions.add(_this.props.auth.site, _this.state.title, _this.state.image, audience).then(function (res) {
|
|
1001
|
+
circleActions.add(_this.props.auth.site, _this.state.title, _this.state.image, audience, _this.state.isPublic).then(function (res) {
|
|
960
1002
|
_this.setState({
|
|
961
1003
|
success: true,
|
|
962
1004
|
updating: false
|
|
@@ -1004,7 +1046,9 @@
|
|
|
1004
1046
|
success: false,
|
|
1005
1047
|
users: [],
|
|
1006
1048
|
selectedUsers: [],
|
|
1007
|
-
userSearch: ''
|
|
1049
|
+
userSearch: '',
|
|
1050
|
+
isPublic: false,
|
|
1051
|
+
selectedOption: 'visibility'
|
|
1008
1052
|
};
|
|
1009
1053
|
return _this;
|
|
1010
1054
|
}
|
|
@@ -1013,7 +1057,7 @@
|
|
|
1013
1057
|
key: "componentDidMount",
|
|
1014
1058
|
value: function componentDidMount() {
|
|
1015
1059
|
Session$1.checkLoggedIn(this, this.props.auth);
|
|
1016
|
-
this.props.addRecentlyCreated(
|
|
1060
|
+
this.props.addRecentlyCreated(values.entityKey);
|
|
1017
1061
|
this.getUsers();
|
|
1018
1062
|
this.checkGetCircle();
|
|
1019
1063
|
}
|
|
@@ -1059,13 +1103,13 @@
|
|
|
1059
1103
|
value: function renderSuccess() {
|
|
1060
1104
|
if (!this.state.success) return null;
|
|
1061
1105
|
return /*#__PURE__*/React__default['default'].createElement(Components$1.SuccessPopup, {
|
|
1062
|
-
text: "
|
|
1106
|
+
text: "".concat(___default['default'].capitalize(values.entityName), " has been ").concat(this.state.circleId == null ? 'added' : 'edited'),
|
|
1063
1107
|
buttons: [{
|
|
1064
1108
|
type: 'outlined',
|
|
1065
1109
|
onClick: function onClick() {
|
|
1066
1110
|
window.history.back();
|
|
1067
1111
|
},
|
|
1068
|
-
text: "Back to
|
|
1112
|
+
text: "Back to ".concat(values.textFeatureTitle)
|
|
1069
1113
|
}]
|
|
1070
1114
|
});
|
|
1071
1115
|
}
|
|
@@ -1084,7 +1128,7 @@
|
|
|
1084
1128
|
inline: true,
|
|
1085
1129
|
buttonType: "tertiary",
|
|
1086
1130
|
onClick: function onClick() {
|
|
1087
|
-
return _this4.props.history.push(
|
|
1131
|
+
return _this4.props.history.push("/".concat(values.featureKey));
|
|
1088
1132
|
},
|
|
1089
1133
|
isActive: true,
|
|
1090
1134
|
style: {
|
|
@@ -1098,24 +1142,88 @@
|
|
|
1098
1142
|
}, "Save"));
|
|
1099
1143
|
}
|
|
1100
1144
|
}, {
|
|
1101
|
-
key: "
|
|
1102
|
-
value: function
|
|
1145
|
+
key: "renderVisibility",
|
|
1146
|
+
value: function renderVisibility() {
|
|
1103
1147
|
var _this5 = this;
|
|
1104
1148
|
|
|
1105
1149
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1150
|
+
className: "optionsContent_bottom"
|
|
1151
|
+
}, /*#__PURE__*/React__default['default'].createElement(Components$1.RadioButton, {
|
|
1152
|
+
label: "Do you want to make this ".concat(values.entityName, " a public ").concat(values.entityName, "?"),
|
|
1153
|
+
isActive: this.state.isPublic,
|
|
1154
|
+
options: [{
|
|
1155
|
+
Label: 'Yes',
|
|
1156
|
+
Value: true,
|
|
1157
|
+
onChange: function onChange() {
|
|
1158
|
+
return _this5.setState({
|
|
1159
|
+
isPublic: true
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
}, {
|
|
1163
|
+
Label: 'No',
|
|
1164
|
+
Value: false,
|
|
1165
|
+
onChange: function onChange() {
|
|
1166
|
+
return _this5.setState({
|
|
1167
|
+
isPublic: false
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
}]
|
|
1171
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1172
|
+
className: "genericInput-help",
|
|
1106
1173
|
style: {
|
|
1107
|
-
|
|
1174
|
+
marginTop: 4
|
|
1108
1175
|
}
|
|
1109
|
-
},
|
|
1176
|
+
}, "This will allow anyone in the community to view and join the ".concat(values.entityName, ".")));
|
|
1177
|
+
}
|
|
1178
|
+
}, {
|
|
1179
|
+
key: "renderSelectedOption",
|
|
1180
|
+
value: function renderSelectedOption() {
|
|
1181
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1182
|
+
style: {
|
|
1183
|
+
display: this.state.selectedOption === 'visibility' ? 'block' : 'none'
|
|
1184
|
+
}
|
|
1185
|
+
}, this.renderVisibility()));
|
|
1186
|
+
}
|
|
1187
|
+
}, {
|
|
1188
|
+
key: "renderOptionsSection",
|
|
1189
|
+
value: function renderOptionsSection() {
|
|
1190
|
+
var options = [{
|
|
1191
|
+
key: 'visibility',
|
|
1192
|
+
icon: 'people3',
|
|
1193
|
+
text: 'Visibility'
|
|
1194
|
+
}];
|
|
1195
|
+
|
|
1196
|
+
if (!this.props.circleAllowPublicCircles) {
|
|
1197
|
+
options = ___default['default'].filter(options, function (o) {
|
|
1198
|
+
return o.key !== 'visibility';
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
if (___default['default'].isEmpty(options)) {
|
|
1203
|
+
return null;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
return /*#__PURE__*/React__default['default'].createElement(Components$1.OptionsSection, {
|
|
1207
|
+
options: options,
|
|
1208
|
+
selected: this.state.selectedOption,
|
|
1209
|
+
selectOption: this.selectOption
|
|
1210
|
+
}, this.renderSelectedOption());
|
|
1211
|
+
}
|
|
1212
|
+
}, {
|
|
1213
|
+
key: "renderMain",
|
|
1214
|
+
value: function renderMain() {
|
|
1215
|
+
var _this6 = this;
|
|
1216
|
+
|
|
1217
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1110
1218
|
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
1111
1219
|
}, /*#__PURE__*/React__default['default'].createElement(Components$1.Text, {
|
|
1112
1220
|
type: "formTitleLarge",
|
|
1113
1221
|
className: "marginBottom-24"
|
|
1114
|
-
}, this.state.circleId == null ? 'New' : 'Edit', "
|
|
1222
|
+
}, this.state.circleId == null ? 'New' : 'Edit', " ", ___default['default'].capitalize(values.entityName)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1115
1223
|
className: "flex flex-reverse"
|
|
1116
1224
|
}, /*#__PURE__*/React__default['default'].createElement(Components$1.ImageInput, {
|
|
1117
1225
|
ref: function ref(_ref2) {
|
|
1118
|
-
|
|
1226
|
+
_this6.imageInput = _ref2;
|
|
1119
1227
|
},
|
|
1120
1228
|
label: "IMAGE",
|
|
1121
1229
|
limit: 1,
|
|
@@ -1129,18 +1237,18 @@
|
|
|
1129
1237
|
id: "title",
|
|
1130
1238
|
type: "text",
|
|
1131
1239
|
label: "Title",
|
|
1132
|
-
placeholder: "Name the
|
|
1240
|
+
placeholder: "Name the ".concat(___default['default'].capitalize(values.entityName)),
|
|
1133
1241
|
value: this.state.title,
|
|
1134
1242
|
onChange: function onChange(e) {
|
|
1135
|
-
return
|
|
1243
|
+
return _this6.onHandleChange(e);
|
|
1136
1244
|
},
|
|
1137
1245
|
isRequired: true,
|
|
1138
1246
|
alwaysShowLabel: true,
|
|
1139
1247
|
isValid: function isValid() {
|
|
1140
|
-
return !___default['default'].isEmpty(
|
|
1248
|
+
return !___default['default'].isEmpty(_this6.state.title);
|
|
1141
1249
|
},
|
|
1142
1250
|
showError: function showError() {
|
|
1143
|
-
return
|
|
1251
|
+
return _this6.state.showWarnings && ___default['default'].isEmpty(_this6.state.title);
|
|
1144
1252
|
}
|
|
1145
1253
|
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1146
1254
|
className: "padding-60 paddingVertical-40 bottomDivideBorder"
|
|
@@ -1160,7 +1268,7 @@
|
|
|
1160
1268
|
placeholder: "Enter name",
|
|
1161
1269
|
value: this.state.userSearch,
|
|
1162
1270
|
onChange: function onChange(e) {
|
|
1163
|
-
return
|
|
1271
|
+
return _this6.onHandleChange(e);
|
|
1164
1272
|
},
|
|
1165
1273
|
alwaysShowLabel: true
|
|
1166
1274
|
}), this.getShownUsers().map(function (user) {
|
|
@@ -1168,7 +1276,7 @@
|
|
|
1168
1276
|
key: user.userId,
|
|
1169
1277
|
user: user,
|
|
1170
1278
|
onClick: function onClick() {
|
|
1171
|
-
|
|
1279
|
+
_this6.onSelectUser(user);
|
|
1172
1280
|
}
|
|
1173
1281
|
});
|
|
1174
1282
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -1187,15 +1295,15 @@
|
|
|
1187
1295
|
icon: "close",
|
|
1188
1296
|
colour: Colours$1.COLOUR_DUSK,
|
|
1189
1297
|
onClick: function onClick() {
|
|
1190
|
-
|
|
1298
|
+
_this6.onSelectUser(user);
|
|
1191
1299
|
}
|
|
1192
1300
|
}), /*#__PURE__*/React__default['default'].createElement(Components$1.StatusButton, {
|
|
1193
1301
|
isActive: user.isAdmin,
|
|
1194
1302
|
activate: function activate() {
|
|
1195
|
-
|
|
1303
|
+
_this6.addAdmin(user);
|
|
1196
1304
|
},
|
|
1197
1305
|
deactivate: function deactivate() {
|
|
1198
|
-
|
|
1306
|
+
_this6.removeAdmin(user);
|
|
1199
1307
|
},
|
|
1200
1308
|
activeText: "Admin",
|
|
1201
1309
|
activateText: "Make Admin",
|
|
@@ -1203,7 +1311,7 @@
|
|
|
1203
1311
|
inactiveText: "Not Admin"
|
|
1204
1312
|
}))
|
|
1205
1313
|
});
|
|
1206
|
-
})))));
|
|
1314
|
+
})))), this.renderOptionsSection());
|
|
1207
1315
|
}
|
|
1208
1316
|
}, {
|
|
1209
1317
|
key: "render",
|
|
@@ -1221,11 +1329,12 @@
|
|
|
1221
1329
|
}(React.Component);
|
|
1222
1330
|
|
|
1223
1331
|
var mapStateToProps$1 = function mapStateToProps(state) {
|
|
1224
|
-
var circles = state.
|
|
1332
|
+
var circles = state[values.reducerKey].circles;
|
|
1225
1333
|
var auth = state.auth;
|
|
1226
1334
|
return {
|
|
1227
1335
|
circles: circles,
|
|
1228
|
-
auth: auth
|
|
1336
|
+
auth: auth,
|
|
1337
|
+
circleAllowPublicCircles: Helper$1.getSiteSettingFromState(state, values.allowPublicKey)
|
|
1229
1338
|
};
|
|
1230
1339
|
};
|
|
1231
1340
|
|
|
@@ -1235,619 +1344,6 @@
|
|
|
1235
1344
|
addRecentlyCreated: Actions$1.addRecentlyCreated
|
|
1236
1345
|
})(reactRouter.withRouter(AddCircle));
|
|
1237
1346
|
|
|
1238
|
-
var getFileName = function getFileName(url, noExtension) {
|
|
1239
|
-
if (!url) {
|
|
1240
|
-
return null;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
var fileSplit = url.split('/');
|
|
1244
|
-
var name = fileSplit[fileSplit.length - 1].toLowerCase();
|
|
1245
|
-
|
|
1246
|
-
if (!noExtension) {
|
|
1247
|
-
return name;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
return name.split('.')[0];
|
|
1251
|
-
};
|
|
1252
|
-
|
|
1253
|
-
var getPluralS = function getPluralS(count) {
|
|
1254
|
-
if (count === 1) {
|
|
1255
|
-
return '';
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
return 's';
|
|
1259
|
-
};
|
|
1260
|
-
// if (!count) {
|
|
1261
|
-
// return '0%';
|
|
1262
|
-
// }
|
|
1263
|
-
// if (!total) {
|
|
1264
|
-
// return '100%';
|
|
1265
|
-
// }
|
|
1266
|
-
// return `${Math.round((100 * count) / total)}%`;
|
|
1267
|
-
// };
|
|
1268
|
-
// export const getUserPreview = (user) => {
|
|
1269
|
-
// return {
|
|
1270
|
-
// displayName: user.displayName,
|
|
1271
|
-
// id: user.Id,
|
|
1272
|
-
// profilePic: user.profilePic || defaultProfileImage,
|
|
1273
|
-
// };
|
|
1274
|
-
// };
|
|
1275
|
-
// export const usersToPreviews = (users) => {
|
|
1276
|
-
// return _.map(users, getUserPreview);
|
|
1277
|
-
// };
|
|
1278
|
-
// export const getSiteNameFromRoles = (site, roles) => {
|
|
1279
|
-
// return getSiteName(
|
|
1280
|
-
// site,
|
|
1281
|
-
// roles.map((r) => {
|
|
1282
|
-
// return r.siteInfo;
|
|
1283
|
-
// }),
|
|
1284
|
-
// );
|
|
1285
|
-
// };
|
|
1286
|
-
// export const getSiteName = (site, sites) => {
|
|
1287
|
-
// if (site === 'hq') {
|
|
1288
|
-
// return 'HQ';
|
|
1289
|
-
// }
|
|
1290
|
-
// const siteObject = _.find(sites, (t) => {
|
|
1291
|
-
// return t.Id === site;
|
|
1292
|
-
// });
|
|
1293
|
-
// if (siteObject) {
|
|
1294
|
-
// return siteObject.siteName;
|
|
1295
|
-
// }
|
|
1296
|
-
// return site;
|
|
1297
|
-
// };
|
|
1298
|
-
// export const formatCurrency = (number, locale = 'en-AU', curencyCode = 'AUD', shouldFix = false) => {
|
|
1299
|
-
// const formatter = Intl.NumberFormat(locale, { style: 'currency', currency: curencyCode, minimumFractionDigits: 2 });
|
|
1300
|
-
// let formattedNumber = number;
|
|
1301
|
-
// if (shouldFix && formatter.format(formattedNumber).indexOf('NaN') > -1) {
|
|
1302
|
-
// formattedNumber = number.replace(/[^\d.-]/g, '');
|
|
1303
|
-
// }
|
|
1304
|
-
// return formatter.format(formattedNumber);
|
|
1305
|
-
// };
|
|
1306
|
-
// export const currencyToFloat = (number) => {
|
|
1307
|
-
// let result = parseFloat(number);
|
|
1308
|
-
// if (isNaN(result)) {
|
|
1309
|
-
// result = parseFloat(number.replace(/[^\d.-]/g, ''));
|
|
1310
|
-
// if (isNaN(result)) {
|
|
1311
|
-
// result = 0;
|
|
1312
|
-
// }
|
|
1313
|
-
// }
|
|
1314
|
-
// return result;
|
|
1315
|
-
// };
|
|
1316
|
-
// export const getCurrencySymbol = () => {
|
|
1317
|
-
// return formatCurrency(0).replace(/[0-9.]+/g, '');
|
|
1318
|
-
// };
|
|
1319
|
-
// export const isCurrency = (text) => {
|
|
1320
|
-
// if (!text) return false;
|
|
1321
|
-
// const price = parseFloat(typeof text === 'string' ? text.replace(getCurrencySymbol(), '') : text, 10);
|
|
1322
|
-
// return _.isNumber(price) && !Number.isNaN(price) ? price : false;
|
|
1323
|
-
// };
|
|
1324
|
-
// export const isPaidItem = (enabled, tickets) => {
|
|
1325
|
-
// // console.log('isPaidItem', enabled, tickets);
|
|
1326
|
-
// return (
|
|
1327
|
-
// enabled &&
|
|
1328
|
-
// tickets &&
|
|
1329
|
-
// tickets.merchant &&
|
|
1330
|
-
// tickets.categories &&
|
|
1331
|
-
// tickets.categories.length > 0 &&
|
|
1332
|
-
// tickets.categories.every((t) => !t.price || _.isNumber(t.price))
|
|
1333
|
-
// );
|
|
1334
|
-
// };
|
|
1335
|
-
// export const getTotalQuantity = (tickets) => _.sumBy(tickets, (t) => t.quantity || 0);
|
|
1336
|
-
// export const getTotalPrice = (tickets) => _.sumBy(tickets, (t) => t.price * (t.quantity || 0));
|
|
1337
|
-
// export const parseTickets = (tickets, merchant) => {
|
|
1338
|
-
// if (Array.isArray(tickets)) return { merchant, categories: tickets };
|
|
1339
|
-
// if (tickets && typeof tickets === 'object') return tickets;
|
|
1340
|
-
// return { merchant, categories: [{ category: 'Default', price: tickets }] };
|
|
1341
|
-
// };
|
|
1342
|
-
// export const compileTickets = (tickets, merchant) => {
|
|
1343
|
-
// const newTickets = _.cloneDeep(tickets);
|
|
1344
|
-
// newTickets.merchant = merchant;
|
|
1345
|
-
// newTickets.categories = newTickets.categories.map((ticket) => {
|
|
1346
|
-
// ticket.price = isCurrency(ticket.price);
|
|
1347
|
-
// return ticket;
|
|
1348
|
-
// });
|
|
1349
|
-
// return newTickets;
|
|
1350
|
-
// };
|
|
1351
|
-
// export const getTicketPriceText = (ticket) => {
|
|
1352
|
-
// return typeof ticket.price === 'string' ? ticket.price : formatCurrency(ticket.price);
|
|
1353
|
-
// };
|
|
1354
|
-
// export const isTicketCategoryValid = (ticket, ticketDetail) => {
|
|
1355
|
-
// return !_.isEmpty(ticket.category) && ticketDetail.categories.filter((t) => t.category === ticket.category).length === 1;
|
|
1356
|
-
// };
|
|
1357
|
-
// export const isTicketPriceValid = (ticket) => {
|
|
1358
|
-
// return ticket.price && isCurrency(ticket.price) !== false;
|
|
1359
|
-
// };
|
|
1360
|
-
// export const isTicketsValid = (tickets) => {
|
|
1361
|
-
// if (tickets && tickets.categories && tickets.categories.length > 0) {
|
|
1362
|
-
// return tickets.categories.every((ticket) => isTicketCategoryValid(ticket, tickets) && isTicketPriceValid(ticket));
|
|
1363
|
-
// }
|
|
1364
|
-
// return true;
|
|
1365
|
-
// };
|
|
1366
|
-
// export const getFee = (feeInfo, amount) => {
|
|
1367
|
-
// if (!feeInfo.fee) return 0;
|
|
1368
|
-
// return feeInfo.isPercentage ? (feeInfo.fee / 100) * amount : feeInfo.fee;
|
|
1369
|
-
// };
|
|
1370
|
-
// export const isRefund = (transaction) => transaction.TransactionType === 'REFUND';
|
|
1371
|
-
// export const combineTickets = (ticketsArray, diff = false) => {
|
|
1372
|
-
// if (_.isNil(ticketsArray) || ticketsArray.length === 0) return [];
|
|
1373
|
-
// const combined = ticketsArray.reduce((a, c) => {
|
|
1374
|
-
// if (_.isNil(a) || a.length === 0) return c;
|
|
1375
|
-
// const summed = a.map((cat) => {
|
|
1376
|
-
// const cloned = _.clone(cat);
|
|
1377
|
-
// const match = c.find((i) => i.category === cloned.category);
|
|
1378
|
-
// cloned.quantity = (diff ? -1 : 1) * (cloned.quantity || 0) + (match ? match.quantity || 0 : 0);
|
|
1379
|
-
// return cloned;
|
|
1380
|
-
// });
|
|
1381
|
-
// return summed;
|
|
1382
|
-
// });
|
|
1383
|
-
// return combined;
|
|
1384
|
-
// };
|
|
1385
|
-
// export const combineTransactions = (transactionsArray) => {
|
|
1386
|
-
// if (_.isNil(transactionsArray) || transactionsArray.length === 0) return null;
|
|
1387
|
-
// const combined = _.orderBy(transactionsArray, 'UnixTimestamp', 'desc').reduce((a, c) => {
|
|
1388
|
-
// // console.log('transaction a', a.TransactionType, a.TransactionId, a.Amount, a.Fee.amount);
|
|
1389
|
-
// // console.log('transaction c', c.TransactionType, c.TransactionId, c.Amount, c.Fee.amount);
|
|
1390
|
-
// const cloned = _.cloneDeep(c);
|
|
1391
|
-
// cloned.Amount = cloned.Amount + a.Amount;
|
|
1392
|
-
// cloned.Fee.amount = cloned.Fee.amount + a.Fee.amount;
|
|
1393
|
-
// cloned.Item.categories = combineTickets([cloned.Item.categories, a.Item.categories]);
|
|
1394
|
-
// return cloned;
|
|
1395
|
-
// });
|
|
1396
|
-
// // console.log('combined', combined.TransactionType, combined.TransactionId, combined.Amount, combined.Fee.amount);
|
|
1397
|
-
// return combined;
|
|
1398
|
-
// };
|
|
1399
|
-
// export const consolidateTransactions = (transactionsArray) => {
|
|
1400
|
-
// const transactions = transactionsArray
|
|
1401
|
-
// .filter((pt) => pt.TransactionType === 'PAYMENT')
|
|
1402
|
-
// .map((p) => {
|
|
1403
|
-
// // Combine with all refunds for the transaction
|
|
1404
|
-
// const refunds = transactionsArray.filter((rt) => rt.TransactionType === 'REFUND' && rt.TransactionId === p.TransactionId);
|
|
1405
|
-
// return combineTransactions([...refunds, p]);
|
|
1406
|
-
// })
|
|
1407
|
-
// .filter((p) => getTotalQuantity(p.Item.categories) > 0);
|
|
1408
|
-
// return transactions;
|
|
1409
|
-
// };
|
|
1410
|
-
// export const isKiosk = (type) => {
|
|
1411
|
-
// return type === 'KIOSK' || type === 'FORMKIOSK' || type === 'SIGNINKIOSK';
|
|
1412
|
-
// };
|
|
1413
|
-
// export const isContentSource = (site) => {
|
|
1414
|
-
// if (`${baseClient}-${baseStage}` !== contentSource) {
|
|
1415
|
-
// return false;
|
|
1416
|
-
// }
|
|
1417
|
-
// return site === contentSourceSite;
|
|
1418
|
-
// };
|
|
1419
|
-
// export const formatDuration = (msDuration) => {
|
|
1420
|
-
// const diff = moment.duration(msDuration);
|
|
1421
|
-
// let result = '';
|
|
1422
|
-
// const days = Math.floor(diff.asDays());
|
|
1423
|
-
// if (days > 0) {
|
|
1424
|
-
// result += `${days} day${getPluralS(days)} `;
|
|
1425
|
-
// diff.add(-days, 'd');
|
|
1426
|
-
// }
|
|
1427
|
-
// const hours = Math.floor(diff.asHours());
|
|
1428
|
-
// if (hours > 0) {
|
|
1429
|
-
// result += `${hours} hour${getPluralS(hours)} `;
|
|
1430
|
-
// diff.add(-hours, 'h');
|
|
1431
|
-
// }
|
|
1432
|
-
// const minutes = Math.floor(diff.asMinutes());
|
|
1433
|
-
// if (minutes > 0) {
|
|
1434
|
-
// result += `${minutes} minute${getPluralS(minutes)} `;
|
|
1435
|
-
// diff.add(-minutes, 'm');
|
|
1436
|
-
// }
|
|
1437
|
-
// if (_.isEmpty(result)) {
|
|
1438
|
-
// return 'Less than a minute';
|
|
1439
|
-
// }
|
|
1440
|
-
// return result.trim();
|
|
1441
|
-
// };
|
|
1442
|
-
// export const readJSONFromStorage = (storage, key, fallback) => {
|
|
1443
|
-
// const value = storage.getItem(key);
|
|
1444
|
-
// if (value) {
|
|
1445
|
-
// return JSON.parse(value);
|
|
1446
|
-
// }
|
|
1447
|
-
// return fallback;
|
|
1448
|
-
// };
|
|
1449
|
-
// export const readStorageWithCookie = (key, isJson) => {
|
|
1450
|
-
// const value = window.localStorage.getItem(key);
|
|
1451
|
-
// if (value) {
|
|
1452
|
-
// if (isJson) {
|
|
1453
|
-
// try {
|
|
1454
|
-
// return JSON.parse(value);
|
|
1455
|
-
// } catch (e) {
|
|
1456
|
-
// console.log('parse error', e);
|
|
1457
|
-
// }
|
|
1458
|
-
// return null;
|
|
1459
|
-
// }
|
|
1460
|
-
// return value;
|
|
1461
|
-
// }
|
|
1462
|
-
// if (isJson) {
|
|
1463
|
-
// return Cookies.getJSON(key);
|
|
1464
|
-
// }
|
|
1465
|
-
// return Cookies.get(key);
|
|
1466
|
-
// };
|
|
1467
|
-
// export const clearLocalStorage = (key) => {
|
|
1468
|
-
// window.localStorage.removeItem(key);
|
|
1469
|
-
// Cookies.remove(key);
|
|
1470
|
-
// };
|
|
1471
|
-
// export const setLocalStorage = (key, value, isJson) => {
|
|
1472
|
-
// window.localStorage.setItem(key, isJson ? JSON.stringify(value) : value);
|
|
1473
|
-
// };
|
|
1474
|
-
// export const TIMESTAMPFORMAT = 'D MMM YYYY h:mma';
|
|
1475
|
-
// export const featureInfo = [
|
|
1476
|
-
// ...extensionFeatureInfo,
|
|
1477
|
-
// {
|
|
1478
|
-
// key: 'dashboard',
|
|
1479
|
-
// order: 1,
|
|
1480
|
-
// text: 'Dashboard',
|
|
1481
|
-
// icon: 'dashboard',
|
|
1482
|
-
// isFontAwesome: false,
|
|
1483
|
-
// url: '/mastermenu',
|
|
1484
|
-
// countProps: null,
|
|
1485
|
-
// visibleExps: null,
|
|
1486
|
-
// },
|
|
1487
|
-
// {
|
|
1488
|
-
// key: 'events',
|
|
1489
|
-
// order: 2,
|
|
1490
|
-
// text: 'Events',
|
|
1491
|
-
// icon: 'event',
|
|
1492
|
-
// isFontAwesome: false,
|
|
1493
|
-
// url: '/events',
|
|
1494
|
-
// addUrl: '/events/event',
|
|
1495
|
-
// addPermission: 'events',
|
|
1496
|
-
// singularName: 'event',
|
|
1497
|
-
// countProps: ['eventSubmissions', 'length'],
|
|
1498
|
-
// visibleExps: {
|
|
1499
|
-
// type: 'and',
|
|
1500
|
-
// exps: [
|
|
1501
|
-
// { type: 'feature', value: 'events' },
|
|
1502
|
-
// {
|
|
1503
|
-
// type: 'or',
|
|
1504
|
-
// exps: [
|
|
1505
|
-
// { type: 'permission', value: 'events' },
|
|
1506
|
-
// { type: 'permission', value: 'eventAttendance' },
|
|
1507
|
-
// { type: 'permission', value: 'eventSubmit' },
|
|
1508
|
-
// ],
|
|
1509
|
-
// },
|
|
1510
|
-
// ],
|
|
1511
|
-
// },
|
|
1512
|
-
// },
|
|
1513
|
-
// {
|
|
1514
|
-
// key: 'news',
|
|
1515
|
-
// order: 3,
|
|
1516
|
-
// text: 'News',
|
|
1517
|
-
// icon: 'news',
|
|
1518
|
-
// isFontAwesome: false,
|
|
1519
|
-
// url: '/news',
|
|
1520
|
-
// addUrl: '/news/article',
|
|
1521
|
-
// addPermission: 'newsletter',
|
|
1522
|
-
// singularName: 'news',
|
|
1523
|
-
// countProps: ['newsSubmissions', 'length'],
|
|
1524
|
-
// visibleExps: {
|
|
1525
|
-
// type: 'and',
|
|
1526
|
-
// exps: [
|
|
1527
|
-
// { type: 'feature', value: 'news' },
|
|
1528
|
-
// {
|
|
1529
|
-
// type: 'or',
|
|
1530
|
-
// exps: [
|
|
1531
|
-
// { type: 'permission', value: 'newsletter' },
|
|
1532
|
-
// { type: 'permission', value: 'newsletterSubmit' },
|
|
1533
|
-
// ],
|
|
1534
|
-
// },
|
|
1535
|
-
// ],
|
|
1536
|
-
// },
|
|
1537
|
-
// },
|
|
1538
|
-
// {
|
|
1539
|
-
// key: 'alerts',
|
|
1540
|
-
// order: 4,
|
|
1541
|
-
// text: 'Alerts',
|
|
1542
|
-
// icon: 'exclamation-triangle',
|
|
1543
|
-
// isFontAwesome: true,
|
|
1544
|
-
// url: '/alerts',
|
|
1545
|
-
// addUrl: '/alerts/addalert',
|
|
1546
|
-
// addPermission: 'alerts',
|
|
1547
|
-
// singularName: 'alert',
|
|
1548
|
-
// countProps: null,
|
|
1549
|
-
// visibleExps: {
|
|
1550
|
-
// type: 'and',
|
|
1551
|
-
// exps: [
|
|
1552
|
-
// { type: 'feature', value: 'alerts' },
|
|
1553
|
-
// { type: 'permission', value: 'alerts' },
|
|
1554
|
-
// ],
|
|
1555
|
-
// },
|
|
1556
|
-
// },
|
|
1557
|
-
// {
|
|
1558
|
-
// key: 'users',
|
|
1559
|
-
// order: 5,
|
|
1560
|
-
// text: 'Users',
|
|
1561
|
-
// icon: 'people',
|
|
1562
|
-
// isFontAwesome: false,
|
|
1563
|
-
// url: '/usershub',
|
|
1564
|
-
// addUrl: '/usershub/adduser',
|
|
1565
|
-
// addPermission: 'userManagement',
|
|
1566
|
-
// singularName: 'user',
|
|
1567
|
-
// countProps: null,
|
|
1568
|
-
// visibleExps: {
|
|
1569
|
-
// type: 'and',
|
|
1570
|
-
// exps: [
|
|
1571
|
-
// { type: 'feature', value: 'users' },
|
|
1572
|
-
// { type: 'permission', value: 'userManagement' },
|
|
1573
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1574
|
-
// ],
|
|
1575
|
-
// },
|
|
1576
|
-
// },
|
|
1577
|
-
// {
|
|
1578
|
-
// key: 'gallery',
|
|
1579
|
-
// order: 6,
|
|
1580
|
-
// text: 'Gallery',
|
|
1581
|
-
// icon: 'picture-o',
|
|
1582
|
-
// isFontAwesome: true,
|
|
1583
|
-
// url: '/imageLibrary',
|
|
1584
|
-
// addPermission: 'addToPublishingImageLibrary',
|
|
1585
|
-
// singularName: 'gallery image',
|
|
1586
|
-
// countProps: null,
|
|
1587
|
-
// visibleExps: {
|
|
1588
|
-
// type: 'and',
|
|
1589
|
-
// exps: [
|
|
1590
|
-
// { type: 'feature', value: 'gallery' },
|
|
1591
|
-
// { type: 'permission', value: 'addToPublishingImageLibrary' },
|
|
1592
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1593
|
-
// ],
|
|
1594
|
-
// },
|
|
1595
|
-
// },
|
|
1596
|
-
// {
|
|
1597
|
-
// key: 'services',
|
|
1598
|
-
// order: 7,
|
|
1599
|
-
// text: 'Services',
|
|
1600
|
-
// icon: 'stethoscope',
|
|
1601
|
-
// isFontAwesome: true,
|
|
1602
|
-
// url: '/services',
|
|
1603
|
-
// addUrl: '/services/service',
|
|
1604
|
-
// addPermission: 'services',
|
|
1605
|
-
// singularName: 'service',
|
|
1606
|
-
// countProps: null,
|
|
1607
|
-
// visibleExps: {
|
|
1608
|
-
// type: 'and',
|
|
1609
|
-
// exps: [
|
|
1610
|
-
// { type: 'feature', value: 'services' },
|
|
1611
|
-
// { type: 'permission', value: 'services' },
|
|
1612
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1613
|
-
// ],
|
|
1614
|
-
// },
|
|
1615
|
-
// },
|
|
1616
|
-
// {
|
|
1617
|
-
// key: 'sponsors',
|
|
1618
|
-
// order: 8,
|
|
1619
|
-
// text: 'Sponsors',
|
|
1620
|
-
// icon: 'star-o',
|
|
1621
|
-
// isFontAwesome: true,
|
|
1622
|
-
// url: '/sponsors',
|
|
1623
|
-
// addUrl: '/sponsors/sponsor',
|
|
1624
|
-
// addPermission: 'services',
|
|
1625
|
-
// singularName: 'sponsor',
|
|
1626
|
-
// countProps: null,
|
|
1627
|
-
// visibleExps: {
|
|
1628
|
-
// type: 'and',
|
|
1629
|
-
// exps: [
|
|
1630
|
-
// { type: 'feature', value: 'services' },
|
|
1631
|
-
// { type: 'permission', value: 'services' },
|
|
1632
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1633
|
-
// ],
|
|
1634
|
-
// },
|
|
1635
|
-
// },
|
|
1636
|
-
// {
|
|
1637
|
-
// key: 'info',
|
|
1638
|
-
// order: 9,
|
|
1639
|
-
// text: 'Information',
|
|
1640
|
-
// icon: 'info',
|
|
1641
|
-
// isFontAwesome: false,
|
|
1642
|
-
// url: '/info',
|
|
1643
|
-
// addUrl: '/info/infopage',
|
|
1644
|
-
// addPermission: 'infoPages',
|
|
1645
|
-
// singularName: CONST_STRINGS.FAQ_ENTRY,
|
|
1646
|
-
// countProps: null,
|
|
1647
|
-
// visibleExps: {
|
|
1648
|
-
// type: 'or',
|
|
1649
|
-
// exps: [
|
|
1650
|
-
// {
|
|
1651
|
-
// type: 'and',
|
|
1652
|
-
// exps: [
|
|
1653
|
-
// { type: 'feature', value: 'importantContacts' },
|
|
1654
|
-
// { type: 'permission', value: 'importantContacts' },
|
|
1655
|
-
// ],
|
|
1656
|
-
// },
|
|
1657
|
-
// {
|
|
1658
|
-
// type: 'and',
|
|
1659
|
-
// exps: [
|
|
1660
|
-
// { type: 'feature', value: 'maps' },
|
|
1661
|
-
// { type: 'permission', value: 'maps' },
|
|
1662
|
-
// ],
|
|
1663
|
-
// },
|
|
1664
|
-
// {
|
|
1665
|
-
// type: 'and',
|
|
1666
|
-
// exps: [
|
|
1667
|
-
// { type: 'feature', value: 'infoPages' },
|
|
1668
|
-
// { type: 'permission', value: 'infoPages' },
|
|
1669
|
-
// ],
|
|
1670
|
-
// },
|
|
1671
|
-
// {
|
|
1672
|
-
// type: 'and',
|
|
1673
|
-
// exps: [
|
|
1674
|
-
// { type: 'feature', value: 'news' },
|
|
1675
|
-
// { type: 'permission', value: 'welcomePages' },
|
|
1676
|
-
// ],
|
|
1677
|
-
// },
|
|
1678
|
-
// { type: 'permission', value: 'terms' },
|
|
1679
|
-
// ],
|
|
1680
|
-
// },
|
|
1681
|
-
// },
|
|
1682
|
-
// {
|
|
1683
|
-
// key: 'surveys',
|
|
1684
|
-
// order: 11,
|
|
1685
|
-
// text: 'Surveys',
|
|
1686
|
-
// icon: 'pie-chart',
|
|
1687
|
-
// isFontAwesome: true,
|
|
1688
|
-
// url: '/polls',
|
|
1689
|
-
// addUrl: '/polls/poll',
|
|
1690
|
-
// addPermission: 'polls',
|
|
1691
|
-
// singularName: 'survey',
|
|
1692
|
-
// countProps: null,
|
|
1693
|
-
// visibleExps: {
|
|
1694
|
-
// type: 'and',
|
|
1695
|
-
// exps: [
|
|
1696
|
-
// { type: 'feature', value: 'surveys' },
|
|
1697
|
-
// { type: 'permission', value: 'polls' },
|
|
1698
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1699
|
-
// ],
|
|
1700
|
-
// },
|
|
1701
|
-
// },
|
|
1702
|
-
// {
|
|
1703
|
-
// key: 'facilities',
|
|
1704
|
-
// order: 12,
|
|
1705
|
-
// text: CONST_STRINGS.FACILITIES,
|
|
1706
|
-
// icon: 'facility',
|
|
1707
|
-
// isFontAwesome: false,
|
|
1708
|
-
// url: '/facilities',
|
|
1709
|
-
// addUrl: '/facilities/facility',
|
|
1710
|
-
// addPermission: 'facilities',
|
|
1711
|
-
// singularName: 'facility',
|
|
1712
|
-
// countProps: null,
|
|
1713
|
-
// visibleExps: {
|
|
1714
|
-
// type: 'and',
|
|
1715
|
-
// exps: [
|
|
1716
|
-
// { type: 'feature', value: 'facilities' },
|
|
1717
|
-
// { type: 'permission', value: 'facilities' },
|
|
1718
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1719
|
-
// ],
|
|
1720
|
-
// },
|
|
1721
|
-
// },
|
|
1722
|
-
// {
|
|
1723
|
-
// key: 'offers',
|
|
1724
|
-
// order: 13,
|
|
1725
|
-
// text: 'Offers',
|
|
1726
|
-
// icon: 'shopping-bag',
|
|
1727
|
-
// isFontAwesome: true,
|
|
1728
|
-
// url: '/offers',
|
|
1729
|
-
// addUrl: '/offers/offer',
|
|
1730
|
-
// addPermission: 'offers',
|
|
1731
|
-
// singularName: 'offer',
|
|
1732
|
-
// countProps: null,
|
|
1733
|
-
// visibleExps: {
|
|
1734
|
-
// type: 'and',
|
|
1735
|
-
// exps: [
|
|
1736
|
-
// { type: 'feature', value: 'offers' },
|
|
1737
|
-
// { type: 'permission', value: 'offers' },
|
|
1738
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1739
|
-
// ],
|
|
1740
|
-
// },
|
|
1741
|
-
// },
|
|
1742
|
-
// {
|
|
1743
|
-
// key: 'signin',
|
|
1744
|
-
// order: 14,
|
|
1745
|
-
// text: 'Sign Ins',
|
|
1746
|
-
// icon: 'signin',
|
|
1747
|
-
// isFontAwesome: false,
|
|
1748
|
-
// url: '/signinHub',
|
|
1749
|
-
// addUrl: null,
|
|
1750
|
-
// addPermission: 'visitors',
|
|
1751
|
-
// singularName: 'visitor',
|
|
1752
|
-
// countProps: null,
|
|
1753
|
-
// visibleExps: {
|
|
1754
|
-
// type: 'and',
|
|
1755
|
-
// exps: [
|
|
1756
|
-
// { type: 'feature', value: 'visitors' },
|
|
1757
|
-
// { type: 'permission', value: 'visitors' },
|
|
1758
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1759
|
-
// ],
|
|
1760
|
-
// },
|
|
1761
|
-
// },
|
|
1762
|
-
// {
|
|
1763
|
-
// key: 'food',
|
|
1764
|
-
// order: 15,
|
|
1765
|
-
// text: 'Restaurant Manager',
|
|
1766
|
-
// icon: 'cutlery',
|
|
1767
|
-
// isFontAwesome: true,
|
|
1768
|
-
// url: '/food',
|
|
1769
|
-
// addUrl: null,
|
|
1770
|
-
// addPermission: 'food',
|
|
1771
|
-
// singularName: 'dish',
|
|
1772
|
-
// countProps: null,
|
|
1773
|
-
// visibleExps: {
|
|
1774
|
-
// type: 'and',
|
|
1775
|
-
// exps: [
|
|
1776
|
-
// { type: 'feature', value: 'food' },
|
|
1777
|
-
// { type: 'permission', value: 'food' },
|
|
1778
|
-
// ],
|
|
1779
|
-
// },
|
|
1780
|
-
// },
|
|
1781
|
-
// {
|
|
1782
|
-
// key: 'payment',
|
|
1783
|
-
// order: 16,
|
|
1784
|
-
// text: 'Payment',
|
|
1785
|
-
// icon: 'usd',
|
|
1786
|
-
// isFontAwesome: true,
|
|
1787
|
-
// url: '/payment',
|
|
1788
|
-
// addUrl: null,
|
|
1789
|
-
// addPermission: null,
|
|
1790
|
-
// singularName: 'payment',
|
|
1791
|
-
// countProps: null,
|
|
1792
|
-
// visibleExps: {
|
|
1793
|
-
// type: 'and',
|
|
1794
|
-
// exps: [
|
|
1795
|
-
// { type: 'props', value: 'paymentEnabled' },
|
|
1796
|
-
// {
|
|
1797
|
-
// type: 'or',
|
|
1798
|
-
// exps: [
|
|
1799
|
-
// { type: 'feature', value: 'managePayments' },
|
|
1800
|
-
// { type: 'permission', value: 'viewPayments' },
|
|
1801
|
-
// ],
|
|
1802
|
-
// },
|
|
1803
|
-
// ],
|
|
1804
|
-
// },
|
|
1805
|
-
// },
|
|
1806
|
-
// {
|
|
1807
|
-
// key: 'automation',
|
|
1808
|
-
// order: 17,
|
|
1809
|
-
// text: 'Automation',
|
|
1810
|
-
// icon: 'bolt',
|
|
1811
|
-
// isFontAwesome: true,
|
|
1812
|
-
// url: '/automationHub',
|
|
1813
|
-
// addUrl: null,
|
|
1814
|
-
// addPermission: null,
|
|
1815
|
-
// singularName: 'automation',
|
|
1816
|
-
// countProps: null,
|
|
1817
|
-
// visibleExps: { type: 'master', value: true },
|
|
1818
|
-
// },
|
|
1819
|
-
// ];
|
|
1820
|
-
// export const getFeatureInfo = (type) => {
|
|
1821
|
-
// switch (type) {
|
|
1822
|
-
// case 'maps':
|
|
1823
|
-
// return {
|
|
1824
|
-
// key: 'maps',
|
|
1825
|
-
// icon: 'map',
|
|
1826
|
-
// isFontAwesome: true,
|
|
1827
|
-
// url: '/info',
|
|
1828
|
-
// addUrl: '/info/map',
|
|
1829
|
-
// addPermission: 'maps',
|
|
1830
|
-
// singularName: 'map',
|
|
1831
|
-
// };
|
|
1832
|
-
// case 'importantContacts':
|
|
1833
|
-
// return {
|
|
1834
|
-
// key: 'importantContacts',
|
|
1835
|
-
// icon: 'address-card-o',
|
|
1836
|
-
// isFontAwesome: true,
|
|
1837
|
-
// url: '/info',
|
|
1838
|
-
// addUrl: '/info/importantcontact',
|
|
1839
|
-
// addPermission: 'importantContacts',
|
|
1840
|
-
// singularName: 'contact',
|
|
1841
|
-
// };
|
|
1842
|
-
// case 'info':
|
|
1843
|
-
// case 'infoPages':
|
|
1844
|
-
// return featureInfo.find((n) => n.key === 'info');
|
|
1845
|
-
// default:
|
|
1846
|
-
// const info = featureInfo.find((n) => n.key === type);
|
|
1847
|
-
// return info || { key: type, icon: type };
|
|
1848
|
-
// }
|
|
1849
|
-
// };
|
|
1850
|
-
|
|
1851
1347
|
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); }; }
|
|
1852
1348
|
|
|
1853
1349
|
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; } }
|
|
@@ -2257,7 +1753,7 @@
|
|
|
2257
1753
|
value: function validateCircleAdmin() {
|
|
2258
1754
|
var _this4 = this;
|
|
2259
1755
|
|
|
2260
|
-
if (Session.validateAccess(this.props.auth.site,
|
|
1756
|
+
if (Session.validateAccess(this.props.auth.site, values.permission, this.props.auth)) {
|
|
2261
1757
|
return true;
|
|
2262
1758
|
}
|
|
2263
1759
|
|
|
@@ -2274,7 +1770,7 @@
|
|
|
2274
1770
|
return /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2275
1771
|
type: "highlightedHelp",
|
|
2276
1772
|
className: "chat_noMessage"
|
|
2277
|
-
}, "You can't send a message to this
|
|
1773
|
+
}, "You can't send a message to this ", ___default['default'].capitalize(values.entityName), " as you are not a member.");
|
|
2278
1774
|
}
|
|
2279
1775
|
|
|
2280
1776
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -2405,7 +1901,7 @@
|
|
|
2405
1901
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2406
1902
|
className: "flex flex-center"
|
|
2407
1903
|
}, /*#__PURE__*/React__default['default'].createElement(reactRouterDom.Link, {
|
|
2408
|
-
to: "/
|
|
1904
|
+
to: "/".concat(values.featureKey, "/edit/").concat(this.state.circleId)
|
|
2409
1905
|
}, /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
|
|
2410
1906
|
className: "header_back",
|
|
2411
1907
|
name: "cog"
|
|
@@ -2437,7 +1933,7 @@
|
|
|
2437
1933
|
className: "flex-1"
|
|
2438
1934
|
}, /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2439
1935
|
type: "formTitleMedium"
|
|
2440
|
-
}, "Member", getPluralS(members.length), " (", members.length, ")"))), this.state.membersExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1936
|
+
}, "Member", Helper.getPluralS(members.length), " (", members.length, ")"))), this.state.membersExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2441
1937
|
className: "paddingTop-8"
|
|
2442
1938
|
}, members.map(function (user) {
|
|
2443
1939
|
return /*#__PURE__*/React__default['default'].createElement(Components.UserListing, {
|
|
@@ -2455,7 +1951,7 @@
|
|
|
2455
1951
|
className: "flex-1"
|
|
2456
1952
|
}, /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2457
1953
|
type: "formTitleMedium"
|
|
2458
|
-
}, "Image", getPluralS(this.state.images.length), " (", this.state.images.length, ")"))), this.state.imagesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1954
|
+
}, "Image", Helper.getPluralS(this.state.images.length), " (", this.state.images.length, ")"))), this.state.imagesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2459
1955
|
className: "paddingTop-8"
|
|
2460
1956
|
}, this.state.images.map(function (image, i) {
|
|
2461
1957
|
return /*#__PURE__*/React__default['default'].createElement("a", {
|
|
@@ -2464,7 +1960,7 @@
|
|
|
2464
1960
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
2465
1961
|
src: image.Url,
|
|
2466
1962
|
className: "chat_section_image",
|
|
2467
|
-
alt: getFileName(image.Url)
|
|
1963
|
+
alt: Helper.getFileName(image.Url)
|
|
2468
1964
|
}));
|
|
2469
1965
|
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2470
1966
|
className: "chat_section"
|
|
@@ -2478,7 +1974,7 @@
|
|
|
2478
1974
|
className: "flex-1"
|
|
2479
1975
|
}, /*#__PURE__*/React__default['default'].createElement(Components.Text, {
|
|
2480
1976
|
type: "formTitleMedium"
|
|
2481
|
-
}, "File", getPluralS(this.state.files.length), " (", this.state.files.length, ")"))), this.state.filesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1977
|
+
}, "File", Helper.getPluralS(this.state.files.length), " (", this.state.files.length, ")"))), this.state.filesExpanded && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2482
1978
|
className: "paddingTop-8"
|
|
2483
1979
|
}, this.state.files.map(function (file, i) {
|
|
2484
1980
|
return /*#__PURE__*/React__default['default'].createElement(Components.Attachment, {
|
|
@@ -2560,7 +2056,7 @@
|
|
|
2560
2056
|
}(React.Component);
|
|
2561
2057
|
|
|
2562
2058
|
var mapStateToProps = function mapStateToProps(state) {
|
|
2563
|
-
var circles = state.
|
|
2059
|
+
var circles = state[values.reducerKey].circles;
|
|
2564
2060
|
var auth = state.auth;
|
|
2565
2061
|
return {
|
|
2566
2062
|
circles: circles,
|
|
@@ -2828,14 +2324,9 @@
|
|
|
2828
2324
|
return PreviewGrid;
|
|
2829
2325
|
}(React.Component);
|
|
2830
2326
|
|
|
2831
|
-
var
|
|
2832
|
-
|
|
2833
|
-
};
|
|
2834
|
-
var Screens = {
|
|
2835
|
-
Circles: Circles$1,
|
|
2836
|
-
AddCircle: AddCircle$1,
|
|
2837
|
-
Circle: Circle$1
|
|
2838
|
-
};
|
|
2327
|
+
var _Screens;
|
|
2328
|
+
var Reducers = _defineProperty__default['default']({}, values.reducerKey, CircleReducer);
|
|
2329
|
+
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);
|
|
2839
2330
|
|
|
2840
2331
|
exports.Config = FeatureConfig;
|
|
2841
2332
|
exports.PreviewFull = PreviewFull;
|