@blackcube/aurelia-kit 1.0.0-rc7 → 1.0.0-rc8
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 +19 -0
- package/dist/index.es.js +554 -383
- package/dist/index.es.js.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
|
@@ -748,6 +748,25 @@ loaded by ajaxify):
|
|
|
748
748
|
|
|
749
749
|
When attached, the element is focused on the next frame; the browser brings it into view.
|
|
750
750
|
|
|
751
|
+
### `bleet-first-error`
|
|
752
|
+
|
|
753
|
+
A form whose first field in error takes the focus when the page says « refused » (a SPA validating its form before
|
|
754
|
+
posting it):
|
|
755
|
+
|
|
756
|
+
```html
|
|
757
|
+
<form bleet-first-error="account" submit.trigger="onSubmit($event)" novalidate>
|
|
758
|
+
<input aria-invalid.bind="…" …>
|
|
759
|
+
</form>
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
`Channels.Form` carries `IForm` (`{ action: FormAction.FirstError, id?: string }`): the form whose `id` is given,
|
|
763
|
+
every form without id, focuses its first `[aria-invalid=true]` on the next frame — once the invalid marks of the fields
|
|
764
|
+
are rendered. A form without a field in error does nothing.
|
|
765
|
+
|
|
766
|
+
```typescript
|
|
767
|
+
resolve(IEventAggregator).publish(Channels.Form, <IForm>{ action: FormAction.FirstError, id: 'account' });
|
|
768
|
+
```
|
|
769
|
+
|
|
751
770
|
## Upload channel
|
|
752
771
|
|
|
753
772
|
`Channels.Upload` carries `IUpload` (`{ action: UploadAction.Reset, id?: string }`) for the upload bridges
|