@dooboostore/simple-web-component 1.0.44 → 1.0.45
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/README.md +25 -25
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/applyAttribute.js +36 -15
- package/dist/cjs/decorators/applyAttribute.js.map +2 -2
- package/dist/cjs/decorators/applyClass.js +53 -22
- package/dist/cjs/decorators/applyClass.js.map +2 -2
- package/dist/cjs/decorators/applyNode.js +51 -23
- package/dist/cjs/decorators/applyNode.js.map +2 -2
- package/dist/cjs/decorators/applyProperty.js +38 -17
- package/dist/cjs/decorators/applyProperty.js.map +2 -2
- package/dist/cjs/decorators/applyStyle.js +53 -22
- package/dist/cjs/decorators/applyStyle.js.map +2 -2
- package/dist/cjs/decorators/elementDefine.js +44 -25
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/emitCustomEvent.js +61 -47
- package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
- package/dist/cjs/decorators/query.js +91 -56
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js +104 -66
- package/dist/cjs/decorators/queryAll.js.map +2 -2
- package/dist/cjs/types/window.d.js.map +1 -1
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/applyAttribute.js +36 -15
- package/dist/esm/decorators/applyAttribute.js.map +2 -2
- package/dist/esm/decorators/applyClass.js +53 -22
- package/dist/esm/decorators/applyClass.js.map +2 -2
- package/dist/esm/decorators/applyNode.js +51 -23
- package/dist/esm/decorators/applyNode.js.map +2 -2
- package/dist/esm/decorators/applyProperty.js +38 -17
- package/dist/esm/decorators/applyProperty.js.map +2 -2
- package/dist/esm/decorators/applyStyle.js +53 -22
- package/dist/esm/decorators/applyStyle.js.map +2 -2
- package/dist/esm/decorators/elementDefine.js +44 -25
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js +61 -47
- package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
- package/dist/esm/decorators/query.js +91 -56
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js +104 -66
- package/dist/esm/decorators/queryAll.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +531 -293
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +3 -3
- package/dist/types/decorators/addEventListener.d.ts +7 -6
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/applyAttribute.d.ts +12 -8
- package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
- package/dist/types/decorators/applyClass.d.ts +8 -7
- package/dist/types/decorators/applyClass.d.ts.map +1 -1
- package/dist/types/decorators/applyNode.d.ts +18 -17
- package/dist/types/decorators/applyNode.d.ts.map +1 -1
- package/dist/types/decorators/applyProperty.d.ts +13 -9
- package/dist/types/decorators/applyProperty.d.ts.map +1 -1
- package/dist/types/decorators/applyStyle.d.ts +6 -5
- package/dist/types/decorators/applyStyle.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts +3 -2
- package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +15 -5
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts +15 -5
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +531 -293
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +3 -3
- package/package.json +3 -3
- package/src/decorators/addEventListener.ts +9 -7
- package/src/decorators/applyAttribute.ts +59 -27
- package/src/decorators/applyClass.ts +78 -32
- package/src/decorators/applyNode.ts +115 -72
- package/src/decorators/applyProperty.ts +62 -30
- package/src/decorators/applyStyle.ts +76 -30
- package/src/decorators/elementDefine.ts +49 -26
- package/src/decorators/emitCustomEvent.ts +63 -39
- package/src/decorators/query.ts +111 -49
- package/src/decorators/queryAll.ts +121 -61
- package/src/types/window.d.ts +3 -0
|
@@ -15,9 +15,10 @@ export interface AddEventListenerBaseOptions<TEvent extends Event = Event> exten
|
|
|
15
15
|
throttleTime?: number;
|
|
16
16
|
distinctUntilChanged?: boolean | ((prev: TEvent, curr: TEvent) => boolean);
|
|
17
17
|
}
|
|
18
|
+
export type EventListenerSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
18
19
|
export interface AddEventListenerMetadata<TEvent extends Event = Event> {
|
|
19
20
|
propertyKey: string | symbol;
|
|
20
|
-
selector:
|
|
21
|
+
selector: EventListenerSelector;
|
|
21
22
|
type: string;
|
|
22
23
|
options: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions & {
|
|
23
24
|
delegate?: boolean;
|
|
@@ -25,13 +26,13 @@ export interface AddEventListenerMetadata<TEvent extends Event = Event> {
|
|
|
25
26
|
}
|
|
26
27
|
export declare const ADD_EVENT_LISTENER_METADATA_KEY: unique symbol;
|
|
27
28
|
export declare function addEventListener<TEvent extends Event = Event>(target: SpecialSelector, type: string, options?: AddEventListenerBaseOptions<TEvent>): MethodDecorator;
|
|
28
|
-
export declare function addEventListener<TEvent extends Event = Event>(selector:
|
|
29
|
+
export declare function addEventListener<TEvent extends Event = Event>(selector: EventListenerSelector, type: string, options?: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions & {
|
|
29
30
|
delegate?: boolean;
|
|
30
31
|
}): MethodDecorator;
|
|
31
|
-
export declare function addEventListenerDelegateLightDom<TEvent extends Event = Event>(selector:
|
|
32
|
-
export declare function addEventListenerDelegateShadowDom<TEvent extends Event = Event>(selector:
|
|
33
|
-
export declare function addEventListenerDelegateAllDom<TEvent extends Event = Event>(selector:
|
|
34
|
-
export declare function addEventListenerDelegate<TEvent extends Event = Event>(selector:
|
|
32
|
+
export declare function addEventListenerDelegateLightDom<TEvent extends Event = Event>(selector: EventListenerSelector, type: string, options?: Omit<AddEventListenerBaseOptions<TEvent>, 'delegate'>): MethodDecorator;
|
|
33
|
+
export declare function addEventListenerDelegateShadowDom<TEvent extends Event = Event>(selector: EventListenerSelector, type: string, options?: Omit<AddEventListenerBaseOptions<TEvent>, 'delegate'>): MethodDecorator;
|
|
34
|
+
export declare function addEventListenerDelegateAllDom<TEvent extends Event = Event>(selector: EventListenerSelector, type: string, options?: Omit<AddEventListenerBaseOptions<TEvent>, 'delegate'>): MethodDecorator;
|
|
35
|
+
export declare function addEventListenerDelegate<TEvent extends Event = Event>(selector: EventListenerSelector, type: string, options?: Omit<AddEventListenerBaseOptions<TEvent>, 'delegate'>): MethodDecorator;
|
|
35
36
|
/**
|
|
36
37
|
* @addEventListenerThis decorator - simplified version of @addEventListener for $this selector
|
|
37
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addEventListener.d.ts","sourceRoot":"","sources":["../../../src/decorators/addEventListener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3E,MAAM,WAAW,2BAA2B,CAAC,MAAM,SAAS,KAAK,GAAG,KAAK,CAAE,SAAQ,oBAAoB;IACrG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,GAAG,WAAW,EAAE,IAAI,EAAC;QAAC,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAC,KAAK,OAAO,CAAC;IAElG,YAAY,CAAC,EAAE,MAAM,CAAC;I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OAAO,CAAC,EAAE,2BAA2B,CAAC,MAAM,CAAC,GAAG,eAAe,GAAG,eAAe,CAErK;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,GAAG,SAG7F,CAAC"}
|
|
@@ -33,9 +33,10 @@ export interface AttributeOptions extends SwcQueryOptions {
|
|
|
33
33
|
*/
|
|
34
34
|
valueKey?: symbol | string;
|
|
35
35
|
}
|
|
36
|
+
export type AttributeSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
36
37
|
export interface AttributeMetadata {
|
|
37
38
|
propertyKey: string | symbol;
|
|
38
|
-
selector:
|
|
39
|
+
selector: AttributeSelector;
|
|
39
40
|
targetAttributeName: string;
|
|
40
41
|
options: AttributeOptions;
|
|
41
42
|
type: 'property' | 'method';
|
|
@@ -44,14 +45,14 @@ export declare const ATTRIBUTE_METADATA_KEY: unique symbol;
|
|
|
44
45
|
declare const convertValue: (val: string | null, type: any) => any;
|
|
45
46
|
export { convertValue };
|
|
46
47
|
export declare const getAttributeValue: (inst: any, attrName: string, options?: AttributeOptions & {
|
|
47
|
-
selector?:
|
|
48
|
+
selector?: AttributeSelector;
|
|
48
49
|
}) => any;
|
|
49
50
|
/**
|
|
50
51
|
* Resolve target elements based on selector and options
|
|
51
|
-
* Handles special selectors ($this, $host, etc.) and
|
|
52
|
+
* Handles special selectors ($this, $host, etc.), CSS selectors, and function-based selectors
|
|
52
53
|
* Returns HTMLElement[] for attribute operations
|
|
53
54
|
*/
|
|
54
|
-
export declare const resolveAttributeTargets: (inst: any, selector:
|
|
55
|
+
export declare const resolveAttributeTargets: (inst: any, selector: AttributeSelector, options: AttributeOptions) => HTMLElement[];
|
|
55
56
|
/**
|
|
56
57
|
* @applyAttribute decorator - set/get element attributes
|
|
57
58
|
*
|
|
@@ -59,10 +60,11 @@ export declare const resolveAttributeTargets: (inst: any, selector: string, opti
|
|
|
59
60
|
* - @applyAttribute('selector', 'attrName') - Set attribute with explicit name
|
|
60
61
|
* - @applyAttribute('selector') - Use property name as attribute name
|
|
61
62
|
* - @applyAttribute('selector', { name: 'attrName' }) - Set attribute via options
|
|
63
|
+
* - @applyAttribute((this, helper) => 'selector', 'attrName') - Function-based selector
|
|
62
64
|
* - Return null to remove attribute
|
|
63
65
|
*/
|
|
64
|
-
export declare function applyAttribute(selector:
|
|
65
|
-
export declare function applyAttribute(selector:
|
|
66
|
+
export declare function applyAttribute(selector: AttributeSelector, targetAttributeName: string, options?: AttributeOptions): MethodDecorator & PropertyDecorator;
|
|
67
|
+
export declare function applyAttribute(selector: AttributeSelector, options?: AttributeOptions): MethodDecorator & PropertyDecorator;
|
|
66
68
|
/**
|
|
67
69
|
* @attribute - Field decorator for binding element attributes (read/write)
|
|
68
70
|
*
|
|
@@ -73,13 +75,14 @@ export declare function applyAttribute(selector: string, options?: AttributeOpti
|
|
|
73
75
|
* - @attribute('#user', 'product-id') - Attribute name on selector
|
|
74
76
|
* - @attribute('product-id', options) - Attribute name on $this with options
|
|
75
77
|
* - @attribute('#user', 'product-id', options) - Attribute name on selector with options
|
|
78
|
+
* - @attribute((this, helper) => 'selector', 'product-id') - Function-based selector
|
|
76
79
|
* - @attribute - Bare decorator (uses property name as attribute on $this)
|
|
77
80
|
*
|
|
78
81
|
* Note: This decorator is for FIELDS ONLY. For methods, use @setAttribute.
|
|
79
82
|
*/
|
|
80
83
|
export declare function attribute(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
81
84
|
export declare function attribute(attributeName: string, options?: AttributeOptions): PropertyDecorator;
|
|
82
|
-
export declare function attribute(selector:
|
|
85
|
+
export declare function attribute(selector: AttributeSelector, attributeName: string, options?: AttributeOptions): PropertyDecorator;
|
|
83
86
|
/**
|
|
84
87
|
* @setAttribute - Method decorator for setting element attributes from method return value
|
|
85
88
|
*
|
|
@@ -90,6 +93,7 @@ export declare function attribute(selector: string, attributeName: string, optio
|
|
|
90
93
|
* - @setAttribute('#user', 'data-id') - Attribute name on selector
|
|
91
94
|
* - @setAttribute('data-id', options) - Attribute name on $this with options
|
|
92
95
|
* - @setAttribute('#user', 'data-id', options) - Attribute name on selector with options
|
|
96
|
+
* - @setAttribute((this, helper) => 'selector', 'data-id') - Function-based selector
|
|
93
97
|
* - @setAttribute - Bare decorator (uses method name as attribute on $this)
|
|
94
98
|
*
|
|
95
99
|
* Note: This decorator is for METHODS ONLY. For fields, use @attribute.
|
|
@@ -100,7 +104,7 @@ export declare function attribute(selector: string, attributeName: string, optio
|
|
|
100
104
|
* return 'active';
|
|
101
105
|
* }
|
|
102
106
|
*/
|
|
103
|
-
export declare function setAttribute(selector:
|
|
107
|
+
export declare function setAttribute(selector: AttributeSelector, attributeName: string, options?: AttributeOptions): MethodDecorator;
|
|
104
108
|
export declare function setAttribute(attributeName: string, options?: AttributeOptions): MethodDecorator;
|
|
105
109
|
export declare const findAllAttributeMetadata: (target: any) => AttributeMetadata[];
|
|
106
110
|
export declare const findAllAttributeApplyMetadata: (target: any) => Map<string | symbol, AttributeMetadata>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAOxD,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,MAAM,GAAG,OAAO,OAAO,GAAG,OAAO,MAAM,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE;QAAE,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,KAAK,OAAO,CAAC;IACzG;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QA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Ae,CAAC;AA4BjG,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAGvE,CAAC;AAGF,eAAO,MAAM,6BAA6B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,iBAAiB,CAMjG,CAAC;AAGF,eAAe,cAAc,CAAC"}
|
|
@@ -13,40 +13,41 @@ export interface ClassApplyOptions extends SwcQueryOptions {
|
|
|
13
13
|
*/
|
|
14
14
|
valueKey?: symbol | string;
|
|
15
15
|
}
|
|
16
|
+
export type ClassSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
16
17
|
export interface ClassApplyMetadata {
|
|
17
18
|
propertyKey: string | symbol;
|
|
18
|
-
selector:
|
|
19
|
+
selector: ClassSelector;
|
|
19
20
|
action: ClassAction;
|
|
20
21
|
options: ClassApplyOptions;
|
|
21
22
|
}
|
|
22
23
|
export declare function applyClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
23
|
-
export declare function applyClass(selector:
|
|
24
|
+
export declare function applyClass(selector: ClassSelector, action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
|
|
24
25
|
export declare function setClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
25
|
-
export declare function setClass(selector:
|
|
26
|
+
export declare function setClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
26
27
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
27
28
|
$this: any;
|
|
28
29
|
}) => boolean;
|
|
29
30
|
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
30
31
|
export declare function updateClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
31
|
-
export declare function updateClass(selector:
|
|
32
|
+
export declare function updateClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
32
33
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
33
34
|
$this: any;
|
|
34
35
|
}) => boolean;
|
|
35
36
|
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
36
37
|
export declare function addClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
37
|
-
export declare function addClass(selector:
|
|
38
|
+
export declare function addClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
38
39
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
39
40
|
$this: any;
|
|
40
41
|
}) => boolean;
|
|
41
42
|
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
42
43
|
export declare function removeClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
43
|
-
export declare function removeClass(selector:
|
|
44
|
+
export declare function removeClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
44
45
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
45
46
|
$this: any;
|
|
46
47
|
}) => boolean;
|
|
47
48
|
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
48
49
|
export declare function toggleClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
49
|
-
export declare function toggleClass(selector:
|
|
50
|
+
export declare function toggleClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
50
51
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
51
52
|
$this: any;
|
|
52
53
|
}) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyClass.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyClass.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3E,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAE3E,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GA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{ HelperHostSet, SwcRootType } from '../types';
|
|
2
2
|
export type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove' | 'clearChildren';
|
|
3
|
+
export type ApplyNodeSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
3
4
|
export interface ApplyNodeOptions {
|
|
4
5
|
position?: ApplyNodePosition;
|
|
5
6
|
root?: SwcRootType;
|
|
@@ -24,7 +25,7 @@ export interface ApplyNodeOptions {
|
|
|
24
25
|
}
|
|
25
26
|
export interface ApplyNodeMetadata {
|
|
26
27
|
propertyKey: string | symbol;
|
|
27
|
-
selector:
|
|
28
|
+
selector: ApplyNodeSelector;
|
|
28
29
|
options: ApplyNodeOptions;
|
|
29
30
|
}
|
|
30
31
|
export declare const APPLY_NODE_METADATA_KEY: unique symbol;
|
|
@@ -35,7 +36,7 @@ export declare const APPLY_NODE_METADATA_KEY: unique symbol;
|
|
|
35
36
|
* - applyNode(selector, options) - Apply to specific selector
|
|
36
37
|
* - applyNode(options) - Apply to $this (current element)
|
|
37
38
|
*/
|
|
38
|
-
export declare function applyNode(selector:
|
|
39
|
+
export declare function applyNode(selector: ApplyNodeSelector, options?: ApplyNodeOptions): MethodDecorator;
|
|
39
40
|
export declare function applyNode(options: ApplyNodeOptions): MethodDecorator;
|
|
40
41
|
/**
|
|
41
42
|
* @replaceChildrenNode decorator - replaces children of target element
|
|
@@ -45,7 +46,7 @@ export declare function applyNode(options: ApplyNodeOptions): MethodDecorator;
|
|
|
45
46
|
* - replaceChildrenNode(options) - Replace children of $this (current element)
|
|
46
47
|
* - @replaceChildrenNode - Bare decorator, replaces children of $this
|
|
47
48
|
*/
|
|
48
|
-
export declare function replaceChildren(selector:
|
|
49
|
+
export declare function replaceChildren(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
49
50
|
export declare function replaceChildren(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
50
51
|
export declare function replaceChildren(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
51
52
|
/**
|
|
@@ -56,7 +57,7 @@ export declare function replaceChildren(target: Object, propertyKey: string | sy
|
|
|
56
57
|
* - clearChildrenNode(options) - Clear children of $this (current element)
|
|
57
58
|
* - @clearChildrenNode - Bare decorator, clears children of $this
|
|
58
59
|
*/
|
|
59
|
-
export declare function clearChildrenNode(selector:
|
|
60
|
+
export declare function clearChildrenNode(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
60
61
|
export declare function clearChildrenNode(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
61
62
|
export declare function clearChildrenNode(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
62
63
|
export declare const clearNode: typeof clearChildrenNode;
|
|
@@ -68,7 +69,7 @@ export declare const clearNode: typeof clearChildrenNode;
|
|
|
68
69
|
* - innerHtmlNode(options) - Set innerHTML of $this (current element)
|
|
69
70
|
* - @innerHtmlNode - Bare decorator, sets innerHTML of $this
|
|
70
71
|
*/
|
|
71
|
-
export declare function innerHtml(selector:
|
|
72
|
+
export declare function innerHtml(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
72
73
|
export declare function innerHtml(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
73
74
|
export declare function innerHtml(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
74
75
|
/**
|
|
@@ -79,7 +80,7 @@ export declare function innerHtml(target: Object, propertyKey: string | symbol,
|
|
|
79
80
|
* - innerHtmlLightNode(options) - Set innerHTML of $this in light DOM
|
|
80
81
|
* - @innerHtmlLightNode - Bare decorator, sets innerHTML of $this in light DOM
|
|
81
82
|
*/
|
|
82
|
-
export declare function innerHtmlLight(selector:
|
|
83
|
+
export declare function innerHtmlLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
83
84
|
export declare function innerHtmlLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
84
85
|
export declare function innerHtmlLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
85
86
|
/**
|
|
@@ -90,7 +91,7 @@ export declare function innerHtmlLight(target: Object, propertyKey: string | sym
|
|
|
90
91
|
* - innerHtmlShadowNode(options) - Set innerHTML of $this in shadow DOM
|
|
91
92
|
* - @innerHtmlShadowNode - Bare decorator, sets innerHTML of $this in shadow DOM
|
|
92
93
|
*/
|
|
93
|
-
export declare function innerHtmlShadow(selector:
|
|
94
|
+
export declare function innerHtmlShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
94
95
|
export declare function innerHtmlShadow(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
95
96
|
export declare function innerHtmlShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
96
97
|
/**
|
|
@@ -101,7 +102,7 @@ export declare function innerHtmlShadow(target: Object, propertyKey: string | sy
|
|
|
101
102
|
* - innerTextNode(options) - Set innerText of $this (current element)
|
|
102
103
|
* - @innerTextNode - Bare decorator, sets innerText of $this
|
|
103
104
|
*/
|
|
104
|
-
export declare function innerText(selector:
|
|
105
|
+
export declare function innerText(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
105
106
|
export declare function innerText(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
106
107
|
export declare function innerText(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
107
108
|
/**
|
|
@@ -112,7 +113,7 @@ export declare function innerText(target: Object, propertyKey: string | symbol,
|
|
|
112
113
|
* - innerTextLightNode(options) - Set innerText of $this in light DOM
|
|
113
114
|
* - @innerTextLightNode - Bare decorator, sets innerText of $this in light DOM
|
|
114
115
|
*/
|
|
115
|
-
export declare function innerTextLight(selector:
|
|
116
|
+
export declare function innerTextLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
116
117
|
export declare function innerTextLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
117
118
|
export declare function innerTextLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
118
119
|
/**
|
|
@@ -123,7 +124,7 @@ export declare function innerTextLight(target: Object, propertyKey: string | sym
|
|
|
123
124
|
* - innerTextShadowNode(options) - Set innerText of $this in shadow DOM
|
|
124
125
|
* - @innerTextShadowNode - Bare decorator, sets innerText of $this in shadow DOM
|
|
125
126
|
*/
|
|
126
|
-
export declare function innerTextShadow(selector:
|
|
127
|
+
export declare function innerTextShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
127
128
|
export declare function innerTextShadow(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
128
129
|
export declare function innerTextShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
129
130
|
/**
|
|
@@ -134,7 +135,7 @@ export declare function innerTextShadow(target: Object, propertyKey: string | sy
|
|
|
134
135
|
* - beforeEndNode(options) - Append to $this (current element)
|
|
135
136
|
* - @beforeEndNode - Bare decorator, appends to $this
|
|
136
137
|
*/
|
|
137
|
-
export declare function insertBeforeEnd(selector:
|
|
138
|
+
export declare function insertBeforeEnd(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
138
139
|
export declare function insertBeforeEnd(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
139
140
|
export declare function insertBeforeEnd(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
140
141
|
/**
|
|
@@ -145,7 +146,7 @@ export declare function insertBeforeEnd(target: Object, propertyKey: string | sy
|
|
|
145
146
|
* - beforeEndLightNode(options) - Append to $this in light DOM
|
|
146
147
|
* - @beforeEndLightNode - Bare decorator, appends to $this in light DOM
|
|
147
148
|
*/
|
|
148
|
-
export declare function insertBeforeEndLight(selector:
|
|
149
|
+
export declare function insertBeforeEndLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
149
150
|
export declare function insertBeforeEndLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
150
151
|
export declare function insertBeforeEndLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
151
152
|
/**
|
|
@@ -156,7 +157,7 @@ export declare function insertBeforeEndLight(target: Object, propertyKey: string
|
|
|
156
157
|
* - beforeEndShadowNode(options) - Append to $this in shadow DOM
|
|
157
158
|
* - @beforeEndShadowNode - Bare decorator, appends to $this in shadow DOM
|
|
158
159
|
*/
|
|
159
|
-
export declare function insertBeforeEndShadow(selector:
|
|
160
|
+
export declare function insertBeforeEndShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
160
161
|
export declare function insertBeforeEndShadow(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
161
162
|
export declare function insertBeforeEndShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
162
163
|
/**
|
|
@@ -167,7 +168,7 @@ export declare function insertBeforeEndShadow(target: Object, propertyKey: strin
|
|
|
167
168
|
* - afterBeginNode(options) - Prepend to $this (current element)
|
|
168
169
|
* - @afterBeginNode - Bare decorator, prepends to $this
|
|
169
170
|
*/
|
|
170
|
-
export declare function insertAfterBegin(selector:
|
|
171
|
+
export declare function insertAfterBegin(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
171
172
|
export declare function insertAfterBegin(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
172
173
|
export declare function insertAfterBegin(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
173
174
|
/**
|
|
@@ -178,7 +179,7 @@ export declare function insertAfterBegin(target: Object, propertyKey: string | s
|
|
|
178
179
|
* - afterBeginLightNode(options) - Prepend to $this in light DOM
|
|
179
180
|
* - @afterBeginLightNode - Bare decorator, prepends to $this in light DOM
|
|
180
181
|
*/
|
|
181
|
-
export declare function insertAfterBeginLight(selector:
|
|
182
|
+
export declare function insertAfterBeginLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
182
183
|
export declare function insertAfterBeginLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
183
184
|
export declare function insertAfterBeginLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
184
185
|
/**
|
|
@@ -189,7 +190,7 @@ export declare function insertAfterBeginLight(target: Object, propertyKey: strin
|
|
|
189
190
|
* - replaceChildrenLightNode(options) - Replace children of $this in light DOM
|
|
190
191
|
* - @replaceChildrenLightNode - Bare decorator, replaces children of $this in light DOM
|
|
191
192
|
*/
|
|
192
|
-
export declare function replaceChildrenLight(selector:
|
|
193
|
+
export declare function replaceChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
193
194
|
export declare function replaceChildrenLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
194
195
|
export declare function replaceChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
195
196
|
/**
|
|
@@ -200,7 +201,7 @@ export declare function replaceChildrenLight(target: Object, propertyKey: string
|
|
|
200
201
|
* - clearChildrenLightNode(options) - Clear children of $this in light DOM
|
|
201
202
|
* - @clearChildrenLightNode - Bare decorator, clears children of $this in light DOM
|
|
202
203
|
*/
|
|
203
|
-
export declare function clearChildrenLight(selector:
|
|
204
|
+
export declare function clearChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
204
205
|
export declare function clearChildrenLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
205
206
|
export declare function clearChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
206
207
|
export declare const findAllApplyNodeMetadata: (target: any) => Map<string | symbol, ApplyNodeMetadata>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmC,aAAa,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAatF,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,eAAe,CAAC;AAEjL,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE;QAAE,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,KAAK,OAAO,CAAC;IACzH;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,GAAG,CAAC;IAC1C;;;;OAIG;IACH,QAAQ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U,GAAG,MAAM,CAAC,GAAG,eAAe,CAAC;AAC3G,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AAgB5I,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,iBAAiB,CAS5F,CAAC"}
|
|
@@ -32,9 +32,10 @@ export interface PropertyOptions extends SwcQueryOptions {
|
|
|
32
32
|
*/
|
|
33
33
|
valueKey?: symbol | string;
|
|
34
34
|
}
|
|
35
|
+
export type PropertySelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
35
36
|
export interface PropertyMetadata {
|
|
36
37
|
propertyKey: string | symbol;
|
|
37
|
-
selector:
|
|
38
|
+
selector: PropertySelector;
|
|
38
39
|
targetPropertyKey: string | symbol;
|
|
39
40
|
options: PropertyOptions;
|
|
40
41
|
type: 'property' | 'method';
|
|
@@ -42,10 +43,10 @@ export interface PropertyMetadata {
|
|
|
42
43
|
export declare const PROPERTY_METADATA_KEY: unique symbol;
|
|
43
44
|
/**
|
|
44
45
|
* Resolve target elements based on selector and options
|
|
45
|
-
* Handles special selectors ($this, $host, etc.) and
|
|
46
|
+
* Handles special selectors ($this, $host, etc.), CSS selectors, and function-based selectors
|
|
46
47
|
* Returns HTMLElement[] but can include Window and Document for property access
|
|
47
48
|
*/
|
|
48
|
-
export declare const resolvePropertyTargets: (inst: any, selector:
|
|
49
|
+
export declare const resolvePropertyTargets: (inst: any, selector: PropertySelector, options: PropertyOptions) => any[];
|
|
49
50
|
/**
|
|
50
51
|
* @applyProperty decorator - set/get element properties
|
|
51
52
|
*
|
|
@@ -53,10 +54,11 @@ export declare const resolvePropertyTargets: (inst: any, selector: string, optio
|
|
|
53
54
|
* - @applyProperty('selector', 'propertyName') - Set property with explicit name
|
|
54
55
|
* - @applyProperty('selector') - Use property name as target property name
|
|
55
56
|
* - @applyProperty('selector', { name: 'propertyName' }) - Set property via options
|
|
57
|
+
* - @applyProperty((this, helper) => 'selector', 'propertyName') - Function-based selector
|
|
56
58
|
* - Return null/undefined to skip setting
|
|
57
59
|
*/
|
|
58
|
-
export declare function applyProperty(selector:
|
|
59
|
-
export declare function applyProperty(selector:
|
|
60
|
+
export declare function applyProperty(selector: PropertySelector, targetPropertyKey: string | symbol, options?: PropertyOptions): MethodDecorator & PropertyDecorator;
|
|
61
|
+
export declare function applyProperty(selector: PropertySelector, options?: PropertyOptions): MethodDecorator & PropertyDecorator;
|
|
60
62
|
/**
|
|
61
63
|
* @property - Field decorator for binding element properties (read/write)
|
|
62
64
|
*
|
|
@@ -64,13 +66,14 @@ export declare function applyProperty(selector: string, options?: PropertyOption
|
|
|
64
66
|
* - @property('selector', 'propertyName') - Bind to specific property
|
|
65
67
|
* - @property('selector') - Use field name as property name
|
|
66
68
|
* - @property('selector', options) - Bind with options
|
|
69
|
+
* - @property((this, helper) => 'selector', 'propertyName') - Function-based selector
|
|
67
70
|
* - @property - Bare decorator (binds to $this with field name)
|
|
68
71
|
*
|
|
69
72
|
* Note: This decorator is for FIELDS ONLY. For methods, use @setProperty.
|
|
70
73
|
*/
|
|
71
74
|
export declare function property(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
72
|
-
export declare function property(selector:
|
|
73
|
-
export declare function property(selector:
|
|
75
|
+
export declare function property(selector: PropertySelector, targetPropertyKey: string | symbol, options?: PropertyOptions): PropertyDecorator;
|
|
76
|
+
export declare function property(selector: PropertySelector, options?: PropertyOptions): PropertyDecorator;
|
|
74
77
|
/**
|
|
75
78
|
* @setProperty - Method decorator for setting element properties from method return value
|
|
76
79
|
*
|
|
@@ -78,6 +81,7 @@ export declare function property(selector: string, options?: PropertyOptions): P
|
|
|
78
81
|
* - @setProperty('selector', 'propertyName') - Set specific property
|
|
79
82
|
* - @setProperty('selector') - Use method name as property name
|
|
80
83
|
* - @setProperty('selector', options) - Set with options
|
|
84
|
+
* - @setProperty((this, helper) => 'selector', 'propertyName') - Function-based selector
|
|
81
85
|
* - @setProperty - Bare decorator (sets on $this with method name)
|
|
82
86
|
*
|
|
83
87
|
* Note: This decorator is for METHODS ONLY. For fields, use @property.
|
|
@@ -88,8 +92,8 @@ export declare function property(selector: string, options?: PropertyOptions): P
|
|
|
88
92
|
* return true;
|
|
89
93
|
* }
|
|
90
94
|
*/
|
|
91
|
-
export declare function setProperty(selector:
|
|
92
|
-
export declare function setProperty(selector:
|
|
95
|
+
export declare function setProperty(selector: PropertySelector, targetPropertyKey: string | symbol, options?: PropertyOptions): MethodDecorator;
|
|
96
|
+
export declare function setProperty(selector: PropertySelector, options?: PropertyOptions): MethodDecorator;
|
|
93
97
|
export declare const findAllPropertyMetadata: (target: any) => PropertyMetadata[];
|
|
94
98
|
export declare const findAllPropertyApplyMetadata: (target: any) => Map<string | symbol, PropertyMetadata>;
|
|
95
99
|
export default applyProperty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyProperty.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE;QAAC,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAC,KAAK,OAAO,CAAC;IACvG;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,MAAM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,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAC9J,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,GAAG,iBAAiB,CAAC;AA8I1H;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AAClI,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AACvI,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAcnG;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;AACxI,wBAAgB,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;AAcpG,eAAO,MAAM,uBAAuB,GAAI,QAAQ,GAAG,KAAG,gBAAgB,EAGrE,CAAC;AAGF,eAAO,MAAM,4BAA4B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,gBAAgB,CAM/F,CAAC;AAGF,eAAe,aAAa,CAAC"}
|
|
@@ -12,20 +12,21 @@ export interface StyleApplyOptions extends SwcQueryOptions {
|
|
|
12
12
|
*/
|
|
13
13
|
valueKey?: symbol | string;
|
|
14
14
|
}
|
|
15
|
+
export type StyleSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
15
16
|
export interface StyleApplyMetadata {
|
|
16
17
|
propertyKey: string | symbol;
|
|
17
|
-
selector:
|
|
18
|
+
selector: StyleSelector;
|
|
18
19
|
action: StyleAction;
|
|
19
20
|
options: StyleApplyOptions;
|
|
20
21
|
}
|
|
21
22
|
export declare const STYLE_METADATA_KEY: unique symbol;
|
|
22
23
|
export declare function applyStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
23
|
-
export declare function applyStyle(selector:
|
|
24
|
+
export declare function applyStyle(selector: StyleSelector, action?: StyleAction, options?: StyleApplyOptions): MethodDecorator;
|
|
24
25
|
export declare function setStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
25
|
-
export declare function setStyle(selector:
|
|
26
|
+
export declare function setStyle(selector: StyleSelector, options?: StyleApplyOptions): MethodDecorator;
|
|
26
27
|
export declare function updateStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
27
|
-
export declare function updateStyle(selector:
|
|
28
|
+
export declare function updateStyle(selector: StyleSelector, options?: StyleApplyOptions): MethodDecorator;
|
|
28
29
|
export declare function removeStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
29
|
-
export declare function removeStyle(selector:
|
|
30
|
+
export declare function removeStyle(selector: StyleSelector, options?: StyleApplyOptions): MethodDecorator;
|
|
30
31
|
export declare const findAllStyleMetadata: (target: any) => Map<string | symbol, StyleApplyMetadata>;
|
|
31
32
|
//# sourceMappingURL=applyStyle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyStyle.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyStyle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3E,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAA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,UAAU,GAAI,MAAM,GAAG,SA4FnC,CAAC;AAyLF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA+elD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SwcQueryOptions, HelperHostSet } from '../types';
|
|
2
|
+
export type EmitCustomEventSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
2
3
|
export interface EmitCustomEventBaseOptions {
|
|
3
4
|
bubbles?: boolean;
|
|
4
5
|
composed?: boolean;
|
|
@@ -29,13 +30,13 @@ type Options = (EmitCustomEventBaseOptions & SwcQueryOptions) | (EmitCustomEvent
|
|
|
29
30
|
});
|
|
30
31
|
export interface EmitCustomEventMetadata {
|
|
31
32
|
propertyKey: string | symbol;
|
|
32
|
-
selector:
|
|
33
|
+
selector: EmitCustomEventSelector;
|
|
33
34
|
type: string;
|
|
34
35
|
options: Options;
|
|
35
36
|
}
|
|
36
37
|
export declare const EMIT_CUSTOM_EVENT_METADATA_KEY: unique symbol;
|
|
37
38
|
export declare function emitCustomEvent(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
38
|
-
export declare function emitCustomEvent(selector:
|
|
39
|
+
export declare function emitCustomEvent(selector: EmitCustomEventSelector, type: string, options?: Options): MethodDecorator;
|
|
39
40
|
export declare function emitCustomEvent(type: string, options?: Options): MethodDecorator;
|
|
40
41
|
export declare const getEmitCustomEventMetadataList: (target: any) => EmitCustomEventMetadata[] | undefined;
|
|
41
42
|
export declare const emit: typeof emitCustomEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitCustomEvent.d.ts","sourceRoot":"","sources":["../../../src/decorators/emitCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI3E,MAAM,WAAW,0BAA0B;IACzC,OAAO,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AC1G;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,KAAK,OAAO,GAAG,CAAC,0BAA0B,GAAG,eAAe,CAAC,GAAG,CAAC,0BAA0B,GAAG,eAAe,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5I,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,uBAAuB,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,8BAA8B,eAAuD,CAAC;AAEnG,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AACzI,wBAAgB,eAAe,CAAC,QAAQ,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;AACrH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;AA+IlF,eAAO,MAAM,8BAA8B,GAAI,QAAQ,GAAG,KAAG,uBAAuB,EAAE,GAAG,SAGxF,CAAC;AAGF,eAAO,MAAM,IAAI,wBAAkB,CAAC"}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import { SwcQueryOptions } from '../types';
|
|
1
|
+
import { SwcQueryOptions, HelperHostSet } from '../types';
|
|
2
|
+
export interface QueryOptions extends SwcQueryOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Filter function to determine whether to include the element.
|
|
5
|
+
* If it returns false, the element is skipped.
|
|
6
|
+
*/
|
|
7
|
+
filter?: (target: HTMLElement, meta: {
|
|
8
|
+
currentThis: any;
|
|
9
|
+
helper: HelperHostSet;
|
|
10
|
+
}) => boolean;
|
|
11
|
+
}
|
|
2
12
|
export interface QueryMetadata {
|
|
3
13
|
propertyKey: string | symbol;
|
|
4
|
-
selector: string;
|
|
5
|
-
options:
|
|
14
|
+
selector: string | ((currentThis: any, helper: HelperHostSet) => Node | NodeList | Element | Element[] | null);
|
|
15
|
+
options: QueryOptions;
|
|
6
16
|
}
|
|
7
17
|
export declare const QUERY_METADATA_KEY: unique symbol;
|
|
8
18
|
export declare function query(target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor): PropertyDescriptor | void;
|
|
9
|
-
export declare function query(selector: string, options?:
|
|
10
|
-
export declare function query(options?:
|
|
19
|
+
export declare function query(selector: string | ((currentThis: any, helper: HelperHostSet) => Node | NodeList | Element | Element[] | null), options?: QueryOptions): PropertyDecorator;
|
|
20
|
+
export declare function query(options?: QueryOptions): PropertyDecorator;
|
|
11
21
|
export declare const getQueryMetadata: (target: any) => QueryMetadata[];
|
|
12
22
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE;QAAE,WAAW,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,KAAK,OAAO,CAAC;CAC9F;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/G,OAAO,EAAE,YAAY,CAAE;CACxB;AAED,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAE3E,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AAChI,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC;AACjL,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC;AAwJjE,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,aAAa,EAG3D,CAAC"}
|