@plusscommunities/pluss-core-web 1.4.29 → 1.4.30
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 +47 -647
- package/dist/index.esm.js +47 -648
- package/dist/index.umd.js +47 -647
- package/package.json +1 -1
- package/src/components/HubSidebar.js +21 -0
- package/src/helper/helper.js +0 -688
- package/src/index.js +2 -1
- package/src/urls.js +21 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1004,89 +1004,6 @@ var readStorageWithCookie = function readStorageWithCookie(key, isJson) {
|
|
|
1004
1004
|
return Cookies__default['default'].get(key);
|
|
1005
1005
|
};
|
|
1006
1006
|
|
|
1007
|
-
// import {
|
|
1008
|
-
// baseUploadsUrl,
|
|
1009
|
-
// baseLibraryUrl,
|
|
1010
|
-
// defaultProfileImage,
|
|
1011
|
-
// logo,
|
|
1012
|
-
// baseStage,
|
|
1013
|
-
// baseClient,
|
|
1014
|
-
// contentSource,
|
|
1015
|
-
// contentSourceSite,
|
|
1016
|
-
// CONST_STRINGS,
|
|
1017
|
-
// } from '../config';
|
|
1018
|
-
// import { extensionFeatureInfo } from '../config/features';
|
|
1019
|
-
// export const arrayToObject = (array, key) => {
|
|
1020
|
-
// array.reduce((obj, item) => {
|
|
1021
|
-
// obj[item[key]] = item;
|
|
1022
|
-
// return obj;
|
|
1023
|
-
// }, {});
|
|
1024
|
-
// };
|
|
1025
|
-
// export const getLogo = (siteBranding) => {
|
|
1026
|
-
// if (siteBranding && siteBranding.Logo) {
|
|
1027
|
-
// return siteBranding.Logo;
|
|
1028
|
-
// }
|
|
1029
|
-
// return logo;
|
|
1030
|
-
// };
|
|
1031
|
-
// export const getUrlParams = () => {
|
|
1032
|
-
// var vars = {};
|
|
1033
|
-
// window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
|
|
1034
|
-
// vars[key] = value;
|
|
1035
|
-
// });
|
|
1036
|
-
// return vars;
|
|
1037
|
-
// };
|
|
1038
|
-
// export const onlyAlphanumeric = (input) => {
|
|
1039
|
-
// if (!input) {
|
|
1040
|
-
// return input;
|
|
1041
|
-
// }
|
|
1042
|
-
// return input.replace(/[^a-z0-9]/gi, '');
|
|
1043
|
-
// };
|
|
1044
|
-
// export const isUrl = (url) => {
|
|
1045
|
-
// const dotpos = url.lastIndexOf('.');
|
|
1046
|
-
// if (dotpos < 2 || dotpos + 2 >= url.length) {
|
|
1047
|
-
// return false;
|
|
1048
|
-
// }
|
|
1049
|
-
// return true;
|
|
1050
|
-
// };
|
|
1051
|
-
// export const generateImageName = (name) => {
|
|
1052
|
-
// return `xxxxxxxx4xxxyxxxxxxxxxxxxx${name}`.replace(/[xy]/g, (c) => {
|
|
1053
|
-
// // eslint-disable-next-line
|
|
1054
|
-
// var r = (Math.random() * 16) | 0,
|
|
1055
|
-
// v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
1056
|
-
// return v.toString(16);
|
|
1057
|
-
// });
|
|
1058
|
-
// };
|
|
1059
|
-
// export const capitalize = (string) => {
|
|
1060
|
-
// if (_.isEmpty(string)) {
|
|
1061
|
-
// return string;
|
|
1062
|
-
// }
|
|
1063
|
-
// return string.charAt(0).toUpperCase() + string.slice(1);
|
|
1064
|
-
// };
|
|
1065
|
-
// export const get300 = (url) => {
|
|
1066
|
-
// if (!url) {
|
|
1067
|
-
// return url;
|
|
1068
|
-
// }
|
|
1069
|
-
// if (url.indexOf('https://plussprdstorage.blob.core.windows.net/') !== -1) {
|
|
1070
|
-
// return url.replace('https://plussprdstorage.blob.core.windows.net/', 'https://plusscdn.azureedge.net/');
|
|
1071
|
-
// }
|
|
1072
|
-
// if (url.indexOf('https://plusscdn.azureedge.net/') !== -1) {
|
|
1073
|
-
// return url.replace('/uploads/', '/uploads300/').replace('/general/', '/general300/');
|
|
1074
|
-
// }
|
|
1075
|
-
// if (url.indexOf(baseUploadsUrl) !== -1 || url.indexOf(baseLibraryUrl) !== -1) {
|
|
1076
|
-
// const extension = getExtension(url);
|
|
1077
|
-
// let urlToUse = url;
|
|
1078
|
-
// if (extension !== 'jpg') {
|
|
1079
|
-
// urlToUse = `${url.substring(0, url.length - (extension.length + 1))}.jpg`;
|
|
1080
|
-
// }
|
|
1081
|
-
// return urlToUse.replace('/uploads/', '/300/');
|
|
1082
|
-
// }
|
|
1083
|
-
// return url;
|
|
1084
|
-
// };
|
|
1085
|
-
// export const getCompressed = (url) => {
|
|
1086
|
-
// if (!url || typeof url !== 'string') return '';
|
|
1087
|
-
// return url.replace('/uploads/', '/compressed/');
|
|
1088
|
-
// };
|
|
1089
|
-
|
|
1090
1007
|
var getTimepickerTime = function getTimepickerTime(input) {
|
|
1091
1008
|
var timeSplit = input.split(':');
|
|
1092
1009
|
|
|
@@ -1176,569 +1093,7 @@ var getPluralOptions = function getPluralOptions(count, singular, plural) {
|
|
|
1176
1093
|
}
|
|
1177
1094
|
|
|
1178
1095
|
return plural;
|
|
1179
|
-
};
|
|
1180
|
-
// if (!count) {
|
|
1181
|
-
// return '0%';
|
|
1182
|
-
// }
|
|
1183
|
-
// if (!total) {
|
|
1184
|
-
// return '100%';
|
|
1185
|
-
// }
|
|
1186
|
-
// return `${Math.round((100 * count) / total)}%`;
|
|
1187
|
-
// };
|
|
1188
|
-
// export const getUserPreview = (user) => {
|
|
1189
|
-
// return {
|
|
1190
|
-
// displayName: user.displayName,
|
|
1191
|
-
// id: user.Id,
|
|
1192
|
-
// profilePic: user.profilePic || defaultProfileImage,
|
|
1193
|
-
// };
|
|
1194
|
-
// };
|
|
1195
|
-
// export const usersToPreviews = (users) => {
|
|
1196
|
-
// return _.map(users, getUserPreview);
|
|
1197
|
-
// };
|
|
1198
|
-
// export const getSiteNameFromRoles = (site, roles) => {
|
|
1199
|
-
// return getSiteName(
|
|
1200
|
-
// site,
|
|
1201
|
-
// roles.map((r) => {
|
|
1202
|
-
// return r.siteInfo;
|
|
1203
|
-
// }),
|
|
1204
|
-
// );
|
|
1205
|
-
// };
|
|
1206
|
-
// export const getSiteName = (site, sites) => {
|
|
1207
|
-
// if (site === 'hq') {
|
|
1208
|
-
// return 'HQ';
|
|
1209
|
-
// }
|
|
1210
|
-
// const siteObject = _.find(sites, (t) => {
|
|
1211
|
-
// return t.Id === site;
|
|
1212
|
-
// });
|
|
1213
|
-
// if (siteObject) {
|
|
1214
|
-
// return siteObject.siteName;
|
|
1215
|
-
// }
|
|
1216
|
-
// return site;
|
|
1217
|
-
// };
|
|
1218
|
-
// export const formatCurrency = (number, locale = 'en-AU', curencyCode = 'AUD', shouldFix = false) => {
|
|
1219
|
-
// const formatter = Intl.NumberFormat(locale, { style: 'currency', currency: curencyCode, minimumFractionDigits: 2 });
|
|
1220
|
-
// let formattedNumber = number;
|
|
1221
|
-
// if (shouldFix && formatter.format(formattedNumber).indexOf('NaN') > -1) {
|
|
1222
|
-
// formattedNumber = number.replace(/[^\d.-]/g, '');
|
|
1223
|
-
// }
|
|
1224
|
-
// return formatter.format(formattedNumber);
|
|
1225
|
-
// };
|
|
1226
|
-
// export const currencyToFloat = (number) => {
|
|
1227
|
-
// let result = parseFloat(number);
|
|
1228
|
-
// if (isNaN(result)) {
|
|
1229
|
-
// result = parseFloat(number.replace(/[^\d.-]/g, ''));
|
|
1230
|
-
// if (isNaN(result)) {
|
|
1231
|
-
// result = 0;
|
|
1232
|
-
// }
|
|
1233
|
-
// }
|
|
1234
|
-
// return result;
|
|
1235
|
-
// };
|
|
1236
|
-
// export const getCurrencySymbol = () => {
|
|
1237
|
-
// return formatCurrency(0).replace(/[0-9.]+/g, '');
|
|
1238
|
-
// };
|
|
1239
|
-
// export const isCurrency = (text) => {
|
|
1240
|
-
// if (!text) return false;
|
|
1241
|
-
// const price = parseFloat(typeof text === 'string' ? text.replace(getCurrencySymbol(), '') : text, 10);
|
|
1242
|
-
// return _.isNumber(price) && !Number.isNaN(price) ? price : false;
|
|
1243
|
-
// };
|
|
1244
|
-
// export const isPaidItem = (enabled, tickets) => {
|
|
1245
|
-
// // console.log('isPaidItem', enabled, tickets);
|
|
1246
|
-
// return (
|
|
1247
|
-
// enabled &&
|
|
1248
|
-
// tickets &&
|
|
1249
|
-
// tickets.merchant &&
|
|
1250
|
-
// tickets.categories &&
|
|
1251
|
-
// tickets.categories.length > 0 &&
|
|
1252
|
-
// tickets.categories.every((t) => !t.price || _.isNumber(t.price))
|
|
1253
|
-
// );
|
|
1254
|
-
// };
|
|
1255
|
-
// export const getTotalQuantity = (tickets) => _.sumBy(tickets, (t) => t.quantity || 0);
|
|
1256
|
-
// export const getTotalPrice = (tickets) => _.sumBy(tickets, (t) => t.price * (t.quantity || 0));
|
|
1257
|
-
// export const parseTickets = (tickets, merchant) => {
|
|
1258
|
-
// if (Array.isArray(tickets)) return { merchant, categories: tickets };
|
|
1259
|
-
// if (tickets && typeof tickets === 'object') return tickets;
|
|
1260
|
-
// return { merchant, categories: [{ category: 'Default', price: tickets }] };
|
|
1261
|
-
// };
|
|
1262
|
-
// export const compileTickets = (tickets, merchant) => {
|
|
1263
|
-
// const newTickets = _.cloneDeep(tickets);
|
|
1264
|
-
// newTickets.merchant = merchant;
|
|
1265
|
-
// newTickets.categories = newTickets.categories.map((ticket) => {
|
|
1266
|
-
// ticket.price = isCurrency(ticket.price);
|
|
1267
|
-
// return ticket;
|
|
1268
|
-
// });
|
|
1269
|
-
// return newTickets;
|
|
1270
|
-
// };
|
|
1271
|
-
// export const getTicketPriceText = (ticket) => {
|
|
1272
|
-
// return typeof ticket.price === 'string' ? ticket.price : formatCurrency(ticket.price);
|
|
1273
|
-
// };
|
|
1274
|
-
// export const isTicketCategoryValid = (ticket, ticketDetail) => {
|
|
1275
|
-
// return !_.isEmpty(ticket.category) && ticketDetail.categories.filter((t) => t.category === ticket.category).length === 1;
|
|
1276
|
-
// };
|
|
1277
|
-
// export const isTicketPriceValid = (ticket) => {
|
|
1278
|
-
// return ticket.price && isCurrency(ticket.price) !== false;
|
|
1279
|
-
// };
|
|
1280
|
-
// export const isTicketsValid = (tickets) => {
|
|
1281
|
-
// if (tickets && tickets.categories && tickets.categories.length > 0) {
|
|
1282
|
-
// return tickets.categories.every((ticket) => isTicketCategoryValid(ticket, tickets) && isTicketPriceValid(ticket));
|
|
1283
|
-
// }
|
|
1284
|
-
// return true;
|
|
1285
|
-
// };
|
|
1286
|
-
// export const getFee = (feeInfo, amount) => {
|
|
1287
|
-
// if (!feeInfo.fee) return 0;
|
|
1288
|
-
// return feeInfo.isPercentage ? (feeInfo.fee / 100) * amount : feeInfo.fee;
|
|
1289
|
-
// };
|
|
1290
|
-
// export const isRefund = (transaction) => transaction.TransactionType === 'REFUND';
|
|
1291
|
-
// export const combineTickets = (ticketsArray, diff = false) => {
|
|
1292
|
-
// if (_.isNil(ticketsArray) || ticketsArray.length === 0) return [];
|
|
1293
|
-
// const combined = ticketsArray.reduce((a, c) => {
|
|
1294
|
-
// if (_.isNil(a) || a.length === 0) return c;
|
|
1295
|
-
// const summed = a.map((cat) => {
|
|
1296
|
-
// const cloned = _.clone(cat);
|
|
1297
|
-
// const match = c.find((i) => i.category === cloned.category);
|
|
1298
|
-
// cloned.quantity = (diff ? -1 : 1) * (cloned.quantity || 0) + (match ? match.quantity || 0 : 0);
|
|
1299
|
-
// return cloned;
|
|
1300
|
-
// });
|
|
1301
|
-
// return summed;
|
|
1302
|
-
// });
|
|
1303
|
-
// return combined;
|
|
1304
|
-
// };
|
|
1305
|
-
// export const combineTransactions = (transactionsArray) => {
|
|
1306
|
-
// if (_.isNil(transactionsArray) || transactionsArray.length === 0) return null;
|
|
1307
|
-
// const combined = _.orderBy(transactionsArray, 'UnixTimestamp', 'desc').reduce((a, c) => {
|
|
1308
|
-
// // console.log('transaction a', a.TransactionType, a.TransactionId, a.Amount, a.Fee.amount);
|
|
1309
|
-
// // console.log('transaction c', c.TransactionType, c.TransactionId, c.Amount, c.Fee.amount);
|
|
1310
|
-
// const cloned = _.cloneDeep(c);
|
|
1311
|
-
// cloned.Amount = cloned.Amount + a.Amount;
|
|
1312
|
-
// cloned.Fee.amount = cloned.Fee.amount + a.Fee.amount;
|
|
1313
|
-
// cloned.Item.categories = combineTickets([cloned.Item.categories, a.Item.categories]);
|
|
1314
|
-
// return cloned;
|
|
1315
|
-
// });
|
|
1316
|
-
// // console.log('combined', combined.TransactionType, combined.TransactionId, combined.Amount, combined.Fee.amount);
|
|
1317
|
-
// return combined;
|
|
1318
|
-
// };
|
|
1319
|
-
// export const consolidateTransactions = (transactionsArray) => {
|
|
1320
|
-
// const transactions = transactionsArray
|
|
1321
|
-
// .filter((pt) => pt.TransactionType === 'PAYMENT')
|
|
1322
|
-
// .map((p) => {
|
|
1323
|
-
// // Combine with all refunds for the transaction
|
|
1324
|
-
// const refunds = transactionsArray.filter((rt) => rt.TransactionType === 'REFUND' && rt.TransactionId === p.TransactionId);
|
|
1325
|
-
// return combineTransactions([...refunds, p]);
|
|
1326
|
-
// })
|
|
1327
|
-
// .filter((p) => getTotalQuantity(p.Item.categories) > 0);
|
|
1328
|
-
// return transactions;
|
|
1329
|
-
// };
|
|
1330
|
-
// export const isKiosk = (type) => {
|
|
1331
|
-
// return type === 'KIOSK' || type === 'FORMKIOSK' || type === 'SIGNINKIOSK';
|
|
1332
|
-
// };
|
|
1333
|
-
// export const isContentSource = (site) => {
|
|
1334
|
-
// if (`${baseClient}-${baseStage}` !== contentSource) {
|
|
1335
|
-
// return false;
|
|
1336
|
-
// }
|
|
1337
|
-
// return site === contentSourceSite;
|
|
1338
|
-
// };
|
|
1339
|
-
// export const formatDuration = (msDuration) => {
|
|
1340
|
-
// const diff = moment.duration(msDuration);
|
|
1341
|
-
// let result = '';
|
|
1342
|
-
// const days = Math.floor(diff.asDays());
|
|
1343
|
-
// if (days > 0) {
|
|
1344
|
-
// result += `${days} day${getPluralS(days)} `;
|
|
1345
|
-
// diff.add(-days, 'd');
|
|
1346
|
-
// }
|
|
1347
|
-
// const hours = Math.floor(diff.asHours());
|
|
1348
|
-
// if (hours > 0) {
|
|
1349
|
-
// result += `${hours} hour${getPluralS(hours)} `;
|
|
1350
|
-
// diff.add(-hours, 'h');
|
|
1351
|
-
// }
|
|
1352
|
-
// const minutes = Math.floor(diff.asMinutes());
|
|
1353
|
-
// if (minutes > 0) {
|
|
1354
|
-
// result += `${minutes} minute${getPluralS(minutes)} `;
|
|
1355
|
-
// diff.add(-minutes, 'm');
|
|
1356
|
-
// }
|
|
1357
|
-
// if (_.isEmpty(result)) {
|
|
1358
|
-
// return 'Less than a minute';
|
|
1359
|
-
// }
|
|
1360
|
-
// return result.trim();
|
|
1361
|
-
// };
|
|
1362
|
-
// export const clearLocalStorage = (key) => {
|
|
1363
|
-
// window.localStorage.removeItem(key);
|
|
1364
|
-
// Cookies.remove(key);
|
|
1365
|
-
// };
|
|
1366
|
-
// export const TIMESTAMPFORMAT = 'D MMM YYYY h:mma';
|
|
1367
|
-
// export const featureInfo = [
|
|
1368
|
-
// ...extensionFeatureInfo,
|
|
1369
|
-
// {
|
|
1370
|
-
// key: 'dashboard',
|
|
1371
|
-
// order: 1,
|
|
1372
|
-
// text: 'Dashboard',
|
|
1373
|
-
// icon: 'dashboard',
|
|
1374
|
-
// isFontAwesome: false,
|
|
1375
|
-
// url: '/mastermenu',
|
|
1376
|
-
// countProps: null,
|
|
1377
|
-
// visibleExps: null,
|
|
1378
|
-
// },
|
|
1379
|
-
// {
|
|
1380
|
-
// key: 'events',
|
|
1381
|
-
// order: 2,
|
|
1382
|
-
// text: 'Events',
|
|
1383
|
-
// icon: 'event',
|
|
1384
|
-
// isFontAwesome: false,
|
|
1385
|
-
// url: '/events',
|
|
1386
|
-
// addUrl: '/events/event',
|
|
1387
|
-
// addPermission: 'events',
|
|
1388
|
-
// singularName: 'event',
|
|
1389
|
-
// countProps: ['eventSubmissions', 'length'],
|
|
1390
|
-
// visibleExps: {
|
|
1391
|
-
// type: 'and',
|
|
1392
|
-
// exps: [
|
|
1393
|
-
// { type: 'feature', value: 'events' },
|
|
1394
|
-
// {
|
|
1395
|
-
// type: 'or',
|
|
1396
|
-
// exps: [
|
|
1397
|
-
// { type: 'permission', value: 'events' },
|
|
1398
|
-
// { type: 'permission', value: 'eventAttendance' },
|
|
1399
|
-
// { type: 'permission', value: 'eventSubmit' },
|
|
1400
|
-
// ],
|
|
1401
|
-
// },
|
|
1402
|
-
// ],
|
|
1403
|
-
// },
|
|
1404
|
-
// },
|
|
1405
|
-
// {
|
|
1406
|
-
// key: 'news',
|
|
1407
|
-
// order: 3,
|
|
1408
|
-
// text: 'News',
|
|
1409
|
-
// icon: 'news',
|
|
1410
|
-
// isFontAwesome: false,
|
|
1411
|
-
// url: '/news',
|
|
1412
|
-
// addUrl: '/news/article',
|
|
1413
|
-
// addPermission: 'newsletter',
|
|
1414
|
-
// singularName: 'news',
|
|
1415
|
-
// countProps: ['newsSubmissions', 'length'],
|
|
1416
|
-
// visibleExps: {
|
|
1417
|
-
// type: 'and',
|
|
1418
|
-
// exps: [
|
|
1419
|
-
// { type: 'feature', value: 'news' },
|
|
1420
|
-
// {
|
|
1421
|
-
// type: 'or',
|
|
1422
|
-
// exps: [
|
|
1423
|
-
// { type: 'permission', value: 'newsletter' },
|
|
1424
|
-
// { type: 'permission', value: 'newsletterSubmit' },
|
|
1425
|
-
// ],
|
|
1426
|
-
// },
|
|
1427
|
-
// ],
|
|
1428
|
-
// },
|
|
1429
|
-
// },
|
|
1430
|
-
// {
|
|
1431
|
-
// key: 'alerts',
|
|
1432
|
-
// order: 4,
|
|
1433
|
-
// text: 'Alerts',
|
|
1434
|
-
// icon: 'exclamation-triangle',
|
|
1435
|
-
// isFontAwesome: true,
|
|
1436
|
-
// url: '/alerts',
|
|
1437
|
-
// addUrl: '/alerts/addalert',
|
|
1438
|
-
// addPermission: 'alerts',
|
|
1439
|
-
// singularName: 'alert',
|
|
1440
|
-
// countProps: null,
|
|
1441
|
-
// visibleExps: {
|
|
1442
|
-
// type: 'and',
|
|
1443
|
-
// exps: [
|
|
1444
|
-
// { type: 'feature', value: 'alerts' },
|
|
1445
|
-
// { type: 'permission', value: 'alerts' },
|
|
1446
|
-
// ],
|
|
1447
|
-
// },
|
|
1448
|
-
// },
|
|
1449
|
-
// {
|
|
1450
|
-
// key: 'users',
|
|
1451
|
-
// order: 5,
|
|
1452
|
-
// text: 'Users',
|
|
1453
|
-
// icon: 'people',
|
|
1454
|
-
// isFontAwesome: false,
|
|
1455
|
-
// url: '/usershub',
|
|
1456
|
-
// addUrl: '/usershub/adduser',
|
|
1457
|
-
// addPermission: 'userManagement',
|
|
1458
|
-
// singularName: 'user',
|
|
1459
|
-
// countProps: null,
|
|
1460
|
-
// visibleExps: {
|
|
1461
|
-
// type: 'and',
|
|
1462
|
-
// exps: [
|
|
1463
|
-
// { type: 'feature', value: 'users' },
|
|
1464
|
-
// { type: 'permission', value: 'userManagement' },
|
|
1465
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1466
|
-
// ],
|
|
1467
|
-
// },
|
|
1468
|
-
// },
|
|
1469
|
-
// {
|
|
1470
|
-
// key: 'gallery',
|
|
1471
|
-
// order: 6,
|
|
1472
|
-
// text: 'Gallery',
|
|
1473
|
-
// icon: 'picture-o',
|
|
1474
|
-
// isFontAwesome: true,
|
|
1475
|
-
// url: '/imageLibrary',
|
|
1476
|
-
// addPermission: 'addToPublishingImageLibrary',
|
|
1477
|
-
// singularName: 'gallery image',
|
|
1478
|
-
// countProps: null,
|
|
1479
|
-
// visibleExps: {
|
|
1480
|
-
// type: 'and',
|
|
1481
|
-
// exps: [
|
|
1482
|
-
// { type: 'feature', value: 'gallery' },
|
|
1483
|
-
// { type: 'permission', value: 'addToPublishingImageLibrary' },
|
|
1484
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1485
|
-
// ],
|
|
1486
|
-
// },
|
|
1487
|
-
// },
|
|
1488
|
-
// {
|
|
1489
|
-
// key: 'services',
|
|
1490
|
-
// order: 7,
|
|
1491
|
-
// text: 'Services',
|
|
1492
|
-
// icon: 'stethoscope',
|
|
1493
|
-
// isFontAwesome: true,
|
|
1494
|
-
// url: '/services',
|
|
1495
|
-
// addUrl: '/services/service',
|
|
1496
|
-
// addPermission: 'services',
|
|
1497
|
-
// singularName: 'service',
|
|
1498
|
-
// countProps: null,
|
|
1499
|
-
// visibleExps: {
|
|
1500
|
-
// type: 'and',
|
|
1501
|
-
// exps: [
|
|
1502
|
-
// { type: 'feature', value: 'services' },
|
|
1503
|
-
// { type: 'permission', value: 'services' },
|
|
1504
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1505
|
-
// ],
|
|
1506
|
-
// },
|
|
1507
|
-
// },
|
|
1508
|
-
// {
|
|
1509
|
-
// key: 'sponsors',
|
|
1510
|
-
// order: 8,
|
|
1511
|
-
// text: 'Sponsors',
|
|
1512
|
-
// icon: 'star-o',
|
|
1513
|
-
// isFontAwesome: true,
|
|
1514
|
-
// url: '/sponsors',
|
|
1515
|
-
// addUrl: '/sponsors/sponsor',
|
|
1516
|
-
// addPermission: 'services',
|
|
1517
|
-
// singularName: 'sponsor',
|
|
1518
|
-
// countProps: null,
|
|
1519
|
-
// visibleExps: {
|
|
1520
|
-
// type: 'and',
|
|
1521
|
-
// exps: [
|
|
1522
|
-
// { type: 'feature', value: 'services' },
|
|
1523
|
-
// { type: 'permission', value: 'services' },
|
|
1524
|
-
// { type: 'state', value: 'adminOpen' },
|
|
1525
|
-
// ],
|
|
1526
|
-
// },
|
|
1527
|
-
// },
|
|
1528
|
-
// {
|
|
1529
|
-
// key: 'info',
|
|
1530
|
-
// order: 9,
|
|
1531
|
-
// text: 'Information',
|
|
1532
|
-
// icon: 'info',
|
|
1533
|
-
// isFontAwesome: false,
|
|
1534
|
-
// url: '/info',
|
|
1535
|
-
// addUrl: '/info/infopage',
|
|
1536
|
-
// addPermission: 'infoPages',
|
|
1537
|
-
// singularName: CONST_STRINGS.FAQ_ENTRY,
|
|
1538
|
-
// countProps: null,
|
|
1539
|
-
// visibleExps: {
|
|
1540
|
-
// type: 'or',
|
|
1541
|
-
// exps: [
|
|
1542
|
-
// {
|
|
1543
|
-
// type: 'and',
|
|
1544
|
-
// exps: [
|
|
1545
|
-
// { type: 'feature', value: 'importantContacts' },
|
|
1546
|
-
// { type: 'permission', value: 'importantContacts' },
|
|
1547
|
-
// ],
|
|
1548
|
-
// },
|
|
1549
|
-
// {
|
|
1550
|
-
// type: 'and',
|
|
1551
|
-
// exps: [
|
|
1552
|
-
// { type: 'feature', value: 'maps' },
|
|
1553
|
-
// { type: 'permission', value: 'maps' },
|
|
1554
|
-
// ],
|
|
1555
|
-
// },
|
|
1556
|
-
// {
|
|
1557
|
-
// type: 'and',
|
|
1558
|
-
// exps: [
|
|
1559
|
-
// { type: 'feature', value: 'infoPages' },
|
|
1560
|
-
// { type: 'permission', value: 'infoPages' },
|
|
1561
|
-
// ],
|
|
1562
|
-
// },
|
|
1563
|
-
// {
|
|
1564
|
-
// type: 'and',
|
|
1565
|
-
// exps: [
|
|
1566
|
-
// { type: 'feature', value: 'news' },
|
|
1567
|
-
// { type: 'permission', value: 'welcomePages' },
|
|
1568
|
-
// ],
|
|
1569
|
-
// },
|
|
1570
|
-
// { type: 'permission', value: 'terms' },
|
|
1571
|
-
// ],
|
|
1572
|
-
// },
|
|
1573
|
-
// },
|
|
1574
|
-
// {
|
|
1575
|
-
// key: 'surveys',
|
|
1576
|
-
// order: 11,
|
|
1577
|
-
// text: 'Surveys',
|
|
1578
|
-
// icon: 'pie-chart',
|
|
1579
|
-
// isFontAwesome: true,
|
|
1580
|
-
// url: '/polls',
|
|
1581
|
-
// addUrl: '/polls/poll',
|
|
1582
|
-
// addPermission: 'polls',
|
|
1583
|
-
// singularName: 'survey',
|
|
1584
|
-
// countProps: null,
|
|
1585
|
-
// visibleExps: {
|
|
1586
|
-
// type: 'and',
|
|
1587
|
-
// exps: [
|
|
1588
|
-
// { type: 'feature', value: 'surveys' },
|
|
1589
|
-
// { type: 'permission', value: 'polls' },
|
|
1590
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1591
|
-
// ],
|
|
1592
|
-
// },
|
|
1593
|
-
// },
|
|
1594
|
-
// {
|
|
1595
|
-
// key: 'facilities',
|
|
1596
|
-
// order: 12,
|
|
1597
|
-
// text: CONST_STRINGS.FACILITIES,
|
|
1598
|
-
// icon: 'facility',
|
|
1599
|
-
// isFontAwesome: false,
|
|
1600
|
-
// url: '/facilities',
|
|
1601
|
-
// addUrl: '/facilities/facility',
|
|
1602
|
-
// addPermission: 'facilities',
|
|
1603
|
-
// singularName: 'facility',
|
|
1604
|
-
// countProps: null,
|
|
1605
|
-
// visibleExps: {
|
|
1606
|
-
// type: 'and',
|
|
1607
|
-
// exps: [
|
|
1608
|
-
// { type: 'feature', value: 'facilities' },
|
|
1609
|
-
// { type: 'permission', value: 'facilities' },
|
|
1610
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1611
|
-
// ],
|
|
1612
|
-
// },
|
|
1613
|
-
// },
|
|
1614
|
-
// {
|
|
1615
|
-
// key: 'offers',
|
|
1616
|
-
// order: 13,
|
|
1617
|
-
// text: 'Offers',
|
|
1618
|
-
// icon: 'shopping-bag',
|
|
1619
|
-
// isFontAwesome: true,
|
|
1620
|
-
// url: '/offers',
|
|
1621
|
-
// addUrl: '/offers/offer',
|
|
1622
|
-
// addPermission: 'offers',
|
|
1623
|
-
// singularName: 'offer',
|
|
1624
|
-
// countProps: null,
|
|
1625
|
-
// visibleExps: {
|
|
1626
|
-
// type: 'and',
|
|
1627
|
-
// exps: [
|
|
1628
|
-
// { type: 'feature', value: 'offers' },
|
|
1629
|
-
// { type: 'permission', value: 'offers' },
|
|
1630
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1631
|
-
// ],
|
|
1632
|
-
// },
|
|
1633
|
-
// },
|
|
1634
|
-
// {
|
|
1635
|
-
// key: 'signin',
|
|
1636
|
-
// order: 14,
|
|
1637
|
-
// text: 'Sign Ins',
|
|
1638
|
-
// icon: 'signin',
|
|
1639
|
-
// isFontAwesome: false,
|
|
1640
|
-
// url: '/signinHub',
|
|
1641
|
-
// addUrl: null,
|
|
1642
|
-
// addPermission: 'visitors',
|
|
1643
|
-
// singularName: 'visitor',
|
|
1644
|
-
// countProps: null,
|
|
1645
|
-
// visibleExps: {
|
|
1646
|
-
// type: 'and',
|
|
1647
|
-
// exps: [
|
|
1648
|
-
// { type: 'feature', value: 'visitors' },
|
|
1649
|
-
// { type: 'permission', value: 'visitors' },
|
|
1650
|
-
// { type: 'state', value: 'conciergeOpen' },
|
|
1651
|
-
// ],
|
|
1652
|
-
// },
|
|
1653
|
-
// },
|
|
1654
|
-
// {
|
|
1655
|
-
// key: 'food',
|
|
1656
|
-
// order: 15,
|
|
1657
|
-
// text: 'Restaurant Manager',
|
|
1658
|
-
// icon: 'cutlery',
|
|
1659
|
-
// isFontAwesome: true,
|
|
1660
|
-
// url: '/food',
|
|
1661
|
-
// addUrl: null,
|
|
1662
|
-
// addPermission: 'food',
|
|
1663
|
-
// singularName: 'dish',
|
|
1664
|
-
// countProps: null,
|
|
1665
|
-
// visibleExps: {
|
|
1666
|
-
// type: 'and',
|
|
1667
|
-
// exps: [
|
|
1668
|
-
// { type: 'feature', value: 'food' },
|
|
1669
|
-
// { type: 'permission', value: 'food' },
|
|
1670
|
-
// ],
|
|
1671
|
-
// },
|
|
1672
|
-
// },
|
|
1673
|
-
// {
|
|
1674
|
-
// key: 'payment',
|
|
1675
|
-
// order: 16,
|
|
1676
|
-
// text: 'Payment',
|
|
1677
|
-
// icon: 'usd',
|
|
1678
|
-
// isFontAwesome: true,
|
|
1679
|
-
// url: '/payment',
|
|
1680
|
-
// addUrl: null,
|
|
1681
|
-
// addPermission: null,
|
|
1682
|
-
// singularName: 'payment',
|
|
1683
|
-
// countProps: null,
|
|
1684
|
-
// visibleExps: {
|
|
1685
|
-
// type: 'and',
|
|
1686
|
-
// exps: [
|
|
1687
|
-
// { type: 'props', value: 'paymentEnabled' },
|
|
1688
|
-
// {
|
|
1689
|
-
// type: 'or',
|
|
1690
|
-
// exps: [
|
|
1691
|
-
// { type: 'feature', value: 'managePayments' },
|
|
1692
|
-
// { type: 'permission', value: 'viewPayments' },
|
|
1693
|
-
// ],
|
|
1694
|
-
// },
|
|
1695
|
-
// ],
|
|
1696
|
-
// },
|
|
1697
|
-
// },
|
|
1698
|
-
// {
|
|
1699
|
-
// key: 'automation',
|
|
1700
|
-
// order: 17,
|
|
1701
|
-
// text: 'Automation',
|
|
1702
|
-
// icon: 'bolt',
|
|
1703
|
-
// isFontAwesome: true,
|
|
1704
|
-
// url: '/automationHub',
|
|
1705
|
-
// addUrl: null,
|
|
1706
|
-
// addPermission: null,
|
|
1707
|
-
// singularName: 'automation',
|
|
1708
|
-
// countProps: null,
|
|
1709
|
-
// visibleExps: { type: 'master', value: true },
|
|
1710
|
-
// },
|
|
1711
|
-
// ];
|
|
1712
|
-
// export const getFeatureInfo = (type) => {
|
|
1713
|
-
// switch (type) {
|
|
1714
|
-
// case 'maps':
|
|
1715
|
-
// return {
|
|
1716
|
-
// key: 'maps',
|
|
1717
|
-
// icon: 'map',
|
|
1718
|
-
// isFontAwesome: true,
|
|
1719
|
-
// url: '/info',
|
|
1720
|
-
// addUrl: '/info/map',
|
|
1721
|
-
// addPermission: 'maps',
|
|
1722
|
-
// singularName: 'map',
|
|
1723
|
-
// };
|
|
1724
|
-
// case 'importantContacts':
|
|
1725
|
-
// return {
|
|
1726
|
-
// key: 'importantContacts',
|
|
1727
|
-
// icon: 'address-card-o',
|
|
1728
|
-
// isFontAwesome: true,
|
|
1729
|
-
// url: '/info',
|
|
1730
|
-
// addUrl: '/info/importantcontact',
|
|
1731
|
-
// addPermission: 'importantContacts',
|
|
1732
|
-
// singularName: 'contact',
|
|
1733
|
-
// };
|
|
1734
|
-
// case 'info':
|
|
1735
|
-
// case 'infoPages':
|
|
1736
|
-
// return featureInfo.find((n) => n.key === 'info');
|
|
1737
|
-
// default:
|
|
1738
|
-
// const info = featureInfo.find((n) => n.key === type);
|
|
1739
|
-
// return info || { key: type, icon: type };
|
|
1740
|
-
// }
|
|
1741
|
-
// };
|
|
1096
|
+
};
|
|
1742
1097
|
|
|
1743
1098
|
var setChatUser = function setChatUser(auth) {
|
|
1744
1099
|
if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
|
|
@@ -6370,6 +5725,29 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6370
5725
|
_classCallCheck__default['default'](this, HubSidebar);
|
|
6371
5726
|
|
|
6372
5727
|
_this = _super.call(this, props);
|
|
5728
|
+
|
|
5729
|
+
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "renderHelpGuide", function () {
|
|
5730
|
+
if (!_this.props.helpGuide) return null;
|
|
5731
|
+
var _this$props$helpGuide = _this.props.helpGuide,
|
|
5732
|
+
text = _this$props$helpGuide.text,
|
|
5733
|
+
url = _this$props$helpGuide.url;
|
|
5734
|
+
|
|
5735
|
+
var onHelpGuidePress = function onHelpGuidePress() {
|
|
5736
|
+
if (!url) return;
|
|
5737
|
+
window.open(url, '_blank');
|
|
5738
|
+
};
|
|
5739
|
+
|
|
5740
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5741
|
+
className: "hubSidebar_helpGuideContainer"
|
|
5742
|
+
}, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
5743
|
+
buttonType: "outlined",
|
|
5744
|
+
isActive: true,
|
|
5745
|
+
leftIcon: "info-circle",
|
|
5746
|
+
narrow: true,
|
|
5747
|
+
onClick: onHelpGuidePress
|
|
5748
|
+
}, text || 'Help Guide'));
|
|
5749
|
+
});
|
|
5750
|
+
|
|
6373
5751
|
_this.state = {
|
|
6374
5752
|
showSidebar: false
|
|
6375
5753
|
};
|
|
@@ -6474,7 +5852,7 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
|
|
|
6474
5852
|
className: "hubSidebar_content"
|
|
6475
5853
|
}, this.props.sections.map(function (section, i) {
|
|
6476
5854
|
return _this4.renderSection(section, i);
|
|
6477
|
-
})));
|
|
5855
|
+
})), this.renderHelpGuide());
|
|
6478
5856
|
}
|
|
6479
5857
|
}]);
|
|
6480
5858
|
|
|
@@ -11868,6 +11246,27 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
11868
11246
|
Tabs: Tabs
|
|
11869
11247
|
});
|
|
11870
11248
|
|
|
11249
|
+
var HelpGuide = {
|
|
11250
|
+
Dashboard: 'https://www.notion.so/plusscommunities/Getting-Started-on-Community-Manager-09fb060d6c9a4448ad3764fdb737a243?pvs=4#e020858ed894461b83d307367ba4c299',
|
|
11251
|
+
FeaturePicker: 'https://www.notion.so/plusscommunities/Getting-Started-on-Community-Manager-09fb060d6c9a4448ad3764fdb737a243?pvs=4#dce59fe82dae4f049ce1503c41a54d44',
|
|
11252
|
+
News: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#2776fdb4ed5149cca48e6be792dec32b',
|
|
11253
|
+
Events: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#b83768f31d57404499f5cff0f54905da',
|
|
11254
|
+
Alerts: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#9a19c903ad4a41c2bb557de1922802c5',
|
|
11255
|
+
Gallery: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#7abde97ce18b42df9bacb2b1dad352aa',
|
|
11256
|
+
Groups: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#a944987e875e4d1796086912960036e2',
|
|
11257
|
+
Maintenance: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#6aa1966fe9bd4e26a57d1116566d0f33',
|
|
11258
|
+
Facilities: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#57f0eb8a09a14196b456a081778eb0ae',
|
|
11259
|
+
Services: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#894364ba645446e98c7213d28c032cfa',
|
|
11260
|
+
Offers: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#af0a26b5a04243bb92a68d712e661870',
|
|
11261
|
+
Survey: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#6467564cea4c4ea893b69cf54e1fe4ed',
|
|
11262
|
+
Information: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#3c83b4aa82564e31b15a2c8a6d4b416a',
|
|
11263
|
+
Users: 'https://plusscommunities.notion.site/Managing-Your-Users-3a29335153344eaa9aef6314141f4adc',
|
|
11264
|
+
Payment: 'https://plusscommunities.notion.site/Setting-up-Your-Payment-Gateway-32443cffd7ce400db6ff5abed780e700'
|
|
11265
|
+
};
|
|
11266
|
+
var Urls = {
|
|
11267
|
+
HelpGuide: HelpGuide
|
|
11268
|
+
};
|
|
11269
|
+
|
|
11871
11270
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
11872
11271
|
|
|
11873
11272
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -11944,3 +11343,4 @@ exports.Config = CoreConfig;
|
|
|
11944
11343
|
exports.Helper = index$3;
|
|
11945
11344
|
exports.Reducers = Reducers;
|
|
11946
11345
|
exports.Session = session;
|
|
11346
|
+
exports.Urls = Urls;
|