@liquidcommerce/elements-sdk 2.5.6-beta.3 → 2.5.6-beta.5
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/README.md +81 -10
- package/dist/index.esm.js +11875 -11092
- package/dist/types/core/client/client-action.service.d.ts +0 -4
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +0 -3
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +72 -80
- package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
- package/dist/types/enums/core.enum.d.ts +10 -6
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +0 -1
- package/dist/types/interfaces/core.interface.d.ts +3 -1
- package/dist/types/modules/checkout/checkout.commands.d.ts +25 -23
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +14 -0
- package/dist/types/modules/checkout/components/checkout-buyer-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/{checkout-information-section.component.d.ts → checkout-buyer.component.d.ts} +5 -5
- package/dist/types/modules/checkout/components/checkout-deliver-to-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +13 -0
- package/dist/types/modules/checkout/components/checkout-information.component.d.ts +17 -0
- package/dist/types/modules/checkout/components/{checkout-summary-section.component.d.ts → checkout-order-summary.component.d.ts} +1 -1
- package/dist/types/modules/checkout/components/checkout-payment-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +47 -0
- package/dist/types/modules/checkout/components/{summary/checkout-place-order-button.component.d.ts → checkout-place-order-button.component.d.ts} +1 -5
- package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/{information/checkout-stripe-form.component.d.ts → checkout-stripe-form.component.d.ts} +5 -3
- package/dist/types/modules/checkout/components/index.d.ts +22 -18
- package/dist/types/modules/checkout/constant.d.ts +0 -1
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +4 -4
- package/dist/types/modules/ui-components/input/input.component.d.ts +4 -4
- package/docs/CONFIGURATION.md +20 -1
- package/package.json +5 -5
- package/umd/elements.js +1 -1
- package/dist/types/modules/checkout/checkout.commands.helper.d.ts +0 -13
- package/dist/types/modules/checkout/components/information/checkout-billing-form.component.d.ts +0 -18
- package/dist/types/modules/checkout/components/information/checkout-buyer-information-form.component.d.ts +0 -12
- package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +0 -17
- package/dist/types/modules/checkout/components/information/checkout-payment-form.component.d.ts +0 -21
- /package/dist/types/modules/checkout/components/{summary/checkout-amounts.component.d.ts → checkout-amounts.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-completed.component.d.ts → checkout-completed.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-gift-cards.component.d.ts → checkout-gift-cards.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-item-quantity.component.d.ts → checkout-item-quantity.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-item.component.d.ts → checkout-item.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-items.component.d.ts → checkout-items.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-presale-expired.component.d.ts → checkout-presale-expired.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-promo-code.component.d.ts → checkout-promo-code.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-tips.component.d.ts → checkout-tips.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/promo-pc-gc.component.d.ts → promo-pc-gc.component.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponent
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
export interface IBirthdateValidation {
|
|
3
3
|
required?: boolean;
|
|
4
4
|
minYear?: number;
|
|
@@ -16,7 +16,6 @@ export interface IBirthdateInputComponentParams {
|
|
|
16
16
|
label?: string;
|
|
17
17
|
name: string;
|
|
18
18
|
disabled?: boolean;
|
|
19
|
-
storePath?: string;
|
|
20
19
|
}
|
|
21
20
|
export declare class BirthdateInputComponent extends BaseComponent<IBirthdateInputComponentParams, null> {
|
|
22
21
|
get hostClasses(): string[];
|
|
@@ -24,8 +23,7 @@ export declare class BirthdateInputComponent extends BaseComponent<IBirthdateInp
|
|
|
24
23
|
private dayInput;
|
|
25
24
|
private yearInput;
|
|
26
25
|
private errorContainer;
|
|
27
|
-
|
|
28
|
-
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
26
|
+
private validationTimeout;
|
|
29
27
|
afterRender(): void;
|
|
30
28
|
private populateInitialValue;
|
|
31
29
|
private setupEventListeners;
|
|
@@ -34,6 +32,8 @@ export declare class BirthdateInputComponent extends BaseComponent<IBirthdateInp
|
|
|
34
32
|
private formatYear;
|
|
35
33
|
private handleNavigation;
|
|
36
34
|
private handleChange;
|
|
35
|
+
private isFieldsComplete;
|
|
36
|
+
private scheduleValidation;
|
|
37
37
|
private getFormattedValue;
|
|
38
38
|
private validateDate;
|
|
39
39
|
private calculateAge;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponent
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
export interface IInputValidation {
|
|
3
3
|
required?: boolean;
|
|
4
4
|
min?: number;
|
|
@@ -19,21 +19,21 @@ export interface IInputComponentParams {
|
|
|
19
19
|
name: string;
|
|
20
20
|
autocomplete?: boolean;
|
|
21
21
|
disabled?: boolean;
|
|
22
|
-
storePath?: string;
|
|
23
22
|
}
|
|
24
23
|
export declare class InputComponent extends BaseComponent<IInputComponentParams, null> {
|
|
25
24
|
get hostClasses(): string[];
|
|
26
25
|
private inputElement;
|
|
27
26
|
private errorContainer;
|
|
28
|
-
|
|
29
|
-
onStoreChanged(changes: IOnStoreChanged[]): boolean;
|
|
27
|
+
private validationTimeout;
|
|
30
28
|
private handlePhoneKeydown;
|
|
31
29
|
private formatPhoneNumber;
|
|
32
30
|
private formatDate;
|
|
33
31
|
private validateEmail;
|
|
34
32
|
private validateTel;
|
|
35
33
|
private validateDate;
|
|
34
|
+
private isFieldComplete;
|
|
36
35
|
private validateInput;
|
|
36
|
+
private scheduleValidation;
|
|
37
37
|
private showErrors;
|
|
38
38
|
private clearErrors;
|
|
39
39
|
getValue(): string;
|
package/docs/CONFIGURATION.md
CHANGED
|
@@ -329,8 +329,16 @@ data-cart-button="below:#main-navigation" <!-- Place below the target -->
|
|
|
329
329
|
data-cart-button="below:main-navigation" <!-- Also works without # prefix -->
|
|
330
330
|
data-cart-button="replace:.old-cart" <!-- Replace the target -->
|
|
331
331
|
data-cart-button="inside:.header .nav" <!-- Place inside the target (default) -->
|
|
332
|
+
|
|
333
|
+
<!-- Floating cart button (no badge) -->
|
|
334
|
+
data-cart-button="" <!-- Empty value = floating button -->
|
|
332
335
|
```
|
|
333
336
|
|
|
337
|
+
**Smart Fallback Behavior:**
|
|
338
|
+
- If the target element is not found, automatically falls back to floating cart button
|
|
339
|
+
- If attribute is present but empty (`data-cart-button=""`), creates floating cart button without badge
|
|
340
|
+
- Element IDs are automatically prefixed with `#` if needed (e.g., `header-cart` becomes `#header-cart`)
|
|
341
|
+
|
|
334
342
|
#### `data-cart-badge-button`
|
|
335
343
|
|
|
336
344
|
**Type:** `string`
|
|
@@ -351,8 +359,17 @@ data-cart-badge-button="above:.header .logo" <!-- Place above the target --
|
|
|
351
359
|
data-cart-badge-button="below:#main-navigation" <!-- Place below the target -->
|
|
352
360
|
data-cart-badge-button="replace:.old-cart" <!-- Replace the target -->
|
|
353
361
|
data-cart-badge-button="inside:.header .nav" <!-- Place inside the target (default) -->
|
|
362
|
+
|
|
363
|
+
<!-- Floating cart button with badge (default) -->
|
|
364
|
+
data-cart-badge-button="" <!-- Empty value = floating button with badge -->
|
|
354
365
|
```
|
|
355
366
|
|
|
367
|
+
**Smart Fallback Behavior:**
|
|
368
|
+
- If the target element is not found, automatically falls back to floating cart button with badge
|
|
369
|
+
- If attribute is present but empty (`data-cart-badge-button=""`), creates floating cart button with badge
|
|
370
|
+
- Element IDs are automatically prefixed with `#` if needed
|
|
371
|
+
- If neither `data-cart-button` nor `data-cart-badge-button` is provided, defaults to floating cart button with badge
|
|
372
|
+
|
|
356
373
|
**Position Prefixes:**
|
|
357
374
|
- `above:` - Place above the target element
|
|
358
375
|
- `below:` - Place below the target element
|
|
@@ -363,12 +380,14 @@ data-cart-badge-button="inside:.header .nav" <!-- Place inside the target (d
|
|
|
363
380
|
|
|
364
381
|
**Type:** flag (no value)
|
|
365
382
|
|
|
366
|
-
Hide cart button completely.
|
|
383
|
+
Hide cart button completely. Use this when you want to manage cart display manually via `client.actions.cart.openCart()`.
|
|
367
384
|
|
|
368
385
|
```html
|
|
369
386
|
data-cart-button-hidden
|
|
370
387
|
```
|
|
371
388
|
|
|
389
|
+
**Important:** When this attribute is present, the SDK will skip all cart button setup, including floating buttons. This takes precedence over `data-cart-button` and `data-cart-badge-button` attributes.
|
|
390
|
+
|
|
372
391
|
### Cart Button Examples
|
|
373
392
|
|
|
374
393
|
**Simple cart button (no badge):**
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "LiquidCommerce Elements SDK",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "LiquidCommerce Team",
|
|
6
|
-
"version": "2.5.6-beta.
|
|
6
|
+
"version": "2.5.6-beta.5",
|
|
7
7
|
"homepage": "https://docs.liquidcommerce.co/elements-sdk",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"type-check": "tsc --noEmit",
|
|
51
51
|
"lint": "pnpm biome lint --write",
|
|
52
52
|
"format": "biome format --write",
|
|
53
|
-
"check": "pnpm biome check --write",
|
|
53
|
+
"check": "pnpm biome check --write .",
|
|
54
54
|
"fl": "pnpm check && pnpm build:dev",
|
|
55
55
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
56
56
|
"clean": "rm -rf dist umd",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@semantic-release/changelog": "^6.0.3",
|
|
84
84
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
85
85
|
"@semantic-release/git": "^10.0.1",
|
|
86
|
-
"@semantic-release/github": "^12.0.
|
|
86
|
+
"@semantic-release/github": "^12.0.2",
|
|
87
87
|
"@semantic-release/npm": "^13.1.1",
|
|
88
88
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
89
89
|
"@types/core-js": "^2.5.8",
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"conventional-changelog-cli": "^5.0.0",
|
|
92
92
|
"husky": "^9.1.7",
|
|
93
93
|
"process": "^0.11.10",
|
|
94
|
-
"rollup": "^4.
|
|
94
|
+
"rollup": "^4.53.2",
|
|
95
95
|
"rollup-obfuscator": "^4.1.1",
|
|
96
96
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
97
|
-
"semantic-release": "^25.0.
|
|
97
|
+
"semantic-release": "^25.0.2",
|
|
98
98
|
"ts-node": "^10.9.2",
|
|
99
99
|
"typescript": "^5.9.3"
|
|
100
100
|
},
|