@refinitiv-ui/elements 6.16.3 → 6.16.4
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 +4 -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/viewport-manager.js +11 -8
- package/lib/version.js +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.16.4](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.16.3...@refinitiv-ui/elements@6.16.4) (2024-05-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @refinitiv-ui/elements
|
|
9
|
+
|
|
6
10
|
## [6.16.3](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.16.2...@refinitiv-ui/elements@6.16.3) (2024-04-01)
|
|
7
11
|
|
|
8
12
|
### 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
|
*/
|
|
@@ -264,7 +264,7 @@ let DatetimePicker = class DatetimePicker extends FormFieldElement {
|
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
* Set the datetime format
|
|
267
|
-
* Based on
|
|
267
|
+
* Based on date-fns formats (https://date-fns.org/)
|
|
268
268
|
* @param format Date format
|
|
269
269
|
* @default dd-MMM-yyyy
|
|
270
270
|
*/
|
|
@@ -87,14 +87,17 @@ export class ViewportManager {
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
const screenRect = this.screenViewport.getBoundingClientRect();
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
/**
|
|
91
|
+
* since screenViewport is applied on html element, it does not include body zoom.
|
|
92
|
+
* Zoom is a legacy feature and must not be used by any means.
|
|
93
|
+
* Kept here for compatibility with old apps.
|
|
94
|
+
*
|
|
95
|
+
* TODO: re-visit once the standardized zoom is implemented across major browsers.
|
|
96
|
+
* https://github.com/w3c/csswg-drafts/issues/5623
|
|
97
|
+
*/
|
|
98
|
+
const zoom = document.body
|
|
99
|
+
? parseFloat(window.getComputedStyle(document.body).getPropertyValue('zoom')) || 1
|
|
100
|
+
: 1;
|
|
98
101
|
const screenHeight = screenRect.height / zoom;
|
|
99
102
|
const screenWidth = screenRect.width / zoom;
|
|
100
103
|
const { top, left, bottom, right } = viewport.getBoundingClientRect();
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.16.
|
|
1
|
+
export const VERSION = '6.16.4';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "6.16.
|
|
3
|
+
"version": "6.16.4",
|
|
4
4
|
"description": "Element Framework Elements",
|
|
5
5
|
"author": "LSEG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -350,25 +350,25 @@
|
|
|
350
350
|
"tslib": "^2.3.1"
|
|
351
351
|
},
|
|
352
352
|
"devDependencies": {
|
|
353
|
-
"@refinitiv-ui/core": "^6.5.
|
|
354
|
-
"@refinitiv-ui/demo-block": "^6.1.
|
|
353
|
+
"@refinitiv-ui/core": "^6.5.7",
|
|
354
|
+
"@refinitiv-ui/demo-block": "^6.1.24",
|
|
355
355
|
"@refinitiv-ui/i18n": "^6.0.21",
|
|
356
356
|
"@refinitiv-ui/phrasebook": "^6.3.9",
|
|
357
357
|
"@refinitiv-ui/test-helpers": "^6.0.15",
|
|
358
|
-
"@refinitiv-ui/translate": "^6.0.
|
|
358
|
+
"@refinitiv-ui/translate": "^6.0.34",
|
|
359
359
|
"@refinitiv-ui/utils": "^6.3.2",
|
|
360
360
|
"@types/d3-interpolate": "^3.0.1"
|
|
361
361
|
},
|
|
362
362
|
"peerDependencies": {
|
|
363
363
|
"@refinitiv-ui/browser-sparkline": "^1.0.0 || ^2.0.0",
|
|
364
|
-
"@refinitiv-ui/core": "^6.5.
|
|
364
|
+
"@refinitiv-ui/core": "^6.5.7",
|
|
365
365
|
"@refinitiv-ui/i18n": "^6.0.21",
|
|
366
366
|
"@refinitiv-ui/phrasebook": "^6.3.9",
|
|
367
|
-
"@refinitiv-ui/translate": "^6.0.
|
|
367
|
+
"@refinitiv-ui/translate": "^6.0.34",
|
|
368
368
|
"@refinitiv-ui/utils": "^6.3.2"
|
|
369
369
|
},
|
|
370
370
|
"publishConfig": {
|
|
371
371
|
"access": "public"
|
|
372
372
|
},
|
|
373
|
-
"gitHead": "
|
|
373
|
+
"gitHead": "0cece155c02c4202e0258b671c486f844b43100b"
|
|
374
374
|
}
|