@arcgis/common-components 4.29.0-beta.46 → 4.29.0-beta.48
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-common-components/arcgis-common-components.esm.js +1 -1
- package/dist/arcgis-common-components/p-6c7d2684.js +1 -0
- package/dist/arcgis-common-components/p-7318a1d1.entry.js +1 -0
- package/dist/arcgis-common-components/p-77e17376.entry.js +1 -0
- package/dist/arcgis-common-components/p-a91ab432.js +2 -0
- package/dist/cjs/arcgis-common-components.cjs.js +3 -3
- package/dist/cjs/arcgis-field-info.cjs.entry.js +902 -903
- package/dist/cjs/arcgis-field-pick-list.cjs.entry.js +228 -229
- package/dist/cjs/{index-2e4fbd31.js → index-5ec7f592.js} +5 -20
- package/dist/cjs/{index-ab5f2576.js → index-e0422bc8.js} +72 -77
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/components/arcgis-field-info.d.ts +2 -2
- package/dist/components/arcgis-field-pick-list.d.ts +2 -2
- package/dist/components/arcgis-field-pick-list.js +271 -272
- package/dist/components/field-info.js +955 -900
- package/dist/esm/arcgis-common-components.js +4 -4
- package/dist/esm/arcgis-field-info.entry.js +902 -903
- package/dist/esm/arcgis-field-pick-list.entry.js +228 -229
- package/dist/esm/{index-74897166.js → index-0c129ec4.js} +73 -78
- package/dist/esm/index-ba4fe890.js +59 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/field-info/field-info.d.ts +61 -61
- package/dist/types/components/field-info/t9n-types.d.ts +72 -72
- package/dist/types/components/field-info/utils/basic.d.ts +24 -24
- package/dist/types/components/field-info/utils/field.d.ts +1 -1
- package/dist/types/components/field-pick-list/field-pick-list.d.ts +115 -115
- package/dist/types/components/field-pick-list/t9n-types.d.ts +15 -15
- package/dist/types/components/field-pick-list/utils/types.d.ts +14 -14
- package/dist/types/components.d.ts +0 -86
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/package.json +7 -7
- package/dist/arcgis-common-components/p-0be8fd4c.entry.js +0 -1
- package/dist/arcgis-common-components/p-164eb24e.entry.js +0 -1
- package/dist/arcgis-common-components/p-5ecf6396.js +0 -1
- package/dist/arcgis-common-components/p-97c7ac8d.entry.js +0 -1
- package/dist/arcgis-common-components/p-b23318c8.js +0 -1
- package/dist/arcgis-common-components/p-d66b011b.entry.js +0 -1
- package/dist/arcgis-common-components/p-f27af39c.js +0 -2
- package/dist/cjs/arcgis-api-key.cjs.entry.js +0 -51
- package/dist/cjs/arcgis-identity.cjs.entry.js +0 -139
- package/dist/cjs/index-f8bf4df6.js +0 -7
- package/dist/components/arcgis-api-key.d.ts +0 -11
- package/dist/components/arcgis-api-key.js +0 -69
- package/dist/components/arcgis-identity.d.ts +0 -11
- package/dist/components/arcgis-identity.js +0 -167
- package/dist/components/index2.js +0 -75
- package/dist/esm/arcgis-api-key.entry.js +0 -47
- package/dist/esm/arcgis-identity.entry.js +0 -135
- package/dist/esm/index-3d9bb67e.js +0 -75
- package/dist/esm/index-e7244815.js +0 -3
- package/dist/types/components/api-key/api-key.d.ts +0 -9
- package/dist/types/components/identity/identity.d.ts +0 -31
- package/dist/types/components/types.d.ts +0 -10
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
|
-
import { f as importCoreReactiveUtils, n as newIdentityOAuthInfo, g as importIdentityIdentityManager } from './index2.js';
|
|
3
|
-
|
|
4
|
-
const identityCss = ":host{display:none}arcgis-identity{display:none}";
|
|
5
|
-
|
|
6
|
-
const ArcgisIdentity$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisIdentity extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.identityReady = createEvent(this, "identityReady", 7);
|
|
11
|
-
this.credentialCreate = createEvent(this, "credentialCreate", 7);
|
|
12
|
-
this.dialogCreate = createEvent(this, "dialogCreate", 7);
|
|
13
|
-
this.identity = undefined;
|
|
14
|
-
this.appId = undefined;
|
|
15
|
-
this.credential = undefined;
|
|
16
|
-
this.expiration = undefined;
|
|
17
|
-
this.locale = undefined;
|
|
18
|
-
this.usePopup = false;
|
|
19
|
-
this.popupCallbackUrl = undefined;
|
|
20
|
-
this.portalUrl = undefined;
|
|
21
|
-
this.preserveUrlHash = false;
|
|
22
|
-
}
|
|
23
|
-
//--------------------------------------------------------------------------
|
|
24
|
-
//
|
|
25
|
-
// Watchers
|
|
26
|
-
//
|
|
27
|
-
//--------------------------------------------------------------------------
|
|
28
|
-
appIdWatcher(value, oldValue) {
|
|
29
|
-
if (oldValue !== value) {
|
|
30
|
-
this._registerOAuth();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//--------------------------------------------------------------------------
|
|
34
|
-
//
|
|
35
|
-
// Methods
|
|
36
|
-
//
|
|
37
|
-
//--------------------------------------------------------------------------
|
|
38
|
-
async signIn() {
|
|
39
|
-
if (!this.credential) {
|
|
40
|
-
try {
|
|
41
|
-
this.credential = await this._checkCurrentStatus();
|
|
42
|
-
}
|
|
43
|
-
catch (error) {
|
|
44
|
-
this.credential = await this._fetchCredential();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return this.credential;
|
|
48
|
-
}
|
|
49
|
-
async signOut() {
|
|
50
|
-
if (!this.credential) {
|
|
51
|
-
try {
|
|
52
|
-
this.identity.destroyCredentials();
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
this.credential = undefined;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
this.credential = undefined;
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
//--------------------------------------------------------------------------
|
|
62
|
-
//
|
|
63
|
-
// Lifecycle
|
|
64
|
-
//
|
|
65
|
-
//--------------------------------------------------------------------------
|
|
66
|
-
async connectedCallback() {
|
|
67
|
-
if (this.appId) {
|
|
68
|
-
await this._registerOAuth();
|
|
69
|
-
}
|
|
70
|
-
this._proxyEvents();
|
|
71
|
-
await this._addWatchers();
|
|
72
|
-
this.identityReady.emit({ identity: this.identity, ready: true });
|
|
73
|
-
}
|
|
74
|
-
//--------------------------------------------------------------------------
|
|
75
|
-
//
|
|
76
|
-
// Private Methods
|
|
77
|
-
//
|
|
78
|
-
//--------------------------------------------------------------------------
|
|
79
|
-
async _addWatchers() {
|
|
80
|
-
const { watch } = await importCoreReactiveUtils();
|
|
81
|
-
watch(() => this._info.expiration, (value) => (this.expiration = value), {
|
|
82
|
-
initial: true
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
_checkCurrentStatus() {
|
|
86
|
-
return this.identity.checkSignInStatus(`${this._info.portalUrl}/sharing`);
|
|
87
|
-
}
|
|
88
|
-
async _createOAuthInfo() {
|
|
89
|
-
const params = {};
|
|
90
|
-
if (this.appId !== undefined) {
|
|
91
|
-
params.appId = this.appId;
|
|
92
|
-
}
|
|
93
|
-
if (this.locale !== undefined) {
|
|
94
|
-
params.locale = this.locale;
|
|
95
|
-
}
|
|
96
|
-
if (this.popupCallbackUrl !== undefined) {
|
|
97
|
-
params.popupCallbackUrl = this.popupCallbackUrl;
|
|
98
|
-
}
|
|
99
|
-
if (this.preserveUrlHash !== undefined) {
|
|
100
|
-
params.preserveUrlHash = this.preserveUrlHash;
|
|
101
|
-
}
|
|
102
|
-
if (this.usePopup !== undefined) {
|
|
103
|
-
params.popup = this.usePopup;
|
|
104
|
-
}
|
|
105
|
-
if (this.portalUrl !== undefined) {
|
|
106
|
-
params.portalUrl = this.portalUrl;
|
|
107
|
-
}
|
|
108
|
-
const info = await newIdentityOAuthInfo(params);
|
|
109
|
-
this._info = info;
|
|
110
|
-
return info;
|
|
111
|
-
}
|
|
112
|
-
async _fetchCredential() {
|
|
113
|
-
const credential = await this.identity.getCredential(`${this._info?.portalUrl}/sharing`, {
|
|
114
|
-
error: null,
|
|
115
|
-
oAuthPopupConfirmation: false,
|
|
116
|
-
token: null
|
|
117
|
-
});
|
|
118
|
-
return credential;
|
|
119
|
-
}
|
|
120
|
-
async _registerOAuth() {
|
|
121
|
-
this.identity = await importIdentityIdentityManager();
|
|
122
|
-
const info = await this._createOAuthInfo();
|
|
123
|
-
this.identity.registerOAuthInfos([info]);
|
|
124
|
-
}
|
|
125
|
-
_proxyEvents() {
|
|
126
|
-
this.identity.on("credential-create", (e) => this.credentialCreate.emit(e));
|
|
127
|
-
this.identity.on("dialog-create", (e) => this.dialogCreate.emit(e));
|
|
128
|
-
}
|
|
129
|
-
get el() { return this; }
|
|
130
|
-
static get watchers() { return {
|
|
131
|
-
"appId": ["appIdWatcher"]
|
|
132
|
-
}; }
|
|
133
|
-
static get style() { return identityCss; }
|
|
134
|
-
}, [0, "arcgis-identity", {
|
|
135
|
-
"identity": [1040],
|
|
136
|
-
"appId": [1, "app-id"],
|
|
137
|
-
"credential": [1040],
|
|
138
|
-
"expiration": [1026],
|
|
139
|
-
"locale": [1],
|
|
140
|
-
"usePopup": [4, "use-popup"],
|
|
141
|
-
"popupCallbackUrl": [1, "popup-callback-url"],
|
|
142
|
-
"portalUrl": [1, "portal-url"],
|
|
143
|
-
"preserveUrlHash": [4, "preserve-url-hash"],
|
|
144
|
-
"signIn": [64],
|
|
145
|
-
"signOut": [64]
|
|
146
|
-
}, undefined, {
|
|
147
|
-
"appId": ["appIdWatcher"]
|
|
148
|
-
}]);
|
|
149
|
-
function defineCustomElement$1() {
|
|
150
|
-
if (typeof customElements === "undefined") {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
const components = ["arcgis-identity"];
|
|
154
|
-
components.forEach(tagName => { switch (tagName) {
|
|
155
|
-
case "arcgis-identity":
|
|
156
|
-
if (!customElements.get(tagName)) {
|
|
157
|
-
customElements.define(tagName, ArcgisIdentity$1);
|
|
158
|
-
}
|
|
159
|
-
break;
|
|
160
|
-
} });
|
|
161
|
-
}
|
|
162
|
-
defineCustomElement$1();
|
|
163
|
-
|
|
164
|
-
const ArcgisIdentity = ArcgisIdentity$1;
|
|
165
|
-
const defineCustomElement = defineCustomElement$1;
|
|
166
|
-
|
|
167
|
-
export { ArcgisIdentity, defineCustomElement };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const amd = "define" in window && typeof window.define === "function" && "amd" in window.define;
|
|
2
|
-
function requireModule(modulePath) {
|
|
3
|
-
return new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
4
|
-
resolve(moduleDefault);
|
|
5
|
-
}));
|
|
6
|
-
}
|
|
7
|
-
async function importIdentityIdentityManager() {
|
|
8
|
-
if (amd) {
|
|
9
|
-
return requireModule("esri/identity/IdentityManager");
|
|
10
|
-
}
|
|
11
|
-
const module = await import('@arcgis/core/identity/IdentityManager.js');
|
|
12
|
-
return module.default;
|
|
13
|
-
}
|
|
14
|
-
async function importIdentityOAuthInfo() {
|
|
15
|
-
if (amd) {
|
|
16
|
-
return requireModule("esri/identity/OAuthInfo");
|
|
17
|
-
}
|
|
18
|
-
const module = await import('@arcgis/core/identity/OAuthInfo.js');
|
|
19
|
-
return module.default;
|
|
20
|
-
}
|
|
21
|
-
async function newIdentityOAuthInfo(properties) {
|
|
22
|
-
const ModConstructor = await importIdentityOAuthInfo();
|
|
23
|
-
return new ModConstructor(properties);
|
|
24
|
-
}
|
|
25
|
-
async function importRestSupportQuery() {
|
|
26
|
-
if (amd) {
|
|
27
|
-
return requireModule("esri/rest/support/Query");
|
|
28
|
-
}
|
|
29
|
-
const module = await import('@arcgis/core/rest/support/Query.js');
|
|
30
|
-
return module.default;
|
|
31
|
-
}
|
|
32
|
-
async function importConfig() {
|
|
33
|
-
if (amd) {
|
|
34
|
-
return requireModule("esri/config");
|
|
35
|
-
}
|
|
36
|
-
const module = await import('@arcgis/core/config.js');
|
|
37
|
-
return module.default;
|
|
38
|
-
}
|
|
39
|
-
async function importCoreLang() {
|
|
40
|
-
if (amd) {
|
|
41
|
-
return requireModule("esri/core/lang");
|
|
42
|
-
}
|
|
43
|
-
const module = await import('@arcgis/core/core/lang.js');
|
|
44
|
-
return module;
|
|
45
|
-
}
|
|
46
|
-
async function importCoreReactiveUtils() {
|
|
47
|
-
if (amd) {
|
|
48
|
-
return requireModule("esri/core/reactiveUtils");
|
|
49
|
-
}
|
|
50
|
-
const module = await import('@arcgis/core/core/reactiveUtils.js');
|
|
51
|
-
return module;
|
|
52
|
-
}
|
|
53
|
-
async function importIntl() {
|
|
54
|
-
if (amd) {
|
|
55
|
-
return requireModule("esri/intl");
|
|
56
|
-
}
|
|
57
|
-
const module = await import('@arcgis/core/intl.js');
|
|
58
|
-
return module;
|
|
59
|
-
}
|
|
60
|
-
async function importSmartMappingStatisticsSummaryStatistics() {
|
|
61
|
-
if (amd) {
|
|
62
|
-
return requireModule("esri/smartMapping/statistics/summaryStatistics");
|
|
63
|
-
}
|
|
64
|
-
const module = await import('@arcgis/core/smartMapping/statistics/summaryStatistics.js');
|
|
65
|
-
return module.default;
|
|
66
|
-
}
|
|
67
|
-
async function importSmartMappingStatisticsUniqueValues() {
|
|
68
|
-
if (amd) {
|
|
69
|
-
return requireModule("esri/smartMapping/statistics/uniqueValues");
|
|
70
|
-
}
|
|
71
|
-
const module = await import('@arcgis/core/smartMapping/statistics/uniqueValues.js');
|
|
72
|
-
return module.default;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { importCoreLang as a, importIntl as b, importRestSupportQuery as c, importSmartMappingStatisticsSummaryStatistics as d, importSmartMappingStatisticsUniqueValues as e, importCoreReactiveUtils as f, importIdentityIdentityManager as g, importConfig as i, newIdentityOAuthInfo as n };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement } from './index-74897166.js';
|
|
2
|
-
import { i as importConfig } from './index-3d9bb67e.js';
|
|
3
|
-
|
|
4
|
-
const apiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
|
|
5
|
-
|
|
6
|
-
const ArcgisApiKey = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.apiKeyReady = createEvent(this, "apiKeyReady", 7);
|
|
10
|
-
this.apiKey = undefined;
|
|
11
|
-
}
|
|
12
|
-
//--------------------------------------------------------------------------
|
|
13
|
-
//
|
|
14
|
-
// Watchers
|
|
15
|
-
//
|
|
16
|
-
//--------------------------------------------------------------------------
|
|
17
|
-
apiKeyWatcher(value) {
|
|
18
|
-
this._setApiKey(value);
|
|
19
|
-
}
|
|
20
|
-
//--------------------------------------------------------------------------
|
|
21
|
-
//
|
|
22
|
-
// Lifecycle
|
|
23
|
-
//
|
|
24
|
-
//--------------------------------------------------------------------------
|
|
25
|
-
async connectedCallback() {
|
|
26
|
-
if (this.apiKey) {
|
|
27
|
-
await this._setApiKey(this.apiKey);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//--------------------------------------------------------------------------
|
|
31
|
-
//
|
|
32
|
-
// Private Methods
|
|
33
|
-
//
|
|
34
|
-
//--------------------------------------------------------------------------
|
|
35
|
-
async _setApiKey(value) {
|
|
36
|
-
const config = await importConfig();
|
|
37
|
-
config.apiKey = value;
|
|
38
|
-
this.apiKeyReady.emit(true);
|
|
39
|
-
}
|
|
40
|
-
get el() { return getElement(this); }
|
|
41
|
-
static get watchers() { return {
|
|
42
|
-
"apiKey": ["apiKeyWatcher"]
|
|
43
|
-
}; }
|
|
44
|
-
};
|
|
45
|
-
ArcgisApiKey.style = apiKeyCss;
|
|
46
|
-
|
|
47
|
-
export { ArcgisApiKey as arcgis_api_key };
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement } from './index-74897166.js';
|
|
2
|
-
import { b as importCoreReactiveUtils, n as newIdentityOAuthInfo, c as importIdentityIdentityManager } from './index-3d9bb67e.js';
|
|
3
|
-
|
|
4
|
-
const identityCss = ":host{display:none}arcgis-identity{display:none}";
|
|
5
|
-
|
|
6
|
-
const ArcgisIdentity = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.identityReady = createEvent(this, "identityReady", 7);
|
|
10
|
-
this.credentialCreate = createEvent(this, "credentialCreate", 7);
|
|
11
|
-
this.dialogCreate = createEvent(this, "dialogCreate", 7);
|
|
12
|
-
this.identity = undefined;
|
|
13
|
-
this.appId = undefined;
|
|
14
|
-
this.credential = undefined;
|
|
15
|
-
this.expiration = undefined;
|
|
16
|
-
this.locale = undefined;
|
|
17
|
-
this.usePopup = false;
|
|
18
|
-
this.popupCallbackUrl = undefined;
|
|
19
|
-
this.portalUrl = undefined;
|
|
20
|
-
this.preserveUrlHash = false;
|
|
21
|
-
}
|
|
22
|
-
//--------------------------------------------------------------------------
|
|
23
|
-
//
|
|
24
|
-
// Watchers
|
|
25
|
-
//
|
|
26
|
-
//--------------------------------------------------------------------------
|
|
27
|
-
appIdWatcher(value, oldValue) {
|
|
28
|
-
if (oldValue !== value) {
|
|
29
|
-
this._registerOAuth();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//--------------------------------------------------------------------------
|
|
33
|
-
//
|
|
34
|
-
// Methods
|
|
35
|
-
//
|
|
36
|
-
//--------------------------------------------------------------------------
|
|
37
|
-
async signIn() {
|
|
38
|
-
if (!this.credential) {
|
|
39
|
-
try {
|
|
40
|
-
this.credential = await this._checkCurrentStatus();
|
|
41
|
-
}
|
|
42
|
-
catch (error) {
|
|
43
|
-
this.credential = await this._fetchCredential();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return this.credential;
|
|
47
|
-
}
|
|
48
|
-
async signOut() {
|
|
49
|
-
if (!this.credential) {
|
|
50
|
-
try {
|
|
51
|
-
this.identity.destroyCredentials();
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
this.credential = undefined;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
this.credential = undefined;
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
//--------------------------------------------------------------------------
|
|
61
|
-
//
|
|
62
|
-
// Lifecycle
|
|
63
|
-
//
|
|
64
|
-
//--------------------------------------------------------------------------
|
|
65
|
-
async connectedCallback() {
|
|
66
|
-
if (this.appId) {
|
|
67
|
-
await this._registerOAuth();
|
|
68
|
-
}
|
|
69
|
-
this._proxyEvents();
|
|
70
|
-
await this._addWatchers();
|
|
71
|
-
this.identityReady.emit({ identity: this.identity, ready: true });
|
|
72
|
-
}
|
|
73
|
-
//--------------------------------------------------------------------------
|
|
74
|
-
//
|
|
75
|
-
// Private Methods
|
|
76
|
-
//
|
|
77
|
-
//--------------------------------------------------------------------------
|
|
78
|
-
async _addWatchers() {
|
|
79
|
-
const { watch } = await importCoreReactiveUtils();
|
|
80
|
-
watch(() => this._info.expiration, (value) => (this.expiration = value), {
|
|
81
|
-
initial: true
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
_checkCurrentStatus() {
|
|
85
|
-
return this.identity.checkSignInStatus(`${this._info.portalUrl}/sharing`);
|
|
86
|
-
}
|
|
87
|
-
async _createOAuthInfo() {
|
|
88
|
-
const params = {};
|
|
89
|
-
if (this.appId !== undefined) {
|
|
90
|
-
params.appId = this.appId;
|
|
91
|
-
}
|
|
92
|
-
if (this.locale !== undefined) {
|
|
93
|
-
params.locale = this.locale;
|
|
94
|
-
}
|
|
95
|
-
if (this.popupCallbackUrl !== undefined) {
|
|
96
|
-
params.popupCallbackUrl = this.popupCallbackUrl;
|
|
97
|
-
}
|
|
98
|
-
if (this.preserveUrlHash !== undefined) {
|
|
99
|
-
params.preserveUrlHash = this.preserveUrlHash;
|
|
100
|
-
}
|
|
101
|
-
if (this.usePopup !== undefined) {
|
|
102
|
-
params.popup = this.usePopup;
|
|
103
|
-
}
|
|
104
|
-
if (this.portalUrl !== undefined) {
|
|
105
|
-
params.portalUrl = this.portalUrl;
|
|
106
|
-
}
|
|
107
|
-
const info = await newIdentityOAuthInfo(params);
|
|
108
|
-
this._info = info;
|
|
109
|
-
return info;
|
|
110
|
-
}
|
|
111
|
-
async _fetchCredential() {
|
|
112
|
-
const credential = await this.identity.getCredential(`${this._info?.portalUrl}/sharing`, {
|
|
113
|
-
error: null,
|
|
114
|
-
oAuthPopupConfirmation: false,
|
|
115
|
-
token: null
|
|
116
|
-
});
|
|
117
|
-
return credential;
|
|
118
|
-
}
|
|
119
|
-
async _registerOAuth() {
|
|
120
|
-
this.identity = await importIdentityIdentityManager();
|
|
121
|
-
const info = await this._createOAuthInfo();
|
|
122
|
-
this.identity.registerOAuthInfos([info]);
|
|
123
|
-
}
|
|
124
|
-
_proxyEvents() {
|
|
125
|
-
this.identity.on("credential-create", (e) => this.credentialCreate.emit(e));
|
|
126
|
-
this.identity.on("dialog-create", (e) => this.dialogCreate.emit(e));
|
|
127
|
-
}
|
|
128
|
-
get el() { return getElement(this); }
|
|
129
|
-
static get watchers() { return {
|
|
130
|
-
"appId": ["appIdWatcher"]
|
|
131
|
-
}; }
|
|
132
|
-
};
|
|
133
|
-
ArcgisIdentity.style = identityCss;
|
|
134
|
-
|
|
135
|
-
export { ArcgisIdentity as arcgis_identity };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const amd = "define" in window && typeof window.define === "function" && "amd" in window.define;
|
|
2
|
-
function requireModule(modulePath) {
|
|
3
|
-
return new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
|
|
4
|
-
resolve(moduleDefault);
|
|
5
|
-
}));
|
|
6
|
-
}
|
|
7
|
-
async function importIdentityIdentityManager() {
|
|
8
|
-
if (amd) {
|
|
9
|
-
return requireModule("esri/identity/IdentityManager");
|
|
10
|
-
}
|
|
11
|
-
const module = await import('@arcgis/core/identity/IdentityManager.js');
|
|
12
|
-
return module.default;
|
|
13
|
-
}
|
|
14
|
-
async function importIdentityOAuthInfo() {
|
|
15
|
-
if (amd) {
|
|
16
|
-
return requireModule("esri/identity/OAuthInfo");
|
|
17
|
-
}
|
|
18
|
-
const module = await import('@arcgis/core/identity/OAuthInfo.js');
|
|
19
|
-
return module.default;
|
|
20
|
-
}
|
|
21
|
-
async function newIdentityOAuthInfo(properties) {
|
|
22
|
-
const ModConstructor = await importIdentityOAuthInfo();
|
|
23
|
-
return new ModConstructor(properties);
|
|
24
|
-
}
|
|
25
|
-
async function importRestSupportQuery() {
|
|
26
|
-
if (amd) {
|
|
27
|
-
return requireModule("esri/rest/support/Query");
|
|
28
|
-
}
|
|
29
|
-
const module = await import('@arcgis/core/rest/support/Query.js');
|
|
30
|
-
return module.default;
|
|
31
|
-
}
|
|
32
|
-
async function importConfig() {
|
|
33
|
-
if (amd) {
|
|
34
|
-
return requireModule("esri/config");
|
|
35
|
-
}
|
|
36
|
-
const module = await import('@arcgis/core/config.js');
|
|
37
|
-
return module.default;
|
|
38
|
-
}
|
|
39
|
-
async function importCoreLang() {
|
|
40
|
-
if (amd) {
|
|
41
|
-
return requireModule("esri/core/lang");
|
|
42
|
-
}
|
|
43
|
-
const module = await import('@arcgis/core/core/lang.js');
|
|
44
|
-
return module;
|
|
45
|
-
}
|
|
46
|
-
async function importCoreReactiveUtils() {
|
|
47
|
-
if (amd) {
|
|
48
|
-
return requireModule("esri/core/reactiveUtils");
|
|
49
|
-
}
|
|
50
|
-
const module = await import('@arcgis/core/core/reactiveUtils.js');
|
|
51
|
-
return module;
|
|
52
|
-
}
|
|
53
|
-
async function importIntl() {
|
|
54
|
-
if (amd) {
|
|
55
|
-
return requireModule("esri/intl");
|
|
56
|
-
}
|
|
57
|
-
const module = await import('@arcgis/core/intl.js');
|
|
58
|
-
return module;
|
|
59
|
-
}
|
|
60
|
-
async function importSmartMappingStatisticsSummaryStatistics() {
|
|
61
|
-
if (amd) {
|
|
62
|
-
return requireModule("esri/smartMapping/statistics/summaryStatistics");
|
|
63
|
-
}
|
|
64
|
-
const module = await import('@arcgis/core/smartMapping/statistics/summaryStatistics.js');
|
|
65
|
-
return module.default;
|
|
66
|
-
}
|
|
67
|
-
async function importSmartMappingStatisticsUniqueValues() {
|
|
68
|
-
if (amd) {
|
|
69
|
-
return requireModule("esri/smartMapping/statistics/uniqueValues");
|
|
70
|
-
}
|
|
71
|
-
const module = await import('@arcgis/core/smartMapping/statistics/uniqueValues.js');
|
|
72
|
-
return module.default;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { importIntl as a, importCoreReactiveUtils as b, importIdentityIdentityManager as c, importCoreLang as d, importRestSupportQuery as e, importSmartMappingStatisticsSummaryStatistics as f, importSmartMappingStatisticsUniqueValues as g, importConfig as i, newIdentityOAuthInfo as n };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function T(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let i of o)S(e,i.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function E(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function C(e){return f(e,"dir","ltr")}function f(e,t,n){return E(e,`[${t}]`)?.getAttribute(t)??n}var x=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function N(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let s=await o.json();return a.set(r,s),s}if(e==="en"){a.set(r,void 0);return}let i=await N("en",t,n);return a.set(r,i),i}catch{a.set(r,void 0);return}}function R(e){let t=f(e,"lang",navigator?.language||"en");if(x.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:x.has(n)?n:"en"}}var m=new WeakMap,h=new WeakMap,_=new WeakMap;async function F(e,t,n){h.set(e,t),m.set(e,T(e._hostElement,["lang"],()=>{b(e,n);})),await b(e,n);}function U(e){m.get(e)?.disconnect(),m.delete(e),h.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=R(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=_.get(e);if(!o){let i=h.get(e)??"",s=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),u=`${i}/${s}/t9n`,l=`${s}.t9n.`;o=await N(r,u,l);}e._t9nLocale=r,e._t9nStrings=o,await t?.call(e);}
|
|
2
|
-
|
|
3
|
-
export { C, F, U };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
export declare class ArcgisApiKey {
|
|
3
|
-
el: HTMLDivElement;
|
|
4
|
-
apiKey: string;
|
|
5
|
-
apiKeyReady: EventEmitter<boolean>;
|
|
6
|
-
apiKeyWatcher(value: string): void;
|
|
7
|
-
connectedCallback(): Promise<void>;
|
|
8
|
-
private _setApiKey;
|
|
9
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { ArcGISCredential } from "../types";
|
|
3
|
-
export declare class ArcgisIdentity {
|
|
4
|
-
el: HTMLDivElement;
|
|
5
|
-
identity: __esri.IdentityManager;
|
|
6
|
-
appId: string;
|
|
7
|
-
credential?: ArcGISCredential;
|
|
8
|
-
expiration: number;
|
|
9
|
-
locale: string;
|
|
10
|
-
usePopup: boolean;
|
|
11
|
-
popupCallbackUrl: string;
|
|
12
|
-
portalUrl: string;
|
|
13
|
-
preserveUrlHash: boolean;
|
|
14
|
-
private _info;
|
|
15
|
-
identityReady: EventEmitter<{
|
|
16
|
-
identity: __esri.IdentityManager;
|
|
17
|
-
ready: boolean;
|
|
18
|
-
}>;
|
|
19
|
-
credentialCreate: EventEmitter<__esri.IdentityManagerCredentialCreateEvent>;
|
|
20
|
-
dialogCreate: EventEmitter<__esri.IdentityManagerDialogCreateEvent>;
|
|
21
|
-
appIdWatcher(value: string, oldValue: string): void;
|
|
22
|
-
signIn(): Promise<ArcGISCredential>;
|
|
23
|
-
signOut(): Promise<void>;
|
|
24
|
-
connectedCallback(): Promise<void>;
|
|
25
|
-
private _addWatchers;
|
|
26
|
-
private _checkCurrentStatus;
|
|
27
|
-
private _createOAuthInfo;
|
|
28
|
-
private _fetchCredential;
|
|
29
|
-
private _registerOAuth;
|
|
30
|
-
private _proxyEvents;
|
|
31
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exported @arcgis/core types for Stencil.
|
|
3
|
-
* This is to avoid the __esri namespace types
|
|
4
|
-
* and satisfy the Stencil typing requirements
|
|
5
|
-
* for builds.
|
|
6
|
-
*/
|
|
7
|
-
import type OAuthInfo from "@arcgis/core/identity/OAuthInfo";
|
|
8
|
-
import type Credential from "@arcgis/core/identity/Credential";
|
|
9
|
-
export type ArcGISOAuthInfo = InstanceType<typeof OAuthInfo>;
|
|
10
|
-
export type ArcGISCredential = InstanceType<typeof Credential>;
|