@refinitiv-ui/elements 7.10.8 → 7.10.10-next.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 +6 -0
- package/lib/datetime-picker/custom-elements.json +2 -2
- package/lib/datetime-picker/custom-elements.md +1 -1
- package/lib/datetime-picker/index.d.ts +1 -1
- package/lib/datetime-picker/index.js +1 -1
- package/lib/overlay/managers/interaction-lock-manager.js +8 -4
- package/lib/overlay/managers/viewport-manager.js +1 -1
- package/lib/tooltip/elements/tooltip-element.js +1 -1
- package/lib/tooltip/managers/tooltip-manager.js +2 -2
- package/lib/version.js +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [7.10.9](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.10.8...@refinitiv-ui/elements@7.10.9) (2024-04-01)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **tooltip:** handle body removal ([#1126](https://github.com/Refinitiv/refinitiv-ui/issues/1126)) ([1f00360](https://github.com/Refinitiv/refinitiv-ui/commit/1f00360f79c154d41295c0807536cdd0aa13efeb))
|
|
11
|
+
|
|
6
12
|
## [7.10.8](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.10.7...@refinitiv-ui/elements@7.10.8) (2024-03-18)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"name": "format",
|
|
93
|
-
"description": "Set the datetime format\nBased on
|
|
93
|
+
"description": "Set the datetime format\nBased on date-fns formats (https://date-fns.org/)",
|
|
94
94
|
"type": "string",
|
|
95
95
|
"default": "\"dd-MMM-yyyy\""
|
|
96
96
|
},
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
{
|
|
249
249
|
"name": "format",
|
|
250
250
|
"attribute": "format",
|
|
251
|
-
"description": "Set the datetime format\nBased on
|
|
251
|
+
"description": "Set the datetime format\nBased on date-fns formats (https://date-fns.org/)",
|
|
252
252
|
"type": "string",
|
|
253
253
|
"default": "\"dd-MMM-yyyy\""
|
|
254
254
|
},
|
|
@@ -12,7 +12,7 @@ Control to pick date and time
|
|
|
12
12
|
| `error` | `error` | `boolean` | false | Set error state |
|
|
13
13
|
| `filter` | | `DatetimePickerFilter \| null` | null | Custom filter, used for enabling/disabling certain dates |
|
|
14
14
|
| `firstDayOfWeek` | `first-day-of-week` | `number \| undefined` | | Set the first day of the week.<br />0 - for Sunday, 6 - for Saturday |
|
|
15
|
-
| `format` | `format` | `string` | "dd-MMM-yyyy" | Set the datetime format<br />Based on
|
|
15
|
+
| `format` | `format` | `string` | "dd-MMM-yyyy" | Set the datetime format<br />Based on date-fns formats (https://date-fns.org/) |
|
|
16
16
|
| `inputDisabled` | `input-disabled` | `boolean` | false | Disable input part of the picker |
|
|
17
17
|
| `inputTriggerDisabled` | `input-trigger-disabled` | `boolean` | false | Only open picker panel when calendar icon is clicked.<br />Clicking on the input will no longer open the picker. |
|
|
18
18
|
| `max` | `max` | `string` | "" | Set maximum date |
|
|
@@ -162,7 +162,7 @@ export declare class DatetimePicker extends FormFieldElement implements MultiVal
|
|
|
162
162
|
private _format;
|
|
163
163
|
/**
|
|
164
164
|
* Set the datetime format
|
|
165
|
-
* Based on
|
|
165
|
+
* Based on date-fns formats (https://date-fns.org/)
|
|
166
166
|
* @param format Date format
|
|
167
167
|
* @default dd-MMM-yyyy
|
|
168
168
|
*/
|
|
@@ -263,7 +263,7 @@ let DatetimePicker = class DatetimePicker extends FormFieldElement {
|
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
265
|
* Set the datetime format
|
|
266
|
-
* Based on
|
|
266
|
+
* Based on date-fns formats (https://date-fns.org/)
|
|
267
267
|
* @param format Date format
|
|
268
268
|
* @default dd-MMM-yyyy
|
|
269
269
|
*/
|
|
@@ -196,8 +196,8 @@ export class ScrollLockManager {
|
|
|
196
196
|
}
|
|
197
197
|
else {
|
|
198
198
|
// Since we don't know if is the body or html, get max.
|
|
199
|
-
this.scrollTop = Math.max(document.documentElement.scrollTop, document.body
|
|
200
|
-
this.scrollLeft = Math.max(document.documentElement.scrollLeft, document.body
|
|
199
|
+
this.scrollTop = Math.max(document.documentElement.scrollTop, document.body?.scrollTop ?? 0);
|
|
200
|
+
this.scrollLeft = Math.max(document.documentElement.scrollLeft, document.body?.scrollLeft ?? 0);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
@@ -211,8 +211,12 @@ export class ScrollLockManager {
|
|
|
211
211
|
}
|
|
212
212
|
else {
|
|
213
213
|
// Since we don't know if is the body or html, set both.
|
|
214
|
-
document.documentElement.scrollTop =
|
|
215
|
-
document.documentElement.scrollLeft =
|
|
214
|
+
document.documentElement.scrollTop = this.scrollTop;
|
|
215
|
+
document.documentElement.scrollLeft = this.scrollTop;
|
|
216
|
+
if (document.body) {
|
|
217
|
+
document.body.scrollTop = this.scrollTop;
|
|
218
|
+
document.body.scrollLeft = this.scrollLeft;
|
|
219
|
+
}
|
|
216
220
|
}
|
|
217
221
|
}
|
|
218
222
|
/**
|
|
@@ -97,7 +97,7 @@ export class ViewportManager {
|
|
|
97
97
|
// @ts-ignore
|
|
98
98
|
// TODO: Remove @ts-ignore and re-test again when standardized zoom is implemented across major browsers and TypeScript, https://github.com/w3c/csswg-drafts/issues/5623
|
|
99
99
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
100
|
-
const zoom = parseFloat(window.getComputedStyle(document.body).zoom);
|
|
100
|
+
const zoom = document.body ? parseFloat(window.getComputedStyle(document.body).zoom) : 1;
|
|
101
101
|
const screenHeight = screenRect.height / zoom;
|
|
102
102
|
const screenWidth = screenRect.width / zoom;
|
|
103
103
|
const { top, left, bottom, right } = viewport.getBoundingClientRect();
|
|
@@ -42,7 +42,7 @@ tooltipElement.setAttribute('ref', 'title-override');
|
|
|
42
42
|
tooltipElement.condition = condition;
|
|
43
43
|
tooltipElement.renderer = renderer;
|
|
44
44
|
const appendTitleTooltip = () => {
|
|
45
|
-
document.body
|
|
45
|
+
document.body?.appendChild(tooltipElement);
|
|
46
46
|
};
|
|
47
47
|
if (document.body) {
|
|
48
48
|
appendTitleTooltip();
|
|
@@ -96,7 +96,7 @@ class TooltipManager {
|
|
|
96
96
|
document.addEventListener('mouseleave', this.onMouseLeave, eventOptions);
|
|
97
97
|
document.addEventListener('wheel', this.onWheel, eventOptions);
|
|
98
98
|
document.addEventListener('keydown', this.onKeyDown, eventOptions);
|
|
99
|
-
document.body
|
|
99
|
+
document.body?.addEventListener('blur', this.onBlur, eventOptions);
|
|
100
100
|
const clickEventOptions = { passive: true, capture: true };
|
|
101
101
|
document.addEventListener('click', this.onClick, clickEventOptions);
|
|
102
102
|
document.addEventListener('contextmenu', this.onClick, clickEventOptions);
|
|
@@ -111,7 +111,7 @@ class TooltipManager {
|
|
|
111
111
|
document.removeEventListener('mouseleave', this.onMouseLeave);
|
|
112
112
|
document.removeEventListener('wheel', this.onWheel);
|
|
113
113
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
114
|
-
document.body
|
|
114
|
+
document.body?.removeEventListener('blur', this.onBlur);
|
|
115
115
|
document.removeEventListener('click', this.onClick, true);
|
|
116
116
|
document.removeEventListener('contextmenu', this.onClick, true);
|
|
117
117
|
}
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.10.
|
|
1
|
+
export const VERSION = '7.10.10-next.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "7.10.
|
|
3
|
+
"version": "7.10.10-next.0",
|
|
4
4
|
"description": "Element Framework Elements",
|
|
5
5
|
"author": "LSEG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -353,25 +353,25 @@
|
|
|
353
353
|
"tslib": "^2.3.1"
|
|
354
354
|
},
|
|
355
355
|
"devDependencies": {
|
|
356
|
-
"@refinitiv-ui/core": "^7.4.
|
|
357
|
-
"@refinitiv-ui/demo-block": "^7.1.
|
|
358
|
-
"@refinitiv-ui/i18n": "^7.1.
|
|
356
|
+
"@refinitiv-ui/core": "^7.4.2-next.0",
|
|
357
|
+
"@refinitiv-ui/demo-block": "^7.1.9-next.0",
|
|
358
|
+
"@refinitiv-ui/i18n": "^7.1.4-next.0",
|
|
359
359
|
"@refinitiv-ui/phrasebook": "^7.1.1",
|
|
360
|
-
"@refinitiv-ui/test-helpers": "^7.1.0",
|
|
361
|
-
"@refinitiv-ui/translate": "^7.1.
|
|
360
|
+
"@refinitiv-ui/test-helpers": "^7.1.1-next.0",
|
|
361
|
+
"@refinitiv-ui/translate": "^7.1.6-next.0",
|
|
362
362
|
"@refinitiv-ui/utils": "^7.2.0",
|
|
363
363
|
"@types/d3-interpolate": "^3.0.1"
|
|
364
364
|
},
|
|
365
365
|
"peerDependencies": {
|
|
366
366
|
"@refinitiv-ui/browser-sparkline": "^1.0.0 || ^2.0.0",
|
|
367
|
-
"@refinitiv-ui/core": "^7.4.
|
|
368
|
-
"@refinitiv-ui/i18n": "^7.1.
|
|
367
|
+
"@refinitiv-ui/core": "^7.4.2-next.0",
|
|
368
|
+
"@refinitiv-ui/i18n": "^7.1.4-next.0",
|
|
369
369
|
"@refinitiv-ui/phrasebook": "^7.1.1",
|
|
370
|
-
"@refinitiv-ui/translate": "^7.1.
|
|
370
|
+
"@refinitiv-ui/translate": "^7.1.6-next.0",
|
|
371
371
|
"@refinitiv-ui/utils": "^7.2.0"
|
|
372
372
|
},
|
|
373
373
|
"publishConfig": {
|
|
374
374
|
"access": "public"
|
|
375
375
|
},
|
|
376
|
-
"gitHead": "
|
|
376
|
+
"gitHead": "228961c31f52a5f01f1a12396f94682b7840f290"
|
|
377
377
|
}
|