@planningcenter/topbar 12.1.2 → 12.2.0-rc.1
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 +129 -0
- package/dist/topbar.css.map +1 -1
- package/dist/topbar.js +372 -119
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +372 -119
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +372 -119
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +372 -119
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +4 -3
package/dist/topbar.js
CHANGED
|
@@ -41,7 +41,7 @@ var churchCenter__namespace = /*#__PURE__*/_interopNamespaceDefault(churchCenter
|
|
|
41
41
|
var people__namespace = /*#__PURE__*/_interopNamespaceDefault(people);
|
|
42
42
|
var toolbar__namespace = /*#__PURE__*/_interopNamespaceDefault(toolbar);
|
|
43
43
|
|
|
44
|
-
var styles$
|
|
44
|
+
var styles$d = {"accessibility-toolbar":"accessibility-toolbar-jgjUG"};
|
|
45
45
|
|
|
46
46
|
const AccessibilityToolbar = ({
|
|
47
47
|
children
|
|
@@ -53,7 +53,7 @@ const AccessibilityToolbar = ({
|
|
|
53
53
|
(_a = document.getElementById("main-content")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
54
54
|
};
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
className: styles$
|
|
56
|
+
className: styles$d["accessibility-toolbar"]
|
|
57
57
|
}, /*#__PURE__*/React.createElement(tapestry.Link, {
|
|
58
58
|
href: "#main-content",
|
|
59
59
|
kind: "primary",
|
|
@@ -370,11 +370,11 @@ const X = ({
|
|
|
370
370
|
fill: fill
|
|
371
371
|
})));
|
|
372
372
|
|
|
373
|
-
var styles$
|
|
373
|
+
var styles$c = {"announcement":"announcement-pI5tM","announcement--platform":"announcement--platform-EcUn2","announcement--promo":"announcement--promo-FarUk","announcement-icon":"announcement-icon-Ov39-","announcement-content":"announcement-content-q2ad6","dismiss":"dismiss-wUAoU","dismiss--promo":"dismiss--promo-7zvO4"};
|
|
374
374
|
|
|
375
375
|
function AnnouncementIcon() {
|
|
376
376
|
return /*#__PURE__*/React.createElement("svg", {
|
|
377
|
-
className: styles$
|
|
377
|
+
className: styles$c["announcement-icon"],
|
|
378
378
|
width: "16",
|
|
379
379
|
height: "16",
|
|
380
380
|
viewBox: "0 0 16 16",
|
|
@@ -499,7 +499,7 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
|
|
|
499
499
|
} = this.props;
|
|
500
500
|
const isPromo = variant === "promo";
|
|
501
501
|
return /*#__PURE__*/React.createElement("div", {
|
|
502
|
-
className: classnames(styles$
|
|
502
|
+
className: classnames(styles$c["announcement"], styles$c[`announcement--${variant !== null && variant !== void 0 ? variant : "platform"}`]),
|
|
503
503
|
"data-announcement-variant": variant !== null && variant !== void 0 ? variant : "platform",
|
|
504
504
|
style: isPromo ? {
|
|
505
505
|
backgroundImage: promoBackgroundUrl,
|
|
@@ -508,7 +508,7 @@ let StyledAnnouncement$1 = class StyledAnnouncement extends React.Component {
|
|
|
508
508
|
backgroundSize: "cover"
|
|
509
509
|
} : undefined
|
|
510
510
|
}, !isPromo && /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
|
|
511
|
-
className: styles$
|
|
511
|
+
className: styles$c["announcement-content"],
|
|
512
512
|
style: style,
|
|
513
513
|
...platformProps
|
|
514
514
|
}));
|
|
@@ -557,7 +557,7 @@ function StyledDismissButton$1({
|
|
|
557
557
|
const isPromo = variant === "promo";
|
|
558
558
|
return /*#__PURE__*/React.createElement("button", {
|
|
559
559
|
type: "button",
|
|
560
|
-
className: classnames(styles$
|
|
560
|
+
className: classnames(styles$c.dismiss, isPromo && styles$c["dismiss--promo"]),
|
|
561
561
|
...props
|
|
562
562
|
}, /*#__PURE__*/React.createElement(X, {
|
|
563
563
|
fill: isPromo ? "currentColor" : "white",
|
|
@@ -637,9 +637,9 @@ class StyledAnnouncement extends React.Component {
|
|
|
637
637
|
...platformProps
|
|
638
638
|
} = this.props;
|
|
639
639
|
return /*#__PURE__*/React.createElement("div", {
|
|
640
|
-
className: styles$
|
|
640
|
+
className: styles$c["announcement"]
|
|
641
641
|
}, /*#__PURE__*/React.createElement(AnnouncementIcon, null), /*#__PURE__*/React.createElement("div", {
|
|
642
|
-
className: styles$
|
|
642
|
+
className: styles$c["announcement-content"],
|
|
643
643
|
style: style,
|
|
644
644
|
...platformProps
|
|
645
645
|
}));
|
|
@@ -650,7 +650,7 @@ function StyledDismissButton({
|
|
|
650
650
|
}) {
|
|
651
651
|
return /*#__PURE__*/React.createElement("button", {
|
|
652
652
|
type: "button",
|
|
653
|
-
className: styles$
|
|
653
|
+
className: styles$c.dismiss,
|
|
654
654
|
...props
|
|
655
655
|
}, /*#__PURE__*/React.createElement(X, {
|
|
656
656
|
fill: "white",
|
|
@@ -1897,7 +1897,7 @@ function MonoAppName({
|
|
|
1897
1897
|
})) : (/*#__PURE__*/React.createElement("div", null, "appName not supported"));
|
|
1898
1898
|
}
|
|
1899
1899
|
|
|
1900
|
-
var styles$
|
|
1900
|
+
var styles$b = {"unbutton":"unbutton-lEbTR"};
|
|
1901
1901
|
|
|
1902
1902
|
function Unbutton({
|
|
1903
1903
|
className,
|
|
@@ -1906,7 +1906,7 @@ function Unbutton({
|
|
|
1906
1906
|
...nativeProps
|
|
1907
1907
|
}) {
|
|
1908
1908
|
return /*#__PURE__*/React.createElement("button", {
|
|
1909
|
-
className: classnames(styles$
|
|
1909
|
+
className: classnames(styles$b.unbutton, className),
|
|
1910
1910
|
style: {
|
|
1911
1911
|
...style
|
|
1912
1912
|
},
|
|
@@ -1915,7 +1915,7 @@ function Unbutton({
|
|
|
1915
1915
|
});
|
|
1916
1916
|
}
|
|
1917
1917
|
|
|
1918
|
-
var styles$
|
|
1918
|
+
var styles$a = {"button":"button-XMbeQ","button-accounts":"button-accounts-nNh-z","chevron":"chevron-RRg9k","is-expanded":"is-expanded-zD0A0"};
|
|
1919
1919
|
|
|
1920
1920
|
const AppsButton = ({
|
|
1921
1921
|
appName,
|
|
@@ -1930,8 +1930,8 @@ const AppsButton = ({
|
|
|
1930
1930
|
"aria-haspopup": "true",
|
|
1931
1931
|
"aria-label": `App switcher: ${appName}`,
|
|
1932
1932
|
onClick: onClick,
|
|
1933
|
-
className: classnames(styles$
|
|
1934
|
-
[styles$
|
|
1933
|
+
className: classnames(styles$a.button, {
|
|
1934
|
+
[styles$a["is-expanded"]]: expanded
|
|
1935
1935
|
}),
|
|
1936
1936
|
type: "button",
|
|
1937
1937
|
style: style,
|
|
@@ -1940,7 +1940,7 @@ const AppsButton = ({
|
|
|
1940
1940
|
appName: "Accounts",
|
|
1941
1941
|
colors: colors
|
|
1942
1942
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1943
|
-
className: styles$
|
|
1943
|
+
className: styles$a["button-accounts"]
|
|
1944
1944
|
}, "Account settings"))) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColorAppIcon, {
|
|
1945
1945
|
appName: appName.replace(/[\s-]/, "")
|
|
1946
1946
|
}), /*#__PURE__*/React.createElement(MonoAppName, {
|
|
@@ -1948,7 +1948,7 @@ const AppsButton = ({
|
|
|
1948
1948
|
key: "mono-app-name",
|
|
1949
1949
|
size: 24
|
|
1950
1950
|
}))), /*#__PURE__*/React.createElement(DisclosureChevronIcon, {
|
|
1951
|
-
className: styles$
|
|
1951
|
+
className: styles$a.chevron,
|
|
1952
1952
|
key: "disclosure-chevron-icon"
|
|
1953
1953
|
}));
|
|
1954
1954
|
};
|
|
@@ -2036,7 +2036,7 @@ const IEFlex1 = {
|
|
|
2036
2036
|
flex: "1 1 auto"
|
|
2037
2037
|
};
|
|
2038
2038
|
|
|
2039
|
-
var styles$
|
|
2039
|
+
var styles$9 = {"popup":"popup-sJ-Nv"};
|
|
2040
2040
|
|
|
2041
2041
|
const HoverableListItem = ({
|
|
2042
2042
|
active = false,
|
|
@@ -2093,7 +2093,7 @@ class Outsider extends React.Component {
|
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
2095
|
|
|
2096
|
-
var styles$
|
|
2096
|
+
var styles$8 = {"popup-root":"popup-root-SeL5u","popup":"popup-nQXYW","is-visible":"is-visible-3DAUP"};
|
|
2097
2097
|
|
|
2098
2098
|
const Popup = ({
|
|
2099
2099
|
className,
|
|
@@ -2101,8 +2101,8 @@ const Popup = ({
|
|
|
2101
2101
|
isVisible,
|
|
2102
2102
|
...nativeProps
|
|
2103
2103
|
}) => (/*#__PURE__*/React.createElement(C, {
|
|
2104
|
-
className: classnames(styles$
|
|
2105
|
-
[styles$
|
|
2104
|
+
className: classnames(styles$8.popup, {
|
|
2105
|
+
[styles$8["is-visible"]]: isVisible
|
|
2106
2106
|
}, className),
|
|
2107
2107
|
...nativeProps
|
|
2108
2108
|
}));
|
|
@@ -2110,7 +2110,7 @@ const Popup = ({
|
|
|
2110
2110
|
const PopupRoot = ({
|
|
2111
2111
|
...nativeProps
|
|
2112
2112
|
}) => (/*#__PURE__*/React.createElement("div", {
|
|
2113
|
-
className: styles$
|
|
2113
|
+
className: styles$8["popup-root"],
|
|
2114
2114
|
...nativeProps
|
|
2115
2115
|
}));
|
|
2116
2116
|
|
|
@@ -2150,7 +2150,7 @@ const AppsMenu = ({
|
|
|
2150
2150
|
cleanup: !visible,
|
|
2151
2151
|
component: Outsider,
|
|
2152
2152
|
onOutsideClick: toggle,
|
|
2153
|
-
className: styles$
|
|
2153
|
+
className: styles$9.popup,
|
|
2154
2154
|
isVisible: visible
|
|
2155
2155
|
}, /*#__PURE__*/React.createElement("menu", {
|
|
2156
2156
|
ref: menuRef,
|
|
@@ -3046,9 +3046,9 @@ function StyledRoot({
|
|
|
3046
3046
|
`), children);
|
|
3047
3047
|
}
|
|
3048
3048
|
|
|
3049
|
-
var styles$
|
|
3049
|
+
var styles$7 = {"route":"route--8BWe","is-active":"is-active-FsU9Y","apps-routes-separator":"apps-routes-separator-Nlm-N"};
|
|
3050
3050
|
|
|
3051
|
-
var styles$
|
|
3051
|
+
var styles$6 = {"popup":"popup-mDNKn","trigger-wrap":"trigger-wrap-Jd-KR","trigger":"trigger-WgRT5","is-visible":"is-visible-GZC0-","trigger-orgname":"trigger-orgname-TDHCc"};
|
|
3052
3052
|
|
|
3053
3053
|
const UserMenu = ({
|
|
3054
3054
|
appName,
|
|
@@ -3067,7 +3067,7 @@ const UserMenu = ({
|
|
|
3067
3067
|
component: Outsider,
|
|
3068
3068
|
onOutsideClick: () => setUserMenuVisible(false),
|
|
3069
3069
|
cleanup: !userMenuVisible,
|
|
3070
|
-
className: styles$
|
|
3070
|
+
className: styles$6.popup,
|
|
3071
3071
|
isVisible: userMenuVisible
|
|
3072
3072
|
}, /*#__PURE__*/React.createElement("div", null, hasConnectedPeople ? (/*#__PURE__*/React.createElement("div", {
|
|
3073
3073
|
style: {
|
|
@@ -3211,11 +3211,11 @@ const UserMenuTrigger = ({
|
|
|
3211
3211
|
userMenuVisible
|
|
3212
3212
|
}) => {
|
|
3213
3213
|
return /*#__PURE__*/React.createElement("div", {
|
|
3214
|
-
className: styles$
|
|
3214
|
+
className: styles$6["trigger-wrap"],
|
|
3215
3215
|
"data-pendo": "topbar-org-switcher"
|
|
3216
3216
|
}, /*#__PURE__*/React.createElement(Hoverable, {
|
|
3217
|
-
className: classnames(styles$
|
|
3218
|
-
[styles$
|
|
3217
|
+
className: classnames(styles$6["trigger"], {
|
|
3218
|
+
[styles$6["is-visible"]]: userMenuVisible
|
|
3219
3219
|
}),
|
|
3220
3220
|
component: "button",
|
|
3221
3221
|
type: "button",
|
|
@@ -3227,7 +3227,7 @@ const UserMenuTrigger = ({
|
|
|
3227
3227
|
requestConnectedPeopleFetch();
|
|
3228
3228
|
}
|
|
3229
3229
|
}, showOrgName && (/*#__PURE__*/React.createElement("span", {
|
|
3230
|
-
className: styles$
|
|
3230
|
+
className: styles$6["trigger-orgname"]
|
|
3231
3231
|
}, orgName)), /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)));
|
|
3232
3232
|
};
|
|
3233
3233
|
|
|
@@ -3284,7 +3284,7 @@ const NotSmallTopbar = ({
|
|
|
3284
3284
|
},
|
|
3285
3285
|
appName: props.appName
|
|
3286
3286
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3287
|
-
className: styles$
|
|
3287
|
+
className: styles$7["apps-routes-separator"]
|
|
3288
3288
|
}), routesVisible && props.routes, /*#__PURE__*/React.createElement("div", {
|
|
3289
3289
|
style: {
|
|
3290
3290
|
margin: "auto"
|
|
@@ -3322,12 +3322,12 @@ const NotSmallRoute = ({
|
|
|
3322
3322
|
...nativeProps
|
|
3323
3323
|
}) => {
|
|
3324
3324
|
return /*#__PURE__*/React.createElement("a", {
|
|
3325
|
-
className: classnames(styles$
|
|
3325
|
+
className: classnames(styles$7["route"], className, active && styles$7["is-active"]),
|
|
3326
3326
|
...nativeProps
|
|
3327
3327
|
});
|
|
3328
3328
|
};
|
|
3329
3329
|
|
|
3330
|
-
var styles$
|
|
3330
|
+
var styles$5 = {"avatar":"avatar-tW-wn"};
|
|
3331
3331
|
|
|
3332
3332
|
function Avatar({
|
|
3333
3333
|
env,
|
|
@@ -3337,7 +3337,7 @@ function Avatar({
|
|
|
3337
3337
|
}) {
|
|
3338
3338
|
const url = incomingUrl || `${pcoUrl$1(env)("people")}/static/no_photo_thumbnail_gray.svg`;
|
|
3339
3339
|
return /*#__PURE__*/React.createElement("div", {
|
|
3340
|
-
className: styles$
|
|
3340
|
+
className: styles$5.avatar,
|
|
3341
3341
|
style: {
|
|
3342
3342
|
backgroundImage: `url(${url})`,
|
|
3343
3343
|
...style
|
|
@@ -3359,14 +3359,14 @@ ClientStorage.defaultProps = {
|
|
|
3359
3359
|
method: "localStorage"
|
|
3360
3360
|
};
|
|
3361
3361
|
|
|
3362
|
-
var styles$
|
|
3362
|
+
var styles$4 = {"appmenu-button":"appmenu-button-b0UvT","appmenu-layer":"appmenu-layer-0IQpN","appmenu-container":"appmenu-container-gackd","appmenu-scroll":"appmenu-scroll-mPSx0","appmenu-list":"appmenu-list-h7clX","appmenu-list-a":"appmenu-list-a-rGIQN","appmenu-list-a--top":"appmenu-list-a--top-RT-2F","appmenu-list-a--bottom":"appmenu-list-a--bottom-YDeBC","appmenu-close-button":"appmenu-close-button-vv9bV","current-route":"current-route-wpJgz","is-active":"is-active-wy8Bg","routes":"routes-Nmt1S","route":"route-kkknQ","profile-button":"profile-button-a2WO2"};
|
|
3363
3363
|
|
|
3364
3364
|
function AccountSettingsLink({
|
|
3365
3365
|
env
|
|
3366
3366
|
}) {
|
|
3367
3367
|
const accountsName = "accounts";
|
|
3368
3368
|
return /*#__PURE__*/React.createElement("a", {
|
|
3369
|
-
className: classnames(styles$
|
|
3369
|
+
className: classnames(styles$4["appmenu-list-a"], styles$4["appmenu-list-a--bottom"]),
|
|
3370
3370
|
"data-pendo": `app-switcher--change-app--${accountsName}`,
|
|
3371
3371
|
"data-turbolinks": false,
|
|
3372
3372
|
href: pcoUrl$1(env)(accountsName) + getAppsSwitchProductPath(accountsName)
|
|
@@ -3389,7 +3389,7 @@ const CloseMenuButton = ({
|
|
|
3389
3389
|
}) => (/*#__PURE__*/React.createElement("button", {
|
|
3390
3390
|
"aria-label": "Close menu",
|
|
3391
3391
|
type: "button",
|
|
3392
|
-
className: styles$
|
|
3392
|
+
className: styles$4["appmenu-close-button"],
|
|
3393
3393
|
style: style
|
|
3394
3394
|
}, /*#__PURE__*/React.createElement(X, {
|
|
3395
3395
|
fill: color,
|
|
@@ -3470,7 +3470,7 @@ const SmallTopbar = ({
|
|
|
3470
3470
|
"aria-haspopup": "true",
|
|
3471
3471
|
"aria-label": `App switcher: ${props.appName}`,
|
|
3472
3472
|
type: "button",
|
|
3473
|
-
className: styles$
|
|
3473
|
+
className: styles$4["appmenu-button"],
|
|
3474
3474
|
onClick: () => {
|
|
3475
3475
|
props.requestAppsFetch();
|
|
3476
3476
|
props.requestConnectedPeopleFetch();
|
|
@@ -3480,12 +3480,12 @@ const SmallTopbar = ({
|
|
|
3480
3480
|
}, /*#__PURE__*/React.createElement(ColorAppIcon, {
|
|
3481
3481
|
appName: props.appName.replace(/[\s-]/, "")
|
|
3482
3482
|
})), routesMenuVisible && (/*#__PURE__*/React.createElement("div", {
|
|
3483
|
-
className: styles$
|
|
3483
|
+
className: styles$4["routes"]
|
|
3484
3484
|
}, props.routes)), /*#__PURE__*/React.createElement(ClientStorage, {
|
|
3485
3485
|
item: "Topbar:Small:Menus:Products:visibility",
|
|
3486
3486
|
render: () => (/*#__PURE__*/React.createElement("div", {
|
|
3487
3487
|
ref: appMenuRef,
|
|
3488
|
-
className: styles$
|
|
3488
|
+
className: styles$4["appmenu-layer"],
|
|
3489
3489
|
style: {
|
|
3490
3490
|
...(productSwitcherVisible && {
|
|
3491
3491
|
display: "block"
|
|
@@ -3504,44 +3504,44 @@ const SmallTopbar = ({
|
|
|
3504
3504
|
e.stopPropagation();
|
|
3505
3505
|
}
|
|
3506
3506
|
},
|
|
3507
|
-
className: styles$
|
|
3507
|
+
className: styles$4["appmenu-container"]
|
|
3508
3508
|
}, /*#__PURE__*/React.createElement("a", {
|
|
3509
3509
|
"aria-current": props.appName === (homeProduct === null || homeProduct === void 0 ? void 0 : homeProduct.name) ? "page" : undefined,
|
|
3510
3510
|
"aria-label": homeProduct ? homeProduct.name : props.appName,
|
|
3511
3511
|
"data-pendo": `app-switcher--change-app--${homeProduct === null || homeProduct === void 0 ? void 0 : homeProduct.name}`,
|
|
3512
3512
|
"data-turbolinks": false,
|
|
3513
|
-
className: classnames(styles$
|
|
3513
|
+
className: classnames(styles$4["appmenu-list-a"], styles$4["appmenu-list-a--top"]),
|
|
3514
3514
|
href: homeProduct ? pcoUrl$1(props.env)("accounts") + getAppsSwitchProductPath(homeProduct === null || homeProduct === void 0 ? void 0 : homeProduct.name) : undefined
|
|
3515
3515
|
}, /*#__PURE__*/React.createElement(UserMenuAppLockup, {
|
|
3516
3516
|
appName: homeProduct ? homeProduct.name : props.appName
|
|
3517
3517
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3518
|
-
className: styles$
|
|
3518
|
+
className: styles$4["appmenu-scroll"]
|
|
3519
3519
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
3520
3520
|
"data-pendo": "app-switcher",
|
|
3521
|
-
className: styles$
|
|
3521
|
+
className: styles$4["appmenu-list"]
|
|
3522
3522
|
}, appsMenuFormatter(restProducts).map(({
|
|
3523
3523
|
name
|
|
3524
3524
|
}) => (/*#__PURE__*/React.createElement("li", {
|
|
3525
3525
|
key: name,
|
|
3526
|
-
className: styles$
|
|
3526
|
+
className: styles$4["appmenu-list-li"]
|
|
3527
3527
|
}, /*#__PURE__*/React.createElement("a", {
|
|
3528
3528
|
"aria-current": name === props.appName ? "page" : undefined,
|
|
3529
3529
|
"aria-label": name,
|
|
3530
3530
|
"data-pendo": `app-switcher--change-app--${name}`,
|
|
3531
3531
|
"data-turbolinks": false,
|
|
3532
|
-
className: styles$
|
|
3532
|
+
className: styles$4["appmenu-list-a"],
|
|
3533
3533
|
href: pcoUrl$1(props.env)("accounts") + getAppsSwitchProductPath(name)
|
|
3534
3534
|
}, /*#__PURE__*/React.createElement(UserMenuAppLockup, {
|
|
3535
3535
|
appName: name
|
|
3536
3536
|
}))))), accountsProduct && (/*#__PURE__*/React.createElement("li", {
|
|
3537
|
-
className: styles$
|
|
3537
|
+
className: styles$4["appmenu-list-li"]
|
|
3538
3538
|
}, /*#__PURE__*/React.createElement(AccountSettingsLink, {
|
|
3539
3539
|
env: props.env
|
|
3540
3540
|
}))))))))
|
|
3541
3541
|
}), /*#__PURE__*/React.createElement("button", {
|
|
3542
3542
|
type: "button",
|
|
3543
|
-
className: classnames(styles$
|
|
3544
|
-
[styles$
|
|
3543
|
+
className: classnames(styles$4["current-route"], {
|
|
3544
|
+
[styles$4["is-active"]]: routesMenuVisible
|
|
3545
3545
|
}),
|
|
3546
3546
|
onClick: props.routes.length > 0 ? () => {
|
|
3547
3547
|
setProductSwitcherVisible(false);
|
|
@@ -3549,7 +3549,7 @@ const SmallTopbar = ({
|
|
|
3549
3549
|
} : null
|
|
3550
3550
|
}, /*#__PURE__*/React.createElement(CurrentRouteComponent, null, capitalize(currentRouteText)), props.routes.length > 0 && /*#__PURE__*/React.createElement(DisclosureChevronIcon, null)), /*#__PURE__*/React.createElement("button", {
|
|
3551
3551
|
type: "button",
|
|
3552
|
-
className: styles$
|
|
3552
|
+
className: styles$4["profile-button"],
|
|
3553
3553
|
onClick: () => {
|
|
3554
3554
|
var _a, _b;
|
|
3555
3555
|
props.requestConnectedPeopleFetch();
|
|
@@ -3565,7 +3565,7 @@ const SmallRoute = ({
|
|
|
3565
3565
|
className,
|
|
3566
3566
|
...props
|
|
3567
3567
|
}) => (/*#__PURE__*/React.createElement("a", {
|
|
3568
|
-
className: classnames(styles$
|
|
3568
|
+
className: classnames(styles$4["route"], className, active && styles$4["is-active"]),
|
|
3569
3569
|
...props
|
|
3570
3570
|
}));
|
|
3571
3571
|
|
|
@@ -3704,7 +3704,7 @@ const topbarTheme = {
|
|
|
3704
3704
|
id: "topbar"
|
|
3705
3705
|
};
|
|
3706
3706
|
|
|
3707
|
-
var styles$
|
|
3707
|
+
var styles$3 = {"drawer-wrap":"drawer-wrap-J0rSL","is-visible":"is-visible-KTME8","drawer":"drawer-j7f4l"};
|
|
3708
3708
|
|
|
3709
3709
|
function Drawer({
|
|
3710
3710
|
children,
|
|
@@ -3712,7 +3712,7 @@ function Drawer({
|
|
|
3712
3712
|
}) {
|
|
3713
3713
|
return /*#__PURE__*/React.createElement("div", {
|
|
3714
3714
|
id: id,
|
|
3715
|
-
className: styles$
|
|
3715
|
+
className: styles$3["drawer"]
|
|
3716
3716
|
}, children);
|
|
3717
3717
|
}
|
|
3718
3718
|
function DrawerWrap({
|
|
@@ -3722,7 +3722,7 @@ function DrawerWrap({
|
|
|
3722
3722
|
...props
|
|
3723
3723
|
}) {
|
|
3724
3724
|
return /*#__PURE__*/React.createElement("div", {
|
|
3725
|
-
className: classnames(styles$
|
|
3725
|
+
className: classnames(styles$3["drawer-wrap"], className, isVisible && styles$3["is-visible"]),
|
|
3726
3726
|
...props
|
|
3727
3727
|
}, children);
|
|
3728
3728
|
}
|
|
@@ -3906,7 +3906,7 @@ const SwitchView = ({
|
|
|
3906
3906
|
}));
|
|
3907
3907
|
};
|
|
3908
3908
|
|
|
3909
|
-
var styles$
|
|
3909
|
+
var styles$2 = {"color-mode-switcher":"color-mode-switcher-JpczO","color-mode-switcher-label":"color-mode-switcher-label-3jPM2","color-mode-switcher-modes":"color-mode-switcher-modes-u-bic"};
|
|
3910
3910
|
|
|
3911
3911
|
const COLOR_MODES = [{
|
|
3912
3912
|
label: "Light",
|
|
@@ -3926,11 +3926,11 @@ function ColorModeSwitcher() {
|
|
|
3926
3926
|
const updateStore = useUpdateStore();
|
|
3927
3927
|
const [counter] = React.useState(() => COLOR_MODE_INSTANCE_COUNTER++);
|
|
3928
3928
|
return /*#__PURE__*/React.createElement("fieldset", {
|
|
3929
|
-
className: styles$
|
|
3929
|
+
className: styles$2["color-mode-switcher"]
|
|
3930
3930
|
}, /*#__PURE__*/React.createElement("legend", {
|
|
3931
|
-
className: styles$
|
|
3931
|
+
className: styles$2["color-mode-switcher-label"]
|
|
3932
3932
|
}, "Appearance", " "), /*#__PURE__*/React.createElement("div", {
|
|
3933
|
-
className: styles$
|
|
3933
|
+
className: styles$2["color-mode-switcher-modes"]
|
|
3934
3934
|
}, COLOR_MODES.map(({
|
|
3935
3935
|
value,
|
|
3936
3936
|
label
|
|
@@ -4201,20 +4201,225 @@ const useToolbarReducer = overrides => React__namespace.useReducer(reducer, {
|
|
|
4201
4201
|
...overrides
|
|
4202
4202
|
});
|
|
4203
4203
|
|
|
4204
|
-
var styles = {"toolbar":"toolbar-KHJR5","toolbar-button":"toolbar-button-Ye4h5","is-current":"is-current-DZK47","toolbar-button--avatar":"toolbar-button--avatar-5FUik","toolbar-button--home":"toolbar-button--home-Pthd0"};
|
|
4204
|
+
var styles$1 = {"toolbar":"toolbar-KHJR5","toolbar-button":"toolbar-button-Ye4h5","is-current":"is-current-DZK47","toolbar-button--avatar":"toolbar-button--avatar-5FUik","toolbar-button--home":"toolbar-button--home-Pthd0"};
|
|
4205
4205
|
|
|
4206
4206
|
const pcoUrl = pcoUrl$1;
|
|
4207
4207
|
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4208
|
+
var styles = {"banner":"banner-YfQ37","content":"content-lNjWf","icon":"icon-abz7q","iconShape":"iconShape-6uyot","iconSparkle":"iconSparkle-t0OzK","text":"text--Vlhl","title":"title-zOEOR","subtitle":"subtitle-ufLnk","chevron":"chevron-oOUA-"};
|
|
4209
|
+
|
|
4210
|
+
function AskAIBanner({
|
|
4211
|
+
onClick
|
|
4212
|
+
}) {
|
|
4213
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
4214
|
+
className: styles.banner,
|
|
4215
|
+
onClick: () => onClick(),
|
|
4216
|
+
type: "button"
|
|
4217
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
4218
|
+
className: styles.content
|
|
4219
|
+
}, /*#__PURE__*/React.createElement(AskAIIcon, null), /*#__PURE__*/React.createElement("span", {
|
|
4220
|
+
className: styles.text
|
|
4221
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
4222
|
+
className: styles.title
|
|
4223
|
+
}, "Ask AI"), /*#__PURE__*/React.createElement("span", {
|
|
4224
|
+
className: styles.subtitle
|
|
4225
|
+
}, "Support answers tailored to you"))), /*#__PURE__*/React.createElement(tapestryReact.Icon, {
|
|
4226
|
+
className: styles.chevron,
|
|
4227
|
+
name: "general.rightChevron",
|
|
4228
|
+
size: "16px"
|
|
4229
|
+
}));
|
|
4230
|
+
}
|
|
4231
|
+
const SQUIRCLE_PATH = "M15.9994 0C3.19766 0 0 3.20025 0 16C0 28.7998 3.19766 32 15.9994 32C28.8011 32 32 28.8022 32 16C32 3.19779 28.7999 0 15.9994 0Z";
|
|
4232
|
+
const SQUIRCLE_BORDER_PATH = "M15.999 0.222656C22.4009 0.222656 26.3132 1.0274 28.6426 3.35645C30.972 5.68549 31.7773 9.59729 31.7773 16C31.7773 22.4025 30.9726 26.3145 28.6436 28.6436C26.3143 30.9726 22.4015 31.7773 15.999 31.7773C9.5968 31.7773 5.68536 30.9719 3.35645 28.6426C1.02748 26.3132 0.222656 22.4015 0.222656 16C0.222656 9.59851 1.02748 5.68678 3.35645 3.35742C5.68536 1.02814 9.5968 0.222687 15.999 0.222656Z";
|
|
4233
|
+
// Monotonic counter for per-instance SVG ids. useId would be tidier but isn't
|
|
4234
|
+
// available on React 17, which our peer range still supports.
|
|
4235
|
+
let iconInstanceCount = 0;
|
|
4236
|
+
function AskAIIcon() {
|
|
4237
|
+
const [uid] = React.useState(() => `ask-ai-icon-${iconInstanceCount++}`);
|
|
4238
|
+
const maskId = `${uid}-mask`;
|
|
4239
|
+
const blur = n => `${uid}-blur-${n}`;
|
|
4240
|
+
const borderA = `${uid}-border-a`;
|
|
4241
|
+
const borderB = `${uid}-border-b`;
|
|
4242
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
4243
|
+
className: styles.icon
|
|
4244
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
4245
|
+
className: styles.iconShape,
|
|
4246
|
+
viewBox: "0 0 32 32",
|
|
4247
|
+
fill: "none",
|
|
4248
|
+
"aria-hidden": "true"
|
|
4249
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4250
|
+
d: SQUIRCLE_PATH,
|
|
4251
|
+
fill: "white"
|
|
4252
|
+
}), /*#__PURE__*/React.createElement("mask", {
|
|
4253
|
+
id: maskId,
|
|
4254
|
+
style: {
|
|
4255
|
+
maskType: "alpha"
|
|
4256
|
+
},
|
|
4257
|
+
maskUnits: "userSpaceOnUse",
|
|
4258
|
+
x: "0",
|
|
4259
|
+
y: "0",
|
|
4260
|
+
width: "32",
|
|
4261
|
+
height: "32"
|
|
4262
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4263
|
+
d: SQUIRCLE_PATH,
|
|
4264
|
+
fill: "#939393"
|
|
4265
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4266
|
+
mask: `url(#${maskId})`
|
|
4267
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
4268
|
+
filter: `url(#${blur(0)})`
|
|
4269
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4270
|
+
cx: "24.2268",
|
|
4271
|
+
cy: "23.7824",
|
|
4272
|
+
rx: "17.9331",
|
|
4273
|
+
ry: "31.1883",
|
|
4274
|
+
transform: "rotate(-135 24.2268 23.7824)",
|
|
4275
|
+
fill: "#B883E2"
|
|
4276
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4277
|
+
filter: `url(#${blur(1)})`
|
|
4278
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4279
|
+
cx: "7.05187",
|
|
4280
|
+
cy: "9.27409",
|
|
4281
|
+
rx: "14.9017",
|
|
4282
|
+
ry: "29.437",
|
|
4283
|
+
transform: "rotate(45 7.05187 9.27409)",
|
|
4284
|
+
fill: "#74A3FF"
|
|
4285
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4286
|
+
filter: `url(#${blur(2)})`
|
|
4287
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4288
|
+
cx: "29.7552",
|
|
4289
|
+
cy: "31.0886",
|
|
4290
|
+
rx: "11.2869",
|
|
4291
|
+
ry: "15.1567",
|
|
4292
|
+
transform: "rotate(-135 29.7552 31.0886)",
|
|
4293
|
+
fill: "#F28B54"
|
|
4294
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4295
|
+
filter: `url(#${blur(3)})`
|
|
4296
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4297
|
+
cx: "3.58734",
|
|
4298
|
+
cy: "4.03178",
|
|
4299
|
+
rx: "11.2869",
|
|
4300
|
+
ry: "15.1567",
|
|
4301
|
+
transform: "rotate(45 3.58734 4.03178)",
|
|
4302
|
+
fill: "#24D7B7"
|
|
4303
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4304
|
+
filter: `url(#${blur(4)})`
|
|
4305
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4306
|
+
cx: "32.0363",
|
|
4307
|
+
cy: "32.0363",
|
|
4308
|
+
rx: "5.65576",
|
|
4309
|
+
ry: "7.59487",
|
|
4310
|
+
transform: "rotate(-135 32.0363 32.0363)",
|
|
4311
|
+
fill: "#FFBC40"
|
|
4312
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4313
|
+
filter: `url(#${blur(5)})`
|
|
4314
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4315
|
+
cx: "1.00513",
|
|
4316
|
+
cy: "-0.772657",
|
|
4317
|
+
rx: "5.1403",
|
|
4318
|
+
ry: "6.82216",
|
|
4319
|
+
transform: "rotate(-135 1.00513 -0.772657)",
|
|
4320
|
+
fill: "#70FFD4"
|
|
4321
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
4322
|
+
d: SQUIRCLE_BORDER_PATH,
|
|
4323
|
+
stroke: `url(#${borderA})`,
|
|
4324
|
+
strokeWidth: "0.444444"
|
|
4325
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4326
|
+
d: SQUIRCLE_BORDER_PATH,
|
|
4327
|
+
stroke: `url(#${borderB})`,
|
|
4328
|
+
strokeWidth: "0.444444"
|
|
4329
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
|
|
4330
|
+
id: blur(0),
|
|
4331
|
+
x: "-20.7722",
|
|
4332
|
+
y: "-21.2166",
|
|
4333
|
+
width: "89.9981",
|
|
4334
|
+
height: "89.9981",
|
|
4335
|
+
filterUnits: "userSpaceOnUse",
|
|
4336
|
+
colorInterpolationFilters: "sRGB"
|
|
4337
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4338
|
+
stdDeviation: "9.77778"
|
|
4339
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4340
|
+
id: blur(1),
|
|
4341
|
+
x: "-35.839",
|
|
4342
|
+
y: "-33.6167",
|
|
4343
|
+
width: "85.7816",
|
|
4344
|
+
height: "85.7816",
|
|
4345
|
+
filterUnits: "userSpaceOnUse",
|
|
4346
|
+
colorInterpolationFilters: "sRGB"
|
|
4347
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4348
|
+
stdDeviation: "9.77778"
|
|
4349
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4350
|
+
id: blur(2),
|
|
4351
|
+
x: "-3.16378",
|
|
4352
|
+
y: "-1.83045",
|
|
4353
|
+
width: "65.838",
|
|
4354
|
+
height: "65.838",
|
|
4355
|
+
filterUnits: "userSpaceOnUse",
|
|
4356
|
+
colorInterpolationFilters: "sRGB"
|
|
4357
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4358
|
+
stdDeviation: "9.77778"
|
|
4359
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4360
|
+
id: blur(3),
|
|
4361
|
+
x: "-29.3317",
|
|
4362
|
+
y: "-28.8872",
|
|
4363
|
+
width: "65.838",
|
|
4364
|
+
height: "65.838",
|
|
4365
|
+
filterUnits: "userSpaceOnUse",
|
|
4366
|
+
colorInterpolationFilters: "sRGB"
|
|
4367
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4368
|
+
stdDeviation: "9.77778"
|
|
4369
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4370
|
+
id: blur(4),
|
|
4371
|
+
x: "16.4511",
|
|
4372
|
+
y: "16.4511",
|
|
4373
|
+
width: "31.1704",
|
|
4374
|
+
height: "31.1704",
|
|
4375
|
+
filterUnits: "userSpaceOnUse",
|
|
4376
|
+
colorInterpolationFilters: "sRGB"
|
|
4377
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4378
|
+
stdDeviation: "4.44444"
|
|
4379
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4380
|
+
id: blur(5),
|
|
4381
|
+
x: "-13.9242",
|
|
4382
|
+
y: "-15.7019",
|
|
4383
|
+
width: "29.8586",
|
|
4384
|
+
height: "29.8586",
|
|
4385
|
+
filterUnits: "userSpaceOnUse",
|
|
4386
|
+
colorInterpolationFilters: "sRGB"
|
|
4387
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4388
|
+
stdDeviation: "4.44444"
|
|
4389
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
4390
|
+
id: borderA,
|
|
4391
|
+
x1: "4.22222",
|
|
4392
|
+
y1: "2.44444",
|
|
4393
|
+
x2: "16",
|
|
4394
|
+
y2: "14.4444",
|
|
4395
|
+
gradientUnits: "userSpaceOnUse"
|
|
4396
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
4397
|
+
stopColor: "#62FAFF"
|
|
4398
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
4399
|
+
offset: "1",
|
|
4400
|
+
stopColor: "#55AFD6",
|
|
4401
|
+
stopOpacity: "0"
|
|
4402
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
4403
|
+
id: borderB,
|
|
4404
|
+
x1: "28.4444",
|
|
4405
|
+
y1: "29.3333",
|
|
4406
|
+
x2: "22.8889",
|
|
4407
|
+
y2: "22.4444",
|
|
4408
|
+
gradientUnits: "userSpaceOnUse"
|
|
4409
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
4410
|
+
stopColor: "#FFA961"
|
|
4411
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
4412
|
+
offset: "1",
|
|
4413
|
+
stopColor: "#D48B91",
|
|
4414
|
+
stopOpacity: "0"
|
|
4415
|
+
})))), /*#__PURE__*/React.createElement("svg", {
|
|
4416
|
+
className: styles.iconSparkle,
|
|
4417
|
+
viewBox: "0 0 19.4995 17.9999",
|
|
4418
|
+
"aria-hidden": "true"
|
|
4419
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4420
|
+
d: "M2.71191 12.2002C2.81068 11.9333 3.18834 11.9333 3.2871 12.2002L3.84375 13.7031C3.92138 13.9129 4.08707 14.0786 4.29687 14.1562L5.7998 14.7119C6.06662 14.8107 6.06648 15.1882 5.7998 15.2871L4.29687 15.8437C4.08707 15.9214 3.92138 16.0871 3.84375 16.2969L3.2871 17.7998C3.18821 18.0665 2.81066 18.0666 2.71191 17.7998L2.15625 16.2969C2.07861 16.0871 1.91292 15.9214 1.70312 15.8437L0.200191 15.2871C-0.0667302 15.1883 -0.0667302 14.8107 0.200191 14.7119L1.70312 14.1562C1.91292 14.0786 2.07861 13.9129 2.15625 13.7031L2.71191 12.2002ZM11.2812 2C11.5283 1.33313 12.4717 1.33305 12.7187 2L14.1094 5.75878C14.3035 6.28304 14.7169 6.69659 15.2412 6.89062L18.999 8.28125C19.6663 8.52817 19.6663 9.47182 18.999 9.71875L15.2412 11.1094C14.7168 11.3035 14.3035 11.7168 14.1094 12.2412L12.7187 15.999C12.4718 16.6663 11.5282 16.6663 11.2812 15.999L9.89062 12.2412C9.69659 11.7169 9.28304 11.3035 8.75878 11.1094L5 9.71875C4.33305 9.47173 4.33312 8.52834 5 8.28125L8.75878 6.89062C9.28299 6.69653 9.69653 6.28299 9.89062 5.75878L11.2812 2ZM2.71191 0.200191C2.81068 -0.0667302 3.18834 -0.0667302 3.2871 0.200191L3.84375 1.70312C3.92138 1.91292 4.08707 2.07861 4.29687 2.15625L5.7998 2.71191C6.06662 2.81066 6.06648 3.18821 5.7998 3.2871L4.29687 3.84375C4.08707 3.92138 3.92138 4.08707 3.84375 4.29687L3.2871 5.7998C3.18821 6.06648 2.81066 6.06662 2.71191 5.7998L2.15625 4.29687C2.07861 4.08707 1.91292 3.92138 1.70312 3.84375L0.200191 3.2871C-0.0667302 3.18834 -0.0667302 2.81068 0.200191 2.71191L1.70312 2.15625C1.91292 2.07861 2.07861 1.91292 2.15625 1.70312L2.71191 0.200191Z",
|
|
4421
|
+
fill: "currentColor"
|
|
4422
|
+
})));
|
|
4218
4423
|
}
|
|
4219
4424
|
|
|
4220
4425
|
// The article heading lives in the deepest populated hierarchy level (lvl0 is
|
|
@@ -4368,6 +4573,89 @@ const DocumentationSearch = ({
|
|
|
4368
4573
|
}));
|
|
4369
4574
|
};
|
|
4370
4575
|
|
|
4576
|
+
// The route rides in the iframe URL fragment (`…/topbar#conversations/abc`),
|
|
4577
|
+
// not the path, so updating it is a same-document navigation that doesn't
|
|
4578
|
+
// reload the iframe, but also lets the route survive a forced reload (e.g.
|
|
4579
|
+
// Turbo re-parenting the topbar).
|
|
4580
|
+
function buildPicobotSrc(origin, path) {
|
|
4581
|
+
const [rawPath, queryPart] = path.replace(/^\/+/, "").split("?", 2);
|
|
4582
|
+
const safePath = rawPath.split("/").filter(segment => segment && segment !== "." && segment !== "..").join("/");
|
|
4583
|
+
const fragment = queryPart !== undefined ? `${safePath}?${queryPart}` : safePath;
|
|
4584
|
+
const base = new URL("topbar", origin).toString();
|
|
4585
|
+
return fragment ? `${base}#${fragment}` : base;
|
|
4586
|
+
}
|
|
4587
|
+
|
|
4588
|
+
const LOAD_TIMEOUT_MS = 3000;
|
|
4589
|
+
function createPicobotIframe(picobotOrigin) {
|
|
4590
|
+
return /*#__PURE__*/React.forwardRef(function PicobotIframe({
|
|
4591
|
+
currentPath: iframePath,
|
|
4592
|
+
onChangePath: onIframeChangePath,
|
|
4593
|
+
onMessage
|
|
4594
|
+
}, ref) {
|
|
4595
|
+
const iframeRef = React.useRef(null);
|
|
4596
|
+
// Keep the fragment in sync in both directions—external opens (deeplink /
|
|
4597
|
+
// Contact support) and picobot's own NEW_ROUTE_RENDERED reports—so it
|
|
4598
|
+
// always reflects the live conversation. See buildPicobotSrc.
|
|
4599
|
+
const [loadedPath, setLoadedPath] = React.useState(iframePath || "");
|
|
4600
|
+
const hasReportedErrorRef = React.useRef(false);
|
|
4601
|
+
const loadTimeoutRef = React.useRef();
|
|
4602
|
+
const reportLoadError = React.useCallback(() => {
|
|
4603
|
+
if (hasReportedErrorRef.current) return;
|
|
4604
|
+
hasReportedErrorRef.current = true;
|
|
4605
|
+
onMessage === null || onMessage === void 0 ? void 0 : onMessage({
|
|
4606
|
+
type: "IFRAME_LOAD_ERROR"
|
|
4607
|
+
});
|
|
4608
|
+
}, [onMessage]);
|
|
4609
|
+
React.useEffect(function armLoadTimeoutOnMount() {
|
|
4610
|
+
const timeout = setTimeout(reportLoadError, LOAD_TIMEOUT_MS);
|
|
4611
|
+
loadTimeoutRef.current = timeout;
|
|
4612
|
+
return () => clearTimeout(timeout);
|
|
4613
|
+
}, []);
|
|
4614
|
+
React.useEffect(function subscribeToGuestMessages() {
|
|
4615
|
+
function handleGuestMessage(e) {
|
|
4616
|
+
var _a, _b, _c;
|
|
4617
|
+
if (e.origin !== picobotOrigin) return;
|
|
4618
|
+
if (!e.source || !iframeRef.current) return;
|
|
4619
|
+
if (e.source !== iframeRef.current.contentWindow) return;
|
|
4620
|
+
if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === "NEW_ROUTE_RENDERED" && onIframeChangePath) {
|
|
4621
|
+
const reportedPath = String((_b = e.data.payload) !== null && _b !== void 0 ? _b : "");
|
|
4622
|
+
setLoadedPath(reportedPath);
|
|
4623
|
+
onIframeChangePath(reportedPath);
|
|
4624
|
+
}
|
|
4625
|
+
if (((_c = e.data) === null || _c === void 0 ? void 0 : _c.type) === "READY") clearTimeout(loadTimeoutRef.current);
|
|
4626
|
+
if (onMessage) onMessage(e.data);
|
|
4627
|
+
}
|
|
4628
|
+
window.addEventListener("message", handleGuestMessage);
|
|
4629
|
+
return () => window.removeEventListener("message", handleGuestMessage);
|
|
4630
|
+
}, [onIframeChangePath, onMessage]);
|
|
4631
|
+
React.useEffect(function syncLoadedPathFromProp() {
|
|
4632
|
+
setLoadedPath(iframePath || "");
|
|
4633
|
+
}, [iframePath]);
|
|
4634
|
+
// A one-way channel for sending messages to picobot. Topbar just
|
|
4635
|
+
// forwards the envelope to the iframe and holds no message semantics of
|
|
4636
|
+
// its own—the consumer decides what to send and when.
|
|
4637
|
+
React.useImperativeHandle(ref, () => ({
|
|
4638
|
+
postMessage(message) {
|
|
4639
|
+
var _a, _b;
|
|
4640
|
+
(_b = (_a = iframeRef.current) === null || _a === void 0 ? void 0 : _a.contentWindow) === null || _b === void 0 ? void 0 : _b.postMessage(message, picobotOrigin);
|
|
4641
|
+
}
|
|
4642
|
+
}), []);
|
|
4643
|
+
const iframeSrc = buildPicobotSrc(picobotOrigin, loadedPath);
|
|
4644
|
+
return /*#__PURE__*/React.createElement("iframe", {
|
|
4645
|
+
ref: iframeRef,
|
|
4646
|
+
src: iframeSrc,
|
|
4647
|
+
allow: "clipboard-write",
|
|
4648
|
+
style: {
|
|
4649
|
+
border: 0,
|
|
4650
|
+
flex: 1,
|
|
4651
|
+
height: "100%",
|
|
4652
|
+
width: "100%"
|
|
4653
|
+
},
|
|
4654
|
+
title: "Picobot"
|
|
4655
|
+
});
|
|
4656
|
+
});
|
|
4657
|
+
}
|
|
4658
|
+
|
|
4371
4659
|
const {
|
|
4372
4660
|
LoadingIndicator: LoadingIndicator$1,
|
|
4373
4661
|
StackView: StackView$1
|
|
@@ -4393,52 +4681,7 @@ function HelpdeskComponent({
|
|
|
4393
4681
|
helpdeskConfig,
|
|
4394
4682
|
onChangePath
|
|
4395
4683
|
}) {
|
|
4396
|
-
const PicobotIframe = React.useMemo(() =>
|
|
4397
|
-
const picobotOrigin = pcoUrl(env)("picobot");
|
|
4398
|
-
return function PicobotIframe({
|
|
4399
|
-
currentPath: iframePath,
|
|
4400
|
-
onChangePath: onIframeChangePath,
|
|
4401
|
-
onMessage
|
|
4402
|
-
}) {
|
|
4403
|
-
const ref = React.useRef(null);
|
|
4404
|
-
// Keep the fragment in sync in both directions—external opens (deeplink /
|
|
4405
|
-
// Contact support) and picobot's own NEW_ROUTE_RENDERED reports—so it
|
|
4406
|
-
// always reflects the live conversation. See buildPicobotSrc.
|
|
4407
|
-
const [loadedPath, setLoadedPath] = React.useState(iframePath || "");
|
|
4408
|
-
React.useEffect(() => {
|
|
4409
|
-
if (!onIframeChangePath && !onMessage) return undefined;
|
|
4410
|
-
const handler = e => {
|
|
4411
|
-
var _a, _b;
|
|
4412
|
-
if (e.origin !== picobotOrigin) return;
|
|
4413
|
-
if (!e.source || !ref.current) return;
|
|
4414
|
-
if (e.source !== ref.current.contentWindow) return;
|
|
4415
|
-
if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) === "NEW_ROUTE_RENDERED" && onIframeChangePath) {
|
|
4416
|
-
const reportedPath = String((_b = e.data.payload) !== null && _b !== void 0 ? _b : "");
|
|
4417
|
-
setLoadedPath(reportedPath);
|
|
4418
|
-
onIframeChangePath(reportedPath);
|
|
4419
|
-
}
|
|
4420
|
-
if (onMessage) onMessage(e.data);
|
|
4421
|
-
};
|
|
4422
|
-
window.addEventListener("message", handler);
|
|
4423
|
-
return () => window.removeEventListener("message", handler);
|
|
4424
|
-
}, [onIframeChangePath, onMessage]);
|
|
4425
|
-
React.useEffect(() => {
|
|
4426
|
-
setLoadedPath(iframePath || "");
|
|
4427
|
-
}, [iframePath]);
|
|
4428
|
-
const iframeSrc = buildPicobotSrc(picobotOrigin, loadedPath);
|
|
4429
|
-
return /*#__PURE__*/React.createElement("iframe", {
|
|
4430
|
-
ref: ref,
|
|
4431
|
-
src: iframeSrc,
|
|
4432
|
-
style: {
|
|
4433
|
-
border: 0,
|
|
4434
|
-
flex: 1,
|
|
4435
|
-
height: "100%",
|
|
4436
|
-
width: "100%"
|
|
4437
|
-
},
|
|
4438
|
-
title: "Picobot"
|
|
4439
|
-
});
|
|
4440
|
-
};
|
|
4441
|
-
}, [env]);
|
|
4684
|
+
const PicobotIframe = React.useMemo(() => createPicobotIframe(pcoUrl(env)("picobot")), [env]);
|
|
4442
4685
|
return /*#__PURE__*/React.createElement(addOns.UiExtensionFirstPartyComponent, {
|
|
4443
4686
|
grow: 1,
|
|
4444
4687
|
display: "flex",
|
|
@@ -4453,6 +4696,15 @@ function HelpdeskComponent({
|
|
|
4453
4696
|
spacing: 1
|
|
4454
4697
|
}, /*#__PURE__*/React.createElement(DrawerHeading, null, "Help and support"), /*#__PURE__*/React.createElement(LoadingIndicator$1, null)))),
|
|
4455
4698
|
additionalComponents: {
|
|
4699
|
+
AskAIBanner: {
|
|
4700
|
+
component: AskAIBanner,
|
|
4701
|
+
properties: {
|
|
4702
|
+
onClick: {
|
|
4703
|
+
event: false,
|
|
4704
|
+
type: Function
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4707
|
+
},
|
|
4456
4708
|
CalendlyWidget: {
|
|
4457
4709
|
component: CalendlyWidget,
|
|
4458
4710
|
properties: {
|
|
@@ -4489,6 +4741,7 @@ function HelpdeskComponent({
|
|
|
4489
4741
|
DrawerHeading,
|
|
4490
4742
|
PicobotIframe: {
|
|
4491
4743
|
component: PicobotIframe,
|
|
4744
|
+
methods: ["postMessage"],
|
|
4492
4745
|
properties: {
|
|
4493
4746
|
currentPath: {
|
|
4494
4747
|
attribute: false
|
|
@@ -5733,18 +5986,18 @@ function Toolbar({
|
|
|
5733
5986
|
return /*#__PURE__*/React.createElement(tapestryReact.ThemeProvider, {
|
|
5734
5987
|
theme: topbarTheme
|
|
5735
5988
|
}, /*#__PURE__*/React.createElement(addOns.UiExtensionDataContext, null, /*#__PURE__*/React.createElement("div", {
|
|
5736
|
-
className: styles["toolbar"],
|
|
5989
|
+
className: styles$1["toolbar"],
|
|
5737
5990
|
"data-pendo": "toolbar-profile-support-wrapper"
|
|
5738
5991
|
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
5739
5992
|
"aria-label": `Open ${userName}’s profile drawer`,
|
|
5740
5993
|
onClick: () => toggleDrawer(Profile),
|
|
5741
5994
|
"data-pendo": "toolbar-profile",
|
|
5742
|
-
className: styles["toolbar-button--avatar"]
|
|
5995
|
+
className: styles$1["toolbar-button--avatar"]
|
|
5743
5996
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
5744
5997
|
env: env,
|
|
5745
5998
|
url: userAvatarPath
|
|
5746
5999
|
})), /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
5747
|
-
className: styles["toolbar-button--home"],
|
|
6000
|
+
className: styles$1["toolbar-button--home"],
|
|
5748
6001
|
onClick: () => closeDrawer()
|
|
5749
6002
|
}, /*#__PURE__*/React.createElement(tapestryReact.Icon, {
|
|
5750
6003
|
name: "toolbar.planningCenter",
|
|
@@ -5782,7 +6035,7 @@ const ToolbarButton = ({
|
|
|
5782
6035
|
}) => {
|
|
5783
6036
|
return /*#__PURE__*/React.createElement("button", {
|
|
5784
6037
|
type: "button",
|
|
5785
|
-
className: classnames(styles["toolbar-button"], className, current && styles["is-current"]),
|
|
6038
|
+
className: classnames(styles$1["toolbar-button"], className, current && styles$1["is-current"]),
|
|
5786
6039
|
onClick: onClick,
|
|
5787
6040
|
"data-toolbar-link": "true",
|
|
5788
6041
|
...restProps
|