@mwater/visualization 5.3.2 → 5.4.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/ColorComponent.d.ts +1 -1
- package/lib/ColorComponent.js +2 -2
- package/lib/CustomColorsContext.d.ts +0 -1
- package/lib/DateRangeComponent.js +10 -10
- package/lib/LocaleContextInjector.js +2 -2
- package/lib/MWaterAddRelatedFormComponent.js +8 -8
- package/lib/MWaterAddRelatedIndicatorComponent.d.ts +0 -1
- package/lib/MWaterAddRelatedIndicatorComponent.js +6 -6
- package/lib/MWaterAssetSystemsListComponent.d.ts +3 -3
- package/lib/MWaterAssetSystemsListComponent.js +4 -3
- package/lib/MWaterCompleteTableSelectComponent.d.ts +33 -34
- package/lib/MWaterCompleteTableSelectComponent.js +39 -38
- package/lib/MWaterCustomTablesetListComponent.d.ts +3 -3
- package/lib/MWaterCustomTablesetListComponent.js +5 -4
- package/lib/MWaterGlobalFiltersComponent.js +4 -4
- package/lib/MWaterLoaderComponent.d.ts +5 -5
- package/lib/MWaterLoaderComponent.js +1 -1
- package/lib/MWaterMetricsTableListComponent.d.ts +3 -3
- package/lib/MWaterMetricsTableListComponent.js +4 -3
- package/lib/MWaterResponsesFilterComponent.js +4 -4
- package/lib/MWaterTableSelectComponent.d.ts +1 -1
- package/lib/MWaterTableSelectComponent.js +5 -5
- package/lib/PopoverComponent.d.ts +4 -4
- package/lib/UIComponents.d.ts +5 -2
- package/lib/axes/AxisBuilder.js +42 -43
- package/lib/axes/AxisColorEditorComponent.d.ts +4 -4
- package/lib/axes/AxisColorEditorComponent.js +25 -60
- package/lib/axes/AxisComponent.d.ts +2 -3
- package/lib/axes/AxisComponent.js +20 -20
- package/lib/axes/BinsComponent.js +6 -6
- package/lib/axes/CategoryMapComponent.d.ts +2 -1
- package/lib/axes/CategoryMapComponent.js +7 -5
- package/lib/axes/ColorPaletteCollectionComponent.js +3 -3
- package/lib/axes/RangesComponent.js +12 -12
- package/lib/compressJson.js +1 -1
- package/lib/dashboards/DashboardComponent.d.ts +2 -0
- package/lib/dashboards/DashboardComponent.js +15 -8
- package/lib/dashboards/DashboardUtils.js +2 -3
- package/lib/dashboards/DashboardViewComponent.js +4 -4
- package/lib/dashboards/FontStyleEditor.js +8 -8
- package/lib/dashboards/LayoutOptionsComponent.js +101 -74
- package/lib/dashboards/SettingsModalComponent.d.ts +3 -4
- package/lib/dashboards/SettingsModalComponent.js +54 -40
- package/lib/dashboards/WidgetComponent.d.ts +0 -1
- package/lib/dashboards/WidgetComponent.js +1 -2
- package/lib/dashboards/layoutOptions.js +11 -7
- package/lib/datagrids/DatagridComponent.d.ts +1 -8
- package/lib/datagrids/DatagridComponent.js +14 -13
- package/lib/datagrids/DatagridDesignerComponent.js +18 -18
- package/lib/datagrids/DatagridQueryBuilder.d.ts +4 -4
- package/lib/datagrids/DatagridUtils.js +2 -2
- package/lib/datagrids/DatagridViewComponent.js +4 -4
- package/lib/datagrids/ExprCellComponent.js +1 -1
- package/lib/datagrids/FindReplaceModalComponent.js +17 -17
- package/lib/datagrids/OrderBysDesignerComponent.js +2 -2
- package/lib/languages.js +2 -2
- package/lib/layouts/DecoratedBlockComponent.js +2 -2
- package/lib/layouts/blocks/BlocksDisplayComponent.js +13 -13
- package/lib/layouts/blocks/BlocksLayoutManager.d.ts +2 -1
- package/lib/layouts/blocks/ClipboardPaletteItemComponent.js +3 -3
- package/lib/layouts/blocks/HorizontalBlockComponent.js +3 -3
- package/lib/layouts/blocks/blockUtils.js +4 -5
- package/lib/mWaterLoader.js +1 -1
- package/lib/maps/AddLayerComponent.js +13 -13
- package/lib/maps/AdminScopeAndDetailLevelComponent.js +5 -5
- package/lib/maps/BaseLayerDesignerComponent.js +2 -2
- package/lib/maps/BufferLayer.js +7 -7
- package/lib/maps/BufferLayerDesignerComponent.js +8 -8
- package/lib/maps/ChoroplethLayer.js +6 -6
- package/lib/maps/ChoroplethLayerDesigner.js +16 -16
- package/lib/maps/ClusterLayer.js +3 -3
- package/lib/maps/ClusterLayerDesignerComponent.js +5 -5
- package/lib/maps/DetailLevelSelectComponent.d.ts +11 -1
- package/lib/maps/DetailLevelSelectComponent.js +3 -3
- package/lib/maps/DirectMapDataSource.js +1 -2
- package/lib/maps/EditHoverOver.js +7 -5
- package/lib/maps/EditPopupComponent.js +2 -2
- package/lib/maps/GridLayer.js +5 -5
- package/lib/maps/GridLayerDesigner.js +15 -15
- package/lib/maps/LayerSwitcherComponent.js +1 -2
- package/lib/maps/LeafletMapComponent.d.ts +1 -1
- package/lib/maps/LeafletMapComponent.js +1 -1
- package/lib/maps/LegendComponent.js +1 -1
- package/lib/maps/MWaterServerLayer.d.ts +0 -1
- package/lib/maps/MWaterServerLayer.js +1 -1
- package/lib/maps/MapComponent.js +8 -8
- package/lib/maps/MapControlComponent.js +1 -1
- package/lib/maps/MapDesignerComponent.js +16 -16
- package/lib/maps/MapFiltersDesignerComponent.js +2 -2
- package/lib/maps/MapLayerViewDesignerComponent.js +8 -8
- package/lib/maps/MapUtils.js +6 -7
- package/lib/maps/MapViewComponent.js +1 -2
- package/lib/maps/MarkerSymbolSelectComponent.js +3 -3
- package/lib/maps/MarkersLayer.js +6 -7
- package/lib/maps/MarkersLayerDesignerComponent.js +22 -22
- package/lib/maps/PopupFilterJoinsEditComponent.js +4 -4
- package/lib/maps/PopupFilterJoinsUtils.js +2 -3
- package/lib/maps/RasterMapViewComponent.d.ts +3 -3
- package/lib/maps/RasterMapViewComponent.js +4 -4
- package/lib/maps/RegionSelectComponent.d.ts +1 -3
- package/lib/maps/RegionSelectComponent.js +1 -2
- package/lib/maps/ScopeAndDetailLevelComponent.js +3 -3
- package/lib/maps/TileUrlLayer.d.ts +1 -1
- package/lib/maps/TileUrlLayer.js +3 -3
- package/lib/maps/VectorMapViewComponent.js +6 -7
- package/lib/maps/ZoomLevelsComponent.js +5 -5
- package/lib/maps/mapSymbols.d.ts +1 -1
- package/lib/maps/mapSymbols.js +51 -50
- package/lib/maps/mapboxUtils.js +2 -3
- package/lib/maps/maps.d.ts +0 -1
- package/lib/maps/vectorMaps.js +14 -15
- package/lib/memoizedDebounce.js +1 -2
- package/lib/quickfilter/DateExprComponent.d.ts +4 -0
- package/lib/quickfilter/DateExprComponent.js +17 -16
- package/lib/quickfilter/IdArrayQuickfilterComponent.js +1 -1
- package/lib/quickfilter/QuickfilterUtils.js +1 -2
- package/lib/quickfilter/QuickfiltersComponent.d.ts +23 -2
- package/lib/quickfilter/QuickfiltersComponent.js +2 -2
- package/lib/quickfilter/QuickfiltersDesignComponent.js +8 -8
- package/lib/quickfilter/TextLiteralComponent.d.ts +35 -2
- package/lib/quickfilter/TextLiteralComponent.js +6 -6
- package/lib/richtext/DropdownPaletteItem.js +1 -1
- package/lib/richtext/ExprItemsHtmlConverter.js +8 -10
- package/lib/richtext/FontColorPaletteItem.js +7 -7
- package/lib/richtext/ItemsHtmlConverter.js +0 -1
- package/lib/richtext/RichTextComponent.d.ts +1 -0
- package/lib/richtext/RichTextComponent.js +33 -29
- package/lib/valueFormatter.js +18 -19
- package/lib/wellknown.js +2 -3
- package/lib/widgets/IFrameWidgetComponent.d.ts +9 -1
- package/lib/widgets/IFrameWidgetComponent.js +3 -3
- package/lib/widgets/ImageUploaderComponent.js +5 -5
- package/lib/widgets/ImageWidget.js +2 -2
- package/lib/widgets/ImageWidgetComponent.d.ts +9 -1
- package/lib/widgets/ImageWidgetComponent.js +20 -20
- package/lib/widgets/ImagelistCarouselComponent.js +1 -1
- package/lib/widgets/MapWidget.js +2 -2
- package/lib/widgets/MarkdownWidget.d.ts +1 -1
- package/lib/widgets/MarkdownWidget.js +1 -1
- package/lib/widgets/TOCWidget.js +11 -12
- package/lib/widgets/WidgetScopesViewComponent.js +1 -1
- package/lib/widgets/charts/Chart.js +1 -1
- package/lib/widgets/charts/ChartViewComponent.js +9 -9
- package/lib/widgets/charts/ChartWidgetComponent.js +4 -4
- package/lib/widgets/charts/calendar/CalendarChart.js +4 -4
- package/lib/widgets/charts/calendar/CalendarChartDesignerComponent.js +7 -7
- package/lib/widgets/charts/calendar/CalendarChartViewComponent.js +3 -3
- package/lib/widgets/charts/imagemosaic/ImageMosaicChart.d.ts +18 -5
- package/lib/widgets/charts/imagemosaic/ImageMosaicChart.js +3 -4
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.js +5 -5
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.d.ts +5 -19
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.js +66 -70
- package/lib/widgets/charts/imagemosaic/ImagePopupComponent.js +1 -1
- package/lib/widgets/charts/layered/LayeredChart.d.ts +1 -1
- package/lib/widgets/charts/layered/LayeredChart.js +9 -9
- package/lib/widgets/charts/layered/LayeredChartCompiler.d.ts +8 -8
- package/lib/widgets/charts/layered/LayeredChartCompiler.js +15 -15
- package/lib/widgets/charts/layered/LayeredChartDesignerComponent.js +33 -33
- package/lib/widgets/charts/layered/LayeredChartLayerDesignerComponent.js +16 -16
- package/lib/widgets/charts/layered/LayeredChartUtils.js +1 -2
- package/lib/widgets/charts/layered/LayeredChartViewComponent.js +4 -4
- package/lib/widgets/charts/pivot/IntersectionDesignerComponent.js +18 -17
- package/lib/widgets/charts/pivot/PivotChart.d.ts +1 -1
- package/lib/widgets/charts/pivot/PivotChart.js +12 -4
- package/lib/widgets/charts/pivot/PivotChartDesignerComponent.d.ts +5 -5
- package/lib/widgets/charts/pivot/PivotChartDesignerComponent.js +10 -10
- package/lib/widgets/charts/pivot/PivotChartLayoutComponent.js +5 -5
- package/lib/widgets/charts/pivot/PivotChartQueryBuilder.d.ts +1 -1
- package/lib/widgets/charts/pivot/PivotChartQueryBuilder.js +5 -6
- package/lib/widgets/charts/pivot/PivotChartUtils.js +11 -12
- package/lib/widgets/charts/pivot/PivotChartViewComponent.js +9 -9
- package/lib/widgets/charts/pivot/SegmentDesignerComponent.d.ts +30 -30
- package/lib/widgets/charts/pivot/SegmentDesignerComponent.js +28 -26
- package/lib/widgets/charts/table/OrderingsComponent.js +2 -2
- package/lib/widgets/charts/table/TableChart.js +3 -3
- package/lib/widgets/charts/table/TableChartDesignerComponent.js +17 -17
- package/lib/widgets/charts/table/TableChartViewComponent.js +3 -3
- package/lib/widgets/text/ExprInsertModalComponent.d.ts +2 -3
- package/lib/widgets/text/ExprInsertModalComponent.js +2 -14
- package/lib/widgets/text/ExprItemEditorComponent.js +4 -4
- package/lib/widgets/text/ExprUpdateModalComponent.d.ts +2 -3
- package/lib/widgets/text/ExprUpdateModalComponent.js +3 -15
- package/lib/widgets/text/TextComponent.js +3 -3
- package/lib/widgets/text/TextWidget.d.ts +1 -1
- package/lib/widgets/text/TextWidgetComponent.js +11 -11
- package/lib/widgets/text/TextWidgetDesign.d.ts +2 -1
- package/lib/widgets/text/TextWidgetDesign.js +1 -2
- package/package.json +3 -3
- package/src/ColorComponent.tsx +2 -2
- package/src/DateRangeComponent.ts +10 -10
- package/src/LocaleContextInjector.tsx +1 -1
- package/src/MWaterAddRelatedFormComponent.ts +7 -7
- package/src/MWaterAddRelatedIndicatorComponent.ts +5 -5
- package/src/MWaterAssetSystemsListComponent.tsx +3 -3
- package/src/MWaterCompleteTableSelectComponent.tsx +36 -35
- package/src/MWaterCustomTablesetListComponent.tsx +4 -4
- package/src/MWaterGlobalFiltersComponent.ts +4 -4
- package/src/MWaterLoaderComponent.ts +1 -1
- package/src/MWaterMetricsTableListComponent.tsx +3 -3
- package/src/MWaterResponsesFilterComponent.ts +6 -6
- package/src/MWaterTableSelectComponent.tsx +6 -7
- package/src/axes/AxisBuilder.ts +42 -44
- package/src/axes/AxisColorEditorComponent.tsx +178 -0
- package/src/axes/AxisComponent.ts +20 -20
- package/src/axes/BinsComponent.tsx +6 -6
- package/src/axes/CategoryMapComponent.ts +10 -10
- package/src/axes/ColorPaletteCollectionComponent.tsx +3 -3
- package/src/axes/RangesComponent.ts +14 -14
- package/src/dashboards/DashboardComponent.tsx +21 -9
- package/src/dashboards/DashboardViewComponent.tsx +3 -3
- package/src/dashboards/FontStyleEditor.tsx +8 -8
- package/src/dashboards/LayoutOptionsComponent.tsx +74 -74
- package/src/dashboards/SettingsModalComponent.tsx +134 -107
- package/src/dashboards/layoutOptions.tsx +5 -1
- package/src/datagrids/DatagridComponent.ts +65 -62
- package/src/datagrids/DatagridDesignerComponent.tsx +17 -17
- package/src/datagrids/DatagridUtils.ts +2 -2
- package/src/datagrids/DatagridViewComponent.ts +3 -3
- package/src/datagrids/ExprCellComponent.ts +1 -1
- package/src/datagrids/FindReplaceModalComponent.ts +13 -13
- package/src/datagrids/OrderBysDesignerComponent.tsx +2 -2
- package/src/globals.d.ts +7 -1
- package/src/languages.ts +2 -2
- package/src/layouts/blocks/BlocksDisplayComponent.tsx +13 -13
- package/src/layouts/blocks/BlocksLayoutManager.ts +3 -2
- package/src/layouts/blocks/ClipboardPaletteItemComponent.ts +3 -3
- package/src/maps/AddLayerComponent.ts +13 -13
- package/src/maps/AdminScopeAndDetailLevelComponent.ts +5 -5
- package/src/maps/BaseLayerDesignerComponent.ts +8 -8
- package/src/maps/BufferLayer.ts +5 -5
- package/src/maps/BufferLayerDesignerComponent.ts +8 -8
- package/src/maps/ChoroplethLayer.ts +3 -3
- package/src/maps/ChoroplethLayerDesigner.tsx +16 -16
- package/src/maps/ClusterLayer.ts +3 -3
- package/src/maps/ClusterLayerDesignerComponent.ts +5 -5
- package/src/maps/DetailLevelSelectComponent.ts +3 -3
- package/src/maps/EditHoverOver.tsx +5 -5
- package/src/maps/EditPopupComponent.ts +2 -2
- package/src/maps/GridLayer.ts +5 -5
- package/src/maps/GridLayerDesigner.tsx +15 -16
- package/src/maps/MWaterServerLayer.ts +1 -1
- package/src/maps/MapComponent.ts +6 -6
- package/src/maps/MapControlComponent.ts +1 -1
- package/src/maps/MapDesignerComponent.tsx +20 -20
- package/src/maps/MapFiltersDesignerComponent.tsx +3 -3
- package/src/maps/MapLayerViewDesignerComponent.ts +9 -9
- package/src/maps/MarkerSymbolSelectComponent.ts +4 -5
- package/src/maps/MarkersLayerDesignerComponent.ts +22 -22
- package/src/maps/PopupFilterJoinsEditComponent.ts +4 -4
- package/src/maps/RasterMapViewComponent.ts +2 -2
- package/src/maps/RegionSelectComponent.ts +1 -2
- package/src/maps/ScopeAndDetailLevelComponent.ts +3 -3
- package/src/maps/TileUrlLayer.tsx +3 -3
- package/src/maps/VectorMapViewComponent.tsx +5 -5
- package/src/maps/ZoomLevelsComponent.ts +6 -6
- package/src/maps/mapSymbols.ts +49 -49
- package/src/maps/vectorMaps.tsx +2 -2
- package/src/quickfilter/DateExprComponent.ts +19 -18
- package/src/quickfilter/IdArrayQuickfilterComponent.ts +1 -1
- package/src/quickfilter/QuickfiltersComponent.ts +1 -1
- package/src/quickfilter/QuickfiltersDesignComponent.tsx +9 -9
- package/src/quickfilter/TextLiteralComponent.ts +4 -4
- package/src/richtext/DropdownPaletteItem.tsx +1 -1
- package/src/richtext/ExprItemsHtmlConverter.ts +8 -10
- package/src/richtext/ItemsHtmlConverter.ts +0 -1
- package/src/richtext/RichTextComponent.tsx +31 -31
- package/src/valueFormatter.ts +14 -14
- package/src/widgets/IFrameWidgetComponent.ts +3 -3
- package/src/widgets/ImageUploaderComponent.tsx +5 -5
- package/src/widgets/ImageWidget.ts +2 -2
- package/src/widgets/ImageWidgetComponent.ts +26 -26
- package/src/widgets/ImagelistCarouselComponent.ts +2 -2
- package/src/widgets/MapWidget.ts +1 -1
- package/src/widgets/MarkdownWidget.ts +1 -1
- package/src/widgets/TOCWidget.ts +13 -14
- package/src/widgets/WidgetScopesViewComponent.ts +1 -1
- package/src/widgets/charts/Chart.ts +1 -1
- package/src/widgets/charts/ChartViewComponent.ts +4 -4
- package/src/widgets/charts/ChartWidgetComponent.tsx +3 -3
- package/src/widgets/charts/calendar/CalendarChart.ts +4 -4
- package/src/widgets/charts/calendar/CalendarChartDesignerComponent.ts +7 -7
- package/src/widgets/charts/calendar/CalendarChartViewComponent.tsx +2 -2
- package/src/widgets/charts/imagemosaic/ImageMosaicChart.ts +25 -8
- package/src/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.ts +5 -5
- package/src/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.tsx +128 -0
- package/src/widgets/charts/layered/LayeredChart.ts +9 -9
- package/src/widgets/charts/layered/LayeredChartCompiler.ts +45 -45
- package/src/widgets/charts/layered/LayeredChartDesignerComponent.tsx +39 -39
- package/src/widgets/charts/layered/LayeredChartLayerDesignerComponent.tsx +18 -19
- package/src/widgets/charts/layered/LayeredChartViewComponent.ts +1 -1
- package/src/widgets/charts/pivot/IntersectionDesignerComponent.tsx +22 -23
- package/src/widgets/charts/pivot/PivotChart.ts +15 -5
- package/src/widgets/charts/pivot/PivotChartDesignerComponent.tsx +12 -12
- package/src/widgets/charts/pivot/PivotChartLayoutComponent.tsx +5 -5
- package/src/widgets/charts/pivot/PivotChartQueryBuilder.ts +7 -8
- package/src/widgets/charts/pivot/PivotChartViewComponent.tsx +6 -6
- package/src/widgets/charts/pivot/SegmentDesignerComponent.tsx +30 -30
- package/src/widgets/charts/table/OrderingsComponent.tsx +2 -2
- package/src/widgets/charts/table/TableChart.ts +3 -3
- package/src/widgets/charts/table/TableChartDesignerComponent.ts +16 -16
- package/src/widgets/charts/table/TableChartViewComponent.ts +2 -2
- package/src/widgets/text/{ExprInsertModalComponent.ts → ExprInsertModalComponent.tsx} +18 -20
- package/src/widgets/text/ExprItemEditorComponent.tsx +4 -4
- package/src/widgets/text/{ExprUpdateModalComponent.ts → ExprUpdateModalComponent.tsx} +18 -20
- package/src/widgets/text/TextComponent.tsx +2 -2
- package/src/widgets/text/TextWidgetComponent.tsx +10 -10
- package/src/widgets/text/TextWidgetDesign.ts +3 -1
- package/src/axes/AxisColorEditorComponent.ts +0 -210
- package/src/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.ts +0 -117
|
@@ -71,10 +71,10 @@ export default class RangesComponent extends React.Component<RangesComponentProp
|
|
|
71
71
|
"tr",
|
|
72
72
|
null,
|
|
73
73
|
R("th", null, " "),
|
|
74
|
-
R("th", { key: "min", colSpan: 2, style: { textAlign: "center" } },
|
|
74
|
+
R("th", { key: "min", colSpan: 2, style: { textAlign: "center" } }, T`From`),
|
|
75
75
|
R("th", { key: "and" }, ""),
|
|
76
|
-
R("th", { key: "max", colSpan: 2, style: { textAlign: "center" } },
|
|
77
|
-
R("th", { key: "label", colSpan: 1, style: { textAlign: "center" } },
|
|
76
|
+
R("th", { key: "max", colSpan: 2, style: { textAlign: "center" } }, T`To`),
|
|
77
|
+
R("th", { key: "label", colSpan: 1, style: { textAlign: "center" } }, T`Label`),
|
|
78
78
|
R("th", { key: "remove" })
|
|
79
79
|
)
|
|
80
80
|
)
|
|
@@ -95,7 +95,7 @@ export default class RangesComponent extends React.Component<RangesComponentProp
|
|
|
95
95
|
"button",
|
|
96
96
|
{ className: "btn btn-link btn-sm", type: "button", onClick: this.handleAddRange },
|
|
97
97
|
R("span", { className: "fas fa-plus" }),
|
|
98
|
-
|
|
98
|
+
T` Add Range`
|
|
99
99
|
)
|
|
100
100
|
)
|
|
101
101
|
}
|
|
@@ -145,7 +145,7 @@ class RangeComponent extends React.Component<RangeComponentProps> {
|
|
|
145
145
|
|
|
146
146
|
if (this.props.range.maxValue != null) {
|
|
147
147
|
if (placeholder) {
|
|
148
|
-
placeholder +=
|
|
148
|
+
placeholder += T` and `
|
|
149
149
|
}
|
|
150
150
|
if (this.props.range.maxOpen) {
|
|
151
151
|
placeholder += `< ${this.props.range.maxValue}`
|
|
@@ -167,12 +167,12 @@ class RangeComponent extends React.Component<RangeComponentProps> {
|
|
|
167
167
|
LinkComponent,
|
|
168
168
|
{
|
|
169
169
|
dropdownItems: [
|
|
170
|
-
{ id: "true", name:
|
|
171
|
-
{ id: "false", name:
|
|
170
|
+
{ id: "true", name: T`greater than` },
|
|
171
|
+
{ id: "false", name: T`greater than or equal to` }
|
|
172
172
|
],
|
|
173
173
|
onDropdownItemClicked: (id: string) => this.handleMinOpenChange(id === "true")
|
|
174
174
|
},
|
|
175
|
-
this.props.range.minOpen ?
|
|
175
|
+
this.props.range.minOpen ? T`greater than` : T`greater than or equal to`
|
|
176
176
|
)
|
|
177
177
|
),
|
|
178
178
|
|
|
@@ -181,13 +181,13 @@ class RangeComponent extends React.Component<RangeComponentProps> {
|
|
|
181
181
|
{ key: "minValue" },
|
|
182
182
|
R(NumberInputComponent, {
|
|
183
183
|
value: this.props.range.minValue ?? undefined,
|
|
184
|
-
placeholder:
|
|
184
|
+
placeholder: T`None`,
|
|
185
185
|
small: true,
|
|
186
186
|
onChange: (v: any) => this.props.onChange(update(this.props.range, { minValue: { $set: v } }))
|
|
187
187
|
})
|
|
188
188
|
),
|
|
189
189
|
|
|
190
|
-
R("td", { key: "and" }, "\
|
|
190
|
+
R("td", { key: "and" }, "\u00A0" + T`and` + "\u00A0"),
|
|
191
191
|
|
|
192
192
|
R(
|
|
193
193
|
"td",
|
|
@@ -196,12 +196,12 @@ class RangeComponent extends React.Component<RangeComponentProps> {
|
|
|
196
196
|
LinkComponent,
|
|
197
197
|
{
|
|
198
198
|
dropdownItems: [
|
|
199
|
-
{ id: "true", name:
|
|
200
|
-
{ id: "false", name:
|
|
199
|
+
{ id: "true", name: T`less than` },
|
|
200
|
+
{ id: "false", name: T`less than or equal to` }
|
|
201
201
|
],
|
|
202
202
|
onDropdownItemClicked: (id: string) => this.handleMaxOpenChange(id === "true")
|
|
203
203
|
},
|
|
204
|
-
this.props.range.maxOpen ?
|
|
204
|
+
this.props.range.maxOpen ? T`less than` : T`less than or equal to`
|
|
205
205
|
)
|
|
206
206
|
),
|
|
207
207
|
|
|
@@ -210,7 +210,7 @@ class RangeComponent extends React.Component<RangeComponentProps> {
|
|
|
210
210
|
{ key: "maxValue" },
|
|
211
211
|
R(NumberInputComponent, {
|
|
212
212
|
value: this.props.range.maxValue ?? undefined,
|
|
213
|
-
placeholder:
|
|
213
|
+
placeholder: T`None`,
|
|
214
214
|
small: true,
|
|
215
215
|
onChange: (v: any) => this.props.onChange(update(this.props.range, { maxValue: { $set: v } }))
|
|
216
216
|
})
|
|
@@ -20,6 +20,7 @@ import { ActiveTablesContext, LocaleContext } from "@mwater/expressions-ui"
|
|
|
20
20
|
|
|
21
21
|
export interface DashboardComponentProps {
|
|
22
22
|
design: DashboardDesign
|
|
23
|
+
|
|
23
24
|
/** If not set, readonly */
|
|
24
25
|
onDesignChange?: (design: DashboardDesign) => void
|
|
25
26
|
|
|
@@ -57,6 +58,9 @@ export interface DashboardComponentProps {
|
|
|
57
58
|
|
|
58
59
|
/** True to hide title bar and related controls */
|
|
59
60
|
hideTitleBar?: boolean
|
|
61
|
+
|
|
62
|
+
/** Called when the edit mode changes */
|
|
63
|
+
onEditModeChange?: (editing: boolean) => void
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
export interface DashboardComponentState {
|
|
@@ -94,6 +98,10 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
94
98
|
layoutOptions.hideQuickfiltersWidth != null && layoutOptions.hideQuickfiltersWidth > document.body.clientWidth,
|
|
95
99
|
refreshKey: 1
|
|
96
100
|
}
|
|
101
|
+
|
|
102
|
+
if (props.onEditModeChange) {
|
|
103
|
+
props.onEditModeChange(this.state.editing)
|
|
104
|
+
}
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
// Get the values of the quick filters
|
|
@@ -155,7 +163,11 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
handleToggleEditing = () => {
|
|
158
|
-
|
|
166
|
+
const editing = !this.state.editing
|
|
167
|
+
this.setState({ editing })
|
|
168
|
+
if (this.props.onEditModeChange) {
|
|
169
|
+
this.props.onEditModeChange(editing)
|
|
170
|
+
}
|
|
159
171
|
}
|
|
160
172
|
|
|
161
173
|
handleOpenLayoutOptions = () => {
|
|
@@ -204,7 +216,7 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
204
216
|
onClick: this.handleToggleEditing
|
|
205
217
|
},
|
|
206
218
|
R("span", { className: "fas fa-pencil-alt" }),
|
|
207
|
-
this.state.editing ?
|
|
219
|
+
this.state.editing ? T` Editing` : T` Edit`
|
|
208
220
|
)
|
|
209
221
|
}
|
|
210
222
|
|
|
@@ -213,7 +225,7 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
213
225
|
"button",
|
|
214
226
|
{ type: "button", key: "style", className: "btn btn-link btn-sm", onClick: this.handleOpenLayoutOptions },
|
|
215
227
|
R("span", { className: "fa fa-mobile" }),
|
|
216
|
-
R("span", { className: "hide-600px" },
|
|
228
|
+
R("span", { className: "hide-600px" }, T` Layout `)
|
|
217
229
|
)
|
|
218
230
|
}
|
|
219
231
|
|
|
@@ -231,7 +243,7 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
231
243
|
onClick: this.handleUndo
|
|
232
244
|
},
|
|
233
245
|
R("span", { className: "fas fa-caret-left" }),
|
|
234
|
-
R("span", { className: "hide-600px" },
|
|
246
|
+
R("span", { className: "hide-600px" }, T` Undo`)
|
|
235
247
|
),
|
|
236
248
|
" ",
|
|
237
249
|
R(
|
|
@@ -242,7 +254,7 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
242
254
|
onClick: this.handleRedo
|
|
243
255
|
},
|
|
244
256
|
R("span", { className: "fas fa-caret-right" }),
|
|
245
|
-
R("span", { className: "hide-600px" },
|
|
257
|
+
R("span", { className: "hide-600px" }, T` Redo`)
|
|
246
258
|
)
|
|
247
259
|
]
|
|
248
260
|
: undefined,
|
|
@@ -250,20 +262,20 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
250
262
|
"a",
|
|
251
263
|
{ key: "print", className: "btn btn-link btn-sm", onClick: this.handlePrint },
|
|
252
264
|
R("span", { className: "fas fa-print" }),
|
|
253
|
-
R("span", { className: "hide-600px" },
|
|
265
|
+
R("span", { className: "hide-600px" }, T` Print`)
|
|
254
266
|
),
|
|
255
267
|
R(
|
|
256
268
|
"a",
|
|
257
269
|
{ key: "refresh", className: "btn btn-link btn-sm", onClick: this.handleRefreshData },
|
|
258
270
|
R("span", { className: "fas fa-sync" }),
|
|
259
|
-
R("span", { className: "hide-600px" },
|
|
271
|
+
R("span", { className: "hide-600px" }, T` Refresh`)
|
|
260
272
|
),
|
|
261
273
|
this.state.hideQuickfilters && this.props.design.quickfilters && this.props.design.quickfilters.length > 0
|
|
262
274
|
? R(
|
|
263
275
|
"a",
|
|
264
276
|
{ key: "showQuickfilters", className: "btn btn-link btn-sm", onClick: this.handleShowQuickfilters },
|
|
265
277
|
R("span", { className: "fa fa-filter" }),
|
|
266
|
-
R("span", { className: "hide-600px" },
|
|
278
|
+
R("span", { className: "hide-600px" }, T` Show Quickfilters`)
|
|
267
279
|
)
|
|
268
280
|
: undefined,
|
|
269
281
|
|
|
@@ -275,7 +287,7 @@ export default class DashboardComponent extends React.Component<DashboardCompone
|
|
|
275
287
|
"a",
|
|
276
288
|
{ key: "settings", className: "btn btn-link btn-sm", onClick: this.handleSettings },
|
|
277
289
|
R("span", { className: "fas fa-cog" }),
|
|
278
|
-
R("span", { className: "hide-600px" },
|
|
290
|
+
R("span", { className: "hide-600px" }, T` Settings`)
|
|
279
291
|
)
|
|
280
292
|
: undefined,
|
|
281
293
|
this.state.editing ? this.renderStyle() : undefined,
|
|
@@ -14,7 +14,7 @@ import { WidgetComponent } from "./WidgetComponent"
|
|
|
14
14
|
import { DashboardDataSource, DashboardDesign, JsonQLFilter } from ".."
|
|
15
15
|
import { setPrintingModeEnabled } from "../maps/vectorMaps"
|
|
16
16
|
import { WidgetDataSourcePrioritizer } from "./WidgetDataSourcePrioritizer"
|
|
17
|
-
import { LocaleContext } from "@mwater/expressions-ui
|
|
17
|
+
import { LocaleContext } from "@mwater/expressions-ui"
|
|
18
18
|
|
|
19
19
|
export interface DashboardViewComponentProps {
|
|
20
20
|
/** schema to use */
|
|
@@ -133,7 +133,7 @@ const DashboardViewComponent = React.forwardRef<DashboardViewComponentHandle, Da
|
|
|
133
133
|
window.localStorage.setItem("DashboardViewComponent.clipboard", JSON.stringify({ block, tables }))
|
|
134
134
|
setForceUpdate(forceUpdate + 1)
|
|
135
135
|
} catch (err) {
|
|
136
|
-
return alert(
|
|
136
|
+
return alert(T`Clipboard not available`)
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -231,7 +231,7 @@ const DashboardViewComponent = React.forwardRef<DashboardViewComponentHandle, Da
|
|
|
231
231
|
|
|
232
232
|
// Check if can't paste because of missing table
|
|
233
233
|
if (clipboardContents && !_.all(clipboardContents.tables, (table: string) => props.schema.getTable(table))) {
|
|
234
|
-
cantPasteMessage =
|
|
234
|
+
cantPasteMessage = T`Dashboard is missing one or more data sources needed for the copied item.`
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
const renderWidget = (options: RenderWidgetOptions) => {
|
|
@@ -29,7 +29,7 @@ export const FontStyleEditor = ({ value, onChange }: FontStyleEditorProps) => {
|
|
|
29
29
|
fontWeight: value.weight,
|
|
30
30
|
color: value.color
|
|
31
31
|
}}>
|
|
32
|
-
Sample
|
|
32
|
+
{T`Sample`}
|
|
33
33
|
</div>
|
|
34
34
|
<div style={{ fontSize: '10px', color: '#888', marginTop: '2px' }}>
|
|
35
35
|
{value.family}, {value.size}px
|
|
@@ -92,7 +92,7 @@ const FontEditorModal: React.FC<FontEditorModalProps> = ({ initialValue, onSave,
|
|
|
92
92
|
|
|
93
93
|
return (
|
|
94
94
|
<ActionCancelModalComponent
|
|
95
|
-
title=
|
|
95
|
+
title={T`Edit Font`}
|
|
96
96
|
onAction={() => onSave(currentValue)}
|
|
97
97
|
onCancel={onCancel}
|
|
98
98
|
>
|
|
@@ -107,7 +107,7 @@ const FontEditorModal: React.FC<FontEditorModalProps> = ({ initialValue, onSave,
|
|
|
107
107
|
fontSize: '14px',
|
|
108
108
|
fontWeight: 'bold'
|
|
109
109
|
}}>
|
|
110
|
-
Sample Text
|
|
110
|
+
{T`Sample Text:`}
|
|
111
111
|
</div>
|
|
112
112
|
<div style={{
|
|
113
113
|
fontFamily: expandFontFamily(currentValue.family),
|
|
@@ -115,10 +115,10 @@ const FontEditorModal: React.FC<FontEditorModalProps> = ({ initialValue, onSave,
|
|
|
115
115
|
fontWeight: currentValue.weight,
|
|
116
116
|
color: currentValue.color
|
|
117
117
|
}}>
|
|
118
|
-
The quick brown fox jumps over the lazy dog
|
|
118
|
+
{T`The quick brown fox jumps over the lazy dog.`}
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
121
|
-
<FormGroup label=
|
|
121
|
+
<FormGroup label={T`Font Family`}>
|
|
122
122
|
<ReactSelect
|
|
123
123
|
value={{ value: currentValue.family, label: currentValue.family }}
|
|
124
124
|
onChange={(option) => handleChange('family', option?.value || '')}
|
|
@@ -140,21 +140,21 @@ const FontEditorModal: React.FC<FontEditorModalProps> = ({ initialValue, onSave,
|
|
|
140
140
|
styles={{ menuPortal: (style) => ({ ...style, zIndex: 2000 }) }}
|
|
141
141
|
/>
|
|
142
142
|
</FormGroup>
|
|
143
|
-
<FormGroup label=
|
|
143
|
+
<FormGroup label={T`Font Size:`} horizontal>
|
|
144
144
|
<Select
|
|
145
145
|
value={currentValue.size}
|
|
146
146
|
onChange={(value) => handleChange('size', value || 12)}
|
|
147
147
|
options={fontSizeOptions}
|
|
148
148
|
/>
|
|
149
149
|
</FormGroup>
|
|
150
|
-
<FormGroup label=
|
|
150
|
+
<FormGroup label={T`Font Weight:`} horizontal>
|
|
151
151
|
<Select
|
|
152
152
|
value={currentValue.weight}
|
|
153
153
|
onChange={(value) => handleChange('weight', value as string)}
|
|
154
154
|
options={fontWeightOptions.map(weight => ({ value: weight, label: weight }))}
|
|
155
155
|
/>
|
|
156
156
|
</FormGroup>
|
|
157
|
-
<FormGroup label=
|
|
157
|
+
<FormGroup label={T`Font Color:`} horizontal>
|
|
158
158
|
<ColorComponent
|
|
159
159
|
color={currentValue.color}
|
|
160
160
|
onChange={(value) => handleChange('color', value!)}
|