@retailrocketgroup/retailrocket-edit.product-still-out-of-stock-vue-email-template-render 6.0.388330-dev → 6.0.388648-dev

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@retailrocketgroup/retailrocket-edit.product-still-out-of-stock-vue-email-template-render",
3
- "version": "6.0.388330-dev",
3
+ "version": "6.0.388648-dev",
4
4
  "private": false
5
5
  }
@@ -180,219 +180,220 @@ const dataStructExpressionEvaluator = dataStructBuilderExpressionEvaluatorFactor
180
180
  expressionEvaluator: expressionEvaluator
181
181
  });
182
182
 
183
- const app = createApp(
184
- WysiwygTemplateEditor,
185
- {
186
- onTemplateReset: () => {
187
- resetTemplate();
183
+ const deps = wysiwygTemplateEditorDepsFactory<
184
+ ProductStillOutOfStockListExpressionDataSource,
185
+ ProductStillOutOfStockNumberExpressionDataSource,
186
+ ProductStillOutOfStockStringExpressionDataSource
187
+ >({
188
+ partnerId: params.partnerId,
189
+ exitLink: params.exitLink,
190
+ localeKey: params.localeKey,
191
+ dataSourceFieldNameDelegate: ({ dataSource }) => {
192
+ return matcherFactory(dataSource as GeneralStringExpressionDataSource).Match({
193
+ StringFromContactCustomData: (customData) => customData.FieldName,
194
+ StringFromContactCustomDataWithFallback: (customDataWithFallback) => customDataWithFallback.FallbackValue,
195
+ ProductImageUrlBuilderExpression: () => 'ImageResizer',
196
+ NextCouponFromBatch: () => 'Coupon'
197
+ });
188
198
  },
189
- deps:
190
- wysiwygTemplateEditorDepsFactory<
191
- ProductStillOutOfStockListExpressionDataSource,
192
- ProductStillOutOfStockNumberExpressionDataSource,
193
- ProductStillOutOfStockStringExpressionDataSource
194
- >({
195
- partnerId: params.partnerId,
196
- exitLink: params.exitLink,
197
- localeKey: params.localeKey,
198
- dataSourceFieldNameDelegate: ({ dataSource }) => {
199
- return matcherFactory(dataSource as GeneralStringExpressionDataSource).Match({
200
- StringFromContactCustomData: (customData) => customData.FieldName,
201
- StringFromContactCustomDataWithFallback: (customDataWithFallback) => customDataWithFallback.FallbackValue,
202
- ProductImageUrlBuilderExpression: () => 'ImageResizer',
203
- NextCouponFromBatch: () => 'Coupon'
204
- });
205
- },
206
- richTextToolbarPlugins: [
207
- richTextToolbarPluginFactory({
208
- richTextToolbarPluginComponent: VariableSelector,
209
- deps: variableSelectorDepsFactory({
210
- localeKey: params.localeKey,
211
- stringExpressionBuilderPlugin: stringExpressionBuilderPluginFactory({
212
- localeKey: params.localeKey
213
- })
199
+ richTextToolbarPlugins: [
200
+ richTextToolbarPluginFactory({
201
+ richTextToolbarPluginComponent: VariableSelector,
202
+ deps: variableSelectorDepsFactory({
203
+ localeKey: params.localeKey,
204
+ stringExpressionBuilderPlugin: stringExpressionBuilderPluginFactory({
205
+ localeKey: params.localeKey
214
206
  })
215
207
  })
216
- ],
217
- defaultThemeLibrary: defaultThemeLibraryFactory({
218
- localeKey: params.localeKey
219
- }),
220
- defaultComponentLibrary: defaultComponentLibraryFactory({
221
- localeKey: params.localeKey
222
- }),
223
- saveEmailTemplate: async arg => {
224
- const result = await productStillOutOfStockMainPageBffClient
225
- .postSaveTemplate({
226
- body: {
227
- partnerId: params.partnerId,
228
- templateJson: JSON.stringify(arg.emailTemplate)
229
- }
230
- })
208
+ })
209
+ ],
210
+ defaultThemeLibrary: defaultThemeLibraryFactory({
211
+ localeKey: params.localeKey
212
+ }),
213
+ defaultComponentLibrary: defaultComponentLibraryFactory({
214
+ localeKey: params.localeKey
215
+ }),
216
+ saveEmailTemplate: async arg => {
217
+ const result = await productStillOutOfStockMainPageBffClient
218
+ .postSaveTemplate({
219
+ body: {
220
+ partnerId: params.partnerId,
221
+ templateJson: JSON.stringify(arg.emailTemplate)
222
+ }
223
+ })
231
224
 
232
- return result.status === 200
233
- ? 'Success'
234
- : 'Fail'
235
- },
236
- createFavoriteTemplate: async arg => {
237
- const result = await createFavoriteTemplateBffClient
238
- .postCreateFavoriteTriggerProductStillOutOfStockTemplate({
239
- body: {
240
- partnerId: params.partnerId,
241
- templateJson: JSON.stringify(arg.emailTemplate),
242
- favoriteTemplateName: 'Favorite template'
243
- }
244
- });
245
-
246
- return result.status === 200
247
- ? 'Success'
248
- : 'Fail';
249
- },
250
- listExpressionEvaluator: listExpressionEvaluator,
251
- numberExpressionEvaluator: numberExpressionEvaluator,
252
- stringExpressionEvaluator: stringExpressionEvaluator,
253
- dataStructExpressionEvaluator: dataStructExpressionEvaluator,
254
- expressionEvaluator: expressionEvaluator,
255
- getComponentLibraryFactory: x => () =>
256
- x.getComponentLibraryHttpClient(
257
- {
258
- body: {
259
- partnerId: x.partnerId,
260
- componentTypes: [
261
- { triggerProductStillOutOfStock: {} },
262
- { common: {} }
263
- ]
264
- }
225
+ return result.status === 200
226
+ ? 'Success'
227
+ : 'Fail'
228
+ },
229
+ createFavoriteTemplate: async arg => {
230
+ const result = await createFavoriteTemplateBffClient
231
+ .postCreateFavoriteTriggerProductStillOutOfStockTemplate({
232
+ body: {
233
+ partnerId: params.partnerId,
234
+ templateJson: JSON.stringify(arg.emailTemplate),
235
+ favoriteTemplateName: 'Favorite template'
265
236
  }
266
- )
267
- .then(x => productStillOutOfStockComponentLibraryFactory(x.body.sections)),
268
- canProductShelfDataSourceBeConverted: () => false,
269
- httpClientComponentFactoryDelegate: (emailComponent): Component => {
270
- return {
271
- triggerProductStillOutOfStock: {
272
- componentJson: JSON.stringify(emailComponent)
237
+ });
238
+
239
+ return result.status === 200
240
+ ? 'Success'
241
+ : 'Fail';
242
+ },
243
+ listExpressionEvaluator: listExpressionEvaluator,
244
+ numberExpressionEvaluator: numberExpressionEvaluator,
245
+ stringExpressionEvaluator: stringExpressionEvaluator,
246
+ dataStructExpressionEvaluator: dataStructExpressionEvaluator,
247
+ expressionEvaluator: expressionEvaluator,
248
+ getComponentLibraryFactory: x => () =>
249
+ x.getComponentLibraryHttpClient(
250
+ {
251
+ body: {
252
+ partnerId: x.partnerId,
253
+ componentTypes: [
254
+ { triggerProductStillOutOfStock: {} },
255
+ { common: {} }
256
+ ]
273
257
  }
274
258
  }
275
- },
276
- stringExpressionBuilderPlugin: stringExpressionBuilderPluginFactory({
277
- localeKey: params.localeKey
278
- }),
279
- emailComponentSettingsModifierPlugin: productShelfDataSourceExpressionBuilderPluginFactory({
280
- productShelfDataSourceExpressionBuilderComponent: ProductStillOutOfStockProductShelfDataSourceExpressionBuilder,
281
- deps: productStillOutOfStockProductShelfDataSourceExpressionBuilderDepsFactory({
282
- localeKey: params.localeKey,
283
- partnerId: params.partnerId,
284
- customerStockId: 'customerStockId',
285
- productShelfBuilderModalWindowBffClient: createProductShelfBuilderModalWindowBffClient(
286
- apiMachineFetchFactory({
287
- baseUrl: params.wysiwygBffProxyBaseUrl,
288
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
289
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
290
- })
291
- ),
292
- productCategoryPickerModalWindowBffClient: createProductCategoryPickerModalWindowBffClient(
293
- apiMachineFetchFactory({
294
- baseUrl: params.wysiwygBffProxyBaseUrl,
295
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
296
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
297
- })
298
- ),
299
- productPickerModalWindowBffClient: createProductPickerModalWindowBffClient(
300
- apiMachineFetchFactory({
301
- baseUrl: params.wysiwygBffProxyBaseUrl,
302
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
303
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
304
- })
305
- )
306
- })
307
- }),
308
- initialEmailTemplate: JSON.parse(params.emailTemplateJson),
309
- wysiwygTemplateEditorBffClient: wysiwygTemplateEditorBffClientFactory({
310
- themeLibraryBffClient: createThemeLibraryBffClient(
259
+ )
260
+ .then(x => productStillOutOfStockComponentLibraryFactory(x.body.sections)),
261
+ canProductShelfDataSourceBeConverted: () => false,
262
+ httpClientComponentFactoryDelegate: (emailComponent): Component => {
263
+ return {
264
+ triggerProductStillOutOfStock: {
265
+ componentJson: JSON.stringify(emailComponent)
266
+ }
267
+ }
268
+ },
269
+ stringExpressionBuilderPlugin: stringExpressionBuilderPluginFactory({
270
+ localeKey: params.localeKey
271
+ }),
272
+ emailComponentSettingsModifierPlugin: productShelfDataSourceExpressionBuilderPluginFactory({
273
+ productShelfDataSourceExpressionBuilderComponent: ProductStillOutOfStockProductShelfDataSourceExpressionBuilder,
274
+ deps: productStillOutOfStockProductShelfDataSourceExpressionBuilderDepsFactory({
275
+ localeKey: params.localeKey,
276
+ partnerId: params.partnerId,
277
+ customerStockId: 'customerStockId',
278
+ productShelfBuilderModalWindowBffClient: createProductShelfBuilderModalWindowBffClient(
311
279
  apiMachineFetchFactory({
312
280
  baseUrl: params.wysiwygBffProxyBaseUrl,
313
281
  antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
314
282
  antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
315
283
  })
316
284
  ),
317
- componentLibraryBffClient: createComponentLibraryBffClient(
285
+ productCategoryPickerModalWindowBffClient: createProductCategoryPickerModalWindowBffClient(
286
+ apiMachineFetchFactory({
287
+ baseUrl: params.wysiwygBffProxyBaseUrl,
288
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
289
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
290
+ })
291
+ ),
292
+ productPickerModalWindowBffClient: createProductPickerModalWindowBffClient(
318
293
  apiMachineFetchFactory({
319
294
  baseUrl: params.wysiwygBffProxyBaseUrl,
320
295
  antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
321
296
  antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
322
297
  })
323
298
  )
324
- }),
325
- addThemeLibrarySectionItemModalWindowBffClient: createAddThemeLibrarySectionItemModalWindowBffClient(
326
- apiMachineFetchFactory({
327
- baseUrl: params.wysiwygBffProxyBaseUrl,
328
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
329
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
330
- })
331
- ),
332
- addComponentLibrarySectionItemModalWindowBffClient: createAddComponentLibrarySectionItemModalWindowBffClient(
333
- apiMachineFetchFactory({
334
- baseUrl: params.wysiwygBffProxyBaseUrl,
335
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
336
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
337
- })
338
- ),
339
- deleteThemeLibrarySectionItemModalWindowBffClient: createDeleteThemeLibrarySectionItemModalWindowBffClient(
340
- apiMachineFetchFactory({
341
- baseUrl: params.wysiwygBffProxyBaseUrl,
342
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
343
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
344
- })
345
- ),
346
- deleteThemeLibrarySectionModalWindowBffClient: createDeleteThemeLibrarySectionModalWindowBffClient(
347
- apiMachineFetchFactory({
348
- baseUrl: params.wysiwygBffProxyBaseUrl,
349
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
350
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
351
- })
352
- ),
353
- editThemeLibrarySectionItemModalWindowBffClient: createEditThemeLibrarySectionItemModalWindowBffClient(
354
- apiMachineFetchFactory({
355
- baseUrl: params.wysiwygBffProxyBaseUrl,
356
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
357
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
358
- })
359
- ),
360
- createComponentLibrarySectionModalWindowBffClient: createAddComponentLibrarySectionModalWindowBffClient(
361
- apiMachineFetchFactory({
362
- baseUrl: params.wysiwygBffProxyBaseUrl,
363
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
364
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
365
- })
366
- ),
367
- editComponentLibrarySectionItemModalWindowBffClient: createEditComponentLibrarySectionItemModalWindowBffClient(
368
- apiMachineFetchFactory({
369
- baseUrl: params.wysiwygBffProxyBaseUrl,
370
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
371
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
372
- })
373
- ),
374
- deleteComponentLibrarySectionItemModalWindowBffClient: createDeleteComponentLibrarySectionItemModalWindowBffClient(
375
- apiMachineFetchFactory({
376
- baseUrl: params.wysiwygBffProxyBaseUrl,
377
- antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
378
- antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
379
- })
380
- ),
381
- createThemeLibrarySectionModalWindowBffClient: createThemeLibrarySectionModalWindowBffClient(
299
+ })
300
+ }),
301
+ template: JSON.parse(params.emailTemplateJson),
302
+ wysiwygTemplateEditorBffClient: wysiwygTemplateEditorBffClientFactory({
303
+ themeLibraryBffClient: createThemeLibraryBffClient(
382
304
  apiMachineFetchFactory({
383
305
  baseUrl: params.wysiwygBffProxyBaseUrl,
384
306
  antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
385
307
  antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
386
308
  })
387
309
  ),
388
- deleteComponentLibrarySectionModalWindowBffClient: createDeleteComponentLibrarySectionModalWindowBffClient(
310
+ componentLibraryBffClient: createComponentLibraryBffClient(
389
311
  apiMachineFetchFactory({
390
312
  baseUrl: params.wysiwygBffProxyBaseUrl,
391
313
  antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
392
314
  antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
393
315
  })
394
316
  )
395
- })
317
+ }),
318
+ addThemeLibrarySectionItemModalWindowBffClient: createAddThemeLibrarySectionItemModalWindowBffClient(
319
+ apiMachineFetchFactory({
320
+ baseUrl: params.wysiwygBffProxyBaseUrl,
321
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
322
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
323
+ })
324
+ ),
325
+ addComponentLibrarySectionItemModalWindowBffClient: createAddComponentLibrarySectionItemModalWindowBffClient(
326
+ apiMachineFetchFactory({
327
+ baseUrl: params.wysiwygBffProxyBaseUrl,
328
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
329
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
330
+ })
331
+ ),
332
+ deleteThemeLibrarySectionItemModalWindowBffClient: createDeleteThemeLibrarySectionItemModalWindowBffClient(
333
+ apiMachineFetchFactory({
334
+ baseUrl: params.wysiwygBffProxyBaseUrl,
335
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
336
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
337
+ })
338
+ ),
339
+ deleteThemeLibrarySectionModalWindowBffClient: createDeleteThemeLibrarySectionModalWindowBffClient(
340
+ apiMachineFetchFactory({
341
+ baseUrl: params.wysiwygBffProxyBaseUrl,
342
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
343
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
344
+ })
345
+ ),
346
+ editThemeLibrarySectionItemModalWindowBffClient: createEditThemeLibrarySectionItemModalWindowBffClient(
347
+ apiMachineFetchFactory({
348
+ baseUrl: params.wysiwygBffProxyBaseUrl,
349
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
350
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
351
+ })
352
+ ),
353
+ createComponentLibrarySectionModalWindowBffClient: createAddComponentLibrarySectionModalWindowBffClient(
354
+ apiMachineFetchFactory({
355
+ baseUrl: params.wysiwygBffProxyBaseUrl,
356
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
357
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
358
+ })
359
+ ),
360
+ editComponentLibrarySectionItemModalWindowBffClient: createEditComponentLibrarySectionItemModalWindowBffClient(
361
+ apiMachineFetchFactory({
362
+ baseUrl: params.wysiwygBffProxyBaseUrl,
363
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
364
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
365
+ })
366
+ ),
367
+ deleteComponentLibrarySectionItemModalWindowBffClient: createDeleteComponentLibrarySectionItemModalWindowBffClient(
368
+ apiMachineFetchFactory({
369
+ baseUrl: params.wysiwygBffProxyBaseUrl,
370
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
371
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
372
+ })
373
+ ),
374
+ createThemeLibrarySectionModalWindowBffClient: createThemeLibrarySectionModalWindowBffClient(
375
+ apiMachineFetchFactory({
376
+ baseUrl: params.wysiwygBffProxyBaseUrl,
377
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
378
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
379
+ })
380
+ ),
381
+ deleteComponentLibrarySectionModalWindowBffClient: createDeleteComponentLibrarySectionModalWindowBffClient(
382
+ apiMachineFetchFactory({
383
+ baseUrl: params.wysiwygBffProxyBaseUrl,
384
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
385
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
386
+ })
387
+ )
388
+ });
389
+
390
+ const app = createApp(
391
+ WysiwygTemplateEditor,
392
+ {
393
+ deps: deps,
394
+ onOnTemplateReset: () => {
395
+ resetTemplate();
396
+ }
396
397
  }
397
398
  );
398
399