@nxgt/material-vue 0.25.0 → 0.25.1
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/docs/roadmap.md +18 -16
- package/docs/troubleshooting.md +31 -1
- package/package.json +2 -2
package/docs/roadmap.md
CHANGED
|
@@ -6,22 +6,7 @@ the version something shipped in.
|
|
|
6
6
|
|
|
7
7
|
## Now
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
field, as chips when several, with an optional filter that keeps each match
|
|
11
|
-
under its ancestors (`TreeSelectField`, `TreeSelectFormField`).
|
|
12
|
-
- **The same options as `@nxgt/material`** — a generic `Autocomplete` and
|
|
13
|
-
`FilesFormField` typed by your items, a `ConfirmationDialog` that holds a
|
|
14
|
-
form, date fields that disable chosen days, `SliderField` ticks and
|
|
15
|
-
leading/trailing content, a presence status on `Avatar`, a logo slot on the
|
|
16
|
-
QR code, slots on `AccordionCard`, an option slot on `SelectField`, Monaco's
|
|
17
|
-
own options on `CodeEditor` and a line variant for `Tabs`.
|
|
18
|
-
- **DateRangeField presets and time** — one-click ranges such as Today, Last 7
|
|
19
|
-
days and This month, or your own, beside the calendar (`presets`), and a time
|
|
20
|
-
of day on each end of the range (`with-time`), and `min-date` / `max-date`.
|
|
21
|
-
- **FilePreview** — preview a file picked by its type, in one component: an
|
|
22
|
-
image, a PDF in `PdfReader`, a video or audio file, the text of a text, JSON,
|
|
23
|
-
CSV or Markdown file, or a card with a download link for anything else
|
|
24
|
-
(`FilePreview`, `@error`). Safe on a server.
|
|
9
|
+
Nothing in progress right now; see Next.
|
|
25
10
|
|
|
26
11
|
## Next
|
|
27
12
|
|
|
@@ -107,6 +92,23 @@ the version something shipped in.
|
|
|
107
92
|
|
|
108
93
|
## Shipped
|
|
109
94
|
|
|
95
|
+
- **TreeSelectField** — pick one or several items from a tree inside a form
|
|
96
|
+
field, as chips when several, with an optional filter that keeps each match
|
|
97
|
+
under its ancestors (`TreeSelectField`, `TreeSelectFormField`). 0.25.0.
|
|
98
|
+
- **The same options as `@nxgt/material`** — a generic `Autocomplete` and
|
|
99
|
+
`FilesFormField` typed by your items, a `ConfirmationDialog` that holds a
|
|
100
|
+
form, date fields that disable chosen days, `SliderField` ticks and
|
|
101
|
+
leading/trailing content, a presence status on `Avatar`, a logo slot on the
|
|
102
|
+
QR code, slots on `AccordionCard`, an option slot on `SelectField`, Monaco's
|
|
103
|
+
own options on `CodeEditor` and a line variant for `Tabs`. 0.25.0.
|
|
104
|
+
- **DateRangeField presets and time** — one-click ranges such as Today, Last 7
|
|
105
|
+
days and This month, or your own, beside the calendar (`presets`), and a time
|
|
106
|
+
of day on each end of the range (`with-time`), and `min-date` / `max-date`.
|
|
107
|
+
0.25.0.
|
|
108
|
+
- **FilePreview** — preview a file picked by its type, in one component: an
|
|
109
|
+
image, a PDF in `PdfReader`, a video or audio file, the text of a text, JSON,
|
|
110
|
+
CSV or Markdown file, or a card with a download link for anything else
|
|
111
|
+
(`FilePreview`, `@error`). Safe on a server. 0.25.0.
|
|
110
112
|
- **Spinner `light` colour renders** — a `Spinner` with `color="light"` shows
|
|
111
113
|
its light ring, for loading states on dark or coloured surfaces. 0.24.0.
|
|
112
114
|
- **Range filters announce their field name** — the slider thumbs and the
|
package/docs/troubleshooting.md
CHANGED
|
@@ -117,6 +117,7 @@ words in your error.
|
|
|
117
117
|
- [A form with a required `Switch` no longer submits](#a-form-with-a-required-switch-no-longer-submits)
|
|
118
118
|
- [A `RichTextEditor` became editable after upgrading](#a-richtexteditor-became-editable-after-upgrading)
|
|
119
119
|
- [Focus falls to `<body>` when a controlled `Drawer` closes](#focus-falls-to-body-when-a-controlled-drawer-closes)
|
|
120
|
+
- [A `TimePicker` test expects AM / PM to add 12 hours, or a click on the pressed half to switch to PM](#a-timepicker-test-expects-am--pm-to-add-12-hours-or-a-click-on-the-pressed-half-to-switch-to-pm)
|
|
120
121
|
|
|
121
122
|
**PDF reader**
|
|
122
123
|
|
|
@@ -2073,6 +2074,33 @@ const opener = useTemplateRef<InstanceType<typeof Button>>('opener');
|
|
|
2073
2074
|
</template>
|
|
2074
2075
|
```
|
|
2075
2076
|
|
|
2077
|
+
### A `TimePicker` test expects AM / PM to add 12 hours, or a click on the pressed half to switch to PM
|
|
2078
|
+
|
|
2079
|
+
**When:** after upgrading to 0.25.0, a test (or code of yours) around a
|
|
2080
|
+
`TimePicker` — or the popover of a `DateField` with `show-time-picker`, a
|
|
2081
|
+
`TimeField` or a `DateRangeField` with `with-time`, which hold one — sees a
|
|
2082
|
+
different time, or no `change` event, when it clicks AM or PM.
|
|
2083
|
+
**Why:** before 0.25.0 the toggle added 12 hours on every PM and took
|
|
2084
|
+
`% 12` on AM. A time already in the afternoon went 12 hours further — PM on
|
|
2085
|
+
14:00 gave 02:00 the next day — and a click on the half already pressed
|
|
2086
|
+
(which Reka reports as no value, unpressing it) was read as PM and did the
|
|
2087
|
+
same. The AM / PM shown was also read once, from the first `date`, so a
|
|
2088
|
+
`date` changed from outside kept its old half. Now AM / PM follows the `date`
|
|
2089
|
+
it is given, switching moves the time into that half and no further (09:30 +
|
|
2090
|
+
PM is 21:30, 21:30 + PM stays 21:30, 21:30 + AM is 09:30, on the same day),
|
|
2091
|
+
and a click on the pressed half changes nothing and emits no `change`. This
|
|
2092
|
+
is the same fix as `@nxgt/material`'s 2.6.0 (`periodOf` / `withPeriod`). The
|
|
2093
|
+
hours and minutes inputs are also named "Hours" and "Minutes"
|
|
2094
|
+
(`material.time-picker.hours`, `material.time-picker.minutes`).
|
|
2095
|
+
**Fix:** expect the time in the half you picked, and no event for a click on
|
|
2096
|
+
the pressed half. Find the inputs by their names rather than by position:
|
|
2097
|
+
|
|
2098
|
+
```ts
|
|
2099
|
+
await userEvent.click(canvas.getByRole('button', { name: 'PM' }));
|
|
2100
|
+
expect(onChange).toHaveBeenLastCalledWith(new Date(2026, 0, 1, 21, 30)); // from 09:30
|
|
2101
|
+
await userEvent.type(canvas.getByRole('spinbutton', { name: 'Hours' }), '10');
|
|
2102
|
+
```
|
|
2103
|
+
|
|
2076
2104
|
---
|
|
2077
2105
|
|
|
2078
2106
|
## PDF reader
|
|
@@ -2470,7 +2498,9 @@ own error inside it.
|
|
|
2470
2498
|
**When:** a `FilePreview` given a URL, or a file it cannot show, renders that
|
|
2471
2499
|
message (and `@error` receives the error).
|
|
2472
2500
|
**Why:** a text, JSON, CSV or Markdown URL is fetched with `fetch`: an HTTP
|
|
2473
|
-
error is a `FilePreviewHttpError` with its `status`,
|
|
2501
|
+
error is a `FilePreviewHttpError` with its `status`, whose message is
|
|
2502
|
+
`Could not read …: HTTP 404` (the URL as you passed it, then the status —
|
|
2503
|
+
`Could not read /files/notes.txt: HTTP 404`), and a cross-origin URL
|
|
2474
2504
|
without CORS headers is a `TypeError: Failed to fetch`. An image, video or
|
|
2475
2505
|
audio file the browser cannot decode (a corrupt file, a codec the browser
|
|
2476
2506
|
lacks, a URL that answers an error page) fails in its own element. A URL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material-vue",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"docs:previews": "vitest run --project previews"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@nxgt/material-core": "^0.3.
|
|
121
|
+
"@nxgt/material-core": "^0.3.1",
|
|
122
122
|
"@floating-ui/dom": "^1.8.0",
|
|
123
123
|
"@fortawesome/fontawesome-common-types": "7.3.1",
|
|
124
124
|
"@lucide/vue": "^1.45.0",
|