@retailrocketgroup/retailrocket-edit.abandoned-category-vue-email-template-render 3.0.381747 → 5.0.384530

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 (40) hide show
  1. package/.turbo/turbo-build.log +25 -0
  2. package/dist/assets/index.css +1 -0
  3. package/dist/assets/index.js +379 -0
  4. package/dist/assets/index.js.map +1 -0
  5. package/dist/editAbandonedCategoryEmailTemplate.d.ts +0 -0
  6. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedCategoryComponentSectionItemFactory.d.ts +4 -0
  7. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedCategoryEmailComponentFactory.d.ts +4 -0
  8. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedCategoryComponentLibraryFactory.d.ts +4 -0
  9. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedCategorySectionFactory.d.ts +4 -0
  10. package/dist/implementation/DataSources/ListDataExpressionSource/abandonedCategoryEvaluateListExpressionDataSourceFactory.d.ts +8 -0
  11. package/dist/implementation/DataSources/NumberExpressionDataSource/abandonedCategoryEvaluateNumberExpressionDataSourceFactory.d.ts +2 -0
  12. package/dist/implementation/DataSources/StringExpressionDataSource/abandonedCategoryEvaluateStringExpressionDataSource.d.ts +9 -0
  13. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedCategoryProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/popularProductsForAbandonedCategoriesShelfBuilderDepsFactory.d.ts +8 -0
  14. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedCategoryProductShelfDataSourceExpressionBuilderModal/abandonedCategoryProductShelfDataSourceExpressionBuilderModalDepsFactory.d.ts +11 -0
  15. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/abandonedCategoryProductShelfDataSourceExpressionBuilderDepsFactory.d.ts +11 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.html +34 -0
  18. package/env.d.ts +1 -0
  19. package/index.html +1 -2
  20. package/package.json +1 -1
  21. package/src/editAbandonedCategoryEmailTemplate.ts +407 -0
  22. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedCategoryComponentSectionItemFactory.ts +30 -0
  23. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedCategoryEmailComponentFactory.ts +26 -0
  24. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedCategoryComponentLibraryFactory.ts +29 -0
  25. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedCategorySectionFactory.ts +32 -0
  26. package/src/implementation/DataSources/ListDataExpressionSource/abandonedCategoryEvaluateListExpressionDataSourceFactory.ts +116 -0
  27. package/src/implementation/DataSources/NumberExpressionDataSource/abandonedCategoryEvaluateNumberExpressionDataSourceFactory.ts +10 -0
  28. package/src/implementation/DataSources/StringExpressionDataSource/abandonedCategoryEvaluateStringExpressionDataSource.ts +56 -0
  29. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedCategoryProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/popularProductsForAbandonedCategoriesShelfBuilderDepsFactory.ts +33 -0
  30. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedCategoryProductShelfDataSourceExpressionBuilderModal/abandonedCategoryProductShelfDataSourceExpressionBuilderModalDepsFactory.ts +135 -0
  31. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/abandonedCategoryProductShelfDataSourceExpressionBuilderDepsFactory.ts +33 -0
  32. package/src/index.ts +0 -0
  33. package/tsconfig.app.json +19 -0
  34. package/tsconfig.json +14 -0
  35. package/tsconfig.node.json +11 -0
  36. package/tsconfig.test.json +11 -0
  37. package/vite.config.ts +36 -0
  38. package/assets/main.css +0 -1
  39. package/assets/main.js +0 -217
  40. package/favicon.ico +0 -0
@@ -0,0 +1,29 @@
1
+ import type {
2
+ ComponentLibrarySection,
3
+ } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary/main';
4
+ import type {
5
+ CustomComponentLibraryType
6
+ } from '@easy-wizzy/core';
7
+ import type {
8
+ AbandonedCategoryListExpressionDataSource
9
+ } from '@easy-wizzy/retailrocket-abandoned-category';
10
+ import type {
11
+ AbandonedCategoryNumberExpressionDataSource
12
+ } from '@easy-wizzy/retailrocket-abandoned-category';
13
+ import type {
14
+ AbandonedCategoryStringExpressionDataSource
15
+ } from '@easy-wizzy/retailrocket-abandoned-category';
16
+ import {
17
+ abandonedCategorySectionFactory
18
+ } from '@/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedCategorySectionFactory';
19
+
20
+ export const abandonedCategoryComponentLibraryFactory = (
21
+ componentLibrary: Array<ComponentLibrarySection>
22
+ ): CustomComponentLibraryType<
23
+ AbandonedCategoryListExpressionDataSource,
24
+ AbandonedCategoryNumberExpressionDataSource,
25
+ AbandonedCategoryStringExpressionDataSource
26
+ > => {
27
+ return componentLibrary
28
+ .map(section => abandonedCategorySectionFactory(section))
29
+ }
@@ -0,0 +1,32 @@
1
+ import type {
2
+ ComponentLibrarySection,
3
+ } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary/main';
4
+ import type { CustomComponentSectionType } from '@easy-wizzy/core';
5
+ import type {
6
+ AbandonedCategoryListExpressionDataSource
7
+ } from '@easy-wizzy/retailrocket-abandoned-category';
8
+ import type {
9
+ AbandonedCategoryNumberExpressionDataSource
10
+ } from '@easy-wizzy/retailrocket-abandoned-category';
11
+ import type {
12
+ AbandonedCategoryStringExpressionDataSource
13
+ } from '@easy-wizzy/retailrocket-abandoned-category';
14
+ import {
15
+ abandonedCategoryComponentSectionItemFactory
16
+ } from '@/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedCategoryComponentSectionItemFactory';
17
+
18
+ export const abandonedCategorySectionFactory = (
19
+ section: ComponentLibrarySection,
20
+ ): CustomComponentSectionType<
21
+ AbandonedCategoryListExpressionDataSource,
22
+ AbandonedCategoryNumberExpressionDataSource,
23
+ AbandonedCategoryStringExpressionDataSource
24
+ > => {
25
+ return {
26
+ sectionId: section.sectionId,
27
+ sectionName: section.sectionName,
28
+ componentList: section
29
+ .sectionItems
30
+ .map(component => abandonedCategoryComponentSectionItemFactory(component)),
31
+ };
32
+ };
@@ -0,0 +1,116 @@
1
+ import type {
2
+ DataListType
3
+ } from '@easy-wizzy/core';
4
+ import type { ListExpressionDataSourceBffClient } from '@easy-wizzy/common-app';
5
+ import type { ListExpressionDataSourceEvaluatorDelegate } from '@easy-wizzy/core';
6
+ import { getPopularProducts } from '@easy-wizzy/common-app';
7
+ import { stockIdFactory } from '@easy-wizzy/common-app';
8
+ import type { AbandonedCategoryListExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-category';
9
+ import { abandonedCategoryListExpressionDataSourceMatcher } from '@easy-wizzy/retailrocket-abandoned-category';
10
+ import { getProductList } from '@easy-wizzy/common-app';
11
+ import { getRelatedProducts } from '@easy-wizzy/common-app';
12
+ import { getAlternativeProducts } from '@easy-wizzy/common-app';
13
+ import { getPopularProductsInCategories } from '@easy-wizzy/common-app';
14
+ import type { Product } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.listexpressiondatasource';
15
+ import { getLatestProducts } from '@easy-wizzy/common-app';
16
+ import { getSaleByPopularProducts } from '@easy-wizzy/common-app';
17
+ import { getSaleByLatestProducts } from '@easy-wizzy/common-app';
18
+ import { getSampleProductsForPreview } from '@easy-wizzy/common-app';
19
+
20
+ export const abandonedCategoryEvaluateListExpressionDataSourceFactory = (arg: {
21
+ partnerId: string;
22
+ listExpressionDataSourceBffClient: ListExpressionDataSourceBffClient;
23
+ customerStockId: string | undefined;
24
+ }): ListExpressionDataSourceEvaluatorDelegate<AbandonedCategoryListExpressionDataSource> => {
25
+ let productCache: { [key: string]: Product } = {};
26
+
27
+ return (asyncDataSource: AbandonedCategoryListExpressionDataSource) =>
28
+ abandonedCategoryListExpressionDataSourceMatcher(asyncDataSource).Match<Promise<DataListType>>({
29
+ PopularProductsForAbandonedCategories: ({ StockSource }) =>
30
+ getSampleProductsForPreview({
31
+ partnerId: arg.partnerId,
32
+ stockId: stockIdFactory({
33
+ stockSource: StockSource,
34
+ customerStockId: arg.customerStockId,
35
+ }),
36
+ getSampleProductsForPreviewHttpClient: arg.listExpressionDataSourceBffClient.postGetSampleProductsForPreview,
37
+ }),
38
+ ProductList: ({ ProductIds, StockSource }) =>
39
+ getProductList({
40
+ partnerId: arg.partnerId,
41
+ productIDs: ProductIds,
42
+ stockId: stockIdFactory({
43
+ stockSource: StockSource,
44
+ customerStockId: arg.customerStockId,
45
+ }),
46
+ productCache: productCache,
47
+ getProductsByIDsHttpClient: arg.listExpressionDataSourceBffClient.postGetProductsByIds,
48
+ }),
49
+ RelatedProductsFor: ({ ProductIds, StockSource }) =>
50
+ getRelatedProducts({
51
+ partnerId: arg.partnerId,
52
+ productIDs: ProductIds,
53
+ stockId: stockIdFactory({
54
+ stockSource: StockSource,
55
+ customerStockId: arg.customerStockId
56
+ }),
57
+ getRelatedProducts: arg.listExpressionDataSourceBffClient.postGetRelatedRecommendations,
58
+ }),
59
+ AlternativeProductsFor: ({ ProductIds, StockSource }) =>
60
+ getAlternativeProducts({
61
+ partnerId: arg.partnerId,
62
+ productIDs: ProductIds,
63
+ stockId: stockIdFactory({
64
+ stockSource: StockSource,
65
+ customerStockId: arg.customerStockId,
66
+ }),
67
+ getAlternativeProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetAlternativeRecommendations,
68
+ }),
69
+ PopularProductsInCategories: ({ CategoryIds, StockSource }) =>
70
+ getPopularProductsInCategories({
71
+ partnerId: arg.partnerId,
72
+ categoryIds: CategoryIds,
73
+ stockId: stockIdFactory({
74
+ stockSource: StockSource,
75
+ customerStockId: arg.customerStockId,
76
+ }),
77
+ getPopularProductsInCategoriesHttpClient: arg.listExpressionDataSourceBffClient.postGetPopularInCategoriesRecommendations,
78
+ }),
79
+ Popular: ({ StockSource }) =>
80
+ getPopularProducts({
81
+ partnerId: arg.partnerId,
82
+ stockId: stockIdFactory({
83
+ stockSource: StockSource,
84
+ customerStockId: arg.customerStockId,
85
+ }),
86
+ getPopularProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetPopularRecommendations,
87
+ }),
88
+ Latest: ({ StockSource }) =>
89
+ getLatestProducts({
90
+ partnerId: arg.partnerId,
91
+ stockId: stockIdFactory({
92
+ stockSource: StockSource,
93
+ customerStockId: arg.customerStockId,
94
+ }),
95
+ getLatestProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetLatestRecommendations,
96
+ }),
97
+ SaleByPopular: ({ StockSource }) =>
98
+ getSaleByPopularProducts({
99
+ partnerId: arg.partnerId,
100
+ stockId: stockIdFactory({
101
+ stockSource: StockSource,
102
+ customerStockId: arg.customerStockId,
103
+ }),
104
+ getSaleByPopularProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetSaleByPopularRecommendations,
105
+ }),
106
+ SaleByLatest: ({ StockSource }) =>
107
+ getSaleByLatestProducts({
108
+ partnerId: arg.partnerId,
109
+ stockId: stockIdFactory({
110
+ stockSource: StockSource,
111
+ customerStockId: arg.customerStockId,
112
+ }),
113
+ getSaleByLatestProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetSaleByLatestRecommendations,
114
+ }),
115
+ });
116
+ };
@@ -0,0 +1,10 @@
1
+ import type {
2
+ NumberExpressionDataSourceEvaluatorDelegate
3
+ } from '@easy-wizzy/core';
4
+
5
+ export const abandonedCategoryEvaluateNumberExpressionDataSourceFactory = <
6
+ TNumberExpressionDataSource
7
+ >():
8
+ NumberExpressionDataSourceEvaluatorDelegate<TNumberExpressionDataSource> => {
9
+ return () => Promise.resolve(0);
10
+ }
@@ -0,0 +1,56 @@
1
+ import type {
2
+ StringExpressionDataSourceEvaluatorDelegate
3
+ } from '@easy-wizzy/core';
4
+ import type { ContactCustomData } from '@easy-wizzy/retailrocket-common';
5
+ import type {
6
+ ProductImageUrlBuilderExpressionEvaluatorDelegate
7
+ } from '@easy-wizzy/common-app';
8
+ import type {
9
+ DataType
10
+ } from '@easy-wizzy/core';
11
+ import type {
12
+ AbandonedCategoryListExpressionDataSource
13
+ } from '@easy-wizzy/retailrocket-abandoned-category';
14
+ import type {
15
+ AbandonedCategoryNumberExpressionDataSource
16
+ } from '@easy-wizzy/retailrocket-abandoned-category';
17
+ import type {
18
+ AbandonedCategoryStringExpressionDataSource
19
+ } from '@easy-wizzy/retailrocket-abandoned-category';
20
+ import {
21
+ abandonedCategoryStringExpressionDataSourceMatcher
22
+ } from '@easy-wizzy/retailrocket-abandoned-category';
23
+ import type { NextCouponFromBatchType } from '@easy-wizzy/retailrocket-common';
24
+
25
+ export const abandonedCategoryStringExpressionDataSourceEvaluatorFactory = (arg: {
26
+ productImageUrlBuilderExpressionEvaluator: ProductImageUrlBuilderExpressionEvaluatorDelegate<
27
+ AbandonedCategoryListExpressionDataSource,
28
+ AbandonedCategoryNumberExpressionDataSource
29
+ >
30
+ contactCustomData: ContactCustomData
31
+ nextCouponFromBatch: NextCouponFromBatchType
32
+ }): StringExpressionDataSourceEvaluatorDelegate<
33
+ AbandonedCategoryStringExpressionDataSource
34
+ > => {
35
+ const abandonedCategoryContactCustomData = arg.contactCustomData;
36
+
37
+ return (a: {
38
+ stringExpressionDataSource: AbandonedCategoryStringExpressionDataSource,
39
+ context: DataType
40
+ }) => abandonedCategoryStringExpressionDataSourceMatcher(
41
+ a.stringExpressionDataSource
42
+ )
43
+ .Match({
44
+ StringFromContactCustomData: (x) => Promise.resolve(abandonedCategoryContactCustomData[x.FieldName] as string),
45
+ StringFromContactCustomDataWithFallback: (x) => Promise.resolve(
46
+ x.FieldName in abandonedCategoryContactCustomData && typeof abandonedCategoryContactCustomData[x.FieldName] === 'string'
47
+ ? abandonedCategoryContactCustomData[x.FieldName] as string
48
+ : x.FallbackValue
49
+ ),
50
+ ProductImageUrlBuilderExpression: e => arg.productImageUrlBuilderExpressionEvaluator({
51
+ expression: e,
52
+ context: a.context
53
+ }),
54
+ NextCouponFromBatch: () => Promise.resolve('Coupon')
55
+ });
56
+ }
@@ -0,0 +1,33 @@
1
+ import type { LocaleKey } from '@easy-wizzy/core';
2
+ import type { ProductShelfBuilderModalWindowBffClient } from '@easy-wizzy/common-app';
3
+ import {
4
+ getAllStockIdsFactory
5
+ } from '@easy-wizzy/common-app';
6
+ import type {
7
+ PopularProductsForAbandonedCategoriesShelfBuilderDeps
8
+ } from '@easy-wizzy/retailrocket-abandoned-category';
9
+
10
+ export const popularProductsForAbandonedCategoriesShelfBuilderDepsFactory = (
11
+ arg: {
12
+ localeKey: LocaleKey;
13
+ partnerId: string,
14
+ getAllStockIdsHttpClient: ProductShelfBuilderModalWindowBffClient['postGetAllStockIds']
15
+ }
16
+ ): PopularProductsForAbandonedCategoriesShelfBuilderDeps => {
17
+ return {
18
+ localeKey: arg.localeKey,
19
+ getAllStockIds: getAllStockIdsFactory({
20
+ partnerId: arg.partnerId,
21
+ getAllStockIdsHttpClient: arg.getAllStockIdsHttpClient
22
+ }),
23
+ stockSelectorDeps: {
24
+ localeKey: arg.localeKey,
25
+ stockSourceSelectorDeps: {
26
+ localeKey: arg.localeKey
27
+ }
28
+ },
29
+ productListShelfLimiterDeps: {
30
+ localeKey: arg.localeKey
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,135 @@
1
+ import type { LocaleKey } from '@easy-wizzy/core';
2
+ import {
3
+ popularProductListShelfBuilderDepsFactory
4
+ } from '@easy-wizzy/common-app';
5
+ import type { ProductShelfBuilderModalWindowBffClient } from '@easy-wizzy/common-app';
6
+ import type {
7
+ AbandonedCategoryProductShelfDataSourceExpressionBuilderModalDeps
8
+ } from '@easy-wizzy/retailrocket-abandoned-category';
9
+ import {
10
+ popularProductsForAbandonedCategoriesShelfBuilderDepsFactory
11
+ } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedCategoryProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/popularProductsForAbandonedCategoriesShelfBuilderDepsFactory';
12
+ import {
13
+ latestProductListShelfBuilderDepsFactory
14
+ } from '@easy-wizzy/common-app';
15
+ import {
16
+ saleByPopularProductListShelfBuilderDepsFactory
17
+ } from '@easy-wizzy/common-app';
18
+ import {
19
+ saleByLatestProductListShelfBuilderDepsFactory
20
+ } from '@easy-wizzy/common-app';
21
+ import {
22
+ productListComposerModalWindowDepsFactory
23
+ } from '@easy-wizzy/common-app';
24
+
25
+ import type { ProductPickerModalWindowBffClient } from '@easy-wizzy/common-app';
26
+ import {
27
+ categoryListComposerModalWindowDepsFactory
28
+ } from '@easy-wizzy/common-app';
29
+ import {
30
+ alternativeProductListShelfBuilderDepsFactory
31
+ } from '@easy-wizzy/common-app';
32
+ import {
33
+ relatedProductListShelfBuilderDepsFactory
34
+ } from '@easy-wizzy/common-app';
35
+ import {
36
+ productListShelfBuilderDepsFactory
37
+ } from '@easy-wizzy/common-app';
38
+ import {
39
+ popularFromCategoryListShelfBuilderDepsFactory
40
+ } from '@easy-wizzy/common-app';
41
+ import type {
42
+ ProductCategoryPickerModalWindowBffClient
43
+ } from '@easy-wizzy/common-app';
44
+
45
+ export const abandonedCategoryProductShelfDataSourceExpressionBuilderModalDepsFactory = (
46
+ arg: {
47
+ localeKey: LocaleKey;
48
+ partnerId: string,
49
+ customerStockId: string | undefined,
50
+ productShelfBuilderModalWindowBffClient: ProductShelfBuilderModalWindowBffClient,
51
+ productCategoryPickerModalWindowBffClient: ProductCategoryPickerModalWindowBffClient,
52
+ productPickerModalWindowBffClient: ProductPickerModalWindowBffClient,
53
+ }
54
+ ): AbandonedCategoryProductShelfDataSourceExpressionBuilderModalDeps => {
55
+
56
+ const productCache = {};
57
+ const categoryCache = {};
58
+
59
+ const productListComposerModalWindowDeps = productListComposerModalWindowDepsFactory({
60
+ localeKey: arg.localeKey,
61
+ partnerId: arg.partnerId,
62
+ customerStockId: arg.customerStockId,
63
+ productPickerModalWindowBffClient: arg.productPickerModalWindowBffClient,
64
+ });
65
+
66
+ return {
67
+ localeKey: arg.localeKey,
68
+ ProductListComposerModalWindowDeps: productListComposerModalWindowDeps,
69
+ CategoryListComposerModalWindowDeps: categoryListComposerModalWindowDepsFactory({
70
+ localeKey: arg.localeKey,
71
+ partnerId: arg.partnerId,
72
+ productCategoryPickerModalWindowBffClient: arg.productCategoryPickerModalWindowBffClient
73
+ }),
74
+ PopularProductsForAbandonedCategoriesShelfBuilderDeps: popularProductsForAbandonedCategoriesShelfBuilderDepsFactory({
75
+ localeKey: arg.localeKey,
76
+ partnerId: arg.partnerId,
77
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
78
+ }),
79
+ ProductListShelfBuilderDeps: productListShelfBuilderDepsFactory({
80
+ localeKey: arg.localeKey,
81
+ partnerId: arg.partnerId,
82
+ customerStockId: arg.customerStockId,
83
+ productCache: productCache,
84
+ getProductsByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductsByIds,
85
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
86
+ productListComposerModalWindowDeps: productListComposerModalWindowDeps
87
+ }),
88
+ RelatedProductListShelfBuilderDeps: relatedProductListShelfBuilderDepsFactory({
89
+ localeKey: arg.localeKey,
90
+ partnerId: arg.partnerId,
91
+ customerStockId: arg.customerStockId,
92
+ productCache: productCache,
93
+ getProductsByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductsByIds,
94
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
95
+ productListComposerModalWindowDeps: productListComposerModalWindowDeps
96
+ }),
97
+ AlternativeProductListShelfBuilderDeps: alternativeProductListShelfBuilderDepsFactory({
98
+ localeKey: arg.localeKey,
99
+ partnerId: arg.partnerId,
100
+ customerStockId: arg.customerStockId,
101
+ productCache: productCache,
102
+ getProductsByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductsByIds,
103
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
104
+ productListComposerModalWindowDeps: productListComposerModalWindowDeps
105
+ }),
106
+ PopularFromCategoryListShelfBuilderDeps: popularFromCategoryListShelfBuilderDepsFactory({
107
+ localeKey: arg.localeKey,
108
+ partnerId: arg.partnerId,
109
+ categoryCache: categoryCache,
110
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
111
+ getCategoriesByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductCategoriesByIds,
112
+ productCategoryPickerModalWindowBffClient: arg.productCategoryPickerModalWindowBffClient
113
+ }),
114
+ PopularProductListShelfBuilderDeps: popularProductListShelfBuilderDepsFactory({
115
+ localeKey: arg.localeKey,
116
+ partnerId: arg.partnerId,
117
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
118
+ }),
119
+ LatestProductListShelfBuilderDeps: latestProductListShelfBuilderDepsFactory({
120
+ localeKey: arg.localeKey,
121
+ partnerId: arg.partnerId,
122
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
123
+ }),
124
+ SaleByPopularProductListShelfBuilderDeps: saleByPopularProductListShelfBuilderDepsFactory({
125
+ localeKey: arg.localeKey,
126
+ partnerId: arg.partnerId,
127
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
128
+ }),
129
+ SaleByLatestProductListShelfBuilderDeps: saleByLatestProductListShelfBuilderDepsFactory({
130
+ localeKey: arg.localeKey,
131
+ partnerId: arg.partnerId,
132
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
133
+ })
134
+ }
135
+ }
@@ -0,0 +1,33 @@
1
+ import type { LocaleKey } from '@easy-wizzy/core';
2
+ import type { ProductShelfBuilderModalWindowBffClient } from '@easy-wizzy/common-app';
3
+ import type {
4
+ AbandonedCategoryProductShelfDataSourceExpressionBuilderDeps
5
+ } from '@easy-wizzy/retailrocket-abandoned-category';
6
+ import {
7
+ abandonedCategoryProductShelfDataSourceExpressionBuilderModalDepsFactory
8
+ } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedCategoryProductShelfDataSourceExpressionBuilderModal/abandonedCategoryProductShelfDataSourceExpressionBuilderModalDepsFactory';
9
+
10
+ import type { ProductPickerModalWindowBffClient } from '@easy-wizzy/common-app';
11
+ import type { ProductCategoryPickerModalWindowBffClient } from '@easy-wizzy/common-app';
12
+
13
+ export const abandonedCategoryProductShelfDataSourceExpressionBuilderDepsFactory = (
14
+ arg: {
15
+ localeKey: LocaleKey;
16
+ partnerId: string,
17
+ customerStockId: string | undefined,
18
+ productShelfBuilderModalWindowBffClient: ProductShelfBuilderModalWindowBffClient,
19
+ productCategoryPickerModalWindowBffClient: ProductCategoryPickerModalWindowBffClient,
20
+ productPickerModalWindowBffClient: ProductPickerModalWindowBffClient
21
+ }
22
+ ): AbandonedCategoryProductShelfDataSourceExpressionBuilderDeps => {
23
+ return {
24
+ abandonedCategoryProductShelfDataSourceExpressionBuilderModalDeps: abandonedCategoryProductShelfDataSourceExpressionBuilderModalDepsFactory({
25
+ localeKey: arg.localeKey,
26
+ partnerId: arg.partnerId,
27
+ customerStockId: arg.customerStockId,
28
+ productShelfBuilderModalWindowBffClient: arg.productShelfBuilderModalWindowBffClient,
29
+ productCategoryPickerModalWindowBffClient: arg.productCategoryPickerModalWindowBffClient,
30
+ productPickerModalWindowBffClient: arg.productPickerModalWindowBffClient
31
+ })
32
+ }
33
+ }
package/src/index.ts ADDED
File without changes
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "@easy-wizzy/ts-config/app.json",
3
+ "include": [
4
+ "env.d.ts",
5
+ "src/**/*.ts",
6
+ "src/**/*.vue"
7
+ ],
8
+ "exclude": [
9
+ "src/**/*.spec.ts"
10
+ ],
11
+ "compilerOptions": {
12
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
13
+ "paths": {
14
+ "@/*": [
15
+ "./src/*"
16
+ ]
17
+ }
18
+ }
19
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.app.json"
9
+ },
10
+ {
11
+ "path": "./tsconfig.test.json"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "@easy-wizzy/ts-config/node.json",
3
+ "include": [
4
+ "vite.config.*",
5
+ "vitest.config.*",
6
+ "eslint.config.*"
7
+ ],
8
+ "compilerOptions": {
9
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo"
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.app.json",
3
+ "include": [
4
+ "env.d.ts",
5
+ "src/**/*.spec.ts"
6
+ ],
7
+ "exclude": [],
8
+ "compilerOptions": {
9
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.test.tsbuildinfo"
10
+ }
11
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,36 @@
1
+ import vue from '@vitejs/plugin-vue';
2
+ import { fileURLToPath, URL } from 'node:url';
3
+ import { defineConfig } from 'vite';
4
+ import dts from 'vite-plugin-dts';
5
+
6
+ export default defineConfig({
7
+ build: {
8
+ rollupOptions: {
9
+ input: fileURLToPath(new URL('./index.html', import.meta.url)),
10
+ output: {
11
+ entryFileNames: 'assets/[name].js',
12
+ chunkFileNames: 'assets/[name].js',
13
+ assetFileNames: 'assets/[name].[ext]',
14
+ },
15
+ },
16
+ sourcemap: true,
17
+ },
18
+ plugins: [
19
+ vue({
20
+ template: {
21
+ compilerOptions: {
22
+ isCustomElement: tag => ['center'].includes(tag)
23
+ }
24
+ }
25
+ }),
26
+ dts({
27
+ insertTypesEntry: true,
28
+ tsconfigPath: './tsconfig.app.json',
29
+ })
30
+ ],
31
+ resolve: {
32
+ alias: {
33
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
34
+ },
35
+ },
36
+ })