@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/README.md
CHANGED
|
@@ -1,75 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Stencil Component Starter
|
|
4
|
-
|
|
5
|
-
This is a starter project for building a standalone Web Component using Stencil.
|
|
6
|
-
|
|
7
|
-
Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
|
|
8
|
-
|
|
9
|
-
# Stencil
|
|
10
|
-
|
|
11
|
-
Stencil is a compiler for building fast web apps using Web Components.
|
|
12
|
-
|
|
13
|
-
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
|
|
1
|
+
# @aiconomy/aico-components
|
|
14
2
|
|
|
15
|
-
|
|
3
|
+
[](https://stenciljs.com)
|
|
16
4
|
|
|
17
|
-
##
|
|
5
|
+
## Example usage
|
|
18
6
|
|
|
19
|
-
|
|
7
|
+
Use the components as plain HTML tags:
|
|
20
8
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
cd my-component
|
|
24
|
-
git remote rm origin
|
|
9
|
+
```html
|
|
10
|
+
<aico-news-list aico-url="<your-api-url>" aico-bearer-token="<your-api-token>"></aico-news-list>
|
|
25
11
|
```
|
|
26
12
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npm install
|
|
31
|
-
npm start
|
|
32
|
-
```
|
|
13
|
+
## Using these components
|
|
33
14
|
|
|
34
|
-
|
|
15
|
+
There are three strategies we recommend for using web components built with Stencil.
|
|
35
16
|
|
|
36
|
-
|
|
37
|
-
npm run build
|
|
38
|
-
```
|
|
17
|
+
### Script tag
|
|
39
18
|
|
|
40
|
-
|
|
19
|
+
- Put the following tags in the head of your `index.html`:
|
|
41
20
|
|
|
42
|
-
```
|
|
43
|
-
|
|
21
|
+
```html
|
|
22
|
+
<link rel="stylesheet" href="https://unpkg.com/@aiconomy/aico-components@<version>/dist/aico-components/aico-components.css" />
|
|
23
|
+
<script type="module" src="https://unpkg.com/@aiconomy/aico-components@<version>/dist/aico-components/aico-components.esm.js"></script>
|
|
24
|
+
<script nomodule src="https://unpkg.com/@aiconomy/aico-components@<version>/dist/esm/aico-components.js"></script>
|
|
44
25
|
```
|
|
45
26
|
|
|
46
|
-
|
|
27
|
+
- Then you can use the elements anywhere in your template, JSX, html etc
|
|
47
28
|
|
|
29
|
+
### Node Modules
|
|
48
30
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
|
|
52
|
-
|
|
53
|
-
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## Using this component
|
|
57
|
-
|
|
58
|
-
There are three strategies we recommend for using web components built with Stencil.
|
|
59
|
-
|
|
60
|
-
The first step for all three of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
|
61
|
-
|
|
62
|
-
### Script tag
|
|
31
|
+
- Run `npm i @aiconomy/aico-components`
|
|
32
|
+
- Put the following tags in the head of your `index.html`:
|
|
63
33
|
|
|
64
|
-
|
|
65
|
-
|
|
34
|
+
```html
|
|
35
|
+
<link rel="stylesheet" href="https://unpkg.com/@aiconomy/aico-components@<version>/dist/aico-components/aico-components.css" />
|
|
36
|
+
<script type="module" src="https://unpkg.com/@aiconomy/aico-components@<version>/dist/aico-components/aico-components.esm.js"></script>
|
|
37
|
+
<script nomodule src="https://unpkg.com/@aiconomy/aico-components@<version>/dist/esm/aico-components.js"></script>
|
|
38
|
+
```
|
|
66
39
|
|
|
67
|
-
|
|
68
|
-
- Run `npm install my-component --save`
|
|
69
|
-
- Put a script tag similar to this `<script type='module' src='node_modules/my-component/dist/my-component.esm.js'></script>` in the head of your index.html
|
|
70
|
-
- Then you can use the element anywhere in your template, JSX, html etc
|
|
40
|
+
- Then you can use the elements anywhere in your template, JSX, html etc
|
|
71
41
|
|
|
72
42
|
### In a stencil-starter app
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
43
|
+
|
|
44
|
+
- Run `npm i @aiconomy/aico-components`
|
|
45
|
+
- Add an import to the npm packages `import needed-aico-component;`
|
|
46
|
+
- Then you can use the elements anywhere in your template, JSX, html etc
|
|
47
|
+
|
|
48
|
+
## Listening to element
|
|
49
|
+
|
|
50
|
+
Please check out [Stencil's documentation](https://stenciljs.com/docs/events#listening-to-events-from-a-non-jsx-element).
|
|
51
|
+
|
|
52
|
+
## Aiconomy components
|
|
53
|
+
|
|
54
|
+
### Primary components
|
|
55
|
+
|
|
56
|
+
- [aico-article-detail](/src/components/aico-article-detail/readme.md)
|
|
57
|
+
- [aico-fetch-article-detail](/src/components/aico-fetch-article-detail/readme.md)
|
|
58
|
+
- [aico-news-list](/src/components/aico-news-list/readme.md)
|
|
59
|
+
- [aico-news-list-item](/src/components/aico-news-list-item/readme.md)
|
|
60
|
+
- [aico-special-news-carousel](/src/components/aico-special-news-carousel/readme.md)
|
|
61
|
+
|
|
62
|
+
### Secondary components
|
|
63
|
+
|
|
64
|
+
These are used by the [aico-article-detail](/src/components/aico-article-detail/readme.md) component to be able to render the article's content.
|
|
65
|
+
|
|
66
|
+
- [aico-album-content](/src/components/content/aico-album-content/readme.md)
|
|
67
|
+
- [aico-asking-content](/src/components/content/aico-asking-content/readme.md)
|
|
68
|
+
- [aico-block-quote-content](/src/components/content/aico-block-quote-content/readme.md)
|
|
69
|
+
- [aico-bullet-content](/src/components/content/aico-bullet-content/readme.md)
|
|
70
|
+
- [aico-carousel-content](/src/components/content/aico-carousel-content/readme.md)
|
|
71
|
+
- [aico-content-card-content](/src/components/content/aico-content-card-content/readme.md)
|
|
72
|
+
- [aico-divider-content](/src/components/content/aico-divider-content/readme.md)
|
|
73
|
+
- [aico-document-content](/src/components/content/aico-document-content/readme.md)
|
|
74
|
+
- [aico-faq-content](/src/components/content/aico-faq-content/readme.md)
|
|
75
|
+
- [aico-heading-content](/src/components/content/aico-heading-content/readme.md)
|
|
76
|
+
- [aico-html-content](/src/components/content/aico-html-content/readme.md)
|
|
77
|
+
- [aico-link-content](/src/components/content/aico-link-content/readme.md)
|
|
78
|
+
- [aico-news-content](/src/components/content/aico-news-content/readme.md)
|
|
79
|
+
- [aico-page-content](/src/components/content/aico-page-content/readme.md)
|
|
80
|
+
- [aico-table-content](/src/components/content/aico-table-content/readme.md)
|
|
81
|
+
- [aico-testimonial-content](/src/components/content/aico-testimonial-content/readme.md)
|
|
82
|
+
- [aico-text-content](/src/components/content/aico-text-content/readme.md)
|
|
83
|
+
- [aico-title-content](/src/components/content/aico-title-content/readme.md)
|
|
84
|
+
- [aico-upload-content](/src/components/content/aico-upload-content/readme.md)
|
|
85
|
+
- [aico-video-content](/src/components/content/aico-video-content/readme.md)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,b as e}from"./p-
|
|
1
|
+
import{p as t,b as e}from"./p-ae20e789.js";export{s as setNonce}from"./p-ae20e789.js";const n=()=>{const e=import.meta.url;const n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};n().then((t=>e([["p-0ca1f065",[[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]}]]],["p-b1f8308f",[[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]}]]],["p-68930822",[[6,"aico-asking-list-content"]]],["p-90c2d3dc",[[6,"aico-collection-content"]]],["p-6464810e",[[2,"aico-special-news-carousel",{aicoUrl:[1,"aico-url"],aicoBearerToken:[1,"aico-bearer-token"],numberOfArticles:[2,"number-of-articles"],newsResponse:[32]}]]],["p-5109399b",[[2,"aico-title-content",{content:[16]}],[2,"aico-no-content"]]],["p-1c4a07ef",[[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]}]]],["p-4c0f3325",[[2,"aico-article-detail",{article:[16]}]]],["p-406fa2e5",[[2,"aico-news-list-item",{article:[16]}]]]],t)));
|
|
2
2
|
//# sourceMappingURL=aico-components.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","aicoUrl","aicoBearerToken","articleId","article","nextButtonText","previousButtonText","newsResponse","pageNumber","numberOfArticles","content","hasArrows"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,GAEXC,EAAc,+CAAuC,CAAAC,QAAA,eAAAC,gBAAA,wBAAAC,UAAA,iBAAAC,QAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","aicoUrl","aicoBearerToken","articleId","articleUrlHandle","article","nextButtonText","previousButtonText","newsResponse","pageNumber","numberOfArticles","content","hasArrows"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,GAEXC,EAAc,+CAAuC,CAAAC,QAAA,eAAAC,gBAAA,wBAAAC,UAAA,iBAAAC,iBAAA,yBAAAC,QAAA,6CAAAJ,QAAA,eAAAC,gBAAA,wBAAAI,eAAA,uBAAAC,mBAAA,2BAAAC,aAAA,KAAAC,WAAA,wJAAAR,QAAA,eAAAC,gBAAA,wBAAAQ,iBAAA,yBAAAF,aAAA,iDAAAG,QAAA,wEAAAA,QAAA,mCAAAA,QAAA,KAAAC,UAAA,mDAAAD,QAAA,kCAAAA,QAAA,gCAAAA,QAAA,+BAAAA,QAAA,iCAAAA,QAAA,gCAAAA,QAAA,+BAAAA,QAAA,gCAAAA,QAAA,iCAAAA,QAAA,sCAAAA,QAAA,kCAAAA,QAAA,mCAAAA,QAAA,8BAAAA,QAAA,+BAAAA,QAAA,+BAAAA,QAAA,+BAAAA,QAAA,sCAAAA,QAAA,kDAAAN,QAAA,kDAAAA,QAAA,UAAAN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as i}from"./p-ae20e789.js";import{f as e,a as s}from"./p-dfd3b0d3.js";const r="";const n=class{constructor(i){t(this,i);this.article=undefined;this.aicoUrl=undefined;this.aicoBearerToken=undefined;this.articleId=undefined;this.articleUrlHandle=undefined}connectedCallback(){this.articleFetchController=new AbortController;this.api={baseApi:this.aicoUrl,bearerToken:this.aicoBearerToken}}disconnectedCallback(){this.articleFetchController.abort("disconnected")}async componentWillLoad(){if(!this.articleId&&!this.articleUrlHandle){throw new Error("Either the article id or the url handle must be provided.")}if(this.articleUrlHandle){this.article=await e(this.api,this.articleUrlHandle,this.articleFetchController.signal);return}this.article=await s(this.api,this.articleId,this.articleFetchController.signal)}render(){return i("aico-article-detail",{article:this.article})}};n.style=r;export{n as aico_fetch_article_detail};
|
|
2
|
+
//# sourceMappingURL=p-0ca1f065.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["aicoFetchArticleDetailCss","AicoFetchArticleDetail","connectedCallback","this","articleFetchController","AbortController","api","baseApi","aicoUrl","bearerToken","aicoBearerToken","disconnectedCallback","abort","componentWillLoad","articleId","articleUrlHandle","Error","article","fetchNewsArticleByHandle","signal","fetchNewsArticle","render","h"],"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, Prop, State, h } from '@stencil/core';\nimport { fetchNewsArticle, fetchNewsArticleByHandle } 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 /**\n * The id will be used to fetch the article.\n *\n * If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are\n * provided, the latter will be used. If neither are provided, an error is thrown.\n */\n @Prop() articleId?: string;\n\n /**\n * The url handle will be used to fetch the article.\n *\n * If both the {@link AicoFetchArticleDetail#articleId} and {@link AicoFetchArticleDetail#articleUrlHandle} are\n * provided, the latter will be used. If neither are provided, an error is thrown.\n */\n @Prop() articleUrlHandle?: 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 if (!this.articleId && !this.articleUrlHandle) {\n throw new Error('Either the article id or the url handle must be provided.');\n }\n\n if (this.articleUrlHandle) {\n this.article = await fetchNewsArticleByHandle(this.api!, this.articleUrlHandle, this.articleFetchController!.signal);\n return;\n }\n\n this.article = await fetchNewsArticle(this.api!, this.articleId!, this.articleFetchController!.signal);\n }\n\n render() {\n return <aico-article-detail article={this.article} />;\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAA4B,G,MCUrBC,EAAsB,M,+JA0BjC,iBAAAC,GACEC,KAAKC,uBAAyB,IAAIC,gBAClCF,KAAKG,IAAM,CAAEC,QAASJ,KAAKK,QAASC,YAAaN,KAAKO,gB,CAGxD,oBAAAC,GACER,KAAKC,uBAAwBQ,MAAM,e,CAGrC,uBAAMC,GACJ,IAAKV,KAAKW,YAAcX,KAAKY,iBAAkB,CAC7C,MAAM,IAAIC,MAAM,4D,CAGlB,GAAIb,KAAKY,iBAAkB,CACzBZ,KAAKc,cAAgBC,EAAyBf,KAAKG,IAAMH,KAAKY,iBAAkBZ,KAAKC,uBAAwBe,QAC7G,M,CAGFhB,KAAKc,cAAgBG,EAAiBjB,KAAKG,IAAMH,KAAKW,UAAYX,KAAKC,uBAAwBe,O,CAGjG,MAAAE,GACE,OAAOC,EAAA,uBAAqBL,QAASd,KAAKc,S"}
|