@planningcenter/topbar 12.8.2 → 12.8.3-rc.2
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 +7 -3
package/dist/topbar.umd.js
CHANGED
|
@@ -1194,20 +1194,21 @@
|
|
|
1194
1194
|
return `${basePath}?${params.toString()}`;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
|
+
const GROUPED_SEPARATELY = ["Accounts", "Church Center", "Home"];
|
|
1197
1198
|
function groupApps(apps) {
|
|
1198
1199
|
return {
|
|
1199
1200
|
accountsProduct: apps.find(({
|
|
1200
1201
|
name
|
|
1201
1202
|
}) => name === "Accounts"),
|
|
1202
|
-
|
|
1203
|
+
churchCenterProduct: apps.find(({
|
|
1203
1204
|
name
|
|
1204
|
-
}) => name === "
|
|
1205
|
+
}) => name === "Church Center"),
|
|
1205
1206
|
homeProduct: apps.find(({
|
|
1206
1207
|
name
|
|
1207
1208
|
}) => name === "Home"),
|
|
1208
1209
|
restProducts: [...apps].filter(({
|
|
1209
1210
|
name
|
|
1210
|
-
}) => name
|
|
1211
|
+
}) => !GROUPED_SEPARATELY.includes(name)).sort((a, b) => a.name.localeCompare(b.name))
|
|
1211
1212
|
};
|
|
1212
1213
|
}
|
|
1213
1214
|
|
|
@@ -1869,11 +1870,11 @@
|
|
|
1869
1870
|
}) => {
|
|
1870
1871
|
const {
|
|
1871
1872
|
accountsProduct,
|
|
1872
|
-
|
|
1873
|
+
churchCenterProduct,
|
|
1873
1874
|
homeProduct,
|
|
1874
1875
|
restProducts
|
|
1875
1876
|
} = groupApps(apps);
|
|
1876
|
-
const showChurchCenter = churchCenterEnabled &&
|
|
1877
|
+
const showChurchCenter = churchCenterEnabled && !!churchCenterProduct;
|
|
1877
1878
|
const renderProductLink = name => {
|
|
1878
1879
|
const isCurrent = name === appName;
|
|
1879
1880
|
return /*#__PURE__*/React.createElement("li", {
|
|
@@ -1925,7 +1926,7 @@
|
|
|
1925
1926
|
className: classnames(styles$n.link, styles$n["accounts-link"]),
|
|
1926
1927
|
"data-pendo": "app-switcher--change-app--ChurchCenter",
|
|
1927
1928
|
"data-turbolinks": false,
|
|
1928
|
-
href: `${pcoUrl$1(env)("publishing")}/
|
|
1929
|
+
href: `${pcoUrl$1(env)("publishing")}/church-center`
|
|
1929
1930
|
}, /*#__PURE__*/React.createElement(AppRow, {
|
|
1930
1931
|
appName: "Church Center"
|
|
1931
1932
|
}))))))));
|
|
@@ -1978,7 +1979,7 @@
|
|
|
1978
1979
|
}
|
|
1979
1980
|
|
|
1980
1981
|
const sortByAttribute = attr => arr => arr.slice().sort((a, b) => a[attr].localeCompare(b[attr]));
|
|
1981
|
-
const appsMenuFormatter = apps => sortByAttribute("name")(apps).reduce((acc, item) => (item.name || "") === "
|
|
1982
|
+
const appsMenuFormatter = apps => sortByAttribute("name")(apps).reduce((acc, item) => (item.name || "") === "API" ? acc : item.name === "Home" ? [item, ...acc] : [...acc, item], []);
|
|
1982
1983
|
const connectedPeopleMenuFormatter = connectedPeople => connectedPeople.slice().sort((a, b) => a.attributes["organization_name"].localeCompare(b.attributes["organization_name"]));
|
|
1983
1984
|
|
|
1984
1985
|
function useFeature(flag, features) {
|
|
@@ -6716,11 +6717,11 @@ true;
|
|
|
6716
6717
|
}) => {
|
|
6717
6718
|
const {
|
|
6718
6719
|
accountsProduct,
|
|
6719
|
-
|
|
6720
|
+
churchCenterProduct,
|
|
6720
6721
|
homeProduct,
|
|
6721
6722
|
restProducts
|
|
6722
6723
|
} = groupApps(apps);
|
|
6723
|
-
const showChurchCenter = churchCenterEnabled &&
|
|
6724
|
+
const showChurchCenter = churchCenterEnabled && !!churchCenterProduct;
|
|
6724
6725
|
const {
|
|
6725
6726
|
containerRef,
|
|
6726
6727
|
handleKeyDown
|
|
@@ -6801,7 +6802,7 @@ true;
|
|
|
6801
6802
|
className: classnames(styles$7.link, styles$7["accounts-link"]),
|
|
6802
6803
|
"data-pendo": "app-switcher--change-app--ChurchCenter",
|
|
6803
6804
|
"data-turbolinks": false,
|
|
6804
|
-
href: `${pcoUrl$1(env)("publishing")}/
|
|
6805
|
+
href: `${pcoUrl$1(env)("publishing")}/church-center`
|
|
6805
6806
|
}, /*#__PURE__*/React.createElement(AppRow, {
|
|
6806
6807
|
appName: "Church Center"
|
|
6807
6808
|
}))))))), document.body));
|