@arcgis/lumina 4.32.0-next.10 → 4.32.0-next.11
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/{chunk-CH52Q2MB.js → chunk-PGHUBTOM.js} +0 -6
- package/dist/config.d.ts +0 -8
- package/dist/config.js +1 -7
- package/dist/createEvent.d.ts +5 -0
- package/dist/index.js +30 -29
- package/dist/jsx/jsx.d.ts +0 -1
- package/dist/stencilSsrCompatibility/index.d.ts +0 -1
- package/dist/typings/index.d.ts +4 -4
- package/package.json +3 -3
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
var lazyMetaGroupJoiner = ";";
|
|
3
3
|
var lazyMetaItemJoiner = ",";
|
|
4
4
|
var lazyMetaSubItemJoiner = ":";
|
|
5
|
-
var defaultEventBubbles = true;
|
|
6
|
-
var defaultEventCancelable = true;
|
|
7
|
-
var defaultEventComposed = true;
|
|
8
5
|
var PropertyFlags = /* @__PURE__ */ ((PropertyFlags2) => {
|
|
9
6
|
PropertyFlags2[PropertyFlags2["ATTRIBUTE"] = 1] = "ATTRIBUTE";
|
|
10
7
|
PropertyFlags2[PropertyFlags2["REFLECT"] = 2] = "REFLECT";
|
|
@@ -20,8 +17,5 @@ export {
|
|
|
20
17
|
lazyMetaGroupJoiner,
|
|
21
18
|
lazyMetaItemJoiner,
|
|
22
19
|
lazyMetaSubItemJoiner,
|
|
23
|
-
defaultEventBubbles,
|
|
24
|
-
defaultEventCancelable,
|
|
25
|
-
defaultEventComposed,
|
|
26
20
|
PropertyFlags
|
|
27
21
|
};
|
package/dist/config.d.ts
CHANGED
|
@@ -6,14 +6,6 @@
|
|
|
6
6
|
export declare const lazyMetaGroupJoiner = ";";
|
|
7
7
|
export declare const lazyMetaItemJoiner = ",";
|
|
8
8
|
export declare const lazyMetaSubItemJoiner = ":";
|
|
9
|
-
/**
|
|
10
|
-
* While these defaults don't match DOM defaults (all false), they match
|
|
11
|
-
* Stencil and Shoelace defaults. Also, they make more sense for our
|
|
12
|
-
* usage (i.e why would you want events to not be cancelable by default?)
|
|
13
|
-
*/
|
|
14
|
-
export declare const defaultEventBubbles = true;
|
|
15
|
-
export declare const defaultEventCancelable = true;
|
|
16
|
-
export declare const defaultEventComposed = true;
|
|
17
9
|
/**
|
|
18
10
|
* By default in Lit, the `@property()` decorator accepts an object. However, to
|
|
19
11
|
* keep the bundle size smaller, in production builds, instead of passing it an
|
package/dist/config.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PropertyFlags,
|
|
3
|
-
defaultEventBubbles,
|
|
4
|
-
defaultEventCancelable,
|
|
5
|
-
defaultEventComposed,
|
|
6
3
|
lazyMetaGroupJoiner,
|
|
7
4
|
lazyMetaItemJoiner,
|
|
8
5
|
lazyMetaSubItemJoiner
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PGHUBTOM.js";
|
|
10
7
|
export {
|
|
11
8
|
PropertyFlags,
|
|
12
|
-
defaultEventBubbles,
|
|
13
|
-
defaultEventCancelable,
|
|
14
|
-
defaultEventComposed,
|
|
15
9
|
lazyMetaGroupJoiner,
|
|
16
10
|
lazyMetaItemJoiner,
|
|
17
11
|
lazyMetaSubItemJoiner
|
package/dist/createEvent.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { BaseComponent, EventEmitter } from "@arcgis/components-controllers";
|
|
2
|
+
/**
|
|
3
|
+
* While these defaults don't match DOM defaults (all false), they match
|
|
4
|
+
* Stencil and Shoelace defaults. Also, they make more sense for our
|
|
5
|
+
* usage (i.e why would you want events to not be cancelable by default?)
|
|
6
|
+
*/
|
|
2
7
|
export type EventOptions = {
|
|
3
8
|
/**
|
|
4
9
|
* A Boolean indicating whether the event bubbles up through the DOM or not.
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
defaultEventBubbles,
|
|
3
|
-
defaultEventCancelable,
|
|
4
|
-
defaultEventComposed,
|
|
5
2
|
lazyMetaGroupJoiner,
|
|
6
3
|
lazyMetaItemJoiner,
|
|
7
4
|
lazyMetaSubItemJoiner
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PGHUBTOM.js";
|
|
9
6
|
|
|
10
7
|
// src/createEvent.ts
|
|
11
8
|
import { retrieveComponent, trackPropertyKey, keyTrackResolve } from "@arcgis/components-controllers";
|
|
@@ -25,9 +22,9 @@ var createEventFactory = (eventName = "", options = {}, component = retrieveComp
|
|
|
25
22
|
}
|
|
26
23
|
const event = new CustomEvent(eventName, {
|
|
27
24
|
detail: payload,
|
|
28
|
-
cancelable:
|
|
29
|
-
bubbles:
|
|
30
|
-
composed:
|
|
25
|
+
cancelable: true,
|
|
26
|
+
bubbles: true,
|
|
27
|
+
composed: true,
|
|
31
28
|
...options
|
|
32
29
|
});
|
|
33
30
|
component.el.dispatchEvent(event);
|
|
@@ -503,10 +500,11 @@ function handleComponentMetaUpdate(meta) {
|
|
|
503
500
|
return;
|
|
504
501
|
}
|
|
505
502
|
const attributes = meta.properties.map(([property2, attribute]) => attribute ?? camelToKebab2(property2)).filter(Boolean);
|
|
503
|
+
const observedAttributes = initializeAttributeObserver();
|
|
506
504
|
observedAttributes[meta.tagName] ??= {};
|
|
507
505
|
observedAttributes[meta.tagName].original ??= new Set(ProxyClass.observedAttributes);
|
|
508
506
|
const originallyObserved = observedAttributes[meta.tagName].original;
|
|
509
|
-
observedAttributes[meta.tagName].manuallyObserved
|
|
507
|
+
observedAttributes[meta.tagName].manuallyObserved = new Set(
|
|
510
508
|
/**
|
|
511
509
|
* Never manually observe attributes that were in the original
|
|
512
510
|
* observedAttributes as those would be observed by the browser
|
|
@@ -518,27 +516,30 @@ function handleComponentMetaUpdate(meta) {
|
|
|
518
516
|
ProxyClass._properties = meta.properties.map(([name]) => name);
|
|
519
517
|
ProxyClass.observedAttributes = attributes;
|
|
520
518
|
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
519
|
+
function initializeAttributeObserver() {
|
|
520
|
+
const observedAttributesSymbol = Symbol.for("@arcgis/lumina:observedAttributes");
|
|
521
|
+
const globalThisWithObservedAttributes = globalThis;
|
|
522
|
+
const alreadyHadObservers = observedAttributesSymbol in globalThisWithObservedAttributes;
|
|
523
|
+
globalThisWithObservedAttributes[observedAttributesSymbol] ??= {};
|
|
524
|
+
const observedAttributes = globalThisWithObservedAttributes[observedAttributesSymbol];
|
|
525
|
+
if (!alreadyHadObservers) {
|
|
526
|
+
const makeObserver = (original) => function observeAttributes(qualifiedName, ...rest) {
|
|
527
|
+
const observed = observedAttributes[this.tagName.toLowerCase()]?.manuallyObserved;
|
|
528
|
+
if (observed?.has(qualifiedName)) {
|
|
529
|
+
const oldValue = this.getAttribute(qualifiedName);
|
|
530
|
+
const returns = original.call(this, qualifiedName, ...rest);
|
|
531
|
+
const newValue = this.getAttribute(qualifiedName);
|
|
532
|
+
this.attributeChangedCallback(qualifiedName, oldValue, newValue);
|
|
533
|
+
return returns;
|
|
534
|
+
} else {
|
|
535
|
+
return original.call(this, qualifiedName, ...rest);
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
ProxyComponent.prototype.setAttribute = makeObserver(ProxyComponent.prototype.setAttribute);
|
|
539
|
+
ProxyComponent.prototype.toggleAttribute = makeObserver(ProxyComponent.prototype.toggleAttribute);
|
|
540
|
+
ProxyComponent.prototype.removeAttribute = makeObserver(ProxyComponent.prototype.removeAttribute);
|
|
541
|
+
}
|
|
542
|
+
return observedAttributes;
|
|
542
543
|
}
|
|
543
544
|
|
|
544
545
|
// src/LitElement.ts
|
package/dist/jsx/jsx.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* /// <reference types="@arcgis/lumina/typings" />
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
|
-
/// <reference path="../typings/jsxGlobals.d.ts" />
|
|
10
9
|
import type { Properties as CssProperties } from "csstype";
|
|
11
10
|
import type { TemplateResult } from "lit-html";
|
|
12
11
|
import type { DirectiveResult } from "lit-html/directive.js";
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference path="jsxGlobals.d.ts" />
|
|
2
|
-
/// <reference path="loadLitCss.d.ts" />
|
|
3
|
-
/// <reference path="viteEnv.d.ts" />
|
|
4
|
-
/// <reference path="importMeta.d.ts" />
|
|
1
|
+
/// <reference path="jsxGlobals.d.ts" preserve="true" />
|
|
2
|
+
/// <reference path="loadLitCss.d.ts" preserve="true" />
|
|
3
|
+
/// <reference path="viteEnv.d.ts" preserve="true" />
|
|
4
|
+
/// <reference path="importMeta.d.ts" preserve="true" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina",
|
|
3
|
-
"version": "4.32.0-next.
|
|
3
|
+
"version": "4.32.0-next.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
],
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@arcgis/components-controllers": "4.32.0-next.
|
|
23
|
-
"@arcgis/components-utils": "4.32.0-next.
|
|
22
|
+
"@arcgis/components-controllers": "4.32.0-next.11",
|
|
23
|
+
"@arcgis/components-utils": "4.32.0-next.11",
|
|
24
24
|
"@lit-labs/ssr": "^3.2.2",
|
|
25
25
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
26
26
|
"csstype": "^3.1.3",
|