vviinn-widgets 2.40.2 → 2.40.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/dist/cjs/{package-66fc2d42.js → package-d2581f68.js} +1 -1
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/image-search/search-filters/search-filters.js +2 -2
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +2 -2
- package/dist/collection/components/vviinn-example-image/vviinn-example-image.js +3 -3
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +3 -3
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +2 -2
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +2 -2
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +1 -1
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +5 -5
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +1 -1
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +10 -10
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +11 -11
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +13 -13
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +13 -13
- package/dist/collection/interfaces/generated.js +1 -0
- package/dist/esm/{package-e0b16841.js → package-a3630ee2.js} +1 -1
- package/dist/esm/vviinn-carousel_4.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +1 -1
- package/dist/stencil-react-generated/index.ts +35 -0
- package/dist/stencil-react-generated/react-component-lib/createComponent.tsx +106 -0
- package/dist/stencil-react-generated/react-component-lib/createOverlayComponent.tsx +142 -0
- package/dist/stencil-react-generated/react-component-lib/index.ts +2 -0
- package/dist/stencil-react-generated/react-component-lib/interfaces.ts +34 -0
- package/dist/stencil-react-generated/react-component-lib/utils/attachProps.ts +125 -0
- package/dist/stencil-react-generated/react-component-lib/utils/case.ts +7 -0
- package/dist/stencil-react-generated/react-component-lib/utils/dev.ts +14 -0
- package/dist/stencil-react-generated/react-component-lib/utils/index.tsx +50 -0
- package/dist/types/analytics/GAnalytics.d.ts +4 -4
- package/dist/types/interfaces/generated.d.ts +869 -0
- package/{www/build/p-28feba37.entry.js → dist/vviinn-widgets/p-0da483ad.entry.js} +1 -1
- package/dist/vviinn-widgets/p-3d0dd3d8.js +1 -0
- package/dist/vviinn-widgets/{p-c6e8ddfb.entry.js → p-5d0b378d.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-e12ab596.entry.js → p-8e621b0d.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-f2486332.entry.js → p-a02841dd.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +2 -1
- package/{dist/vviinn-widgets/p-28feba37.entry.js → www/build/p-0da483ad.entry.js} +1 -1
- package/www/build/p-3d0dd3d8.js +1 -0
- package/www/build/p-51b897be.js +1 -0
- package/www/build/{p-c6e8ddfb.entry.js → p-5d0b378d.entry.js} +1 -1
- package/www/build/{p-e12ab596.entry.js → p-8e621b0d.entry.js} +1 -1
- package/www/build/{p-f2486332.entry.js → p-a02841dd.entry.js} +1 -1
- package/www/build/p-a67898be.css +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +2 -2
- package/dist/vviinn-widgets/p-b51f27f5.js +0 -1
- package/www/build/p-b51f27f5.js +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { StyleReactProps } from '../interfaces';
|
|
4
|
+
|
|
5
|
+
export type StencilReactExternalProps<PropType, ElementType> = PropType &
|
|
6
|
+
Omit<React.HTMLAttributes<ElementType>, 'style'> &
|
|
7
|
+
StyleReactProps;
|
|
8
|
+
|
|
9
|
+
// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17
|
|
10
|
+
export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
|
|
11
|
+
|
|
12
|
+
export const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {
|
|
13
|
+
if (typeof ref === 'function') {
|
|
14
|
+
ref(value);
|
|
15
|
+
} else if (ref != null) {
|
|
16
|
+
// Cast as a MutableRef so we can assign current
|
|
17
|
+
(ref as React.MutableRefObject<any>).current = value;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const mergeRefs = (
|
|
22
|
+
...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]
|
|
23
|
+
): React.RefCallback<any> => {
|
|
24
|
+
return (value: any) => {
|
|
25
|
+
refs.forEach((ref) => {
|
|
26
|
+
setRef(ref, value);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {
|
|
32
|
+
const forwardRef = (
|
|
33
|
+
props: StencilReactExternalProps<PropType, ElementType>,
|
|
34
|
+
ref: StencilReactForwardedRef<ElementType>
|
|
35
|
+
) => {
|
|
36
|
+
return <ReactComponent {...props} forwardedRef={ref} />;
|
|
37
|
+
};
|
|
38
|
+
forwardRef.displayName = displayName;
|
|
39
|
+
|
|
40
|
+
return React.forwardRef(forwardRef);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const defineCustomElement = (tagName: string, customElement: any) => {
|
|
44
|
+
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
45
|
+
customElements.define(tagName, customElement);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export * from './attachProps';
|
|
50
|
+
export * from './case';
|
|
@@ -3,10 +3,10 @@ import { Interfaces } from "../interfaces/recommendation";
|
|
|
3
3
|
export declare class GAnalytics implements ProductAnalytics {
|
|
4
4
|
constructor();
|
|
5
5
|
convertProduct(product: Interfaces['VisualProductSearch']): {
|
|
6
|
-
id:
|
|
7
|
-
name:
|
|
8
|
-
brand:
|
|
9
|
-
category:
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
brand: string;
|
|
9
|
+
category: string;
|
|
10
10
|
list: string;
|
|
11
11
|
price: number;
|
|
12
12
|
};
|