codexly-ui 0.10.68 → 0.10.70
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 +32 -4
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +17 -0
package/package.json
CHANGED
package/types/codexly-ui.d.ts
CHANGED
|
@@ -3006,6 +3006,13 @@ declare class ClxProductDetailComponent {
|
|
|
3006
3006
|
* panels visually consistent with the rest of the e-commerce card set. */
|
|
3007
3007
|
protected readonly _panelClass = "bg-clx-surface rounded-2xl shadow-sm p-4";
|
|
3008
3008
|
readonly tabItems: ClxTabItem[];
|
|
3009
|
+
/** Tracks which product the spec selection was initialized for — the init effect below must run
|
|
3010
|
+
* once per actual product change, not every time initialVariationId() changes. A host app that
|
|
3011
|
+
* syncs its own ?variant= URL param from the (variationChange) output (see codexly-store's
|
|
3012
|
+
* product-detail page) feeds that id back into this same input; without this guard, every spec
|
|
3013
|
+
* click would round-trip through the host and re-trigger initialization, silently overwriting
|
|
3014
|
+
* the visitor's in-progress selection with the just-resolved variation's full spec set. */
|
|
3015
|
+
private _initializedForProductId;
|
|
3009
3016
|
constructor();
|
|
3010
3017
|
/** With no specs selected (fresh load, or every spec toggled back off) this is the variation
|
|
3011
3018
|
* the visitor originally landed on. Otherwise, resolves the variation matching every currently
|
|
@@ -3013,6 +3020,16 @@ declare class ClxProductDetailComponent {
|
|
|
3013
3020
|
* whose specs are a superset of the selection counts as a match, since the visitor hasn't
|
|
3014
3021
|
* narrowed those other spec types down to one value yet. */
|
|
3015
3022
|
readonly activeVariation: _angular_core.Signal<ClxVariation | null>;
|
|
3023
|
+
/** True only once the visitor has explicitly picked one option per spec type (Color AND Talla,
|
|
3024
|
+
* not just one of them) — activeVariation() always resolves to *some* variation even with a
|
|
3025
|
+
* partial selection (see its own doc comment), so it alone can't gate the CTA: without this,
|
|
3026
|
+
* "Agrega al carrito" would add whatever variation the partial selection happened to resolve to
|
|
3027
|
+
* (e.g. the first in-stock Talla under the chosen Color) instead of what the visitor actually
|
|
3028
|
+
* chose. */
|
|
3029
|
+
readonly isSelectionComplete: _angular_core.Signal<boolean>;
|
|
3030
|
+
/** Names of the spec types still missing a selection — surfaced next to the CTA so a disabled
|
|
3031
|
+
* "Agrega al carrito" reads as "pick a Talla" instead of an unexplained dead button. */
|
|
3032
|
+
readonly missingSpecNames: _angular_core.Signal<string[]>;
|
|
3016
3033
|
readonly finalPrice: _angular_core.Signal<number>;
|
|
3017
3034
|
readonly discount: _angular_core.Signal<number>;
|
|
3018
3035
|
/** An option is available if some in-stock variation matches it together with the rest of the
|