@arcgis/lumina 5.2.0-next.119 → 5.2.0-next.120
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.
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { createStore, createLegacyStore } from "./store.js";
|
|
5
|
-
export { type ObservableMap } from "./store.js";
|
|
1
|
+
import type { reEmitEvent as reEmitEventAliased } from "./reEmitEvent.js";
|
|
2
|
+
import type { createLegacyStore as createLegacyStoreAliased, createStore as createStoreAliased, ObservableMap as ObservableMapAliased } from "./store.js";
|
|
3
|
+
import type { AccessorController as AccessorControllerAliased, getAccessorControllerBoundProperties as getAccessorControllerBoundPropertiesAliased, makeAccessorController as makeAccessorControllerAliased, makeBinderProxy as makeBinderProxyAliased, reCreateAccessor as reCreateAccessorAliased, AccessorControllerRequires as AccessorControllerRequiresAliased } from "./useAccessor.js";
|
|
6
4
|
|
|
5
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/reEmitEvent" instead. Refactor using `@arcgis/codemod`. */
|
|
6
|
+
export const reEmitEvent: typeof reEmitEventAliased;
|
|
7
|
+
|
|
8
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
9
|
+
export const makeAccessorController: typeof makeAccessorControllerAliased;
|
|
10
|
+
|
|
11
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
12
|
+
export const AccessorController: typeof AccessorControllerAliased;
|
|
13
|
+
|
|
14
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
15
|
+
export type AccessorController<Props, Accessor extends InstanceType<typeof AccessorControllerAliased>["exports"], ExtraRequires = Record<never, never>> = AccessorControllerAliased<Props, Accessor, ExtraRequires>;
|
|
16
|
+
|
|
17
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
18
|
+
export const reCreateAccessor: typeof reCreateAccessorAliased;
|
|
19
|
+
|
|
20
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
21
|
+
export const makeBinderProxy: typeof makeBinderProxyAliased;
|
|
22
|
+
|
|
23
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
24
|
+
export const getAccessorControllerBoundProperties: typeof getAccessorControllerBoundPropertiesAliased;
|
|
25
|
+
|
|
26
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/useAccessor" instead. Refactor using `@arcgis/codemod`. */
|
|
27
|
+
export type AccessorControllerRequires<Props, Accessor extends InstanceType<typeof AccessorControllerAliased>["exports"], OmitProps extends string = never> = AccessorControllerRequiresAliased<Props, Accessor, OmitProps>;
|
|
28
|
+
|
|
29
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/store" instead. Refactor using `@arcgis/codemod`. */
|
|
30
|
+
export const createStore: typeof createStoreAliased;
|
|
31
|
+
|
|
32
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/store" instead. Refactor using `@arcgis/codemod`. */
|
|
33
|
+
export const createLegacyStore: typeof createLegacyStoreAliased;
|
|
34
|
+
|
|
35
|
+
/** @deprecated import from "@arcgis/lumina-toolkit/store" instead. Refactor using `@arcgis/codemod`. */
|
|
36
|
+
export type ObservableMap<T> = ObservableMapAliased<T>;
|
|
@@ -2,11 +2,11 @@ import { isEsriInternalEnv } from "@arcgis/toolkit/error";
|
|
|
2
2
|
import { r as retrieveComponent } from "../../ControllerInternals-DBoubTn4.js";
|
|
3
3
|
import { on, watch } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
4
|
import { c as createEventFactory, G as GenericController, t as trackPropKey, a as trackKey } from "../../GenericController-Ko6PTuJs.js";
|
|
5
|
-
import { p as proxyExports } from "../../proxyExports-D-G9Eby6.js";
|
|
6
|
-
import { createObservable, trackAccess } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
7
5
|
import { property, subclass } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
8
6
|
import Accessor from "@arcgis/core/core/Accessor.js";
|
|
9
|
-
|
|
7
|
+
import { p as proxyExports } from "../../proxyExports-D-G9Eby6.js";
|
|
8
|
+
import { createObservable, trackAccess } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
9
|
+
const reEmitEvent$1 = (getEventedAccessor, eventName) => {
|
|
10
10
|
const component = retrieveComponent();
|
|
11
11
|
const manager = component.manager;
|
|
12
12
|
manager.onLoaded(() => manager.onLifecycle(() => on(getEventedAccessor, eventName, emitter.emit)));
|
|
@@ -18,8 +18,34 @@ const reEmitEvent = (getEventedAccessor, eventName) => {
|
|
|
18
18
|
}
|
|
19
19
|
return emitter;
|
|
20
20
|
};
|
|
21
|
-
const
|
|
22
|
-
class
|
|
21
|
+
const createStore$1 = (initializer) => {
|
|
22
|
+
const SubClass = class extends Accessor {
|
|
23
|
+
};
|
|
24
|
+
const defaultValues = typeof initializer === "function" ? initializer() : initializer;
|
|
25
|
+
const descriptors = Object.getOwnPropertyDescriptors(defaultValues);
|
|
26
|
+
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
27
|
+
Object.defineProperty(SubClass.prototype, key, descriptor);
|
|
28
|
+
property()(SubClass.prototype, key);
|
|
29
|
+
}
|
|
30
|
+
const State = subclass()(SubClass);
|
|
31
|
+
return new State();
|
|
32
|
+
};
|
|
33
|
+
const createLegacyStore$1 = (defaultState) => {
|
|
34
|
+
const defaultValues = typeof defaultState === "function" ? defaultState() : defaultState;
|
|
35
|
+
const state = createStore$1(defaultValues);
|
|
36
|
+
return {
|
|
37
|
+
state,
|
|
38
|
+
get: (propName) => state[propName],
|
|
39
|
+
set: (propName, value) => state.set(propName, value),
|
|
40
|
+
onChange: (propName, callback) => watch(
|
|
41
|
+
() => state[propName],
|
|
42
|
+
(newValue) => callback(newValue),
|
|
43
|
+
{ sync: true }
|
|
44
|
+
).remove
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const makeAccessorController$1 = (createInstance, _options) => (component) => proxy(component, createInstance);
|
|
48
|
+
let AccessorController$1 = class AccessorController extends GenericController {
|
|
23
49
|
/**
|
|
24
50
|
* @public
|
|
25
51
|
* @param component
|
|
@@ -34,7 +60,7 @@ class AccessorController extends GenericController {
|
|
|
34
60
|
that.#createInstance = createInstance;
|
|
35
61
|
that.Z();
|
|
36
62
|
that.setProvisionalExports(
|
|
37
|
-
makeBinderProxy(
|
|
63
|
+
makeBinderProxy$1(
|
|
38
64
|
component,
|
|
39
65
|
new WeakRef(that),
|
|
40
66
|
component.M.length - 1,
|
|
@@ -115,9 +141,9 @@ class AccessorController extends GenericController {
|
|
|
115
141
|
this.instance.destroy?.();
|
|
116
142
|
}
|
|
117
143
|
}
|
|
118
|
-
}
|
|
119
|
-
const proxy = proxyExports(AccessorController);
|
|
120
|
-
const makeBinderProxy = (component, accessorControllerRef, accessorControllerIndex, instance, boundProperties) => new Proxy(instance, {
|
|
144
|
+
};
|
|
145
|
+
const proxy = proxyExports(AccessorController$1);
|
|
146
|
+
const makeBinderProxy$1 = (component, accessorControllerRef, accessorControllerIndex, instance, boundProperties) => new Proxy(instance, {
|
|
121
147
|
get: (target, propertyName) => {
|
|
122
148
|
const value = target[propertyName];
|
|
123
149
|
if (
|
|
@@ -221,8 +247,8 @@ const bindPropToProperty = (descriptor, accessorControllerIndex, propertyName, s
|
|
|
221
247
|
}
|
|
222
248
|
};
|
|
223
249
|
};
|
|
224
|
-
const getAccessorControllerBoundProperties = (controller) => controller.Y;
|
|
225
|
-
const reCreateAccessor = (instance, component) => {
|
|
250
|
+
const getAccessorControllerBoundProperties$1 = (controller) => controller.Y;
|
|
251
|
+
const reCreateAccessor$1 = (instance, component) => {
|
|
226
252
|
const accessorController = component.manager.useRefSync(instance);
|
|
227
253
|
accessorController?.hostDestroy();
|
|
228
254
|
accessorController?.Z();
|
|
@@ -231,34 +257,16 @@ const reCreateAccessor = (instance, component) => {
|
|
|
231
257
|
console.error("Unable to resolve the useAccessor controller from the provided value");
|
|
232
258
|
}
|
|
233
259
|
};
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
const State = subclass()(SubClass);
|
|
244
|
-
return new State();
|
|
245
|
-
};
|
|
246
|
-
const createLegacyStore = (defaultState) => {
|
|
247
|
-
const defaultValues = typeof defaultState === "function" ? defaultState() : defaultState;
|
|
248
|
-
const state = createStore(defaultValues);
|
|
249
|
-
return {
|
|
250
|
-
state,
|
|
251
|
-
get: (propName) => state[propName],
|
|
252
|
-
set: (propName, value) => state.set(propName, value),
|
|
253
|
-
onChange: (propName, callback) => watch(
|
|
254
|
-
() => state[propName],
|
|
255
|
-
(newValue) => callback(newValue),
|
|
256
|
-
{ sync: true }
|
|
257
|
-
).remove
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
+
const reEmitEvent = reEmitEvent$1;
|
|
261
|
+
const makeAccessorController = makeAccessorController$1;
|
|
262
|
+
const AccessorController2 = AccessorController$1;
|
|
263
|
+
const reCreateAccessor = reCreateAccessor$1;
|
|
264
|
+
const makeBinderProxy = makeBinderProxy$1;
|
|
265
|
+
const getAccessorControllerBoundProperties = getAccessorControllerBoundProperties$1;
|
|
266
|
+
const createStore = createStore$1;
|
|
267
|
+
const createLegacyStore = createLegacyStore$1;
|
|
260
268
|
export {
|
|
261
|
-
AccessorController,
|
|
269
|
+
AccessorController2 as AccessorController,
|
|
262
270
|
createLegacyStore,
|
|
263
271
|
createStore,
|
|
264
272
|
getAccessorControllerBoundProperties,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.120",
|
|
4
4
|
"description": "Runtime for WebGIS SDK web components",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@arcgis/toolkit": "~5.2.0-next.
|
|
39
|
+
"@arcgis/toolkit": "~5.2.0-next.120",
|
|
40
40
|
"csstype": "^3.1.3",
|
|
41
41
|
"tslib": "^2.8.1"
|
|
42
42
|
},
|