@jumpgroup/jump-design-system 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-12f40d28.js → index-41aaa52a.js} +125 -5
- package/dist/cjs/index-41aaa52a.js.map +1 -0
- package/dist/cjs/jump-badge.cjs.entry.js +6 -6
- package/dist/cjs/jump-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-button.cjs.entry.js +4 -3
- package/dist/cjs/jump-button.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card.cjs.entry.js +3 -3
- package/dist/cjs/jump-card.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +3 -3
- package/dist/cjs/jump-design-system.cjs.js.map +1 -1
- package/dist/cjs/jump-icon.cjs.entry.js +5 -5
- package/dist/cjs/jump-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-pagination.cjs.entry.js +32 -10
- package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-tab.cjs.entry.js +29 -0
- package/dist/cjs/jump-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/jump-badge/jump-badge.css +1 -1
- package/dist/collection/components/jump-badge/jump-badge.js +4 -4
- package/dist/collection/components/jump-badge/jump-badge.js.map +1 -1
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js +2 -2
- package/dist/collection/components/jump-badge/test/jump-badge.spec.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js +14 -181
- package/dist/collection/components/jump-button/jump-button-anchor.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js +10 -172
- package/dist/collection/components/jump-button/jump-button-dimension.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-filled.stories.js +13 -227
- package/dist/collection/components/jump-button/jump-button-filled.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js +12 -245
- package/dist/collection/components/jump-button/jump-button-only-icon.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-outline.stories.js +18 -214
- package/dist/collection/components/jump-button/jump-button-outline.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button-text.stories.js +10 -216
- package/dist/collection/components/jump-button/jump-button-text.stories.js.map +1 -1
- package/dist/collection/components/jump-button/jump-button.css +17 -7
- package/dist/collection/components/jump-button/jump-button.js +22 -3
- package/dist/collection/components/jump-button/jump-button.js.map +1 -1
- package/dist/collection/components/jump-card/jump-card.js +13 -13
- package/dist/collection/components/jump-card/jump-card.js.map +1 -1
- package/dist/collection/components/{app-icon → jump-icon}/jump-icon.js +2 -2
- package/dist/collection/components/jump-icon/jump-icon.js.map +1 -0
- package/dist/collection/components/{app-icon → jump-icon}/jump-icon.stories.js +1 -1
- package/dist/collection/components/jump-icon/jump-icon.stories.js.map +1 -0
- package/dist/collection/components/jump-icon/test/jump-icon.e2e.js.map +1 -0
- package/dist/collection/components/{app-icon → jump-icon}/test/jump-icon.spec.js +2 -2
- package/dist/collection/components/jump-icon/test/jump-icon.spec.js.map +1 -0
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js +41 -24
- package/dist/collection/components/jump-pagination/jump-pagination-pages.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js +19 -40
- package/dist/collection/components/jump-pagination/jump-pagination-products.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination/jump-pagination.css +13 -0
- package/dist/collection/components/jump-pagination/jump-pagination.js +64 -31
- package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -1
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js +28 -0
- package/dist/collection/components/jump-tab/jump-tab-inline.stories.js.map +1 -0
- package/dist/collection/components/jump-tab/jump-tab.css +3 -0
- package/dist/collection/components/jump-tab/jump-tab.js +71 -0
- package/dist/collection/components/jump-tab/jump-tab.js.map +1 -0
- package/dist/collection/components/jump-tab/test/jump-tab.e2e.js +10 -0
- package/dist/collection/components/jump-tab/test/jump-tab.e2e.js.map +1 -0
- package/dist/collection/components/jump-tab/test/jump-tab.spec.js +18 -0
- package/dist/collection/components/jump-tab/test/jump-tab.spec.js.map +1 -0
- package/dist/collection/utils/utils.js +17 -4
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/jump-badge.js +7 -7
- package/dist/components/jump-badge.js.map +1 -1
- package/dist/components/jump-button.js +4 -2
- package/dist/components/jump-button.js.map +1 -1
- package/dist/components/jump-card.js +13 -13
- package/dist/components/jump-card.js.map +1 -1
- package/dist/components/jump-icon.js +2 -2
- package/dist/components/jump-icon2.js +4 -4
- package/dist/components/jump-icon2.js.map +1 -1
- package/dist/components/jump-pagination.js +38 -13
- package/dist/components/jump-pagination.js.map +1 -1
- package/dist/components/jump-tab.d.ts +11 -0
- package/dist/components/jump-tab.js +46 -0
- package/dist/components/jump-tab.js.map +1 -0
- package/dist/esm/{index-d09b8a38.js → index-192aeaf1.js} +125 -6
- package/dist/esm/index-192aeaf1.js.map +1 -0
- package/dist/esm/jump-badge.entry.js +6 -6
- package/dist/esm/jump-badge.entry.js.map +1 -1
- package/dist/esm/jump-button.entry.js +4 -3
- package/dist/esm/jump-button.entry.js.map +1 -1
- package/dist/esm/jump-card.entry.js +3 -3
- package/dist/esm/jump-card.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +4 -4
- package/dist/esm/jump-design-system.js.map +1 -1
- package/dist/esm/jump-icon.entry.js +5 -5
- package/dist/esm/jump-icon.entry.js.map +1 -1
- package/dist/esm/jump-pagination.entry.js +32 -10
- package/dist/esm/jump-pagination.entry.js.map +1 -1
- package/dist/esm/jump-tab.entry.js +25 -0
- package/dist/esm/jump-tab.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-20ceb40c.js +3 -0
- package/dist/jump-design-system/p-20ceb40c.js.map +1 -0
- package/dist/jump-design-system/{p-b2967e30.entry.js → p-511d4425.entry.js} +3 -3
- package/dist/jump-design-system/p-511d4425.entry.js.map +1 -0
- package/dist/jump-design-system/p-61729377.entry.js +2 -0
- package/dist/jump-design-system/p-61729377.entry.js.map +1 -0
- package/dist/jump-design-system/{p-fea57bd7.entry.js → p-700b96b4.entry.js} +2 -2
- package/dist/jump-design-system/{p-fea57bd7.entry.js.map → p-700b96b4.entry.js.map} +1 -1
- package/dist/jump-design-system/p-87256ed6.entry.js +2 -0
- package/dist/jump-design-system/p-87256ed6.entry.js.map +1 -0
- package/dist/jump-design-system/{p-81fba573.entry.js → p-8f5caf32.entry.js} +2 -2
- package/dist/jump-design-system/p-8f5caf32.entry.js.map +1 -0
- package/dist/jump-design-system/p-960188c6.entry.js +2 -0
- package/dist/jump-design-system/p-960188c6.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +20 -7
- package/dist/types/components/jump-badge/jump-badge.d.ts +1 -1
- package/dist/types/components/jump-button/jump-button-anchor.stories.d.ts +0 -116
- package/dist/types/components/jump-button/jump-button-dimension.stories.d.ts +2 -117
- package/dist/types/components/jump-button/jump-button-filled.stories.d.ts +1 -107
- package/dist/types/components/jump-button/jump-button-only-icon.stories.d.ts +4 -115
- package/dist/types/components/jump-button/jump-button-outline.stories.d.ts +4 -110
- package/dist/types/components/jump-button/jump-button-text.stories.d.ts +2 -123
- package/dist/types/components/jump-button/jump-button.d.ts +5 -1
- package/dist/types/components/{app-icon → jump-icon}/jump-icon.d.ts +1 -1
- package/dist/types/components/jump-pagination/jump-pagination-pages.stories.d.ts +2 -1
- package/dist/types/components/jump-pagination/jump-pagination-products.stories.d.ts +2 -2
- package/dist/types/components/jump-pagination/jump-pagination.d.ts +10 -8
- package/dist/types/components/jump-tab/jump-tab-inline.stories.d.ts +18 -0
- package/dist/types/components/jump-tab/jump-tab.d.ts +6 -0
- package/dist/types/components.d.ts +47 -14
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/index-12f40d28.js.map +0 -1
- package/dist/collection/components/app-icon/jump-icon.js.map +0 -1
- package/dist/collection/components/app-icon/jump-icon.stories.js.map +0 -1
- package/dist/collection/components/app-icon/test/jump-icon.e2e.js.map +0 -1
- package/dist/collection/components/app-icon/test/jump-icon.spec.js.map +0 -1
- package/dist/collection/utils/utils.spec.js +0 -16
- package/dist/collection/utils/utils.spec.js.map +0 -1
- package/dist/esm/index-d09b8a38.js.map +0 -1
- package/dist/jump-design-system/p-062fa189.entry.js +0 -2
- package/dist/jump-design-system/p-062fa189.entry.js.map +0 -1
- package/dist/jump-design-system/p-407027a9.js +0 -3
- package/dist/jump-design-system/p-407027a9.js.map +0 -1
- package/dist/jump-design-system/p-81fba573.entry.js.map +0 -1
- package/dist/jump-design-system/p-b2967e30.entry.js.map +0 -1
- package/dist/jump-design-system/p-e0c9453d.entry.js +0 -2
- package/dist/jump-design-system/p-e0c9453d.entry.js.map +0 -1
- /package/dist/collection/components/{app-icon → jump-icon}/jump-icon.css +0 -0
- /package/dist/collection/components/{app-icon → jump-icon}/test/jump-icon.e2e.js +0 -0
- /package/dist/types/components/{app-icon → jump-icon}/jump-icon.stories.d.ts +0 -0
|
@@ -1,42 +1,67 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './jump-icon2.js';
|
|
3
3
|
|
|
4
|
-
const jumpPaginationCss = ":host{display:block}.JumpPagination{--pagination-label-color:var(--neutral-grey-secondary);--pagination-arrows-color:var(--neutral-grey-secondary);font-family:var(--ff-primary)}.JumpPagination__Wrapper{display:flex;justify-content:space-between}.JumpPagination__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPagination__Wrapper .elementsPerPage label{color:var(--pagination-label-color);font-size:14px;font-weight:normal}.JumpPagination__Wrapper .indicators{font-size:16px;font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--pagination-label-color)}.JumpPagination__Wrapper .indicators .arrow{color:var(--pagination-arrows-color);display:flex;align-items:center;gap:10px}.JumpPagination__Wrapper .indicators .elements{color:var(--pagination-label-color);display:flex;align-items:center;gap:5px}";
|
|
4
|
+
const jumpPaginationCss = ":host{display:block}.JumpPagination{--pagination-label-color:var(--neutral-grey-secondary);--pagination-arrows-color:var(--neutral-grey-secondary);--pagination-arrows-disabled:#CBCBCB;font-family:var(--ff-primary)}.JumpPagination__Wrapper{display:flex;justify-content:space-between}.JumpPagination__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPagination__Wrapper .elementsPerPage label{color:var(--pagination-label-color);font-size:14px;font-weight:normal}.JumpPagination__Wrapper .indicators{font-size:16px;font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--pagination-label-color)}.JumpPagination__Wrapper .indicators .arrow{color:var(--pagination-arrows-color);display:flex;align-items:center;gap:10px}.JumpPagination__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPagination__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--pagination-arrows-disabled)}.JumpPagination__Wrapper .indicators .elements{color:var(--pagination-label-color);display:flex;align-items:center;gap:5px}";
|
|
5
5
|
const JumpPaginationStyle0 = jumpPaginationCss;
|
|
6
6
|
|
|
7
7
|
const JumpPagination$1 = /*@__PURE__*/ proxyCustomElement(class JumpPagination extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
10
|
this.__registerHost();
|
|
11
|
+
this.jumpChangePage = createEvent(this, "jump-change-page", 7);
|
|
12
|
+
this.firstPage = 1;
|
|
13
|
+
this.currentPage = undefined;
|
|
11
14
|
this.totalElements = undefined;
|
|
12
15
|
this.pagLabel = 'di';
|
|
13
|
-
this.
|
|
14
|
-
this.lastPage =
|
|
16
|
+
this.initialPage = 1;
|
|
17
|
+
this.lastPage = 10;
|
|
15
18
|
this.labelElementsPerPage = 'Elementi per pagina';
|
|
16
19
|
this.elementsRanges = [10, 20, 60, 100];
|
|
17
|
-
this.firstPage = undefined;
|
|
18
20
|
this.completeVersion = false;
|
|
19
|
-
this.
|
|
21
|
+
this.showFirstAndLast = false;
|
|
22
|
+
}
|
|
23
|
+
watchCurrentPage(newValue, oldValue) {
|
|
24
|
+
let details = {
|
|
25
|
+
currentPage: newValue,
|
|
26
|
+
previousPage: oldValue,
|
|
27
|
+
firstPage: this.firstPage,
|
|
28
|
+
lastPage: this.lastPage,
|
|
29
|
+
direction: newValue > oldValue ? 'next' : 'prev'
|
|
30
|
+
};
|
|
31
|
+
this.jumpChangePage.emit(details);
|
|
32
|
+
}
|
|
33
|
+
/* ---------------------- @LIFECYCLE ------------------------- */
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.currentPage = this.initialPage;
|
|
20
36
|
}
|
|
21
37
|
render() {
|
|
22
38
|
var _a;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
h("
|
|
39
|
+
console.log('completeVersion', this.completeVersion);
|
|
40
|
+
return (h(Host, { key: '32e300881b3a78d25edf6480e9a8a6594f907c76', class: "JumpPagination" }, h("div", { key: '0c4e133e409740331083588fbb046d79c2878ea9', class: "JumpPagination__Wrapper" }, this.completeVersion &&
|
|
41
|
+
h("div", { key: '13daa8e819ec294b50823becc7e8d904eff66f32', class: "elementsPerPage" }, h("label", { key: '162555e0ebfc295d96d5ba358ec879eba1730746', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { key: 'c4e99d784347a67c5616b3ed0ca25934dbdae55f', name: "elements", id: "elements" }, this.elementsRanges.map((range) => (h("option", { value: range }, range))))), h("div", { key: '5eb516226cf5bcb23e575109371c4f55ca235e04', class: "indicators" }, h("div", { key: '58a8655b582e8cdcd9f8c553343d9e407dd66971', class: "elements" }, this.completeVersion ?
|
|
42
|
+
h("span", null, h("span", null, this.firstPage), " - ", h("span", null, this.currentPage), " ", this.pagLabel, " ", h("span", null, this.totalElements))
|
|
26
43
|
:
|
|
27
|
-
h("span", null, h("span", null, this.currentPage), "
|
|
44
|
+
h("span", null, h("span", null, this.currentPage), " ", this.pagLabel, " ", h("span", null, this.lastPage))), h("div", { key: '92b5476c223e477532726304c282ed34e1acccc7', class: "arrow" }, this.showFirstAndLast &&
|
|
45
|
+
h("button", { key: '740c67ee4f73c5a55a022b2281913d8652deeed2', onClick: () => { this.currentPage = this.firstPage; }, disabled: (this.currentPage === this.firstPage) ? true : false }, " ", h("jump-icon", { key: '5a880ea7c01afcc8ae9a4e84934e386e0edab58c', slot: "prefix", name: "chevrons-left" }), " "), h("button", { key: '08fe7f7faa6c7645151ec3ea2b4bf4247f082a2d', onClick: () => { this.currentPage--; }, disabled: (this.currentPage === this.firstPage) ? true : false }, " ", h("jump-icon", { key: '04a972584533f1272b10c7e9068ce332aef77299', slot: "prefix", name: "chevron-left" }), " "), h("button", { key: '0ea012c03b06b587296c9190eece67351579b6e3', onClick: () => { this.currentPage++; }, disabled: (this.currentPage === this.lastPage) ? true : false }, " ", h("jump-icon", { key: '155d6a407989f9cc5d38832df8fb98a3505c3113', slot: "prefix", name: "chevron-right" }), " "), this.showFirstAndLast &&
|
|
46
|
+
h("button", { key: 'be46c67831f6d732d47e9340aca1a43a650af958', onClick: () => { this.currentPage = this.lastPage; }, disabled: (this.currentPage === this.lastPage) ? true : false }, " ", h("jump-icon", { key: 'b04a3d8a8726f945d5639761dde68a300e40f80a', slot: "prefix", name: "chevrons-right" }), " "))))));
|
|
28
47
|
}
|
|
48
|
+
static get watchers() { return {
|
|
49
|
+
"currentPage": ["watchCurrentPage"]
|
|
50
|
+
}; }
|
|
29
51
|
static get style() { return JumpPaginationStyle0; }
|
|
30
52
|
}, [0, "jump-pagination", {
|
|
31
53
|
"totalElements": [514, "total-elements"],
|
|
32
54
|
"pagLabel": [513, "pag-label"],
|
|
33
|
-
"
|
|
55
|
+
"initialPage": [514, "initial-page"],
|
|
34
56
|
"lastPage": [514, "last-page"],
|
|
35
57
|
"labelElementsPerPage": [513, "label-elements-per-page"],
|
|
36
58
|
"elementsRanges": [16],
|
|
37
|
-
"firstPage": [514, "first-page"],
|
|
38
59
|
"completeVersion": [516, "complete-version"],
|
|
39
|
-
"
|
|
60
|
+
"showFirstAndLast": [516, "show-first-and-last"],
|
|
61
|
+
"firstPage": [32],
|
|
62
|
+
"currentPage": [32]
|
|
63
|
+
}, undefined, {
|
|
64
|
+
"currentPage": ["watchCurrentPage"]
|
|
40
65
|
}]);
|
|
41
66
|
function defineCustomElement$1() {
|
|
42
67
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-pagination.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"file":"jump-pagination.js","mappings":"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","names":["JumpPagination"],"sources":["src/components/jump-pagination/jump-pagination.scss?tag=jump-pagination","src/components/jump-pagination/jump-pagination.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPagination {\n --pagination-label-color: var(--neutral-grey-secondary);\n --pagination-arrows-color: var(--neutral-grey-secondary);\n --pagination-arrows-disabled: #CBCBCB;\n \n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n\n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n\n label {\n color: var(--pagination-label-color);\n font-size: 14px;\n font-weight: normal;\n }\n } \n \n .indicators {\n font-size: 16px;\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--pagination-label-color);\n\n .arrow {\n color: var(--pagination-arrows-color);\n display: flex;\n align-items: center;\n gap: 10px;\n\n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n\n button:disabled {\n cursor: not-allowed;\n color: var(--pagination-arrows-disabled); \n \n }\n }\n\n .elements {\n color: var(--pagination-label-color);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n \n}","import { Component, Host, State, Event, EventEmitter, Prop, h, Watch } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination',\n styleUrl: 'jump-pagination.scss',\n shadow: false,\n})\nexport class JumpPagination {\n \n /* ---------------------- @STATE ------------------------- */\n /**\n * Indicates the first page/product of the list\n */\n @State() firstPage: number = 1;\n\n @State() currentPage: number;\n\n @Watch('currentPage')\n watchCurrentPage(newValue: number, oldValue: number) {\n let details = {\n currentPage: newValue,\n previousPage: oldValue,\n firstPage: this.firstPage,\n lastPage: this.lastPage,\n direction: newValue > oldValue ? 'next' : 'prev'\n };\n\n this.jumpChangePage.emit(details);\n }\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n @Prop({reflect:true}) totalElements: number;\n\n @Prop({reflect:true}) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n @Prop({reflect:true}) initialPage: number = 1;\n\n @Prop({reflect:true}) lastPage: number = 10; \n\n /**\n * Label for the elements per page select\n */\n @Prop({reflect:true}) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Values for the elements per page select\n */\n @Prop({reflect:true}) elementsRanges: Array<number> = [10, 20, 60, 100];\n\n\n /**\n * If true, the component will show the complete version of the pagination, with elements informations\n */\n @Prop({reflect:true}) completeVersion: boolean = false;\n\n @Prop({reflect:true}) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) jumpChangePage: EventEmitter;\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentWillLoad() {\n this.currentPage = this.initialPage;\n }\n\n render() {\n console.log('completeVersion', this.completeVersion);\n return (\n <Host class=\"JumpPagination\">\n <div class=\"JumpPagination__Wrapper\">\n { this.completeVersion && \n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\">\n {this.elementsRanges.map((range) => (\n <option value={range}>{range}</option>\n ))}\n </select>\n </div> \n }\n <div class=\"indicators\"> \n <div class=\"elements\">\n {this.completeVersion ?\n <span>\n <span>{this.firstPage}</span> - <span>{this.currentPage}</span> {this.pagLabel} <span>{this.totalElements}</span>\n </span>\n \n :\n <span>\n <span>{this.currentPage}</span> {this.pagLabel} <span>{this.lastPage}</span>\n </span>\n }\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <button \n onClick={() => {this.currentPage = this.firstPage} }\n disabled={(this.currentPage === this.firstPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon> </button>\n }\n <button \n onClick={() => {this.currentPage--}} \n disabled={(this.currentPage === this.firstPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon> </button>\n <button \n onClick={() => {this.currentPage++}}\n disabled={(this.currentPage === this.lastPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon> </button>\n {this.showFirstAndLast &&\n <button \n onClick={() => {this.currentPage = this.lastPage}}\n disabled={(this.currentPage === this.lastPage) ? true : false}\n > <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon> </button> \n }\n </div> \n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JumpTab extends Components.JumpTab, HTMLElement {}
|
|
4
|
+
export const JumpTab: {
|
|
5
|
+
prototype: JumpTab;
|
|
6
|
+
new (): JumpTab;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const jumpTabCss = ":host{display:block}";
|
|
4
|
+
const JumpTabStyle0 = jumpTabCss;
|
|
5
|
+
|
|
6
|
+
const JumpTab$1 = /*@__PURE__*/ proxyCustomElement(class JumpTab extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.activeTab = undefined;
|
|
12
|
+
this.tabNames = undefined;
|
|
13
|
+
}
|
|
14
|
+
componentWillLoad() {
|
|
15
|
+
console.log('Component is about to be rendered');
|
|
16
|
+
console.log('active', this.activeTab);
|
|
17
|
+
console.log('tabNames', this.tabNames);
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return (h(Host, { key: '08d20c1e157286fd4034790df04c2f7113e57e43', class: "JumpTab" }, (this.tabNames && this.activeTab) && this.tabNames.map((tabName) => (h("div", { class: `JumpTab__Tab ${this.activeTab === tabName ? 'active' : ''}` }, tabName)))));
|
|
21
|
+
}
|
|
22
|
+
static get style() { return JumpTabStyle0; }
|
|
23
|
+
}, [1, "jump-tab", {
|
|
24
|
+
"activeTab": [1, "active-tab"],
|
|
25
|
+
"tabNames": [16]
|
|
26
|
+
}]);
|
|
27
|
+
function defineCustomElement$1() {
|
|
28
|
+
if (typeof customElements === "undefined") {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const components = ["jump-tab"];
|
|
32
|
+
components.forEach(tagName => { switch (tagName) {
|
|
33
|
+
case "jump-tab":
|
|
34
|
+
if (!customElements.get(tagName)) {
|
|
35
|
+
customElements.define(tagName, JumpTab$1);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
38
|
+
} });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const JumpTab = JumpTab$1;
|
|
42
|
+
const defineCustomElement = defineCustomElement$1;
|
|
43
|
+
|
|
44
|
+
export { JumpTab, defineCustomElement };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=jump-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"jump-tab.js","mappings":";;AAAA,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,sBAAe,UAAU;;MCMZA,SAAO;;;;;yBAGU,SAAS;wBACH,SAAS;;IAE3C,iBAAiB;QACf,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACvC;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,KAAK,EAAC,SAAS,IAClB,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,MAC9D,WAAK,KAAK,EAAE,gBAAgB,IAAI,CAAC,SAAS,KAAK,OAAO,GAAG,QAAQ,GAAG,EAAE,EAAE,IACrE,OAAO,CACJ,CACP,CAAC,CACG,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpTab"],"sources":["src/components/jump-tab/jump-tab.scss?tag=jump-tab&encapsulation=shadow","src/components/jump-tab/jump-tab.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab',\n styleUrl: 'jump-tab.scss',\n shadow: true,\n})\nexport class JumpTab {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() activeTab: string = undefined;\n @Prop() tabNames: Array<string> = undefined;\n\n componentWillLoad() {\n console.log('Component is about to be rendered');\n console.log('active',this.activeTab);\n console.log('tabNames',this.tabNames);\n }\n\n render() {\n return (\n <Host class=\"JumpTab\">\n {(this.tabNames && this.activeTab) && this.tabNames.map((tabName) => (\n <div class={`JumpTab__Tab ${this.activeTab === tabName ? 'active' : ''}`}>\n {tabName}\n </div>\n ))}\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'jump-design-system';
|
|
2
|
-
const BUILD = /* jump-design-system */ { 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: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event:
|
|
2
|
+
const BUILD = /* jump-design-system */ { 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: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, 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: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
@@ -227,6 +227,20 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
227
227
|
// so no need to change to a different type
|
|
228
228
|
return propValue;
|
|
229
229
|
};
|
|
230
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
231
|
+
const createEvent = (ref, name, flags) => {
|
|
232
|
+
const elm = getElement(ref);
|
|
233
|
+
return {
|
|
234
|
+
emit: (detail) => {
|
|
235
|
+
return emitEvent(elm, name, {
|
|
236
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
237
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
238
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
239
|
+
detail,
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
};
|
|
230
244
|
/**
|
|
231
245
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
232
246
|
* @param elm the target of the Event
|
|
@@ -343,7 +357,7 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
343
357
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
344
358
|
if (oldValue !== newValue) {
|
|
345
359
|
let isProp = isMemberInElement(elm, memberName);
|
|
346
|
-
memberName.toLowerCase();
|
|
360
|
+
let ln = memberName.toLowerCase();
|
|
347
361
|
if (memberName === 'class') {
|
|
348
362
|
const classList = elm.classList;
|
|
349
363
|
const oldClasses = parseClassList(oldValue);
|
|
@@ -353,6 +367,53 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
353
367
|
}
|
|
354
368
|
else if (memberName === 'key')
|
|
355
369
|
;
|
|
370
|
+
else if ((!isProp ) &&
|
|
371
|
+
memberName[0] === 'o' &&
|
|
372
|
+
memberName[1] === 'n') {
|
|
373
|
+
// Event Handlers
|
|
374
|
+
// so if the member name starts with "on" and the 3rd characters is
|
|
375
|
+
// a capital letter, and it's not already a member on the element,
|
|
376
|
+
// then we're assuming it's an event listener
|
|
377
|
+
if (memberName[2] === '-') {
|
|
378
|
+
// on- prefixed events
|
|
379
|
+
// allows to be explicit about the dom event to listen without any magic
|
|
380
|
+
// under the hood:
|
|
381
|
+
// <my-cmp on-click> // listens for "click"
|
|
382
|
+
// <my-cmp on-Click> // listens for "Click"
|
|
383
|
+
// <my-cmp on-ionChange> // listens for "ionChange"
|
|
384
|
+
// <my-cmp on-EVENTS> // listens for "EVENTS"
|
|
385
|
+
memberName = memberName.slice(3);
|
|
386
|
+
}
|
|
387
|
+
else if (isMemberInElement(win, ln)) {
|
|
388
|
+
// standard event
|
|
389
|
+
// the JSX attribute could have been "onMouseOver" and the
|
|
390
|
+
// member name "onmouseover" is on the window's prototype
|
|
391
|
+
// so let's add the listener "mouseover", which is all lowercased
|
|
392
|
+
memberName = ln.slice(2);
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
// custom event
|
|
396
|
+
// the JSX attribute could have been "onMyCustomEvent"
|
|
397
|
+
// so let's trim off the "on" prefix and lowercase the first character
|
|
398
|
+
// and add the listener "myCustomEvent"
|
|
399
|
+
// except for the first character, we keep the event name case
|
|
400
|
+
memberName = ln[2] + memberName.slice(3);
|
|
401
|
+
}
|
|
402
|
+
if (oldValue || newValue) {
|
|
403
|
+
// Need to account for "capture" events.
|
|
404
|
+
// If the event name ends with "Capture", we'll update the name to remove
|
|
405
|
+
// the "Capture" suffix and make sure the event listener is setup to handle the capture event.
|
|
406
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
407
|
+
// Make sure we only replace the last instance of "Capture"
|
|
408
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
|
|
409
|
+
if (oldValue) {
|
|
410
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
411
|
+
}
|
|
412
|
+
if (newValue) {
|
|
413
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
356
417
|
else {
|
|
357
418
|
// Set property if it exists and it's not a SVG
|
|
358
419
|
const isComplex = isComplexType(newValue);
|
|
@@ -401,6 +462,8 @@ const parseClassListRegex = /\s/;
|
|
|
401
462
|
* @returns list of classes, e.g. ["foo", "bar", "baz"]
|
|
402
463
|
*/
|
|
403
464
|
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
465
|
+
const CAPTURE_EVENT_SUFFIX = 'Capture';
|
|
466
|
+
const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
|
|
404
467
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
405
468
|
// if the element passed in is a shadow root, which is a document fragment
|
|
406
469
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -412,17 +475,35 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
412
475
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
413
476
|
{
|
|
414
477
|
// remove attributes no longer present on the vnode by setting them to undefined
|
|
415
|
-
for (memberName
|
|
478
|
+
for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
416
479
|
if (!(memberName in newVnodeAttrs)) {
|
|
417
480
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
|
|
418
481
|
}
|
|
419
482
|
}
|
|
420
483
|
}
|
|
421
484
|
// add new & update changed attributes
|
|
422
|
-
for (memberName
|
|
485
|
+
for (memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
423
486
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
424
487
|
}
|
|
425
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
* Sort a list of attribute names to ensure that all the attribute names which
|
|
491
|
+
* are _not_ `"ref"` come before `"ref"`. Preserve the order of the non-ref
|
|
492
|
+
* attributes.
|
|
493
|
+
*
|
|
494
|
+
* **Note**: if the supplied attributes do not include `'ref'` then the same
|
|
495
|
+
* (by reference) array will be returned without modification.
|
|
496
|
+
*
|
|
497
|
+
* @param attrNames attribute names to sort
|
|
498
|
+
* @returns a list of attribute names, sorted if they include `"ref"`
|
|
499
|
+
*/
|
|
500
|
+
function sortedAttrNames(attrNames) {
|
|
501
|
+
return attrNames.includes('ref')
|
|
502
|
+
? // we need to sort these to ensure that `'ref'` is the last attr
|
|
503
|
+
[...attrNames.filter((attr) => attr !== 'ref'), 'ref']
|
|
504
|
+
: // no need to sort, return the original array
|
|
505
|
+
attrNames;
|
|
506
|
+
}
|
|
426
507
|
/**
|
|
427
508
|
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
428
509
|
*
|
|
@@ -1244,6 +1325,11 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1244
1325
|
let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
|
|
1245
1326
|
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
1246
1327
|
refNode = refNode.nextSibling;
|
|
1328
|
+
// If the refNode is the same node to be relocated or another element's slot reference, keep searching to find the
|
|
1329
|
+
// correct relocation target
|
|
1330
|
+
while (refNode === nodeToRelocate || (refNode === null || refNode === void 0 ? void 0 : refNode['s-sr'])) {
|
|
1331
|
+
refNode = refNode === null || refNode === void 0 ? void 0 : refNode.nextSibling;
|
|
1332
|
+
}
|
|
1247
1333
|
if (!refNode || !refNode['s-nr']) {
|
|
1248
1334
|
insertBeforeNode = refNode;
|
|
1249
1335
|
break;
|
|
@@ -1554,6 +1640,7 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
1554
1640
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1555
1641
|
// check our new property value against our internal value
|
|
1556
1642
|
const hostRef = getHostRef(ref);
|
|
1643
|
+
const elm = hostRef.$hostElement$ ;
|
|
1557
1644
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1558
1645
|
const flags = hostRef.$flags$;
|
|
1559
1646
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -1566,6 +1653,22 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1566
1653
|
// set our new value!
|
|
1567
1654
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1568
1655
|
if (instance) {
|
|
1656
|
+
// get an array of method names of watch functions to call
|
|
1657
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1658
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1659
|
+
if (watchMethods) {
|
|
1660
|
+
// this instance is watching for when this property changed
|
|
1661
|
+
watchMethods.map((watchMethodName) => {
|
|
1662
|
+
try {
|
|
1663
|
+
// fire off each of the watch methods that are watching this property
|
|
1664
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1665
|
+
}
|
|
1666
|
+
catch (e) {
|
|
1667
|
+
consoleError(e, elm);
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1569
1672
|
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1570
1673
|
// looks like this value actually changed, so we've got work to do!
|
|
1571
1674
|
// but only if we've already rendered, otherwise just chill out
|
|
@@ -1590,6 +1693,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1590
1693
|
var _a;
|
|
1591
1694
|
const prototype = Cstr.prototype;
|
|
1592
1695
|
if (cmpMeta.$members$) {
|
|
1696
|
+
if (Cstr.watchers) {
|
|
1697
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1698
|
+
}
|
|
1593
1699
|
// It's better to have a const than two Object.entries()
|
|
1594
1700
|
const members = Object.entries(cmpMeta.$members$);
|
|
1595
1701
|
members.map(([memberName, [memberFlags]]) => {
|
|
@@ -1739,6 +1845,12 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1739
1845
|
endLoad();
|
|
1740
1846
|
}
|
|
1741
1847
|
if (!Cstr.isProxied) {
|
|
1848
|
+
// we've never proxied this Constructor before
|
|
1849
|
+
// let's add the getters/setters to its prototype before
|
|
1850
|
+
// the first time we create an instance of the implementation
|
|
1851
|
+
{
|
|
1852
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1853
|
+
}
|
|
1742
1854
|
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1743
1855
|
Cstr.isProxied = true;
|
|
1744
1856
|
}
|
|
@@ -1762,6 +1874,9 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1762
1874
|
{
|
|
1763
1875
|
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1764
1876
|
}
|
|
1877
|
+
{
|
|
1878
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1879
|
+
}
|
|
1765
1880
|
endNewInstance();
|
|
1766
1881
|
}
|
|
1767
1882
|
else {
|
|
@@ -1898,6 +2013,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1898
2013
|
let hasSlotRelocation = false;
|
|
1899
2014
|
lazyBundles.map((lazyBundle) => {
|
|
1900
2015
|
lazyBundle[1].map((compactMeta) => {
|
|
2016
|
+
var _a;
|
|
1901
2017
|
const cmpMeta = {
|
|
1902
2018
|
$flags$: compactMeta[0],
|
|
1903
2019
|
$tagName$: compactMeta[1],
|
|
@@ -1915,6 +2031,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1915
2031
|
{
|
|
1916
2032
|
cmpMeta.$attrsToReflect$ = [];
|
|
1917
2033
|
}
|
|
2034
|
+
{
|
|
2035
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
2036
|
+
}
|
|
1918
2037
|
const tagName = cmpMeta.$tagName$;
|
|
1919
2038
|
const HostElement = class extends HTMLElement {
|
|
1920
2039
|
// StencilLazyHost
|
|
@@ -2150,6 +2269,6 @@ const flush = () => {
|
|
|
2150
2269
|
const nextTick = (cb) => promiseResolve().then(cb);
|
|
2151
2270
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2152
2271
|
|
|
2153
|
-
export { Host as H, bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2272
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2154
2273
|
|
|
2155
|
-
//# sourceMappingURL=index-
|
|
2274
|
+
//# sourceMappingURL=index-192aeaf1.js.map
|