@sula-tech/webcomponents 0.3.3 → 0.4.0
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-87eec792.js → index-BtkenDV1.js} +205 -156
- package/dist/cjs/index-BtkenDV1.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -6
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.cjs.js.map +1 -0
- package/dist/cjs/sula-avatar_14.cjs.entry.js +28270 -0
- package/dist/cjs/sula-avatar_14.cjs.entry.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +8 -8
- package/dist/cjs/webcomponents.cjs.js.map +1 -1
- package/dist/collection/assets/lottie/loader.json +1 -0
- package/dist/collection/collection-manifest.json +7 -2
- package/dist/collection/components/sula-avatar/sula-avatar.css +1 -1
- package/dist/collection/components/sula-avatar/sula-avatar.js +4 -4
- package/dist/collection/components/sula-avatar/sula-avatar.stories.js +7 -0
- package/dist/collection/components/sula-avatar/sula-avatar.stories.js.map +1 -1
- package/dist/collection/components/sula-badge/sula-badge.css +1 -1
- package/dist/collection/components/sula-badge/sula-badge.js +5 -5
- package/dist/collection/components/sula-badge/sula-badge.stories.js +7 -0
- package/dist/collection/components/sula-badge/sula-badge.stories.js.map +1 -1
- package/dist/collection/components/sula-button/sula-button.css +1 -1
- package/dist/collection/components/sula-button/sula-button.js +8 -8
- package/dist/collection/components/sula-button/sula-button.stories.js +7 -0
- package/dist/collection/components/sula-button/sula-button.stories.js.map +1 -1
- package/dist/collection/components/sula-checkbox/sula-checkbox.css +1 -1
- package/dist/collection/components/sula-checkbox/sula-checkbox.js +5 -5
- package/dist/collection/components/sula-checkbox/sula-checkbox.stories.js +7 -0
- package/dist/collection/components/sula-checkbox/sula-checkbox.stories.js.map +1 -1
- package/dist/collection/components/sula-chip/model/sula-chip.model.js +6 -0
- package/dist/collection/components/sula-chip/model/sula-chip.model.js.map +1 -0
- package/dist/collection/components/sula-chip/sula-chip.css +1 -0
- package/dist/collection/components/sula-chip/sula-chip.js +243 -0
- package/dist/collection/components/sula-chip/sula-chip.js.map +1 -0
- package/dist/collection/components/sula-chip/sula-chip.stories.js +125 -0
- package/dist/collection/components/sula-chip/sula-chip.stories.js.map +1 -0
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-icon/sula-icon.js +3 -3
- package/dist/collection/components/sula-loader/model/sula-loader.model.js +7 -0
- package/dist/collection/components/sula-loader/model/sula-loader.model.js.map +1 -0
- package/dist/collection/components/sula-loader/sula-loader.css +1 -0
- package/dist/collection/components/sula-loader/sula-loader.js +102 -0
- package/dist/collection/components/sula-loader/sula-loader.js.map +1 -0
- package/dist/collection/components/sula-loader/sula-loader.stories.js +48 -0
- package/dist/collection/components/sula-loader/sula-loader.stories.js.map +1 -0
- package/dist/collection/components/sula-loader/test/__mocks__/lottie-web.js +10 -0
- package/dist/collection/components/sula-loader/test/__mocks__/lottie-web.js.map +1 -0
- package/dist/collection/components/sula-menu-select-list/model/sula-menu-select-list.model.js +2 -0
- package/dist/collection/components/sula-menu-select-list/model/sula-menu-select-list.model.js.map +1 -0
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -0
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +81 -0
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -0
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.stories.js +91 -0
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.stories.js.map +1 -0
- package/dist/collection/components/sula-radio-button/sula-radio-button.css +1 -0
- package/dist/collection/components/sula-radio-button/sula-radio-button.js +176 -0
- package/dist/collection/components/sula-radio-button/sula-radio-button.js.map +1 -0
- package/dist/collection/components/sula-radio-button/sula-radio-button.stories.js +123 -0
- package/dist/collection/components/sula-radio-button/sula-radio-button.stories.js.map +1 -0
- package/dist/collection/components/sula-switch/sula-switch.css +1 -1
- package/dist/collection/components/sula-switch/sula-switch.js +9 -9
- package/dist/collection/components/sula-switch/sula-switch.stories.js +7 -0
- package/dist/collection/components/sula-switch/sula-switch.stories.js.map +1 -1
- package/dist/collection/components/sula-tag/sula-tag.css +1 -1
- package/dist/collection/components/sula-tag/sula-tag.js +9 -9
- package/dist/collection/components/sula-tag/sula-tag.stories.js +7 -0
- package/dist/collection/components/sula-tag/sula-tag.stories.js.map +1 -1
- package/dist/collection/components/sula-textarea/sula-textarea.css +1 -1
- package/dist/collection/components/sula-textarea/sula-textarea.js +14 -14
- package/dist/collection/components/sula-textarea/sula-textarea.js.map +1 -1
- package/dist/collection/components/sula-textarea/sula-textarea.stories.js +7 -0
- package/dist/collection/components/sula-textarea/sula-textarea.stories.js.map +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.css +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.js +12 -12
- package/dist/collection/components/sula-textfield/sula-textfield.js.map +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.stories.js +7 -0
- package/dist/collection/components/sula-textfield/sula-textfield.stories.js.map +1 -1
- package/dist/collection/components/sula-tiles/model/sula-tiles.model.js +11 -0
- package/dist/collection/components/sula-tiles/model/sula-tiles.model.js.map +1 -0
- package/dist/collection/components/sula-tiles/sula-tiles.css +1 -0
- package/dist/collection/components/sula-tiles/sula-tiles.js +316 -0
- package/dist/collection/components/sula-tiles/sula-tiles.js.map +1 -0
- package/dist/collection/components/sula-tiles/sula-tiles.stories.js +420 -0
- package/dist/collection/components/sula-tiles/sula-tiles.stories.js.map +1 -0
- package/dist/components/index.js +1251 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-b0d1214f.js → p-CEU3PNQs.js} +6 -6
- package/dist/components/p-CEU3PNQs.js.map +1 -0
- package/dist/components/p-DJGFqp8r.js +44 -0
- package/dist/components/p-DJGFqp8r.js.map +1 -0
- package/dist/components/sula-avatar.js +5 -5
- package/dist/components/sula-avatar.js.map +1 -1
- package/dist/components/sula-badge.js +5 -5
- package/dist/components/sula-badge.js.map +1 -1
- package/dist/components/sula-button.js +6 -6
- package/dist/components/sula-button.js.map +1 -1
- package/dist/components/sula-checkbox.js +8 -8
- package/dist/components/sula-checkbox.js.map +1 -1
- package/dist/components/sula-chip.d.ts +11 -0
- package/dist/components/sula-chip.js +136 -0
- package/dist/components/sula-chip.js.map +1 -0
- package/dist/components/sula-icon.js +2 -1
- package/dist/components/sula-loader.d.ts +11 -0
- package/dist/components/sula-loader.js +27132 -0
- package/dist/components/sula-loader.js.map +1 -0
- package/dist/components/sula-menu-select-list.d.ts +11 -0
- package/dist/components/sula-menu-select-list.js +9 -0
- package/dist/components/sula-menu-select-list.js.map +1 -0
- package/dist/components/sula-radio-button.d.ts +11 -0
- package/dist/components/sula-radio-button.js +83 -0
- package/dist/components/sula-radio-button.js.map +1 -0
- package/dist/components/sula-switch.js +11 -11
- package/dist/components/sula-switch.js.map +1 -1
- package/dist/components/sula-tag.js +8 -8
- package/dist/components/sula-tag.js.map +1 -1
- package/dist/components/sula-textarea.js +13 -13
- package/dist/components/sula-textarea.js.map +1 -1
- package/dist/components/sula-textfield.js +11 -11
- package/dist/components/sula-textfield.js.map +1 -1
- package/dist/components/sula-tiles.d.ts +11 -0
- package/dist/components/sula-tiles.js +180 -0
- package/dist/components/sula-tiles.js.map +1 -0
- package/dist/esm/{index-aa1c5f36.js → index-Yyeke16a.js} +203 -135
- package/dist/esm/index-Yyeke16a.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.js.map +1 -0
- package/dist/esm/sula-avatar_14.entry.js +28255 -0
- package/dist/esm/sula-avatar_14.entry.js.map +1 -0
- package/dist/esm/webcomponents.js +6 -5
- package/dist/esm/webcomponents.js.map +1 -1
- package/dist/types/components/sula-avatar/sula-avatar.stories.d.ts +7 -0
- package/dist/types/components/sula-badge/sula-badge.stories.d.ts +7 -0
- package/dist/types/components/sula-button/sula-button.stories.d.ts +7 -0
- package/dist/types/components/sula-checkbox/sula-checkbox.stories.d.ts +7 -0
- package/dist/types/components/sula-chip/model/sula-chip.model.d.ts +4 -0
- package/dist/types/components/sula-chip/sula-chip.d.ts +40 -0
- package/dist/types/components/sula-chip/sula-chip.stories.d.ts +64 -0
- package/dist/types/components/sula-loader/model/sula-loader.model.d.ts +5 -0
- package/dist/types/components/sula-loader/sula-loader.d.ts +19 -0
- package/dist/types/components/sula-loader/sula-loader.stories.d.ts +29 -0
- package/dist/types/components/sula-loader/test/__mocks__/lottie-web.d.ts +4 -0
- package/dist/types/components/sula-menu-select-list/model/sula-menu-select-list.model.d.ts +4 -0
- package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +14 -0
- package/dist/types/components/sula-menu-select-list/sula-menu-select-list.stories.d.ts +32 -0
- package/dist/types/components/sula-radio-button/sula-radio-button.d.ts +32 -0
- package/dist/types/components/sula-radio-button/sula-radio-button.stories.d.ts +57 -0
- package/dist/types/components/sula-switch/sula-switch.stories.d.ts +7 -0
- package/dist/types/components/sula-tag/sula-tag.stories.d.ts +7 -0
- package/dist/types/components/sula-textarea/sula-textarea.stories.d.ts +7 -0
- package/dist/types/components/sula-textfield/sula-textfield.stories.d.ts +7 -0
- package/dist/types/components/sula-tiles/model/sula-tiles.model.d.ts +8 -0
- package/dist/types/components/sula-tiles/sula-tiles.d.ts +54 -0
- package/dist/types/components/sula-tiles/sula-tiles.stories.d.ts +99 -0
- package/dist/types/components.d.ts +383 -0
- package/dist/types/stencil-public-runtime.d.ts +23 -1
- package/dist/webcomponents/assets/lottie/loader.json +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/index.esm.js.map +1 -1
- package/dist/webcomponents/loader.esm.js.map +1 -0
- package/dist/webcomponents/p-67f9fa90.entry.js +21628 -0
- package/dist/webcomponents/p-67f9fa90.entry.js.map +1 -0
- package/dist/webcomponents/p-Yyeke16a.js +1469 -0
- package/dist/webcomponents/p-Yyeke16a.js.map +1 -0
- package/dist/webcomponents/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.esm.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +33 -9
- package/dist/webcomponents/webcomponents.esm.js.map +1 -1
- package/package.json +5 -2
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/index-87eec792.js.map +0 -1
- package/dist/cjs/sula-avatar_9.cjs.entry.js +0 -865
- package/dist/cjs/sula-avatar_9.cjs.entry.js.map +0 -1
- package/dist/components/p-881c6b35.js +0 -1198
- package/dist/components/p-881c6b35.js.map +0 -1
- package/dist/components/p-b0d1214f.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/index-aa1c5f36.js.map +0 -1
- package/dist/esm/sula-avatar_9.entry.js +0 -853
- package/dist/esm/sula-avatar_9.entry.js.map +0 -1
- package/dist/webcomponents/p-5a36af0f.js +0 -1492
- package/dist/webcomponents/p-5a36af0f.js.map +0 -1
- package/dist/webcomponents/p-7cde1edf.entry.js +0 -1123
- package/dist/webcomponents/p-7cde1edf.entry.js.map +0 -1
- package/dist/webcomponents/p-e1255160.js +0 -4
- package/dist/webcomponents/p-e1255160.js.map +0 -1
- package/loader/package.json +0 -11
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function _interopNamespace(e) {
|
|
4
|
-
if (e && e.__esModule) return e;
|
|
5
|
-
var n = Object.create(null);
|
|
6
|
-
if (e) {
|
|
7
|
-
Object.keys(e).forEach(function (k) {
|
|
8
|
-
if (k !== 'default') {
|
|
9
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return e[k];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n['default'] = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
3
|
const NAMESPACE = 'webcomponents';
|
|
24
|
-
const BUILD = /* webcomponents */ {
|
|
4
|
+
const BUILD = /* webcomponents */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
|
|
5
|
+
|
|
6
|
+
const globalScripts = () => {};
|
|
7
|
+
const globalStyles = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box }:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4 }body{line-height:inherit;margin:0 }hr{border-top-width:1px;color:inherit;height:0 }abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal }small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0 }button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0 }button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none }:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px }::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit }summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1 }[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle }img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{text-rendering:optimizeLegibility}";
|
|
25
8
|
|
|
26
9
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
10
|
+
Stencil Client Platform v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
28
11
|
*/
|
|
29
12
|
var __defProp = Object.defineProperty;
|
|
30
13
|
var __export = (target, all) => {
|
|
@@ -33,10 +16,15 @@ var __export = (target, all) => {
|
|
|
33
16
|
};
|
|
34
17
|
|
|
35
18
|
// src/client/client-host-ref.ts
|
|
36
|
-
var
|
|
37
|
-
|
|
19
|
+
var getHostRef = (ref) => {
|
|
20
|
+
if (ref.__stencil__getHostRef) {
|
|
21
|
+
return ref.__stencil__getHostRef();
|
|
22
|
+
}
|
|
23
|
+
return void 0;
|
|
24
|
+
};
|
|
38
25
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
-
|
|
26
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
27
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
40
28
|
};
|
|
41
29
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
30
|
const hostRef = {
|
|
@@ -50,7 +38,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
38
|
hostElement["s-p"] = [];
|
|
51
39
|
hostElement["s-rc"] = [];
|
|
52
40
|
}
|
|
53
|
-
const ref =
|
|
41
|
+
const ref = hostRef;
|
|
42
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
54
43
|
return ref;
|
|
55
44
|
};
|
|
56
45
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
@@ -69,13 +58,13 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
69
58
|
return module[exportName];
|
|
70
59
|
}
|
|
71
60
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
72
|
-
return
|
|
61
|
+
return import(
|
|
73
62
|
/* @vite-ignore */
|
|
74
63
|
/* webpackInclude: /\.entry\.js$/ */
|
|
75
64
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
76
65
|
/* webpackMode: "lazy" */
|
|
77
66
|
`./${bundleId}.entry.js${""}`
|
|
78
|
-
)
|
|
67
|
+
).then(
|
|
79
68
|
(importedModule) => {
|
|
80
69
|
{
|
|
81
70
|
cmpModules.set(bundleId, importedModule);
|
|
@@ -90,11 +79,9 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
90
79
|
|
|
91
80
|
// src/client/client-style.ts
|
|
92
81
|
var styles = /* @__PURE__ */ new Map();
|
|
93
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
94
82
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
95
83
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
96
84
|
var win = typeof window !== "undefined" ? window : {};
|
|
97
|
-
var doc = win.document || { head: {} };
|
|
98
85
|
var plt = {
|
|
99
86
|
$flags$: 0,
|
|
100
87
|
$resourcesUrl$: "",
|
|
@@ -105,9 +92,10 @@ var plt = {
|
|
|
105
92
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
106
93
|
};
|
|
107
94
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
95
|
+
var _a;
|
|
108
96
|
let supportsListenerOptions2 = false;
|
|
109
97
|
try {
|
|
110
|
-
|
|
98
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
111
99
|
"e",
|
|
112
100
|
null,
|
|
113
101
|
Object.defineProperty({}, "passive", {
|
|
@@ -170,11 +158,16 @@ var isComplexType = (o) => {
|
|
|
170
158
|
};
|
|
171
159
|
|
|
172
160
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
173
|
-
function queryNonceMetaTagContent(
|
|
161
|
+
function queryNonceMetaTagContent(doc) {
|
|
174
162
|
var _a, _b, _c;
|
|
175
|
-
return (_c = (_b = (_a =
|
|
163
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
176
164
|
}
|
|
177
165
|
|
|
166
|
+
// src/utils/regular-expression.ts
|
|
167
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
168
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
169
|
+
};
|
|
170
|
+
|
|
178
171
|
// src/utils/result.ts
|
|
179
172
|
var result_exports = {};
|
|
180
173
|
__export(result_exports, {
|
|
@@ -223,6 +216,14 @@ var unwrapErr = (result) => {
|
|
|
223
216
|
throw result.value;
|
|
224
217
|
}
|
|
225
218
|
};
|
|
219
|
+
function createShadowRoot(cmpMeta) {
|
|
220
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
221
|
+
if (supportsConstructableStylesheets) {
|
|
222
|
+
const sheet = new CSSStyleSheet();
|
|
223
|
+
sheet.replaceSync(globalStyles);
|
|
224
|
+
shadowRoot.adoptedStyleSheets.push(sheet);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
226
227
|
var createTime = (fnName, tagName = "") => {
|
|
227
228
|
{
|
|
228
229
|
return () => {
|
|
@@ -301,13 +302,27 @@ var newVNode = (tag, text) => {
|
|
|
301
302
|
};
|
|
302
303
|
var Host = {};
|
|
303
304
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
304
|
-
var
|
|
305
|
+
var createSupportsRuleRe = (selector) => {
|
|
306
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
307
|
+
return new RegExp(
|
|
308
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
309
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
310
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
311
|
+
"g"
|
|
312
|
+
);
|
|
313
|
+
};
|
|
314
|
+
createSupportsRuleRe("::slotted");
|
|
315
|
+
createSupportsRuleRe(":host");
|
|
316
|
+
createSupportsRuleRe(":host-context");
|
|
317
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
305
318
|
if (propValue != null && !isComplexType(propValue)) {
|
|
306
319
|
if (propType & 4 /* Boolean */) {
|
|
307
|
-
|
|
320
|
+
{
|
|
321
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
322
|
+
}
|
|
308
323
|
}
|
|
309
324
|
if (propType & 2 /* Number */) {
|
|
310
|
-
return parseFloat(propValue);
|
|
325
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
311
326
|
}
|
|
312
327
|
if (propType & 1 /* String */) {
|
|
313
328
|
return String(propValue);
|
|
@@ -324,9 +339,9 @@ var createEvent = (ref, name, flags) => {
|
|
|
324
339
|
return {
|
|
325
340
|
emit: (detail) => {
|
|
326
341
|
return emitEvent(elm, name, {
|
|
327
|
-
bubbles:
|
|
328
|
-
composed:
|
|
329
|
-
cancelable:
|
|
342
|
+
bubbles: true,
|
|
343
|
+
composed: true,
|
|
344
|
+
cancelable: true,
|
|
330
345
|
detail
|
|
331
346
|
});
|
|
332
347
|
}
|
|
@@ -356,7 +371,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
371
|
var _a;
|
|
357
372
|
const scopeId2 = getScopeId(cmpMeta);
|
|
358
373
|
const style = styles.get(scopeId2);
|
|
359
|
-
|
|
374
|
+
if (!win.document) {
|
|
375
|
+
return scopeId2;
|
|
376
|
+
}
|
|
377
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
360
378
|
if (style) {
|
|
361
379
|
if (typeof style === "string") {
|
|
362
380
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -367,9 +385,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
367
385
|
}
|
|
368
386
|
if (!appliedStyles.has(scopeId2)) {
|
|
369
387
|
{
|
|
370
|
-
styleElm = document.
|
|
388
|
+
styleElm = win.document.createElement("style");
|
|
371
389
|
styleElm.innerHTML = style;
|
|
372
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
390
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
373
391
|
if (nonce != null) {
|
|
374
392
|
styleElm.setAttribute("nonce", nonce);
|
|
375
393
|
}
|
|
@@ -423,7 +441,7 @@ var attachStyles = (hostRef) => {
|
|
|
423
441
|
const scopeId2 = addStyle(
|
|
424
442
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
425
443
|
cmpMeta);
|
|
426
|
-
if (
|
|
444
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
427
445
|
elm["s-sc"] = scopeId2;
|
|
428
446
|
elm.classList.add(scopeId2 + "-h");
|
|
429
447
|
}
|
|
@@ -431,93 +449,94 @@ var attachStyles = (hostRef) => {
|
|
|
431
449
|
};
|
|
432
450
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
433
451
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
434
|
-
if (oldValue
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
} else {
|
|
452
|
-
elm.style[prop] = "";
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
for (const prop in newValue) {
|
|
458
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
452
|
+
if (oldValue === newValue) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
456
|
+
let ln = memberName.toLowerCase();
|
|
457
|
+
if (memberName === "class") {
|
|
458
|
+
const classList = elm.classList;
|
|
459
|
+
const oldClasses = parseClassList(oldValue);
|
|
460
|
+
let newClasses = parseClassList(newValue);
|
|
461
|
+
{
|
|
462
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
463
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
464
|
+
}
|
|
465
|
+
} else if (memberName === "style") {
|
|
466
|
+
{
|
|
467
|
+
for (const prop in oldValue) {
|
|
468
|
+
if (!newValue || newValue[prop] == null) {
|
|
459
469
|
if (prop.includes("-")) {
|
|
460
|
-
elm.style.
|
|
470
|
+
elm.style.removeProperty(prop);
|
|
461
471
|
} else {
|
|
462
|
-
elm.style[prop] =
|
|
472
|
+
elm.style[prop] = "";
|
|
463
473
|
}
|
|
464
474
|
}
|
|
465
475
|
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
} else if (isMemberInElement(win, ln)) {
|
|
474
|
-
memberName = ln.slice(2);
|
|
475
|
-
} else {
|
|
476
|
-
memberName = ln[2] + memberName.slice(3);
|
|
477
|
-
}
|
|
478
|
-
if (oldValue || newValue) {
|
|
479
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
480
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
481
|
-
if (oldValue) {
|
|
482
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
483
|
-
}
|
|
484
|
-
if (newValue) {
|
|
485
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
476
|
+
}
|
|
477
|
+
for (const prop in newValue) {
|
|
478
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
479
|
+
if (prop.includes("-")) {
|
|
480
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
481
|
+
} else {
|
|
482
|
+
elm.style[prop] = newValue[prop];
|
|
486
483
|
}
|
|
487
484
|
}
|
|
485
|
+
}
|
|
486
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
487
|
+
if (newValue) {
|
|
488
|
+
newValue(elm);
|
|
489
|
+
}
|
|
490
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
491
|
+
if (memberName[2] === "-") {
|
|
492
|
+
memberName = memberName.slice(3);
|
|
493
|
+
} else if (isMemberInElement(win, ln)) {
|
|
494
|
+
memberName = ln.slice(2);
|
|
488
495
|
} else {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
496
|
+
memberName = ln[2] + memberName.slice(3);
|
|
497
|
+
}
|
|
498
|
+
if (oldValue || newValue) {
|
|
499
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
500
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
501
|
+
if (oldValue) {
|
|
502
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
503
|
+
}
|
|
504
|
+
if (newValue) {
|
|
505
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
} else {
|
|
509
|
+
const isComplex = isComplexType(newValue);
|
|
510
|
+
if ((isProp || isComplex && newValue !== null) && true) {
|
|
511
|
+
try {
|
|
512
|
+
if (!elm.tagName.includes("-")) {
|
|
513
|
+
const n = newValue == null ? "" : newValue;
|
|
514
|
+
if (memberName === "list") {
|
|
515
|
+
isProp = false;
|
|
516
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
517
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
518
|
+
elm[memberName] = n;
|
|
519
|
+
} else {
|
|
520
|
+
elm.setAttribute(memberName, n);
|
|
502
521
|
}
|
|
503
|
-
} else if (elm[memberName] !== newValue) {
|
|
504
|
-
elm[memberName] = newValue;
|
|
505
522
|
}
|
|
506
|
-
}
|
|
523
|
+
} else if (elm[memberName] !== newValue) {
|
|
524
|
+
elm[memberName] = newValue;
|
|
507
525
|
}
|
|
526
|
+
} catch (e) {
|
|
508
527
|
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
elm.removeAttribute(memberName);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
516
|
-
newValue = newValue === true ? "" : newValue;
|
|
528
|
+
}
|
|
529
|
+
if (newValue == null || newValue === false) {
|
|
530
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
517
531
|
{
|
|
518
|
-
elm.
|
|
532
|
+
elm.removeAttribute(memberName);
|
|
519
533
|
}
|
|
520
534
|
}
|
|
535
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
536
|
+
newValue = newValue === true ? "" : newValue;
|
|
537
|
+
{
|
|
538
|
+
elm.setAttribute(memberName, newValue);
|
|
539
|
+
}
|
|
521
540
|
}
|
|
522
541
|
}
|
|
523
542
|
};
|
|
@@ -572,7 +591,6 @@ function sortedAttrNames(attrNames) {
|
|
|
572
591
|
);
|
|
573
592
|
}
|
|
574
593
|
var hostTagName;
|
|
575
|
-
var useNativeShadowDom = false;
|
|
576
594
|
var isSvgMode = false;
|
|
577
595
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
578
596
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -580,10 +598,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
580
598
|
let elm;
|
|
581
599
|
let childNode;
|
|
582
600
|
if (newVNode2.$text$ !== null) {
|
|
583
|
-
elm = newVNode2.$elm$ =
|
|
601
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
584
602
|
} else {
|
|
585
|
-
|
|
586
|
-
|
|
603
|
+
if (!win.document) {
|
|
604
|
+
throw new Error(
|
|
605
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
606
|
+
);
|
|
607
|
+
}
|
|
608
|
+
elm = newVNode2.$elm$ = win.document.createElement(
|
|
609
|
+
newVNode2.$tag$
|
|
587
610
|
);
|
|
588
611
|
{
|
|
589
612
|
updateElement(null, newVNode2, isSvgMode);
|
|
@@ -728,13 +751,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
728
751
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
729
752
|
const oldChildren = oldVNode.$children$;
|
|
730
753
|
const newChildren = newVNode2.$children$;
|
|
731
|
-
const tag = newVNode2.$tag$;
|
|
732
754
|
const text = newVNode2.$text$;
|
|
733
755
|
if (text === null) {
|
|
734
756
|
{
|
|
735
|
-
|
|
736
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
737
|
-
}
|
|
757
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
738
758
|
}
|
|
739
759
|
if (oldChildren !== null && newChildren !== null) {
|
|
740
760
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -766,9 +786,9 @@ var insertBefore = (parent, newNode, reference) => {
|
|
|
766
786
|
};
|
|
767
787
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
768
788
|
const hostElm = hostRef.$hostElement$;
|
|
769
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
770
789
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
771
|
-
const
|
|
790
|
+
const isHostElement = isHost(renderFnResults);
|
|
791
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
772
792
|
hostTagName = hostElm.tagName;
|
|
773
793
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
774
794
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
@@ -781,7 +801,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
781
801
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
782
802
|
hostRef.$vnode$ = rootVnode;
|
|
783
803
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
784
|
-
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
785
804
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
786
805
|
};
|
|
787
806
|
|
|
@@ -829,13 +848,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
829
848
|
}
|
|
830
849
|
}
|
|
831
850
|
emitLifecycleEvent(elm, "componentWillLoad");
|
|
832
|
-
|
|
833
|
-
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
834
|
-
}
|
|
851
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
835
852
|
} else {
|
|
836
853
|
emitLifecycleEvent(elm, "componentWillUpdate");
|
|
854
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
837
855
|
}
|
|
838
856
|
emitLifecycleEvent(elm, "componentWillRender");
|
|
857
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
839
858
|
endSchedule();
|
|
840
859
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
841
860
|
};
|
|
@@ -878,7 +897,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
878
897
|
try {
|
|
879
898
|
instance = instance.render() ;
|
|
880
899
|
{
|
|
881
|
-
hostRef.$flags$ &=
|
|
900
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
882
901
|
}
|
|
883
902
|
{
|
|
884
903
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -901,15 +920,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
901
920
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
902
921
|
const instance = hostRef.$lazyInstance$ ;
|
|
903
922
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
923
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
904
924
|
emitLifecycleEvent(elm, "componentDidRender");
|
|
905
925
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
906
926
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
907
927
|
{
|
|
908
928
|
addHydratedFlag(elm);
|
|
909
929
|
}
|
|
910
|
-
|
|
911
|
-
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
912
|
-
}
|
|
930
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
913
931
|
emitLifecycleEvent(elm, "componentDidLoad");
|
|
914
932
|
endPostUpdate();
|
|
915
933
|
{
|
|
@@ -919,6 +937,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
919
937
|
}
|
|
920
938
|
}
|
|
921
939
|
} else {
|
|
940
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
922
941
|
emitLifecycleEvent(elm, "componentDidUpdate");
|
|
923
942
|
endPostUpdate();
|
|
924
943
|
}
|
|
@@ -930,7 +949,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
930
949
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
931
950
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
932
951
|
}
|
|
933
|
-
hostRef.$flags$ &=
|
|
952
|
+
hostRef.$flags$ &= -517;
|
|
934
953
|
}
|
|
935
954
|
};
|
|
936
955
|
var appDidLoad = (who) => {
|
|
@@ -968,19 +987,26 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
968
987
|
const hostRef = getHostRef(ref);
|
|
969
988
|
if (!hostRef) {
|
|
970
989
|
throw new Error(
|
|
971
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
990
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
972
991
|
);
|
|
973
992
|
}
|
|
974
993
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
975
994
|
const flags = hostRef.$flags$;
|
|
976
995
|
const instance = hostRef.$lazyInstance$ ;
|
|
977
|
-
newVal = parsePropertyValue(
|
|
996
|
+
newVal = parsePropertyValue(
|
|
997
|
+
newVal,
|
|
998
|
+
cmpMeta.$members$[propName][0]);
|
|
978
999
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
979
1000
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
980
1001
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
981
1002
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
982
1003
|
if (instance) {
|
|
983
1004
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1005
|
+
if (instance.componentShouldUpdate) {
|
|
1006
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
984
1010
|
scheduleUpdate(hostRef, false);
|
|
985
1011
|
}
|
|
986
1012
|
}
|
|
@@ -991,7 +1017,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
991
1017
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
992
1018
|
var _a, _b;
|
|
993
1019
|
const prototype = Cstr.prototype;
|
|
994
|
-
if (cmpMeta.$members$ || BUILD.watchCallback
|
|
1020
|
+
if (cmpMeta.$members$ || BUILD.watchCallback) {
|
|
995
1021
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
996
1022
|
members.map(([memberName, [memberFlags]]) => {
|
|
997
1023
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
@@ -1025,7 +1051,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1025
1051
|
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1026
1052
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1027
1053
|
}
|
|
1028
|
-
origSetter.apply(this, [
|
|
1054
|
+
origSetter.apply(this, [
|
|
1055
|
+
parsePropertyValue(
|
|
1056
|
+
newValue,
|
|
1057
|
+
memberFlags)
|
|
1058
|
+
]);
|
|
1029
1059
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1030
1060
|
setValue(this, memberName, newValue, cmpMeta);
|
|
1031
1061
|
return;
|
|
@@ -1047,7 +1077,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1047
1077
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1048
1078
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1049
1079
|
}
|
|
1050
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1080
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1081
|
+
newValue,
|
|
1082
|
+
memberFlags);
|
|
1051
1083
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1052
1084
|
};
|
|
1053
1085
|
if (ref.$lazyInstance$) {
|
|
@@ -1140,9 +1172,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1140
1172
|
consoleError(e, elm);
|
|
1141
1173
|
}
|
|
1142
1174
|
{
|
|
1143
|
-
hostRef.$flags$ &=
|
|
1175
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1144
1176
|
}
|
|
1145
1177
|
endNewInstance();
|
|
1178
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1146
1179
|
} else {
|
|
1147
1180
|
Cstr = elm.constructor;
|
|
1148
1181
|
const cmpTag = elm.localName;
|
|
@@ -1170,6 +1203,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1170
1203
|
}
|
|
1171
1204
|
};
|
|
1172
1205
|
var fireConnectedCallback = (instance, elm) => {
|
|
1206
|
+
{
|
|
1207
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1208
|
+
}
|
|
1173
1209
|
};
|
|
1174
1210
|
|
|
1175
1211
|
// src/runtime/connected-callback.ts
|
|
@@ -1203,14 +1239,19 @@ var connectedCallback = (elm) => {
|
|
|
1203
1239
|
}
|
|
1204
1240
|
} else {
|
|
1205
1241
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1206
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1207
|
-
hostRef.$
|
|
1242
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1243
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1244
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1245
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1208
1246
|
}
|
|
1209
1247
|
}
|
|
1210
1248
|
endConnected();
|
|
1211
1249
|
}
|
|
1212
1250
|
};
|
|
1213
1251
|
var disconnectInstance = (instance, elm) => {
|
|
1252
|
+
{
|
|
1253
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1254
|
+
}
|
|
1214
1255
|
};
|
|
1215
1256
|
var disconnectedCallback = async (elm) => {
|
|
1216
1257
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1221,8 +1262,10 @@ var disconnectedCallback = async (elm) => {
|
|
|
1221
1262
|
hostRef.$rmListeners$ = void 0;
|
|
1222
1263
|
}
|
|
1223
1264
|
}
|
|
1224
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1225
|
-
hostRef.$
|
|
1265
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1266
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1267
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1268
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1226
1269
|
}
|
|
1227
1270
|
}
|
|
1228
1271
|
if (rootAppliedStyles.has(elm)) {
|
|
@@ -1236,18 +1279,22 @@ var disconnectedCallback = async (elm) => {
|
|
|
1236
1279
|
// src/runtime/bootstrap-lazy.ts
|
|
1237
1280
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1238
1281
|
var _a;
|
|
1282
|
+
if (!win.document) {
|
|
1283
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1239
1286
|
const endBootstrap = createTime();
|
|
1240
1287
|
const cmpTags = [];
|
|
1241
1288
|
const exclude = options.exclude || [];
|
|
1242
1289
|
const customElements2 = win.customElements;
|
|
1243
|
-
const head =
|
|
1290
|
+
const head = win.document.head;
|
|
1244
1291
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1245
|
-
const dataStyles = /* @__PURE__ */
|
|
1292
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
1246
1293
|
const deferredConnectedCallbacks = [];
|
|
1247
1294
|
let appLoadFallback;
|
|
1248
1295
|
let isBootstrapping = true;
|
|
1249
1296
|
Object.assign(plt, options);
|
|
1250
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
1297
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
1251
1298
|
let hasSlotRelocation = false;
|
|
1252
1299
|
lazyBundles.map((lazyBundle) => {
|
|
1253
1300
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1277,9 +1324,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1277
1324
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1278
1325
|
{
|
|
1279
1326
|
if (!self.shadowRoot) {
|
|
1280
|
-
|
|
1281
|
-
self.attachShadow({ mode: "open" });
|
|
1282
|
-
}
|
|
1327
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1283
1328
|
} else {
|
|
1284
1329
|
if (self.shadowRoot.mode !== "open") {
|
|
1285
1330
|
throw new Error(
|
|
@@ -1343,7 +1388,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1343
1388
|
}
|
|
1344
1389
|
if (dataStyles.innerHTML.length) {
|
|
1345
1390
|
dataStyles.setAttribute("data-styles", "");
|
|
1346
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1391
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1347
1392
|
if (nonce != null) {
|
|
1348
1393
|
dataStyles.setAttribute("nonce", nonce);
|
|
1349
1394
|
}
|
|
@@ -1361,9 +1406,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1361
1406
|
endBootstrap();
|
|
1362
1407
|
};
|
|
1363
1408
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1364
|
-
if (listeners) {
|
|
1409
|
+
if (listeners && win.document) {
|
|
1365
1410
|
listeners.map(([flags, name, method]) => {
|
|
1366
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
1411
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
1367
1412
|
const handler = hostListenerProxy(hostRef, method);
|
|
1368
1413
|
const opts = hostListenerOpts(flags);
|
|
1369
1414
|
plt.ael(target, name, handler, opts);
|
|
@@ -1385,8 +1430,10 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1385
1430
|
consoleError(e, hostRef.$hostElement$);
|
|
1386
1431
|
}
|
|
1387
1432
|
};
|
|
1388
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
1389
|
-
if (flags & 4 /* TargetDocument */)
|
|
1433
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
1434
|
+
if (flags & 4 /* TargetDocument */) {
|
|
1435
|
+
return doc;
|
|
1436
|
+
}
|
|
1390
1437
|
return elm;
|
|
1391
1438
|
};
|
|
1392
1439
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1401,9 +1448,11 @@ exports.Host = Host;
|
|
|
1401
1448
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1402
1449
|
exports.createEvent = createEvent;
|
|
1403
1450
|
exports.getElement = getElement;
|
|
1451
|
+
exports.globalScripts = globalScripts;
|
|
1404
1452
|
exports.h = h;
|
|
1405
1453
|
exports.promiseResolve = promiseResolve;
|
|
1406
1454
|
exports.registerInstance = registerInstance;
|
|
1407
1455
|
exports.setNonce = setNonce;
|
|
1456
|
+
//# sourceMappingURL=index-BtkenDV1.js.map
|
|
1408
1457
|
|
|
1409
|
-
//# sourceMappingURL=index-
|
|
1458
|
+
//# sourceMappingURL=index-BtkenDV1.js.map
|