web-component-wrapper 0.0.597 → 0.0.599
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/ReactWeb.js +1 -0
- package/dist/Web.js +1 -0
- package/dist/bundle/ReactWeb.js +42 -0
- package/dist/bundle/Web.js +3 -0
- package/dist/bundle/compatible/ReactWeb.js +42 -0
- package/dist/bundle/compatible/Web.js +3 -0
- package/dist/bundle/compatible/decorator.js +3 -0
- package/dist/bundle/compatible/index.js +42 -0
- package/dist/bundle/compatible/test.js +42 -0
- package/dist/bundle/compatible/type.js +1 -0
- package/dist/bundle/decorator.js +3 -0
- package/dist/bundle/index.js +42 -0
- package/dist/bundle/test.js +42 -0
- package/dist/bundle/type.js +1 -0
- package/{ReactWeb.js → dist/compatible/ReactWeb.js} +1 -1
- package/{Web.js → dist/compatible/Web.js} +1 -1
- package/{decorator.js → dist/compatible/decorator.js} +0 -0
- package/{index.js → dist/compatible/index.js} +1 -1
- package/dist/compatible/test.js +1 -0
- package/dist/compatible/type.js +1 -0
- package/{decoratorNext.js → dist/decorator.js} +0 -0
- package/dist/index.js +1 -0
- package/dist/test.js +1 -0
- package/dist/type.js +1 -0
- package/package.json +45 -32
- package/readme.md +101 -0
- package/ReactWeb.d.ts +0 -174
- package/ReactWebNext.js +0 -1
- package/Web.d.ts +0 -463
- package/WebNext.js +0 -1
- package/decorator.d.ts +0 -23
- package/index.d.ts +0 -20
- package/indexNext.js +0 -1
- package/polyfill.html.ejs +0 -74
- package/type.d.ts +0 -100
package/dist/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var l in i)("object"==typeof exports?exports:e)[l]=i[l]}}(this,(()=>{return{r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}.r(e={}),e;var e}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-component-wrapper",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.599",
|
|
4
4
|
"description": "Generic web-component base class and framework specific wrapper.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
@@ -23,32 +23,20 @@
|
|
|
23
23
|
"email": "info@torben.website",
|
|
24
24
|
"url": "https://torben.website"
|
|
25
25
|
},
|
|
26
|
+
"main": "dist/index.js",
|
|
26
27
|
"files": [
|
|
27
|
-
"
|
|
28
|
-
"decorator.js",
|
|
29
|
-
"decoratorNext.js",
|
|
30
|
-
"index.d.ts",
|
|
31
|
-
"index.js",
|
|
32
|
-
"indexNext.js",
|
|
33
|
-
"polyfill.html.ejs",
|
|
34
|
-
"ReactWeb.d.ts",
|
|
35
|
-
"ReactWeb.js",
|
|
36
|
-
"ReactWebNext.js",
|
|
37
|
-
"Web.d.ts",
|
|
38
|
-
"Web.js",
|
|
39
|
-
"WebNext.js",
|
|
40
|
-
"type.d.ts"
|
|
28
|
+
"dist"
|
|
41
29
|
],
|
|
42
30
|
"repository": {
|
|
43
31
|
"type": "git",
|
|
44
32
|
"url": "https://github.com/thaibault/web-component-wrapper"
|
|
45
33
|
},
|
|
46
34
|
"scripts": {
|
|
47
|
-
"build": "yarn build:types; yarn build:plain; yarn build:
|
|
48
|
-
"build:bundle": "
|
|
49
|
-
"build:bundle:
|
|
35
|
+
"build": "yarn build:types; yarn build:plain; yarn build:compatible; yarn build:bundle; yarn build:bundle:compatible",
|
|
36
|
+
"build:bundle": "weboptimizer build '{__reference__: \"target:bundle\"}'",
|
|
37
|
+
"build:bundle:compatible": "weboptimizer build '{__reference__: [\"target:bundle\", \"target:compatible\", \"target:bundle:compatible\"]}'",
|
|
50
38
|
"build:plain": "weboptimizer build",
|
|
51
|
-
"build:
|
|
39
|
+
"build:compatible": "weboptimizer build '{__reference__: \"target:compatible\"}'",
|
|
52
40
|
"build:types": "weboptimizer build:types",
|
|
53
41
|
"check": "yarn check:types; yarn lint",
|
|
54
42
|
"check:types": "weboptimizer check:types",
|
|
@@ -73,7 +61,7 @@
|
|
|
73
61
|
"@types/ejs": "^3.1.5",
|
|
74
62
|
"@types/html-minifier": "^4.0.6",
|
|
75
63
|
"@types/jsdom": "^28.0.3",
|
|
76
|
-
"@types/node": "^25.9.
|
|
64
|
+
"@types/node": "^25.9.3",
|
|
77
65
|
"@types/react": "^19.2.17",
|
|
78
66
|
"@types/react-dom": "^19.2.3",
|
|
79
67
|
"@types/webpack-env": "^1.18.8",
|
|
@@ -81,7 +69,7 @@
|
|
|
81
69
|
"@typescript-eslint/parser": "^8.61.0",
|
|
82
70
|
"@webcomponents/webcomponentsjs": "^2.8.0",
|
|
83
71
|
"clientnode": "^4.0.1422",
|
|
84
|
-
"eslint": "^10.
|
|
72
|
+
"eslint": "^10.5.0",
|
|
85
73
|
"eslint-config-google": "^0.14.0",
|
|
86
74
|
"eslint-plugin-jsdoc": "^63.0.2",
|
|
87
75
|
"jest": "30.4.2",
|
|
@@ -90,9 +78,9 @@
|
|
|
90
78
|
"react": "^19.2.7",
|
|
91
79
|
"react-dom": "^19.2.7",
|
|
92
80
|
"typescript-eslint": "^8.61.0",
|
|
93
|
-
"web-documentation": "^1.0.
|
|
81
|
+
"web-documentation": "^1.0.37",
|
|
94
82
|
"weboptimizer": "^3.0.24",
|
|
95
|
-
"webpack-dev-server": "^5.2.
|
|
83
|
+
"webpack-dev-server": "^5.2.5"
|
|
96
84
|
},
|
|
97
85
|
"peerDependencies": {
|
|
98
86
|
"@babel/runtime": "*",
|
|
@@ -131,7 +119,11 @@
|
|
|
131
119
|
"globals@npm:^14.0.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"
|
|
132
120
|
},
|
|
133
121
|
"sideEffects": false,
|
|
134
|
-
"
|
|
122
|
+
"webDocumentation": {
|
|
123
|
+
"languages": [
|
|
124
|
+
"deDE",
|
|
125
|
+
"enUS"
|
|
126
|
+
],
|
|
135
127
|
"tagline": "Encapsulate your components as web-components.",
|
|
136
128
|
"trackingCode": "TODO"
|
|
137
129
|
},
|
|
@@ -145,9 +137,7 @@
|
|
|
145
137
|
},
|
|
146
138
|
"generic": {
|
|
147
139
|
"supportedBrowsers": [
|
|
148
|
-
"
|
|
149
|
-
"last 2 versions",
|
|
150
|
-
"> 5%"
|
|
140
|
+
"browserslist config and supports es6-class"
|
|
151
141
|
]
|
|
152
142
|
},
|
|
153
143
|
"injection": {
|
|
@@ -163,6 +153,14 @@
|
|
|
163
153
|
}
|
|
164
154
|
}
|
|
165
155
|
},
|
|
156
|
+
"path": {
|
|
157
|
+
"source": {
|
|
158
|
+
"base": "src/"
|
|
159
|
+
},
|
|
160
|
+
"target": {
|
|
161
|
+
"base": "dist/"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
166
164
|
"target:bundle": {
|
|
167
165
|
"inPlace": {
|
|
168
166
|
"externalLibrary": {
|
|
@@ -170,6 +168,7 @@
|
|
|
170
168
|
"normal": true
|
|
171
169
|
}
|
|
172
170
|
},
|
|
171
|
+
"libraryName": "webComponentWrapper",
|
|
173
172
|
"module": {
|
|
174
173
|
"preprocessor": {
|
|
175
174
|
"javaScript": {
|
|
@@ -180,17 +179,31 @@
|
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
181
|
}
|
|
182
|
+
},
|
|
183
|
+
"path": {
|
|
184
|
+
"target": {
|
|
185
|
+
"base": "dist/bundle/"
|
|
186
|
+
}
|
|
183
187
|
}
|
|
184
188
|
},
|
|
185
|
-
"target:
|
|
189
|
+
"target:compatible": {
|
|
186
190
|
"generic": {
|
|
187
191
|
"supportedBrowsers": [
|
|
188
|
-
"
|
|
192
|
+
"IE >= 11",
|
|
193
|
+
"last 2 versions",
|
|
194
|
+
"> 5%"
|
|
189
195
|
]
|
|
190
196
|
},
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
197
|
+
"path": {
|
|
198
|
+
"target": {
|
|
199
|
+
"base": "dist/compatible/"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"target:bundle:compatible": {
|
|
204
|
+
"path": {
|
|
205
|
+
"target": {
|
|
206
|
+
"base": "dist/bundle/compatible/"
|
|
194
207
|
}
|
|
195
208
|
}
|
|
196
209
|
}
|
package/readme.md
CHANGED
|
@@ -33,6 +33,107 @@ Use case
|
|
|
33
33
|
|
|
34
34
|
Encapsulate your components as web-components.
|
|
35
35
|
|
|
36
|
+
<div class="wd-table-of-contents">
|
|
37
|
+
<h2 id="content">Content<!--deDE:Inhalt--></h2>
|
|
38
|
+
<!--wd-table-of-contents-->
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<!--|deDE:Installation-->
|
|
42
|
+
Installation
|
|
43
|
+
------------
|
|
44
|
+
|
|
45
|
+
You can install via package manager, simply download the compiled version as
|
|
46
|
+
zip file here and inject or request via cdn in HTML:
|
|
47
|
+
<!--deDE:
|
|
48
|
+
Sie können das Paket über den Paketmanager installieren oder einfach die
|
|
49
|
+
kompilierte Version als ZIP-Datei hier herunterladen und in HTML einbinden
|
|
50
|
+
oder über ein CDN abrufen:
|
|
51
|
+
-->
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install web-component-wrapper
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```TypeScript
|
|
58
|
+
import {func, object} from 'clientnode/property-types'
|
|
59
|
+
import {property} from 'web-component-wrapper/decorator'
|
|
60
|
+
import {Web} from 'web-component-wrapper/Web'
|
|
61
|
+
|
|
62
|
+
export class MyWebComponent<
|
|
63
|
+
TElement = HTMLElement,
|
|
64
|
+
ExternalProperties extends Mapping<unknown> = Mapping<unknown>,
|
|
65
|
+
InternalProperties extends Mapping<unknown> = Mapping<unknown>
|
|
66
|
+
> extends Web<TElement, ExternalProperties, InternalProperties> {
|
|
67
|
+
static content = `
|
|
68
|
+
<div class="wrapper" on-click="this.rootInstance.onClick(event)">
|
|
69
|
+
<slot>Please provide a template to transclude.</slot>
|
|
70
|
+
</div>
|
|
71
|
+
`
|
|
72
|
+
|
|
73
|
+
@property({type: object})
|
|
74
|
+
options = {} as Options
|
|
75
|
+
|
|
76
|
+
@property({type: func})
|
|
77
|
+
onClick: (event: MouseEvent) => Promise<void> = NOOP
|
|
78
|
+
/**
|
|
79
|
+
* Defines dynamic getter and setter interface and resolves a configuration
|
|
80
|
+
* object. Initializes the map implementation.
|
|
81
|
+
*/
|
|
82
|
+
constructor() {
|
|
83
|
+
super()
|
|
84
|
+
/*
|
|
85
|
+
Babel property declaration transformation overwrites defined
|
|
86
|
+
properties at the end of an implicit constructor. So we have to
|
|
87
|
+
redefine them as long as we want to declare expected component
|
|
88
|
+
interface properties to enable static type checks.
|
|
89
|
+
*/
|
|
90
|
+
this.defineGetterAndSetterInterface()
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Triggered when ever a given attribute has changed and triggers to update
|
|
94
|
+
* configured dom content.
|
|
95
|
+
* @param name - Attribute name which was updates.
|
|
96
|
+
* @param newValue - New updated value.
|
|
97
|
+
* @returns Returns when attribute has been updated.
|
|
98
|
+
*/
|
|
99
|
+
async onUpdateAttribute(name: string, newValue: string): Promise<void> {
|
|
100
|
+
await super.onUpdateAttribute(name, newValue)
|
|
101
|
+
|
|
102
|
+
// ...
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Updates controlled dom elements.
|
|
106
|
+
* @param reason - Why an update has been triggered.
|
|
107
|
+
* @param resolveRendering - Indicates whether rendering should be resolved
|
|
108
|
+
* finally. Should be set to "false" via super calls in inherited render
|
|
109
|
+
* methods which do further dom manipulations afterward and resolve the
|
|
110
|
+
* rendering process by their own.
|
|
111
|
+
* @returns A promise resolving when rendering has finished. A promise may
|
|
112
|
+
* be needed for classes inheriting from this class.
|
|
113
|
+
*/
|
|
114
|
+
async render(reason = 'unknown', resolveRendering = true): Promise<void> {
|
|
115
|
+
await super.render(reason, false)
|
|
116
|
+
|
|
117
|
+
await this.waitForNestedComponentRendering()
|
|
118
|
+
|
|
119
|
+
// ...
|
|
120
|
+
|
|
121
|
+
await this.resolveRenderingPromiseIfSet(reason, resolveRendering)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ...
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
customElements.define('my-web-component', MyWebComponent)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
<!--showExample-->
|
|
131
|
+
|
|
132
|
+
```HTML
|
|
133
|
+
<script src="https://unpkg.com/web-component-wrapper@latest/bundle/Web.js">
|
|
134
|
+
</script>
|
|
135
|
+
```
|
|
136
|
+
|
|
36
137
|
## Data-Flow
|
|
37
138
|
|
|
38
139
|
Data can flow into a component via
|
package/ReactWeb.d.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { Logger, Mapping } from 'clientnode';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Root as ReactRoot } from 'react-dom/client';
|
|
4
|
-
import Web from './Web';
|
|
5
|
-
import { ComponentType, ReactComponentBaseProperties, ReactRenderItemFactory, ReactRenderItemsFactory, ReactRenderItems, WebComponentAPI } from './type';
|
|
6
|
-
export declare const log: Logger;
|
|
7
|
-
/**
|
|
8
|
-
* Adapter for exposing a React component as a web-component.
|
|
9
|
-
* @property attachWebComponentAdapterIfNotExists - Indicates whether to wrap
|
|
10
|
-
* with a reference wrapper to get updated about internal state changes.
|
|
11
|
-
* @property content - React component to wrap.
|
|
12
|
-
* @property react - React namespace.
|
|
13
|
-
* @property compiledSlots - Cache of yet pre-compiled slot elements.
|
|
14
|
-
* @property preparedSlots - Cache of yet evaluated slot react elements.
|
|
15
|
-
* @property rootReactInstance - Saves determined root react instance.
|
|
16
|
-
* @property self - Back-reference to this class.
|
|
17
|
-
* @property wrapMemorizingWrapper - Determines whether to wrap component with
|
|
18
|
-
* React's memorizing wrapper to cache component render results.
|
|
19
|
-
* @property isWrapped - Indicates whether a React component is wrapped
|
|
20
|
-
* already.
|
|
21
|
-
*/
|
|
22
|
-
export declare class ReactWeb<TElement = HTMLElement, ExternalProperties extends Mapping<unknown> = Mapping<unknown>, InternalProperties extends ReactComponentBaseProperties<TElement> = Mapping<unknown>> extends Web<TElement, ExternalProperties, InternalProperties> {
|
|
23
|
-
static attachWebComponentAdapterIfNotExists: boolean;
|
|
24
|
-
static content: ComponentType | string;
|
|
25
|
-
static react: typeof React;
|
|
26
|
-
static _name: string;
|
|
27
|
-
unmountOnDisconnect: boolean;
|
|
28
|
-
compiledSlots: (Mapping<ReactRenderItemsFactory> & {
|
|
29
|
-
children?: ReactRenderItemsFactory;
|
|
30
|
-
});
|
|
31
|
-
preparedSlots: Mapping<ReactRenderItems> & {
|
|
32
|
-
children?: ReactRenderItems;
|
|
33
|
-
};
|
|
34
|
-
reactRoot: null | ReactRoot;
|
|
35
|
-
rootReactInstance: null | ReactWeb;
|
|
36
|
-
readonly self: typeof ReactWeb;
|
|
37
|
-
wrapMemorizingWrapper: boolean | null;
|
|
38
|
-
isWrapped: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Triggered when this component is mounted into the document. Event
|
|
41
|
-
* handlers will be attached and the final render proceeds.
|
|
42
|
-
*/
|
|
43
|
-
connectedCallback(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Triggered when this component is unmounted from the document. Event
|
|
46
|
-
* handlers will be removed and state updated accordingly.
|
|
47
|
-
*/
|
|
48
|
-
disconnectedCallback(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Reflects wrapped component state back to web-component's attributes.
|
|
51
|
-
* @param properties - Properties to update in reflected attribute state.
|
|
52
|
-
*/
|
|
53
|
-
reflectExternalProperties(properties: Partial<ExternalProperties>): void;
|
|
54
|
-
/**
|
|
55
|
-
* Method that does the rendering job. Should be called when ever state
|
|
56
|
-
* changes should be projected to the hosts dom content.
|
|
57
|
-
* @param reason - Description why rendering is necessary.
|
|
58
|
-
* @param resolveRendering - Indicates whether rendering should be resolved
|
|
59
|
-
* finally. Should be set to "false" via super calls in inherited render
|
|
60
|
-
* methods which do further dom manipulations afterward and resolve the
|
|
61
|
-
* rendering process by their own.
|
|
62
|
-
* @returns A promise resolving when rendering has finished. A promise may
|
|
63
|
-
* be needed for classes inheriting from this class.
|
|
64
|
-
*/
|
|
65
|
-
render(reason?: string, resolveRendering?: boolean): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Generic property setter. Forwards field writes into internal and
|
|
68
|
-
* external property representations.
|
|
69
|
-
*
|
|
70
|
-
* In general, it is a bad idea to write properties which shadow state
|
|
71
|
-
* properties (move to a controlled component instance) and re-set the
|
|
72
|
-
* property to "undefined" later to lose control.
|
|
73
|
-
*
|
|
74
|
-
* The reason causes in avoiding this scenario:
|
|
75
|
-
*
|
|
76
|
-
* 1. Property overwrites the state.
|
|
77
|
-
* 2. State changes but is shadowed by recent changes in property.
|
|
78
|
-
*
|
|
79
|
-
* So the following will be ensured:
|
|
80
|
-
*
|
|
81
|
-
* 1. Property overwrites the state.
|
|
82
|
-
* 2. Property is overwritten to "undefined" to lose control over the
|
|
83
|
-
* state.
|
|
84
|
-
* 3. Now a state change can be represented back after property adaptions.
|
|
85
|
-
* (Converts reacts declarative nature into an imperative web-component
|
|
86
|
-
* style).
|
|
87
|
-
* 4. Further state changes should be communicated back via output events.
|
|
88
|
-
* @param name - Property name to write.
|
|
89
|
-
* @param value - New value to write.
|
|
90
|
-
*/
|
|
91
|
-
setPropertyValue(name: string, value: unknown): void;
|
|
92
|
-
/**
|
|
93
|
-
* Internal property setter. Respects configured aliases.
|
|
94
|
-
* @param name - Property name to write.
|
|
95
|
-
* @param value - New value to write.
|
|
96
|
-
*/
|
|
97
|
-
setInternalPropertyValue(name: string, value: unknown): void;
|
|
98
|
-
/**
|
|
99
|
-
* Converts given html dom nodes into a compiled function to generate a
|
|
100
|
-
* react-element or a react-element list.
|
|
101
|
-
* @param domNodes - Nodes to convert.
|
|
102
|
-
* @param scope - Additional scope to render subcomponents against.
|
|
103
|
-
* Necessary to bound necessary environment variables into compiled context.
|
|
104
|
-
* @param isFunction - Indicates whether a given render result should be
|
|
105
|
-
* provided as function (render property) with bound parameters environment
|
|
106
|
-
* variable name.
|
|
107
|
-
* @returns Transformed react elements.
|
|
108
|
-
*/
|
|
109
|
-
preCompileDomNodes(domNodes: Array<Node>, scope?: Mapping<unknown>, isFunction?: boolean): ReactRenderItemsFactory;
|
|
110
|
-
/**
|
|
111
|
-
* Converts a given html dom node into a react-element.
|
|
112
|
-
* @param domNode - Node to convert.
|
|
113
|
-
* @param scope - Additional scope to render subcomponents against.
|
|
114
|
-
* @param isFunction - Indicates whether given nodes should be provided as
|
|
115
|
-
* function (render property).
|
|
116
|
-
* @param key - Optional key to add to component properties.
|
|
117
|
-
* @returns Transformed react element.
|
|
118
|
-
*/
|
|
119
|
-
preCompileDomNode(domNode: Node, scope?: Mapping<unknown>, isFunction?: boolean, key?: string): ReactRenderItemFactory;
|
|
120
|
-
/**
|
|
121
|
-
* Evaluates given pre-compiled nodes into a single react element or a
|
|
122
|
-
* React element list.
|
|
123
|
-
* @param nodes - Pre-compiled nodes.
|
|
124
|
-
* @param scope - Additional scope to render subcomponents against.
|
|
125
|
-
* @returns Transformed react elements.
|
|
126
|
-
*/
|
|
127
|
-
evaluatePreCompiledDomNodes(nodes: ReactRenderItemsFactory, scope?: Mapping<unknown>): ReactRenderItems;
|
|
128
|
-
/**
|
|
129
|
-
* Pre compiles and caches determined slots.
|
|
130
|
-
*/
|
|
131
|
-
preCompileSlots(): void;
|
|
132
|
-
/**
|
|
133
|
-
* Evaluates pre-compiled slots.
|
|
134
|
-
* @param scope - To render again.
|
|
135
|
-
*/
|
|
136
|
-
evaluateSlots(scope: Mapping<unknown>): void;
|
|
137
|
-
/**
|
|
138
|
-
* Determines if the given element type is a react-wrapped component.
|
|
139
|
-
* @param domNode - Node to determine from.
|
|
140
|
-
* @returns Boolean indicator.
|
|
141
|
-
*/
|
|
142
|
-
static isReactComponent(domNode: Node): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Determines initial root and react root who initializes their rendering
|
|
145
|
-
* digests.
|
|
146
|
-
*/
|
|
147
|
-
determineRootBinding(): void;
|
|
148
|
-
/**
|
|
149
|
-
* Applies missing forward ref and or memorizing wrapper to a current react
|
|
150
|
-
* component.
|
|
151
|
-
*/
|
|
152
|
-
applyComponentWrapper(): void;
|
|
153
|
-
/**
|
|
154
|
-
* Prepares a given properties object to render against the current
|
|
155
|
-
* component. Creates a reference for being recognized of reacts internal
|
|
156
|
-
* state updates.
|
|
157
|
-
* @param properties - Properties to prepare.
|
|
158
|
-
*/
|
|
159
|
-
prepareProperties(properties: InternalProperties): void;
|
|
160
|
-
/**
|
|
161
|
-
* Updates the current component instance and reflects newly determined
|
|
162
|
-
* properties.
|
|
163
|
-
*/
|
|
164
|
-
reflectInstanceProperties: () => void;
|
|
165
|
-
/**
|
|
166
|
-
* Removes unwanted known and not specified properties from a given
|
|
167
|
-
* properties object (usually added by dev-tools).
|
|
168
|
-
* @param target - ReactElement where properties belong to.
|
|
169
|
-
* @param properties - Properties object to trim.
|
|
170
|
-
*/
|
|
171
|
-
static removeKnownUnwantedPropertyKeys(target: typeof ReactWeb, properties: Mapping<unknown>): void;
|
|
172
|
-
}
|
|
173
|
-
export declare const api: WebComponentAPI<HTMLElement, Mapping<unknown>, ReactComponentBaseProperties, typeof ReactWeb>;
|
|
174
|
-
export default ReactWeb;
|
package/ReactWebNext.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("clientnode/property-types"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"));else if("function"==typeof define&&define.amd)define(["clientnode","clientnode/property-types","react","react-dom","react-dom/client","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","@babel/runtime/regenerator"],t);else{var r="object"==typeof exports?t(require("clientnode"),require("clientnode/property-types"),require("react"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator")):t(e.clientnode,e["clientnode/property-types"],e.react,e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e["@babel/runtime/regenerator"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,((__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__12__,__WEBPACK_EXTERNAL_MODULE__13__,__WEBPACK_EXTERNAL_MODULE__8__,__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__9__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__10__)=>(()=>{var __webpack_modules__=[e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__0__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__1__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__2__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__3__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__4__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__5__},,function(module,__unused_webpack_exports,__webpack_require__){var __webpack_dirname__="/",e,t,r,n,i,s,o,a,l;if(module=__webpack_require__.nmd(module),null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&null!=__webpack_dirname__&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window=void 0===__webpack_require__.g||null===__webpack_require__.g?{}:__webpack_require__.g;module.exports=(e=__webpack_require__(8),t=__webpack_require__(3),r=__webpack_require__(2),n=__webpack_require__(9),i=__webpack_require__(4),s=__webpack_require__(5),o=__webpack_require__(10),a=__webpack_require__(0),l=__webpack_require__(1),function(){var p=[function(e){e.exports=r},function(e){e.exports=a},function(e){e.exports=l},function(e){e.exports=n},function(e,t,r){var n=r(0),i=r.n(n),o=r(1),s=r(2);t.default=function(e){return void 0===e&&(e={}),e=i()({readAttribute:!0,type:s.string},e),function(t,r){if("string"==typeof r){var n,s=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(s,"observedAttributes")||(s.observedAttributes=s.observedAttributes?[].concat(s.observedAttributes):[]);var a=(0,o.camelCaseToDelimited)(r);s.observedAttributes&&!s.observedAttributes.includes(a)&&s.observedAttributes.push(a)}e.type&&(Object.prototype.hasOwnProperty.call(s,"propertyTypes")||(s.propertyTypes=s.propertyTypes?i()({},s.propertyTypes):{}),!s.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(s,"propertiesToReflectAsAttributes")||(s.propertiesToReflectAsAttributes=s.propertiesToReflectAsAttributes?(0,o.copy)(s.propertiesToReflectAsAttributes):[]),(e.update||s.propertiesToReflectAsAttributes instanceof Map&&!s.propertiesToReflectAsAttributes.has(r)||Array.isArray(s.propertiesToReflectAsAttributes)&&!s.propertiesToReflectAsAttributes.includes(r)||"object"==typeof s.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(s.propertiesToReflectAsAttributes,r))&&("boolean"==typeof e.writeAttribute?e.writeAttribute&&s.propertyTypes&&Object.prototype.hasOwnProperty.call(s.propertyTypes,r)&&(n=s.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(s.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?s.propertiesToReflectAsAttributes.push(r):s.normalizePropertyTypeList&&(s.propertiesToReflectAsAttributes=s.normalizePropertyTypeList(s.propertiesToReflectAsAttributes))),s.propertiesToReflectAsAttributes instanceof Map&&s.propertiesToReflectAsAttributes.set(r,n),"object"==typeof s.propertiesToReflectAsAttributes&&(s.propertiesToReflectAsAttributes[r]=n)))),e.alias&&(Object.prototype.hasOwnProperty.call(s,"propertyAliases")||(s.propertyAliases=s.propertyAliases?i()({},s.propertyAliases):{}),!s.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(s,r)||(s.propertyAliases[r]=e.alias))}}}},function(t){t.exports=e},function(e){e.exports=o},,function(e){e.exports=t},function(e){e.exports=i},function(e){e.exports=s}],c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return p[e](r,r.exports,u),r.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var _={};u.r(_),u.d(_,{GenericHTMLElement:function(){return x},Web:function(){return U},api:function(){return W},log:function(){return L}});var d,h,f,m,b=u(5),y=u.n(b),v=u(8),E=u.n(v),g=u(0),P=u.n(g),A=u(3),O=u.n(A),w=u(9),R=u.n(w),T=(u(10),u(6)),C=u.n(T),D=u(1),M=u(2),I=u(4);function N(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return S(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var L=new D.Logger({name:"web-component-wrapper-web"}),x="undefined"==typeof HTMLElement?function(){}:HTMLElement,U=(d=(0,I.default)({type:M.boolean,writeAttribute:!0}),m=function(e){function t(){var r;return(r=e.call(this)||this).renderState={promise:Promise.resolve(""),pending:!1,resolve:D.NOOP},r.childComponentInstances=[],r.batchAttributeUpdates=!0,r.batchPropertyUpdates=!0,r.batchUpdates=!0,r.batchedAttributeUpdateRunning=!0,r.batchedPropertyUpdateRunning=!0,r.batchedUpdateRunning=!0,r.connectionRegistered=!1,r.pendingAttributeUpdates=[],r.parentInstance=null,r.rootInstance=void 0,r.hostDomNode=void 0,r.scope=P()({},D.UTILITY_SCOPE),r.domNodeEventBindings=new Map,r.domNodeTemplateCache=new Map,r.externalProperties={},r.ignoreAttributeUpdateObservations=!1,r.internalProperties={},r.outputEventNames=new Set,r.instance=null,E()(r,"isRoot",f,r),r.runDomConnectionAndRenderingInSameEventQueue=!1,r.self=t,r.slots={},r.prepareNewRenderingPromise(),r.self=r.constructor,r.self._propertiesToReflectAsAttributes||(r.self._propertiesToReflectAsAttributes=r.self.normalizePropertyTypeList(r.self.propertiesToReflectAsAttributes)),r.generateAliasIndex(),r.hostDomNode=r,r.rootInstance=r,r.defineGetterAndSetterInterface(),r}O()(t,e);var r=t.prototype;return r.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)},r.onUpdateAttribute=function(e,t){var r=this,n=new Promise((function(n){return r.pendingAttributeUpdates.push((function(){r.evaluateStringOrNullAndSetAsProperty(e,t),r.batchAttributeUpdates?r.batchedAttributeUpdateRunning||r.batchedUpdateRunning||(r.batchedAttributeUpdateRunning=!0,r.batchedUpdateRunning=!0,(0,D.timeout)((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):r.render("attributeChanged"),n()}))}));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return n},r.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}for(this.connectionRegistered=!0,this.parentInstance=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&(this.determineRootBinding(),this.parentInstance!==this&&this.parentInstance.childComponentInstances&&this.parentInstance.childComponentInstances.push(this)),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope));this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):(0,D.timeout)((function(){e.render("connected")}))},r.disconnectedCallback=function(){this.unRender("disconnected"),this.unregisterConnectionState()},r.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=N((0,D.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[])));!(e=n()).done;)r()},r.getPropertyAlias=function(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},r.getPropertyValue=function(e){var r,n,i,o=null!=(r=this.instance)&&null!=(r=r.current)&&r.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:null!==(n=this.internalProperties[e])&&void 0!==n?n:this.externalProperties[e];return null!=(i=this.instance)&&null!=(i=i.current)&&i.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:o},r.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},r.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},r.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},r.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,D.timeout)((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),(0,D.timeout)((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()}))):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},r.unregisterConnectionState=function(){try{this.isConnected=!1}catch(e){}this.connectionRegistered=!1,this.slots={}},r.unregisterDomNodeEventBindings=function(){for(var e,t=N(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=N(e.value.values());!(r=n()).done;)(0,r.value)()},r.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,i=function(){var i,o=n.value;if(o.startsWith("data-bind-")?i=o.substring(10):o.startsWith("bind-")&&(i=o.substring(5)),i){var s=e.getAttribute(o);if(null===s)return 0;if(i.startsWith("attribute-")||i.startsWith("property-")){var a=(0,D.evaluate)(s,t,!1,!0,e);if(a.error)return L.warn("Error occurred during processing given",'attribute binding "'+o+'" on node:',e,a.error),0;i.startsWith("attribute-")?e.setAttribute(i.substring(10),a.result):e[(0,D.delimitedToCamelCase)(i.substring(9))]=a.result}else if(i.startsWith("on-")){i=(0,D.delimitedToCamelCase)(i.substring(3)),t=P()({log:L,event:void 0,parameters:void 0},t);var l=(0,D.compile)(s,t,!0,!0,e);l.error?L.warn("Error occurred during compiling given event",'binding "'+o+'" on node:',e,l.error):r.addSecureEventListener(e,i,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.event=n[0],t.parameters=n;try{l.templateFunction.apply(l,l.originalScopeNames.map((function(e){return t[e]})))}catch(t){L.warn("Error occurred during processing","given event binding",'"'+o+'" on node:',e,'Given expression "'+s+'" could',"not be evaluated with given scope",'names "'+l.scopeNames.join('", "')+'": '+(0,D.represent)(t))}}))}}},o=N(e.getAttributeNames());!(n=o()).done;)i()},r.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},r.compileDomNodeTemplate=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r={}),r=P()({ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r);var n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){var i=e.innerHTML;if(!i&&e.template&&(i=e.template),this.self.hasCode(i)){var o=(0,D.compile)("`"+i+"`",t);return{domNode:e,children:[],error:o.error,scopeNames:o.scopeNames,template:i,templateFunction:o.templateFunction}}return null}var s=null;if("#text"===n){var a=e.textContent;a&&this.self.hasCode(a)&&(s=a.replace(/ /g," ").trim())}var l=[],p={children:l,domNode:e};if(s){var c=(0,D.compile)("`"+s+"`",t);p.error=c.error,p.scopeNames=c.scopeNames,p.template=s,p.templateFunction=c.templateFunction}for(var u=e.firstChild;u;){if(!r.filter||r.filter(u)){var _=this.compileDomNodeTemplate(u,t,P()({},r,{ignoreComponents:r.ignoreNestedComponents}));_&&l.push(_)}u=u.nextSibling}return p},r.evaluateCompiledDomNodeTemplate=function(e,t){var r=e.domNode,n=e.error,i=e.templateFunction,o=e.scopeNames;if(!i||!o)return null;if(n)return L.warn("Error occurred during compiling node content:",n),null;var s=null;try{s=i.apply(void 0,o.map((function(e){return t[e]})))}catch(n){L.warn('Error occurred when "'+this.self._name+'" is running','"'+String(i)+'": with bound','names "'+o.join('", "')+'":','"'+n+'". Rendering node:',r)}return s},r.evaluateDomNodeTemplate=function(e,t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r={});var i=(r=P()({domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe},r)).domNodeTemplateCache;if(!i.has(e)){var o={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,o);s&&i.set(e,s)}if(i.has(e)){var a=i.get(e),l=this.evaluateCompiledDomNodeTemplate(a,t);if(null!==l&&(r.unsafe&&e.innerHTML?e.innerHTML=l:e.textContent=l),a.children.length){var p=function(e){for(var r,i=N(e);!(r=i()).done;){var o=r.value,s=n.evaluateCompiledDomNodeTemplate(o,t);null!==s&&(o.domNode.textContent=s),o.children.length&&p(o.children)}};p(a.children)}}r.applyBindings&&this.applyBindings(e,t)},r.addSecureEventListener=function(e,t,r,n,i){var o=this;this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);var s=this.domNodeEventBindings.get(e),a=s.get(t);a&&a!==r&&a();var l=function(){e.removeEventListener(t,r,i),s.delete(t),0===s.size&&o.domNodeEventBindings.delete(e)};return s.set(t,l),e.addEventListener(t,r,n),l},r.determineRootBinding=function(){for(var e=this.parentNode;e;){var r=e instanceof t||e.nodeName.includes("-")&&"#document-fragment"!==e.nodeName,n=null===e.parentNode&&"[object ShadowRoot]"===e.toString();r?(this.rootInstance===this&&(this.parentInstance=e,this.setPropertyValue("isRoot",!1)),this.rootInstance=e):n&&this.setPropertyValue("isRoot",!1),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,i=new Map,o=N(n);!(r=o()).done;){var s=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,s)&&i.set(s,t.propertyTypes[s])}return i}return(0,D.convertPlainObjectToMap)(e)},r.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},r.attachExplicitDefinedOutputEventHandler=function(){var e=this;if(!this.self.eventToPropertyMapping)return!1;for(var t=!1,r=function(){var r=i[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,y()(C().mark((function t(){var n,i,o,s,a=arguments;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,i=new Array(n),o=0;o<n;o++)i[o]=a[o];return t.next=1,e.reflectEventToProperties(r,i);case 1:(s=t.sent)&&(i[0]=s),e.forwardEvent(r,i);case 2:case"end":return t.stop()}}),t)})))))},n=0,i=Object.keys(this.self.eventToPropertyMapping);n<i.length;n++)r();return t},r.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=i[n],o=r[0],s=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,o)||![M.func,"function"].includes(s)||t.self.renderProperties.includes(o)||(t.outputEventNames.add(o),t.setInternalPropertyValue(o,(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e&&t.reflectEventToProperties(o,n),t.forwardEvent(o,n)})))},n=0,i=Object.entries(this.self.propertyTypes);n<i.length;n++)r()},r.triggerOutputEvents=function(){for(var e,t=N(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},r.forwardEvent=function(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,D.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},r.applySlots=function(e,r){for(var n=this,i=0,o=Array.from(e.querySelectorAll("slot"));i<o.length;i++){var s=o[i],a=s.getAttribute("name");if(null===a||"default"===a)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var l,p=N(this.slots.default);!(l=p()).done;){var c=l.value;this.evaluateDomNodeTemplate(c,r)}(0,D.replace)(s,this.slots.default,t.trimSlots)}}else this.slots.default=(0,D.unwrap)(s).map((function(e){return n.grabSlotContent(e)}));else this.slots[a]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[a],r),(0,D.replace)(s,this.slots[a],t.trimSlots)):this.slots[a]=this.grabSlotContent((0,D.unwrap)(s).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},r.grabSlotContent=function(e){var t,r=M.node.firstElementChild?e:null;if(r&&"textarea"===(null==(t=r.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!r.firstElementChild.hasAttribute("data-no-template")||"false"===r.firstElementChild.getAttribute("data-no-template"))){var n=r.firstElementChild.value;r.classList.remove("web-component-template");var i=r.cloneNode();return r.classList.add("web-component-template"),i.innerHTML="",i.template=n,i}return this.self.cloneSlots?e.cloneNode(!0):e},r.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n,i=r[t],o=i.parentNode,s=!0;o;){if(o.nodeName.includes("-")){o===this&&(s=!1);break}o=o.parentNode}if(!s){var a=null==(n=i.getAttribute("slot"))?void 0:n.trim();this.slots[null!=a?a:i.nodeName.toLowerCase()]=this.grabSlotContent(i)}}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},r.isStateProperty=function(e){var t;return Boolean((null==(t=this.instance)||null==(t=t.current)?void 0:t.state)&&(Object.prototype.hasOwnProperty.call(this.instance.current.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},r.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=P()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],i=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,i)||(this.self._propertyAliasIndex[i]=n)}}},r.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n,i=r[t],o=i[0],s=i[1];if(this.setExternalPropertyValue(o,s),this.isConnected){var a=(0,D.camelCaseToDelimited)(o);if(null!=(n=this.self._propertiesToReflectAsAttributes)&&n.has(o))switch(this.self._propertiesToReflectAsAttributes.get(o)){case M.boolean:case"boolean":s?""!==this.getAttribute(a)&&this.setAttribute(a,""):this.hasAttribute(a)&&this.removeAttribute(a);break;case M.func:case"function":break;case"json":if(s){var l=JSON.stringify(s);if(l&&this.getAttribute(a)!==l){this.setAttribute(a,l);break}}this.hasAttribute(a)&&this.removeAttribute(a);break;case M.number:case"number":if("number"!=typeof s||isNaN(s))this.hasAttribute(a)&&this.removeAttribute(a);else{var p=String(s);this.getAttribute(a)!==p&&this.setAttribute(a,p)}break;case M.string:case"string":s?this.getAttribute(a)!==s&&this.setAttribute(a,s):this.hasAttribute(a)&&this.removeAttribute(a);break;case M.any:case M.array:case M.arrayOf:case M.element:case M.elementType:case M.instanceOf:case M.node:case M.object:case"object":case M.objectOf:case M.shape:case M.exact:case M.symbol:default:if(s){var c=(0,D.represent)(s);if(c&&this.getAttribute(a)!==c){this.setAttribute(a,c);break}}this.hasAttribute(a)&&this.removeAttribute(a)}}}this.ignoreAttributeUpdateObservations=!1},r.reflectProperties=function(e){var t,r;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(t=t.current)&&t.state&&"object"==typeof this.instance.current.state)for(var n,i=N(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(n=i()).done;){var o=n.value;Object.prototype.hasOwnProperty.call(this.internalProperties,o)&&this.setInternalPropertyValue(o,void 0)}null!=(r=this.internalProperties.model)&&r.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var s,a=N(this.self.controllableProperties);!(s=a()).done;){var l=s.value;Object.prototype.hasOwnProperty.call(e,l)&&this.setInternalPropertyValue(l,e[l])}},r.reflectEventToProperties=function(){var e=y()(C().mark((function e(t,r){var n,i,o,s,a,l,p,c,u,_,d,h,f,m,b,y,v;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,i=null,o=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&(0,D.isFunction)(this.self.eventToPropertyMapping[t]))){e.next=4;break}if(!((a=(s=this.self.eventToPropertyMapping)[t].apply(s,r.concat([this])))&&"then"in a&&(0,D.isFunction)(a.then))){e.next=2;break}return e.next=1,a;case 1:v=e.sent,e.next=3;break;case 2:v=a;case 3:l=v,o=!0,Array.isArray(l)?(i=l[0],this.reflectProperties(i),(0,D.extend)(!0,this.internalProperties,l[1])):null===l?o=!1:"object"==typeof l&&(i=l,this.reflectProperties(l));case 4:if(!o&&r.length>0&&(0,D.isObject)(r[0])){if(c=r[0],"persist"in r[0]&&(0,D.isFunction)(r[0].persist))for(c={},u=0,_=Object.keys(this.self.propertyTypes);u<_.length;u++)for(d=_[u],h=N([d].concat(null!==(m=this.getPropertyAlias(d))&&void 0!==m?m:[]));!(f=h()).done;)b=f.value,(y=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,b)?r[0].currentTarget[b]:this.getPropertyValue(b))!==this.externalProperties[b]&&(c[b]=y);else[null,void 0].includes(null==(p=c.detail)?void 0:p.value)||(c=P()({},c.detail));i=c,this.reflectProperties(c)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),i=n?e.substring(1):e,o=(0,D.delimitedToCamelCase)(i),s=this.getPropertyAlias(o);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(o=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,o)){var a=this.self.propertyTypes[o];if(n){if(t){var l=(0,D.evaluate)(t,P()({},D.UTILITY_SCOPE),!1,!0,this);l.error?(L.warn("Failed to process pre-evaluation attribute",'"'+e+'": '+l.error+". Will be",'set to "undefined".'),this.setInternalPropertyValue(o,void 0)):(this.setInternalPropertyValue(o,l.result),this.setExternalPropertyValue(o,l.result))}}else switch(a){case M.boolean:case"boolean":var p=![null,"false"].includes(t);this.setInternalPropertyValue(o,p),this.setExternalPropertyValue(o,p);break;case M.func:case"function":var c,u=null,_=["data","event","firstArgument","firstParameter","options"];if(t){var d=(0,D.compile)(t,_.concat("parameters","scope",D.UTILITY_SCOPE_NAMES),!0,!0,this);u=d.error,c=d.templateFunction,u&&L.warn("Failed to compile given handler",'"'+e+'": '+u+".")}this.setInternalPropertyValue(o,(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];r.outputEventNames.has(o)&&r.reflectEventToProperties(o,i);var a=void 0;if(!u){for(var l=P()({parameters:i},D.UTILITY_SCOPE),p=0,d=_;p<d.length;p++){var h=d[p];l[h]=i[0]}try{a=null==c?void 0:c.apply(void 0,_.map((function(e){return l[e]})).concat([i,l],D.UTILITY_SCOPE_NAMES.map((function(e){return D.UTILITY_SCOPE[e]}))))}catch(r){L.warn("Failed to evaluate function",'"'+e+'" with expression','"'+t+'" and scope',"variables",'"'+_.join('", "')+'" set to','"'+(0,D.represent)(i)+'":',r+". Set property",'to "undefined".')}}return r.self.renderProperties.includes(o)||r.forwardEvent(o,i),a})),u||this.setExternalPropertyValue(o,c);break;case"json":if(t){var h;try{h=JSON.parse(t)}catch(u){L.warn("Error occurred during parsing given json",'attribute "'+e+'":',(0,D.represent)(u));break}this.setInternalPropertyValue(o,h),this.setExternalPropertyValue(o,(0,D.copy)(h,!1,1))}else this.setInternalPropertyValue(o,null),this.setExternalPropertyValue(o,null);break;case M.number:case"number":if(null===t){this.setInternalPropertyValue(o,t),this.setExternalPropertyValue(o,t);break}var f=parseFloat(t);isNaN(f)&&(f=void 0),this.setInternalPropertyValue(o,f),this.setExternalPropertyValue(o,f);break;case M.string:case"string":this.setInternalPropertyValue(o,t),this.setExternalPropertyValue(o,t);break;case M.any:case M.array:case M.arrayOf:case M.element:case M.elementType:case M.instanceOf:case M.node:case M.object:case"object":case M.objectOf:case M.oneOf:case M.oneOfType:case M.shape:case M.exact:case M.symbol:default:if(t){var m=(0,D.evaluate)(t,{},!1,!0,this);if(m.error){L.warn("Error occurred during processing given",'attribute configuration "'+e+'":',m.error);break}this.setInternalPropertyValue(o,m.result),this.setExternalPropertyValue(o,(0,D.copy)(m.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(o,!0),this.setExternalPropertyValue(o,!0)):(this.setInternalPropertyValue(o,null),this.setExternalPropertyValue(o,null))}}},r.waitForNestedComponentRendering=function(){var e=y()(C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.childComponentInstances){e.next=1;break}return e.abrupt("return");case 1:return e.next=2,Promise.all(this.childComponentInstances.map((function(e){return e.renderState.pending?e.renderState.promise:Promise.resolve()})));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),r.resolveRenderingPromiseIfSet=function(){var e=y()(C().mark((function e(t,r){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=2;break}return e.next=1,this.waitForNestedComponentRendering();case 1:this.renderState.pending=!1,this.renderState.resolve(t),this.prepareNewRenderingPromise();case 2:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.prepareNewRenderingPromise=function(){var e=this;this.renderState.pending||(this.renderState.promise=new Promise((function(t){e.renderState.resolve=function(r){e.renderState.pending=!1,t(r)}})))},r.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,D.timeout)((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},r.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,D.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))},r.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=P()({},(null==(t=this.parentInstance)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this})[(0,D.lowerCase)(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},r.render=function(){var e=y()(C().mark((function e(t,r){var n,i,o=this;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t="unknown"),void 0===r&&(r=!0),this.unRender("reRender",t),this.childComponentInstances=[],this.renderState.pending=!0,!this.isRoot){e.next=3;break}return e.next=1,this.resolveRenderingPromiseIfSet(t,r);case 1:if(!r){e.next=3;break}return e.next=2,Promise.all(this.self.pendingRenderPromises);case 2:this.self.pendingRenderPromises=[];case 3:if(this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),this.self.doRender&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:t,scope:this.scope}}))){e.next=5;break}return e.next=4,this.resolveRenderingPromiseIfSet(t,r);case 4:return e.abrupt("return");case 5:if(!(n=(0,D.evaluate)("`"+this.self.content+"`",this.scope)).error){e.next=7;break}return L.warn("Failed to process template: "+n.error),this.renderState.resolve(t),e.next=6,Promise.all(this.self.pendingRenderPromises);case 6:return e.abrupt("return");case 7:return this.applyShadowRootIfNotExisting(),(i=document.createElement("div")).innerHTML=n.result,this.applySlots(i,P()({},this.scope,{parentInstance:this})),this.hostDomNode.innerHTML=i.innerHTML,e.next=8,(0,D.timeout)();case 8:return this.waitForNestedComponentRendering().then((function(){o.applyBindings(o.hostDomNode.firstChild,o.scope,o.self.renderSlots)})),e.next=9,this.resolveRenderingPromiseIfSet(t,r);case 9:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),r.unRender=function(e,t){void 0===e&&(e="unknown"),this.unregisterDomNodeEventBindings()},t}(x),m.applyRootBinding=!0,m.pendingRenderPromises=[],m.content="<slot>Please provide a template to transclude.</slot>",m.determineRootBinding=!0,m.shadowDOM=null,m.observedAttributes=[],m.controllableProperties=[],m.eventToPropertyMapping={},m.propertyAliases={},m.propertyTypes={onClick:M.func},m.propertiesToReflectAsAttributes=[],m.renderProperties=["children"],m.doRender=!1,m.cloneSlots=!1,m.evaluateSlots=!1,m.renderSlots=!0,m.trimSlots=!0,m.renderUnsafe=!1,m._name="BaseWeb",m._propertyAliasIndex=void 0,m._propertiesToReflectAsAttributes=void 0,h=m,f=R()(h.prototype,"isRoot",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),h),W={component:U,register:function(e){void 0===e&&(e=(0,D.camelCaseToDelimited)(U._name)),customElements.define(e,U)}};return _.default=U,_}())},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__8__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__9__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__10__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__11__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__12__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__13__}],__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReactWeb:()=>ReactWeb,api:()=>api,default:()=>ReactWeb_0,log:()=>log});var clientnode__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),clientnode__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_0__),clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),clientnode_property_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(11),react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(12),react_dom__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__),react_dom_client__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),react_dom_client__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(react_dom_client__WEBPACK_IMPORTED_MODULE_4__),_Web__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(7),_Web__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_Web__WEBPACK_IMPORTED_MODULE_5__);const log=new clientnode__WEBPACK_IMPORTED_MODULE_0__.Logger({name:"web-component-wrapper-web"});class ReactWeb extends(_Web__WEBPACK_IMPORTED_MODULE_5___default()){constructor(...e){super(...e),this.unmountOnDisconnect=!0,this.compiledSlots={},this.preparedSlots={},this.reactRoot=null,this.rootReactInstance=null,this.self=ReactWeb,this.wrapMemorizingWrapper=null,this.isWrapped=!1,this.reflectInstanceProperties=()=>{this.instance?.current&&this.instance.current.properties&&this.reflectProperties(this.instance.current.properties)}}connectedCallback(){this.applyComponentWrapper(),this.rootReactInstance=this,super.connectedCallback()}disconnectedCallback(){this.unRender("disconnected"),this.unmountOnDisconnect&&this.reactRoot?.unmount(),this.unregisterConnectionState()}reflectExternalProperties(e){this.isRoot&&super.reflectExternalProperties(e)}async render(e="unknown",t=!0){if(super.unRender("reRender",e),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(this.self.pendingRenderPromises=[]),this.self.pendingRenderPromises.push(this.renderState.promise),this.rootReactInstance!==this||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return this.resolveRenderingPromiseIfSet(e,t);if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots({...this.scope,parentInstance:this}),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.rootInstance!==this&&!this.reactRoot){let e=this.firstChild;for(;e;){const t=e.nextSibling;this.removeChild(e),e=t}}if(!this.reactRoot){const e=this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name;let t="";"string"==typeof e&&(t=e),this.reactRoot=(0,react_dom_client__WEBPACK_IMPORTED_MODULE_4__.createRoot)(this.hostDomNode,{identifierPrefix:t})}(0,react_dom__WEBPACK_IMPORTED_MODULE_3__.flushSync)((()=>{this.reactRoot?.render((0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(this.self.content,this.internalProperties)),this.resolveRenderingPromiseIfSet(e,t)})),t&&await this.renderState.promise}setPropertyValue(e,t){this.reflectProperties({[e]:(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.copy)(t,!1,1)}),this.setInternalPropertyValue(e,(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.copy)(t,!1,1))}setInternalPropertyValue(e,t){null===t?t=clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__.NullSymbol:void 0===t&&(t=clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__.UndefinedSymbol),super.setInternalPropertyValue(e,t)}preCompileDomNodes(e,t={},r=!1){if(1===(e=e.filter((e=>e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()))).length)return this.preCompileDomNode(e[0],t,r);let n=1;const i=[];for(const o of e){const e=this.preCompileDomNode(o,t,r,n.toString());i.push(e),n+=1}return r?e=>(...t)=>{const r=[];for(const n of i){const i=n(e);"function"==typeof i&&r.push(i(...t))}return(0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(react__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:r})}:i}preCompileDomNode(e,t={},r=!1,n){if(r){const r=this.preCompileDomNode(e,{...t,data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0},!1,n);return e=>(...t)=>{const n=t.length>0?t[0]:null;return r({...e,data:n,firstArgument:n,firstParameter:n,options:n,scope:n,parameters:t})}}if(e.nodeType===Node.TEXT_NODE){const t="string"==typeof e.nodeValue?e.nodeValue.trim():"",r=n&&t?(0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(react__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:t,key:n}):t||null;return()=>r}if(!e.getAttributeNames)return()=>null;const i={};let o;const s=this.self.isReactComponent(e);s?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),n&&!Object.prototype.hasOwnProperty.call(i,"key")&&(i.key=n),o=e.constructor.content):(i.key=n,o=e.tagName.toLowerCase());let a=Object.keys(t);const l={};for(const r of e.getAttributeNames()){let n=e.getAttribute(r);if(null===n)continue;let o=!1,p="";if(r.startsWith("data-bind-")?p=r.substring(10):r.startsWith("bind-")&&(p=r.substring(5)),p.startsWith("attribute-")||"attributes"===p||p.startsWith("property-")||"properties"===p){const{error:t,originalScopeNames:i,templateFunction:s}=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.compile)(n,a);if(t){log.warn("Error occurred during compiling given attribute",`binding "${r}" on node:`,e,t);continue}"attributes"===p||"properties"===p?o=!0:p=p.startsWith("attribute-")?p.substring(10):p.substring(9),n={originalScopeNames:i,templateFunction:s.bind(this)}}else if(p.startsWith("on-")){p=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.delimitedToCamelCase)(p),Object.prototype.hasOwnProperty.call(t,"event")||(a=[...a,"event"]),Object.prototype.hasOwnProperty.call(t,"parameters")||(a=[...a,"parameters"]);const{error:i,originalScopeNames:o,scopeNames:s,templateFunction:l}=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.compile)(n,a,!0);if(i){log.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,i);continue}const c=l.bind(this);n=(...i)=>{t.event=i[0],t.parameters=i;try{c(...o.map((e=>t[e])))}catch(t){log.warn("Error occurred during processing given",`event binding "${r}" on node: `,e,`Given expression "${n}" could`,"not be evaluated with given scope names",`"${s.join('", "')}":`,(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.represent)(t))}}}else p=r;const c={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(c,p)&&(p=c[p]),p=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.delimitedToCamelCase)(p),n?.originalScopeNames?l[o?"":p]=n:s||(i[p]=n)}if(!s){const r=Array.from(e.childNodes);r.length&&(i.children=this.preCompileDomNodes(r,t))}return r=>{(r={...t,...r}).scope=r;let n={...i};for(const[e,{originalScopeNames:t,templateFunction:i}]of Object.entries(l)){const o=i(...t.map((e=>r[e])));""===e?n={...n,...o}:n[e]=o}return Object.prototype.hasOwnProperty.call(n,"innerHTML")&&(n.dangerouslySetInnerHTML={__html:n.innerHTML},delete n.children,delete n.innerHTML),Object.prototype.hasOwnProperty.call(n,"textContent")?(n.children=n.textContent,delete n.textContent):s?(n={...e.internalProperties,...n},r={...n,...r,parentInstance:e},e.evaluateSlots(r),e.prepareProperties(n)):n.children&&(n.children=this.evaluatePreCompiledDomNodes(n.children,r)),(0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(o,n)}}evaluatePreCompiledDomNodes(e,t={}){if(!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);const r=[];for(const n of e){const e=n(t);e&&r.push(e)}return r}preCompileSlots(){for(const e in this.slots)this.slots[e]&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],{...this.scope,parentInstance:this},[clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__.func,"function"].includes(this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,{...this.scope,parentInstance:this},[clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__.func,"function"].includes(this.self.propertyTypes.children)))}evaluateSlots(e){this.preparedSlots={};for(const t in this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))}static isReactComponent(e){const t=e.constructor;return"object"==typeof t.content&&(!t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)}determineRootBinding(){super.determineRootBinding();let e=this.parentNode;for(;e;){if(this.self.isReactComponent(e)){this.rootReactInstance=e;break}e=e.parentNode}}applyComponentWrapper(){if("string"==typeof this.self.content||this.isWrapped)return;this.isWrapped=!0;const e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,react__WEBPACK_IMPORTED_MODULE_2__.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(((t,r)=>((0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(r,(()=>({properties:t})),[t]),(0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(e,t)))),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,react__WEBPACK_IMPORTED_MODULE_2__.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,react__WEBPACK_IMPORTED_MODULE_2__.memo)(this.self.content),this.self.content.wrapped=e)}prepareProperties(e){(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.extend)(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,react__WEBPACK_IMPORTED_MODULE_2__.createRef)(),e.ref=e=>{this.instance?this.instance.current=e:this.instance={current:e},this.reflectInstanceProperties()})}static removeKnownUnwantedPropertyKeys(e,t){if("string"!=typeof e.content)for(const r of["isRoot","isTrusted","__composed"])Object.prototype.hasOwnProperty.call(t,r)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,r)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,r))&&delete t[r]}}ReactWeb.attachWebComponentAdapterIfNotExists=!0,ReactWeb.content="div",ReactWeb.react=react__WEBPACK_IMPORTED_MODULE_2___default(),ReactWeb._name="ReactWebComponent";const api={component:ReactWeb,register:(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.camelCaseToDelimited)(ReactWeb._name))=>{customElements.define(e,ReactWeb)}},ReactWeb_0=ReactWeb;return __webpack_exports__})()));
|