diff --git a/package.json b/package.json index d39904b..e232dc0 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "file-loader": "^6.2.0", "http-proxy-middleware": "^3.0.3", "lint-staged": "^13.1.2", + "postcss": "^8.4.49", "postcss-loader": "^8.1.1", "prettier": "^2.8.4", "raw-loader": "^4.0.2", @@ -67,5 +68,5 @@ "sax": "^1.4.1", "three-bmfont-text": "3.0.1" }, - "packageManager": "yarn@4.3.1" + "packageManager": "yarn@4.5.1" } diff --git a/samples/arcade-editor/.eslintrc.js b/samples/arcade-editor/.eslintrc.js new file mode 100644 index 0000000..3f5ebd8 --- /dev/null +++ b/samples/arcade-editor/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: [require.resolve("@vertigis/web-sdk/config/.eslintrc")], + parserOptions: { + tsconfigRootDir: __dirname, + }, + rules: {}, +}; diff --git a/samples/arcade-editor/README.md b/samples/arcade-editor/README.md new file mode 100644 index 0000000..0a71403 --- /dev/null +++ b/samples/arcade-editor/README.md @@ -0,0 +1,4 @@ +# Arcade Editor + +This sample demonstrates the integration of a [web component](https://developers.arcgis.com/javascript/latest/components/) based ArcGIS Maps SDK for JavaScript widget. The [Arcade Editor component](https://developers.arcgis.com/javascript/latest/references/coding-components/?path=/docs/component-reference-arcade-editor--docs) is initialized with a custom profile, and data is provided via an Identify operation. + diff --git a/samples/arcade-editor/app/app.json b/samples/arcade-editor/app/app.json new file mode 100644 index 0000000..03e3f9b --- /dev/null +++ b/samples/arcade-editor/app/app.json @@ -0,0 +1,67 @@ +{ + "schemaVersion": "1.0", + "items": [ + { + "id": "map-config-1", + "$type": "map-extension", + "webMap": "https://latitudegeo.maps.arcgis.com/home/item.html?id=12391f2d60ca49c189114a837e508ca2", + "layerExtensions": ["item://layer-extension/air-bnb-nyc"] + }, + { + "id": "air-bnb-nyc", + "$type": "layer-extension", + "layer": { + "$ref": { + "id": "air-bnb-nyc-featurelayer", + "title": "AirBnB NYC", + "url": "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/WebChartTests_AirBnB_ChiCrime_MedicareCounty/FeatureServer/0" + }, + "layerType": "ArcGISFeatureLayer" + } + }, + { + "id": "arcade-editor-config-1", + "$type": "arcade-editor-model", + "layerName": "AirBnB NYC", + "title": "Arcade Editor" + }, + { + "id": "panel-config-1", + "$type": "panel" + }, + { + "id": "stack-config-1", + "$type": "stack" + }, + { + "id": "text-config-1", + "text": "Use the Identify tool to select AirBnB locations in the New York City area. Your selection will be used to create a FeatureSet and open an Arcade Editor component where you can construct expressions using the data.", + "$type": "text" + }, + { + "id": "button-config-1", + "iconId": "identify", + "title": "Identify", + "action": [ + { + "name": "sketching.capture-geometry", + "arguments": { + "geometryType": ["point", "extent"] + } + }, + "tasks.identify", + "arcade-editor.load-data", + "highlights.clear", + "highlights.add", + "map.zoom-to-features" + ], + "$type": "menu-item" + }, + { + "$type": "layout", + "id": "default", + "title": "Default", + "url": "./layout.xml" + } + ] +} diff --git a/samples/arcade-editor/app/layout.xml b/samples/arcade-editor/app/layout.xml new file mode 100644 index 0000000..25182d3 --- /dev/null +++ b/samples/arcade-editor/app/layout.xml @@ -0,0 +1,12 @@ + + + + + + +