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