web-component-wrapper 0.0.333 → 0.0.338
Sign up to get free protection for your applications and to get access to all the features.
- package/React.d.ts +2 -2
- package/index.d.ts +2 -1
- package/package.json +3 -2
- package/type.d.ts +4 -4
package/React.d.ts
CHANGED
@@ -23,9 +23,9 @@ export declare class ReactWeb<TElement = HTMLElement> extends Web<TElement> {
|
|
23
23
|
static content: ComponentType | string;
|
24
24
|
static react: typeof React;
|
25
25
|
static _name: string;
|
26
|
-
compiledSlots: Mapping<ReactRenderItemsFactory> & {
|
26
|
+
compiledSlots: (Mapping<ReactRenderItemsFactory> & {
|
27
27
|
children?: ReactRenderItemsFactory;
|
28
|
-
};
|
28
|
+
});
|
29
29
|
preparedSlots: Mapping<ReactRenderItems> & {
|
30
30
|
children?: ReactRenderItems;
|
31
31
|
};
|
package/index.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Mapping } from 'clientnode/type';
|
1
2
|
import ReactWebImport from './React';
|
2
3
|
import WebImport from './Web';
|
3
4
|
import { ComponentType, WebComponentAPI, WebComponentConfiguration } from './type';
|
@@ -14,5 +15,5 @@ export declare const Web: typeof WebImport;
|
|
14
15
|
*
|
15
16
|
* @returns Generated object to register and retrieve generated web component.
|
16
17
|
*/
|
17
|
-
export declare const wrapAsWebComponent: <Type extends ComponentType = ComponentType
|
18
|
+
export declare const wrapAsWebComponent: <Type extends ComponentType = ComponentType, ExternalPropertiesType = Mapping<unknown>, InternalPropertiesType = Mapping<unknown>>(component: Type, nameHint?: string, configuration?: WebComponentConfiguration<ExternalPropertiesType, InternalPropertiesType>) => WebComponentAPI;
|
18
19
|
export default wrapAsWebComponent;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "web-component-wrapper",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.338",
|
4
4
|
"description": "Generic web-component base class and framework specific wrapper.",
|
5
5
|
"keywords": [
|
6
6
|
"component",
|
@@ -120,7 +120,8 @@
|
|
120
120
|
"npm": ">=7"
|
121
121
|
},
|
122
122
|
"resolutions": {
|
123
|
-
"@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz"
|
123
|
+
"@types/webpack": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.1.tgz",
|
124
|
+
"colors": "1.4.0"
|
124
125
|
},
|
125
126
|
"sideEffects": false,
|
126
127
|
"documentationWebsite": {
|
package/type.d.ts
CHANGED
@@ -12,8 +12,8 @@ export declare type CompiledDomNodeTemplateItem = {
|
|
12
12
|
export declare type CompiledDomNodeTemplate<NodeType = Node> = Map<NodeType, CompiledDomNodeTemplateItem>;
|
13
13
|
export declare type EventCallbackMapping = Map<string, () => void>;
|
14
14
|
export declare type EventMapping<ExternalPropertiesType = Mapping<unknown>, InternalPropertiesType = Mapping<unknown>> = [ExternalPropertiesType, InternalPropertiesType] | ExternalPropertiesType;
|
15
|
-
export declare type EventMapper = (..._parameter: Array<unknown>) => EventMapping
|
16
|
-
export declare type EventToPropertyMapping = Mapping<true | EventMapper
|
15
|
+
export declare type EventMapper<E = Mapping<unknown>, I = Mapping<unknown>> = (..._parameter: Array<unknown>) => EventMapping<E, I>;
|
16
|
+
export declare type EventToPropertyMapping<E = Mapping<unknown>, I = Mapping<unknown>> = Mapping<true | EventMapper<E, I>>;
|
17
17
|
export declare type AttributesReflectionConfiguration = Array<string> | Map<string, string | ValueOf<typeof PropertyTypes>> | string | Mapping<ValueOf<typeof PropertyTypes> | string>;
|
18
18
|
export declare type ScopeDeclaration = Array<string> | Mapping<unknown>;
|
19
19
|
export declare type PreCompiledItem = {
|
@@ -26,10 +26,10 @@ export declare type ReactRenderItemsFactory = Array<ReactRenderItemFactory> | Re
|
|
26
26
|
export declare type ReactRenderBaseItem = ReactElement | string | null;
|
27
27
|
export declare type ReactRenderItem = ((..._parameters: Array<unknown>) => ReactRenderBaseItem) | ReactRenderBaseItem;
|
28
28
|
export declare type ReactRenderItems = Array<ReactRenderItem> | ReactRenderItem;
|
29
|
-
export interface WebComponentConfiguration {
|
29
|
+
export interface WebComponentConfiguration<ExternalPropertiesType = Mapping<unknown>, InternalPropertiesType = Mapping<unknown>> {
|
30
30
|
attachWebComponentAdapterIfNotExists?: boolean;
|
31
31
|
controllableProperties?: Array<string>;
|
32
|
-
eventToPropertyMapping?: EventToPropertyMapping
|
32
|
+
eventToPropertyMapping?: EventToPropertyMapping<ExternalPropertiesType, InternalPropertiesType>;
|
33
33
|
internalProperties?: Mapping<unknown>;
|
34
34
|
propertiesToReflectAsAttributes?: AttributesReflectionConfiguration;
|
35
35
|
propertyAliases?: Mapping;
|