@arcgis/common-components 4.29.0-beta.4 → 4.29.0-beta.41
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/README.md +1 -1
- package/dist/arcgis-common-components/arcgis-common-components.esm.js +1 -1
- package/dist/arcgis-common-components/p-2a7fe37a.js +2 -0
- package/dist/arcgis-common-components/{p-84fccaad.entry.js → p-50b351b8.entry.js} +1 -1
- package/dist/arcgis-common-components/p-a39b4556.entry.js +1 -0
- package/dist/cjs/arcgis-api-key.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-common-components.cjs.js +3 -3
- package/dist/cjs/arcgis-identity.cjs.entry.js +4 -4
- package/dist/cjs/{index-e8c59179.js → index-693a0aa8.js} +207 -39
- package/dist/cjs/loader.cjs.js +3 -12
- package/dist/components/arcgis-api-key.js +5 -3
- package/dist/components/arcgis-identity.js +5 -3
- package/dist/components/index.d.ts +5 -4
- package/dist/components/index.js +1 -3
- package/dist/esm/arcgis-api-key.entry.js +4 -4
- package/dist/esm/arcgis-common-components.js +4 -4
- package/dist/esm/arcgis-identity.entry.js +4 -4
- package/dist/esm/{index-1f7e8e45.js → index-00709df9.js} +207 -39
- package/dist/esm/loader.js +4 -13
- package/dist/loader/index.d.ts +2 -2
- package/dist/types/components.d.ts +25 -0
- package/dist/types/stencil-public-runtime.d.ts +53 -17
- package/package.json +24 -26
- package/dist/arcgis-common-components/p-3768a3bb.entry.js +0 -1
- package/dist/arcgis-common-components/p-b0c98bba.js +0 -2
- package/dist/esm/polyfills/css-shim.js +0 -1
- /package/dist/arcgis-common-components/{p-9625972e.js → p-b4629d3e.js} +0 -0
- /package/dist/cjs/{index-f1a937af.js → index-f93ca465.js} +0 -0
- /package/dist/esm/{index-71b437b1.js → index-6dce2d84.js} +0 -0
- /package/dist/types/components/{arcgis-api-key/arcgis-api-key.d.ts → api-key/api-key.d.ts} +0 -0
- /package/dist/types/components/{arcgis-identity/arcgis-identity.d.ts → identity/identity.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -14,4 +14,4 @@ See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
|
|
|
14
14
|
|
|
15
15
|
For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
|
|
16
16
|
|
|
17
|
-
email: contracts@esri.com
|
|
17
|
+
email: contracts@esri.com
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p,b as a}from"./p-
|
|
1
|
+
import{p,b as a}from"./p-2a7fe37a.js";export{s as setNonce}from"./p-2a7fe37a.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),p(e)})().then((p=>a([["p-a39b4556",[[0,"arcgis-api-key",{apiKey:[1,"api-key"]},null,{apiKey:["apiKeyWatcher"]}]]],["p-50b351b8",[[0,"arcgis-identity",{identity:[1040],appId:[1,"app-id"],credential:[1040],expiration:[1026],locale:[1],usePopup:[4,"use-popup"],popupCallbackUrl:[1,"popup-callback-url"],portalUrl:[1,"portal-url"],preserveUrlHash:[4,"preserve-url-hash"],signIn:[64],signOut:[64]},null,{appId:["appIdWatcher"]}]]]],p)));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e=!1;function t(e){var t,n,o;return null!==(o=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==o?o:void 0}const n=e=>g(e).$hostElement$,o=(e,t,o)=>{const i=n(e);return{emit:e=>s(i,t,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:e})}},s=(e,t,n)=>{const o=T.ce(t,n);return e.dispatchEvent(o),o},i=new WeakMap,c=e=>"sc-"+e.t,l=(e,t)=>{t&&!e.o&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.o=t)))},r=(e,t)=>{if(e.i|=16,!(4&e.i))return l(e,e.l),H((()=>a(e,t)));e.i|=512},a=(e,t)=>{const n=e.u;return u(void 0,(()=>d(e,n,t)))},u=(e,t)=>f(e)?e.then(t):t(),f=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,d=async(e,n,o)=>{var s;const l=e.$hostElement$,r=l["s-rc"];o&&(e=>{const n=e.m;((e,n)=>{var o;const s=c(n),l=P.get(s);if(e=11===e.nodeType?e:N,l)if("string"==typeof l){let n,c=i.get(e=e.head||e);if(c||i.set(e,c=new Set),!c.has(s)){{n=N.createElement("style"),n.innerHTML=l;const s=null!==(o=T.h)&&void 0!==o?o:t(N);null!=s&&n.setAttribute("nonce",s),e.insertBefore(n,e.querySelector("link"))}c&&c.add(s)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l])})(e.$hostElement$.getRootNode(),n)})(e);m(e,n),r&&(r.map((e=>e())),l["s-rc"]=void 0);{const t=null!==(s=l["s-p"])&&void 0!==s?s:[],n=()=>h(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},m=(e,t)=>{try{t=t.render&&t.render(),e.i&=-17,e.i|=2}catch(t){k(t,e.$hostElement$)}return null},h=e=>{const t=e.$hostElement$,n=e.l;64&e.i||(e.i|=64,y(t),e.v(t),n||v()),e.p(t),e.o&&(e.o(),e.o=void 0),512&e.i&&q((()=>r(e,!1))),e.i&=-517},v=()=>{y(N.documentElement),q((()=>s(E,"appload",{detail:{namespace:"arcgis-common-components"}})))},y=e=>e.setAttribute("hydrated",""),p=(e,t,n)=>{var o;if(t.$){e.watchers&&(t.S=e.watchers);const s=Object.entries(t.$),i=e.prototype;if(s.map((([e,[o]])=>{31&o||2&n&&32&o?Object.defineProperty(i,e,{get(){return((e,t)=>g(this).j.get(t))(0,e)},set(n){((e,t,n,o)=>{const s=g(e),i=s.$hostElement$,c=s.j.get(t),l=s.i,a=s.u;if(n=((e,t)=>null==e||(e=>"object"==(e=typeof e)||"function"===e)(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,o.$[t][0]),(!(8&l)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.j.set(t,n),a)){if(o.S&&128&l){const e=o.S[t];e&&e.map((e=>{try{a[e](n,c,t)}catch(e){k(e,i)}}))}2==(18&l)&&r(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&o&&Object.defineProperty(i,e,{value(...t){const n=g(this);return n.M.then((()=>n.u[e](...t)))}})})),1&n){const n=new Map;i.attributeChangedCallback=function(e,o,s){T.jmp((()=>{const c=n.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const n=g(this),i=null==n?void 0:n.i;if(!(8&i)&&128&i&&s!==o){const i=n.u,c=t.S[e];null==c||c.forEach((t=>{null!=i[t]&&i[t].call(i,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(o=t.S)&&void 0!==o?o:{}),...s.filter((([e,t])=>15&t[0])).map((([e,t])=>{const o=t[1]||e;return n.set(o,e),o}))]))}}return e},b=e=>{((e,t)=>{if(e&&e[t])try{return e[t](void 0)}catch(e){k(e)}})(e,"connectedCallback")},w=(e,n={})=>{var o;const s=[],i=n.exclude||[],a=E.customElements,u=N.head,f=u.querySelector("meta[charset]"),d=N.createElement("style"),m=[];let h,y=!0;Object.assign(T,n),T.k=new URL(n.resourcesUrl||"./",N.baseURI).href,e.map((e=>{e[1].map((t=>{var n;const o={i:t[0],t:t[1],$:t[2],C:t[3]};o.$=t[2],o.S=null!==(n=t[4])&&void 0!==n?n:{};const u=o.t,f=class extends HTMLElement{constructor(e){super(e),M(e=this,o)}connectedCallback(){h&&(clearTimeout(h),h=null),y?m.push(this):T.jmp((()=>(e=>{if(0==(1&T.i)){const t=g(e),n=t.m,o=()=>{};if(1&t.i)(null==t?void 0:t.u)?b(t.u):(null==t?void 0:t.O)&&t.O.then((()=>b(t.u)));else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){l(t,t.l=n);break}}n.$&&Object.entries(n.$).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(0==(32&t.i)){t.i|=32;{if(o=O(n),o.then){const e=()=>{};o=await o,e()}o.isProxied||(n.S=o.watchers,p(o,n,2),o.isProxied=!0);const e=()=>{};t.i|=8;try{new o(t)}catch(e){k(e)}t.i&=-9,t.i|=128,e(),b(t.u)}if(o.style){let e=o.style;const t=c(n);if(!P.has(t)){const o=()=>{};((e,t,n)=>{let o=P.get(e);A&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,P.set(e,o)})(t,e,!!(1&n.i)),o()}}}const s=t.l,i=()=>r(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}o()}})(this)))}disconnectedCallback(){T.jmp((()=>(async()=>{if(0==(1&T.i)){const e=g(this);(null==e?void 0:e.u)||(null==e?void 0:e.O)&&e.O.then((()=>{}))}})()))}componentOnReady(){return g(this).O}};o.P=e[0],i.includes(u)||a.get(u)||(s.push(u),a.define(u,p(f,o,1)))}))}));{d.innerHTML=s+"{visibility:hidden}[hydrated]{visibility:inherit}",d.setAttribute("data-styles","");const e=null!==(o=T.h)&&void 0!==o?o:t(N);null!=e&&d.setAttribute("nonce",e),u.insertBefore(d,f?f.nextSibling:u.firstChild)}y=!1,m.length?m.map((e=>e.connectedCallback())):T.jmp((()=>h=setTimeout(v,30)))},$=e=>T.h=e,S=new WeakMap,g=e=>S.get(e),j=(e,t)=>S.set(t.u=e,t),M=(e,t)=>{const n={i:0,$hostElement$:e,m:t,j:new Map};return n.M=new Promise((e=>n.p=e)),n.O=new Promise((e=>n.v=e)),e["s-p"]=[],e["s-rc"]=[],S.set(e,n)},k=(e,t)=>(0,console.error)(e,t),C=new Map,O=e=>{const t=e.t.replace(/-/g,"_"),n=e.P,o=C.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(C.set(n,e),e[t])),k)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},P=new Map,E="undefined"!=typeof window?window:{},N=E.document||{head:{}},T={i:0,k:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},x=e=>Promise.resolve(e),A=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),F=[],L=[],R=(t,n)=>o=>{t.push(o),e||(e=!0,n&&4&T.i?q(W):T.raf(W))},U=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){k(e)}e.length=0},W=()=>{U(F),U(L),(e=F.length>0)&&T.raf(W)},q=e=>x().then(e),H=R(L,!0);export{w as b,o as c,n as g,x as p,j as r,$ as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,g as s}from"./p-
|
|
1
|
+
import{r as t,c as i,g as s}from"./p-2a7fe37a.js";import{a as h,n as a,b as e}from"./p-b4629d3e.js";const r=class{constructor(s){t(this,s),this.identityReady=i(this,"identityReady",7),this.credentialCreate=i(this,"credentialCreate",7),this.dialogCreate=i(this,"dialogCreate",7),this.identity=void 0,this.appId=void 0,this.credential=void 0,this.expiration=void 0,this.locale=void 0,this.usePopup=!1,this.popupCallbackUrl=void 0,this.portalUrl=void 0,this.preserveUrlHash=!1}appIdWatcher(t,i){i!==t&&this._registerOAuth()}async signIn(){if(!this.credential)try{this.credential=await this._checkCurrentStatus()}catch(t){this.credential=await this._fetchCredential()}return this.credential}async signOut(){if(!this.credential)try{this.identity.destroyCredentials()}catch(t){this.credential=void 0}this.credential=void 0}async connectedCallback(){this.appId&&await this._registerOAuth(),this._proxyEvents(),await this._addWatchers(),this.identityReady.emit({identity:this.identity,ready:!0})}async _addWatchers(){const{watch:t}=await h();t((()=>this._info.expiration),(t=>this.expiration=t),{initial:!0})}_checkCurrentStatus(){return this.identity.checkSignInStatus(`${this._info.portalUrl}/sharing`)}async _createOAuthInfo(){const t={};void 0!==this.appId&&(t.appId=this.appId),void 0!==this.locale&&(t.locale=this.locale),void 0!==this.popupCallbackUrl&&(t.popupCallbackUrl=this.popupCallbackUrl),void 0!==this.preserveUrlHash&&(t.preserveUrlHash=this.preserveUrlHash),void 0!==this.usePopup&&(t.popup=this.usePopup),void 0!==this.portalUrl&&(t.portalUrl=this.portalUrl);const i=await a(t);return this._info=i,i}async _fetchCredential(){return await this.identity.getCredential(`${this._info?.portalUrl}/sharing`,{error:null,oAuthPopupConfirmation:!1,token:null})}async _registerOAuth(){this.identity=await e();const t=await this._createOAuthInfo();this.identity.registerOAuthInfos([t])}_proxyEvents(){this.identity.on("credential-create",(t=>this.credentialCreate.emit(t))),this.identity.on("dialog-create",(t=>this.dialogCreate.emit(t)))}get el(){return s(this)}static get watchers(){return{appId:["appIdWatcher"]}}};r.style=":host{display:none}arcgis-identity{display:none}";export{r as arcgis_identity}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,c as s,g as t}from"./p-2a7fe37a.js";import{i}from"./p-b4629d3e.js";const e=class{constructor(t){a(this,t),this.apiKeyReady=s(this,"apiKeyReady",7),this.apiKey=void 0}apiKeyWatcher(a){this._setApiKey(a)}async connectedCallback(){this.apiKey&&await this._setApiKey(this.apiKey)}async _setApiKey(a){(await i()).apiKey=a,this.apiKeyReady.emit(!0)}get el(){return t(this)}static get watchers(){return{apiKey:["apiKeyWatcher"]}}};e.style=":host{display:none}arcgis-api-key{display:none}";export{e as arcgis_api_key}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
5
|
+
const index = require('./index-693a0aa8.js');
|
|
6
|
+
const index$1 = require('./index-f93ca465.js');
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const apiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
|
|
9
9
|
|
|
10
10
|
const ArcgisApiKey = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -46,6 +46,6 @@ const ArcgisApiKey = class {
|
|
|
46
46
|
"apiKey": ["apiKeyWatcher"]
|
|
47
47
|
}; }
|
|
48
48
|
};
|
|
49
|
-
ArcgisApiKey.style =
|
|
49
|
+
ArcgisApiKey.style = apiKeyCss;
|
|
50
50
|
|
|
51
51
|
exports.arcgis_api_key = ArcgisApiKey;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-693a0aa8.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser
|
|
8
|
+
Stencil Client Patch Browser v4.7.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchBrowser = () => {
|
|
11
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('arcgis-common-components.cjs.js', document.baseURI).href));
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["arcgis-api-key.cjs",[[0,"arcgis-api-key",{"apiKey":[1,"api-key"]}]]],["arcgis-identity.cjs",[[0,"arcgis-identity",{"identity":[1040],"appId":[1,"app-id"],"credential":[1040],"expiration":[1026],"locale":[1],"usePopup":[4,"use-popup"],"popupCallbackUrl":[1,"popup-callback-url"],"portalUrl":[1,"portal-url"],"preserveUrlHash":[4,"preserve-url-hash"],"signIn":[64],"signOut":[64]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["arcgis-api-key.cjs",[[0,"arcgis-api-key",{"apiKey":[1,"api-key"]},null,{"apiKey":["apiKeyWatcher"]}]]],["arcgis-identity.cjs",[[0,"arcgis-identity",{"identity":[1040],"appId":[1,"app-id"],"credential":[1040],"expiration":[1026],"locale":[1],"usePopup":[4,"use-popup"],"popupCallbackUrl":[1,"popup-callback-url"],"portalUrl":[1,"portal-url"],"preserveUrlHash":[4,"preserve-url-hash"],"signIn":[64],"signOut":[64]},null,{"appId":["appIdWatcher"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
5
|
+
const index = require('./index-693a0aa8.js');
|
|
6
|
+
const index$1 = require('./index-f93ca465.js');
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const identityCss = ":host{display:none}arcgis-identity{display:none}";
|
|
9
9
|
|
|
10
10
|
const ArcgisIdentity = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -134,6 +134,6 @@ const ArcgisIdentity = class {
|
|
|
134
134
|
"appId": ["appIdWatcher"]
|
|
135
135
|
}; }
|
|
136
136
|
};
|
|
137
|
-
ArcgisIdentity.style =
|
|
137
|
+
ArcgisIdentity.style = identityCss;
|
|
138
138
|
|
|
139
139
|
exports.arcgis_identity = ArcgisIdentity;
|
|
@@ -46,6 +46,13 @@ const uniqueTime = (key, measureText) => {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
|
|
49
|
+
/**
|
|
50
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
51
|
+
* function.
|
|
52
|
+
*
|
|
53
|
+
* @param o the value to check
|
|
54
|
+
* @returns whether it's a complex type or not
|
|
55
|
+
*/
|
|
49
56
|
const isComplexType = (o) => {
|
|
50
57
|
// https://jsperf.com/typeof-fn-object/5
|
|
51
58
|
o = typeof o;
|
|
@@ -153,9 +160,9 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
153
160
|
}
|
|
154
161
|
styles.set(scopeId, style);
|
|
155
162
|
};
|
|
156
|
-
const addStyle = (styleContainerNode, cmpMeta, mode
|
|
163
|
+
const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
157
164
|
var _a;
|
|
158
|
-
|
|
165
|
+
const scopeId = getScopeId(cmpMeta);
|
|
159
166
|
const style = styles.get(scopeId);
|
|
160
167
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
161
168
|
// so the fallback is to always use the document for the root node in those cases
|
|
@@ -170,10 +177,8 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
170
177
|
}
|
|
171
178
|
if (!appliedStyles.has(scopeId)) {
|
|
172
179
|
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
styleElm.innerHTML = style;
|
|
176
|
-
}
|
|
180
|
+
styleElm = doc.createElement('style');
|
|
181
|
+
styleElm.innerHTML = style;
|
|
177
182
|
// Apply CSP nonce to the style tag if it exists
|
|
178
183
|
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
179
184
|
if (nonce != null) {
|
|
@@ -220,15 +225,76 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
220
225
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
221
226
|
return writeTask(dispatch) ;
|
|
222
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Dispatch initial-render and update lifecycle hooks, enqueuing calls to
|
|
230
|
+
* component lifecycle methods like `componentWillLoad` as well as
|
|
231
|
+
* {@link updateComponent}, which will kick off the virtual DOM re-render.
|
|
232
|
+
*
|
|
233
|
+
* @param hostRef a reference to a host DOM node
|
|
234
|
+
* @param isInitialLoad whether we're on the initial load or not
|
|
235
|
+
* @returns an empty Promise which is used to enqueue a series of operations for
|
|
236
|
+
* the component
|
|
237
|
+
*/
|
|
223
238
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
224
239
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
225
240
|
const instance = hostRef.$lazyInstance$ ;
|
|
226
|
-
|
|
241
|
+
// We're going to use this variable together with `enqueue` to implement a
|
|
242
|
+
// little promise-based queue. We start out with it `undefined`. When we add
|
|
243
|
+
// the first function to the queue we'll set this variable to be that
|
|
244
|
+
// function's return value. When we attempt to add subsequent values to the
|
|
245
|
+
// queue we'll check that value and, if it was a `Promise`, we'll then chain
|
|
246
|
+
// the new function off of that `Promise` using `.then()`. This will give our
|
|
247
|
+
// queue two nice properties:
|
|
248
|
+
//
|
|
249
|
+
// 1. If all functions added to the queue are synchronous they'll be called
|
|
250
|
+
// synchronously right away.
|
|
251
|
+
// 2. If all functions added to the queue are asynchronous they'll all be
|
|
252
|
+
// called in order after `dispatchHooks` exits.
|
|
253
|
+
let maybePromise;
|
|
227
254
|
endSchedule();
|
|
228
|
-
return
|
|
255
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
229
256
|
};
|
|
257
|
+
/**
|
|
258
|
+
* This function uses a Promise to implement a simple first-in, first-out queue
|
|
259
|
+
* of functions to be called.
|
|
260
|
+
*
|
|
261
|
+
* The queue is ordered on the basis of the first argument. If it's
|
|
262
|
+
* `undefined`, then nothing is on the queue yet, so the provided function can
|
|
263
|
+
* be called synchronously (although note that this function may return a
|
|
264
|
+
* `Promise`). The idea is that then the return value of that enqueueing
|
|
265
|
+
* operation is kept around, so that if it was a `Promise` then subsequent
|
|
266
|
+
* functions can be enqueued by calling this function again with that `Promise`
|
|
267
|
+
* as the first argument.
|
|
268
|
+
*
|
|
269
|
+
* @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
|
|
270
|
+
* @param fn a function to enqueue
|
|
271
|
+
* @returns either a `Promise` or the return value of the provided function
|
|
272
|
+
*/
|
|
273
|
+
const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn) : fn();
|
|
274
|
+
/**
|
|
275
|
+
* Check that a value is a `Promise`. To check, we first see if the value is an
|
|
276
|
+
* instance of the `Promise` global. In a few circumstances, in particular if
|
|
277
|
+
* the global has been overwritten, this is could be misleading, so we also do
|
|
278
|
+
* a little 'duck typing' check to see if the `.then` property of the value is
|
|
279
|
+
* defined and a function.
|
|
280
|
+
*
|
|
281
|
+
* @param maybePromise it might be a promise!
|
|
282
|
+
* @returns whether it is or not
|
|
283
|
+
*/
|
|
284
|
+
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
|
285
|
+
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
|
286
|
+
/**
|
|
287
|
+
* Update a component given reference to its host elements and so on.
|
|
288
|
+
*
|
|
289
|
+
* @param hostRef an object containing references to the element's host node,
|
|
290
|
+
* VDom nodes, and other metadata
|
|
291
|
+
* @param instance a reference to the underlying host element where it will be
|
|
292
|
+
* rendered
|
|
293
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
294
|
+
* the first render cycle
|
|
295
|
+
*/
|
|
230
296
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
231
|
-
|
|
297
|
+
var _a;
|
|
232
298
|
const elm = hostRef.$hostElement$;
|
|
233
299
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
234
300
|
const rc = elm['s-rc'];
|
|
@@ -250,7 +316,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
250
316
|
endRender();
|
|
251
317
|
endUpdate();
|
|
252
318
|
{
|
|
253
|
-
const childrenPromises = elm['s-p'];
|
|
319
|
+
const childrenPromises = (_a = elm['s-p']) !== null && _a !== void 0 ? _a : [];
|
|
254
320
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
255
321
|
if (childrenPromises.length === 0) {
|
|
256
322
|
postUpdate();
|
|
@@ -262,8 +328,24 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
262
328
|
}
|
|
263
329
|
}
|
|
264
330
|
};
|
|
265
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Handle making the call to the VDom renderer with the proper context given
|
|
333
|
+
* various build variables
|
|
334
|
+
*
|
|
335
|
+
* @param hostRef an object containing references to the element's host node,
|
|
336
|
+
* VDom nodes, and other metadata
|
|
337
|
+
* @param instance a reference to the underlying host element where it will be
|
|
338
|
+
* rendered
|
|
339
|
+
* @param elm the Host element for the component
|
|
340
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
341
|
+
* @returns an empty promise
|
|
342
|
+
*/
|
|
343
|
+
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
266
344
|
try {
|
|
345
|
+
/**
|
|
346
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
347
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
348
|
+
*/
|
|
267
349
|
instance = instance.render && instance.render();
|
|
268
350
|
{
|
|
269
351
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -326,6 +408,16 @@ const appDidLoad = (who) => {
|
|
|
326
408
|
}
|
|
327
409
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
328
410
|
};
|
|
411
|
+
/**
|
|
412
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
413
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
414
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
415
|
+
* output bundle and this function returns `undefined`.
|
|
416
|
+
* @param instance any object that may or may not contain methods
|
|
417
|
+
* @param method method name
|
|
418
|
+
* @param arg single arbitrary argument
|
|
419
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
420
|
+
*/
|
|
329
421
|
const safeCall = (instance, method, arg) => {
|
|
330
422
|
if (instance && instance[method]) {
|
|
331
423
|
try {
|
|
@@ -337,9 +429,6 @@ const safeCall = (instance, method, arg) => {
|
|
|
337
429
|
}
|
|
338
430
|
return undefined;
|
|
339
431
|
};
|
|
340
|
-
const then = (promise, thenFn) => {
|
|
341
|
-
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
342
|
-
};
|
|
343
432
|
const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
|
|
344
433
|
;
|
|
345
434
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
@@ -396,6 +485,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
396
485
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
397
486
|
*/
|
|
398
487
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
488
|
+
var _a;
|
|
399
489
|
if (cmpMeta.$members$) {
|
|
400
490
|
if (Cstr.watchers) {
|
|
401
491
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
@@ -433,7 +523,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
433
523
|
});
|
|
434
524
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
435
525
|
const attrNameToPropName = new Map();
|
|
436
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
526
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
437
527
|
plt.jmp(() => {
|
|
438
528
|
const propName = attrNameToPropName.get(attrName);
|
|
439
529
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -456,12 +546,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
456
546
|
// customElements.define('my-component', MyComponent);
|
|
457
547
|
// </script>
|
|
458
548
|
// ```
|
|
459
|
-
// In this case if we do not
|
|
549
|
+
// In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
|
|
460
550
|
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
461
551
|
// to the value that was set inline i.e. "some-value" from above example. When
|
|
462
|
-
// the connectedCallback attempts to
|
|
552
|
+
// the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
|
|
463
553
|
//
|
|
464
|
-
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/
|
|
554
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
|
|
465
555
|
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
466
556
|
//
|
|
467
557
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
@@ -481,28 +571,67 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
481
571
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
482
572
|
return;
|
|
483
573
|
}
|
|
574
|
+
else if (propName == null) {
|
|
575
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
576
|
+
// on a vanilla web component
|
|
577
|
+
const hostRef = getHostRef(this);
|
|
578
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
579
|
+
// We only want to trigger the callback(s) if:
|
|
580
|
+
// 1. The instance is ready
|
|
581
|
+
// 2. The watchers are ready
|
|
582
|
+
// 3. The value has changed
|
|
583
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
584
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
585
|
+
newValue !== oldValue) {
|
|
586
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
587
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
588
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
589
|
+
if (instance[callbackName] != null) {
|
|
590
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
484
596
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
485
597
|
});
|
|
486
598
|
};
|
|
487
|
-
//
|
|
488
|
-
//
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
599
|
+
// Create an array of attributes to observe
|
|
600
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
601
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
602
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
603
|
+
// an invalid attribute.
|
|
604
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
605
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
606
|
+
...members
|
|
607
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
608
|
+
.map(([propName, m]) => {
|
|
609
|
+
const attrName = m[1] || propName;
|
|
610
|
+
attrNameToPropName.set(attrName, propName);
|
|
611
|
+
return attrName;
|
|
612
|
+
}),
|
|
613
|
+
]));
|
|
496
614
|
}
|
|
497
615
|
}
|
|
498
616
|
return Cstr;
|
|
499
617
|
};
|
|
500
|
-
|
|
618
|
+
/**
|
|
619
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
620
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
621
|
+
* and (optionally) an HMR version ID.
|
|
622
|
+
*
|
|
623
|
+
* @param elm a host element
|
|
624
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
625
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
626
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
627
|
+
*/
|
|
628
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
629
|
+
let Cstr;
|
|
501
630
|
// initializeComponent
|
|
502
631
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
632
|
+
// Let the runtime know that the component has been initialized
|
|
633
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
503
634
|
{
|
|
504
|
-
// we haven't initialized this element yet
|
|
505
|
-
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
506
635
|
// lazy loaded components
|
|
507
636
|
// request the component's implementation to be
|
|
508
637
|
// wired up with the host element
|
|
@@ -621,14 +750,25 @@ const connectedCallback = (elm) => {
|
|
|
621
750
|
}
|
|
622
751
|
else {
|
|
623
752
|
// fire off connectedCallback() on component instance
|
|
624
|
-
|
|
753
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
|
|
754
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
755
|
+
}
|
|
756
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
757
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
758
|
+
}
|
|
625
759
|
}
|
|
626
760
|
endConnected();
|
|
627
761
|
}
|
|
628
762
|
};
|
|
629
|
-
const
|
|
763
|
+
const disconnectInstance = (instance) => {
|
|
764
|
+
};
|
|
765
|
+
const disconnectedCallback = async (elm) => {
|
|
630
766
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
631
|
-
getHostRef(elm);
|
|
767
|
+
const hostRef = getHostRef(elm);
|
|
768
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
|
|
769
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
770
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
771
|
+
}
|
|
632
772
|
}
|
|
633
773
|
};
|
|
634
774
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -647,6 +787,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
647
787
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
648
788
|
lazyBundles.map((lazyBundle) => {
|
|
649
789
|
lazyBundle[1].map((compactMeta) => {
|
|
790
|
+
var _a;
|
|
650
791
|
const cmpMeta = {
|
|
651
792
|
$flags$: compactMeta[0],
|
|
652
793
|
$tagName$: compactMeta[1],
|
|
@@ -657,7 +798,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
657
798
|
cmpMeta.$members$ = compactMeta[2];
|
|
658
799
|
}
|
|
659
800
|
{
|
|
660
|
-
cmpMeta.$watchers$ = {};
|
|
801
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
661
802
|
}
|
|
662
803
|
const tagName = cmpMeta.$tagName$;
|
|
663
804
|
const HostElement = class extends HTMLElement {
|
|
@@ -725,13 +866,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
725
866
|
* @returns void
|
|
726
867
|
*/
|
|
727
868
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
869
|
+
/**
|
|
870
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
871
|
+
* instances.
|
|
872
|
+
*/
|
|
728
873
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
874
|
+
/**
|
|
875
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
876
|
+
*
|
|
877
|
+
* @param ref the runtime ref of interest
|
|
878
|
+
* @returns the Host reference (if found) or undefined
|
|
879
|
+
*/
|
|
729
880
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
881
|
+
/**
|
|
882
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
883
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
884
|
+
*
|
|
885
|
+
* @param lazyInstance the lazy instance of interest
|
|
886
|
+
* @param hostRef that instances `HostRef` object
|
|
887
|
+
* @returns a reference to the host ref WeakMap
|
|
888
|
+
*/
|
|
730
889
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
731
|
-
|
|
890
|
+
/**
|
|
891
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
892
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
893
|
+
* metadata.
|
|
894
|
+
*
|
|
895
|
+
* @param hostElement the host element to register
|
|
896
|
+
* @param cmpMeta runtime metadata for that component
|
|
897
|
+
* @returns a reference to the host ref WeakMap
|
|
898
|
+
*/
|
|
899
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
732
900
|
const hostRef = {
|
|
733
901
|
$flags$: 0,
|
|
734
|
-
$hostElement$:
|
|
902
|
+
$hostElement$: hostElement,
|
|
735
903
|
$cmpMeta$: cmpMeta,
|
|
736
904
|
$instanceValues$: new Map(),
|
|
737
905
|
};
|
|
@@ -740,10 +908,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
740
908
|
}
|
|
741
909
|
{
|
|
742
910
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
743
|
-
|
|
744
|
-
|
|
911
|
+
hostElement['s-p'] = [];
|
|
912
|
+
hostElement['s-rc'] = [];
|
|
745
913
|
}
|
|
746
|
-
return hostRefs.set(
|
|
914
|
+
return hostRefs.set(hostElement, hostRef);
|
|
747
915
|
};
|
|
748
916
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
749
917
|
const cmpModules = /*@__PURE__*/ new Map();
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,20 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
9
|
-
*/
|
|
10
|
-
const patchEsm = () => {
|
|
11
|
-
return index.promiseResolve();
|
|
12
|
-
};
|
|
5
|
+
const index = require('./index-693a0aa8.js');
|
|
13
6
|
|
|
14
7
|
const defineCustomElements = (win, options) => {
|
|
15
|
-
if (typeof window === 'undefined') return
|
|
16
|
-
return
|
|
17
|
-
return index.bootstrapLazy([["arcgis-api-key.cjs",[[0,"arcgis-api-key",{"apiKey":[1,"api-key"]}]]],["arcgis-identity.cjs",[[0,"arcgis-identity",{"identity":[1040],"appId":[1,"app-id"],"credential":[1040],"expiration":[1026],"locale":[1],"usePopup":[4,"use-popup"],"popupCallbackUrl":[1,"popup-callback-url"],"portalUrl":[1,"portal-url"],"preserveUrlHash":[4,"preserve-url-hash"],"signIn":[64],"signOut":[64]}]]]], options);
|
|
18
|
-
});
|
|
8
|
+
if (typeof window === 'undefined') return undefined;
|
|
9
|
+
return index.bootstrapLazy([["arcgis-api-key.cjs",[[0,"arcgis-api-key",{"apiKey":[1,"api-key"]},null,{"apiKey":["apiKeyWatcher"]}]]],["arcgis-identity.cjs",[[0,"arcgis-identity",{"identity":[1040],"appId":[1,"app-id"],"credential":[1040],"expiration":[1026],"locale":[1],"usePopup":[4,"use-popup"],"popupCallbackUrl":[1,"popup-callback-url"],"portalUrl":[1,"portal-url"],"preserveUrlHash":[4,"preserve-url-hash"],"signIn":[64],"signOut":[64]},null,{"appId":["appIdWatcher"]}]]]], options);
|
|
19
10
|
};
|
|
20
11
|
|
|
21
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import { i as importConfig } from './index2.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const apiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
|
|
5
5
|
|
|
6
|
-
const ArcgisApiKey$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
const ArcgisApiKey$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisApiKey extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
@@ -42,9 +42,11 @@ const ArcgisApiKey$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
42
42
|
static get watchers() { return {
|
|
43
43
|
"apiKey": ["apiKeyWatcher"]
|
|
44
44
|
}; }
|
|
45
|
-
static get style() { return
|
|
45
|
+
static get style() { return apiKeyCss; }
|
|
46
46
|
}, [0, "arcgis-api-key", {
|
|
47
47
|
"apiKey": [1, "api-key"]
|
|
48
|
+
}, undefined, {
|
|
49
|
+
"apiKey": ["apiKeyWatcher"]
|
|
48
50
|
}]);
|
|
49
51
|
function defineCustomElement$1() {
|
|
50
52
|
if (typeof customElements === "undefined") {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import { a as importCoreReactiveUtils, n as newIdentityOAuthInfo, b as importIdentityIdentityManager } from './index2.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const identityCss = ":host{display:none}arcgis-identity{display:none}";
|
|
5
5
|
|
|
6
|
-
const ArcgisIdentity$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
const ArcgisIdentity$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisIdentity extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
@@ -130,7 +130,7 @@ const ArcgisIdentity$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
130
130
|
static get watchers() { return {
|
|
131
131
|
"appId": ["appIdWatcher"]
|
|
132
132
|
}; }
|
|
133
|
-
static get style() { return
|
|
133
|
+
static get style() { return identityCss; }
|
|
134
134
|
}, [0, "arcgis-identity", {
|
|
135
135
|
"identity": [1040],
|
|
136
136
|
"appId": [1, "app-id"],
|
|
@@ -143,6 +143,8 @@ const ArcgisIdentity$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
143
143
|
"preserveUrlHash": [4, "preserve-url-hash"],
|
|
144
144
|
"signIn": [64],
|
|
145
145
|
"signOut": [64]
|
|
146
|
+
}, undefined, {
|
|
147
|
+
"appId": ["appIdWatcher"]
|
|
146
148
|
}]);
|
|
147
149
|
function defineCustomElement$1() {
|
|
148
150
|
if (typeof customElements === "undefined") {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Used to manually set the base path where assets can be found.
|
|
@@ -29,4 +31,3 @@ export interface SetPlatformOptions {
|
|
|
29
31
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
30
32
|
}
|
|
31
33
|
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
32
|
-
export * from '../types';
|
package/dist/components/index.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
-
export { ArcgisApiKey, defineCustomElement as defineCustomElementArcgisApiKey } from './arcgis-api-key.js';
|
|
3
|
-
export { ArcgisIdentity, defineCustomElement as defineCustomElementArcgisIdentity } from './arcgis-identity.js';
|
|
1
|
+
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement } from './index-
|
|
2
|
-
import { i as importConfig } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement } from './index-00709df9.js';
|
|
2
|
+
import { i as importConfig } from './index-6dce2d84.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const apiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
|
|
5
5
|
|
|
6
6
|
const ArcgisApiKey = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -42,6 +42,6 @@ const ArcgisApiKey = class {
|
|
|
42
42
|
"apiKey": ["apiKeyWatcher"]
|
|
43
43
|
}; }
|
|
44
44
|
};
|
|
45
|
-
ArcgisApiKey.style =
|
|
45
|
+
ArcgisApiKey.style = apiKeyCss;
|
|
46
46
|
|
|
47
47
|
export { ArcgisApiKey as arcgis_api_key };
|