@arcgis/lumina 5.2.0-next.2 → 5.2.0-next.21
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/dist/{ControllerManager-DpJfvft9.js → ControllerManager-4cSEnB5Y.js} +12 -8
- package/dist/{Controller-Cer_6Z29.js → GenericController-C8NSb50b.js} +59 -23
- package/dist/LitElement.d.ts +179 -250
- package/dist/PublicLitElement.d.ts +64 -30
- package/dist/config.d.ts +22 -16
- package/dist/context.d.ts +24 -24
- package/dist/controllers/Controller.d.ts +106 -139
- package/dist/controllers/ControllerInternals.d.ts +33 -25
- package/dist/controllers/ControllerManager.d.ts +40 -61
- package/dist/controllers/GenericController.d.ts +26 -0
- package/dist/controllers/accessor/index.d.ts +6 -4
- package/dist/controllers/accessor/index.js +23 -5
- package/dist/controllers/accessor/reEmitEvent.d.ts +6 -3
- package/dist/controllers/accessor/store.d.ts +21 -14
- package/dist/controllers/accessor/useAccessor.d.ts +86 -68
- package/dist/controllers/functional.d.ts +11 -4
- package/dist/controllers/index.d.ts +35 -36
- package/dist/controllers/index.js +5 -7
- package/dist/controllers/load.d.ts +3 -2
- package/dist/controllers/proxyExports.d.ts +6 -5
- package/dist/controllers/toFunction.d.ts +4 -2
- package/dist/controllers/trackKey.d.ts +9 -4
- package/dist/controllers/trackPropKey.d.ts +8 -2
- package/dist/controllers/trackPropertyKey.d.ts +11 -6
- package/dist/controllers/types.d.ts +99 -170
- package/dist/controllers/useDirection.d.ts +5 -6
- package/dist/controllers/useMedia.d.ts +3 -2
- package/dist/controllers/usePropertyChange.d.ts +9 -10
- package/dist/controllers/useSlottableRequest.d.ts +15 -10
- package/dist/controllers/useT9n.d.ts +44 -38
- package/dist/controllers/useWatchAttributes.d.ts +6 -3
- package/dist/controllers/utils.d.ts +13 -5
- package/dist/createEvent.d.ts +32 -32
- package/dist/decorators.d.ts +16 -9
- package/dist/formAssociatedUtils.d.ts +5 -47
- package/dist/globalTypes/importMeta.d.ts +18 -10
- package/dist/globalTypes/index.d.ts +6 -4
- package/dist/globalTypes/jsxGlobals.d.ts +36 -23
- package/dist/globalTypes/loadLitCss.d.ts +61 -40
- package/dist/globalTypes/viteEnv.d.ts +60 -26
- package/dist/hmrSupport.d.ts +24 -28
- package/dist/index.d.ts +17 -16
- package/dist/index.js +27 -7
- package/dist/jsx/baseTypes.d.ts +26 -26
- package/dist/jsx/directives.d.ts +30 -42
- package/dist/jsx/generatedTypes.d.ts +3002 -2923
- package/dist/jsx/types.d.ts +214 -171
- package/dist/jsx/utils.d.ts +19 -14
- package/dist/lazyLoad.d.ts +31 -110
- package/dist/makeRuntime.d.ts +104 -127
- package/dist/{proxyExports-BkN6hND0.js → proxyExports-ZRLty8oJ.js} +1 -1
- package/dist/render.d.ts +4 -2
- package/dist/utils.d.ts +9 -14
- package/dist/wrappersUtils.d.ts +25 -26
- package/package.json +7 -4
- package/dist/devOnlyDetectIncorrectLazyUsages.d.ts +0 -14
- package/dist/lifecycleSupport.d.ts +0 -8
- package/dist/tests/wrappersUtils.typeTest.d.ts +0 -1
package/dist/LitElement.d.ts
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { Controller } from './controllers/Controller.ts';
|
|
8
|
-
import { FormAssociatedEvents } from './formAssociatedUtils.ts';
|
|
9
|
-
type ComponentLifecycle = {
|
|
10
|
-
connectedCallback?: () => void;
|
|
11
|
-
disconnectedCallback?: () => void;
|
|
12
|
-
load?: () => Promise<void> | void;
|
|
13
|
-
loaded?: () => void;
|
|
14
|
-
};
|
|
1
|
+
import type { ReactiveController, LitElement as OriginalLitElement } from "lit";
|
|
2
|
+
import type { ToElement } from "./jsx/types.js";
|
|
3
|
+
import type { BaseController } from "./controllers/types.js";
|
|
4
|
+
import type { ControllerManager } from "./controllers/ControllerManager.js";
|
|
5
|
+
import type { FormAssociatedEvents } from "./formAssociatedUtils.js";
|
|
6
|
+
|
|
15
7
|
/**
|
|
16
8
|
* Base Lit class that should be used by all components instead of the original
|
|
17
9
|
* Lit element.
|
|
@@ -23,9 +15,8 @@ type ComponentLifecycle = {
|
|
|
23
15
|
* (like componentWillLoad and componentDidLoad in Stencil)
|
|
24
16
|
* - Provides a .listen() method like Stencil's \@Listen decorator
|
|
25
17
|
*
|
|
26
|
-
* @remarks
|
|
27
18
|
* Even though all components will extend this class, it is not exposed in the
|
|
28
|
-
* public
|
|
19
|
+
* public types as we do not want to expose internal methods like
|
|
29
20
|
* addController() and connectedCallback() to the public typings.
|
|
30
21
|
*
|
|
31
22
|
* Instead, `@arcgis/lumina-compiler` will make it appear that your component
|
|
@@ -34,239 +25,177 @@ type ComponentLifecycle = {
|
|
|
34
25
|
* `PublicLitElement` will never be called at runtime - it exists for typings
|
|
35
26
|
* only.
|
|
36
27
|
*/
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
* constructor() {
|
|
205
|
-
* // Handle click will only be called while component is connected
|
|
206
|
-
* this.listenOn(window, 'click', this.handleWindowClick);
|
|
207
|
-
* }
|
|
208
|
-
* handleWindowClick(event: MouseEvent):void {
|
|
209
|
-
* console.log('clicked');
|
|
210
|
-
* }
|
|
211
|
-
* ```
|
|
212
|
-
*/
|
|
213
|
-
listenOn<Name extends keyof WindowEventMap>(target: Window, name: Name, listener: Listener<this, WindowEventMap[Name] & {
|
|
214
|
-
currentTarget: Window;
|
|
215
|
-
}>, options?: AddEventListenerOptions | boolean): void;
|
|
216
|
-
listenOn<Name extends keyof DocumentEventMap>(target: Document, name: Name, listener: Listener<this, DocumentEventMap[Name] & {
|
|
217
|
-
currentTarget: Document;
|
|
218
|
-
}>, options?: AddEventListenerOptions | boolean): void;
|
|
219
|
-
listenOn<Name extends keyof HTMLElementEventMap>(target: HTMLElement, name: Name, listener: Listener<this, HTMLElementEventMap[Name] & {
|
|
220
|
-
currentTarget: HTMLElement;
|
|
221
|
-
}>, options?: AddEventListenerOptions | boolean): void;
|
|
222
|
-
listenOn<EventType extends Event = CustomEvent<"Provide type like this.listenOn<ToEvents<ArcgisCounter>['arcgisClick']>() to get type-checked payload type">, Target = EventTarget>(target: Target, name: string,
|
|
223
|
-
/**
|
|
224
|
-
* The "NoInfer" here forces type argument to be specified explicitly.
|
|
225
|
-
* Without it, the following would be allowed:
|
|
226
|
-
* ```tsx
|
|
227
|
-
* this.listen("focus",(event:NotFocusEvent)=>{....})
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
|
-
listener: Listener<this, NoInfer<EventType> & {
|
|
231
|
-
currentTarget: Target;
|
|
232
|
-
}>, options?: AddEventListenerOptions | boolean): void;
|
|
233
|
-
/**
|
|
234
|
-
* Creates a promise that resolves once the component is fully loaded.
|
|
235
|
-
*
|
|
236
|
-
* @example
|
|
237
|
-
* const map = document.createElement('arcgis-map');
|
|
238
|
-
* document.body.append(map);
|
|
239
|
-
* map.componentOnReady().then(() => {
|
|
240
|
-
* console.log('Map is ready to go!');
|
|
241
|
-
* });
|
|
242
|
-
*/
|
|
243
|
-
componentOnReady(): Promise<this>;
|
|
244
|
-
/**
|
|
245
|
-
* Adds a controller to the host, which connects the controller's lifecycle
|
|
246
|
-
* methods to the host's lifecycle.
|
|
247
|
-
*
|
|
248
|
-
* @remarks
|
|
249
|
-
* Even though Lit's LitElement already has addController,
|
|
250
|
-
* we overwrite it with a compatible version to have more control over
|
|
251
|
-
* timing, and to add support for load/loaded lifecycle hooks.
|
|
252
|
-
*/
|
|
253
|
-
addController(controller: BaseController | ReactiveController): void;
|
|
254
|
-
/**
|
|
255
|
-
* Removes a controller from the host.
|
|
256
|
-
*/
|
|
257
|
-
removeController(controller: BaseController | ReactiveController): void;
|
|
28
|
+
export class LitElement extends OriginalLitElement {
|
|
29
|
+
static readonly lumina: true;
|
|
30
|
+
/** @internal */
|
|
31
|
+
constructor();
|
|
32
|
+
/**
|
|
33
|
+
* In lazy build, the actual DOM element differs from the class instance:
|
|
34
|
+
* - "this.el" is a proxy custom element - it's physically present in the DOM
|
|
35
|
+
* even before the Lit component is loaded.
|
|
36
|
+
* - "this" is the actual Lit component - in case of Lazy builds, it's
|
|
37
|
+
* never directly attached to the DOM. Instead, all interactions with the
|
|
38
|
+
* proxy are forwarded to the actual Lit component. And, when Lit wants to
|
|
39
|
+
* render, it renders into the shadow root of the proxy.
|
|
40
|
+
*
|
|
41
|
+
* "this.el" should be used instead of "this" for all things involving the
|
|
42
|
+
* DOM (addEventListener, querySelector, children, setAttribute,
|
|
43
|
+
* MutationObserver, etc...)
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* // Generally, you shouldn't have to write logic specific to lazy or non-lazy
|
|
48
|
+
* // build, but if you have to, you can detect if you are in a lazy build like so:
|
|
49
|
+
* const isLazy = this.el !== this;
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
readonly el: ToElement<this>;
|
|
53
|
+
/** @see [MDN ElementInternals](https://developer.mozilla.org/docs/Web/API/ElementInternals) */
|
|
54
|
+
get elementInternals(): ElementInternals;
|
|
55
|
+
/**
|
|
56
|
+
* Controller Manager orchestrates all controllers used by this component,
|
|
57
|
+
* connecting their lifecycle hooks and providing context information.
|
|
58
|
+
*/
|
|
59
|
+
readonly manager: ControllerManager;
|
|
60
|
+
/**
|
|
61
|
+
* Adds a controller to the host, which connects the controller's lifecycle
|
|
62
|
+
* methods to the host's lifecycle.
|
|
63
|
+
*
|
|
64
|
+
* Even though Lit's LitElement already has addController,
|
|
65
|
+
* we overwrite it with a compatible version to have more control over
|
|
66
|
+
* timing, and to add support for load/loaded lifecycle hooks.
|
|
67
|
+
*
|
|
68
|
+
* @param controller
|
|
69
|
+
*/
|
|
70
|
+
addController(controller: BaseController | ReactiveController): void;
|
|
71
|
+
/**
|
|
72
|
+
* Creates a promise that resolves once the component is fully loaded.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```js
|
|
76
|
+
* const map = document.createElement('arcgis-map');
|
|
77
|
+
* document.body.append(map);
|
|
78
|
+
* map.componentOnReady().then(() => {
|
|
79
|
+
* console.log('Map is ready to go!');
|
|
80
|
+
* });
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
componentOnReady(): Promise<this>;
|
|
84
|
+
/**
|
|
85
|
+
* A helper for setting event listener on the current component.
|
|
86
|
+
*
|
|
87
|
+
* The event listener will be removed automatically when component
|
|
88
|
+
* disconnects, and added back if component re-comments, thus you don't have
|
|
89
|
+
* to clean it up manually.
|
|
90
|
+
*
|
|
91
|
+
* This listens for any event on the component or one of it's children.
|
|
92
|
+
* If you only want to listen for events originating from the component itself
|
|
93
|
+
* use `const isSelf = event.target === this.el;` to check.
|
|
94
|
+
*
|
|
95
|
+
* @param name
|
|
96
|
+
* @param listener
|
|
97
|
+
* @param options
|
|
98
|
+
* @example
|
|
99
|
+
* ```tsx
|
|
100
|
+
* constructor() {
|
|
101
|
+
* // Handle click will only be called while component is connected
|
|
102
|
+
* this.listen('click', this.handleClick);
|
|
103
|
+
* }
|
|
104
|
+
* handleClick(event: MouseEvent):void {
|
|
105
|
+
* console.log('clicked');
|
|
106
|
+
* }
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
listen<K extends keyof HTMLElementEventMap>(name: K, listener: (this: this, event: HTMLElementEventMap[K]) => unknown, options?: AddEventListenerOptions | boolean): void;
|
|
110
|
+
/**
|
|
111
|
+
* @param name
|
|
112
|
+
* @param listener
|
|
113
|
+
* @param options
|
|
114
|
+
*/
|
|
115
|
+
listen<K extends keyof FormAssociatedEvents>(name: K, listener: (this: this, event: FormAssociatedEvents[K]) => unknown, options?: Omit<AddEventListenerOptions, "capture" | "passive"> | boolean): void;
|
|
116
|
+
/**
|
|
117
|
+
* @param name
|
|
118
|
+
* @param listener
|
|
119
|
+
* @param options
|
|
120
|
+
*/
|
|
121
|
+
listen(name: string, listener: (this: this, event: Event) => unknown, options?: AddEventListenerOptions | boolean): void;
|
|
122
|
+
/**
|
|
123
|
+
* @param name
|
|
124
|
+
* @param listener
|
|
125
|
+
* @param options
|
|
126
|
+
*/
|
|
127
|
+
listen<EventType extends Event = CustomEvent<"Provide type like this.listenOn<ToEvents<ArcgisCounter>['arcgisClick']>() to get type-checked payload type">>(name: string, listener: (this: this, event: NoInfer<EventType>) => unknown, options?: AddEventListenerOptions | boolean): void;
|
|
128
|
+
/**
|
|
129
|
+
* A helper for setting even listener on any element (or window / document).
|
|
130
|
+
*
|
|
131
|
+
* The event listener will be removed automatically when component
|
|
132
|
+
* disconnects, and added back if component re-comments, thus you don't have
|
|
133
|
+
* to clean it up manually.
|
|
134
|
+
*
|
|
135
|
+
* Use cases:
|
|
136
|
+
* - Listening for pointer events on the top-most element
|
|
137
|
+
* - Listening to events that are emitted exclusively on document/window/body
|
|
138
|
+
* - Imperatively listening for events on children components
|
|
139
|
+
* - Listening for events on non-Element objects (like Worker, WebSocket, etc)
|
|
140
|
+
* - Your component could emit a custom event, and then listen for that event
|
|
141
|
+
* on the window. This lets consumer of the component handle the event and
|
|
142
|
+
* stop propagation - and if they didn't and event reached the window, your
|
|
143
|
+
* component can handle the event itself using the default behavior.
|
|
144
|
+
*
|
|
145
|
+
* @param target
|
|
146
|
+
* @param name
|
|
147
|
+
* @param listener
|
|
148
|
+
* @param options
|
|
149
|
+
* @example
|
|
150
|
+
* ```tsx
|
|
151
|
+
* constructor() {
|
|
152
|
+
* // Handle click will only be called while component is connected
|
|
153
|
+
* this.listenOn(window, 'click', this.handleWindowClick);
|
|
154
|
+
* }
|
|
155
|
+
* handleWindowClick(event: MouseEvent):void {
|
|
156
|
+
* console.log('clicked');
|
|
157
|
+
* }
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
listenOn<Name extends keyof WindowEventMap>(target: Window, name: Name, listener: Listener<this, WindowEventMap[Name] & { currentTarget: Window; }>, options?: AddEventListenerOptions | boolean): void;
|
|
161
|
+
/**
|
|
162
|
+
* @param target
|
|
163
|
+
* @param name
|
|
164
|
+
* @param listener
|
|
165
|
+
* @param options
|
|
166
|
+
*/
|
|
167
|
+
listenOn<Name extends keyof DocumentEventMap>(target: Document, name: Name, listener: Listener<this, DocumentEventMap[Name] & { currentTarget: Document; }>, options?: AddEventListenerOptions | boolean): void;
|
|
168
|
+
/**
|
|
169
|
+
* @param target
|
|
170
|
+
* @param name
|
|
171
|
+
* @param listener
|
|
172
|
+
* @param options
|
|
173
|
+
*/
|
|
174
|
+
listenOn<Name extends keyof HTMLElementEventMap>(target: HTMLElement, name: Name, listener: Listener<this, HTMLElementEventMap[Name] & { currentTarget: HTMLElement; }>, options?: AddEventListenerOptions | boolean): void;
|
|
175
|
+
/**
|
|
176
|
+
* @param target
|
|
177
|
+
* @param name
|
|
178
|
+
* @param listener
|
|
179
|
+
* @param options
|
|
180
|
+
*/
|
|
181
|
+
listenOn<EventType extends Event = CustomEvent<"Provide type like this.listenOn<ToEvents<ArcgisCounter>['arcgisClick']>() to get type-checked payload type">, Target = EventTarget>(target: Target, name: string, listener: Listener<this, NoInfer<EventType> & { currentTarget: Target; }>, options?: AddEventListenerOptions | boolean): void;
|
|
182
|
+
/**
|
|
183
|
+
* @param target
|
|
184
|
+
* @param name
|
|
185
|
+
* @param listener
|
|
186
|
+
* @param options
|
|
187
|
+
*/
|
|
188
|
+
listenOn(target: EventTarget, name: string, listener: Listener<this, Event>, options?: AddEventListenerOptions | boolean): void;
|
|
189
|
+
/**
|
|
190
|
+
* Removes a controller from the host.
|
|
191
|
+
*
|
|
192
|
+
* @param controller
|
|
193
|
+
*/
|
|
194
|
+
removeController(controller: BaseController | ReactiveController): void;
|
|
258
195
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* List of tag names defined by this library.
|
|
264
|
-
*
|
|
265
|
-
* @private
|
|
266
|
-
*/
|
|
267
|
-
export type GlobalThisWithOwnTagNames = typeof globalThis & {
|
|
268
|
-
devOnly$ownTagNames?: Set<string>;
|
|
269
|
-
};
|
|
196
|
+
|
|
197
|
+
export type Listener<ThisType, EventType> = ((this: ThisType, event: EventType) => unknown) | { handleEvent(event: EventType): unknown; };
|
|
198
|
+
|
|
270
199
|
/**
|
|
271
200
|
* Lumina tracks accesses to JSAPI Accessor properties during render() and
|
|
272
201
|
* automatically re-renders the component when any tracked property changes.
|
|
@@ -276,6 +205,7 @@ export type GlobalThisWithOwnTagNames = typeof globalThis & {
|
|
|
276
205
|
* give you time to complete the migration and refactor the code.
|
|
277
206
|
*
|
|
278
207
|
* @deprecated Use this as a **temporary** workaround only.
|
|
208
|
+
* @param componentClass
|
|
279
209
|
* @example
|
|
280
210
|
* ```ts
|
|
281
211
|
* import { disableReactiveUtilsIntegration } from "@arcgis/lumina";
|
|
@@ -285,5 +215,4 @@ export type GlobalThisWithOwnTagNames = typeof globalThis & {
|
|
|
285
215
|
* disableReactiveUtilsIntegration(MyComponent);
|
|
286
216
|
* ```
|
|
287
217
|
*/
|
|
288
|
-
export
|
|
289
|
-
export {};
|
|
218
|
+
export function disableReactiveUtilsIntegration(componentClass: typeof LitElement): void;
|
|
@@ -1,30 +1,64 @@
|
|
|
1
|
-
import { TargetedEvent } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import type { TargetedEvent } from "./jsx/types.js";
|
|
2
|
+
|
|
3
|
+
/** The base public interface for all `@arcgis/lumina` components */
|
|
4
|
+
export class PublicLitElement extends HTMLElement {
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* Do not directly reference this property.
|
|
8
|
+
* Use EventNames and EventTypes helpers from \@arcgis/core/Evented
|
|
9
|
+
*/
|
|
10
|
+
"@eventTypes": unknown;
|
|
11
|
+
/**
|
|
12
|
+
* Web components are not constructable via the `new` operator.
|
|
13
|
+
* Instead use `document.createElement("some-tag-name")`.
|
|
14
|
+
*/
|
|
15
|
+
protected constructor();
|
|
16
|
+
el: this;
|
|
17
|
+
/**
|
|
18
|
+
* @param type
|
|
19
|
+
* @param listener
|
|
20
|
+
* @param options
|
|
21
|
+
*/
|
|
22
|
+
addEventListener<K extends keyof this["@eventTypes"]>(type: K, listener: (this: this, event: TargetedEvent<this, this["@eventTypes"][K]>) => unknown, options?: AddEventListenerOptions | boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* @param type
|
|
25
|
+
* @param listener
|
|
26
|
+
* @param options
|
|
27
|
+
*/
|
|
28
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: this, event: HTMLElementEventMap[K]) => unknown, options?: AddEventListenerOptions | boolean): void;
|
|
29
|
+
/**
|
|
30
|
+
* @param type
|
|
31
|
+
* @param listener
|
|
32
|
+
* @param options
|
|
33
|
+
*/
|
|
34
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: AddEventListenerOptions | boolean): void;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a promise that resolves once the component is fully loaded.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const map = document.createElement("arcgis-map");
|
|
40
|
+
* document.body.append(map);
|
|
41
|
+
* map.componentOnReady().then(() => {
|
|
42
|
+
* console.log("Map is ready to go!");
|
|
43
|
+
* });
|
|
44
|
+
*/
|
|
45
|
+
componentOnReady(): Promise<this>;
|
|
46
|
+
/**
|
|
47
|
+
* @param type
|
|
48
|
+
* @param listener
|
|
49
|
+
* @param options
|
|
50
|
+
*/
|
|
51
|
+
removeEventListener<K extends keyof this["@eventTypes"]>(type: K, listener: (this: this, event: TargetedEvent<this, this["@eventTypes"][K]>) => unknown, options?: EventListenerOptions | boolean): void;
|
|
52
|
+
/**
|
|
53
|
+
* @param type
|
|
54
|
+
* @param listener
|
|
55
|
+
* @param options
|
|
56
|
+
*/
|
|
57
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: this, event: HTMLElementEventMap[K]) => unknown, options?: EventListenerOptions | boolean): void;
|
|
58
|
+
/**
|
|
59
|
+
* @param type
|
|
60
|
+
* @param listener
|
|
61
|
+
* @param options
|
|
62
|
+
*/
|
|
63
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: EventListenerOptions | boolean): void;
|
|
64
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const lazyMetaItemJoiner = ",";
|
|
8
|
-
export declare const lazyMetaSubItemJoiner = ":";
|
|
1
|
+
export const lazyMetaGroupJoiner: ";";
|
|
2
|
+
|
|
3
|
+
export const lazyMetaItemJoiner: ",";
|
|
4
|
+
|
|
5
|
+
export const lazyMetaSubItemJoiner: ":";
|
|
6
|
+
|
|
9
7
|
/**
|
|
10
8
|
* By default in Lit, the `@property()` decorator accepts an object. However, to
|
|
11
9
|
* keep the bundle size smaller, in production builds, instead of passing it an
|
|
12
10
|
* object, we pass it a compact number, that gets converted back to an object
|
|
13
11
|
* in createProperty() at runtime.
|
|
14
12
|
*/
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
|
|
13
|
+
export const propertyFlagAttribute: number;
|
|
14
|
+
|
|
15
|
+
export const propertyFlagReflect: number;
|
|
16
|
+
|
|
17
|
+
export const propertyFlagBoolean: number;
|
|
18
|
+
|
|
19
|
+
export const propertyFlagNumber: number;
|
|
20
|
+
|
|
21
|
+
export const propertyFlagState: number;
|
|
22
|
+
|
|
23
|
+
export const propertyFlagReadOnly: number;
|
|
24
|
+
|
|
25
|
+
/** The name is inverted so that the more common case is "false" */
|
|
26
|
+
export const propertyFlagNoAccessor: number;
|
|
27
|
+
|
|
28
|
+
export const propertyFlagUseDefault: number;
|