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/Web.d.ts
DELETED
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
import { KnownEventName, KnownWindowEventMap, Logger, Mapping } from 'clientnode';
|
|
2
|
-
import { AttributesReflectionConfiguration, CompiledDomNodeTemplateItem, CompilerOptions, ComponentAdapter, DomNodeToCompiledTemplateMap, EventCallbackMapping, EventToPropertyMapping, NormalizedAttributesReflectionConfiguration, PropertiesConfiguration, RenderState, ScopeDeclaration, WebComponentAPI } from './type';
|
|
3
|
-
export declare const log: Logger;
|
|
4
|
-
export declare const GenericHTMLElement: typeof HTMLElement;
|
|
5
|
-
/**
|
|
6
|
-
* Generic web component to render a content against instance-specific values.
|
|
7
|
-
* @property applyRootBinding - If determined itself as root declarative event
|
|
8
|
-
* and property bindings will be applied to itself.
|
|
9
|
-
* @property content - Content to render when changes happened.
|
|
10
|
-
* @property determineRootBinding - If checked this component determines if it
|
|
11
|
-
* is a root component (not wrapped by another web-component).
|
|
12
|
-
* @property shadowDOM - Configures if a shadow dom should be used during
|
|
13
|
-
* web-component instantiation. Can hold initialize configuration.
|
|
14
|
-
* @property observedAttributes - Attribute names to observe for changes.
|
|
15
|
-
* @property controllableProperties - A list of controllable property names.
|
|
16
|
-
* @property eventToPropertyMapping - Explicitly defined output events (a
|
|
17
|
-
* mapping of event names to a potential parameter to properties-transformer).
|
|
18
|
-
* @property propertyAliases - A mapping of property names to be treated as
|
|
19
|
-
* equal.
|
|
20
|
-
* @property propertyTypes - Configuration defining how to convert attributes
|
|
21
|
-
* into properties and reflect property changes back to attributes.
|
|
22
|
-
* @property propertiesToReflectAsAttributes - An Item, List, or Mapping of
|
|
23
|
-
* properties to reflect as attributes.
|
|
24
|
-
* @property renderProperties - List of known render properties.
|
|
25
|
-
* @property cloneSlots - Indicates whether to clone slot before to transclude
|
|
26
|
-
* content into them. If a slot should be used multiple times (for example,
|
|
27
|
-
* when it works as a template node.) they should be copied to avoid unexpected
|
|
28
|
-
* mutations.
|
|
29
|
-
* @property doRender - Configures whether this component instance should
|
|
30
|
-
* evaluate its given body content.
|
|
31
|
-
* @property evaluateSlots - Indicates whether to evaluate slot content when
|
|
32
|
-
* before rendering them.
|
|
33
|
-
* @property renderSlots - Indicates whether determined slots should be
|
|
34
|
-
* rendered into root node.
|
|
35
|
-
* @property trimSlots - Ignore empty text nodes while applying slots.
|
|
36
|
-
* @property renderUnsafe - Defines default render behavior.
|
|
37
|
-
* @property _name - Name to access instance-evaluated content or used
|
|
38
|
-
* to derive default component name. This is also useful for logging.
|
|
39
|
-
* @property _propertyAliasIndex - Internal alias index to quickly match
|
|
40
|
-
* properties in both directions.
|
|
41
|
-
* @property _propertiesToReflectAsAttributes - A mapping of property names to
|
|
42
|
-
* set as attributes when they are set/updated. Uses a map to hold order and
|
|
43
|
-
* determine if a property exists in constant runtime.
|
|
44
|
-
* @property renderState - Holds data about currently running render state.
|
|
45
|
-
* @property renderState.promise - Promise resolving when next rendering has
|
|
46
|
-
* been finished.
|
|
47
|
-
* @property renderState.pending - Indicates whether a rendering task is
|
|
48
|
-
* performing.
|
|
49
|
-
* @property renderState.resolve - Callback to trigger when rendering has been
|
|
50
|
-
* finished.
|
|
51
|
-
* @property childComponentInstances - List of direct child components (needed
|
|
52
|
-
* to wait for them to finish dom manipulation).
|
|
53
|
-
* @property batchAttributeUpdates - Indicates whether to directly update dom
|
|
54
|
-
* after each attribute mutation or to wait and batch mutations after current
|
|
55
|
-
* queue has been finished.
|
|
56
|
-
* @property batchPropertyUpdates - Indicates whether to directly update dom
|
|
57
|
-
* after each property mutation or to wait and batch mutations after current
|
|
58
|
-
* queue has been finished.
|
|
59
|
-
* @property batchUpdates - Indicates whether to directly perform a
|
|
60
|
-
* re-rendering after changes on properties have been made.
|
|
61
|
-
* @property batchedAttributeUpdateRunning - A boolean indicator to identify if
|
|
62
|
-
* an attribute update is currently batched.
|
|
63
|
-
* @property batchedPropertyUpdateRunning - A boolean indicator to identify if
|
|
64
|
-
* a property update is currently batched.
|
|
65
|
-
* @property batchedUpdateRunning - Indicates whether a batched render update
|
|
66
|
-
* is currently running.
|
|
67
|
-
* @param connectionRegistered - Indicates whether this component is connected
|
|
68
|
-
* to DOM and could run its connectedCallback.
|
|
69
|
-
* @param pendingAttributeUpdates - Holds pending attribute updates which
|
|
70
|
-
* should be performed when the component is connected to DOM.
|
|
71
|
-
* @property parentInstance - Parent component instance.
|
|
72
|
-
* @property rootInstance - Root component instance.
|
|
73
|
-
* @property scope - Render scope.
|
|
74
|
-
* @property domNodeEventBindings - Holds a mapping from nodes with registered
|
|
75
|
-
* event handlers mapped to their deregistration function.
|
|
76
|
-
* @property domNodeTemplateCache - Caches template compilation results.
|
|
77
|
-
* @property externalProperties - Holds currently evaluated or seen properties.
|
|
78
|
-
* @property ignoreAttributeUpdateObservations - Indicates whether attribute
|
|
79
|
-
* updates should be considered (usually only needed internally).
|
|
80
|
-
* @property internalProperties - Holds currently evaluated properties which
|
|
81
|
-
* are owned by this instance and should always be delegated.
|
|
82
|
-
* @property outputEventNames - Set of determined output event names.
|
|
83
|
-
* @property instance - Wrapped component instance.
|
|
84
|
-
* @property isRoot - Indicates whether their exists another web-derived
|
|
85
|
-
* component up the tree or not.
|
|
86
|
-
* @property root - Hosting dom node.
|
|
87
|
-
* @property runDomConnectionAndRenderingInSameEventQueue - Indicates whether
|
|
88
|
-
* we should render initial dom immediately after the component is connected to
|
|
89
|
-
* dom. Deactivating this allows wrapped components to detect their parents
|
|
90
|
-
* since their parent-connected callback will be called before the children's
|
|
91
|
-
* render method.
|
|
92
|
-
* @property self - Back-reference to this class.
|
|
93
|
-
* @property slots - Grabbed slots that where present in the connecting phase.
|
|
94
|
-
*/
|
|
95
|
-
export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapping<unknown> = Mapping<unknown>, InternalProperties extends Mapping<unknown> = Mapping<unknown>> extends GenericHTMLElement {
|
|
96
|
-
static applyRootBinding: boolean;
|
|
97
|
-
static pendingRenderPromises: Array<Promise<string>>;
|
|
98
|
-
static content: unknown;
|
|
99
|
-
static determineRootBinding: boolean;
|
|
100
|
-
static shadowDOM: (boolean | null | {
|
|
101
|
-
delegateFocus?: boolean;
|
|
102
|
-
mode: 'closed' | 'open';
|
|
103
|
-
});
|
|
104
|
-
static observedAttributes: Array<string>;
|
|
105
|
-
static controllableProperties: Array<string>;
|
|
106
|
-
static eventToPropertyMapping: EventToPropertyMapping | null;
|
|
107
|
-
static propertyAliases: Mapping;
|
|
108
|
-
static propertyTypes: PropertiesConfiguration;
|
|
109
|
-
static propertiesToReflectAsAttributes: AttributesReflectionConfiguration;
|
|
110
|
-
static renderProperties: Array<string>;
|
|
111
|
-
static doRender: boolean;
|
|
112
|
-
static cloneSlots: boolean;
|
|
113
|
-
static evaluateSlots: boolean;
|
|
114
|
-
static renderSlots: boolean;
|
|
115
|
-
static trimSlots: boolean;
|
|
116
|
-
static renderUnsafe: boolean;
|
|
117
|
-
static _name: string;
|
|
118
|
-
static _propertyAliasIndex?: Mapping;
|
|
119
|
-
static _propertiesToReflectAsAttributes?: NormalizedAttributesReflectionConfiguration;
|
|
120
|
-
renderState: RenderState;
|
|
121
|
-
childComponentInstances: Array<Web> | undefined;
|
|
122
|
-
batchAttributeUpdates: boolean;
|
|
123
|
-
batchPropertyUpdates: boolean;
|
|
124
|
-
batchUpdates: boolean;
|
|
125
|
-
batchedAttributeUpdateRunning: boolean;
|
|
126
|
-
batchedPropertyUpdateRunning: boolean;
|
|
127
|
-
batchedUpdateRunning: boolean;
|
|
128
|
-
connectionRegistered: boolean;
|
|
129
|
-
pendingAttributeUpdates: Array<() => void>;
|
|
130
|
-
parentInstance: null | Web;
|
|
131
|
-
rootInstance: Web;
|
|
132
|
-
hostDomNode: ShadowRoot | Web<TElement, ExternalProperties, InternalProperties>;
|
|
133
|
-
scope: Mapping<unknown>;
|
|
134
|
-
domNodeEventBindings: Map<Node | Window, EventCallbackMapping>;
|
|
135
|
-
domNodeTemplateCache: DomNodeToCompiledTemplateMap;
|
|
136
|
-
externalProperties: ExternalProperties;
|
|
137
|
-
ignoreAttributeUpdateObservations: boolean;
|
|
138
|
-
internalProperties: InternalProperties;
|
|
139
|
-
outputEventNames: Set<string>;
|
|
140
|
-
instance: null | {
|
|
141
|
-
current?: ComponentAdapter;
|
|
142
|
-
};
|
|
143
|
-
isRoot: boolean;
|
|
144
|
-
runDomConnectionAndRenderingInSameEventQueue: boolean;
|
|
145
|
-
readonly self: typeof Web;
|
|
146
|
-
slots: Mapping<HTMLElement | undefined> & {
|
|
147
|
-
default?: Array<Node>;
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Initializes host dom content and properties.
|
|
151
|
-
* @returns Nothing.
|
|
152
|
-
*/
|
|
153
|
-
constructor();
|
|
154
|
-
/**
|
|
155
|
-
* Triggered when ever a given attribute has changed and triggers to update
|
|
156
|
-
* configured dom content.
|
|
157
|
-
* @param name - Attribute name which was updates.
|
|
158
|
-
* @param oldValue - Old attribute value.
|
|
159
|
-
* @param newValue - New updated value.
|
|
160
|
-
*/
|
|
161
|
-
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
162
|
-
/**
|
|
163
|
-
* Updates given attribute representation.
|
|
164
|
-
* @param name - Attribute name which was updates.
|
|
165
|
-
* @param newValue - New updated value.
|
|
166
|
-
* @returns Promise resolving when attribute has been updated.
|
|
167
|
-
*/
|
|
168
|
-
onUpdateAttribute(name: string, newValue: string): Promise<void>;
|
|
169
|
-
/**
|
|
170
|
-
* Triggered when this component is mounted into the document.
|
|
171
|
-
* Attaches event handler, grabs given slots, reflects external properties,
|
|
172
|
-
* and enqueues first rendering.
|
|
173
|
-
*/
|
|
174
|
-
connectedCallback(): void;
|
|
175
|
-
/**
|
|
176
|
-
* Triggered when this component is unmounted from the document. Event
|
|
177
|
-
* handlers will be removed and state updated accordingly.
|
|
178
|
-
*/
|
|
179
|
-
disconnectedCallback(): void;
|
|
180
|
-
/**
|
|
181
|
-
* Registers needed getter and setter to get notified about changes and
|
|
182
|
-
* reflect them.
|
|
183
|
-
*/
|
|
184
|
-
defineGetterAndSetterInterface(): void;
|
|
185
|
-
/**
|
|
186
|
-
* Creates an index to match alias source and target against each other on
|
|
187
|
-
* constant runtime.
|
|
188
|
-
* @param name - Name to search an alternate name for.
|
|
189
|
-
* @returns Found alias or "null".
|
|
190
|
-
*/
|
|
191
|
-
getPropertyAlias(name: string): null | string;
|
|
192
|
-
/**
|
|
193
|
-
* Generic property getter. Forwards properties from the "properties"
|
|
194
|
-
* field.
|
|
195
|
-
* @param name - Property name to retrieve.
|
|
196
|
-
* @returns Retrieved property value.
|
|
197
|
-
*/
|
|
198
|
-
getPropertyValue(name: string): unknown;
|
|
199
|
-
/**
|
|
200
|
-
* External property setter. Respects configured aliases.
|
|
201
|
-
* @param name - Property name to write.
|
|
202
|
-
* @param value - New value to write.
|
|
203
|
-
*/
|
|
204
|
-
setExternalPropertyValue(name: string, value: unknown): void;
|
|
205
|
-
/**
|
|
206
|
-
* Internal property setter. Respects configured aliases.
|
|
207
|
-
* @param name - Property name to write.
|
|
208
|
-
* @param value - New value to write.
|
|
209
|
-
*/
|
|
210
|
-
setInternalPropertyValue(name: string, value: unknown): void;
|
|
211
|
-
/**
|
|
212
|
-
* Generic property setter. Forwards field writes into internal and
|
|
213
|
-
* external property representations.
|
|
214
|
-
* @param name - Property name to write.
|
|
215
|
-
* @param value - New value to write.
|
|
216
|
-
*/
|
|
217
|
-
setPropertyValue(name: string, value: unknown): void;
|
|
218
|
-
/**
|
|
219
|
-
* Triggers a new rendering cycle and respects property-specific state
|
|
220
|
-
* connection.
|
|
221
|
-
* @param name - Property name to write.
|
|
222
|
-
* @param value - New value to write.
|
|
223
|
-
*/
|
|
224
|
-
triggerPropertySpecificRendering(name: string, value: unknown): void;
|
|
225
|
-
unregisterConnectionState(): void;
|
|
226
|
-
unregisterDomNodeEventBindings(): void;
|
|
227
|
-
/**
|
|
228
|
-
* Binds properties and event handler to the given dom node.
|
|
229
|
-
* @param domNode - Node to start traversing from.
|
|
230
|
-
* @param scope - Scope to render property value again.
|
|
231
|
-
*/
|
|
232
|
-
applyBinding(domNode: Node, scope: Mapping<unknown>): void;
|
|
233
|
-
/**
|
|
234
|
-
* Binds properties and event handler to given, sibling, and nested nodes.
|
|
235
|
-
* @param domNode - Node to start traversing from.
|
|
236
|
-
* @param scope - Scope to render property value again.
|
|
237
|
-
* @param renderSlots - Indicates whether to render nested elements of
|
|
238
|
-
* slots (determined by an existing corresponding attribute).
|
|
239
|
-
*/
|
|
240
|
-
applyBindings(domNode: Node | null, scope: Mapping<unknown>, renderSlots?: boolean): void;
|
|
241
|
-
/**
|
|
242
|
-
* Compiles given node content and their children. Provides a corresponding
|
|
243
|
-
* map of compiled template functions connected to their (sub) nodes and
|
|
244
|
-
* expected scope names.
|
|
245
|
-
* @param domNode - Node to compile.
|
|
246
|
-
* @param scope - Scope to extract names from.
|
|
247
|
-
* @param options - Additional compile options.
|
|
248
|
-
* @param options.filter - Callback to exclude some node from being
|
|
249
|
-
* compiled.
|
|
250
|
-
* @param options.ignoreComponents - Indicates if component properties
|
|
251
|
-
* should be traversed or not.
|
|
252
|
-
* @param options.ignoreNestedComponents - Indicates if nested components
|
|
253
|
-
* should be traversed or not.
|
|
254
|
-
* @param options.unsafe - Indicates if full HTML generation should be
|
|
255
|
-
* allowed.
|
|
256
|
-
* @returns Map of compiled templates.
|
|
257
|
-
*/
|
|
258
|
-
compileDomNodeTemplate<NodeType extends Node = Node>(domNode: NodeType, scope?: ScopeDeclaration, options?: CompilerOptions): CompiledDomNodeTemplateItem | null;
|
|
259
|
-
/**
|
|
260
|
-
* @param options - Evaluation options.
|
|
261
|
-
* @param scope - Scope to evaluate against.
|
|
262
|
-
* @returns Evaluated string result or null.
|
|
263
|
-
*/
|
|
264
|
-
evaluateCompiledDomNodeTemplate(options: CompiledDomNodeTemplateItem, scope: Mapping<unknown>): null | string;
|
|
265
|
-
/**
|
|
266
|
-
* Compiles and evaluates given node content and their children. Replaces
|
|
267
|
-
* each node content with their evaluated representation.
|
|
268
|
-
* @param domNode - Node to evaluate.
|
|
269
|
-
* @param scope - Scope to render against.
|
|
270
|
-
* @param options - Compile options.
|
|
271
|
-
* @param options.applyBindings - Indicates whether to apply bindings to
|
|
272
|
-
* given dom nodes.
|
|
273
|
-
* @param options.filter - Callback to exclude some node from being
|
|
274
|
-
* compiled.
|
|
275
|
-
* @param options.ignoreComponents - Indicates if component properties
|
|
276
|
-
* should be traversed or not.
|
|
277
|
-
* @param options.ignoreNestedComponents - Indicates if nested components
|
|
278
|
-
* should be traversed or not.
|
|
279
|
-
* @param options.domNodeTemplateCache - Yet compiled dom nodes to just
|
|
280
|
-
* reference instead of recompiling.
|
|
281
|
-
* @param options.unsafe - Indicates if full HTML generation should be
|
|
282
|
-
* allowed.
|
|
283
|
-
*/
|
|
284
|
-
evaluateDomNodeTemplate<NodeType extends Node = Node>(domNode: NodeType, scope?: Mapping<unknown>, options?: {
|
|
285
|
-
applyBindings?: boolean;
|
|
286
|
-
domNodeTemplateCache?: DomNodeToCompiledTemplateMap;
|
|
287
|
-
filter?: (domNode: Node) => boolean;
|
|
288
|
-
ignoreComponents?: boolean;
|
|
289
|
-
ignoreNestedComponents?: boolean;
|
|
290
|
-
unsafe?: boolean;
|
|
291
|
-
}): void;
|
|
292
|
-
/**
|
|
293
|
-
* Adds an event listener to the given dom node so that it will be
|
|
294
|
-
* deregistered when the component instance is destroyed.
|
|
295
|
-
* @param domNode - Node to assign event handler to.
|
|
296
|
-
* @param name - Event name.
|
|
297
|
-
* @param handler - Callback to trigger when given event occurs.
|
|
298
|
-
* @param options - Add event listener options.
|
|
299
|
-
* @param removeOptions - Remove event listener options.
|
|
300
|
-
* @returns Deregister function.
|
|
301
|
-
*/
|
|
302
|
-
addSecureEventListener<EventName extends KnownEventName>(domNode: Node | Window, name: EventName, handler: (this: Window, event: KnownWindowEventMap[EventName]) => void, options?: boolean | AddEventListenerOptions, removeOptions?: EventListenerOptions): () => void;
|
|
303
|
-
/**
|
|
304
|
-
* Determines initial root which initializes rendering digest.
|
|
305
|
-
*/
|
|
306
|
-
determineRootBinding(): void;
|
|
307
|
-
/**
|
|
308
|
-
* Checks if given content hast code (to compile and render).
|
|
309
|
-
* @param content - Potential string with code inside.
|
|
310
|
-
* @returns A boolean indicating whether given content has code.
|
|
311
|
-
*/
|
|
312
|
-
static hasCode(content: unknown): boolean;
|
|
313
|
-
/**
|
|
314
|
-
* Converts given the list, item, or map to a map (with ordering).
|
|
315
|
-
* @param value - Attribute reflection configuration.
|
|
316
|
-
* @returns Generated map.
|
|
317
|
-
*/
|
|
318
|
-
static normalizePropertyTypeList(value: AttributesReflectionConfiguration): NormalizedAttributesReflectionConfiguration;
|
|
319
|
-
/**
|
|
320
|
-
* Attaches event handler to keep in sync with nested components properties
|
|
321
|
-
* states.
|
|
322
|
-
*/
|
|
323
|
-
attachEventHandler(): void;
|
|
324
|
-
/**
|
|
325
|
-
* Attach explicitly defined event handler to synchronize internal and
|
|
326
|
-
* external property states.
|
|
327
|
-
* @returns Returns "true" if there are some defined and "false" otherwise.
|
|
328
|
-
*/
|
|
329
|
-
attachExplicitDefinedOutputEventHandler(): boolean;
|
|
330
|
-
/**
|
|
331
|
-
* Attach implicitly defined event handler to synchronize internal and
|
|
332
|
-
* external property states.
|
|
333
|
-
* @param reflectProperties - Indicates whether implicitly determined
|
|
334
|
-
* properties should be reflected.
|
|
335
|
-
*/
|
|
336
|
-
attachImplicitDefinedOutputEventHandler(reflectProperties?: boolean): void;
|
|
337
|
-
/**
|
|
338
|
-
* Triggers all identified events to communicate internal property / state
|
|
339
|
-
* changes.
|
|
340
|
-
*/
|
|
341
|
-
triggerOutputEvents(): void;
|
|
342
|
-
/**
|
|
343
|
-
* Forwards given event as the native web event.
|
|
344
|
-
* @param name - Event name.
|
|
345
|
-
* @param parameters - Event parameters.
|
|
346
|
-
* @returns False if event is cancelable, and at least one of the event
|
|
347
|
-
* handlers which received event called "Event.preventDefault()",
|
|
348
|
-
* otherwise true will be returned.
|
|
349
|
-
*/
|
|
350
|
-
forwardEvent(name: string, parameters: Array<unknown>): boolean;
|
|
351
|
-
/**
|
|
352
|
-
* Renders component given slot contents into the given dom node. If
|
|
353
|
-
* expected slots are not given but a fallback is specified, they will be
|
|
354
|
-
* loaded into internal slot mapping.
|
|
355
|
-
* @param targetDomNode - Target dom node to render slots into.
|
|
356
|
-
* @param scope - Environment to render slots again if specified.
|
|
357
|
-
*/
|
|
358
|
-
applySlots(targetDomNode: HTMLElement, scope: Mapping<unknown>): void;
|
|
359
|
-
/**
|
|
360
|
-
* Determines slot content from the given node.
|
|
361
|
-
* @param slot - Node to grab slot content from.
|
|
362
|
-
* @returns Determined slot.
|
|
363
|
-
*/
|
|
364
|
-
grabSlotContent(slot: Node): Node;
|
|
365
|
-
/**
|
|
366
|
-
* Saves given slots.
|
|
367
|
-
*/
|
|
368
|
-
grabGivenSlots(): void;
|
|
369
|
-
/**
|
|
370
|
-
* Determines if a given property name exists in wrapped component state.
|
|
371
|
-
* @param name - Property name to check if exists in state.
|
|
372
|
-
* @returns Boolean result.
|
|
373
|
-
*/
|
|
374
|
-
isStateProperty(name: string): boolean;
|
|
375
|
-
/**
|
|
376
|
-
* Generates an alias to name and the other way around mapping if not
|
|
377
|
-
* exists.
|
|
378
|
-
*/
|
|
379
|
-
generateAliasIndex(): void;
|
|
380
|
-
/**
|
|
381
|
-
* Reflects wrapped component state back to web-component's attributes.
|
|
382
|
-
* @param properties - Properties to update in reflected attribute state.
|
|
383
|
-
*/
|
|
384
|
-
reflectExternalProperties(properties: Partial<ExternalProperties>): void;
|
|
385
|
-
/**
|
|
386
|
-
* Reflects wrapped component state back to web-component's attributes and
|
|
387
|
-
* properties.
|
|
388
|
-
* @param properties - Properties to update in reflected property state.
|
|
389
|
-
*/
|
|
390
|
-
reflectProperties(properties: Partial<ExternalProperties>): void;
|
|
391
|
-
/**
|
|
392
|
-
* Reflect the given event handler call with the given parameter back to
|
|
393
|
-
* current properties state.
|
|
394
|
-
* @param name - Event name.
|
|
395
|
-
* @param parameters - List of parameter to given event handler call.
|
|
396
|
-
* @returns Mapped properties or null if nothing could be mapped.
|
|
397
|
-
*/
|
|
398
|
-
reflectEventToProperties(name: string, parameters: Array<unknown>): Promise<Partial<ExternalProperties> | null>;
|
|
399
|
-
/**
|
|
400
|
-
* Evaluates the given property value depending on its property definition
|
|
401
|
-
* and registers in a property mapping object.
|
|
402
|
-
* @param attributeName - Name of given value.
|
|
403
|
-
* @param value - Value to evaluate.
|
|
404
|
-
*/
|
|
405
|
-
evaluateStringOrNullAndSetAsProperty(attributeName: string, value: null | string): void;
|
|
406
|
-
/**
|
|
407
|
-
* Produces a promise resolving when all nested rendering promises have
|
|
408
|
-
* been resolved. This only waits for registered nested components. That
|
|
409
|
-
* means that nested components which where connected before the parent
|
|
410
|
-
* component got initialized will not be waited for. That might happen
|
|
411
|
-
* when nested component types got registered before the parent ones.
|
|
412
|
-
*/
|
|
413
|
-
waitForNestedComponentRendering(): Promise<void>;
|
|
414
|
-
/**
|
|
415
|
-
* Resolves the rendering promise.
|
|
416
|
-
* @param reason - Rendering reason description.
|
|
417
|
-
* @param resolveRendering - Indicates whether to resolve the rendering or
|
|
418
|
-
* just return a resolving promise directly.
|
|
419
|
-
* @returns A promise resolving when all nested render promises have been
|
|
420
|
-
* resolved.
|
|
421
|
-
*/
|
|
422
|
-
resolveRenderingPromiseIfSet(reason: string, resolveRendering: boolean): Promise<void>;
|
|
423
|
-
/**
|
|
424
|
-
* Sets up a new rendering cycle representing promise.
|
|
425
|
-
*/
|
|
426
|
-
prepareNewRenderingPromise(): void;
|
|
427
|
-
/**
|
|
428
|
-
* Triggers a new rendering cycle by respecting batch configuration.
|
|
429
|
-
* @param reason - A description why rendering should be triggered.
|
|
430
|
-
*/
|
|
431
|
-
triggerRender(reason: string): void;
|
|
432
|
-
/**
|
|
433
|
-
* Creates shadow root if not created yet and assigns to the current root
|
|
434
|
-
* property.
|
|
435
|
-
*/
|
|
436
|
-
applyShadowRootIfNotExisting(): void;
|
|
437
|
-
/**
|
|
438
|
-
* Determines a new scope object with a useful default set of environment
|
|
439
|
-
* values.
|
|
440
|
-
* @param scope - To apply to generated scope.
|
|
441
|
-
*/
|
|
442
|
-
determineRenderScope(scope?: Mapping<unknown>): void;
|
|
443
|
-
/**
|
|
444
|
-
* Does the rendering job. Should be called when ever state changes should
|
|
445
|
-
* be projected to the hosts dom content.
|
|
446
|
-
* @param reason - Description why rendering is necessary.
|
|
447
|
-
* @param resolveRendering - Indicates whether rendering should be resolved
|
|
448
|
-
* finally. Should be set to "false" via super calls in inherited render
|
|
449
|
-
* methods which do further dom manipulations afterward and resolve the
|
|
450
|
-
* rendering process by their own.
|
|
451
|
-
* @returns A promise resolving when rendering has been finished. A promise
|
|
452
|
-
* may be needed for classes inheriting from this class.
|
|
453
|
-
*/
|
|
454
|
-
render(reason?: string, resolveRendering?: boolean): Promise<void>;
|
|
455
|
-
/**
|
|
456
|
-
* Should free up memory listeners related to deprecated HTML.
|
|
457
|
-
* @param _reason - Description why rendering is necessary.
|
|
458
|
-
* @param _reRenderReason - Description why a re-rendering is necessary.
|
|
459
|
-
*/
|
|
460
|
-
unRender(_reason?: string, _reRenderReason?: string): void;
|
|
461
|
-
}
|
|
462
|
-
export declare const api: WebComponentAPI<HTMLElement, Mapping<unknown>, Mapping<unknown>, typeof Web>;
|
|
463
|
-
export default Web;
|
package/WebNext.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("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/extends"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","clientnode","clientnode/property-types","@babel/runtime/helpers/extends"],t);else{var r="object"==typeof exports?t(require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("@babel/runtime/helpers/extends")):t(e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e.clientnode,e["clientnode/property-types"],e["@babel/runtime/helpers/extends"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,((__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__2__)=>(()=>{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;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__(2),t=__webpack_require__(0),r=__webpack_require__(1),function(){var n=[function(t){t.exports=e},function(e){e.exports=t},function(e){e.exports=r}],i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};s.r(o),s.d(o,{property:function(){return c}});var _=s(0),a=s.n(_),l=s(1),p=s(2);function c(e){return void 0===e&&(e={}),e=a()({readAttribute:!0,type:p.string},e),function(t,r){if("string"==typeof r){var n,i=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(i,"observedAttributes")||(i.observedAttributes=i.observedAttributes?[].concat(i.observedAttributes):[]);var s=(0,l.camelCaseToDelimited)(r);i.observedAttributes&&!i.observedAttributes.includes(s)&&i.observedAttributes.push(s)}e.type&&(Object.prototype.hasOwnProperty.call(i,"propertyTypes")||(i.propertyTypes=i.propertyTypes?a()({},i.propertyTypes):{}),!i.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(i,"propertiesToReflectAsAttributes")||(i.propertiesToReflectAsAttributes=i.propertiesToReflectAsAttributes?(0,l.copy)(i.propertiesToReflectAsAttributes):[]),(e.update||i.propertiesToReflectAsAttributes instanceof Map&&!i.propertiesToReflectAsAttributes.has(r)||Array.isArray(i.propertiesToReflectAsAttributes)&&!i.propertiesToReflectAsAttributes.includes(r)||"object"==typeof i.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(i.propertiesToReflectAsAttributes,r))&&("boolean"==typeof e.writeAttribute?e.writeAttribute&&i.propertyTypes&&Object.prototype.hasOwnProperty.call(i.propertyTypes,r)&&(n=i.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(i.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?i.propertiesToReflectAsAttributes.push(r):i.normalizePropertyTypeList&&(i.propertiesToReflectAsAttributes=i.normalizePropertyTypeList(i.propertiesToReflectAsAttributes))),i.propertiesToReflectAsAttributes instanceof Map&&i.propertiesToReflectAsAttributes.set(r,n),"object"==typeof i.propertiesToReflectAsAttributes&&(i.propertiesToReflectAsAttributes[r]=n)))),e.alias&&(Object.prototype.hasOwnProperty.call(i,"propertyAliases")||(i.propertyAliases=i.propertyAliases?a()({},i.propertyAliases):{}),!i.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyAliases[r]=e.alias))}}}return o.default=c,o}())}],__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__,{GenericHTMLElement:()=>GenericHTMLElement,Web:()=>Web,api:()=>api,default:()=>Web_0,log:()=>log});var _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(3),_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0__),_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1__),_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5),_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_babel_runtime_helpers_initializerWarningHelper__WEBPACK_IMPORTED_MODULE_2__),clientnode__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),clientnode__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(clientnode__WEBPACK_IMPORTED_MODULE_3__),clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1),clientnode_property_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__),_decorator__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6),_decorator__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_decorator__WEBPACK_IMPORTED_MODULE_5__),_dec,_class,_descriptor,_Web;const log=new clientnode__WEBPACK_IMPORTED_MODULE_3__.Logger({name:"web-component-wrapper-web"}),GenericHTMLElement="undefined"==typeof HTMLElement?class{}:HTMLElement;let Web=(_dec=_decorator__WEBPACK_IMPORTED_MODULE_5___default()({type:clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean,writeAttribute:!0}),_Web=class e extends GenericHTMLElement{constructor(){super(),this.renderState={promise:Promise.resolve(""),pending:!1,resolve:clientnode__WEBPACK_IMPORTED_MODULE_3__.NOOP},this.childComponentInstances=[],this.batchAttributeUpdates=!0,this.batchPropertyUpdates=!0,this.batchUpdates=!0,this.batchedAttributeUpdateRunning=!0,this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,this.connectionRegistered=!1,this.pendingAttributeUpdates=[],this.parentInstance=null,this.rootInstance=void 0,this.hostDomNode=void 0,this.scope={...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE},this.domNodeEventBindings=new Map,this.domNodeTemplateCache=new Map,this.externalProperties={},this.ignoreAttributeUpdateObservations=!1,this.internalProperties={},this.outputEventNames=new Set,this.instance=null,_babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this,"isRoot",_descriptor,this),this.runDomConnectionAndRenderingInSameEventQueue=!1,this.self=e,this.slots={},this.prepareNewRenderingPromise(),this.self=this.constructor,this.self._propertiesToReflectAsAttributes||(this.self._propertiesToReflectAsAttributes=this.self.normalizePropertyTypeList(this.self.propertiesToReflectAsAttributes)),this.generateAliasIndex(),this.hostDomNode=this,this.rootInstance=this,this.defineGetterAndSetterInterface()}attributeChangedCallback(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.onUpdateAttribute(e,r)}onUpdateAttribute(e,t){const r=new Promise((r=>this.pendingAttributeUpdates.push((()=>{this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.batchedAttributeUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("attributeChanged")}))):this.render("attributeChanged"),r()}))));if(this.connectionRegistered)for(;this.pendingAttributeUpdates.length;)this.pendingAttributeUpdates.shift()();return r}connectedCallback(){try{this.isConnected=!0}catch{}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,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.render("connected")}))}disconnectedCallback(){this.unRender("disconnected"),this.unregisterConnectionState()}defineGetterAndSetterInterface(){const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unique)(Object.keys(this.self.propertyTypes).concat(this.self._propertyAliasIndex?Object.keys(this.self._propertyAliasIndex):[]));for(const t of e)Object.prototype.hasOwnProperty.call(this,t)&&this.setPropertyValue(t,this[t]),Object.defineProperty(this,t,{configurable:!0,get:()=>this.getPropertyValue(t),set:e=>{this.setPropertyValue(t,e),this.triggerPropertySpecificRendering(t,e)}})}getPropertyAlias(e){return this.self._propertyAliasIndex&&Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null}getPropertyValue(t){var r;const n=this.instance?.current?.properties&&(Object.prototype.hasOwnProperty.call(!e.propertyTypes,t)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,t))?this.instance.current.properties[t]:null!==(r=this.internalProperties[t])&&void 0!==r?r:this.externalProperties[t];return this.instance?.current?.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,t)?this.instance.current.state[t]:n}setExternalPropertyValue(e,t){this.externalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)}setInternalPropertyValue(e,t){this.internalProperties[e]=t;const r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)}setPropertyValue(e,t){this.reflectProperties({[e]:t}),this.setInternalPropertyValue(e,t)}triggerPropertySpecificRendering(e,t){if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{void 0!==t&&this.isStateProperty(e)?(this.render("preStatePropertyChanged"),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.setInternalPropertyValue(e,void 0),this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("postStatePropertyChanged"),this.triggerOutputEvents()}))):(this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.render("propertyChanged"),this.triggerOutputEvents())})));else{const r=this.isStateProperty(e);this.render(r?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&r&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}}unregisterConnectionState(){try{this.isConnected=!1}catch{}this.connectionRegistered=!1,this.slots={}}unregisterDomNodeEventBindings(){for(const e of this.domNodeEventBindings.values())for(const t of e.values())t()}applyBinding(e,t){if(e.getAttributeNames)for(const r of e.getAttributeNames()){let n;if(r.startsWith("data-bind-")?n=r.substring(10):r.startsWith("bind-")&&(n=r.substring(5)),n){const i=e.getAttribute(r);if(null===i)continue;if(n.startsWith("attribute-")||n.startsWith("property-")){const s=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(i,t,!1,!0,e);if(s.error){log.warn("Error occurred during processing given",`attribute binding "${r}" on node:`,e,s.error);continue}n.startsWith("attribute-")?e.setAttribute(n.substring(10),s.result):e[(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n.substring(9))]=s.result}else if(n.startsWith("on-")){n=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n.substring(3)),t={log,event:void 0,parameters:void 0,...t};const s=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(i,t,!0,!0,e);s.error?log.warn("Error occurred during compiling given event",`binding "${r}" on node:`,e,s.error):this.addSecureEventListener(e,n,((...n)=>{t.event=n[0],t.parameters=n;try{s.templateFunction(...s.originalScopeNames.map((e=>t[e])))}catch(t){log.warn("Error occurred during processing","given event binding",`"${r}" on node:`,e,`Given expression "${i}" could`,"not be evaluated with given scope",'names "'+s.scopeNames.join('", "')+`": ${(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(t)}`)}}))}}}}applyBindings(e,t,r=!0){for(;e;)!e.attributes?.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}compileDomNodeTemplate(e,t=[],r={}){r={ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r};const n=e.nodeName.toLowerCase();if(r.ignoreComponents&&n.includes("-"))return null;if(r.unsafe){let r=e.innerHTML;if(!r&&e.template&&(r=e.template),this.self.hasCode(r)){const n=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(`\`${r}\``,t);return{domNode:e,children:[],error:n.error,scopeNames:n.scopeNames,template:r,templateFunction:n.templateFunction}}return null}let i=null;if("#text"===n){const t=e.textContent;t&&this.self.hasCode(t)&&(i=t.replace(/ /g," ").trim())}const s=[],o={children:s,domNode:e};if(i){const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(`\`${i}\``,t);o.error=e.error,o.scopeNames=e.scopeNames,o.template=i,o.templateFunction=e.templateFunction}let _=e.firstChild;for(;_;){if(!r.filter||r.filter(_)){const e=this.compileDomNodeTemplate(_,t,{...r,ignoreComponents:r.ignoreNestedComponents});e&&s.push(e)}_=_.nextSibling}return o}evaluateCompiledDomNodeTemplate(e,t){const{domNode:r,error:n,templateFunction:i,scopeNames:s}=e;if(!i||!s)return null;if(n)return log.warn("Error occurred during compiling node content:",n),null;let o=null;try{o=i(...s.map((e=>t[e])))}catch(n){log.warn(`Error occurred when "${this.self._name}" is running`,`"${String(i)}": with bound`,`names "${s.join('", "')}":`,`"${n}". Rendering node:`,r)}return o}evaluateDomNodeTemplate(e,t={},r={}){const n=(r={domNodeTemplateCache:this.domNodeTemplateCache,ignoreComponents:!0,ignoreNestedComponents:!0,unsafe:this.self.renderUnsafe,...r}).domNodeTemplateCache;if(!n.has(e)){const i={filter:r.filter,ignoreComponents:r.ignoreComponents,ignoreNestedComponents:r.ignoreNestedComponents,unsafe:r.unsafe},s=this.compileDomNodeTemplate(e,t,i);s&&n.set(e,s)}if(n.has(e)){const i=n.get(e),s=this.evaluateCompiledDomNodeTemplate(i,t);if(null!==s&&(r.unsafe&&e.innerHTML?e.innerHTML=s:e.textContent=s),i.children.length){const e=r=>{for(const n of r){const r=this.evaluateCompiledDomNodeTemplate(n,t);null!==r&&(n.domNode.textContent=r),n.children.length&&e(n.children)}};e(i.children)}}r.applyBindings&&this.applyBindings(e,t)}addSecureEventListener(e,t,r,n,i){this.domNodeEventBindings.has(e)||this.domNodeEventBindings.set(e,new Map);const s=this.domNodeEventBindings.get(e),o=s.get(t);o&&o!==r&&o();const _=()=>{e.removeEventListener(t,r,i),s.delete(t),0===s.size&&this.domNodeEventBindings.delete(e)};return s.set(t,_),e.addEventListener(t,r,n),_}determineRootBinding(){let t=this.parentNode;for(;t;){const r=t instanceof e||t.nodeName.includes("-")&&"#document-fragment"!==t.nodeName,n=null===t.parentNode&&"[object ShadowRoot]"===t.toString();r?(this.rootInstance===this&&(this.parentInstance=t,this.setPropertyValue("isRoot",!1)),this.rootInstance=t):n&&this.setPropertyValue("isRoot",!1),t=t.parentNode}}static hasCode(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)}static normalizePropertyTypeList(t){if("string"==typeof t&&(t=[t]),Array.isArray(t)){const r=t,n=new Map;for(const t of r)Object.prototype.hasOwnProperty.call(e.propertyTypes,t)&&n.set(t,e.propertyTypes[t]);return n}return(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.convertPlainObjectToMap)(t)}attachEventHandler(){if(null===this.self.eventToPropertyMapping)return;const e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}attachExplicitDefinedOutputEventHandler(){if(!this.self.eventToPropertyMapping)return!1;let e=!1;for(const t of Object.keys(this.self.eventToPropertyMapping))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||(e=!0,this.outputEventNames.add(t),this.setInternalPropertyValue(t,(async(...e)=>{const r=await this.reflectEventToProperties(t,e);r&&(e[0]=r),this.forwardEvent(t,e)})));return e}attachImplicitDefinedOutputEventHandler(e=!0){for(const[t,r]of Object.entries(this.self.propertyTypes))Object.prototype.hasOwnProperty.call(this.internalProperties,t)||![clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func,"function"].includes(r)||this.self.renderProperties.includes(t)||(this.outputEventNames.add(t),this.setInternalPropertyValue(t,((...r)=>{e&&this.reflectEventToProperties(t,r),this.forwardEvent(t,r)})))}triggerOutputEvents(){for(const e of this.outputEventNames)this.forwardEvent(e,[this.externalProperties])}forwardEvent(e,t){return e.length>3&&e.startsWith("on")&&(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.lowerCase)(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))}applySlots(t,r){for(const n of Array.from(t.querySelectorAll("slot"))){const t=n.getAttribute("name");if(null===t||"default"===t)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(const e of this.slots.default)this.evaluateDomNodeTemplate(e,r);(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.replace)(n,this.slots.default,e.trimSlots)}}else this.slots.default=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unwrap)(n).map((e=>this.grabSlotContent(e)));else this.slots[t]?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[t],r),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.replace)(n,this.slots[t],e.trimSlots)):this.slots[t]=this.grabSlotContent((0,clientnode__WEBPACK_IMPORTED_MODULE_3__.unwrap)(n).filter((e=>"#text"!==e.nodeName.toLowerCase()))[0])}}grabSlotContent(e){const t=clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node.firstElementChild?e:null;if(t&&"textarea"===t.firstElementChild?.nodeName.toLowerCase()&&(!t.firstElementChild.hasAttribute("data-no-template")||"false"===t.firstElementChild.getAttribute("data-no-template"))){const e=t.firstElementChild.value;t.classList.remove("web-component-template");const r=t.cloneNode();return t.classList.add("web-component-template"),r.innerHTML="",r.template=e,r}return this.self.cloneSlots?e.cloneNode(!0):e}grabGivenSlots(){this.slots={};for(const e of Array.from(this.querySelectorAll("[slot]"))){let t=e.parentNode,r=!0;for(;t;){if(t.nodeName.includes("-")){t===this&&(r=!1);break}t=t.parentNode}if(r)continue;const n=e.getAttribute("slot")?.trim();this.slots[null!=n?n:e.nodeName.toLowerCase()]=this.grabSlotContent(e)}this.slots.default?this.slots.default=[].concat(this.slots.default):this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((e=>this.grabSlotContent(e))):this.slots.default=[]}isStateProperty(e){return Boolean(this.instance?.current?.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)))}generateAliasIndex(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex={...this.self.propertyAliases};for(const[e,t]of Object.entries(this.self._propertyAliasIndex))Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,t)||(this.self._propertyAliasIndex[t]=e)}}reflectExternalProperties(e){this.ignoreAttributeUpdateObservations=!0;for(const[t,r]of Object.entries(e)){if(this.setExternalPropertyValue(t,r),!this.isConnected)continue;const e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.camelCaseToDelimited)(t);if(this.self._propertiesToReflectAsAttributes?.has(t))switch(this.self._propertiesToReflectAsAttributes.get(t)){case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean:case"boolean":r?""!==this.getAttribute(e)&&this.setAttribute(e,""):this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func:case"function":break;case"json":if(r){const t=JSON.stringify(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.number:case"number":if("number"!=typeof r||isNaN(r))this.hasAttribute(e)&&this.removeAttribute(e);else{const t=String(r);this.getAttribute(e)!==t&&this.setAttribute(e,t)}break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.string:case"string":r?this.getAttribute(e)!==r&&this.setAttribute(e,r):this.hasAttribute(e)&&this.removeAttribute(e);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.any:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.array:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.arrayOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.element:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.elementType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.instanceOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.object:case"object":case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.objectOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.shape:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.exact:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.symbol:default:if(r){const t=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(r);if(t&&this.getAttribute(e)!==t){this.setAttribute(e,t);break}}this.hasAttribute(e)&&this.removeAttribute(e)}}this.ignoreAttributeUpdateObservations=!1}reflectProperties(e){if(this.reflectExternalProperties(e),this.instance?.current?.state&&"object"==typeof this.instance.current.state)for(const e of Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]))Object.prototype.hasOwnProperty.call(this.internalProperties,e)&&this.setInternalPropertyValue(e,void 0);this.internalProperties.model?.state&&(delete this.internalProperties.model.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(const t of this.self.controllableProperties)Object.prototype.hasOwnProperty.call(e,t)&&this.setInternalPropertyValue(t,e[t])}async reflectEventToProperties(e,t){const r=this.batchUpdates;this.batchUpdates=!1;let n=null,i=!1;if(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,e)&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(this.self.eventToPropertyMapping[e])){const r=this.self.eventToPropertyMapping[e](...t,this),s=r&&"then"in r&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(r.then)?await r:r;i=!0,Array.isArray(s)?(n=s[0],this.reflectProperties(n),(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.extend)(!0,this.internalProperties,s[1])):null===s?i=!1:"object"==typeof s&&(n=s,this.reflectProperties(s))}if(!i&&t.length>0&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isObject)(t[0])){let e=t[0];if("persist"in t[0]&&(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isFunction)(t[0].persist)){e={};for(const r of Object.keys(this.self.propertyTypes))for(const n of[r].concat(null!==(s=this.getPropertyAlias(r))&&void 0!==s?s:[])){var s;const r=t[0].currentTarget&&Object.prototype.hasOwnProperty.call(t[0].currentTarget,n)?t[0].currentTarget[n]:this.getPropertyValue(n);r!==this.externalProperties[n]&&(e[n]=r)}}else[null,void 0].includes(e.detail?.value)||(e={...e.detail});n=e,this.reflectProperties(e)}return this.triggerRender("propertyReflected"),this.batchUpdates=r,n}evaluateStringOrNullAndSetAsProperty(e,t){const r=e.startsWith("-"),n=r?e.substring(1):e;let i=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.delimitedToCamelCase)(n);const s=this.getPropertyAlias(i);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(i=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,i)){const n=this.self.propertyTypes[i];if(r){if(t){const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(t,{...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE},!1,!0,this);r.error?(log.warn("Failed to process pre-evaluation attribute",`"${e}": ${r.error}. Will be`,'set to "undefined".'),this.setInternalPropertyValue(i,void 0)):(this.setInternalPropertyValue(i,r.result),this.setExternalPropertyValue(i,r.result))}}else switch(n){case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.boolean:case"boolean":{const e=![null,"false"].includes(t);this.setInternalPropertyValue(i,e),this.setExternalPropertyValue(i,e);break}case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func:case"function":{let r,n=null;const s=["data","event","firstArgument","firstParameter","options"];if(t){const i=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.compile)(t,s.concat("parameters","scope",clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE_NAMES),!0,!0,this);n=i.error,r=i.templateFunction,n&&log.warn("Failed to compile given handler",`"${e}": ${n}.`)}this.setInternalPropertyValue(i,((...o)=>{let _;if(this.outputEventNames.has(i)&&this.reflectEventToProperties(i,o),!n){const n={parameters:o,...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE};for(const e of s)n[e]=o[0];try{_=r?.(...s.map((e=>n[e])),o,n,...clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE_NAMES.map((e=>clientnode__WEBPACK_IMPORTED_MODULE_3__.UTILITY_SCOPE[e])))}catch(r){log.warn("Failed to evaluate function",`"${e}" with expression`,`"${t}" and scope`,"variables",`"${s.join('", "')}" set to`,`"${(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(o)}":`,`${r}. Set property`,'to "undefined".')}}return this.self.renderProperties.includes(i)||this.forwardEvent(i,o),_})),n||this.setExternalPropertyValue(i,r);break}case"json":if(t){let r;try{r=JSON.parse(t)}catch(t){log.warn("Error occurred during parsing given json",`attribute "${e}":`,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.represent)(t));break}this.setInternalPropertyValue(i,r),this.setExternalPropertyValue(i,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.copy)(r,!1,1))}else this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.number:case"number":{if(null===t){this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break}let e=parseFloat(t);isNaN(e)&&(e=void 0),this.setInternalPropertyValue(i,e),this.setExternalPropertyValue(i,e);break}case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.string:case"string":this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break;case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.any:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.array:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.arrayOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.element:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.elementType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.instanceOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.node:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.object:case"object":case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.objectOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.oneOf:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.oneOfType:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.shape:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.exact:case clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.symbol:default:if(t){const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(t,{},!1,!0,this);if(r.error){log.warn("Error occurred during processing given",`attribute configuration "${e}":`,r.error);break}this.setInternalPropertyValue(i,r.result),this.setExternalPropertyValue(i,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.copy)(r.result,!1,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(i,!0),this.setExternalPropertyValue(i,!0)):(this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null))}}}async waitForNestedComponentRendering(){this.childComponentInstances&&await Promise.all(this.childComponentInstances.map((e=>e.renderState.pending?e.renderState.promise:Promise.resolve())))}async resolveRenderingPromiseIfSet(e,t){t&&(await this.waitForNestedComponentRendering(),this.renderState.pending=!1,this.renderState.resolve(e),this.prepareNewRenderingPromise())}prepareNewRenderingPromise(){this.renderState.pending||(this.renderState.promise=new Promise((e=>{this.renderState.resolve=t=>{this.renderState.pending=!1,e(t)}})))}triggerRender(e){this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)((()=>{this.batchedUpdateRunning=!1,this.render(e)}))):this.render(e)}applyShadowRootIfNotExisting(){this.self.shadowDOM&&this.hostDomNode===this&&(this.hostDomNode=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow((0,clientnode__WEBPACK_IMPORTED_MODULE_3__.isObject)(this.self.shadowDOM)?this.self.shadowDOM:{mode:"open"}))}determineRenderScope(e={}){this.scope={...this.parentInstance?.scope||{},...this.scope,...this.internalProperties,parentInstance:this.parentInstance,rootInstance:this.rootInstance,self:this,[(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.lowerCase)(this.self._name)||"instance"]:this,...e},this.scope.scope=this.scope}async render(e="unknown",t=!0){if(this.unRender("reRender",e),this.childComponentInstances=[],this.renderState.pending=!0,this.isRoot&&(await this.resolveRenderingPromiseIfSet(e,t),t&&(await Promise.all(this.self.pendingRenderPromises),this.self.pendingRenderPromises=[])),this.self.pendingRenderPromises.push(this.renderState.promise),this.determineRenderScope(),!this.self.doRender||!this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}})))return void await this.resolveRenderingPromiseIfSet(e,t);const r=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.evaluate)(`\`${this.self.content}\``,this.scope);if(r.error)return log.warn(`Failed to process template: ${r.error}`),this.renderState.resolve(e),void await Promise.all(this.self.pendingRenderPromises);this.applyShadowRootIfNotExisting();const n=document.createElement("div");n.innerHTML=r.result,this.applySlots(n,{...this.scope,parentInstance:this}),this.hostDomNode.innerHTML=n.innerHTML,await(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.timeout)(),this.waitForNestedComponentRendering().then((()=>{this.applyBindings(this.hostDomNode.firstChild,this.scope,this.self.renderSlots)})),await this.resolveRenderingPromiseIfSet(e,t)}unRender(e="unknown",t){this.unregisterDomNodeEventBindings()}},_Web.applyRootBinding=!0,_Web.pendingRenderPromises=[],_Web.content="<slot>Please provide a template to transclude.</slot>",_Web.determineRootBinding=!0,_Web.shadowDOM=null,_Web.observedAttributes=[],_Web.controllableProperties=[],_Web.eventToPropertyMapping={},_Web.propertyAliases={},_Web.propertyTypes={onClick:clientnode_property_types__WEBPACK_IMPORTED_MODULE_4__.func},_Web.propertiesToReflectAsAttributes=[],_Web.renderProperties=["children"],_Web.doRender=!1,_Web.cloneSlots=!1,_Web.evaluateSlots=!1,_Web.renderSlots=!0,_Web.trimSlots=!0,_Web.renderUnsafe=!1,_Web._name="BaseWeb",_Web._propertyAliasIndex=void 0,_Web._propertiesToReflectAsAttributes=void 0,_class=_Web,_descriptor=_babel_runtime_helpers_applyDecoratedDescriptor__WEBPACK_IMPORTED_MODULE_1___default()(_class.prototype,"isRoot",[_dec],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),_class);const api={component:Web,register:(e=(0,clientnode__WEBPACK_IMPORTED_MODULE_3__.camelCaseToDelimited)(Web._name))=>{customElements.define(e,Web)}},Web_0=Web;return __webpack_exports__})()));
|
package/decorator.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { PropertyConfiguration } from './type';
|
|
2
|
-
/**
|
|
3
|
-
* Generates a decorator based on given configuration.
|
|
4
|
-
* @param options - Property configuration to define how to transfer attributes
|
|
5
|
-
* and properties into each other.
|
|
6
|
-
* @param options.alias - Alternate property name.
|
|
7
|
-
* @param options.readAttribute - Indicates whether to read from existing
|
|
8
|
-
* attribute also.
|
|
9
|
-
* @param options.type - Value type to parse value.
|
|
10
|
-
* @param options.update - Indicates whether to overwrite already existing
|
|
11
|
-
* property configurations.
|
|
12
|
-
* @param options.writeAttribute - Indicates whether to sync attribute
|
|
13
|
-
* representation back into dom.
|
|
14
|
-
* @returns Generated decorator.
|
|
15
|
-
*/
|
|
16
|
-
export declare function property(options?: {
|
|
17
|
-
alias?: string;
|
|
18
|
-
readAttribute?: boolean;
|
|
19
|
-
type?: PropertyConfiguration;
|
|
20
|
-
update?: boolean;
|
|
21
|
-
writeAttribute?: boolean | PropertyConfiguration;
|
|
22
|
-
}): PropertyDecorator;
|
|
23
|
-
export default property;
|
package/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Mapping } from 'clientnode';
|
|
2
|
-
import propertyImport from './decorator';
|
|
3
|
-
import ReactWebImport from './ReactWeb';
|
|
4
|
-
import WebImport from './Web';
|
|
5
|
-
import { ComponentType, WebComponentAPI, WebComponentConfiguration } from './type';
|
|
6
|
-
export declare const property: typeof propertyImport;
|
|
7
|
-
export declare const ReactWeb: typeof ReactWebImport;
|
|
8
|
-
export declare const reactWebAPI: WebComponentAPI<HTMLElement, Mapping<unknown>, import("./type").ReactComponentBaseProperties, typeof ReactWebImport>;
|
|
9
|
-
export declare const webAPI: WebComponentAPI<HTMLElement, Mapping<unknown>, Mapping<unknown>, typeof WebImport>;
|
|
10
|
-
export declare const Web: typeof WebImport;
|
|
11
|
-
/**
|
|
12
|
-
* Wraps given react component as web component.
|
|
13
|
-
* @param component - React component to wrap.
|
|
14
|
-
* @param nameHint - A name to set as property in runtime generated web
|
|
15
|
-
* component class.
|
|
16
|
-
* @param configuration - Additional web component configurations.
|
|
17
|
-
* @returns Generated object to register and retrieve generated web component.
|
|
18
|
-
*/
|
|
19
|
-
export declare const wrapAsWebComponent: <Type extends ComponentType = ComponentType, ExternalProperties extends Mapping<unknown> = Mapping<unknown>, InternalProperties extends Mapping<unknown> = Mapping<unknown>, EventParameters extends Array<unknown> = Array<unknown>>(component: Type, nameHint?: string, configuration?: WebComponentConfiguration<ExternalProperties, InternalProperties, EventParameters>) => WebComponentAPI<Type, ExternalProperties, InternalProperties, typeof ReactWeb<Type, ExternalProperties, InternalProperties>>;
|
|
20
|
-
export default wrapAsWebComponent;
|