From 8f714b4a2ee2b5aa2964c2f9a13862c2fac20665 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 19 Jul 2024 13:28:50 -0400 Subject: [PATCH] Updated to include dimensions --- package-lock.json | 414 +++++++++ package.json | 11 +- .../telemetry-card-editor.tsx | 63 +- .../telemetry-card/telemetry-card.css | 5 + .../telemetry-card/telemetry-card.tsx | 808 +++++++++++++++++- 5 files changed, 1279 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index c77aaa9..15ee526 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@esri/arcgis-rest-portal": "^4.2.0", "@esri/arcgis-rest-request": "^4.2.0", "@esri/hub-common": "^13.12.0", + "@esri/telemetry-reporting-client": "^3.2.4", "@stencil/core": "^2.13.0", "@types/arcgis-js-api": "4.26", "@types/node": "^18.14.0" @@ -110,6 +111,25 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, + "node_modules/@esri/arcgis-rest-service-admin": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-service-admin/-/arcgis-rest-service-admin-3.7.0.tgz", + "integrity": "sha512-vPm+hyO8lPH9aO1PMgveGevKbiViXgbpsetG3BLruxrxEhT0B+QytWE/LFp1beZYILTrm6umZqacEi6T2KJ7Aw==", + "dependencies": { + "@esri/arcgis-rest-types": "^3.7.0", + "tslib": "^1.13.0" + }, + "peerDependencies": { + "@esri/arcgis-rest-auth": "^3.0.0", + "@esri/arcgis-rest-portal": "^3.0.0", + "@esri/arcgis-rest-request": "^3.0.0" + } + }, + "node_modules/@esri/arcgis-rest-service-admin/node_modules/@esri/arcgis-rest-types": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-types/-/arcgis-rest-types-3.7.0.tgz", + "integrity": "sha512-KEgORx0HKHOrV4oMYOwmZ76N89WTNkbKb1z3UYJrOEaKVGRU3jisgQcuTXFqjJJe4ZApGQhxCzNgcaU067qdpA==" + }, "node_modules/@esri/arcgis-rest-types": { "version": "2.25.0", "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-types/-/arcgis-rest-types-2.25.0.tgz", @@ -169,6 +189,86 @@ "@esri/arcgis-rest-types": "^2.15.0 || 3" } }, + "node_modules/@esri/telemetry-reporting-client": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@esri/telemetry-reporting-client/-/telemetry-reporting-client-3.2.4.tgz", + "integrity": "sha512-/u/PpH2G6LMONYOFWwhasNj+bm2mNMLFUDAdQe9Jd/oFQUkC491BnAP0AenimVQUdjUVQFp4d3r68pDmgop1hw==", + "dependencies": { + "@esri/arcgis-rest-auth": "^3.4.3", + "@esri/arcgis-rest-feature-layer": "^3.4.3", + "@esri/arcgis-rest-portal": "^3.4.3", + "@esri/arcgis-rest-request": "^3.4.3", + "@esri/arcgis-rest-service-admin": "^3.4.3", + "@esri/arcgis-rest-types": "^3.4.3", + "@esri/hub-common": "^14.12.1", + "isomorphic-fetch": "^3.0.0", + "isomorphic-form-data": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@esri/telemetry-reporting-client/node_modules/@esri/arcgis-rest-auth": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-auth/-/arcgis-rest-auth-3.7.0.tgz", + "integrity": "sha512-/FovDS6hR+3TPfXOpTOMbAu7vNAOLmIjK/lxt0w0nQd+8Nnx3u91BoGMr9pRBGzAJBJm9/i2yGljbFaNXegusQ==", + "dependencies": { + "@esri/arcgis-rest-types": "^3.7.0", + "tslib": "^1.13.0" + }, + "peerDependencies": { + "@esri/arcgis-rest-request": "^3.0.0" + } + }, + "node_modules/@esri/telemetry-reporting-client/node_modules/@esri/arcgis-rest-portal": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-portal/-/arcgis-rest-portal-3.7.0.tgz", + "integrity": "sha512-KEdBHNmoYqbN1tmfCTwRq6AJ/Dl2rMSYgDFR1ODOKwicJ4PZPzfjHwUkSTS77eDEL/+ziRiSp5hJceJfDWzAgw==", + "dependencies": { + "@esri/arcgis-rest-types": "^3.7.0", + "tslib": "^1.13.0" + }, + "peerDependencies": { + "@esri/arcgis-rest-auth": "^3.0.0", + "@esri/arcgis-rest-request": "^3.0.0" + } + }, + "node_modules/@esri/telemetry-reporting-client/node_modules/@esri/arcgis-rest-request": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-request/-/arcgis-rest-request-3.7.0.tgz", + "integrity": "sha512-K2cQSzx4roEyMPqvWyc4kjAUjW81Scpue8eHw2+nY/4Ghzl3AhF4eOmHJEcQ9e6ysEGNLrUMwLGibmtBbT8Txw==", + "dependencies": { + "tslib": "^1.10.0" + } + }, + "node_modules/@esri/telemetry-reporting-client/node_modules/@esri/arcgis-rest-types": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-types/-/arcgis-rest-types-3.7.0.tgz", + "integrity": "sha512-KEgORx0HKHOrV4oMYOwmZ76N89WTNkbKb1z3UYJrOEaKVGRU3jisgQcuTXFqjJJe4ZApGQhxCzNgcaU067qdpA==" + }, + "node_modules/@esri/telemetry-reporting-client/node_modules/@esri/hub-common": { + "version": "14.161.2", + "resolved": "https://registry.npmjs.org/@esri/hub-common/-/hub-common-14.161.2.tgz", + "integrity": "sha512-6wEMoFfX3KWi/lo0WMFQgDdIQmGbBVWds1Npyl9qhylOFEG1M2iajoQ0LYuzKTKgKGxMocXY0inyuBmG3wggng==", + "dependencies": { + "@terraformer/arcgis": "^2.1.2", + "abab": "^2.0.5", + "adlib": "^3.0.8", + "ajv": "^6.12.6", + "fast-xml-parser": "^3.21.0", + "json-schema-typed": "^7.0.3", + "jsonapi-typescript": "^0.1.3", + "tslib": "^1.13.0" + }, + "peerDependencies": { + "@esri/arcgis-rest-auth": "^2.14.0 || 3", + "@esri/arcgis-rest-feature-layer": "^3.2.0", + "@esri/arcgis-rest-portal": "^2.18.0 || 3", + "@esri/arcgis-rest-request": "^2.14.0 || 3", + "@esri/arcgis-rest-service-admin": "^3.6.0", + "@esri/arcgis-rest-types": "^2.15.0 || 3" + } + }, "node_modules/@floating-ui/core": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.4.tgz", @@ -224,6 +324,19 @@ "@stencil/core": ">=2.0.0 || >=3.0.0" } }, + "node_modules/@terraformer/arcgis": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@terraformer/arcgis/-/arcgis-2.1.2.tgz", + "integrity": "sha512-IvdfqehcNAUtKU1OFMKwPT8EvdKlVFZ7q7ZKzkIF8XzYZIVsZLuXuOS1UBdRh5u/o+X5Gax7jiZhD8U/4TV+Jw==", + "dependencies": { + "@terraformer/common": "^2.1.2" + } + }, + "node_modules/@terraformer/common": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@terraformer/common/-/common-2.1.2.tgz", + "integrity": "sha512-cwPdTFzIpekZhZRrgDEkqLKNPoqbyCBQHiemaovnGIeUx0Pl336MY/eCxzJ5zXkrQLVo9zPalq/vYW5HnyKevQ==" + }, "node_modules/@types/arcgis-js-api": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@types/arcgis-js-api/-/arcgis-js-api-4.26.0.tgz", @@ -293,6 +406,11 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -334,6 +452,17 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/composed-offset-position": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/composed-offset-position/-/composed-offset-position-0.0.4.tgz", @@ -354,6 +483,14 @@ "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==", "dev": true }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/esm": { "version": "3.2.25", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", @@ -426,6 +563,19 @@ "tabbable": "^6.2.0" } }, + "node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "node_modules/formdata-node": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", @@ -455,6 +605,42 @@ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "dev": true }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, + "node_modules/isomorphic-fetch/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/isomorphic-form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-form-data/-/isomorphic-form-data-2.0.0.tgz", + "integrity": "sha512-TYgVnXWeESVmQSg4GLVbalmQ+B4NPi/H4eWxqALKj63KsUrcu301YDjBqaOw3h+cbak7Na4Xyps3BiptHtxTfg==", + "dependencies": { + "form-data": "^2.3.2" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -484,6 +670,25 @@ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", "dev": true }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -567,6 +772,11 @@ "timezone-groups": "dist/cli.cjs" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -599,6 +809,25 @@ "engines": { "node": ">= 14" } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } } }, "dependencies": { @@ -676,6 +905,22 @@ } } }, + "@esri/arcgis-rest-service-admin": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-service-admin/-/arcgis-rest-service-admin-3.7.0.tgz", + "integrity": "sha512-vPm+hyO8lPH9aO1PMgveGevKbiViXgbpsetG3BLruxrxEhT0B+QytWE/LFp1beZYILTrm6umZqacEi6T2KJ7Aw==", + "requires": { + "@esri/arcgis-rest-types": "^3.7.0", + "tslib": "^1.13.0" + }, + "dependencies": { + "@esri/arcgis-rest-types": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-types/-/arcgis-rest-types-3.7.0.tgz", + "integrity": "sha512-KEgORx0HKHOrV4oMYOwmZ76N89WTNkbKb1z3UYJrOEaKVGRU3jisgQcuTXFqjJJe4ZApGQhxCzNgcaU067qdpA==" + } + } + }, "@esri/arcgis-rest-types": { "version": "2.25.0", "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-types/-/arcgis-rest-types-2.25.0.tgz", @@ -722,6 +967,70 @@ "tslib": "^1.13.0" } }, + "@esri/telemetry-reporting-client": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@esri/telemetry-reporting-client/-/telemetry-reporting-client-3.2.4.tgz", + "integrity": "sha512-/u/PpH2G6LMONYOFWwhasNj+bm2mNMLFUDAdQe9Jd/oFQUkC491BnAP0AenimVQUdjUVQFp4d3r68pDmgop1hw==", + "requires": { + "@esri/arcgis-rest-auth": "^3.4.3", + "@esri/arcgis-rest-feature-layer": "^3.4.3", + "@esri/arcgis-rest-portal": "^3.4.3", + "@esri/arcgis-rest-request": "^3.4.3", + "@esri/arcgis-rest-service-admin": "^3.4.3", + "@esri/arcgis-rest-types": "^3.4.3", + "@esri/hub-common": "^14.12.1", + "isomorphic-fetch": "^3.0.0", + "isomorphic-form-data": "^2.0.0" + }, + "dependencies": { + "@esri/arcgis-rest-auth": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-auth/-/arcgis-rest-auth-3.7.0.tgz", + "integrity": "sha512-/FovDS6hR+3TPfXOpTOMbAu7vNAOLmIjK/lxt0w0nQd+8Nnx3u91BoGMr9pRBGzAJBJm9/i2yGljbFaNXegusQ==", + "requires": { + "@esri/arcgis-rest-types": "^3.7.0", + "tslib": "^1.13.0" + } + }, + "@esri/arcgis-rest-portal": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-portal/-/arcgis-rest-portal-3.7.0.tgz", + "integrity": "sha512-KEdBHNmoYqbN1tmfCTwRq6AJ/Dl2rMSYgDFR1ODOKwicJ4PZPzfjHwUkSTS77eDEL/+ziRiSp5hJceJfDWzAgw==", + "requires": { + "@esri/arcgis-rest-types": "^3.7.0", + "tslib": "^1.13.0" + } + }, + "@esri/arcgis-rest-request": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-request/-/arcgis-rest-request-3.7.0.tgz", + "integrity": "sha512-K2cQSzx4roEyMPqvWyc4kjAUjW81Scpue8eHw2+nY/4Ghzl3AhF4eOmHJEcQ9e6ysEGNLrUMwLGibmtBbT8Txw==", + "requires": { + "tslib": "^1.10.0" + } + }, + "@esri/arcgis-rest-types": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@esri/arcgis-rest-types/-/arcgis-rest-types-3.7.0.tgz", + "integrity": "sha512-KEgORx0HKHOrV4oMYOwmZ76N89WTNkbKb1z3UYJrOEaKVGRU3jisgQcuTXFqjJJe4ZApGQhxCzNgcaU067qdpA==" + }, + "@esri/hub-common": { + "version": "14.161.2", + "resolved": "https://registry.npmjs.org/@esri/hub-common/-/hub-common-14.161.2.tgz", + "integrity": "sha512-6wEMoFfX3KWi/lo0WMFQgDdIQmGbBVWds1Npyl9qhylOFEG1M2iajoQ0LYuzKTKgKGxMocXY0inyuBmG3wggng==", + "requires": { + "@terraformer/arcgis": "^2.1.2", + "abab": "^2.0.5", + "adlib": "^3.0.8", + "ajv": "^6.12.6", + "fast-xml-parser": "^3.21.0", + "json-schema-typed": "^7.0.3", + "jsonapi-typescript": "^0.1.3", + "tslib": "^1.13.0" + } + } + } + }, "@floating-ui/core": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.4.tgz", @@ -764,6 +1073,19 @@ "integrity": "sha512-5X6/GREyC30NmKCPn0oGENmVmvCb8pZZL81JR4dpS/0DM/+Z4YQZE8V+SOdJcwpkjqtUMOzPfxTnOCVr0n6Dog==", "dev": true }, + "@terraformer/arcgis": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@terraformer/arcgis/-/arcgis-2.1.2.tgz", + "integrity": "sha512-IvdfqehcNAUtKU1OFMKwPT8EvdKlVFZ7q7ZKzkIF8XzYZIVsZLuXuOS1UBdRh5u/o+X5Gax7jiZhD8U/4TV+Jw==", + "requires": { + "@terraformer/common": "^2.1.2" + } + }, + "@terraformer/common": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@terraformer/common/-/common-2.1.2.tgz", + "integrity": "sha512-cwPdTFzIpekZhZRrgDEkqLKNPoqbyCBQHiemaovnGIeUx0Pl336MY/eCxzJ5zXkrQLVo9zPalq/vYW5HnyKevQ==" + }, "@types/arcgis-js-api": { "version": "4.26.0", "resolved": "https://registry.npmjs.org/@types/arcgis-js-api/-/arcgis-js-api-4.26.0.tgz", @@ -828,6 +1150,11 @@ "uri-js": "^4.2.2" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", @@ -863,6 +1190,14 @@ "simple-swizzle": "^0.2.2" } }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "composed-offset-position": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/composed-offset-position/-/composed-offset-position-0.0.4.tgz", @@ -880,6 +1215,11 @@ "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==", "dev": true }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, "esm": { "version": "3.2.25", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", @@ -928,6 +1268,16 @@ "tabbable": "^6.2.0" } }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "formdata-node": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", @@ -951,6 +1301,33 @@ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "dev": true }, + "isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "requires": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + }, + "dependencies": { + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + } + } + }, + "isomorphic-form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-form-data/-/isomorphic-form-data-2.0.0.tgz", + "integrity": "sha512-TYgVnXWeESVmQSg4GLVbalmQ+B4NPi/H4eWxqALKj63KsUrcu301YDjBqaOw3h+cbak7Na4Xyps3BiptHtxTfg==", + "requires": { + "form-data": "^2.3.2" + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -980,6 +1357,19 @@ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", "dev": true }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, "mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -1037,6 +1427,11 @@ "integrity": "sha512-t7E/9sPfCU0m0ZbS7Cqw52D6CB/UyeaiIBmyJCokI1SyOyOgA/ESiQ/fbreeFaUG9QSenGlZSSk/7rEbkipbOA==", "dev": true }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -1060,6 +1455,25 @@ "version": "4.0.0-beta.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-fetch": { + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } } } } diff --git a/package.json b/package.json index cbd9753..1b96306 100644 --- a/package.json +++ b/package.json @@ -32,20 +32,21 @@ "generate": "stencil generate" }, "dependencies": { - "@stencil/core": "^2.13.0", - "@types/node": "^18.14.0", "@esri/arcgis-rest-auth": "^2.25.0", "@esri/arcgis-rest-feature-layer": "^3.6.0", "@esri/arcgis-rest-portal": "^4.2.0", "@esri/arcgis-rest-request": "^4.2.0", "@esri/hub-common": "^13.12.0", - "@types/arcgis-js-api": "4.26" + "@esri/telemetry-reporting-client": "^3.2.4", + "@stencil/core": "^2.13.0", + "@types/arcgis-js-api": "4.26", + "@types/node": "^18.14.0" }, "devDependencies": { - "@types/geojson": "^7946.0.10", "@esri/calcite-components": "^2.10.1", "@stencil/sass": "^2.0.0", - "@stencil/store": "^2.0.1" + "@stencil/store": "^2.0.1", + "@types/geojson": "^7946.0.10" }, "license": "Apache-2.0" } diff --git a/src/components/telemetry-card-editor/telemetry-card-editor.tsx b/src/components/telemetry-card-editor/telemetry-card-editor.tsx index 936f00b..72fa1f6 100644 --- a/src/components/telemetry-card-editor/telemetry-card-editor.tsx +++ b/src/components/telemetry-card-editor/telemetry-card-editor.tsx @@ -1,4 +1,5 @@ import { Component, Event, EventEmitter, Host, Listen, Prop, h } from '@stencil/core'; +import { buildSimpleDimensionFilters } from '@esri/telemetry-reporting-client'; @Component({ tag: 'telemetry-card-editor', @@ -43,8 +44,17 @@ export class TelemetryCardEditor { default: 'page-views:count' }, dimensions: { - type: 'string', - enum: ['', 'contentId', 'dimension2'], + type: "string", + // items: { + // type: "string", + // enum: ['', 'contentId', 'referrer', + // 'dimension1' , 'dimension2', 'dimension3' , 'dimension4', + // 'dimension5' , 'dimension6', 'dimension7' , 'dimension8', + // 'dimension9' , 'dimension10', 'dimension11' , 'dimension12', + // 'dimension13' , 'dimension14', 'dimension15' , 'dimension16', + // 'dimension17' , 'dimension18', 'dimension19' , 'dimension20', + // ] + // }, default: '' }, timeDimension: { @@ -52,10 +62,19 @@ export class TelemetryCardEditor { enum: ["hour", "day", "week", "month"], default: "day", }, + dimensionsFilterCategory: { + type: "string" + }, + dimensionsFilterAction: { + type: "string" + }, + dimensionsFilterLabel: { + type: "string" + }, orderByName: { type: 'string', - enum: ["day", "page-views:count", "other-events:count"], - default: "day" + enum: ["page-views:count", "other-events:count", "hour", "day", "week", "month"], + default: "page-views:count" }, orderByDirection: { type: 'string', @@ -101,12 +120,7 @@ export class TelemetryCardEditor { "scope": "/properties/dimensions", "type": "Control", "options": { - "control": "hub-field-input-radio-group", - "labels": [ - "None", - "Content ID", - "User Type" - ] + // "control": "hub-field-input-combobox" } },{ "label": "timeDimension", @@ -115,6 +129,21 @@ export class TelemetryCardEditor { "options": { "control": "hub-field-input-radio-group", } + },{ + "label": "Category", + "scope": "/properties/dimensionsFilterCategory", + "type": "Control", + "options": {} + },{ + "label": "Action", + "scope": "/properties/dimensionsFilterAction", + "type": "Control", + "options": {} + },{ + "label": "Label", + "scope": "/properties/dimensionsFilterLabel", + "type": "Control", + "options": {} },{ "label": "Order by Name", "scope": "/properties/orderByName", @@ -138,6 +167,15 @@ export class TelemetryCardEditor { } private convertConfiguration(configuration) { + const query = { + category: configuration.dimensionsFilterCategory?.length > 0 ? configuration.dimensionsFilterCategory : null, + action: configuration.dimensionsFilterAction?.length > 0 ? configuration.dimensionsFilterAction : null, + label: configuration.dimensionsFilterAction?.length > 0 ? configuration.dimensionsFilterLabel : null + }; + + const dimensionFilters = buildSimpleDimensionFilters(query); + console.debug('dimensionFilters', query, dimensionFilters, configuration); + const newConfiguration:any = { scope: { hostname: configuration.hostname @@ -154,7 +192,9 @@ export class TelemetryCardEditor { }] } if(!!configuration.dimensions && configuration.dimensions.length > 0) { - newConfiguration.dimensions = [configuration.dimensions] + newConfiguration.dimensions = configuration.dimensions.split(",") + } else { + newConfiguration.dimensionFilters = dimensionFilters; } return newConfiguration; @@ -164,6 +204,7 @@ export class TelemetryCardEditor { @Listen('arcgisConfigurationEditorChange') async configurationChanged(event) { + // const newConfiguration = await this.configurationEl.values; const newConfiguration = this.convertConfiguration(event.detail.values); diff --git a/src/components/telemetry-card/telemetry-card.css b/src/components/telemetry-card/telemetry-card.css index fe8bbc5..82e740e 100644 --- a/src/components/telemetry-card/telemetry-card.css +++ b/src/components/telemetry-card/telemetry-card.css @@ -2,3 +2,8 @@ display: block; width: 100%; } + +.chart { + width: 500px; + height: 200px; +} \ No newline at end of file diff --git a/src/components/telemetry-card/telemetry-card.tsx b/src/components/telemetry-card/telemetry-card.tsx index ad349b4..ba67141 100644 --- a/src/components/telemetry-card/telemetry-card.tsx +++ b/src/components/telemetry-card/telemetry-card.tsx @@ -55,6 +55,8 @@ export class TelemetryCard {

Card {this.cardId}

+ {/* {this.renderChart(this.data)} */} + {!!this.configuration && !!this.data?.data && this.renderTable(this.data)} {!!this.configuration ? JSON.stringify(this.configuration, null, 2) : 'No configuration'} @@ -72,10 +74,12 @@ export class TelemetryCard { description="" >] if (!!this.configuration.dimensions && this.configuration.dimensions.length > 0) { - headers.push() + for(const header of this.configuration.dimensions) { + headers.push() + } } if (!!this.configuration.metrics && this.configuration.metrics.length > 0) { headers.push({row['timestamp']} ] - if (!!this.configuration.dimensions && this.configuration.dimensions.length > 0) { - cells.push({row[this.configuration.dimensions[0]]}) + + for(const dimension of this.configuration.dimensions) { + cells.push({row[dimension]}) } if (!!this.configuration.metrics && this.configuration.metrics.length > 0) { cells.push({row[this.configuration.metrics[0]]}) @@ -112,4 +117,795 @@ export class TelemetryCard { } + renderChart(data) { + const specification = { + "version": "9.7.0", + "type": "chart", + "id": "line-chart-5", + "colorMatch": true, + "rotated": false, + "title": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "Sum of Beat by Community by Primary Type", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 18, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "subTitle": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "footer": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 11, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "background": [ + 255, + 255, + 255, + 255 + ], + "axes": [ + { + "type": "chartAxis", + "visible": true, + "title": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "Community", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 14, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center", + "verticalAlignment": "middle" + } + }, + "labels": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "X Axis", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "valueFormat": { + "type": "number", + "intlOptions": { + "style": "decimal", + "minimumFractionDigits": 0, + "maximumFractionDigits": 3 + } + }, + "lineSymbol": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 156, + 156, + 156, + 255 + ], + "width": 1 + }, + "integerOnlyValues": true, + "minimum": null, + "maximum": null + }, + { + "type": "chartAxis", + "visible": true, + "title": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "Sum of Beat", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 14, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center", + "verticalAlignment": "middle" + } + }, + "labels": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "Count", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "valueFormat": { + "type": "number", + "intlOptions": { + "style": "decimal", + "minimumFractionDigits": 0, + "maximumFractionDigits": 3 + } + }, + "lineSymbol": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 156, + 156, + 156, + 255 + ], + "width": 1 + }, + "grid": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 0, + 0, + 0, + 25 + ], + "width": 1 + }, + "integerOnlyValues": false, + "minimum": null, + "maximum": null, + "guides": [ + { + "type": "chartGuide", + "name": "Guide", + "start": "4000", + "style": { + "type": "esriSFS", + "color": [ + 230, + 230, + 230, + 153 + ], + "outline": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 0, + 0, + 0, + 0 + ], + "width": 1 + } + }, + "end": "6000", + "label": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "Between 4000 to 6000", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + } + }, + "above": false + } + ] + } + ], + "series": [ + { + "type": "lineSeries", + "id": "ASSAULT", + "name": "ASSAULT", + "query": { + "orderByFields": [ + "Community ASC" + ], + "groupByFieldsForStatistics": [ + "Community" + ], + "outStatistics": [ + { + "statisticType": "sum", + "onStatisticField": "Beat", + "outStatisticFieldName": "SUM_BEAT_0" + } + ], + "where": "Primary_Ty='ASSAULT'" + }, + "x": "Community", + "y": "SUM_BEAT_0", + "lineSymbol": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 178, + 224, + 97, + 178.5 + ], + "width": 2 + }, + "markerSymbol": { + "type": "esriSMS", + "style": "esriSMSCircle", + "color": [ + 178, + 224, + 97, + 178.5 + ], + "size": 4 + }, + "dataLabels": { + "type": "chartText", + "visible": false, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "timeIntervalSize": 0, + "timeIntervalUnits": "esriTimeUnitsMonths", + "timeAggregationType": "equalIntervalsFromStartTime", + "trimIncompleteTimeInterval": true, + "nullPolicy": "interpolate", + "rotated": false + }, + { + "type": "lineSeries", + "id": "BATTERY", + "name": "BATTERY", + "query": { + "orderByFields": [ + "Community ASC" + ], + "groupByFieldsForStatistics": [ + "Community" + ], + "outStatistics": [ + { + "statisticType": "sum", + "onStatisticField": "Beat", + "outStatisticFieldName": "SUM_BEAT_1" + } + ], + "where": "Primary_Ty='BATTERY'" + }, + "x": "Community", + "y": "SUM_BEAT_1", + "lineSymbol": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 126, + 176, + 213, + 178.5 + ], + "width": 2 + }, + "markerSymbol": { + "type": "esriSMS", + "style": "esriSMSCircle", + "color": [ + 126, + 176, + 213, + 178.5 + ], + "size": 4 + }, + "dataLabels": { + "type": "chartText", + "visible": false, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "timeIntervalSize": 0, + "timeIntervalUnits": "esriTimeUnitsMonths", + "timeAggregationType": "equalIntervalsFromStartTime", + "trimIncompleteTimeInterval": true, + "nullPolicy": "interpolate", + "rotated": false + }, + { + "type": "lineSeries", + "id": "ROBBERY", + "name": "ROBBERY", + "query": { + "orderByFields": [ + "Community ASC" + ], + "groupByFieldsForStatistics": [ + "Community" + ], + "outStatistics": [ + { + "statisticType": "sum", + "onStatisticField": "Beat", + "outStatisticFieldName": "SUM_BEAT_2" + } + ], + "where": "Primary_Ty='ROBBERY'" + }, + "x": "Community", + "y": "SUM_BEAT_2", + "lineSymbol": { + "type": "esriSLS", + "style": "esriSLSSolid", + "color": [ + 253, + 127, + 111, + 178.5 + ], + "width": 2 + }, + "markerSymbol": { + "type": "esriSMS", + "style": "esriSMSCircle", + "color": [ + 253, + 127, + 111, + 178.5 + ], + "size": 4 + }, + "dataLabels": { + "type": "chartText", + "visible": false, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 10, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "timeIntervalSize": 0, + "timeIntervalUnits": "esriTimeUnitsMonths", + "timeAggregationType": "equalIntervalsFromStartTime", + "trimIncompleteTimeInterval": true, + "nullPolicy": "interpolate", + "rotated": false + } + ], + "legend": { + "type": "chartLegend", + "visible": true, + "title": { + "type": "chartText", + "visible": true, + "content": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "Primary Type", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 13, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + } + }, + "body": { + "type": "esriTS", + "color": [ + 0, + 0, + 0, + 178.5 + ], + "text": "", + "font": { + "family": "Arial, Helvetica, sans-serif", + "size": 12, + "style": "normal", + "weight": "normal", + "decoration": "none" + }, + "horizontalAlignment": "center" + }, + "position": "bottom", + "maxHeight": null + }, + "dataSource": { + "type": "layer", + "layer": { + "id": "", + "layerType": "ArcGISFeatureLayer", + "url": "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/ChicagoCr/FeatureServer", + "layerDefinition": { + "drawingInfo": { + "renderer": { + "type": "uniqueValue", + "visualVariables": [ + { + "type": "sizeInfo", + "valueExpression": "$view.scale", + "stops": [ + { + "size": 7.5, + "value": 4513.988705 + }, + { + "size": 6, + "value": 36111.909643 + }, + { + "size": 3, + "value": 288895.277144 + }, + { + "size": 1.5, + "value": 2311162.217155 + } + ] + } + ], + "field1": "Primary_Ty", + "legendOptions": {}, + "uniqueValueGroups": [ + { + "classes": [ + { + "label": "Robbery (custom)", + "symbol": { + "type": "esriSMS", + "color": [ + 253, + 127, + 111, + 255 + ], + "angle": 0, + "xoffset": 0, + "yoffset": 0, + "size": 6, + "style": "esriSMSCircle", + "outline": { + "type": "esriSLS", + "color": [ + 26, + 26, + 26, + 64 + ], + "width": 0.75, + "style": "esriSLSSolid" + } + }, + "values": [ + [ + "ROBBERY" + ] + ] + }, + { + "label": "BATTERY", + "symbol": { + "type": "esriSMS", + "color": [ + 126, + 176, + 213, + 255 + ], + "angle": 0, + "xoffset": 0, + "yoffset": 0, + "size": 6, + "style": "esriSMSCircle", + "outline": { + "type": "esriSLS", + "color": [ + 26, + 26, + 26, + 64 + ], + "width": 0.75, + "style": "esriSLSSolid" + } + }, + "values": [ + [ + "BATTERY" + ] + ] + }, + { + "label": "Assault (custom)", + "symbol": { + "type": "esriSMS", + "color": [ + 178, + 224, + 97, + 255 + ], + "angle": 0, + "xoffset": 0, + "yoffset": 0, + "size": 6, + "style": "esriSMSCircle", + "outline": { + "type": "esriSLS", + "color": [ + 26, + 26, + 26, + 64 + ], + "width": 0.75, + "style": "esriSLSSolid" + } + }, + "values": [ + [ + "ASSAULT" + ] + ] + } + ] + } + ], + "uniqueValueInfos": [ + { + "label": "Robbery (custom)", + "symbol": { + "type": "esriSMS", + "color": [ + 253, + 127, + 111, + 255 + ], + "angle": 0, + "xoffset": 0, + "yoffset": 0, + "size": 6, + "style": "esriSMSCircle", + "outline": { + "type": "esriSLS", + "color": [ + 26, + 26, + 26, + 64 + ], + "width": 0.75, + "style": "esriSLSSolid" + } + }, + "value": "ROBBERY" + }, + { + "label": "BATTERY", + "symbol": { + "type": "esriSMS", + "color": [ + 126, + 176, + 213, + 255 + ], + "angle": 0, + "xoffset": 0, + "yoffset": 0, + "size": 6, + "style": "esriSMSCircle", + "outline": { + "type": "esriSLS", + "color": [ + 26, + 26, + 26, + 64 + ], + "width": 0.75, + "style": "esriSLSSolid" + } + }, + "value": "BATTERY" + }, + { + "label": "Assault (custom)", + "symbol": { + "type": "esriSMS", + "color": [ + 178, + 224, + 97, + 255 + ], + "angle": 0, + "xoffset": 0, + "yoffset": 0, + "size": 6, + "style": "esriSMSCircle", + "outline": { + "type": "esriSLS", + "color": [ + 26, + 26, + 26, + 64 + ], + "width": 0.75, + "style": "esriSLSSolid" + } + }, + "value": "ASSAULT" + } + ] + } + } + } + } + } + } + + return ( + + ) + } + }