codexly-ui 0.12.44 → 0.12.45

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": "codexly-ui",
3
- "version": "0.12.44",
3
+ "version": "0.12.45",
4
4
  "description": "Standalone, signal-based Angular UI component library for Codexly, styled with Tailwind CSS.",
5
5
  "keywords": [
6
6
  "angular",
@@ -3443,7 +3443,15 @@ declare class ClxProductComponent {
3443
3443
  protected readonly _tags: _angular_core.Signal<ClxProductTag[]>;
3444
3444
  protected readonly _disabled: _angular_core.Signal<boolean>;
3445
3445
  protected readonly _hasMultipleOptions: _angular_core.Signal<boolean>;
3446
+ /** sale_price/product_sale_price is always the LIST price — has_discount/discount_percentage
3447
+ * apply on top of it, never replace it with an already-discounted figure (same convention as
3448
+ * clx-product-detail's listPrice/finalPrice). */
3449
+ protected readonly _listPrice: _angular_core.Signal<number>;
3446
3450
  protected readonly _price: _angular_core.Signal<number>;
3451
+ /** discount_percentage is the primary source; discount_price is only a fallback for a caller
3452
+ * whose backend instead stores a precomputed higher reference price to derive the percentage
3453
+ * from — same reasoning as clx-product-detail's discount() computed. */
3454
+ protected readonly _discountPct: _angular_core.Signal<number>;
3447
3455
  protected readonly _buttonSize: _angular_core.Signal<"sm" | "md">;
3448
3456
  protected readonly _skeletonW: _angular_core.Signal<"sm:w-32" | "sm:w-44">;
3449
3457
  protected readonly _skeletonH: _angular_core.Signal<"160px" | "200px">;
@@ -3668,6 +3676,12 @@ declare class ClxProductDetailComponent {
3668
3676
  /** Names of the spec types still missing a selection — surfaced next to the CTA so a disabled
3669
3677
  * "Agrega al carrito" reads as "pick a Talla" instead of an unexplained dead button. */
3670
3678
  readonly missingSpecNames: _angular_core.Signal<string[]>;
3679
+ /** sale_price/product_sale_price is always the LIST price — has_discount/discount_percentage
3680
+ * live on the product and apply on top of it, they never replace it with an already-discounted
3681
+ * figure. discount_price (when a caller supplies it instead of discount_percentage) is the same
3682
+ * list-price role under another name — see the discount() computed below, which is the only
3683
+ * place that falls back to it. */
3684
+ readonly listPrice: _angular_core.Signal<number>;
3671
3685
  readonly finalPrice: _angular_core.Signal<number>;
3672
3686
  /** Was a hardcoded "Very Good" regardless of the actual rating (including 0.0 with no reviews
3673
3687
  * at all) — now reflects product().rating for real, with no-reviews-yet as its own copy rather
@@ -3679,6 +3693,10 @@ declare class ClxProductDetailComponent {
3679
3693
  protected tagLabel(tag: string): string;
3680
3694
  protected tagColor(tag: string): ClxColorInput;
3681
3695
  protected tagVariant(tag: string): codexly_ui.ClxBadgeVariant;
3696
+ /** discount_percentage is the primary source (matches this codebase's actual data model: the
3697
+ * percentage lives on the product, the price it applies to is sale_price/product_sale_price —
3698
+ * see listPrice() above). discount_price is only a fallback for a caller whose backend instead
3699
+ * stores a precomputed higher reference price to derive the percentage from. */
3682
3700
  readonly discount: _angular_core.Signal<number>;
3683
3701
  /** An option is available if some in-stock variation matches it together with the rest of the
3684
3702
  * current selection — a sold-out combination is hidden, same "hide, don't disable" rule already
@@ -3830,6 +3848,13 @@ declare class ClxWishlistComponent {
3830
3848
  protected readonly _filtered: _angular_core.Signal<ClxWishlistItem[]>;
3831
3849
  protected readonly _totalItems: _angular_core.Signal<number>;
3832
3850
  protected readonly _pagedItems: _angular_core.Signal<ClxWishlistItem[]>;
3851
+ /** sale_price/product_sale_price is always the LIST price — has_discount/discount_percentage
3852
+ * apply on top of it, never replace it with an already-discounted figure (same convention as
3853
+ * clx-product-detail/clx-product). */
3854
+ protected _finalPrice(item: ClxWishlistItem): number;
3855
+ /** discount_percentage is the primary source; discount_price is only a fallback for a caller
3856
+ * whose backend instead stores a precomputed higher reference price to derive the percentage
3857
+ * from. */
3833
3858
  protected _discountPercent(item: ClxWishlistItem): number;
3834
3859
  handleSearch(val: string): void;
3835
3860
  handleSort(val: string | number | (string | number)[] | null): void;