vviinn-widgets 2.8.3 → 2.9.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.
Files changed (28) hide show
  1. package/dist/cjs/cropper-handler_27.cjs.entry.js +8 -6
  2. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +8 -6
  3. package/dist/esm/cropper-handler_27.entry.js +8 -6
  4. package/dist/types/interfaces/generated.d.ts +98 -154
  5. package/dist/vviinn-widgets/{p-2732ae61.entry.js → p-41288d8d.entry.js} +1 -1
  6. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  7. package/package.json +2 -1
  8. package/www/build/p-23b7af3d.js +125 -0
  9. package/www/build/{p-2732ae61.entry.js → p-41288d8d.entry.js} +1 -1
  10. package/www/build/p-e0153ae2.css +6 -0
  11. package/www/build/vviinn-widgets.esm.js +1 -1
  12. package/www/index.html +1 -1
  13. package/dist/collection/stories/Button.js +0 -21
  14. package/dist/collection/stories/Button.stories.js +0 -42
  15. package/dist/collection/stories/Header.js +0 -45
  16. package/dist/collection/stories/Header.stories.js +0 -15
  17. package/dist/collection/stories/Page.js +0 -61
  18. package/dist/collection/stories/Page.stories.js +0 -19
  19. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  20. package/dist/collection/stories/assets/colors.svg +0 -1
  21. package/dist/collection/stories/assets/comments.svg +0 -1
  22. package/dist/collection/stories/assets/direction.svg +0 -1
  23. package/dist/collection/stories/assets/flow.svg +0 -1
  24. package/dist/collection/stories/assets/plugin.svg +0 -1
  25. package/dist/collection/stories/assets/repo.svg +0 -1
  26. package/dist/collection/stories/assets/stackalt.svg +0 -1
  27. package/www/build/p-a67898be.css +0 -1
  28. package/www/build/p-bdca7ce2.js +0 -1
@@ -765,12 +765,14 @@ let VviinnProductCard = class {
765
765
  this.recommendationLoad.emit(this.productData);
766
766
  this.intersectionObserver.observe(this.el);
767
767
  const links = this.el.shadowRoot.querySelectorAll("a");
768
- links.forEach((link) => link.addEventListener("click", (event) => {
769
- event.preventDefault();
770
- event.stopImmediatePropagation();
771
- this.recommendationClick.emit(this.getProductData());
772
- index$1._function.pipe(getAnalyticsModule, index$1.Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
773
- }));
768
+ links.forEach((link) => {
769
+ ['click', 'auxclick'].forEach((eventType) => link.addEventListener(eventType, (event) => {
770
+ event.preventDefault();
771
+ event.stopImmediatePropagation();
772
+ this.recommendationClick.emit(this.getProductData());
773
+ index$1._function.pipe(getAnalyticsModule, index$1.Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
774
+ }));
775
+ });
774
776
  }
775
777
  getProduct() {
776
778
  return index$1.imageSearchState.results.find((r) => r.productId === this.productId);
@@ -55,12 +55,14 @@ export class VviinnProductCard {
55
55
  this.recommendationLoad.emit(this.productData);
56
56
  this.intersectionObserver.observe(this.el);
57
57
  const links = this.el.shadowRoot.querySelectorAll("a");
58
- links.forEach((link) => link.addEventListener("click", (event) => {
59
- event.preventDefault();
60
- event.stopImmediatePropagation();
61
- this.recommendationClick.emit(this.getProductData());
62
- pipe(getAnalyticsModule, O.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
63
- }));
58
+ links.forEach((link) => {
59
+ ['click', 'auxclick'].forEach((eventType) => link.addEventListener(eventType, (event) => {
60
+ event.preventDefault();
61
+ event.stopImmediatePropagation();
62
+ this.recommendationClick.emit(this.getProductData());
63
+ pipe(getAnalyticsModule, O.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
64
+ }));
65
+ });
64
66
  }
65
67
  getProduct() {
66
68
  return imageSearchState.results.find((r) => r.productId === this.productId);
@@ -761,12 +761,14 @@ let VviinnProductCard = class {
761
761
  this.recommendationLoad.emit(this.productData);
762
762
  this.intersectionObserver.observe(this.el);
763
763
  const links = this.el.shadowRoot.querySelectorAll("a");
764
- links.forEach((link) => link.addEventListener("click", (event) => {
765
- event.preventDefault();
766
- event.stopImmediatePropagation();
767
- this.recommendationClick.emit(this.getProductData());
768
- _function.pipe(getAnalyticsModule, Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
769
- }));
764
+ links.forEach((link) => {
765
+ ['click', 'auxclick'].forEach((eventType) => link.addEventListener(eventType, (event) => {
766
+ event.preventDefault();
767
+ event.stopImmediatePropagation();
768
+ this.recommendationClick.emit(this.getProductData());
769
+ _function.pipe(getAnalyticsModule, Option.match(() => null, (analytics) => analytics.sendClick(this.getProduct())));
770
+ }));
771
+ });
770
772
  }
771
773
  getProduct() {
772
774
  return imageSearchState.results.find((r) => r.productId === this.productId);
@@ -19,7 +19,7 @@ export interface paths {
19
19
  /** Return most similar products to input one */
20
20
  get: operations["GetSimilarProductsToInputImage"];
21
21
  };
22
- "/product/{product-id}/similar-products[/{category}]": {
22
+ "/product/{product-id}/similar-products/{category}": {
23
23
  /** Return most similar products to input one in specific category */
24
24
  get: operations["GetSimilarProductsToInputImageInSpecificCategory"];
25
25
  };
@@ -27,7 +27,7 @@ export interface paths {
27
27
  /** Return cross selling products to input one */
28
28
  get: operations["GetCrossSellingProductsToInputImage"];
29
29
  };
30
- "/product/{product-id}/cross-selling-products[/{category}]": {
30
+ "/product/{product-id}/cross-selling-products/{category}": {
31
31
  /** Return cross selling products to input one in specific category */
32
32
  get: operations["GetCrossSellingProductsToInputImageInSpecificCategory"];
33
33
  };
@@ -65,35 +65,44 @@ export interface paths {
65
65
  };
66
66
  "/search/session/{search-id}": {
67
67
  /** Starts a search in existing session. */
68
- post: operations["SearchInExistingSession"];
68
+ get: operations["SearchInExistingSession"];
69
69
  };
70
- "/search/session/{search-id}/{category}": {
70
+ "/search/session/{search-id}/category/{category}": {
71
71
  /** Starts a search in existing session in specific category. */
72
- post: operations["SearchInExistingSessionWithCategory"];
72
+ get: operations["SearchInExistingSessionWithCategory"];
73
73
  };
74
- "/image/search": {
75
- /** Return most similar product images to input one */
76
- post: operations["GetMostSimilarProductImagesToInputImage"];
74
+ "/search/session/{search-id}/detect-objects": {
75
+ /** Get detected objects of image in existing session. */
76
+ get: operations["DetectObjectsOfImageInExistingSession"];
77
77
  };
78
- "/image/search/color": {
79
- /** Return most similar product images to input colors */
80
- post: operations["GetMostSimilarProductImagesToInputColors"];
81
- };
82
- "/image/search/{object-class}": {
83
- /** Return most similar product images to input one with specific object-class */
84
- post: operations["GetMostSimilarProductImagesToInputImageWithSpecificClass"];
85
- };
86
- "/image/search/color/{object-class}": {
87
- /** Return most similar product images to input colors with specific object-class */
88
- post: operations["GetMostSimilarProductImagesToInputColorsWithSpecificClass"];
78
+ "/search/session/{search-id}/upload-image": {
79
+ /** Upload high resolution image to existing session. */
80
+ put: operations["UploadHighResolutionImageToExistingSession"];
89
81
  };
90
82
  }
91
83
  export interface components {
92
84
  schemas: {
93
- "visual-product-search-by-colors": {
94
- color?: unknown[];
95
- weight?: number;
96
- }[];
85
+ "ion-detected-object-rectangle": {
86
+ left?: number;
87
+ top?: number;
88
+ width?: number;
89
+ height?: number;
90
+ };
91
+ "ion-detected-object-value": {
92
+ classId?: number;
93
+ class?: string;
94
+ score?: number;
95
+ rectangle?: components["schemas"]["ion-detected-object-rectangle"];
96
+ };
97
+ "ion-detected-object": {
98
+ value?: components["schemas"]["ion-detected-object-value"];
99
+ links?: {
100
+ [key: string]: components["schemas"]["ion-link"];
101
+ };
102
+ };
103
+ "ion-detected-objects": {
104
+ value?: components["schemas"]["ion-detected-object"][];
105
+ };
97
106
  "delete-image-by-productId-and-imageId-404-error": {
98
107
  "site-id"?: number;
99
108
  "product-id"?: string;
@@ -209,11 +218,6 @@ export interface components {
209
218
  title: string;
210
219
  parentId: string;
211
220
  }[];
212
- "category-tree-error": {
213
- message: string;
214
- data: components["schemas"]["category-tree"];
215
- debug?: string;
216
- }[];
217
221
  products: {
218
222
  productIds?: unknown[];
219
223
  };
@@ -234,43 +238,41 @@ export interface components {
234
238
  sale?: number | null;
235
239
  };
236
240
  };
237
- "category-filter": {
238
- href: string;
239
- method?: string;
240
- name?: string;
241
- } & {
242
- title: unknown;
241
+ "category-filter": components["schemas"]["ion-link"] & {
242
+ name: string;
243
+ };
244
+ "name-value-item": {
245
+ name: string;
246
+ value: string;
243
247
  };
244
248
  "ion-link": {
245
249
  method: string;
246
250
  href: string;
247
251
  };
248
- "ion-link-value": {
249
- name?: string;
250
- type?: string;
251
- value?: {
252
- [key: string]: unknown;
253
- };
252
+ "search-area": components["schemas"]["ion-link"] & {
253
+ rel: string[];
254
+ value: components["schemas"]["name-value-item"][];
254
255
  };
255
- "extended-ion-link": components["schemas"]["ion-link"] & {
256
- value: components["schemas"]["ion-link-value"];
256
+ "upload-high-resolution-image": components["schemas"]["ion-link"] & {
257
+ rel: string[];
258
+ value: components["schemas"]["name-value-item"][];
257
259
  };
258
260
  "visual-product-search": components["schemas"]["visual-product-search-object"][];
259
261
  "ion-visual-product-search": {
260
- value?: {
261
- products?: components["schemas"]["visual-product-search-object"][];
262
- type?: string;
263
- };
262
+ value?: components["schemas"]["visual-product-search-object"][];
263
+ type?: string;
264
+ searchArea?: components["schemas"]["search-area"];
265
+ uploadHighResolutionImage?: components["schemas"]["upload-high-resolution-image"];
264
266
  filters?: {
265
- categories?: {
266
- value?: components["schemas"]["category-filter"][];
267
- type?: string;
267
+ type?: string;
268
+ value?: {
269
+ categories?: components["schemas"]["category-filter"][];
268
270
  };
269
271
  };
270
272
  links?: {
271
- self?: components["schemas"]["ion-link"];
272
- withRectangle?: components["schemas"]["ion-link"] & components["schemas"]["extended-ion-link"];
273
+ [key: string]: components["schemas"]["ion-link"];
273
274
  };
275
+ detectedObjects?: components["schemas"]["ion-detected-object"][];
274
276
  };
275
277
  "visual-product-recommendations": {
276
278
  bestFits?: string[];
@@ -278,6 +280,12 @@ export interface components {
278
280
  };
279
281
  };
280
282
  responses: {
283
+ /** detected objects response */
284
+ "ion-detected-objects": {
285
+ content: {
286
+ "application/json": components["schemas"]["ion-detected-objects"];
287
+ };
288
+ };
281
289
  /** success */
282
290
  "visual-product-search": {
283
291
  content: {
@@ -309,6 +317,11 @@ export interface components {
309
317
  };
310
318
  };
311
319
  };
320
+ parameters: {
321
+ "campaign-id": number;
322
+ campaigns: string;
323
+ "image-code": string;
324
+ };
312
325
  requestBodies: {
313
326
  /** Product data object */
314
327
  "product-annotation": {
@@ -405,7 +418,8 @@ export interface operations {
405
418
  };
406
419
  query: {
407
420
  "similar-products-count"?: number;
408
- "campaign-id"?: number;
421
+ campaigns?: components["parameters"]["campaigns"];
422
+ "image-code"?: components["parameters"]["image-code"];
409
423
  };
410
424
  };
411
425
  responses: {
@@ -435,7 +449,8 @@ export interface operations {
435
449
  };
436
450
  query: {
437
451
  "similar-products-count": number;
438
- "campaign-id"?: number;
452
+ campaigns?: components["parameters"]["campaigns"];
453
+ "image-code"?: components["parameters"]["image-code"];
439
454
  };
440
455
  };
441
456
  responses: {
@@ -464,7 +479,8 @@ export interface operations {
464
479
  };
465
480
  query: {
466
481
  "cross-selling-products-count"?: number;
467
- "campaign-id"?: number;
482
+ campaigns?: components["parameters"]["campaigns"];
483
+ "image-code"?: components["parameters"]["image-code"];
468
484
  };
469
485
  };
470
486
  responses: {
@@ -494,7 +510,8 @@ export interface operations {
494
510
  };
495
511
  query: {
496
512
  "cross-selling-products-count": number;
497
- "campaign-id"?: number;
513
+ campaigns?: components["parameters"]["campaigns"];
514
+ "image-code"?: components["parameters"]["image-code"];
498
515
  };
499
516
  };
500
517
  responses: {
@@ -727,6 +744,11 @@ export interface operations {
727
744
  };
728
745
  /** Starts a reusable search session for a one image. */
729
746
  CreateSearchSession: {
747
+ parameters: {
748
+ query: {
749
+ "campaign-id"?: components["parameters"]["campaign-id"];
750
+ };
751
+ };
730
752
  responses: {
731
753
  200: components["responses"]["ion-visual-product-search"];
732
754
  /** ProductSearch exception */
@@ -752,6 +774,9 @@ export interface operations {
752
774
  path: {
753
775
  "search-id": string;
754
776
  };
777
+ query: {
778
+ "campaign-id"?: components["parameters"]["campaign-id"];
779
+ };
755
780
  };
756
781
  responses: {
757
782
  200: components["responses"]["ion-visual-product-search"];
@@ -764,19 +789,6 @@ export interface operations {
764
789
  401: components["responses"]["authentication-error"];
765
790
  403: components["responses"]["authorization-error"];
766
791
  };
767
- requestBody: {
768
- content: {
769
- "multipart/form-data": {
770
- image: string;
771
- rectangle?: {
772
- top?: number;
773
- left?: number;
774
- width?: number;
775
- height?: number;
776
- };
777
- };
778
- };
779
- };
780
792
  };
781
793
  /** Starts a search in existing session in specific category. */
782
794
  SearchInExistingSessionWithCategory: {
@@ -785,6 +797,9 @@ export interface operations {
785
797
  "search-id": string;
786
798
  category: string;
787
799
  };
800
+ query: {
801
+ "campaign-id"?: components["parameters"]["campaign-id"];
802
+ };
788
803
  };
789
804
  responses: {
790
805
  200: components["responses"]["ion-visual-product-search"];
@@ -797,54 +812,19 @@ export interface operations {
797
812
  401: components["responses"]["authentication-error"];
798
813
  403: components["responses"]["authorization-error"];
799
814
  };
800
- requestBody: {
801
- content: {
802
- "multipart/form-data": {
803
- rectangle?: {
804
- top?: number;
805
- left?: number;
806
- width?: number;
807
- height?: number;
808
- };
809
- };
810
- };
811
- };
812
815
  };
813
- /** Return most similar product images to input one */
814
- GetMostSimilarProductImagesToInputImage: {
816
+ /** Get detected objects of image in existing session. */
817
+ DetectObjectsOfImageInExistingSession: {
815
818
  parameters: {
816
- query: {
817
- "campaign-id"?: number;
818
- };
819
- };
820
- responses: {
821
- 200: components["responses"]["visual-product-search"];
822
- /** ProductSearch exception */
823
- 400: {
824
- content: {
825
- "application/json": unknown;
826
- };
819
+ path: {
820
+ "search-id": string;
827
821
  };
828
- 401: components["responses"]["authentication-error"];
829
- 403: components["responses"]["authorization-error"];
830
- };
831
- requestBody: {
832
- content: {
833
- "multipart/form-data": {
834
- image: {
835
- [key: string]: unknown;
836
- };
837
- "similar-products-count"?: number;
838
- "similarity-weight"?: number;
839
- "color-weight"?: number;
840
- };
822
+ query: {
823
+ "campaign-id"?: components["parameters"]["campaign-id"];
841
824
  };
842
825
  };
843
- };
844
- /** Return most similar product images to input colors */
845
- GetMostSimilarProductImagesToInputColors: {
846
826
  responses: {
847
- 200: components["responses"]["visual-product-search"];
827
+ 200: components["responses"]["ion-detected-objects"];
848
828
  /** ProductSearch exception */
849
829
  400: {
850
830
  content: {
@@ -854,56 +834,26 @@ export interface operations {
854
834
  401: components["responses"]["authentication-error"];
855
835
  403: components["responses"]["authorization-error"];
856
836
  };
857
- /** List of colors */
858
- requestBody: {
859
- content: {
860
- "application/json": components["schemas"]["visual-product-search-by-colors"];
861
- };
862
- };
863
837
  };
864
- /** Return most similar product images to input one with specific object-class */
865
- GetMostSimilarProductImagesToInputImageWithSpecificClass: {
838
+ /** Upload high resolution image to existing session. */
839
+ UploadHighResolutionImageToExistingSession: {
866
840
  parameters: {
867
841
  path: {
868
- "object-class": string;
842
+ "search-id": string;
869
843
  };
870
844
  query: {
871
- "campaign-id"?: number;
845
+ "campaign-id"?: components["parameters"]["campaign-id"];
872
846
  };
873
847
  };
874
848
  responses: {
875
- 200: components["responses"]["visual-product-search"];
876
- /** ProductSearch exception */
877
- 400: {
849
+ /** success */
850
+ 200: {
878
851
  content: {
879
- "application/json": unknown;
880
- };
881
- };
882
- 401: components["responses"]["authentication-error"];
883
- 403: components["responses"]["authorization-error"];
884
- };
885
- requestBody: {
886
- content: {
887
- "multipart/form-data": {
888
- image: {
889
- [key: string]: unknown;
852
+ "application/json": {
853
+ message?: string;
890
854
  };
891
- "similar-products-count"?: number;
892
- "similarity-weight"?: number;
893
- "color-weight"?: number;
894
855
  };
895
856
  };
896
- };
897
- };
898
- /** Return most similar product images to input colors with specific object-class */
899
- GetMostSimilarProductImagesToInputColorsWithSpecificClass: {
900
- parameters: {
901
- path: {
902
- "object-class": string;
903
- };
904
- };
905
- responses: {
906
- 200: components["responses"]["visual-product-search"];
907
857
  /** ProductSearch exception */
908
858
  400: {
909
859
  content: {
@@ -913,12 +863,6 @@ export interface operations {
913
863
  401: components["responses"]["authentication-error"];
914
864
  403: components["responses"]["authorization-error"];
915
865
  };
916
- /** List of colors */
917
- requestBody: {
918
- content: {
919
- "application/json": components["schemas"]["visual-product-search-by-colors"];
920
- };
921
- };
922
866
  };
923
867
  }
924
868
  export interface external {