@blackcube/aurelia-kit 1.0.0-rc4 → 1.0.0-rc5

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.
Files changed (48) hide show
  1. package/README.md +162 -30
  2. package/dist/index.es.js +1066 -615
  3. package/dist/index.es.js.map +1 -1
  4. package/dist/types/abstracts/components/abstract-dialog.d.ts +41 -0
  5. package/dist/types/abstracts/components/abstract-dialog.d.ts.map +1 -0
  6. package/dist/types/abstracts/components/abstract-dropdown.d.ts +105 -0
  7. package/dist/types/abstracts/components/abstract-dropdown.d.ts.map +1 -0
  8. package/dist/types/abstracts/components/abstract-pager.d.ts +51 -0
  9. package/dist/types/abstracts/components/abstract-pager.d.ts.map +1 -0
  10. package/dist/types/abstracts/components/abstract-toaster.d.ts +42 -0
  11. package/dist/types/abstracts/components/abstract-toaster.d.ts.map +1 -0
  12. package/dist/types/abstracts/components/index.d.ts +7 -0
  13. package/dist/types/abstracts/components/index.d.ts.map +1 -0
  14. package/dist/types/attributes/ajaxify-trigger.d.ts.map +1 -1
  15. package/dist/types/attributes/alert.d.ts.map +1 -1
  16. package/dist/types/attributes/badge.d.ts.map +1 -1
  17. package/dist/types/attributes/burger.d.ts.map +1 -1
  18. package/dist/types/attributes/dropdown.d.ts.map +1 -1
  19. package/dist/types/attributes/focus.d.ts.map +1 -1
  20. package/dist/types/attributes/menu.d.ts.map +1 -1
  21. package/dist/types/attributes/modal-trigger.d.ts.map +1 -1
  22. package/dist/types/attributes/overlay.d.ts.map +1 -1
  23. package/dist/types/attributes/pager.d.ts.map +1 -1
  24. package/dist/types/attributes/password.d.ts.map +1 -1
  25. package/dist/types/attributes/popover-trigger.d.ts.map +1 -1
  26. package/dist/types/attributes/popover.d.ts.map +1 -1
  27. package/dist/types/attributes/profile.d.ts.map +1 -1
  28. package/dist/types/attributes/tabs.d.ts.map +1 -1
  29. package/dist/types/attributes/toast.d.ts.map +1 -1
  30. package/dist/types/attributes/toaster-trigger.d.ts.map +1 -1
  31. package/dist/types/attributes/toaster.d.ts.map +1 -1
  32. package/dist/types/components/bleet-ajaxify.d.ts.map +1 -1
  33. package/dist/types/components/bleet-dialog.d.ts +13 -35
  34. package/dist/types/components/bleet-dialog.d.ts.map +1 -1
  35. package/dist/types/components/index.d.ts +0 -2
  36. package/dist/types/components/index.d.ts.map +1 -1
  37. package/dist/types/index.d.ts +5 -4
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/dist/types/interfaces/event-aggregator.d.ts +2 -1
  40. package/dist/types/interfaces/event-aggregator.d.ts.map +1 -1
  41. package/dist/types/services/storage-service.d.ts.map +1 -1
  42. package/dist/types/services/transition-service.d.ts.map +1 -1
  43. package/dist/types/services/trap-focus-service.d.ts +17 -1
  44. package/dist/types/services/trap-focus-service.d.ts.map +1 -1
  45. package/dist/types/utils/toaster.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/dist/types/components/bleet-toaster.d.ts +0 -43
  48. package/dist/types/components/bleet-toaster.d.ts.map +0 -1
@@ -4,7 +4,9 @@ export interface ITrapFocusService extends TrapFocusService {
4
4
  export declare const ITrapFocusService: import("@aurelia/kernel").InterfaceSymbol<ITrapFocusService>;
5
5
  /**
6
6
  * Keeps the focus inside a panel (dropdown, select, profile menu): Tab / Shift+Tab loop, arrows move, Escape and a
7
- * click outside stop it. Elements hidden inside the panel are not focusable.
7
+ * click outside stop it. Elements hidden inside the panel are not focusable. The focusable elements are read again at
8
+ * each key — the panel may have changed since start(): rows filtered, rows rendered again — and a key moves from the
9
+ * element that has the focus, a click on a row included; without one, it moves from an end of the panel.
8
10
  */
9
11
  export declare class TrapFocusService {
10
12
  private readonly logger;
@@ -32,9 +34,23 @@ export declare class TrapFocusService {
32
34
  */
33
35
  stop(): Promise<unknown>;
34
36
  private cleanup;
37
+ /**
38
+ * The focusable elements as the panel is now, and the current one: the element that has the focus when it is one
39
+ * of them, else the last one focused by the trap — -1 when it is no longer there.
40
+ */
35
41
  private focusedElementIndex;
42
+ /**
43
+ * The previous element; from the first, the last when it loops; without a current one, the last.
44
+ */
36
45
  private focusPreviousElement;
46
+ /**
47
+ * The next element; from the last, the first when it loops; without a current one, the first.
48
+ */
37
49
  private focusNextElement;
50
+ /**
51
+ * The element at this index takes the focus, on the next frame; an index out of the list keeps the current one.
52
+ */
53
+ private focusAt;
38
54
  private onKeyDown;
39
55
  private onClickOutside;
40
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"trap-focus-service.d.ts","sourceRoot":"","sources":["../../../src/services/trap-focus-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,OAAO,EAAE,SAAS,EAAU,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;CAAI;AAC/D,eAAO,MAAM,iBAAiB,8DAAgH,CAAC;AAE/I;;;GAGG;AACH,qBAAa,gBAAgB;IAgBrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,CAAC;IAdf,8BAA8B,SAA8J;IAEnM,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,kBAAkB,CAA0B;IACpD,OAAO,CAAC,OAAO,CAAkB;IAGjC,YACqB,MAAM,GAAE,OAAsD,EAC9D,CAAC,GAAE,SAA8B,EAGrD;IAED,OAAO,CAAC,sBAAsB;IAa9B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAUjB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,mBAAmB,CAAC,EAAE,WAAW,gBAgCtK;IACD;;;OAGG;IACI,IA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;IACH,OAAO,CAAC,oBAAoB;IAY5B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAYxB;;OAEG;IACH,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,SAAS,CAkBf;IACF,OAAO,CAAC,cAAc,CAQrB;CACJ"}
@@ -1,7 +1,7 @@
1
1
  import { UiToastIcon } from '../enums/event-aggregator';
2
2
  import { IToast } from '../interfaces/event-aggregator';
3
3
  /**
4
- * A toast with its defaults filled, the same for the bleet-toaster attribute and element.
4
+ * A toast with its defaults filled, the same for the bleet-toaster attribute and AbstractToaster.
5
5
  */
6
6
  export interface IToastWithDefaults extends IToast {
7
7
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blackcube/aurelia-kit",
3
- "version": "1.0.0-rc4",
3
+ "version": "1.0.0-rc5",
4
4
  "description": "Blackcube Aurelia 2 kit: custom attributes and services driven by the Bleet PHP widgets",
5
5
  "author": "Philippe Gaultier <philippe@blackcube.io>",
6
6
  "license": "BSD-3-Clause",
@@ -1,43 +0,0 @@
1
- import { IEventAggregator, ILogger, IPlatform } from 'aurelia';
2
- import { ITransitionService } from '../services/transition-service';
3
- import { IToastWithDefaults } from '../utils/toaster';
4
- /**
5
- * A toast as its markup reads it on $host: the published toast with its defaults, and its close handler.
6
- */
7
- export interface IToastView extends IToastWithDefaults {
8
- close: (event: Event) => void;
9
- }
10
- /**
11
- * Toaster of a SPA: the toasts published on Channels.Toaster, as the bleet-toaster attribute, each rendered by the
12
- * markup the application projects into the element — its default slot, once per toast, the toast exposed as $host.
13
- * The element holds no markup of its own: the root of the projected toast carries data-toaster-id="${$host.id}" and its
14
- * data-toaster-show / data-toaster-hide classes, swapped as the attribute swaps them. The element is the stack: with
15
- * popover="manual" it is shown again on each toast, so that it passes over a dialog opened by showModal() (top layer),
16
- * and hidden once the last toast is gone.
17
- */
18
- export declare class BleetToaster {
19
- private readonly logger;
20
- private readonly element;
21
- private readonly ea;
22
- private readonly p;
23
- private readonly transitionService;
24
- toasts: IToastView[];
25
- private entries;
26
- private disposable?;
27
- constructor(logger?: ILogger, element?: HTMLElement, ea?: IEventAggregator, p?: IPlatform, transitionService?: ITransitionService);
28
- attached(): void;
29
- detaching(): void;
30
- private onToasterEvent;
31
- /**
32
- * The toast joins the list; once rendered, its root slides in by its show classes and, with a duration, closes
33
- * itself after it.
34
- */
35
- private add;
36
- /**
37
- * The toast slides out by its hide classes, then leaves the list.
38
- */
39
- private close;
40
- private remove;
41
- private findToastElement;
42
- }
43
- //# sourceMappingURL=bleet-toaster.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bleet-toaster.d.ts","sourceRoot":"","sources":["../../../src/components/bleet-toaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,gBAAgB,EAAE,OAAO,EAAS,SAAS,EAAW,MAAM,SAAS,CAAC;AAG3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAc,kBAAkB,EAA8B,MAAM,kBAAkB,CAAC;AAE9F;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IAClD,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC;AAOD;;;;;;;GAOG;AACH,qBACa,YAAY;IAOjB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAV/B,MAAM,EAAE,UAAU,EAAE,CAAM;IAEjC,OAAO,CAAC,OAAO,CAA4D;IAC3E,OAAO,CAAC,UAAU,CAAC,CAAc;IAEjC,YACqB,MAAM,GAAE,OAAqD,EAC7D,OAAO,GAAE,WAA2C,EACpD,EAAE,GAAE,gBAA4C,EAChD,CAAC,GAAE,SAA8B,EACjC,iBAAiB,GAAE,kBAAgD,EACpF;IAEG,QAAQ,IAAI,IAAI,CAEtB;IAEM,SAAS,IAAI,IAAI,CAOvB;IAED,OAAO,CAAC,cAAc,CASrB;IAED;;;OAGG;IACH,OAAO,CAAC,GAAG;IA+BX;;OAEG;IACH,OAAO,CAAC,KAAK;IAoBb,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,gBAAgB;CAG3B"}