@meeovi/layer-shared 1.0.2 → 1.0.4
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/app/components/Gallery/Gallery.vue +2 -2
- package/app/components/ui/CategoryCard/types.ts +5 -5
- package/app/components/ui/ProductCardHorizontal/types.ts +3 -6
- package/app/components/ui/PurchaseCard/types.ts +3 -3
- package/app/components/ui/Review/types.ts +3 -3
- package/app/composables/useContent.ts +1 -1
- package/app/composables/useDirectusRequest.ts +1 -1
- package/app/types/ui.ts +23 -0
- package/dist/app/components/Gallery/__tests__/Gallery.spec.d.ts +1 -0
- package/dist/app/components/Gallery/__tests__/Gallery.spec.js +12 -0
- package/dist/app/components/Heading/__tests__/Heading.spec.d.ts +1 -0
- package/dist/app/components/Heading/__tests__/Heading.spec.js +12 -0
- package/dist/app/components/Heading/types.d.ts +5 -0
- package/dist/app/components/Heading/types.js +1 -0
- package/dist/app/components/ui/AccordionItem/__tests__/AccordionItem.spec.d.ts +1 -0
- package/dist/app/components/ui/AccordionItem/__tests__/AccordionItem.spec.js +12 -0
- package/dist/app/components/ui/AccordionItem/types.d.ts +5 -0
- package/dist/app/components/ui/AccordionItem/types.js +1 -0
- package/dist/app/components/ui/Alert/types.d.ts +5 -0
- package/dist/app/components/ui/Alert/types.js +1 -0
- package/dist/app/components/ui/Breadcrumbs/__tests__/Breadcrumbs.spec.d.ts +1 -0
- package/dist/app/components/ui/Breadcrumbs/__tests__/Breadcrumbs.spec.js +12 -0
- package/dist/app/components/ui/Breadcrumbs/types.d.ts +7 -0
- package/dist/app/components/ui/Breadcrumbs/types.js +1 -0
- package/dist/app/components/ui/CartProductCard/types.d.ts +17 -0
- package/dist/app/components/ui/CartProductCard/types.js +1 -0
- package/dist/app/components/ui/CategoryCard/types.d.ts +8 -0
- package/dist/app/components/ui/CategoryCard/types.js +1 -0
- package/dist/app/components/ui/Display/types.d.ts +12 -0
- package/dist/app/components/ui/Display/types.js +1 -0
- package/dist/app/components/ui/Divider/__tests__/Divider.spec.d.ts +1 -0
- package/dist/app/components/ui/Divider/__tests__/Divider.spec.js +8 -0
- package/dist/app/components/ui/Form/__tests__/FormHelperText.spec.d.ts +1 -0
- package/dist/app/components/ui/Form/__tests__/FormHelperText.spec.js +8 -0
- package/dist/app/components/ui/Form/__tests__/FormLabel.spec.d.ts +1 -0
- package/dist/app/components/ui/Form/__tests__/FormLabel.spec.js +8 -0
- package/dist/app/components/ui/Hero/types.d.ts +10 -0
- package/dist/app/components/ui/Hero/types.js +1 -0
- package/dist/app/components/ui/Modal/types.d.ts +7 -0
- package/dist/app/components/ui/Modal/types.js +1 -0
- package/dist/app/components/ui/Overlay/__tests__/Overlay.spec.d.ts +1 -0
- package/dist/app/components/ui/Overlay/__tests__/Overlay.spec.js +12 -0
- package/dist/app/components/ui/Overlay/types.d.ts +3 -0
- package/dist/app/components/ui/Overlay/types.js +1 -0
- package/dist/app/components/ui/Pagination/__tests__/Pagination.spec.d.ts +1 -0
- package/dist/app/components/ui/Pagination/__tests__/Pagination.spec.js +15 -0
- package/dist/app/components/ui/Pagination/types.d.ts +6 -0
- package/dist/app/components/ui/Pagination/types.js +1 -0
- package/dist/app/components/ui/ProductCard/__tests__/ProductCard.spec.d.ts +1 -0
- package/dist/app/components/ui/ProductCard/__tests__/ProductCard.spec.js +14 -0
- package/dist/app/components/ui/ProductCard/types.d.ts +12 -0
- package/dist/app/components/ui/ProductCard/types.js +1 -0
- package/dist/app/components/ui/ProductCardHorizontal/__tests__/ProductCardHorizontal.spec.d.ts +1 -0
- package/dist/app/components/ui/ProductCardHorizontal/__tests__/ProductCardHorizontal.spec.js +34 -0
- package/dist/app/components/ui/ProductCardHorizontal/types.d.ts +4 -0
- package/dist/app/components/ui/ProductCardHorizontal/types.js +1 -0
- package/dist/app/components/ui/PurchaseCard/__tests__/PurchaseCard.spec.d.ts +1 -0
- package/dist/app/components/ui/PurchaseCard/__tests__/PurchaseCard.spec.js +12 -0
- package/dist/app/components/ui/PurchaseCard/types.d.ts +4 -0
- package/dist/app/components/ui/PurchaseCard/types.js +1 -0
- package/dist/app/components/ui/QuantitySelector/__tests__/QuantitySelector.spec.d.ts +1 -0
- package/dist/app/components/ui/QuantitySelector/__tests__/QuantitySelector.spec.js +13 -0
- package/dist/app/components/ui/QuantitySelector/types.d.ts +5 -0
- package/dist/app/components/ui/QuantitySelector/types.js +1 -0
- package/dist/app/components/ui/Review/__tests__/Review.spec.d.ts +1 -0
- package/dist/app/components/ui/Review/__tests__/Review.spec.js +13 -0
- package/dist/app/components/ui/Review/types.d.ts +4 -0
- package/dist/app/components/ui/Review/types.js +1 -0
- package/dist/app/components/ui/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/dist/app/components/ui/Tag/__tests__/Tag.spec.js +8 -0
- package/dist/app/components/ui/Tag/types.d.ts +14 -0
- package/dist/app/components/ui/Tag/types.js +11 -0
- package/dist/app/composables/globals/useAdminTable.d.ts +3 -0
- package/dist/app/composables/globals/useAdminTable.js +9 -0
- package/dist/app/composables/globals/useCustomFetch.d.ts +2 -0
- package/dist/app/composables/globals/useCustomFetch.js +8 -0
- package/dist/app/composables/globals/useDirectusField.d.ts +10 -0
- package/dist/app/composables/globals/useDirectusField.js +119 -0
- package/dist/app/composables/globals/useDirectusForm.d.ts +10 -0
- package/dist/app/composables/globals/useDirectusForm.js +66 -0
- package/dist/app/composables/globals/useFileManager.d.ts +14 -0
- package/dist/app/composables/globals/useFileManager.js +62 -0
- package/dist/app/composables/globals/useLivePreview.d.ts +1 -0
- package/dist/app/composables/globals/useLivePreview.js +16 -0
- package/dist/app/composables/globals/useLoading.d.ts +6 -0
- package/dist/app/composables/globals/useLoading.js +19 -0
- package/dist/app/composables/globals/useNotifications.d.ts +35 -0
- package/dist/app/composables/globals/useNotifications.js +133 -0
- package/dist/app/composables/globals/useRichText.d.ts +1 -0
- package/dist/app/composables/globals/useRichText.js +32 -0
- package/dist/app/composables/globals/useServerRootMixin.d.ts +3 -0
- package/dist/app/composables/globals/useServerRootMixin.js +15 -0
- package/dist/app/composables/globals/useVisualEditing.d.ts +17 -0
- package/dist/app/composables/globals/useVisualEditing.js +27 -0
- package/dist/app/composables/mappers/createMapper.d.ts +2 -0
- package/dist/app/composables/mappers/createMapper.js +6 -0
- package/dist/app/composables/mappers/errors.d.ts +6 -0
- package/dist/app/composables/mappers/errors.js +12 -0
- package/dist/app/composables/mappers/index.d.ts +6 -0
- package/dist/app/composables/mappers/index.js +7 -0
- package/dist/app/composables/mappers/registry.d.ts +5 -0
- package/dist/app/composables/mappers/registry.js +18 -0
- package/dist/app/composables/mappers/testHarness.d.ts +13 -0
- package/dist/app/composables/mappers/testHarness.js +98 -0
- package/dist/app/composables/mappers/types.d.ts +5 -0
- package/dist/app/composables/mappers/types.js +1 -0
- package/dist/app/composables/mappers/zodMapper.d.ts +9 -0
- package/dist/app/composables/mappers/zodMapper.js +17 -0
- package/dist/app/composables/media/useFile.d.ts +2 -0
- package/dist/app/composables/media/useFile.js +4 -0
- package/dist/app/composables/media/useMediaCenter.d.ts +29 -0
- package/dist/app/composables/media/useMediaCenter.js +321 -0
- package/dist/app/composables/media/useVideojs.d.ts +11 -0
- package/dist/app/composables/media/useVideojs.js +42 -0
- package/dist/app/composables/registry.d.ts +3 -0
- package/dist/app/composables/registry.js +10 -0
- package/dist/app/composables/schema/commerce/attributes.d.ts +7 -0
- package/dist/app/composables/schema/commerce/attributes.js +1 -0
- package/dist/app/composables/schema/commerce/blocks.d.ts +6 -0
- package/dist/app/composables/schema/commerce/blocks.js +1 -0
- package/dist/app/composables/schema/commerce/bundleProduts.d.ts +10 -0
- package/dist/app/composables/schema/commerce/bundleProduts.js +1 -0
- package/dist/app/composables/schema/commerce/cart.d.ts +29 -0
- package/dist/app/composables/schema/commerce/cart.js +1 -0
- package/dist/app/composables/schema/commerce/category.d.ts +12 -0
- package/dist/app/composables/schema/commerce/category.js +1 -0
- package/dist/app/composables/schema/commerce/checkout.d.ts +9 -0
- package/dist/app/composables/schema/commerce/checkout.js +1 -0
- package/dist/app/composables/schema/commerce/company.d.ts +7 -0
- package/dist/app/composables/schema/commerce/company.js +1 -0
- package/dist/app/composables/schema/commerce/configurableProducts.d.ts +12 -0
- package/dist/app/composables/schema/commerce/configurableProducts.js +1 -0
- package/dist/app/composables/schema/commerce/coupons.d.ts +9 -0
- package/dist/app/composables/schema/commerce/coupons.js +1 -0
- package/dist/app/composables/schema/commerce/credit-memos.d.ts +48 -0
- package/dist/app/composables/schema/commerce/credit-memos.js +1 -0
- package/dist/app/composables/schema/commerce/digitalProducts.d.ts +11 -0
- package/dist/app/composables/schema/commerce/digitalProducts.js +1 -0
- package/dist/app/composables/schema/commerce/directory.d.ts +7 -0
- package/dist/app/composables/schema/commerce/directory.js +1 -0
- package/dist/app/composables/schema/commerce/events.d.ts +27 -0
- package/dist/app/composables/schema/commerce/events.js +1 -0
- package/dist/app/composables/schema/commerce/gift-registry.d.ts +7 -0
- package/dist/app/composables/schema/commerce/gift-registry.js +1 -0
- package/dist/app/composables/schema/commerce/guest-cart.d.ts +4 -0
- package/dist/app/composables/schema/commerce/guest-cart.js +1 -0
- package/dist/app/composables/schema/commerce/inventory.d.ts +8 -0
- package/dist/app/composables/schema/commerce/inventory.js +1 -0
- package/dist/app/composables/schema/commerce/invoices.d.ts +47 -0
- package/dist/app/composables/schema/commerce/invoices.js +1 -0
- package/dist/app/composables/schema/commerce/orders.d.ts +32 -0
- package/dist/app/composables/schema/commerce/orders.js +1 -0
- package/dist/app/composables/schema/commerce/payments.d.ts +8 -0
- package/dist/app/composables/schema/commerce/payments.js +1 -0
- package/dist/app/composables/schema/commerce/price.d.ts +9 -0
- package/dist/app/composables/schema/commerce/price.js +1 -0
- package/dist/app/composables/schema/commerce/product-types.d.ts +6 -0
- package/dist/app/composables/schema/commerce/product-types.js +1 -0
- package/dist/app/composables/schema/commerce/product.d.ts +20 -0
- package/dist/app/composables/schema/commerce/product.js +1 -0
- package/dist/app/composables/schema/commerce/quotes.d.ts +13 -0
- package/dist/app/composables/schema/commerce/quotes.js +1 -0
- package/dist/app/composables/schema/commerce/requisition-lists.d.ts +9 -0
- package/dist/app/composables/schema/commerce/requisition-lists.js +1 -0
- package/dist/app/composables/schema/commerce/returns.d.ts +8 -0
- package/dist/app/composables/schema/commerce/returns.js +1 -0
- package/dist/app/composables/schema/commerce/reward.d.ts +7 -0
- package/dist/app/composables/schema/commerce/reward.js +1 -0
- package/dist/app/composables/schema/commerce/rules.d.ts +7 -0
- package/dist/app/composables/schema/commerce/rules.js +1 -0
- package/dist/app/composables/schema/commerce/shipment.d.ts +18 -0
- package/dist/app/composables/schema/commerce/shipment.js +1 -0
- package/dist/app/composables/schema/commerce/shops.d.ts +8 -0
- package/dist/app/composables/schema/commerce/shops.js +1 -0
- package/dist/app/composables/schema/commerce/stockItems.d.ts +7 -0
- package/dist/app/composables/schema/commerce/stockItems.js +1 -0
- package/dist/app/composables/schema/commerce/store.d.ts +7 -0
- package/dist/app/composables/schema/commerce/store.js +1 -0
- package/dist/app/composables/schema/commerce/subscriptons.d.ts +9 -0
- package/dist/app/composables/schema/commerce/subscriptons.js +1 -0
- package/dist/app/composables/schema/commerce/taxRates.d.ts +7 -0
- package/dist/app/composables/schema/commerce/taxRates.js +1 -0
- package/dist/app/composables/schema/commerce/taxRules.d.ts +7 -0
- package/dist/app/composables/schema/commerce/taxRules.js +1 -0
- package/dist/app/composables/schema/commerce/teams.d.ts +6 -0
- package/dist/app/composables/schema/commerce/teams.js +1 -0
- package/dist/app/composables/schema/commerce/transactions.d.ts +11 -0
- package/dist/app/composables/schema/commerce/transactions.js +1 -0
- package/dist/app/composables/schema/identity/customerGroup.d.ts +7 -0
- package/dist/app/composables/schema/identity/customerGroup.js +1 -0
- package/dist/app/composables/schema/identity/user.d.ts +45 -0
- package/dist/app/composables/schema/identity/user.js +1 -0
- package/dist/app/composables/schema/media/asset.d.ts +28 -0
- package/dist/app/composables/schema/media/asset.js +1 -0
- package/dist/app/composables/schema/social/post.d.ts +25 -0
- package/dist/app/composables/schema/social/post.js +1 -0
- package/dist/app/composables/schema/social/profile.d.ts +22 -0
- package/dist/app/composables/schema/social/profile.js +1 -0
- package/dist/app/composables/schema/social/space.d.ts +17 -0
- package/dist/app/composables/schema/social/space.js +1 -0
- package/dist/app/composables/types.d.ts +11 -0
- package/dist/app/composables/types.js +1 -0
- package/dist/app/composables/useContent.d.ts +4 -0
- package/dist/app/composables/useContent.js +10 -0
- package/dist/app/composables/useDirectusRequest.d.ts +7 -0
- package/dist/app/composables/useDirectusRequest.js +32 -0
- package/dist/app/composables/utils/assert.d.ts +1 -0
- package/dist/app/composables/utils/assert.js +5 -0
- package/dist/app/composables/utils/deepMerge.d.ts +1 -0
- package/dist/app/composables/utils/deepMerge.js +15 -0
- package/dist/app/composables/utils/index.d.ts +4 -0
- package/dist/app/composables/utils/index.js +4 -0
- package/dist/app/composables/utils/isObject.d.ts +1 -0
- package/dist/app/composables/utils/isObject.js +5 -0
- package/dist/app/composables/utils/module.d.ts +4 -0
- package/dist/app/composables/utils/module.js +14 -0
- package/dist/app/composables/utils/safeGet.d.ts +1 -0
- package/dist/app/composables/utils/safeGet.js +5 -0
- package/dist/app/stores/index.d.ts +0 -0
- package/dist/app/stores/index.js +1 -0
- package/dist/app/utils/billing-address.d.ts +2 -0
- package/dist/app/utils/billing-address.js +18 -0
- package/dist/app/utils/color.d.ts +2 -0
- package/dist/app/utils/color.js +11 -0
- package/dist/app/utils/currency.d.ts +6 -0
- package/dist/app/utils/currency.js +20 -0
- package/dist/app/utils/embed.d.ts +2 -0
- package/dist/app/utils/embed.js +52 -0
- package/dist/app/utils/errors.d.ts +5 -0
- package/dist/app/utils/errors.js +6 -0
- package/dist/app/utils/fonts.d.ts +5 -0
- package/dist/app/utils/fonts.js +18 -0
- package/dist/app/utils/formkit.d.ts +12 -0
- package/dist/app/utils/formkit.js +59 -0
- package/dist/app/utils/icons.d.ts +4 -0
- package/dist/app/utils/icons.js +36 -0
- package/dist/app/utils/links.d.ts +7 -0
- package/dist/app/utils/links.js +21 -0
- package/dist/app/utils/lodash.d.ts +2 -0
- package/dist/app/utils/lodash.js +23 -0
- package/dist/app/utils/markdown.d.ts +1 -0
- package/dist/app/utils/markdown.js +8 -0
- package/dist/app/utils/math.d.ts +6 -0
- package/dist/app/utils/math.js +21 -0
- package/dist/app/utils/navigation.d.ts +2 -0
- package/dist/app/utils/navigation.js +9 -0
- package/dist/app/utils/objects.d.ts +3 -0
- package/dist/app/utils/objects.js +11 -0
- package/dist/app/utils/paths.d.ts +21 -0
- package/dist/app/utils/paths.js +21 -0
- package/dist/app/utils/relations.d.ts +9 -0
- package/dist/app/utils/relations.js +24 -0
- package/dist/app/utils/strings.d.ts +14 -0
- package/dist/app/utils/strings.js +92 -0
- package/dist/app/utils/time.d.ts +13 -0
- package/dist/app/utils/time.js +124 -0
- package/dist/app/utils/url.d.ts +12 -0
- package/dist/app/utils/url.js +20 -0
- package/dist/app/utils/user-name.d.ts +2 -0
- package/dist/app/utils/user-name.js +15 -0
- package/dist/package.json +44 -0
- package/package.json +2 -1
- package/src/global.d.ts +11 -0
- package/tsconfig.json +15 -1
|
@@ -122,11 +122,11 @@
|
|
|
122
122
|
import type { ComponentPublicInstance } from 'vue';
|
|
123
123
|
import { clamp, type SfScrollableOnScrollData } from '@storefront-ui/shared';
|
|
124
124
|
import { SfScrollable, SfButton, SfIconChevronLeft, SfIconChevronRight } from '@storefront-ui/vue';
|
|
125
|
-
import type {
|
|
125
|
+
import type { Image } from '../../types/ui';
|
|
126
126
|
import { unrefElement, useIntersectionObserver, useTimeoutFn } from '@vueuse/core';
|
|
127
127
|
|
|
128
128
|
const props = defineProps<{
|
|
129
|
-
images:
|
|
129
|
+
images: Image[]
|
|
130
130
|
}>();
|
|
131
131
|
|
|
132
132
|
const { isPending, start, stop } = useTimeoutFn(() => {}, 50);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Category } from '../../types/ui'
|
|
2
2
|
|
|
3
|
-
interface CategoryWithImage extends
|
|
4
|
-
image: string
|
|
3
|
+
interface CategoryWithImage extends Category {
|
|
4
|
+
image: string
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export type CategoryCardProps = {
|
|
8
|
-
items: CategoryWithImage[]
|
|
9
|
-
}
|
|
8
|
+
items: CategoryWithImage[]
|
|
9
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Product } from '../../types/ui'
|
|
2
2
|
|
|
3
3
|
export type ProductHorizontalProps = {
|
|
4
|
-
product: Omit<
|
|
5
|
-
|
|
6
|
-
'id' | 'sku' | 'slug' | 'description' | 'price' | 'primaryImage' | 'rating' | 'variants' | 'quantityLimit'
|
|
7
|
-
>;
|
|
8
|
-
};
|
|
4
|
+
product: Omit<Product, 'id' | 'images' | 'price'>
|
|
5
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Product } from '../../types/ui'
|
|
2
2
|
|
|
3
3
|
export type ReviewProps = {
|
|
4
|
-
review:
|
|
5
|
-
}
|
|
4
|
+
review: Partial<Product> & { id?: string; rating?: number; comment?: string }
|
|
5
|
+
}
|
package/app/types/ui.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface Image {
|
|
2
|
+
url: string
|
|
3
|
+
alt?: string
|
|
4
|
+
width?: number
|
|
5
|
+
height?: number
|
|
6
|
+
[key: string]: any
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Product {
|
|
10
|
+
id: string
|
|
11
|
+
name?: string
|
|
12
|
+
price?: number
|
|
13
|
+
images?: Image[]
|
|
14
|
+
[key: string]: any
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface Category {
|
|
18
|
+
id: string
|
|
19
|
+
name?: string
|
|
20
|
+
slug?: string
|
|
21
|
+
image?: string
|
|
22
|
+
[key: string]: any
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Gallery from '~/components/Gallery/Gallery.vue';
|
|
3
|
+
describe('<Gallery />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(Gallery, {
|
|
6
|
+
props: {
|
|
7
|
+
images: [{ alt: 'Test', url: '/images/test.webp' }],
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
expect(getByTestId('gallery'));
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Heading from '~/components/Heading/Heading.vue';
|
|
3
|
+
describe('<Heading />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(Heading, {
|
|
6
|
+
props: {
|
|
7
|
+
title: 'test',
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
expect(getByTestId('heading'));
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import AccordionItem from '~/components/ui/AccordionItem/AccordionItem.vue';
|
|
3
|
+
describe('<AccordionItem />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(AccordionItem, {
|
|
6
|
+
props: {
|
|
7
|
+
breadcrumbs: [],
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
expect(getByTestId('accordion-item'));
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Breadcrumbs from '~/components/ui/Breadcrumbs/Breadcrumbs.vue';
|
|
3
|
+
describe('<Breadcrumbs />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(Breadcrumbs, {
|
|
6
|
+
props: {
|
|
7
|
+
breadcrumbs: [],
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
expect(getByTestId('breadcrumbs'));
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Attribute {
|
|
2
|
+
label: string;
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export type CartProductCardProps = {
|
|
7
|
+
attributes: Attribute[];
|
|
8
|
+
imageUrl?: string | null;
|
|
9
|
+
imageAlt?: string | null;
|
|
10
|
+
maxValue: number;
|
|
11
|
+
minValue: number;
|
|
12
|
+
name: string;
|
|
13
|
+
price: number;
|
|
14
|
+
specialPrice: number;
|
|
15
|
+
value: number;
|
|
16
|
+
slug: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import FormHelperText from '~/components/ui/Form/FormHelperText.vue';
|
|
3
|
+
describe('<FormHelperText />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(FormHelperText);
|
|
6
|
+
expect(getByTestId('form-helper-text'));
|
|
7
|
+
});
|
|
8
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import FormLabel from '~/components/ui/Form/FormLabel.vue';
|
|
3
|
+
describe('<FormLabel />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(FormLabel);
|
|
6
|
+
expect(getByTestId('form-label'));
|
|
7
|
+
});
|
|
8
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Overlay from '~/components/ui/Overlay/Overlay.vue';
|
|
3
|
+
describe('<Overlay />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const wrapper = mount(Overlay, {
|
|
6
|
+
props: {
|
|
7
|
+
visible: true,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
expect(wrapper.getByTestId('overlay'));
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Pagination from '~/components/ui/Pagination/Pagination.vue';
|
|
3
|
+
describe('<Pagination />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(Pagination, {
|
|
6
|
+
props: {
|
|
7
|
+
currentPage: 4,
|
|
8
|
+
pageSize: 24,
|
|
9
|
+
maxVisiblePages: 5,
|
|
10
|
+
totalItems: 2137,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
expect(getByTestId('pagination'));
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ProductCard from '~/components/ui/ProductCard/ProductCard.vue';
|
|
3
|
+
describe('<ProductCard />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(ProductCard, {
|
|
6
|
+
props: {
|
|
7
|
+
name: 'test',
|
|
8
|
+
price: 100,
|
|
9
|
+
imageUrl: '/images/product.webp',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
expect(getByTestId('product-card'));
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/app/components/ui/ProductCardHorizontal/__tests__/ProductCardHorizontal.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import ProductCardHorizontal from '~/components/ui/ProductCardHorizontal/ProductCardHorizontal.vue';
|
|
3
|
+
describe('<ProductCardHorizontal />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const { getByTestId } = mount(ProductCardHorizontal, {
|
|
6
|
+
props: {
|
|
7
|
+
product: {
|
|
8
|
+
name: 'Smartwatch Fitness Tracker',
|
|
9
|
+
gallery: [
|
|
10
|
+
{
|
|
11
|
+
alt: 'Smartwatch Fitness Tracker',
|
|
12
|
+
url: '/images/watch.png',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
attributes: [
|
|
16
|
+
{
|
|
17
|
+
label: 'Size',
|
|
18
|
+
name: 'Size',
|
|
19
|
+
value: '1.9″',
|
|
20
|
+
valueLabel: 'value',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Color',
|
|
24
|
+
label: 'color',
|
|
25
|
+
value: 'Black',
|
|
26
|
+
valueLabel: 'value',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
expect(getByTestId('product-card-horizontal'));
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import PurchaseCard from '~/components/ui/PurchaseCard/PurchaseCard.vue';
|
|
3
|
+
describe('<PurchaseCard />', () => {
|
|
4
|
+
it('should render component', () => {
|
|
5
|
+
const wrapper = mount(PurchaseCard, {
|
|
6
|
+
props: {
|
|
7
|
+
product: {},
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
expect(wrapper.getByTestId('purchase-card'));
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import QuantitySelector from '~/components/ui/QuantitySelector/QuantitySelector.vue';
|
|
3
|
+
const value = 1;
|
|
4
|
+
describe('<QuantitySelector />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const wrapper = mount(QuantitySelector, {
|
|
7
|
+
props: {
|
|
8
|
+
value,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
expect(wrapper.getByTestId('quantity-selector'));
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Review from '~/components/ui/Review/Review.vue';
|
|
3
|
+
import { mockProductReviews } from '~/composables/useProductReviews/__tests__/productReviews.mock';
|
|
4
|
+
describe('<Review />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const { getByTestId } = mount(Review, {
|
|
7
|
+
props: {
|
|
8
|
+
review: mockProductReviews[0],
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
expect(getByTestId('review'));
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum TagVariant {
|
|
2
|
+
primary = "primary",
|
|
3
|
+
secondary = "secondary",
|
|
4
|
+
negative = "negative"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TagSize {
|
|
7
|
+
sm = "sm",
|
|
8
|
+
base = "base"
|
|
9
|
+
}
|
|
10
|
+
export interface TagProps {
|
|
11
|
+
size?: `${TagSize}`;
|
|
12
|
+
strong?: boolean;
|
|
13
|
+
variant?: `${TagVariant}`;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var TagVariant;
|
|
2
|
+
(function (TagVariant) {
|
|
3
|
+
TagVariant["primary"] = "primary";
|
|
4
|
+
TagVariant["secondary"] = "secondary";
|
|
5
|
+
TagVariant["negative"] = "negative";
|
|
6
|
+
})(TagVariant || (TagVariant = {}));
|
|
7
|
+
export var TagSize;
|
|
8
|
+
(function (TagSize) {
|
|
9
|
+
TagSize["sm"] = "sm";
|
|
10
|
+
TagSize["base"] = "base";
|
|
11
|
+
})(TagSize || (TagSize = {}));
|