@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.esm.js CHANGED
@@ -974,89 +974,6 @@ var readStorageWithCookie = function readStorageWithCookie(key, isJson) {
974
974
  return Cookies.get(key);
975
975
  };
976
976
 
977
- // import {
978
- // baseUploadsUrl,
979
- // baseLibraryUrl,
980
- // defaultProfileImage,
981
- // logo,
982
- // baseStage,
983
- // baseClient,
984
- // contentSource,
985
- // contentSourceSite,
986
- // CONST_STRINGS,
987
- // } from '../config';
988
- // import { extensionFeatureInfo } from '../config/features';
989
- // export const arrayToObject = (array, key) => {
990
- // array.reduce((obj, item) => {
991
- // obj[item[key]] = item;
992
- // return obj;
993
- // }, {});
994
- // };
995
- // export const getLogo = (siteBranding) => {
996
- // if (siteBranding && siteBranding.Logo) {
997
- // return siteBranding.Logo;
998
- // }
999
- // return logo;
1000
- // };
1001
- // export const getUrlParams = () => {
1002
- // var vars = {};
1003
- // window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
1004
- // vars[key] = value;
1005
- // });
1006
- // return vars;
1007
- // };
1008
- // export const onlyAlphanumeric = (input) => {
1009
- // if (!input) {
1010
- // return input;
1011
- // }
1012
- // return input.replace(/[^a-z0-9]/gi, '');
1013
- // };
1014
- // export const isUrl = (url) => {
1015
- // const dotpos = url.lastIndexOf('.');
1016
- // if (dotpos < 2 || dotpos + 2 >= url.length) {
1017
- // return false;
1018
- // }
1019
- // return true;
1020
- // };
1021
- // export const generateImageName = (name) => {
1022
- // return `xxxxxxxx4xxxyxxxxxxxxxxxxx${name}`.replace(/[xy]/g, (c) => {
1023
- // // eslint-disable-next-line
1024
- // var r = (Math.random() * 16) | 0,
1025
- // v = c === 'x' ? r : (r & 0x3) | 0x8;
1026
- // return v.toString(16);
1027
- // });
1028
- // };
1029
- // export const capitalize = (string) => {
1030
- // if (_.isEmpty(string)) {
1031
- // return string;
1032
- // }
1033
- // return string.charAt(0).toUpperCase() + string.slice(1);
1034
- // };
1035
- // export const get300 = (url) => {
1036
- // if (!url) {
1037
- // return url;
1038
- // }
1039
- // if (url.indexOf('https://plussprdstorage.blob.core.windows.net/') !== -1) {
1040
- // return url.replace('https://plussprdstorage.blob.core.windows.net/', 'https://plusscdn.azureedge.net/');
1041
- // }
1042
- // if (url.indexOf('https://plusscdn.azureedge.net/') !== -1) {
1043
- // return url.replace('/uploads/', '/uploads300/').replace('/general/', '/general300/');
1044
- // }
1045
- // if (url.indexOf(baseUploadsUrl) !== -1 || url.indexOf(baseLibraryUrl) !== -1) {
1046
- // const extension = getExtension(url);
1047
- // let urlToUse = url;
1048
- // if (extension !== 'jpg') {
1049
- // urlToUse = `${url.substring(0, url.length - (extension.length + 1))}.jpg`;
1050
- // }
1051
- // return urlToUse.replace('/uploads/', '/300/');
1052
- // }
1053
- // return url;
1054
- // };
1055
- // export const getCompressed = (url) => {
1056
- // if (!url || typeof url !== 'string') return '';
1057
- // return url.replace('/uploads/', '/compressed/');
1058
- // };
1059
-
1060
977
  var getTimepickerTime = function getTimepickerTime(input) {
1061
978
  var timeSplit = input.split(':');
1062
979
 
@@ -1146,569 +1063,7 @@ var getPluralOptions = function getPluralOptions(count, singular, plural) {
1146
1063
  }
1147
1064
 
1148
1065
  return plural;
1149
- }; // export const getPercentage = (count, total) => {
1150
- // if (!count) {
1151
- // return '0%';
1152
- // }
1153
- // if (!total) {
1154
- // return '100%';
1155
- // }
1156
- // return `${Math.round((100 * count) / total)}%`;
1157
- // };
1158
- // export const getUserPreview = (user) => {
1159
- // return {
1160
- // displayName: user.displayName,
1161
- // id: user.Id,
1162
- // profilePic: user.profilePic || defaultProfileImage,
1163
- // };
1164
- // };
1165
- // export const usersToPreviews = (users) => {
1166
- // return _.map(users, getUserPreview);
1167
- // };
1168
- // export const getSiteNameFromRoles = (site, roles) => {
1169
- // return getSiteName(
1170
- // site,
1171
- // roles.map((r) => {
1172
- // return r.siteInfo;
1173
- // }),
1174
- // );
1175
- // };
1176
- // export const getSiteName = (site, sites) => {
1177
- // if (site === 'hq') {
1178
- // return 'HQ';
1179
- // }
1180
- // const siteObject = _.find(sites, (t) => {
1181
- // return t.Id === site;
1182
- // });
1183
- // if (siteObject) {
1184
- // return siteObject.siteName;
1185
- // }
1186
- // return site;
1187
- // };
1188
- // export const formatCurrency = (number, locale = 'en-AU', curencyCode = 'AUD', shouldFix = false) => {
1189
- // const formatter = Intl.NumberFormat(locale, { style: 'currency', currency: curencyCode, minimumFractionDigits: 2 });
1190
- // let formattedNumber = number;
1191
- // if (shouldFix && formatter.format(formattedNumber).indexOf('NaN') > -1) {
1192
- // formattedNumber = number.replace(/[^\d.-]/g, '');
1193
- // }
1194
- // return formatter.format(formattedNumber);
1195
- // };
1196
- // export const currencyToFloat = (number) => {
1197
- // let result = parseFloat(number);
1198
- // if (isNaN(result)) {
1199
- // result = parseFloat(number.replace(/[^\d.-]/g, ''));
1200
- // if (isNaN(result)) {
1201
- // result = 0;
1202
- // }
1203
- // }
1204
- // return result;
1205
- // };
1206
- // export const getCurrencySymbol = () => {
1207
- // return formatCurrency(0).replace(/[0-9.]+/g, '');
1208
- // };
1209
- // export const isCurrency = (text) => {
1210
- // if (!text) return false;
1211
- // const price = parseFloat(typeof text === 'string' ? text.replace(getCurrencySymbol(), '') : text, 10);
1212
- // return _.isNumber(price) && !Number.isNaN(price) ? price : false;
1213
- // };
1214
- // export const isPaidItem = (enabled, tickets) => {
1215
- // // console.log('isPaidItem', enabled, tickets);
1216
- // return (
1217
- // enabled &&
1218
- // tickets &&
1219
- // tickets.merchant &&
1220
- // tickets.categories &&
1221
- // tickets.categories.length > 0 &&
1222
- // tickets.categories.every((t) => !t.price || _.isNumber(t.price))
1223
- // );
1224
- // };
1225
- // export const getTotalQuantity = (tickets) => _.sumBy(tickets, (t) => t.quantity || 0);
1226
- // export const getTotalPrice = (tickets) => _.sumBy(tickets, (t) => t.price * (t.quantity || 0));
1227
- // export const parseTickets = (tickets, merchant) => {
1228
- // if (Array.isArray(tickets)) return { merchant, categories: tickets };
1229
- // if (tickets && typeof tickets === 'object') return tickets;
1230
- // return { merchant, categories: [{ category: 'Default', price: tickets }] };
1231
- // };
1232
- // export const compileTickets = (tickets, merchant) => {
1233
- // const newTickets = _.cloneDeep(tickets);
1234
- // newTickets.merchant = merchant;
1235
- // newTickets.categories = newTickets.categories.map((ticket) => {
1236
- // ticket.price = isCurrency(ticket.price);
1237
- // return ticket;
1238
- // });
1239
- // return newTickets;
1240
- // };
1241
- // export const getTicketPriceText = (ticket) => {
1242
- // return typeof ticket.price === 'string' ? ticket.price : formatCurrency(ticket.price);
1243
- // };
1244
- // export const isTicketCategoryValid = (ticket, ticketDetail) => {
1245
- // return !_.isEmpty(ticket.category) && ticketDetail.categories.filter((t) => t.category === ticket.category).length === 1;
1246
- // };
1247
- // export const isTicketPriceValid = (ticket) => {
1248
- // return ticket.price && isCurrency(ticket.price) !== false;
1249
- // };
1250
- // export const isTicketsValid = (tickets) => {
1251
- // if (tickets && tickets.categories && tickets.categories.length > 0) {
1252
- // return tickets.categories.every((ticket) => isTicketCategoryValid(ticket, tickets) && isTicketPriceValid(ticket));
1253
- // }
1254
- // return true;
1255
- // };
1256
- // export const getFee = (feeInfo, amount) => {
1257
- // if (!feeInfo.fee) return 0;
1258
- // return feeInfo.isPercentage ? (feeInfo.fee / 100) * amount : feeInfo.fee;
1259
- // };
1260
- // export const isRefund = (transaction) => transaction.TransactionType === 'REFUND';
1261
- // export const combineTickets = (ticketsArray, diff = false) => {
1262
- // if (_.isNil(ticketsArray) || ticketsArray.length === 0) return [];
1263
- // const combined = ticketsArray.reduce((a, c) => {
1264
- // if (_.isNil(a) || a.length === 0) return c;
1265
- // const summed = a.map((cat) => {
1266
- // const cloned = _.clone(cat);
1267
- // const match = c.find((i) => i.category === cloned.category);
1268
- // cloned.quantity = (diff ? -1 : 1) * (cloned.quantity || 0) + (match ? match.quantity || 0 : 0);
1269
- // return cloned;
1270
- // });
1271
- // return summed;
1272
- // });
1273
- // return combined;
1274
- // };
1275
- // export const combineTransactions = (transactionsArray) => {
1276
- // if (_.isNil(transactionsArray) || transactionsArray.length === 0) return null;
1277
- // const combined = _.orderBy(transactionsArray, 'UnixTimestamp', 'desc').reduce((a, c) => {
1278
- // // console.log('transaction a', a.TransactionType, a.TransactionId, a.Amount, a.Fee.amount);
1279
- // // console.log('transaction c', c.TransactionType, c.TransactionId, c.Amount, c.Fee.amount);
1280
- // const cloned = _.cloneDeep(c);
1281
- // cloned.Amount = cloned.Amount + a.Amount;
1282
- // cloned.Fee.amount = cloned.Fee.amount + a.Fee.amount;
1283
- // cloned.Item.categories = combineTickets([cloned.Item.categories, a.Item.categories]);
1284
- // return cloned;
1285
- // });
1286
- // // console.log('combined', combined.TransactionType, combined.TransactionId, combined.Amount, combined.Fee.amount);
1287
- // return combined;
1288
- // };
1289
- // export const consolidateTransactions = (transactionsArray) => {
1290
- // const transactions = transactionsArray
1291
- // .filter((pt) => pt.TransactionType === 'PAYMENT')
1292
- // .map((p) => {
1293
- // // Combine with all refunds for the transaction
1294
- // const refunds = transactionsArray.filter((rt) => rt.TransactionType === 'REFUND' && rt.TransactionId === p.TransactionId);
1295
- // return combineTransactions([...refunds, p]);
1296
- // })
1297
- // .filter((p) => getTotalQuantity(p.Item.categories) > 0);
1298
- // return transactions;
1299
- // };
1300
- // export const isKiosk = (type) => {
1301
- // return type === 'KIOSK' || type === 'FORMKIOSK' || type === 'SIGNINKIOSK';
1302
- // };
1303
- // export const isContentSource = (site) => {
1304
- // if (`${baseClient}-${baseStage}` !== contentSource) {
1305
- // return false;
1306
- // }
1307
- // return site === contentSourceSite;
1308
- // };
1309
- // export const formatDuration = (msDuration) => {
1310
- // const diff = moment.duration(msDuration);
1311
- // let result = '';
1312
- // const days = Math.floor(diff.asDays());
1313
- // if (days > 0) {
1314
- // result += `${days} day${getPluralS(days)} `;
1315
- // diff.add(-days, 'd');
1316
- // }
1317
- // const hours = Math.floor(diff.asHours());
1318
- // if (hours > 0) {
1319
- // result += `${hours} hour${getPluralS(hours)} `;
1320
- // diff.add(-hours, 'h');
1321
- // }
1322
- // const minutes = Math.floor(diff.asMinutes());
1323
- // if (minutes > 0) {
1324
- // result += `${minutes} minute${getPluralS(minutes)} `;
1325
- // diff.add(-minutes, 'm');
1326
- // }
1327
- // if (_.isEmpty(result)) {
1328
- // return 'Less than a minute';
1329
- // }
1330
- // return result.trim();
1331
- // };
1332
- // export const clearLocalStorage = (key) => {
1333
- // window.localStorage.removeItem(key);
1334
- // Cookies.remove(key);
1335
- // };
1336
- // export const TIMESTAMPFORMAT = 'D MMM YYYY h:mma';
1337
- // export const featureInfo = [
1338
- // ...extensionFeatureInfo,
1339
- // {
1340
- // key: 'dashboard',
1341
- // order: 1,
1342
- // text: 'Dashboard',
1343
- // icon: 'dashboard',
1344
- // isFontAwesome: false,
1345
- // url: '/mastermenu',
1346
- // countProps: null,
1347
- // visibleExps: null,
1348
- // },
1349
- // {
1350
- // key: 'events',
1351
- // order: 2,
1352
- // text: 'Events',
1353
- // icon: 'event',
1354
- // isFontAwesome: false,
1355
- // url: '/events',
1356
- // addUrl: '/events/event',
1357
- // addPermission: 'events',
1358
- // singularName: 'event',
1359
- // countProps: ['eventSubmissions', 'length'],
1360
- // visibleExps: {
1361
- // type: 'and',
1362
- // exps: [
1363
- // { type: 'feature', value: 'events' },
1364
- // {
1365
- // type: 'or',
1366
- // exps: [
1367
- // { type: 'permission', value: 'events' },
1368
- // { type: 'permission', value: 'eventAttendance' },
1369
- // { type: 'permission', value: 'eventSubmit' },
1370
- // ],
1371
- // },
1372
- // ],
1373
- // },
1374
- // },
1375
- // {
1376
- // key: 'news',
1377
- // order: 3,
1378
- // text: 'News',
1379
- // icon: 'news',
1380
- // isFontAwesome: false,
1381
- // url: '/news',
1382
- // addUrl: '/news/article',
1383
- // addPermission: 'newsletter',
1384
- // singularName: 'news',
1385
- // countProps: ['newsSubmissions', 'length'],
1386
- // visibleExps: {
1387
- // type: 'and',
1388
- // exps: [
1389
- // { type: 'feature', value: 'news' },
1390
- // {
1391
- // type: 'or',
1392
- // exps: [
1393
- // { type: 'permission', value: 'newsletter' },
1394
- // { type: 'permission', value: 'newsletterSubmit' },
1395
- // ],
1396
- // },
1397
- // ],
1398
- // },
1399
- // },
1400
- // {
1401
- // key: 'alerts',
1402
- // order: 4,
1403
- // text: 'Alerts',
1404
- // icon: 'exclamation-triangle',
1405
- // isFontAwesome: true,
1406
- // url: '/alerts',
1407
- // addUrl: '/alerts/addalert',
1408
- // addPermission: 'alerts',
1409
- // singularName: 'alert',
1410
- // countProps: null,
1411
- // visibleExps: {
1412
- // type: 'and',
1413
- // exps: [
1414
- // { type: 'feature', value: 'alerts' },
1415
- // { type: 'permission', value: 'alerts' },
1416
- // ],
1417
- // },
1418
- // },
1419
- // {
1420
- // key: 'users',
1421
- // order: 5,
1422
- // text: 'Users',
1423
- // icon: 'people',
1424
- // isFontAwesome: false,
1425
- // url: '/usershub',
1426
- // addUrl: '/usershub/adduser',
1427
- // addPermission: 'userManagement',
1428
- // singularName: 'user',
1429
- // countProps: null,
1430
- // visibleExps: {
1431
- // type: 'and',
1432
- // exps: [
1433
- // { type: 'feature', value: 'users' },
1434
- // { type: 'permission', value: 'userManagement' },
1435
- // { type: 'state', value: 'adminOpen' },
1436
- // ],
1437
- // },
1438
- // },
1439
- // {
1440
- // key: 'gallery',
1441
- // order: 6,
1442
- // text: 'Gallery',
1443
- // icon: 'picture-o',
1444
- // isFontAwesome: true,
1445
- // url: '/imageLibrary',
1446
- // addPermission: 'addToPublishingImageLibrary',
1447
- // singularName: 'gallery image',
1448
- // countProps: null,
1449
- // visibleExps: {
1450
- // type: 'and',
1451
- // exps: [
1452
- // { type: 'feature', value: 'gallery' },
1453
- // { type: 'permission', value: 'addToPublishingImageLibrary' },
1454
- // { type: 'state', value: 'adminOpen' },
1455
- // ],
1456
- // },
1457
- // },
1458
- // {
1459
- // key: 'services',
1460
- // order: 7,
1461
- // text: 'Services',
1462
- // icon: 'stethoscope',
1463
- // isFontAwesome: true,
1464
- // url: '/services',
1465
- // addUrl: '/services/service',
1466
- // addPermission: 'services',
1467
- // singularName: 'service',
1468
- // countProps: null,
1469
- // visibleExps: {
1470
- // type: 'and',
1471
- // exps: [
1472
- // { type: 'feature', value: 'services' },
1473
- // { type: 'permission', value: 'services' },
1474
- // { type: 'state', value: 'adminOpen' },
1475
- // ],
1476
- // },
1477
- // },
1478
- // {
1479
- // key: 'sponsors',
1480
- // order: 8,
1481
- // text: 'Sponsors',
1482
- // icon: 'star-o',
1483
- // isFontAwesome: true,
1484
- // url: '/sponsors',
1485
- // addUrl: '/sponsors/sponsor',
1486
- // addPermission: 'services',
1487
- // singularName: 'sponsor',
1488
- // countProps: null,
1489
- // visibleExps: {
1490
- // type: 'and',
1491
- // exps: [
1492
- // { type: 'feature', value: 'services' },
1493
- // { type: 'permission', value: 'services' },
1494
- // { type: 'state', value: 'adminOpen' },
1495
- // ],
1496
- // },
1497
- // },
1498
- // {
1499
- // key: 'info',
1500
- // order: 9,
1501
- // text: 'Information',
1502
- // icon: 'info',
1503
- // isFontAwesome: false,
1504
- // url: '/info',
1505
- // addUrl: '/info/infopage',
1506
- // addPermission: 'infoPages',
1507
- // singularName: CONST_STRINGS.FAQ_ENTRY,
1508
- // countProps: null,
1509
- // visibleExps: {
1510
- // type: 'or',
1511
- // exps: [
1512
- // {
1513
- // type: 'and',
1514
- // exps: [
1515
- // { type: 'feature', value: 'importantContacts' },
1516
- // { type: 'permission', value: 'importantContacts' },
1517
- // ],
1518
- // },
1519
- // {
1520
- // type: 'and',
1521
- // exps: [
1522
- // { type: 'feature', value: 'maps' },
1523
- // { type: 'permission', value: 'maps' },
1524
- // ],
1525
- // },
1526
- // {
1527
- // type: 'and',
1528
- // exps: [
1529
- // { type: 'feature', value: 'infoPages' },
1530
- // { type: 'permission', value: 'infoPages' },
1531
- // ],
1532
- // },
1533
- // {
1534
- // type: 'and',
1535
- // exps: [
1536
- // { type: 'feature', value: 'news' },
1537
- // { type: 'permission', value: 'welcomePages' },
1538
- // ],
1539
- // },
1540
- // { type: 'permission', value: 'terms' },
1541
- // ],
1542
- // },
1543
- // },
1544
- // {
1545
- // key: 'surveys',
1546
- // order: 11,
1547
- // text: 'Surveys',
1548
- // icon: 'pie-chart',
1549
- // isFontAwesome: true,
1550
- // url: '/polls',
1551
- // addUrl: '/polls/poll',
1552
- // addPermission: 'polls',
1553
- // singularName: 'survey',
1554
- // countProps: null,
1555
- // visibleExps: {
1556
- // type: 'and',
1557
- // exps: [
1558
- // { type: 'feature', value: 'surveys' },
1559
- // { type: 'permission', value: 'polls' },
1560
- // { type: 'state', value: 'conciergeOpen' },
1561
- // ],
1562
- // },
1563
- // },
1564
- // {
1565
- // key: 'facilities',
1566
- // order: 12,
1567
- // text: CONST_STRINGS.FACILITIES,
1568
- // icon: 'facility',
1569
- // isFontAwesome: false,
1570
- // url: '/facilities',
1571
- // addUrl: '/facilities/facility',
1572
- // addPermission: 'facilities',
1573
- // singularName: 'facility',
1574
- // countProps: null,
1575
- // visibleExps: {
1576
- // type: 'and',
1577
- // exps: [
1578
- // { type: 'feature', value: 'facilities' },
1579
- // { type: 'permission', value: 'facilities' },
1580
- // { type: 'state', value: 'conciergeOpen' },
1581
- // ],
1582
- // },
1583
- // },
1584
- // {
1585
- // key: 'offers',
1586
- // order: 13,
1587
- // text: 'Offers',
1588
- // icon: 'shopping-bag',
1589
- // isFontAwesome: true,
1590
- // url: '/offers',
1591
- // addUrl: '/offers/offer',
1592
- // addPermission: 'offers',
1593
- // singularName: 'offer',
1594
- // countProps: null,
1595
- // visibleExps: {
1596
- // type: 'and',
1597
- // exps: [
1598
- // { type: 'feature', value: 'offers' },
1599
- // { type: 'permission', value: 'offers' },
1600
- // { type: 'state', value: 'conciergeOpen' },
1601
- // ],
1602
- // },
1603
- // },
1604
- // {
1605
- // key: 'signin',
1606
- // order: 14,
1607
- // text: 'Sign Ins',
1608
- // icon: 'signin',
1609
- // isFontAwesome: false,
1610
- // url: '/signinHub',
1611
- // addUrl: null,
1612
- // addPermission: 'visitors',
1613
- // singularName: 'visitor',
1614
- // countProps: null,
1615
- // visibleExps: {
1616
- // type: 'and',
1617
- // exps: [
1618
- // { type: 'feature', value: 'visitors' },
1619
- // { type: 'permission', value: 'visitors' },
1620
- // { type: 'state', value: 'conciergeOpen' },
1621
- // ],
1622
- // },
1623
- // },
1624
- // {
1625
- // key: 'food',
1626
- // order: 15,
1627
- // text: 'Restaurant Manager',
1628
- // icon: 'cutlery',
1629
- // isFontAwesome: true,
1630
- // url: '/food',
1631
- // addUrl: null,
1632
- // addPermission: 'food',
1633
- // singularName: 'dish',
1634
- // countProps: null,
1635
- // visibleExps: {
1636
- // type: 'and',
1637
- // exps: [
1638
- // { type: 'feature', value: 'food' },
1639
- // { type: 'permission', value: 'food' },
1640
- // ],
1641
- // },
1642
- // },
1643
- // {
1644
- // key: 'payment',
1645
- // order: 16,
1646
- // text: 'Payment',
1647
- // icon: 'usd',
1648
- // isFontAwesome: true,
1649
- // url: '/payment',
1650
- // addUrl: null,
1651
- // addPermission: null,
1652
- // singularName: 'payment',
1653
- // countProps: null,
1654
- // visibleExps: {
1655
- // type: 'and',
1656
- // exps: [
1657
- // { type: 'props', value: 'paymentEnabled' },
1658
- // {
1659
- // type: 'or',
1660
- // exps: [
1661
- // { type: 'feature', value: 'managePayments' },
1662
- // { type: 'permission', value: 'viewPayments' },
1663
- // ],
1664
- // },
1665
- // ],
1666
- // },
1667
- // },
1668
- // {
1669
- // key: 'automation',
1670
- // order: 17,
1671
- // text: 'Automation',
1672
- // icon: 'bolt',
1673
- // isFontAwesome: true,
1674
- // url: '/automationHub',
1675
- // addUrl: null,
1676
- // addPermission: null,
1677
- // singularName: 'automation',
1678
- // countProps: null,
1679
- // visibleExps: { type: 'master', value: true },
1680
- // },
1681
- // ];
1682
- // export const getFeatureInfo = (type) => {
1683
- // switch (type) {
1684
- // case 'maps':
1685
- // return {
1686
- // key: 'maps',
1687
- // icon: 'map',
1688
- // isFontAwesome: true,
1689
- // url: '/info',
1690
- // addUrl: '/info/map',
1691
- // addPermission: 'maps',
1692
- // singularName: 'map',
1693
- // };
1694
- // case 'importantContacts':
1695
- // return {
1696
- // key: 'importantContacts',
1697
- // icon: 'address-card-o',
1698
- // isFontAwesome: true,
1699
- // url: '/info',
1700
- // addUrl: '/info/importantcontact',
1701
- // addPermission: 'importantContacts',
1702
- // singularName: 'contact',
1703
- // };
1704
- // case 'info':
1705
- // case 'infoPages':
1706
- // return featureInfo.find((n) => n.key === 'info');
1707
- // default:
1708
- // const info = featureInfo.find((n) => n.key === type);
1709
- // return info || { key: type, icon: type };
1710
- // }
1711
- // };
1066
+ };
1712
1067
 
1713
1068
  var setChatUser = function setChatUser(auth) {
1714
1069
  if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
@@ -6340,6 +5695,29 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
6340
5695
  _classCallCheck(this, HubSidebar);
6341
5696
 
6342
5697
  _this = _super.call(this, props);
5698
+
5699
+ _defineProperty(_assertThisInitialized(_this), "renderHelpGuide", function () {
5700
+ if (!_this.props.helpGuide) return null;
5701
+ var _this$props$helpGuide = _this.props.helpGuide,
5702
+ text = _this$props$helpGuide.text,
5703
+ url = _this$props$helpGuide.url;
5704
+
5705
+ var onHelpGuidePress = function onHelpGuidePress() {
5706
+ if (!url) return;
5707
+ window.open(url, '_blank');
5708
+ };
5709
+
5710
+ return /*#__PURE__*/React.createElement("div", {
5711
+ className: "hubSidebar_helpGuideContainer"
5712
+ }, /*#__PURE__*/React.createElement(Button, {
5713
+ buttonType: "outlined",
5714
+ isActive: true,
5715
+ leftIcon: "info-circle",
5716
+ narrow: true,
5717
+ onClick: onHelpGuidePress
5718
+ }, text || 'Help Guide'));
5719
+ });
5720
+
6343
5721
  _this.state = {
6344
5722
  showSidebar: false
6345
5723
  };
@@ -6444,7 +5822,7 @@ var HubSidebar = /*#__PURE__*/function (_PureComponent) {
6444
5822
  className: "hubSidebar_content"
6445
5823
  }, this.props.sections.map(function (section, i) {
6446
5824
  return _this4.renderSection(section, i);
6447
- })));
5825
+ })), this.renderHelpGuide());
6448
5826
  }
6449
5827
  }]);
6450
5828
 
@@ -11838,6 +11216,27 @@ var index = /*#__PURE__*/Object.freeze({
11838
11216
  Tabs: Tabs
11839
11217
  });
11840
11218
 
11219
+ var HelpGuide = {
11220
+ Dashboard: 'https://www.notion.so/plusscommunities/Getting-Started-on-Community-Manager-09fb060d6c9a4448ad3764fdb737a243?pvs=4#e020858ed894461b83d307367ba4c299',
11221
+ FeaturePicker: 'https://www.notion.so/plusscommunities/Getting-Started-on-Community-Manager-09fb060d6c9a4448ad3764fdb737a243?pvs=4#dce59fe82dae4f049ce1503c41a54d44',
11222
+ News: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#2776fdb4ed5149cca48e6be792dec32b',
11223
+ Events: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#b83768f31d57404499f5cff0f54905da',
11224
+ Alerts: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#9a19c903ad4a41c2bb557de1922802c5',
11225
+ Gallery: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#7abde97ce18b42df9bacb2b1dad352aa',
11226
+ Groups: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#a944987e875e4d1796086912960036e2',
11227
+ Maintenance: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#6aa1966fe9bd4e26a57d1116566d0f33',
11228
+ Facilities: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#57f0eb8a09a14196b456a081778eb0ae',
11229
+ Services: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#894364ba645446e98c7213d28c032cfa',
11230
+ Offers: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#af0a26b5a04243bb92a68d712e661870',
11231
+ Survey: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#6467564cea4c4ea893b69cf54e1fe4ed',
11232
+ Information: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#3c83b4aa82564e31b15a2c8a6d4b416a',
11233
+ Users: 'https://plusscommunities.notion.site/Managing-Your-Users-3a29335153344eaa9aef6314141f4adc',
11234
+ Payment: 'https://plusscommunities.notion.site/Setting-up-Your-Payment-Gateway-32443cffd7ce400db6ff5abed780e700'
11235
+ };
11236
+ var Urls = {
11237
+ HelpGuide: HelpGuide
11238
+ };
11239
+
11841
11240
  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; }
11842
11241
 
11843
11242
  function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -11905,4 +11304,4 @@ var Reducers = {
11905
11304
  scheduledActions: ScheduledActionsReducer
11906
11305
  };
11907
11306
 
11908
- export { index$1 as Actions, analytics as Analytics, index$2 as Apis, colours as Colours, index as Components, CoreConfig as Config, index$3 as Helper, Reducers, session as Session };
11307
+ export { index$1 as Actions, analytics as Analytics, index$2 as Apis, colours as Colours, index as Components, CoreConfig as Config, index$3 as Helper, Reducers, session as Session, Urls };