codexly-ui 0.10.67 → 0.10.68
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/fesm2022/codexly-ui.mjs +34 -3
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +14 -0
package/package.json
CHANGED
package/types/codexly-ui.d.ts
CHANGED
|
@@ -2997,12 +2997,21 @@ declare class ClxProductDetailComponent {
|
|
|
2997
2997
|
readonly _carousel: _angular_core.Signal<ClxCarouselComponent | undefined>;
|
|
2998
2998
|
readonly quantity: _angular_core.WritableSignal<number>;
|
|
2999
2999
|
readonly activeTab: _angular_core.WritableSignal<string>;
|
|
3000
|
+
/** Only holds specs the visitor has explicitly clicked — starts empty, not pre-filled with the
|
|
3001
|
+
* initial variation's specs, so a spec option can be toggled off (click again to deselect)
|
|
3002
|
+
* without fighting a "fully selected" starting state that never lets go of its last value. */
|
|
3000
3003
|
readonly selectedSpecs: _angular_core.WritableSignal<Record<string, string>>;
|
|
3004
|
+
private readonly _initialVariation;
|
|
3001
3005
|
/** Same card treatment as clx-product (bg-clx-surface + shadow-sm) — keeps the gallery/info
|
|
3002
3006
|
* panels visually consistent with the rest of the e-commerce card set. */
|
|
3003
3007
|
protected readonly _panelClass = "bg-clx-surface rounded-2xl shadow-sm p-4";
|
|
3004
3008
|
readonly tabItems: ClxTabItem[];
|
|
3005
3009
|
constructor();
|
|
3010
|
+
/** With no specs selected (fresh load, or every spec toggled back off) this is the variation
|
|
3011
|
+
* the visitor originally landed on. Otherwise, resolves the variation matching every currently
|
|
3012
|
+
* selected spec — with a partial selection (some spec types still untouched), any variation
|
|
3013
|
+
* whose specs are a superset of the selection counts as a match, since the visitor hasn't
|
|
3014
|
+
* narrowed those other spec types down to one value yet. */
|
|
3006
3015
|
readonly activeVariation: _angular_core.Signal<ClxVariation | null>;
|
|
3007
3016
|
readonly finalPrice: _angular_core.Signal<number>;
|
|
3008
3017
|
readonly discount: _angular_core.Signal<number>;
|
|
@@ -3017,6 +3026,11 @@ declare class ClxProductDetailComponent {
|
|
|
3017
3026
|
* hide each other's only selected value and the whole panel would render empty, even though
|
|
3018
3027
|
* other in-stock combinations (Azul L, Gris M, …) exist. */
|
|
3019
3028
|
isOptionAvailable(specTypeId: string, specOptionId: string): boolean;
|
|
3029
|
+
/** Clicking an already-selected option deselects it (toggle) instead of being a no-op — the only
|
|
3030
|
+
* way to escape a narrowed-down selection and see all options again, per the "hide unavailable
|
|
3031
|
+
* options" design: there's no separate disabled state to click through, so toggling off is the
|
|
3032
|
+
* sole path back. Once every spec is toggled off, activeVariation() falls back to the variation
|
|
3033
|
+
* the visitor originally landed on (see _initialVariation). */
|
|
3020
3034
|
selectSpec(specTypeId: string, specOptionId: string): void;
|
|
3021
3035
|
isSpecSelected(specTypeId: string, specOptionId: string): boolean;
|
|
3022
3036
|
selectedOptionLabel(specType: ClxSpecType): string;
|