@wix/headless-gift-voucher 0.0.1

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.
Files changed (69) hide show
  1. package/cjs/dist/__mocks__/gift-card.d.ts +14 -0
  2. package/cjs/dist/__mocks__/gift-card.d.ts.map +1 -0
  3. package/cjs/dist/__mocks__/gift-card.js +49 -0
  4. package/cjs/dist/enums/index.d.ts +52 -0
  5. package/cjs/dist/enums/index.d.ts.map +1 -0
  6. package/cjs/dist/enums/index.js +52 -0
  7. package/cjs/dist/react/GiftCard.d.ts +1318 -0
  8. package/cjs/dist/react/GiftCard.d.ts.map +1 -0
  9. package/cjs/dist/react/GiftCard.js +1126 -0
  10. package/cjs/dist/react/core/GiftCard.d.ts +863 -0
  11. package/cjs/dist/react/core/GiftCard.d.ts.map +1 -0
  12. package/cjs/dist/react/core/GiftCard.js +737 -0
  13. package/cjs/dist/react/index.d.ts +2 -0
  14. package/cjs/dist/react/index.d.ts.map +1 -0
  15. package/cjs/dist/react/index.js +1 -0
  16. package/cjs/dist/services/gift-card-checkout-service.d.ts +133 -0
  17. package/cjs/dist/services/gift-card-checkout-service.d.ts.map +1 -0
  18. package/cjs/dist/services/gift-card-checkout-service.js +159 -0
  19. package/cjs/dist/services/gift-card-service.d.ts +102 -0
  20. package/cjs/dist/services/gift-card-service.d.ts.map +1 -0
  21. package/cjs/dist/services/gift-card-service.js +165 -0
  22. package/cjs/dist/services/index.d.ts +3 -0
  23. package/cjs/dist/services/index.d.ts.map +1 -0
  24. package/cjs/dist/services/index.js +2 -0
  25. package/cjs/dist/utils/formatting-utils.d.ts +13 -0
  26. package/cjs/dist/utils/formatting-utils.d.ts.map +1 -0
  27. package/cjs/dist/utils/formatting-utils.js +38 -0
  28. package/cjs/dist/utils/gift-card-utils.d.ts +18 -0
  29. package/cjs/dist/utils/gift-card-utils.d.ts.map +1 -0
  30. package/cjs/dist/utils/gift-card-utils.js +118 -0
  31. package/cjs/dist/utils/validation-utils.d.ts +10 -0
  32. package/cjs/dist/utils/validation-utils.d.ts.map +1 -0
  33. package/cjs/dist/utils/validation-utils.js +24 -0
  34. package/dist/__mocks__/gift-card.d.ts +14 -0
  35. package/dist/__mocks__/gift-card.d.ts.map +1 -0
  36. package/dist/__mocks__/gift-card.js +49 -0
  37. package/dist/enums/index.d.ts +52 -0
  38. package/dist/enums/index.d.ts.map +1 -0
  39. package/dist/enums/index.js +52 -0
  40. package/dist/react/GiftCard.d.ts +1318 -0
  41. package/dist/react/GiftCard.d.ts.map +1 -0
  42. package/dist/react/GiftCard.js +1126 -0
  43. package/dist/react/core/GiftCard.d.ts +863 -0
  44. package/dist/react/core/GiftCard.d.ts.map +1 -0
  45. package/dist/react/core/GiftCard.js +737 -0
  46. package/dist/react/index.d.ts +2 -0
  47. package/dist/react/index.d.ts.map +1 -0
  48. package/dist/react/index.js +1 -0
  49. package/dist/services/gift-card-checkout-service.d.ts +133 -0
  50. package/dist/services/gift-card-checkout-service.d.ts.map +1 -0
  51. package/dist/services/gift-card-checkout-service.js +159 -0
  52. package/dist/services/gift-card-service.d.ts +102 -0
  53. package/dist/services/gift-card-service.d.ts.map +1 -0
  54. package/dist/services/gift-card-service.js +165 -0
  55. package/dist/services/index.d.ts +3 -0
  56. package/dist/services/index.d.ts.map +1 -0
  57. package/dist/services/index.js +2 -0
  58. package/dist/utils/formatting-utils.d.ts +13 -0
  59. package/dist/utils/formatting-utils.d.ts.map +1 -0
  60. package/dist/utils/formatting-utils.js +38 -0
  61. package/dist/utils/gift-card-utils.d.ts +18 -0
  62. package/dist/utils/gift-card-utils.d.ts.map +1 -0
  63. package/dist/utils/gift-card-utils.js +118 -0
  64. package/dist/utils/validation-utils.d.ts +10 -0
  65. package/dist/utils/validation-utils.d.ts.map +1 -0
  66. package/dist/utils/validation-utils.js +24 -0
  67. package/package.json +72 -0
  68. package/react/package.json +4 -0
  69. package/services/package.json +4 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gift-card-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/gift-card-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAEhB,QAAQ,EACT,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAKnE,wBAAgB,eAAe,CAC7B,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAC/B,MAAM,GAAG,IAAI,CAef;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,YAAY,EAAE,MAAM,GACnB,gBAAgB,GAAG,IAAI,CA+BzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,eAAe,GAAG,SAAS,GACnC,gBAAgB,CAclB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,cAAc,EAAE,OAAO,EACvB,wBAAwB,EAAE,OAAO,EACjC,0BAA0B,EAAE,OAAO,GAClC,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,OAAO,EACvB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,IAAI,EACf,gBAAgB,EAAE,MAAM,GACvB,QAAQ,EAAE,CAiDZ"}
@@ -0,0 +1,118 @@
1
+ import { CUSTOM_VARIANT_ID, RISE_APP_ID } from '../enums/index.js';
2
+ /*
3
+ * Gets the image for the currently selected variant, or falls back to product image.
4
+ */
5
+ export function getCurrentImage(product, selectedVariantId) {
6
+ if (!product) {
7
+ return null;
8
+ }
9
+ if (selectedVariantId && selectedVariantId !== CUSTOM_VARIANT_ID) {
10
+ const selectedVariant = product.presetVariants?.find((v) => v._id === selectedVariantId);
11
+ if (selectedVariant?.image) {
12
+ return selectedVariant.image;
13
+ }
14
+ }
15
+ return product.image ?? null;
16
+ }
17
+ /**
18
+ * Gets the current price data based on the selected variant.
19
+ * Returns raw numeric amounts - use Money component for formatting.
20
+ */
21
+ export function getCurrentPriceData(product, selectedVariantId, customAmount) {
22
+ if (!product) {
23
+ return null;
24
+ }
25
+ if (selectedVariantId === CUSTOM_VARIANT_ID) {
26
+ return {
27
+ price: customAmount,
28
+ value: customAmount,
29
+ hasDiscount: false,
30
+ };
31
+ }
32
+ let selectedVariant = product.presetVariants?.find((v) => v._id === selectedVariantId) ??
33
+ product.presetVariants?.[0];
34
+ if (selectedVariant) {
35
+ const price = parseFloat(selectedVariant.price?.amount ?? '0');
36
+ const value = parseFloat(selectedVariant.value?.amount ?? selectedVariant.price?.amount ?? '0');
37
+ return {
38
+ price,
39
+ value,
40
+ hasDiscount: price < value,
41
+ };
42
+ }
43
+ return null;
44
+ }
45
+ /**
46
+ * Gets the min/max values for custom amount validation from the product.
47
+ */
48
+ export function getCustomAmountData(product) {
49
+ const customVariant = product?.customVariant;
50
+ if (!customVariant) {
51
+ return { min: null, max: null };
52
+ }
53
+ return {
54
+ min: customVariant.minValue?.amount
55
+ ? parseFloat(customVariant.minValue.amount)
56
+ : 1,
57
+ max: customVariant.maxValue?.amount
58
+ ? parseFloat(customVariant.maxValue.amount)
59
+ : null,
60
+ };
61
+ }
62
+ export function canAddToCartCheck(product, variantId, isGiftPurchase, isCustomAmountValidCheck, isRecipientEmailValidCheck) {
63
+ if (!product || !variantId)
64
+ return false;
65
+ if (variantId === CUSTOM_VARIANT_ID && !isCustomAmountValidCheck)
66
+ return false;
67
+ if (isGiftPurchase && !isRecipientEmailValidCheck)
68
+ return false;
69
+ return true;
70
+ }
71
+ /**
72
+ * Converts the product data to line items for the cart API.
73
+ */
74
+ export function productToLineItems(product, currency, variantId, customAmount, qty, isGiftPurchase, recipientEmail, recipientName, deliverAt, recipientMessage) {
75
+ if (!product || !product._id || !variantId)
76
+ return [];
77
+ const options = {
78
+ quantity: qty,
79
+ currency,
80
+ wixGiftCardsAppNewCatalog: true,
81
+ };
82
+ // Variant or custom amount
83
+ if (variantId === CUSTOM_VARIANT_ID) {
84
+ options.customAmount = customAmount;
85
+ }
86
+ else {
87
+ options.variantId = variantId;
88
+ }
89
+ // Gifting info (only when isGift)
90
+ if (isGiftPurchase) {
91
+ const nameParts = recipientName.split(' ').filter(Boolean);
92
+ const firstName = nameParts[0] || '';
93
+ const lastName = nameParts.slice(1).join(' ');
94
+ options.giftingInfo = {
95
+ recipientInfo: {
96
+ firstName,
97
+ lastName,
98
+ email: recipientEmail,
99
+ },
100
+ };
101
+ if (recipientMessage && recipientMessage.length > 0) {
102
+ options.giftingInfo.greetingMessage = recipientMessage;
103
+ }
104
+ if (deliverAt) {
105
+ options.giftingInfo.deliverAt = deliverAt;
106
+ }
107
+ }
108
+ return [
109
+ {
110
+ quantity: qty,
111
+ catalogReference: {
112
+ appId: RISE_APP_ID,
113
+ catalogItemId: product._id,
114
+ options,
115
+ },
116
+ },
117
+ ];
118
+ }
@@ -0,0 +1,10 @@
1
+ import { CustomAmountData } from '../services/gift-card-checkout-service.js';
2
+ /**
3
+ * Validates if the custom amount is within the allowed range.
4
+ */
5
+ export declare function validateCustomAmount(amount: number, customAmountData: CustomAmountData): boolean;
6
+ /**
7
+ * Validates if an email address is valid using a simple regex pattern.
8
+ */
9
+ export declare function validateEmail(email: string): boolean;
10
+ //# sourceMappingURL=validation-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/validation-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAYT;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOpD"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Validates if the custom amount is within the allowed range.
3
+ */
4
+ export function validateCustomAmount(amount, customAmountData) {
5
+ const { min, max } = customAmountData;
6
+ if (min !== null && amount < min) {
7
+ return false;
8
+ }
9
+ if (max !== null && amount > max) {
10
+ return false;
11
+ }
12
+ return amount >= 1;
13
+ }
14
+ /**
15
+ * Validates if an email address is valid using a simple regex pattern.
16
+ */
17
+ export function validateEmail(email) {
18
+ if (!email || email.trim() === '') {
19
+ return false;
20
+ }
21
+ // Simple email regex pattern
22
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
23
+ return emailRegex.test(email.trim());
24
+ }
@@ -0,0 +1,14 @@
1
+ import type { GiftCardProduct } from '../services/gift-card-service.js';
2
+ export declare const mockGiftCardProductImage = "wix:image://default-image.jpg";
3
+ export declare const mockGiftCardProductVariantImage = "wix:image://variant-image.jpg";
4
+ export declare const regularVariantId = "regular";
5
+ export declare const regularVariantAmount = 50;
6
+ export declare const withImageVariantId = "with-image";
7
+ export declare const withImageVariantAmount = 80;
8
+ export declare const withDiscountVariantId = "with-discount";
9
+ export declare const withDiscountVariantPrice = 100;
10
+ export declare const withDiscountVariantValue = 150;
11
+ export declare const giftCardProductMock: GiftCardProduct;
12
+ export declare const giftCardProductNoCustomVariantMock: GiftCardProduct;
13
+ export declare function createMockGiftCardProduct(overrides?: Partial<GiftCardProduct>): GiftCardProduct;
14
+ //# sourceMappingURL=gift-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gift-card.d.ts","sourceRoot":"","sources":["../../src/__mocks__/gift-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AACxE,eAAO,MAAM,+BAA+B,kCAAkC,CAAC;AAC/E,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AACrD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,eAAO,MAAM,mBAAmB,EAAE,eA6BjC,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,eAGhD,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GACvC,eAAe,CAKjB"}
@@ -0,0 +1,49 @@
1
+ export const mockGiftCardProductImage = 'wix:image://default-image.jpg';
2
+ export const mockGiftCardProductVariantImage = 'wix:image://variant-image.jpg';
3
+ export const regularVariantId = 'regular';
4
+ export const regularVariantAmount = 50;
5
+ export const withImageVariantId = 'with-image';
6
+ export const withImageVariantAmount = 80;
7
+ export const withDiscountVariantId = 'with-discount';
8
+ export const withDiscountVariantPrice = 100;
9
+ export const withDiscountVariantValue = 150;
10
+ export const giftCardProductMock = {
11
+ _id: 'gift-card-1',
12
+ name: 'Test Gift Card',
13
+ description: 'A test gift card description',
14
+ image: mockGiftCardProductImage,
15
+ presetVariants: [
16
+ {
17
+ _id: regularVariantId,
18
+ price: { amount: regularVariantAmount.toString() },
19
+ value: { amount: regularVariantAmount.toString() },
20
+ image: undefined,
21
+ },
22
+ {
23
+ _id: withImageVariantId,
24
+ price: { amount: withImageVariantAmount.toString() },
25
+ value: { amount: withImageVariantAmount.toString() },
26
+ image: mockGiftCardProductVariantImage,
27
+ },
28
+ {
29
+ _id: withDiscountVariantId,
30
+ price: { amount: withDiscountVariantPrice.toString() },
31
+ value: { amount: withDiscountVariantValue.toString() },
32
+ image: undefined,
33
+ },
34
+ ],
35
+ customVariant: {
36
+ minValue: { amount: '2' },
37
+ maxValue: { amount: '6' },
38
+ },
39
+ };
40
+ export const giftCardProductNoCustomVariantMock = {
41
+ ...giftCardProductMock,
42
+ customVariant: undefined,
43
+ };
44
+ export function createMockGiftCardProduct(overrides = {}) {
45
+ return {
46
+ ...giftCardProductMock,
47
+ ...overrides,
48
+ };
49
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Special variant ID for custom amount selection.
3
+ * Used when the user wants to enter a custom gift card amount.
4
+ */
5
+ export declare const CUSTOM_VARIANT_ID: "custom";
6
+ /**
7
+ * RISE app ID for gift card catalog reference
8
+ */
9
+ export declare const RISE_APP_ID = "d80111c5-a0f4-47a8-b63a-65b54d774a27";
10
+ /**
11
+ * Default currency code when not provided via config or site settings.
12
+ */
13
+ export declare const DEFAULT_CURRENCY_CODE = "EUR";
14
+ /**
15
+ * Default locale code when not provided via config or i18n service.
16
+ */
17
+ export declare const DEFAULT_LOCALE = "en-US";
18
+ /**
19
+ * Default loading text when not provided.
20
+ */
21
+ export declare const DEFAULT_LOADING_TEXT = "Loading...";
22
+ /**
23
+ * Test IDs for gift card components.
24
+ */
25
+ export declare enum TestIds {
26
+ giftCardRoot = "gift-card-root",
27
+ giftCardRaw = "gift-card-raw",
28
+ giftCardImage = "gift-card-image",
29
+ giftCardName = "gift-card-name",
30
+ giftCardDescription = "gift-card-description",
31
+ giftCardLoading = "gift-card-loading",
32
+ giftCardError = "gift-card-error",
33
+ giftCardPresetVariants = "gift-card-preset-variants",
34
+ giftCardPresetVariantRepeater = "gift-card-preset-variant-repeater",
35
+ giftCardPresetVariant = "gift-card-preset-variant",
36
+ giftCardPresetVariantAmount = "gift-card-preset-variant-amount",
37
+ giftCardCurrentPrice = "gift-card-current-price",
38
+ giftCardCustomVariantTrigger = "gift-card-custom-variant-trigger",
39
+ giftCardCustomAmountInput = "gift-card-custom-amount-input",
40
+ giftCardQuantity = "gift-card-quantity",
41
+ giftCardGiftToggle = "gift-card-gift-toggle",
42
+ giftCardGiftToggleSomeone = "gift-card-gift-toggle-someone",
43
+ giftCardGiftToggleMyself = "gift-card-gift-toggle-myself",
44
+ giftCardRecipientForm = "gift-card-recipient-form",
45
+ giftCardRecipientEmail = "gift-card-recipient-email",
46
+ giftCardRecipientName = "gift-card-recipient-name",
47
+ giftCardRecipientDate = "gift-card-recipient-date",
48
+ giftCardRecipientMessage = "gift-card-recipient-message",
49
+ giftCardAddToCart = "gift-card-add-to-cart",
50
+ giftCardBuyNow = "gift-card-buy-now"
51
+ }
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD;;GAEG;AACH,oBAAY,OAAO;IACjB,YAAY,mBAAmB;IAC/B,WAAW,kBAAkB;IAC7B,aAAa,oBAAoB;IACjC,YAAY,mBAAmB;IAC/B,mBAAmB,0BAA0B;IAC7C,eAAe,sBAAsB;IACrC,aAAa,oBAAoB;IACjC,sBAAsB,8BAA8B;IACpD,6BAA6B,sCAAsC;IACnE,qBAAqB,6BAA6B;IAClD,2BAA2B,oCAAoC;IAC/D,oBAAoB,4BAA4B;IAChD,4BAA4B,qCAAqC;IACjE,yBAAyB,kCAAkC;IAC3D,gBAAgB,uBAAuB;IACvC,kBAAkB,0BAA0B;IAC5C,yBAAyB,kCAAkC;IAC3D,wBAAwB,iCAAiC;IACzD,qBAAqB,6BAA6B;IAClD,sBAAsB,8BAA8B;IACpD,qBAAqB,6BAA6B;IAClD,qBAAqB,6BAA6B;IAClD,wBAAwB,gCAAgC;IACxD,iBAAiB,0BAA0B;IAC3C,cAAc,sBAAsB;CACrC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Special variant ID for custom amount selection.
3
+ * Used when the user wants to enter a custom gift card amount.
4
+ */
5
+ export const CUSTOM_VARIANT_ID = 'custom';
6
+ /**
7
+ * RISE app ID for gift card catalog reference
8
+ */
9
+ export const RISE_APP_ID = 'd80111c5-a0f4-47a8-b63a-65b54d774a27';
10
+ /**
11
+ * Default currency code when not provided via config or site settings.
12
+ */
13
+ export const DEFAULT_CURRENCY_CODE = 'EUR';
14
+ /**
15
+ * Default locale code when not provided via config or i18n service.
16
+ */
17
+ export const DEFAULT_LOCALE = 'en-US';
18
+ /**
19
+ * Default loading text when not provided.
20
+ */
21
+ export const DEFAULT_LOADING_TEXT = 'Loading...';
22
+ /**
23
+ * Test IDs for gift card components.
24
+ */
25
+ export var TestIds;
26
+ (function (TestIds) {
27
+ TestIds["giftCardRoot"] = "gift-card-root";
28
+ TestIds["giftCardRaw"] = "gift-card-raw";
29
+ TestIds["giftCardImage"] = "gift-card-image";
30
+ TestIds["giftCardName"] = "gift-card-name";
31
+ TestIds["giftCardDescription"] = "gift-card-description";
32
+ TestIds["giftCardLoading"] = "gift-card-loading";
33
+ TestIds["giftCardError"] = "gift-card-error";
34
+ TestIds["giftCardPresetVariants"] = "gift-card-preset-variants";
35
+ TestIds["giftCardPresetVariantRepeater"] = "gift-card-preset-variant-repeater";
36
+ TestIds["giftCardPresetVariant"] = "gift-card-preset-variant";
37
+ TestIds["giftCardPresetVariantAmount"] = "gift-card-preset-variant-amount";
38
+ TestIds["giftCardCurrentPrice"] = "gift-card-current-price";
39
+ TestIds["giftCardCustomVariantTrigger"] = "gift-card-custom-variant-trigger";
40
+ TestIds["giftCardCustomAmountInput"] = "gift-card-custom-amount-input";
41
+ TestIds["giftCardQuantity"] = "gift-card-quantity";
42
+ TestIds["giftCardGiftToggle"] = "gift-card-gift-toggle";
43
+ TestIds["giftCardGiftToggleSomeone"] = "gift-card-gift-toggle-someone";
44
+ TestIds["giftCardGiftToggleMyself"] = "gift-card-gift-toggle-myself";
45
+ TestIds["giftCardRecipientForm"] = "gift-card-recipient-form";
46
+ TestIds["giftCardRecipientEmail"] = "gift-card-recipient-email";
47
+ TestIds["giftCardRecipientName"] = "gift-card-recipient-name";
48
+ TestIds["giftCardRecipientDate"] = "gift-card-recipient-date";
49
+ TestIds["giftCardRecipientMessage"] = "gift-card-recipient-message";
50
+ TestIds["giftCardAddToCart"] = "gift-card-add-to-cart";
51
+ TestIds["giftCardBuyNow"] = "gift-card-buy-now";
52
+ })(TestIds || (TestIds = {}));