@planningcenter/topbar 12.8.3-rc.1 → 12.8.3
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.js +11 -10
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +11 -10
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +11 -10
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +11 -10
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +2 -3
package/dist/topbar.modern.js
CHANGED
|
@@ -1187,20 +1187,21 @@ function getAppsSwitchProductPath(productName) {
|
|
|
1187
1187
|
return `${basePath}?${params.toString()}`;
|
|
1188
1188
|
}
|
|
1189
1189
|
|
|
1190
|
+
const GROUPED_SEPARATELY = ["Accounts", "Church Center", "Home"];
|
|
1190
1191
|
function groupApps(apps) {
|
|
1191
1192
|
return {
|
|
1192
1193
|
accountsProduct: apps.find(({
|
|
1193
1194
|
name
|
|
1194
1195
|
}) => name === "Accounts"),
|
|
1195
|
-
|
|
1196
|
+
churchCenterProduct: apps.find(({
|
|
1196
1197
|
name
|
|
1197
|
-
}) => name === "
|
|
1198
|
+
}) => name === "Church Center"),
|
|
1198
1199
|
homeProduct: apps.find(({
|
|
1199
1200
|
name
|
|
1200
1201
|
}) => name === "Home"),
|
|
1201
1202
|
restProducts: [...apps].filter(({
|
|
1202
1203
|
name
|
|
1203
|
-
}) => name
|
|
1204
|
+
}) => !GROUPED_SEPARATELY.includes(name)).sort((a, b) => a.name.localeCompare(b.name))
|
|
1204
1205
|
};
|
|
1205
1206
|
}
|
|
1206
1207
|
|
|
@@ -1862,11 +1863,11 @@ const AppsMenu = ({
|
|
|
1862
1863
|
}) => {
|
|
1863
1864
|
const {
|
|
1864
1865
|
accountsProduct,
|
|
1865
|
-
|
|
1866
|
+
churchCenterProduct,
|
|
1866
1867
|
homeProduct,
|
|
1867
1868
|
restProducts
|
|
1868
1869
|
} = groupApps(apps);
|
|
1869
|
-
const showChurchCenter = churchCenterEnabled &&
|
|
1870
|
+
const showChurchCenter = churchCenterEnabled && !!churchCenterProduct;
|
|
1870
1871
|
const renderProductLink = name => {
|
|
1871
1872
|
const isCurrent = name === appName;
|
|
1872
1873
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
@@ -1918,7 +1919,7 @@ const AppsMenu = ({
|
|
|
1918
1919
|
className: classnames(styles$n.link, styles$n["accounts-link"]),
|
|
1919
1920
|
"data-pendo": "app-switcher--change-app--ChurchCenter",
|
|
1920
1921
|
"data-turbolinks": false,
|
|
1921
|
-
href: `${pcoUrl$1(env)("publishing")}/
|
|
1922
|
+
href: `${pcoUrl$1(env)("publishing")}/church-center`
|
|
1922
1923
|
}, /*#__PURE__*/React__default.createElement(AppRow, {
|
|
1923
1924
|
appName: "Church Center"
|
|
1924
1925
|
}))))))));
|
|
@@ -1971,7 +1972,7 @@ function hasFeature(features, flag) {
|
|
|
1971
1972
|
}
|
|
1972
1973
|
|
|
1973
1974
|
const sortByAttribute = attr => arr => arr.slice().sort((a, b) => a[attr].localeCompare(b[attr]));
|
|
1974
|
-
const appsMenuFormatter = apps => sortByAttribute("name")(apps).reduce((acc, item) => (item.name || "") === "
|
|
1975
|
+
const appsMenuFormatter = apps => sortByAttribute("name")(apps).reduce((acc, item) => (item.name || "") === "API" ? acc : item.name === "Home" ? [item, ...acc] : [...acc, item], []);
|
|
1975
1976
|
const connectedPeopleMenuFormatter = connectedPeople => connectedPeople.slice().sort((a, b) => a.attributes["organization_name"].localeCompare(b.attributes["organization_name"]));
|
|
1976
1977
|
|
|
1977
1978
|
function useFeature(flag, features) {
|
|
@@ -6709,11 +6710,11 @@ const AppsSwitcher = ({
|
|
|
6709
6710
|
}) => {
|
|
6710
6711
|
const {
|
|
6711
6712
|
accountsProduct,
|
|
6712
|
-
|
|
6713
|
+
churchCenterProduct,
|
|
6713
6714
|
homeProduct,
|
|
6714
6715
|
restProducts
|
|
6715
6716
|
} = groupApps(apps);
|
|
6716
|
-
const showChurchCenter = churchCenterEnabled &&
|
|
6717
|
+
const showChurchCenter = churchCenterEnabled && !!churchCenterProduct;
|
|
6717
6718
|
const {
|
|
6718
6719
|
containerRef,
|
|
6719
6720
|
handleKeyDown
|
|
@@ -6794,7 +6795,7 @@ const AppsSwitcher = ({
|
|
|
6794
6795
|
className: classnames(styles$7.link, styles$7["accounts-link"]),
|
|
6795
6796
|
"data-pendo": "app-switcher--change-app--ChurchCenter",
|
|
6796
6797
|
"data-turbolinks": false,
|
|
6797
|
-
href: `${pcoUrl$1(env)("publishing")}/
|
|
6798
|
+
href: `${pcoUrl$1(env)("publishing")}/church-center`
|
|
6798
6799
|
}, /*#__PURE__*/React__default.createElement(AppRow, {
|
|
6799
6800
|
appName: "Church Center"
|
|
6800
6801
|
}))))))), document.body));
|