@dooboostore/simple-web-component 1.0.43 → 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 +312 -63
- package/dist/cjs/SwcAppEngine.js +3 -1
- package/dist/cjs/SwcAppEngine.js.map +2 -2
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/applyAttribute.js +66 -43
- package/dist/cjs/decorators/applyAttribute.js.map +2 -2
- package/dist/cjs/decorators/applyClass.js +110 -43
- package/dist/cjs/decorators/applyClass.js.map +3 -3
- package/dist/cjs/decorators/applyNode.js +200 -112
- package/dist/cjs/decorators/applyNode.js.map +2 -2
- package/dist/cjs/decorators/applyProperty.js +49 -45
- package/dist/cjs/decorators/applyProperty.js.map +2 -2
- package/dist/cjs/decorators/applyStyle.js +92 -37
- package/dist/cjs/decorators/applyStyle.js.map +3 -3
- package/dist/cjs/decorators/{changedAttributeThis.js → changedAttribute.js} +6 -6
- package/dist/cjs/decorators/changedAttribute.js.map +7 -0
- package/dist/cjs/decorators/elementDefine.js +81 -31
- package/dist/cjs/decorators/elementDefine.js.map +3 -3
- package/dist/cjs/decorators/emitCustomEvent.js +80 -52
- package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
- package/dist/cjs/decorators/index.js +1 -1
- package/dist/cjs/decorators/index.js.map +2 -2
- package/dist/cjs/decorators/publishSwcAppMessage.js +5 -5
- package/dist/cjs/decorators/publishSwcAppMessage.js.map +3 -3
- package/dist/cjs/decorators/query.js +133 -147
- package/dist/cjs/decorators/query.js.map +3 -3
- package/dist/cjs/decorators/queryAll.js +143 -132
- package/dist/cjs/decorators/queryAll.js.map +3 -3
- package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js +2 -0
- package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js.map +2 -2
- package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js +2 -0
- package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
- package/dist/cjs/elements/SwcAppMixin.js +17 -2
- package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
- package/dist/cjs/examples/RxJSOperatorsExample.js +285 -0
- package/dist/cjs/examples/RxJSOperatorsExample.js.map +7 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/router/ElementRouter.js +4 -0
- package/dist/cjs/router/ElementRouter.js.map +2 -2
- package/dist/cjs/types/window.d.js.map +1 -1
- package/dist/esm/SwcAppEngine.js +3 -1
- package/dist/esm/SwcAppEngine.js.map +2 -2
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/applyAttribute.js +66 -43
- package/dist/esm/decorators/applyAttribute.js.map +2 -2
- package/dist/esm/decorators/applyClass.js +110 -43
- package/dist/esm/decorators/applyClass.js.map +3 -3
- package/dist/esm/decorators/applyNode.js +200 -112
- package/dist/esm/decorators/applyNode.js.map +2 -2
- package/dist/esm/decorators/applyProperty.js +49 -45
- package/dist/esm/decorators/applyProperty.js.map +2 -2
- package/dist/esm/decorators/applyStyle.js +92 -37
- package/dist/esm/decorators/applyStyle.js.map +3 -3
- package/dist/esm/decorators/{changedAttributeThis.js → changedAttribute.js} +3 -3
- package/dist/esm/decorators/changedAttribute.js.map +7 -0
- package/dist/esm/decorators/elementDefine.js +79 -29
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js +80 -52
- package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
- package/dist/esm/decorators/index.js +1 -1
- package/dist/esm/decorators/index.js.map +1 -1
- package/dist/esm/decorators/publishSwcAppMessage.js +5 -5
- package/dist/esm/decorators/publishSwcAppMessage.js.map +3 -3
- package/dist/esm/decorators/query.js +133 -147
- package/dist/esm/decorators/query.js.map +3 -3
- package/dist/esm/decorators/queryAll.js +143 -132
- package/dist/esm/decorators/queryAll.js.map +3 -3
- package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js +2 -0
- package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js.map +2 -2
- package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js +2 -0
- package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
- package/dist/esm/elements/SwcAppMixin.js +18 -3
- package/dist/esm/elements/SwcAppMixin.js.map +2 -2
- package/dist/esm/examples/RxJSOperatorsExample.js +266 -0
- package/dist/esm/examples/RxJSOperatorsExample.js.map +7 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/router/ElementRouter.js +4 -0
- package/dist/esm/router/ElementRouter.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +1118 -633
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/SwcAppEngine.d.ts.map +1 -1
- package/dist/types/decorators/addEventListener.d.ts +19 -15
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/applyAttribute.d.ts +45 -26
- package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
- package/dist/types/decorators/applyClass.d.ts +19 -38
- package/dist/types/decorators/applyClass.d.ts.map +1 -1
- package/dist/types/decorators/applyNode.d.ts +175 -32
- package/dist/types/decorators/applyNode.d.ts.map +1 -1
- package/dist/types/decorators/applyProperty.d.ts +38 -25
- package/dist/types/decorators/applyProperty.d.ts.map +1 -1
- package/dist/types/decorators/applyStyle.d.ts +10 -9
- package/dist/types/decorators/applyStyle.d.ts.map +1 -1
- package/dist/types/decorators/{changedAttributeThis.d.ts → changedAttribute.d.ts} +2 -2
- package/dist/types/decorators/changedAttribute.d.ts.map +1 -0
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts +6 -12
- package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
- package/dist/types/decorators/index.d.ts +1 -1
- package/dist/types/decorators/index.d.ts.map +1 -1
- package/dist/types/decorators/publishSwcAppMessage.d.ts +1 -1
- package/dist/types/decorators/publishSwcAppMessage.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +16 -29
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts +16 -23
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts +1 -0
- package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts.map +1 -1
- package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +2 -0
- package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +1 -1
- package/dist/types/elements/SwcAppMixin.d.ts +4 -4
- package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
- package/dist/types/examples/RxJSOperatorsExample.d.ts +94 -0
- package/dist/types/examples/RxJSOperatorsExample.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/router/ElementRouter.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +1118 -633
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +1 -1
- package/src/SwcAppEngine.ts +3 -1
- package/src/decorators/addEventListener.ts +31 -25
- package/src/decorators/applyAttribute.ts +164 -86
- package/src/decorators/applyClass.ts +161 -41
- package/src/decorators/applyNode.ts +408 -108
- package/src/decorators/applyProperty.ts +100 -89
- package/src/decorators/applyStyle.ts +131 -37
- package/src/decorators/{changedAttributeThis.ts → changedAttribute.ts} +1 -1
- package/src/decorators/elementDefine.ts +96 -30
- package/src/decorators/emitCustomEvent.ts +92 -60
- package/src/decorators/index.ts +1 -1
- package/src/decorators/publishSwcAppMessage.ts +1 -1
- package/src/decorators/query.ts +155 -162
- package/src/decorators/queryAll.ts +157 -139
- package/src/decorators/subscribeSwcAppMessageWhileConnected.ts +1 -0
- package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +3 -1
- package/src/elements/SwcAppMixin.ts +43 -24
- package/src/examples/RxJSOperatorsExample.ts +279 -0
- package/src/index.ts +2 -0
- package/src/router/ElementRouter.ts +4 -0
- package/src/types/window.d.ts +3 -0
- package/dist/cjs/decorators/changedAttributeThis.js.map +0 -7
- package/dist/esm/decorators/changedAttributeThis.js.map +0 -7
- package/dist/types/decorators/changedAttributeThis.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwcAppEngine.d.ts","sourceRoot":"","sources":["../../src/SwcAppEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAA0B,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxF,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACrD,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAA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AG,GAAG,GAAG,wBAAwB,CAAC,EAAE,CAAC;IAEpI,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAGzD,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAChF,qCAAqC,CAAC,EAAE,MAAM,CAAC;IAC/C,sCAAsC,CAAC,EAAE,MAAM,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,aAAa,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC;AAEzF,qBAAa,YAAY;IAMX,OAAO,CAAC,IAAI;IALjB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,kBAAkB,CAAC,CAAe;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAgB;gBAEZ,IAAI,EAAE,WAAW;IAErC,IAAI,MAAM,kBAET;IAEK,OAAO,CAAC,MAAM,EAAE,aAAa;IA6CnC,UAAU;CAGX"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';
|
|
2
|
-
export interface AddEventListenerBaseOptions extends EventListenerOptions {
|
|
2
|
+
export interface AddEventListenerBaseOptions<TEvent extends Event = Event> extends EventListenerOptions {
|
|
3
3
|
capture?: boolean;
|
|
4
4
|
once?: boolean;
|
|
5
5
|
passive?: boolean;
|
|
@@ -11,24 +11,28 @@ export interface AddEventListenerBaseOptions extends EventListenerOptions {
|
|
|
11
11
|
currentThis: any;
|
|
12
12
|
helper: HelperHostSet;
|
|
13
13
|
}) => boolean;
|
|
14
|
+
debounceTime?: number;
|
|
15
|
+
throttleTime?: number;
|
|
16
|
+
distinctUntilChanged?: boolean | ((prev: TEvent, curr: TEvent) => boolean);
|
|
14
17
|
}
|
|
15
|
-
export
|
|
18
|
+
export type EventListenerSelector = string | ((currentThis: any, helper: HelperHostSet) => NodeList | Element | Element[] | null);
|
|
19
|
+
export interface AddEventListenerMetadata<TEvent extends Event = Event> {
|
|
16
20
|
propertyKey: string | symbol;
|
|
17
|
-
selector:
|
|
21
|
+
selector: EventListenerSelector;
|
|
18
22
|
type: string;
|
|
19
|
-
options: AddEventListenerBaseOptions & SwcQueryOptions & {
|
|
23
|
+
options: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions & {
|
|
20
24
|
delegate?: boolean;
|
|
21
25
|
};
|
|
22
26
|
}
|
|
23
27
|
export declare const ADD_EVENT_LISTENER_METADATA_KEY: unique symbol;
|
|
24
|
-
export declare function addEventListener(target: SpecialSelector, type: string, options?: AddEventListenerBaseOptions): MethodDecorator;
|
|
25
|
-
export declare function addEventListener(selector:
|
|
28
|
+
export declare function addEventListener<TEvent extends Event = Event>(target: SpecialSelector, type: string, options?: AddEventListenerBaseOptions<TEvent>): MethodDecorator;
|
|
29
|
+
export declare function addEventListener<TEvent extends Event = Event>(selector: EventListenerSelector, type: string, options?: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions & {
|
|
26
30
|
delegate?: boolean;
|
|
27
31
|
}): MethodDecorator;
|
|
28
|
-
export declare function addEventListenerDelegateLightDom(selector:
|
|
29
|
-
export declare function addEventListenerDelegateShadowDom(selector:
|
|
30
|
-
export declare function addEventListenerDelegateAllDom(selector:
|
|
31
|
-
export declare function addEventListenerDelegate(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;
|
|
32
36
|
/**
|
|
33
37
|
* @addEventListenerThis decorator - simplified version of @addEventListener for $this selector
|
|
34
38
|
*/
|
|
@@ -37,12 +41,12 @@ export declare const eventDelegateLightDom: typeof addEventListenerDelegateLight
|
|
|
37
41
|
export declare const eventDelegateShadowDom: typeof addEventListenerDelegateShadowDom;
|
|
38
42
|
export declare const eventDelegateAllDom: typeof addEventListenerDelegateAllDom;
|
|
39
43
|
export declare const eventDelegate: typeof addEventListenerDelegate;
|
|
40
|
-
export declare function addEventListenerThis(type: string, options?: AddEventListenerBaseOptions & SwcQueryOptions): MethodDecorator;
|
|
44
|
+
export declare function addEventListenerThis<TEvent extends Event = Event>(type: string, options?: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions): MethodDecorator;
|
|
41
45
|
/**
|
|
42
46
|
* @addEventListenerAppHost decorator - simplified version of @addEventListener for $appHost selector
|
|
43
47
|
*/
|
|
44
|
-
export declare function addEventListenerAppHost(type: string, options?: AddEventListenerBaseOptions & SwcQueryOptions): MethodDecorator;
|
|
45
|
-
export declare function addEventListenerWindow(type: string, options?: AddEventListenerBaseOptions & SwcQueryOptions): MethodDecorator;
|
|
46
|
-
export declare function addEventListenerDocument(type: string, options?: AddEventListenerBaseOptions & SwcQueryOptions): MethodDecorator;
|
|
47
|
-
export declare const getAddEventListenerMetadata: (target: any) => AddEventListenerMetadata[] | undefined;
|
|
48
|
+
export declare function addEventListenerAppHost<TEvent extends Event = Event>(type: string, options?: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions): MethodDecorator;
|
|
49
|
+
export declare function addEventListenerWindow<TEvent extends Event = Event>(type: string, options?: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions): MethodDecorator;
|
|
50
|
+
export declare function addEventListenerDocument<TEvent extends Event = Event>(type: string, options?: AddEventListenerBaseOptions<TEvent> & SwcQueryOptions): MethodDecorator;
|
|
51
|
+
export declare const getAddEventListenerMetadata: (target: any) => AddEventListenerMetadata<Event>[] | undefined;
|
|
48
52
|
//# sourceMappingURL=addEventListener.d.ts.map
|
|
@@ -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,
|
|
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;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CA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e,CAEnK;AACD,wBAAgB,wBAAwB,CAAC,MAAM,SAAS,KAAK,GAAG,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,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,34 +60,52 @@ 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
|
-
* @attribute -
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* @
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
69
|
+
* @attribute - Field decorator for binding element attributes (read/write)
|
|
70
|
+
*
|
|
71
|
+
* Intelligently distinguishes between attribute names and CSS selectors:
|
|
72
|
+
*
|
|
73
|
+
* Usage patterns:
|
|
74
|
+
* - @attribute('product-id') - Attribute name on $this (auto-detected)
|
|
75
|
+
* - @attribute('#user', 'product-id') - Attribute name on selector
|
|
76
|
+
* - @attribute('product-id', options) - Attribute name on $this with options
|
|
77
|
+
* - @attribute('#user', 'product-id', options) - Attribute name on selector with options
|
|
78
|
+
* - @attribute((this, helper) => 'selector', 'product-id') - Function-based selector
|
|
79
|
+
* - @attribute - Bare decorator (uses property name as attribute on $this)
|
|
80
|
+
*
|
|
81
|
+
* Note: This decorator is for FIELDS ONLY. For methods, use @setAttribute.
|
|
80
82
|
*/
|
|
81
|
-
export declare function
|
|
82
|
-
export declare function
|
|
83
|
+
export declare function attribute(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
84
|
+
export declare function attribute(attributeName: string, options?: AttributeOptions): PropertyDecorator;
|
|
85
|
+
export declare function attribute(selector: AttributeSelector, attributeName: string, options?: AttributeOptions): PropertyDecorator;
|
|
83
86
|
/**
|
|
84
|
-
* @
|
|
85
|
-
*
|
|
87
|
+
* @setAttribute - Method decorator for setting element attributes from method return value
|
|
88
|
+
*
|
|
89
|
+
* Intelligently distinguishes between attribute names and CSS selectors:
|
|
90
|
+
*
|
|
91
|
+
* Usage patterns:
|
|
92
|
+
* - @setAttribute('data-id') - Attribute name on $this (auto-detected)
|
|
93
|
+
* - @setAttribute('#user', 'data-id') - Attribute name on selector
|
|
94
|
+
* - @setAttribute('data-id', options) - Attribute name on $this with options
|
|
95
|
+
* - @setAttribute('#user', 'data-id', options) - Attribute name on selector with options
|
|
96
|
+
* - @setAttribute((this, helper) => 'selector', 'data-id') - Function-based selector
|
|
97
|
+
* - @setAttribute - Bare decorator (uses method name as attribute on $this)
|
|
98
|
+
*
|
|
99
|
+
* Note: This decorator is for METHODS ONLY. For fields, use @attribute.
|
|
100
|
+
*
|
|
101
|
+
* Example:
|
|
102
|
+
* @setAttribute('data-status')
|
|
103
|
+
* updateStatus() {
|
|
104
|
+
* return 'active';
|
|
105
|
+
* }
|
|
86
106
|
*/
|
|
87
|
-
export declare function
|
|
88
|
-
export declare function
|
|
89
|
-
export declare function setAttributeThis(options?: AttributeOptions): MethodDecorator;
|
|
107
|
+
export declare function setAttribute(selector: AttributeSelector, attributeName: string, options?: AttributeOptions): MethodDecorator;
|
|
108
|
+
export declare function setAttribute(attributeName: string, options?: AttributeOptions): MethodDecorator;
|
|
90
109
|
export declare const findAllAttributeMetadata: (target: any) => AttributeMetadata[];
|
|
91
110
|
export declare const findAllAttributeApplyMetadata: (target: any) => Map<string | symbol, AttributeMetadata>;
|
|
92
111
|
export default applyAttribute;
|
|
@@ -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,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,
|
|
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,QAAQ,C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E,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AACnI,wBAAgB,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;AAChG,wBAAgB,SAAS,CAAC,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;AA6B7H;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe,CAAC;AAC9H,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe,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,63 +13,44 @@ 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
|
-
export declare function applyClass(
|
|
23
|
-
export declare
|
|
23
|
+
export declare function applyClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
24
|
+
export declare function applyClass(selector: ClassSelector, action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
|
|
25
|
+
export declare function setClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
26
|
+
export declare function setClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
24
27
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
25
28
|
$this: any;
|
|
26
29
|
}) => boolean;
|
|
27
|
-
} | ClassApplyOptions, options?: ClassApplyOptions)
|
|
28
|
-
export declare
|
|
30
|
+
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
31
|
+
export declare function updateClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
32
|
+
export declare function updateClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
29
33
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
30
34
|
$this: any;
|
|
31
35
|
}) => boolean;
|
|
32
|
-
} | ClassApplyOptions, options?: ClassApplyOptions)
|
|
33
|
-
export declare
|
|
36
|
+
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
37
|
+
export declare function addClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
38
|
+
export declare function addClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
34
39
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
35
40
|
$this: any;
|
|
36
41
|
}) => boolean;
|
|
37
|
-
} | ClassApplyOptions, options?: ClassApplyOptions)
|
|
38
|
-
export declare
|
|
42
|
+
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
43
|
+
export declare function removeClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
44
|
+
export declare function removeClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
39
45
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
40
46
|
$this: any;
|
|
41
47
|
}) => boolean;
|
|
42
|
-
} | ClassApplyOptions, options?: ClassApplyOptions)
|
|
43
|
-
export declare
|
|
48
|
+
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
49
|
+
export declare function toggleClass(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
50
|
+
export declare function toggleClass(selector: ClassSelector, classMapOrOptions?: string | {
|
|
44
51
|
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
45
52
|
$this: any;
|
|
46
53
|
}) => boolean;
|
|
47
|
-
} | ClassApplyOptions, options?: ClassApplyOptions)
|
|
48
|
-
export declare function applyClassThis(action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
|
|
49
|
-
export declare const setClassThis: (classMapOrOptions?: string | {
|
|
50
|
-
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
51
|
-
$this: any;
|
|
52
|
-
}) => boolean;
|
|
53
|
-
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
54
|
-
export declare const updateClassThis: (classMapOrOptions?: string | {
|
|
55
|
-
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
56
|
-
$this: any;
|
|
57
|
-
}) => boolean;
|
|
58
|
-
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
59
|
-
export declare const addClassThis: (classMapOrOptions?: string | {
|
|
60
|
-
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
61
|
-
$this: any;
|
|
62
|
-
}) => boolean;
|
|
63
|
-
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
64
|
-
export declare const removeClassThis: (classMapOrOptions?: string | {
|
|
65
|
-
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
66
|
-
$this: any;
|
|
67
|
-
}) => boolean;
|
|
68
|
-
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
69
|
-
export declare const toggleClassThis: (classMapOrOptions?: string | {
|
|
70
|
-
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
71
|
-
$this: any;
|
|
72
|
-
}) => boolean;
|
|
73
|
-
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
54
|
+
} | ClassApplyOptions, options?: ClassApplyOptions): MethodDecorator;
|
|
74
55
|
export declare const findAllClassMetadata: (target: any) => Map<string | symbol, ClassApplyMetadata>;
|
|
75
56
|
//# sourceMappingURL=applyClass.d.ts.map
|
|
@@ -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,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;
|
|
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,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAqEzE,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,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;;;;OAIG;IACH,QAAQ,CAAC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,CAAC,EAAE,iBAAiB,GAAG,eAAe,CAAC;AAc/P,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAAC;AACrI,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG;IAAE,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,GAAG;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,KAAK,OAAO,CAAA;CAAE,GAAG,iBAAiB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,eAAe,CAAC;AAc/P,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,kBAAkB,CASzF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HelperHostSet, SwcRootType } from '../types';
|
|
2
|
-
export type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove';
|
|
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,42 +25,184 @@ 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;
|
|
31
32
|
/**
|
|
32
33
|
* @applyNode decorator to surgically add/replace nodes to a target element.
|
|
34
|
+
*
|
|
35
|
+
* Overloads:
|
|
36
|
+
* - applyNode(selector, options) - Apply to specific selector
|
|
37
|
+
* - applyNode(options) - Apply to $this (current element)
|
|
33
38
|
*/
|
|
34
|
-
export declare function applyNode(selector:
|
|
35
|
-
export declare function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export declare function
|
|
45
|
-
export declare function
|
|
46
|
-
export declare function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export declare function
|
|
56
|
-
export declare function
|
|
57
|
-
export declare function
|
|
58
|
-
export declare
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
39
|
+
export declare function applyNode(selector: ApplyNodeSelector, options?: ApplyNodeOptions): MethodDecorator;
|
|
40
|
+
export declare function applyNode(options: ApplyNodeOptions): MethodDecorator;
|
|
41
|
+
/**
|
|
42
|
+
* @replaceChildrenNode decorator - replaces children of target element
|
|
43
|
+
*
|
|
44
|
+
* Overloads:
|
|
45
|
+
* - replaceChildrenNode(selector, options) - Replace children of specific selector
|
|
46
|
+
* - replaceChildrenNode(options) - Replace children of $this (current element)
|
|
47
|
+
* - @replaceChildrenNode - Bare decorator, replaces children of $this
|
|
48
|
+
*/
|
|
49
|
+
export declare function replaceChildren(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
50
|
+
export declare function replaceChildren(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
51
|
+
export declare function replaceChildren(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
52
|
+
/**
|
|
53
|
+
* @clearChildrenNode decorator - clears all children of target element
|
|
54
|
+
*
|
|
55
|
+
* Overloads:
|
|
56
|
+
* - clearChildrenNode(selector, options) - Clear children of specific selector
|
|
57
|
+
* - clearChildrenNode(options) - Clear children of $this (current element)
|
|
58
|
+
* - @clearChildrenNode - Bare decorator, clears children of $this
|
|
59
|
+
*/
|
|
60
|
+
export declare function clearChildrenNode(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
61
|
+
export declare function clearChildrenNode(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
62
|
+
export declare function clearChildrenNode(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
63
|
+
export declare const clearNode: typeof clearChildrenNode;
|
|
64
|
+
/**
|
|
65
|
+
* @innerHtmlNode decorator - sets innerHTML of target element
|
|
66
|
+
*
|
|
67
|
+
* Overloads:
|
|
68
|
+
* - innerHtmlNode(selector, options) - Set innerHTML of specific selector
|
|
69
|
+
* - innerHtmlNode(options) - Set innerHTML of $this (current element)
|
|
70
|
+
* - @innerHtmlNode - Bare decorator, sets innerHTML of $this
|
|
71
|
+
*/
|
|
72
|
+
export declare function innerHtml(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
73
|
+
export declare function innerHtml(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
74
|
+
export declare function innerHtml(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
75
|
+
/**
|
|
76
|
+
* @innerHtmlLightNode decorator - sets innerHTML of light DOM element
|
|
77
|
+
*
|
|
78
|
+
* Overloads:
|
|
79
|
+
* - innerHtmlLightNode(selector, options) - Set innerHTML of specific selector in light DOM
|
|
80
|
+
* - innerHtmlLightNode(options) - Set innerHTML of $this in light DOM
|
|
81
|
+
* - @innerHtmlLightNode - Bare decorator, sets innerHTML of $this in light DOM
|
|
82
|
+
*/
|
|
83
|
+
export declare function innerHtmlLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
84
|
+
export declare function innerHtmlLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
85
|
+
export declare function innerHtmlLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
86
|
+
/**
|
|
87
|
+
* @innerHtmlShadowNode decorator - sets innerHTML of shadow DOM element
|
|
88
|
+
*
|
|
89
|
+
* Overloads:
|
|
90
|
+
* - innerHtmlShadowNode(selector, options) - Set innerHTML of specific selector in shadow DOM
|
|
91
|
+
* - innerHtmlShadowNode(options) - Set innerHTML of $this in shadow DOM
|
|
92
|
+
* - @innerHtmlShadowNode - Bare decorator, sets innerHTML of $this in shadow DOM
|
|
93
|
+
*/
|
|
94
|
+
export declare function innerHtmlShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
95
|
+
export declare function innerHtmlShadow(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
96
|
+
export declare function innerHtmlShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
97
|
+
/**
|
|
98
|
+
* @innerTextNode decorator - sets innerText of target element
|
|
99
|
+
*
|
|
100
|
+
* Overloads:
|
|
101
|
+
* - innerTextNode(selector, options) - Set innerText of specific selector
|
|
102
|
+
* - innerTextNode(options) - Set innerText of $this (current element)
|
|
103
|
+
* - @innerTextNode - Bare decorator, sets innerText of $this
|
|
104
|
+
*/
|
|
105
|
+
export declare function innerText(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
106
|
+
export declare function innerText(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
107
|
+
export declare function innerText(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
108
|
+
/**
|
|
109
|
+
* @innerTextLightNode decorator - sets innerText of light DOM element
|
|
110
|
+
*
|
|
111
|
+
* Overloads:
|
|
112
|
+
* - innerTextLightNode(selector, options) - Set innerText of specific selector in light DOM
|
|
113
|
+
* - innerTextLightNode(options) - Set innerText of $this in light DOM
|
|
114
|
+
* - @innerTextLightNode - Bare decorator, sets innerText of $this in light DOM
|
|
115
|
+
*/
|
|
116
|
+
export declare function innerTextLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
117
|
+
export declare function innerTextLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
118
|
+
export declare function innerTextLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
119
|
+
/**
|
|
120
|
+
* @innerTextShadowNode decorator - sets innerText of shadow DOM element
|
|
121
|
+
*
|
|
122
|
+
* Overloads:
|
|
123
|
+
* - innerTextShadowNode(selector, options) - Set innerText of specific selector in shadow DOM
|
|
124
|
+
* - innerTextShadowNode(options) - Set innerText of $this in shadow DOM
|
|
125
|
+
* - @innerTextShadowNode - Bare decorator, sets innerText of $this in shadow DOM
|
|
126
|
+
*/
|
|
127
|
+
export declare function innerTextShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
128
|
+
export declare function innerTextShadow(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
129
|
+
export declare function innerTextShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
130
|
+
/**
|
|
131
|
+
* @beforeEndNode decorator - appends nodes to target element
|
|
132
|
+
*
|
|
133
|
+
* Overloads:
|
|
134
|
+
* - beforeEndNode(selector, options) - Append to specific selector
|
|
135
|
+
* - beforeEndNode(options) - Append to $this (current element)
|
|
136
|
+
* - @beforeEndNode - Bare decorator, appends to $this
|
|
137
|
+
*/
|
|
138
|
+
export declare function insertBeforeEnd(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
139
|
+
export declare function insertBeforeEnd(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
140
|
+
export declare function insertBeforeEnd(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
141
|
+
/**
|
|
142
|
+
* @beforeEndLightNode decorator - appends nodes to light DOM element
|
|
143
|
+
*
|
|
144
|
+
* Overloads:
|
|
145
|
+
* - beforeEndLightNode(selector, options) - Append to specific selector in light DOM
|
|
146
|
+
* - beforeEndLightNode(options) - Append to $this in light DOM
|
|
147
|
+
* - @beforeEndLightNode - Bare decorator, appends to $this in light DOM
|
|
148
|
+
*/
|
|
149
|
+
export declare function insertBeforeEndLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
150
|
+
export declare function insertBeforeEndLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
151
|
+
export declare function insertBeforeEndLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
152
|
+
/**
|
|
153
|
+
* @beforeEndShadowNode decorator - appends nodes to shadow DOM element
|
|
154
|
+
*
|
|
155
|
+
* Overloads:
|
|
156
|
+
* - beforeEndShadowNode(selector, options) - Append to specific selector in shadow DOM
|
|
157
|
+
* - beforeEndShadowNode(options) - Append to $this in shadow DOM
|
|
158
|
+
* - @beforeEndShadowNode - Bare decorator, appends to $this in shadow DOM
|
|
159
|
+
*/
|
|
160
|
+
export declare function insertBeforeEndShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
161
|
+
export declare function insertBeforeEndShadow(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
162
|
+
export declare function insertBeforeEndShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
163
|
+
/**
|
|
164
|
+
* @afterBeginNode decorator - prepends nodes to target element
|
|
165
|
+
*
|
|
166
|
+
* Overloads:
|
|
167
|
+
* - afterBeginNode(selector, options) - Prepend to specific selector
|
|
168
|
+
* - afterBeginNode(options) - Prepend to $this (current element)
|
|
169
|
+
* - @afterBeginNode - Bare decorator, prepends to $this
|
|
170
|
+
*/
|
|
171
|
+
export declare function insertAfterBegin(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
172
|
+
export declare function insertAfterBegin(options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;
|
|
173
|
+
export declare function insertAfterBegin(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
174
|
+
/**
|
|
175
|
+
* @afterBeginLightNode decorator - prepends nodes to light DOM element
|
|
176
|
+
*
|
|
177
|
+
* Overloads:
|
|
178
|
+
* - afterBeginLightNode(selector, options) - Prepend to specific selector in light DOM
|
|
179
|
+
* - afterBeginLightNode(options) - Prepend to $this in light DOM
|
|
180
|
+
* - @afterBeginLightNode - Bare decorator, prepends to $this in light DOM
|
|
181
|
+
*/
|
|
182
|
+
export declare function insertAfterBeginLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
183
|
+
export declare function insertAfterBeginLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
184
|
+
export declare function insertAfterBeginLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
185
|
+
/**
|
|
186
|
+
* @replaceChildrenLightNode decorator - replaces children of light DOM element
|
|
187
|
+
*
|
|
188
|
+
* Overloads:
|
|
189
|
+
* - replaceChildrenLightNode(selector, options) - Replace children of specific selector in light DOM
|
|
190
|
+
* - replaceChildrenLightNode(options) - Replace children of $this in light DOM
|
|
191
|
+
* - @replaceChildrenLightNode - Bare decorator, replaces children of $this in light DOM
|
|
192
|
+
*/
|
|
193
|
+
export declare function replaceChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
194
|
+
export declare function replaceChildrenLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
195
|
+
export declare function replaceChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
196
|
+
/**
|
|
197
|
+
* @clearChildrenLightNode decorator - clears children of light DOM element
|
|
198
|
+
*
|
|
199
|
+
* Overloads:
|
|
200
|
+
* - clearChildrenLightNode(selector, options) - Clear children of specific selector in light DOM
|
|
201
|
+
* - clearChildrenLightNode(options) - Clear children of $this in light DOM
|
|
202
|
+
* - @clearChildrenLightNode - Bare decorator, clears children of $this in light DOM
|
|
203
|
+
*/
|
|
204
|
+
export declare function clearChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
205
|
+
export declare function clearChildrenLight(options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;
|
|
206
|
+
export declare function clearChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
64
207
|
export declare const findAllApplyNodeMetadata: (target: any) => Map<string | symbol, ApplyNodeMetadata>;
|
|
65
208
|
//# sourceMappingURL=applyNode.d.ts.map
|
|
@@ -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,GAA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