@cngx/common 0.1.0-rc.8 → 0.1.0-rc.9

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 (52) hide show
  1. package/command/README.md +29 -0
  2. package/data/README.md +5 -2
  3. package/fesm2022/cngx-common-a11y.mjs +403 -84
  4. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  5. package/fesm2022/cngx-common-audio.mjs +16 -13
  6. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  7. package/fesm2022/cngx-common-card.mjs +4 -3
  8. package/fesm2022/cngx-common-card.mjs.map +1 -1
  9. package/fesm2022/cngx-common-chart.mjs +55 -36
  10. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  11. package/fesm2022/cngx-common-command.mjs +60 -6
  12. package/fesm2022/cngx-common-command.mjs.map +1 -1
  13. package/fesm2022/cngx-common-data.mjs +185 -37
  14. package/fesm2022/cngx-common-data.mjs.map +1 -1
  15. package/fesm2022/cngx-common-dialog.mjs +86 -48
  16. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  17. package/fesm2022/cngx-common-display.mjs +27 -23
  18. package/fesm2022/cngx-common-display.mjs.map +1 -1
  19. package/fesm2022/cngx-common-interactive.mjs +324 -122
  20. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  21. package/fesm2022/cngx-common-layout.mjs +129 -26
  22. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  23. package/fesm2022/cngx-common-popover.mjs +947 -33
  24. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  25. package/fesm2022/cngx-common-stepper.mjs +300 -166
  26. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  27. package/fesm2022/cngx-common-tabs.mjs +251 -80
  28. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  29. package/fesm2022/cngx-common-timeline.mjs +16 -10
  30. package/fesm2022/cngx-common-timeline.mjs.map +1 -1
  31. package/fesm2022/cngx-common.mjs +1 -1
  32. package/layout/README.md +16 -0
  33. package/package.json +20 -7
  34. package/popover/README.md +40 -0
  35. package/schematics/collection.json +9 -0
  36. package/schematics/ng-add/index.js +9 -0
  37. package/schematics/ng-add/schema.json +91 -0
  38. package/schematics/package.json +3 -0
  39. package/stepper/README.md +5 -4
  40. package/theming/components/cngx-popover-sheet.css +402 -0
  41. package/theming/components/cngx-popover.css +10 -6
  42. package/types/cngx-common-a11y.d.ts +167 -14
  43. package/types/cngx-common-chart.d.ts +8 -7
  44. package/types/cngx-common-command.d.ts +19 -2
  45. package/types/cngx-common-data.d.ts +164 -26
  46. package/types/cngx-common-dialog.d.ts +3 -7
  47. package/types/cngx-common-interactive.d.ts +52 -17
  48. package/types/cngx-common-layout.d.ts +37 -5
  49. package/types/cngx-common-popover.d.ts +353 -13
  50. package/types/cngx-common-stepper.d.ts +168 -129
  51. package/types/cngx-common-tabs.d.ts +149 -30
  52. package/types/cngx-common-timeline.d.ts +27 -7
package/command/README.md CHANGED
@@ -42,6 +42,35 @@ bootstrapApplication(AppComponent, {
42
42
  export class EditorView {}
43
43
  ```
44
44
 
45
+ A scoped call adds to the commands above it and never hides them. That holds
46
+ across both injector trees: a lazy route's `providers` and a shell component's
47
+ `viewProviders` around the `<router-outlet>` both reach the routed page, on top
48
+ of the root set.
49
+
50
+ ```typescript
51
+ // root: FILE_COMMANDS; route: REPORT_COMMANDS; shell: NAV_COMMANDS
52
+ { path: 'reports', providers: [provideCommands(REPORT_COMMANDS)], component: Reports }
53
+ // injectCommands() inside Reports -> FILE, REPORT, NAV
54
+ ```
55
+
56
+ Order is root and route scopes first (outer to inner), then component scopes
57
+ outer to inner, each in registration order. Registering the same source
58
+ reference at two levels lists it once. A `viewProviders` set stays invisible to
59
+ projected content, as for any `viewProviders` entry; use `providers` when
60
+ content children need it.
61
+
62
+ Command ids are unique in the merged list. A command whose `id` is already
63
+ registered further out replaces that command in place: the innermost scope (or,
64
+ on one level, the later registration) wins, and the entry keeps the position of
65
+ the first occurrence. Reuse an id on purpose to swap a global command for a
66
+ scoped version; give unrelated commands distinct ids.
67
+
68
+ Register through `provideCommands`. A raw `CNGX_COMMAND_SOURCE` multi-provider
69
+ is carried into deeper scopes only from a level that also calls
70
+ `provideCommands`. On any other level it is read only when that level is the
71
+ nearest one `injectCommands()` resolves, and a nested `provideCommands` scope
72
+ does not see it.
73
+
45
74
  A source is either a static list or a reactive `Signal` - a signal source lets a
46
75
  contributor add, remove, or disable commands live:
47
76
 
package/data/README.md CHANGED
@@ -531,14 +531,17 @@ readonly items = fromResource(this.res);
531
531
 
532
532
  ## 5. fromHttpResource - Angular httpResource() Bridge
533
533
 
534
- Like `fromResource` but maps HTTP progress (0-1 float) to
535
- `CngxAsyncState.progress` (0-100 integer).
534
+ Like `fromResource` but maps the latest `HttpProgressEvent` to
535
+ `CngxAsyncState.progress` (0-100 integer, `loaded / total` rounded and
536
+ clamped; `undefined` while the total is unknown or zero). Angular only
537
+ emits progress events when the request sets `reportProgress: true`.
536
538
 
537
539
  ```typescript
538
540
  private readonly res = httpResource<Report>(() => ({
539
541
  url: '/api/reports/generate',
540
542
  method: 'POST',
541
543
  body: { params: this.reportParams() },
544
+ reportProgress: true,
542
545
  }));
543
546
 
544
547
  readonly report = fromHttpResource(this.res);