@refinitiv-ui/elements 6.12.0 → 6.13.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/CHANGELOG.md +11 -0
- package/lib/calendar/constants.d.ts +1 -1
- package/lib/calendar/constants.js +7 -6
- package/lib/calendar/custom-elements.json +4 -0
- package/lib/calendar/custom-elements.md +5 -4
- package/lib/calendar/index.d.ts +13 -3
- package/lib/calendar/index.js +52 -29
- package/lib/calendar/types.d.ts +21 -2
- package/lib/calendar/utils.d.ts +9 -1
- package/lib/calendar/utils.js +24 -1
- package/lib/interactive-chart/index.js +1 -0
- package/lib/tree-select/index.js +1 -2
- package/lib/version.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [6.13.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.12.0...@refinitiv-ui/elements@6.13.0) (2023-09-25)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **interactive-chart:** legend not update when add new seriesList ([#959](https://github.com/Refinitiv/refinitiv-ui/issues/959)) ([215a6ba](https://github.com/Refinitiv/refinitiv-ui/commit/215a6badbd24dae46d631150b1bdb945e633c080))
|
|
11
|
+
- **tree-select:** show invalid values when click on cancel button on … ([#965](https://github.com/Refinitiv/refinitiv-ui/issues/965)) ([a3abd4f](https://github.com/Refinitiv/refinitiv-ui/commit/a3abd4f543dd0662129c9656a8bd2be40c954bd9))
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- **calendar:** introduce before-cell-render event ([#950](https://github.com/Refinitiv/refinitiv-ui/issues/950)) ([7889413](https://github.com/Refinitiv/refinitiv-ui/commit/7889413d4dbf690fab5c3a3fd8c526ba25fb1dbe))
|
|
16
|
+
|
|
6
17
|
# [6.12.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.11.0...@refinitiv-ui/elements@6.12.0) (2023-09-18)
|
|
7
18
|
|
|
8
19
|
### Bug Fixes
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { uuid } from '@refinitiv-ui/utils/uuid.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
// public API
|
|
3
|
+
export var CalendarRenderView;
|
|
4
|
+
(function (CalendarRenderView) {
|
|
5
|
+
CalendarRenderView["DAY"] = "day";
|
|
6
|
+
CalendarRenderView["MONTH"] = "month";
|
|
7
|
+
CalendarRenderView["YEAR"] = "year";
|
|
8
|
+
})(CalendarRenderView || (CalendarRenderView = {}));
|
|
8
9
|
export const FIRST_DAY_OF_WEEK = 0; // 0 for Sunday
|
|
9
10
|
export const YEARS_PER_YEAR_VIEW = 16; /* must be a square number */
|
|
10
11
|
export const DAY_VIEW = {
|
|
@@ -181,6 +181,10 @@
|
|
|
181
181
|
}
|
|
182
182
|
],
|
|
183
183
|
"events": [
|
|
184
|
+
{
|
|
185
|
+
"name": "before-cell-render",
|
|
186
|
+
"description": "Fired before calendar renders each cell along with `cell` model."
|
|
187
|
+
},
|
|
184
188
|
{
|
|
185
189
|
"name": "value-changed",
|
|
186
190
|
"description": "Fired when the user commits a date change. The event is not triggered if `value` is changed programmatically."
|
|
@@ -23,10 +23,11 @@ Standard calendar element
|
|
|
23
23
|
|
|
24
24
|
## Events
|
|
25
25
|
|
|
26
|
-
| Event
|
|
27
|
-
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
26
|
+
| Event | Description |
|
|
27
|
+
|----------------------|--------------------------------------------------|
|
|
28
|
+
| `before-cell-render` | Fired before calendar renders each cell along with `cell` model. |
|
|
29
|
+
| `value-changed` | Fired when the user commits a date change. The event is not triggered if `value` is changed programmatically. |
|
|
30
|
+
| `view-changed` | Fired when the user changes a view of calendar e.g. changed to next month page. The event is not triggered if `view` property is changed programmatically. |
|
|
30
31
|
|
|
31
32
|
## Slots
|
|
32
33
|
|
package/lib/calendar/index.d.ts
CHANGED
|
@@ -3,12 +3,16 @@ import { CSSResultGroup, ControlElement, MultiValue, PropertyValues, TemplateRes
|
|
|
3
3
|
import '@refinitiv-ui/phrasebook/locale/en/calendar.js';
|
|
4
4
|
import { TranslateDirective, TranslatePromise } from '@refinitiv-ui/translate';
|
|
5
5
|
import '../button/index.js';
|
|
6
|
+
import { CalendarRenderView } from './constants.js';
|
|
6
7
|
import './locales.js';
|
|
7
|
-
import type { CalendarFilter } from './types';
|
|
8
|
-
export {
|
|
8
|
+
import type { BeforeCellRenderEvent, CalendarFilter } from './types';
|
|
9
|
+
export { CalendarRenderView };
|
|
10
|
+
export type { CalendarCell } from './types';
|
|
11
|
+
export type { CalendarFilter, BeforeCellRenderEvent };
|
|
9
12
|
/**
|
|
10
13
|
* Standard calendar element
|
|
11
14
|
*
|
|
15
|
+
* @fires before-cell-render - Fired before calendar renders each cell along with `cell` model.
|
|
12
16
|
* @fires value-changed - Fired when the user commits a date change. The event is not triggered if `value` is changed programmatically.
|
|
13
17
|
* @fires view-changed - Fired when the user changes a view of calendar e.g. changed to next month page. The event is not triggered if `view` property is changed programmatically.
|
|
14
18
|
*
|
|
@@ -381,9 +385,15 @@ export declare class Calendar extends ControlElement implements MultiValue {
|
|
|
381
385
|
* @returns key Translate label key
|
|
382
386
|
*/
|
|
383
387
|
private getCellLabelKey;
|
|
388
|
+
/**
|
|
389
|
+
* fire 'before-cell-render' event
|
|
390
|
+
* @param cell Cell
|
|
391
|
+
* @returns {void}
|
|
392
|
+
*/
|
|
393
|
+
private dispatchBeforeCellRender;
|
|
384
394
|
/**
|
|
385
395
|
* Render cell template. Cell can be a day, month or year
|
|
386
|
-
* @param cell Cell
|
|
396
|
+
* @param cell Cell
|
|
387
397
|
* @returns template result
|
|
388
398
|
*/
|
|
389
399
|
private renderCell;
|
package/lib/calendar/index.js
CHANGED
|
@@ -13,12 +13,14 @@ import { DateFormat, addMonths, format, isAfter, isBefore, isSameDay, isSameMont
|
|
|
13
13
|
import { down, first, last, left, right, up } from '@refinitiv-ui/utils/navigation.js';
|
|
14
14
|
import '../button/index.js';
|
|
15
15
|
import { VERSION } from '../version.js';
|
|
16
|
-
import { CalendarLocaleScope, DAY_VIEW, FIRST_DAY_OF_WEEK, MONTH_VIEW,
|
|
16
|
+
import { CalendarLocaleScope, CalendarRenderView, DAY_VIEW, FIRST_DAY_OF_WEEK, MONTH_VIEW, YEARS_PER_YEAR_VIEW, YEAR_VIEW } from './constants.js';
|
|
17
17
|
import './locales.js';
|
|
18
|
-
import { ViewFormatTranslateParams, formatLocaleDate, monthInfo, monthsNames, weekdaysNames } from './utils.js';
|
|
18
|
+
import { ViewFormatTranslateParams, formatLocaleDate, monthInfo, monthsNames, toCalendarCell, weekdaysNames } from './utils.js';
|
|
19
|
+
export { CalendarRenderView };
|
|
19
20
|
/**
|
|
20
21
|
* Standard calendar element
|
|
21
22
|
*
|
|
23
|
+
* @fires before-cell-render - Fired before calendar renders each cell along with `cell` model.
|
|
22
24
|
* @fires value-changed - Fired when the user commits a date change. The event is not triggered if `value` is changed programmatically.
|
|
23
25
|
* @fires view-changed - Fired when the user changes a view of calendar e.g. changed to next month page. The event is not triggered if `view` property is changed programmatically.
|
|
24
26
|
*
|
|
@@ -73,7 +75,7 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
73
75
|
/**
|
|
74
76
|
* Used for internal navigation between render views
|
|
75
77
|
*/
|
|
76
|
-
this._renderView =
|
|
78
|
+
this._renderView = CalendarRenderView.DAY;
|
|
77
79
|
/**
|
|
78
80
|
* Used for keyboard navigation when trying
|
|
79
81
|
* to restore focus on re-render and control navigation
|
|
@@ -579,7 +581,8 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
579
581
|
*/
|
|
580
582
|
onRenderViewTap(event) {
|
|
581
583
|
if (!event.defaultPrevented) {
|
|
582
|
-
this.renderView =
|
|
584
|
+
this.renderView =
|
|
585
|
+
this.renderView === CalendarRenderView.DAY ? CalendarRenderView.YEAR : CalendarRenderView.DAY;
|
|
583
586
|
}
|
|
584
587
|
}
|
|
585
588
|
/**
|
|
@@ -594,8 +597,8 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
594
597
|
switch (event.key) {
|
|
595
598
|
case 'Esc':
|
|
596
599
|
case 'Escape':
|
|
597
|
-
if (this.renderView ===
|
|
598
|
-
this.renderView =
|
|
600
|
+
if (this.renderView === CalendarRenderView.YEAR || this.renderView === CalendarRenderView.MONTH) {
|
|
601
|
+
this.renderView = CalendarRenderView.DAY;
|
|
599
602
|
break;
|
|
600
603
|
}
|
|
601
604
|
return;
|
|
@@ -662,20 +665,20 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
662
665
|
this.activeCellIndex = cell.index;
|
|
663
666
|
const cellSegment = toDateSegment(cell.value);
|
|
664
667
|
const viewSegment = toDateSegment(this.view);
|
|
665
|
-
if (this.renderView ===
|
|
668
|
+
if (this.renderView === CalendarRenderView.YEAR) {
|
|
666
669
|
/* YEAR -> MONTH */
|
|
667
670
|
viewSegment.year = cellSegment.year;
|
|
668
671
|
if (this.notifyViewChange(viewSegment)) {
|
|
669
|
-
this.renderView =
|
|
672
|
+
this.renderView = CalendarRenderView.MONTH;
|
|
670
673
|
}
|
|
671
674
|
return;
|
|
672
675
|
}
|
|
673
|
-
if (this.renderView ===
|
|
676
|
+
if (this.renderView === CalendarRenderView.MONTH) {
|
|
674
677
|
/* MONTH -> DAY */
|
|
675
678
|
viewSegment.year = cellSegment.year;
|
|
676
679
|
viewSegment.month = cellSegment.month;
|
|
677
680
|
if (this.notifyViewChange(viewSegment)) {
|
|
678
|
-
this.renderView =
|
|
681
|
+
this.renderView = CalendarRenderView.DAY;
|
|
679
682
|
}
|
|
680
683
|
return;
|
|
681
684
|
}
|
|
@@ -759,13 +762,13 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
759
762
|
toNextView() {
|
|
760
763
|
let viewSegment = toDateSegment(this.view);
|
|
761
764
|
switch (this.renderView) {
|
|
762
|
-
case
|
|
765
|
+
case CalendarRenderView.DAY:
|
|
763
766
|
viewSegment = toDateSegment(addMonths(this.view, 1));
|
|
764
767
|
break;
|
|
765
|
-
case
|
|
768
|
+
case CalendarRenderView.MONTH:
|
|
766
769
|
viewSegment.year += 1;
|
|
767
770
|
break;
|
|
768
|
-
case
|
|
771
|
+
case CalendarRenderView.YEAR:
|
|
769
772
|
viewSegment.year += YEARS_PER_YEAR_VIEW;
|
|
770
773
|
break;
|
|
771
774
|
// no default
|
|
@@ -779,13 +782,13 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
779
782
|
toPreviousView() {
|
|
780
783
|
let viewSegment = toDateSegment(this.view);
|
|
781
784
|
switch (this.renderView) {
|
|
782
|
-
case
|
|
785
|
+
case CalendarRenderView.DAY:
|
|
783
786
|
viewSegment = toDateSegment(subMonths(this.view, 1));
|
|
784
787
|
break;
|
|
785
|
-
case
|
|
788
|
+
case CalendarRenderView.MONTH:
|
|
786
789
|
viewSegment.year -= 1;
|
|
787
790
|
break;
|
|
788
|
-
case
|
|
791
|
+
case CalendarRenderView.YEAR:
|
|
789
792
|
viewSegment.year -= YEARS_PER_YEAR_VIEW;
|
|
790
793
|
break;
|
|
791
794
|
// no default
|
|
@@ -886,9 +889,9 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
886
889
|
get formattedViewRender() {
|
|
887
890
|
const segment = toDateSegment(this.view);
|
|
888
891
|
switch (this.renderView) {
|
|
889
|
-
case
|
|
892
|
+
case CalendarRenderView.MONTH:
|
|
890
893
|
return this.viewFormattedDate(segment);
|
|
891
|
-
case
|
|
894
|
+
case CalendarRenderView.YEAR:
|
|
892
895
|
const month = segment.month;
|
|
893
896
|
const day = segment.day;
|
|
894
897
|
const fromYear = Math.floor(segment.year / YEARS_PER_YEAR_VIEW) * YEARS_PER_YEAR_VIEW;
|
|
@@ -896,7 +899,7 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
896
899
|
const fromView = this.viewFormattedDate({ year: fromYear, month, day });
|
|
897
900
|
const toView = this.viewFormattedDate({ year: toYear, month, day });
|
|
898
901
|
return html `${fromView} - ${toView}`;
|
|
899
|
-
case
|
|
902
|
+
case CalendarRenderView.DAY:
|
|
900
903
|
default:
|
|
901
904
|
return this.viewFormattedDate(segment, true);
|
|
902
905
|
}
|
|
@@ -950,7 +953,7 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
950
953
|
* Get year view template
|
|
951
954
|
*/
|
|
952
955
|
get yearView() {
|
|
953
|
-
const view =
|
|
956
|
+
const view = CalendarRenderView.YEAR;
|
|
954
957
|
const currentYear = toDateSegment(this.view).year;
|
|
955
958
|
const startIdx = Math.floor(currentYear / YEARS_PER_YEAR_VIEW) * YEARS_PER_YEAR_VIEW;
|
|
956
959
|
const years = [];
|
|
@@ -985,7 +988,7 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
985
988
|
* Get month view template
|
|
986
989
|
*/
|
|
987
990
|
get monthView() {
|
|
988
|
-
const view =
|
|
991
|
+
const view = CalendarRenderView.MONTH;
|
|
989
992
|
const currentYear = toDateSegment(this.view).year;
|
|
990
993
|
const columnCount = MONTH_VIEW.columnCount;
|
|
991
994
|
const monthCount = 12;
|
|
@@ -1030,7 +1033,7 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
1030
1033
|
* Get day view template
|
|
1031
1034
|
*/
|
|
1032
1035
|
get dayView() {
|
|
1033
|
-
const view =
|
|
1036
|
+
const view = CalendarRenderView.DAY;
|
|
1034
1037
|
const firstDayOfWeek = this.firstDayOfWeek;
|
|
1035
1038
|
const padding = (7 + utcParse(this.view).getUTCDay() - firstDayOfWeek) % 7;
|
|
1036
1039
|
const viewMonth = monthInfo(this.view);
|
|
@@ -1123,13 +1126,13 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
1123
1126
|
get viewRender() {
|
|
1124
1127
|
let renderView;
|
|
1125
1128
|
switch (this.renderView) {
|
|
1126
|
-
case
|
|
1129
|
+
case CalendarRenderView.MONTH:
|
|
1127
1130
|
renderView = this.monthView;
|
|
1128
1131
|
break;
|
|
1129
|
-
case
|
|
1132
|
+
case CalendarRenderView.YEAR:
|
|
1130
1133
|
renderView = this.yearView;
|
|
1131
1134
|
break;
|
|
1132
|
-
case
|
|
1135
|
+
case CalendarRenderView.DAY:
|
|
1133
1136
|
default:
|
|
1134
1137
|
renderView = this.dayView;
|
|
1135
1138
|
}
|
|
@@ -1152,12 +1155,32 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
1152
1155
|
}
|
|
1153
1156
|
return 'CELL_LABEL';
|
|
1154
1157
|
}
|
|
1158
|
+
/**
|
|
1159
|
+
* fire 'before-cell-render' event
|
|
1160
|
+
* @param cell Cell
|
|
1161
|
+
* @returns {void}
|
|
1162
|
+
*/
|
|
1163
|
+
dispatchBeforeCellRender(cell) {
|
|
1164
|
+
const calendarCell = toCalendarCell(cell);
|
|
1165
|
+
const event = new CustomEvent('before-cell-render', {
|
|
1166
|
+
cancelable: false,
|
|
1167
|
+
composed: true,
|
|
1168
|
+
detail: {
|
|
1169
|
+
cell: calendarCell
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
this.dispatchEvent(event);
|
|
1173
|
+
}
|
|
1155
1174
|
/**
|
|
1156
1175
|
* Render cell template. Cell can be a day, month or year
|
|
1157
|
-
* @param cell Cell
|
|
1176
|
+
* @param cell Cell
|
|
1158
1177
|
* @returns template result
|
|
1159
1178
|
*/
|
|
1160
1179
|
renderCell(cell) {
|
|
1180
|
+
// there is no slot for cells with falsy value
|
|
1181
|
+
if (cell.value) {
|
|
1182
|
+
this.dispatchBeforeCellRender(cell);
|
|
1183
|
+
}
|
|
1161
1184
|
const isSelection = cell.value !== undefined;
|
|
1162
1185
|
const isSelectable = isSelection && !cell.disabled;
|
|
1163
1186
|
const isSelected = cell.selected ? 'true' : 'false';
|
|
@@ -1214,12 +1237,12 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
1214
1237
|
let nextBtnAriaLabel = this.t('NEXT_MONTH');
|
|
1215
1238
|
let viewBtnAriaLabel = this.t('YEAR_SELECTOR');
|
|
1216
1239
|
switch (this.renderView) {
|
|
1217
|
-
case
|
|
1240
|
+
case CalendarRenderView.YEAR:
|
|
1218
1241
|
prevBtnAriaLabel = this.t('PREVIOUS_DECADE');
|
|
1219
1242
|
nextBtnAriaLabel = this.t('NEXT_DECADE');
|
|
1220
1243
|
viewBtnAriaLabel = this.t('DATE_SELECTOR');
|
|
1221
1244
|
break;
|
|
1222
|
-
case
|
|
1245
|
+
case CalendarRenderView.MONTH:
|
|
1223
1246
|
prevBtnAriaLabel = this.t('PREVIOUS_YEAR');
|
|
1224
1247
|
nextBtnAriaLabel = this.t('NEXT_YEAR');
|
|
1225
1248
|
viewBtnAriaLabel = this.t('DATE_SELECTOR');
|
|
@@ -1239,7 +1262,7 @@ let Calendar = class Calendar extends ControlElement {
|
|
|
1239
1262
|
aria-description="${viewBtnAriaLabel}"
|
|
1240
1263
|
part="btn-view"
|
|
1241
1264
|
textpos="before"
|
|
1242
|
-
.icon="${this.renderView ===
|
|
1265
|
+
.icon="${this.renderView === CalendarRenderView.DAY ? 'down' : 'up'}"
|
|
1243
1266
|
@tap="${this.onRenderViewTap}"
|
|
1244
1267
|
>${this.formattedViewRender}</ef-button
|
|
1245
1268
|
>
|
package/lib/calendar/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CellIndex } from '@refinitiv-ui/utils/navigation.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CalendarRenderView } from './constants.js';
|
|
3
3
|
export interface CellSelectionModel {
|
|
4
4
|
selected?: boolean;
|
|
5
5
|
range?: boolean;
|
|
@@ -9,7 +9,7 @@ export interface CellSelectionModel {
|
|
|
9
9
|
lastDate?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface Cell extends CellSelectionModel {
|
|
12
|
-
view:
|
|
12
|
+
view: CalendarRenderView;
|
|
13
13
|
text?: string;
|
|
14
14
|
active?: boolean;
|
|
15
15
|
value?: string;
|
|
@@ -30,3 +30,22 @@ export type WeekdayName = {
|
|
|
30
30
|
narrow: string;
|
|
31
31
|
long: string;
|
|
32
32
|
};
|
|
33
|
+
export type CalendarCell = {
|
|
34
|
+
active: boolean;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
firstDate: boolean;
|
|
37
|
+
idle: boolean;
|
|
38
|
+
index: CellIndex;
|
|
39
|
+
lastDate: boolean;
|
|
40
|
+
now: boolean;
|
|
41
|
+
range: boolean;
|
|
42
|
+
rangeFrom: boolean;
|
|
43
|
+
rangeTo: boolean;
|
|
44
|
+
selected: boolean;
|
|
45
|
+
text: string;
|
|
46
|
+
value: string;
|
|
47
|
+
view: CalendarRenderView;
|
|
48
|
+
};
|
|
49
|
+
export type BeforeCellRenderEvent = CustomEvent<{
|
|
50
|
+
cell: CalendarCell;
|
|
51
|
+
}>;
|
package/lib/calendar/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TranslateParams } from '@refinitiv-ui/i18n';
|
|
2
|
+
import { CalendarCell, Cell } from './types.js';
|
|
2
3
|
export type MonthInfo = {
|
|
3
4
|
days: number;
|
|
4
5
|
month: number;
|
|
@@ -39,4 +40,11 @@ declare const formatLocaleDate: (date: Date, locale: string, includeMonth?: bool
|
|
|
39
40
|
* Used to format views
|
|
40
41
|
*/
|
|
41
42
|
declare const ViewFormatTranslateParams: TranslateParams;
|
|
42
|
-
|
|
43
|
+
/**
|
|
44
|
+
* convert internal Cell to CellModel
|
|
45
|
+
* avoid introducing breaking changes to the API
|
|
46
|
+
* @param cell Cell
|
|
47
|
+
* @returns CellModel
|
|
48
|
+
*/
|
|
49
|
+
declare const toCalendarCell: (cell: Cell) => CalendarCell;
|
|
50
|
+
export { monthInfo, weekdaysNames, monthsNames, formatLocaleDate, toCalendarCell, ViewFormatTranslateParams };
|
package/lib/calendar/utils.js
CHANGED
|
@@ -117,4 +117,27 @@ const ViewFormatTranslateParams = {
|
|
|
117
117
|
},
|
|
118
118
|
formats: DateMessageFormats
|
|
119
119
|
};
|
|
120
|
-
|
|
120
|
+
/**
|
|
121
|
+
* convert internal Cell to CellModel
|
|
122
|
+
* avoid introducing breaking changes to the API
|
|
123
|
+
* @param cell Cell
|
|
124
|
+
* @returns CellModel
|
|
125
|
+
*/
|
|
126
|
+
const toCalendarCell = (cell) => {
|
|
127
|
+
return {
|
|
128
|
+
...cell,
|
|
129
|
+
active: cell.active || false,
|
|
130
|
+
disabled: cell.disabled || false,
|
|
131
|
+
firstDate: cell.firstDate || false,
|
|
132
|
+
idle: cell.idle || false,
|
|
133
|
+
lastDate: cell.lastDate || false,
|
|
134
|
+
now: cell.now || false,
|
|
135
|
+
range: cell.range || false,
|
|
136
|
+
rangeFrom: cell.rangeFrom || false,
|
|
137
|
+
rangeTo: cell.rangeTo || false,
|
|
138
|
+
selected: cell.selected || false,
|
|
139
|
+
text: cell.text ?? '',
|
|
140
|
+
value: cell.value ?? ''
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export { monthInfo, weekdaysNames, monthsNames, formatLocaleDate, toCalendarCell, ViewFormatTranslateParams };
|
|
@@ -980,6 +980,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
980
980
|
const dataSet = series.data || [];
|
|
981
981
|
const latestData = dataSet[dataSet.length - 1];
|
|
982
982
|
if (latestData) {
|
|
983
|
+
this.hasDataPoint = dataSet.length > 0;
|
|
983
984
|
const value = chartType === 'bar' || chartType === 'candlestick' ? latestData : latestData.value; // latestData
|
|
984
985
|
const priceColor = this.getColorInSeries(latestData, chartType, idx);
|
|
985
986
|
// Render legend by series type
|
package/lib/tree-select/index.js
CHANGED
|
@@ -539,9 +539,8 @@ let TreeSelect = class TreeSelect extends ComboBox {
|
|
|
539
539
|
*/
|
|
540
540
|
onPopupClosed() {
|
|
541
541
|
super.onPopupClosed();
|
|
542
|
-
this.
|
|
542
|
+
this.exitEditSelection(); // selection filter should be removed before reverting modified selection
|
|
543
543
|
this.revertModifiedSelection();
|
|
544
|
-
this.exitEditSelection();
|
|
545
544
|
}
|
|
546
545
|
/**
|
|
547
546
|
* Filter the internal items by query. Changes items' hidden state.
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.13.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.13.0",
|
|
4
4
|
"description": "Element Framework Elements",
|
|
5
5
|
"author": "LSEG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -369,5 +369,5 @@
|
|
|
369
369
|
"publishConfig": {
|
|
370
370
|
"access": "public"
|
|
371
371
|
},
|
|
372
|
-
"gitHead": "
|
|
372
|
+
"gitHead": "55ebf6e2b7bc388fe8cbc4fb48e16314af3942cb"
|
|
373
373
|
}
|