@planningcenter/topbar 12.5.0 → 12.6.0-rc.0
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/topbar.css +85 -31
- package/dist/topbar.css.map +1 -1
- package/dist/topbar.js +119 -75
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +119 -75
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +119 -75
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +119 -75
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +5 -3
package/dist/topbar.umd.js
CHANGED
|
@@ -3311,7 +3311,11 @@ true;
|
|
|
3311
3311
|
|
|
3312
3312
|
const isMac = () => /Mac|iPhone|iPad|iPod/.test(navigator.platform);
|
|
3313
3313
|
const hasCommandKey = event => isMac() ? event.metaKey : event.ctrlKey;
|
|
3314
|
-
const matchesShortcut = (shortcut, event) =>
|
|
3314
|
+
const matchesShortcut = (shortcut, event) => {
|
|
3315
|
+
var _a;
|
|
3316
|
+
// Chrome's autofill sends a keydown with no key.
|
|
3317
|
+
return ((_a = event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === shortcut.key && !event.altKey && !event.shiftKey && hasCommandKey(event) === shortcut.modifierKey;
|
|
3318
|
+
};
|
|
3315
3319
|
const isSearchShortcut = event => matchesShortcut(KEYBOARD_SHORTCUTS.openSearch, event);
|
|
3316
3320
|
// Products opened their own search with `/` before this one replaced it.
|
|
3317
3321
|
const isLegacySearchShortcut = event => event.key === "/" && !event.altKey && !event.ctrlKey && !event.metaKey && !isTypingIn(event.target);
|
|
@@ -4114,18 +4118,7 @@ true;
|
|
|
4114
4118
|
return undefined;
|
|
4115
4119
|
}
|
|
4116
4120
|
}
|
|
4117
|
-
|
|
4118
|
-
function mintToken(personId) {
|
|
4119
|
-
const running = minting.get(personId);
|
|
4120
|
-
if (running) {
|
|
4121
|
-
return running;
|
|
4122
|
-
} else {
|
|
4123
|
-
const run = mint(personId).finally(() => minting.delete(personId));
|
|
4124
|
-
minting.set(personId, run);
|
|
4125
|
-
return run;
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
async function mint(personId) {
|
|
4121
|
+
async function mintToken(personId) {
|
|
4129
4122
|
const {
|
|
4130
4123
|
json,
|
|
4131
4124
|
ok,
|
|
@@ -4149,9 +4142,9 @@ true;
|
|
|
4149
4142
|
}
|
|
4150
4143
|
return token;
|
|
4151
4144
|
}
|
|
4152
|
-
function
|
|
4145
|
+
function hasReadOnlyToken(personId) {
|
|
4153
4146
|
var _a;
|
|
4154
|
-
return (_a = cachedToken(personId))
|
|
4147
|
+
return ((_a = cachedToken(personId)) === null || _a === void 0 ? void 0 : _a.readOnly) === true;
|
|
4155
4148
|
}
|
|
4156
4149
|
async function request(personId, key, init = {}, isRetry = false) {
|
|
4157
4150
|
var _a;
|
|
@@ -4305,23 +4298,15 @@ true;
|
|
|
4305
4298
|
function syncRecentlyVisited(scope) {
|
|
4306
4299
|
return sync(scope, false);
|
|
4307
4300
|
}
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
}
|
|
4313
|
-
}
|
|
4301
|
+
// Staff impersonating someone get a read-only token, and their visits stay out
|
|
4302
|
+
// of that person's list. Until the token is minted the visit is kept, and the
|
|
4303
|
+
// sync that mints it replaces the local list with the synced one, so recording
|
|
4304
|
+
// never waits on the network.
|
|
4314
4305
|
function recordVisit(visit, scope) {
|
|
4315
4306
|
const entry = toEntry(visit, new Date());
|
|
4316
|
-
if (
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
const token = isUserStoreSyncUnavailable() ? null : currentToken(scope.personId);
|
|
4320
|
-
if (token instanceof Promise) {
|
|
4321
|
-
return token.then(minted => record(entry, scope, minted));
|
|
4322
|
-
} else {
|
|
4323
|
-
record(entry, scope, token);
|
|
4324
|
-
return Promise.resolve();
|
|
4307
|
+
if (isEntry(entry) && !hasReadOnlyToken(scope.personId)) {
|
|
4308
|
+
writeRecentlyVisited(scope, addVisit(readRecentlyVisited(scope), entry));
|
|
4309
|
+
sync(scope, true);
|
|
4325
4310
|
}
|
|
4326
4311
|
}
|
|
4327
4312
|
function useRecentlyVisited({
|
|
@@ -4598,11 +4583,13 @@ true;
|
|
|
4598
4583
|
attributes,
|
|
4599
4584
|
id
|
|
4600
4585
|
}, timeZone) {
|
|
4586
|
+
var _a;
|
|
4601
4587
|
return {
|
|
4602
4588
|
category: attributes.category,
|
|
4603
4589
|
imageUrl: attributes.image_url,
|
|
4604
4590
|
key: id,
|
|
4605
4591
|
product: attributes.product,
|
|
4592
|
+
subdued: (_a = attributes.subdued) !== null && _a !== void 0 ? _a : false,
|
|
4606
4593
|
subtitle: summarize(attributes, timeZone),
|
|
4607
4594
|
title: attributes.title,
|
|
4608
4595
|
url: attributes.url
|
|
@@ -4667,6 +4654,7 @@ true;
|
|
|
4667
4654
|
category: "generic",
|
|
4668
4655
|
imageUrl: null,
|
|
4669
4656
|
product: app,
|
|
4657
|
+
subdued: false,
|
|
4670
4658
|
subtitle: joinParts(capitalize((_a = metadata === null || metadata === void 0 ? void 0 : metadata.type) !== null && _a !== void 0 ? _a : ""), (_b = metadata === null || metadata === void 0 ? void 0 : metadata.details) !== null && _b !== void 0 ? _b : ""),
|
|
4671
4659
|
title,
|
|
4672
4660
|
url: visit.url
|
|
@@ -4679,6 +4667,7 @@ true;
|
|
|
4679
4667
|
category,
|
|
4680
4668
|
image_url,
|
|
4681
4669
|
product,
|
|
4670
|
+
subdued,
|
|
4682
4671
|
title,
|
|
4683
4672
|
type
|
|
4684
4673
|
} = attributes;
|
|
@@ -4688,6 +4677,7 @@ true;
|
|
|
4688
4677
|
category,
|
|
4689
4678
|
imageUrl: image_url,
|
|
4690
4679
|
product,
|
|
4680
|
+
subdued: subdued !== null && subdued !== void 0 ? subdued : false,
|
|
4691
4681
|
subtitle: joinParts(kind, summarize(attributes, timeZone)),
|
|
4692
4682
|
title,
|
|
4693
4683
|
url: visit.url
|
|
@@ -5418,7 +5408,7 @@ true;
|
|
|
5418
5408
|
|
|
5419
5409
|
const resultId = (listboxId, index) => `${listboxId}-result-${index}`;
|
|
5420
5410
|
|
|
5421
|
-
var styles$e = {"result":"result-Thq2C","title":"title-KYUEn","subtitle":"subtitle-R2haq","image":"image-KVDor","avatar":"avatar-6Gh62","photo":"photo-FZR3Q","badge":"badge-trUKt"};
|
|
5411
|
+
var styles$e = {"result":"result-Thq2C","title":"title-KYUEn","subtitle":"subtitle-R2haq","image":"image-KVDor","avatar":"avatar-6Gh62","photo":"photo-FZR3Q","badge":"badge-trUKt","subdued":"subdued-YzRpa"};
|
|
5422
5412
|
|
|
5423
5413
|
function SearchResult({
|
|
5424
5414
|
category,
|
|
@@ -5430,6 +5420,7 @@ true;
|
|
|
5430
5420
|
onHighlight,
|
|
5431
5421
|
onOpen,
|
|
5432
5422
|
product,
|
|
5423
|
+
subdued,
|
|
5433
5424
|
subtitle,
|
|
5434
5425
|
title,
|
|
5435
5426
|
url
|
|
@@ -5478,12 +5469,13 @@ true;
|
|
|
5478
5469
|
return (
|
|
5479
5470
|
/*#__PURE__*/
|
|
5480
5471
|
// Named by the title alone, so screen readers say "Ada Lovelace" rather
|
|
5481
|
-
// than the whole row.
|
|
5472
|
+
// than the whole row. Whether it's inactive, then the section and
|
|
5473
|
+
// subtitle, are read after a pause.
|
|
5482
5474
|
React.createElement("a", {
|
|
5483
|
-
"aria-describedby": [describedBy, subtitle && `${id}-subtitle`].filter(Boolean).join(" ") || undefined,
|
|
5475
|
+
"aria-describedby": [subdued && `${id}-subdued`, describedBy, subtitle && `${id}-subtitle`].filter(Boolean).join(" ") || undefined,
|
|
5484
5476
|
"aria-labelledby": title ? `${id}-title` : undefined,
|
|
5485
5477
|
"aria-selected": highlighted,
|
|
5486
|
-
className: styles$e.result,
|
|
5478
|
+
className: classnames(styles$e.result, subdued && styles$e.subdued),
|
|
5487
5479
|
"data-turbo": "false",
|
|
5488
5480
|
href: url,
|
|
5489
5481
|
id: id,
|
|
@@ -5502,7 +5494,10 @@ true;
|
|
|
5502
5494
|
}, title), /*#__PURE__*/React.createElement("span", {
|
|
5503
5495
|
className: styles$e.subtitle,
|
|
5504
5496
|
id: `${id}-subtitle`
|
|
5505
|
-
}, subtitle)
|
|
5497
|
+
}, subtitle), subdued && (/*#__PURE__*/React.createElement("span", {
|
|
5498
|
+
className: styles$k.visuallyHidden,
|
|
5499
|
+
id: `${id}-subdued`
|
|
5500
|
+
}, "Inactive")))
|
|
5506
5501
|
);
|
|
5507
5502
|
}
|
|
5508
5503
|
// A person's photo or the result's own image, badged with its product, or
|
|
@@ -5561,6 +5556,7 @@ true;
|
|
|
5561
5556
|
onHighlight: () => onHighlight(itemIndex),
|
|
5562
5557
|
onOpen: onOpen,
|
|
5563
5558
|
product: item.product,
|
|
5559
|
+
subdued: item.subdued,
|
|
5564
5560
|
subtitle: item.subtitle,
|
|
5565
5561
|
title: item.title,
|
|
5566
5562
|
url: item.url
|
|
@@ -36605,9 +36601,9 @@ true;
|
|
|
36605
36601
|
const Helpdesk = {
|
|
36606
36602
|
component: HelpdeskComponent,
|
|
36607
36603
|
icons: {
|
|
36608
|
-
|
|
36609
|
-
staticPath: "M16 10C14.9391 10 13.9217 10.4214 13.1716 11.1716C12.4214 11.9217 12 12.9391 12 14H14C14 13.4696 14.2107 12.9609 14.5858 12.5858C14.9609 12.2107 15.4696 12 16 12C16.5304 12 17.0391 12.2107 17.4142 12.5858C17.7893 12.9609 18 13.4696 18 14C18 16 15 15.75 15 19H17C17 16.75 20 16.5 20 14C20 12.9391 19.5786 11.9217 18.8284 11.1716C18.0783 10.4214 17.0609 10 16 10ZM16 24C14.4178 24 12.871 23.5308 11.5554 22.6518C10.2399 21.7727 9.21447 20.5233 8.60897 19.0615C8.00347 17.5997 7.84504 15.9911 8.15372 14.4393C8.4624 12.8874 9.22433 11.462 10.3432 10.3431C11.462 9.22433 12.8874 8.4624 14.4393 8.15372C15.9911 7.84504 17.5997 8.00346 19.0615 8.60896C20.5233 9.21446 21.7727 10.2398 22.6518 11.5554C23.5308 12.871 24 14.4177 24 16C23.9974 18.1209 23.1537 20.1542 21.6539 21.6539C20.1542 23.1537 18.1209 23.9974 16 24ZM16 6C14.0222 6 12.0888 6.58649 10.4443 7.6853C8.79981 8.78412 7.51809 10.3459 6.76121 12.1732C6.00433 14.0004 5.8063 16.0111 6.19215 17.9509C6.578 19.8907 7.53041 21.6725 8.92894 23.0711C10.3275 24.4696 12.1093 25.422 14.0491 25.8079C15.9889 26.1937 17.9996 25.9957 19.8268 25.2388C21.6541 24.4819 23.2159 23.2002 24.3147 21.5557C25.4135 19.9112 26 17.9778 26 16C26 13.3478 24.9464 10.8043 23.0711 8.92893C21.1957 7.05357 18.6522 6 16 6V6ZM15 22H17V20H15V22Z"
|
|
36604
|
+
path: "M16.9997 19.9977v1.9992h-1.9975v-1.9992z m-0.9987-9.9937c1.0595 0.0001 2.0774 0.4207 2.8266 1.1699 0.7492 0.7508 1.1698 1.7671 1.17 2.8266 0 2.4989-2.9979 2.7488-2.9979 4.9969h-1.9975c0-3.2467 2.9978-2.9981 2.9978-4.9969-0.0001-0.5289-0.2112-1.0388-0.5857-1.4133-0.3746-0.3746-0.8828-0.5856-1.4133-0.5857-0.5304 0-1.0387 0.2114-1.4134 0.5857-0.3746 0.3746-0.5856 0.8844-0.5857 1.4133h-1.9991c0.0001-1.0595 0.4222-2.0758 1.1715-2.8266 0.7493-0.7491 1.7672-1.1699 2.8267-1.1699z m0-3.9966c2.6499 0.0001 5.1917 1.0523 7.0651 2.9271 1.8748 1.8733 2.927 4.4151 2.9271 7.0651 0 1.9762-0.5853 3.9094-1.6835 5.5528-1.0983 1.6418-2.6583 2.9236-4.485 3.6794-1.8249 0.7574-3.835 0.9542-5.7726 0.5684-1.9392-0.3859-3.7204-1.3366-5.1178-2.734-1.3974-1.3974-2.3496-3.1785-2.7355-5.1178-0.3858-1.9376-0.1873-3.9477 0.57-5.7726 0.7558-1.8267 2.0375-3.3867 3.6809-4.485 1.6418-1.0982 3.575-1.6834 5.5513-1.6834z m3.059 2.6068c-1.4616-0.6045-3.07-0.7641-4.62-0.4554-1.5499 0.3088-2.9749 1.07-4.0923 2.1891-1.119 1.1175-1.8788 2.5424-2.1876 4.0923-0.3087 1.5501-0.1508 3.1583 0.4539 4.62 0.6045 1.4598 1.6294 2.7072 2.9444 3.5868 1.3154 0.878 2.8618 1.3458 4.4426 1.3458 2.1192-0.0018 4.1516-0.846 5.6486-2.3446 1.4985-1.4971 2.3429-3.5294 2.3445-5.6486 0-1.5806-0.4679-3.1257-1.3458-4.441-0.8796-1.3154-2.1283-2.3398-3.5883-2.9444z"
|
|
36610
36605
|
},
|
|
36606
|
+
label: "Help and support",
|
|
36611
36607
|
name: "Helpdesk",
|
|
36612
36608
|
storageExemptPaths: ["email", "phone"]
|
|
36613
36609
|
};
|
|
@@ -36880,13 +36876,15 @@ true;
|
|
|
36880
36876
|
return notification.data;
|
|
36881
36877
|
}
|
|
36882
36878
|
};
|
|
36883
|
-
const updateStateFromJoltMessage = React.useCallback(message => {
|
|
36879
|
+
const updateStateFromJoltMessage = React.useCallback(async message => {
|
|
36884
36880
|
try {
|
|
36885
36881
|
const joltMessageNotificationDataPayload = extractPayloadFromJoltMessage(message);
|
|
36886
|
-
fetchNotification(joltMessageNotificationDataPayload.data.id)
|
|
36887
|
-
|
|
36888
|
-
|
|
36889
|
-
}
|
|
36882
|
+
const resp = await fetchNotification(joltMessageNotificationDataPayload.data.id);
|
|
36883
|
+
if (!(resp === null || resp === void 0 ? void 0 : resp.data)) {
|
|
36884
|
+
return;
|
|
36885
|
+
}
|
|
36886
|
+
const notification = buildNotificationFromApiResponse(resp.data, resp);
|
|
36887
|
+
setNotifications(notifications => [...notifications.filter(candidate => candidate.id !== notification.id), notification]);
|
|
36890
36888
|
} catch (exception) {
|
|
36891
36889
|
console.error("topbar encountered error when updating state from jolt message", exception);
|
|
36892
36890
|
}
|
|
@@ -37139,13 +37137,12 @@ true;
|
|
|
37139
37137
|
const Notifications = {
|
|
37140
37138
|
component: NotificationsComponent,
|
|
37141
37139
|
icons: {
|
|
37142
|
-
|
|
37143
|
-
staticPath: "M16.0003 6C12.4122 6 9.50357 8.90867 9.50357 12.4967V16.5862L6.54499 19.7387C5.34665 21.0156 6.25199 23.1069 8.00314 23.1069H13.335C13.7864 24.1303 14.81 24.8438 16.0001 24.8438C17.1902 24.8438 18.2138 24.1303 18.6653 23.1069H23.9973C25.7484 23.1069 26.6538 21.0156 25.4554 19.7387L22.497 16.5863V12.4967C22.497 8.90867 19.5883 6 16.0003 6ZM11.5036 12.4967C11.5036 10.0132 13.5168 8 16.0003 8C18.4837 8 20.497 10.0132 20.497 12.4967V16.9821V17.3778L20.7678 17.6664L23.9843 21.0938H8.01612L11.2327 17.6663L11.5036 17.3777V16.982V12.4967ZM8.00474 21.1059L8.00378 21.1069H8.00474V21.1059ZM23.9952 21.1069H23.9966L23.9952 21.1053V21.1069Z"
|
|
37140
|
+
path: "M15.9991 6.0078c1.8733 0.0145 3.6659 0.7729 4.9811 2.1075 1.3154 1.3346 2.0464 3.1362 2.0353 5.011v4.4975l2.5078 2.9931c0.2489 0.2923 0.407 0.6509 0.4586 1.0318 0.0515 0.3809-0.0072 0.7691-0.1711 1.118-0.1528 0.3473-0.4041 0.6421-0.7225 0.8496-0.3182 0.2073-0.69 0.3173-1.0693 0.3156h-4.9781c-0.2428 0.6075-0.6612 1.13-1.2029 1.4981-0.5435 0.3666-1.1828 0.5622-1.8389 0.5622-0.6542 0-1.294-0.1957-1.8357-0.5622-0.4742-0.3221-0.8546-0.7629-1.104-1.275l-0.0989-0.2231h-4.9765c-0.3794 0.0032-0.7527-0.1068-1.071-0.314-0.32-0.2074-0.5712-0.5038-0.7239-0.8512-0.1623-0.3489-0.2226-0.7386-0.1712-1.1196 0.0515-0.3808 0.2111-0.7392 0.4585-1.0318l2.5095-2.9915v-4.4975c-0.0111-1.8733 0.7199-3.6764 2.0352-5.011 1.3136-1.3344 3.105-2.0912 4.978-2.1075z m-0.0047 1.9755c-0.6751 0.0001-1.344 0.1338-1.9677 0.3926-0.6239 0.2589-1.1901 0.6374-1.6677 1.115-0.4776 0.4776-0.8561 1.0438-1.1149 1.6677-0.2587 0.6237-0.3894 1.2926-0.3895 1.9677v4.8351c0 0.2395-0.0844 0.4731-0.2387 0.658l-2.712 3.2475 0.0801 0.1476h16.035l0.0768-0.1507-2.7213-3.246c-0.1544-0.1849-0.2388-0.4184-0.2388-0.6595v-4.832c0-0.6752-0.1338-1.3439-0.3925-1.9677-0.2573-0.6238-0.636-1.1902-1.1134-1.6677-0.4775-0.4775-1.0439-0.8561-1.6677-1.115-0.6239-0.2589-1.2939-0.3926-1.9677-0.3926z"
|
|
37144
37141
|
},
|
|
37145
37142
|
name: "Notifications"
|
|
37146
37143
|
};
|
|
37147
37144
|
|
|
37148
|
-
const SPARKLE_PATH = "
|
|
37145
|
+
const SPARKLE_PATH = "M9.2474 19.7799c0.2619-0.0002 0.4863 0.1883 0.5324 0.4459 0.0932 0.527 0.2872 0.904 0.5528 1.17 0.2659 0.2658 0.643 0.4594 1.1699 0.5527 0.2577 0.0457 0.447 0.2708 0.4475 0.5325-0.0001 0.2621-0.1893 0.4869-0.4475 0.5322-0.527 0.0928-0.9041 0.2872-1.1699 0.5529-0.2655 0.2656-0.4594 0.6427-0.5528 1.1698-0.0456 0.2583-0.2701 0.4477-0.5324 0.4475-0.2621-0.0002-0.4869-0.1893-0.5323-0.4475-0.0929-0.5274-0.2858-0.9058-0.5512-1.1714-0.2655-0.2653-0.6432-0.4585-1.1699-0.5513-0.2578-0.0457-0.4459-0.2705-0.446-0.5322 0.0005-0.2616 0.1883-0.4868 0.446-0.5325 0.5271-0.0933 0.9043-0.2856 1.1699-0.5512 0.2655-0.2658 0.4584-0.6442 0.5512-1.1715l0.0251-0.0926c0.077-0.2087 0.278-0.3531 0.5072-0.3533z m9.2369-9.6672c0.469 0 0.8756 0.3248 0.9799 0.7821 0.3678 1.6148 1.0327 2.8589 1.9599 3.7861 0.9272 0.9272 2.1714 1.5921 3.7861 1.9598 0.4573 0.1041 0.7818 0.5109 0.782 0.9799 0 0.4691-0.3247 0.8758-0.782 0.98-1.6146 0.3677-2.859 1.0324-3.7861 1.9597-0.9272 0.9275-1.5921 2.1725-1.9599 3.7878-0.104 0.4575-0.5107 0.782-0.9799 0.782-0.469 0-0.8758-0.3247-0.9799-0.782-0.3677-1.6153-1.0324-2.8602-1.9598-3.7878-0.9275-0.9274-2.1724-1.5921-3.7877-1.9597-0.4574-0.1042-0.782-0.5108-0.7821-0.98 0.0001-0.469 0.3247-0.8758 0.7821-0.9799 1.6155-0.3677 2.8602-1.0325 3.7877-1.9598 0.9274-0.9272 1.5921-2.1714 1.9598-3.7861 0.1042-0.4572 0.511-0.7819 0.9799-0.7821z m0 3.9228c-0.4094 0.7713-0.9141 1.4622-1.5185 2.0666-0.6047 0.6045-1.2964 1.1092-2.0682 1.5185 0.7718 0.4094 1.4635 0.914 2.0682 1.5186 0.6043 0.6042 1.1092 1.2954 1.5185 2.0666 0.4092-0.7712 0.9144-1.4624 1.5186-2.0666 0.6045-0.6046 1.2951-1.1107 2.0666-1.5201-0.7711-0.4093-1.4625-0.9128-2.0666-1.517-0.6043-0.6044-1.1092-1.2953-1.5186-2.0666z m-9.2369-7.2189c0.2594 0 0.4822 0.1849 0.5308 0.4397 0.1282 0.6719 0.3843 1.1692 0.7428 1.5279 0.3588 0.3588 0.8571 0.6145 1.5295 0.7428 0.2546 0.0485 0.4395 0.2716 0.4397 0.5308 0 0.2594-0.1849 0.4822-0.4397 0.5308-0.6725 0.1282-1.1707 0.3839-1.5295 0.7427-0.3589 0.3589-0.6146 0.8571-0.7428 1.5296-0.0486 0.2548-0.2714 0.4397-0.5308 0.4397-0.2592-0.0002-0.4822-0.1851-0.5307-0.4397-0.1282-0.6725-0.3842-1.1707-0.7428-1.5296-0.3585-0.3584-0.8552-0.6146-1.5264-0.7427-0.2548-0.0486-0.4397-0.2714-0.4397-0.5308 0.0002-0.2592 0.1851-0.4822 0.4397-0.5308 0.6714-0.1282 1.1679-0.3841 1.5264-0.7428 0.3585-0.3587 0.6145-0.8558 0.7428-1.5279 0.0485-0.2547 0.2716-0.4395 0.5307-0.4397z";
|
|
37149
37146
|
// Helpdesk reads this context off the email path to open its email form the
|
|
37150
37147
|
// same way a handoff inside its own drawer does.
|
|
37151
37148
|
function emailPathWithContext(context = {}) {
|
|
@@ -37287,9 +37284,9 @@ true;
|
|
|
37287
37284
|
const Picobot = {
|
|
37288
37285
|
component: PicobotComponent,
|
|
37289
37286
|
icons: {
|
|
37290
|
-
|
|
37291
|
-
staticPath: SPARKLE_PATH
|
|
37287
|
+
path: SPARKLE_PATH
|
|
37292
37288
|
},
|
|
37289
|
+
label: "Ask AI",
|
|
37293
37290
|
name: "Picobot"
|
|
37294
37291
|
};
|
|
37295
37292
|
|
|
@@ -37494,8 +37491,7 @@ true;
|
|
|
37494
37491
|
const Tasks = {
|
|
37495
37492
|
component: TasksComponent,
|
|
37496
37493
|
icons: {
|
|
37497
|
-
|
|
37498
|
-
staticPath: "M14 8V10H18V8H14ZM13.5 6C12.6716 6 12 6.67157 12 7.5V8H9C7.89543 8 7 8.89543 7 10V24C7 25.1046 7.89543 26 9 26H23C24.1046 26 25 25.1046 25 24V10C25 8.89543 24.1046 8 23 8H20V7.5C20 6.67157 19.3284 6 18.5 6H13.5ZM20 10.5V10H23V24H9L9 10H12V10.5C12 11.3284 12.6716 12 13.5 12H18.5C19.3284 12 20 11.3284 20 10.5ZM18.3485 14.1464C18.5437 13.9512 18.8603 13.9512 19.0556 14.1464L20.0686 15.1594C20.2638 15.3547 20.2638 15.6713 20.0686 15.8665L15.4282 20.5069C15.3814 20.5536 15.3278 20.5892 15.2705 20.6135C15.0875 20.6934 14.8665 20.6585 14.7167 20.5088L11.9433 17.7353C11.7481 17.5401 11.7481 17.2235 11.9433 17.0282L12.9571 16.0144C13.1524 15.8192 13.469 15.8192 13.6642 16.0144L15.0724 17.4226L18.3485 14.1464Z"
|
|
37494
|
+
path: "M18.4215 14.5192c0.3756-0.4084 1.0126-0.4352 1.4212-0.0597 0.408 0.3755 0.4345 1.0111 0.0597 1.4196l-3.8537 4.1929c-0.358 0.389-0.957 0.4347-1.3694 0.1037l-2.4827-1.9944c-0.4327-0.3476-0.5014-0.9806-0.1539-1.4134 0.3476-0.4324 0.9807-0.5014 1.4133-0.1539l1.7478 1.404z m-0.3078-8.5114c1.1852 0.0002 2.1569 0.9114 2.255 2.0713h0.9015l0.3282 0.0157c0.7593 0.0756 1.4736 0.4121 2.0178 0.9564 0.6218 0.6221 0.9706 1.4666 0.9706 2.3461v11.2783c-0.0002 0.8798-0.3485 1.7242-0.9706 2.3461-0.622 0.622-1.4664 0.9705-2.346 0.9705h-10.5388c-0.8796 0-1.724-0.3486-2.3461-0.9705-0.622-0.622-0.972-1.4664-0.9721-2.3461v-11.2799c0-0.8798 0.35-1.724 0.9721-2.3461 0.6221-0.6221 1.4663-0.9721 2.3461-0.972h0.9108c0.0988-1.1593 1.0702-2.0697 2.2551-2.0698z m-7.3823 4.0798c-0.3467 0-0.6798 0.138-0.9249 0.3832-0.2451 0.2452-0.3832 0.5783-0.3832 0.9249v11.2799c0.0001 0.3467 0.1381 0.6799 0.3832 0.9249 0.2451 0.2449 0.5785 0.3816 0.9249 0.3816h10.5388c0.3462 0 0.6783-0.137 0.9233-0.3816 0.2451-0.2451 0.383-0.5783 0.3832-0.9249v-11.2783c0-0.3467-0.1381-0.6798-0.3832-0.9249-0.2145-0.2144-0.4956-0.3471-0.7947-0.3769l-0.1286-0.0063h-0.892v0.1822c-0.0003 1.25-1.0145 2.2627-2.2645 2.2628h-4.2164c-1.2502 0-2.2641-1.0127-2.2645-2.2628v-0.1838z m3.1659-2.0697c-0.1403 0-0.2544 0.1141-0.2544 0.2544v1.9991c0.0003 0.14 0.1143 0.2528 0.2544 0.2528h4.2164c0.1399-0.0002 0.2541-0.1129 0.2544-0.2528v-1.1731c-0.0001-0.0047-0.0016-0.0094-0.0016-0.0141 0-0.0052 0.0015-0.0105 0.0016-0.0157v-0.7962c0-0.1402-0.1143-0.2542-0.2544-0.2544z"
|
|
37499
37495
|
},
|
|
37500
37496
|
name: "Tasks"
|
|
37501
37497
|
};
|
|
@@ -37618,8 +37614,7 @@ true;
|
|
|
37618
37614
|
const Chat = {
|
|
37619
37615
|
component: ChatTool,
|
|
37620
37616
|
icons: {
|
|
37621
|
-
|
|
37622
|
-
staticPath: "M13.8284 20L15.9998 22.1714L18.1713 20H23C23.5523 20 24 19.5523 24 19V10C24 9.44772 23.5523 9 23 9H9C8.44772 9 8 9.44772 8 10V19C8 19.5523 8.44772 20 9 20H13.8284ZM15.9998 24.9998L13 22H9C7.34315 22 6 20.6569 6 19V10C6 8.34315 7.34315 7 9 7H23C24.6569 7 26 8.34315 26 10V19C26 20.6569 24.6569 22 23 22H18.9997L15.9998 24.9998Z"
|
|
37617
|
+
path: "M23.0509 7.005c0.7801 0 1.5293 0.3105 2.0808 0.8621 0.5512 0.5515 0.8605 1.2994 0.8605 2.0792v8.5898c0 0.7797-0.3092 1.5276-0.8605 2.0792-0.5516 0.5516-1.3008 0.8621-2.0808 0.8621h-2.9884l-4.0672 3.5176-4.0688-3.5176h-2.9774c-0.78 0-1.5276-0.3105-2.0792-0.8621-0.5516-0.5516-0.8621-1.2991-0.8621-2.0792v-8.5898c0-0.78 0.3106-1.5276 0.8621-2.0792 0.5516-0.5516 1.2991-0.8621 2.0792-0.8621z m-14.1018 2.01c-0.2469 0-0.4834 0.0986-0.658 0.2733-0.1746 0.1746-0.2732 0.411-0.2732 0.658v8.5898c0 0.2469 0.0986 0.4834 0.2732 0.658 0.1746 0.1746 0.411 0.2732 0.658 0.2733h3.7265l0.2842 0.2449 3.034 2.6241 3.0355-2.6241 0.2842-0.2449h3.7374c0.247 0 0.485-0.0986 0.6596-0.2733 0.1743-0.1746 0.2716-0.4113 0.2716-0.658v-8.5898c0-0.2467-0.0973-0.4834-0.2716-0.658-0.1746-0.1746-0.4126-0.2732-0.6596-0.2733z"
|
|
37623
37618
|
},
|
|
37624
37619
|
name: "Chat",
|
|
37625
37620
|
storageExemptPaths: ["blankstate"]
|
|
@@ -37726,8 +37721,7 @@ true;
|
|
|
37726
37721
|
const Profile = {
|
|
37727
37722
|
component: UserProfile,
|
|
37728
37723
|
icons: {
|
|
37729
|
-
|
|
37730
|
-
staticPath: ""
|
|
37724
|
+
path: ""
|
|
37731
37725
|
},
|
|
37732
37726
|
name: "Profile"
|
|
37733
37727
|
};
|
|
@@ -37793,13 +37787,14 @@ true;
|
|
|
37793
37787
|
} = state;
|
|
37794
37788
|
const mounted = !!currentContent;
|
|
37795
37789
|
const storeData = useStore();
|
|
37790
|
+
const devStoreDataOverride = env === "development" ? _storeDataOverride !== null && _storeDataOverride !== void 0 ? _storeDataOverride : {} : {};
|
|
37796
37791
|
const {
|
|
37797
37792
|
indicatorVisible,
|
|
37798
37793
|
joltPromise,
|
|
37799
37794
|
userId
|
|
37800
37795
|
} = {
|
|
37801
37796
|
...storeData,
|
|
37802
|
-
...
|
|
37797
|
+
...devStoreDataOverride
|
|
37803
37798
|
};
|
|
37804
37799
|
const updateStore = useUpdateStore();
|
|
37805
37800
|
const {
|
|
@@ -38057,22 +38052,26 @@ true;
|
|
|
38057
38052
|
};
|
|
38058
38053
|
const indicatorState = {
|
|
38059
38054
|
...indicatorVisible,
|
|
38060
|
-
Chat: unreadIndicator
|
|
38055
|
+
Chat: unreadIndicator,
|
|
38056
|
+
// Chat's dot comes from its own config, so a dev override has to land last.
|
|
38057
|
+
...devStoreDataOverride.indicatorVisible
|
|
38061
38058
|
};
|
|
38062
38059
|
return /*#__PURE__*/React.createElement(tapestryReact.ThemeProvider, {
|
|
38063
38060
|
theme: topbarTheme
|
|
38064
38061
|
}, /*#__PURE__*/React.createElement(addOns.UiExtensionDataContext, null, /*#__PURE__*/React.createElement("div", {
|
|
38065
38062
|
className: styles$2["toolbar"],
|
|
38066
38063
|
"data-pendo": "toolbar-profile-support-wrapper"
|
|
38067
|
-
}, /*#__PURE__*/React.createElement(
|
|
38068
|
-
"
|
|
38064
|
+
}, /*#__PURE__*/React.createElement(ToolbarDrawerButton, {
|
|
38065
|
+
tooltip: "Profile",
|
|
38066
|
+
"aria-label": `Profile, ${userName}`,
|
|
38069
38067
|
onClick: () => toggleDrawer(Profile),
|
|
38070
38068
|
"data-pendo": "toolbar-profile",
|
|
38071
|
-
className: styles$2["toolbar-button--avatar"]
|
|
38072
|
-
|
|
38073
|
-
|
|
38074
|
-
|
|
38075
|
-
|
|
38069
|
+
className: styles$2["toolbar-button--avatar"],
|
|
38070
|
+
icon: /*#__PURE__*/React.createElement(Avatar, {
|
|
38071
|
+
env: env,
|
|
38072
|
+
url: userAvatarPath
|
|
38073
|
+
})
|
|
38074
|
+
}), /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
38076
38075
|
className: styles$2["toolbar-button--home"],
|
|
38077
38076
|
onClick: () => closeDrawer()
|
|
38078
38077
|
}, /*#__PURE__*/React.createElement(tapestryReact.Icon, {
|
|
@@ -38082,17 +38081,18 @@ true;
|
|
|
38082
38081
|
var _a;
|
|
38083
38082
|
const current = open && currentContent === tool;
|
|
38084
38083
|
const indicator = indicatorState[tool.name];
|
|
38085
|
-
return /*#__PURE__*/React.createElement(
|
|
38084
|
+
return /*#__PURE__*/React.createElement(ToolbarDrawerButton, {
|
|
38086
38085
|
current: current,
|
|
38087
38086
|
onClick: () => handleToolOnClick(tool),
|
|
38088
38087
|
id: getDataPendoAttribute(tool.name),
|
|
38089
|
-
|
|
38088
|
+
tooltip: (_a = tool.label) !== null && _a !== void 0 ? _a : tool.name,
|
|
38090
38089
|
"data-pendo": getDataPendoAttribute(tool.name),
|
|
38091
|
-
key: tool.name
|
|
38092
|
-
|
|
38093
|
-
|
|
38094
|
-
|
|
38095
|
-
|
|
38090
|
+
key: tool.name,
|
|
38091
|
+
icon: /*#__PURE__*/React.createElement(ToolbarToolIcon, {
|
|
38092
|
+
icons: tool.icons,
|
|
38093
|
+
dot: !!indicator
|
|
38094
|
+
})
|
|
38095
|
+
});
|
|
38096
38096
|
})), /*#__PURE__*/React.createElement(DrawerWrap, {
|
|
38097
38097
|
isVisible: open
|
|
38098
38098
|
}, mounted && (/*#__PURE__*/React.createElement(Drawer, {
|
|
@@ -38116,6 +38116,24 @@ true;
|
|
|
38116
38116
|
...restProps
|
|
38117
38117
|
}, children);
|
|
38118
38118
|
};
|
|
38119
|
+
const ToolbarDrawerButton = ({
|
|
38120
|
+
"aria-label": ariaLabel,
|
|
38121
|
+
className,
|
|
38122
|
+
current = false,
|
|
38123
|
+
tooltip,
|
|
38124
|
+
...restProps
|
|
38125
|
+
}) => {
|
|
38126
|
+
// Below 600px the toolbar sits along the bottom, where tooltips get in the way.
|
|
38127
|
+
const isSideToolbar = useMediaQuery("(min-width: 600px)");
|
|
38128
|
+
return /*#__PURE__*/React.createElement(tapestry.IconButton, {
|
|
38129
|
+
className: classnames(styles$2["toolbar-button"], className, current && styles$2["is-current"]),
|
|
38130
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : tooltip,
|
|
38131
|
+
tooltip: isSideToolbar ? tooltip : undefined,
|
|
38132
|
+
tooltipPlacement: "left",
|
|
38133
|
+
"data-toolbar-link": "true",
|
|
38134
|
+
...restProps
|
|
38135
|
+
});
|
|
38136
|
+
};
|
|
38119
38137
|
function ToolbarToolIcon({
|
|
38120
38138
|
dot,
|
|
38121
38139
|
icons
|
|
@@ -38124,31 +38142,57 @@ true;
|
|
|
38124
38142
|
return /*#__PURE__*/React.createElement(icons.component, null);
|
|
38125
38143
|
} else {
|
|
38126
38144
|
return /*#__PURE__*/React.createElement(ToolbarButtonIcon, {
|
|
38127
|
-
path:
|
|
38145
|
+
path: icons.path,
|
|
38128
38146
|
dot: dot
|
|
38129
38147
|
});
|
|
38130
38148
|
}
|
|
38131
38149
|
}
|
|
38150
|
+
// The dot sits on the icon's top-right corner. A mask knocks a transparent
|
|
38151
|
+
// ring out of the glyph around it, so the gap reads correctly on any button
|
|
38152
|
+
// background (hover, current, dark mode) without a second, pre-cut path.
|
|
38153
|
+
const DOT = {
|
|
38154
|
+
cx: 24,
|
|
38155
|
+
cy: 8,
|
|
38156
|
+
gap: 2,
|
|
38157
|
+
r: 4
|
|
38158
|
+
};
|
|
38159
|
+
// React 17 has no useId, and mask ids are document-global: count instead so
|
|
38160
|
+
// several toolbars (or icons) on one page never share a mask.
|
|
38161
|
+
let dotMaskCount = 0;
|
|
38132
38162
|
function ToolbarButtonIcon({
|
|
38133
38163
|
dot,
|
|
38134
38164
|
path
|
|
38135
38165
|
}) {
|
|
38166
|
+
const [maskId] = React.useState(() => `topbar-toolbar-dot-mask-${++dotMaskCount}`);
|
|
38136
38167
|
return /*#__PURE__*/React.createElement("svg", {
|
|
38137
38168
|
"aria-hidden": "true",
|
|
38138
38169
|
width: "32",
|
|
38139
38170
|
height: "32",
|
|
38140
38171
|
viewBox: "0 0 32 32",
|
|
38141
38172
|
xmlns: "http://www.w3.org/2000/svg"
|
|
38142
|
-
}, /*#__PURE__*/React.createElement("
|
|
38173
|
+
}, dot && (/*#__PURE__*/React.createElement("mask", {
|
|
38174
|
+
id: maskId,
|
|
38175
|
+
maskUnits: "userSpaceOnUse"
|
|
38176
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
38177
|
+
width: "32",
|
|
38178
|
+
height: "32",
|
|
38179
|
+
fill: "white"
|
|
38180
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
38181
|
+
cx: DOT.cx,
|
|
38182
|
+
cy: DOT.cy,
|
|
38183
|
+
r: DOT.r + DOT.gap,
|
|
38184
|
+
fill: "black"
|
|
38185
|
+
}))), /*#__PURE__*/React.createElement("path", {
|
|
38143
38186
|
fill: "currentColor",
|
|
38144
38187
|
fillRule: "evenodd",
|
|
38145
38188
|
clipRule: "evenodd",
|
|
38146
|
-
d: path
|
|
38189
|
+
d: path,
|
|
38190
|
+
mask: dot ? `url(#${maskId})` : undefined
|
|
38147
38191
|
}), dot && (/*#__PURE__*/React.createElement("circle", {
|
|
38148
38192
|
fill: "var(--t-icon-color-status-error)",
|
|
38149
|
-
cx:
|
|
38150
|
-
cy:
|
|
38151
|
-
r:
|
|
38193
|
+
cx: DOT.cx,
|
|
38194
|
+
cy: DOT.cy,
|
|
38195
|
+
r: DOT.r
|
|
38152
38196
|
})));
|
|
38153
38197
|
}
|
|
38154
38198
|
function getDataPendoAttribute(toolName) {
|