codexly-ui 0.12.44 → 0.12.46

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