@useinsider/guido 1.0.2-beta.85ea6e2 → 1.0.2-beta.91efff4
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/README.md +32 -2
- package/dist/@types/generic.d.ts +4 -0
- package/dist/components/Guido.vue.d.ts +3 -1
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +72 -60
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -15
- package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
- package/dist/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/components/organisms/header/RightSlot.vue.js +5 -3
- package/dist/components/organisms/header/RightSlot.vue2.js +26 -27
- package/dist/components/organisms/header/ViewOptions.vue.js +5 -5
- package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +11 -11
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +8 -8
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +25 -20
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +40 -28
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +6 -6
- package/dist/composables/useCustomInterfaceAppearance.js +22 -18
- package/dist/composables/useHtmlCompiler.js +17 -9
- package/dist/composables/useHtmlValidator.d.ts +4 -0
- package/dist/composables/useHtmlValidator.js +139 -0
- package/dist/composables/usePreviewMode.js +14 -15
- package/dist/composables/useRecommendation.d.ts +19 -0
- package/dist/composables/useRecommendation.js +27 -0
- package/dist/composables/useSave.d.ts +4 -0
- package/dist/composables/useSave.js +15 -0
- package/dist/composables/useStripo.js +40 -36
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.d.ts +2 -0
- package/dist/config/compiler/outlookCompilerRules.js +36 -0
- package/dist/config/compiler/recommendationCompilerRules.d.ts +2 -0
- package/dist/config/compiler/recommendationCompilerRules.js +83 -0
- package/dist/config/compiler/socialCompilerRules.d.ts +2 -0
- package/dist/config/compiler/socialCompilerRules.js +21 -0
- package/dist/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
- package/dist/config/compiler/unsubscribeCompilerRules.js +64 -0
- package/dist/config/migrator/checkboxMigrator.d.ts +1 -0
- package/dist/config/migrator/checkboxMigrator.js +83 -0
- package/dist/config/migrator/index.d.ts +1 -0
- package/dist/config/migrator/index.js +5 -0
- package/dist/enums/defaults.d.ts +5 -1
- package/dist/enums/defaults.js +14 -10
- package/dist/enums/html-validator.d.ts +6 -0
- package/dist/enums/html-validator.js +7 -0
- package/dist/enums/recommendation.d.ts +54 -0
- package/dist/enums/recommendation.js +56 -0
- package/dist/enums/unsubscribe.d.ts +15 -0
- package/dist/enums/unsubscribe.js +17 -0
- package/dist/extensions/Blocks/Checkbox/block.d.ts +10 -0
- package/dist/extensions/Blocks/Checkbox/block.js +39 -0
- package/dist/extensions/Blocks/Checkbox/control.d.ts +22 -0
- package/dist/extensions/Blocks/Checkbox/control.js +104 -0
- package/dist/extensions/Blocks/Checkbox/extension.d.ts +2 -0
- package/dist/extensions/Blocks/Checkbox/extension.js +20 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +38 -0
- package/dist/extensions/Blocks/Checkbox/template.d.ts +6 -0
- package/dist/extensions/Blocks/Checkbox/template.js +75 -0
- package/dist/extensions/Blocks/CouponBlock/block.d.ts +11 -0
- package/dist/extensions/Blocks/CouponBlock/block.js +42 -0
- package/dist/extensions/Blocks/CouponBlock/extension.d.ts +2 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +19 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +37 -0
- package/dist/extensions/Blocks/CouponBlock/template.d.ts +3 -0
- package/dist/extensions/Blocks/CouponBlock/template.js +13 -0
- package/dist/extensions/Blocks/_Boilerplate/block.d.ts +10 -0
- package/dist/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
- package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
- package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +41 -27
- package/dist/extensions/DynamicContent/extension.js +18 -6
- package/dist/guido.css +1 -1
- package/dist/icons/coupon.svg +3 -0
- package/dist/mock/api/unsubscribe.d.ts +2 -0
- package/dist/mock/api/validator.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +72 -48
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +74 -49
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +120 -38
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +12 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +116 -101
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +12 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +5 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +22 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +21 -17
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +8 -15
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +30 -29
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +19 -23
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +37 -19
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -15
- package/dist/static/styles/components/alert-message.css.js +32 -2
- package/dist/static/styles/components/button.css.js +32 -2
- package/dist/static/styles/components/notification.css.js +55 -0
- package/dist/static/styles/components/popup.css.js +68 -0
- package/dist/static/styles/components/wide-panel.css.js +5 -1
- package/dist/static/styles/customEditorStyle.css.js +6 -0
- package/dist/static/styles/variables.css.js +10 -0
- package/dist/stores/dynamic-content.d.ts +12 -0
- package/dist/stores/dynamic-content.js +7 -6
- package/dist/stores/onboarding.d.ts +72 -8
- package/dist/stores/preview.js +1 -3
- package/dist/stores/recommendation.d.ts +10 -0
- package/dist/stores/recommendation.js +9 -0
- package/dist/stores/unsubscribe.d.ts +8 -0
- package/dist/stores/unsubscribe.js +9 -0
- package/dist/utils/genericUtil.d.ts +5 -0
- package/dist/utils/genericUtil.js +9 -6
- package/dist/utils/templatePreparation.js +21 -14
- package/package.json +5 -3
- package/dist/_virtual/AddCustomFont.js +0 -4
- package/dist/_virtual/AiAssistantValueType.js +0 -4
- package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
- package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
- package/dist/_virtual/Block.js +0 -4
- package/dist/_virtual/BlockAttributes.js +0 -4
- package/dist/_virtual/BlockCompositionType.js +0 -4
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/BlockRenderer.js +0 -4
- package/dist/_virtual/BlockType.js +0 -4
- package/dist/_virtual/BlocksPanel.js +0 -4
- package/dist/_virtual/BuiltInControl.js +0 -4
- package/dist/_virtual/BuiltInControlTypes.js +0 -4
- package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
- package/dist/_virtual/ContextAction.js +0 -4
- package/dist/_virtual/ContextActionType.js +0 -4
- package/dist/_virtual/Control.js +0 -4
- package/dist/_virtual/EditorStatePropertyType.js +0 -4
- package/dist/_virtual/Extension.js +0 -4
- package/dist/_virtual/ExtensionBuilder.js +0 -4
- package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
- package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
- package/dist/_virtual/ModificationDescription.js +0 -4
- package/dist/_virtual/PanelPosition.js +0 -4
- package/dist/_virtual/PreviewDeviceMode.js +0 -4
- package/dist/_virtual/SettingsPanelRegistry.js +0 -4
- package/dist/_virtual/SettingsPanelTab.js +0 -4
- package/dist/_virtual/SettingsTab.js +0 -4
- package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/TextColorBuiltInControl.js +0 -4
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
- package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
- package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
- package/dist/_virtual/UIElement.js +0 -4
- package/dist/_virtual/UIElementTagRegistry.js +0 -4
- package/dist/_virtual/UIElementType.js +0 -4
- package/dist/_virtual/UIElementsAttributes.js +0 -4
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
2
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
3
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
4
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
5
|
+
import { TextControls as o, ContainerControls as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
11
|
+
import { SettingsTab as i } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
13
|
+
import { SettingsPanelRegistry as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js";
|
|
14
|
+
import { SettingsPanelTab as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js";
|
|
15
|
+
import { COUPON_BLOCK_ID as e } from "./block.js";
|
|
16
|
+
class A extends m {
|
|
17
|
+
registerBlockControls(t) {
|
|
18
|
+
t[e] = [
|
|
19
|
+
new p(
|
|
20
|
+
i.SETTINGS,
|
|
21
|
+
[
|
|
22
|
+
o.FONT_FAMILY,
|
|
23
|
+
o.FONT_SIZE,
|
|
24
|
+
o.FORMAT,
|
|
25
|
+
o.FONT_COLOR,
|
|
26
|
+
o.TEXT_BLOCK_BACKGROUND_COLOR,
|
|
27
|
+
o.ALIGN,
|
|
28
|
+
o.LINE_HEIGHT,
|
|
29
|
+
r.EXTERNAL_INDENTS
|
|
30
|
+
]
|
|
31
|
+
)
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
A as CouponBlockSettings
|
|
37
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const migrationTemplate = "\n <td \n class=\"coupon-block ins-coupon-code esd-block-text esd-extension-block\" \n esd-extension-block-id=\"coupon-block\"\n >\n <p class=\"ins-title\" contenteditable=\"false\">{-{-COUPON_CODE-}-}</p>\n </td>\n";
|
|
2
|
+
export declare function getDefaultTemplate(): string;
|
|
3
|
+
export default migrationTemplate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
COUPON_CODE: "{@COUPON_CODE}"
|
|
3
|
+
}, t = `
|
|
4
|
+
<td class="coupon-block ins-coupon-code esd-block-text">
|
|
5
|
+
<p class="ins-title" contenteditable="false">{-{-COUPON_CODE-}-}</p>
|
|
6
|
+
</td>
|
|
7
|
+
`;
|
|
8
|
+
function O() {
|
|
9
|
+
return t.replace("{-{-COUPON_CODE-}-}", e.COUPON_CODE);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
O as getDefaultTemplate
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
export declare const BLOCK_ID = "{{your-block}}";
|
|
3
|
+
export declare class CustomBlock extends Block {
|
|
4
|
+
getId(): string;
|
|
5
|
+
getIcon(): string;
|
|
6
|
+
getBlockCompositionType(): BlockCompositionType;
|
|
7
|
+
getName(): string;
|
|
8
|
+
getDescription(): string;
|
|
9
|
+
getTemplate(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Control, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
export declare const CONTROL_BLOCK_ID = "ui-elements-{{your-control-block}}";
|
|
3
|
+
export declare class CustomControl extends Control {
|
|
4
|
+
private currentNode?;
|
|
5
|
+
private selectedUnsubGroup?;
|
|
6
|
+
private unsubList;
|
|
7
|
+
getId(): string;
|
|
8
|
+
_setFormValues(): void;
|
|
9
|
+
_getLabel(text: string, name?: string): string;
|
|
10
|
+
_getSelectItem(text: string, value: string): string;
|
|
11
|
+
_getSelect(): string;
|
|
12
|
+
getTemplate(): string;
|
|
13
|
+
_onSelectChange(value: string | number): void;
|
|
14
|
+
_listenToFormUpdates(): void;
|
|
15
|
+
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
16
|
+
onRender(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const migrationTemplate = "\n <td \n align=\"left\" \n esd-extension-block-id=\"checkbox-block\" \n class=\"checkbox-block-v2 esd-block-checkbox esd-checkbox-block esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" style=\"vertical-align: top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>{-{-TITLE-}-}</tr>\n <tr>{-{-DESCRIPTION-}-}</tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
|
+
/**
|
|
3
|
+
* @returns The template for the default checkbox block
|
|
4
|
+
*/
|
|
5
|
+
export declare function getDefaultTemplate(): string;
|
|
6
|
+
export default migrationTemplate;
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var m = (
|
|
3
|
-
var r = (
|
|
4
|
-
import { dynamicContentToMergeTags as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var m = (n, e, t) => e in n ? a(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var r = (n, e, t) => m(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { dynamicContentToMergeTags as g } from "../../utils/genericUtil.js";
|
|
5
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
6
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
7
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
8
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
9
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
10
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
11
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
12
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
13
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
14
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
15
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
16
|
+
import { UEAttr as c } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js";
|
|
17
|
+
import { UIElementType as i } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
18
|
+
import { UIElement as l } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js";
|
|
19
|
+
import { UIElementTagRegistry as d } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js";
|
|
20
|
+
import { ExternalMergeTagsLibrary as p } from "./dynamic-content-modal.js";
|
|
21
|
+
const s = "external-dynamic-content-ui-element", T = "button-add-dynamic-content";
|
|
22
|
+
class O extends d {
|
|
23
|
+
registerUiElements(e) {
|
|
24
|
+
e[i.MERGETAGS] = s;
|
|
11
25
|
}
|
|
12
26
|
}
|
|
13
|
-
class
|
|
27
|
+
class k extends l {
|
|
14
28
|
constructor() {
|
|
15
29
|
super(...arguments);
|
|
16
30
|
r(this, "mergeTagsButton", null);
|
|
@@ -20,42 +34,42 @@ class u extends n.UIElement {
|
|
|
20
34
|
r(this, "selectedDynamicContent", { value: "", text: "" });
|
|
21
35
|
}
|
|
22
36
|
getId() {
|
|
23
|
-
return
|
|
37
|
+
return s;
|
|
24
38
|
}
|
|
25
|
-
onRender(
|
|
26
|
-
var
|
|
27
|
-
this.listener = this._onClick.bind(this), this.mergeTagsButton =
|
|
39
|
+
onRender(t) {
|
|
40
|
+
var o;
|
|
41
|
+
this.listener = this._onClick.bind(this), this.mergeTagsButton = t.querySelector("#guido__btn-add-dynamic-content"), (o = this.mergeTagsButton) == null || o.addEventListener("click", this.listener);
|
|
28
42
|
}
|
|
29
43
|
onDestroy() {
|
|
30
|
-
var
|
|
31
|
-
(
|
|
44
|
+
var t;
|
|
45
|
+
(t = this.mergeTagsButton) == null || t.removeEventListener("click", this.listener);
|
|
32
46
|
}
|
|
33
47
|
_onClick() {
|
|
34
48
|
this.openMergeTagLibrary();
|
|
35
49
|
}
|
|
36
50
|
openMergeTagLibrary() {
|
|
37
|
-
this.mergeTagsLibrary || (this.mergeTagsLibrary = new
|
|
51
|
+
this.mergeTagsLibrary || (this.mergeTagsLibrary = new p()), this.mergeTagsLibrary.openMergeTagsLibrary(
|
|
38
52
|
this.selectedDynamicContent,
|
|
39
|
-
(
|
|
40
|
-
this.api.onValueChanged(
|
|
53
|
+
(t) => {
|
|
54
|
+
this.api.onValueChanged(g([t])[0]);
|
|
41
55
|
}
|
|
42
56
|
);
|
|
43
57
|
}
|
|
44
58
|
getTemplate() {
|
|
45
59
|
return `
|
|
46
60
|
<div>
|
|
47
|
-
<${
|
|
61
|
+
<${i.BUTTON}
|
|
48
62
|
id="guido__btn-add-dynamic-content"
|
|
49
63
|
class="btn btn-primary"
|
|
50
|
-
${
|
|
51
|
-
<${
|
|
52
|
-
</${
|
|
64
|
+
${c.BUTTON.name}="${T}">
|
|
65
|
+
<${i.ICON} src="plus" class="icon icon-button color-primary">
|
|
66
|
+
</${i.ICON}>
|
|
53
67
|
${this.api.translate("Add Dynamic Content")}
|
|
54
|
-
</${
|
|
68
|
+
</${i.BUTTON}>
|
|
55
69
|
</div>`;
|
|
56
70
|
}
|
|
57
71
|
}
|
|
58
72
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
73
|
+
O as DynamicContentTagRegistry,
|
|
74
|
+
k as DynamicContentUiElementExtension
|
|
61
75
|
};
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
2
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
3
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
4
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
5
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
6
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
7
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
8
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
9
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
10
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
11
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
12
|
+
import "../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
13
|
+
import { ExtensionBuilder as t } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js";
|
|
14
|
+
import { DynamicContentUiElementExtension as i, DynamicContentTagRegistry as o } from "./dynamic-content.js";
|
|
15
|
+
import n from "./dynamic-content.css.js";
|
|
16
|
+
const w = new t().addUiElement(i).withStyles(n).withLocalization({
|
|
5
17
|
en: {
|
|
6
18
|
"Add Dynamic Content": "Add Dynamic Content"
|
|
7
19
|
}
|
|
8
|
-
}).withUiElementTagRegistry(
|
|
20
|
+
}).withUiElementTagRegistry(o).build();
|
|
9
21
|
export {
|
|
10
|
-
|
|
22
|
+
w as default
|
|
11
23
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-
|
|
1
|
+
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-aca05338],.guido-editor__container[data-v-aca05338]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-aca05338]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7.87939 0C8.56714 0.0576002 9.26998 0.793636 9.82275 1.37305L9.83057 1.38184C9.93483 1.49112 10.0343 1.5944 10.1265 1.68652L17.2573 8.79492C18.2493 9.7872 18.2493 11.3954 17.2573 12.3877L12.396 17.2471C11.9169 17.726 11.2659 17.9999 10.6157 18C9.96563 17.9999 9.31551 17.76 8.83643 17.2471L1.68896 10.1221C1.58907 10.0222 1.47548 9.91523 1.35596 9.80273C0.77939 9.26006 0.0584135 8.58144 0.00146484 7.87305L0.00439453 2.15625C-0.0298299 1.57462 0.209988 1.02683 0.620605 0.616211C1.03135 0.20572 1.57981 0 2.16162 0L7.87939 0ZM2.16162 2C2.10648 2 2.07333 2.01007 2.05908 2.01562C2.04707 2.02035 2.04069 2.02432 2.03467 2.03027C2.01884 2.04611 2.00915 2.05957 2.00342 2.06836L2.00439 2.09766L2.00146 7.59277C2.01413 7.61029 2.02975 7.63092 2.04834 7.6543C2.20264 7.84819 2.41884 8.05659 2.72705 8.34668L2.73682 8.35645C2.84844 8.46149 2.9808 8.58586 3.10205 8.70703L3.10303 8.70801L10.2739 15.8564L10.2983 15.8818C10.3564 15.9439 10.4539 15.9999 10.6157 16C10.7155 15.9998 10.8635 15.9513 10.9819 15.833L15.8433 10.9736C16.054 10.7626 16.0536 10.4212 15.8433 10.21L8.71436 3.10352L8.7124 3.10156C8.60329 2.99248 8.49054 2.8737 8.39209 2.77051L8.37549 2.75391C8.08113 2.44536 7.86049 2.21875 7.65479 2.05469C7.62752 2.03295 7.6037 2.01461 7.5835 2L2.16162 2ZM8.16748 9.83301C8.81172 9.18878 9.8571 9.18898 10.5015 9.83301L10.6265 9.71973C11.2745 9.19135 12.2304 9.22915 12.8345 9.83301C13.4787 10.4772 13.4795 11.5226 12.8354 12.167C12.8312 12.1713 12.8251 12.1745 12.8208 12.1787L11.2085 13.792C10.818 14.1825 10.185 14.1824 9.79443 13.792L8.18115 12.1797C8.1768 12.1755 8.17178 12.1713 8.16748 12.167C7.52346 11.5226 7.52325 10.4772 8.16748 9.83301ZM5.00146 4C5.55353 4.00025 6.00146 4.44787 6.00146 5C6.00146 5.55213 5.55353 5.99975 5.00146 6C4.44918 6 4.00146 5.55228 4.00146 5C4.00146 4.44772 4.44918 4 5.00146 4Z" fill="#666666"/>
|
|
3
|
+
</svg>
|
|
@@ -1,51 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var L = (r, e, i) => e in r ? E(r, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[e] = i;
|
|
3
|
+
var t = (r, e, i) => L(r, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
class A {
|
|
5
|
+
constructor(e, i, s = [], n, a = [], l, o = [], g = [], y, h, x, u, b, c, m) {
|
|
6
|
+
t(this, "i18n");
|
|
7
|
+
t(this, "styles");
|
|
8
|
+
t(this, "previewStyles");
|
|
9
|
+
t(this, "uiElements", []);
|
|
10
|
+
t(this, "uiElementTagRegistry");
|
|
11
|
+
t(this, "controls", []);
|
|
12
|
+
t(this, "settingsPanelRegistry");
|
|
13
|
+
t(this, "contextActions", []);
|
|
14
|
+
t(this, "blocks", []);
|
|
15
|
+
t(this, "id");
|
|
16
|
+
t(this, "externalSmartElementsLibrary");
|
|
17
|
+
t(this, "externalImageLibrary");
|
|
18
|
+
t(this, "externalAiAssistant");
|
|
19
|
+
t(this, "externalDisplayConditionsLibrary");
|
|
20
|
+
t(this, "externalVideoLibrary");
|
|
21
|
+
t(this, "blocksPanel");
|
|
22
|
+
this.i18n = e, this.styles = i, this.previewStyles = x, this.uiElements = s, this.uiElementTagRegistry = n, this.controls = a, this.settingsPanelRegistry = l, this.contextActions = o, this.blocks = g, this.externalSmartElementsLibrary = y, this.externalImageLibrary = h, this.externalAiAssistant = u, this.externalDisplayConditionsLibrary = b, this.externalVideoLibrary = c, this.blocksPanel = m, this.id = Math.random().toString(36).substring(2);
|
|
23
|
+
}
|
|
24
|
+
getI18n() {
|
|
25
|
+
return this.i18n;
|
|
26
|
+
}
|
|
27
|
+
getStyles() {
|
|
28
|
+
return this.styles;
|
|
29
|
+
}
|
|
30
|
+
getPreviewStyles() {
|
|
31
|
+
return this.previewStyles;
|
|
32
|
+
}
|
|
33
|
+
getUiElements() {
|
|
34
|
+
return this.uiElements;
|
|
35
|
+
}
|
|
36
|
+
getUiElementTagRegistry() {
|
|
37
|
+
return this.uiElementTagRegistry;
|
|
38
|
+
}
|
|
39
|
+
getControls() {
|
|
40
|
+
return this.controls;
|
|
41
|
+
}
|
|
42
|
+
getSettingsPanelRegistry() {
|
|
43
|
+
return this.settingsPanelRegistry;
|
|
44
|
+
}
|
|
45
|
+
getContextActions() {
|
|
46
|
+
return this.contextActions;
|
|
47
|
+
}
|
|
48
|
+
getBlocks() {
|
|
49
|
+
return this.blocks;
|
|
50
|
+
}
|
|
51
|
+
getId() {
|
|
52
|
+
return this.id;
|
|
53
|
+
}
|
|
54
|
+
getExternalSmartElementsLibrary() {
|
|
55
|
+
return this.externalSmartElementsLibrary;
|
|
56
|
+
}
|
|
57
|
+
getExternalImageLibrary() {
|
|
58
|
+
return this.externalImageLibrary;
|
|
59
|
+
}
|
|
60
|
+
getExternalAiAssistant() {
|
|
61
|
+
return this.externalAiAssistant;
|
|
62
|
+
}
|
|
63
|
+
getExternalDisplayConditionsLibrary() {
|
|
64
|
+
return this.externalDisplayConditionsLibrary;
|
|
65
|
+
}
|
|
66
|
+
getExternalVideoLibrary() {
|
|
67
|
+
return this.externalVideoLibrary;
|
|
68
|
+
}
|
|
69
|
+
getBlocksPanel() {
|
|
70
|
+
return this.blocksPanel;
|
|
71
|
+
}
|
|
48
72
|
}
|
|
49
73
|
export {
|
|
50
|
-
|
|
74
|
+
A as Extension
|
|
51
75
|
};
|
|
@@ -1,52 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var n;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var n = (e, t, s) => t in e ? r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var i = (e, t, s) => n(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { Extension as a } from "./Extension.js";
|
|
5
|
+
class o {
|
|
6
|
+
constructor() {
|
|
7
|
+
i(this, "i18n");
|
|
8
|
+
i(this, "styles");
|
|
9
|
+
i(this, "previewStyles");
|
|
10
|
+
i(this, "uiElements", []);
|
|
11
|
+
i(this, "uiElementTagRegistry");
|
|
12
|
+
i(this, "controls", []);
|
|
13
|
+
i(this, "settingsPanelRegistry");
|
|
14
|
+
i(this, "contextActions", []);
|
|
15
|
+
i(this, "blocks", []);
|
|
16
|
+
i(this, "externalSmartElementsLibrary");
|
|
17
|
+
i(this, "externalImageLibrary");
|
|
18
|
+
i(this, "externalAiAssistant");
|
|
19
|
+
i(this, "externalDisplayConditionsLibrary");
|
|
20
|
+
i(this, "externalVideoLibrary");
|
|
21
|
+
i(this, "blocksPanel");
|
|
22
|
+
}
|
|
23
|
+
withLocalization(t) {
|
|
24
|
+
return this.i18n = t, this;
|
|
25
|
+
}
|
|
26
|
+
withStyles(t) {
|
|
27
|
+
return this.styles = t, this;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @description defines custom developer styles to use inside the editor document preview
|
|
31
|
+
*/
|
|
32
|
+
withPreviewStyles(t) {
|
|
33
|
+
return this.previewStyles = t, this;
|
|
34
|
+
}
|
|
35
|
+
addContextAction(t) {
|
|
36
|
+
return this.contextActions.push(t), this;
|
|
37
|
+
}
|
|
38
|
+
addUiElement(t) {
|
|
39
|
+
return this.uiElements.push(t), this;
|
|
40
|
+
}
|
|
41
|
+
withUiElementTagRegistry(t) {
|
|
42
|
+
return this.uiElementTagRegistry = t, this;
|
|
43
|
+
}
|
|
44
|
+
addControl(t) {
|
|
45
|
+
return this.controls.push(t), this;
|
|
46
|
+
}
|
|
47
|
+
withSettingsPanelRegistry(t) {
|
|
48
|
+
return this.settingsPanelRegistry = t, this;
|
|
49
|
+
}
|
|
50
|
+
withExternalSmartElementsLibrary(t) {
|
|
51
|
+
return this.externalSmartElementsLibrary = t, this;
|
|
52
|
+
}
|
|
53
|
+
withExternalImageLibrary(t) {
|
|
54
|
+
return this.externalImageLibrary = t, this;
|
|
55
|
+
}
|
|
56
|
+
withExternalAiAssistant(t) {
|
|
57
|
+
return this.externalAiAssistant = t, this;
|
|
58
|
+
}
|
|
59
|
+
withExternalDisplayCondition(t) {
|
|
60
|
+
return this.externalDisplayConditionsLibrary = t, this;
|
|
61
|
+
}
|
|
62
|
+
withExternalVideosLibrary(t) {
|
|
63
|
+
return this.externalVideoLibrary = t, this;
|
|
64
|
+
}
|
|
65
|
+
withBlocksPanel(t) {
|
|
66
|
+
return this.blocksPanel = t, this;
|
|
67
|
+
}
|
|
68
|
+
addBlock(t) {
|
|
69
|
+
return this.blocks.push(t), this;
|
|
70
|
+
}
|
|
71
|
+
build() {
|
|
72
|
+
return new a(this.i18n, this.styles, this.uiElements, this.uiElementTagRegistry, this.controls, this.settingsPanelRegistry, this.contextActions, this.blocks, this.externalSmartElementsLibrary, this.externalImageLibrary, this.previewStyles, this.externalAiAssistant, this.externalDisplayConditionsLibrary, this.externalVideoLibrary, this.blocksPanel);
|
|
73
|
+
}
|
|
49
74
|
}
|
|
50
75
|
export {
|
|
51
|
-
|
|
76
|
+
o as ExtensionBuilder
|
|
52
77
|
};
|