@esri/solutions-components 0.7.32 → 0.7.34
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/card-manager_3.cjs.entry.js +35 -23
- package/dist/cjs/{downloadUtils-10e0de31.js → downloadUtils-6b451886.js} +2 -2
- package/dist/cjs/{index.es-72dc7ab9.js → index.es-3eaba9ef.js} +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/collection/components/layer-table/layer-table.js +34 -22
- package/dist/collection/demos/crowdsource-manager.html +181 -159
- package/dist/collection/utils/downloadUtils.js +1 -1
- package/dist/collection/utils/downloadUtils.ts +1 -1
- package/dist/collection/utils/interfaces.ts +10 -3
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/layer-table2.js +34 -22
- package/dist/esm/card-manager_3.entry.js +35 -23
- package/dist/esm/{downloadUtils-d297078f.js → downloadUtils-4577cf8b.js} +2 -2
- package/dist/esm/{index.es-3b4fa9d0.js → index.es-a28dad8e.js} +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/solutions-components/demos/crowdsource-manager.html +181 -159
- package/dist/solutions-components/p-0b65130f.entry.js +6 -0
- package/dist/solutions-components/{p-103c5318.js → p-6c85b276.js} +2 -2
- package/dist/solutions-components/{p-57d49d15.entry.js → p-a84acc82.entry.js} +1 -1
- package/dist/solutions-components/{p-8ec25bf4.js → p-b1a5f341.js} +1 -1
- package/dist/solutions-components/{p-921f21d5.entry.js → p-e22bce70.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +1 -1
- package/dist/solutions-components/utils/interfaces.ts +10 -3
- package/dist/types/components/layer-table/layer-table.d.ts +1 -0
- package/dist/types/utils/interfaces.d.ts +9 -3
- package/package.json +1 -1
- package/dist/solutions-components/p-09ec8c8f.entry.js +0 -6
@@ -1327,35 +1327,47 @@ const LayerTable = /*@__PURE__*/ proxyCustomElement(class LayerTable extends HTM
|
|
1327
1327
|
* @returns a list of column templates if they exist
|
1328
1328
|
*/
|
1329
1329
|
_getColumnTemplates(id, fieldInfos) {
|
1330
|
-
var _a;
|
1331
|
-
let
|
1332
|
-
(_a = this.mapInfo
|
1333
|
-
if (
|
1334
|
-
|
1330
|
+
var _a, _b;
|
1331
|
+
let layerOption;
|
1332
|
+
(_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers.some(l => {
|
1333
|
+
if (l.id === id) {
|
1334
|
+
layerOption = l;
|
1335
1335
|
return true;
|
1336
1336
|
}
|
1337
1337
|
});
|
1338
|
-
|
1338
|
+
const fieldOrder = (layerOption === null || layerOption === void 0 ? void 0 : layerOption.fields) && (layerOption === null || layerOption === void 0 ? void 0 : layerOption.fieldOrder) ?
|
1339
|
+
layerOption.fieldOrder.filter(f => layerOption.fields.indexOf(f) > -1) :
|
1340
|
+
undefined;
|
1341
|
+
let columnTemplates;
|
1339
1342
|
if (fieldInfos) {
|
1340
|
-
columnTemplates =
|
1341
|
-
fieldInfos.
|
1342
|
-
if (
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1343
|
+
columnTemplates = layerOption && (layerOption === null || layerOption === void 0 ? void 0 : layerOption.fields)
|
1344
|
+
? fieldInfos.reduce((prev, cur) => {
|
1345
|
+
if (layerOption.fields.indexOf(cur.name) > -1) {
|
1346
|
+
const template = {
|
1347
|
+
type: "field",
|
1348
|
+
fieldName: cur.name,
|
1349
|
+
label: cur.alias,
|
1350
|
+
menuConfig: this._getMenuConfig(cur.name)
|
1351
|
+
};
|
1352
|
+
prev.push(template);
|
1346
1353
|
}
|
1354
|
+
return prev;
|
1355
|
+
}, []).sort(this._sortFields.bind(this, layerOption === null || layerOption === void 0 ? void 0 : layerOption.fieldOrder))
|
1356
|
+
: fieldInfos.map(fieldInfo => {
|
1357
|
+
return {
|
1358
|
+
type: "field",
|
1359
|
+
fieldName: fieldInfo.name,
|
1360
|
+
label: fieldInfo.alias,
|
1361
|
+
menuConfig: this._getMenuConfig(fieldInfo.name)
|
1362
|
+
};
|
1347
1363
|
});
|
1348
|
-
return columnTemplate;
|
1349
|
-
}) : fieldInfos.map(fieldInfo => {
|
1350
|
-
return {
|
1351
|
-
type: "field",
|
1352
|
-
fieldName: fieldInfo.name,
|
1353
|
-
label: fieldInfo.alias,
|
1354
|
-
menuConfig: this._getMenuConfig(fieldInfo.name)
|
1355
|
-
};
|
1356
|
-
});
|
1357
1364
|
}
|
1358
|
-
return
|
1365
|
+
return fieldOrder ?
|
1366
|
+
columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.sort(this._sortFields.bind(this, fieldOrder)) :
|
1367
|
+
columnTemplates;
|
1368
|
+
}
|
1369
|
+
_sortFields(sorter, a, b) {
|
1370
|
+
return (sorter === null || sorter === void 0 ? void 0 : sorter.indexOf(a.fieldName)) - sorter.indexOf(b.fieldName);
|
1359
1371
|
}
|
1360
1372
|
/**
|
1361
1373
|
* Get the menu config that adds the ability to hide the current column
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-7183ce4a.js';
|
7
7
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-731e75a8.js';
|
8
8
|
import { q as queryFeaturesByID, g as getLayerOrTable, b as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-cf05e880.js';
|
9
|
-
import { d as downloadCSV } from './downloadUtils-
|
9
|
+
import { d as downloadCSV } from './downloadUtils-4577cf8b.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
import './interfaces-586e863c.js';
|
@@ -1379,35 +1379,47 @@ const LayerTable = class {
|
|
1379
1379
|
* @returns a list of column templates if they exist
|
1380
1380
|
*/
|
1381
1381
|
_getColumnTemplates(id, fieldInfos) {
|
1382
|
-
var _a;
|
1383
|
-
let
|
1384
|
-
(_a = this.mapInfo
|
1385
|
-
if (
|
1386
|
-
|
1382
|
+
var _a, _b;
|
1383
|
+
let layerOption;
|
1384
|
+
(_b = (_a = this.mapInfo) === null || _a === void 0 ? void 0 : _a.layerOptions) === null || _b === void 0 ? void 0 : _b.layers.some(l => {
|
1385
|
+
if (l.id === id) {
|
1386
|
+
layerOption = l;
|
1387
1387
|
return true;
|
1388
1388
|
}
|
1389
1389
|
});
|
1390
|
-
|
1390
|
+
const fieldOrder = (layerOption === null || layerOption === void 0 ? void 0 : layerOption.fields) && (layerOption === null || layerOption === void 0 ? void 0 : layerOption.fieldOrder) ?
|
1391
|
+
layerOption.fieldOrder.filter(f => layerOption.fields.indexOf(f) > -1) :
|
1392
|
+
undefined;
|
1393
|
+
let columnTemplates;
|
1391
1394
|
if (fieldInfos) {
|
1392
|
-
columnTemplates =
|
1393
|
-
fieldInfos.
|
1394
|
-
if (
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1395
|
+
columnTemplates = layerOption && (layerOption === null || layerOption === void 0 ? void 0 : layerOption.fields)
|
1396
|
+
? fieldInfos.reduce((prev, cur) => {
|
1397
|
+
if (layerOption.fields.indexOf(cur.name) > -1) {
|
1398
|
+
const template = {
|
1399
|
+
type: "field",
|
1400
|
+
fieldName: cur.name,
|
1401
|
+
label: cur.alias,
|
1402
|
+
menuConfig: this._getMenuConfig(cur.name)
|
1403
|
+
};
|
1404
|
+
prev.push(template);
|
1398
1405
|
}
|
1406
|
+
return prev;
|
1407
|
+
}, []).sort(this._sortFields.bind(this, layerOption === null || layerOption === void 0 ? void 0 : layerOption.fieldOrder))
|
1408
|
+
: fieldInfos.map(fieldInfo => {
|
1409
|
+
return {
|
1410
|
+
type: "field",
|
1411
|
+
fieldName: fieldInfo.name,
|
1412
|
+
label: fieldInfo.alias,
|
1413
|
+
menuConfig: this._getMenuConfig(fieldInfo.name)
|
1414
|
+
};
|
1399
1415
|
});
|
1400
|
-
return columnTemplate;
|
1401
|
-
}) : fieldInfos.map(fieldInfo => {
|
1402
|
-
return {
|
1403
|
-
type: "field",
|
1404
|
-
fieldName: fieldInfo.name,
|
1405
|
-
label: fieldInfo.alias,
|
1406
|
-
menuConfig: this._getMenuConfig(fieldInfo.name)
|
1407
|
-
};
|
1408
|
-
});
|
1409
1416
|
}
|
1410
|
-
return
|
1417
|
+
return fieldOrder ?
|
1418
|
+
columnTemplates === null || columnTemplates === void 0 ? void 0 : columnTemplates.sort(this._sortFields.bind(this, fieldOrder)) :
|
1419
|
+
columnTemplates;
|
1420
|
+
}
|
1421
|
+
_sortFields(sorter, a, b) {
|
1422
|
+
return (sorter === null || sorter === void 0 ? void 0 : sorter.indexOf(a.fieldName)) - sorter.indexOf(b.fieldName);
|
1411
1423
|
}
|
1412
1424
|
/**
|
1413
1425
|
* Get the menu config that adds the ability to hide the current column
|
@@ -1508,7 +1508,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
1508
1508
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1509
1509
|
* ====================================================================
|
1510
1510
|
*/
|
1511
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
1511
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-a28dad8e.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
|
1512
1512
|
/** ====================================================================
|
1513
1513
|
* @license
|
1514
1514
|
* jsPDF XMP metadata plugin
|
@@ -3082,7 +3082,7 @@ async function _prepareLabelsFromPattern(layer, featureSet, attributeOrigNames,
|
|
3082
3082
|
const match = arcadeExpressionMatches[i];
|
3083
3083
|
const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
|
3084
3084
|
const value = await arcadeExecutors[expressionName].executeAsync({ "$feature": feature, "$layer": layer });
|
3085
|
-
labelPrep = labelPrep.replace(match, value);
|
3085
|
+
labelPrep = labelPrep.replace(match, value).replace(/\n/gi, "|");
|
3086
3086
|
}
|
3087
3087
|
// Replace non-Arcade fields in this feature
|
3088
3088
|
const attributeValues = (_a = feature.attributes) !== null && _a !== void 0 ? _a : feature;
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-4577cf8b.js';
|
8
8
|
import './index-7183ce4a.js';
|
9
9
|
import './locale-731e75a8.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
@@ -8,7 +8,7 @@ import { a as getComponentClosestLanguage, l as loadModules, g as getLocaleCompo
|
|
8
8
|
import { b as goToSelection, h as highlightFeatures, j as queryObjectIds, k as getQueryGeoms, c as getFeatureLayerView, l as queryFeaturesByGeometry, m as getIdSets, n as highlightAllFeatures } from './mapViewUtils-cf05e880.js';
|
9
9
|
import { a as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-586e863c.js';
|
10
10
|
import { s as state } from './publicNotificationStore-9362d7ae.js';
|
11
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
11
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-4577cf8b.js';
|
12
12
|
import './esri-loader-eda07632.js';
|
13
13
|
import './_commonjsHelpers-d5f9d613.js';
|
14
14
|
import './index-857df22e.js';
|
@@ -8,7 +8,7 @@ import { b as EExportType, c as EPageType, a as EWorkflowType } from './interfac
|
|
8
8
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-731e75a8.js';
|
9
9
|
import { b as goToSelection, h as highlightFeatures } from './mapViewUtils-cf05e880.js';
|
10
10
|
import { s as state } from './publicNotificationStore-9362d7ae.js';
|
11
|
-
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-
|
11
|
+
import { c as consolidateLabels, r as removeDuplicateLabels } from './downloadUtils-4577cf8b.js';
|
12
12
|
import './esri-loader-eda07632.js';
|
13
13
|
import './_commonjsHelpers-d5f9d613.js';
|
14
14
|
import './index-857df22e.js';
|
@@ -1,12 +1,10 @@
|
|
1
1
|
<html>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<title>Crowdsource Manager</title>
|
9
|
-
<!--
|
2
|
+
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
6
|
+
<title>Crowdsource Manager</title>
|
7
|
+
<!--
|
10
8
|
| Copyright 2022 Esri
|
11
9
|
|
|
12
10
|
| Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -21,164 +19,188 @@
|
|
21
19
|
| See the License for the specific language governing permissions and
|
22
20
|
| limitations under the License.
|
23
21
|
-->
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
<style>
|
23
|
+
.crowdsource {
|
24
|
+
height: 100vh;
|
25
|
+
width: 100vw;
|
26
|
+
display: flex;
|
27
|
+
}
|
28
|
+
</style>
|
31
29
|
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
<link rel="stylesheet" href="https://jsdev.arcgis.com/4.29/esri/themes/light/main.css" />
|
31
|
+
<!-- <link rel="stylesheet" href="https://jsdev.arcgis.com/4.29/esri/themes/dark/main.css" /> -->
|
32
|
+
<link rel="stylesheet" type="text/css" href="https://js.arcgis.com/calcite-components/2.0.0/calcite.css" />
|
35
33
|
|
36
|
-
|
37
|
-
|
34
|
+
<link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
|
35
|
+
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
38
36
|
|
39
|
-
|
40
|
-
|
37
|
+
<script src="https://jsdev.arcgis.com/4.29/"></script>
|
38
|
+
<script type="module" src="../solutions-components.esm.js"></script>
|
41
39
|
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
<script>
|
41
|
+
function addValues() {
|
42
|
+
const demo = document.getElementById("demo");
|
45
43
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
}
|
69
|
-
});
|
70
|
-
|
71
|
-
if (!headerSet) {
|
72
|
-
// Want the header to be disabled by default for IA
|
73
|
-
// Want the header to be enabled by default for the demo app
|
74
|
-
demo.hideHeader = false;
|
44
|
+
let headerSet = false;
|
45
|
+
let custom = [];
|
46
|
+
var vars = window.location.search.substring(1).split('&');
|
47
|
+
vars.forEach((param) => {
|
48
|
+
let vals = param.split('=');
|
49
|
+
const v = vals[1];
|
50
|
+
switch (vals[0]) {
|
51
|
+
case "id":
|
52
|
+
custom = [{
|
53
|
+
id: v,
|
54
|
+
name: "Map from URL"
|
55
|
+
}];
|
56
|
+
break;
|
57
|
+
case "zoomAndScrollToSelected":
|
58
|
+
demo.zoomAndScrollToSelected = v.toLocaleLowerCase() === "true";
|
59
|
+
break;
|
60
|
+
case "hideHeader":
|
61
|
+
demo.hideHeader = v.toLocaleLowerCase() === "true";
|
62
|
+
headerSet = true;
|
63
|
+
break;
|
64
|
+
default:
|
65
|
+
break;
|
75
66
|
}
|
67
|
+
});
|
76
68
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
name: "Popup Configured Map",
|
82
|
-
filterConfig: {
|
83
|
-
mapId: "ce3dec81bf714d3bb71da9691ab686d1",
|
84
|
-
layerExpressions: [
|
85
|
-
{
|
86
|
-
id: "Requests_681",
|
87
|
-
title: "Requests",
|
88
|
-
operator: " AND ",
|
89
|
-
expressions: [
|
90
|
-
{
|
91
|
-
definitionExpression: "OBJECTID > 690",
|
92
|
-
id: 1701793260225,
|
93
|
-
index: 0,
|
94
|
-
name: "greater than 690",
|
95
|
-
active: false
|
96
|
-
}
|
97
|
-
]
|
98
|
-
}, {
|
99
|
-
id: "Requets_6608",
|
100
|
-
title: "Comments",
|
101
|
-
operator: " AND ",
|
102
|
-
expressions: [
|
103
|
-
{
|
104
|
-
definitionExpression: "OBJECTID > 1",
|
105
|
-
id: 1701793260226,
|
106
|
-
index: 0,
|
107
|
-
name: "greater than 1",
|
108
|
-
active: false
|
109
|
-
}
|
110
|
-
]
|
111
|
-
}
|
112
|
-
]
|
113
|
-
}
|
114
|
-
// filters: {},
|
115
|
-
// layerInfos: [{
|
116
|
-
// id: "Requests_681",
|
117
|
-
// columnTemplates: [{
|
118
|
-
// type: "field",
|
119
|
-
// fieldName: "ObjectId",
|
120
|
-
// visible: false
|
121
|
-
// }, {
|
122
|
-
// type: "field",
|
123
|
-
// fieldName: "reqcategory",
|
124
|
-
// label: "Request ID",
|
125
|
-
// visible: true
|
126
|
-
// }]
|
127
|
-
// }, {
|
128
|
-
// id: "Requets_6608",
|
129
|
-
// columnTemplates: [{
|
130
|
-
// type: "field",
|
131
|
-
// fieldName: "requestglobalid",
|
132
|
-
// visible: false
|
133
|
-
// }, {
|
134
|
-
// type: "field",
|
135
|
-
// fieldName: "comments",
|
136
|
-
// label: "Comments",
|
137
|
-
// visible: true
|
138
|
-
// }]
|
139
|
-
// }]
|
140
|
-
}, {
|
141
|
-
id: "863e4f6f2a7840db896cc1b1606d552d",
|
142
|
-
name: "IA map"
|
143
|
-
}, {
|
144
|
-
id: "3715f4899bea4b2a948347c5c2357e58",
|
145
|
-
name: "PN Map"
|
146
|
-
}, {
|
147
|
-
id: "4fa949c89bb04ecb8a9f5ad119448333",
|
148
|
-
name: "CS TIL DATA"
|
149
|
-
}, {
|
150
|
-
id: "f5b01c17a09941eaad63e7b4e6c7d880",
|
151
|
-
name: "Attachments Map"
|
152
|
-
}, {
|
153
|
-
id: "b422923b7a4c4958b9788118255f2f0a",
|
154
|
-
name: "Floor aware map"
|
155
|
-
}, {
|
156
|
-
id: "5dc8ae351ff34280a75f7ffe1115b36b",
|
157
|
-
name: "Standalone table",
|
158
|
-
filterConfig: {
|
159
|
-
"mapId": "5dc8ae351ff34280a75f7ffe1115b36b",
|
160
|
-
"layerExpressions": [{
|
161
|
-
"id": "18c4a8cda15-layer-2",
|
162
|
-
"title": "Table_1",
|
163
|
-
"operator": " AND ",
|
164
|
-
"expressions": [{
|
165
|
-
"definitionExpression": "OBJECTID > 14",
|
166
|
-
"id": 1702486334825,
|
167
|
-
"index": 0,
|
168
|
-
"name": "> 14",
|
169
|
-
"active": false
|
170
|
-
}]
|
171
|
-
}]
|
172
|
-
}
|
173
|
-
}]
|
174
|
-
];
|
69
|
+
if (!headerSet) {
|
70
|
+
// Want the header to be disabled by default for IA
|
71
|
+
// Want the header to be enabled by default for the demo app
|
72
|
+
demo.hideHeader = false;
|
175
73
|
}
|
176
|
-
</script>
|
177
|
-
</head>
|
178
74
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
75
|
+
demo.mapInfos = [
|
76
|
+
...custom,
|
77
|
+
...[{
|
78
|
+
id: "ce3dec81bf714d3bb71da9691ab686d1",
|
79
|
+
name: "Popup Configured Map",
|
80
|
+
filterConfig: {
|
81
|
+
mapId: "ce3dec81bf714d3bb71da9691ab686d1",
|
82
|
+
layerExpressions: [
|
83
|
+
{
|
84
|
+
id: "Requests_681",
|
85
|
+
title: "Requests",
|
86
|
+
operator: " AND ",
|
87
|
+
expressions: [
|
88
|
+
{
|
89
|
+
definitionExpression: "OBJECTID > 690",
|
90
|
+
id: 1701793260225,
|
91
|
+
index: 0,
|
92
|
+
name: "greater than 690",
|
93
|
+
active: false
|
94
|
+
}
|
95
|
+
]
|
96
|
+
}, {
|
97
|
+
id: "Requets_6608",
|
98
|
+
title: "Comments",
|
99
|
+
operator: " AND ",
|
100
|
+
expressions: [
|
101
|
+
{
|
102
|
+
definitionExpression: "OBJECTID > 1",
|
103
|
+
id: 1701793260226,
|
104
|
+
index: 0,
|
105
|
+
name: "greater than 1",
|
106
|
+
active: false
|
107
|
+
}
|
108
|
+
]
|
109
|
+
}
|
110
|
+
]
|
111
|
+
}
|
112
|
+
}, {
|
113
|
+
id: "863e4f6f2a7840db896cc1b1606d552d",
|
114
|
+
name: "IA map"
|
115
|
+
}, {
|
116
|
+
id: "3715f4899bea4b2a948347c5c2357e58",
|
117
|
+
name: "PN Map"
|
118
|
+
}, {
|
119
|
+
id: "4fa949c89bb04ecb8a9f5ad119448333",
|
120
|
+
name: "CS TIL DATA"
|
121
|
+
}, {
|
122
|
+
id: "f5b01c17a09941eaad63e7b4e6c7d880",
|
123
|
+
name: "Attachments Map"
|
124
|
+
}, {
|
125
|
+
id: "b422923b7a4c4958b9788118255f2f0a",
|
126
|
+
name: "Floor aware map"
|
127
|
+
}, {
|
128
|
+
id: "5dc8ae351ff34280a75f7ffe1115b36b",
|
129
|
+
name: "Standalone table",
|
130
|
+
filterConfig: {
|
131
|
+
mapId: "5dc8ae351ff34280a75f7ffe1115b36b",
|
132
|
+
layerExpressions: [{
|
133
|
+
id: "18c4a8cda15-layer-2",
|
134
|
+
title: "Table_1",
|
135
|
+
operator: " AND ",
|
136
|
+
expressions: [{
|
137
|
+
definitionExpression: "OBJECTID > 14",
|
138
|
+
id: 1702486334825,
|
139
|
+
index: 0,
|
140
|
+
name: "> 14",
|
141
|
+
active: false
|
142
|
+
}]
|
143
|
+
}]
|
144
|
+
}
|
145
|
+
}, {
|
146
|
+
id: "91e220910a994da4abfb0d1763d64ecb",
|
147
|
+
name: "EditMultiLayers",
|
148
|
+
visible: true,
|
149
|
+
layerOptions: {
|
150
|
+
layers: [{
|
151
|
+
id: "18b1fb85a29-layer-3",
|
152
|
+
fields: [
|
153
|
+
"OBJECTID", "a", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "c"
|
154
|
+
],
|
155
|
+
fieldOrder: [
|
156
|
+
"c", "b", "a", "OBJECTID", "Shape__Area", "Shape__Length", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"
|
157
|
+
]
|
158
|
+
}, {
|
159
|
+
id: "18b1fb862df-layer-4",
|
160
|
+
fields: ["OBJECTID", "test"],
|
161
|
+
fieldOrder: ["test", "OBJECTID"]
|
162
|
+
}, {
|
163
|
+
id: "18b1fb82f0e-layer-2",
|
164
|
+
fields: [
|
165
|
+
"URL", "Avg_Stars", "Your_Stars", "Route_Type", "Rating", "Pitches", "Length", "Area_Latitude", "Area_Longitude", "ObjectId"
|
166
|
+
],
|
167
|
+
fieldOrder: [
|
168
|
+
"Your_Stars", "Route", "Location", "URL", "Avg_Stars", "Route_Type", "Rating", "Pitches", "Length", "Area_Latitude", "Area_Longitude", "ObjectId"
|
169
|
+
]
|
170
|
+
}],
|
171
|
+
mapId: "91e220910a994da4abfb0d1763d64ecb"
|
172
|
+
}
|
173
|
+
}, {
|
174
|
+
id: "7197542839d948258c7862b33f9d96ad",
|
175
|
+
name: "EditPolymap",
|
176
|
+
visible: true
|
177
|
+
}, {
|
178
|
+
id: "fbe7bb1907f34d5aa8771ad6475a1dfe",
|
179
|
+
name: "Mountain Project",
|
180
|
+
visible: true,
|
181
|
+
layerOptions: {
|
182
|
+
layers: [{
|
183
|
+
id: "18a6ffdeae9-layer-2",
|
184
|
+
fields: [
|
185
|
+
"URL", "Avg_Stars", "Your_Stars", "Route_Type", "Rating", "Pitches", "Length", "Area_Latitude", "Area_Longitude", "ObjectId"
|
186
|
+
],
|
187
|
+
fieldOrder: [
|
188
|
+
"Avg_Stars", "Route", "Location", "URL", "Your_Stars", "Route_Type", "Rating", "Pitches", "Length", "Area_Latitude", "Area_Longitude", "ObjectId"
|
189
|
+
]
|
190
|
+
}],
|
191
|
+
mapId: "fbe7bb1907f34d5aa8771ad6475a1dfe"
|
192
|
+
}
|
193
|
+
}]
|
194
|
+
];
|
195
|
+
}
|
196
|
+
</script>
|
197
|
+
</head>
|
198
|
+
|
199
|
+
<!-- <body class="calcite-mode-dark" onload="addValues()"> -->
|
200
|
+
|
201
|
+
<body onload="addValues()">
|
202
|
+
<crowdsource-manager id="demo" class="crowdsource" />
|
203
|
+
<!-- <crowdsource-manager id="demo" class="crowdsource" theme="dark"/> -->
|
204
|
+
</body>
|
205
|
+
|
184
206
|
</html>
|