@arcgis/coding-components 4.32.0-next.3 → 4.32.0-next.5
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/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-ad692c80.js → p-142abb7b.js} +2 -2
- package/dist/arcgis-coding-components/{p-9b806946.js → p-175d37ff.js} +1 -1
- package/dist/arcgis-coding-components/{p-5979fa51.js → p-2923c1b9.js} +2 -2
- package/dist/arcgis-coding-components/{p-1234f08d.js → p-39e2fdea.js} +2 -2
- package/dist/arcgis-coding-components/{p-311dd536.js → p-4e81604b.js} +1 -1
- package/dist/arcgis-coding-components/{p-04943142.entry.js → p-53526148.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-6f1bcfa3.js → p-55c6f0bc.js} +2 -2
- package/dist/arcgis-coding-components/{p-cc6996ac.js → p-58d32dde.js} +2 -2
- package/dist/arcgis-coding-components/{p-c5292bed.js → p-6839191c.js} +2 -2
- package/dist/arcgis-coding-components/{p-4058edd1.entry.js → p-73d50e62.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-5c5b0a08.js → p-7b210fc7.js} +10 -10
- package/dist/arcgis-coding-components/{p-bdd0f633.js → p-81ade418.js} +2 -2
- package/dist/arcgis-coding-components/p-89327af7.js +6 -0
- package/dist/arcgis-coding-components/{p-a7a82970.js → p-b3a70a68.js} +1 -1
- package/dist/arcgis-coding-components/{p-287402ed.js → p-baf94d77.js} +2 -2
- package/dist/arcgis-coding-components/{p-724745ad.entry.js → p-c99a31a5.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-560bea09.js → p-f246505f.js} +2 -2
- package/dist/arcgis-coding-components/{p-4a30d396.js → p-f2b45a2a.js} +2 -2
- package/dist/cjs/{app-globals-5225ccfc.js → app-globals-d3f7282a.js} +1 -1
- package/dist/cjs/{arcade-defaults-2f363afb.js → arcade-defaults-b8c5f195.js} +3 -3
- package/dist/cjs/{arcade-mode-bc7ac732.js → arcade-mode-63ae046d.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-015c863a.js → css-8ec949a7.js} +1 -1
- package/dist/cjs/{cssMode-7e7c0d5e.js → cssMode-6df8320d.js} +3 -3
- package/dist/cjs/{html-523d91be.js → html-b2ed7971.js} +3 -3
- package/dist/cjs/{htmlMode-9e9c8c7a.js → htmlMode-b1396ba5.js} +3 -3
- package/dist/cjs/{index-7742ae99.js → index-d2ffa5d3.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-52adf106.js → javascript-542a8853.js} +4 -4
- package/dist/cjs/{jsonMode-fc9e7ade.js → jsonMode-e1c9a20b.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-dad1b3ed.js → sql-expr-defaults-6ffccbda.js} +10 -10
- package/dist/cjs/{sql-expr-mode-53565192.js → sql-expr-mode-85d73267.js} +3 -3
- package/dist/cjs/{tsMode-fc608e3f.js → tsMode-959c2eee.js} +3 -3
- package/dist/cjs/{typescript-2f89097d.js → typescript-3483c62e.js} +3 -3
- package/dist/cjs/{useT9n-fb57f86f.js → useT9n-accb62b8.js} +204 -218
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +2 -2
- package/dist/components/arcade-suggestions.js +2 -2
- package/dist/components/arcgis-arcade-editor.js +2 -2
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-editor-variables.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +3 -3
- package/dist/components/arcgis-sql-expression-fields.js +2 -2
- package/dist/components/code-editor.js +3 -3
- package/dist/components/editor-variables.js +2 -2
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/{chunk-UO6SL5WB.js → index3.js} +292 -204
- package/dist/components/language-api-panel.js +2 -2
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +1 -1
- package/dist/components/useT9n.js +2 -105
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-f27d9fca.js → app-globals-2d542cdb.js} +1 -1
- package/dist/esm/{arcade-defaults-a9fe3a7e.js → arcade-defaults-4ecd28be.js} +3 -3
- package/dist/esm/{arcade-mode-41d1a4a6.js → arcade-mode-72b22f4b.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +7 -7
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-4190e5b3.js → css-cd6c7b23.js} +1 -1
- package/dist/esm/{cssMode-6f9b5832.js → cssMode-0f17882d.js} +3 -3
- package/dist/esm/{html-72c94071.js → html-c5bc32f5.js} +3 -3
- package/dist/esm/{htmlMode-7e1af53c.js → htmlMode-b5a9d4c2.js} +3 -3
- package/dist/esm/{index-d4c46155.js → index-564c44e5.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-fc0ace4e.js → javascript-ab12fd5b.js} +4 -4
- package/dist/esm/{jsonMode-9e212bde.js → jsonMode-4e5853ea.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-8c95f33b.js → sql-expr-defaults-76d3b604.js} +11 -11
- package/dist/esm/{sql-expr-mode-13b1db07.js → sql-expr-mode-1eeb4f22.js} +3 -3
- package/dist/esm/{tsMode-d893e415.js → tsMode-7bd26cef.js} +3 -3
- package/dist/esm/{typescript-d87bb201.js → typescript-fd3dbb56.js} +3 -3
- package/dist/esm/{useT9n-2711cd55.js → useT9n-914f4685.js} +204 -218
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/package.json +11 -11
- package/dist/arcgis-coding-components/p-a7e4fb53.js +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { languages, editor, Range, Uri, KeyMod, KeyCode } from 'monaco-editor';
|
|
8
8
|
import { i as importRequest } from './fields.js';
|
|
9
|
-
import {
|
|
10
|
-
import { u as useControllerManager, g as getSet } from './
|
|
9
|
+
import { m as isURL, o as hasSameOrigin, D as Deferred, g as generateGuid, p as observeAncestorsMutation, r as getElementTheme } from './index2.js';
|
|
10
|
+
import { u as useControllerManager, g as getSet } from './index3.js';
|
|
11
11
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
12
12
|
import { d as sqlExprDefaults } from './sql-expr-defaults.js';
|
|
13
13
|
import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h } from '@stencil/core/internal/client';
|
|
7
|
-
import { u as useControllerManager } from './
|
|
7
|
+
import { u as useControllerManager } from './index3.js';
|
|
8
8
|
import { t as setFocusOnElement, d as createFilterExpression } from './index2.js';
|
|
9
9
|
import { u as useT9n } from './useT9n.js';
|
|
10
10
|
import "@esri/calcite-components/dist/components/calcite-flow-item.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
6
|
// src/index.ts
|
|
7
7
|
var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis && !("forceESM" in window.$arcgis);
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
6
|
export { setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
7
7
|
export { a as arcade } from './arcade-defaults.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
6
|
// src/array-utils.ts
|
|
7
7
|
|
|
@@ -412,4 +412,4 @@ function isURL(url) {
|
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
export { Deferred as D, isNotUndefined as a, addLTRMark as b, setValuesInString as c, createFilterExpression as d,
|
|
415
|
+
export { Deferred as D, isNotUndefined as a, addLTRMark as b, setValuesInString as c, createFilterExpression as d, safeCall as e, fetchT9nStringsBundle as f, generateGuid as g, safeAsyncCall as h, isNotNull as i, devToolsAwareTimeout as j, getElementLocales as k, startLocaleObserver as l, isURL as m, normalizeLocale as n, hasSameOrigin as o, observeAncestorsMutation as p, quoteString as q, getElementTheme as r, supportedLocales as s, setFocusOnElement as t, debounce as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
|
-
import { a as isNotUndefined, D as Deferred,
|
|
6
|
+
import { a as isNotUndefined, e as safeCall, D as Deferred, h as safeAsyncCall, j as devToolsAwareTimeout, k as getElementLocales, l as startLocaleObserver } from './index2.js';
|
|
7
7
|
|
|
8
8
|
// src/framework.ts
|
|
9
9
|
function retrieveComponentMembers(component, isLit) {
|
|
@@ -372,7 +372,7 @@ var Controller = class {
|
|
|
372
372
|
if (genericController.hostUpdate) {
|
|
373
373
|
safeCall(genericController.hostUpdate, genericController, changedProperties);
|
|
374
374
|
}
|
|
375
|
-
this._callbacks.hostUpdate.forEach(callUpdate, changedProperties);
|
|
375
|
+
this._callbacks.hostUpdate.forEach(callUpdate$1, changedProperties);
|
|
376
376
|
}
|
|
377
377
|
/** @internal */
|
|
378
378
|
triggerUpdated(changedProperties) {
|
|
@@ -380,7 +380,7 @@ var Controller = class {
|
|
|
380
380
|
if (genericController.hostUpdated) {
|
|
381
381
|
safeCall(genericController.hostUpdated, genericController, changedProperties);
|
|
382
382
|
}
|
|
383
|
-
this._callbacks.hostUpdated.forEach(callUpdate, changedProperties);
|
|
383
|
+
this._callbacks.hostUpdated.forEach(callUpdate$1, changedProperties);
|
|
384
384
|
}
|
|
385
385
|
/** @internal */
|
|
386
386
|
triggerDestroy() {
|
|
@@ -411,7 +411,7 @@ var Controller = class {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
function callUpdate(callback) {
|
|
414
|
+
function callUpdate$1(callback) {
|
|
415
415
|
safeCall(callback, void 0, this);
|
|
416
416
|
}
|
|
417
417
|
var GenericController = Controller;
|
|
@@ -559,7 +559,6 @@ var ComponentInternals = class {
|
|
|
559
559
|
this.setters = {};
|
|
560
560
|
this.accessorGetter = {};
|
|
561
561
|
this.accessorSetter = {};
|
|
562
|
-
this.reactiveUtilsIntegrations = /* @__PURE__ */ new Set();
|
|
563
562
|
this._exports = /* @__PURE__ */ new WeakMap();
|
|
564
563
|
this.readonlySetter = (newValue, _oldValue, property) => {
|
|
565
564
|
if (shouldBypass.readOnly) {
|
|
@@ -661,12 +660,8 @@ var ComponentInternals = class {
|
|
|
661
660
|
break;
|
|
662
661
|
}
|
|
663
662
|
}
|
|
664
|
-
const preAccessorValue = newValue;
|
|
665
|
-
originalSet.call(this, newValue);
|
|
666
663
|
newValue = internals.accessorSetter[name2](newValue, oldValue, name2);
|
|
667
|
-
|
|
668
|
-
originalSet.call(this, newValue);
|
|
669
|
-
}
|
|
664
|
+
originalSet.call(this, newValue);
|
|
670
665
|
if (newValue !== oldValue) {
|
|
671
666
|
internals.enabledWatchers[name2]?.forEach((watcher) => watcher(newValue, oldValue, name2));
|
|
672
667
|
}
|
|
@@ -707,6 +702,192 @@ var ComponentInternals = class {
|
|
|
707
702
|
var emptyArray = [];
|
|
708
703
|
var customAccessor = Symbol();
|
|
709
704
|
var nothing = Symbol() ;
|
|
705
|
+
|
|
706
|
+
// src/trackPropKey.ts
|
|
707
|
+
function trackPropKey(component, onResolved, defaultValue) {
|
|
708
|
+
const internals = component.manager.internals;
|
|
709
|
+
if (internals.trackedValue !== nothing && internals.trackedValue !== defaultValue) {
|
|
710
|
+
internals.firePropTrackers(void 0, void 0);
|
|
711
|
+
}
|
|
712
|
+
if (internals.keyTrackers.length === 0) {
|
|
713
|
+
queueMicrotask(() => internals.firePropTrackers(void 0, void 0));
|
|
714
|
+
}
|
|
715
|
+
internals.trackedValue = defaultValue;
|
|
716
|
+
internals.keyTrackers.push((key, value) => safeCall(onResolved, void 0, defaultValue === value ? key : void 0));
|
|
717
|
+
return defaultValue;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// src/trackKey.ts
|
|
721
|
+
function trackKey(hostsCandidates, onResolved, defaultValue) {
|
|
722
|
+
const candidateHosts = Array.isArray(hostsCandidates) ? hostsCandidates : [hostsCandidates];
|
|
723
|
+
let leftToResolve = candidateHosts.length + 1;
|
|
724
|
+
const resolved = (resolution) => {
|
|
725
|
+
leftToResolve -= 1;
|
|
726
|
+
if (resolution !== void 0) {
|
|
727
|
+
leftToResolve = Math.min(leftToResolve, 0);
|
|
728
|
+
}
|
|
729
|
+
if (leftToResolve === 0) {
|
|
730
|
+
onResolved(resolution);
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
candidateHosts.forEach(
|
|
734
|
+
(host) => trackPropertyKey(
|
|
735
|
+
host,
|
|
736
|
+
(key) => resolved(
|
|
737
|
+
key === void 0 ? void 0 : {
|
|
738
|
+
key,
|
|
739
|
+
host,
|
|
740
|
+
isReactive: false
|
|
741
|
+
}
|
|
742
|
+
),
|
|
743
|
+
defaultValue
|
|
744
|
+
)
|
|
745
|
+
);
|
|
746
|
+
const component = candidateHosts.find(
|
|
747
|
+
(host) => "manager" in host && typeof host.manager === "object" && host.manager.component === host
|
|
748
|
+
);
|
|
749
|
+
if (component) {
|
|
750
|
+
trackPropKey(
|
|
751
|
+
component,
|
|
752
|
+
(key) => resolved(
|
|
753
|
+
key === void 0 ? void 0 : {
|
|
754
|
+
key,
|
|
755
|
+
host: component,
|
|
756
|
+
isReactive: getMemberType(component, key) !== void 0
|
|
757
|
+
}
|
|
758
|
+
),
|
|
759
|
+
defaultValue
|
|
760
|
+
);
|
|
761
|
+
}
|
|
762
|
+
return defaultValue;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// src/getSet.ts
|
|
766
|
+
function getSet(defaultValue, getSet2) {
|
|
767
|
+
const component = retrieveComponent();
|
|
768
|
+
return trackPropKey(
|
|
769
|
+
component,
|
|
770
|
+
(rawName) => {
|
|
771
|
+
const name2 = rawName;
|
|
772
|
+
const manager = component.manager;
|
|
773
|
+
const genericComponent = component;
|
|
774
|
+
const value = genericComponent[name2];
|
|
775
|
+
const isStencilHotReload = "production" !== "production" ;
|
|
776
|
+
if (value != null && value !== defaultValue && typeof getSet2.set === "function" && !isStencilHotReload) {
|
|
777
|
+
const newValue = getSet2.set(value, defaultValue, name2);
|
|
778
|
+
if (newValue !== value) {
|
|
779
|
+
if (manager.isLit) {
|
|
780
|
+
genericComponent[name2] = newValue;
|
|
781
|
+
} else {
|
|
782
|
+
let firstConnected = true;
|
|
783
|
+
manager.onConnected(() => {
|
|
784
|
+
if (!firstConnected) {
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
firstConnected = true;
|
|
788
|
+
bypassSetter(() => {
|
|
789
|
+
genericComponent[name2] = newValue;
|
|
790
|
+
});
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
genericGetSet(component, name2, getSet2);
|
|
796
|
+
},
|
|
797
|
+
defaultValue
|
|
798
|
+
);
|
|
799
|
+
}
|
|
800
|
+
function bypassSetter(callback) {
|
|
801
|
+
shouldBypass.setter = true;
|
|
802
|
+
try {
|
|
803
|
+
return callback();
|
|
804
|
+
} finally {
|
|
805
|
+
shouldBypass.setter = false;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
function genericGetSet(component, property, getSet2) {
|
|
809
|
+
var _a2, _b;
|
|
810
|
+
const genericGetSet2 = getSet2;
|
|
811
|
+
const internals = component.manager.internals;
|
|
812
|
+
const get = typeof genericGetSet2.get === "function" ? genericGetSet2.get : void 0;
|
|
813
|
+
if (get) {
|
|
814
|
+
(_a2 = internals.getters)[property] ?? (_a2[property] = []);
|
|
815
|
+
internals.getters[property].unshift(get);
|
|
816
|
+
}
|
|
817
|
+
const set = genericGetSet2.set === "ignore" ? ignoreSet : genericGetSet2.set;
|
|
818
|
+
if (set) {
|
|
819
|
+
(_b = internals.setters)[property] ?? (_b[property] = []);
|
|
820
|
+
internals.setters[property].unshift(
|
|
821
|
+
set
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
var ignoreSet = (_, value) => value;
|
|
826
|
+
function bypassReadOnly(callback) {
|
|
827
|
+
shouldBypass.readOnly = true;
|
|
828
|
+
try {
|
|
829
|
+
return callback();
|
|
830
|
+
} finally {
|
|
831
|
+
shouldBypass.readOnly = false;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// src/proxyExports.ts
|
|
836
|
+
var proxyExports = (Class) => (...args) => {
|
|
837
|
+
const ambientControllers2 = retrieveParentControllers();
|
|
838
|
+
const instance = new Class(...args);
|
|
839
|
+
const initialExports = instance.exports;
|
|
840
|
+
setParentController(ambientControllers2.at(-1));
|
|
841
|
+
const internals = instance.component.manager.internals;
|
|
842
|
+
internals.markExports(instance, initialExports);
|
|
843
|
+
instance.watchExports((exports) => internals.markExports(instance, exports));
|
|
844
|
+
setAmbientChildController(instance);
|
|
845
|
+
const hostCandidates = [instance.component, ...ambientControllers2].reverse();
|
|
846
|
+
return trackKey(
|
|
847
|
+
hostCandidates,
|
|
848
|
+
(resolution) => resolution === void 0 ? void 0 : setProxy(instance, resolution, initialExports),
|
|
849
|
+
initialExports
|
|
850
|
+
);
|
|
851
|
+
};
|
|
852
|
+
function setProxy(controller, { host, key, isReactive: assignedToProp }, initialExports) {
|
|
853
|
+
const genericHost = host;
|
|
854
|
+
const controllerValueChanged = genericHost[key] !== controller.exports;
|
|
855
|
+
const hostValueChanged = genericHost[key] !== initialExports;
|
|
856
|
+
const controllerUpdatedExports = initialExports !== controller.exports;
|
|
857
|
+
if (controllerValueChanged && !hostValueChanged && controllerUpdatedExports) {
|
|
858
|
+
genericHost[key] = controller.exports;
|
|
859
|
+
}
|
|
860
|
+
const isProxyExportsOnComponent = host === controller.component;
|
|
861
|
+
if (isProxyExportsOnComponent) {
|
|
862
|
+
if (assignedToProp) {
|
|
863
|
+
const internals = controller.component.manager.internals;
|
|
864
|
+
if (hostValueChanged) {
|
|
865
|
+
internals.markExports(controller, genericHost[key]);
|
|
866
|
+
}
|
|
867
|
+
watch(controller.component, key, (value) => {
|
|
868
|
+
if (value !== controller.exports) {
|
|
869
|
+
internals.markExports(controller, value);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
controller.assignedProperty = assignedToProp ? void 0 : key;
|
|
874
|
+
}
|
|
875
|
+
controller.watchExports(() => {
|
|
876
|
+
if (genericHost[key] === controller.exports) {
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
const manager = controller.component.manager;
|
|
880
|
+
const isReadOnly = manager.internals.setters[key]?.includes(manager.internals.readonlySetter);
|
|
881
|
+
if (isReadOnly) {
|
|
882
|
+
bypassReadOnly(() => {
|
|
883
|
+
genericHost[key] = controller.exports;
|
|
884
|
+
});
|
|
885
|
+
} else {
|
|
886
|
+
genericHost[key] = controller.exports;
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
|
|
710
891
|
var useControllerManager = (component, forceUpdate) => new ControllerManager(component, forceUpdate);
|
|
711
892
|
var ControllerManager = class extends GenericController {
|
|
712
893
|
constructor(component, forceUpdate) {
|
|
@@ -743,10 +924,10 @@ var ControllerManager = class extends GenericController {
|
|
|
743
924
|
this.hasDestroy = autoDestroyDisabledPropName in this.component && typeof this.component.destroy === "function";
|
|
744
925
|
this._bindLifecycleMethods();
|
|
745
926
|
const internals = this.internals;
|
|
746
|
-
Object.keys(internals.members).forEach((
|
|
747
|
-
internals.accessorGetter[
|
|
748
|
-
internals.accessorSetter[
|
|
749
|
-
internals.getSetProxy(
|
|
927
|
+
Object.keys(internals.members).forEach((name) => {
|
|
928
|
+
internals.accessorGetter[name] = defaultGetterSetter;
|
|
929
|
+
internals.accessorSetter[name] = defaultGetterSetter;
|
|
930
|
+
internals.getSetProxy(name);
|
|
750
931
|
});
|
|
751
932
|
if (isLit) {
|
|
752
933
|
this.internals.enabledWatchers = this.internals.allWatchers;
|
|
@@ -837,17 +1018,7 @@ var ControllerManager = class extends GenericController {
|
|
|
837
1018
|
}
|
|
838
1019
|
/** @internal */
|
|
839
1020
|
async _load() {
|
|
840
|
-
|
|
841
|
-
if (integrations.size > 0) {
|
|
842
|
-
for (const controller of integrations) {
|
|
843
|
-
if ("triggerLoad" in controller) {
|
|
844
|
-
await controller.triggerLoad();
|
|
845
|
-
} else {
|
|
846
|
-
await safeAsyncCall(controller.hostLoad, controller);
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
await Promise.allSettled(Array.from(this._controllers, callLoad, integrations));
|
|
1021
|
+
await Promise.allSettled(Array.from(this._controllers, callLoad));
|
|
851
1022
|
await this._originalLifecycles._load?.call(this.component);
|
|
852
1023
|
if (this.hasDestroy) {
|
|
853
1024
|
watch(this.component, autoDestroyDisabledPropName, () => this._setAutoDestroyTimeout());
|
|
@@ -860,7 +1031,7 @@ var ControllerManager = class extends GenericController {
|
|
|
860
1031
|
}
|
|
861
1032
|
_update() {
|
|
862
1033
|
const maybeLitComponent = this.component;
|
|
863
|
-
this._controllers.forEach(
|
|
1034
|
+
this._controllers.forEach(callUpdate, maybeLitComponent.$changes);
|
|
864
1035
|
this._originalLifecycles._willUpdate?.call(this.component);
|
|
865
1036
|
}
|
|
866
1037
|
_updated() {
|
|
@@ -923,12 +1094,10 @@ function callDisconnected(controller) {
|
|
|
923
1094
|
}
|
|
924
1095
|
}
|
|
925
1096
|
async function callLoad(controller) {
|
|
926
|
-
if (
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
await safeAsyncCall(controller.hostLoad, controller);
|
|
931
|
-
}
|
|
1097
|
+
if ("triggerLoad" in controller) {
|
|
1098
|
+
await controller.triggerLoad();
|
|
1099
|
+
} else {
|
|
1100
|
+
await safeAsyncCall(controller.hostLoad, controller);
|
|
932
1101
|
}
|
|
933
1102
|
}
|
|
934
1103
|
function callLoaded(controller) {
|
|
@@ -938,7 +1107,7 @@ function callLoaded(controller) {
|
|
|
938
1107
|
safeCall(controller.hostLoaded, controller);
|
|
939
1108
|
}
|
|
940
1109
|
}
|
|
941
|
-
function
|
|
1110
|
+
function callUpdate(controller) {
|
|
942
1111
|
if ("triggerUpdate" in controller) {
|
|
943
1112
|
controller.triggerUpdate(this);
|
|
944
1113
|
} else {
|
|
@@ -959,188 +1128,107 @@ function callDestroy(controller) {
|
|
|
959
1128
|
safeCall(controller.hostDestroy, controller);
|
|
960
1129
|
}
|
|
961
1130
|
}
|
|
962
|
-
function trackPropKey(component, onResolved, defaultValue) {
|
|
963
|
-
const internals = component.manager.internals;
|
|
964
|
-
if (internals.trackedValue !== nothing && internals.trackedValue !== defaultValue) {
|
|
965
|
-
internals.firePropTrackers(void 0, void 0);
|
|
966
|
-
}
|
|
967
|
-
if (internals.keyTrackers.length === 0) {
|
|
968
|
-
queueMicrotask(() => internals.firePropTrackers(void 0, void 0));
|
|
969
|
-
}
|
|
970
|
-
internals.trackedValue = defaultValue;
|
|
971
|
-
internals.keyTrackers.push((key, value) => safeCall(onResolved, void 0, defaultValue === value ? key : void 0));
|
|
972
|
-
return defaultValue;
|
|
973
|
-
}
|
|
974
1131
|
|
|
975
|
-
// src/
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
candidateHosts.forEach(
|
|
989
|
-
(host) => trackPropertyKey(
|
|
990
|
-
host,
|
|
991
|
-
(key) => resolved(
|
|
992
|
-
key === void 0 ? void 0 : {
|
|
993
|
-
key,
|
|
994
|
-
host,
|
|
995
|
-
isReactive: false
|
|
996
|
-
}
|
|
997
|
-
),
|
|
998
|
-
defaultValue
|
|
999
|
-
)
|
|
1000
|
-
);
|
|
1001
|
-
const component = candidateHosts.find(
|
|
1002
|
-
(host) => "manager" in host && typeof host.manager === "object" && host.manager.component === host
|
|
1003
|
-
);
|
|
1004
|
-
if (component) {
|
|
1005
|
-
trackPropKey(
|
|
1006
|
-
component,
|
|
1007
|
-
(key) => resolved(
|
|
1008
|
-
key === void 0 ? void 0 : {
|
|
1009
|
-
key,
|
|
1010
|
-
host: component,
|
|
1011
|
-
isReactive: getMemberType(component, key) !== void 0
|
|
1132
|
+
// src/functional.ts
|
|
1133
|
+
var makeController = (constructor) => proxy(void 0, constructor);
|
|
1134
|
+
var FunctionalController = class extends Controller {
|
|
1135
|
+
constructor(component, constructor) {
|
|
1136
|
+
super(component);
|
|
1137
|
+
const originalExports = this.exports;
|
|
1138
|
+
try {
|
|
1139
|
+
setAmbientComponent(this.component);
|
|
1140
|
+
const value = constructor(this.component, this);
|
|
1141
|
+
const constructorChangedExports = this.exports !== originalExports;
|
|
1142
|
+
if (value instanceof Promise) {
|
|
1143
|
+
if (!constructorChangedExports) {
|
|
1144
|
+
this.setProvisionalExports(value);
|
|
1012
1145
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
component,
|
|
1025
|
-
(rawName) => {
|
|
1026
|
-
const name2 = rawName;
|
|
1027
|
-
const manager = component.manager;
|
|
1028
|
-
const genericComponent = component;
|
|
1029
|
-
const value = genericComponent[name2];
|
|
1030
|
-
const isStencilHotReload = "production" !== "production" ;
|
|
1031
|
-
if (value != null && value !== defaultValue && typeof getSet2.set === "function" && !isStencilHotReload) {
|
|
1032
|
-
const newValue = getSet2.set(value, defaultValue, name2);
|
|
1033
|
-
if (newValue !== value) {
|
|
1034
|
-
if (manager.isLit) {
|
|
1035
|
-
genericComponent[name2] = newValue;
|
|
1036
|
-
} else {
|
|
1037
|
-
let firstConnected = true;
|
|
1038
|
-
manager.onConnected(() => {
|
|
1039
|
-
if (!firstConnected) {
|
|
1040
|
-
return;
|
|
1041
|
-
}
|
|
1042
|
-
firstConnected = true;
|
|
1043
|
-
bypassSetter(() => {
|
|
1044
|
-
genericComponent[name2] = newValue;
|
|
1045
|
-
});
|
|
1046
|
-
});
|
|
1047
|
-
}
|
|
1146
|
+
const resolved = value.then((result) => {
|
|
1147
|
+
this.exports = result;
|
|
1148
|
+
super.catchUpLifecycle();
|
|
1149
|
+
}).catch((error) => {
|
|
1150
|
+
this._ready.reject(error);
|
|
1151
|
+
console.error(error);
|
|
1152
|
+
});
|
|
1153
|
+
this.onLoad(async () => await resolved);
|
|
1154
|
+
} else {
|
|
1155
|
+
if (!constructorChangedExports || value !== void 0) {
|
|
1156
|
+
this.exports = value;
|
|
1048
1157
|
}
|
|
1158
|
+
queueMicrotask(() => super.catchUpLifecycle());
|
|
1049
1159
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
}
|
|
1055
|
-
function bypassSetter(callback) {
|
|
1056
|
-
shouldBypass.setter = true;
|
|
1057
|
-
try {
|
|
1058
|
-
return callback();
|
|
1059
|
-
} finally {
|
|
1060
|
-
shouldBypass.setter = false;
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
function genericGetSet(component, property, getSet2) {
|
|
1064
|
-
var _a2, _b;
|
|
1065
|
-
const genericGetSet2 = getSet2;
|
|
1066
|
-
const internals = component.manager.internals;
|
|
1067
|
-
const get = typeof genericGetSet2.get === "function" ? genericGetSet2.get : void 0;
|
|
1068
|
-
if (get) {
|
|
1069
|
-
(_a2 = internals.getters)[property] ?? (_a2[property] = []);
|
|
1070
|
-
internals.getters[property].unshift(get);
|
|
1071
|
-
}
|
|
1072
|
-
const set = genericGetSet2.set === "ignore" ? ignoreSet : genericGetSet2.set;
|
|
1073
|
-
if (set) {
|
|
1074
|
-
(_b = internals.setters)[property] ?? (_b[property] = []);
|
|
1075
|
-
internals.setters[property].unshift(
|
|
1076
|
-
set
|
|
1077
|
-
);
|
|
1160
|
+
} catch (error) {
|
|
1161
|
+
this._ready.reject(error);
|
|
1162
|
+
console.error(error);
|
|
1163
|
+
}
|
|
1078
1164
|
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
shouldBypass.readOnly = true;
|
|
1083
|
-
try {
|
|
1084
|
-
return callback();
|
|
1085
|
-
} finally {
|
|
1086
|
-
shouldBypass.readOnly = false;
|
|
1165
|
+
/** Noop - will be called in the constructor instead */
|
|
1166
|
+
catchUpLifecycle() {
|
|
1167
|
+
return;
|
|
1087
1168
|
}
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
// src/proxyExports.ts
|
|
1091
|
-
var proxyExports = (Class) => (...args) => {
|
|
1092
|
-
const ambientControllers2 = retrieveParentControllers();
|
|
1093
|
-
const instance = new Class(...args);
|
|
1094
|
-
const initialExports = instance.exports;
|
|
1095
|
-
setParentController(ambientControllers2.at(-1));
|
|
1096
|
-
const internals = instance.component.manager.internals;
|
|
1097
|
-
internals.markExports(instance, initialExports);
|
|
1098
|
-
instance.watchExports((exports) => internals.markExports(instance, exports));
|
|
1099
|
-
setAmbientChildController(instance);
|
|
1100
|
-
const hostCandidates = [instance.component, ...ambientControllers2].reverse();
|
|
1101
|
-
return trackKey(
|
|
1102
|
-
hostCandidates,
|
|
1103
|
-
(resolution) => resolution === void 0 ? void 0 : setProxy(instance, resolution, initialExports),
|
|
1104
|
-
initialExports
|
|
1105
|
-
);
|
|
1106
1169
|
};
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
const
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
}
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1170
|
+
var proxy = proxyExports(FunctionalController);
|
|
1171
|
+
var makeT9nController = (getAssetPath) => (options = {}) => makeController((component, controller) => {
|
|
1172
|
+
const locale = getElementLocales(component.el);
|
|
1173
|
+
const pending = {
|
|
1174
|
+
_lang: locale.lang,
|
|
1175
|
+
_t9nLocale: locale.t9nLocale,
|
|
1176
|
+
_loading: true
|
|
1177
|
+
};
|
|
1178
|
+
const componentWithOverrides = component;
|
|
1179
|
+
controller.onLifecycle(
|
|
1180
|
+
() => startLocaleObserver(
|
|
1181
|
+
component.el,
|
|
1182
|
+
getAssetPath("./assets"),
|
|
1183
|
+
({ t9nLocale, t9nStrings, lang }) => {
|
|
1184
|
+
const withoutOverrides = {
|
|
1185
|
+
...t9nStrings,
|
|
1186
|
+
_lang: lang,
|
|
1187
|
+
_t9nLocale: t9nLocale,
|
|
1188
|
+
_loading: false
|
|
1189
|
+
};
|
|
1190
|
+
controller.exports = withoutOverrides;
|
|
1191
|
+
const label = t9nStrings.componentLabel ?? t9nStrings.widgetLabel;
|
|
1192
|
+
if (typeof label === "string" && "label" in component && component.label == null) {
|
|
1193
|
+
component.label ?? (component.label = label);
|
|
1125
1194
|
}
|
|
1126
|
-
|
|
1195
|
+
applyOverrides(componentWithOverrides.messageOverrides);
|
|
1196
|
+
},
|
|
1197
|
+
options.name
|
|
1198
|
+
)
|
|
1199
|
+
);
|
|
1200
|
+
function applyOverrides(messageOverrides) {
|
|
1201
|
+
const currentValue = controller.exports;
|
|
1202
|
+
const rawMessages = currentValue._original ?? currentValue;
|
|
1203
|
+
const updated = deepMerge(rawMessages, messageOverrides);
|
|
1204
|
+
if (messageOverrides) {
|
|
1205
|
+
updated._original = rawMessages;
|
|
1127
1206
|
}
|
|
1128
|
-
controller.
|
|
1207
|
+
controller.exports = updated;
|
|
1129
1208
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1209
|
+
if ("messageOverrides" in componentWithOverrides) {
|
|
1210
|
+
controller.onLifecycle(() => watch(componentWithOverrides, "messageOverrides", applyOverrides));
|
|
1211
|
+
}
|
|
1212
|
+
if (options.blocking) {
|
|
1213
|
+
controller.setProvisionalExports(pending, false);
|
|
1214
|
+
return void 0;
|
|
1215
|
+
} else {
|
|
1216
|
+
return pending;
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
function deepMerge(original, overwrites) {
|
|
1220
|
+
if (!overwrites) {
|
|
1221
|
+
return original;
|
|
1222
|
+
}
|
|
1223
|
+
const merged = { ...original };
|
|
1224
|
+
Object.entries(overwrites).forEach(([key, value]) => {
|
|
1225
|
+
if (typeof value === "object") {
|
|
1226
|
+
merged[key] = deepMerge(original[key], value);
|
|
1140
1227
|
} else {
|
|
1141
|
-
|
|
1228
|
+
merged[key] = value ?? original[key];
|
|
1142
1229
|
}
|
|
1143
1230
|
});
|
|
1231
|
+
return merged;
|
|
1144
1232
|
}
|
|
1145
1233
|
|
|
1146
|
-
export {
|
|
1234
|
+
export { getSet as g, makeT9nController as m, useControllerManager as u };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.5
|
|
5
5
|
*/
|
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
7
7
|
import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertMarkdownString, b as colorizedAllCodeElements } from './markdown.js';
|
|
8
8
|
import { f as filterCollection } from './utilities.js';
|
|
9
|
-
import { u as useControllerManager } from './
|
|
9
|
+
import { u as useControllerManager } from './index3.js';
|
|
10
10
|
import { t as setFocusOnElement, b as addLTRMark } from './index2.js';
|
|
11
11
|
import { u as useT9n } from './useT9n.js';
|
|
12
12
|
import "@esri/calcite-components/dist/components/calcite-list-item-group.js";
|