@blackcube/aurelia-kit 1.0.0-rc7 → 1.0.0-rc9
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/README.md +21 -0
- package/dist/index.es.js +554 -383
- package/dist/index.es.js.map +1 -1
- package/dist/types/abstracts/components/abstract-dialog.d.ts +2 -1
- package/dist/types/abstracts/components/abstract-dialog.d.ts.map +1 -1
- package/dist/types/attributes/first-error.d.ts +19 -0
- package/dist/types/attributes/first-error.d.ts.map +1 -0
- package/dist/types/attributes/index.d.ts +1 -0
- package/dist/types/attributes/index.d.ts.map +1 -1
- package/dist/types/enums/event-aggregator.d.ts +8 -1
- package/dist/types/enums/event-aggregator.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/interfaces/event-aggregator.d.ts +8 -1
- package/dist/types/interfaces/event-aggregator.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,6 +228,8 @@ resolve(IEventAggregator).publish(Channels.Modal, <IModal>{ action: ModalAction.
|
|
|
228
228
|
|
|
229
229
|
- `Open` (or `Toggle` when closed) opens the dialog; Escape, any `[data-dialog="close"]`, `Close` and `Toggle` close it
|
|
230
230
|
through the hide transition — a menu open inside (`aria-expanded`) is closed first.
|
|
231
|
+
- `Open` on a dialog already open only renews its `title`: the page shown in it changed (a creation turned into its
|
|
232
|
+
edition), the dialog stays.
|
|
231
233
|
- What the slot holds belongs to the page that projects it, its forms included.
|
|
232
234
|
- `ModalStatus.Closed` with the `id` tells the page the dialog is closed (its route can be left).
|
|
233
235
|
- `<bleet-dialog>` itself extends `AbstractDialog`, with the server HTML on top of it.
|
|
@@ -748,6 +750,25 @@ loaded by ajaxify):
|
|
|
748
750
|
|
|
749
751
|
When attached, the element is focused on the next frame; the browser brings it into view.
|
|
750
752
|
|
|
753
|
+
### `bleet-first-error`
|
|
754
|
+
|
|
755
|
+
A form whose first field in error takes the focus when the page says « refused » (a SPA validating its form before
|
|
756
|
+
posting it):
|
|
757
|
+
|
|
758
|
+
```html
|
|
759
|
+
<form bleet-first-error="account" submit.trigger="onSubmit($event)" novalidate>
|
|
760
|
+
<input aria-invalid.bind="…" …>
|
|
761
|
+
</form>
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
`Channels.Form` carries `IForm` (`{ action: FormAction.FirstError, id?: string }`): the form whose `id` is given,
|
|
765
|
+
every form without id, focuses its first `[aria-invalid=true]` on the next frame — once the invalid marks of the fields
|
|
766
|
+
are rendered. A form without a field in error does nothing.
|
|
767
|
+
|
|
768
|
+
```typescript
|
|
769
|
+
resolve(IEventAggregator).publish(Channels.Form, <IForm>{ action: FormAction.FirstError, id: 'account' });
|
|
770
|
+
```
|
|
771
|
+
|
|
751
772
|
## Upload channel
|
|
752
773
|
|
|
753
774
|
`Channels.Upload` carries `IUpload` (`{ action: UploadAction.Reset, id?: string }`) for the upload bridges
|