@retailrocketgroup/retailrocket-create.price-drop-vue-email-template-render 6.0.388652 → 6.0.388781
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/.turbo/turbo-build.log +3 -3
- package/dist/assets/index.js +224 -224
- package/package.json +1 -1
- package/src/createPriceDropEmailTemplateApp.ts +31 -18
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ import type { EmailTemplateType } from '@easy-wizzy/core';
|
|
|
21
21
|
import type { LocaleKey } from '@easy-wizzy/core';
|
|
22
22
|
import type { StringExpressionEvaluatorDelegate } from '@easy-wizzy/core';
|
|
23
23
|
|
|
24
|
-
import { templatesGalleryDepsFactory } from '@easy-wizzy/common-app';
|
|
24
|
+
import { defaultTemplateLibraryFactory, templatesGalleryDepsFactory } from '@easy-wizzy/common-app';
|
|
25
25
|
import {
|
|
26
26
|
templatePreviewCardDepsFactory
|
|
27
27
|
} from '@easy-wizzy/common-app';
|
|
@@ -68,6 +68,7 @@ const params = {
|
|
|
68
68
|
antiForgeryFormTokenValue: appTag!.getAttribute('data-anti-forgery-form-token-value')!,
|
|
69
69
|
createEmailTemplateSubmitUrl: appTag!.getAttribute('data-create-email-template-submit-url')!,
|
|
70
70
|
initialEmailTemplateJson: appTag!.getAttribute('data-initial-price-drop-template')!,
|
|
71
|
+
productImageResizerUrl: appTag!.getAttribute('data-product-image-resizer-url')!,
|
|
71
72
|
priceDropFavoritesTemplates: JSON
|
|
72
73
|
.parse(
|
|
73
74
|
appTag!.getAttribute('data-price-drop-favorites-templates')!
|
|
@@ -166,7 +167,8 @@ const _templatePreviewCardDepsFactory = (arg: {
|
|
|
166
167
|
stringExpressionDataSourceEvaluatorFactory: () => priceDropStringExpressionDataSourceEvaluatorFactory({
|
|
167
168
|
productImageUrlBuilderExpressionEvaluator: productImageUrlBuilderExpressionEvaluatorFactory({
|
|
168
169
|
partnerId: params.partnerId,
|
|
169
|
-
numberExpressionEvaluator: numberExpressionEvaluator
|
|
170
|
+
numberExpressionEvaluator: numberExpressionEvaluator,
|
|
171
|
+
productImageResizerUrl: params.productImageResizerUrl
|
|
170
172
|
}),
|
|
171
173
|
contactCustomData: arg.contactCustomData,
|
|
172
174
|
nextCouponFromBatch: arg.nextCouponFromBatch
|
|
@@ -238,26 +240,37 @@ const app = createApp(
|
|
|
238
240
|
template: template
|
|
239
241
|
});
|
|
240
242
|
},
|
|
241
|
-
commonFavoriteTemplates: params
|
|
242
|
-
.
|
|
243
|
-
|
|
244
|
-
template:
|
|
243
|
+
commonFavoriteTemplates: defaultTemplateLibraryFactory(params.localeKey)
|
|
244
|
+
.map(o => ({
|
|
245
|
+
templateName: o.favoriteTemplateName,
|
|
246
|
+
template: o.defaultTemplate as EmailTemplateType<
|
|
245
247
|
GeneralListExpressionDataSource,
|
|
246
248
|
GeneralNumberExpressionDataSource,
|
|
247
249
|
GeneralStringExpressionDataSource
|
|
248
|
-
|
|
249
|
-
templateName: t.favoriteTemplateName
|
|
250
|
-
})),
|
|
251
|
-
customFavoriteTemplates: params
|
|
252
|
-
.priceDropFavoritesTemplates
|
|
253
|
-
.map(t => ({
|
|
254
|
-
template: JSON.parse(t.templateJson) as EmailTemplateType<
|
|
255
|
-
PriceDropListExpressionDataSource,
|
|
256
|
-
PriceDropNumberExpressionDataSource,
|
|
257
|
-
PriceDropStringExpressionDataSource
|
|
258
|
-
>,
|
|
259
|
-
templateName: t.favoriteTemplateName
|
|
250
|
+
>
|
|
260
251
|
})),
|
|
252
|
+
customFavoriteTemplates: [
|
|
253
|
+
...params
|
|
254
|
+
.priceDropFavoritesTemplates
|
|
255
|
+
.map(t => ({
|
|
256
|
+
template: JSON.parse(t.templateJson) as EmailTemplateType<
|
|
257
|
+
PriceDropListExpressionDataSource,
|
|
258
|
+
PriceDropNumberExpressionDataSource,
|
|
259
|
+
PriceDropStringExpressionDataSource
|
|
260
|
+
>,
|
|
261
|
+
templateName: t.favoriteTemplateName
|
|
262
|
+
})),
|
|
263
|
+
...params
|
|
264
|
+
.commonFavoritesTemplates
|
|
265
|
+
.map(t => ({
|
|
266
|
+
template: JSON.parse(t.templateJson) as EmailTemplateType<
|
|
267
|
+
GeneralListExpressionDataSource,
|
|
268
|
+
GeneralNumberExpressionDataSource,
|
|
269
|
+
GeneralStringExpressionDataSource
|
|
270
|
+
>,
|
|
271
|
+
templateName: t.favoriteTemplateName
|
|
272
|
+
})),
|
|
273
|
+
],
|
|
261
274
|
deps: templatesGalleryDepsFactory<
|
|
262
275
|
PriceDropListExpressionDataSource,
|
|
263
276
|
PriceDropNumberExpressionDataSource,
|