codexly-ui 0.23.2 → 0.25.0

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.23.2",
3
+ "version": "0.25.0",
4
4
  "description": "Standalone, signal-based Angular UI component library for Codexly, styled with Tailwind CSS.",
5
5
  "keywords": [
6
6
  "angular",
@@ -3831,6 +3831,10 @@ interface ClxProduct {
3831
3831
  has_discount: boolean;
3832
3832
  discount_percentage?: number;
3833
3833
  tags: string[];
3834
+ /** System tag kinds not shown on this card (ClxTagContext.hiddenSystemTags). */
3835
+ hidden_system_tags?: string[];
3836
+ /** Its own "Últimas unidades" threshold (ClxTagContext.lowStockThreshold). */
3837
+ low_stock_threshold?: number | null;
3834
3838
  main_image?: string;
3835
3839
  in_stock: boolean;
3836
3840
  /** Units left — for the "Últimas unidades" tag (ClxProductTagService). */
@@ -3886,6 +3890,10 @@ interface ClxTagContext {
3886
3890
  showStockCount?: boolean;
3887
3891
  /** Discount percentage, for the DISCOUNT tag (0 / undefined = no discount). */
3888
3892
  discountPercent?: number | null;
3893
+ /** System tag kinds this product/variant doesn't show ('STOCK', 'LOW_STOCK', 'OUT_OF_STOCK', 'DISCOUNT'). */
3894
+ hiddenSystemTags?: readonly string[] | null;
3895
+ /** Its own LOW_STOCK threshold; null / undefined = the tag's global stockThreshold. */
3896
+ lowStockThreshold?: number | null;
3889
3897
  }
3890
3898
  /**
3891
3899
  * The product tags configured by the host app (setTags, e.g. from its backend at startup). Once set,
@@ -4010,11 +4018,19 @@ interface ClxVariation {
4010
4018
  name: string;
4011
4019
  description?: string;
4012
4020
  sale_price?: number;
4021
+ /** This variation's discount when the host resolves it per variation (0 = none); undefined = the
4022
+ * product's has_discount / discount_percentage. */
4023
+ discount_percentage?: number;
4013
4024
  sort_order: number;
4014
4025
  images: string[];
4015
4026
  in_stock: boolean;
4016
4027
  stock_quantity?: number;
4017
4028
  specs: Record<string, string>;
4029
+ /** This variation's tags, when the host resolves them per variation; undefined = the product's
4030
+ * (same for the two fields below). */
4031
+ tags?: string[];
4032
+ hidden_system_tags?: string[];
4033
+ low_stock_threshold?: number | null;
4018
4034
  }
4019
4035
  /** st_product_spec_types + st_product_spec_options — fila de ficha técnica */
4020
4036
  interface ClxProductSpec {
@@ -4058,6 +4074,8 @@ interface ClxProductDetailData {
4058
4074
  has_warranty: boolean;
4059
4075
  warranty_period?: number;
4060
4076
  tags: string[];
4077
+ hidden_system_tags?: string[];
4078
+ low_stock_threshold?: number | null;
4061
4079
  currency: string;
4062
4080
  rating: number;
4063
4081
  review_count: number;
@@ -4204,12 +4222,14 @@ declare class ClxProductDetailComponent {
4204
4222
  protected tagLabel(tag: string): string;
4205
4223
  protected tagColor(tag: string): ClxColorInput;
4206
4224
  protected tagVariant(tag: string): codexly_ui.ClxBadgeVariant;
4207
- /** discount_percentage is the primary source (matches this codebase's actual data model: the
4208
- * percentage lives on the product, the price it applies to is sale_price/product_sale_price —
4209
- * see listPrice() above). discount_price is only a fallback for a caller whose backend instead
4210
- * stores a precomputed higher reference price to derive the percentage from. */
4225
+ /** The selected variation's own discount_percentage when the host sends one, else the product's
4226
+ * (it applies on top of the list price — see listPrice() above). discount_price is only a fallback
4227
+ * for a caller whose backend instead stores a precomputed higher reference price to derive the
4228
+ * percentage from. */
4229
+ private readonly _discountPct;
4211
4230
  readonly discount: _angular_core.Signal<number>;
4212
- /** The host's configured tags (ClxProductTagService) for the selected variation, over the gallery. */
4231
+ /** The host's configured tags (ClxProductTagService) for the selected variation, over the gallery —
4232
+ * the variation's own tags and settings when the host sends them, else the product's. */
4213
4233
  protected readonly _badges: _angular_core.Signal<codexly_ui.ClxTagBadge[]>;
4214
4234
  /** An option is available if some in-stock variation matches it together with the rest of the
4215
4235
  * current selection — a sold-out combination is hidden, same "hide, don't disable" rule already