@esri/solutions-components 0.7.39 → 0.7.41
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-alert_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-combobox_5.cjs.entry.js +1 -1
- package/dist/cjs/calcite-flow_5.cjs.entry.js +4 -2
- package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +70 -31
- package/dist/cjs/card-manager_3.cjs.entry.js +29 -13
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +15 -4
- package/dist/cjs/{downloadUtils-c22a71da.js → downloadUtils-b10e3b8c.js} +2 -2
- package/dist/cjs/{index.es-8d317f5e.js → index.es-b9d6eff6.js} +2 -2
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-export.cjs.entry.js +20 -21
- package/dist/cjs/instant-apps-header.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-splash.cjs.entry.js +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-cd29b129.js → mapViewUtils-290dbc9e.js} +4 -0
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.css +19 -19
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +48 -3
- package/dist/collection/components/layer-list/layer-list.js +3 -1
- package/dist/collection/components/layer-table/layer-table.js +28 -11
- package/dist/collection/components/map-fullscreen/map-fullscreen.css +19 -19
- package/dist/collection/components/map-legend/map-legend.css +3 -3
- package/dist/collection/demos/crowdsource-reporter.html +5 -2
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/collection/utils/queryUtils.js +4 -0
- package/dist/collection/utils/queryUtils.ts +5 -0
- package/dist/components/crowdsource-reporter.js +16 -3
- package/dist/components/instant-apps-export.js +20 -21
- package/dist/components/instant-apps-filter-list2.js +70 -31
- package/dist/components/instant-apps-header2.js +1 -1
- package/dist/components/instant-apps-language-switcher.js +3 -3
- package/dist/components/instant-apps-language-translator-item2.js +5 -4
- package/dist/components/instant-apps-language-translator2.js +1 -1
- package/dist/components/instant-apps-splash.js +3 -7
- package/dist/components/layer-list2.js +3 -1
- package/dist/components/layer-table2.js +28 -11
- package/dist/components/queryUtils.js +4 -0
- package/dist/esm/calcite-alert_4.entry.js +1 -1
- package/dist/esm/calcite-combobox_5.entry.js +1 -1
- package/dist/esm/calcite-flow_5.entry.js +4 -2
- package/dist/esm/calcite-input-date-picker_3.entry.js +70 -31
- package/dist/esm/card-manager_3.entry.js +29 -13
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +15 -4
- package/dist/esm/{downloadUtils-985dcd1c.js → downloadUtils-20d22198.js} +2 -2
- package/dist/esm/{index.es-03d8386e.js → index.es-8b85f68d.js} +2 -2
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +5 -4
- package/dist/esm/instant-apps-export.entry.js +20 -21
- package/dist/esm/instant-apps-header.entry.js +1 -1
- package/dist/esm/instant-apps-language-switcher.entry.js +3 -3
- package/dist/esm/instant-apps-language-translator.entry.js +1 -1
- package/dist/esm/instant-apps-splash.entry.js +3 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-257bc9b3.js → mapViewUtils-a177d4f9.js} +4 -0
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +8 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +3 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-splash/instant-apps-splash.css +3 -0
- package/dist/solutions-components/demos/crowdsource-reporter.html +5 -2
- package/dist/solutions-components/{p-8571c89f.entry.js → p-044cd52c.entry.js} +1 -1
- package/dist/solutions-components/{p-df048b47.js → p-17e328bb.js} +1 -1
- package/dist/solutions-components/{p-12492469.entry.js → p-2283ae14.entry.js} +1 -1
- package/dist/solutions-components/p-2f017ad2.entry.js +6 -0
- package/dist/solutions-components/{p-20b206f3.entry.js → p-32adb2cc.entry.js} +1 -1
- package/dist/solutions-components/p-3eedaead.js +36 -0
- package/dist/solutions-components/{p-2f840f08.entry.js → p-42233edc.entry.js} +1 -1
- package/dist/solutions-components/p-4742efa8.entry.js +6 -0
- package/dist/solutions-components/p-57087d57.entry.js +17 -0
- package/dist/solutions-components/{p-34eaca46.entry.js → p-69a1df0f.entry.js} +1 -1
- package/dist/solutions-components/{p-23e58d7c.entry.js → p-6c86a392.entry.js} +3 -3
- package/dist/solutions-components/{p-6419f8d7.entry.js → p-6fe5e1d5.entry.js} +1 -1
- package/dist/solutions-components/p-7480ac64.entry.js +6 -0
- package/dist/solutions-components/p-aecf92f4.entry.js +6 -0
- package/dist/solutions-components/p-c6af6407.entry.js +6 -0
- package/dist/solutions-components/p-cacd0307.entry.js +6 -0
- package/dist/solutions-components/p-e2b0b3fa.entry.js +6 -0
- package/dist/solutions-components/{p-00ba5a2a.js → p-f6536eae.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +1 -0
- package/dist/solutions-components/utils/queryUtils.ts +5 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +9 -0
- package/dist/types/components/layer-list/layer-list.d.ts +1 -0
- package/dist/types/components/layer-table/layer-table.d.ts +9 -1
- package/dist/types/components.d.ts +16 -0
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/dist/types/utils/queryUtils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/solutions-components/p-09b48b1b.entry.js +0 -6
- package/dist/solutions-components/p-32fed23c.entry.js +0 -17
- package/dist/solutions-components/p-6a61c742.entry.js +0 -6
- package/dist/solutions-components/p-9161dca9.entry.js +0 -6
- package/dist/solutions-components/p-93369c9f.entry.js +0 -6
- package/dist/solutions-components/p-96f5be25.js +0 -36
- package/dist/solutions-components/p-97425481.entry.js +0 -6
- package/dist/solutions-components/p-ae4c8b8c.entry.js +0 -6
- package/dist/solutions-components/p-eb0f4ede.entry.js +0 -6
@@ -774,7 +774,7 @@ function resetDatePicker(datePicker) {
|
|
774
774
|
}
|
775
775
|
}
|
776
776
|
|
777
|
-
const instantAppsFilterListCss = ":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100
|
777
|
+
const instantAppsFilterListCss = ":host{display:block}.instant-apps-filter-list *{box-sizing:border-box}.instant-apps-filter-list__container{height:100%}.instant-apps-filter-list__container calcite-block:last-of-type{margin-bottom:0}.instant-apps-filter-list__footer{padding:12px;display:flex}.instant-apps-filter-list__footer calcite-button:nth-child(2){margin-left:6px}.instant-apps-filter-list__item-container,.instant-apps-filter-list__item-container--user-input{display:flex;justify-content:space-between;align-items:center}.instant-apps-filter-list__item-container:not(:last-child),.instant-apps-filter-list__item-container--user-input:not(:last-child){padding-bottom:20px}.instant-apps-filter-list__item-container--user-input{margin:0;display:flex;flex-direction:column;align-items:flex-start}.instant-apps-filter-list__item-container--user-input>span{margin:0 0 6px;font-size:14px;font-weight:normal}.instant-apps-filter-list__item-container--user-input calcite-combobox{width:100%;--calcite-font-size--1:16px}.instant-apps-filter-list__item-container--user-input calcite-combobox-item{--calcite-font-size--1:12px}.instant-apps-filter-list__number-input-container{width:100%;display:flex;justify-content:center}.instant-apps-filter-list__number-input-container calcite-slider{width:90%}.instant-apps-filter-list__date-picker-input-container{display:flex;align-items:center;justify-content:unset;width:100%}.instant-apps-filter-list__date-picker-input-container calcite-action{height:64px;border-top:1px solid var(--calcite-color-border-input);border-right:1px solid var(--calcite-color-border-input);border-bottom:1px solid var(--calcite-color-border-input)}.instant-apps-filter-list__title{margin-right:20px}.instant-apps-filter-list__title>p{font-size:14px;font-weight:normal;margin:0}.instant-apps-filter-list__checkbox-container{display:flex}.instant-apps-filter-list__checkbox-container calcite-checkbox{height:18px}.instant-apps-filter-list__operator-description{margin:0;--calcite-font-size--1:12px}.instant-apps-filter-list__zoom-to{display:flex;justify-content:flex-end;margin:8px 0 20px}.instant-apps-filter-list__zoom-to calcite-action{width:-moz-min-content;width:min-content}.instant-apps-filter-list calcite-input-date-picker{--calcite-font-size--1:16px}@media (prefers-reduced-motion){.instant-apps-filter-list calcite-loader{--calcite-internal-duration-factor:2;--calcite-internal-animation-timing-slow:calc(300ms * 2)}}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__header-container{background:#2b2b2b;color:#fff}.instant-apps-filter-list.calcite-mode-dark .instant-apps-filter-list__operator-description{background:#353535}";
|
778
778
|
|
779
779
|
const CSS$1 = {
|
780
780
|
base: 'instant-apps-filter-list',
|
@@ -861,6 +861,7 @@ const InstantAppsFilterList = class {
|
|
861
861
|
this.geometryJsonUtils = geometryJsonUtils;
|
862
862
|
this.reactiveUtils = reactiveUtils;
|
863
863
|
this.locale = intl.getLocale();
|
864
|
+
this.intl = intl;
|
864
865
|
return Promise.resolve();
|
865
866
|
}
|
866
867
|
render() {
|
@@ -892,24 +893,13 @@ const InstantAppsFilterList = class {
|
|
892
893
|
}
|
893
894
|
renderCombobox(layerExpression, expression) {
|
894
895
|
var _a;
|
895
|
-
return (h("label", { key: "combo-select", class: CSS$1.filterUIItemContainer }, h("span", null, expression.name), h("calcite-combobox", { id: expression.id.toString(), onCalciteComboboxChange: this.handleComboSelect.bind(this, expression, layerExpression), label: expression.name, placeholder: expression.placeholder,
|
896
|
+
return (h("label", { key: "combo-select", class: CSS$1.filterUIItemContainer }, h("span", null, expression.name), h("calcite-combobox", { id: expression.id.toString(), onCalciteComboboxChange: this.handleComboSelect.bind(this, expression, layerExpression), label: expression.name, placeholder: expression.placeholder, selectionMode: "multiple", "max-items": "6" }, (_a = expression.fields) === null || _a === void 0 ? void 0 : _a.map((value, index) => this.renderComboboxItem(expression, value, index)))));
|
896
897
|
}
|
897
898
|
renderComboboxItem(expression, value, index) {
|
898
|
-
var _a
|
899
|
-
|
900
|
-
if (expression.type === 'coded-value') {
|
901
|
-
label = (_a = expression.codedValues) === null || _a === void 0 ? void 0 : _a[value];
|
902
|
-
}
|
903
|
-
else if (expression.type === 'number' && typeof value === 'number' && expression.format != null) {
|
904
|
-
if (expression.format.places != null) {
|
905
|
-
label = this.roundNumber(value, expression.format.places);
|
906
|
-
}
|
907
|
-
if (expression.format.digitSeparator) {
|
908
|
-
label = this.numberWithCommas(label);
|
909
|
-
}
|
910
|
-
}
|
899
|
+
var _a;
|
900
|
+
const label = this.createLabel(expression, value);
|
911
901
|
const selectedFields = expression === null || expression === void 0 ? void 0 : expression.selectedFields;
|
912
|
-
const selected = (
|
902
|
+
const selected = (_a = selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.includes(value)) !== null && _a !== void 0 ? _a : false;
|
913
903
|
return h("calcite-combobox-item", { key: `${label}-${index}`, value: value, textLabel: `${label}`, selected: selected });
|
914
904
|
}
|
915
905
|
initFilterConfig() {
|
@@ -941,11 +931,10 @@ const InstantAppsFilterList = class {
|
|
941
931
|
}
|
942
932
|
renderDatePicker(layerExpression, expression) {
|
943
933
|
var _a, _b, _c, _d;
|
944
|
-
const min =
|
945
|
-
const max = convertToDate(expression.max);
|
934
|
+
const { min, max } = expression;
|
946
935
|
const value = [(_a = expression === null || expression === void 0 ? void 0 : expression.range) === null || _a === void 0 ? void 0 : _a.min, (_b = expression === null || expression === void 0 ? void 0 : expression.range) === null || _b === void 0 ? void 0 : _b.max];
|
947
936
|
const check = min != null && max != null;
|
948
|
-
return check ? (h("label", { class: CSS$1.filterUIItemContainer }, h("span", null, expression === null || expression === void 0 ? void 0 : expression.name), h("div", { class: CSS$1.dateInputContainer }, h("calcite-input-date-picker", { id: expression === null || expression === void 0 ? void 0 : expression.id.toString(), onCalciteInputDatePickerChange: this.handleDatePickerRangeChange.bind(this, expression, layerExpression), min: min, max: max,
|
937
|
+
return check ? (h("label", { class: CSS$1.filterUIItemContainer }, h("span", null, expression === null || expression === void 0 ? void 0 : expression.name), h("div", { class: CSS$1.dateInputContainer }, h("calcite-input-date-picker", { id: expression === null || expression === void 0 ? void 0 : expression.id.toString(), onCalciteInputDatePickerChange: this.handleDatePickerRangeChange.bind(this, expression, layerExpression), min: min, max: max, "overlay-positioning": "fixed", lang: (_c = this.locale) !== null && _c !== void 0 ? _c : 'en', layout: "vertical", value: value, range: true }), h("calcite-action", { onClick: this.handleResetDatePicker.bind(this, expression, layerExpression), icon: "reset", text: (_d = this.messages) === null || _d === void 0 ? void 0 : _d.resetDatePicker, scale: "s" })))) : null;
|
949
938
|
}
|
950
939
|
renderFooter() {
|
951
940
|
var _a;
|
@@ -1015,7 +1004,12 @@ const InstantAppsFilterList = class {
|
|
1015
1004
|
this.resetCombobox(expression);
|
1016
1005
|
}
|
1017
1006
|
else if (type === 'date') {
|
1018
|
-
|
1007
|
+
if ((expression === null || expression === void 0 ? void 0 : expression.numDisplayOption) === 'drop-down' || (expression === null || expression === void 0 ? void 0 : expression.displayOption) === 'drop-down') {
|
1008
|
+
this.resetCombobox(expression);
|
1009
|
+
}
|
1010
|
+
else {
|
1011
|
+
this.resetDatePicker(expression);
|
1012
|
+
}
|
1019
1013
|
}
|
1020
1014
|
else if (type === 'number' || type === 'range') {
|
1021
1015
|
if ((expression === null || expression === void 0 ? void 0 : expression.numDisplayOption) === 'drop-down' || (expression === null || expression === void 0 ? void 0 : expression.displayOption) === 'drop-down') {
|
@@ -1091,9 +1085,15 @@ const InstantAppsFilterList = class {
|
|
1091
1085
|
});
|
1092
1086
|
}
|
1093
1087
|
async updateStringExpression(layerExpression, expression) {
|
1094
|
-
const { field } = expression;
|
1088
|
+
const { field, type } = expression;
|
1095
1089
|
const layer = this.findFilterLayer(layerExpression);
|
1096
1090
|
expression.fields = await this.getFeatureAttributes(layer, field);
|
1091
|
+
if (type === 'date') {
|
1092
|
+
const layerField = layer.fields.find(({ name }) => name === field);
|
1093
|
+
if ((layerField === null || layerField === void 0 ? void 0 : layerField.type) === 'date-only') {
|
1094
|
+
expression.dateOnly = true;
|
1095
|
+
}
|
1096
|
+
}
|
1097
1097
|
if (expression === null || expression === void 0 ? void 0 : expression.selectedFields) {
|
1098
1098
|
const selectedFields = expression.selectedFields.map((field) => (typeof field === 'number' ? field : `'${handleSingleQuote(field)}'`));
|
1099
1099
|
expression.definitionExpression = `${field} IN (${selectedFields.join(',')})`;
|
@@ -1354,12 +1354,18 @@ const InstantAppsFilterList = class {
|
|
1354
1354
|
handleComboSelect(expression, layerExpression, event) {
|
1355
1355
|
const combobox = event.target;
|
1356
1356
|
const items = combobox.selectedItems;
|
1357
|
-
const { field } = expression;
|
1357
|
+
const { field, type } = expression;
|
1358
1358
|
if (items && items.length) {
|
1359
1359
|
const values = items.map(({ value }) => (typeof value === 'number' ? value : `'${handleSingleQuote(value)}'`));
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1360
|
+
if (type === 'date') {
|
1361
|
+
expression.selectedFields = items.map(({ value }) => value);
|
1362
|
+
expression.definitionExpression = values.map(value => this.buildDateExpression(value, field)).join(' OR ');
|
1363
|
+
}
|
1364
|
+
else {
|
1365
|
+
expression.selectedFields = items.map(({ value }) => value);
|
1366
|
+
const definitionExpression = `${field} IN (${values.join(',')})`;
|
1367
|
+
expression.definitionExpression = definitionExpression;
|
1368
|
+
}
|
1363
1369
|
expression.active = true;
|
1364
1370
|
}
|
1365
1371
|
else {
|
@@ -1416,20 +1422,20 @@ const InstantAppsFilterList = class {
|
|
1416
1422
|
}
|
1417
1423
|
createURLParamExpression(layerExpression, expression) {
|
1418
1424
|
const { id, range, selectedFields, type } = expression;
|
1419
|
-
if (type === '
|
1425
|
+
if (type === 'string' || type === 'coded-value' || (expression === null || expression === void 0 ? void 0 : expression.numDisplayOption) === 'drop-down' || (expression === null || expression === void 0 ? void 0 : expression.displayOption) === 'drop-down') {
|
1420
1426
|
return {
|
1421
|
-
type: '
|
1427
|
+
type: 'select',
|
1422
1428
|
layerId: layerExpression.id,
|
1423
1429
|
expressionId: id.toString(),
|
1424
|
-
|
1430
|
+
selectedFields,
|
1425
1431
|
};
|
1426
1432
|
}
|
1427
|
-
else if (type === '
|
1433
|
+
else if (type === 'number' || type === 'range' || type === 'date') {
|
1428
1434
|
return {
|
1429
|
-
type: '
|
1435
|
+
type: 'range',
|
1430
1436
|
layerId: layerExpression.id,
|
1431
1437
|
expressionId: id.toString(),
|
1432
|
-
|
1438
|
+
range,
|
1433
1439
|
};
|
1434
1440
|
}
|
1435
1441
|
else {
|
@@ -1725,6 +1731,39 @@ const InstantAppsFilterList = class {
|
|
1725
1731
|
return layer;
|
1726
1732
|
}
|
1727
1733
|
}
|
1734
|
+
createLabel(expression, value) {
|
1735
|
+
var _a;
|
1736
|
+
let label = value;
|
1737
|
+
if (expression.type === 'coded-value') {
|
1738
|
+
label = (_a = expression.codedValues) === null || _a === void 0 ? void 0 : _a[value];
|
1739
|
+
}
|
1740
|
+
else if (expression.type === 'number' && typeof value === 'number' && expression.format != null) {
|
1741
|
+
if (expression.format.places != null) {
|
1742
|
+
label = this.roundNumber(value, expression.format.places);
|
1743
|
+
}
|
1744
|
+
if (expression.format.digitSeparator) {
|
1745
|
+
label = this.numberWithCommas(label);
|
1746
|
+
}
|
1747
|
+
}
|
1748
|
+
else if (expression.type === 'date' && !expression.dateOnly) {
|
1749
|
+
const format = expression.dateOnly ? this.intl.convertDateFormatToIntlOptions('short-date-long-time') : undefined;
|
1750
|
+
label = this.intl.formatDate(value, format);
|
1751
|
+
}
|
1752
|
+
return label;
|
1753
|
+
}
|
1754
|
+
buildDateExpression(date, field) {
|
1755
|
+
if (date) {
|
1756
|
+
const tmpDate = new Date(date);
|
1757
|
+
const tmpCompareDate = new Date(date);
|
1758
|
+
const tmpCompareDate1 = new Date(tmpCompareDate.setDate(tmpDate.getDate() + 1));
|
1759
|
+
const formattedDate = `${tmpDate.getFullYear()}-${tmpDate.getMonth() + 1}-${tmpDate.getDate()}`;
|
1760
|
+
const time = `${tmpDate.getHours()}:${tmpDate.getMinutes()}:${tmpDate.getSeconds()}`;
|
1761
|
+
const compareTime = `${tmpCompareDate1.getHours()}:${tmpCompareDate1.getMinutes()}:${tmpCompareDate1.getSeconds()}`;
|
1762
|
+
const compareFormattedDate = `${tmpCompareDate1.getFullYear()}-${tmpCompareDate1.getMonth() + 1}-${tmpCompareDate1.getDate()}`;
|
1763
|
+
return `${field} BETWEEN '${formattedDate} ${time}' AND '${compareFormattedDate} ${compareTime}'`;
|
1764
|
+
}
|
1765
|
+
return;
|
1766
|
+
}
|
1728
1767
|
get el() { return getElement(this); }
|
1729
1768
|
static get watchers() { return {
|
1730
1769
|
"view": ["watchViewHandler"],
|
@@ -5,8 +5,8 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-164d485a.js';
|
7
7
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-25a5ae3e.js';
|
8
|
-
import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-
|
9
|
-
import { d as downloadCSV } from './downloadUtils-
|
8
|
+
import { q as queryFeaturesByID, g as getLayerOrTable, c as goToSelection, e as queryAllIds, f as queryFeatureIds, i as queryFeaturesByGlobalID } from './mapViewUtils-a177d4f9.js';
|
9
|
+
import { d as downloadCSV } from './downloadUtils-20d22198.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
import './interfaces-586e863c.js';
|
@@ -172,6 +172,7 @@ const LayerTable = class {
|
|
172
172
|
this.showNewestFirst = undefined;
|
173
173
|
this.zoomAndScrollToSelected = undefined;
|
174
174
|
this._controlsThatFit = undefined;
|
175
|
+
this._csvExporting = false;
|
175
176
|
this._fetchingData = false;
|
176
177
|
this._filterActive = false;
|
177
178
|
this._filterOpen = false;
|
@@ -448,8 +449,8 @@ const LayerTable = class {
|
|
448
449
|
if (cur && !cur.isOverflow) {
|
449
450
|
prev.push(cur.isDanger ?
|
450
451
|
this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
|
451
|
-
cur.isSublist ? (h("calcite-dropdown", { closeOnSelectDisabled: true, id: this._getId(cur.icon), onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._showHideDropdown = el }, this._getAction(cur.active, this._showHideOpen ? "chevron-down" : cur.icon, cur.indicator, cur.label, cur.func, cur.disabled, "trigger"), this._showHideOpen ? this._getFieldlist() : undefined)) :
|
452
|
-
this._getAction(cur.active, cur.icon, cur.indicator, cur.label, cur.func, cur.disabled));
|
452
|
+
cur.isSublist ? (h("calcite-dropdown", { closeOnSelectDisabled: true, id: this._getId(cur.icon), onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._showHideDropdown = el }, this._getAction(cur.active, this._showHideOpen ? "chevron-down" : cur.icon, cur.indicator, cur.label, cur.func, cur.disabled, cur.loading, "trigger"), this._showHideOpen ? this._getFieldlist() : undefined)) :
|
453
|
+
this._getAction(cur.active, cur.icon, cur.indicator, cur.label, cur.func, cur.disabled, cur.loading));
|
453
454
|
}
|
454
455
|
return prev;
|
455
456
|
}, []);
|
@@ -601,6 +602,7 @@ const LayerTable = class {
|
|
601
602
|
indicator: false,
|
602
603
|
func: () => void this._exportToCSV(),
|
603
604
|
label: this._translations.exportCSV,
|
605
|
+
loading: this._csvExporting,
|
604
606
|
disabled: featuresEmpty,
|
605
607
|
isOverflow: false
|
606
608
|
} : undefined, {
|
@@ -785,7 +787,7 @@ const LayerTable = class {
|
|
785
787
|
_getDropdown(id) {
|
786
788
|
const dropdownItems = this._getDropdownItems();
|
787
789
|
return dropdownItems.length > 0 ? (h("calcite-dropdown", { closeOnSelectDisabled: true, disabled: this._layer === undefined, id: "solutions-more", onCalciteDropdownBeforeClose: () => this._forceShowHide(), ref: (el) => this._moreDropdown = el }, h("calcite-action", { appearance: "solid", id: id, label: "", onClick: () => this._closeShowHide(), slot: "trigger", text: "" }, h("calcite-button", { appearance: "transparent", iconEnd: "chevron-down", kind: "neutral" }, this._translations.more)), h("calcite-dropdown-group", { "selection-mode": "none" }, dropdownItems.map(item => {
|
788
|
-
return (h("calcite-dropdown-group", { class: item.disabled ? "disabled" : "", selectionMode: item.disabled ? "none" : "single" }, h("calcite-dropdown-item", { iconStart: item.isSublist && this._showHideOpen ? "chevron-down" : item.icon, id: "solutions-subset-list", onClick: item.func }, item.label)));
|
790
|
+
return (h("calcite-dropdown-group", { class: item.disabled ? "disabled" : "", selectionMode: item.disabled ? "none" : "single" }, h("calcite-dropdown-item", { disabled: item.loading, iconStart: item.isSublist && this._showHideOpen ? "chevron-down" : item.loading ? "" : item.icon, id: "solutions-subset-list", onClick: item.func }, item.loading ? (h("div", { class: "display-flex" }, h("calcite-loader", { inline: true, label: item.label, scale: "m" }), item.label)) : item.label)));
|
789
791
|
})), this._showHideOpen ? this._getFieldlist() : undefined)) : undefined;
|
790
792
|
}
|
791
793
|
/**
|
@@ -807,9 +809,9 @@ const LayerTable = class {
|
|
807
809
|
*
|
808
810
|
* @returns VNode The node representing the DOM element that will contain the action
|
809
811
|
*/
|
810
|
-
_getAction(active, icon, indicator, label, func, disabled, slot) {
|
812
|
+
_getAction(active, icon, indicator, label, func, disabled, loading, slot) {
|
811
813
|
const _disabled = this._layer === undefined ? true : disabled;
|
812
|
-
return (h("div", { class: "display-flex", id: this._getId(icon), slot: slot }, h("calcite-action", { active: active, appearance: "solid", disabled: _disabled, icon: icon, id: icon, indicator: indicator, label: label, onClick: func, text: label, textEnabled: true }), this._getToolTip("bottom", icon, label)));
|
814
|
+
return (h("div", { class: "display-flex", id: this._getId(icon), slot: slot }, h("calcite-action", { active: active, appearance: "solid", disabled: _disabled, icon: icon, id: icon, indicator: indicator, label: label, loading: loading, onClick: func, text: label, textEnabled: true }), this._getToolTip("bottom", icon, label)));
|
813
815
|
}
|
814
816
|
/**
|
815
817
|
* Get an action and tooltip for share
|
@@ -1263,13 +1265,9 @@ const LayerTable = class {
|
|
1263
1265
|
const hitTestResult = await this.mapView.hitTest(evt.screenPoint, opts);
|
1264
1266
|
if (hitTestResult.results.length > 0) {
|
1265
1267
|
hitTestResult.results.forEach((result) => {
|
1266
|
-
this._clearSelection();
|
1267
1268
|
const id = result.graphic.getObjectId();
|
1268
1269
|
const index = this._table.highlightIds.indexOf(id);
|
1269
|
-
if (index
|
1270
|
-
this._table.highlightIds.removeAt(index);
|
1271
|
-
}
|
1272
|
-
else {
|
1270
|
+
if (index < 0) {
|
1273
1271
|
this._table.highlightIds.add(id);
|
1274
1272
|
}
|
1275
1273
|
});
|
@@ -1277,6 +1275,9 @@ const LayerTable = class {
|
|
1277
1275
|
this._table.filterBySelection();
|
1278
1276
|
}
|
1279
1277
|
}
|
1278
|
+
else {
|
1279
|
+
this._clearSelection();
|
1280
|
+
}
|
1280
1281
|
}
|
1281
1282
|
/**
|
1282
1283
|
* Select or deselect all rows
|
@@ -1365,11 +1366,26 @@ const LayerTable = class {
|
|
1365
1366
|
}
|
1366
1367
|
return prev;
|
1367
1368
|
}, []);
|
1368
|
-
|
1369
|
+
this._updateToolInfoLoading("export", true);
|
1370
|
+
this._csvExporting = true;
|
1371
|
+
await downloadCSV(null, //???
|
1369
1372
|
exportInfos, false, // formatUsingLayerPopup
|
1370
1373
|
false, // removeDuplicates
|
1371
1374
|
true, // addColumnTitle
|
1372
1375
|
fields, true);
|
1376
|
+
this._updateToolInfoLoading("export", false);
|
1377
|
+
this._csvExporting = false;
|
1378
|
+
}
|
1379
|
+
/**
|
1380
|
+
* Set the loading prop in the stored toolInfos
|
1381
|
+
*/
|
1382
|
+
_updateToolInfoLoading(name, isLoading) {
|
1383
|
+
this._toolInfos.some(tool => {
|
1384
|
+
if ((tool === null || tool === void 0 ? void 0 : tool.icon) === name) {
|
1385
|
+
tool.loading = isLoading;
|
1386
|
+
return true;
|
1387
|
+
}
|
1388
|
+
});
|
1373
1389
|
}
|
1374
1390
|
/**
|
1375
1391
|
* Refreshes the table and maintains the curent scroll position
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-25a5ae3e.js';
|
8
8
|
import { E as ELayoutMode } from './interfaces-586e863c.js';
|
9
|
-
import { g as getLayerOrTable } from './mapViewUtils-
|
9
|
+
import { g as getLayerOrTable } from './mapViewUtils-a177d4f9.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
12
12
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-164d485a.js';
|
7
7
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-25a5ae3e.js';
|
8
|
-
import { a as getAllLayers, b as getFeatureLayerView, h as highlightFeatures, g as getLayerOrTable, q as queryFeaturesByID } from './mapViewUtils-
|
8
|
+
import { a as getAllLayers, b as getFeatureLayerView, h as highlightFeatures, g as getLayerOrTable, q as queryFeaturesByID } from './mapViewUtils-a177d4f9.js';
|
9
9
|
import './esri-loader-eda07632.js';
|
10
10
|
import './_commonjsHelpers-d5f9d613.js';
|
11
11
|
import './interfaces-586e863c.js';
|
@@ -16,6 +16,8 @@ const CrowdsourceReporter = class {
|
|
16
16
|
constructor(hostRef) {
|
17
17
|
registerInstance(this, hostRef);
|
18
18
|
this.togglePanel = createEvent(this, "togglePanel", 7);
|
19
|
+
//HARDCODED IN EN
|
20
|
+
this._noLayerToDisplayErrorMsg = "Web map does not contain any editable layers.";
|
19
21
|
this.description = undefined;
|
20
22
|
this.isMobile = undefined;
|
21
23
|
this.enableAnonymousAccess = undefined;
|
@@ -28,6 +30,8 @@ const CrowdsourceReporter = class {
|
|
28
30
|
this.mapView = undefined;
|
29
31
|
this.layerId = undefined;
|
30
32
|
this.objectId = undefined;
|
33
|
+
this.center = undefined;
|
34
|
+
this.level = undefined;
|
31
35
|
this.reportButtonText = undefined;
|
32
36
|
this.reportsHeader = undefined;
|
33
37
|
this.reportSubmittedMessage = undefined;
|
@@ -159,7 +163,7 @@ const CrowdsourceReporter = class {
|
|
159
163
|
*/
|
160
164
|
getLayerListFlowItem() {
|
161
165
|
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this.reportsHeader }, this.isMobile && this.getActionToExpandCollapsePanel(), this._hasValidLayers && this.enableNewReports &&
|
162
|
-
h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this.
|
166
|
+
h("calcite-button", { appearance: "solid", onClick: this.navigateToChooseCategory.bind(this), slot: "footer", width: "full" }, this.reportButtonText), h("calcite-panel", { "full-height": true, "full-width": true }, h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.displayFeaturesList.bind(this), onLayersListLoaded: this.layerListLoaded.bind(this), ref: el => this._layerList = el, showFeatureCount: true, showNextIcon: true }))));
|
163
167
|
}
|
164
168
|
/**
|
165
169
|
* Get the layer list for creating a report
|
@@ -167,7 +171,7 @@ const CrowdsourceReporter = class {
|
|
167
171
|
* @protected
|
168
172
|
*/
|
169
173
|
getChooseCategoryFlowItem() {
|
170
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this.
|
174
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._translations.createReportHeader, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", disabled: !this._selectedLayerId, onClick: this.navigateToCreateFeature.bind(this), width: "full" }, this._translations.next), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromSelectedPanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("calcite-notice", { class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { slot: "message" }, this._translations.chooseCategoryMsg)), h("layer-list", { class: "height-full", layers: this.layers, mapView: this.mapView, noLayerErrorMsg: this._noLayerToDisplayErrorMsg, onLayerSelect: this.highlightSelectedLayer.bind(this), showFeatureCount: false, showNextIcon: false }))));
|
171
175
|
}
|
172
176
|
/**
|
173
177
|
* Get Feature create form of the selected feature layer
|
@@ -513,11 +517,17 @@ const CrowdsourceReporter = class {
|
|
513
517
|
* @protected
|
514
518
|
*/
|
515
519
|
async loadFeatureFromURLParams() {
|
520
|
+
if (this.center && this.level) {
|
521
|
+
await this.mapView.goTo({
|
522
|
+
center: this.center.split(';').map(Number),
|
523
|
+
zoom: this.level
|
524
|
+
});
|
525
|
+
}
|
516
526
|
if (this.layerId && this.objectId) {
|
517
527
|
const layer = await getLayerOrTable(this.mapView, this.layerId);
|
518
528
|
if (layer) {
|
519
529
|
// only query if we have some ids...query with no ids will result in all features being returned
|
520
|
-
const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [],
|
530
|
+
const featureSet = await queryFeaturesByID([Number(this.objectId)], layer, [], true, this.mapView.spatialReference);
|
521
531
|
if (featureSet.length) {
|
522
532
|
//update the selectedFeature
|
523
533
|
this._selectedFeature = featureSet;
|
@@ -529,6 +539,7 @@ const CrowdsourceReporter = class {
|
|
529
539
|
else {
|
530
540
|
this._flowItems = [...this._flowItems];
|
531
541
|
}
|
542
|
+
await this.highlightOnMap(featureSet[0]);
|
532
543
|
}
|
533
544
|
}
|
534
545
|
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
7
|
import { a as getAssetPath } from './index-164d485a.js';
|
8
8
|
import { l as loadModules } from './locale-25a5ae3e.js';
|
9
|
-
import { q as queryFeaturesByID } from './mapViewUtils-
|
9
|
+
import { q as queryFeaturesByID } from './mapViewUtils-a177d4f9.js';
|
10
10
|
import './solution-resource-7b8d302d.js';
|
11
11
|
import './index-a1e91462.js';
|
12
12
|
import { _ as __assign$1, r as request, c as cleanUrl, g as getJson } from './restHelpersGet-af032ab2.js';
|
@@ -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-8b85f68d.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
|
@@ -4,11 +4,11 @@
|
|
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-20d22198.js';
|
8
8
|
import './index-164d485a.js';
|
9
9
|
import './locale-25a5ae3e.js';
|
10
10
|
import './esri-loader-eda07632.js';
|
11
|
-
import './mapViewUtils-
|
11
|
+
import './mapViewUtils-a177d4f9.js';
|
12
12
|
import './interfaces-586e863c.js';
|
13
13
|
import './solution-resource-7b8d302d.js';
|
14
14
|
import './index-a1e91462.js';
|
@@ -200,13 +200,13 @@ const InstantAppsLanguageTranslatorItem = class {
|
|
200
200
|
return (h("div", { class: `${CSS$1.section}${selected}` }, this.renderItemHeader(EInputType.User, label, uid), this.handleInputRender(EInputType.User, value, uid)));
|
201
201
|
}
|
202
202
|
renderTranslatedLanguageSection() {
|
203
|
-
var _a;
|
203
|
+
var _a, _b;
|
204
204
|
const uiDataItem = this.getUIDataItem();
|
205
205
|
const uid = this.setting.id;
|
206
206
|
const locale = store.get('currentLanguage');
|
207
207
|
const data = store.get('portalItemResourceT9n');
|
208
|
-
const label = this.translatedLanguageLabels[this.fieldName];
|
209
|
-
const value = (
|
208
|
+
const label = (_a = this.translatedLanguageLabels) === null || _a === void 0 ? void 0 : _a[this.fieldName];
|
209
|
+
const value = (_b = data === null || data === void 0 ? void 0 : data[locale]) === null || _b === void 0 ? void 0 : _b[uid];
|
210
210
|
const selected = (uiDataItem === null || uiDataItem === void 0 ? void 0 : uiDataItem.selected) ? ` ${CSS$1.selected}` : '';
|
211
211
|
return (h("div", { class: `${CSS$1.section}${selected}` }, this.renderItemHeader(EInputType.Translation, label, uid), this.handleInputRender(EInputType.Translation, value, uid)));
|
212
212
|
}
|
@@ -221,13 +221,14 @@ const InstantAppsLanguageTranslatorItem = class {
|
|
221
221
|
return content === null || content === void 0 ? void 0 : content.map(contentItem => (contentItem.hasOwnProperty('content') ? this.renderNestedInputs(inputType, contentItem) : this.renderNestedInput(inputType, contentItem)));
|
222
222
|
}
|
223
223
|
renderNestedInput(inputType, contentItem) {
|
224
|
+
var _a;
|
224
225
|
const locale = store.get('currentLanguage');
|
225
226
|
const data = store.get('portalItemResourceT9n');
|
226
227
|
const uid = contentItem === null || contentItem === void 0 ? void 0 : contentItem.id;
|
227
228
|
const localeData = data === null || data === void 0 ? void 0 : data[locale];
|
228
229
|
const translatedValue = localeData === null || localeData === void 0 ? void 0 : localeData[uid];
|
229
230
|
const { label, value, id } = contentItem;
|
230
|
-
const inputLabel = inputType === EInputType.Translation ? this.translatedLanguageLabels[id] : label;
|
231
|
+
const inputLabel = inputType === EInputType.Translation ? (_a = this.translatedLanguageLabels) === null || _a === void 0 ? void 0 : _a[id] : label;
|
231
232
|
const isUser = inputType === EInputType.User;
|
232
233
|
const inputValue = isUser ? value : translatedValue;
|
233
234
|
return (h("div", { class: CSS$1.nestedInput }, this.renderItemHeader(inputType, inputLabel, uid, contentItem), this.renderInput(inputType, inputValue, uid, contentItem)));
|
@@ -108,7 +108,7 @@ const printStyling = `
|
|
108
108
|
flex-flow: row wrap;
|
109
109
|
}
|
110
110
|
|
111
|
-
.instant-apps-export-print .esri-widget > *:not(.
|
111
|
+
.instant-apps-export-print .esri-widget > *:not(.esri-scale-bar.esri-widget > *) {
|
112
112
|
background: #fff;
|
113
113
|
color: #323232;
|
114
114
|
}
|
@@ -193,6 +193,10 @@ const printStyling = `
|
|
193
193
|
left: 15px;
|
194
194
|
}
|
195
195
|
|
196
|
+
.instant-apps-export-print__scale-bar-container .esri-scale-bar__label {
|
197
|
+
font-size: 10px;
|
198
|
+
}
|
199
|
+
|
196
200
|
.instant-apps-export-print__scale-bar-container .esri-scale-bar__bar-container:nth-child(1n+3) {
|
197
201
|
display: none;
|
198
202
|
}
|
@@ -427,8 +431,7 @@ const InstantAppsExport = class {
|
|
427
431
|
return (h("div", { ref: (el) => (this.printContainerEl = el) }, h("div", { class: CSS.print.base, ref: (el) => (this.printEl = el) }, printMap, legend, h("div", { class: CSS.print.contentContainer }, popup, extraContent))));
|
428
432
|
}
|
429
433
|
renderPrintMap() {
|
430
|
-
|
431
|
-
return (h("div", { class: CSS.print.viewContainer, ref: (el) => (this.viewContainerEl = el) }, h("div", { class: CSS.print.viewWrapper, ref: (el) => (this.viewWrapperEl = el) }, this.headerTitle ? h("instant-apps-header", { titleText: this.headerTitle, backgroundColor: "#fff", textColor: "#323232" }) : null, h("img", { class: CSS.print.view, ref: (el) => (this.viewEl = el) }), scaleBar)));
|
434
|
+
return (h("div", { class: CSS.print.viewContainer, ref: (el) => (this.viewContainerEl = el) }, h("div", { class: CSS.print.viewWrapper, ref: (el) => (this.viewWrapperEl = el) }, this.headerTitle ? h("instant-apps-header", { titleText: this.headerTitle, backgroundColor: "#fff", textColor: "#323232" }) : null, h("img", { class: CSS.print.view, ref: (el) => (this.viewEl = el) }), h("div", { class: CSS.print.scaleBarContainer, ref: this.handleScaleBarContainerEl.bind(this) }))));
|
432
435
|
}
|
433
436
|
renderLegend() {
|
434
437
|
return h("div", { class: CSS.print.legendContainer, ref: (el) => (this.legendContainerEl = el) });
|
@@ -436,9 +439,6 @@ const InstantAppsExport = class {
|
|
436
439
|
renderCompass() {
|
437
440
|
return h("div", { class: CSS.print.compassContainer, ref: (el) => (this.compassContainerEl = el) });
|
438
441
|
}
|
439
|
-
renderScaleBar() {
|
440
|
-
return h("div", { class: CSS.print.scaleBarContainer, ref: (el) => (this.scaleBarContainerEl = el) });
|
441
|
-
}
|
442
442
|
renderPopup() {
|
443
443
|
return (h("div", { class: CSS.print.popupContainer, ref: (el) => (this.popupContainerEl = el) }, h("div", { ref: (el) => (this.popupTitleEl = el), class: CSS.print.popupTitle }), h("div", { ref: (el) => (this.popupContentEl = el), class: CSS.print.popupContent })));
|
444
444
|
}
|
@@ -582,7 +582,6 @@ const InstantAppsExport = class {
|
|
582
582
|
handleWidgetCreation() {
|
583
583
|
this.handleLegendCreation();
|
584
584
|
this.handleCompassCreation();
|
585
|
-
this.handleScaleBarCreation();
|
586
585
|
}
|
587
586
|
handleLegendCreation() {
|
588
587
|
var _a, _b;
|
@@ -637,24 +636,12 @@ const InstantAppsExport = class {
|
|
637
636
|
this.compass = new Compass({ container, view });
|
638
637
|
});
|
639
638
|
}
|
640
|
-
handleScaleBarCreation() {
|
641
|
-
var _a, _b;
|
642
|
-
if (this.showScaleBar && this.includeMap && this.view != null && this.view.type === '2d' && this.scaleBarContainerEl != null) {
|
643
|
-
const map = this.view.map;
|
644
|
-
const scaleBarMap = (_b = (_a = this.scaleBar) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.map;
|
645
|
-
const checkId = (map === null || map === void 0 ? void 0 : map.portalItem.id) === (scaleBarMap === null || scaleBarMap === void 0 ? void 0 : scaleBarMap.portalItem.id) && this.scaleBarContainerEl.innerHTML;
|
646
|
-
if (!checkId) {
|
647
|
-
this.updateScaleBar();
|
648
|
-
}
|
649
|
-
}
|
650
|
-
}
|
651
639
|
updateScaleBar() {
|
652
640
|
var _a;
|
653
641
|
(_a = this.view) === null || _a === void 0 ? void 0 : _a.when(async (view) => {
|
654
642
|
var _a;
|
655
643
|
(_a = this.scaleBar) === null || _a === void 0 ? void 0 : _a.destroy();
|
656
644
|
this.scaleBar = null;
|
657
|
-
this.scaleBarContainerEl.innerHTML = '';
|
658
645
|
const [ScaleBar] = await loadModules(['esri/widgets/ScaleBar']);
|
659
646
|
this.scaleBar = new ScaleBar({ container: this.scaleBarContainerEl, unit: 'dual', view });
|
660
647
|
});
|
@@ -835,7 +822,7 @@ const InstantAppsExport = class {
|
|
835
822
|
}
|
836
823
|
handleScaleBarSize() {
|
837
824
|
var _a;
|
838
|
-
if (((_a = this.view) === null || _a === void 0 ? void 0 : _a.type) === '2d') {
|
825
|
+
if (this.showScaleBar && ((_a = this.view) === null || _a === void 0 ? void 0 : _a.type) === '2d') {
|
839
826
|
if (this.scaleBarContainerEl != null) {
|
840
827
|
const topBar = this.scaleBarContainerEl.querySelector('.esri-scale-bar__line--top');
|
841
828
|
const bottomBar = this.scaleBarContainerEl.querySelector('.esri-scale-bar__line--bottom');
|
@@ -845,7 +832,7 @@ const InstantAppsExport = class {
|
|
845
832
|
}
|
846
833
|
}
|
847
834
|
setScalebarWidth(bar, position) {
|
848
|
-
if (
|
835
|
+
if (bar != null && this.screenshot != null) {
|
849
836
|
const width = this.screenshot.data.width / 2;
|
850
837
|
const barWidth = Number(bar.style.width.replace('px', ''));
|
851
838
|
const widthPercentage = (barWidth / width) * 100;
|
@@ -857,6 +844,18 @@ const InstantAppsExport = class {
|
|
857
844
|
(_a = this.screenshotPreview) === null || _a === void 0 ? void 0 : _a.remove();
|
858
845
|
(_b = this.screenshotStyle) === null || _b === void 0 ? void 0 : _b.remove();
|
859
846
|
}
|
847
|
+
handleScaleBarContainerEl(el) {
|
848
|
+
var _a, _b, _c;
|
849
|
+
if (this.showScaleBar && ((_a = this.view) === null || _a === void 0 ? void 0 : _a.type) === '2d') {
|
850
|
+
const map = this.view.map;
|
851
|
+
const scaleBarMap = (_c = (_b = this.scaleBar) === null || _b === void 0 ? void 0 : _b.view) === null || _c === void 0 ? void 0 : _c.map;
|
852
|
+
this.scaleBarContainerEl = el;
|
853
|
+
const checkId = (map === null || map === void 0 ? void 0 : map.portalItem.id) === (scaleBarMap === null || scaleBarMap === void 0 ? void 0 : scaleBarMap.portalItem.id);
|
854
|
+
if (!checkId) {
|
855
|
+
this.updateScaleBar();
|
856
|
+
}
|
857
|
+
}
|
858
|
+
}
|
860
859
|
get el() { return getElement(this); }
|
861
860
|
static get watchers() { return {
|
862
861
|
"includeMap": ["watchIncludeMap"]
|
@@ -11,7 +11,7 @@ import { g as getFontFamily } from './styles-367380b5.js';
|
|
11
11
|
import './esri-loader-eda07632.js';
|
12
12
|
import './_commonjsHelpers-d5f9d613.js';
|
13
13
|
|
14
|
-
const instantAppsHeaderCss = ":host{--instant-apps-header-height:auto;--instant-apps-header-min-height:50px;--instant-apps-header-title-text-link-decoration:underline;--instant-apps-header-height--logo-scale--s:55px;--instant-apps-header-logo-width--logo-scale--s:35px;--instant-apps-header-logo-height--logo-scale--s:35px;--instant-apps-header-height--logo-scale--m:70px;--instant-apps-header-logo-width--logo-scale--m:50px;--instant-apps-header-logo-height--logo-scale--m:50px;--instant-apps-header-height--logo-scale--l:80px;--instant-apps-header-logo-width--logo-scale--l:60px;--instant-apps-header-logo-height--logo-scale--l:60px;width:100%}:host .instant-apps-header--standard{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family);min-height:var(--instant-apps-header-min-height)}:host .instant-apps-header--standard .instant-apps-header__header-container{display:flex;align-items:center;width:100%;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container slot{display:flex;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*){display:flex;min-height:var(--instant-apps-header-min-height);height:var(--instant-apps-header-height)}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*) calcite-button{height:100%}:host .instant-apps-header--standard .instant-apps-header__header-content{box-sizing:border-box;display:flex;align-items:center;width:100%;min-width:0;height:inherit;padding:5px 10px}:host .instant-apps-header--standard .instant-apps-header__header-content a{display:flex;align-items:center;-webkit-text-decoration:var(--instant-apps-header-title-text-link-decoration);text-decoration:var(--instant-apps-header-title-text-link-decoration)}:host .instant-apps-header--standard .instant-apps-header__header-content a img{padding-right:0}:host .instant-apps-header--standard .instant-apps-header__header-content img{margin:10px}:host .instant-apps-header--standard .instant-apps-header__header-content h1{margin:0;font-size:1.25rem;color:var(--calcite-color-text-1);font-weight:430;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .instant-apps-header--standard .instant-apps-header__header-content #infoButton{margin-inline-start:10px}:host .instant-apps-header--standard .instant-apps-header__header-content--center{justify-content:center}:host .instant-apps-header--standard .instant-apps-header__header-content--right{justify-content:end}:host .instant-apps-header__logo-height--s{height:var(--instant-apps-header-height--logo-scale--s)}:host .instant-apps-header__logo-height--s .instant-apps-header__header-content h1{font-size:1.125rem}:host .instant-apps-header__logo-scale--s{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}:host .instant-apps-header__logo-height--m{height:var(--instant-apps-header-height--logo-scale--m)}:host .instant-apps-header__logo-scale--m{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}:host .instant-apps-header__logo-height--l{height:var(--instant-apps-header-height--logo-scale--l)}:host .instant-apps-header__logo-height--l .instant-apps-header__header-content h1{font-size:1.375rem}:host .instant-apps-header__logo-scale--l{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}:host .instant-apps-header__logo-height--s,:host .instant-apps-header__logo-height--m,:host .instant-apps-header__logo-height--l{padding-right:10px}:host .instant-apps-header--rtl.instant-apps-header__logo-height--s,:host .instant-apps-header--rtl.instant-apps-header__logo-height--m,:host .instant-apps-header--rtl.instant-apps-header__logo-height--l{padding-right:0;padding-left:10px}";
|
14
|
+
const instantAppsHeaderCss = ":host{--instant-apps-header-height:auto;--instant-apps-header-min-height:50px;--instant-apps-header-title-text-link-decoration:underline;--instant-apps-header-height--logo-scale--s:55px;--instant-apps-header-logo-width--logo-scale--s:35px;--instant-apps-header-logo-height--logo-scale--s:35px;--instant-apps-header-height--logo-scale--m:70px;--instant-apps-header-logo-width--logo-scale--m:50px;--instant-apps-header-logo-height--logo-scale--m:50px;--instant-apps-header-height--logo-scale--l:80px;--instant-apps-header-logo-width--logo-scale--l:60px;--instant-apps-header-logo-height--logo-scale--l:60px;width:100%}:host .image.image_resized img{width:100%}:host .instant-apps-header--standard{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family);min-height:var(--instant-apps-header-min-height)}:host .instant-apps-header--standard .instant-apps-header__header-container{display:flex;align-items:center;width:100%;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container slot{display:flex;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*){display:flex;min-height:var(--instant-apps-header-min-height);height:var(--instant-apps-header-height)}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*) calcite-button{height:100%}:host .instant-apps-header--standard .instant-apps-header__header-content{box-sizing:border-box;display:flex;align-items:center;width:100%;min-width:0;height:inherit;padding:5px 10px}:host .instant-apps-header--standard .instant-apps-header__header-content a{display:flex;align-items:center;-webkit-text-decoration:var(--instant-apps-header-title-text-link-decoration);text-decoration:var(--instant-apps-header-title-text-link-decoration)}:host .instant-apps-header--standard .instant-apps-header__header-content a img{padding-right:0}:host .instant-apps-header--standard .instant-apps-header__header-content img{margin:10px}:host .instant-apps-header--standard .instant-apps-header__header-content h1{margin:0;font-size:1.25rem;color:var(--calcite-color-text-1);font-weight:430;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .instant-apps-header--standard .instant-apps-header__header-content #infoButton{margin-inline-start:10px}:host .instant-apps-header--standard .instant-apps-header__header-content--center{justify-content:center}:host .instant-apps-header--standard .instant-apps-header__header-content--right{justify-content:end}:host .instant-apps-header__logo-height--s{height:var(--instant-apps-header-height--logo-scale--s)}:host .instant-apps-header__logo-height--s .instant-apps-header__header-content h1{font-size:1.125rem}:host .instant-apps-header__logo-scale--s{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}:host .instant-apps-header__logo-height--m{height:var(--instant-apps-header-height--logo-scale--m)}:host .instant-apps-header__logo-scale--m{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}:host .instant-apps-header__logo-height--l{height:var(--instant-apps-header-height--logo-scale--l)}:host .instant-apps-header__logo-height--l .instant-apps-header__header-content h1{font-size:1.375rem}:host .instant-apps-header__logo-scale--l{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}:host .instant-apps-header__logo-height--s,:host .instant-apps-header__logo-height--m,:host .instant-apps-header__logo-height--l{padding-right:10px}:host .instant-apps-header--rtl.instant-apps-header__logo-height--s,:host .instant-apps-header--rtl.instant-apps-header__logo-height--m,:host .instant-apps-header--rtl.instant-apps-header__logo-height--l{padding-right:0;padding-left:10px}";
|
15
15
|
|
16
16
|
const CSS = {
|
17
17
|
base: 'instant-apps-header--standard',
|