@aiconomy/aico-components 0.0.181 → 0.0.187
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/README.md +0 -513
- package/dist/aico-components/aico-components.esm.js +1 -1
- package/dist/aico-components/aico-components.esm.js.map +1 -1
- package/dist/aico-components/{p-a0c58a5e.entry.js → p-f2c14c63.entry.js} +3 -3
- package/dist/aico-components/p-f2c14c63.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_27.cjs.entry.js +92 -64
- package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-components.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js +63 -23
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +25 -5
- package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -1
- package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.js +25 -5
- package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.js.map +1 -1
- package/dist/collection/model/AicoApiRequestInfo.js +7 -3
- package/dist/collection/model/AicoApiRequestInfo.js.map +1 -1
- package/dist/collection/utils/utils.js +53 -34
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/aico-news-list.js +26 -21
- package/dist/components/aico-news-list.js.map +1 -1
- package/dist/components/aico-special-news-carousel.js +5 -3
- package/dist/components/aico-special-news-carousel.js.map +1 -1
- package/dist/components/aico-top-news-carousel.js +5 -3
- package/dist/components/aico-top-news-carousel.js.map +1 -1
- package/dist/components/utils.js +60 -37
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/aico-album-content_27.entry.js +92 -64
- package/dist/esm/aico-album-content_27.entry.js.map +1 -1
- package/dist/esm/aico-components.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ssr/index.js +97 -65
- package/dist/ssr/index.mjs +97 -65
- package/dist/types/components/aico-news-list/aico-news-list.d.ts +8 -0
- package/dist/types/components/aico-special-news-carousel/aico-special-news-carousel.d.ts +4 -0
- package/dist/types/components/aico-top-news-carousel/aico-top-news-carousel.d.ts +4 -0
- package/dist/types/components.d.ts +35 -3
- package/dist/types/model/AicoApiRequestInfo.d.ts +3 -2
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/aico-components/p-a0c58a5e.entry.js.map +0 -1
|
@@ -13777,15 +13777,19 @@ const ConditionalRender = ({ condition }, children) => {
|
|
|
13777
13777
|
return condition ? children : [];
|
|
13778
13778
|
};
|
|
13779
13779
|
|
|
13780
|
-
const getAuthenticatedHeaders = (
|
|
13780
|
+
const getAuthenticatedHeaders = (token) => {
|
|
13781
13781
|
const headers = new Headers();
|
|
13782
13782
|
headers.append('Accept', 'application/vnd.api+json');
|
|
13783
|
-
headers.append('Authorization', `Bearer ${
|
|
13783
|
+
headers.append('Authorization', `Bearer ${token}`);
|
|
13784
13784
|
return headers;
|
|
13785
13785
|
};
|
|
13786
13786
|
const getAuthenticatedRequest = (api, route, query, signal) => {
|
|
13787
|
+
const token = api.bearerToken || api.accessToken;
|
|
13788
|
+
if (!token) {
|
|
13789
|
+
throw new Error('No valid token found');
|
|
13790
|
+
}
|
|
13787
13791
|
return new Request(new URL(`${route}?${query.toString()}`, api.baseApi), {
|
|
13788
|
-
headers: getAuthenticatedHeaders(
|
|
13792
|
+
headers: getAuthenticatedHeaders(token),
|
|
13789
13793
|
signal,
|
|
13790
13794
|
});
|
|
13791
13795
|
};
|
|
@@ -13795,58 +13799,77 @@ function setArrayFilter(queryParams, key, values) {
|
|
|
13795
13799
|
queryParams.append(key, value);
|
|
13796
13800
|
}
|
|
13797
13801
|
}
|
|
13798
|
-
async function fetchNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = [], hideTopArticles = false, hideSpecialArticles = false) {
|
|
13802
|
+
async function fetchNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = [], hideTopArticles = false, hideSpecialArticles = false, latestNews = false) {
|
|
13803
|
+
const url = api.bearerToken
|
|
13804
|
+
? 'news'
|
|
13805
|
+
: api.accessToken
|
|
13806
|
+
? latestNews
|
|
13807
|
+
? 'aico-shops/1/latest-news-resource'
|
|
13808
|
+
: 'aico-shops/1/news-resource'
|
|
13809
|
+
: '';
|
|
13799
13810
|
const queryParams = new URLSearchParams();
|
|
13800
13811
|
queryParams.set('page[number]', String(page));
|
|
13801
13812
|
queryParams.set('page[size]', String(size));
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
|
|
13811
|
-
|
|
13812
|
-
|
|
13813
|
-
|
|
13813
|
+
if (api.bearerToken) {
|
|
13814
|
+
queryParams.set('sort', '-publishDate');
|
|
13815
|
+
queryParams.set('filter[isActive]', '1');
|
|
13816
|
+
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
13817
|
+
setArrayFilter(queryParams, 'filter[channel][]', newsChannels);
|
|
13818
|
+
setArrayFilter(queryParams, 'filter[sellerIds][]', newsSellerIds);
|
|
13819
|
+
setArrayFilter(queryParams, 'filter[brandId][]', newsBrandIds);
|
|
13820
|
+
setArrayFilter(queryParams, 'filter[newsLanguage][]', newsLanguageLocales);
|
|
13821
|
+
if (hideTopArticles) {
|
|
13822
|
+
queryParams.set('filter[isTopNews]', '0');
|
|
13823
|
+
}
|
|
13824
|
+
if (hideSpecialArticles) {
|
|
13825
|
+
queryParams.set('filter[isSpecialArticle]', '0');
|
|
13826
|
+
}
|
|
13814
13827
|
}
|
|
13815
|
-
const request = getAuthenticatedRequest(api,
|
|
13828
|
+
const request = getAuthenticatedRequest(api, url, queryParams, signal);
|
|
13816
13829
|
const response = await fetch(request);
|
|
13817
13830
|
return await response.json();
|
|
13818
13831
|
}
|
|
13819
13832
|
async function fetchSpecialNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = []) {
|
|
13833
|
+
const url = api.bearerToken
|
|
13834
|
+
? 'news'
|
|
13835
|
+
: 'aico-shops/1/news-resource';
|
|
13820
13836
|
const queryParams = new URLSearchParams();
|
|
13821
13837
|
queryParams.set('page[number]', String(page));
|
|
13822
13838
|
queryParams.set('page[size]', String(size));
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13839
|
+
if (api.bearerToken) {
|
|
13840
|
+
queryParams.set('sort', '-publishDate');
|
|
13841
|
+
queryParams.set('filter[isActive]', '1');
|
|
13842
|
+
queryParams.set('filter[isSpecialArticle]', '1');
|
|
13843
|
+
queryParams.set('filter[isLightVersion]', 'true');
|
|
13844
|
+
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
13845
|
+
setArrayFilter(queryParams, 'filter[channel][]', newsChannels);
|
|
13846
|
+
setArrayFilter(queryParams, 'filter[sellerIds][]', newsSellerIds);
|
|
13847
|
+
setArrayFilter(queryParams, 'filter[brandId][]', newsBrandIds);
|
|
13848
|
+
setArrayFilter(queryParams, 'filter[newsLanguage][]', newsLanguageLocales);
|
|
13849
|
+
}
|
|
13850
|
+
const request = getAuthenticatedRequest(api, url, queryParams, signal);
|
|
13833
13851
|
const response = await fetch(request);
|
|
13834
13852
|
return await response.json();
|
|
13835
13853
|
}
|
|
13836
13854
|
async function fetchTopNewsArticles(api, page, size, signal, newsChannels = [], newsSellerIds = [], newsBrandIds = [], newsLanguageLocales = []) {
|
|
13855
|
+
const url = api.bearerToken
|
|
13856
|
+
? 'news'
|
|
13857
|
+
: 'aico-shops/1/news-resource';
|
|
13837
13858
|
const queryParams = new URLSearchParams();
|
|
13838
13859
|
queryParams.set('page[number]', String(page));
|
|
13839
13860
|
queryParams.set('page[size]', String(size));
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
|
|
13848
|
-
|
|
13849
|
-
|
|
13861
|
+
if (api.bearerToken) {
|
|
13862
|
+
queryParams.set('sort', '-publishDate');
|
|
13863
|
+
queryParams.set('filter[isActive]', '1');
|
|
13864
|
+
queryParams.set('filter[isTopNews]', '1');
|
|
13865
|
+
queryParams.set('filter[isLightVersion]', 'true');
|
|
13866
|
+
queryParams.set('filter[excludeTag][]', 'Eisnull');
|
|
13867
|
+
setArrayFilter(queryParams, 'filter[channel][]', newsChannels);
|
|
13868
|
+
setArrayFilter(queryParams, 'filter[sellerIds][]', newsSellerIds);
|
|
13869
|
+
setArrayFilter(queryParams, 'filter[brandId][]', newsBrandIds);
|
|
13870
|
+
setArrayFilter(queryParams, 'filter[newsLanguage][]', newsLanguageLocales);
|
|
13871
|
+
}
|
|
13872
|
+
const request = getAuthenticatedRequest(api, url, queryParams, signal);
|
|
13850
13873
|
const response = await fetch(request);
|
|
13851
13874
|
return await response.json();
|
|
13852
13875
|
}
|
|
@@ -20677,13 +20700,15 @@ const AicoNewsList = class {
|
|
|
20677
20700
|
this.newsBrandIdsArr = [];
|
|
20678
20701
|
this.newsLanguageLocalesArr = [];
|
|
20679
20702
|
this.aicoUrl = undefined;
|
|
20680
|
-
this.aicoBearerToken =
|
|
20703
|
+
this.aicoBearerToken = '';
|
|
20704
|
+
this.userAccessToken = '';
|
|
20681
20705
|
this.newsChannels = '';
|
|
20682
20706
|
this.newsSellerIds = '';
|
|
20683
20707
|
this.newsBrandIds = '';
|
|
20684
20708
|
this.newsLanguageLocales = '';
|
|
20685
20709
|
this.hideTopArticles = true;
|
|
20686
20710
|
this.hideSpecialArticles = false;
|
|
20711
|
+
this.latestNews = false;
|
|
20687
20712
|
this.pageSize = 16;
|
|
20688
20713
|
this.nextButtonText = 'Next';
|
|
20689
20714
|
this.previousButtonText = 'Previous';
|
|
@@ -20692,7 +20717,7 @@ const AicoNewsList = class {
|
|
|
20692
20717
|
connectedCallback() {
|
|
20693
20718
|
this.newsListFetchController = new AbortController();
|
|
20694
20719
|
this.pageNumber = 1;
|
|
20695
|
-
this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };
|
|
20720
|
+
this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken, accessToken: this.userAccessToken };
|
|
20696
20721
|
this.newsChannelsArr = splitByComma(this.newsChannels);
|
|
20697
20722
|
this.newsSellerIdsArr = splitByComma(this.newsSellerIds);
|
|
20698
20723
|
this.newsBrandIdsArr = splitByComma(this.newsBrandIds);
|
|
@@ -20702,36 +20727,37 @@ const AicoNewsList = class {
|
|
|
20702
20727
|
this.newsListFetchController.abort('disconnected');
|
|
20703
20728
|
}
|
|
20704
20729
|
async componentWillLoad() {
|
|
20705
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles);
|
|
20730
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews);
|
|
20706
20731
|
}
|
|
20707
20732
|
async componentWillUpdate() {
|
|
20708
20733
|
this.newsListFetchController = new AbortController();
|
|
20709
|
-
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles);
|
|
20734
|
+
this.newsResponse = await fetchNewsArticles(this.api, this.pageNumber, this.pageSize, this.newsListFetchController.signal, this.newsChannelsArr, this.newsSellerIdsArr, this.newsBrandIdsArr, this.newsLanguageLocalesArr, this.hideTopArticles, this.hideSpecialArticles, this.latestNews);
|
|
20710
20735
|
}
|
|
20711
20736
|
render() {
|
|
20712
20737
|
var _a, _b, _c;
|
|
20713
|
-
return (index.h(index.Host, { key: '
|
|
20738
|
+
return (index.h(index.Host, { key: 'e1667c954dd75052b26f824431174b7e734b484c' }, index.h("div", { key: '93ebe550604322a061fc082390592445491877a6', class: "newslist-grid-container mb-4" }, (_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.data.filter(article => this.latestNews || !article.attributes.isTopNews).map((article, articleIndex) => {
|
|
20714
20739
|
return (index.h("div", { key: article.id, class: "col" }, index.h("aico-news-list-item", { article: article, articleIndex: articleIndex, onArticleClick: e => {
|
|
20715
20740
|
var _a;
|
|
20716
20741
|
(_a = this.articleClick) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
20717
20742
|
e.stopPropagation();
|
|
20718
20743
|
}, locale: this.locale })));
|
|
20719
|
-
})),
|
|
20720
|
-
|
|
20721
|
-
this.pageNumber
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
this.pageNumber
|
|
20733
|
-
|
|
20734
|
-
|
|
20744
|
+
})), !this.latestNews &&
|
|
20745
|
+
index.h("nav", { key: 'b4e081968bf0de39ca6deb53f46e51149ba90c96', class: "w-100", "aria-label": "News navigation" }, index.h("ul", { key: '306919fae60915ef97b0f8b499105252cffa7355', class: "pagination justify-content-center" }, index.h("li", { key: '2004858d91a1d36f344947003e16276c06d012e4', class: `page-item page-link user-select-none d-flex align-items-center ${!((_b = this.newsResponse) === null || _b === void 0 ? void 0 : _b.links.prev) ? 'disabled' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
20746
|
+
if (this.pageNumber > 1) {
|
|
20747
|
+
this.pageNumber -= 1;
|
|
20748
|
+
}
|
|
20749
|
+
return false;
|
|
20750
|
+
} }, index.h("svg", { key: '794bc0a90223b0bfb469732e64c8ecdc33cbf95f', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "bi bi-chevron-left me-1 fs-4", style: { width: '1em', height: '1em' }, viewBox: "0 0 16 16" }, index.h("path", { key: 'c114c34774e564ee68e70a72f02a53acc7d7403f', "fill-rule": "evenodd", d: "M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" })), this.previousButtonText), this.getViewablePages().map(page => (index.h("li", { class: `page-item page-link user-select-none ${page === '...' ? 'disabled' : Number(page) === this.pageNumber ? 'active' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
20751
|
+
if (page !== '...') {
|
|
20752
|
+
this.pageNumber = Number(page);
|
|
20753
|
+
}
|
|
20754
|
+
return false;
|
|
20755
|
+
} }, page))), index.h("li", { key: 'a3b8aa8f9d69ad837e90b17f683fbcb97e70dd56', class: `page-item page-link user-select-none d-flex align-items-center ${!((_c = this.newsResponse) === null || _c === void 0 ? void 0 : _c.links.next) ? 'disabled' : ''}`, style: { cursor: 'pointer' }, onClick: () => {
|
|
20756
|
+
var _a, _b;
|
|
20757
|
+
if (((_a = this.newsResponse) === null || _a === void 0 ? void 0 : _a.meta.page.lastPage) && this.pageNumber < ((_b = this.newsResponse) === null || _b === void 0 ? void 0 : _b.meta.page.lastPage)) {
|
|
20758
|
+
this.pageNumber += 1;
|
|
20759
|
+
}
|
|
20760
|
+
} }, this.nextButtonText, index.h("svg", { key: '46589c53b68ba1f8a87a893a63469e460d01b25e', xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", class: "bi bi-chevron-right ms-1 fs-4", style: { width: '1em', height: '1em' }, viewBox: "0 0 16 16" }, index.h("path", { key: '5ea164fd74b2138274adcba33e0e54a42e52be4e', "fill-rule": "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" })))))));
|
|
20735
20761
|
}
|
|
20736
20762
|
getViewablePages(lookAhead = 2) {
|
|
20737
20763
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -20855,7 +20881,8 @@ const AicoSpecialNewsCarousel = class {
|
|
|
20855
20881
|
this.newsBrandIdsArr = [];
|
|
20856
20882
|
this.newsLanguageLocalesArr = [];
|
|
20857
20883
|
this.aicoUrl = undefined;
|
|
20858
|
-
this.aicoBearerToken =
|
|
20884
|
+
this.aicoBearerToken = '';
|
|
20885
|
+
this.userAccessToken = '';
|
|
20859
20886
|
this.newsChannels = '';
|
|
20860
20887
|
this.newsSellerIds = '';
|
|
20861
20888
|
this.newsBrandIds = '';
|
|
@@ -20865,7 +20892,7 @@ const AicoSpecialNewsCarousel = class {
|
|
|
20865
20892
|
}
|
|
20866
20893
|
connectedCallback() {
|
|
20867
20894
|
this.newsListFetchController = new AbortController();
|
|
20868
|
-
this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };
|
|
20895
|
+
this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken, accessToken: this.userAccessToken };
|
|
20869
20896
|
this.newsChannelsArr = splitByComma(this.newsChannels);
|
|
20870
20897
|
this.newsSellerIdsArr = splitByComma(this.newsSellerIds);
|
|
20871
20898
|
this.newsBrandIdsArr = splitByComma(this.newsBrandIds);
|
|
@@ -20891,7 +20918,7 @@ const AicoSpecialNewsCarousel = class {
|
|
|
20891
20918
|
});
|
|
20892
20919
|
}
|
|
20893
20920
|
render() {
|
|
20894
|
-
return (index.h("div", { key: '
|
|
20921
|
+
return (index.h("div", { key: 'cdbe261371e46876ac8b4677067c0c1d60d2e9e9', class: "carousel" }, this.newsResponse.data.map(article => {
|
|
20895
20922
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
20896
20923
|
const focusX = article.attributes.focusXPercentage ? `${article.attributes.focusXPercentage}%` : 'center';
|
|
20897
20924
|
const focusY = article.attributes.focusYPercentage ? `${article.attributes.focusYPercentage}%` : 'center';
|
|
@@ -21094,7 +21121,8 @@ const AicoTopNewsCarousel = class {
|
|
|
21094
21121
|
this.newsBrandIdsArr = [];
|
|
21095
21122
|
this.newsLanguageLocalesArr = [];
|
|
21096
21123
|
this.aicoUrl = undefined;
|
|
21097
|
-
this.aicoBearerToken =
|
|
21124
|
+
this.aicoBearerToken = '';
|
|
21125
|
+
this.userAccessToken = '';
|
|
21098
21126
|
this.newsChannels = '';
|
|
21099
21127
|
this.newsSellerIds = '';
|
|
21100
21128
|
this.newsBrandIds = '';
|
|
@@ -21104,7 +21132,7 @@ const AicoTopNewsCarousel = class {
|
|
|
21104
21132
|
}
|
|
21105
21133
|
connectedCallback() {
|
|
21106
21134
|
this.newsListFetchController = new AbortController();
|
|
21107
|
-
this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };
|
|
21135
|
+
this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken, accessToken: this.userAccessToken };
|
|
21108
21136
|
this.newsChannelsArr = splitByComma(this.newsChannels);
|
|
21109
21137
|
this.newsSellerIdsArr = splitByComma(this.newsSellerIds);
|
|
21110
21138
|
this.newsBrandIdsArr = splitByComma(this.newsBrandIds);
|
|
@@ -21130,7 +21158,7 @@ const AicoTopNewsCarousel = class {
|
|
|
21130
21158
|
});
|
|
21131
21159
|
}
|
|
21132
21160
|
render() {
|
|
21133
|
-
return (index.h("div", { key: '
|
|
21161
|
+
return (index.h("div", { key: '403ffcf2505ada818121277bedf4099015221c9a', class: "carousel" }, this.newsResponse.data.map(article => {
|
|
21134
21162
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
21135
21163
|
const focusX = article.attributes.focusXPercentage ? `${article.attributes.focusXPercentage}%` : 'center';
|
|
21136
21164
|
const focusY = article.attributes.focusYPercentage ? `${article.attributes.focusYPercentage}%` : 'center';
|