@arcgis/common-components 4.28.0-beta.4 → 4.28.0-beta.40

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/LICENSE.md CHANGED
@@ -1,13 +1,13 @@
1
- # Licensing
2
-
3
- COPYRIGHT © 2023 Esri
4
-
5
- All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
6
-
7
- This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
8
-
9
- See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
10
-
11
- For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
12
-
13
- email: contracts@esri.com
1
+ # Licensing
2
+
3
+ COPYRIGHT © 2023 Esri
4
+
5
+ All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
6
+
7
+ This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
8
+
9
+ See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
10
+
11
+ For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
12
+
13
+ email: contracts@esri.com
package/README.md CHANGED
@@ -1,17 +1,17 @@
1
- # @arcgis/common-components (beta)
2
-
3
- This Web Component package is part of the [ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript) and is under active development. At this time, customer support is **not** provided. More news to come.
4
-
5
- ## License
6
-
7
- COPYRIGHT © 2023 Esri
8
-
9
- All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
10
-
11
- This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
12
-
13
- See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
14
-
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
-
1
+ # @arcgis/common-components (beta)
2
+
3
+ This Web Component package is part of the [ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript) and is under active development. At this time, customer support is **not** provided. More news to come.
4
+
5
+ ## License
6
+
7
+ COPYRIGHT © 2023 Esri
8
+
9
+ All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
10
+
11
+ This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
12
+
13
+ See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
14
+
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
+
17
17
  email: contracts@esri.com
@@ -1 +1 @@
1
- import{p,b as a}from"./p-b0c98bba.js";export{s as setNonce}from"./p-b0c98bba.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),p(e)})().then((p=>a([["p-2e2a7070",[[0,"arcgis-api-key",{apiKey:[1,"api-key"]}]]],["p-3692374d",[[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]}]]]],p)));
1
+ import{p,b as a}from"./p-b0c98bba.js";export{s as setNonce}from"./p-b0c98bba.js";(()=>{const a=import.meta.url,r={};return""!==a&&(r.resourcesUrl=new URL(".",a).href),p(r)})().then((p=>a([["p-3768a3bb",[[0,"arcgis-api-key",{apiKey:[1,"api-key"]}]]],["p-84fccaad",[[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]}]]]],p)));
@@ -1 +1 @@
1
- import{r as s,c as a,g as t}from"./p-b0c98bba.js";import{i}from"./p-75169739.js";const e=class{constructor(t){s(this,t),this.apiKeyReady=a(this,"apiKeyReady",7),this.apiKey=void 0}apiKeyWatcher(s){this._setApiKey(s)}async connectedCallback(){this.apiKey&&await this._setApiKey(this.apiKey)}async _setApiKey(s){(await i()).apiKey=s,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}
1
+ import{r as s,c as a,g as t}from"./p-b0c98bba.js";import{i}from"./p-9625972e.js";const e=class{constructor(t){s(this,t),this.apiKeyReady=a(this,"apiKeyReady",7),this.apiKey=void 0}apiKeyWatcher(s){this._setApiKey(s)}async connectedCallback(){this.apiKey&&await this._setApiKey(this.apiKey)}async _setApiKey(s){(await i()).apiKey=s,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}
@@ -1 +1 @@
1
- import{r as t,c as i,g as s}from"./p-b0c98bba.js";import{a as h,n as a,b as e}from"./p-75169739.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}
1
+ import{r as t,c as i,g as s}from"./p-b0c98bba.js";import{a as h,n as a,b as e}from"./p-9625972e.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}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e8c59179.js');
6
- const index$1 = require('./index-f5e2ae1b.js');
6
+ const index$1 = require('./index-f1a937af.js');
7
7
 
8
8
  const arcgisApiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-e8c59179.js');
6
- const index$1 = require('./index-f5e2ae1b.js');
6
+ const index$1 = require('./index-f1a937af.js');
7
7
 
8
8
  const arcgisIdentityCss = ":host{display:none}arcgis-identity{display:none}";
9
9
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement } from './index-1f7e8e45.js';
2
- import { i as importConfig } from './index-966ae15b.js';
2
+ import { i as importConfig } from './index-71b437b1.js';
3
3
 
4
4
  const arcgisApiKeyCss = ":host{display:none}arcgis-api-key{display:none}";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement } from './index-1f7e8e45.js';
2
- import { a as importCoreReactiveUtils, n as newIdentityOAuthInfo, b as importIdentityIdentityManager } from './index-966ae15b.js';
2
+ import { a as importCoreReactiveUtils, n as newIdentityOAuthInfo, b as importIdentityIdentityManager } from './index-71b437b1.js';
3
3
 
4
4
  const arcgisIdentityCss = ":host{display:none}arcgis-identity{display:none}";
5
5
 
@@ -1,11 +1,10 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
- import type OAuthInfo from "@arcgis/core/identity/OAuthInfo";
3
- export type Info = InstanceType<typeof OAuthInfo>;
2
+ import { ArcGISCredential } from "../types";
4
3
  export declare class ArcgisIdentity {
5
4
  el: HTMLDivElement;
6
5
  identity: __esri.IdentityManager;
7
6
  appId: string;
8
- credential?: __esri.Credential;
7
+ credential?: ArcGISCredential;
9
8
  expiration: number;
10
9
  locale: string;
11
10
  usePopup: boolean;
@@ -20,7 +19,7 @@ export declare class ArcgisIdentity {
20
19
  credentialCreate: EventEmitter<__esri.IdentityManagerCredentialCreateEvent>;
21
20
  dialogCreate: EventEmitter<__esri.IdentityManagerDialogCreateEvent>;
22
21
  appIdWatcher(value: string, oldValue: string): void;
23
- signIn(): Promise<__esri.Credential>;
22
+ signIn(): Promise<ArcGISCredential>;
24
23
  signOut(): Promise<void>;
25
24
  connectedCallback(): Promise<void>;
26
25
  private _addWatchers;
@@ -0,0 +1,10 @@
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>;
@@ -5,20 +5,21 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { ArcGISCredential } from "./components/types";
8
9
  export namespace Components {
9
10
  interface ArcgisApiKey {
10
11
  "apiKey": string;
11
12
  }
12
13
  interface ArcgisIdentity {
13
14
  "appId": string;
14
- "credential"?: __esri.Credential;
15
+ "credential"?: ArcGISCredential;
15
16
  "expiration": number;
16
17
  "identity": __esri.IdentityManager;
17
18
  "locale": string;
18
19
  "popupCallbackUrl": string;
19
20
  "portalUrl": string;
20
21
  "preserveUrlHash": boolean;
21
- "signIn": () => Promise<__esri.Credential>;
22
+ "signIn": () => Promise<ArcGISCredential>;
22
23
  "signOut": () => Promise<void>;
23
24
  "usePopup": boolean;
24
25
  }
@@ -56,7 +57,7 @@ declare namespace LocalJSX {
56
57
  }
57
58
  interface ArcgisIdentity {
58
59
  "appId"?: string;
59
- "credential"?: __esri.Credential;
60
+ "credential"?: ArcGISCredential;
60
61
  "expiration"?: number;
61
62
  "identity"?: __esri.IdentityManager;
62
63
  "locale"?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcgis/common-components",
3
3
  "description": "ArcGIS Common Components",
4
- "version": "4.28.0-beta.4",
4
+ "version": "4.28.0-beta.40",
5
5
  "module": "dist/components/index.js",
6
6
  "main": "dist/index.cjs.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -29,59 +29,63 @@
29
29
  },
30
30
  "license": "SEE LICENSE IN LICENSE.md",
31
31
  "scripts": {
32
- "start": "yarn pre && yarn build:components --dev --watch --serve --no-open",
32
+ "start": "yarn build:dev --watch --serve --no-open",
33
33
  "start:storybook": "storybook dev -c .storybook/internal --quiet",
34
34
  "start:external-storybook": "kill-port 6019 && storybook dev -c .storybook/external -p 6019 --quiet",
35
- "build": "yarn pre && yarn build:components",
36
- "build:dev": "yarn pre && yarn build:components --dev",
35
+ "watch": "yarn build:dev --watch",
36
+ "build": "yarn build:components",
37
+ "build:dev": "yarn build:components:dev",
37
38
  "build:storybook": "storybook build -c .storybook/internal --quiet",
38
39
  "build:external-storybook": "storybook build -c .storybook/external -o storybook-static-external --quiet",
39
40
  "build:components": "stencil build",
40
- "build:components:prod": "stencil build --docs",
41
41
  "build:components:dev": "stencil build --dev",
42
42
  "build:composite-storybook": "yarn g:shx cp -r storybook-static-external ../docs/storybook-static-external/common-components",
43
43
  "test": "yarn build:test && stencil test --spec --no-build",
44
44
  "test:e2e": "stencil test --e2e",
45
45
  "test.watch": "stencil test --spec --e2e --watchAll",
46
- "pre": "rimraf ./dist ./www",
47
46
  "clean": "rimraf ./node_modules ./storybook-static ./storybook-static-external ./turbo ./dist ./www",
48
47
  "lint": "eslint .",
49
48
  "generate": "stencil generate",
50
49
  "prettier": "prettier . --write"
51
50
  },
52
51
  "dependencies": {
53
- "@arcgis/core": ">=4.28.0-next <4.29",
54
- "@esri/calcite-components": "^1.8.0",
55
52
  "@stencil/core": "2.22.3"
56
53
  },
57
54
  "devDependencies": {
58
- "@arcgis/components-plugins": "4.28.0-beta.4",
59
- "@arcgis/core-adapter": "4.28.0-beta.4",
55
+ "@arcgis/components-plugins": "4.28.0-beta.40",
56
+ "@arcgis/core": ">=4.28.0-rc <4.29",
57
+ "@arcgis/core-adapter": "4.28.0-beta.40",
60
58
  "@arcgis/eslint-config": "1.0.0",
59
+ "@arcgis/map-components": "4.28.0-beta.40",
61
60
  "@arcgis/typescript-config": "1.0.0",
61
+ "@esri/calcite-components": "^1.8.0",
62
+ "@stencil/angular-output-target": "0.8.1",
62
63
  "@stencil/react-output-target": "0.5.3",
63
64
  "@stencil/sass": "^2.0.4",
64
- "@storybook/addon-a11y": "^7.4.3",
65
- "@storybook/addon-essentials": "^7.4.3",
66
- "@storybook/addon-links": "^7.4.3",
67
- "@storybook/web-components": "^7.4.3",
68
- "@storybook/web-components-vite": "^7.4.3",
65
+ "@storybook/addon-a11y": "^7.4.5",
66
+ "@storybook/addon-essentials": "^7.4.5",
67
+ "@storybook/addon-links": "^7.4.5",
68
+ "@storybook/web-components": "^7.4.5",
69
+ "@storybook/web-components-vite": "^7.4.5",
69
70
  "@types/jest": "^29.5.0",
70
- "eslint": "^8.49.0",
71
+ "eslint": "^8.51.0",
71
72
  "jest": "^29.5.0",
72
73
  "jest-cli": "^29.5.0",
73
74
  "kill-port": "^2.0.1",
74
75
  "lit": "^2.8.0",
75
- "npm-run-all": "^4.1.5",
76
76
  "prettier": "^3.0.0",
77
77
  "puppeteer": "^20.5.0",
78
78
  "react": "^18.2.0",
79
79
  "react-dom": "^18.2.0",
80
80
  "resolve-pkg": "^2.0.0",
81
81
  "rimraf": "^5.0.0",
82
- "storybook": "^7.4.3",
82
+ "storybook": "^7.4.5",
83
83
  "typescript": "4.9.5",
84
84
  "vite": "^4.4.9"
85
85
  },
86
- "gitHead": "9c0849aefdd1b706361f63fe4397472b47b63c3c"
86
+ "peerDependencies": {
87
+ "@arcgis/core": "~4.28.0",
88
+ "@esri/calcite-components": ">=1.7.0 <2.0.0"
89
+ },
90
+ "gitHead": "6292afdce9a33b8f82cb540d94b2bacf9c085858"
87
91
  }