@adaptabletools/adaptable-cjs 23.0.0-canary.7 → 23.0.0-canary.8

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.
Files changed (90) hide show
  1. package/index.css +75 -9
  2. package/package.json +1 -1
  3. package/src/AdaptableState/StyledColumnState.d.ts +8 -850
  4. package/src/AdaptableState/StyledColumnState.js +0 -10
  5. package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
  6. package/src/AdaptableState/StyledColumns/BadgeStyle.js +12 -0
  7. package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
  8. package/src/AdaptableState/StyledColumns/BulletChartStyle.js +2 -0
  9. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.d.ts +60 -0
  10. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +7 -0
  11. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
  12. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +6 -0
  13. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
  14. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +7 -0
  15. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
  16. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +10 -0
  17. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
  18. package/src/AdaptableState/StyledColumns/GradientStyle.js +2 -0
  19. package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
  20. package/src/AdaptableState/StyledColumns/IconStyle.js +2 -0
  21. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
  22. package/src/AdaptableState/StyledColumns/PercentBarStyle.js +2 -0
  23. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
  24. package/src/AdaptableState/StyledColumns/RangeBarStyle.js +2 -0
  25. package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
  26. package/src/AdaptableState/StyledColumns/RatingStyle.js +2 -0
  27. package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
  28. package/src/AdaptableState/StyledColumns/SparklineStyle.js +2 -0
  29. package/src/Api/ColumnScopeApi.d.ts +1 -1
  30. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  31. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
  32. package/src/Utilities/Helpers/IconStylePresets.d.ts +1 -1
  33. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
  34. package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
  35. package/src/Utilities/Helpers/barChartCellText.js +333 -0
  36. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +2 -1
  37. package/src/Utilities/Helpers/percentBarPreviewHelper.js +3 -8
  38. package/src/View/Alert/Wizard/AlertButtonsEditor.js +158 -125
  39. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
  40. package/src/View/Alert/Wizard/AlertWizard.js +9 -1
  41. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
  42. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -2
  43. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
  44. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +6 -0
  45. package/src/View/Components/Buttons/EntityListActionButtons.js +1 -1
  46. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
  47. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +8 -8
  48. package/src/View/Components/ColumnFilter/ColumnFilter.js +14 -1
  49. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  50. package/src/View/Components/RangesComponent.d.ts +2 -1
  51. package/src/View/Export/ExportSchedulesTab.js +3 -4
  52. package/src/View/Filter/FilterViewPanel.js +1 -1
  53. package/src/View/Layout/Wizard/sections/RowSummarySection.js +128 -102
  54. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +1 -1
  55. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +36 -30
  56. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
  57. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +73 -58
  58. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +38 -11
  59. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +86 -44
  60. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
  61. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +40 -0
  62. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
  63. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +62 -0
  64. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
  65. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -1
  66. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
  67. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
  68. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
  69. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
  70. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
  71. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
  72. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
  73. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +13 -6
  74. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
  75. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
  76. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +18 -54
  77. package/src/agGrid/AgGridColumnAdapter.js +2 -1
  78. package/src/agGrid/cellRenderers/BadgeRenderer.js +7 -5
  79. package/src/agGrid/cellRenderers/BulletChartRenderer.js +43 -42
  80. package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
  81. package/src/agGrid/cellRenderers/IconRenderer.js +13 -11
  82. package/src/agGrid/cellRenderers/PercentBarRenderer.js +24 -96
  83. package/src/agGrid/cellRenderers/RangeBarRenderer.js +49 -46
  84. package/src/env.js +2 -2
  85. package/src/metamodel/adaptable.metamodel.d.ts +80 -14
  86. package/src/metamodel/adaptable.metamodel.js +1 -1
  87. package/src/migration/VersionUpgrade23.d.ts +27 -31
  88. package/src/migration/VersionUpgrade23.js +110 -29
  89. package/src/types.d.ts +12 -1
  90. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
6
  const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
7
7
  const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
8
+ const barChartCellText_1 = require("../../Utilities/Helpers/barChartCellText");
8
9
  /**
9
10
  * Resolve the origin value (in the same numeric space as `min`/`max`) the bar
10
11
  * should grow from.
@@ -45,58 +46,6 @@ const columnComparisonUsesCentredAxis = (origin) => {
45
46
  }
46
47
  return o === 'Zero' || o === 'Auto';
47
48
  };
48
- /**
49
- * Linear (non-comparison) mode: bar grows from an interior point of the scale
50
- * (so positives / negatives can diverge left and right).
51
- */
52
- const linearScaleUsesCentredAxis = (percentBarStyle, cellValue, min, max) => {
53
- const origin = percentBarStyle.Origin ?? 'Auto';
54
- if (origin === 'Zero') {
55
- return true;
56
- }
57
- if (origin === 'Min') {
58
- return false;
59
- }
60
- if (typeof origin === 'number') {
61
- if (max === min) {
62
- return false;
63
- }
64
- const f = toFraction(origin, min, max);
65
- return f > 0 && f < 1;
66
- }
67
- // Auto — same condition as resolveOrigin using 0 as the pivot.
68
- return min < 0 || max < 0 || cellValue < 0;
69
- };
70
- const resolveCellTextAlignCss = (percentBarStyle, args) => {
71
- const mode = percentBarStyle.CellTextAlignment;
72
- if (mode == undefined) {
73
- return undefined;
74
- }
75
- if (mode === 'Left') {
76
- return 'left';
77
- }
78
- if (mode === 'Right') {
79
- return 'right';
80
- }
81
- if (mode === 'Center') {
82
- return 'center';
83
- }
84
- // Auto
85
- const centred = args.hasColumnComparison
86
- ? columnComparisonUsesCentredAxis(percentBarStyle.Origin)
87
- : linearScaleUsesCentredAxis(percentBarStyle, args.numericValue, args.min, args.max);
88
- if (!centred) {
89
- return undefined;
90
- }
91
- const v = args.hasColumnComparison ? args.percentageValue : args.numericValue;
92
- if (v > 0) {
93
- return 'right';
94
- }
95
- if (v < 0) {
96
- return 'left';
97
- }
98
- return 'center';
99
- };
100
49
  const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
101
50
  if (!styledColumn.PercentBarStyle) {
102
51
  return;
@@ -195,11 +144,14 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
195
144
  }
196
145
  }
197
146
  // ----- Build the DOM -------------------------------------------------
198
- const hasCellText = percentBarStyle.CellText && percentBarStyle.CellText.length > 0;
199
- const isTextPositionMerged = percentBarStyle.CellTextPosition === 'Merged';
147
+ const cellTextProperties = percentBarStyle.CellTextProperties;
148
+ const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties);
149
+ // Wrapper always fills the cell. The bar is the flex-grow child so it
150
+ // claims whatever space the (compact) text rows leave, with a small
151
+ // floor to stay visible even on short rows.
200
152
  this.eGui = document.createElement('div');
201
153
  this.eGui.className = 'ab-PercentBar__wrapper';
202
- this.eGui.style.height = hasCellText && !isTextPositionMerged ? '80%' : '100%';
154
+ this.eGui.style.height = '100%';
203
155
  this.eGui.style.display = 'flex';
204
156
  this.eGui.style.flexDirection = 'column';
205
157
  this.eGui.style.justifyContent = 'center';
@@ -212,7 +164,10 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
212
164
  if (percentBarStyle.BackColor) {
213
165
  barEl.style.background = percentBarStyle.BackColor;
214
166
  }
215
- barEl.style.flex = '1';
167
+ barEl.style.flex = '1 1 0';
168
+ // Floor so the bar can't be squeezed out of existence when both
169
+ // `Above` and `Below` bands are populated on a short row.
170
+ barEl.style.minHeight = '6px';
216
171
  // Render the inside bar whenever a colour has been resolved, even at
217
172
  // 0% width. A zero-width div is visually identical to skipping the
218
173
  // element but keeps the DOM consistent so tests / tooling can still
@@ -233,47 +188,20 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
233
188
  }
234
189
  this.eGui.append(barEl);
235
190
  if (hasCellText) {
236
- const textEl = document.createElement('div');
237
- textEl.className = 'ab-PercentBar__text';
238
- textEl.style.lineHeight = '1.2';
239
- const parts = [];
240
- if (percentBarStyle.CellText.includes('CellValue')) {
241
- parts.push(params.formatValue?.(rawCellValue) ?? String(rawCellValue));
242
- }
243
- if (percentBarStyle.CellText.includes('PercentageValue')) {
244
- parts.push(`${percentageValue.toFixed(0)}%`);
245
- }
246
- textEl.innerText = parts.join(' ');
247
- const textAlignCss = resolveCellTextAlignCss(percentBarStyle, {
248
- numericValue,
249
- percentageValue,
250
- min,
251
- max,
252
- hasColumnComparison: !!percentBarStyle.ColumnComparison,
191
+ // Coerce to string: when no `valueFormatter` is set on the column,
192
+ // `params.formatValue` returns the raw value (a number for numeric
193
+ // columns), which then propagates through the helpers as a non-string
194
+ // and breaks string-only operations (e.g. `.length` checks).
195
+ const formattedCellValue = String(params.formatValue?.(rawCellValue) ?? rawCellValue);
196
+ const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, formattedCellValue, `${percentageValue.toFixed(0)}%`);
197
+ (0, barChartCellText_1.mountBarChartCellText)({
198
+ wrapperEl: this.eGui,
199
+ mergedOverlayEl: barEl,
200
+ textClassName: 'ab-PercentBar__text',
201
+ cellTextProperties,
202
+ labels,
203
+ mergedPointerEventsNone: false,
253
204
  });
254
- if (textAlignCss) {
255
- textEl.style.textAlign = textAlignCss;
256
- }
257
- switch (percentBarStyle.CellTextPosition) {
258
- case 'Above':
259
- this.eGui.prepend(textEl);
260
- break;
261
- case 'Merged':
262
- textEl.style.position = 'absolute';
263
- // Centre vertically without knowing the row height
264
- textEl.style.top = '50%';
265
- textEl.style.transform = 'translateY(-50%)';
266
- textEl.style.left = '0';
267
- textEl.style.right = '0';
268
- textEl.style.paddingLeft = '5px';
269
- textEl.style.paddingRight = '5px';
270
- barEl.append(textEl);
271
- break;
272
- case 'Below':
273
- default:
274
- this.eGui.append(textEl);
275
- break;
276
- }
277
205
  }
278
206
  }
279
207
  getGui() {
@@ -4,6 +4,7 @@ exports.getRangeBarRendererForColumn = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
6
  const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
7
+ const barChartCellText_1 = require("../../Utilities/Helpers/barChartCellText");
7
8
  const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
8
9
  const SVG_NS = 'http://www.w3.org/2000/svg';
9
10
  const DEFAULT_TRACK_HEIGHT = 4;
@@ -100,8 +101,9 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
100
101
  this.eGui.append(params.formatValue?.(rawCellValue) ?? String(rawCellValue));
101
102
  return;
102
103
  }
103
- const referenceValue = rangeStyle.Reference != undefined
104
- ? resolveBoundValue(rangeStyle.Reference, abColumn, params.node, api)
104
+ const referenceProperties = rangeStyle.Reference;
105
+ const referenceValue = referenceProperties?.Value != undefined
106
+ ? resolveBoundValue(referenceProperties.Value, abColumn, params.node, api)
105
107
  : undefined;
106
108
  // Markers - resolve user overrides against per-marker defaults.
107
109
  const valueMarker = normaliseMarker(rangeStyle.Marker, {
@@ -109,21 +111,24 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
109
111
  Color: DEFAULT_VALUE_MARKER_COLOR,
110
112
  Size: DEFAULT_VALUE_MARKER_SIZE,
111
113
  });
112
- const referenceMarker = normaliseMarker(rangeStyle.ReferenceMarker, {
114
+ const referenceMarker = normaliseMarker(referenceProperties?.Marker, {
113
115
  Shape: 'Line',
114
116
  Color: DEFAULT_REFERENCE_MARKER_COLOR,
115
117
  Size: DEFAULT_LINE_MARKER_THICKNESS,
116
118
  });
117
119
  // Out-of-range handling
118
- const outOfRangeMode = rangeStyle.OutOfRangeMode ?? 'Clamp';
120
+ const outOfRangeProperties = rangeStyle.OutOfRange;
121
+ const outOfRangeMode = outOfRangeProperties?.Mode ?? 'Clamp';
122
+ const outOfRangeColor = outOfRangeProperties?.Color;
119
123
  const isOutOfRange = numericValue < min || numericValue > max;
120
124
  const hideValueMarker = isOutOfRange && outOfRangeMode === 'Hide';
121
125
  // Layout
122
126
  const isVertical = rangeStyle.Orientation === 'Vertical';
123
- const trackThickness = rangeStyle.TrackHeight ?? DEFAULT_TRACK_HEIGHT;
127
+ const trackProperties = rangeStyle.Track;
128
+ const trackThickness = trackProperties?.Height ?? DEFAULT_TRACK_HEIGHT;
124
129
  const bandThickness = Math.max(trackThickness + 6, DEFAULT_BAND_HEIGHT);
125
- const hasCellText = rangeStyle.CellText && rangeStyle.CellText.length > 0;
126
- const isTextMerged = rangeStyle.CellTextPosition === 'Merged';
130
+ const cellTextProperties = rangeStyle.CellTextProperties;
131
+ const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties);
127
132
  // Map a 0..1 fraction onto the long-axis viewBox (0..100). Vertical
128
133
  // orientation inverts so that lower values appear at the bottom of
129
134
  // the cell, matching user expectation.
@@ -136,7 +141,7 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
136
141
  this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
137
142
  this.eGui.style.justifyContent = 'center';
138
143
  this.eGui.style.position = 'relative';
139
- this.eGui.style.height = hasCellText && !isTextMerged ? '80%' : '100%';
144
+ this.eGui.style.height = '100%';
140
145
  const svg = document.createElementNS(SVG_NS, 'svg');
141
146
  svg.setAttribute('class', 'ab-RangeBar__svg');
142
147
  svg.setAttribute('preserveAspectRatio', 'none');
@@ -195,11 +200,11 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
195
200
  const trackCrossOffset = (bandThickness - trackThickness) / 2;
196
201
  const track = document.createElementNS(SVG_NS, 'rect');
197
202
  setRectAxes(track, 0, 100, trackCrossOffset, trackThickness);
198
- track.setAttribute('fill', rangeStyle.TrackColor ?? DEFAULT_TRACK_COLOR);
203
+ track.setAttribute('fill', trackProperties?.Color ?? DEFAULT_TRACK_COLOR);
199
204
  track.setAttribute('class', 'ab-RangeBar__track');
200
205
  // Slight transparency by default so the track doesn't drown out the
201
- // band colours; honour explicit user TrackColor as-is.
202
- if (rangeStyle.TrackColor == undefined) {
206
+ // band colours; honour explicit user Track.Color as-is.
207
+ if (trackProperties?.Color == undefined) {
203
208
  // With no bands the cell background is often plain — the same muted
204
209
  // foreground at 0.35 opacity can disappear (only the accent marker reads).
205
210
  // Bands provide contrast underneath, so keep the subtle blend there.
@@ -228,8 +233,8 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
228
233
  valueFraction = toFraction(numericValue, min, max);
229
234
  }
230
235
  const valueCoord = valueAxisCoord(valueFraction);
231
- const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && rangeStyle.OutOfRangeColor
232
- ? { ...valueMarker, Color: rangeStyle.OutOfRangeColor }
236
+ const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && outOfRangeColor
237
+ ? { ...valueMarker, Color: outOfRangeColor }
233
238
  : valueMarker;
234
239
  const markerEl = createMarkerElement(effectiveMarker, valueCoord, bandThickness, isVertical);
235
240
  if (markerEl) {
@@ -237,40 +242,38 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
237
242
  svg.appendChild(markerEl);
238
243
  }
239
244
  }
240
- this.eGui.appendChild(svg);
245
+ // Wrap the SVG in a positioned container so a `Merged` text row sits
246
+ // centred on the *bar*, not on the cell — see BulletChartRenderer for
247
+ // the same fix and Percent Bar for the matching behaviour via its
248
+ // `barEl`.
249
+ const svgContainer = document.createElement('div');
250
+ svgContainer.style.position = 'relative';
251
+ svgContainer.style.display = 'flex';
252
+ svgContainer.style.alignItems = 'center';
253
+ svgContainer.style.justifyContent = 'center';
254
+ if (isVertical) {
255
+ svgContainer.style.flex = '1 1 auto';
256
+ svgContainer.style.minHeight = '0';
257
+ }
258
+ else {
259
+ svgContainer.style.flex = '0 0 auto';
260
+ }
261
+ svgContainer.appendChild(svg);
262
+ this.eGui.appendChild(svgContainer);
241
263
  if (hasCellText) {
242
- const textEl = document.createElement('div');
243
- textEl.className = 'ab-RangeBar__text';
244
- textEl.style.lineHeight = '1.2';
245
- const parts = [];
246
- if (rangeStyle.CellText.includes('CellValue')) {
247
- parts.push(params.formatValue?.(numericValue) ?? String(numericValue));
248
- }
249
- if (rangeStyle.CellText.includes('PercentageValue')) {
250
- const pct = (0, clamp_1.default)((numericValue - min) / (max - min), 0, 1) * 100;
251
- parts.push(`${pct.toFixed(0)}%`);
252
- }
253
- textEl.innerText = parts.join(' ');
254
- switch (rangeStyle.CellTextPosition) {
255
- case 'Above':
256
- this.eGui.prepend(textEl);
257
- break;
258
- case 'Merged':
259
- textEl.style.position = 'absolute';
260
- textEl.style.top = '50%';
261
- textEl.style.transform = 'translateY(-50%)';
262
- textEl.style.left = '0';
263
- textEl.style.right = '0';
264
- textEl.style.paddingLeft = '5px';
265
- textEl.style.paddingRight = '5px';
266
- textEl.style.pointerEvents = 'none';
267
- this.eGui.appendChild(textEl);
268
- break;
269
- case 'Below':
270
- default:
271
- this.eGui.appendChild(textEl);
272
- break;
273
- }
264
+ const pct = (0, clamp_1.default)((numericValue - min) / (max - min), 0, 1) * 100;
265
+ // See PercentBarRenderer: `params.formatValue` on a column without a
266
+ // `valueFormatter` returns the raw value (a number here), so coerce
267
+ // to string before it flows into the helpers.
268
+ const formattedCellValue = String(params.formatValue?.(numericValue) ?? numericValue);
269
+ const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, formattedCellValue, `${pct.toFixed(0)}%`);
270
+ (0, barChartCellText_1.mountBarChartCellText)({
271
+ wrapperEl: this.eGui,
272
+ mergedOverlayEl: svgContainer,
273
+ textClassName: 'ab-RangeBar__text',
274
+ cellTextProperties,
275
+ labels,
276
+ });
274
277
  }
275
278
  }
276
279
  getGui() {
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
5
- PUBLISH_TIMESTAMP: 1781796455481 || Date.now(),
6
- VERSION: "23.0.0-canary.7" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1782067371054 || Date.now(),
6
+ VERSION: "23.0.0-canary.8" || '--current-version--',
7
7
  };
@@ -1121,6 +1121,20 @@ export declare const ADAPTABLE_METAMODEL: {
1121
1121
  BadgeDensity: {
1122
1122
  k: string;
1123
1123
  };
1124
+ BadgeIconProperties: {
1125
+ k: string;
1126
+ p: ({
1127
+ n: string;
1128
+ k: string;
1129
+ o: boolean;
1130
+ r?: undefined;
1131
+ } | {
1132
+ n: string;
1133
+ k: string;
1134
+ r: string;
1135
+ o?: undefined;
1136
+ })[];
1137
+ };
1124
1138
  BadgeOverflowMode: {
1125
1139
  k: string;
1126
1140
  };
@@ -1146,21 +1160,24 @@ export declare const ADAPTABLE_METAMODEL: {
1146
1160
  };
1147
1161
  BadgeStyleDefinition: {
1148
1162
  k: string;
1149
- p: ({
1163
+ p: {
1150
1164
  n: string;
1151
1165
  k: string;
1152
1166
  o: boolean;
1153
1167
  r: string;
1154
- } | {
1155
- n: string;
1156
- k: string;
1157
- o: boolean;
1158
- r?: undefined;
1159
- })[];
1168
+ }[];
1160
1169
  };
1161
1170
  BadgeStylePredicate: {
1162
1171
  k: string;
1163
1172
  };
1173
+ BarChartMarker: {
1174
+ k: string;
1175
+ p: {
1176
+ n: string;
1177
+ k: string;
1178
+ o: boolean;
1179
+ }[];
1180
+ };
1164
1181
  BaseColumnHeaderContext: {
1165
1182
  k: string;
1166
1183
  p: ({
@@ -1246,6 +1263,14 @@ export declare const ADAPTABLE_METAMODEL: {
1246
1263
  k: string;
1247
1264
  }[];
1248
1265
  };
1266
+ BulletChartBarProperties: {
1267
+ k: string;
1268
+ p: {
1269
+ n: string;
1270
+ k: string;
1271
+ o: boolean;
1272
+ }[];
1273
+ };
1249
1274
  BulletChartStyle: {
1250
1275
  k: string;
1251
1276
  p: ({
@@ -1282,13 +1307,19 @@ export declare const ADAPTABLE_METAMODEL: {
1282
1307
  r?: undefined;
1283
1308
  })[];
1284
1309
  };
1285
- BulletChartTargetMarker: {
1310
+ BulletChartTargetProperties: {
1286
1311
  k: string;
1287
- p: {
1312
+ p: ({
1288
1313
  n: string;
1289
1314
  k: string;
1290
1315
  o: boolean;
1291
- }[];
1316
+ r: string;
1317
+ } | {
1318
+ n: string;
1319
+ k: string;
1320
+ o: boolean;
1321
+ r?: undefined;
1322
+ })[];
1292
1323
  };
1293
1324
  ButtonStyle: {
1294
1325
  k: string;
@@ -3370,9 +3401,6 @@ export declare const ADAPTABLE_METAMODEL: {
3370
3401
  IconStyleBuiltInPreset: {
3371
3402
  k: string;
3372
3403
  };
3373
- IconStyleFallback: {
3374
- k: string;
3375
- };
3376
3404
  IconStyleMapping: {
3377
3405
  k: string;
3378
3406
  p: ({
@@ -4153,7 +4181,7 @@ export declare const ADAPTABLE_METAMODEL: {
4153
4181
  RangeBarBound: {
4154
4182
  k: string;
4155
4183
  };
4156
- RangeBarMarker: {
4184
+ RangeBarOutOfRangeProperties: {
4157
4185
  k: string;
4158
4186
  p: {
4159
4187
  n: string;
@@ -4161,6 +4189,20 @@ export declare const ADAPTABLE_METAMODEL: {
4161
4189
  o: boolean;
4162
4190
  }[];
4163
4191
  };
4192
+ RangeBarReferenceProperties: {
4193
+ k: string;
4194
+ p: ({
4195
+ n: string;
4196
+ k: string;
4197
+ o: boolean;
4198
+ r: string;
4199
+ } | {
4200
+ n: string;
4201
+ k: string;
4202
+ r: string;
4203
+ o?: undefined;
4204
+ })[];
4205
+ };
4164
4206
  RangeBarStyle: {
4165
4207
  k: string;
4166
4208
  p: ({
@@ -4180,6 +4222,14 @@ export declare const ADAPTABLE_METAMODEL: {
4180
4222
  o?: undefined;
4181
4223
  })[];
4182
4224
  };
4225
+ RangeBarTrackProperties: {
4226
+ k: string;
4227
+ p: {
4228
+ n: string;
4229
+ k: string;
4230
+ o: boolean;
4231
+ }[];
4232
+ };
4183
4233
  RangeValueType: {
4184
4234
  k: string;
4185
4235
  };
@@ -4593,6 +4643,22 @@ export declare const ADAPTABLE_METAMODEL: {
4593
4643
  k: string;
4594
4644
  }[];
4595
4645
  };
4646
+ SettingsPanelNavigation: {
4647
+ k: string;
4648
+ };
4649
+ SettingsPanelNavigationConfigurer: {
4650
+ k: string;
4651
+ };
4652
+ SettingsPanelNavigationContext: {
4653
+ k: string;
4654
+ };
4655
+ SettingsPanelNavigationGroup: {
4656
+ k: string;
4657
+ p: {
4658
+ n: string;
4659
+ k: string;
4660
+ }[];
4661
+ };
4596
4662
  SettingsPanelOptions: {
4597
4663
  k: string;
4598
4664
  p: ({