@dooboostore/simple-web-component 1.0.22 → 1.0.24
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 +568 -32
- package/dist/cjs/decorators/applyNode.js +195 -26
- package/dist/cjs/decorators/applyNode.js.map +2 -2
- package/dist/cjs/decorators/attribute.js +21 -3
- package/dist/cjs/decorators/attribute.js.map +2 -2
- package/dist/cjs/decorators/changedAttributeHost.js.map +2 -2
- package/dist/cjs/decorators/classList.js +82 -19
- package/dist/cjs/decorators/classList.js.map +2 -2
- package/dist/cjs/decorators/elementDefine.js +1 -2
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/index.js +0 -1
- package/dist/cjs/decorators/index.js.map +2 -2
- package/dist/cjs/decorators/lifecycles.js +25 -0
- package/dist/cjs/decorators/lifecycles.js.map +2 -2
- package/dist/cjs/decorators/query.js +77 -2
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js +77 -2
- package/dist/cjs/decorators/queryAll.js.map +2 -2
- package/dist/cjs/decorators/setAttribute.js +4 -4
- package/dist/cjs/decorators/setAttribute.js.map +2 -2
- package/dist/cjs/decorators/style.js +70 -13
- package/dist/cjs/decorators/style.js.map +2 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/utils/Utils.js +140 -1
- package/dist/cjs/utils/Utils.js.map +2 -2
- package/dist/esm/decorators/applyNode.js +195 -26
- package/dist/esm/decorators/applyNode.js.map +2 -2
- package/dist/esm/decorators/attribute.js +21 -3
- package/dist/esm/decorators/attribute.js.map +2 -2
- package/dist/esm/decorators/changedAttributeHost.js.map +2 -2
- package/dist/esm/decorators/classList.js +82 -19
- package/dist/esm/decorators/classList.js.map +2 -2
- package/dist/esm/decorators/elementDefine.js +1 -2
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/index.js +0 -1
- package/dist/esm/decorators/index.js.map +2 -2
- package/dist/esm/decorators/lifecycles.js +25 -0
- package/dist/esm/decorators/lifecycles.js.map +2 -2
- package/dist/esm/decorators/query.js +77 -2
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js +77 -2
- package/dist/esm/decorators/queryAll.js.map +2 -2
- package/dist/esm/decorators/setAttribute.js +4 -4
- package/dist/esm/decorators/setAttribute.js.map +2 -2
- package/dist/esm/decorators/style.js +70 -13
- package/dist/esm/decorators/style.js.map +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/utils/Utils.js +140 -1
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +678 -168
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/decorators/applyNode.d.ts +107 -2
- package/dist/types/decorators/applyNode.d.ts.map +1 -1
- package/dist/types/decorators/attribute.d.ts +11 -4
- package/dist/types/decorators/attribute.d.ts.map +1 -1
- package/dist/types/decorators/classList.d.ts +22 -10
- package/dist/types/decorators/classList.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/index.d.ts +0 -1
- package/dist/types/decorators/index.d.ts.map +1 -1
- package/dist/types/decorators/lifecycles.d.ts +14 -0
- package/dist/types/decorators/lifecycles.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +68 -7
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts +70 -1
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/types/decorators/setAttribute.d.ts.map +1 -1
- package/dist/types/decorators/style.d.ts +37 -3
- package/dist/types/decorators/style.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts +49 -0
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +678 -168
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +2 -2
- package/src/decorators/applyNode.ts +319 -37
- package/src/decorators/attribute.ts +44 -11
- package/src/decorators/changedAttributeHost.ts +1 -1
- package/src/decorators/classList.ts +107 -22
- package/src/decorators/elementDefine.ts +1 -2
- package/src/decorators/index.ts +0 -1
- package/src/decorators/lifecycles.ts +40 -0
- package/src/decorators/query.ts +147 -7
- package/src/decorators/queryAll.ts +148 -2
- package/src/decorators/setAttribute.ts +6 -5
- package/src/decorators/style.ts +109 -13
- package/src/index.ts +6 -6
- package/src/utils/Utils.ts +144 -0
- package/dist/cjs/decorators/onConnectedInnerHtml.js +0 -48
- package/dist/cjs/decorators/onConnectedInnerHtml.js.map +0 -7
- package/dist/cjs/utils/TemplateUtils.js +0 -103
- package/dist/cjs/utils/TemplateUtils.js.map +0 -7
- package/dist/esm/decorators/onConnectedInnerHtml.js +0 -29
- package/dist/esm/decorators/onConnectedInnerHtml.js.map +0 -7
- package/dist/esm/utils/TemplateUtils.js +0 -84
- package/dist/esm/utils/TemplateUtils.js.map +0 -7
- package/dist/types/decorators/onConnectedInnerHtml.d.ts +0 -15
- package/dist/types/decorators/onConnectedInnerHtml.d.ts.map +0 -1
- package/dist/types/utils/TemplateUtils.d.ts +0 -54
- package/dist/types/utils/TemplateUtils.d.ts.map +0 -1
- package/src/decorators/onConnectedInnerHtml.ts +0 -42
- package/src/utils/TemplateUtils.ts +0 -83
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { SwcRootType } from '../types';
|
|
2
|
+
export type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove';
|
|
2
3
|
export interface ApplyNodeOptions {
|
|
3
4
|
position?: ApplyNodePosition;
|
|
5
|
+
root?: SwcRootType;
|
|
4
6
|
}
|
|
5
7
|
export interface ApplyNodeMetadata {
|
|
6
8
|
propertyKey: string | symbol;
|
|
@@ -16,6 +18,8 @@ export declare const APPLY_NODE_METADATA_KEY: unique symbol;
|
|
|
16
18
|
* @applyNode('#header', { position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; } // prepend at start
|
|
17
19
|
* @applyNode('#item', { position: 'replace' }) replaceItem() { return '<div>Replaced</div>'; } // replace element
|
|
18
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
|
|
19
23
|
*
|
|
20
24
|
* Positions:
|
|
21
25
|
* - 'beforeEnd' (default): Append at end of target
|
|
@@ -26,13 +30,114 @@ export declare const APPLY_NODE_METADATA_KEY: unique symbol;
|
|
|
26
30
|
* - 'replaceChildren': Replace all children of target element
|
|
27
31
|
* - 'innerHtml': Set target's innerHTML
|
|
28
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)
|
|
29
40
|
*/
|
|
30
41
|
export declare function applyNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
|
|
31
42
|
export declare const findAllApplyNodeMetadata: (target: any) => Map<string | symbol, ApplyNodeMetadata>;
|
|
32
43
|
/**
|
|
33
44
|
* @applyNodeHost decorator - simplified version of @applyNode for :host selector
|
|
45
|
+
* Usage: @applyNodeHost addItem() { return '<li>New Item</li>'; }
|
|
34
46
|
* Usage: @applyNodeHost() addItem() { return '<li>New Item</li>'; }
|
|
35
47
|
* Usage: @applyNodeHost({ position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; }
|
|
36
48
|
*/
|
|
37
|
-
export declare function applyNodeHost(
|
|
49
|
+
export declare function applyNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
50
|
+
export declare function applyNodeHost(): MethodDecorator;
|
|
51
|
+
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;
|
|
127
|
+
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;
|
|
132
|
+
export declare function applyInnerHtmlNodeHost(options: ApplyNodeOptions): MethodDecorator;
|
|
133
|
+
/**
|
|
134
|
+
* @applyInnerTextNodeHost - Set :host innerText
|
|
135
|
+
*/ export declare function applyInnerTextNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
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;
|
|
38
143
|
//# sourceMappingURL=applyNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,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;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,eAA4C,CAAC;AAUjF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAA4C,GAAG,eAAe,CAwHlH;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG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,EAAE,UAAU,EAAE,kBAAkB,GAAG,GAAG,CAAC;AAAA,wBAAgB,sBAAsB,IAAI,eAAe,CAAC;AACvL,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AASnF;;GAEG,CAAA,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,GAAG,CAAC;AAAA,wBAAgB,mBAAmB,IAAI,eAAe,CAAC;AACjL,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC"}
|
|
@@ -21,9 +21,16 @@ export declare const resolveTargetEls: (inst: any, selector: string, options: At
|
|
|
21
21
|
export declare function attribute(selector: string, options?: AttributeOptions): PropertyDecorator;
|
|
22
22
|
export declare const findAllAttributeMetadata: (target: any) => AttributeMetadata[];
|
|
23
23
|
/**
|
|
24
|
-
* @
|
|
25
|
-
* Usage: @
|
|
26
|
-
* Usage: @
|
|
24
|
+
* @attributeHost decorator - simplified version of @attribute for :host selector
|
|
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
|
|
27
30
|
*/
|
|
28
|
-
export declare function attributeHost(
|
|
31
|
+
export declare function attributeHost(target: Object, propertyKey: string | symbol): void;
|
|
32
|
+
export declare function attributeHost(): PropertyDecorator;
|
|
33
|
+
export declare function attributeHost(options: AttributeOptions): PropertyDecorator;
|
|
34
|
+
export declare function attributeHost(attrName: string): PropertyDecorator;
|
|
35
|
+
export declare function attributeHost(attrName: string, options: AttributeOptions): PropertyDecorator;
|
|
29
36
|
//# sourceMappingURL=attribute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
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,gBAAiB,SAAQ,eAAe;IACvD,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,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,eAA2C,CAAC;AAY/E;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,GAAG,EAAE,UAAU,MAAM,EAAE,SAAS,gBAAgB,EAAE,YAAY,GAAG,KAAG,WAAW,EAiDrH,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,iBAAiB,CA2F7F;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAEvE,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAClF,wBAAgB,aAAa,IAAI,iBAAiB,CAAC;AACnD,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;AAC5E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAAC;AACnE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CAAC"}
|
|
@@ -1,59 +1,71 @@
|
|
|
1
|
+
import { SwcQueryOptions } from '../types';
|
|
1
2
|
export declare const CLASS_LIST_METADATA_KEY: unique symbol;
|
|
2
3
|
export type ClassListAction = 'set' | 'update' | 'add' | 'remove' | 'toggle';
|
|
3
4
|
export interface ClassListMetadata {
|
|
4
5
|
propertyKey: string | symbol;
|
|
5
6
|
selector: string;
|
|
6
7
|
action: ClassListAction;
|
|
8
|
+
options: SwcQueryOptions;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* @setClassList decorator to surgically replace all classes on a target element.
|
|
10
12
|
* Returns: string | string[]
|
|
11
13
|
*/
|
|
12
|
-
export declare const setClassList: (selector: string) => MethodDecorator;
|
|
14
|
+
export declare const setClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
13
15
|
/**
|
|
14
16
|
* @updateClassList decorator to surgically update specific classes.
|
|
15
17
|
* Returns: Record<string, boolean> (toggle with force) | string | string[] (add)
|
|
16
18
|
*/
|
|
17
|
-
export declare const updateClassList: (selector: string) => MethodDecorator;
|
|
19
|
+
export declare const updateClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
18
20
|
/**
|
|
19
21
|
* @addClassList decorator to surgically add classes to a target element.
|
|
20
22
|
* Returns: string | string[]
|
|
21
23
|
*/
|
|
22
|
-
export declare const addClassList: (selector: string) => MethodDecorator;
|
|
24
|
+
export declare const addClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
23
25
|
/**
|
|
24
26
|
* @removeClassList decorator to surgically remove classes from a target element.
|
|
25
27
|
* Returns: string | string[]
|
|
26
28
|
*/
|
|
27
|
-
export declare const removeClassList: (selector: string) => MethodDecorator;
|
|
29
|
+
export declare const removeClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
28
30
|
/**
|
|
29
31
|
* @toggleClassList decorator to surgically toggle classes on a target element.
|
|
30
32
|
* Returns: string | string[]
|
|
31
33
|
*/
|
|
32
|
-
export declare const toggleClassList: (selector: string) => MethodDecorator;
|
|
34
|
+
export declare const toggleClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
33
35
|
/**
|
|
34
36
|
* @setClassListHost decorator to set classes on :host element.
|
|
35
37
|
* Returns: string | string[]
|
|
36
38
|
*/
|
|
37
|
-
export declare
|
|
39
|
+
export declare function setClassListHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
40
|
+
export declare function setClassListHost(): MethodDecorator;
|
|
41
|
+
export declare function setClassListHost(options: SwcQueryOptions): MethodDecorator;
|
|
38
42
|
/**
|
|
39
43
|
* @updateClassListHost decorator to update specific classes on :host.
|
|
40
44
|
* Returns: Record<string, boolean> (toggle with force) | string | string[] (add)
|
|
41
45
|
*/
|
|
42
|
-
export declare
|
|
46
|
+
export declare function updateClassListHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
47
|
+
export declare function updateClassListHost(): MethodDecorator;
|
|
48
|
+
export declare function updateClassListHost(options: SwcQueryOptions): MethodDecorator;
|
|
43
49
|
/**
|
|
44
50
|
* @addClassListHost decorator to add classes to :host element.
|
|
45
51
|
* Returns: string | string[]
|
|
46
52
|
*/
|
|
47
|
-
export declare
|
|
53
|
+
export declare function addClassListHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
54
|
+
export declare function addClassListHost(): MethodDecorator;
|
|
55
|
+
export declare function addClassListHost(options: SwcQueryOptions): MethodDecorator;
|
|
48
56
|
/**
|
|
49
57
|
* @removeClassListHost decorator to remove classes from :host element.
|
|
50
58
|
* Returns: string | string[]
|
|
51
59
|
*/
|
|
52
|
-
export declare
|
|
60
|
+
export declare function removeClassListHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
61
|
+
export declare function removeClassListHost(): MethodDecorator;
|
|
62
|
+
export declare function removeClassListHost(options: SwcQueryOptions): MethodDecorator;
|
|
53
63
|
/**
|
|
54
64
|
* @toggleClassListHost decorator to toggle classes on :host element.
|
|
55
65
|
* Returns: string | string[]
|
|
56
66
|
*/
|
|
57
|
-
export declare
|
|
67
|
+
export declare function toggleClassListHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
68
|
+
export declare function toggleClassListHost(): MethodDecorator;
|
|
69
|
+
export declare function toggleClassListHost(options: SwcQueryOptions): MethodDecorator;
|
|
58
70
|
export declare const findAllClassListMetadata: (target: any) => Map<string | symbol, ClassListMetadata>;
|
|
59
71
|
//# sourceMappingURL=classList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classList.d.ts","sourceRoot":"","sources":["../../../src/decorators/classList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"classList.d.ts","sourceRoot":"","sources":["../../../src/decorators/classList.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,uBAAuB,eAA4C,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAuGD;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,EAAE,UAAS,eAAoB,oBAAuD,CAAC;AAEpI;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,UAAS,eAAoB,oBAA0D,CAAC;AAE1I;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM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gB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,GAAG,CAAC;AACvH,wBAAgB,mBAAmB,IAAI,eAAe,CAAC;AACvD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,eAAe,CAAC;AAS/E,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,iBAAiB,CAS5F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,eAAgD,CAAC;AAEhF,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;AA6JF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA8UpD,CAAC"}
|
|
@@ -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,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,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,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -6,7 +6,15 @@ export declare const ON_AFTER_DISCONNECTED_METADATA_KEY: unique symbol;
|
|
|
6
6
|
export declare const ON_BEFORE_ADOPTED_METADATA_KEY: unique symbol;
|
|
7
7
|
export declare const ON_AFTER_ADOPTED_METADATA_KEY: unique symbol;
|
|
8
8
|
export declare const ON_ADD_EVENT_LISTENER_METADATA_KEY: unique symbol;
|
|
9
|
+
export declare const INNER_HTML_METADATA_KEY: unique symbol;
|
|
9
10
|
export declare const ATTRIBUTE_CHANGED_WILDCARD = "*";
|
|
11
|
+
export interface InnerHtmlOptions {
|
|
12
|
+
useShadow?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface InnerHtmlMetadata {
|
|
15
|
+
propertyKey: string | symbol;
|
|
16
|
+
options: InnerHtmlOptions;
|
|
17
|
+
}
|
|
10
18
|
export declare const onConstructor: MethodDecorator;
|
|
11
19
|
export declare const onBeforeConnected: MethodDecorator;
|
|
12
20
|
export declare const onAfterConnected: MethodDecorator;
|
|
@@ -18,8 +26,14 @@ export declare const onBeforeAdopted: MethodDecorator;
|
|
|
18
26
|
export declare const onAfterAdopted: MethodDecorator;
|
|
19
27
|
export declare const onAdopted: MethodDecorator;
|
|
20
28
|
export declare const onAddEventListener: MethodDecorator;
|
|
29
|
+
/**
|
|
30
|
+
* @onConnectedInnerHtml decorator to define the initial HTML content when connected.
|
|
31
|
+
*/
|
|
32
|
+
export declare function onConnectedInnerHtml(options: InnerHtmlOptions): MethodDecorator;
|
|
33
|
+
export declare function onConnectedInnerHtml(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
21
34
|
/**
|
|
22
35
|
* 프로토타입 체인을 순회하며 모든 라이프사이클 메서드를 수집합니다.
|
|
23
36
|
*/
|
|
24
37
|
export declare const findAllLifecycleMetadata: <T = (string | symbol)[]>(target: any, metadataKey: symbol) => T | undefined;
|
|
38
|
+
export declare const getOnConnectedInnerHtmlMetadata: (target: any) => InnerHtmlMetadata[] | undefined;
|
|
25
39
|
//# sourceMappingURL=lifecycles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,eAAgD,CAAC;AACzF,eAAO,MAAM,gCAAgC,eAAqD,CAAC;AACnG,eAAO,MAAM,+BAA+B,eAAoD,CAAC;AACjG,eAAO,MAAM,mCAAmC,eAAwD,CAAC;AACzG,eAAO,MAAM,kCAAkC,eAAuD,CAAC;AACvG,eAAO,MAAM,8BAA8B,eAAmD,CAAC;AAC/F,eAAO,MAAM,6BAA6B,eAAkD,CAAC;AAC7F,eAAO,MAAM,kCAAkC,eAAuD,CAAC;
|
|
1
|
+
{"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"AAIA,eA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;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,7 +1,4 @@
|
|
|
1
1
|
import { SpecialSelector, SwcQueryOptions } from '../types';
|
|
2
|
-
export type QueryOptions = {
|
|
3
|
-
root?: 'light' | 'shadow' | 'all' | 'auto';
|
|
4
|
-
};
|
|
5
2
|
export interface QueryMetadata {
|
|
6
3
|
propertyKey: string | symbol;
|
|
7
4
|
selector: string;
|
|
@@ -12,9 +9,73 @@ export declare function query(target: SpecialSelector): PropertyDecorator;
|
|
|
12
9
|
export declare function query(selector: string, options?: SwcQueryOptions): PropertyDecorator;
|
|
13
10
|
export declare const getQueryMetadata: (target: any) => QueryMetadata[] | undefined;
|
|
14
11
|
/**
|
|
15
|
-
* @
|
|
16
|
-
* Usage: @
|
|
17
|
-
* Usage: @
|
|
12
|
+
* @queryHost decorator - simplified version of @query for :host selector
|
|
13
|
+
* Usage: @queryHost testzzs: HTMLElement | undefined;
|
|
14
|
+
* Usage: @queryHost() testzzs: HTMLElement | undefined;
|
|
15
|
+
* Usage: @queryHost({ root: 'shadow' }) testzzs: HTMLElement | undefined;
|
|
18
16
|
*/
|
|
19
|
-
export declare function queryHost(
|
|
17
|
+
export declare function queryHost(target: Object, propertyKey: string | symbol): void;
|
|
18
|
+
export declare function queryHost(): PropertyDecorator;
|
|
19
|
+
export declare function queryHost(options: SwcQueryOptions): PropertyDecorator;
|
|
20
|
+
/**
|
|
21
|
+
* @host - Alias for @queryHost decorator
|
|
22
|
+
* Usage: @host element: HTMLElement | undefined;
|
|
23
|
+
* Usage: @host() element: HTMLElement | undefined;
|
|
24
|
+
* Usage: @host({ root: 'shadow' }) element: HTMLElement | undefined;
|
|
25
|
+
*/
|
|
26
|
+
export declare const host: typeof queryHost;
|
|
27
|
+
/**
|
|
28
|
+
* @parentHost - Query :parentHost (Direct parent SWC component)
|
|
29
|
+
* Usage: @parentHost parent: HTMLElement | undefined;
|
|
30
|
+
* Usage: @parentHost() parent: HTMLElement | undefined;
|
|
31
|
+
* Usage: @parentHost({ root: 'shadow' }) parent: HTMLElement | undefined;
|
|
32
|
+
*/
|
|
33
|
+
export declare function parentHost(target: Object, propertyKey: string | symbol): void;
|
|
34
|
+
export declare function parentHost(): PropertyDecorator;
|
|
35
|
+
export declare function parentHost(options: SwcQueryOptions): PropertyDecorator;
|
|
36
|
+
/**
|
|
37
|
+
* @appHost - Query :appHost (Nearest <swc-app>)
|
|
38
|
+
* Usage: @appHost app: SwcAppInterface | undefined;
|
|
39
|
+
* Usage: @appHost() app: SwcAppInterface | undefined;
|
|
40
|
+
* Usage: @appHost({ root: 'shadow' }) app: SwcAppInterface | undefined;
|
|
41
|
+
*/
|
|
42
|
+
export declare function appHost(target: Object, propertyKey: string | symbol): void;
|
|
43
|
+
export declare function appHost(): PropertyDecorator;
|
|
44
|
+
export declare function appHost(options: SwcQueryOptions): PropertyDecorator;
|
|
45
|
+
/**
|
|
46
|
+
* @firstHost - Query :firstHost (First component in hierarchy)
|
|
47
|
+
* Usage: @firstHost first: HTMLElement | undefined;
|
|
48
|
+
* Usage: @firstHost() first: HTMLElement | undefined;
|
|
49
|
+
* Usage: @firstHost({ root: 'shadow' }) first: HTMLElement | undefined;
|
|
50
|
+
*/
|
|
51
|
+
export declare function firstHost(target: Object, propertyKey: string | symbol): void;
|
|
52
|
+
export declare function firstHost(): PropertyDecorator;
|
|
53
|
+
export declare function firstHost(options: SwcQueryOptions): PropertyDecorator;
|
|
54
|
+
/**
|
|
55
|
+
* @lastHost - Query :lastHost (Last component in hierarchy)
|
|
56
|
+
* Usage: @lastHost last: HTMLElement | undefined;
|
|
57
|
+
* Usage: @lastHost() last: HTMLElement | undefined;
|
|
58
|
+
* Usage: @lastHost({ root: 'shadow' }) last: HTMLElement | undefined;
|
|
59
|
+
*/
|
|
60
|
+
export declare function lastHost(target: Object, propertyKey: string | symbol): void;
|
|
61
|
+
export declare function lastHost(): PropertyDecorator;
|
|
62
|
+
export declare function lastHost(options: SwcQueryOptions): PropertyDecorator;
|
|
63
|
+
/**
|
|
64
|
+
* @firstAppHost - Query :firstAppHost (First <swc-app> in hierarchy)
|
|
65
|
+
* Usage: @firstAppHost app: SwcAppInterface | undefined;
|
|
66
|
+
* Usage: @firstAppHost() app: SwcAppInterface | undefined;
|
|
67
|
+
* Usage: @firstAppHost({ root: 'shadow' }) app: SwcAppInterface | undefined;
|
|
68
|
+
*/
|
|
69
|
+
export declare function firstAppHost(target: Object, propertyKey: string | symbol): void;
|
|
70
|
+
export declare function firstAppHost(): PropertyDecorator;
|
|
71
|
+
export declare function firstAppHost(options: SwcQueryOptions): PropertyDecorator;
|
|
72
|
+
/**
|
|
73
|
+
* @lastAppHost - Query :lastAppHost (Last <swc-app> in hierarchy)
|
|
74
|
+
* Usage: @lastAppHost app: SwcAppInterface | undefined;
|
|
75
|
+
* Usage: @lastAppHost() app: SwcAppInterface | undefined;
|
|
76
|
+
* Usage: @lastAppHost({ root: 'shadow' }) app: SwcAppInterface | undefined;
|
|
77
|
+
*/
|
|
78
|
+
export declare function lastAppHost(target: Object, propertyKey: string | symbol): void;
|
|
79
|
+
export declare function lastAppHost(): PropertyDecorator;
|
|
80
|
+
export declare function lastAppHost(options: SwcQueryOptions): PropertyDecorator;
|
|
20
81
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -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,MAAM,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query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;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC9E,wBAAgB,SAAS,IAAI,iBAAiB,CAAC;AAC/C,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAYvE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC7E,wBAAgB,QAAQ,IAAI,iBAAiB,CAAC;AAC9C,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"}
|
|
@@ -13,5 +13,74 @@ export declare const getQueryAllMetadata: (target: any) => QueryAllMetadata[] |
|
|
|
13
13
|
* Usage: @hostQueryAll()
|
|
14
14
|
* Usage: @hostQueryAll({ root: 'shadow' })
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @queryAllHost decorator - simplified version of @queryAll for :host selector
|
|
18
|
+
* Usage: @queryAllHost items: HTMLElement[];
|
|
19
|
+
* Usage: @queryAllHost() items: HTMLElement[];
|
|
20
|
+
* Usage: @queryAllHost({ root: 'shadow' }) items: HTMLElement[];
|
|
21
|
+
*/
|
|
22
|
+
export declare function queryAllHost(target: Object, propertyKey: string | symbol): void;
|
|
23
|
+
export declare function queryAllHost(): PropertyDecorator;
|
|
24
|
+
export declare function queryAllHost(options: SwcQueryOptions): PropertyDecorator;
|
|
25
|
+
/**
|
|
26
|
+
* @allHost - Alias for @queryAllHost decorator
|
|
27
|
+
* Usage: @allHost items: HTMLElement[];
|
|
28
|
+
* Usage: @allHost() items: HTMLElement[];
|
|
29
|
+
* Usage: @allHost({ root: 'shadow' }) items: HTMLElement[];
|
|
30
|
+
*/
|
|
31
|
+
export declare const allHost: typeof queryAllHost;
|
|
32
|
+
/**
|
|
33
|
+
* @allParentHost - Query all :parentHost (All parent SWC components)
|
|
34
|
+
* Usage: @allParentHost parents: HTMLElement[];
|
|
35
|
+
* Usage: @allParentHost() parents: HTMLElement[];
|
|
36
|
+
* Usage: @allParentHost({ root: 'shadow' }) parents: HTMLElement[];
|
|
37
|
+
*/
|
|
38
|
+
export declare function allParentHost(target: Object, propertyKey: string | symbol): void;
|
|
39
|
+
export declare function allParentHost(): PropertyDecorator;
|
|
40
|
+
export declare function allParentHost(options: SwcQueryOptions): PropertyDecorator;
|
|
41
|
+
/**
|
|
42
|
+
* @allAppHost - Query all :appHost (All <swc-app> instances)
|
|
43
|
+
* Usage: @allAppHost apps: SwcAppInterface[];
|
|
44
|
+
* Usage: @allAppHost() apps: SwcAppInterface[];
|
|
45
|
+
* Usage: @allAppHost({ root: 'shadow' }) apps: SwcAppInterface[];
|
|
46
|
+
*/
|
|
47
|
+
export declare function allAppHost(target: Object, propertyKey: string | symbol): void;
|
|
48
|
+
export declare function allAppHost(): PropertyDecorator;
|
|
49
|
+
export declare function allAppHost(options: SwcQueryOptions): PropertyDecorator;
|
|
50
|
+
/**
|
|
51
|
+
* @allFirstHost - Query all :firstHost (All first components in hierarchy)
|
|
52
|
+
* Usage: @allFirstHost firsts: HTMLElement[];
|
|
53
|
+
* Usage: @allFirstHost() firsts: HTMLElement[];
|
|
54
|
+
* Usage: @allFirstHost({ root: 'shadow' }) firsts: HTMLElement[];
|
|
55
|
+
*/
|
|
56
|
+
export declare function allFirstHost(target: Object, propertyKey: string | symbol): void;
|
|
57
|
+
export declare function allFirstHost(): PropertyDecorator;
|
|
58
|
+
export declare function allFirstHost(options: SwcQueryOptions): PropertyDecorator;
|
|
59
|
+
/**
|
|
60
|
+
* @allLastHost - Query all :lastHost (All last components in hierarchy)
|
|
61
|
+
* Usage: @allLastHost lasts: HTMLElement[];
|
|
62
|
+
* Usage: @allLastHost() lasts: HTMLElement[];
|
|
63
|
+
* Usage: @allLastHost({ root: 'shadow' }) lasts: HTMLElement[];
|
|
64
|
+
*/
|
|
65
|
+
export declare function allLastHost(target: Object, propertyKey: string | symbol): void;
|
|
66
|
+
export declare function allLastHost(): PropertyDecorator;
|
|
67
|
+
export declare function allLastHost(options: SwcQueryOptions): PropertyDecorator;
|
|
68
|
+
/**
|
|
69
|
+
* @allFirstAppHost - Query all :firstAppHost (All first <swc-app> in hierarchy)
|
|
70
|
+
* Usage: @allFirstAppHost apps: SwcAppInterface[];
|
|
71
|
+
* Usage: @allFirstAppHost() apps: SwcAppInterface[];
|
|
72
|
+
* Usage: @allFirstAppHost({ root: 'shadow' }) apps: SwcAppInterface[];
|
|
73
|
+
*/
|
|
74
|
+
export declare function allFirstAppHost(target: Object, propertyKey: string | symbol): void;
|
|
75
|
+
export declare function allFirstAppHost(): PropertyDecorator;
|
|
76
|
+
export declare function allFirstAppHost(options: SwcQueryOptions): PropertyDecorator;
|
|
77
|
+
/**
|
|
78
|
+
* @allLastAppHost - Query all :lastAppHost (All last <swc-app> in hierarchy)
|
|
79
|
+
* Usage: @allLastAppHost apps: SwcAppInterface[];
|
|
80
|
+
* Usage: @allLastAppHost() apps: SwcAppInterface[];
|
|
81
|
+
* Usage: @allLastAppHost({ root: 'shadow' }) apps: SwcAppInterface[];
|
|
82
|
+
*/
|
|
83
|
+
export declare function allLastAppHost(target: Object, propertyKey: string | symbol): void;
|
|
84
|
+
export declare function allLastAppHost(): PropertyDecorator;
|
|
85
|
+
export declare function allLastAppHost(options: SwcQueryOptions): PropertyDecorator;
|
|
17
86
|
//# sourceMappingURL=queryAll.d.ts.map
|
|
@@ -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,eAA2C,CAAC;AAE/E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC;AACrE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AA2FzF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,GAAG,KAAG,gBAAgB,EAAE,GAAG,SAGtE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,
|
|
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,eAA2C,CAAC;AAE/E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC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AAM,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/setAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,0BAA0B,eAA+C,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;AAC9E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"setAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/setAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,0BAA0B,eAA+C,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;AAC9E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;AAuEzG,eAAO,MAAM,uBAAuB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,oBAAoB,CAAC,GAAG,SAGlG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,oBAAoB,CASlG,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAEzF"}
|
|
@@ -1,24 +1,58 @@
|
|
|
1
|
+
import { SwcQueryOptions } from '../types';
|
|
1
2
|
export type StyleAction = 'set' | 'update' | 'remove';
|
|
3
|
+
export interface StyleOptions extends SwcQueryOptions {
|
|
4
|
+
}
|
|
2
5
|
export interface StyleMetadata {
|
|
3
6
|
propertyKey: string | symbol;
|
|
4
7
|
selector: string;
|
|
5
8
|
action: StyleAction;
|
|
9
|
+
options: StyleOptions;
|
|
6
10
|
}
|
|
7
11
|
export declare const STYLE_METADATA_KEY: unique symbol;
|
|
8
12
|
/**
|
|
9
13
|
* @setStyle decorator to surgically set styles on a target element (replaces all existing styles).
|
|
10
14
|
* Usage: @setStyle('#box') getStyles() { return { color: 'red', display: 'block' }; }
|
|
15
|
+
* Usage: @setStyle('#box', { root: 'shadow' }) getStyles() { return { color: 'red' }; }
|
|
16
|
+
*/
|
|
17
|
+
export declare const setStyle: (selector: string, options?: StyleOptions) => MethodDecorator;
|
|
18
|
+
/**
|
|
19
|
+
* @setStyleHost decorator - simplified version of @setStyle for :host selector.
|
|
20
|
+
* Usage: @setStyleHost setHostStyle() { return { color: 'red' }; }
|
|
21
|
+
* Usage: @setStyleHost() setHostStyle() { return { color: 'red' }; }
|
|
22
|
+
* Usage: @setStyleHost({ ... }) setHostStyle() { return { color: 'red' }; }
|
|
11
23
|
*/
|
|
12
|
-
export declare
|
|
24
|
+
export declare function setStyleHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
25
|
+
export declare function setStyleHost(): MethodDecorator;
|
|
26
|
+
export declare function setStyleHost(options: StyleOptions): MethodDecorator;
|
|
13
27
|
/**
|
|
14
28
|
* @updateStyle decorator to surgically update styles on a target element (merges with existing styles).
|
|
15
29
|
* Usage: @updateStyle('#box') updateStyles() { return { color: 'blue' }; }
|
|
30
|
+
* Usage: @updateStyle('#box', { root: 'shadow' }) updateStyles() { return { color: 'blue' }; }
|
|
16
31
|
*/
|
|
17
|
-
export declare const updateStyle: (selector: string) => MethodDecorator;
|
|
32
|
+
export declare const updateStyle: (selector: string, options?: StyleOptions) => MethodDecorator;
|
|
33
|
+
/**
|
|
34
|
+
* @updateStyleHost decorator - simplified version of @updateStyle for :host selector.
|
|
35
|
+
* Usage: @updateStyleHost updateStyles() { return { color: 'blue' }; }
|
|
36
|
+
* Usage: @updateStyleHost() updateStyles() { return { color: 'blue' }; }
|
|
37
|
+
* Usage: @updateStyleHost({ ... }) updateStyles() { return { color: 'blue' }; }
|
|
38
|
+
*/
|
|
39
|
+
export declare function updateStyleHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
40
|
+
export declare function updateStyleHost(): MethodDecorator;
|
|
41
|
+
export declare function updateStyleHost(options: StyleOptions): MethodDecorator;
|
|
18
42
|
/**
|
|
19
43
|
* @removeStyle decorator to surgically remove styles from a target element.
|
|
20
44
|
* Usage: @removeStyle('#box') clearStyles() { return ['color', 'display']; }
|
|
45
|
+
* Usage: @removeStyle('#box', { root: 'shadow' }) clearStyles() { return ['color']; }
|
|
46
|
+
*/
|
|
47
|
+
export declare const removeStyle: (selector: string, options?: StyleOptions) => MethodDecorator;
|
|
48
|
+
/**
|
|
49
|
+
* @removeStyleHost decorator - simplified version of @removeStyle for :host selector.
|
|
50
|
+
* Usage: @removeStyleHost clearStyles() { return ['color']; }
|
|
51
|
+
* Usage: @removeStyleHost() clearStyles() { return ['color']; }
|
|
52
|
+
* Usage: @removeStyleHost({ ... }) clearStyles() { return ['color']; }
|
|
21
53
|
*/
|
|
22
|
-
export declare
|
|
54
|
+
export declare function removeStyleHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): any;
|
|
55
|
+
export declare function removeStyleHost(): MethodDecorator;
|
|
56
|
+
export declare function removeStyleHost(options: StyleOptions): MethodDecorator;
|
|
23
57
|
export declare const findAllStyleMetadata: (target: any) => Map<string | symbol, StyleMetadata>;
|
|
24
58
|
//# sourceMappingURL=style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/decorators/style.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/decorators/style.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,YAAa,SAAQ,eAAe;CAAG;AAExD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ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C"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import { ConstructorType } from "@dooboostore/core";
|
|
|
3
3
|
export * from './decorators';
|
|
4
4
|
export * from './types';
|
|
5
5
|
export * from './utils/Utils';
|
|
6
|
-
export * from './utils/TemplateUtils';
|
|
7
6
|
export * from './config/config';
|
|
8
|
-
declare const _default: (w: Window, other?: ((w: Window) => ConstructorType<any>)[]) =>
|
|
7
|
+
declare const _default: (w: Window, other?: (((w: Window) => ConstructorType<any>) | any)[]) => void;
|
|
9
8
|
export default _default;
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,eAAe,CAAC;AAG9B,cAAc,iBAAiB,CAAC;yBAGhB,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAG;AAAnF,wBASE"}
|