@mwater/visualization 5.3.1 → 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 +1 -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 +9 -9
- 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 +102 -75
- 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
|
@@ -81,7 +81,7 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
81
81
|
return R(
|
|
82
82
|
"div",
|
|
83
83
|
{ className: "mb-3" },
|
|
84
|
-
R("label", { className: "text-muted" }, R("i", { className: "fa fa-database" }), " ",
|
|
84
|
+
R("label", { className: "text-muted" }, R("i", { className: "fa fa-database" }), " ", T`Data Source`),
|
|
85
85
|
": ",
|
|
86
86
|
R(TableSelectComponent, {
|
|
87
87
|
schema: this.props.schema,
|
|
@@ -102,7 +102,7 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
102
102
|
return R(
|
|
103
103
|
"div",
|
|
104
104
|
{ className: "mb-3" },
|
|
105
|
-
R("label", { className: "text-muted" }, R("span", { className: "fas fa-filter" }), " ",
|
|
105
|
+
R("label", { className: "text-muted" }, R("span", { className: "fas fa-filter" }), " ", T`Filters`),
|
|
106
106
|
R(
|
|
107
107
|
"div",
|
|
108
108
|
{ style: { marginLeft: 8 } },
|
|
@@ -127,7 +127,7 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
127
127
|
ui.FormGroup,
|
|
128
128
|
{
|
|
129
129
|
labelMuted: true,
|
|
130
|
-
label:
|
|
130
|
+
label: T`Striping`
|
|
131
131
|
},
|
|
132
132
|
<ui.Radio
|
|
133
133
|
key="none"
|
|
@@ -136,7 +136,7 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
136
136
|
value={this.props.design.striping || null}
|
|
137
137
|
onChange={(value) => this.updateDesign({ striping: value })}
|
|
138
138
|
>
|
|
139
|
-
None
|
|
139
|
+
{T`None`}
|
|
140
140
|
</ui.Radio>,
|
|
141
141
|
|
|
142
142
|
<ui.Radio
|
|
@@ -146,7 +146,7 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
146
146
|
value={this.props.design.striping}
|
|
147
147
|
onChange={(value) => this.updateDesign({ striping: value })}
|
|
148
148
|
>
|
|
149
|
-
Columns
|
|
149
|
+
{T`Columns`}
|
|
150
150
|
</ui.Radio>,
|
|
151
151
|
|
|
152
152
|
<ui.Radio
|
|
@@ -156,7 +156,7 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
156
156
|
radioValue={"rows"}
|
|
157
157
|
onChange={(value) => this.updateDesign({ striping: value })}
|
|
158
158
|
>
|
|
159
|
-
Rows
|
|
159
|
+
{T`Rows`}
|
|
160
160
|
</ui.Radio>
|
|
161
161
|
)
|
|
162
162
|
}
|
|
@@ -172,8 +172,8 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
172
172
|
ui.FormGroup,
|
|
173
173
|
{
|
|
174
174
|
labelMuted: true,
|
|
175
|
-
label:
|
|
176
|
-
help:
|
|
175
|
+
label: T`Columns`,
|
|
176
|
+
help: T`Field to optionally make columns out of`
|
|
177
177
|
},
|
|
178
178
|
R(AxisComponent, {
|
|
179
179
|
schema: this.props.schema,
|
|
@@ -191,8 +191,8 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
191
191
|
ui.FormGroup,
|
|
192
192
|
{
|
|
193
193
|
labelMuted: true,
|
|
194
|
-
label:
|
|
195
|
-
help:
|
|
194
|
+
label: T`Rows`,
|
|
195
|
+
help: T`Field to optionally make rows out of`
|
|
196
196
|
},
|
|
197
197
|
R(AxisComponent, {
|
|
198
198
|
schema: this.props.schema,
|
|
@@ -210,8 +210,8 @@ export default class PivotChartDesignerComponent extends React.Component<
|
|
|
210
210
|
ui.FormGroup,
|
|
211
211
|
{
|
|
212
212
|
labelMuted: true,
|
|
213
|
-
label:
|
|
214
|
-
help:
|
|
213
|
+
label: T`Value`,
|
|
214
|
+
help: T`Field show in cells`
|
|
215
215
|
},
|
|
216
216
|
R(AxisComponent, {
|
|
217
217
|
schema: this.props.schema,
|
|
@@ -311,7 +311,7 @@ vertical-align: top;
|
|
|
311
311
|
"div",
|
|
312
312
|
{ className: "text-warning", style: { fontSize: 12 } },
|
|
313
313
|
R("i", { className: "fa fa-exclamation-circle" }),
|
|
314
|
-
|
|
314
|
+
T`Warning: Too many rows in table to display`
|
|
315
315
|
)
|
|
316
316
|
: undefined,
|
|
317
317
|
|
|
@@ -320,7 +320,7 @@ vertical-align: top;
|
|
|
320
320
|
"div",
|
|
321
321
|
{ className: "text-warning", style: { fontSize: 12 } },
|
|
322
322
|
R("i", { className: "fa fa-exclamation-circle" }),
|
|
323
|
-
|
|
323
|
+
T`Warning: Too many columns in table to display`
|
|
324
324
|
)
|
|
325
325
|
: undefined,
|
|
326
326
|
R(
|
|
@@ -390,11 +390,11 @@ class LayoutCellComponent extends React.Component<LayoutCellComponentProps> {
|
|
|
390
390
|
return R(
|
|
391
391
|
"span",
|
|
392
392
|
{ style: { fontSize: "90%" } },
|
|
393
|
-
R("a", { className: "link-plain", onClick: this.props.onEditSection },
|
|
393
|
+
R("a", { className: "link-plain", onClick: this.props.onEditSection }, T`Edit`),
|
|
394
394
|
cell.summarize
|
|
395
395
|
? [
|
|
396
|
-
R("span", { className: "text-muted" },
|
|
397
|
-
R("a", { className: "link-plain", onClick: this.props.onSummarizeSegment },
|
|
396
|
+
R("span", { className: "text-muted" }, T` / `),
|
|
397
|
+
R("a", { className: "link-plain", onClick: this.props.onSummarizeSegment }, T`Summarize`)
|
|
398
398
|
]
|
|
399
399
|
: undefined
|
|
400
400
|
)
|
|
@@ -40,8 +40,6 @@ export default class PivotChartQueryBuilder {
|
|
|
40
40
|
// extraFilters: array of filters to apply. Each is { table: table id, jsonql: jsonql condition with {alias} for tableAlias. }
|
|
41
41
|
// Queries are indexed by intersection id, as one query is made for each intersection
|
|
42
42
|
createQueries(design: PivotChartDesign, extraFilters: JsonQLFilter[]) {
|
|
43
|
-
const exprCompiler = new ExprCompiler(this.schema)
|
|
44
|
-
|
|
45
43
|
const queries: { [intersectionId: string]: JsonQLQuery } = {}
|
|
46
44
|
|
|
47
45
|
// For each intersection
|
|
@@ -79,7 +77,7 @@ export default class PivotChartQueryBuilder {
|
|
|
79
77
|
* ...
|
|
80
78
|
* bc: background color of the cell (if present)
|
|
81
79
|
* bcc0: background color condition 0 of the cell (if present)
|
|
82
|
-
* bcc1:
|
|
80
|
+
* bcc1: inner row segment value (if present)
|
|
83
81
|
* ...
|
|
84
82
|
* @param design - Design of the chart
|
|
85
83
|
* @param rowPath - Row path
|
|
@@ -146,7 +144,7 @@ export default class PivotChartQueryBuilder {
|
|
|
146
144
|
alias: `r${i}`
|
|
147
145
|
})
|
|
148
146
|
query.groupBy!.push(i + 1)
|
|
149
|
-
if (rowSegment.filter) {
|
|
147
|
+
if (rowSegment.filter && !intersection.tableOverride) {
|
|
150
148
|
filters.push(rowSegment.filter)
|
|
151
149
|
}
|
|
152
150
|
}
|
|
@@ -159,7 +157,7 @@ export default class PivotChartQueryBuilder {
|
|
|
159
157
|
alias: `c${i}`
|
|
160
158
|
})
|
|
161
159
|
query.groupBy!.push(i + 1 + rowPath.length)
|
|
162
|
-
if (columnSegment.filter) {
|
|
160
|
+
if (columnSegment.filter && !intersection.tableOverride) {
|
|
163
161
|
filters.push(columnSegment.filter)
|
|
164
162
|
}
|
|
165
163
|
}
|
|
@@ -199,9 +197,10 @@ export default class PivotChartQueryBuilder {
|
|
|
199
197
|
return null
|
|
200
198
|
}
|
|
201
199
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if
|
|
200
|
+
let whereClauses: JsonQLExpr[] = []
|
|
201
|
+
|
|
202
|
+
// Add overall where if no table override. If table override, would be for the wrong table
|
|
203
|
+
if (design.filter && !intersection.tableOverride) {
|
|
205
204
|
whereClauses.push(exprCompiler.compileExpr({ expr: design.filter, tableAlias: "main" }))
|
|
206
205
|
}
|
|
207
206
|
|
|
@@ -12,7 +12,7 @@ import IntersectionDesignerComponent from "./IntersectionDesignerComponent"
|
|
|
12
12
|
import { JsonQLFilter, WidgetScope } from "../../.."
|
|
13
13
|
import { PivotChartDesign, PivotChartIntersection } from "./PivotChartDesign"
|
|
14
14
|
|
|
15
|
-
import { LocaleContext } from "@mwater/expressions-ui
|
|
15
|
+
import { LocaleContext } from "@mwater/expressions-ui"
|
|
16
16
|
|
|
17
17
|
export interface PivotChartViewComponentProps {
|
|
18
18
|
schema: Schema
|
|
@@ -152,7 +152,7 @@ export default class PivotChartViewComponent extends React.Component<
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
handleSummarizeSegment = (segmentId: any) => {
|
|
155
|
-
const design = PivotChartUtils.summarizeSegment(this.props.design, segmentId,
|
|
155
|
+
const design = PivotChartUtils.summarizeSegment(this.props.design, segmentId, T`Summary`)
|
|
156
156
|
|
|
157
157
|
return this.props.onDesignChange!(design)
|
|
158
158
|
}
|
|
@@ -193,12 +193,12 @@ export default class PivotChartViewComponent extends React.Component<
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
const segmentType = PivotChartUtils.findSegment(this.props.design.rows, this.state.editSegment.id)
|
|
196
|
-
?
|
|
197
|
-
:
|
|
196
|
+
? T`row`
|
|
197
|
+
: T`column`
|
|
198
198
|
|
|
199
199
|
return (
|
|
200
200
|
<ActionCancelModalComponent
|
|
201
|
-
title={`Edit ${segmentType}`}
|
|
201
|
+
title={T`Edit ${segmentType}`}
|
|
202
202
|
onAction={this.handleSaveEditSegment}
|
|
203
203
|
onCancel={this.handleCancelEditSegment}
|
|
204
204
|
size="large"
|
|
@@ -223,7 +223,7 @@ export default class PivotChartViewComponent extends React.Component<
|
|
|
223
223
|
|
|
224
224
|
return (
|
|
225
225
|
<ActionCancelModalComponent
|
|
226
|
-
title=
|
|
226
|
+
title={T`Edit Value`}
|
|
227
227
|
onAction={this.handleSaveEditIntersection}
|
|
228
228
|
onCancel={this.handleCancelEditIntersection}
|
|
229
229
|
size="large"
|
|
@@ -90,18 +90,18 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
90
90
|
ui.FormGroup,
|
|
91
91
|
{
|
|
92
92
|
labelMuted: true,
|
|
93
|
-
label:
|
|
93
|
+
label: T`Type`
|
|
94
94
|
},
|
|
95
95
|
<ui.Radio key="single" value={this.state.mode} radioValue={"single"} onChange={this.handleMode}>
|
|
96
|
-
{`Single ${this.props.segmentType}`}
|
|
96
|
+
{T`Single ${this.props.segmentType}`}
|
|
97
97
|
<span className="text-muted">
|
|
98
|
-
{` - used for summary ${this.props.segmentType}s and empty ${this.props.segmentType}s`}
|
|
98
|
+
{T` - used for summary ${this.props.segmentType}s and empty ${this.props.segmentType}s`}
|
|
99
99
|
</span>
|
|
100
100
|
</ui.Radio>,
|
|
101
101
|
|
|
102
102
|
<ui.Radio key="multiple" value={this.state.mode} radioValue={"multiple"} onChange={this.handleMode}>
|
|
103
|
-
{`Multiple ${this.props.segmentType}s`}
|
|
104
|
-
<span className="text-muted">{` - disaggregate data by a field`}</span>
|
|
103
|
+
{T`Multiple ${this.props.segmentType}s`}
|
|
104
|
+
<span className="text-muted">{T` - disaggregate data by a field`}</span>
|
|
105
105
|
</ui.Radio>
|
|
106
106
|
)
|
|
107
107
|
}
|
|
@@ -111,8 +111,8 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
111
111
|
ui.FormGroup,
|
|
112
112
|
{
|
|
113
113
|
labelMuted: true,
|
|
114
|
-
label:
|
|
115
|
-
help: this.state.mode === "multiple" ? `Optional label for the ${this.props.segmentType}s` : undefined
|
|
114
|
+
label: T`Label`,
|
|
115
|
+
help: this.state.mode === "multiple" ? T`Optional label for the ${this.props.segmentType}s` : undefined
|
|
116
116
|
},
|
|
117
117
|
R("input", {
|
|
118
118
|
ref: (elem: HTMLInputElement | null) => {
|
|
@@ -133,7 +133,7 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
133
133
|
const axisType = axisBuilder.getAxisType(this.props.segment.valueAxis)
|
|
134
134
|
const allowValueAxisOnlyValuesPresent = axisType == "enum" || axisType == "enumset" || axisType == "date"
|
|
135
135
|
|
|
136
|
-
return <ui.FormGroup labelMuted label=
|
|
136
|
+
return <ui.FormGroup labelMuted label={T`Field`} help={T`Field to disaggregate data by`}>
|
|
137
137
|
<div style={{ marginLeft: 8 }}>
|
|
138
138
|
{
|
|
139
139
|
R(AxisComponent, {
|
|
@@ -154,10 +154,10 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
154
154
|
value={this.props.segment.valueAxisOnlyValuesPresent}
|
|
155
155
|
onChange={this.handleValueAxisOnlyValuesPresentChange}
|
|
156
156
|
>
|
|
157
|
-
Only show values actually present
|
|
157
|
+
{T`Only show values actually present`}
|
|
158
158
|
<PopoverHelpComponent placement="bottom">
|
|
159
|
-
Limits values to those that are present in the data, as opposed
|
|
160
|
-
to all choices or all dates within range
|
|
159
|
+
{T`Limits values to those that are present in the data, as opposed
|
|
160
|
+
to all choices or all dates within range`}
|
|
161
161
|
</PopoverHelpComponent>
|
|
162
162
|
</ui.Checkbox>
|
|
163
163
|
: null }
|
|
@@ -170,8 +170,8 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
170
170
|
ui.FormGroup,
|
|
171
171
|
{
|
|
172
172
|
labelMuted: true,
|
|
173
|
-
label: [R(ui.Icon, { id: "glyphicon-filter" }),
|
|
174
|
-
hint: `Filters all data associated with this ${this.props.segmentType}`
|
|
173
|
+
label: [R(ui.Icon, { id: "glyphicon-filter" }), T` Filters`],
|
|
174
|
+
hint: T`Filters all data associated with this ${this.props.segmentType}`
|
|
175
175
|
},
|
|
176
176
|
R(FilterExprComponent, {
|
|
177
177
|
schema: this.props.schema,
|
|
@@ -188,7 +188,7 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
188
188
|
ui.FormGroup,
|
|
189
189
|
{
|
|
190
190
|
labelMuted: true,
|
|
191
|
-
label:
|
|
191
|
+
label: T`Styling`
|
|
192
192
|
},
|
|
193
193
|
<div>
|
|
194
194
|
<ui.Checkbox
|
|
@@ -197,7 +197,7 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
197
197
|
value={this.props.segment.bold === true}
|
|
198
198
|
onChange={(value) => this.update({ bold: value })}
|
|
199
199
|
>
|
|
200
|
-
Bold
|
|
200
|
+
{T`Bold`}
|
|
201
201
|
</ui.Checkbox>
|
|
202
202
|
<ui.Checkbox
|
|
203
203
|
key="italic"
|
|
@@ -205,7 +205,7 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
205
205
|
value={this.props.segment.italic === true}
|
|
206
206
|
onChange={(value) => this.update({ italic: value })}
|
|
207
207
|
>
|
|
208
|
-
Italic
|
|
208
|
+
{T`Italic`}
|
|
209
209
|
</ui.Checkbox>
|
|
210
210
|
{ this.props.segment.valueAxis && this.props.segment.label ?
|
|
211
211
|
<ui.Checkbox
|
|
@@ -214,14 +214,14 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
214
214
|
value={this.props.segment.valueLabelBold === true}
|
|
215
215
|
onChange={(value) => this.update({ valueLabelBold: value })}
|
|
216
216
|
>
|
|
217
|
-
Header Bold
|
|
217
|
+
{T`Header Bold`}
|
|
218
218
|
</ui.Checkbox>
|
|
219
219
|
: undefined}
|
|
220
220
|
{this.props.segment.valueAxis && this.props.segment.label
|
|
221
221
|
? R(
|
|
222
222
|
"div",
|
|
223
223
|
{ style: { paddingTop: 5 } },
|
|
224
|
-
|
|
224
|
+
T`Shade filler cells: `,
|
|
225
225
|
R(ColorComponent, {
|
|
226
226
|
color: this.props.segment.fillerColor,
|
|
227
227
|
onChange: (color: any) => this.update({ fillerColor: color })
|
|
@@ -237,21 +237,21 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
237
237
|
ui.FormGroup,
|
|
238
238
|
{
|
|
239
239
|
labelMuted: true,
|
|
240
|
-
label:
|
|
240
|
+
label: T`Borders`
|
|
241
241
|
},
|
|
242
|
-
R("div", { key: "before" }, this.props.segmentType === "row" ?
|
|
242
|
+
R("div", { key: "before" }, this.props.segmentType === "row" ? T`Top: ` : T`Left: `),
|
|
243
243
|
R(BorderComponent, {
|
|
244
244
|
value: this.props.segment.borderBefore,
|
|
245
245
|
defaultValue: 2,
|
|
246
246
|
onChange: (value: any) => this.update({ borderBefore: value })
|
|
247
247
|
}),
|
|
248
|
-
R("div", { key: "within" },
|
|
248
|
+
R("div", { key: "within" }, T`Within: `),
|
|
249
249
|
R(BorderComponent, {
|
|
250
250
|
value: this.props.segment.borderWithin,
|
|
251
251
|
defaultValue: 1,
|
|
252
252
|
onChange: (value: any) => this.update({ borderWithin: value })
|
|
253
253
|
}),
|
|
254
|
-
R("div", { key: "after" }, this.props.segmentType === "row" ?
|
|
254
|
+
R("div", { key: "after" }, this.props.segmentType === "row" ? T`Bottom: ` : T`Right: `),
|
|
255
255
|
R(BorderComponent, {
|
|
256
256
|
value: this.props.segment.borderAfter,
|
|
257
257
|
defaultValue: 2,
|
|
@@ -265,8 +265,8 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
265
265
|
ui.FormGroup,
|
|
266
266
|
{
|
|
267
267
|
labelMuted: true,
|
|
268
|
-
label: [R(ui.Icon, { id: "fa-sort-amount-asc" }),
|
|
269
|
-
hint: `Sorts the display of this ${this.props.segmentType}`
|
|
268
|
+
label: [R(ui.Icon, { id: "fa-sort-amount-asc" }), T` Sort`],
|
|
269
|
+
hint: T`Sorts the display of this ${this.props.segmentType}`
|
|
270
270
|
},
|
|
271
271
|
R(ExprComponent, {
|
|
272
272
|
schema: this.props.schema,
|
|
@@ -290,7 +290,7 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
290
290
|
onChange: this.handleOrderDirChange,
|
|
291
291
|
inline: true
|
|
292
292
|
},
|
|
293
|
-
|
|
293
|
+
T`Ascending`
|
|
294
294
|
),
|
|
295
295
|
R(
|
|
296
296
|
ui.Radio,
|
|
@@ -300,7 +300,7 @@ export default class SegmentDesignerComponent extends React.Component<
|
|
|
300
300
|
onChange: this.handleOrderDirChange,
|
|
301
301
|
inline: true
|
|
302
302
|
},
|
|
303
|
-
|
|
303
|
+
T`Descending`
|
|
304
304
|
)
|
|
305
305
|
)
|
|
306
306
|
: undefined
|
|
@@ -337,16 +337,16 @@ class BorderComponent extends React.Component<BorderComponentProps> {
|
|
|
337
337
|
"span",
|
|
338
338
|
null,
|
|
339
339
|
<Radio inline value={value} radioValue={0} onChange={() => this.props.onChange(0)}>
|
|
340
|
-
None
|
|
340
|
+
{T`None`}
|
|
341
341
|
</Radio>,
|
|
342
342
|
<Radio inline value={value} radioValue={1} onChange={() => this.props.onChange(1)}>
|
|
343
|
-
Light
|
|
343
|
+
{T`Light`}
|
|
344
344
|
</Radio>,
|
|
345
345
|
<Radio inline value={value} radioValue={2} onChange={() => this.props.onChange(2)}>
|
|
346
|
-
Medium
|
|
346
|
+
{T`Medium`}
|
|
347
347
|
</Radio>,
|
|
348
348
|
<Radio inline value={value} radioValue={3} onChange={() => this.props.onChange(3)}>
|
|
349
|
-
Heavy
|
|
349
|
+
{T`Heavy`}
|
|
350
350
|
</Radio>
|
|
351
351
|
)
|
|
352
352
|
}
|
|
@@ -56,7 +56,7 @@ export default class OrderingsComponent extends React.Component<OrderingsCompone
|
|
|
56
56
|
"button",
|
|
57
57
|
{ type: "button", className: "btn btn-sm btn-secondary", onClick: this.handleAdd, key: "add" },
|
|
58
58
|
R("span", { className: "fas fa-plus" }),
|
|
59
|
-
|
|
59
|
+
T` Add Ordering`
|
|
60
60
|
)
|
|
61
61
|
)
|
|
62
62
|
}
|
|
@@ -111,7 +111,7 @@ class OrderingComponent extends React.Component<OrderingComponentProps> {
|
|
|
111
111
|
"div",
|
|
112
112
|
null,
|
|
113
113
|
<Checkbox inline value={this.props.ordering.direction === "desc"} onChange={this.handleDirectionChange}>
|
|
114
|
-
Reverse
|
|
114
|
+
{T`Reverse`}
|
|
115
115
|
</Checkbox>
|
|
116
116
|
)
|
|
117
117
|
)
|
|
@@ -135,7 +135,7 @@ export default class TableChart extends Chart {
|
|
|
135
135
|
|
|
136
136
|
// Check that has table
|
|
137
137
|
if (!design.table) {
|
|
138
|
-
return
|
|
138
|
+
return T`Missing data source`
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
let error = null
|
|
@@ -143,7 +143,7 @@ export default class TableChart extends Chart {
|
|
|
143
143
|
for (let column of design.columns) {
|
|
144
144
|
// Check that has textAxis
|
|
145
145
|
if (!column.textAxis) {
|
|
146
|
-
error = error ||
|
|
146
|
+
error = error || T`Missing text`
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
error = error || axisBuilder.validateAxis({ axis: column.textAxis })
|
|
@@ -151,7 +151,7 @@ export default class TableChart extends Chart {
|
|
|
151
151
|
|
|
152
152
|
for (let ordering of design.orderings) {
|
|
153
153
|
if (!ordering.axis) {
|
|
154
|
-
error = error ||
|
|
154
|
+
error = error || T`Missing order expression`
|
|
155
155
|
}
|
|
156
156
|
error = error || axisBuilder.validateAxis({ axis: ordering.axis })
|
|
157
157
|
}
|
|
@@ -16,7 +16,7 @@ import { TableChartColumn, TableChartDesign } from "./TableChart"
|
|
|
16
16
|
import AxisComponent from "../../../axes/AxisComponent"
|
|
17
17
|
import { Axis } from "../../../axes/Axis"
|
|
18
18
|
|
|
19
|
-
import { LocaleContext } from "@mwater/expressions-ui
|
|
19
|
+
import { LocaleContext } from "@mwater/expressions-ui"
|
|
20
20
|
|
|
21
21
|
export interface TableChartDesignerComponentProps {
|
|
22
22
|
design: TableChartDesign
|
|
@@ -70,7 +70,7 @@ export default class TableChartDesignerComponent extends React.Component<TableCh
|
|
|
70
70
|
return R(
|
|
71
71
|
"div",
|
|
72
72
|
{ className: "mb-3" },
|
|
73
|
-
R("label", { className: "text-muted" }, R("i", { className: "fa fa-database" }), " ",
|
|
73
|
+
R("label", { className: "text-muted" }, R("i", { className: "fa fa-database" }), " ", T`Data Source`),
|
|
74
74
|
": ",
|
|
75
75
|
R(TableSelectComponent, {
|
|
76
76
|
schema: this.props.schema,
|
|
@@ -86,13 +86,13 @@ export default class TableChartDesignerComponent extends React.Component<TableCh
|
|
|
86
86
|
return R(
|
|
87
87
|
"div",
|
|
88
88
|
{ className: "mb-3" },
|
|
89
|
-
R("label", { className: "text-muted" },
|
|
89
|
+
R("label", { className: "text-muted" }, T`Title`),
|
|
90
90
|
R("input", {
|
|
91
91
|
type: "text",
|
|
92
92
|
className: "form-control form-control-sm",
|
|
93
93
|
value: this.props.design.titleText,
|
|
94
94
|
onChange: this.handleTitleTextChange,
|
|
95
|
-
placeholder:
|
|
95
|
+
placeholder: T`Untitled`
|
|
96
96
|
})
|
|
97
97
|
)
|
|
98
98
|
}
|
|
@@ -145,7 +145,7 @@ export default class TableChartDesignerComponent extends React.Component<TableCh
|
|
|
145
145
|
"button",
|
|
146
146
|
{ className: "btn btn-secondary btn-sm", type: "button", onClick: this.handleAddColumn },
|
|
147
147
|
R("span", { className: "fas fa-plus" }),
|
|
148
|
-
" Add Column
|
|
148
|
+
" ", T`Add Column`
|
|
149
149
|
)
|
|
150
150
|
)
|
|
151
151
|
}
|
|
@@ -162,7 +162,7 @@ export default class TableChartDesignerComponent extends React.Component<TableCh
|
|
|
162
162
|
return R(
|
|
163
163
|
"div",
|
|
164
164
|
{ className: "mb-3" },
|
|
165
|
-
R("label", { className: "text-muted" }, R("span", { className: "fas fa-sort-amount-down" }), " ",
|
|
165
|
+
R("label", { className: "text-muted" }, R("span", { className: "fas fa-sort-amount-down" }), " ", T`Ordering`),
|
|
166
166
|
R(
|
|
167
167
|
"div",
|
|
168
168
|
{ style: { marginLeft: 8 } },
|
|
@@ -186,7 +186,7 @@ export default class TableChartDesignerComponent extends React.Component<TableCh
|
|
|
186
186
|
return R(
|
|
187
187
|
"div",
|
|
188
188
|
{ className: "mb-3" },
|
|
189
|
-
R("label", { className: "text-muted" }, R("span", { className: "fas fa-filter" }), " ",
|
|
189
|
+
R("label", { className: "text-muted" }, R("span", { className: "fas fa-filter" }), " ", T`Filters`),
|
|
190
190
|
R(
|
|
191
191
|
"div",
|
|
192
192
|
{ style: { marginLeft: 8 } },
|
|
@@ -210,7 +210,7 @@ export default class TableChartDesignerComponent extends React.Component<TableCh
|
|
|
210
210
|
return R(
|
|
211
211
|
"div",
|
|
212
212
|
{ className: "mb-3" },
|
|
213
|
-
R("label", { className: "text-muted" },
|
|
213
|
+
R("label", { className: "text-muted" }, T`Maximum Number of Rows (up to 1000)`),
|
|
214
214
|
R(
|
|
215
215
|
"div",
|
|
216
216
|
{ style: { marginLeft: 8 } },
|
|
@@ -291,7 +291,7 @@ class TableChartColumnDesignerComponent extends React.Component<TableChartColumn
|
|
|
291
291
|
renderExpr() {
|
|
292
292
|
const column = this.props.design.columns[this.props.index]
|
|
293
293
|
|
|
294
|
-
const title =
|
|
294
|
+
const title = T`Value`
|
|
295
295
|
|
|
296
296
|
return R(
|
|
297
297
|
"div",
|
|
@@ -327,7 +327,7 @@ class TableChartColumnDesignerComponent extends React.Component<TableChartColumn
|
|
|
327
327
|
return R(
|
|
328
328
|
"div",
|
|
329
329
|
{ className: "mb-3" },
|
|
330
|
-
R("label", { className: "text-muted" },
|
|
330
|
+
R("label", { className: "text-muted" }, T`Format`),
|
|
331
331
|
": ",
|
|
332
332
|
R(
|
|
333
333
|
"select",
|
|
@@ -351,7 +351,7 @@ class TableChartColumnDesignerComponent extends React.Component<TableChartColumn
|
|
|
351
351
|
return R(
|
|
352
352
|
"div",
|
|
353
353
|
null,
|
|
354
|
-
R("label", { className: "text-muted" },
|
|
354
|
+
R("label", { className: "text-muted" }, T`Header`),
|
|
355
355
|
": ",
|
|
356
356
|
R("input", {
|
|
357
357
|
type: "text",
|
|
@@ -373,16 +373,16 @@ class TableChartColumnDesignerComponent extends React.Component<TableChartColumn
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
return R('div', null,
|
|
376
|
-
R(ui.Checkbox, {value: column.summarize, inline: true, onChange: (summarize) => this.updateColumn({ summarize, summaryType: column.summaryType ?? 'sum' })},
|
|
376
|
+
R(ui.Checkbox, {value: column.summarize, inline: true, onChange: (summarize) => this.updateColumn({ summarize, summaryType: column.summaryType ?? 'sum' })}, T`Summarize`),
|
|
377
377
|
column.summarize ?
|
|
378
378
|
R('div', null,
|
|
379
|
-
R("label", { className: "text-muted" },
|
|
379
|
+
R("label", { className: "text-muted" }, T`Summary Type`),
|
|
380
380
|
": ",
|
|
381
381
|
R(ui.Select, {
|
|
382
382
|
inline: true,
|
|
383
383
|
value: column.summaryType,
|
|
384
384
|
onChange: (summaryType) => this.updateColumn({ summaryType }),
|
|
385
|
-
options: [{value: 'avg', label:
|
|
385
|
+
options: [{value: 'avg', label: T`Average`}, {value: 'sum', label: T`Sum`}, {value: 'min', label: T`Minimum`}, {value: 'max', label: T`Maximum`} ]
|
|
386
386
|
})
|
|
387
387
|
) : undefined
|
|
388
388
|
)
|
|
@@ -396,7 +396,7 @@ class TableChartColumnDesignerComponent extends React.Component<TableChartColumn
|
|
|
396
396
|
return R(
|
|
397
397
|
ui.CollapsibleSection,
|
|
398
398
|
{
|
|
399
|
-
label:
|
|
399
|
+
label: T`Background color by data`,
|
|
400
400
|
labelMuted: true
|
|
401
401
|
},
|
|
402
402
|
R(AxisComponent, {
|
|
@@ -426,7 +426,7 @@ class TableChartColumnDesignerComponent extends React.Component<TableChartColumn
|
|
|
426
426
|
null,
|
|
427
427
|
this.props.connectDragSource(R("i", { className: "fa fa-bars", style: iconStyle })),
|
|
428
428
|
this.renderRemove(),
|
|
429
|
-
R("label", null, `Column ${this.props.index + 1}`),
|
|
429
|
+
R("label", null, T`Column ${this.props.index + 1}`),
|
|
430
430
|
R(
|
|
431
431
|
"div",
|
|
432
432
|
{ style: { marginLeft: 5 } },
|
|
@@ -8,7 +8,7 @@ import { formatValue } from "../../../valueFormatter"
|
|
|
8
8
|
import { Image } from "@mwater/forms/lib/RotationAwareImageComponent"
|
|
9
9
|
import { TableChartColumn, TableChartDesign } from "./TableChart"
|
|
10
10
|
import Color from "color"
|
|
11
|
-
import { LocaleContext } from "@mwater/expressions-ui
|
|
11
|
+
import { LocaleContext } from "@mwater/expressions-ui"
|
|
12
12
|
|
|
13
13
|
export interface TableChartViewComponentProps {
|
|
14
14
|
/** Design of chart */
|
|
@@ -222,7 +222,7 @@ class TableContentsComponent extends React.Component<TableContentsComponentProps
|
|
|
222
222
|
|
|
223
223
|
renderImage(id: any) {
|
|
224
224
|
const url = this.props.dataSource.getImageUrl(id)
|
|
225
|
-
return R("a", { href: url, onClick: (e) => {e.stopPropagation()}, key: id, target: "_blank", style: { paddingLeft: 5, paddingRight: 5 } },
|
|
225
|
+
return R("a", { href: url, onClick: (e) => {e.stopPropagation()}, key: id, target: "_blank", style: { paddingLeft: 5, paddingRight: 5 } }, T`Image`)
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
renderCell(rowIndex: any, columnIndex: any) {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
const R = React.createElement
|
|
3
|
-
|
|
1
|
+
import React, { useState } from "react"
|
|
4
2
|
import uuid from "uuid"
|
|
5
3
|
import { DataSource, Schema } from "@mwater/expressions"
|
|
6
4
|
import ActionCancelModalComponent from "@mwater/react-library/lib/ActionCancelModalComponent"
|
|
7
5
|
import ExprItemEditorComponent from "./ExprItemEditorComponent"
|
|
8
6
|
import { HtmlItemExpr } from "../../richtext/ExprItemsHtmlConverter"
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
interface ExprInsertModalComponentProps {
|
|
11
9
|
/** Schema to use */
|
|
12
10
|
schema: Schema
|
|
13
11
|
/** Data source to use to get values */
|
|
@@ -56,22 +54,22 @@ export default class ExprInsertModalComponent extends React.Component<
|
|
|
56
54
|
return null
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
return
|
|
60
|
-
ActionCancelModalComponent
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
return (
|
|
58
|
+
<ActionCancelModalComponent
|
|
59
|
+
actionLabel={T`Insert`}
|
|
60
|
+
onAction={this.handleInsert}
|
|
61
|
+
onCancel={() => this.setState({ open: false })}
|
|
62
|
+
title={T`Insert Field`}
|
|
63
|
+
size="x-large"
|
|
64
|
+
>
|
|
65
|
+
<ExprItemEditorComponent
|
|
66
|
+
schema={this.props.schema}
|
|
67
|
+
dataSource={this.props.dataSource}
|
|
68
|
+
exprItem={this.state.exprItem!}
|
|
69
|
+
onChange={(exprItem: HtmlItemExpr) => this.setState({ exprItem })}
|
|
70
|
+
singleRowTable={this.props.singleRowTable}
|
|
71
|
+
/>
|
|
72
|
+
</ActionCancelModalComponent>
|
|
75
73
|
)
|
|
76
74
|
}
|
|
77
75
|
}
|