@mwater/visualization 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/MWaterAddRelatedFormComponent.d.ts +1 -1
- package/lib/MWaterAddRelatedFormComponent.js +10 -17
- package/lib/MWaterContextComponent.d.ts +17 -7
- package/lib/MWaterContextComponent.js +51 -70
- package/lib/MWaterLoaderComponent.d.ts +2 -2
- package/lib/MWaterLoaderComponent.js +1 -1
- package/lib/MWaterTableSelectComponent.d.ts +0 -1
- package/lib/MWaterTableSelectComponent.js +20 -41
- package/lib/axes/RangesComponent.d.ts +12 -6
- package/lib/axes/RangesComponent.js +21 -10
- package/lib/dashboards/DashboardComponent.d.ts +1 -9
- package/lib/dashboards/DashboardComponent.js +16 -27
- package/lib/dashboards/ServerDashboardDataSource.d.ts +1 -0
- package/lib/dashboards/ServerDashboardDataSource.js +3 -0
- package/lib/datagrids/DatagridComponent.d.ts +10 -4
- package/lib/datagrids/DatagridComponent.js +34 -6
- package/lib/datagrids/DatagridDataSource.d.ts +1 -0
- package/lib/datagrids/DatagridDataSource.js +3 -0
- package/lib/datagrids/DatagridDesign.d.ts +2 -0
- package/lib/datagrids/DatagridDesignerComponent.js +3 -2
- package/lib/datagrids/DatagridViewComponent.d.ts +2 -0
- package/lib/datagrids/DatagridViewComponent.js +4 -3
- package/lib/datagrids/DirectDatagridDataSource.d.ts +1 -0
- package/lib/datagrids/DirectDatagridDataSource.js +26 -0
- package/lib/datagrids/LabeledExprGenerator.js +15 -0
- package/lib/datagrids/ServerDatagridDataSource.d.ts +1 -0
- package/lib/datagrids/ServerDatagridDataSource.js +15 -0
- package/lib/dayjs.d.ts +2 -0
- package/lib/dayjs.js +9 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +2 -4
- package/lib/languages.js +5 -0
- package/lib/layouts/blocks/BlocksDisplayComponent.js +2 -2
- package/lib/layouts/grid/LegoLayoutEngine.d.ts +1 -1
- package/lib/maps/BufferLayerDesignerComponent.js +2 -2
- package/lib/maps/ChoroplethLayerDesigner.js +2 -2
- package/lib/maps/ClusterLayerDesignerComponent.js +2 -2
- package/lib/maps/DetailLevelSelectComponent.d.ts +1 -93
- package/lib/maps/DirectMapDataSource.js +1 -2
- package/lib/maps/GridLayerDesigner.js +2 -2
- package/lib/maps/Layer.js +7 -18
- package/lib/maps/MapComponent.js +1 -1
- package/lib/maps/MapDesignerComponent.d.ts +1 -12
- package/lib/maps/MapDesignerComponent.js +5 -12
- package/lib/maps/MarkersLayerDesignerComponent.js +2 -2
- package/lib/maps/PopupFilterJoinsUtils.d.ts +6 -1
- package/lib/maps/PopupFilterJoinsUtils.js +4 -3
- package/lib/maps/RegionSelectComponent.d.ts +1 -33
- package/lib/maps/UtfGridLayer.js +1 -1
- package/lib/maps/VectorMapViewComponent.js +21 -29
- package/lib/quickfilter/QuickfiltersComponent.d.ts +2 -186
- package/lib/quickfilter/QuickfiltersDesignComponent.js +1 -1
- package/lib/quickfilter/TextLiteralComponent.d.ts +2 -186
- package/lib/quickfilter/TextLiteralComponent.js +3 -0
- package/lib/valueFormatter.js +52 -1
- package/lib/widgets/ImageWidgetComponent.js +2 -2
- package/lib/widgets/charts/calendar/CalendarChartDesignerComponent.js +2 -2
- package/lib/widgets/charts/imagemosaic/ImageMosaicChart.d.ts +1 -1
- package/lib/widgets/charts/imagemosaic/ImageMosaicChart.js +1 -1
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.js +2 -2
- package/lib/widgets/charts/layered/LayeredChartCompiler.d.ts +1 -1
- package/lib/widgets/charts/layered/LayeredChartLayerDesignerComponent.js +2 -2
- package/lib/widgets/charts/pivot/PivotChartDesignerComponent.js +2 -2
- package/lib/widgets/charts/pivot/PivotChartLayout.d.ts +3 -2
- package/lib/widgets/charts/pivot/PivotChartLayoutComponent.js +4 -1
- package/lib/widgets/charts/pivot/PivotChartQueryBuilder.js +1 -1
- package/lib/widgets/charts/table/TableChart.js +15 -4
- package/lib/widgets/charts/table/TableChartDesignerComponent.js +2 -2
- package/lib/widgets/charts/table/TableChartViewComponent.d.ts +2 -1
- package/lib/widgets/charts/table/TableChartViewComponent.js +9 -4
- package/lib/widgets/text/ExprItemEditorComponent.js +2 -2
- package/package.json +8 -8
- package/src/MWaterAddRelatedFormComponent.ts +15 -20
- package/src/MWaterAddRelatedIndicatorComponent.ts +1 -1
- package/src/MWaterContextComponent.tsx +140 -0
- package/src/MWaterLoaderComponent.ts +2 -2
- package/src/{MWaterTableSelectComponent.ts → MWaterTableSelectComponent.tsx} +61 -66
- package/src/axes/AxisBuilder.ts +1 -1
- package/src/axes/RangesComponent.ts +27 -16
- package/src/dashboards/{DashboardComponent.ts → DashboardComponent.tsx} +37 -40
- package/src/dashboards/ServerDashboardDataSource.ts +16 -12
- package/src/datagrids/DatagridComponent.ts +59 -14
- package/src/datagrids/DatagridDataSource.ts +8 -0
- package/src/datagrids/DatagridDesign.ts +3 -0
- package/src/datagrids/DatagridDesignerComponent.tsx +9 -1
- package/src/datagrids/DatagridViewComponent.ts +7 -3
- package/src/datagrids/DirectDatagridDataSource.ts +35 -0
- package/src/datagrids/LabeledExprGenerator.ts +15 -0
- package/src/datagrids/ServerDatagridDataSource.ts +22 -4
- package/src/dayjs.ts +5 -0
- package/src/index.ts +0 -2
- package/src/languages.ts +5 -0
- package/src/layouts/blocks/BlocksDisplayComponent.ts +2 -2
- package/src/layouts/grid/LegoLayoutEngine.ts +2 -2
- package/src/layouts/grid/WidgetContainerComponent.ts +2 -2
- package/src/maps/BingLayer.ts +2 -2
- package/src/maps/BufferLayerDesignerComponent.ts +1 -1
- package/src/maps/ChoroplethLayerDesigner.tsx +1 -1
- package/src/maps/ClusterLayerDesignerComponent.ts +1 -1
- package/src/maps/DirectMapDataSource.ts +1 -2
- package/src/maps/GridLayerDesigner.tsx +1 -1
- package/src/maps/Layer.ts +6 -16
- package/src/maps/LegendGroup.ts +1 -1
- package/src/maps/MWaterServerLayer.ts +2 -2
- package/src/maps/MapComponent.ts +1 -1
- package/src/maps/{MapDesignerComponent.ts → MapDesignerComponent.tsx} +8 -16
- package/src/maps/MarkersLayerDesignerComponent.ts +1 -1
- package/src/maps/PopupFilterJoinsUtils.ts +4 -4
- package/src/maps/RasterMapViewComponent.ts +0 -1
- package/src/maps/ServerMapDataSource.ts +6 -6
- package/src/maps/SwitchableTileUrlLayerDesigner.tsx +1 -13
- package/src/maps/UtfGridLayer.ts +4 -4
- package/src/maps/VectorMapViewComponent.tsx +23 -36
- package/src/maps/mapboxUtils.ts +2 -2
- package/src/quickfilter/QuickfiltersDesignComponent.tsx +1 -1
- package/src/quickfilter/TextLiteralComponent.ts +4 -0
- package/src/richtext/ExprItemsHtmlConverter.ts +1 -1
- package/src/richtext/FontColorPaletteItem.ts +1 -1
- package/src/richtext/FontSizePaletteItem.ts +1 -1
- package/src/richtext/ItemsHtmlConverter.ts +2 -2
- package/src/valueFormatter.ts +54 -1
- package/src/widgets/ImageWidgetComponent.ts +1 -1
- package/src/widgets/charts/calendar/CalendarChartDesignerComponent.ts +1 -1
- package/src/widgets/charts/imagemosaic/ImageMosaicChart.ts +1 -1
- package/src/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.ts +1 -1
- package/src/widgets/charts/layered/LayeredChartLayerDesignerComponent.tsx +1 -1
- package/src/widgets/charts/pivot/PivotChartDesignerComponent.tsx +1 -1
- package/src/widgets/charts/pivot/PivotChartLayout.ts +3 -2
- package/src/widgets/charts/pivot/PivotChartLayoutBuilder.ts +2 -2
- package/src/widgets/charts/pivot/PivotChartLayoutComponent.tsx +7 -3
- package/src/widgets/charts/pivot/PivotChartQueryBuilder.ts +1 -1
- package/src/widgets/charts/table/TableChart.ts +24 -14
- package/src/widgets/charts/table/TableChartDesignerComponent.ts +1 -1
- package/src/widgets/charts/table/TableChartViewComponent.ts +10 -5
- package/src/widgets/text/ExprItemEditorComponent.tsx +1 -1
- package/stories/dashboards.js +3 -3
- package/src/MWaterContextComponent.ts +0 -144
- package/src/TableSelectComponent.ts +0 -60
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { DataSource, Schema } from "@mwater/expressions";
|
|
4
3
|
import { MapDesign } from "./MapDesign";
|
|
@@ -18,12 +17,6 @@ export interface MapDesignerComponentProps {
|
|
|
18
17
|
enableQuickfilters?: boolean;
|
|
19
18
|
}
|
|
20
19
|
export default class MapDesignerComponent extends React.Component<MapDesignerComponentProps> {
|
|
21
|
-
static childContextTypes: {
|
|
22
|
-
activeTables: PropTypes.Requireable<string[]>;
|
|
23
|
-
};
|
|
24
|
-
getChildContext(): {
|
|
25
|
-
activeTables: string[];
|
|
26
|
-
};
|
|
27
20
|
handleAttributionChange: (text: any) => void;
|
|
28
21
|
handleAutoBoundsChange: (value: any) => void;
|
|
29
22
|
handleShowLayerSwitcherChange: (value: any) => void;
|
|
@@ -31,9 +24,5 @@ export default class MapDesignerComponent extends React.Component<MapDesignerCom
|
|
|
31
24
|
handleConvertToMarkersMap: () => void;
|
|
32
25
|
handleInitialLegendDisplayChange: (value: any) => void;
|
|
33
26
|
renderOptionsTab(): React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
34
|
-
render(): React.
|
|
35
|
-
style: {
|
|
36
|
-
padding: number;
|
|
37
|
-
};
|
|
38
|
-
}, HTMLElement>;
|
|
27
|
+
render(): React.JSX.Element;
|
|
39
28
|
}
|
|
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const lodash_1 = __importDefault(require("lodash"));
|
|
30
|
-
const prop_types_1 = __importDefault(require("prop-types"));
|
|
31
30
|
const react_1 = __importDefault(require("react"));
|
|
32
31
|
const R = react_1.default.createElement;
|
|
33
32
|
const TabbedComponent_1 = __importDefault(require("@mwater/react-library/lib/TabbedComponent"));
|
|
@@ -42,14 +41,8 @@ const MapUtils = __importStar(require("./MapUtils"));
|
|
|
42
41
|
const ui = __importStar(require("@mwater/react-library/lib/bootstrap"));
|
|
43
42
|
const QuickfiltersDesignComponent_1 = __importDefault(require("../quickfilter/QuickfiltersDesignComponent"));
|
|
44
43
|
const immer_1 = __importDefault(require("immer"));
|
|
44
|
+
const expressions_ui_1 = require("@mwater/expressions-ui");
|
|
45
45
|
class MapDesignerComponent extends react_1.default.Component {
|
|
46
|
-
static childContextTypes = { activeTables: prop_types_1.default.arrayOf(prop_types_1.default.string.isRequired) };
|
|
47
|
-
getChildContext() {
|
|
48
|
-
return {
|
|
49
|
-
// Pass active tables down to table select components so they can present a shorter list
|
|
50
|
-
activeTables: MapUtils.getFilterableTables(this.props.design, this.props.schema)
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
46
|
handleAttributionChange = (text) => {
|
|
54
47
|
const design = { ...this.props.design, attribution: text };
|
|
55
48
|
return this.props.onDesignChange(design);
|
|
@@ -152,10 +145,10 @@ class MapDesignerComponent extends react_1.default.Component {
|
|
|
152
145
|
}))
|
|
153
146
|
});
|
|
154
147
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
148
|
+
const activeTables = MapUtils.getFilterableTables(this.props.design, this.props.schema);
|
|
149
|
+
return (react_1.default.createElement(expressions_ui_1.ActiveTablesContext.Provider, { value: activeTables },
|
|
150
|
+
react_1.default.createElement("div", { style: { padding: 5 } },
|
|
151
|
+
react_1.default.createElement(TabbedComponent_1.default, { initialTabId: "layers", tabs: tabs }))));
|
|
159
152
|
}
|
|
160
153
|
}
|
|
161
154
|
exports.default = MapDesignerComponent;
|
|
@@ -33,7 +33,7 @@ const expressions_ui_1 = require("@mwater/expressions-ui");
|
|
|
33
33
|
const expressions_1 = require("@mwater/expressions");
|
|
34
34
|
const AxisComponent_1 = __importDefault(require("./../axes/AxisComponent"));
|
|
35
35
|
const ColorComponent_1 = __importDefault(require("../ColorComponent"));
|
|
36
|
-
const
|
|
36
|
+
const expressions_ui_2 = require("@mwater/expressions-ui");
|
|
37
37
|
const EditPopupComponent_1 = __importDefault(require("./EditPopupComponent"));
|
|
38
38
|
const ZoomLevelsComponent_1 = __importDefault(require("./ZoomLevelsComponent"));
|
|
39
39
|
const MarkerSymbolSelectComponent_1 = __importDefault(require("./MarkerSymbolSelectComponent"));
|
|
@@ -86,7 +86,7 @@ class MarkersLayerDesignerComponent extends react_1.default.Component {
|
|
|
86
86
|
return this.update({ lineWidth });
|
|
87
87
|
};
|
|
88
88
|
renderTable() {
|
|
89
|
-
return R("div", { className: "mb-3" }, R("label", { className: "text-muted" }, R("i", { className: "fa fa-database" }), " ", "Data Source"), R("div", { style: { marginLeft: 10 } }, R(
|
|
89
|
+
return R("div", { className: "mb-3" }, R("label", { className: "text-muted" }, R("i", { className: "fa fa-database" }), " ", "Data Source"), R("div", { style: { marginLeft: 10 } }, R(expressions_ui_2.TableSelectComponent, {
|
|
90
90
|
schema: this.props.schema,
|
|
91
91
|
value: this.props.design.table,
|
|
92
92
|
onChange: this.handleTableChange,
|
|
@@ -12,4 +12,9 @@ import { JsonQLFilter } from "..";
|
|
|
12
12
|
export declare function createPopupFilters(popupFilterJoins: {
|
|
13
13
|
[tableId: string]: Expr;
|
|
14
14
|
}, schema: Schema, layerTable: any, rowId: any, useWithin?: boolean): JsonQLFilter[];
|
|
15
|
-
export declare function createDefaultPopupFilterJoins(table: any): {
|
|
15
|
+
export declare function createDefaultPopupFilterJoins(table: any): {
|
|
16
|
+
[x: number]: {
|
|
17
|
+
table: any;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -30,7 +30,7 @@ function createPopupFilters(popupFilterJoins, schema, layerTable, rowId, useWith
|
|
|
30
30
|
type: "op",
|
|
31
31
|
op: "within",
|
|
32
32
|
table,
|
|
33
|
-
exprs: [expr, { type: "literal", idTable: exprUtils.getExprIdTable(expr), valueType: "id", value: rowId }]
|
|
33
|
+
exprs: [expr, { type: "literal", idTable: exprUtils.getExprIdTable(expr) ?? undefined, valueType: "id", value: rowId }]
|
|
34
34
|
};
|
|
35
35
|
filters.push({ table, jsonql: exprCompiler.compileExpr({ expr: filterExpr, tableAlias: "{alias}" }) });
|
|
36
36
|
}
|
|
@@ -83,9 +83,10 @@ function createPopupFilters(popupFilterJoins, schema, layerTable, rowId, useWith
|
|
|
83
83
|
exports.createPopupFilters = createPopupFilters;
|
|
84
84
|
// Create default popup filter joins where the join is just the id (not used for choropleth since that needs to join to admin_regions)
|
|
85
85
|
function createDefaultPopupFilterJoins(table) {
|
|
86
|
-
const popupFilterJoins = {};
|
|
87
86
|
// Return id of row for a simple match
|
|
88
|
-
popupFilterJoins
|
|
87
|
+
const popupFilterJoins = {
|
|
88
|
+
[table]: { table, type: "id" }
|
|
89
|
+
};
|
|
89
90
|
return popupFilterJoins;
|
|
90
91
|
}
|
|
91
92
|
exports.createDefaultPopupFilterJoins = createDefaultPopupFilterJoins;
|
|
@@ -19,37 +19,5 @@ export default class RegionSelectComponent extends React.Component<RegionSelectC
|
|
|
19
19
|
regionsTable: string;
|
|
20
20
|
};
|
|
21
21
|
handleChange: (id: any) => void;
|
|
22
|
-
render(): React.
|
|
23
|
-
value: string | number | null | undefined;
|
|
24
|
-
onChange: (id: any) => void;
|
|
25
|
-
idTable: string;
|
|
26
|
-
schema: Schema;
|
|
27
|
-
dataSource: DataSource;
|
|
28
|
-
placeholder: string | undefined;
|
|
29
|
-
orderBy: {
|
|
30
|
-
expr: {
|
|
31
|
-
type: string;
|
|
32
|
-
tableAlias: string;
|
|
33
|
-
column: string;
|
|
34
|
-
};
|
|
35
|
-
direction: string;
|
|
36
|
-
}[];
|
|
37
|
-
filter: import("@mwater/jsonql").JsonQLOp | undefined;
|
|
38
|
-
}, React.Component<{
|
|
39
|
-
value: string | number | null | undefined;
|
|
40
|
-
onChange: (id: any) => void;
|
|
41
|
-
idTable: string;
|
|
42
|
-
schema: Schema;
|
|
43
|
-
dataSource: DataSource;
|
|
44
|
-
placeholder: string | undefined;
|
|
45
|
-
orderBy: {
|
|
46
|
-
expr: {
|
|
47
|
-
type: string;
|
|
48
|
-
tableAlias: string;
|
|
49
|
-
column: string;
|
|
50
|
-
};
|
|
51
|
-
direction: string;
|
|
52
|
-
}[];
|
|
53
|
-
filter: import("@mwater/jsonql").JsonQLOp | undefined;
|
|
54
|
-
}, any, any>>;
|
|
22
|
+
render(): React.DetailedReactHTMLElement<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
55
23
|
}
|
package/lib/maps/UtfGridLayer.js
CHANGED
|
@@ -27,14 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.VectorMapViewComponent = void 0;
|
|
30
|
-
const lodash_1 =
|
|
30
|
+
const lodash_1 = __importStar(require("lodash"));
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const react_2 = require("react");
|
|
33
33
|
const LayerFactory_1 = __importDefault(require("./LayerFactory"));
|
|
34
34
|
const ModalPopupComponent_1 = __importDefault(require("@mwater/react-library/lib/ModalPopupComponent"));
|
|
35
35
|
const useStableCallback_1 = require("@mwater/react-library/lib/useStableCallback");
|
|
36
36
|
const MapUtils_1 = require("./MapUtils");
|
|
37
|
-
const memoizedDebounce_1 = require("../memoizedDebounce");
|
|
38
37
|
require("maplibre-gl/dist/maplibre-gl.css");
|
|
39
38
|
require("./VectorMapViewComponent.css");
|
|
40
39
|
const LayerSwitcherComponent_1 = require("./LayerSwitcherComponent");
|
|
@@ -104,6 +103,7 @@ function VectorMapViewComponent(props) {
|
|
|
104
103
|
filters: getCompiledFilters()
|
|
105
104
|
});
|
|
106
105
|
if (!results) {
|
|
106
|
+
setHoverContents(null);
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
// Handle popup first
|
|
@@ -111,9 +111,6 @@ function VectorMapViewComponent(props) {
|
|
|
111
111
|
setHoverContents(results.hoverOver);
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
const handleLayerHoverDebounced = (0, memoizedDebounce_1.memoizedDebounce)((layerViewId, ev) => {
|
|
115
|
-
handleLayerHover(layerViewId, ev);
|
|
116
|
-
}, 250, { leading: true, trailing: false }, (layerViewId, ev) => ev.data.id);
|
|
117
114
|
/** Handle a click on a layer */
|
|
118
115
|
const handleLayerClick = (0, useStableCallback_1.useStableCallback)((layerViewId, ev) => {
|
|
119
116
|
const layerView = props.design.layerViews.find(lv => lv.id == layerViewId);
|
|
@@ -394,7 +391,7 @@ function VectorMapViewComponent(props) {
|
|
|
394
391
|
props.mapDataSource.getBounds(props.design, getCompiledFilters(), (error, bounds) => {
|
|
395
392
|
setBusy(b => b - 1);
|
|
396
393
|
if (bounds) {
|
|
397
|
-
map.fitBounds([bounds.w, bounds.s, bounds.e, bounds.n], { padding: 20, duration:
|
|
394
|
+
map.fitBounds([bounds.w, bounds.s, bounds.e, bounds.n], { padding: 20, duration: 2500 });
|
|
398
395
|
// Also record if editable as part of bounds
|
|
399
396
|
setBounds(bounds);
|
|
400
397
|
}
|
|
@@ -456,39 +453,34 @@ function VectorMapViewComponent(props) {
|
|
|
456
453
|
if (!map) {
|
|
457
454
|
return;
|
|
458
455
|
}
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
456
|
+
const layers = layerClickHandlers.map(clickHandler => clickHandler.mapLayerId);
|
|
457
|
+
const onEnter = (ev) => {
|
|
458
|
+
let f = map.queryRenderedFeatures(ev.point, { layers });
|
|
459
|
+
if (f.length) {
|
|
460
|
+
if (f[0].layer.type === 'fill' && f[0].layer.paint?.['fill-color']?.toString() == 'rgba(0,0,0,0)') {
|
|
463
461
|
lastFeature.current = undefined;
|
|
464
462
|
setHoverContents(null);
|
|
465
463
|
return;
|
|
466
464
|
}
|
|
467
|
-
if (
|
|
465
|
+
if (lastFeature.current !== f[0].properties.id) {
|
|
466
|
+
lastFeature.current = f[0].properties.id;
|
|
468
467
|
setHoverContents(null);
|
|
469
|
-
|
|
468
|
+
const handler = (0, lodash_1.find)(layerClickHandlers, { mapLayerId: f[0].layer.id });
|
|
469
|
+
handleLayerHover(handler.layerViewId, {
|
|
470
|
+
data: f[0].properties,
|
|
471
|
+
event: ev
|
|
472
|
+
});
|
|
470
473
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
event: ev
|
|
474
|
-
});
|
|
475
|
-
};
|
|
476
|
-
const onLeave = (ev) => {
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
477
476
|
lastFeature.current = undefined;
|
|
478
477
|
setHoverContents(null);
|
|
479
|
-
};
|
|
480
|
-
map.on("mousemove", clickHandler.mapLayerId, onEnter);
|
|
481
|
-
map.on("mouseleave", clickHandler.mapLayerId, onLeave);
|
|
482
|
-
removes.push(() => {
|
|
483
|
-
map.off("mousemove", clickHandler.mapLayerId, onEnter);
|
|
484
|
-
map.off("mouseleave", clickHandler.mapLayerId, onLeave);
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
return () => {
|
|
488
|
-
for (const remove of removes) {
|
|
489
|
-
remove();
|
|
490
478
|
}
|
|
491
479
|
};
|
|
480
|
+
map.on("mousemove", onEnter);
|
|
481
|
+
return () => {
|
|
482
|
+
map.off("mousemove", onEnter);
|
|
483
|
+
};
|
|
492
484
|
}, [map, layerClickHandlers]);
|
|
493
485
|
function renderLegend() {
|
|
494
486
|
if (legendHidden) {
|
|
@@ -57,192 +57,8 @@ declare class EnumQuickfilterComponent extends React.Component<EnumQuickfilterCo
|
|
|
57
57
|
};
|
|
58
58
|
handleSingleChange: (val: any) => any;
|
|
59
59
|
handleMultiChange: (val: any) => any;
|
|
60
|
-
renderSingleSelect(options: any[]): React.FunctionComponentElement<Omit<
|
|
61
|
-
|
|
62
|
-
options?: import("react-select").OptionsOrGroups<unknown, import("react-select").GroupBase<unknown>> | undefined;
|
|
63
|
-
placeholder?: React.ReactNode;
|
|
64
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
65
|
-
styles?: import("react-select").StylesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
66
|
-
isLoading?: boolean | undefined;
|
|
67
|
-
isDisabled?: boolean | undefined;
|
|
68
|
-
isRtl?: boolean | undefined;
|
|
69
|
-
isMulti?: boolean | undefined;
|
|
70
|
-
controlShouldRenderValue?: boolean | undefined;
|
|
71
|
-
loadingMessage?: ((obj: {
|
|
72
|
-
inputValue: string;
|
|
73
|
-
}) => React.ReactNode) | undefined;
|
|
74
|
-
noOptionsMessage?: ((obj: {
|
|
75
|
-
inputValue: string;
|
|
76
|
-
}) => React.ReactNode) | undefined;
|
|
77
|
-
backspaceRemovesValue?: boolean | undefined;
|
|
78
|
-
blurInputOnSelect?: boolean | undefined;
|
|
79
|
-
captureMenuScroll?: boolean | undefined;
|
|
80
|
-
classNames?: import("react-select").ClassNamesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
81
|
-
closeMenuOnSelect?: boolean | undefined;
|
|
82
|
-
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
83
|
-
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<unknown, boolean, import("react-select").GroupBase<unknown>>> | undefined;
|
|
84
|
-
escapeClearsValue?: boolean | undefined;
|
|
85
|
-
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<unknown>, inputValue: string) => boolean) | null | undefined;
|
|
86
|
-
formatGroupLabel?: ((group: import("react-select").GroupBase<unknown>) => React.ReactNode) | undefined;
|
|
87
|
-
getOptionLabel?: import("react-select").GetOptionLabel<unknown> | undefined;
|
|
88
|
-
getOptionValue?: import("react-select").GetOptionValue<unknown> | undefined;
|
|
89
|
-
isOptionDisabled?: ((option: unknown, selectValue: import("react-select").Options<unknown>) => boolean) | undefined;
|
|
90
|
-
isSearchable?: boolean | undefined;
|
|
91
|
-
minMenuHeight?: number | undefined;
|
|
92
|
-
maxMenuHeight?: number | undefined;
|
|
93
|
-
menuIsOpen?: boolean | undefined;
|
|
94
|
-
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
95
|
-
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
96
|
-
menuShouldBlockScroll?: boolean | undefined;
|
|
97
|
-
menuShouldScrollIntoView?: boolean | undefined;
|
|
98
|
-
openMenuOnFocus?: boolean | undefined;
|
|
99
|
-
openMenuOnClick?: boolean | undefined;
|
|
100
|
-
pageSize?: number | undefined;
|
|
101
|
-
screenReaderStatus?: ((obj: {
|
|
102
|
-
count: number;
|
|
103
|
-
}) => string) | undefined;
|
|
104
|
-
tabSelectsValue?: boolean | undefined;
|
|
105
|
-
unstyled?: boolean | undefined;
|
|
106
|
-
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<unknown, boolean, import("react-select").GroupBase<unknown>>, "required" | "id" | "name" | "value" | "form" | "className" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "isClearable" | "theme" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
107
|
-
tabIndex?: number | undefined;
|
|
108
|
-
options?: import("react-select").OptionsOrGroups<unknown, import("react-select").GroupBase<unknown>> | undefined;
|
|
109
|
-
placeholder?: React.ReactNode;
|
|
110
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
111
|
-
styles?: import("react-select").StylesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
112
|
-
isLoading?: boolean | undefined;
|
|
113
|
-
isDisabled?: boolean | undefined;
|
|
114
|
-
isRtl?: boolean | undefined;
|
|
115
|
-
isMulti?: boolean | undefined;
|
|
116
|
-
controlShouldRenderValue?: boolean | undefined;
|
|
117
|
-
loadingMessage?: ((obj: {
|
|
118
|
-
inputValue: string;
|
|
119
|
-
}) => React.ReactNode) | undefined;
|
|
120
|
-
noOptionsMessage?: ((obj: {
|
|
121
|
-
inputValue: string;
|
|
122
|
-
}) => React.ReactNode) | undefined;
|
|
123
|
-
backspaceRemovesValue?: boolean | undefined;
|
|
124
|
-
blurInputOnSelect?: boolean | undefined;
|
|
125
|
-
captureMenuScroll?: boolean | undefined;
|
|
126
|
-
classNames?: import("react-select").ClassNamesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
127
|
-
closeMenuOnSelect?: boolean | undefined;
|
|
128
|
-
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
129
|
-
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<unknown, boolean, import("react-select").GroupBase<unknown>>> | undefined;
|
|
130
|
-
escapeClearsValue?: boolean | undefined;
|
|
131
|
-
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<unknown>, inputValue: string) => boolean) | null | undefined;
|
|
132
|
-
formatGroupLabel?: ((group: import("react-select").GroupBase<unknown>) => React.ReactNode) | undefined;
|
|
133
|
-
getOptionLabel?: import("react-select").GetOptionLabel<unknown> | undefined;
|
|
134
|
-
getOptionValue?: import("react-select").GetOptionValue<unknown> | undefined;
|
|
135
|
-
isOptionDisabled?: ((option: unknown, selectValue: import("react-select").Options<unknown>) => boolean) | undefined;
|
|
136
|
-
isSearchable?: boolean | undefined;
|
|
137
|
-
minMenuHeight?: number | undefined;
|
|
138
|
-
maxMenuHeight?: number | undefined;
|
|
139
|
-
menuIsOpen?: boolean | undefined;
|
|
140
|
-
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
141
|
-
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
142
|
-
menuShouldBlockScroll?: boolean | undefined;
|
|
143
|
-
menuShouldScrollIntoView?: boolean | undefined;
|
|
144
|
-
openMenuOnFocus?: boolean | undefined;
|
|
145
|
-
openMenuOnClick?: boolean | undefined;
|
|
146
|
-
pageSize?: number | undefined;
|
|
147
|
-
screenReaderStatus?: ((obj: {
|
|
148
|
-
count: number;
|
|
149
|
-
}) => string) | undefined;
|
|
150
|
-
tabSelectsValue?: boolean | undefined;
|
|
151
|
-
unstyled?: boolean | undefined;
|
|
152
|
-
} & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<unknown> & React.RefAttributes<import("react-select/dist/declarations/src/Select").default<unknown, boolean, import("react-select").GroupBase<unknown>>>>;
|
|
153
|
-
renderMultiSelect(options: any[]): React.FunctionComponentElement<Omit<Pick<import("react-select/dist/declarations/src/Select").Props<unknown, boolean, import("react-select").GroupBase<unknown>>, "required" | "id" | "name" | "value" | "form" | "className" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "isClearable" | "theme" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
154
|
-
tabIndex?: number | undefined;
|
|
155
|
-
options?: import("react-select").OptionsOrGroups<unknown, import("react-select").GroupBase<unknown>> | undefined;
|
|
156
|
-
placeholder?: React.ReactNode;
|
|
157
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
158
|
-
styles?: import("react-select").StylesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
159
|
-
isLoading?: boolean | undefined;
|
|
160
|
-
isDisabled?: boolean | undefined;
|
|
161
|
-
isRtl?: boolean | undefined;
|
|
162
|
-
isMulti?: boolean | undefined;
|
|
163
|
-
controlShouldRenderValue?: boolean | undefined;
|
|
164
|
-
loadingMessage?: ((obj: {
|
|
165
|
-
inputValue: string;
|
|
166
|
-
}) => React.ReactNode) | undefined;
|
|
167
|
-
noOptionsMessage?: ((obj: {
|
|
168
|
-
inputValue: string;
|
|
169
|
-
}) => React.ReactNode) | undefined;
|
|
170
|
-
backspaceRemovesValue?: boolean | undefined;
|
|
171
|
-
blurInputOnSelect?: boolean | undefined;
|
|
172
|
-
captureMenuScroll?: boolean | undefined;
|
|
173
|
-
classNames?: import("react-select").ClassNamesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
174
|
-
closeMenuOnSelect?: boolean | undefined;
|
|
175
|
-
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
176
|
-
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<unknown, boolean, import("react-select").GroupBase<unknown>>> | undefined;
|
|
177
|
-
escapeClearsValue?: boolean | undefined;
|
|
178
|
-
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<unknown>, inputValue: string) => boolean) | null | undefined;
|
|
179
|
-
formatGroupLabel?: ((group: import("react-select").GroupBase<unknown>) => React.ReactNode) | undefined;
|
|
180
|
-
getOptionLabel?: import("react-select").GetOptionLabel<unknown> | undefined;
|
|
181
|
-
getOptionValue?: import("react-select").GetOptionValue<unknown> | undefined;
|
|
182
|
-
isOptionDisabled?: ((option: unknown, selectValue: import("react-select").Options<unknown>) => boolean) | undefined;
|
|
183
|
-
isSearchable?: boolean | undefined;
|
|
184
|
-
minMenuHeight?: number | undefined;
|
|
185
|
-
maxMenuHeight?: number | undefined;
|
|
186
|
-
menuIsOpen?: boolean | undefined;
|
|
187
|
-
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
188
|
-
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
189
|
-
menuShouldBlockScroll?: boolean | undefined;
|
|
190
|
-
menuShouldScrollIntoView?: boolean | undefined;
|
|
191
|
-
openMenuOnFocus?: boolean | undefined;
|
|
192
|
-
openMenuOnClick?: boolean | undefined;
|
|
193
|
-
pageSize?: number | undefined;
|
|
194
|
-
screenReaderStatus?: ((obj: {
|
|
195
|
-
count: number;
|
|
196
|
-
}) => string) | undefined;
|
|
197
|
-
tabSelectsValue?: boolean | undefined;
|
|
198
|
-
unstyled?: boolean | undefined;
|
|
199
|
-
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<unknown, boolean, import("react-select").GroupBase<unknown>>, "required" | "id" | "name" | "value" | "form" | "className" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "isClearable" | "theme" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
200
|
-
tabIndex?: number | undefined;
|
|
201
|
-
options?: import("react-select").OptionsOrGroups<unknown, import("react-select").GroupBase<unknown>> | undefined;
|
|
202
|
-
placeholder?: React.ReactNode;
|
|
203
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
204
|
-
styles?: import("react-select").StylesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
205
|
-
isLoading?: boolean | undefined;
|
|
206
|
-
isDisabled?: boolean | undefined;
|
|
207
|
-
isRtl?: boolean | undefined;
|
|
208
|
-
isMulti?: boolean | undefined;
|
|
209
|
-
controlShouldRenderValue?: boolean | undefined;
|
|
210
|
-
loadingMessage?: ((obj: {
|
|
211
|
-
inputValue: string;
|
|
212
|
-
}) => React.ReactNode) | undefined;
|
|
213
|
-
noOptionsMessage?: ((obj: {
|
|
214
|
-
inputValue: string;
|
|
215
|
-
}) => React.ReactNode) | undefined;
|
|
216
|
-
backspaceRemovesValue?: boolean | undefined;
|
|
217
|
-
blurInputOnSelect?: boolean | undefined;
|
|
218
|
-
captureMenuScroll?: boolean | undefined;
|
|
219
|
-
classNames?: import("react-select").ClassNamesConfig<unknown, boolean, import("react-select").GroupBase<unknown>> | undefined;
|
|
220
|
-
closeMenuOnSelect?: boolean | undefined;
|
|
221
|
-
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
222
|
-
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<unknown, boolean, import("react-select").GroupBase<unknown>>> | undefined;
|
|
223
|
-
escapeClearsValue?: boolean | undefined;
|
|
224
|
-
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<unknown>, inputValue: string) => boolean) | null | undefined;
|
|
225
|
-
formatGroupLabel?: ((group: import("react-select").GroupBase<unknown>) => React.ReactNode) | undefined;
|
|
226
|
-
getOptionLabel?: import("react-select").GetOptionLabel<unknown> | undefined;
|
|
227
|
-
getOptionValue?: import("react-select").GetOptionValue<unknown> | undefined;
|
|
228
|
-
isOptionDisabled?: ((option: unknown, selectValue: import("react-select").Options<unknown>) => boolean) | undefined;
|
|
229
|
-
isSearchable?: boolean | undefined;
|
|
230
|
-
minMenuHeight?: number | undefined;
|
|
231
|
-
maxMenuHeight?: number | undefined;
|
|
232
|
-
menuIsOpen?: boolean | undefined;
|
|
233
|
-
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
234
|
-
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
235
|
-
menuShouldBlockScroll?: boolean | undefined;
|
|
236
|
-
menuShouldScrollIntoView?: boolean | undefined;
|
|
237
|
-
openMenuOnFocus?: boolean | undefined;
|
|
238
|
-
openMenuOnClick?: boolean | undefined;
|
|
239
|
-
pageSize?: number | undefined;
|
|
240
|
-
screenReaderStatus?: ((obj: {
|
|
241
|
-
count: number;
|
|
242
|
-
}) => string) | undefined;
|
|
243
|
-
tabSelectsValue?: boolean | undefined;
|
|
244
|
-
unstyled?: boolean | undefined;
|
|
245
|
-
} & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<unknown> & React.RefAttributes<import("react-select/dist/declarations/src/Select").default<unknown, boolean, import("react-select").GroupBase<unknown>>>>;
|
|
60
|
+
renderSingleSelect(options: any[]): React.FunctionComponentElement<Omit<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<unknown> & React.RefAttributes<import("react-select/dist/declarations/src/Select").default<unknown, boolean, import("react-select").GroupBase<unknown>>>>;
|
|
61
|
+
renderMultiSelect(options: any[]): React.FunctionComponentElement<Omit<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<import("react-select/dist/declarations/src/Select").PublicBaseSelectProps<unknown, boolean, import("react-select").GroupBase<unknown>>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<unknown> & React.RefAttributes<import("react-select/dist/declarations/src/Select").default<unknown, boolean, import("react-select").GroupBase<unknown>>>>;
|
|
246
62
|
render(): React.DetailedReactHTMLElement<{
|
|
247
63
|
style: {
|
|
248
64
|
display: "inline-block";
|
|
@@ -152,7 +152,7 @@ class QuickfilterDesignComponent extends react_1.default.Component {
|
|
|
152
152
|
table: this.state.table,
|
|
153
153
|
value: this.props.design.expr,
|
|
154
154
|
onChange: this.handleExprChange,
|
|
155
|
-
types: ["enum", "text", "enumset", "date", "datetime", "id[]", "text[]"]
|
|
155
|
+
types: ["enum", "text", "enumset", "date", "datetime", "id[]", "text[]"],
|
|
156
156
|
}))), this.props.design.expr
|
|
157
157
|
? R("div", { className: "mb-3", key: "label" }, R("label", { className: "text-muted" }, "Label"), R("input", {
|
|
158
158
|
type: "text",
|