@dooboostore/simple-web-component 1.0.24 → 1.0.25
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 +64 -3406
- package/dist/cjs/decorators/addEventListener.js +1 -1
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/applyAttribute.js +148 -0
- package/dist/cjs/decorators/applyAttribute.js.map +7 -0
- package/dist/cjs/decorators/applyClass.js +164 -0
- package/dist/cjs/decorators/applyClass.js.map +7 -0
- package/dist/cjs/decorators/applyNode.js +87 -194
- package/dist/cjs/decorators/applyNode.js.map +2 -2
- package/dist/cjs/decorators/{style.js → applyStyle.js} +50 -60
- package/dist/cjs/decorators/applyStyle.js.map +7 -0
- package/dist/cjs/decorators/attribute.js +10 -16
- package/dist/cjs/decorators/attribute.js.map +2 -2
- package/dist/cjs/decorators/changedAttributeHost.js +1 -1
- package/dist/cjs/decorators/changedAttributeHost.js.map +2 -2
- package/dist/cjs/decorators/elementDefine.js +14 -23
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/emitCustomEvent.js +5 -2
- package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
- package/dist/cjs/decorators/index.js +3 -3
- package/dist/cjs/decorators/index.js.map +2 -2
- package/dist/cjs/decorators/lifecycles.js +9 -9
- package/dist/cjs/decorators/lifecycles.js.map +2 -2
- package/dist/cjs/decorators/query.js +1 -1
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js +1 -1
- package/dist/cjs/decorators/queryAll.js.map +2 -2
- package/dist/cjs/elements/SwcAppEngine.js +19 -4
- package/dist/cjs/elements/SwcAppEngine.js.map +2 -2
- package/dist/cjs/elements/SwcAppMixin.js +2 -0
- package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
- package/dist/cjs/utils/Utils.js +1 -1
- package/dist/cjs/utils/Utils.js.map +2 -2
- package/dist/esm/decorators/addEventListener.js +1 -1
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/applyAttribute.js +129 -0
- package/dist/esm/decorators/applyAttribute.js.map +7 -0
- package/dist/esm/decorators/applyClass.js +145 -0
- package/dist/esm/decorators/applyClass.js.map +7 -0
- package/dist/esm/decorators/applyNode.js +87 -194
- package/dist/esm/decorators/applyNode.js.map +2 -2
- package/dist/esm/decorators/{style.js → applyStyle.js} +47 -57
- package/dist/esm/decorators/applyStyle.js.map +7 -0
- package/dist/esm/decorators/attribute.js +10 -16
- package/dist/esm/decorators/attribute.js.map +2 -2
- package/dist/esm/decorators/changedAttributeHost.js +1 -1
- package/dist/esm/decorators/changedAttributeHost.js.map +2 -2
- package/dist/esm/decorators/elementDefine.js +14 -23
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js +5 -2
- package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
- package/dist/esm/decorators/index.js +3 -3
- package/dist/esm/decorators/index.js.map +1 -1
- package/dist/esm/decorators/lifecycles.js +9 -9
- package/dist/esm/decorators/lifecycles.js.map +2 -2
- package/dist/esm/decorators/query.js +1 -1
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js +1 -1
- package/dist/esm/decorators/queryAll.js.map +2 -2
- package/dist/esm/elements/SwcAppEngine.js +19 -4
- package/dist/esm/elements/SwcAppEngine.js.map +2 -2
- package/dist/esm/elements/SwcAppMixin.js +2 -0
- package/dist/esm/elements/SwcAppMixin.js.map +2 -2
- package/dist/esm/utils/Utils.js +1 -1
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2884 -586
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/applyAttribute.d.ts +22 -0
- package/dist/types/decorators/applyAttribute.d.ts.map +1 -0
- package/dist/types/decorators/applyClass.d.ts +65 -0
- package/dist/types/decorators/applyClass.d.ts.map +1 -0
- package/dist/types/decorators/applyNode.d.ts +15 -123
- package/dist/types/decorators/applyNode.d.ts.map +1 -1
- package/dist/types/decorators/applyStyle.d.ts +21 -0
- package/dist/types/decorators/applyStyle.d.ts.map +1 -0
- package/dist/types/decorators/attribute.d.ts +10 -19
- package/dist/types/decorators/attribute.d.ts.map +1 -1
- package/dist/types/decorators/changedAttributeHost.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
- package/dist/types/decorators/index.d.ts +3 -3
- package/dist/types/decorators/index.d.ts.map +1 -1
- package/dist/types/decorators/lifecycles.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/types/elements/SwcAppEngine.d.ts +7 -0
- package/dist/types/elements/SwcAppEngine.d.ts.map +1 -1
- package/dist/types/elements/SwcAppMixin.d.ts +1 -1
- package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2884 -586
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +3 -3
- package/src/decorators/addEventListener.ts +1 -1
- package/src/decorators/applyAttribute.ts +147 -0
- package/src/decorators/applyClass.ts +158 -0
- package/src/decorators/applyNode.ts +112 -330
- package/src/decorators/applyStyle.ts +128 -0
- package/src/decorators/attribute.ts +21 -55
- package/src/decorators/changedAttributeHost.ts +1 -1
- package/src/decorators/elementDefine.ts +18 -39
- package/src/decorators/emitCustomEvent.ts +6 -3
- package/src/decorators/index.ts +3 -3
- package/src/decorators/lifecycles.ts +9 -11
- package/src/decorators/query.ts +1 -1
- package/src/decorators/queryAll.ts +1 -1
- package/src/elements/SwcAppEngine.ts +32 -4
- package/src/elements/SwcAppMixin.ts +2 -0
- package/src/utils/Utils.ts +2 -1
- package/dist/cjs/decorators/classList.js +0 -177
- package/dist/cjs/decorators/classList.js.map +0 -7
- package/dist/cjs/decorators/setAttribute.js +0 -111
- package/dist/cjs/decorators/setAttribute.js.map +0 -7
- package/dist/cjs/decorators/style.js.map +0 -7
- package/dist/esm/decorators/classList.js +0 -158
- package/dist/esm/decorators/classList.js.map +0 -7
- package/dist/esm/decorators/setAttribute.js +0 -92
- package/dist/esm/decorators/setAttribute.js.map +0 -7
- package/dist/esm/decorators/style.js.map +0 -7
- package/dist/types/decorators/classList.d.ts +0 -71
- package/dist/types/decorators/classList.d.ts.map +0 -1
- package/dist/types/decorators/setAttribute.d.ts +0 -23
- package/dist/types/decorators/setAttribute.d.ts.map +0 -1
- package/dist/types/decorators/style.d.ts +0 -58
- package/dist/types/decorators/style.d.ts.map +0 -1
- package/src/decorators/classList.ts +0 -234
- package/src/decorators/setAttribute.ts +0 -114
- package/src/decorators/style.ts +0 -185
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addEventListener.d.ts","sourceRoot":"","sources":["../../../src/decorators/addEventListener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,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;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM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BpK,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,wBAAwB,EAAE,GAAG,SAGtF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,eAAe,GAAG,eAAe,CAE3H"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SwcQueryOptions } from '../types';
|
|
2
|
+
export type AttributeAction = 'set' | 'update' | 'remove';
|
|
3
|
+
export interface AttributeApplyOptions extends SwcQueryOptions {
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AttributeApplyMetadata {
|
|
7
|
+
propertyKey: string | symbol;
|
|
8
|
+
selector: string;
|
|
9
|
+
action: AttributeAction;
|
|
10
|
+
options: AttributeApplyOptions;
|
|
11
|
+
}
|
|
12
|
+
export declare const ATTRIBUTE_APPLY_METADATA_KEY: unique symbol;
|
|
13
|
+
export declare function applyAttribute(selector: string, action?: AttributeAction, options?: AttributeApplyOptions): MethodDecorator;
|
|
14
|
+
export declare const setAttribute: (selector: string, nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
|
|
15
|
+
export declare const updateAttribute: (selector: string, nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
|
|
16
|
+
export declare const removeAttribute: (selector: string, nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
|
|
17
|
+
export declare function applyAttributeHost(action?: AttributeAction, options?: AttributeApplyOptions): MethodDecorator;
|
|
18
|
+
export declare const setAttributeHost: (nameOrOptions: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
|
|
19
|
+
export declare const updateAttributeHost: (nameOrOptions: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
|
|
20
|
+
export declare const removeAttributeHost: (nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
|
|
21
|
+
export declare const findAllAttributeApplyMetadata: (target: any) => Map<string | symbol, AttributeApplyMetadata>;
|
|
22
|
+
//# sourceMappingURL=applyAttribute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED,eAAO,MAAM,4BAA4B,eAAqD,CAAC;AAuG/F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,eAA0B,EAAE,OAAO,GAAE,qBAA0B,GAAG,eAAe,CAEzI;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,EAAE,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAsE,CAAC;AACzM,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAyE,CAAC;AAC/M,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAyE,CAAC;AAG/M,wBAAgB,kBAAkB,CAAC,MAAM,GAAE,eAA0B,EAAE,OAAO,GAAE,qBAA0B,GAAG,eAAe,CAE3H;AACD,eAAO,MAAM,gBAAgB,GAAI,eAAe,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAqE,CAAC;AACzL,eAAO,MAAM,mBAAmB,GAAI,eAAe,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAwE,CAAC;AAC/L,eAAO,MAAM,mBAAmB,GAAI,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAwE,CAAC;AAEhM,eAAO,MAAM,6BAA6B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,sBAAsB,CAStG,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SwcQueryOptions, HelperHostSet } from '../types';
|
|
2
|
+
export declare const CLASS_METADATA_KEY: unique symbol;
|
|
3
|
+
export type ClassAction = 'set' | 'update' | 'add' | 'remove' | 'toggle';
|
|
4
|
+
export interface ClassApplyOptions extends SwcQueryOptions {
|
|
5
|
+
}
|
|
6
|
+
export interface ClassApplyMetadata {
|
|
7
|
+
propertyKey: string | symbol;
|
|
8
|
+
selector: string;
|
|
9
|
+
action: ClassAction;
|
|
10
|
+
options: ClassApplyOptions;
|
|
11
|
+
}
|
|
12
|
+
export declare function applyClass(selector: string, action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
|
|
13
|
+
export declare const setClass: (selector: string, classMapOrOptions?: string | {
|
|
14
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
15
|
+
$this: any;
|
|
16
|
+
}) => boolean;
|
|
17
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
18
|
+
export declare const updateClass: (selector: string, classMapOrOptions?: string | {
|
|
19
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
20
|
+
$this: any;
|
|
21
|
+
}) => boolean;
|
|
22
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
23
|
+
export declare const addClass: (selector: string, classMapOrOptions?: string | {
|
|
24
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
25
|
+
$this: any;
|
|
26
|
+
}) => boolean;
|
|
27
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
28
|
+
export declare const removeClass: (selector: string, classMapOrOptions?: string | {
|
|
29
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
30
|
+
$this: any;
|
|
31
|
+
}) => boolean;
|
|
32
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
33
|
+
export declare const toggleClass: (selector: string, classMapOrOptions?: string | {
|
|
34
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
35
|
+
$this: any;
|
|
36
|
+
}) => boolean;
|
|
37
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
38
|
+
export declare function applyClassHost(action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
|
|
39
|
+
export declare const setClassHost: (classMapOrOptions?: string | {
|
|
40
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
41
|
+
$this: any;
|
|
42
|
+
}) => boolean;
|
|
43
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
44
|
+
export declare const updateClassHost: (classMapOrOptions?: string | {
|
|
45
|
+
[className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
|
|
46
|
+
$this: any;
|
|
47
|
+
}) => boolean;
|
|
48
|
+
} | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
|
|
49
|
+
export declare const addClassHost: (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 removeClassHost: (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 toggleClassHost: (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 findAllClassMetadata: (target: any) => Map<string | symbol, ClassApplyMetadata>;
|
|
65
|
+
//# sourceMappingURL=applyClass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyClass.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyClass.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1D,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAE3E,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzE,MAAM,WAAW,iBAAkB,SAAQ,eAAe;CAAG;AAE7D,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAgHD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,WAAsB,EAAE,OAAO,GAAE,iBAAsB,GAAG,eAAe,CAE7H;AAED,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,oBAAoB,MAAM,GAAG;IAAE,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,GAA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AAwE,CAAC;AACpS,eAAO,MAAM,eAAe,GAAI,oBAAoB,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,UAAS,iBAAsB,oBAAwE,CAAC;AAEpS,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,kBAAkB,CASzF,CAAC"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import { SwcRootType } from '../types';
|
|
1
|
+
import { HelperHostSet, SwcRootType } from '../types';
|
|
2
2
|
export type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove';
|
|
3
3
|
export interface ApplyNodeOptions {
|
|
4
4
|
position?: ApplyNodePosition;
|
|
5
5
|
root?: SwcRootType;
|
|
6
|
+
/**
|
|
7
|
+
* Filter function to determine whether to perform DOM operation.
|
|
8
|
+
* If it returns false, the operation is skipped.
|
|
9
|
+
*/
|
|
10
|
+
filter?: (target: HTMLElement | ShadowRoot, newValue: any, helper: HelperHostSet) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Optional loading content to display while an async method is executing.
|
|
13
|
+
*/
|
|
14
|
+
loading?: (helper: HelperHostSet) => any;
|
|
6
15
|
}
|
|
7
16
|
export interface ApplyNodeMetadata {
|
|
8
17
|
propertyKey: string | symbol;
|
|
@@ -12,132 +21,15 @@ export interface ApplyNodeMetadata {
|
|
|
12
21
|
export declare const APPLY_NODE_METADATA_KEY: unique symbol;
|
|
13
22
|
/**
|
|
14
23
|
* @applyNode decorator to surgically add/replace nodes to a target element.
|
|
15
|
-
*
|
|
16
|
-
* Usage examples:
|
|
17
|
-
* @applyNode('#list') addItem() { return '<li>New Item</li>'; } // append at end
|
|
18
|
-
* @applyNode('#header', { position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; } // prepend at start
|
|
19
|
-
* @applyNode('#item', { position: 'replace' }) replaceItem() { return '<div>Replaced</div>'; } // replace element
|
|
20
|
-
* @applyNode('#list', { position: 'replaceChildren' }) updateList() { return [item1, item2]; } // replace all children
|
|
21
|
-
* @applyNode('#notification', { position: 'remove' }) dismissNotification() { return shouldDismiss; } // remove if truthy
|
|
22
|
-
* @applyNode('.items', { position: 'remove', root: 'shadow' }) clearItems() { return true; } // remove shadow DOM elements
|
|
23
|
-
*
|
|
24
|
-
* Positions:
|
|
25
|
-
* - 'beforeEnd' (default): Append at end of target
|
|
26
|
-
* - 'afterBegin': Prepend at start of target
|
|
27
|
-
* - 'beforeBegin': Insert before target
|
|
28
|
-
* - 'afterEnd': Insert after target
|
|
29
|
-
* - 'replace': Replace the entire target element
|
|
30
|
-
* - 'replaceChildren': Replace all children of target element
|
|
31
|
-
* - 'innerHtml': Set target's innerHTML
|
|
32
|
-
* - 'innerText': Set target's innerText
|
|
33
|
-
* - 'remove': Remove target element if returned value is truthy
|
|
34
|
-
*
|
|
35
|
-
* Root Options:
|
|
36
|
-
* - 'auto' (default): Search shadow DOM first, then light DOM
|
|
37
|
-
* - 'shadow': Search only in shadow DOM
|
|
38
|
-
* - 'light': Search only in light DOM
|
|
39
|
-
* - 'all': Use both (shadow preferred for query, both for remove)
|
|
40
24
|
*/
|
|
41
25
|
export declare function applyNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
|
|
42
26
|
export declare const findAllApplyNodeMetadata: (target: any) => Map<string | symbol, ApplyNodeMetadata>;
|
|
43
|
-
/**
|
|
44
|
-
* @applyNodeHost decorator - simplified version of @applyNode for :host selector
|
|
45
|
-
* Usage: @applyNodeHost addItem() { return '<li>New Item</li>'; }
|
|
46
|
-
* Usage: @applyNodeHost() addItem() { return '<li>New Item</li>'; }
|
|
47
|
-
* Usage: @applyNodeHost({ position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; }
|
|
48
|
-
*/
|
|
49
|
-
export declare function applyNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
50
|
-
export declare function applyNodeHost(): MethodDecorator;
|
|
51
27
|
export declare function applyNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
52
|
-
|
|
53
|
-
* @applyBeforeBeginNode - Insert before target element
|
|
54
|
-
*/
|
|
55
|
-
export declare function applyBeforeBeginNode(selector: string): MethodDecorator;
|
|
56
|
-
export declare function applyBeforeBeginNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
57
|
-
/**
|
|
58
|
-
* @applyAfterBeginNode - Prepend to target element
|
|
59
|
-
*/
|
|
60
|
-
export declare function applyAfterBeginNode(selector: string): MethodDecorator;
|
|
61
|
-
export declare function applyAfterBeginNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
62
|
-
/**
|
|
63
|
-
* @applyBeforeEndNode - Append to target element (default)
|
|
64
|
-
*/
|
|
65
|
-
export declare function applyBeforeEndNode(selector: string): MethodDecorator;
|
|
66
|
-
export declare function applyBeforeEndNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
67
|
-
/**
|
|
68
|
-
* @applyAfterEndNode - Insert after target element
|
|
69
|
-
*/
|
|
70
|
-
export declare function applyAfterEndNode(selector: string): MethodDecorator;
|
|
71
|
-
export declare function applyAfterEndNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
72
|
-
/**
|
|
73
|
-
* @applyReplaceNode - Replace entire target element
|
|
74
|
-
*/
|
|
75
|
-
export declare function applyReplaceNode(selector: string): MethodDecorator;
|
|
76
|
-
export declare function applyReplaceNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
77
|
-
/**
|
|
78
|
-
* @applyReplaceChildrenNode - Replace all children of target element
|
|
79
|
-
*/
|
|
80
|
-
export declare function applyReplaceChildrenNode(selector: string): MethodDecorator;
|
|
81
|
-
export declare function applyReplaceChildrenNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
82
|
-
/**
|
|
83
|
-
* @applyInnerHtmlNode - Set target's innerHTML
|
|
84
|
-
*/
|
|
85
|
-
export declare function applyInnerHtmlNode(selector: string): MethodDecorator;
|
|
86
|
-
export declare function applyInnerHtmlNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
87
|
-
/**
|
|
88
|
-
* @applyInnerTextNode - Set target's innerText
|
|
89
|
-
*/
|
|
90
|
-
export declare function applyInnerTextNode(selector: string): MethodDecorator;
|
|
91
|
-
export declare function applyInnerTextNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
92
|
-
/**
|
|
93
|
-
* @applyRemoveNode - Remove target element if truthy
|
|
94
|
-
*/
|
|
95
|
-
export declare function applyRemoveNode(selector: string): MethodDecorator;
|
|
96
|
-
export declare function applyRemoveNode(selector: string, options: ApplyNodeOptions): MethodDecorator;
|
|
97
|
-
/**
|
|
98
|
-
* @applyBeforeBeginNodeHost - Insert before :host
|
|
99
|
-
*/
|
|
100
|
-
export declare function applyBeforeBeginNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
101
|
-
export declare function applyBeforeBeginNodeHost(): MethodDecorator;
|
|
102
|
-
export declare function applyBeforeBeginNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
103
|
-
/**
|
|
104
|
-
* @applyAfterBeginNodeHost - Prepend to :host
|
|
105
|
-
*/ export declare function applyAfterBeginNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
106
|
-
export declare function applyAfterBeginNodeHost(): MethodDecorator;
|
|
107
|
-
export declare function applyAfterBeginNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
108
|
-
/**
|
|
109
|
-
* @applyBeforeEndNodeHost - Append to :host
|
|
110
|
-
*/ export declare function applyBeforeEndNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
111
|
-
export declare function applyBeforeEndNodeHost(): MethodDecorator;
|
|
112
|
-
export declare function applyBeforeEndNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
113
|
-
/**
|
|
114
|
-
* @applyAfterEndNodeHost - Insert after :host
|
|
115
|
-
*/ export declare function applyAfterEndNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
116
|
-
export declare function applyAfterEndNodeHost(): MethodDecorator;
|
|
117
|
-
export declare function applyAfterEndNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
118
|
-
/**
|
|
119
|
-
* @applyReplaceNodeHost - Replace :host
|
|
120
|
-
*/ export declare function applyReplaceNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
121
|
-
export declare function applyReplaceNodeHost(): MethodDecorator;
|
|
122
|
-
export declare function applyReplaceNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
123
|
-
/**
|
|
124
|
-
* @applyReplaceChildrenNodeHost - Replace children of :host
|
|
125
|
-
*/ export declare function applyReplaceChildrenNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
126
|
-
export declare function applyReplaceChildrenNodeHost(): MethodDecorator;
|
|
28
|
+
export declare function applyNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
127
29
|
export declare function applyReplaceChildrenNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
128
|
-
|
|
129
|
-
* @applyInnerHtmlNodeHost - Set :host innerHTML
|
|
130
|
-
*/ export declare function applyInnerHtmlNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
131
|
-
export declare function applyInnerHtmlNodeHost(): MethodDecorator;
|
|
30
|
+
export declare function applyReplaceChildrenNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
132
31
|
export declare function applyInnerHtmlNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
export declare function applyInnerTextNodeHost(): MethodDecorator;
|
|
137
|
-
export declare function applyInnerTextNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
138
|
-
/**
|
|
139
|
-
* @applyRemoveNodeHost - Remove :host if truthy
|
|
140
|
-
*/ export declare function applyRemoveNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
141
|
-
export declare function applyRemoveNodeHost(): MethodDecorator;
|
|
142
|
-
export declare function applyRemoveNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
32
|
+
export declare function applyInnerHtmlNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
33
|
+
export declare function applyReplaceChildrenNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
|
|
34
|
+
export declare function applyInnerHtmlNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
|
|
143
35
|
//# sourceMappingURL=applyNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGtD,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE/J,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,G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E1G;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAEpG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SwcQueryOptions } from '../types';
|
|
2
|
+
export type StyleAction = 'set' | 'update' | 'remove';
|
|
3
|
+
export interface StyleApplyOptions extends SwcQueryOptions {
|
|
4
|
+
}
|
|
5
|
+
export interface StyleApplyMetadata {
|
|
6
|
+
propertyKey: string | symbol;
|
|
7
|
+
selector: string;
|
|
8
|
+
action: StyleAction;
|
|
9
|
+
options: StyleApplyOptions;
|
|
10
|
+
}
|
|
11
|
+
export declare const STYLE_METADATA_KEY: unique symbol;
|
|
12
|
+
export declare function applyStyle(selector: string, action?: StyleAction, options?: StyleApplyOptions): MethodDecorator;
|
|
13
|
+
export declare const setStyle: (selector: string, options?: StyleApplyOptions) => MethodDecorator;
|
|
14
|
+
export declare const updateStyle: (selector: string, options?: StyleApplyOptions) => MethodDecorator;
|
|
15
|
+
export declare const removeStyle: (selector: string, options?: StyleApplyOptions) => MethodDecorator;
|
|
16
|
+
export declare function applyStyleHost(action?: StyleAction, options?: StyleApplyOptions): MethodDecorator;
|
|
17
|
+
export declare const setStyleHost: (options?: StyleApplyOptions) => MethodDecorator;
|
|
18
|
+
export declare const updateStyleHost: (options?: StyleApplyOptions) => MethodDecorator;
|
|
19
|
+
export declare const removeStyleHost: (options?: StyleApplyOptions) => MethodDecorator;
|
|
20
|
+
export declare const findAllStyleMetadata: (target: any) => Map<string | symbol, StyleApplyMetadata>;
|
|
21
|
+
//# sourceMappingURL=applyStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyStyle.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyStyle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,iBAAkB,SAAQ,eAAe;CAAG;AAE7D,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAsF3E,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,WAAsB,EAAE,OAAO,GAAE,iBAAsB,GAAG,eAAe,CAE7H;AAED,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,UAAS,iBAAsB,oBAAmD,CAAC;AAC9H,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,UAAS,iBAAsB,oBAAsD,CAAC;AACpI,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,UAAS,iBAAsB,oBAAsD,CAAC;AAGpI,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAsB,EAAE,OAAO,GAAE,iBAAsB,GAAG,eAAe,CAE/G;AACD,eAAO,MAAM,YAAY,GAAI,UAAS,iBAAsB,oBAAkD,CAAC;AAC/G,eAAO,MAAM,eAAe,GAAI,UAAS,iBAAsB,oBAAqD,CAAC;AACrH,eAAO,MAAM,eAAe,GAAI,UAAS,iBAAsB,oBAAqD,CAAC;AAErH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,kBAAkB,CASzF,CAAC"}
|
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
import { SwcQueryOptions } from '../types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface AttributeFieldOptions extends SwcQueryOptions {
|
|
3
3
|
name?: string;
|
|
4
4
|
connectedInitialize?: boolean;
|
|
5
5
|
type?: typeof Number | typeof Boolean | typeof String;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface AttributeFieldMetadata {
|
|
8
8
|
propertyKey: string | symbol;
|
|
9
9
|
selector: string;
|
|
10
|
-
options:
|
|
10
|
+
options: AttributeFieldOptions;
|
|
11
11
|
privateKey: symbol;
|
|
12
12
|
}
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
* Helper to resolve target elements based on selector and root options
|
|
16
|
-
*/
|
|
17
|
-
export declare const resolveTargetEls: (inst: any, selector: string, options: AttributeOptions, currentWin: any) => HTMLElement[];
|
|
13
|
+
export declare const ATTRIBUTE_FIELD_METADATA_KEY: unique symbol;
|
|
14
|
+
export declare const resolveTargetEls: (inst: any, selector: string, options: AttributeFieldOptions, currentWin: any) => HTMLElement[];
|
|
18
15
|
/**
|
|
19
16
|
* @attribute decorator to sync a field value with an element's attribute.
|
|
20
17
|
*/
|
|
21
|
-
export declare function attribute(selector: string, options?:
|
|
22
|
-
export declare const findAllAttributeMetadata: (target: any) => AttributeMetadata[];
|
|
18
|
+
export declare function attribute(selector: string, options?: AttributeFieldOptions): PropertyDecorator;
|
|
23
19
|
/**
|
|
24
|
-
* @attributeHost decorator
|
|
25
|
-
* Usage: @attributeHost - uses field name as attribute name
|
|
26
|
-
* Usage: @attributeHost() - uses field name as attribute name
|
|
27
|
-
* Usage: @attributeHost('data-id') - uses custom attribute name
|
|
28
|
-
* Usage: @attributeHost({ type: Boolean }) - uses field name with options
|
|
29
|
-
* Usage: @attributeHost('data-id', { type: Boolean }) - uses custom name with options
|
|
20
|
+
* @attributeHost decorator to sync a field value with the :host element's attribute.
|
|
30
21
|
*/
|
|
31
22
|
export declare function attributeHost(target: Object, propertyKey: string | symbol): void;
|
|
32
|
-
export declare function attributeHost(): PropertyDecorator;
|
|
33
|
-
export declare function attributeHost(options: AttributeOptions): PropertyDecorator;
|
|
23
|
+
export declare function attributeHost(options: AttributeFieldOptions): PropertyDecorator;
|
|
34
24
|
export declare function attributeHost(attrName: string): PropertyDecorator;
|
|
35
|
-
export declare function attributeHost(attrName: string, options:
|
|
25
|
+
export declare function attributeHost(attrName: string, options: AttributeFieldOptions): PropertyDecorator;
|
|
26
|
+
export declare const findAllAttributeMetadata: (target: any) => AttributeFieldMetadata[];
|
|
36
27
|
//# sourceMappingURL=attribute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,eAAe,EAAC,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,eAAe,EAAC,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,MAAM,GAAG,OAAO,OAAO,GAAG,OAAO,MAAM,CAAC;CACvD;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,qBAAqB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,4BAA4B,eAAqD,CAAC;AAS/F,eAAO,MAAM,gBAAgB,GAAI,MAAM,GAAG,EAAE,UAAU,MAAM,EAAE,SAAS,qBAAqB,EAAE,YAAY,GAAG,KAAG,WAAW,EA+C1H,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,iBAAiB,CA+ElG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAClF,wBAAgB,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CAAC;AACjF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAAC;AACnE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CAAC;AAsBnG,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,sBAAsB,EAE5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changedAttributeHost.d.ts","sourceRoot":"","sources":["../../../src/decorators/changedAttributeHost.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,
|
|
1
|
+
{"version":3,"file":"changedAttributeHost.d.ts","sourceRoot":"","sources":["../../../src/decorators/changedAttributeHost.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,eAA0D,CAAC;AAEzG;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,eAAe,CAiB5E;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,SAG5F,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAE5F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,eAAoD,CAAC;AAEpF,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,eAAe,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,GAAG,SAiBnC,CAAC;AA2JF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA2TpD,CAAC"}
|
|
@@ -18,7 +18,7 @@ export declare function emitCustomEvent(selector: string, type: string, options?
|
|
|
18
18
|
export declare const getEmitCustomEventMetadataList: (target: any) => EmitCustomEventMetadata[] | undefined;
|
|
19
19
|
/**
|
|
20
20
|
* @emitCustomEventHost decorator - simplified version of @emitCustomEvent for :host selector
|
|
21
|
-
* Usage: @emitCustomEventHost('navigate')
|
|
21
|
+
* Usage: @emitCustomEventHost('navigate') // default attributeName: 'on-emit-navigate'
|
|
22
22
|
* Usage: @emitCustomEventHost('navigate', { attributeName: 'on-navigate' })
|
|
23
23
|
*
|
|
24
24
|
* The attributeName option is used to automatically observe attributes for this event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitCustomEvent.d.ts","sourceRoot":"","sources":["../../../src/decorators/emitCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,C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AI,QAAQ,GAAG,KAAG,uBAAuB,EAAE,GAAG,SAGxF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,0BAA0B,GAAG,eAAe,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,eAAe,CAK1J"}
|
|
@@ -2,12 +2,12 @@ export * from './addEventListener';
|
|
|
2
2
|
export * from './attribute';
|
|
3
3
|
export * from './elementDefine';
|
|
4
4
|
export * from './changedAttributeHost';
|
|
5
|
-
export * from './setAttribute';
|
|
6
5
|
export * from './emitCustomEvent';
|
|
7
6
|
export * from './applyNode';
|
|
8
7
|
export * from './lifecycles';
|
|
9
8
|
export * from './query';
|
|
10
9
|
export * from './queryAll';
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
10
|
+
export * from './applyClass';
|
|
11
|
+
export * from './applyStyle';
|
|
12
|
+
export * from './applyAttribute';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B,eAAoD,CAAC;AAC7F,eAAO,MAAM,gCAAgC,eAAyD,CAAC;AACvG,eAAO,MAAM,+BAA+B,eAAwD,CAAC;AACrG,eAAO,MAAM,mCAAmC,eAA4D,CAAC;AAC7G,eAAO,MAAM,kCAAkC,eAA2D,CAAC;AAC3G,eAAO,MAAM,8BAA8B,eAAuD,CAAC;AACnG,eAAO,MAAM,6BAA6B,eAAsD,CAAC;AACjG,eAAO,MAAM,kCAAkC,eAA2D,CAAC;AAC3G,eAAO,MAAM,uBAAuB,eAAgD,CAAC;AAErF,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAcD,eAAO,MAAM,aAAa,iBAAwD,CAAC;AACnF,eAAO,MAAM,iBAAiB,iBAA6D,CAAC;AAC5F,eAAO,MAAM,gBAAgB,iBAA4D,CAAC;AAC1F,eAAO,MAAM,WAAW,iBAAmB,CAAC;AAE5C,eAAO,MAAM,oBAAoB,iBAAgE,CAAC;AAClG,eAAO,MAAM,mBAAmB,iBAA+D,CAAC;AAChG,eAAO,MAAM,cAAc,iBAAsB,CAAC;AAElD,eAAO,MAAM,eAAe,iBAA2D,CAAC;AACxF,eAAO,MAAM,cAAc,iBAA0D,CAAC;AACtF,eAAO,MAAM,SAAS,iBAAiB,CAAC;AAExC,eAAO,MAAM,kBAAkB,iBAA+D,CAAC;AAE/F;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AACjF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAqBzH;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,aAAa,MAAM,KAAG,CAAC,GAAG,SAGxG,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAAE,GAAG,SAGnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAE3E,wBAAgB,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAClE,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO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AC9C,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAYtE;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AACjF,wBAAgB,YAAY,IAAI,iBAAiB,CAAC;AAClD,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAY1E;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAChF,wBAAgB,WAAW,IAAI,iBAAiB,CAAC;AACjD,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryAll.d.ts","sourceRoot":"","sources":["../../../src/decorators/queryAll.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"queryAll.d.ts","sourceRoot":"","sources":["../../../src/decorators/queryAll.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,eAA+C,CAAC;AAEnF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAi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GAAG,MAAM,GAAG,IAAI,CAAC;AAChF,wBAAgB,WAAW,IAAI,iBAAiB,CAAC;AACjD,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAYzE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AACpF,wBAAgB,eAAe,IAAI,iBAAiB,CAAC;AACrD,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAY7E;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AACnF,wBAAgB,cAAc,IAAI,iBAAiB,CAAC;AACpD,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';
|
|
2
2
|
import { Router } from '@dooboostore/core-web';
|
|
3
3
|
import { ConstructorType, OptionalType } from '@dooboostore/core';
|
|
4
|
+
import { SwcAppInterface } from '../types';
|
|
4
5
|
export type SwcConfigType = {
|
|
5
6
|
rootRouter: ConstructorType<any> | symbol;
|
|
6
7
|
routeType: 'path' | 'hash' | 'element';
|
|
7
8
|
connectMode?: 'direct' | 'swap';
|
|
9
|
+
container?: symbol;
|
|
8
10
|
path?: string;
|
|
9
11
|
window: Window;
|
|
12
|
+
onStarted?: (app: SwcAppInterface) => void;
|
|
13
|
+
onConnected?: (app: SwcAppInterface) => void;
|
|
14
|
+
onDisconnected?: (app: SwcAppInterface) => void;
|
|
10
15
|
};
|
|
11
16
|
export type SwcAttributeConfigType = OptionalType<SwcConfigType, 'routeType' | 'window'>;
|
|
12
17
|
export declare class SwcAppEngine {
|
|
@@ -15,7 +20,9 @@ export declare class SwcAppEngine {
|
|
|
15
20
|
router?: Router;
|
|
16
21
|
private routerSubscription?;
|
|
17
22
|
private _isInitialized;
|
|
23
|
+
private _config?;
|
|
18
24
|
constructor(host: HTMLElement);
|
|
25
|
+
get config(): SwcConfigType;
|
|
19
26
|
connect(config?: SwcAttributeConfigType): Promise<void>;
|
|
20
27
|
disconnect(): void;
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwcAppEngine.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAK/E,OAAO,EAAE,MAAM,EAAmB,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIlE,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SwcAppEngine.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAK/E,OAAO,EAAE,MAAM,EAAmB,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIlE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,aAAa,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC;AAEzF,qBAAa,YAAY;IAOX,OAAO,CAAC,IAAI;IANjB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,kBAAkB,CAAC,CAAe;IAC1C,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAC,CAAgB;gBAEZ,IAAI,EAAE,WAAW;IAErC,IAAI,MAAM,kBAET;IACK,OAAO,CAAC,MAAM,CAAC,EAAE,sBAAsB;IA0F7C,UAAU;CAGX"}
|
|
@@ -4,7 +4,7 @@ export declare function SwcAppMixin<T extends {
|
|
|
4
4
|
}>(Base: T): {
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
__swc_engine: SwcAppEngine;
|
|
7
|
-
get simpleApplication(): import("@dooboostore/simple-boot
|
|
7
|
+
get simpleApplication(): import("@dooboostore/simple-boot").SimpleApplication;
|
|
8
8
|
get router(): import("@dooboostore/core-web").Router<any>;
|
|
9
9
|
connect(config?: SwcAttributeConfigType): Promise<void>;
|
|
10
10
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwcAppMixin.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppMixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGtE,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,CAAA;CAAE,EAAE,IAAI,EAAE,CAAC;kBAA9B,GAAG,EAAE;;;;yBAWhC,sBAAsB;;;
|
|
1
|
+
{"version":3,"file":"SwcAppMixin.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppMixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGtE,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,CAAA;CAAE,EAAE,IAAI,EAAE,CAAC;kBAA9B,GAAG,EAAE;;;;yBAWhC,sBAAsB;;;sBAiDzB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAI7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/utils/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9E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