@esri/solutions-components 0.7.20 → 0.7.21
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/dist/assets/t9n/public-notification/resources.json +2 -1
- package/dist/assets/t9n/public-notification/resources_en.json +2 -1
- package/dist/cjs/card-manager_3.cjs.entry.js +30 -3
- package/dist/cjs/crowdsource-manager.cjs.entry.js +10 -10
- package/dist/cjs/{downloadUtils-9a13c6ac.js → downloadUtils-401356b5.js} +5 -3
- package/dist/cjs/{index.es-284a020c.js → index.es-a9a4ff08.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +7 -4
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +29 -11
- package/dist/collection/components/layer-table/layer-table.js +59 -11
- package/dist/collection/components/public-notification/public-notification.js +7 -3
- package/dist/collection/utils/pdfUtils.js +4 -2
- package/dist/collection/utils/pdfUtils.ts +4 -2
- package/dist/components/crowdsource-manager.js +13 -12
- package/dist/components/downloadUtils.js +4 -2
- package/dist/components/layer-table2.js +31 -3
- package/dist/components/public-notification.js +7 -3
- package/dist/esm/card-manager_3.entry.js +30 -3
- package/dist/esm/crowdsource-manager.entry.js +10 -10
- package/dist/esm/{downloadUtils-a4bbdb1d.js → downloadUtils-13579d93.js} +5 -3
- package/dist/esm/{index.es-48fdb288.js → index.es-04d2e63e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +7 -4
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-02fad071.entry.js +6 -0
- package/dist/solutions-components/{p-b1422b00.entry.js → p-24286e8c.entry.js} +1 -1
- package/dist/solutions-components/p-5302f406.entry.js +6 -0
- package/dist/solutions-components/{p-72dbfa77.js → p-c68a6d4f.js} +1 -1
- package/dist/solutions-components/{p-d4afcf86.js → p-c9f87acb.js} +2 -2
- package/dist/solutions-components/p-d3085b7a.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/pdfUtils.ts +4 -2
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +13 -4
- package/dist/types/components/layer-table/layer-table.d.ts +14 -5
- package/dist/types/components/public-notification/public-notification.d.ts +4 -0
- package/dist/types/components.d.ts +18 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-107b7816.entry.js +0 -6
- package/dist/solutions-components/p-2abc02a1.entry.js +0 -6
- package/dist/solutions-components/p-6b4e621b.entry.js +0 -6
@@ -7,7 +7,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-834c52c6.js';
|
8
8
|
import { q as queryFeaturesByID, a as getLayerOrTable, g as goToSelection, b as queryFeatureIds, c as queryAllIds, d as queryFeaturesByGlobalID } from './mapViewUtils-8fe70944.js';
|
9
9
|
import { l as loadModules } from './loadModules-cea493da.js';
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
10
|
+
import { d as downloadCSV } from './downloadUtils-13579d93.js';
|
11
11
|
import './esri-loader-eda07632.js';
|
12
12
|
import './_commonjsHelpers-d5f9d613.js';
|
13
13
|
import './interfaces-341e3ab3.js';
|
@@ -117,6 +117,10 @@ const LayerTable = class {
|
|
117
117
|
* boolean: When true the ctrl key is currently pressed
|
118
118
|
*/
|
119
119
|
this._ctrlIsPressed = false;
|
120
|
+
/**
|
121
|
+
* boolean: When true the default filter provided via url param has been honored and should now be ignored
|
122
|
+
*/
|
123
|
+
this._defaultFilterHonored = false;
|
120
124
|
/**
|
121
125
|
* boolean: When true the default global id provided via url param has been honored and should now be ignored
|
122
126
|
*/
|
@@ -150,8 +154,9 @@ const LayerTable = class {
|
|
150
154
|
this.onTableNodeCreate = (node) => {
|
151
155
|
this._tableNode = node;
|
152
156
|
};
|
153
|
-
this.
|
157
|
+
this.defaultFilter = undefined;
|
154
158
|
this.defaultGlobalId = undefined;
|
159
|
+
this.defaultLayerId = undefined;
|
155
160
|
this.defaultOid = undefined;
|
156
161
|
this.enableAutoRefresh = undefined;
|
157
162
|
this.enableColumnReorder = true;
|
@@ -824,6 +829,19 @@ const LayerTable = class {
|
|
824
829
|
if (((_d = this._selectedIndexes) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
825
830
|
urlObj.searchParams.set("oid", this._selectedIndexes.join(","));
|
826
831
|
}
|
832
|
+
if (this._filterActive) {
|
833
|
+
const filter = JSON.parse(this._filterList.urlParams.get("filter"));
|
834
|
+
const layerExpressions = this._filterList.layerExpressions.map(layerExp => {
|
835
|
+
layerExp.expressions = layerExp.expressions.map(exp => {
|
836
|
+
if (exp.id.toString() === filter.expressionId.toString()) {
|
837
|
+
exp.active = true;
|
838
|
+
}
|
839
|
+
return exp;
|
840
|
+
});
|
841
|
+
return layerExp;
|
842
|
+
});
|
843
|
+
urlObj.searchParams.set("filter", JSON.stringify(layerExpressions));
|
844
|
+
}
|
827
845
|
this._shareNode.shareUrl = urlObj.href;
|
828
846
|
}
|
829
847
|
/**
|
@@ -945,7 +963,8 @@ const LayerTable = class {
|
|
945
963
|
const _end = this._table.viewModel.getObjectIdIndex(this._currentId);
|
946
964
|
const startIndex = _start < _end ? _start : _end;
|
947
965
|
const endIndex = _end > _start ? _end : _start;
|
948
|
-
this.
|
966
|
+
this._skipOnChange = startIndex + 1 !== endIndex;
|
967
|
+
const selectedIndexes = oids.reduce((prev, cur) => {
|
949
968
|
const id = cur;
|
950
969
|
const index = this._table.viewModel.getObjectIdIndex(id);
|
951
970
|
if ((id === this._currentId || id === this._previousCurrentId)) {
|
@@ -967,6 +986,7 @@ const LayerTable = class {
|
|
967
986
|
}
|
968
987
|
return prev;
|
969
988
|
}, []);
|
989
|
+
this._selectedIndexes = _start < _end ? selectedIndexes.reverse() : selectedIndexes;
|
970
990
|
this._table.highlightIds.addMany(this._selectedIndexes.filter(i => ids.indexOf(i) < 0));
|
971
991
|
}
|
972
992
|
}
|
@@ -1029,6 +1049,11 @@ const LayerTable = class {
|
|
1029
1049
|
}
|
1030
1050
|
this._defaultGlobalIdHonored = true;
|
1031
1051
|
}
|
1052
|
+
if (!this._defaultFilterHonored && this.defaultFilter && this._filterList) {
|
1053
|
+
this._layerExpressions = this.defaultFilter;
|
1054
|
+
this._filterActive = true;
|
1055
|
+
this._defaultFilterHonored = true;
|
1056
|
+
}
|
1032
1057
|
});
|
1033
1058
|
this._showOnlySelected = false;
|
1034
1059
|
this._sortActive = false;
|
@@ -1144,12 +1169,14 @@ const LayerTable = class {
|
|
1144
1169
|
*/
|
1145
1170
|
_handleFilterListReset() {
|
1146
1171
|
this._filterActive = false;
|
1172
|
+
this._updateShareUrl();
|
1147
1173
|
}
|
1148
1174
|
/**
|
1149
1175
|
* Check if the layers definitionExpression has been modified
|
1150
1176
|
*/
|
1151
1177
|
_handleFilterUpdate() {
|
1152
1178
|
this._filterActive = this._definitionExpression !== this._layer.definitionExpression;
|
1179
|
+
this._updateShareUrl();
|
1153
1180
|
}
|
1154
1181
|
/**
|
1155
1182
|
* Close the filter modal
|
@@ -20,6 +20,7 @@ const CrowdsourceManager = class {
|
|
20
20
|
*/
|
21
21
|
this._shouldSetMapView = false;
|
22
22
|
this.defaultCenter = "";
|
23
|
+
this.defaultFilter = "";
|
23
24
|
this.defaultGlobalId = "";
|
24
25
|
this.defaultLayer = "";
|
25
26
|
this.defaultLevel = "";
|
@@ -70,6 +71,12 @@ const CrowdsourceManager = class {
|
|
70
71
|
this._defaultCenter = !this.defaultCenter ? undefined :
|
71
72
|
this.defaultCenter.split(";").map(v => parseFloat(v));
|
72
73
|
}
|
74
|
+
/**
|
75
|
+
* Watch for filter url param to be set
|
76
|
+
*/
|
77
|
+
defaultFilterWatchHandler() {
|
78
|
+
this._defaultFilter = JSON.parse(this.defaultFilter);
|
79
|
+
}
|
73
80
|
/**
|
74
81
|
* Watch for globalid url param to be set
|
75
82
|
*/
|
@@ -96,13 +103,6 @@ const CrowdsourceManager = class {
|
|
96
103
|
enableZoomWatchHandler() {
|
97
104
|
this._initMapZoom();
|
98
105
|
}
|
99
|
-
/**
|
100
|
-
* Show the map, popup, and table if the user switches out of mobile mode
|
101
|
-
*/
|
102
|
-
async _isMobileWatchHandler() {
|
103
|
-
const show = !this._isMobile ? false : this._numSelected > 0;
|
104
|
-
this.showHideMapPopupAndTable(show);
|
105
|
-
}
|
106
106
|
//--------------------------------------------------------------------------
|
107
107
|
//
|
108
108
|
// Methods (public)
|
@@ -381,7 +381,7 @@ const CrowdsourceManager = class {
|
|
381
381
|
const toggleLayout = layoutMode === ELayoutMode.HORIZONTAL ? "horizontal" : "vertical";
|
382
382
|
const toggleSlot = layoutMode === ELayoutMode.HORIZONTAL ? "header" : "panel-start";
|
383
383
|
const hasMapAndLayer = this.defaultWebmap && this.defaultLayer;
|
384
|
-
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
384
|
+
return (h("calcite-shell", { class: `${tableSizeClass} ${tableClass} border-bottom` }, !this._isMobile ? (h("calcite-action-bar", { class: "border-sides", expandDisabled: true, layout: toggleLayout, slot: toggleSlot }, h("calcite-action", { class: "toggle-node", icon: icon, id: id, onClick: () => this._toggleLayout(), text: "" }), h("calcite-tooltip", { label: tooltip, placement: "bottom", "reference-element": id }, h("span", null, tooltip)))) : undefined, h("div", { class: `width-full height-full position-relative` }, h("layer-table", { defaultFilter: hasMapAndLayer ? this._defaultFilter : undefined, defaultGlobalId: hasMapAndLayer ? this._defaultGlobalId : undefined, defaultLayerId: hasMapAndLayer ? this.defaultLayer : "", defaultOid: hasMapAndLayer && !this.defaultGlobalId ? this._defaultOid : undefined, enableAutoRefresh: this.enableAutoRefresh, enableCSV: this.enableCSV, enableColumnReorder: this.enableColumnReorder, enableInlineEdit: this.enableInlineEdit, enableShare: this.enableShare, isMobile: this._isMobile, mapInfo: this._mapInfo, mapView: this === null || this === void 0 ? void 0 : this._mapView, onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, ref: (el) => this._layerTable = el, shareIncludeEmbed: this.shareIncludeEmbed, shareIncludeSocial: this.shareIncludeSocial, showNewestFirst: this.showNewestFirst, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))));
|
385
385
|
}
|
386
386
|
/**
|
387
387
|
* Update the component layout when its size changes
|
@@ -473,11 +473,11 @@ const CrowdsourceManager = class {
|
|
473
473
|
get el() { return getElement(this); }
|
474
474
|
static get watchers() { return {
|
475
475
|
"defaultCenter": ["defaultCenterWatchHandler"],
|
476
|
+
"defaultFilter": ["defaultFilterWatchHandler"],
|
476
477
|
"defaultGlobalId": ["defaultGlobalIdWatchHandler"],
|
477
478
|
"defaultOid": ["defaultOidWatchHandler"],
|
478
479
|
"defaultLevel": ["defaultLevelWatchHandler"],
|
479
|
-
"enableZoom": ["enableZoomWatchHandler"]
|
480
|
-
"_isMobile": ["_isMobileWatchHandler"]
|
480
|
+
"enableZoom": ["enableZoomWatchHandler"]
|
481
481
|
}; }
|
482
482
|
};
|
483
483
|
CrowdsourceManager.style = crowdsourceManagerCss;
|
@@ -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-04d2e63e.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
|
@@ -2231,8 +2231,10 @@ function downloadPDFFile(filename, labels, labelPageDescription, title = "", ini
|
|
2231
2231
|
if (title) {
|
2232
2232
|
labeller.drawSupplementalText(title, 0, -0.1);
|
2233
2233
|
}
|
2234
|
-
|
2235
|
-
|
2234
|
+
if (labels.length > 0) {
|
2235
|
+
pdfLib.addPage();
|
2236
|
+
++startingPageNum;
|
2237
|
+
}
|
2236
2238
|
}
|
2237
2239
|
// Add the labels to the PDF
|
2238
2240
|
await labeller.addLabelsToDoc(labels, labelSpec, startingPageNum, title // heading
|
@@ -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-13579d93.js';
|
8
8
|
import './index-7183ce4a.js';
|
9
9
|
import './loadModules-cea493da.js';
|
10
10
|
import './esri-loader-eda07632.js';
|