@aiconomy/aico-components 0.0.53 → 0.0.57
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 +67 -57
- 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-0ca1f065.entry.js +2 -0
- package/dist/aico-components/p-0ca1f065.entry.js.map +1 -0
- package/dist/aico-components/{p-a58972e9.entry.js → p-1c4a07ef.entry.js} +3 -3
- package/dist/aico-components/p-1c4a07ef.entry.js.map +1 -0
- package/dist/aico-components/p-406fa2e5.entry.js +2 -0
- package/dist/aico-components/p-406fa2e5.entry.js.map +1 -0
- package/dist/aico-components/{p-42b98baf.entry.js → p-4c0f3325.entry.js} +2 -2
- package/dist/aico-components/{p-776352ba.entry.js → p-5109399b.entry.js} +2 -2
- package/dist/aico-components/{p-b0325a83.entry.js → p-6464810e.entry.js} +2 -2
- package/dist/aico-components/{p-b78d7799.entry.js → p-68930822.entry.js} +2 -2
- package/dist/aico-components/{p-1a6625c0.entry.js → p-90c2d3dc.entry.js} +2 -2
- package/dist/aico-components/p-ae20e789.js +3 -0
- package/dist/aico-components/{p-2aae1a0e.js.map → p-ae20e789.js.map} +1 -1
- package/dist/aico-components/p-b1f8308f.entry.js +2 -0
- package/dist/aico-components/p-b1f8308f.entry.js.map +1 -0
- package/dist/aico-components/p-dfd3b0d3.js +2 -0
- package/dist/aico-components/p-dfd3b0d3.js.map +1 -0
- package/dist/cjs/aico-album-content_19.cjs.entry.js +3 -5
- package/dist/cjs/aico-album-content_19.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-article-detail.cjs.entry.js +1 -1
- package/dist/cjs/aico-asking-list-content.cjs.entry.js +1 -1
- package/dist/cjs/aico-collection-content.cjs.entry.js +1 -1
- package/dist/cjs/aico-components.cjs.js +2 -2
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js +11 -3
- package/dist/cjs/aico-fetch-article-detail.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-news-list-item.cjs.entry.js +6 -3
- package/dist/cjs/aico-news-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-news-list.cjs.entry.js +6 -6
- package/dist/cjs/aico-news-list.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-no-content_2.cjs.entry.js +1 -1
- package/dist/cjs/aico-special-news-carousel.cjs.entry.js +2 -2
- package/dist/cjs/{index-75c0e002.js → index-e52034b7.js} +1 -6
- package/dist/cjs/index-e52034b7.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-406a9df3.js → utils-095ed22b.js} +10 -1
- package/dist/cjs/utils-095ed22b.js.map +1 -0
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js +32 -7
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.js.map +1 -1
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js +6 -0
- package/dist/collection/components/aico-fetch-article-detail/aico-fetch-article-detail.stories.js.map +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.css +0 -113
- package/dist/collection/components/aico-news-list/aico-news-list.js +4 -4
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.stories.js +3 -0
- package/dist/collection/components/aico-news-list/aico-news-list.stories.js.map +1 -1
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +6 -3
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
- package/dist/collection/components/content/aico-text-content/aico-text-content.js +2 -2
- package/dist/collection/components/content/aico-text-content/aico-text-content.js.map +1 -1
- package/dist/collection/utils/utils.js +8 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/aico-fetch-article-detail.js +12 -3
- package/dist/components/aico-fetch-article-detail.js.map +1 -1
- package/dist/components/aico-news-list-item2.js +5 -2
- package/dist/components/aico-news-list-item2.js.map +1 -1
- package/dist/components/aico-news-list.js +5 -5
- package/dist/components/aico-news-list.js.map +1 -1
- package/dist/components/aico-special-news-carousel.js +1 -1
- package/dist/components/aico-text-content2.js +1 -3
- package/dist/components/aico-text-content2.js.map +1 -1
- package/dist/components/utils.js +9 -1
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/aico-album-content_19.entry.js +3 -5
- package/dist/esm/aico-album-content_19.entry.js.map +1 -1
- package/dist/esm/aico-article-detail.entry.js +1 -1
- package/dist/esm/aico-asking-list-content.entry.js +1 -1
- package/dist/esm/aico-collection-content.entry.js +1 -1
- package/dist/esm/aico-components.js +3 -3
- package/dist/esm/aico-fetch-article-detail.entry.js +11 -3
- package/dist/esm/aico-fetch-article-detail.entry.js.map +1 -1
- package/dist/esm/aico-news-list-item.entry.js +6 -3
- package/dist/esm/aico-news-list-item.entry.js.map +1 -1
- package/dist/esm/aico-news-list.entry.js +6 -6
- package/dist/esm/aico-news-list.entry.js.map +1 -1
- package/dist/esm/aico-no-content_2.entry.js +1 -1
- package/dist/esm/aico-special-news-carousel.entry.js +2 -2
- package/dist/esm/{index-f9f11572.js → index-4621a8ba.js} +2 -6
- package/dist/esm/index-4621a8ba.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-2b7ec879.js → utils-54ffec33.js} +10 -2
- package/dist/esm/utils-54ffec33.js.map +1 -0
- package/dist/types/components/aico-fetch-article-detail/aico-fetch-article-detail.d.ts +14 -1
- package/dist/types/components/aico-news-list/aico-news-list.d.ts +1 -1
- package/dist/types/components/aico-news-list/aico-news-list.stories.d.ts +2 -1
- package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +1 -1
- package/dist/types/components.d.ts +20 -19
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/aico-components/p-2aae1a0e.js +0 -3
- package/dist/aico-components/p-31666f10.js +0 -2
- package/dist/aico-components/p-31666f10.js.map +0 -1
- package/dist/aico-components/p-54708dd0.entry.js +0 -2
- package/dist/aico-components/p-54708dd0.entry.js.map +0 -1
- package/dist/aico-components/p-7c05cd02.entry.js +0 -2
- package/dist/aico-components/p-7c05cd02.entry.js.map +0 -1
- package/dist/aico-components/p-83655dd4.entry.js +0 -2
- package/dist/aico-components/p-83655dd4.entry.js.map +0 -1
- package/dist/aico-components/p-a58972e9.entry.js.map +0 -1
- package/dist/aico-components/p-c99617a8.entry.js +0 -2
- package/dist/aico-components/p-c99617a8.entry.js.map +0 -1
- package/dist/cjs/bootstrap-slick-test.cjs.entry.js +0 -38
- package/dist/cjs/bootstrap-slick-test.cjs.entry.js.map +0 -1
- package/dist/cjs/index-75c0e002.js.map +0 -1
- package/dist/cjs/utils-406a9df3.js.map +0 -1
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.css +0 -6
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.js +0 -37
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.js.map +0 -1
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.stories.js +0 -6
- package/dist/collection/components/bootstrap-slick-test/bootstrap-slick-test.stories.js.map +0 -1
- package/dist/collection/components/content/content-styles.css +0 -113
- package/dist/components/bootstrap-slick-test.d.ts +0 -11
- package/dist/components/bootstrap-slick-test.js +0 -51
- package/dist/components/bootstrap-slick-test.js.map +0 -1
- package/dist/esm/bootstrap-slick-test.entry.js +0 -34
- package/dist/esm/bootstrap-slick-test.entry.js.map +0 -1
- package/dist/esm/index-f9f11572.js.map +0 -1
- package/dist/esm/utils-2b7ec879.js.map +0 -1
- package/dist/types/components/bootstrap-slick-test/bootstrap-slick-test.d.ts +0 -5
- package/dist/types/components/bootstrap-slick-test/bootstrap-slick-test.stories.d.ts +0 -5
- /package/dist/aico-components/{p-42b98baf.entry.js.map → p-4c0f3325.entry.js.map} +0 -0
- /package/dist/aico-components/{p-776352ba.entry.js.map → p-5109399b.entry.js.map} +0 -0
- /package/dist/aico-components/{p-b0325a83.entry.js.map → p-6464810e.entry.js.map} +0 -0
- /package/dist/aico-components/{p-b78d7799.entry.js.map → p-68930822.entry.js.map} +0 -0
- /package/dist/aico-components/{p-1a6625c0.entry.js.map → p-90c2d3dc.entry.js.map} +0 -0
package/dist/esm/loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-4621a8ba.js';
|
|
2
|
+
export { s as setNonce } from './index-4621a8ba.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy([["aico-fetch-article-detail",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"articleId":[1,"article-id"],"article":[32]}]]],["aico-news-list",[[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"newsResponse":[32],"pageNumber":[32]}]]],["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-special-news-carousel",[[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"numberOfArticles":[2,"number-of-articles"],"newsResponse":[32]}]]],["
|
|
6
|
+
return bootstrapLazy([["aico-fetch-article-detail",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}]]],["aico-news-list",[[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"newsResponse":[32],"pageNumber":[32]}]]],["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-special-news-carousel",[[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"numberOfArticles":[2,"number-of-articles"],"newsResponse":[32]}]]],["aico-no-content_2",[[2,"aico-title-content",{"content":[16]}],[2,"aico-no-content"]]],["aico-album-content_19",[[2,"aico-bullet-content",{"content":[16]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"]}],[2,"aico-content-card-content",{"content":[16]}],[2,"aico-heading-content",{"content":[16]}],[2,"aico-table-content",{"content":[16]}],[2,"aico-text-content",{"content":[16]}],[2,"aico-upload-content",{"content":[16]}],[2,"aico-video-content",{"content":[16]}],[2,"aico-html-content",{"content":[16]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16]}],[2,"aico-block-quote-content",{"content":[16]}],[2,"aico-divider-content",{"content":[16]}],[2,"aico-document-content",{"content":[16]}],[2,"aico-faq-content",{"content":[16]}],[2,"aico-link-content",{"content":[16]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16]}],[2,"aico-testimonial-content",{"content":[16]}]]],["aico-article-detail",[[2,"aico-article-detail",{"article":[16]}]]],["aico-news-list-item",[[2,"aico-news-list-item",{"article":[16]}]]]], options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -41,6 +41,14 @@ async function fetchNewsArticle(api, articleId, signal) {
|
|
|
41
41
|
const article = await response.json();
|
|
42
42
|
return article.data;
|
|
43
43
|
}
|
|
44
|
+
async function fetchNewsArticleByHandle(api, urlHandle, signal) {
|
|
45
|
+
const queryParams = new URLSearchParams();
|
|
46
|
+
queryParams.set('filter[urlHandle]', urlHandle);
|
|
47
|
+
const request = getAuthenticatedRequest(api, 'news', queryParams, signal);
|
|
48
|
+
const response = await fetch(request);
|
|
49
|
+
const articles = await response.json();
|
|
50
|
+
return articles.data[0];
|
|
51
|
+
}
|
|
44
52
|
function getImageWidthPrc(pictureSize) {
|
|
45
53
|
switch (pictureSize) {
|
|
46
54
|
case 'extra-small':
|
|
@@ -79,6 +87,6 @@ function getClass(conditions) {
|
|
|
79
87
|
return classes.join(' ');
|
|
80
88
|
}
|
|
81
89
|
|
|
82
|
-
export {
|
|
90
|
+
export { fetchNewsArticle as a, fetchNewsArticles as b, fetchSpecialNewsArticles as c, getClass as d, getYoutubeURL as e, fetchNewsArticleByHandle as f, getImageWidthPrc as g, strIsNullOrEmptyOrWhitespace as s };
|
|
83
91
|
|
|
84
|
-
//# sourceMappingURL=utils-
|
|
92
|
+
//# sourceMappingURL=utils-54ffec33.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"utils-54ffec33.js","mappings":"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","names":[],"sources":["src/model/AicoApiRequestInfo.ts","src/utils/utils.ts"],"sourcesContent":["export type AicoApiRequestInfo = {\n baseApi: string;\n bearerToken: string;\n};\n\nexport const getAuthenticatedHeaders = (bearerToken: string): Headers => {\n const headers = new Headers();\n headers.append('Accept', 'application/vnd.api+json');\n headers.append('Authorization', `Bearer ${bearerToken}`);\n return headers;\n};\n\nexport const getAuthenticatedRequest = (api: AicoApiRequestInfo, route: string, query: URLSearchParams, signal?: AbortSignal): Request => {\n return new Request(new URL(`${route}?${query.toString()}`, api.baseApi), {\n headers: getAuthenticatedHeaders(api.bearerToken),\n signal,\n });\n};\n","import { Article } from '../components';\nimport { AicoApiRequestInfo, getAuthenticatedHeaders, getAuthenticatedRequest } from '../model/AicoApiRequestInfo';\nimport { NewsResponse } from '../model/NewsResponse';\n\nexport async function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n queryParams.set('sort', '-publishDate');\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchSpecialNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[isSpecialArticle]', '1');\n queryParams.set('filter[isLightVersion]', 'true');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n queryParams.set('sort', '-publishDate');\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article> {\n const request = getAuthenticatedRequest(api, `news/${articleId}`, new URLSearchParams(), signal);\n const response = await fetch(request);\n const article = await response.json();\n return article.data;\n}\n\nexport async function fetchNewsArticleByHandle(api: AicoApiRequestInfo, urlHandle: string, signal: AbortSignal): Promise<Article> {\n const queryParams = new URLSearchParams();\n queryParams.set('filter[urlHandle]', urlHandle);\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n const articles = await response.json();\n return articles.data[0];\n}\n\nexport async function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article> {\n const request = new Request(new URL(url), {\n headers: getAuthenticatedHeaders(bearerToken),\n signal,\n });\n const response = await fetch(request);\n return await response.json();\n}\n\nexport function getImageWidthPrc(pictureSize?: string): string {\n switch (pictureSize) {\n case 'extra-small':\n return '28%';\n case 'small':\n return '40%';\n case 'large':\n return '80%';\n case 'extra large': // TODO: has - or not?\n return '100%';\n default:\n return '60%';\n }\n}\n\nexport function getYoutubeURL(url: string): string | null {\n const regExp = /.*(?:youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=)([^#&?]*).*/;\n const match = url.match(regExp);\n if (match && match[1].length == 11) {\n return `https://www.youtube.com/embed/${match[1]}`;\n }\n\n return null;\n}\n\nexport function strIsNullOrEmptyOrWhitespace(str?: string | null): boolean {\n if (!str || str === ' ') {\n return true;\n }\n\n return false;\n}\n\nexport function getClass(conditions: { [key: string]: boolean }): string {\n const classes: string[] = [];\n for (const kvp of Object.entries(conditions)) {\n if (kvp[1]) {\n classes.push(kvp[0]);\n }\n }\n\n return classes.join(' ');\n}\n"],"version":3}
|
|
@@ -3,7 +3,20 @@ export declare class AicoFetchArticleDetail {
|
|
|
3
3
|
article: Article;
|
|
4
4
|
aicoUrl: string;
|
|
5
5
|
aicoBearerToken: string;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* The id will be used to fetch the article.
|
|
8
|
+
*
|
|
9
|
+
* If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are
|
|
10
|
+
* provided, the latter will be used. If neither are provided, an error is thrown.
|
|
11
|
+
*/
|
|
12
|
+
articleId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The url handle will be used to fetch the article.
|
|
15
|
+
*
|
|
16
|
+
* If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are
|
|
17
|
+
* provided, the latter will be used. If neither are provided, an error is thrown.
|
|
18
|
+
*/
|
|
19
|
+
articleUrlHandle?: string;
|
|
7
20
|
private api?;
|
|
8
21
|
private articleFetchController?;
|
|
9
22
|
connectedCallback(): void;
|
|
@@ -9,7 +9,7 @@ export declare class AicoNewsList {
|
|
|
9
9
|
aicoBearerToken: string;
|
|
10
10
|
nextButtonText: string;
|
|
11
11
|
previousButtonText: string;
|
|
12
|
-
|
|
12
|
+
articleClick?: EventEmitter<Article>;
|
|
13
13
|
private api?;
|
|
14
14
|
private newsListFetchController?;
|
|
15
15
|
connectedCallback(): void;
|
|
@@ -2,6 +2,6 @@ import { EventEmitter } from '../../stencil-public-runtime';
|
|
|
2
2
|
import { Article } from '../../model/Article';
|
|
3
3
|
export declare class AicoNewsListItem {
|
|
4
4
|
article: Article;
|
|
5
|
-
|
|
5
|
+
articleClick?: EventEmitter<Article>;
|
|
6
6
|
render(): any;
|
|
7
7
|
}
|
|
@@ -88,7 +88,14 @@ export namespace Components {
|
|
|
88
88
|
interface AicoFetchArticleDetail {
|
|
89
89
|
"aicoBearerToken": string;
|
|
90
90
|
"aicoUrl": string;
|
|
91
|
-
|
|
91
|
+
/**
|
|
92
|
+
* The id will be used to fetch the article. If both the {@link AicoFetchArticleDetail#articleId } and {@link AicoFetchArticleDetail#articleUrlHandle } are provided, the latter will be used. If neither are provided, an error is thrown.
|
|
93
|
+
*/
|
|
94
|
+
"articleId"?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The url handle will be used to fetch the article. If both the {@link AicoFetchArticleDetail#articleId } and {@link AicoFetchArticleDetail#articleUrlHandle } are provided, the latter will be used. If neither are provided, an error is thrown.
|
|
97
|
+
*/
|
|
98
|
+
"articleUrlHandle"?: string;
|
|
92
99
|
}
|
|
93
100
|
interface AicoHeadingContent {
|
|
94
101
|
"content": HeadingContent;
|
|
@@ -139,8 +146,6 @@ export namespace Components {
|
|
|
139
146
|
interface AicoVideoContent {
|
|
140
147
|
"content": VideoContent;
|
|
141
148
|
}
|
|
142
|
-
interface BootstrapSlickTest {
|
|
143
|
-
}
|
|
144
149
|
}
|
|
145
150
|
export interface AicoNewsContentCustomEvent<T> extends CustomEvent<T> {
|
|
146
151
|
detail: T;
|
|
@@ -277,7 +282,7 @@ declare global {
|
|
|
277
282
|
new (): HTMLAicoNewsContentElement;
|
|
278
283
|
};
|
|
279
284
|
interface HTMLAicoNewsListElementEventMap {
|
|
280
|
-
"
|
|
285
|
+
"articleClick": Article;
|
|
281
286
|
}
|
|
282
287
|
interface HTMLAicoNewsListElement extends Components.AicoNewsList, HTMLStencilElement {
|
|
283
288
|
addEventListener<K extends keyof HTMLAicoNewsListElementEventMap>(type: K, listener: (this: HTMLAicoNewsListElement, ev: AicoNewsListCustomEvent<HTMLAicoNewsListElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -294,7 +299,7 @@ declare global {
|
|
|
294
299
|
new (): HTMLAicoNewsListElement;
|
|
295
300
|
};
|
|
296
301
|
interface HTMLAicoNewsListItemElementEventMap {
|
|
297
|
-
"
|
|
302
|
+
"articleClick": Article;
|
|
298
303
|
}
|
|
299
304
|
interface HTMLAicoNewsListItemElement extends Components.AicoNewsListItem, HTMLStencilElement {
|
|
300
305
|
addEventListener<K extends keyof HTMLAicoNewsListItemElementEventMap>(type: K, listener: (this: HTMLAicoNewsListItemElement, ev: AicoNewsListItemCustomEvent<HTMLAicoNewsListItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -386,12 +391,6 @@ declare global {
|
|
|
386
391
|
prototype: HTMLAicoVideoContentElement;
|
|
387
392
|
new (): HTMLAicoVideoContentElement;
|
|
388
393
|
};
|
|
389
|
-
interface HTMLBootstrapSlickTestElement extends Components.BootstrapSlickTest, HTMLStencilElement {
|
|
390
|
-
}
|
|
391
|
-
var HTMLBootstrapSlickTestElement: {
|
|
392
|
-
prototype: HTMLBootstrapSlickTestElement;
|
|
393
|
-
new (): HTMLBootstrapSlickTestElement;
|
|
394
|
-
};
|
|
395
394
|
interface HTMLElementTagNameMap {
|
|
396
395
|
"aico-album-content": HTMLAicoAlbumContentElement;
|
|
397
396
|
"aico-article-detail": HTMLAicoArticleDetailElement;
|
|
@@ -421,7 +420,6 @@ declare global {
|
|
|
421
420
|
"aico-title-content": HTMLAicoTitleContentElement;
|
|
422
421
|
"aico-upload-content": HTMLAicoUploadContentElement;
|
|
423
422
|
"aico-video-content": HTMLAicoVideoContentElement;
|
|
424
|
-
"bootstrap-slick-test": HTMLBootstrapSlickTestElement;
|
|
425
423
|
}
|
|
426
424
|
}
|
|
427
425
|
declare namespace LocalJSX {
|
|
@@ -463,7 +461,14 @@ declare namespace LocalJSX {
|
|
|
463
461
|
interface AicoFetchArticleDetail {
|
|
464
462
|
"aicoBearerToken": string;
|
|
465
463
|
"aicoUrl": string;
|
|
466
|
-
|
|
464
|
+
/**
|
|
465
|
+
* The id will be used to fetch the article. If both the {@link AicoFetchArticleDetail#articleId } and {@link AicoFetchArticleDetail#articleUrlHandle } are provided, the latter will be used. If neither are provided, an error is thrown.
|
|
466
|
+
*/
|
|
467
|
+
"articleId"?: string;
|
|
468
|
+
/**
|
|
469
|
+
* The url handle will be used to fetch the article. If both the {@link AicoFetchArticleDetail#articleId } and {@link AicoFetchArticleDetail#articleUrlHandle } are provided, the latter will be used. If neither are provided, an error is thrown.
|
|
470
|
+
*/
|
|
471
|
+
"articleUrlHandle"?: string;
|
|
467
472
|
}
|
|
468
473
|
interface AicoHeadingContent {
|
|
469
474
|
"content": HeadingContent;
|
|
@@ -482,12 +487,12 @@ declare namespace LocalJSX {
|
|
|
482
487
|
"aicoBearerToken": string;
|
|
483
488
|
"aicoUrl": string;
|
|
484
489
|
"nextButtonText"?: string;
|
|
485
|
-
"
|
|
490
|
+
"onArticleClick"?: (event: AicoNewsListCustomEvent<Article>) => void;
|
|
486
491
|
"previousButtonText"?: string;
|
|
487
492
|
}
|
|
488
493
|
interface AicoNewsListItem {
|
|
489
494
|
"article": Article;
|
|
490
|
-
"
|
|
495
|
+
"onArticleClick"?: (event: AicoNewsListItemCustomEvent<Article>) => void;
|
|
491
496
|
}
|
|
492
497
|
interface AicoNoContent {
|
|
493
498
|
}
|
|
@@ -519,8 +524,6 @@ declare namespace LocalJSX {
|
|
|
519
524
|
interface AicoVideoContent {
|
|
520
525
|
"content": VideoContent;
|
|
521
526
|
}
|
|
522
|
-
interface BootstrapSlickTest {
|
|
523
|
-
}
|
|
524
527
|
interface IntrinsicElements {
|
|
525
528
|
"aico-album-content": AicoAlbumContent;
|
|
526
529
|
"aico-article-detail": AicoArticleDetail;
|
|
@@ -550,7 +553,6 @@ declare namespace LocalJSX {
|
|
|
550
553
|
"aico-title-content": AicoTitleContent;
|
|
551
554
|
"aico-upload-content": AicoUploadContent;
|
|
552
555
|
"aico-video-content": AicoVideoContent;
|
|
553
|
-
"bootstrap-slick-test": BootstrapSlickTest;
|
|
554
556
|
}
|
|
555
557
|
}
|
|
556
558
|
export { LocalJSX as JSX };
|
|
@@ -585,7 +587,6 @@ declare module "@stencil/core" {
|
|
|
585
587
|
"aico-title-content": LocalJSX.AicoTitleContent & JSXBase.HTMLAttributes<HTMLAicoTitleContentElement>;
|
|
586
588
|
"aico-upload-content": LocalJSX.AicoUploadContent & JSXBase.HTMLAttributes<HTMLAicoUploadContentElement>;
|
|
587
589
|
"aico-video-content": LocalJSX.AicoVideoContent & JSXBase.HTMLAttributes<HTMLAicoVideoContentElement>;
|
|
588
|
-
"bootstrap-slick-test": LocalJSX.BootstrapSlickTest & JSXBase.HTMLAttributes<HTMLBootstrapSlickTestElement>;
|
|
589
590
|
}
|
|
590
591
|
}
|
|
591
592
|
}
|
|
@@ -4,6 +4,7 @@ import { NewsResponse } from '../model/NewsResponse';
|
|
|
4
4
|
export declare function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal): Promise<NewsResponse>;
|
|
5
5
|
export declare function fetchSpecialNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal): Promise<NewsResponse>;
|
|
6
6
|
export declare function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article>;
|
|
7
|
+
export declare function fetchNewsArticleByHandle(api: AicoApiRequestInfo, urlHandle: string, signal: AbortSignal): Promise<Article>;
|
|
7
8
|
export declare function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article>;
|
|
8
9
|
export declare function getImageWidthPrc(pictureSize?: string): string;
|
|
9
10
|
export declare function getYoutubeURL(url: string): string | null;
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const e="aico-components";const t={allRenderFn:true,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:false,cmpDidLoad:true,cmpDidRender:false,cmpDidUnload:false,cmpDidUpdate:false,cmpShouldUpdate:false,cmpWillLoad:true,cmpWillRender:false,cmpWillUpdate:true,connectedCallback:true,constructableCSS:true,cssAnnotations:true,devTools:false,disconnectedCallback:true,element:false,event:true,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:false,hostListenerTarget:false,hostListenerTargetBody:false,hostListenerTargetDocument:false,hostListenerTargetParent:false,hostListenerTargetWindow:false,hotModuleReplacement:false,hydrateClientSide:false,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:false,mode:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:false,propNumber:true,propString:true,reflect:false,scoped:true,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:false,shadowDom:false,slot:true,slotChildNodesFix:false,slotRelocation:true,state:true,style:true,svg:true,taskQueue:true,transformTagName:false,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:false,vdomListener:true,vdomPropOrAttr:true,vdomRef:false,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:false,watchCallback:false};let n;let s;let l;let o=false;let i=false;let c=false;let f=false;let r=false;const a=e=>{const t=new URL(e,Pe.t);return t.origin!==Ae.location.origin?t.href:t.pathname};const u=(e,t="")=>{{return()=>{}}};const d=(e,t)=>{{return()=>{}}};const p="{visibility:hidden}.hydrated{visibility:inherit}";const v="slot-fb{display:contents}slot-fb[hidden]{display:none}";const m={};const h="http://www.w3.org/2000/svg";const y="http://www.w3.org/1999/xhtml";const b=e=>e!=null;const g=e=>{e=typeof e;return e==="object"||e==="function"};function $(e){var t,n,s;return(s=(n=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const w=(e,t,...n)=>{let s=null;let l=null;let o=false;let i=false;const c=[];const f=t=>{for(let n=0;n<t.length;n++){s=t[n];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(o=typeof e!=="function"&&!g(s)){s=String(s)}if(o&&i){c[c.length-1].l+=s}else{c.push(o?S(null,s):s)}i=o}}};f(n);if(t){if(t.name){l=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,c,L)}const r=S(e,null);r.o=t;if(c.length>0){r.i=c}{r.u=l}return r};const S=(e,t)=>{const n={p:0,v:e,l:t,m:null,i:null};{n.o=null}{n.u=null}return n};const k={};const C=e=>e&&e.v===k;const L={forEach:(e,t)=>e.map(T).forEach(t),map:(e,t)=>e.map(T).map(t).map(j)};const T=e=>({vattrs:e.o,vchildren:e.i,vkey:e.h,vname:e.u,vtag:e.v,vtext:e.l});const j=e=>{if(typeof e.vtag==="function"){const t=Object.assign({},e.vattrs);if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return w(e.vtag,t,...e.vchildren||[])}const t=S(e.vtag,e.vtext);t.o=e.vattrs;t.i=e.vchildren;t.h=e.vkey;t.u=e.vname;return t};const x=(e,t)=>{if(e!=null&&!g(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};const O=e=>je(e).$hostElement$;const R=(e,t,n)=>{const s=O(e);return{emit:e=>D(s,t,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:e})}};const D=(e,t,n)=>{const s=Pe.ce(t,n);e.dispatchEvent(s);return s};const F=new WeakMap;const M=(e,t,n)=>{let s=Ue.get(e);if(Ee&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=t}else{s.replaceSync(t)}}else{s=t}Ue.set(e,s)};const U=(e,t,n)=>{var s;const l=N(t);const o=Ue.get(l);e=e.nodeType===11?e:Ne;if(o){if(typeof o==="string"){e=e.head||e;let n=F.get(e);let i;if(!n){F.set(e,n=new Set)}if(!n.has(l)){{i=Ne.createElement("style");i.innerHTML=o;const t=(s=Pe.$)!==null&&s!==void 0?s:$(Ne);if(t!=null){i.setAttribute("nonce",t)}e.insertBefore(i,e.querySelector("link"))}if(t.p&4){i.innerHTML+=v}if(n){n.add(l)}}}else if(!e.adoptedStyleSheets.includes(o)){e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]}}return l};const A=e=>{const t=e.S;const n=e.$hostElement$;const s=t.p;const l=u("attachStyles",t.k);const o=U(n.getRootNode(),t);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h");if(s&2){n.classList.add(o+"-s")}}l()};const N=(e,t)=>"sc-"+e.k;const P=(e,t,n,s,l,o)=>{if(n!==s){let i=Re(e,t);let c=t.toLowerCase();if(t==="class"){const t=e.classList;const l=E(n);const o=E(s);t.remove(...l.filter((e=>e&&!o.includes(e))));t.add(...o.filter((e=>e&&!l.includes(e))))}else if(t==="style"){{for(const t in n){if(!s||s[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in s){if(!n||s[t]!==n[t]){if(t.includes("-")){e.style.setProperty(t,s[t])}else{e.style[t]=s[t]}}}}else if(!i&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(Re(Ae,c)){t=c.slice(2)}else{t=c[2]+t.slice(3)}if(n||s){const l=t.endsWith(z);t=t.replace(B,"");if(n){Pe.rel(e,t,n,l)}if(s){Pe.ael(e,t,s,l)}}}else{const c=g(s);if((i||c&&s!==null)&&!l){try{if(!e.tagName.includes("-")){const l=s==null?"":s;if(t==="list"){i=false}else if(n==null||e[t]!=l){e[t]=l}}else{e[t]=s}}catch(e){}}if(s==null||s===false){if(s!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!i||o&4||l)&&!c){s=s===true?"":s;{e.setAttribute(t,s)}}}}};const W=/\s/;const E=e=>!e?[]:e.split(W);const z="Capture";const B=new RegExp(z+"$");const H=(e,t,n,s)=>{const l=t.m.nodeType===11&&t.m.host?t.m.host:t.m;const o=e&&e.o||m;const i=t.o||m;{for(s in o){if(!(s in i)){P(l,s,o[s],undefined,n,t.p)}}}for(s in i){P(l,s,o[s],i[s],n,t.p)}};const Q=(e,t,i,r)=>{var a;const u=t.i[i];let d=0;let p;let v;let m;if(!o){c=true;if(u.v==="slot"){if(n){r.classList.add(n+"-s")}u.p|=u.i?2:1}}if(u.l!==null){p=u.m=Ne.createTextNode(u.l)}else if(u.p&1){p=u.m=Ne.createTextNode("")}else{if(!f){f=u.v==="svg"}p=u.m=Ne.createElementNS(f?h:y,u.p&2?"slot-fb":u.v);if(f&&u.v==="foreignObject"){f=false}{H(null,u,f)}if(b(n)&&p["s-si"]!==n){p.classList.add(p["s-si"]=n)}if(u.i){for(d=0;d<u.i.length;++d){v=Q(e,u,d,p);if(v){p.appendChild(v)}}}{if(u.v==="svg"){f=false}else if(p.tagName==="foreignObject"){f=true}}}p["s-hn"]=l;{if(u.p&(2|1)){p["s-sr"]=true;p["s-fs"]=(a=u.o)===null||a===void 0?void 0:a.slot;p["s-cr"]=s;p["s-sn"]=u.u||"";m=e&&e.i&&e.i[i];if(m&&m.v===u.v&&e.m){{q(e.m,false)}}}}return p};const q=(e,t)=>{var n;Pe.p|=1;const s=e.childNodes;for(let e=s.length-1;e>=0;e--){const o=s[e];if(o["s-hn"]!==l&&o["s-ol"]){G(o).insertBefore(o,_(o));o["s-ol"].remove();o["s-ol"]=undefined;o["s-sh"]=undefined;if(o.nodeType===1){o.setAttribute("slot",(n=o["s-sn"])!==null&&n!==void 0?n:"")}c=true}if(t){q(o,t)}}Pe.p&=~1};const I=(e,t,n,s,l,o)=>{let i=e["s-cr"]&&e["s-cr"].parentNode||e;let c;for(;l<=o;++l){if(s[l]){c=Q(null,n,l,e);if(c){s[l].m=c;i.insertBefore(c,_(t))}}}};const K=(e,t,n)=>{for(let s=t;s<=n;++s){const t=e[s];if(t){const e=t.m;if(e){{i=true;if(e["s-ol"]){e["s-ol"].remove()}else{q(e,true)}}e.remove()}}}};const V=(e,t,n,s,l=false)=>{let o=0;let i=0;let c=t.length-1;let f=t[0];let r=t[c];let a=s.length-1;let u=s[0];let d=s[a];let p;while(o<=c&&i<=a){if(f==null){f=t[++o]}else if(r==null){r=t[--c]}else if(u==null){u=s[++i]}else if(d==null){d=s[--a]}else if(X(f,u,l)){J(f,u,l);f=t[++o];u=s[++i]}else if(X(r,d,l)){J(r,d,l);r=t[--c];d=s[--a]}else if(X(f,d,l)){if(f.v==="slot"||d.v==="slot"){q(f.m.parentNode,false)}J(f,d,l);e.insertBefore(f.m,r.m.nextSibling);f=t[++o];d=s[--a]}else if(X(r,u,l)){if(f.v==="slot"||d.v==="slot"){q(r.m.parentNode,false)}J(r,u,l);e.insertBefore(r.m,f.m);r=t[--c];u=s[++i]}else{{p=Q(t&&t[i],n,i,e);u=s[++i]}if(p){{G(f.m).insertBefore(p,_(f.m))}}}}if(o>c){I(e,s[a+1]==null?null:s[a+1].m,n,s,i,a)}else if(i>a){K(t,o,c)}};const X=(e,t,n=false)=>{if(e.v===t.v){if(e.v==="slot"){return e.u===t.u}return true}return false};const _=e=>e&&e["s-ol"]||e;const G=e=>(e["s-ol"]?e["s-ol"]:e).parentNode;const J=(e,t,n=false)=>{const s=t.m=e.m;const l=e.i;const o=t.i;const i=t.v;const c=t.l;let r;if(c===null){{f=i==="svg"?true:i==="foreignObject"?false:f}{if(i==="slot");else{H(e,t,f)}}if(l!==null&&o!==null){V(s,l,t,o,n)}else if(o!==null){if(e.l!==null){s.textContent=""}I(s,null,t,o,0,o.length-1)}else if(l!==null){K(l,0,l.length-1)}if(f&&i==="svg"){f=false}}else if(r=s["s-cr"]){r.parentNode.textContent=c}else if(e.l!==c){s.data=c}};const Y=e=>{const t=e.childNodes;for(const e of t){if(e.nodeType===1){if(e["s-sr"]){const n=e["s-sn"];e.hidden=false;for(const s of t){if(s!==e){if(s["s-hn"]!==e["s-hn"]||n!==""){if(s.nodeType===1&&(n===s.getAttribute("slot")||n===s["s-sn"])){e.hidden=true;break}}else{if(s.nodeType===1||s.nodeType===3&&s.textContent.trim()!==""){e.hidden=true;break}}}}}Y(e)}}};const Z=[];const ee=e=>{let n;let s;let l;for(const o of e.childNodes){if(o["s-sr"]&&(n=o["s-cr"])&&n.parentNode){s=n.parentNode.childNodes;const e=o["s-sn"];for(l=s.length-1;l>=0;l--){n=s[l];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==o["s-hn"]&&!t.experimentalSlotFixes){if(te(n,e)){let t=Z.find((e=>e.C===n));i=true;n["s-sn"]=n["s-sn"]||e;if(t){t.C["s-sh"]=o["s-hn"];t.L=o}else{n["s-sh"]=o["s-hn"];Z.push({L:o,C:n})}if(n["s-sr"]){Z.map((e=>{if(te(e.C,n["s-sn"])){t=Z.find((e=>e.C===n));if(t&&!e.L){e.L=t.L}}}))}}else if(!Z.some((e=>e.C===n))){Z.push({C:n})}}}}if(o.nodeType===1){ee(o)}}};const te=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};const ne=(e,t,f=false)=>{var r,a,u,d;const p=e.$hostElement$;const v=e.S;const m=e.T||S(null,null);const h=C(t)?t:w(null,null,t);l=p.tagName;if(f&&h.o){for(const e of Object.keys(h.o)){if(p.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){h.o[e]=p[e]}}}h.v=null;h.p|=4;e.T=h;h.m=m.m=p;{n=p["s-sc"]}{s=p["s-cr"];o=(v.p&1)!==0;i=false}J(m,h,f);{Pe.p|=1;if(c){ee(h.m);for(const e of Z){const t=e.C;if(!t["s-ol"]){const e=Ne.createTextNode("");e["s-nr"]=t;t.parentNode.insertBefore(t["s-ol"]=e,t)}}for(const e of Z){const t=e.C;const n=e.L;if(n){const e=n.parentNode;let s=n.nextSibling;{let n=(r=t["s-ol"])===null||r===void 0?void 0:r.previousSibling;while(n){let l=(a=n["s-nr"])!==null&&a!==void 0?a:null;if(l&&l["s-sn"]===t["s-sn"]&&e===l.parentNode){l=l.nextSibling;if(!l||!l["s-nr"]){s=l;break}}n=n.previousSibling}}if(!s&&e!==t.parentNode||t.nextSibling!==s){if(t!==s){if(!t["s-hn"]&&t["s-ol"]){t["s-hn"]=t["s-ol"].parentNode.nodeName}e.insertBefore(t,s);if(t.nodeType===1){t.hidden=(u=t["s-ih"])!==null&&u!==void 0?u:false}}}}else{if(t.nodeType===1){if(f){t["s-ih"]=(d=t.hidden)!==null&&d!==void 0?d:false}t.hidden=true}}}}if(i){Y(h.m)}Pe.p&=~1;Z.length=0}};const se=(e,t)=>{if(t&&!e.j&&t["s-p"]){t["s-p"].push(new Promise((t=>e.j=t)))}};const le=(e,t)=>{{e.p|=16}if(e.p&4){e.p|=512;return}se(e,e.O);const n=()=>oe(e,t);return Ke(n)};const oe=(e,t)=>{const n=u("scheduleUpdate",e.S.k);const s=e.R;let l;if(t){{l=de(s,"componentWillLoad")}}else{{l=de(s,"componentWillUpdate")}}n();return ie(l,(()=>fe(e,s,t)))};const ie=(e,t)=>ce(e)?e.then(t):t();const ce=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";const fe=async(e,t,n)=>{var s;const l=e.$hostElement$;const o=u("update",e.S.k);const i=l["s-rc"];if(n){A(e)}const c=u("render",e.S.k);{re(e,t,l,n)}if(i){i.map((e=>e()));l["s-rc"]=undefined}c();o();{const t=(s=l["s-p"])!==null&&s!==void 0?s:[];const n=()=>ae(e);if(t.length===0){n()}else{Promise.all(t).then(n);e.p|=4;t.length=0}}};const re=(e,t,n,s)=>{try{t=t.render();{e.p&=~16}{e.p|=2}{{{ne(e,t,s)}}}}catch(t){De(t,e.$hostElement$)}return null};const ae=e=>{const t=e.S.k;const n=e.$hostElement$;const s=u("postUpdate",t);const l=e.R;const o=e.O;if(!(e.p&64)){e.p|=64;{pe(n)}{de(l,"componentDidLoad")}s();{e.D(n);if(!o){ue()}}}else{s()}{if(e.j){e.j();e.j=undefined}if(e.p&512){Ie((()=>le(e,false)))}e.p&=~(4|512)}};const ue=t=>{{pe(Ne.documentElement)}Ie((()=>D(Ae,"appload",{detail:{namespace:e}})))};const de=(e,t,n)=>{if(e&&e[t]){try{return e[t](n)}catch(e){De(e)}}return undefined};const pe=e=>e.classList.add("hydrated");const ve=(e,t)=>je(e).F.get(t);const me=(e,t,n,s)=>{const l=je(e);const o=l.F.get(t);const i=l.p;const c=l.R;n=x(n,s.M[t][0]);const f=Number.isNaN(o)&&Number.isNaN(n);const r=n!==o&&!f;if((!(i&8)||o===undefined)&&r){l.F.set(t,n);if(c){if((i&(2|16))===2){le(l,false)}}}};const he=(e,t,n)=>{var s;const l=e.prototype;if(t.M){const o=Object.entries(t.M);o.map((([e,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,e,{get(){return ve(this,e)},set(n){me(this,e,n,t)},configurable:true,enumerable:true})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(e,s,o){Pe.jmp((()=>{var i;const c=n.get(e);if(this.hasOwnProperty(c)){o=this[c];delete this[c]}else if(l.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==o){return}else if(c==null){const n=je(this);const l=n===null||n===void 0?void 0:n.p;if(l&&!(l&8)&&l&128&&o!==s){const l=n.R;const c=(i=t.U)===null||i===void 0?void 0:i[e];c===null||c===void 0?void 0:c.forEach((t=>{if(l[t]!=null){l[t].call(l,o,s,e)}}))}return}this[c]=o===null&&typeof this[c]==="boolean"?false:o}))};e.observedAttributes=Array.from(new Set([...Object.keys((s=t.U)!==null&&s!==void 0?s:{}),...o.filter((([e,t])=>t[0]&15)).map((([e,t])=>{const s=t[1]||e;n.set(s,e);return s}))]))}}return e};const ye=async(e,t,n,s)=>{let l;if((t.p&32)===0){t.p|=32;{l=Me(n);if(l.then){const e=d();l=await l;e()}if(!l.isProxied){he(l,n,2);l.isProxied=true}const e=u("createInstance",n.k);{t.p|=8}try{new l(t)}catch(e){De(e)}{t.p&=~8}e();be(t.R)}if(l.style){let e=l.style;const t=N(n);if(!Ue.has(t)){const s=u("registerStyles",n.k);M(t,e,!!(n.p&1));s()}}}const o=t.O;const i=()=>le(t,true);if(o&&o["s-rc"]){o["s-rc"].push(i)}else{i()}};const be=e=>{{de(e,"connectedCallback")}};const ge=e=>{if((Pe.p&1)===0){const t=je(e);const n=t.S;const s=u("connectedCallback",n.k);if(!(t.p&1)){t.p|=1;{if(n.p&(4|8)){$e(e)}}{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){se(t,t.O=n);break}}}if(n.M){Object.entries(n.M).map((([t,[n]])=>{if(n&31&&e.hasOwnProperty(t)){const n=e[t];delete e[t];e[t]=n}}))}{ye(e,t,n)}}else{if(t===null||t===void 0?void 0:t.R){be(t.R)}else if(t===null||t===void 0?void 0:t.A){t.A.then((()=>be(t.R)))}}s()}};const $e=e=>{const t=e["s-cr"]=Ne.createComment("");t["s-cn"]=true;e.insertBefore(t,e.firstChild)};const we=e=>{{de(e,"disconnectedCallback")}};const Se=async e=>{if((Pe.p&1)===0){const t=je(e);if(t===null||t===void 0?void 0:t.R){we(t.R)}else if(t===null||t===void 0?void 0:t.A){t.A.then((()=>we(t.R)))}}};const ke=(e,t={})=>{var n;const s=u();const l=[];const o=t.exclude||[];const i=Ae.customElements;const c=Ne.head;const f=c.querySelector("meta[charset]");const r=Ne.createElement("style");const a=[];let d;let m=true;Object.assign(Pe,t);Pe.t=new URL(t.resourcesUrl||"./",Ne.baseURI).href;let h=false;e.map((e=>{e[1].map((t=>{const n={p:t[0],k:t[1],M:t[2],N:t[3]};if(n.p&4){h=true}{n.M=t[2]}const s=n.k;const c=class extends HTMLElement{constructor(e){super(e);e=this;Oe(e,n)}connectedCallback(){if(d){clearTimeout(d);d=null}if(m){a.push(this)}else{Pe.jmp((()=>ge(this)))}}disconnectedCallback(){Pe.jmp((()=>Se(this)))}componentOnReady(){return je(this).A}};n.P=e[0];if(!o.includes(s)&&!i.get(s)){l.push(s);i.define(s,he(c,n,1))}}))}));if(h){r.innerHTML+=v}{r.innerHTML+=l+p}if(r.innerHTML.length){r.setAttribute("data-styles","");const e=(n=Pe.$)!==null&&n!==void 0?n:$(Ne);if(e!=null){r.setAttribute("nonce",e)}c.insertBefore(r,f?f.nextSibling:c.firstChild)}m=false;if(a.length){a.map((e=>e.connectedCallback()))}else{{Pe.jmp((()=>d=setTimeout(ue,30)))}}s()};const Ce=(e,t)=>t;const Le=e=>Pe.$=e;const Te=new WeakMap;const je=e=>Te.get(e);const xe=(e,t)=>Te.set(t.R=e,t);const Oe=(e,t)=>{const n={p:0,$hostElement$:e,S:t,F:new Map};{n.A=new Promise((e=>n.D=e));e["s-p"]=[];e["s-rc"]=[]}return Te.set(e,n)};const Re=(e,t)=>t in e;const De=(e,t)=>(0,console.error)(e,t);const Fe=new Map;const Me=(e,t,n)=>{const s=e.k.replace(/-/g,"_");const l=e.P;const o=Fe.get(l);if(o){return o[s]}
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((e=>{{Fe.set(l,e)}return e[s]}),De)};const Ue=new Map;const Ae=typeof window!=="undefined"?window:{};const Ne=Ae.document||{head:{}};const Pe={p:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,s)=>e.addEventListener(t,n,s),rel:(e,t,n,s)=>e.removeEventListener(t,n,s),ce:(e,t)=>new CustomEvent(e,t)};const We=e=>Promise.resolve(e);const Ee=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();const ze=[];const Be=[];const He=(e,t)=>n=>{e.push(n);if(!r){r=true;if(t&&Pe.p&4){Ie(qe)}else{Pe.raf(qe)}}};const Qe=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){De(e)}}e.length=0};const qe=()=>{Qe(ze);{Qe(Be);if(r=ze.length>0){Pe.raf(qe)}}};const Ie=e=>We().then(e);const Ke=He(Be,true);export{Ce as F,k as H,ke as b,R as c,a as g,w as h,We as p,xe as r,Le as s};
|
|
3
|
-
//# sourceMappingURL=p-2aae1a0e.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=e=>{const t=new Headers;t.append("Accept","application/vnd.api+json");t.append("Authorization",`Bearer ${e}`);return t};const t=(t,n,r,a)=>new Request(new URL(`${n}?${r.toString()}`,t.baseApi),{headers:e(t.bearerToken),signal:a});async function n(e,n,r,a){const s=new URLSearchParams;s.set("page[number]",String(n));s.set("page[size]",String(r));s.set("filter[isActive]","1");s.set("filter[excludeTag][]","Eisnull");s.set("sort","-publishDate");const c=t(e,"news",s,a);const i=await fetch(c);return await i.json()}async function r(e,n,r,a){const s=new URLSearchParams;s.set("page[number]",String(n));s.set("page[size]",String(r));s.set("filter[isActive]","1");s.set("filter[isSpecialArticle]","1");s.set("filter[isLightVersion]","true");s.set("filter[excludeTag][]","Eisnull");s.set("sort","-publishDate");const c=t(e,"news",s,a);const i=await fetch(c);return await i.json()}async function a(e,n,r){const a=t(e,`news/${n}`,new URLSearchParams,r);const s=await fetch(a);const c=await s.json();return c.data}function s(e){switch(e){case"extra-small":return"28%";case"small":return"40%";case"large":return"80%";case"extra large":return"100%";default:return"60%"}}function c(e){const t=/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#&?]*).*/;const n=e.match(t);if(n&&n[1].length==11){return`https://www.youtube.com/embed/${n[1]}`}return null}function i(e){if(!e||e===" "){return true}return false}function u(e){const t=[];for(const n of Object.entries(e)){if(n[1]){t.push(n[0])}}return t.join(" ")}export{n as a,r as b,u as c,c as d,a as f,s as g,i as s};
|
|
2
|
-
//# sourceMappingURL=p-31666f10.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getAuthenticatedHeaders","bearerToken","headers","Headers","append","getAuthenticatedRequest","api","route","query","signal","Request","URL","toString","baseApi","async","fetchNewsArticles","page","size","queryParams","URLSearchParams","set","String","request","response","fetch","json","fetchSpecialNewsArticles","fetchNewsArticle","articleId","article","data","getImageWidthPrc","pictureSize","getYoutubeURL","url","regExp","match","length","strIsNullOrEmptyOrWhitespace","str","getClass","conditions","classes","kvp","Object","entries","push","join"],"sources":["src/model/AicoApiRequestInfo.ts","src/utils/utils.ts"],"sourcesContent":["export type AicoApiRequestInfo = {\n baseApi: string;\n bearerToken: string;\n};\n\nexport const getAuthenticatedHeaders = (bearerToken: string): Headers => {\n const headers = new Headers();\n headers.append('Accept', 'application/vnd.api+json');\n headers.append('Authorization', `Bearer ${bearerToken}`);\n return headers;\n};\n\nexport const getAuthenticatedRequest = (api: AicoApiRequestInfo, route: string, query: URLSearchParams, signal?: AbortSignal): Request => {\n return new Request(new URL(`${route}?${query.toString()}`, api.baseApi), {\n headers: getAuthenticatedHeaders(api.bearerToken),\n signal,\n });\n};\n","import { Article } from '../components';\nimport { AicoApiRequestInfo, getAuthenticatedHeaders, getAuthenticatedRequest } from '../model/AicoApiRequestInfo';\nimport { NewsResponse } from '../model/NewsResponse';\n\nexport async function fetchNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n queryParams.set('sort', '-publishDate');\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchSpecialNewsArticles(api: AicoApiRequestInfo, page: number, size: number, signal: AbortSignal): Promise<NewsResponse> {\n const queryParams = new URLSearchParams();\n queryParams.set('page[number]', String(page));\n queryParams.set('page[size]', String(size));\n queryParams.set('filter[isActive]', '1');\n queryParams.set('filter[isSpecialArticle]', '1');\n queryParams.set('filter[isLightVersion]', 'true');\n queryParams.set('filter[excludeTag][]', 'Eisnull');\n queryParams.set('sort', '-publishDate');\n\n const request = getAuthenticatedRequest(api, 'news', queryParams, signal);\n const response = await fetch(request);\n return await response.json();\n}\n\nexport async function fetchNewsArticle(api: AicoApiRequestInfo, articleId: string, signal: AbortSignal): Promise<Article> {\n const request = getAuthenticatedRequest(api, `news/${articleId}`, new URLSearchParams(), signal);\n const response = await fetch(request);\n const article = await response.json();\n return article.data;\n}\n\nexport async function fetchArticle(url: string, bearerToken: string, signal: AbortSignal): Promise<Article> {\n const request = new Request(new URL(url), {\n headers: getAuthenticatedHeaders(bearerToken),\n signal,\n });\n const response = await fetch(request);\n return await response.json();\n}\n\nexport function getImageWidthPrc(pictureSize?: string): string {\n switch (pictureSize) {\n case 'extra-small':\n return '28%';\n case 'small':\n return '40%';\n case 'large':\n return '80%';\n case 'extra large': // TODO: has - or not?\n return '100%';\n default:\n return '60%';\n }\n}\n\nexport function getYoutubeURL(url: string): string | null {\n const regExp = /.*(?:youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=)([^#&?]*).*/;\n const match = url.match(regExp);\n if (match && match[1].length == 11) {\n return `https://www.youtube.com/embed/${match[1]}`;\n }\n\n return null;\n}\n\nexport function strIsNullOrEmptyOrWhitespace(str?: string | null): boolean {\n if (!str || str === ' ') {\n return true;\n }\n\n return false;\n}\n\nexport function getClass(conditions: { [key: string]: boolean }): string {\n const classes: string[] = [];\n for (const kvp of Object.entries(conditions)) {\n if (kvp[1]) {\n classes.push(kvp[0]);\n }\n }\n\n return classes.join(' ');\n}\n"],"mappings":"AAKO,MAAMA,EAA2BC,IACtC,MAAMC,EAAU,IAAIC,QACpBD,EAAQE,OAAO,SAAU,4BACzBF,EAAQE,OAAO,gBAAiB,UAAUH,KAC1C,OAAOC,CAAO,EAGT,MAAMG,EAA0B,CAACC,EAAyBC,EAAeC,EAAwBC,IAC/F,IAAIC,QAAQ,IAAIC,IAAI,GAAGJ,KAASC,EAAMI,aAAcN,EAAIO,SAAU,CACvEX,QAASF,EAAwBM,EAAIL,aACrCQ,WCXGK,eAAeC,EAAkBT,EAAyBU,EAAcC,EAAcR,GAC3F,MAAMS,EAAc,IAAIC,gBACxBD,EAAYE,IAAI,eAAgBC,OAAOL,IACvCE,EAAYE,IAAI,aAAcC,OAAOJ,IACrCC,EAAYE,IAAI,mBAAoB,KACpCF,EAAYE,IAAI,uBAAwB,WACxCF,EAAYE,IAAI,OAAQ,gBAExB,MAAME,EAAUjB,EAAwBC,EAAK,OAAQY,EAAaT,GAClE,MAAMc,QAAiBC,MAAMF,GAC7B,aAAaC,EAASE,MACxB,CAEOX,eAAeY,EAAyBpB,EAAyBU,EAAcC,EAAcR,GAClG,MAAMS,EAAc,IAAIC,gBACxBD,EAAYE,IAAI,eAAgBC,OAAOL,IACvCE,EAAYE,IAAI,aAAcC,OAAOJ,IACrCC,EAAYE,IAAI,mBAAoB,KACpCF,EAAYE,IAAI,2BAA4B,KAC5CF,EAAYE,IAAI,yBAA0B,QAC1CF,EAAYE,IAAI,uBAAwB,WACxCF,EAAYE,IAAI,OAAQ,gBAExB,MAAME,EAAUjB,EAAwBC,EAAK,OAAQY,EAAaT,GAClE,MAAMc,QAAiBC,MAAMF,GAC7B,aAAaC,EAASE,MACxB,CAEOX,eAAea,EAAiBrB,EAAyBsB,EAAmBnB,GACjF,MAAMa,EAAUjB,EAAwBC,EAAK,QAAQsB,IAAa,IAAIT,gBAAmBV,GACzF,MAAMc,QAAiBC,MAAMF,GAC7B,MAAMO,QAAgBN,EAASE,OAC/B,OAAOI,EAAQC,IACjB,C,SAWgBC,EAAiBC,GAC/B,OAAQA,GACN,IAAK,cACH,MAAO,MACT,IAAK,QACH,MAAO,MACT,IAAK,QACH,MAAO,MACT,IAAK,cACH,MAAO,OACT,QACE,MAAO,MAEb,C,SAEgBC,EAAcC,GAC5B,MAAMC,EAAS,4DACf,MAAMC,EAAQF,EAAIE,MAAMD,GACxB,GAAIC,GAASA,EAAM,GAAGC,QAAU,GAAI,CAClC,MAAO,iCAAiCD,EAAM,I,CAGhD,OAAO,IACT,C,SAEgBE,EAA6BC,GAC3C,IAAKA,GAAOA,IAAQ,IAAK,CACvB,OAAO,I,CAGT,OAAO,KACT,C,SAEgBC,EAASC,GACvB,MAAMC,EAAoB,GAC1B,IAAK,MAAMC,KAAOC,OAAOC,QAAQJ,GAAa,CAC5C,GAAIE,EAAI,GAAI,CACVD,EAAQI,KAAKH,EAAI,G,EAIrB,OAAOD,EAAQK,KAAK,IACtB,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,c as t,h as i}from"./p-2aae1a0e.js";const a="";const c=class{constructor(i){s(this,i);this.articleClicked=t(this,"articleClicked",7);this.article=undefined}render(){var s,t;return i("div",{class:"card h-100"},i("div",{class:"ratio ratio-4x3 mb-3"},i("img",{class:"card-img-top w-100 object-fit-cover",style:{"min-height":"15rem"},alt:"Article image",src:(t=(s=this.article.attributes.optimizedListImage)!==null&&s!==void 0?s:this.article.attributes.optimizedImage)!==null&&t!==void 0?t:this.article.attributes.image})),i("div",{class:"card-img-overlay d-flex justify-content-end"}),i("div",{class:"card-body"},i("h5",{class:"card-title"},this.article.attributes.name),i("p",{class:"card-text"},this.article.attributes.excerpt)))}};c.style=a;export{c as aico_news_list_item};
|
|
2
|
-
//# sourceMappingURL=p-54708dd0.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["aicoNewsListItemCss","AicoNewsListItem","render","h","class","style","alt","src","_b","_a","this","article","attributes","optimizedListImage","optimizedImage","image","name","excerpt"],"sources":["src/components/aico-news-list-item/aico-news-list-item.css?tag=aico-news-list-item&encapsulation=scoped","src/components/aico-news-list-item/aico-news-list-item.tsx"],"sourcesContent":[null,"import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\nimport { Article } from '../../model/Article';\n\n@Component({\n tag: 'aico-news-list-item',\n styleUrl: 'aico-news-list-item.css',\n scoped: true,\n})\nexport class AicoNewsListItem {\n @Prop() article!: Article;\n\n @Event() articleClicked?: EventEmitter<Article>;\n\n render() {\n return (\n <div class=\"card h-100\">\n <div class=\"ratio ratio-4x3 mb-3\">\n <img\n class=\"card-img-top w-100 object-fit-cover\"\n style={{ 'min-height': '15rem' }}\n alt=\"Article image\"\n src={this.article.attributes.optimizedListImage ?? this.article.attributes.optimizedImage ?? this.article.attributes.image}\n />\n </div>\n <div class=\"card-img-overlay d-flex justify-content-end\">{/*TODO: set the date top-right?*/}</div>\n <div class=\"card-body\">\n <h5 class=\"card-title\">{this.article.attributes.name}</h5>\n <p class=\"card-text\">{this.article.attributes.excerpt}</p>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAsB,G,MCQfC,EAAgB,M,+FAK3B,MAAAC,G,QACE,OACEC,EAAA,OAAKC,MAAM,cACTD,EAAA,OAAKC,MAAM,wBACTD,EAAA,OACEC,MAAM,sCACNC,MAAO,CAAE,aAAc,SACvBC,IAAI,gBACJC,KAAKC,GAAAC,EAAAC,KAAKC,QAAQC,WAAWC,sBAAkB,MAAAJ,SAAA,EAAAA,EAAIC,KAAKC,QAAQC,WAAWE,kBAAc,MAAAN,SAAA,EAAAA,EAAIE,KAAKC,QAAQC,WAAWG,SAGzHZ,EAAA,OAAKC,MAAM,gDACXD,EAAA,OAAKC,MAAM,aACTD,EAAA,MAAIC,MAAM,cAAcM,KAAKC,QAAQC,WAAWI,MAChDb,EAAA,KAAGC,MAAM,aAAaM,KAAKC,QAAQC,WAAWK,U"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,h as a,g as t,H as o}from"./p-2aae1a0e.js";import{j as r}from"./p-86c7fdc7.js";const c=".sc-bootstrap-slick-test-h{display:block}";const e=class{constructor(a){s(this,a)}componentDidLoad(){r(".carousel").slick({autoplay:true,autoplaySpeed:6e3,fade:true,dots:true,pauseOnDotsHover:true})}render(){return a(o,null,a("div",{class:"card",style:{width:"18rem"}},a("img",{class:"card-img-top",src:"https://source.unsplash.com/random/320x240",alt:"Card image cap"}),a("div",{class:"card-body"},a("h5",{class:"card-title"},t("")),a("p",{class:"card-text"},"Some quick example text to build on the card title and make up the bulk of the card's content."),a("a",{href:"#",class:"btn btn-primary"},"Go somewhere"))),a("div",{class:"card",style:{width:"18rem"}},a("div",{class:"card-body bg-primary"},a("div",{class:"carousel"},["https://source.unsplash.com/random/320x240","https://source.unsplash.com/random/320x240","https://source.unsplash.com/random/320x240","https://source.unsplash.com/random/320x240","https://source.unsplash.com/random/320x240","https://source.unsplash.com/random/320x240"].map((s=>a("div",{class:"carousel-item"},a("img",{"data-lazy":s}))))))))}};e.style=c;export{e as bootstrap_slick_test};
|
|
2
|
-
//# sourceMappingURL=p-7c05cd02.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["bootstrapSlickTestCss","BootstrapSlickTest","componentDidLoad","$","slick","autoplay","autoplaySpeed","fade","dots","pauseOnDotsHover","render","h","Host","class","style","width","src","alt","getAssetPath","href","map","url"],"sources":["src/components/bootstrap-slick-test/bootstrap-slick-test.css?tag=bootstrap-slick-test&encapsulation=scoped","src/components/bootstrap-slick-test/bootstrap-slick-test.tsx"],"sourcesContent":["/* @import url('https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css'); */\n/* @import url('https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css'); */\n\n:host {\n display: block;\n}\n","import { Component, Host, getAssetPath, h } from '@stencil/core';\n\nimport $ from 'jquery';\nimport 'slick-carousel';\n\n@Component({\n tag: 'bootstrap-slick-test',\n styleUrl: 'bootstrap-slick-test.css',\n scoped: true,\n})\nexport class BootstrapSlickTest {\n componentDidLoad() {\n $('.carousel').slick({\n autoplay: true,\n autoplaySpeed: 6000,\n fade: true,\n dots: true,\n pauseOnDotsHover: true,\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"card\" style={{ width: '18rem' }}>\n <img class=\"card-img-top\" src=\"https://source.unsplash.com/random/320x240\" alt=\"Card image cap\" />\n <div class=\"card-body\">\n <h5 class=\"card-title\">{getAssetPath('')}</h5>\n <p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.</p>\n <a href=\"#\" class=\"btn btn-primary\">\n Go somewhere\n </a>\n </div>\n </div>\n\n <div class=\"card\" style={{ width: '18rem' }}>\n <div class=\"card-body bg-primary\">\n <div class=\"carousel\">\n {[\n 'https://source.unsplash.com/random/320x240',\n 'https://source.unsplash.com/random/320x240',\n 'https://source.unsplash.com/random/320x240',\n 'https://source.unsplash.com/random/320x240',\n 'https://source.unsplash.com/random/320x240',\n 'https://source.unsplash.com/random/320x240',\n ].map(url => (\n <div class=\"carousel-item\">\n <img data-lazy={url} />\n </div>\n ))}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAwB,4C,MCUjBC,EAAkB,M,yBAC7B,gBAAAC,GACEC,EAAE,aAAaC,MAAM,CACnBC,SAAU,KACVC,cAAe,IACfC,KAAM,KACNC,KAAM,KACNC,iBAAkB,M,CAItB,MAAAC,GACE,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAM,OAAOC,MAAO,CAAEC,MAAO,UAChCJ,EAAA,OAAKE,MAAM,eAAeG,IAAI,6CAA6CC,IAAI,mBAC/EN,EAAA,OAAKE,MAAM,aACTF,EAAA,MAAIE,MAAM,cAAcK,EAAa,KACrCP,EAAA,KAAGE,MAAM,aAAW,kGACpBF,EAAA,KAAGQ,KAAK,IAAIN,MAAM,mBAAiB,kBAMvCF,EAAA,OAAKE,MAAM,OAAOC,MAAO,CAAEC,MAAO,UAChCJ,EAAA,OAAKE,MAAM,wBACTF,EAAA,OAAKE,MAAM,YACR,CACC,6CACA,6CACA,6CACA,6CACA,6CACA,8CACAO,KAAIC,GACJV,EAAA,OAAKE,MAAM,iBACTF,EAAA,mBAAgBU,U"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-2aae1a0e.js";import{f as s}from"./p-31666f10.js";const n="";const a=class{constructor(e){t(this,e);this.article=undefined;this.aicoUrl=undefined;this.aicoBearerToken=undefined;this.articleId=undefined}connectedCallback(){this.articleFetchController=new AbortController;this.api={baseApi:this.aicoUrl,bearerToken:this.aicoBearerToken}}disconnectedCallback(){this.articleFetchController.abort("disconnected")}async componentWillLoad(){this.article=await s(this.api,this.articleId,this.articleFetchController.signal)}render(){return e(i,null,e("aico-article-detail",{article:this.article}))}};a.style=n;export{a as aico_fetch_article_detail};
|
|
2
|
-
//# sourceMappingURL=p-83655dd4.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["aicoFetchArticleDetailCss","AicoFetchArticleDetail","connectedCallback","this","articleFetchController","AbortController","api","baseApi","aicoUrl","bearerToken","aicoBearerToken","disconnectedCallback","abort","componentWillLoad","article","fetchNewsArticle","articleId","signal","render","h","Host"],"sources":["src/components/aico-fetch-article-detail/aico-fetch-article-detail.css?tag=aico-fetch-article-detail&encapsulation=scoped","src/components/aico-fetch-article-detail/aico-fetch-article-detail.tsx"],"sourcesContent":[null,"import { Component, Host, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticle } from '../../utils/utils';\nimport { Article } from '../../model/Article';\nimport { AicoApiRequestInfo } from '../../model/AicoApiRequestInfo';\n\n@Component({\n tag: 'aico-fetch-article-detail',\n styleUrl: 'aico-fetch-article-detail.css',\n scoped: true,\n})\nexport class AicoFetchArticleDetail {\n @State() article!: Article;\n\n @Prop() aicoUrl!: string;\n\n @Prop() aicoBearerToken!: string;\n\n @Prop() articleId!: string;\n\n private api?: AicoApiRequestInfo;\n private articleFetchController?: AbortController;\n\n connectedCallback() {\n this.articleFetchController = new AbortController();\n this.api = { baseApi: this.aicoUrl, bearerToken: this.aicoBearerToken };\n }\n\n disconnectedCallback() {\n this.articleFetchController!.abort('disconnected');\n }\n\n async componentWillLoad(): Promise<void> {\n this.article = await fetchNewsArticle(this.api!, this.articleId, this.articleFetchController!.signal);\n }\n\n render() {\n return (\n <Host>\n <aico-article-detail article={this.article} />\n </Host>\n );\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAA4B,G,MCUrBC,EAAsB,M,+HAYjC,iBAAAC,GACEC,KAAKC,uBAAyB,IAAIC,gBAClCF,KAAKG,IAAM,CAAEC,QAASJ,KAAKK,QAASC,YAAaN,KAAKO,gB,CAGxD,oBAAAC,GACER,KAAKC,uBAAwBQ,MAAM,e,CAGrC,uBAAMC,GACJV,KAAKW,cAAgBC,EAAiBZ,KAAKG,IAAMH,KAAKa,UAAWb,KAAKC,uBAAwBa,O,CAGhG,MAAAC,GACE,OACEC,EAACC,EAAI,KACHD,EAAA,uBAAqBL,QAASX,KAAKW,U"}
|