@esri/solutions-components 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/public-notification/resources.json +4 -1
- package/dist/assets/t9n/public-notification/resources_en.json +4 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
- package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-search.cjs.entry.js +46 -7
- package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
- package/dist/cjs/public-notification.cjs.entry.js +101 -18
- package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
- package/dist/collection/components/map-search/map-search.js +66 -7
- package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
- package/dist/collection/components/pdf-download/pdf-download.js +32 -8
- package/dist/collection/components/public-notification/public-notification.css +46 -41
- package/dist/collection/components/public-notification/public-notification.js +267 -19
- package/dist/collection/components/refine-selection/refine-selection.js +18 -1
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
- package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
- package/dist/collection/demos/index.html +0 -24
- package/dist/collection/demos/map-draw-tools.html +17 -17
- package/dist/collection/demos/map-layer-picker.html +2 -0
- package/dist/collection/demos/map-search.html +16 -15
- package/dist/collection/demos/map-select-tools.html +16 -24
- package/dist/collection/demos/new-public-notification.html +46 -35
- package/dist/collection/demos/pdf-download.html +8 -1
- package/dist/collection/utils/csvUtils.js +4 -4
- package/dist/collection/utils/csvUtils.ts +6 -4
- package/dist/collection/utils/interfaces.ts +65 -1
- package/dist/collection/utils/mapViewUtils.js +36 -22
- package/dist/collection/utils/mapViewUtils.ts +50 -27
- package/dist/collection/utils/publicNotificationStore.js +3 -1
- package/dist/collection/utils/publicNotificationStore.ts +3 -1
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/csvUtils.js +4 -4
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +0 -5
- package/dist/components/layer-table.js +2 -3
- package/dist/components/map-layer-picker2.js +177 -28
- package/dist/components/map-search.js +47 -7
- package/dist/components/map-select-tools2.js +56 -11
- package/dist/components/pdf-download2.js +217 -8
- package/dist/components/public-notification.js +154 -55
- package/dist/components/publicNotificationStore.js +3 -1
- package/dist/components/queryUtils.js +3 -3
- package/dist/components/refine-selection-tools2.js +9 -8
- package/dist/components/refine-selection2.js +3 -1
- package/dist/esm/buffer-tools_6.entry.js +8 -7
- package/dist/esm/calcite-combobox_3.entry.js +38 -25
- package/dist/esm/calcite-input-message_5.entry.js +271 -20
- package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-search.entry.js +46 -7
- package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
- package/dist/esm/public-notification.entry.js +101 -18
- package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
- package/dist/solutions-components/demos/index.html +0 -24
- package/dist/solutions-components/demos/map-draw-tools.html +17 -17
- package/dist/solutions-components/demos/map-layer-picker.html +2 -0
- package/dist/solutions-components/demos/map-search.html +16 -15
- package/dist/solutions-components/demos/map-select-tools.html +16 -24
- package/dist/solutions-components/demos/new-public-notification.html +46 -35
- package/dist/solutions-components/demos/pdf-download.html +8 -1
- package/dist/solutions-components/p-07593958.entry.js +6 -0
- package/dist/solutions-components/p-3fa9b3c8.js +36 -0
- package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
- package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
- package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
- package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
- package/dist/solutions-components/p-bfa95147.entry.js +17 -0
- package/dist/solutions-components/p-d09a168c.entry.js +6 -0
- package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/csvUtils.ts +6 -4
- package/dist/solutions-components/utils/interfaces.ts +65 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
- package/dist/types/components/map-search/map-search.d.ts +18 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
- package/dist/types/components/public-notification/public-notification.d.ts +98 -4
- package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
- package/dist/types/components.d.ts +154 -180
- package/dist/types/preact.d.ts +0 -10
- package/dist/types/utils/csvUtils.d.ts +1 -1
- package/dist/types/utils/interfaces.d.ts +56 -1
- package/dist/types/utils/mapViewUtils.d.ts +19 -9
- package/dist/types/utils/publicNotificationStore.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/check-list.cjs.entry.js +0 -103
- package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
- package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
- package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
- package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
- package/dist/cjs/labelFormats-3236d2e0.js +0 -212
- package/dist/collection/components/check-list/check-list.css +0 -3
- package/dist/collection/components/check-list/check-list.js +0 -179
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
- package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
- package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
- package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
- package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
- package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
- package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
- package/dist/collection/demos/check-list.html +0 -65
- package/dist/collection/demos/config-buffer-tools.html +0 -92
- package/dist/collection/demos/config-draw-tools.html +0 -58
- package/dist/collection/demos/config-layer-picker.html +0 -97
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -11
- package/dist/components/check-list2.js +0 -131
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -187
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -121
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -163
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -154
- package/dist/components/labelFormats.js +0 -210
- package/dist/components/mapViewUtils.js +0 -129
- package/dist/esm/check-list.entry.js +0 -99
- package/dist/esm/config-buffer-tools.entry.js +0 -121
- package/dist/esm/config-draw-tools.entry.js +0 -81
- package/dist/esm/config-layer-picker.entry.js +0 -109
- package/dist/esm/config-pdf-download.entry.js +0 -113
- package/dist/esm/labelFormats-b37958c3.js +0 -210
- package/dist/solutions-components/demos/check-list.html +0 -65
- package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
- package/dist/solutions-components/demos/config-draw-tools.html +0 -58
- package/dist/solutions-components/demos/config-layer-picker.html +0 -97
- package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
- package/dist/solutions-components/p-35078393.entry.js +0 -17
- package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
- package/dist/solutions-components/p-3e444242.entry.js +0 -6
- package/dist/solutions-components/p-67afea92.entry.js +0 -12
- package/dist/solutions-components/p-7dcab29d.js +0 -36
- package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
- package/dist/solutions-components/p-906b7b96.entry.js +0 -6
- package/dist/solutions-components/p-99c98510.entry.js +0 -6
- package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
- package/dist/solutions-components/p-e99b1247.js +0 -6
- package/dist/types/components/check-list/check-list.d.ts +0 -57
- package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
- package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
- package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
- package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -1,121 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
7
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
8
|
-
import { d as defineCustomElement$4 } from './checkbox.js';
|
9
|
-
import { d as defineCustomElement$3 } from './label.js';
|
10
|
-
import { d as defineCustomElement$2 } from './check-list2.js';
|
11
|
-
|
12
|
-
const configDrawToolsCss = ":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";
|
13
|
-
|
14
|
-
const ConfigDrawTools$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
15
|
-
constructor() {
|
16
|
-
super();
|
17
|
-
this.__registerHost();
|
18
|
-
this.__attachShadow();
|
19
|
-
this.defaultChecked = true;
|
20
|
-
this._translations = undefined;
|
21
|
-
}
|
22
|
-
//--------------------------------------------------------------------------
|
23
|
-
//
|
24
|
-
// Watch handlers
|
25
|
-
//
|
26
|
-
//--------------------------------------------------------------------------
|
27
|
-
//--------------------------------------------------------------------------
|
28
|
-
//
|
29
|
-
// Methods (public)
|
30
|
-
//
|
31
|
-
//--------------------------------------------------------------------------
|
32
|
-
/**
|
33
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
34
|
-
*
|
35
|
-
* @returns Promise with the state of the checkboxes
|
36
|
-
*/
|
37
|
-
async getConfigInfo() {
|
38
|
-
return this._checkList.getConfigInfo();
|
39
|
-
}
|
40
|
-
//--------------------------------------------------------------------------
|
41
|
-
//
|
42
|
-
// Events (public)
|
43
|
-
//
|
44
|
-
//--------------------------------------------------------------------------
|
45
|
-
//--------------------------------------------------------------------------
|
46
|
-
//
|
47
|
-
// Functions (lifecycle)
|
48
|
-
//
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
/**
|
51
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
52
|
-
*
|
53
|
-
* @returns Promise when complete
|
54
|
-
*/
|
55
|
-
async componentWillLoad() {
|
56
|
-
await this._getTranslations();
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* Renders the component.
|
60
|
-
*/
|
61
|
-
render() {
|
62
|
-
const nlsTypes = this._translations.types || {};
|
63
|
-
const types = Object.keys(nlsTypes).map(k => nlsTypes[k]);
|
64
|
-
return (h(Host, null, h("div", null, h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this._translations.drawTools)), h("div", { class: "padding-inline-start-1" }, h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._checkList = el; }, values: types })))));
|
65
|
-
}
|
66
|
-
//--------------------------------------------------------------------------
|
67
|
-
//
|
68
|
-
// Functions (protected)
|
69
|
-
//
|
70
|
-
//--------------------------------------------------------------------------
|
71
|
-
/**
|
72
|
-
* Fetches the component's translations
|
73
|
-
*
|
74
|
-
* @returns Promise when complete
|
75
|
-
* @protected
|
76
|
-
*/
|
77
|
-
async _getTranslations() {
|
78
|
-
const messages = await getLocaleComponentStrings(this.el);
|
79
|
-
this._translations = messages[0];
|
80
|
-
}
|
81
|
-
get el() { return this; }
|
82
|
-
static get style() { return configDrawToolsCss; }
|
83
|
-
}, [1, "config-draw-tools", {
|
84
|
-
"defaultChecked": [516, "default-checked"],
|
85
|
-
"_translations": [32],
|
86
|
-
"getConfigInfo": [64]
|
87
|
-
}]);
|
88
|
-
function defineCustomElement$1() {
|
89
|
-
if (typeof customElements === "undefined") {
|
90
|
-
return;
|
91
|
-
}
|
92
|
-
const components = ["config-draw-tools", "calcite-checkbox", "calcite-label", "check-list"];
|
93
|
-
components.forEach(tagName => { switch (tagName) {
|
94
|
-
case "config-draw-tools":
|
95
|
-
if (!customElements.get(tagName)) {
|
96
|
-
customElements.define(tagName, ConfigDrawTools$1);
|
97
|
-
}
|
98
|
-
break;
|
99
|
-
case "calcite-checkbox":
|
100
|
-
if (!customElements.get(tagName)) {
|
101
|
-
defineCustomElement$4();
|
102
|
-
}
|
103
|
-
break;
|
104
|
-
case "calcite-label":
|
105
|
-
if (!customElements.get(tagName)) {
|
106
|
-
defineCustomElement$3();
|
107
|
-
}
|
108
|
-
break;
|
109
|
-
case "check-list":
|
110
|
-
if (!customElements.get(tagName)) {
|
111
|
-
defineCustomElement$2();
|
112
|
-
}
|
113
|
-
break;
|
114
|
-
} });
|
115
|
-
}
|
116
|
-
defineCustomElement$1();
|
117
|
-
|
118
|
-
const ConfigDrawTools = ConfigDrawTools$1;
|
119
|
-
const defineCustomElement = defineCustomElement$1;
|
120
|
-
|
121
|
-
export { ConfigDrawTools, defineCustomElement };
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
2
|
-
|
3
|
-
interface ConfigLayerPicker extends Components.ConfigLayerPicker, HTMLElement {}
|
4
|
-
export const ConfigLayerPicker: {
|
5
|
-
prototype: ConfigLayerPicker;
|
6
|
-
new (): ConfigLayerPicker;
|
7
|
-
};
|
8
|
-
/**
|
9
|
-
* Used to define this component and all nested components recursively.
|
10
|
-
*/
|
11
|
-
export const defineCustomElement: () => void;
|
@@ -1,163 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
7
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
8
|
-
import { g as getMapLayerNames } from './mapViewUtils.js';
|
9
|
-
import { d as defineCustomElement$6 } from './chip.js';
|
10
|
-
import { d as defineCustomElement$5 } from './combobox.js';
|
11
|
-
import { d as defineCustomElement$4 } from './combobox-item.js';
|
12
|
-
import { d as defineCustomElement$3 } from './icon.js';
|
13
|
-
import { d as defineCustomElement$2 } from './label.js';
|
14
|
-
|
15
|
-
const configLayerPickerCss = ":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";
|
16
|
-
|
17
|
-
const ConfigLayerPicker$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
18
|
-
constructor() {
|
19
|
-
super();
|
20
|
-
this.__registerHost();
|
21
|
-
this.__attachShadow();
|
22
|
-
this.defaultChecked = true;
|
23
|
-
this.instruction = "";
|
24
|
-
this.mapView = undefined;
|
25
|
-
this._layerNames = [];
|
26
|
-
this._translations = undefined;
|
27
|
-
}
|
28
|
-
//--------------------------------------------------------------------------
|
29
|
-
//
|
30
|
-
// Watch handlers
|
31
|
-
//
|
32
|
-
//--------------------------------------------------------------------------
|
33
|
-
/**
|
34
|
-
* Called each time the mapView prop is changed.
|
35
|
-
*
|
36
|
-
*/
|
37
|
-
async watchStateHandler() {
|
38
|
-
await this._setLayers();
|
39
|
-
}
|
40
|
-
//--------------------------------------------------------------------------
|
41
|
-
//
|
42
|
-
// Methods (public)
|
43
|
-
//
|
44
|
-
//--------------------------------------------------------------------------
|
45
|
-
/**
|
46
|
-
* Returns a list of layers that have been selected
|
47
|
-
*
|
48
|
-
* @returns Promise with a list of layer names to use
|
49
|
-
*/
|
50
|
-
async getConfigInfo() {
|
51
|
-
return typeof this._checkList.value === "string" ?
|
52
|
-
[this._checkList.value] : this._checkList.value;
|
53
|
-
}
|
54
|
-
//--------------------------------------------------------------------------
|
55
|
-
//
|
56
|
-
// Events (public)
|
57
|
-
//
|
58
|
-
//--------------------------------------------------------------------------
|
59
|
-
//--------------------------------------------------------------------------
|
60
|
-
//
|
61
|
-
// Functions (lifecycle)
|
62
|
-
//
|
63
|
-
//--------------------------------------------------------------------------
|
64
|
-
/**
|
65
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
66
|
-
*
|
67
|
-
* @returns Promise when complete
|
68
|
-
*/
|
69
|
-
async componentWillLoad() {
|
70
|
-
await this._setLayers();
|
71
|
-
await this._getTranslations();
|
72
|
-
}
|
73
|
-
/**
|
74
|
-
* Renders the component.
|
75
|
-
*/
|
76
|
-
render() {
|
77
|
-
return (h(Host, null, h("div", null, h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this.instruction || this._translations.chooseLayer)), h("div", { class: "padding-inline-start-1" }, h("calcite-combobox", { label: '', overlayPositioning: "fixed", ref: (el) => { this._checkList = el; }, selectionMode: "multiple" }, this._getComboboxItems())))));
|
78
|
-
}
|
79
|
-
//--------------------------------------------------------------------------
|
80
|
-
//
|
81
|
-
// Functions (protected)
|
82
|
-
//
|
83
|
-
//--------------------------------------------------------------------------
|
84
|
-
_getComboboxItems() {
|
85
|
-
return this._layerNames ? this._layerNames.map(name => (h("calcite-combobox-item", { textLabel: name, value: name }))) : [];
|
86
|
-
}
|
87
|
-
/**
|
88
|
-
* Fetch the names of the layers from the map
|
89
|
-
*
|
90
|
-
* @returns Promise when the operation has completed
|
91
|
-
*/
|
92
|
-
async _setLayers() {
|
93
|
-
if (this.mapView) {
|
94
|
-
this._layerNames = await getMapLayerNames(this.mapView);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
/**
|
98
|
-
* Fetches the component's translations
|
99
|
-
*
|
100
|
-
* @returns Promise when complete
|
101
|
-
* @protected
|
102
|
-
*/
|
103
|
-
async _getTranslations() {
|
104
|
-
const messages = await getLocaleComponentStrings(this.el);
|
105
|
-
this._translations = messages[0];
|
106
|
-
}
|
107
|
-
get el() { return this; }
|
108
|
-
static get watchers() { return {
|
109
|
-
"mapView": ["watchStateHandler"]
|
110
|
-
}; }
|
111
|
-
static get style() { return configLayerPickerCss; }
|
112
|
-
}, [1, "config-layer-picker", {
|
113
|
-
"defaultChecked": [516, "default-checked"],
|
114
|
-
"instruction": [1],
|
115
|
-
"mapView": [16],
|
116
|
-
"_layerNames": [32],
|
117
|
-
"_translations": [32],
|
118
|
-
"getConfigInfo": [64]
|
119
|
-
}]);
|
120
|
-
function defineCustomElement$1() {
|
121
|
-
if (typeof customElements === "undefined") {
|
122
|
-
return;
|
123
|
-
}
|
124
|
-
const components = ["config-layer-picker", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-icon", "calcite-label"];
|
125
|
-
components.forEach(tagName => { switch (tagName) {
|
126
|
-
case "config-layer-picker":
|
127
|
-
if (!customElements.get(tagName)) {
|
128
|
-
customElements.define(tagName, ConfigLayerPicker$1);
|
129
|
-
}
|
130
|
-
break;
|
131
|
-
case "calcite-chip":
|
132
|
-
if (!customElements.get(tagName)) {
|
133
|
-
defineCustomElement$6();
|
134
|
-
}
|
135
|
-
break;
|
136
|
-
case "calcite-combobox":
|
137
|
-
if (!customElements.get(tagName)) {
|
138
|
-
defineCustomElement$5();
|
139
|
-
}
|
140
|
-
break;
|
141
|
-
case "calcite-combobox-item":
|
142
|
-
if (!customElements.get(tagName)) {
|
143
|
-
defineCustomElement$4();
|
144
|
-
}
|
145
|
-
break;
|
146
|
-
case "calcite-icon":
|
147
|
-
if (!customElements.get(tagName)) {
|
148
|
-
defineCustomElement$3();
|
149
|
-
}
|
150
|
-
break;
|
151
|
-
case "calcite-label":
|
152
|
-
if (!customElements.get(tagName)) {
|
153
|
-
defineCustomElement$2();
|
154
|
-
}
|
155
|
-
break;
|
156
|
-
} });
|
157
|
-
}
|
158
|
-
defineCustomElement$1();
|
159
|
-
|
160
|
-
const ConfigLayerPicker = ConfigLayerPicker$1;
|
161
|
-
const defineCustomElement = defineCustomElement$1;
|
162
|
-
|
163
|
-
export { ConfigLayerPicker, defineCustomElement };
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
2
|
-
|
3
|
-
interface ConfigPdfDownload extends Components.ConfigPdfDownload, HTMLElement {}
|
4
|
-
export const ConfigPdfDownload: {
|
5
|
-
prototype: ConfigPdfDownload;
|
6
|
-
new (): ConfigPdfDownload;
|
7
|
-
};
|
8
|
-
/**
|
9
|
-
* Used to define this component and all nested components recursively.
|
10
|
-
*/
|
11
|
-
export const defineCustomElement: () => void;
|
@@ -1,154 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
7
|
-
import { g as getLocaleComponentStrings } from './locale.js';
|
8
|
-
import { p as pdfUtils } from './labelFormats.js';
|
9
|
-
import { d as defineCustomElement$4 } from './checkbox.js';
|
10
|
-
import { d as defineCustomElement$3 } from './label.js';
|
11
|
-
import { d as defineCustomElement$2 } from './check-list2.js';
|
12
|
-
|
13
|
-
const configPdfDownloadCss = ":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";
|
14
|
-
|
15
|
-
const ConfigPdfDownload$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
16
|
-
constructor() {
|
17
|
-
super();
|
18
|
-
this.__registerHost();
|
19
|
-
this.__attachShadow();
|
20
|
-
this.defaultChecked = true;
|
21
|
-
this._formatOptions = [];
|
22
|
-
this._translations = undefined;
|
23
|
-
}
|
24
|
-
//--------------------------------------------------------------------------
|
25
|
-
//
|
26
|
-
// Watch handlers
|
27
|
-
//
|
28
|
-
//--------------------------------------------------------------------------
|
29
|
-
//--------------------------------------------------------------------------
|
30
|
-
//
|
31
|
-
// Methods (public)
|
32
|
-
//
|
33
|
-
//--------------------------------------------------------------------------
|
34
|
-
/**
|
35
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
36
|
-
*
|
37
|
-
* @returns Promise with the state of the checkboxes
|
38
|
-
*/
|
39
|
-
async getConfigInfo() {
|
40
|
-
const formatOptions = await this._formatOptionsCheckList.getConfigInfo();
|
41
|
-
const csvOptions = await this._csvOptionsCheckList.getConfigInfo();
|
42
|
-
return Object.assign(Object.assign({}, formatOptions), csvOptions);
|
43
|
-
}
|
44
|
-
//--------------------------------------------------------------------------
|
45
|
-
//
|
46
|
-
// Events (public)
|
47
|
-
//
|
48
|
-
//--------------------------------------------------------------------------
|
49
|
-
//--------------------------------------------------------------------------
|
50
|
-
//
|
51
|
-
// Functions (lifecycle)
|
52
|
-
//
|
53
|
-
//--------------------------------------------------------------------------
|
54
|
-
/**
|
55
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
56
|
-
*
|
57
|
-
* @returns Promise when complete
|
58
|
-
*/
|
59
|
-
async componentWillLoad() {
|
60
|
-
await this._getTranslations();
|
61
|
-
await this._setFormatOptions();
|
62
|
-
}
|
63
|
-
/**
|
64
|
-
* Renders the component.
|
65
|
-
*/
|
66
|
-
render() {
|
67
|
-
return (h(Host, null, h("div", null, h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this._translations.availableLabelFormats)), h("div", { class: "padding-block-end-1 padding-inline-start-1" }, h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._formatOptionsCheckList = el; }, values: this._formatOptions })), h("div", { class: "padding-block-end-1" }, h("calcite-label", { class: "label-spacing" }, this._translations.csvOptions)), h("div", { class: "padding-block-end-1 padding-inline-start-1" }, h("check-list", { defaultChecked: this.defaultChecked, ref: (el) => { this._csvOptionsCheckList = el; }, values: [this._translations.csvColumnTitle] })))));
|
68
|
-
}
|
69
|
-
//--------------------------------------------------------------------------
|
70
|
-
//
|
71
|
-
// Functions (protected)
|
72
|
-
//
|
73
|
-
//--------------------------------------------------------------------------
|
74
|
-
/**
|
75
|
-
* Fetch the names of the layers from the map
|
76
|
-
*
|
77
|
-
* @returns Promise when the operation has completed
|
78
|
-
*/
|
79
|
-
async _setFormatOptions() {
|
80
|
-
const s = pdfUtils;
|
81
|
-
const sortedPdfIndo = (s.default || s).sort((a, b) => {
|
82
|
-
const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);
|
83
|
-
const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
|
84
|
-
return _a < _b ? -1 : _a > _b ? 1 : 0;
|
85
|
-
});
|
86
|
-
this._formatOptions = sortedPdfIndo.map(l => {
|
87
|
-
return this._getLabelSizeText(l);
|
88
|
-
});
|
89
|
-
}
|
90
|
-
/**
|
91
|
-
* Gets the formatted pdf export size text
|
92
|
-
*
|
93
|
-
* @param labelInfo current user selected label info
|
94
|
-
*
|
95
|
-
* @returns the pdf label as a string
|
96
|
-
* @protected
|
97
|
-
*/
|
98
|
-
_getLabelSizeText(labelInfo) {
|
99
|
-
const lNum = labelInfo.descriptionPDF.labelsPerPageDisplay;
|
100
|
-
const lSize = `${labelInfo.descriptionPDF.labelWidthDisplay} x ${labelInfo.descriptionPDF.labelHeightDisplay}`;
|
101
|
-
return this._translations.pdfLabel.replace("{{n}}", lNum).replace("{{labelSize}}", lSize);
|
102
|
-
}
|
103
|
-
/**
|
104
|
-
* Fetches the component's translations
|
105
|
-
*
|
106
|
-
* @returns Promise when complete
|
107
|
-
* @protected
|
108
|
-
*/
|
109
|
-
async _getTranslations() {
|
110
|
-
const messages = await getLocaleComponentStrings(this.el);
|
111
|
-
this._translations = messages[0];
|
112
|
-
}
|
113
|
-
get el() { return this; }
|
114
|
-
static get style() { return configPdfDownloadCss; }
|
115
|
-
}, [1, "config-pdf-download", {
|
116
|
-
"defaultChecked": [516, "default-checked"],
|
117
|
-
"_formatOptions": [32],
|
118
|
-
"_translations": [32],
|
119
|
-
"getConfigInfo": [64]
|
120
|
-
}]);
|
121
|
-
function defineCustomElement$1() {
|
122
|
-
if (typeof customElements === "undefined") {
|
123
|
-
return;
|
124
|
-
}
|
125
|
-
const components = ["config-pdf-download", "calcite-checkbox", "calcite-label", "check-list"];
|
126
|
-
components.forEach(tagName => { switch (tagName) {
|
127
|
-
case "config-pdf-download":
|
128
|
-
if (!customElements.get(tagName)) {
|
129
|
-
customElements.define(tagName, ConfigPdfDownload$1);
|
130
|
-
}
|
131
|
-
break;
|
132
|
-
case "calcite-checkbox":
|
133
|
-
if (!customElements.get(tagName)) {
|
134
|
-
defineCustomElement$4();
|
135
|
-
}
|
136
|
-
break;
|
137
|
-
case "calcite-label":
|
138
|
-
if (!customElements.get(tagName)) {
|
139
|
-
defineCustomElement$3();
|
140
|
-
}
|
141
|
-
break;
|
142
|
-
case "check-list":
|
143
|
-
if (!customElements.get(tagName)) {
|
144
|
-
defineCustomElement$2();
|
145
|
-
}
|
146
|
-
break;
|
147
|
-
} });
|
148
|
-
}
|
149
|
-
defineCustomElement$1();
|
150
|
-
|
151
|
-
const ConfigPdfDownload = ConfigPdfDownload$1;
|
152
|
-
const defineCustomElement = defineCustomElement$1;
|
153
|
-
|
154
|
-
export { ConfigPdfDownload, defineCustomElement };
|
@@ -1,210 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
* Licensed under the Apache License, Version 2.0
|
4
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
-
*/
|
6
|
-
const labelFormats = [
|
7
|
-
{
|
8
|
-
descriptionPDF: {
|
9
|
-
labelWidthDisplay: "2-5/8",
|
10
|
-
labelHeightDisplay: "1",
|
11
|
-
labelsPerPageDisplay: "30",
|
12
|
-
averyPartNumber: "*60"
|
13
|
-
},
|
14
|
-
labelSpec: {
|
15
|
-
type: "AVERY",
|
16
|
-
pageDimensions: {
|
17
|
-
width: 8.5,
|
18
|
-
height: 11,
|
19
|
-
leftMargin: 0.1875,
|
20
|
-
rightMargin: 0.1875,
|
21
|
-
topMargin: 0.5,
|
22
|
-
bottomMargin: 0.5
|
23
|
-
},
|
24
|
-
numLabelsAcross: 3,
|
25
|
-
numLabelsDown: 10,
|
26
|
-
labelWidth: 2.625,
|
27
|
-
labelHeight: 1,
|
28
|
-
horizGapIn: 0.125,
|
29
|
-
vertGapIn: 0,
|
30
|
-
labelPadding: 0.1,
|
31
|
-
fontSizePx: 11,
|
32
|
-
maxNumLabelLines: 4
|
33
|
-
}
|
34
|
-
},
|
35
|
-
{
|
36
|
-
descriptionPDF: {
|
37
|
-
labelWidthDisplay: "4",
|
38
|
-
labelHeightDisplay: "1",
|
39
|
-
labelsPerPageDisplay: "20",
|
40
|
-
averyPartNumber: "*61"
|
41
|
-
},
|
42
|
-
labelSpec: {
|
43
|
-
type: "AVERY",
|
44
|
-
pageDimensions: {
|
45
|
-
width: 8.5,
|
46
|
-
height: 11,
|
47
|
-
leftMargin: 0.15625,
|
48
|
-
rightMargin: 0.15625,
|
49
|
-
topMargin: 0.47637821,
|
50
|
-
bottomMargin: 0.5
|
51
|
-
},
|
52
|
-
numLabelsAcross: 2,
|
53
|
-
numLabelsDown: 10,
|
54
|
-
labelWidth: 4,
|
55
|
-
labelHeight: 1.0025,
|
56
|
-
horizGapIn: 0.1875,
|
57
|
-
vertGapIn: 0,
|
58
|
-
labelPadding: 0.1,
|
59
|
-
fontSizePx: 11,
|
60
|
-
maxNumLabelLines: 4
|
61
|
-
}
|
62
|
-
},
|
63
|
-
{
|
64
|
-
descriptionPDF: {
|
65
|
-
labelWidthDisplay: "4",
|
66
|
-
labelHeightDisplay: "1-1/3",
|
67
|
-
labelsPerPageDisplay: "14",
|
68
|
-
averyPartNumber: "*62"
|
69
|
-
},
|
70
|
-
labelSpec: {
|
71
|
-
type: "AVERY",
|
72
|
-
pageDimensions: {
|
73
|
-
width: 8.5,
|
74
|
-
height: 11,
|
75
|
-
leftMargin: 0.15625,
|
76
|
-
rightMargin: 0.15625,
|
77
|
-
topMargin: 0.81889808,
|
78
|
-
bottomMargin: 0.83464612
|
79
|
-
},
|
80
|
-
numLabelsAcross: 2,
|
81
|
-
numLabelsDown: 7,
|
82
|
-
labelWidth: 4,
|
83
|
-
labelHeight: 1.3352,
|
84
|
-
horizGapIn: 0.1875,
|
85
|
-
vertGapIn: 0,
|
86
|
-
labelPadding: 0.1,
|
87
|
-
fontSizePx: 11,
|
88
|
-
maxNumLabelLines: 6
|
89
|
-
}
|
90
|
-
},
|
91
|
-
{
|
92
|
-
descriptionPDF: {
|
93
|
-
labelWidthDisplay: "4",
|
94
|
-
labelHeightDisplay: "2",
|
95
|
-
labelsPerPageDisplay: "10",
|
96
|
-
averyPartNumber: "*63"
|
97
|
-
},
|
98
|
-
labelSpec: {
|
99
|
-
type: "AVERY",
|
100
|
-
pageDimensions: {
|
101
|
-
width: 8.5,
|
102
|
-
height: 11,
|
103
|
-
leftMargin: 0.15625,
|
104
|
-
rightMargin: 0.15625,
|
105
|
-
topMargin: 0.5,
|
106
|
-
bottomMargin: 0.5
|
107
|
-
},
|
108
|
-
numLabelsAcross: 2,
|
109
|
-
numLabelsDown: 5,
|
110
|
-
labelWidth: 4,
|
111
|
-
labelHeight: 2,
|
112
|
-
horizGapIn: 0.1875,
|
113
|
-
vertGapIn: 0,
|
114
|
-
labelPadding: 0.1,
|
115
|
-
fontSizePx: 12,
|
116
|
-
maxNumLabelLines: 10
|
117
|
-
}
|
118
|
-
},
|
119
|
-
{
|
120
|
-
descriptionPDF: {
|
121
|
-
labelWidthDisplay: "4",
|
122
|
-
labelHeightDisplay: "3-1/3",
|
123
|
-
labelsPerPageDisplay: "6",
|
124
|
-
averyPartNumber: "*64"
|
125
|
-
},
|
126
|
-
labelSpec: {
|
127
|
-
type: "AVERY",
|
128
|
-
pageDimensions: {
|
129
|
-
width: 8.5,
|
130
|
-
height: 11,
|
131
|
-
leftMargin: 0.15625,
|
132
|
-
rightMargin: 0.15625,
|
133
|
-
topMargin: 0.4724412,
|
134
|
-
bottomMargin: 0.50000027
|
135
|
-
},
|
136
|
-
numLabelsAcross: 2,
|
137
|
-
numLabelsDown: 3,
|
138
|
-
labelWidth: 4,
|
139
|
-
labelHeight: 3.342,
|
140
|
-
horizGapIn: 0.1875,
|
141
|
-
vertGapIn: 0,
|
142
|
-
labelPadding: 0.1,
|
143
|
-
fontSizePx: 14,
|
144
|
-
maxNumLabelLines: 12
|
145
|
-
}
|
146
|
-
},
|
147
|
-
{
|
148
|
-
descriptionPDF: {
|
149
|
-
labelWidthDisplay: "1-3/4",
|
150
|
-
labelHeightDisplay: "1/2",
|
151
|
-
labelsPerPageDisplay: "80",
|
152
|
-
averyPartNumber: "*67"
|
153
|
-
},
|
154
|
-
labelSpec: {
|
155
|
-
type: "AVERY",
|
156
|
-
pageDimensions: {
|
157
|
-
width: 8.5,
|
158
|
-
height: 11,
|
159
|
-
leftMargin: 0.307086375,
|
160
|
-
rightMargin: 0.307086375,
|
161
|
-
topMargin: 0.4724412,
|
162
|
-
bottomMargin: 0.49606326
|
163
|
-
},
|
164
|
-
numLabelsAcross: 4,
|
165
|
-
numLabelsDown: 20,
|
166
|
-
labelWidth: 1.75,
|
167
|
-
labelHeight: 0.50155,
|
168
|
-
horizGapIn: 0.29527575,
|
169
|
-
vertGapIn: 0,
|
170
|
-
labelPadding: 0.1,
|
171
|
-
fontSizePx: 8,
|
172
|
-
maxNumLabelLines: 3
|
173
|
-
}
|
174
|
-
},
|
175
|
-
{
|
176
|
-
descriptionPDF: {
|
177
|
-
labelWidthDisplay: "1-3/4",
|
178
|
-
labelHeightDisplay: "2/3",
|
179
|
-
labelsPerPageDisplay: "60",
|
180
|
-
averyPartNumber: "*95"
|
181
|
-
},
|
182
|
-
labelSpec: {
|
183
|
-
type: "AVERY",
|
184
|
-
pageDimensions: {
|
185
|
-
width: 8.5,
|
186
|
-
height: 11,
|
187
|
-
leftMargin: 0.28936983,
|
188
|
-
rightMargin: 0.28936983,
|
189
|
-
topMargin: 0.53937037,
|
190
|
-
bottomMargin: 0.5511814
|
191
|
-
},
|
192
|
-
numLabelsAcross: 4,
|
193
|
-
numLabelsDown: 15,
|
194
|
-
labelWidth: 1.75,
|
195
|
-
labelHeight: 0.6605,
|
196
|
-
horizGapIn: 0.30708678,
|
197
|
-
vertGapIn: 0,
|
198
|
-
labelPadding: 0.1,
|
199
|
-
fontSizePx: 8,
|
200
|
-
maxNumLabelLines: 4
|
201
|
-
}
|
202
|
-
}
|
203
|
-
];
|
204
|
-
|
205
|
-
const pdfUtils = /*#__PURE__*/Object.freeze({
|
206
|
-
__proto__: null,
|
207
|
-
'default': labelFormats
|
208
|
-
});
|
209
|
-
|
210
|
-
export { pdfUtils as p };
|