@frame-kit/ui-ng-patterns 0.1.20 → 0.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frame-kit/ui-ng-patterns",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Opinionated, dashboard-ready Angular component patterns composed from @frame-kit/ui-ng.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@angular/forms": "^21.2.0",
|
|
18
18
|
"@angular/platform-browser": "^21.2.0",
|
|
19
19
|
"@angular/router": "^21.2.0",
|
|
20
|
-
"@frame-kit/ui-ng": "0.1
|
|
20
|
+
"@frame-kit/ui-ng": "0.2.1",
|
|
21
21
|
"rxjs": "^7.0.0"
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
@@ -664,6 +664,14 @@ interface Point {
|
|
|
664
664
|
* and can be dragged around (CDK drag). It renders over the app in a fixed
|
|
665
665
|
* layer — drop it once near the app root.
|
|
666
666
|
*
|
|
667
|
+
* **Presentational, not clever.** It renders exactly what it is given and
|
|
668
|
+
* reports what the user did — it derives no step state of its own. Which step
|
|
669
|
+
* is open (`openStepId`), which are done or pending (`steps`), whether it is
|
|
670
|
+
* collapsed (`collapsed`): all inputs. When a step should advance, when a
|
|
671
|
+
* context switch should re-focus the guide, when a choice has gone stale —
|
|
672
|
+
* all consumer decisions, because the consumer knows *what changed*, while
|
|
673
|
+
* the widget only ever sees a new array.
|
|
674
|
+
*
|
|
667
675
|
* **Controlled model, no domain data.** The `steps` model is a required,
|
|
668
676
|
* reactive input: the widget is a pure view of it and emits events when the
|
|
669
677
|
* user acts (`stepAction`, `stepMarkDone`, `stepSecondaryAction`,
|
|
@@ -671,9 +679,9 @@ interface Point {
|
|
|
671
679
|
* it is keyed by, say, the active account or environment, swapping the input
|
|
672
680
|
* re-renders the widget instantly. The widget never persists step state.
|
|
673
681
|
*
|
|
674
|
-
* **Collapsed
|
|
675
|
-
* `
|
|
676
|
-
*
|
|
682
|
+
* **Collapsed and openStepId are two-way models.** Bind `[(collapsed)]` /
|
|
683
|
+
* `[(openStepId)]` to drive the card ↔ pill swap and the expanded row from
|
|
684
|
+
* outside; the widget writes them only in response to a direct user action.
|
|
677
685
|
*
|
|
678
686
|
* **Container-aware.** `boundary` (a selector or element) confines both
|
|
679
687
|
* dragging and the widget's resting position to a region of the app — e.g. a
|
|
@@ -800,20 +808,14 @@ declare class OnboardingGuideComponent {
|
|
|
800
808
|
/** The boundary element currently under observation (if any). */
|
|
801
809
|
private observedBoundary;
|
|
802
810
|
/**
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
*
|
|
809
|
-
* specific step (e.g. a "complete this section" banner). `undefined` means
|
|
810
|
-
* "follow the default" — the first incomplete step. User toggles (and
|
|
811
|
-
* consumer writes) override the default until the `steps` model changes,
|
|
812
|
-
* which resets the choice so the guide re-focuses the next piece of work.
|
|
811
|
+
* The expanded step, or `null` for none. Fully controlled: the widget
|
|
812
|
+
* writes it only when the user toggles a row, and never infers a value
|
|
813
|
+
* of its own — which step should be open, when to advance to the next
|
|
814
|
+
* one, and whether a context switch should re-focus the guide are all
|
|
815
|
+
* decisions the consumer owns (it knows what changed; the widget only
|
|
816
|
+
* sees a new array).
|
|
813
817
|
*/
|
|
814
|
-
readonly openStepId: _angular_core.ModelSignal<string | null
|
|
815
|
-
/** The step actually expanded: the explicit choice, or the default. */
|
|
816
|
-
protected readonly resolvedOpenStepId: _angular_core.Signal<string | null>;
|
|
818
|
+
readonly openStepId: _angular_core.ModelSignal<string | null>;
|
|
817
819
|
protected readonly total: _angular_core.Signal<number>;
|
|
818
820
|
protected readonly doneCount: _angular_core.Signal<number>;
|
|
819
821
|
protected readonly percent: _angular_core.Signal<number>;
|