@mwater/visualization 5.3.2 → 5.4.1
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 +17 -17
- 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 +6 -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 +36 -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 +47 -47
- 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
|
@@ -12,7 +12,7 @@ import { MWaterCustomTablesetListComponent } from "./MWaterCustomTablesetListCom
|
|
|
12
12
|
import { MWaterMetricsTableListComponent } from "./MWaterMetricsTableListComponent"
|
|
13
13
|
import { Form } from "@mwater/forms"
|
|
14
14
|
import { MWaterAssetSystemsListComponent } from "./MWaterAssetSystemsListComponent"
|
|
15
|
-
import { LocaleContext } from "@mwater/expressions-ui
|
|
15
|
+
import { LocaleContext } from "@mwater/expressions-ui"
|
|
16
16
|
|
|
17
17
|
const sitesOrder: { [table: string]: number } = {
|
|
18
18
|
"entities.water_point": 1,
|
|
@@ -218,7 +218,7 @@ export default class MWaterCompleteTableSelectComponent extends React.Component<
|
|
|
218
218
|
<uiComponents.OptionListComponent items={items} />
|
|
219
219
|
<div className="text-center mt-2 mb-2">
|
|
220
220
|
<button className="btn btn-link" onClick={() => this.setState({ showLegacyAssets: !this.state.showLegacyAssets })}>
|
|
221
|
-
{this.state.showLegacyAssets ?
|
|
221
|
+
{this.state.showLegacyAssets ? T`Hide` : T`Show`} {T`Legacy Assets`}
|
|
222
222
|
</button>
|
|
223
223
|
</div>
|
|
224
224
|
{this.state.showLegacyAssets && this.renderLegacyAssets()}
|
|
@@ -320,28 +320,28 @@ export default class MWaterCompleteTableSelectComponent extends React.Component<
|
|
|
320
320
|
const sweetSenseTables = this.getSweetSenseTables()
|
|
321
321
|
|
|
322
322
|
const tabs: TabbedComponentTab[] = [
|
|
323
|
-
{ id: "sites", label: [R("i", { className: "fa fa-map-marker" }),
|
|
324
|
-
{ id: "forms", label: [R("i", { className: "fa fa-th-list" }),
|
|
323
|
+
{ id: "sites", label: [R("i", { className: "fa fa-map-marker" }), T` Sites`], elem: this.renderSites() },
|
|
324
|
+
{ id: "forms", label: [R("i", { className: "fa fa-th-list" }), T` Surveys`], elem: this.renderForms() },
|
|
325
325
|
{
|
|
326
326
|
id: "indicators",
|
|
327
|
-
label: [R("i", { className: "fa fa-check-circle" }),
|
|
327
|
+
label: [R("i", { className: "fa fa-check-circle" }), T` Indicators`],
|
|
328
328
|
elem: this.renderIndicators()
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
id: "issues",
|
|
332
|
-
label: [R("i", { className: "fa fa-exclamation-circle" }),
|
|
332
|
+
label: [R("i", { className: "fa fa-exclamation-circle" }), T` Issues`],
|
|
333
333
|
elem: this.renderIssues()
|
|
334
334
|
},
|
|
335
|
-
{ id: "tablesets", label: [R("i", { className: "fa fa-table" }),
|
|
336
|
-
{ id: "metrics", label: [R("i", { className: "fa fa-line-chart" }),
|
|
337
|
-
{ id: "assets", label: [R("i", { className: "fas fa-map-pin" }),
|
|
335
|
+
{ id: "tablesets", label: [R("i", { className: "fa fa-table" }), T` Tables`], elem: this.renderTablesets() },
|
|
336
|
+
{ id: "metrics", label: [R("i", { className: "fa fa-line-chart" }), T` Metrics`], elem: this.renderMetrics() },
|
|
337
|
+
{ id: "assets", label: [R("i", { className: "fas fa-map-pin" }), T` Assets`], elem: this.renderAssets() }
|
|
338
338
|
]
|
|
339
339
|
|
|
340
340
|
if (sweetSenseTables.length > 0) {
|
|
341
|
-
tabs.push({ id: "sensors", label:
|
|
341
|
+
tabs.push({ id: "sensors", label: T` Sensors`, elem: this.renderSweetSense() })
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
tabs.push({ id: "other", label:
|
|
344
|
+
tabs.push({ id: "other", label: T`Advanced`, elem: this.renderOther() })
|
|
345
345
|
|
|
346
346
|
return R(
|
|
347
347
|
"div",
|
|
@@ -349,7 +349,7 @@ export default class MWaterCompleteTableSelectComponent extends React.Component<
|
|
|
349
349
|
R(
|
|
350
350
|
"div",
|
|
351
351
|
{ className: "text-muted" },
|
|
352
|
-
|
|
352
|
+
T`Select data from sites, surveys or an advanced category below. Indicators can be found within their associated site types.`
|
|
353
353
|
),
|
|
354
354
|
|
|
355
355
|
R(TabbedComponent, {
|
|
@@ -428,7 +428,7 @@ class FormsListComponent extends React.Component<FormsListComponentProps, FormsL
|
|
|
428
428
|
if (desc) {
|
|
429
429
|
desc += " - "
|
|
430
430
|
}
|
|
431
|
-
desc += `Modified ${moment(form.modified?.on, moment.ISO_8601).format("ll")}`
|
|
431
|
+
desc += T`Modified ${moment(form.modified?.on, moment.ISO_8601).format("ll")}`
|
|
432
432
|
|
|
433
433
|
return {
|
|
434
434
|
id: form._id,
|
|
@@ -445,7 +445,7 @@ class FormsListComponent extends React.Component<FormsListComponentProps, FormsL
|
|
|
445
445
|
handleTableRemove = (table: any) => {
|
|
446
446
|
if (
|
|
447
447
|
confirm(
|
|
448
|
-
`Remove ${ExprUtils.localizeString(
|
|
448
|
+
T`Remove ${ExprUtils.localizeString(
|
|
449
449
|
table.name,
|
|
450
450
|
this.context
|
|
451
451
|
)}? Any widgets that depend on it will no longer work properly.`
|
|
@@ -491,7 +491,7 @@ class FormsListComponent extends React.Component<FormsListComponentProps, FormsL
|
|
|
491
491
|
return R(
|
|
492
492
|
"div",
|
|
493
493
|
null,
|
|
494
|
-
R("label", null,
|
|
494
|
+
R("label", null, T`Included Surveys:`),
|
|
495
495
|
tables.length > 0
|
|
496
496
|
? R(uiComponents.OptionListComponent, {
|
|
497
497
|
items: _.map(tables, (table) => {
|
|
@@ -503,23 +503,23 @@ class FormsListComponent extends React.Component<FormsListComponentProps, FormsL
|
|
|
503
503
|
}
|
|
504
504
|
})
|
|
505
505
|
})
|
|
506
|
-
: R("div", null,
|
|
506
|
+
: R("div", null, T`None`),
|
|
507
507
|
|
|
508
508
|
R("br"),
|
|
509
509
|
|
|
510
|
-
R("label", null,
|
|
510
|
+
R("label", null, T`All Surveys:`),
|
|
511
511
|
!this.state.forms || this.state.forms.length === 0
|
|
512
512
|
? R(
|
|
513
513
|
"div",
|
|
514
514
|
{ className: "alert alert-info" },
|
|
515
515
|
R("i", { className: "fa fa-spinner fa-spin" }),
|
|
516
|
-
"\
|
|
516
|
+
"\u00A0" + T`Loading...`
|
|
517
517
|
)
|
|
518
518
|
: [
|
|
519
519
|
R("input", {
|
|
520
520
|
type: "text",
|
|
521
521
|
className: "form-control form-control-sm",
|
|
522
|
-
placeholder:
|
|
522
|
+
placeholder: T`Search...`,
|
|
523
523
|
key: "search",
|
|
524
524
|
ref: this.searchRef,
|
|
525
525
|
style: { maxWidth: "20em", marginBottom: 10 },
|
|
@@ -610,7 +610,7 @@ class IndicatorsListComponent extends React.Component<IndicatorsListComponentPro
|
|
|
610
610
|
handleTableRemove = (table: any) => {
|
|
611
611
|
if (
|
|
612
612
|
confirm(
|
|
613
|
-
`Remove ${ExprUtils.localizeString(
|
|
613
|
+
T`Remove ${ExprUtils.localizeString(
|
|
614
614
|
table.name,
|
|
615
615
|
this.context
|
|
616
616
|
)}? Any widgets that depend on it will no longer work properly.`
|
|
@@ -674,7 +674,7 @@ class IndicatorsListComponent extends React.Component<IndicatorsListComponentPro
|
|
|
674
674
|
}
|
|
675
675
|
}),
|
|
676
676
|
|
|
677
|
-
R("label", null,
|
|
677
|
+
R("label", null, T`Included Indicators:`),
|
|
678
678
|
tables.length > 0
|
|
679
679
|
? R(uiComponents.OptionListComponent, {
|
|
680
680
|
items: _.map(tables, (table) => {
|
|
@@ -686,23 +686,23 @@ class IndicatorsListComponent extends React.Component<IndicatorsListComponentPro
|
|
|
686
686
|
}
|
|
687
687
|
})
|
|
688
688
|
})
|
|
689
|
-
: R("div", null,
|
|
689
|
+
: R("div", null, T`None`),
|
|
690
690
|
|
|
691
691
|
R("br"),
|
|
692
692
|
|
|
693
|
-
R("label", null,
|
|
693
|
+
R("label", null, T`All Indicators:`),
|
|
694
694
|
!this.state.indicators || this.state.indicators.length === 0
|
|
695
695
|
? R(
|
|
696
696
|
"div",
|
|
697
697
|
{ className: "alert alert-info" },
|
|
698
698
|
R("i", { className: "fa fa-spinner fa-spin" }),
|
|
699
|
-
"\
|
|
699
|
+
"\u00A0" + T`Loading...`
|
|
700
700
|
)
|
|
701
701
|
: [
|
|
702
702
|
R("input", {
|
|
703
703
|
type: "text",
|
|
704
704
|
className: "form-control form-control-sm",
|
|
705
|
-
placeholder:
|
|
705
|
+
placeholder: T`Search...`,
|
|
706
706
|
key: "search",
|
|
707
707
|
ref: this.searchRef,
|
|
708
708
|
style: { maxWidth: "20em", marginBottom: 10 },
|
|
@@ -759,7 +759,7 @@ class AddIndicatorConfirmPopupComponent extends React.Component<
|
|
|
759
759
|
"div",
|
|
760
760
|
{ className: "alert alert-info" },
|
|
761
761
|
R("i", { className: "fa fa-spinner fa-spin" }),
|
|
762
|
-
"\
|
|
762
|
+
"\u00A0" + T`Loading...`
|
|
763
763
|
)
|
|
764
764
|
}
|
|
765
765
|
|
|
@@ -774,7 +774,7 @@ class AddIndicatorConfirmPopupComponent extends React.Component<
|
|
|
774
774
|
R(
|
|
775
775
|
"p",
|
|
776
776
|
null,
|
|
777
|
-
`In general, it is better to get indicator values from the related site. Please select the site
|
|
777
|
+
T`In general, it is better to get indicator values from the related site. Please select the site
|
|
778
778
|
below, then find the indicator values in the 'Related Indicators' section. Or click on 'Use Raw Indicator' if you
|
|
779
779
|
are certain that you want to use the raw indicator table`
|
|
780
780
|
),
|
|
@@ -799,7 +799,7 @@ are certain that you want to use the raw indicator table`
|
|
|
799
799
|
R(
|
|
800
800
|
"a",
|
|
801
801
|
{ className: "link-plain", onClick: this.props.onChange.bind(null, this.state.indicatorTable) },
|
|
802
|
-
|
|
802
|
+
T`Use Raw Indicator`
|
|
803
803
|
)
|
|
804
804
|
)
|
|
805
805
|
)
|
|
@@ -815,7 +815,7 @@ are certain that you want to use the raw indicator table`
|
|
|
815
815
|
{
|
|
816
816
|
showCloseX: true,
|
|
817
817
|
onClose: () => this.setState({ visible: false }),
|
|
818
|
-
header:
|
|
818
|
+
header: T`Add Indicator`
|
|
819
819
|
},
|
|
820
820
|
this.renderContents()
|
|
821
821
|
)
|
|
@@ -889,7 +889,7 @@ class IssuesListComponent extends React.Component<IssuesListComponentProps, Issu
|
|
|
889
889
|
handleTableRemove = (table: any) => {
|
|
890
890
|
if (
|
|
891
891
|
confirm(
|
|
892
|
-
`Remove ${ExprUtils.localizeString(
|
|
892
|
+
T`Remove ${ExprUtils.localizeString(
|
|
893
893
|
table.name,
|
|
894
894
|
this.context
|
|
895
895
|
)}? Any widgets that depend on it will no longer work properly.`
|
|
@@ -935,7 +935,7 @@ class IssuesListComponent extends React.Component<IssuesListComponentProps, Issu
|
|
|
935
935
|
return R(
|
|
936
936
|
"div",
|
|
937
937
|
null,
|
|
938
|
-
R("label", null,
|
|
938
|
+
R("label", null, T`Included Issues:`),
|
|
939
939
|
tables.length > 0
|
|
940
940
|
? R(uiComponents.OptionListComponent, {
|
|
941
941
|
items: _.map(tables, (table) => {
|
|
@@ -947,23 +947,24 @@ class IssuesListComponent extends React.Component<IssuesListComponentProps, Issu
|
|
|
947
947
|
}
|
|
948
948
|
})
|
|
949
949
|
})
|
|
950
|
-
: R("div", null,
|
|
950
|
+
: R("div", null, T`None`),
|
|
951
951
|
|
|
952
952
|
R("br"),
|
|
953
953
|
|
|
954
|
-
R("label", null,
|
|
954
|
+
R("label", null, T`All Issues:`),
|
|
955
955
|
!this.state.issueTypes || this.state.issueTypes.length === 0
|
|
956
956
|
? R(
|
|
957
957
|
"div",
|
|
958
958
|
{ className: "alert alert-info" },
|
|
959
959
|
R("i", { className: "fa fa-spinner fa-spin" }),
|
|
960
|
-
"\
|
|
960
|
+
"\u00A0",
|
|
961
|
+
T`Loading...`
|
|
961
962
|
)
|
|
962
963
|
: [
|
|
963
964
|
R("input", {
|
|
964
965
|
type: "text",
|
|
965
966
|
className: "form-control form-control-sm",
|
|
966
|
-
placeholder:
|
|
967
|
+
placeholder: T`Search...`,
|
|
967
968
|
key: "search",
|
|
968
969
|
ref: this.searchRef,
|
|
969
970
|
style: { maxWidth: "20em", marginBottom: 10 },
|
|
@@ -71,7 +71,7 @@ export const MWaterCustomTablesetListComponent = (props: {
|
|
|
71
71
|
// Remove from extra tables
|
|
72
72
|
const match = props.extraTables.find((t) => (t || "").startsWith(`custom.${ts.code}.`))
|
|
73
73
|
if (match) {
|
|
74
|
-
if (confirm(
|
|
74
|
+
if (confirm(T`Remove this set of tables? Some widgets may not work correctly.`)) {
|
|
75
75
|
props.onChange(null)
|
|
76
76
|
props.onExtraTableRemove(match)
|
|
77
77
|
}
|
|
@@ -81,7 +81,7 @@ export const MWaterCustomTablesetListComponent = (props: {
|
|
|
81
81
|
if (!tablesets || extraTableNeeded) {
|
|
82
82
|
return (
|
|
83
83
|
<div>
|
|
84
|
-
<i className="fa fa-spin fa-spinner" /> Loading
|
|
84
|
+
<i className="fa fa-spin fa-spinner" /> {T`Loading...`}
|
|
85
85
|
</div>
|
|
86
86
|
)
|
|
87
87
|
}
|
|
@@ -126,11 +126,11 @@ export const MWaterCustomTablesetListComponent = (props: {
|
|
|
126
126
|
|
|
127
127
|
return (
|
|
128
128
|
<div>
|
|
129
|
-
<TextInput value={search} onChange={setSearch} placeholder=
|
|
129
|
+
<TextInput value={search} onChange={setSearch} placeholder={T`Search...`} />
|
|
130
130
|
{visibleTablesets.map((ts) => renderTableset(ts))}
|
|
131
131
|
<div>
|
|
132
132
|
<button className="btn btn-link btn-sm" onClick={() => setShowSystem(!showSystem)}>
|
|
133
|
-
{showSystem ?
|
|
133
|
+
{showSystem ? T`Hide system tables` : T`Show system tables`}
|
|
134
134
|
</button>
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
@@ -85,14 +85,14 @@ export default class MWaterGlobalFiltersComponent extends React.Component<MWater
|
|
|
85
85
|
null,
|
|
86
86
|
R(
|
|
87
87
|
ui.FormGroup,
|
|
88
|
-
{ label:
|
|
88
|
+
{ label: T`Only sites managed by`, labelMuted: true },
|
|
89
89
|
R(IdLiteralComponent, {
|
|
90
90
|
value: managedBy,
|
|
91
91
|
onChange: this.handleManagedByChange,
|
|
92
92
|
idTable: "groups",
|
|
93
93
|
schema: this.props.schema,
|
|
94
94
|
dataSource: this.props.dataSource,
|
|
95
|
-
placeholder:
|
|
95
|
+
placeholder: T`All Organizations`,
|
|
96
96
|
multi: false,
|
|
97
97
|
filter: { type: "field", tableAlias: "main", column: "canManageEntities" }
|
|
98
98
|
})
|
|
@@ -100,14 +100,14 @@ export default class MWaterGlobalFiltersComponent extends React.Component<MWater
|
|
|
100
100
|
|
|
101
101
|
R(
|
|
102
102
|
ui.FormGroup,
|
|
103
|
-
{ label:
|
|
103
|
+
{ label: T`Only sites located in`, labelMuted: true },
|
|
104
104
|
R(IdLiteralComponent, {
|
|
105
105
|
value: adminRegions,
|
|
106
106
|
onChange: this.handleRegionsChange,
|
|
107
107
|
idTable: "admin_regions",
|
|
108
108
|
schema: this.props.schema,
|
|
109
109
|
dataSource: this.props.dataSource,
|
|
110
|
-
placeholder:
|
|
110
|
+
placeholder: T`All Regions`,
|
|
111
111
|
multi: true,
|
|
112
112
|
orderBy: [{ expr: { type: "field", tableAlias: "main", column: "level" }, direction: "asc" }]
|
|
113
113
|
})
|
|
@@ -80,7 +80,7 @@ export default class MWaterLoaderComponent extends AsyncLoadComponent<
|
|
|
80
80
|
},
|
|
81
81
|
(error: any, config: any) => {
|
|
82
82
|
if (error) {
|
|
83
|
-
const defaultError = `Cannot load one of the forms that this depends on. Perhaps the administrator has not shared the form with you? Details: ${error.message}`
|
|
83
|
+
const defaultError = T`Cannot load one of the forms that this depends on. Perhaps the administrator has not shared the form with you? Details: ${error.message}`
|
|
84
84
|
if (this.props.errorFormatter) {
|
|
85
85
|
try {
|
|
86
86
|
const parsedError = JSON.parse(error.message)
|
|
@@ -66,7 +66,7 @@ export const MWaterMetricsTableListComponent = (props: {
|
|
|
66
66
|
// Remove from extra tables
|
|
67
67
|
const match = props.extraTables.find((t) => t == `metrics:${metric._id}`)
|
|
68
68
|
if (match) {
|
|
69
|
-
if (confirm(
|
|
69
|
+
if (confirm(T`Remove this table? Some widgets may not work correctly.`)) {
|
|
70
70
|
props.onChange(null)
|
|
71
71
|
props.onExtraTableRemove(match)
|
|
72
72
|
}
|
|
@@ -76,7 +76,7 @@ export const MWaterMetricsTableListComponent = (props: {
|
|
|
76
76
|
if (!metrics || extraTableNeeded) {
|
|
77
77
|
return (
|
|
78
78
|
<div>
|
|
79
|
-
<i className="fa fa-spin fa-spinner" /> Loading
|
|
79
|
+
<i className="fa fa-spin fa-spinner" /> {T`Loading...`}
|
|
80
80
|
</div>
|
|
81
81
|
)
|
|
82
82
|
}
|
|
@@ -99,7 +99,7 @@ export const MWaterMetricsTableListComponent = (props: {
|
|
|
99
99
|
|
|
100
100
|
return (
|
|
101
101
|
<div>
|
|
102
|
-
<TextInput value={search} onChange={setSearch} placeholder=
|
|
102
|
+
<TextInput value={search} onChange={setSearch} placeholder={T`Search...`} />
|
|
103
103
|
{renderMetrics()}
|
|
104
104
|
</div>
|
|
105
105
|
)
|
|
@@ -151,7 +151,7 @@ export default class MWaterResponsesFilterComponent extends React.Component<MWat
|
|
|
151
151
|
return R(
|
|
152
152
|
"div",
|
|
153
153
|
{ style: { paddingLeft: 5, paddingTop: 5 } },
|
|
154
|
-
R("div", { style: { paddingBottom: 5 } },
|
|
154
|
+
R("div", { style: { paddingBottom: 5 } }, T`Data Source Options:`),
|
|
155
155
|
|
|
156
156
|
R(
|
|
157
157
|
"div",
|
|
@@ -160,22 +160,22 @@ export default class MWaterResponsesFilterComponent extends React.Component<MWat
|
|
|
160
160
|
? R(
|
|
161
161
|
"div",
|
|
162
162
|
null,
|
|
163
|
-
R("i", null,
|
|
163
|
+
R("i", null, T`This data source contains links to monitoring sites. Would you like to:`),
|
|
164
164
|
R(
|
|
165
165
|
"div",
|
|
166
166
|
{ style: { paddingLeft: 8 } },
|
|
167
167
|
R(
|
|
168
168
|
ui.Radio,
|
|
169
169
|
{ key: "all", value: siteColumnId, radioValue: null, onChange: this.handleSiteChange },
|
|
170
|
-
|
|
170
|
+
T`Show all survey responses (even if there are more than one per site)`
|
|
171
171
|
),
|
|
172
172
|
_.map(siteColumns, (column) => {
|
|
173
173
|
return R(
|
|
174
174
|
ui.Radio,
|
|
175
175
|
{ key: column.id, value: siteColumnId, radioValue: column.id, onChange: this.handleSiteChange },
|
|
176
|
-
|
|
176
|
+
T`Show only the latest response for each `,
|
|
177
177
|
R("i", null, `${ExprUtils.localizeString(this.props.schema.getTable(column.join.toTable)?.name)}`),
|
|
178
|
-
|
|
178
|
+
T` in the question `,
|
|
179
179
|
R("i", null, `'${ExprUtils.localizeString(column.name)}'`)
|
|
180
180
|
)
|
|
181
181
|
})
|
|
@@ -186,7 +186,7 @@ export default class MWaterResponsesFilterComponent extends React.Component<MWat
|
|
|
186
186
|
R(
|
|
187
187
|
ui.Checkbox,
|
|
188
188
|
{ value: this.isFinal(), onChange: this.handleFinalChange },
|
|
189
|
-
|
|
189
|
+
T`Only include final responses (recommended)`
|
|
190
190
|
)
|
|
191
191
|
)
|
|
192
192
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _ from "lodash"
|
|
2
|
-
import PropTypes from "prop-types"
|
|
3
2
|
import React from "react"
|
|
4
3
|
const R = React.createElement
|
|
5
4
|
import { ToggleEditComponent, OptionListComponent } from "./UIComponents"
|
|
@@ -40,7 +39,7 @@ export default class MWaterTableSelectComponent extends React.Component<
|
|
|
40
39
|
|
|
41
40
|
toggleEdit: any
|
|
42
41
|
|
|
43
|
-
constructor(props:
|
|
42
|
+
constructor(props: MWaterTableSelectComponentProps) {
|
|
44
43
|
super(props)
|
|
45
44
|
|
|
46
45
|
this.state = {
|
|
@@ -127,7 +126,7 @@ export default class MWaterTableSelectComponent extends React.Component<
|
|
|
127
126
|
"div",
|
|
128
127
|
{ className: "alert alert-info", key: "pendingExtraTable" },
|
|
129
128
|
R("i", { className: "fa fa-spinner fa-spin" }),
|
|
130
|
-
|
|
129
|
+
`\u00a0${T`Please wait...`}`
|
|
131
130
|
)
|
|
132
131
|
: undefined,
|
|
133
132
|
|
|
@@ -254,7 +253,7 @@ class EditModeTableSelectComponent extends React.Component<
|
|
|
254
253
|
<div>
|
|
255
254
|
{this.state.completeMode ? (
|
|
256
255
|
<ModalPopupComponent
|
|
257
|
-
header=
|
|
256
|
+
header={T`Select Data Source`}
|
|
258
257
|
onClose={() => this.setState({ completeMode: false })}
|
|
259
258
|
showCloseX={true}
|
|
260
259
|
size="x-large"
|
|
@@ -274,7 +273,7 @@ class EditModeTableSelectComponent extends React.Component<
|
|
|
274
273
|
|
|
275
274
|
{this.getTableShortlist(activeTables).length > 0 ? (
|
|
276
275
|
<>
|
|
277
|
-
<div className="text-muted">Select Data Source
|
|
276
|
+
<div className="text-muted">{T`Select Data Source:`}</div>
|
|
278
277
|
<OptionListComponent items={this.getTableShortlist(activeTables).map((tableId) => {
|
|
279
278
|
const table = this.props.schema.getTable(tableId)!
|
|
280
279
|
return {
|
|
@@ -289,7 +288,7 @@ class EditModeTableSelectComponent extends React.Component<
|
|
|
289
288
|
className="btn btn-link btn-sm"
|
|
290
289
|
onClick={this.handleShowMore}
|
|
291
290
|
>
|
|
292
|
-
Show All Available Data Sources
|
|
291
|
+
{T`Show All Available Data Sources...`}
|
|
293
292
|
</button>
|
|
294
293
|
</div>
|
|
295
294
|
</>
|
|
@@ -299,7 +298,7 @@ class EditModeTableSelectComponent extends React.Component<
|
|
|
299
298
|
className="btn btn-link"
|
|
300
299
|
onClick={this.handleShowMore}
|
|
301
300
|
>
|
|
302
|
-
Select Data Source
|
|
301
|
+
{T`Select Data Source...`}
|
|
303
302
|
</button>
|
|
304
303
|
)}
|
|
305
304
|
</div>
|