@retailrocketgroup/retailrocket-edit.product-still-out-of-stock-vue-email-template-render 3.0.377566 → 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 (44) 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/editProductStillOutOfStockEmailTemplate.d.ts +0 -0
  6. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/productStillOutOfStockComponentSectionItemFactory.d.ts +4 -0
  7. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/productStillOutOfStockEmailComponentFactory.d.ts +4 -0
  8. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/productStillOutOfStockComponentLibraryFactory.d.ts +4 -0
  9. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/productStillOutOfStockSectionFactory.d.ts +4 -0
  10. package/dist/implementation/DataSources/ListDataExpressionSource/productStillOutOfStockEvaluateListExpressionDataSourceFactory.d.ts +8 -0
  11. package/dist/implementation/DataSources/NumberExpressionDataSource/productStillOutOfStockEvaluateNumberExpressionDataSourceFactory.d.ts +2 -0
  12. package/dist/implementation/DataSources/StringExpressionDataSource/productStillOutOfStockEvaluateStringExpressionDataSource.d.ts +9 -0
  13. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/alternativeProductsForProductStillOutOfStockProductListShelfBuilderDepsFactory.d.ts +8 -0
  14. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/productStillOutOfStockProductListShelfBuilderDepsFactory.d.ts +8 -0
  15. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/relatedProductsForProductStillOutOfStockProductListShelfBuilderDepsFactory.d.ts +8 -0
  16. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDepsFactory.d.ts +11 -0
  17. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/productStillOutOfStockProductShelfDataSourceExpressionBuilderDepsFactory.d.ts +11 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.html +35 -0
  20. package/env.d.ts +1 -0
  21. package/index.html +1 -2
  22. package/package.json +1 -1
  23. package/src/editProductStillOutOfStockEmailTemplate.ts +407 -0
  24. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/productStillOutOfStockComponentSectionItemFactory.ts +30 -0
  25. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/productStillOutOfStockEmailComponentFactory.ts +26 -0
  26. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/productStillOutOfStockComponentLibraryFactory.ts +29 -0
  27. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/productStillOutOfStockSectionFactory.ts +33 -0
  28. package/src/implementation/DataSources/ListDataExpressionSource/productStillOutOfStockEvaluateListExpressionDataSourceFactory.ts +134 -0
  29. package/src/implementation/DataSources/NumberExpressionDataSource/productStillOutOfStockEvaluateNumberExpressionDataSourceFactory.ts +10 -0
  30. package/src/implementation/DataSources/StringExpressionDataSource/productStillOutOfStockEvaluateStringExpressionDataSource.ts +56 -0
  31. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/alternativeProductsForProductStillOutOfStockProductListShelfBuilderDepsFactory.ts +33 -0
  32. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/productStillOutOfStockProductListShelfBuilderDepsFactory.ts +33 -0
  33. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/relatedProductsForProductStillOutOfStockProductListShelfBuilderDepsFactory.ts +33 -0
  34. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDepsFactory.ts +149 -0
  35. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/productStillOutOfStockProductShelfDataSourceExpressionBuilderDepsFactory.ts +33 -0
  36. package/src/index.ts +0 -0
  37. package/tsconfig.app.json +19 -0
  38. package/tsconfig.json +14 -0
  39. package/tsconfig.node.json +11 -0
  40. package/tsconfig.test.json +11 -0
  41. package/vite.config.ts +36 -0
  42. package/assets/main.css +0 -1
  43. package/assets/main.js +0 -211
  44. package/favicon.ico +0 -0
@@ -0,0 +1,26 @@
1
+ import type { EmailComponentType } from '@easy-wizzy/core';
2
+ import type {
3
+ Component,
4
+ } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.addcomponentlibrarysectionitemmodalwindow/main';
5
+ import type {
6
+ ProductStillOutOfStockListExpressionDataSource
7
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
8
+ import type {
9
+ ProductStillOutOfStockNumberExpressionDataSource
10
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
11
+ import type {
12
+ ProductStillOutOfStockStringExpressionDataSource
13
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
14
+
15
+ export const productStillOutOfStockEmailComponentFactory = (
16
+ component: Component
17
+ ): EmailComponentType<
18
+ ProductStillOutOfStockListExpressionDataSource,
19
+ ProductStillOutOfStockNumberExpressionDataSource,
20
+ ProductStillOutOfStockStringExpressionDataSource
21
+ > =>
22
+ {
23
+ return component.triggerProductStillOutOfStock
24
+ ? JSON.parse(component.triggerProductStillOutOfStock.componentJson)
25
+ : JSON.parse(component.common!.componentJson)
26
+ }
@@ -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
+ ProductStillOutOfStockListExpressionDataSource
9
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
10
+ import type {
11
+ ProductStillOutOfStockNumberExpressionDataSource
12
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
13
+ import type {
14
+ ProductStillOutOfStockStringExpressionDataSource
15
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
16
+ import {
17
+ productStillOutOfStockSectionFactory
18
+ } from '@/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/productStillOutOfStockSectionFactory';
19
+
20
+ export const productStillOutOfStockComponentLibraryFactory = (
21
+ componentLibrary: Array<ComponentLibrarySection>
22
+ ): CustomComponentLibraryType<
23
+ ProductStillOutOfStockListExpressionDataSource,
24
+ ProductStillOutOfStockNumberExpressionDataSource,
25
+ ProductStillOutOfStockStringExpressionDataSource
26
+ > => {
27
+ return componentLibrary
28
+ .map(section => productStillOutOfStockSectionFactory(section))
29
+ }
@@ -0,0 +1,33 @@
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
+ ProductStillOutOfStockListExpressionDataSource
7
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
8
+ import type {
9
+ ProductStillOutOfStockNumberExpressionDataSource
10
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
11
+ import type {
12
+ ProductStillOutOfStockStringExpressionDataSource
13
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
14
+ import {
15
+ productStillOutOfStockComponentSectionItemFactory
16
+ } from '@/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/productStillOutOfStockComponentSectionItemFactory';
17
+
18
+
19
+ export const productStillOutOfStockSectionFactory = (
20
+ section: ComponentLibrarySection,
21
+ ): CustomComponentSectionType<
22
+ ProductStillOutOfStockListExpressionDataSource,
23
+ ProductStillOutOfStockNumberExpressionDataSource,
24
+ ProductStillOutOfStockStringExpressionDataSource
25
+ > => {
26
+ return {
27
+ sectionId: section.sectionId,
28
+ sectionName: section.sectionName,
29
+ componentList: section
30
+ .sectionItems
31
+ .map(component => productStillOutOfStockComponentSectionItemFactory(component)),
32
+ };
33
+ };
@@ -0,0 +1,134 @@
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 { ProductStillOutOfStockListExpressionDataSource } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
9
+ import { productStillOutOfStockListExpressionDataSourceMatcher } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
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 productStillOutOfStockEvaluateListExpressionDataSourceFactory = (arg: {
21
+ partnerId: string;
22
+ listExpressionDataSourceBffClient: ListExpressionDataSourceBffClient;
23
+ customerStockId: string | undefined;
24
+ }): ListExpressionDataSourceEvaluatorDelegate<ProductStillOutOfStockListExpressionDataSource> => {
25
+ let productCache: { [key: string]: Product } = {};
26
+
27
+ return (asyncDataSource: ProductStillOutOfStockListExpressionDataSource) =>
28
+ productStillOutOfStockListExpressionDataSourceMatcher(asyncDataSource).Match<Promise<DataListType>>({
29
+ ProductStillOutOfStockProductList: ({ 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
+ RelatedProductsForProductStillOutOfStockProductList: ({ StockSource }) =>
39
+ getSampleProductsForPreview({
40
+ partnerId: arg.partnerId,
41
+ stockId: stockIdFactory({
42
+ stockSource: StockSource,
43
+ customerStockId: arg.customerStockId,
44
+ }),
45
+ getSampleProductsForPreviewHttpClient: arg.listExpressionDataSourceBffClient.postGetSampleProductsForPreview,
46
+ }),
47
+ AlternativeProductsForProductStillOutOfStockProductList: ({ StockSource }) =>
48
+ getSampleProductsForPreview({
49
+ partnerId: arg.partnerId,
50
+ stockId: stockIdFactory({
51
+ stockSource: StockSource,
52
+ customerStockId: arg.customerStockId,
53
+ }),
54
+ getSampleProductsForPreviewHttpClient: arg.listExpressionDataSourceBffClient.postGetSampleProductsForPreview,
55
+ }),
56
+ ProductList: ({ ProductIds, StockSource }) =>
57
+ getProductList({
58
+ partnerId: arg.partnerId,
59
+ productIDs: ProductIds,
60
+ stockId: stockIdFactory({
61
+ stockSource: StockSource,
62
+ customerStockId: arg.customerStockId,
63
+ }),
64
+ productCache: productCache,
65
+ getProductsByIDsHttpClient: arg.listExpressionDataSourceBffClient.postGetProductsByIds,
66
+ }),
67
+ RelatedProductsFor: ({ ProductIds, StockSource }) =>
68
+ getRelatedProducts({
69
+ partnerId: arg.partnerId,
70
+ productIDs: ProductIds,
71
+ stockId: stockIdFactory({
72
+ stockSource: StockSource,
73
+ customerStockId: arg.customerStockId
74
+ }),
75
+ getRelatedProducts: arg.listExpressionDataSourceBffClient.postGetRelatedRecommendations,
76
+ }),
77
+ AlternativeProductsFor: ({ ProductIds, StockSource }) =>
78
+ getAlternativeProducts({
79
+ partnerId: arg.partnerId,
80
+ productIDs: ProductIds,
81
+ stockId: stockIdFactory({
82
+ stockSource: StockSource,
83
+ customerStockId: arg.customerStockId,
84
+ }),
85
+ getAlternativeProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetAlternativeRecommendations,
86
+ }),
87
+ PopularProductsInCategories: ({ CategoryIds, StockSource }) =>
88
+ getPopularProductsInCategories({
89
+ partnerId: arg.partnerId,
90
+ categoryIds: CategoryIds,
91
+ stockId: stockIdFactory({
92
+ stockSource: StockSource,
93
+ customerStockId: arg.customerStockId,
94
+ }),
95
+ getPopularProductsInCategoriesHttpClient: arg.listExpressionDataSourceBffClient.postGetPopularInCategoriesRecommendations,
96
+ }),
97
+ Popular: ({ StockSource }) =>
98
+ getPopularProducts({
99
+ partnerId: arg.partnerId,
100
+ stockId: stockIdFactory({
101
+ stockSource: StockSource,
102
+ customerStockId: arg.customerStockId,
103
+ }),
104
+ getPopularProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetPopularRecommendations,
105
+ }),
106
+ Latest: ({ StockSource }) =>
107
+ getLatestProducts({
108
+ partnerId: arg.partnerId,
109
+ stockId: stockIdFactory({
110
+ stockSource: StockSource,
111
+ customerStockId: arg.customerStockId,
112
+ }),
113
+ getLatestProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetLatestRecommendations,
114
+ }),
115
+ SaleByPopular: ({ StockSource }) =>
116
+ getSaleByPopularProducts({
117
+ partnerId: arg.partnerId,
118
+ stockId: stockIdFactory({
119
+ stockSource: StockSource,
120
+ customerStockId: arg.customerStockId,
121
+ }),
122
+ getSaleByPopularProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetSaleByPopularRecommendations,
123
+ }),
124
+ SaleByLatest: ({ StockSource }) =>
125
+ getSaleByLatestProducts({
126
+ partnerId: arg.partnerId,
127
+ stockId: stockIdFactory({
128
+ stockSource: StockSource,
129
+ customerStockId: arg.customerStockId,
130
+ }),
131
+ getSaleByLatestProductsHttpClient: arg.listExpressionDataSourceBffClient.postGetSaleByLatestRecommendations,
132
+ }),
133
+ });
134
+ };
@@ -0,0 +1,10 @@
1
+ import type {
2
+ NumberExpressionDataSourceEvaluatorDelegate
3
+ } from '@easy-wizzy/core';
4
+
5
+ export const productStillOutOfStockEvaluateNumberExpressionDataSourceFactory = <
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
+ ProductStillOutOfStockListExpressionDataSource
13
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
14
+ import type {
15
+ ProductStillOutOfStockNumberExpressionDataSource
16
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
17
+ import type {
18
+ ProductStillOutOfStockStringExpressionDataSource
19
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
20
+ import {
21
+ productStillOutOfStockStringExpressionDataSourceMatcher
22
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
23
+ import type { NextCouponFromBatchType } from '@easy-wizzy/retailrocket-common';
24
+
25
+ export const productStillOutOfStockStringExpressionDataSourceEvaluatorFactory = (arg: {
26
+ productImageUrlBuilderExpressionEvaluator: ProductImageUrlBuilderExpressionEvaluatorDelegate<
27
+ ProductStillOutOfStockListExpressionDataSource,
28
+ ProductStillOutOfStockNumberExpressionDataSource
29
+ >
30
+ contactCustomData: ContactCustomData
31
+ nextCouponFromBatch: NextCouponFromBatchType
32
+ }): StringExpressionDataSourceEvaluatorDelegate<
33
+ ProductStillOutOfStockStringExpressionDataSource
34
+ > => {
35
+ const productStillOutOfStockContactCustomData = arg.contactCustomData;
36
+
37
+ return (a: {
38
+ stringExpressionDataSource: ProductStillOutOfStockStringExpressionDataSource,
39
+ context: DataType
40
+ }) => productStillOutOfStockStringExpressionDataSourceMatcher(
41
+ a.stringExpressionDataSource
42
+ )
43
+ .Match({
44
+ StringFromContactCustomData: (x) => Promise.resolve(productStillOutOfStockContactCustomData[x.FieldName] as string),
45
+ StringFromContactCustomDataWithFallback: (x) => Promise.resolve(
46
+ x.FieldName in productStillOutOfStockContactCustomData && typeof productStillOutOfStockContactCustomData[x.FieldName] === 'string'
47
+ ? productStillOutOfStockContactCustomData[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
+ AlternativeProductsForProductStillOutOfStockProductListShelfBuilderDeps
8
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
9
+
10
+ export const alternativeProductsForAbandonedProductListShelfBuilderDepsFactory = (
11
+ arg: {
12
+ localeKey: LocaleKey;
13
+ partnerId: string,
14
+ getAllStockIdsHttpClient: ProductShelfBuilderModalWindowBffClient['postGetAllStockIds']
15
+ }
16
+ ): AlternativeProductsForProductStillOutOfStockProductListShelfBuilderDeps => {
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,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
+ ProductStillOutOfStockProductListShelfBuilderDeps
8
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
9
+
10
+ export const productStillOutOfStockProductListShelfBuilderDepsFactory = (
11
+ arg: {
12
+ localeKey: LocaleKey;
13
+ partnerId: string,
14
+ getAllStockIdsHttpClient: ProductShelfBuilderModalWindowBffClient['postGetAllStockIds']
15
+ }
16
+ ): ProductStillOutOfStockProductListShelfBuilderDeps => {
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,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
+ RelatedProductsForProductStillOutOfStockProductListShelfBuilderDeps
8
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
9
+
10
+ export const relatedProductsForAbandonedProductListShelfBuilderDepsFactory = (
11
+ arg: {
12
+ localeKey: LocaleKey;
13
+ partnerId: string,
14
+ getAllStockIdsHttpClient: ProductShelfBuilderModalWindowBffClient['postGetAllStockIds']
15
+ }
16
+ ): RelatedProductsForProductStillOutOfStockProductListShelfBuilderDeps => {
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,149 @@
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
+ ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModalDeps
8
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
9
+ import {
10
+ alternativeProductsForAbandonedProductListShelfBuilderDepsFactory
11
+ } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/alternativeProductsForProductStillOutOfStockProductListShelfBuilderDepsFactory';
12
+ import {
13
+ relatedProductsForAbandonedProductListShelfBuilderDepsFactory
14
+ } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/relatedProductsForProductStillOutOfStockProductListShelfBuilderDepsFactory';
15
+ import {
16
+ latestProductListShelfBuilderDepsFactory
17
+ } from '@easy-wizzy/common-app';
18
+ import {
19
+ saleByPopularProductListShelfBuilderDepsFactory
20
+ } from '@easy-wizzy/common-app';
21
+ import {
22
+ saleByLatestProductListShelfBuilderDepsFactory
23
+ } from '@easy-wizzy/common-app';
24
+ import {
25
+ productListComposerModalWindowDepsFactory
26
+ } from '@easy-wizzy/common-app';
27
+
28
+ import type { ProductPickerModalWindowBffClient } from '@easy-wizzy/common-app';
29
+ import {
30
+ categoryListComposerModalWindowDepsFactory
31
+ } from '@easy-wizzy/common-app';
32
+ import {
33
+ alternativeProductListShelfBuilderDepsFactory
34
+ } from '@easy-wizzy/common-app';
35
+ import {
36
+ relatedProductListShelfBuilderDepsFactory
37
+ } from '@easy-wizzy/common-app';
38
+ import {
39
+ productListShelfBuilderDepsFactory
40
+ } from '@easy-wizzy/common-app';
41
+ import {
42
+ popularFromCategoryListShelfBuilderDepsFactory
43
+ } from '@easy-wizzy/common-app';
44
+ import {
45
+ productStillOutOfStockProductListShelfBuilderDepsFactory
46
+ } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/productStillOutOfStockProductListShelfBuilderDepsFactory';
47
+ import type { ProductCategoryPickerModalWindowBffClient } from '@easy-wizzy/common-app';
48
+
49
+ export const productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDepsFactory = (
50
+ arg: {
51
+ localeKey: LocaleKey;
52
+ partnerId: string,
53
+ customerStockId: string | undefined,
54
+ productShelfBuilderModalWindowBffClient: ProductShelfBuilderModalWindowBffClient,
55
+ productCategoryPickerModalWindowBffClient: ProductCategoryPickerModalWindowBffClient,
56
+ productPickerModalWindowBffClient: ProductPickerModalWindowBffClient,
57
+ }
58
+ ): ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModalDeps => {
59
+
60
+ const productCache = {};
61
+ const categoryCache = {};
62
+
63
+ const productListComposerModalWindowDeps = productListComposerModalWindowDepsFactory({
64
+ localeKey: arg.localeKey,
65
+ partnerId: arg.partnerId,
66
+ customerStockId: arg.customerStockId,
67
+ productPickerModalWindowBffClient: arg.productPickerModalWindowBffClient,
68
+ });
69
+
70
+ return {
71
+ localeKey: arg.localeKey,
72
+ ProductListComposerModalWindowDeps: productListComposerModalWindowDeps,
73
+ CategoryListComposerModalWindowDeps: categoryListComposerModalWindowDepsFactory({
74
+ localeKey: arg.localeKey,
75
+ partnerId: arg.partnerId,
76
+ productCategoryPickerModalWindowBffClient: arg.productCategoryPickerModalWindowBffClient
77
+ }),
78
+ ProductStillOutOfStockProductListShelfBuilderDeps: productStillOutOfStockProductListShelfBuilderDepsFactory({
79
+ localeKey: arg.localeKey,
80
+ partnerId: arg.partnerId,
81
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
82
+ }),
83
+ AlternativeProductsForProductStillOutOfStockProductListShelfBuilderDeps: alternativeProductsForAbandonedProductListShelfBuilderDepsFactory({
84
+ localeKey: arg.localeKey,
85
+ partnerId: arg.partnerId,
86
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
87
+ }),
88
+ RelatedProductsForProductStillOutOfStockProductListShelfBuilderDeps: relatedProductsForAbandonedProductListShelfBuilderDepsFactory({
89
+ localeKey: arg.localeKey,
90
+ partnerId: arg.partnerId,
91
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
92
+ }),
93
+ ProductListShelfBuilderDeps: productListShelfBuilderDepsFactory({
94
+ localeKey: arg.localeKey,
95
+ partnerId: arg.partnerId,
96
+ customerStockId: arg.customerStockId,
97
+ productCache: productCache,
98
+ getProductsByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductsByIds,
99
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
100
+ productListComposerModalWindowDeps: productListComposerModalWindowDeps
101
+ }),
102
+ RelatedProductListShelfBuilderDeps: relatedProductListShelfBuilderDepsFactory({
103
+ localeKey: arg.localeKey,
104
+ partnerId: arg.partnerId,
105
+ customerStockId: arg.customerStockId,
106
+ productCache: productCache,
107
+ getProductsByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductsByIds,
108
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
109
+ productListComposerModalWindowDeps: productListComposerModalWindowDeps
110
+ }),
111
+ AlternativeProductListShelfBuilderDeps: alternativeProductListShelfBuilderDepsFactory({
112
+ localeKey: arg.localeKey,
113
+ partnerId: arg.partnerId,
114
+ customerStockId: arg.customerStockId,
115
+ productCache: productCache,
116
+ getProductsByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductsByIds,
117
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
118
+ productListComposerModalWindowDeps: productListComposerModalWindowDeps
119
+ }),
120
+ PopularFromCategoryListShelfBuilderDeps: popularFromCategoryListShelfBuilderDepsFactory({
121
+ localeKey: arg.localeKey,
122
+ partnerId: arg.partnerId,
123
+ categoryCache: categoryCache,
124
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds,
125
+ getCategoriesByIDsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetProductCategoriesByIds,
126
+ productCategoryPickerModalWindowBffClient: arg.productCategoryPickerModalWindowBffClient
127
+ }),
128
+ PopularProductListShelfBuilderDeps: popularProductListShelfBuilderDepsFactory({
129
+ localeKey: arg.localeKey,
130
+ partnerId: arg.partnerId,
131
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
132
+ }),
133
+ LatestProductListShelfBuilderDeps: latestProductListShelfBuilderDepsFactory({
134
+ localeKey: arg.localeKey,
135
+ partnerId: arg.partnerId,
136
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
137
+ }),
138
+ SaleByPopularProductListShelfBuilderDeps: saleByPopularProductListShelfBuilderDepsFactory({
139
+ localeKey: arg.localeKey,
140
+ partnerId: arg.partnerId,
141
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
142
+ }),
143
+ SaleByLatestProductListShelfBuilderDeps: saleByLatestProductListShelfBuilderDepsFactory({
144
+ localeKey: arg.localeKey,
145
+ partnerId: arg.partnerId,
146
+ getAllStockIdsHttpClient: arg.productShelfBuilderModalWindowBffClient.postGetAllStockIds
147
+ })
148
+ }
149
+ }
@@ -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
+ ProductStillOutOfStockProductShelfDataSourceExpressionBuilderDeps
5
+ } from '@easy-wizzy/retailrocket-product-still-out-of-stock';
6
+
7
+ import type { ProductPickerModalWindowBffClient } from '@easy-wizzy/common-app';
8
+ import {
9
+ productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDepsFactory
10
+ } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/ProductStillOutOfStockProductShelfDataSourceExpressionBuilderModal/productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDepsFactory';
11
+ import type { ProductCategoryPickerModalWindowBffClient } from '@easy-wizzy/common-app';
12
+
13
+ export const productStillOutOfStockProductShelfDataSourceExpressionBuilderDepsFactory = (
14
+ arg: {
15
+ localeKey: LocaleKey;
16
+ partnerId: string,
17
+ customerStockId: string | undefined,
18
+ productShelfBuilderModalWindowBffClient: ProductShelfBuilderModalWindowBffClient,
19
+ productCategoryPickerModalWindowBffClient: ProductCategoryPickerModalWindowBffClient,
20
+ productPickerModalWindowBffClient: ProductPickerModalWindowBffClient
21
+ }
22
+ ): ProductStillOutOfStockProductShelfDataSourceExpressionBuilderDeps => {
23
+ return {
24
+ productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDeps: productStillOutOfStockProductShelfDataSourceExpressionBuilderModalDepsFactory({
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
+ }