@plusscommunities/pluss-core-web 1.4.29 → 1.4.31

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,613 +1061,18 @@
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
- if (!window.tidioChatApi || !window.tidioChatApi.setVisitorData) {
1713
- setTimeout(function () {
1714
- setChatUser(auth);
1715
- }, 1000);
1716
- return;
1717
- }
1067
+ return;
1068
+ }; // deprecated
1718
1069
 
1719
- if (!auth.user) {
1720
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1721
- name: undefined,
1722
- email: undefined,
1723
- phone: undefined,
1724
- site: undefined,
1725
- company: CoreConfig.env.clientName,
1726
- distinct_id: undefined
1727
- });
1728
- }
1729
-
1730
- return window.tidioChatApi && window.tidioChatApi.setVisitorData({
1731
- name: "".concat(auth.user.displayName, " - ").concat(CoreConfig.env.clientName, " ").concat(auth.site),
1732
- email: auth.user.email,
1733
- phone: auth.user.phoneNumber,
1734
- site: auth.site,
1735
- userType: auth.auth,
1736
- company: CoreConfig.env.clientName,
1737
- distinct_id: auth.user.Id
1738
- });
1739
- };
1740
1070
  var openChat = function openChat() {
1741
- window.tidioChatApi.display(true);
1742
- window.tidioChatApi.open();
1743
- };
1071
+ return;
1072
+ }; // deprecated
1073
+
1744
1074
  var hideChat = function hideChat() {
1745
- if (window.tidioChatApi && window.tidioChatApi.display) {
1746
- setTimeout(function () {
1747
- window.tidioChatApi.display(false);
1748
- }, 1000);
1749
- } else {
1750
- setTimeout(function () {
1751
- hideChat();
1752
- }, 1000);
1753
- }
1075
+ return;
1754
1076
  };
1755
1077
 
1756
1078
  // api
@@ -6338,6 +5660,29 @@
6338
5660
  _classCallCheck__default['default'](this, HubSidebar);
6339
5661
 
6340
5662
  _this = _super.call(this, props);
5663
+
5664
+ _defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "renderHelpGuide", function () {
5665
+ if (!_this.props.helpGuide) return null;
5666
+ var _this$props$helpGuide = _this.props.helpGuide,
5667
+ text = _this$props$helpGuide.text,
5668
+ url = _this$props$helpGuide.url;
5669
+
5670
+ var onHelpGuidePress = function onHelpGuidePress() {
5671
+ if (!url) return;
5672
+ window.open(url, '_blank');
5673
+ };
5674
+
5675
+ return /*#__PURE__*/React__default['default'].createElement("div", {
5676
+ className: "hubSidebar_helpGuideContainer"
5677
+ }, /*#__PURE__*/React__default['default'].createElement(Button, {
5678
+ buttonType: "outlined",
5679
+ isActive: true,
5680
+ leftIcon: "info-circle",
5681
+ narrow: true,
5682
+ onClick: onHelpGuidePress
5683
+ }, text || 'Help Guide'));
5684
+ });
5685
+
6341
5686
  _this.state = {
6342
5687
  showSidebar: false
6343
5688
  };
@@ -6442,7 +5787,7 @@
6442
5787
  className: "hubSidebar_content"
6443
5788
  }, this.props.sections.map(function (section, i) {
6444
5789
  return _this4.renderSection(section, i);
6445
- })));
5790
+ })), this.renderHelpGuide());
6446
5791
  }
6447
5792
  }]);
6448
5793
 
@@ -7437,11 +6782,12 @@
7437
6782
  onDrop: function onDrop(files) {
7438
6783
  return _this6.onDrop(files, true);
7439
6784
  }
7440
- }, function (_ref8) {
7441
- var getRootProps = _ref8.getRootProps;
6785
+ }, function (state) {
6786
+ var getRootProps = state.getRootProps,
6787
+ getInputProps = state.getInputProps;
7442
6788
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
7443
6789
  className: "imageInput_buttonContainer-simple"
7444
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement(Button, {
6790
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement(Button, {
7445
6791
  buttonType: "secondary",
7446
6792
  className: "imageInput_button imageInput_button-simple",
7447
6793
  disabled: true
@@ -7489,13 +6835,14 @@
7489
6835
  disabled: this.props.disabled,
7490
6836
  accept: this.getAccept(),
7491
6837
  onDrop: this.onDrop
7492
- }, function (_ref9) {
7493
- var getRootProps = _ref9.getRootProps,
7494
- isDragActive = _ref9.isDragActive;
6838
+ }, function (state) {
6839
+ var getRootProps = state.getRootProps,
6840
+ getInputProps = state.getInputProps,
6841
+ isDragActive = state.isDragActive;
7495
6842
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
7496
6843
  style: _objectSpread$a({}, _this6.props.style),
7497
6844
  className: "imageInput_upload ".concat(_this6.getErrorState())
7498
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("div", {
6845
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7499
6846
  className: "".concat(isDragActive ? 'imageInput_dropZoneActive' : '', " ").concat(_this6.props.horizontalText ? ' imageInput_horizontalText' : '')
7500
6847
  }, !_this6.props.simpleStyle && /*#__PURE__*/React__default['default'].createElement("img", {
7501
6848
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7739,15 +7086,16 @@
7739
7086
  onDrop: function onDrop(files) {
7740
7087
  return _this12.onDrop(files, true);
7741
7088
  }
7742
- }, function (_ref10) {
7743
- var getRootProps = _ref10.getRootProps,
7744
- isDragActive = _ref10.isDragActive;
7089
+ }, function (state) {
7090
+ var getRootProps = state.getRootProps,
7091
+ getInputProps = state.getInputProps,
7092
+ isDragActive = state.isDragActive;
7745
7093
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({
7746
7094
  style: {
7747
7095
  padding: '15px'
7748
7096
  },
7749
7097
  className: "imageInput_upload folder ".concat(_this12.getErrorState())
7750
- }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7098
+ }, getRootProps()), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement("div", {
7751
7099
  className: isDragActive ? 'imageInput_dropZoneActive' : ''
7752
7100
  }, /*#__PURE__*/React__default['default'].createElement("img", {
7753
7101
  src: "https://s3-ap-southeast-2.amazonaws.com/pluss60-dev-media/pluss/document.svg",
@@ -7841,11 +7189,12 @@
7841
7189
  onDrop: function onDrop(files) {
7842
7190
  return _this15.onDrop(files, true);
7843
7191
  }
7844
- }, function (_ref11) {
7845
- var getRootProps = _ref11.getRootProps;
7192
+ }, function (state) {
7193
+ var getRootProps = state.getRootProps,
7194
+ getInputProps = state.getInputProps;
7846
7195
  return /*#__PURE__*/React__default['default'].createElement("div", _extends__default['default']({}, getRootProps(), {
7847
7196
  className: "imageInputRight_button"
7848
- }), /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
7197
+ }), /*#__PURE__*/React__default['default'].createElement("input", getInputProps()), /*#__PURE__*/React__default['default'].createElement(FontAwesome__default['default'], {
7849
7198
  className: "imageInputRight_button_icon",
7850
7199
  name: "plus-circle"
7851
7200
  }), /*#__PURE__*/React__default['default'].createElement("p", {
@@ -11836,6 +11185,27 @@
11836
11185
  Tabs: Tabs
11837
11186
  });
11838
11187
 
11188
+ var HelpGuide = {
11189
+ Dashboard: 'https://www.notion.so/plusscommunities/Getting-Started-on-Community-Manager-09fb060d6c9a4448ad3764fdb737a243?pvs=4#e020858ed894461b83d307367ba4c299',
11190
+ FeaturePicker: 'https://www.notion.so/plusscommunities/Getting-Started-on-Community-Manager-09fb060d6c9a4448ad3764fdb737a243?pvs=4#dce59fe82dae4f049ce1503c41a54d44',
11191
+ News: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#2776fdb4ed5149cca48e6be792dec32b',
11192
+ Events: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#b83768f31d57404499f5cff0f54905da',
11193
+ Alerts: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#9a19c903ad4a41c2bb557de1922802c5',
11194
+ Gallery: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#7abde97ce18b42df9bacb2b1dad352aa',
11195
+ Groups: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#a944987e875e4d1796086912960036e2',
11196
+ Maintenance: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#6aa1966fe9bd4e26a57d1116566d0f33',
11197
+ Facilities: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#57f0eb8a09a14196b456a081778eb0ae',
11198
+ Services: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#894364ba645446e98c7213d28c032cfa',
11199
+ Offers: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#af0a26b5a04243bb92a68d712e661870',
11200
+ Survey: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#6467564cea4c4ea893b69cf54e1fe4ed',
11201
+ Information: 'https://www.notion.so/plusscommunities/Using-the-Features-234e8e4959c24d4f917dfa4982115cc9?pvs=4#3c83b4aa82564e31b15a2c8a6d4b416a',
11202
+ Users: 'https://plusscommunities.notion.site/Managing-Your-Users-3a29335153344eaa9aef6314141f4adc',
11203
+ Payment: 'https://plusscommunities.notion.site/Setting-up-Your-Payment-Gateway-32443cffd7ce400db6ff5abed780e700'
11204
+ };
11205
+ var Urls = {
11206
+ HelpGuide: HelpGuide
11207
+ };
11208
+
11839
11209
  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; }
11840
11210
 
11841
11211
  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; }
@@ -11912,6 +11282,7 @@
11912
11282
  exports.Helper = index$3;
11913
11283
  exports.Reducers = Reducers;
11914
11284
  exports.Session = session;
11285
+ exports.Urls = Urls;
11915
11286
 
11916
11287
  Object.defineProperty(exports, '__esModule', { value: true });
11917
11288