@foodmarketmaker/mapag 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15679,19 +15679,31 @@ class BackgroundMaskMapper {
|
|
|
15679
15679
|
...settings,
|
|
15680
15680
|
});
|
|
15681
15681
|
}
|
|
15682
|
-
const _ = effect(() => {
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15682
|
+
// const _ = effect(() => {
|
|
15683
|
+
// const settings = this.settings();
|
|
15684
|
+
// this._update(settings);
|
|
15685
|
+
// });
|
|
15686
15686
|
}
|
|
15687
15687
|
update(settings) {
|
|
15688
|
+
if (!settings) {
|
|
15689
|
+
return;
|
|
15690
|
+
}
|
|
15688
15691
|
this.settings.set({ ...this.settings(), ...settings });
|
|
15692
|
+
if (Object.hasOwn(settings, 'mask')) {
|
|
15693
|
+
// Generate
|
|
15694
|
+
this.load({ ...this.settings(), ...settings });
|
|
15695
|
+
}
|
|
15696
|
+
// Update existing layer
|
|
15697
|
+
this._update({ ...this.settings(), ...settings });
|
|
15689
15698
|
}
|
|
15690
15699
|
_update(settings) {
|
|
15691
15700
|
if (!this.map) {
|
|
15692
15701
|
return;
|
|
15693
15702
|
}
|
|
15694
|
-
this.
|
|
15703
|
+
const map = this.map;
|
|
15704
|
+
map.setLayoutProperty(this.layer, 'visibility', settings.visible ? 'visible' : 'none');
|
|
15705
|
+
map.setPaintProperty(this.layer, 'fill-color', settings.fillColor);
|
|
15706
|
+
map.setPaintProperty(this.layer, 'fill-opacity', settings.fillOpacity);
|
|
15695
15707
|
}
|
|
15696
15708
|
onReady(map) {
|
|
15697
15709
|
this.map = map;
|
|
@@ -21589,7 +21601,6 @@ class NAASMapper {
|
|
|
21589
21601
|
}
|
|
21590
21602
|
}
|
|
21591
21603
|
onClick = async (e) => {
|
|
21592
|
-
e.preventDefault();
|
|
21593
21604
|
if (!this.map) {
|
|
21594
21605
|
return;
|
|
21595
21606
|
}
|
|
@@ -21603,6 +21614,7 @@ class NAASMapper {
|
|
|
21603
21614
|
layers: [this.LAYER_ID],
|
|
21604
21615
|
});
|
|
21605
21616
|
if (features.length > 0) {
|
|
21617
|
+
e.preventDefault();
|
|
21606
21618
|
if (this.current) {
|
|
21607
21619
|
this.current.remove();
|
|
21608
21620
|
this.current = null;
|
|
@@ -21823,6 +21835,7 @@ class NaicsMapper {
|
|
|
21823
21835
|
ICON_LAYER_ID;
|
|
21824
21836
|
HEATMAP_LAYER_ID;
|
|
21825
21837
|
settings = signal(new NaicsMapperSettings(), ...(ngDevMode ? [{ debugName: "settings" }] : []));
|
|
21838
|
+
current = null;
|
|
21826
21839
|
constructor(settings, id = undefined) {
|
|
21827
21840
|
if (id) {
|
|
21828
21841
|
this.id = id;
|
|
@@ -22184,7 +22197,7 @@ class NaicsMapper {
|
|
|
22184
22197
|
getSettings() {
|
|
22185
22198
|
return { ...this.settings() };
|
|
22186
22199
|
}
|
|
22187
|
-
onClick = (e) => {
|
|
22200
|
+
onClick = async (e) => {
|
|
22188
22201
|
if (!this.map) {
|
|
22189
22202
|
return;
|
|
22190
22203
|
}
|
|
@@ -22204,17 +22217,14 @@ class NaicsMapper {
|
|
|
22204
22217
|
if (!features || features.length == 0) {
|
|
22205
22218
|
return;
|
|
22206
22219
|
}
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
new Popup().setLngLat(e.lngLat).setHTML(html).addTo(map);
|
|
22216
|
-
});
|
|
22217
|
-
}
|
|
22220
|
+
e.preventDefault();
|
|
22221
|
+
if (this.current) {
|
|
22222
|
+
this.current.remove();
|
|
22223
|
+
this.current = null;
|
|
22224
|
+
}
|
|
22225
|
+
const html = await this.renderPopup(features[0]);
|
|
22226
|
+
if (html) {
|
|
22227
|
+
this.current = new Popup().setLngLat(e.lngLat).setHTML(html).addTo(this.map);
|
|
22218
22228
|
}
|
|
22219
22229
|
};
|
|
22220
22230
|
async renderPopup(f) {
|
|
@@ -23703,6 +23713,7 @@ class PointDataMapper {
|
|
|
23703
23713
|
CLUSTER_LABEL_LAYER_ID;
|
|
23704
23714
|
settings = signal(new PointDataMapperSettings(), ...(ngDevMode ? [{ debugName: "settings" }] : []));
|
|
23705
23715
|
svc = signal(null, ...(ngDevMode ? [{ debugName: "svc" }] : []));
|
|
23716
|
+
current = null;
|
|
23706
23717
|
constructor(popupRenderer, settings) {
|
|
23707
23718
|
this.id = 'points-' + Math.random().toString(36).substring(2, 15);
|
|
23708
23719
|
this.popupRenderer = popupRenderer;
|
|
@@ -24090,7 +24101,7 @@ class PointDataMapper {
|
|
|
24090
24101
|
}, StandardLayersMapper.POINTS);
|
|
24091
24102
|
});
|
|
24092
24103
|
}
|
|
24093
|
-
onClick = (e) => {
|
|
24104
|
+
onClick = async (e) => {
|
|
24094
24105
|
if (!this.map) {
|
|
24095
24106
|
return;
|
|
24096
24107
|
}
|
|
@@ -24102,12 +24113,18 @@ class PointDataMapper {
|
|
|
24102
24113
|
else if (settings.type == 'icon') {
|
|
24103
24114
|
features = this.map.queryRenderedFeatures(e.point, { layers: [this.ICON_LAYER_ID] });
|
|
24104
24115
|
}
|
|
24105
|
-
if (features.length
|
|
24106
|
-
|
|
24107
|
-
|
|
24108
|
-
|
|
24109
|
-
|
|
24110
|
-
|
|
24116
|
+
if (!features || features.length == 0) {
|
|
24117
|
+
return;
|
|
24118
|
+
}
|
|
24119
|
+
if (this.current) {
|
|
24120
|
+
this.current.remove();
|
|
24121
|
+
this.current = null;
|
|
24122
|
+
}
|
|
24123
|
+
if (this.popupRenderer) {
|
|
24124
|
+
const html = await this.popupRenderer.RenderPopup(features[0]);
|
|
24125
|
+
if (html) {
|
|
24126
|
+
this.current = new Popup().setLngLat(e.lngLat).setHTML(html).addTo(this.map);
|
|
24127
|
+
}
|
|
24111
24128
|
}
|
|
24112
24129
|
};
|
|
24113
24130
|
getSettings() {
|
|
@@ -24933,7 +24950,7 @@ class MapagDetails {
|
|
|
24933
24950
|
<ng-content></ng-content>
|
|
24934
24951
|
</div>
|
|
24935
24952
|
</div>
|
|
24936
|
-
`, isInline: true, styles: [".mapag-details{display:block}.summary{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:8px;font-size:1em;font-weight:600;color:#000;padding:4px 0
|
|
24953
|
+
`, isInline: true, styles: [".mapag-details{display:block}.summary{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:8px;font-size:1em;font-weight:600;color:#000;padding:4px 0;margin-bottom:0;margin-top:4px}.marker{display:inline-block;transition:transform .15s ease-out}.marker.open{transform:rotate(90deg);transform-origin:center}.content{max-height:0;overflow:hidden;transition:max-height .15s ease-out}.content.open{max-height:100vh;overflow:visible}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }] });
|
|
24937
24954
|
}
|
|
24938
24955
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapagDetails, decorators: [{
|
|
24939
24956
|
type: Component,
|
|
@@ -24947,7 +24964,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
24947
24964
|
<ng-content></ng-content>
|
|
24948
24965
|
</div>
|
|
24949
24966
|
</div>
|
|
24950
|
-
`, styles: [".mapag-details{display:block}.summary{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:8px;font-size:1em;font-weight:600;color:#000;padding:4px 0
|
|
24967
|
+
`, styles: [".mapag-details{display:block}.summary{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:8px;font-size:1em;font-weight:600;color:#000;padding:4px 0;margin-bottom:0;margin-top:4px}.marker{display:inline-block;transition:transform .15s ease-out}.marker.open{transform:rotate(90deg);transform-origin:center}.content{max-height:0;overflow:hidden;transition:max-height .15s ease-out}.content.open{max-height:100vh;overflow:visible}\n"] }]
|
|
24951
24968
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }] } });
|
|
24952
24969
|
|
|
24953
24970
|
class PaletteDisplay {
|
|
@@ -25890,7 +25907,7 @@ class FilterPanel {
|
|
|
25890
25907
|
const _mapInit = effect(() => {
|
|
25891
25908
|
const mapComp = this.map();
|
|
25892
25909
|
if (mapComp) {
|
|
25893
|
-
mapComp.mapper().set(
|
|
25910
|
+
mapComp.mapper().set('filter-mask', this.mapper);
|
|
25894
25911
|
}
|
|
25895
25912
|
}, ...(ngDevMode ? [{ debugName: "_mapInit" }] : []));
|
|
25896
25913
|
const _globalFilter = effect(async () => {
|
|
@@ -25900,7 +25917,7 @@ class FilterPanel {
|
|
|
25900
25917
|
if (stCo.length == 0) {
|
|
25901
25918
|
untracked(() => {
|
|
25902
25919
|
this.mapper.update({
|
|
25903
|
-
mask: undefined
|
|
25920
|
+
mask: undefined,
|
|
25904
25921
|
});
|
|
25905
25922
|
});
|
|
25906
25923
|
return;
|
|
@@ -25931,8 +25948,8 @@ class FilterPanel {
|
|
|
25931
25948
|
}
|
|
25932
25949
|
// Return a single mutlipolygon
|
|
25933
25950
|
return {
|
|
25934
|
-
type:
|
|
25935
|
-
coordinates: polys.flatMap(p => p.coordinates)
|
|
25951
|
+
type: 'MultiPolygon',
|
|
25952
|
+
coordinates: polys.flatMap((p) => p.coordinates),
|
|
25936
25953
|
};
|
|
25937
25954
|
}
|
|
25938
25955
|
async loadMasks(codes) {
|
|
@@ -25979,6 +25996,11 @@ class FilterPanel {
|
|
|
25979
25996
|
this.svc.stateCountyFilter.set([]);
|
|
25980
25997
|
this.toggleDialog();
|
|
25981
25998
|
}
|
|
25999
|
+
update(field, value) {
|
|
26000
|
+
this.mapper.update({
|
|
26001
|
+
[field]: value,
|
|
26002
|
+
});
|
|
26003
|
+
}
|
|
25982
26004
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FilterPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25983
26005
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: FilterPanel, isStandalone: true, selector: "mapag-filter-panel", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "customizeDialog", first: true, predicate: ["customizeDialog"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
25984
26006
|
<div>
|
|
@@ -25986,48 +26008,106 @@ class FilterPanel {
|
|
|
25986
26008
|
<fa-icon [icon]="faFilter"></fa-icon>
|
|
25987
26009
|
Filters
|
|
25988
26010
|
</button>
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
|
|
25997
|
-
|
|
25998
|
-
|
|
25999
|
-
|
|
26000
|
-
|
|
26001
|
-
|
|
26002
|
-
|
|
26011
|
+
<div>
|
|
26012
|
+
<dialog draggable mapagBringToFront onBody #customizeDialog>
|
|
26013
|
+
<h2>Global Filters</h2>
|
|
26014
|
+
|
|
26015
|
+
<div class="dlg-body">
|
|
26016
|
+
<p>Apply global filters to the map data by selecting states or counties below.</p>
|
|
26017
|
+
<div class="zones">
|
|
26018
|
+
<h3>Filters</h3>
|
|
26019
|
+
<div class="ctrl-group">
|
|
26020
|
+
<div class="ctrl-row">
|
|
26021
|
+
<label>States or Counties</label>
|
|
26022
|
+
<mapag-state-county-select [(ngModel)]="svc.stateCountyFilter"></mapag-state-county-select>
|
|
26023
|
+
</div>
|
|
26024
|
+
</div>
|
|
26025
|
+
|
|
26026
|
+
<h3>Mask</h3>
|
|
26027
|
+
<div class="ctrl-group">
|
|
26028
|
+
<div class="ctrl-row">
|
|
26029
|
+
<label for="mask">Highlighted Filtered Area</label>
|
|
26030
|
+
<input type="checkbox" id="mask" name="mask" [ngModel]="mapper.settings().visible" (ngModelChange)="update('visible', $event)" />
|
|
26031
|
+
<div></div>
|
|
26032
|
+
<div></div>
|
|
26033
|
+
|
|
26034
|
+
<label for="maskColor">Mask Color</label>
|
|
26035
|
+
<input type="color" id="maskColor" name="maskColor" [ngModel]="mapper.settings().fillColor" (ngModelChange)="update('fillColor', $event)" />
|
|
26036
|
+
<div></div>
|
|
26037
|
+
<div></div>
|
|
26038
|
+
|
|
26039
|
+
<label for="mask-opacity">Mask Opacity</label>
|
|
26040
|
+
<input type="range" id="mask-opacity" name="mask-opacity" min="0" max="1" step="0.1" [ngModel]="mapper.settings().fillOpacity" (ngModelChange)="update('fillOpacity', $event)" />
|
|
26041
|
+
</div>
|
|
26042
|
+
</div>
|
|
26043
|
+
</div>
|
|
26044
|
+
</div>
|
|
26045
|
+
<div class="dlg-buttons">
|
|
26046
|
+
<button class="btn" (click)="reset()">Reset</button>
|
|
26047
|
+
<button class="btn" (click)="toggleDialog()">Close</button>
|
|
26048
|
+
</div>
|
|
26049
|
+
</dialog>
|
|
26003
26050
|
</div>
|
|
26004
|
-
</
|
|
26005
|
-
`, isInline: true, styles: ["dialog{font-size:14pt;width:100%;max-width:700px;border:none;border-radius:8px;box-shadow:0 2px 10px #0003;padding:16px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;flex-direction:column}dialog:open{display:flex}dialog .dlg-body{flex-grow:1;overflow-y:auto}dialog.legend{width:fit-content}dialog.legend h2{font-size:smaller}dialog select{max-width:90vw}dialog h2{color:#000}dialog h2:before{content:\"\\22ee\\22ee \";padding-right:4px}dialog h3{color:#000;border-bottom:2px solid gray;font-weight:500;font-size:.9em;margin-top:16px;margin-bottom:8px}dialog h4{color:#000;font-weight:500;margin-bottom:8px;margin-top:12px;font-size:.85em;border:none}dialog p{font-size:.8em}dialog a{text-decoration:none;color:#0a3773;font-weight:500;font-size:.8em;padding-left:4px}dialog a:hover{text-decoration:underline;cursor:pointer}dialog a:before{content:\"\\1f517\";padding-right:2px}.ctrl-group{display:flex;flex-direction:column}.ctrl-row{display:grid;grid-template-columns:auto 1fr auto 1fr;align-items:center;gap:4px;justify-items:start;padding-left:20px}.ctrl-first{grid-column:1}.ctrl-row label{font-size:.8em;margin:0;padding:0;font-weight:400}.ctrl.wide{grid-column:span 3}input[type=range]{grid-column:span 3;justify-self:stretch}input[type=color]{width:40px;height:24px;border-radius:4px;cursor:pointer}input[type=number]{width:6ch;font-size:.8em}.dlg-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}button{background-color:#0a3773;color:#fff;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-size:.8em}button:hover{background-color:#083a5c}summary{font-size:1em;font-weight:600;color:#000;cursor:pointer;padding:8px 0;border-bottom:2px solid gray;list-style:none;-webkit-user-select:none;user-select:none;margin-bottom:8px}summary::-webkit-details-marker{display:none}summary:before{content:\"\\304f\";display:inline-block;margin-right:8px;transform:rotate(180deg);transition:transform .2s}details[open] summary:before{transform:rotate(270deg)}.radio-tabs{margin-bottom:12px;font-size:.8em;display:flex;flex-direction:row}.radio-tabs label{display:grid;grid-template-columns:auto 1fr;gap:4px;grid-template-rows:30px;align-items:center}.radio-tabs input[type=radio]{display:none}.radio-tabs label{padding:8px 12px;border:2px solid transparent;border-radius:6px;cursor:pointer;transition:all .2s ease}.radio-tabs label:has(input[type=radio]:checked){background-color:#fff;border-color:#333}.mgr-btn{justify-self:center;background-color:transparent;color:#4c4c4c;text-align:center;width:100%;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;margin:4px 0;padding:6px;gap:4px;border:1px solid rgb(218,218,218)}.mgr-btn:hover{background-color:transparent;border-color:#4c4c4c}.legend-row{display:grid;grid-template-columns:auto 1fr;gap:8px;padding:4px 0;align-items:center}.legend-title{font-weight:700;text-align:center;margin-bottom:8px}.legend-item{height:15px;width:15px;border:1px solid #ccc}.maplibregl-popup-close-button{top:13px;right:15px}@media screen and (max-width: 600px){dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:none;box-shadow:none;overflow:hidden}.dlg-buttons{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center}dialog h2:before{content:\"\";padding-right:0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: StateCountySelectComponent, selector: "mapag-state-county-select", inputs: ["selection"], outputs: ["selectionChange"] }, { kind: "directive", type: DraggableDialogDirective, selector: "dialog[draggable]" }, { kind: "directive", type: BringToFrontDirective, selector: "[mapagBringToFront]" }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "directive", type: OnBodyDirective, selector: "dialog[onBody]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
26051
|
+
</div>
|
|
26052
|
+
`, isInline: true, styles: ["dialog{font-size:14pt;width:100%;max-width:700px;border:none;border-radius:8px;box-shadow:0 2px 10px #0003;padding:16px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;flex-direction:column}dialog:open{display:flex}dialog .dlg-body{flex-grow:1;overflow-y:auto}dialog.legend{width:fit-content}dialog.legend h2{font-size:smaller}dialog select{max-width:90vw}dialog h2{color:#000}dialog h2:before{content:\"\\22ee\\22ee \";padding-right:4px}dialog h3{color:#000;border-bottom:2px solid gray;font-weight:500;font-size:.9em;margin-top:16px;margin-bottom:8px}dialog h4{color:#000;font-weight:500;margin-bottom:8px;margin-top:12px;font-size:.85em;border:none}dialog p{font-size:.8em}dialog a{text-decoration:none;color:#0a3773;font-weight:500;font-size:.8em;padding-left:4px}dialog a:hover{text-decoration:underline;cursor:pointer}dialog a:before{content:\"\\1f517\";padding-right:2px}.ctrl-group{display:flex;flex-direction:column}.ctrl-row{display:grid;grid-template-columns:auto 1fr auto 1fr;align-items:center;gap:4px;justify-items:start;padding-left:20px}.ctrl-first{grid-column:1}.ctrl-row label{font-size:.8em;margin:0;padding:0;font-weight:400}.ctrl.wide{grid-column:span 3}input[type=range]{grid-column:span 3;justify-self:stretch}input[type=color]{width:40px;height:24px;border-radius:4px;cursor:pointer}input[type=number]{width:6ch;font-size:.8em}.dlg-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}button{background-color:#0a3773;color:#fff;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-size:.8em}button:hover{background-color:#083a5c}summary{font-size:1em;font-weight:600;color:#000;cursor:pointer;padding:8px 0;border-bottom:2px solid gray;list-style:none;-webkit-user-select:none;user-select:none;margin-bottom:8px}summary::-webkit-details-marker{display:none}summary:before{content:\"\\304f\";display:inline-block;margin-right:8px;transform:rotate(180deg);transition:transform .2s}details[open] summary:before{transform:rotate(270deg)}.radio-tabs{margin-bottom:12px;font-size:.8em;display:flex;flex-direction:row}.radio-tabs label{display:grid;grid-template-columns:auto 1fr;gap:4px;grid-template-rows:30px;align-items:center}.radio-tabs input[type=radio]{display:none}.radio-tabs label{padding:8px 12px;border:2px solid transparent;border-radius:6px;cursor:pointer;transition:all .2s ease}.radio-tabs label:has(input[type=radio]:checked){background-color:#fff;border-color:#333}.mgr-btn{justify-self:center;background-color:transparent;color:#4c4c4c;text-align:center;width:100%;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;margin:4px 0;padding:6px;gap:4px;border:1px solid rgb(218,218,218)}.mgr-btn:hover{background-color:transparent;border-color:#4c4c4c}.legend-row{display:grid;grid-template-columns:auto 1fr;gap:8px;padding:4px 0;align-items:center}.legend-title{font-weight:700;text-align:center;margin-bottom:8px}.legend-item{height:15px;width:15px;border:1px solid #ccc}.maplibregl-popup-close-button{top:13px;right:15px}@media screen and (max-width: 600px){dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:none;box-shadow:none;overflow:hidden}.dlg-buttons{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center}dialog h2:before{content:\"\";padding-right:0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: StateCountySelectComponent, selector: "mapag-state-county-select", inputs: ["selection"], outputs: ["selectionChange"] }, { kind: "directive", type: DraggableDialogDirective, selector: "dialog[draggable]" }, { kind: "directive", type: BringToFrontDirective, selector: "[mapagBringToFront]" }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "directive", type: OnBodyDirective, selector: "dialog[onBody]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
26006
26053
|
}
|
|
26007
26054
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FilterPanel, decorators: [{
|
|
26008
26055
|
type: Component,
|
|
26009
|
-
args: [{ selector: 'mapag-filter-panel', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
26056
|
+
args: [{ selector: 'mapag-filter-panel', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
26057
|
+
CommonModule,
|
|
26058
|
+
FormsModule,
|
|
26059
|
+
StateCountySelectComponent,
|
|
26060
|
+
DraggableDialogDirective,
|
|
26061
|
+
BringToFrontDirective,
|
|
26062
|
+
FaIconComponent,
|
|
26063
|
+
OnBodyDirective,
|
|
26064
|
+
], template: `
|
|
26010
26065
|
<div>
|
|
26011
26066
|
<button class="mgr-btn" (click)="toggleDialog()">
|
|
26012
26067
|
<fa-icon [icon]="faFilter"></fa-icon>
|
|
26013
26068
|
Filters
|
|
26014
26069
|
</button>
|
|
26015
|
-
|
|
26016
|
-
|
|
26017
|
-
|
|
26018
|
-
|
|
26019
|
-
|
|
26020
|
-
|
|
26021
|
-
|
|
26022
|
-
|
|
26023
|
-
|
|
26024
|
-
|
|
26025
|
-
|
|
26026
|
-
|
|
26027
|
-
|
|
26028
|
-
|
|
26070
|
+
<div>
|
|
26071
|
+
<dialog draggable mapagBringToFront onBody #customizeDialog>
|
|
26072
|
+
<h2>Global Filters</h2>
|
|
26073
|
+
|
|
26074
|
+
<div class="dlg-body">
|
|
26075
|
+
<p>Apply global filters to the map data by selecting states or counties below.</p>
|
|
26076
|
+
<div class="zones">
|
|
26077
|
+
<h3>Filters</h3>
|
|
26078
|
+
<div class="ctrl-group">
|
|
26079
|
+
<div class="ctrl-row">
|
|
26080
|
+
<label>States or Counties</label>
|
|
26081
|
+
<mapag-state-county-select [(ngModel)]="svc.stateCountyFilter"></mapag-state-county-select>
|
|
26082
|
+
</div>
|
|
26083
|
+
</div>
|
|
26084
|
+
|
|
26085
|
+
<h3>Mask</h3>
|
|
26086
|
+
<div class="ctrl-group">
|
|
26087
|
+
<div class="ctrl-row">
|
|
26088
|
+
<label for="mask">Highlighted Filtered Area</label>
|
|
26089
|
+
<input type="checkbox" id="mask" name="mask" [ngModel]="mapper.settings().visible" (ngModelChange)="update('visible', $event)" />
|
|
26090
|
+
<div></div>
|
|
26091
|
+
<div></div>
|
|
26092
|
+
|
|
26093
|
+
<label for="maskColor">Mask Color</label>
|
|
26094
|
+
<input type="color" id="maskColor" name="maskColor" [ngModel]="mapper.settings().fillColor" (ngModelChange)="update('fillColor', $event)" />
|
|
26095
|
+
<div></div>
|
|
26096
|
+
<div></div>
|
|
26097
|
+
|
|
26098
|
+
<label for="mask-opacity">Mask Opacity</label>
|
|
26099
|
+
<input type="range" id="mask-opacity" name="mask-opacity" min="0" max="1" step="0.1" [ngModel]="mapper.settings().fillOpacity" (ngModelChange)="update('fillOpacity', $event)" />
|
|
26100
|
+
</div>
|
|
26101
|
+
</div>
|
|
26102
|
+
</div>
|
|
26103
|
+
</div>
|
|
26104
|
+
<div class="dlg-buttons">
|
|
26105
|
+
<button class="btn" (click)="reset()">Reset</button>
|
|
26106
|
+
<button class="btn" (click)="toggleDialog()">Close</button>
|
|
26107
|
+
</div>
|
|
26108
|
+
</dialog>
|
|
26029
26109
|
</div>
|
|
26030
|
-
</
|
|
26110
|
+
</div>
|
|
26031
26111
|
`, styles: ["dialog{font-size:14pt;width:100%;max-width:700px;border:none;border-radius:8px;box-shadow:0 2px 10px #0003;padding:16px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;flex-direction:column}dialog:open{display:flex}dialog .dlg-body{flex-grow:1;overflow-y:auto}dialog.legend{width:fit-content}dialog.legend h2{font-size:smaller}dialog select{max-width:90vw}dialog h2{color:#000}dialog h2:before{content:\"\\22ee\\22ee \";padding-right:4px}dialog h3{color:#000;border-bottom:2px solid gray;font-weight:500;font-size:.9em;margin-top:16px;margin-bottom:8px}dialog h4{color:#000;font-weight:500;margin-bottom:8px;margin-top:12px;font-size:.85em;border:none}dialog p{font-size:.8em}dialog a{text-decoration:none;color:#0a3773;font-weight:500;font-size:.8em;padding-left:4px}dialog a:hover{text-decoration:underline;cursor:pointer}dialog a:before{content:\"\\1f517\";padding-right:2px}.ctrl-group{display:flex;flex-direction:column}.ctrl-row{display:grid;grid-template-columns:auto 1fr auto 1fr;align-items:center;gap:4px;justify-items:start;padding-left:20px}.ctrl-first{grid-column:1}.ctrl-row label{font-size:.8em;margin:0;padding:0;font-weight:400}.ctrl.wide{grid-column:span 3}input[type=range]{grid-column:span 3;justify-self:stretch}input[type=color]{width:40px;height:24px;border-radius:4px;cursor:pointer}input[type=number]{width:6ch;font-size:.8em}.dlg-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}button{background-color:#0a3773;color:#fff;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-size:.8em}button:hover{background-color:#083a5c}summary{font-size:1em;font-weight:600;color:#000;cursor:pointer;padding:8px 0;border-bottom:2px solid gray;list-style:none;-webkit-user-select:none;user-select:none;margin-bottom:8px}summary::-webkit-details-marker{display:none}summary:before{content:\"\\304f\";display:inline-block;margin-right:8px;transform:rotate(180deg);transition:transform .2s}details[open] summary:before{transform:rotate(270deg)}.radio-tabs{margin-bottom:12px;font-size:.8em;display:flex;flex-direction:row}.radio-tabs label{display:grid;grid-template-columns:auto 1fr;gap:4px;grid-template-rows:30px;align-items:center}.radio-tabs input[type=radio]{display:none}.radio-tabs label{padding:8px 12px;border:2px solid transparent;border-radius:6px;cursor:pointer;transition:all .2s ease}.radio-tabs label:has(input[type=radio]:checked){background-color:#fff;border-color:#333}.mgr-btn{justify-self:center;background-color:transparent;color:#4c4c4c;text-align:center;width:100%;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;margin:4px 0;padding:6px;gap:4px;border:1px solid rgb(218,218,218)}.mgr-btn:hover{background-color:transparent;border-color:#4c4c4c}.legend-row{display:grid;grid-template-columns:auto 1fr;gap:8px;padding:4px 0;align-items:center}.legend-title{font-weight:700;text-align:center;margin-bottom:8px}.legend-item{height:15px;width:15px;border:1px solid #ccc}.maplibregl-popup-close-button{top:13px;right:15px}@media screen and (max-width: 600px){dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:none;box-shadow:none;overflow:hidden}.dlg-buttons{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center}dialog h2:before{content:\"\";padding-right:0}}\n"] }]
|
|
26032
26112
|
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }], customizeDialog: [{ type: i0.ViewChild, args: ['customizeDialog', { isSignal: true }] }] } });
|
|
26033
26113
|
|