@datarailsshared/dr_renderer 1.5.118 → 1.5.120
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/package.json
CHANGED
package/src/options/builders.js
CHANGED
|
@@ -404,6 +404,10 @@ const withTooltipPie = () => createSuboption('tooltips', 'Tooltip', [
|
|
|
404
404
|
const withTooltipGauge = () => createSuboption('tooltips', 'Tooltip', [
|
|
405
405
|
GAUGE_SHOW_TOGGLE,
|
|
406
406
|
...createTooltipStyleGroup(),
|
|
407
|
+
createDivider(),
|
|
408
|
+
createCheckbox('show_segment_name', 'Segment name', true),
|
|
409
|
+
createCheckbox('show_percentage_in_value', 'Value % out of Goal', true),
|
|
410
|
+
createCheckbox('show_percentage_in_segments', 'Segment % out Goal', true),
|
|
407
411
|
]);
|
|
408
412
|
|
|
409
413
|
// ============================================================================
|
|
@@ -495,7 +499,7 @@ const withTableOptionsTranspose = (config = {}) => {
|
|
|
495
499
|
createCheckbox('show_subtotals_for_columns', 'Subtotals for columns', false),
|
|
496
500
|
createCheckbox('show_subtotals_for_rows', 'Subtotals for rows', false),
|
|
497
501
|
createCheckbox('show_subtotals_in_brackets', 'Subtotals in brackets', false),
|
|
498
|
-
createCheckbox('transpose_table', 'Transpose',
|
|
502
|
+
createCheckbox('transpose_table', 'Transpose', false),
|
|
499
503
|
createCheckbox('start_collapsed_rows', 'Start collapsed rows <small>(old table only)</small>', false),
|
|
500
504
|
createCheckbox('start_collapsed_columns', 'Start collapsed columns <small>(old table only)</small>', false),
|
|
501
505
|
createCheckbox('colorize_headers', 'Colorize headers', true),
|
|
@@ -503,7 +507,6 @@ const withTableOptionsTranspose = (config = {}) => {
|
|
|
503
507
|
createCheckbox('use_handsOnTable', 'Use big data table', false),
|
|
504
508
|
createCheckbox('use_new_table_design', 'Use new table design', true),
|
|
505
509
|
createCheckbox('hide_nulls_in_headers', 'Null values appear as blank', true),
|
|
506
|
-
createCheckbox('show_all', 'Show All', false),
|
|
507
510
|
createCheckbox('freeze_panes', 'Freeze panes <small>(old table only)</small>', false),
|
|
508
511
|
createCheckbox('eliminate_calc_totals', 'Eliminate grand totals for calculated values', false),
|
|
509
512
|
createCheckbox('show_more_than_thousand_rows', 'Show data in dashboard if more than 1000 rows', false, {
|
|
@@ -529,36 +532,36 @@ const withTableOptionsGauge = () => createSuboption('table_options', 'Table', [
|
|
|
529
532
|
const withTableDesignOptions = () => createSuboption('table_design_options', 'Table design', [
|
|
530
533
|
createDivider('Columns'),
|
|
531
534
|
createSelect('columns_font_style', 'Font style', SUBOPTIONS_FONTS, LABEL_DEFAULT_SETTINGS.FONT_FAMILY),
|
|
532
|
-
createSelect('columns_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES,
|
|
533
|
-
createSelect('
|
|
535
|
+
createSelect('columns_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES, '10'),
|
|
536
|
+
createSelect('columns_align_text', 'Alignment', [
|
|
534
537
|
{ label: 'Left', value: 'left' },
|
|
535
538
|
{ label: 'Center', value: 'center' },
|
|
536
539
|
{ label: 'Right', value: 'right' },
|
|
537
540
|
], 'left'),
|
|
538
541
|
createDivider('Rows'),
|
|
539
542
|
createSelect('rows_font_style', 'Font style', SUBOPTIONS_FONTS, LABEL_DEFAULT_SETTINGS.FONT_FAMILY),
|
|
540
|
-
createSelect('rows_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES,
|
|
541
|
-
createSelect('
|
|
543
|
+
createSelect('rows_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES, '10'),
|
|
544
|
+
createSelect('rows_align_text', 'Alignment', [
|
|
542
545
|
{ label: 'Left', value: 'left' },
|
|
543
546
|
{ label: 'Center', value: 'center' },
|
|
544
547
|
{ label: 'Right', value: 'right' },
|
|
545
548
|
], 'left'),
|
|
546
549
|
createDivider('Values'),
|
|
547
550
|
createSelect('values_font_style', 'Font style', SUBOPTIONS_FONTS, LABEL_DEFAULT_SETTINGS.FONT_FAMILY),
|
|
548
|
-
createSelect('values_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES,
|
|
549
|
-
createSelect('
|
|
551
|
+
createSelect('values_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES, '10'),
|
|
552
|
+
createSelect('values_align_text', 'Alignment', [
|
|
550
553
|
{ label: 'Left', value: 'left' },
|
|
551
554
|
{ label: 'Center', value: 'center' },
|
|
552
555
|
{ label: 'Right', value: 'right' },
|
|
553
|
-
], '
|
|
554
|
-
createDivider('
|
|
555
|
-
createSelect('
|
|
556
|
-
createSelect('
|
|
557
|
-
createSelect('
|
|
556
|
+
], 'left'),
|
|
557
|
+
createDivider('Totals'),
|
|
558
|
+
createSelect('totals_font_style', 'Font style', SUBOPTIONS_FONTS, LABEL_DEFAULT_SETTINGS.FONT_FAMILY),
|
|
559
|
+
createSelect('totals_font_size', 'Font size', SUBOPTIONS_FONT_SIZE_VALUES, '10'),
|
|
560
|
+
createSelect('totals_align_text', 'Alignment', [
|
|
558
561
|
{ label: 'Left', value: 'left' },
|
|
559
562
|
{ label: 'Center', value: 'center' },
|
|
560
563
|
{ label: 'Right', value: 'right' },
|
|
561
|
-
], '
|
|
564
|
+
], 'left'),
|
|
562
565
|
]);
|
|
563
566
|
|
|
564
567
|
// ============================================================================
|
|
@@ -666,12 +669,17 @@ const withName = () => createSuboption('name', 'Name', [
|
|
|
666
669
|
* Creates a negative number format suboption.
|
|
667
670
|
* @returns {SuboptionDefinition}
|
|
668
671
|
*/
|
|
669
|
-
const withNegativeNumberFormat = () =>
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
672
|
+
const withNegativeNumberFormat = () => ({
|
|
673
|
+
...createSuboption('negative_numbers', 'Negative num', [
|
|
674
|
+
createRadio('value', 'Show like', [
|
|
675
|
+
{ label: '-1234', value: 'minus' },
|
|
676
|
+
{ label: '-1234[red]', value: 'red_minus' },
|
|
677
|
+
{ label: '(1234)', value: 'absolute' },
|
|
678
|
+
{ label: '(1234)[red]', value: 'red_absolute' },
|
|
679
|
+
], 'minus'),
|
|
680
|
+
]),
|
|
681
|
+
is_hidden: true,
|
|
682
|
+
});
|
|
675
683
|
|
|
676
684
|
/**
|
|
677
685
|
* Creates a value suboption for KPI widgets.
|
|
@@ -806,10 +814,13 @@ const withTotalValueLabelDonut = () => createSuboption('total_value_label', 'Tot
|
|
|
806
814
|
* @returns {SuboptionDefinition}
|
|
807
815
|
*/
|
|
808
816
|
const withGaugeGoal = () => ({
|
|
809
|
-
|
|
817
|
+
category_class: DEFAULT_CATEGORY_CLASS,
|
|
818
|
+
category_label: 'Gauge goal',
|
|
819
|
+
category_type: 'goal',
|
|
820
|
+
elements: [
|
|
810
821
|
createInput('title', 'Goal title', 'Goal'),
|
|
811
822
|
createInput('value', 'Goal value', 1000000),
|
|
812
|
-
]
|
|
823
|
+
],
|
|
813
824
|
is_hidden: true,
|
|
814
825
|
});
|
|
815
826
|
|
|
@@ -839,9 +850,9 @@ const withGaugeSegments = (config = {}) => ({
|
|
|
839
850
|
category_type: 'segments',
|
|
840
851
|
is_hidden: true,
|
|
841
852
|
default_value: config.defaultSegments || [
|
|
842
|
-
{ from: 0, to: 50, color: '
|
|
843
|
-
{ from:
|
|
844
|
-
{ from:
|
|
853
|
+
{ from: 0, to: 50, color: '#BF1D30', title: 'Low' },
|
|
854
|
+
{ from: 50, to: 90, color: '#FFA310', title: 'Medium' },
|
|
855
|
+
{ from: 90, to: 100, color: '#037C5A', title: 'High' },
|
|
845
856
|
],
|
|
846
857
|
});
|
|
847
858
|
|