@retailrocketgroup/retailrocket-edit.abandoned-basket-price-drop-vue-email-template-render 3.0.381747 → 5.0.384700

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 (42) 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/editAbandonedBasketPriceDropEmailTemplate.d.ts +0 -0
  6. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedBasketPriceDropComponentSectionItemFactory.d.ts +4 -0
  7. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedBasketPriceDropEmailComponentFactory.d.ts +4 -0
  8. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedBasketPriceDropComponentLibraryFactory.d.ts +4 -0
  9. package/dist/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedBasketPriceDropSectionFactory.d.ts +4 -0
  10. package/dist/implementation/DataSources/ListDataExpressionSource/abandonedBasketPriceDropEvaluateListExpressionDataSourceFactory.d.ts +8 -0
  11. package/dist/implementation/DataSources/NumberExpressionDataSource/abandonedBasketPriceDropEvaluateNumberExpressionDataSourceFactory.d.ts +2 -0
  12. package/dist/implementation/DataSources/StringExpressionDataSource/abandonedBasketPriceDropEvaluateStringExpressionDataSource.d.ts +9 -0
  13. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/abandonedBasketPriceDropProductListShelfBuilderDepsFactory.d.ts +8 -0
  14. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/alternativeProductsForAbandonedBasketPriceDropProductListShelfBuilderDepsFactory.d.ts +8 -0
  15. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModal/abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModalDepsFactory.d.ts +11 -0
  16. package/dist/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDepsFactory.d.ts +11 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.html +35 -0
  19. package/env.d.ts +1 -0
  20. package/index.html +2 -2
  21. package/package.json +1 -1
  22. package/src/editAbandonedBasketPriceDropEmailTemplate.ts +408 -0
  23. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedBasketPriceDropComponentSectionItemFactory.ts +32 -0
  24. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedBasketPriceDropEmailComponentFactory.ts +26 -0
  25. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedBasketPriceDropComponentLibraryFactory.ts +29 -0
  26. package/src/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedBasketPriceDropSectionFactory.ts +34 -0
  27. package/src/implementation/DataSources/ListDataExpressionSource/abandonedBasketPriceDropEvaluateListExpressionDataSourceFactory.ts +125 -0
  28. package/src/implementation/DataSources/NumberExpressionDataSource/abandonedBasketPriceDropEvaluateNumberExpressionDataSourceFactory.ts +10 -0
  29. package/src/implementation/DataSources/StringExpressionDataSource/abandonedBasketPriceDropEvaluateStringExpressionDataSource.ts +56 -0
  30. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/abandonedBasketPriceDropProductListShelfBuilderDepsFactory.ts +33 -0
  31. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModal/ShelfBuilders/alternativeProductsForAbandonedBasketPriceDropProductListShelfBuilderDepsFactory.ts +33 -0
  32. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModal/abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModalDepsFactory.ts +142 -0
  33. package/src/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDepsFactory.ts +34 -0
  34. package/src/index.ts +0 -0
  35. package/tsconfig.app.json +19 -0
  36. package/tsconfig.json +14 -0
  37. package/tsconfig.node.json +11 -0
  38. package/tsconfig.test.json +11 -0
  39. package/vite.config.ts +36 -0
  40. package/assets/main.css +0 -1
  41. package/assets/main.js +0 -217
  42. package/favicon.ico +0 -0
@@ -0,0 +1,4 @@
1
+ import { ComponentLibrarySectionItem } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary/main';
2
+ import { CustomComponentSectionItemType } from '@easy-wizzy/core';
3
+ import { AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropComponentSectionItemFactory: (componentLibrarySectionItem: ComponentLibrarySectionItem) => CustomComponentSectionItemType<AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource>;
@@ -0,0 +1,4 @@
1
+ import { EmailComponentType } from '@easy-wizzy/core';
2
+ import { Component } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.addcomponentlibrarysectionitemmodalwindow/main';
3
+ import { AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropEmailComponentFactory: (component: Component) => EmailComponentType<AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource>;
@@ -0,0 +1,4 @@
1
+ import { ComponentLibrarySection } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary/main';
2
+ import { CustomComponentLibraryType } from '@easy-wizzy/core';
3
+ import { AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropComponentLibraryFactory: (componentLibrary: Array<ComponentLibrarySection>) => CustomComponentLibraryType<AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource>;
@@ -0,0 +1,4 @@
1
+ import { ComponentLibrarySection } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary/main';
2
+ import { CustomComponentSectionType } from '@easy-wizzy/core';
3
+ import { AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropSectionFactory: (section: ComponentLibrarySection) => CustomComponentSectionType<AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource>;
@@ -0,0 +1,8 @@
1
+ import { ListExpressionDataSourceBffClient } from '@easy-wizzy/common-app';
2
+ import { ListExpressionDataSourceEvaluatorDelegate } from '@easy-wizzy/core';
3
+ import { AbandonedBasketPriceDropListExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropEvaluateListExpressionDataSourceFactory: (arg: {
5
+ partnerId: string;
6
+ listExpressionDataSourceBffClient: ListExpressionDataSourceBffClient;
7
+ customerStockId: string | undefined;
8
+ }) => ListExpressionDataSourceEvaluatorDelegate<AbandonedBasketPriceDropListExpressionDataSource>;
@@ -0,0 +1,2 @@
1
+ import { NumberExpressionDataSourceEvaluatorDelegate } from '@easy-wizzy/core';
2
+ export declare const abandonedBasketPriceDropEvaluateNumberExpressionDataSourceFactory: <TNumberExpressionDataSource>() => NumberExpressionDataSourceEvaluatorDelegate<TNumberExpressionDataSource>;
@@ -0,0 +1,9 @@
1
+ import { StringExpressionDataSourceEvaluatorDelegate } from '@easy-wizzy/core';
2
+ import { ContactCustomData, NextCouponFromBatchType } from '@easy-wizzy/retailrocket-common';
3
+ import { ProductImageUrlBuilderExpressionEvaluatorDelegate } from '@easy-wizzy/common-app';
4
+ import { AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource, AbandonedBasketPriceDropStringExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
5
+ export declare const abandonedBasketPriceDropStringExpressionDataSourceEvaluatorFactory: (arg: {
6
+ productImageUrlBuilderExpressionEvaluator: ProductImageUrlBuilderExpressionEvaluatorDelegate<AbandonedBasketPriceDropListExpressionDataSource, AbandonedBasketPriceDropNumberExpressionDataSource>;
7
+ contactCustomData: ContactCustomData;
8
+ nextCouponFromBatch: NextCouponFromBatchType;
9
+ }) => StringExpressionDataSourceEvaluatorDelegate<AbandonedBasketPriceDropStringExpressionDataSource>;
@@ -0,0 +1,8 @@
1
+ import { LocaleKey } from '@easy-wizzy/core';
2
+ import { ProductShelfBuilderModalWindowBffClient } from '@easy-wizzy/common-app';
3
+ import { AbandonedBasketPriceDropProductListShelfBuilderDeps } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropProductListShelfBuilderDepsFactory: (arg: {
5
+ localeKey: LocaleKey;
6
+ partnerId: string;
7
+ getAllStockIdsHttpClient: ProductShelfBuilderModalWindowBffClient["postGetAllStockIds"];
8
+ }) => AbandonedBasketPriceDropProductListShelfBuilderDeps;
@@ -0,0 +1,8 @@
1
+ import { LocaleKey } from '@easy-wizzy/core';
2
+ import { ProductShelfBuilderModalWindowBffClient } from '@easy-wizzy/common-app';
3
+ import { AlternativeProductsForAbandonedBasketPriceDropProductListShelfBuilderDeps } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const alternativeProductsForAbandonedProductListShelfBuilderDepsFactory: (arg: {
5
+ localeKey: LocaleKey;
6
+ partnerId: string;
7
+ getAllStockIdsHttpClient: ProductShelfBuilderModalWindowBffClient["postGetAllStockIds"];
8
+ }) => AlternativeProductsForAbandonedBasketPriceDropProductListShelfBuilderDeps;
@@ -0,0 +1,11 @@
1
+ import { LocaleKey } from '@easy-wizzy/core';
2
+ import { ProductShelfBuilderModalWindowBffClient, ProductCategoryPickerModalWindowBffClient, ProductPickerModalWindowBffClient } from '@easy-wizzy/common-app';
3
+ import { AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModalDeps } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModalDepsFactory: (arg: {
5
+ localeKey: LocaleKey;
6
+ partnerId: string;
7
+ customerStockId: string | undefined;
8
+ productShelfBuilderModalWindowBffClient: ProductShelfBuilderModalWindowBffClient;
9
+ productCategoryPickerModalWindowBffClient: ProductCategoryPickerModalWindowBffClient;
10
+ productPickerModalWindowBffClient: ProductPickerModalWindowBffClient;
11
+ }) => AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderModalDeps;
@@ -0,0 +1,11 @@
1
+ import { LocaleKey } from '@easy-wizzy/core';
2
+ import { ProductShelfBuilderModalWindowBffClient, ProductCategoryPickerModalWindowBffClient, ProductPickerModalWindowBffClient } from '@easy-wizzy/common-app';
3
+ import { AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDeps } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
4
+ export declare const abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDepsFactory: (arg: {
5
+ localeKey: LocaleKey;
6
+ partnerId: string;
7
+ customerStockId: string | undefined;
8
+ productShelfBuilderModalWindowBffClient: ProductShelfBuilderModalWindowBffClient;
9
+ productCategoryPickerModalWindowBffClient: ProductCategoryPickerModalWindowBffClient;
10
+ productPickerModalWindowBffClient: ProductPickerModalWindowBffClient;
11
+ }) => AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDeps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <link rel="icon" href="/favicon.ico">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link
10
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
11
+ rel="stylesheet"
12
+ />
13
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Lato:wght@100;300;400;700;900&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
14
+ <title>Vite App</title>
15
+ <script type="module" crossorigin src="/assets/index.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/assets/index.css">
17
+ </head>
18
+ <body>
19
+ <div
20
+ id="app"
21
+ data-partner-id="5df72bdc97a52507605e4cc1"
22
+ data-wysiwyg-template-editor-bff-base-url="https://my.retailrocket.ru/5db801c197a52821e86b0d45/TransactionalEmailCampaign/6757225a5520d1ae575e7f0e/CampaignWizard/Step2/WysiwygTemplateEditorBff"
23
+ data-wysiwyg-bff-proxy-base-url="https://k8s-b1.retailrocket.ru/"
24
+ data-email-template-json='{"Subject": "","Preheader": "","Theme": {"BodyWidth": 600,"IsResponsiveWidth": true,"FontFamily": "Arial","Colors": {"EmailBackgroundColor": "#EEEEEE","BodyColor": "#FFFFFF","PrimaryColor": "#557aff","PrimaryTextColor": "#ffffff","SecondaryColor": "#E4EAFF","SecondaryTextColor": "#557aff","CardBackgroundColor": "#F6F6F6","HeadingColor": "#2F2F2F","TitleColor": "#2F2F2F","SubHeadingColor": "#2F2F2F","LargeTextColor": "#2F2F2F","NormalTextColor": "#2F2F2F","DescriptionTextColor": "#999999","LinkColor": "#65A0FA","ButtonTextColor": "#ffffff"},"BorderRadius": {"TopLeft": 20,"TopRight": 20,"BottomLeft": 20,"BottomRight": 20},"BorderRadiusCard": {"TopLeft": 16,"TopRight": 16,"BottomLeft": 16,"BottomRight": 16},"BorderRadiusButton": {"TopLeft": 6,"TopRight": 6,"BottomLeft": 6,"BottomRight": 6},"BorderRadiusBanner": {"TopLeft": 0,"TopRight": 0,"BottomLeft": 0,"BottomRight": 0},"BodyPaddings": {"Left": 20,"Right": 20,"Top": 10,"Bottom": 10},"ComponentPaddings": {"Small": 8,"Medium": 16,"Large": 24,"Huge": 24},"ButtonPaddings": {"TopBottom": 12,"LeftRight": 14},"FontSettingsPresets": {"Title": {"FontSize": 24,"LineHeight": 28,"IsBold": true,"IsItalic": false,"Decoration": "None"},"Heading": {"FontSize": 20,"LineHeight": 24,"IsBold": true,"IsItalic": false,"Decoration": "None"},"SubHeading": {"FontSize": 14,"LineHeight": 16,"IsBold": true,"IsItalic": false,"Decoration": "None"},"LargeText": {"FontSize": 14,"LineHeight": 18,"IsBold": false,"IsItalic": false,"Decoration": "None"},"NormalText": {"FontSize": 12,"LineHeight": 15,"IsBold": false,"IsItalic": false,"Decoration": "None"},"DescriptionText": {"FontSize": 10,"LineHeight": 13,"IsBold": false,"IsItalic": false,"Decoration": "None"},"Button": {"FontSize": 12,"LineHeight": 14,"IsBold": true,"IsItalic": false,"Decoration": "None"},"Link": {"FontSize": 12,"LineHeight": 14,"IsBold": false,"IsItalic": false,"Decoration": "None"}}},"Components": [{"IsRequired": false,"BorderRadius": {"TopLeft": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"TopRight": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"BottomRight": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"BottomLeft": {"Discriminator": "CustomBorderRadius","CustomValue": 0}},"InnerBgColor": {"Discriminator": "BodyColor","CustomValue": "#000000"},"Paddings": {"Top": {"ThemePadding": "ThemePaddingsLarge"},"Bottom": {"ThemePadding": "ThemePaddingsLarge"}},"FullWidth": false,"BodyRowList": [{"MultipleColumnBodyRow": {"ColumnSpacerSize": {"CustomValue": 0},"DirectionRtl": false,"Paddings": {"Left": {"CustomValue": 0},"Top": {"CustomValue": 0},"Right": {"CustomValue": 0},"Bottom": {"CustomValue": 0}},"Border": {"Left": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}},"Top": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}},"Right": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}},"Bottom": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}}},"BorderRadius": {"TopLeft": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"TopRight": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"BottomRight": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"BottomLeft": {"Discriminator": "CustomBorderRadius","CustomValue": 0}},"BgColor": {"Discriminator": "None","CustomValue": "#ffffff"},"ContainerAlign": "Center","Columns": [{"VerticalAlign": "Top","BgColor": {"Discriminator": "None","CustomValue": "#ffffff"},"Paddings": {"Top": {"CustomValue": 0},"Right": {"CustomValue": 0},"Bottom": {"CustomValue": 0},"Left": {"CustomValue": 0}},"Border": {"Left": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}},"Top": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}},"Right": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}},"Bottom": {"Width": 0,"Style": "None","Color": {"Discriminator": "Custom","CustomValue": "#FFFFFF"}}},"BorderRadius": {"TopLeft": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"TopRight": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"BottomRight": {"Discriminator": "CustomBorderRadius","CustomValue": 0},"BottomLeft": {"Discriminator": "CustomBorderRadius","CustomValue": 0}},"ContainerAlign": "Center","Elements": [{"RichText": {"ImageVerticalAlign": "Baseline","MinHeight": 1,"ContentAlign": "Center","Text": {"Content": [{"ParagraphNode": {"Content": [{"TextNode": {"Text": "Сервис создания электронных писем","TextStyle": {"ThemeName": "Heading","Style": {}}}}]}}]}}},{"Spacer": {"Height": {"ThemePadding": "ThemePaddingsLarge"},"Weight": 0,"Color": {"Discriminator": "None","CustomValue": "#FFFFFF"}}},{"RichText": {"ImageVerticalAlign": "Baseline","MinHeight": 1,"ContentAlign": "Center","Text": {"Content": [{"ParagraphNode": {"Content": [{"TextNode": {"Text": "Мы рады представить вам наш новый продукт - сервис создания электронных писем. С помощью этого удобного и интуитивно понятного инструмента, вы сможете легко создавать красивые и профессиональные письма всего в несколько простых шагов.","TextStyle": {"ThemeName": "LargeText","Style": {}}}}]}}]}}}],"Width": {"JustifyWidth": {"WidthInPixels": 560}}}]}}]}]}'
25
+ data-create-email-template-submit-url="data-create-email-template-submit-url"
26
+ data-anti-forgery-header-token-name="data-anti-forgery-header-token-name"
27
+ data-anti-forgery-header-token-value="data-anti-forgery-header-token-value"
28
+ data-anti-forgery-form-token-name="data-anti-forgery-form-token-name"
29
+ data-anti-forgery-form-token-value="data-anti-forgery-form-token-value"
30
+ data-reset-template-form-url="https://webhook.site/a85a171c-bb86-4693-9552-d209a59a7e6a"
31
+ data-exit-link="ya.ru"
32
+ data-locale-key="ru"
33
+ ></div>
34
+ </body>
35
+ </html>
package/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/index.html CHANGED
@@ -12,8 +12,6 @@
12
12
  />
13
13
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Lato:wght@100;300;400;700;900&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
14
14
  <title>Vite App</title>
15
- <script type="module" crossorigin src="/assets/main.js"></script>
16
- <link rel="stylesheet" crossorigin href="/assets/main.css">
17
15
  </head>
18
16
  <body>
19
17
  <div
@@ -29,6 +27,8 @@
29
27
  data-anti-forgery-form-token-value="data-anti-forgery-form-token-value"
30
28
  data-reset-template-form-url="https://webhook.site/a85a171c-bb86-4693-9552-d209a59a7e6a"
31
29
  data-exit-link="ya.ru"
30
+ data-locale-key="ru"
32
31
  ></div>
32
+ <script type="module" src="/src/editAbandonedBasketPriceDropEmailTemplate"></script>
33
33
  </body>
34
34
  </html>
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@retailrocketgroup/retailrocket-edit.abandoned-basket-price-drop-vue-email-template-render",
3
- "version": "3.0.381747",
3
+ "version": "5.0.384700",
4
4
  "private": false
5
5
  }
@@ -0,0 +1,408 @@
1
+ import 'bootstrap';
2
+ import '@easy-wizzy/retailrocket-common/index.css';
3
+ import '@easy-wizzy/core/index.css';
4
+
5
+ import { createApp } from 'vue';
6
+ import { createVuetify } from 'vuetify';
7
+ import { ClickOutside } from 'vuetify/directives';
8
+
9
+ import { createSimpleDataForm, matcherFactory } from '@easy-wizzy/core';
10
+ import { EditEmailTemplateApp } from '@easy-wizzy/core';
11
+ import { expressionEvaluatorFactory } from '@easy-wizzy/core';
12
+ import { listExpressionEvaluatorFactory } from '@easy-wizzy/core';
13
+ import { numberExpressionEvaluatorDelegate } from '@easy-wizzy/core';
14
+ import { stringExpressionEvaluatorFactory } from '@easy-wizzy/core';
15
+ import { dataStructBuilderExpressionEvaluatorFactory } from '@easy-wizzy/core';
16
+
17
+ import type { LocaleKey } from '@easy-wizzy/core';
18
+ import type { StringExpressionEvaluatorDelegate } from '@easy-wizzy/core';
19
+
20
+ import { defaultThemeLibraryFactory } from '@easy-wizzy/theme-library';
21
+ import { defaultComponentLibraryFactory } from '@easy-wizzy/component-library';
22
+
23
+ import type { ApiMachineFetchDelegate } from '@easy-wizzy/common-app';
24
+
25
+ import { apiMachineFetchFactory } from '@easy-wizzy/common-app';
26
+ import { editEmailTemplateAppDepsFactory } from '@easy-wizzy/common-app';
27
+ import { productImageUrlBuilderExpressionEvaluatorFactory } from '@easy-wizzy/common-app';
28
+ import { wysiwygTemplateEditorBffClientFactory } from '@easy-wizzy/common-app';
29
+ import { variableSelectorDepsFactory } from '@easy-wizzy/common-app';
30
+
31
+ import { productShelfDataSourceExpressionBuilderPluginFactory } from '@easy-wizzy/retailrocket-common';
32
+ import { stringExpressionBuilderPluginFactory, richTextToolbarPluginFactory, VariableSelector } from '@easy-wizzy/retailrocket-common';
33
+
34
+ import type { ContactCustomData, GeneralStringExpressionDataSource, NextCouponFromBatchType } from '@easy-wizzy/retailrocket-common';
35
+
36
+ import type { AbandonedBasketPriceDropListExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
37
+ import type { AbandonedBasketPriceDropNumberExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
38
+ import type { AbandonedBasketPriceDropStringExpressionDataSource } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
39
+
40
+ import { AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilder } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
41
+
42
+ import { abandonedBasketPriceDropEvaluateListExpressionDataSourceFactory } from '@/implementation/DataSources/ListDataExpressionSource/abandonedBasketPriceDropEvaluateListExpressionDataSourceFactory';
43
+ import { abandonedBasketPriceDropEvaluateNumberExpressionDataSourceFactory } from '@/implementation/DataSources/NumberExpressionDataSource/abandonedBasketPriceDropEvaluateNumberExpressionDataSourceFactory';
44
+ import { abandonedBasketPriceDropStringExpressionDataSourceEvaluatorFactory } from '@/implementation/DataSources/StringExpressionDataSource/abandonedBasketPriceDropEvaluateStringExpressionDataSource';
45
+ import { abandonedBasketPriceDropComponentLibraryFactory } from '@/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CustomComponentLibrary/abandonedBasketPriceDropComponentLibraryFactory';
46
+ import { abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDepsFactory } from '@/implementation/EmailComponentSettingsModifierPlugin/ProductShelfDataSourceExpressionBuilder/abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDepsFactory';
47
+
48
+ import { createApi as createTriggerAbandonedBasketPriceDropWysiwygTemplateEditorClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.triggerabandonedbasketpricedropwysiwygtemplateeditor';
49
+ import {
50
+ type Component,
51
+ createApi as createAddComponentLibrarySectionItemModalWindowBffClient
52
+ } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.addcomponentlibrarysectionitemmodalwindow';
53
+ import { createApi as listExpressionDataSourceBffClientFactory } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.listexpressiondatasource';
54
+ import { createApi as createProductShelfBuilderModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.productshelfmodalwindow';
55
+ import { createApi as createThemeLibraryBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.themelibrary';
56
+ import { createApi as createComponentLibraryBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary';
57
+ import { createApi as createAddThemeLibrarySectionItemModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.addthemelibrarysectionitemmodalwindow';
58
+ import { createApi as createDeleteThemeLibrarySectionItemModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.deletethemelibrarysectionitemmodalwindow';
59
+ import { createApi as createDeleteThemeLibrarySectionModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.deletethemelibrarysectionmodalwindow';
60
+ import { createApi as createEditThemeLibrarySectionItemModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.editthemelibrarysectionitemmodalwindow';
61
+ import { createApi as createAddComponentLibrarySectionModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.addcomponentlibrarysectionmodalwindow';
62
+ import { createApi as createEditComponentLibrarySectionItemModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.editcomponentlibrarysectionitemmodalwindow';
63
+ import { createApi as createDeleteComponentLibrarySectionItemModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.deletecomponentlibrarysectionitemmodalwindow';
64
+ import { createApi as createThemeLibrarySectionModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.addthemelibrarysectionmodalwindow';
65
+ import { createApi as createDeleteComponentLibrarySectionModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.deletecomponentlibrarysectionmodalwindow';
66
+ import { createApi as createProductCategoryPickerModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.productcategorypickermodalwindow';
67
+ import { createApi as createProductPickerModalWindowBffClient } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.productpickermodalwindow';
68
+ import { createApi as saveFavoriteTemplate } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.savefavoritetemplatemodalwindow';
69
+
70
+
71
+ const appTagId = '#app';
72
+ const appTag = document.querySelector(appTagId);
73
+
74
+ const params = {
75
+ partnerId: appTag!.getAttribute('data-partner-id')!,
76
+ wysiwygBffProxyBaseUrl: appTag!.getAttribute('data-wysiwyg-bff-proxy-base-url')!,
77
+ wysiwygTemplateEditorBffBaseUrl: appTag!.getAttribute('data-wysiwyg-template-editor-bff-base-url')!,
78
+ antiForgeryHeaderTokenName: appTag!.getAttribute('data-anti-forgery-header-token-name')!,
79
+ antiForgeryHeaderTokenValue: appTag!.getAttribute('data-anti-forgery-header-token-value')!,
80
+ antiForgeryFormTokenName: appTag!.getAttribute('data-anti-forgery-form-token-name')!,
81
+ antiForgeryFormTokenValue: appTag!.getAttribute('data-anti-forgery-form-token-value')!,
82
+ emailTemplateJson: appTag!.getAttribute('data-email-template-json')!,
83
+ previewTemplateDataJson: appTag!.getAttribute('data-preview-template-data-json')!,
84
+ resetTemplateFormUrl: appTag!.getAttribute('data-reset-template-form-url')!,
85
+ exitLink: appTag!.getAttribute('data-exit-link')!,
86
+ localeKey: appTag!.getAttribute('data-locale-key') as LocaleKey || 'en'
87
+ };
88
+
89
+ const _apiMachineFetchFactory = (arg: {
90
+ baseUrl: string
91
+ }): ApiMachineFetchDelegate => apiMachineFetchFactory({
92
+ baseUrl: arg.baseUrl,
93
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
94
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
95
+ });
96
+
97
+ const abandonedBasketPriceDropMainPageBffClient = createTriggerAbandonedBasketPriceDropWysiwygTemplateEditorClient(
98
+ apiMachineFetchFactory({
99
+ baseUrl: params.wysiwygTemplateEditorBffBaseUrl,
100
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
101
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
102
+ })
103
+ );
104
+
105
+ const createFavoriteTemplateBffClient = saveFavoriteTemplate(
106
+ _apiMachineFetchFactory({
107
+ baseUrl: params.wysiwygBffProxyBaseUrl
108
+ })
109
+ );
110
+
111
+ const resetTemplate = (): void => {
112
+ const formData = new FormData();
113
+ formData.append(
114
+ params.antiForgeryFormTokenName,
115
+ params.antiForgeryFormTokenValue);
116
+
117
+ const form = createSimpleDataForm({
118
+ method: 'POST',
119
+ action: params.resetTemplateFormUrl,
120
+ formData: formData
121
+ });
122
+
123
+ document.body.appendChild(form);
124
+ form.submit();
125
+ };
126
+
127
+ let contactCustomData: ContactCustomData = {};
128
+ let nextCouponFromBatch: NextCouponFromBatchType = {
129
+ BatchId: '',
130
+ };
131
+
132
+ const listExpressionDataSourceBffClient = listExpressionDataSourceBffClientFactory(
133
+ _apiMachineFetchFactory({
134
+ baseUrl: params.wysiwygBffProxyBaseUrl
135
+ })
136
+ );
137
+
138
+ const listExpressionDataSourceEvaluator = abandonedBasketPriceDropEvaluateListExpressionDataSourceFactory({
139
+ partnerId: params.partnerId,
140
+ listExpressionDataSourceBffClient: listExpressionDataSourceBffClient,
141
+ customerStockId: undefined
142
+ });
143
+
144
+ const listExpressionEvaluator = listExpressionEvaluatorFactory({
145
+ listExpressionDataSourceEvaluator: listExpressionDataSourceEvaluator
146
+ });
147
+
148
+ const numberExpressionDataSourceEvaluator = abandonedBasketPriceDropEvaluateNumberExpressionDataSourceFactory();
149
+
150
+ const numberExpressionEvaluator = numberExpressionEvaluatorDelegate({
151
+ listExpressionEvaluator: listExpressionEvaluator,
152
+ numberExpressionDataSourceEvaluator: numberExpressionDataSourceEvaluator
153
+ })
154
+
155
+ const stringExpressionEvaluator: StringExpressionEvaluatorDelegate<
156
+ AbandonedBasketPriceDropListExpressionDataSource,
157
+ AbandonedBasketPriceDropNumberExpressionDataSource,
158
+ AbandonedBasketPriceDropStringExpressionDataSource
159
+ > = stringExpressionEvaluatorFactory({
160
+ listExpressionEvaluator: listExpressionEvaluator,
161
+ numberExpressionEvaluator: numberExpressionEvaluator,
162
+ stringExpressionDataSourceEvaluatorFactory: () => abandonedBasketPriceDropStringExpressionDataSourceEvaluatorFactory({
163
+ productImageUrlBuilderExpressionEvaluator: productImageUrlBuilderExpressionEvaluatorFactory({
164
+ partnerId: params.partnerId,
165
+ numberExpressionEvaluator: numberExpressionEvaluator
166
+ }),
167
+ contactCustomData: contactCustomData,
168
+ nextCouponFromBatch: nextCouponFromBatch
169
+ })
170
+ });
171
+
172
+ const expressionEvaluator = expressionEvaluatorFactory({
173
+ listExpressionEvaluator: listExpressionEvaluator,
174
+ numberExpressionEvaluator: numberExpressionEvaluator,
175
+ stringExpressionEvaluator: stringExpressionEvaluator,
176
+ dataStructBuilderExpressionEvaluatorFactory: expressionEvaluator => dataStructBuilderExpressionEvaluatorFactory({
177
+ expressionEvaluator: expressionEvaluator
178
+ })
179
+ });
180
+
181
+ const dataStructExpressionEvaluator = dataStructBuilderExpressionEvaluatorFactory({
182
+ expressionEvaluator: expressionEvaluator
183
+ });
184
+
185
+ const app = createApp(
186
+ EditEmailTemplateApp,
187
+ {
188
+ onTemplateReset: () => {
189
+ resetTemplate();
190
+ },
191
+ deps:
192
+ editEmailTemplateAppDepsFactory<
193
+ AbandonedBasketPriceDropListExpressionDataSource,
194
+ AbandonedBasketPriceDropNumberExpressionDataSource,
195
+ AbandonedBasketPriceDropStringExpressionDataSource
196
+ >({
197
+ partnerId: params.partnerId,
198
+ localeKey: params.localeKey,
199
+ exitLink: params.exitLink,
200
+ dataSourceFieldNameDelegate: ({ dataSource }) => {
201
+ return matcherFactory(dataSource as GeneralStringExpressionDataSource).Match({
202
+ StringFromContactCustomData: (customData) => customData.FieldName,
203
+ StringFromContactCustomDataWithFallback: (customDataWithFallback) => customDataWithFallback.FallbackValue,
204
+ ProductImageUrlBuilderExpression: () => 'ImageResizer',
205
+ NextCouponFromBatch: () => 'Coupon'
206
+ });
207
+ },
208
+ richTextToolbarPlugins: [
209
+ richTextToolbarPluginFactory({
210
+ richTextToolbarPluginComponent: VariableSelector,
211
+ deps: variableSelectorDepsFactory({
212
+ localeKey: params.localeKey,
213
+ stringExpressionBuilderPlugin: stringExpressionBuilderPluginFactory({
214
+ localeKey: params.localeKey
215
+ })
216
+ })
217
+ })
218
+ ],
219
+ defaultThemeLibrary: defaultThemeLibraryFactory({
220
+ localeKey: params.localeKey
221
+ }),
222
+ defaultComponentLibrary: defaultComponentLibraryFactory({
223
+ localeKey: params.localeKey
224
+ }),
225
+ saveEmailTemplate: async arg => {
226
+ const result = await abandonedBasketPriceDropMainPageBffClient
227
+ .postSaveTemplate({
228
+ body: {
229
+ partnerId: params.partnerId,
230
+ templateJson: JSON.stringify(arg.emailTemplate)
231
+ }
232
+ })
233
+
234
+ return result.status === 200
235
+ ? 'Success'
236
+ : 'Fail'
237
+ },
238
+ createFavoriteTemplate: async arg => {
239
+ const result = await createFavoriteTemplateBffClient
240
+ .postCreateFavoriteTriggerAbandonedBasketPriceDropTemplate({
241
+ body: {
242
+ partnerId: params.partnerId,
243
+ templateJson: JSON.stringify(arg.emailTemplate),
244
+ favoriteTemplateName: 'Favorite template'
245
+ }
246
+ });
247
+
248
+ return result.status === 200
249
+ ? 'Success'
250
+ : 'Fail';
251
+ },
252
+ listExpressionEvaluator: listExpressionEvaluator,
253
+ numberExpressionEvaluator: numberExpressionEvaluator,
254
+ stringExpressionEvaluator: stringExpressionEvaluator,
255
+ dataStructExpressionEvaluator: dataStructExpressionEvaluator,
256
+ expressionEvaluator: expressionEvaluator,
257
+ getComponentLibraryFactory: x => () =>
258
+ x.getComponentLibraryHttpClient(
259
+ {
260
+ body: {
261
+ partnerId: x.partnerId,
262
+ componentTypes: [
263
+ { triggerAbandonedBasketPriceDrop: {} },
264
+ { common: {} }
265
+ ]
266
+ }
267
+ }
268
+ )
269
+ .then(x => abandonedBasketPriceDropComponentLibraryFactory(x.body.sections)),
270
+ canProductShelfDataSourceBeConverted: () => false,
271
+ httpClientComponentFactoryDelegate: (emailComponent): Component => {
272
+ return {
273
+ triggerAbandonedBasketPriceDrop: {
274
+ componentJson: JSON.stringify(emailComponent)
275
+ }
276
+ }
277
+ },
278
+ stringExpressionBuilderPlugin: stringExpressionBuilderPluginFactory({
279
+ localeKey: params.localeKey
280
+ }),
281
+ emailComponentSettingsModifierPlugin: productShelfDataSourceExpressionBuilderPluginFactory({
282
+ productShelfDataSourceExpressionBuilderComponent: AbandonedBasketPriceDropProductShelfDataSourceExpressionBuilder,
283
+ deps: abandonedBasketPriceDropProductShelfDataSourceExpressionBuilderDepsFactory({
284
+ localeKey: params.localeKey,
285
+ partnerId: params.partnerId,
286
+ customerStockId: 'customerStockId',
287
+ productShelfBuilderModalWindowBffClient: createProductShelfBuilderModalWindowBffClient(
288
+ apiMachineFetchFactory({
289
+ baseUrl: params.wysiwygBffProxyBaseUrl,
290
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
291
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
292
+ })
293
+ ),
294
+ productCategoryPickerModalWindowBffClient: createProductCategoryPickerModalWindowBffClient(
295
+ apiMachineFetchFactory({
296
+ baseUrl: params.wysiwygBffProxyBaseUrl,
297
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
298
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
299
+ })
300
+ ),
301
+ productPickerModalWindowBffClient: createProductPickerModalWindowBffClient(
302
+ apiMachineFetchFactory({
303
+ baseUrl: params.wysiwygBffProxyBaseUrl,
304
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
305
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
306
+ })
307
+ )
308
+ })
309
+ }),
310
+ initialEmailTemplate: JSON.parse(params.emailTemplateJson),
311
+ wysiwygTemplateEditorBffClient: wysiwygTemplateEditorBffClientFactory({
312
+ themeLibraryBffClient: createThemeLibraryBffClient(
313
+ apiMachineFetchFactory({
314
+ baseUrl: params.wysiwygBffProxyBaseUrl,
315
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
316
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
317
+ })
318
+ ),
319
+ componentLibraryBffClient: createComponentLibraryBffClient(
320
+ apiMachineFetchFactory({
321
+ baseUrl: params.wysiwygBffProxyBaseUrl,
322
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
323
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
324
+ })
325
+ )
326
+ }),
327
+ addThemeLibrarySectionItemModalWindowBffClient: createAddThemeLibrarySectionItemModalWindowBffClient(
328
+ apiMachineFetchFactory({
329
+ baseUrl: params.wysiwygBffProxyBaseUrl,
330
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
331
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
332
+ })
333
+ ),
334
+ addComponentLibrarySectionItemModalWindowBffClient: createAddComponentLibrarySectionItemModalWindowBffClient(
335
+ apiMachineFetchFactory({
336
+ baseUrl: params.wysiwygBffProxyBaseUrl,
337
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
338
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
339
+ })
340
+ ),
341
+ deleteThemeLibrarySectionItemModalWindowBffClient: createDeleteThemeLibrarySectionItemModalWindowBffClient(
342
+ apiMachineFetchFactory({
343
+ baseUrl: params.wysiwygBffProxyBaseUrl,
344
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
345
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
346
+ })
347
+ ),
348
+ deleteThemeLibrarySectionModalWindowBffClient: createDeleteThemeLibrarySectionModalWindowBffClient(
349
+ apiMachineFetchFactory({
350
+ baseUrl: params.wysiwygBffProxyBaseUrl,
351
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
352
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
353
+ })
354
+ ),
355
+ editThemeLibrarySectionItemModalWindowBffClient: createEditThemeLibrarySectionItemModalWindowBffClient(
356
+ apiMachineFetchFactory({
357
+ baseUrl: params.wysiwygBffProxyBaseUrl,
358
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
359
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
360
+ })
361
+ ),
362
+ createComponentLibrarySectionModalWindowBffClient: createAddComponentLibrarySectionModalWindowBffClient(
363
+ apiMachineFetchFactory({
364
+ baseUrl: params.wysiwygBffProxyBaseUrl,
365
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
366
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
367
+ })
368
+ ),
369
+ editComponentLibrarySectionItemModalWindowBffClient: createEditComponentLibrarySectionItemModalWindowBffClient(
370
+ apiMachineFetchFactory({
371
+ baseUrl: params.wysiwygBffProxyBaseUrl,
372
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
373
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
374
+ })
375
+ ),
376
+ deleteComponentLibrarySectionItemModalWindowBffClient: createDeleteComponentLibrarySectionItemModalWindowBffClient(
377
+ apiMachineFetchFactory({
378
+ baseUrl: params.wysiwygBffProxyBaseUrl,
379
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
380
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
381
+ })
382
+ ),
383
+ createThemeLibrarySectionModalWindowBffClient: createThemeLibrarySectionModalWindowBffClient(
384
+ apiMachineFetchFactory({
385
+ baseUrl: params.wysiwygBffProxyBaseUrl,
386
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
387
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
388
+ })
389
+ ),
390
+ deleteComponentLibrarySectionModalWindowBffClient: createDeleteComponentLibrarySectionModalWindowBffClient(
391
+ apiMachineFetchFactory({
392
+ baseUrl: params.wysiwygBffProxyBaseUrl,
393
+ antiForgeryTokenHeaderName: params.antiForgeryHeaderTokenName,
394
+ antiForgeryTokenValue: params.antiForgeryHeaderTokenValue
395
+ })
396
+ )
397
+ })
398
+ }
399
+ );
400
+
401
+ app.use(createVuetify({
402
+ theme: false,
403
+ directives: {
404
+ ClickOutside
405
+ }
406
+ }));
407
+
408
+ app.mount(appTagId);
@@ -0,0 +1,32 @@
1
+ import type {
2
+ ComponentLibrarySectionItem,
3
+ } from '@retailrocket/retailrocket.wysiwyg.bff.v2.apiclients.componentlibrary/main';
4
+ import type {
5
+ CustomComponentSectionItemType
6
+ } from '@easy-wizzy/core';
7
+ import {
8
+ abandonedBasketPriceDropEmailComponentFactory
9
+ } from '@/implementation/Apps/components/WysiwygTemplateEditor/AsideMenu/ComponentLibrary/CreateComponentLibrarySectionModalWindow/abandonedBasketPriceDropEmailComponentFactory';
10
+ import type {
11
+ AbandonedBasketPriceDropNumberExpressionDataSource
12
+ } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
13
+ import type {
14
+ AbandonedBasketPriceDropListExpressionDataSource
15
+ } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
16
+ import type {
17
+ AbandonedBasketPriceDropStringExpressionDataSource
18
+ } from '@easy-wizzy/retailrocket-abandoned-basket-price-drop';
19
+
20
+ export const abandonedBasketPriceDropComponentSectionItemFactory = (
21
+ componentLibrarySectionItem: ComponentLibrarySectionItem,
22
+ ): CustomComponentSectionItemType<
23
+ AbandonedBasketPriceDropListExpressionDataSource,
24
+ AbandonedBasketPriceDropNumberExpressionDataSource,
25
+ AbandonedBasketPriceDropStringExpressionDataSource
26
+ > => {
27
+ return {
28
+ sectionItemId: componentLibrarySectionItem.sectionItemId,
29
+ sectionItemName: componentLibrarySectionItem.sectionItemName,
30
+ componentTemplate: abandonedBasketPriceDropEmailComponentFactory(componentLibrarySectionItem.component),
31
+ };
32
+ };