@useinsider/guido 1.0.3-beta.a6a2da8 → 1.0.3-beta.a7c1898
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/dist/@types/generic.d.ts +0 -9
- package/dist/components/Guido.vue.d.ts +2 -2
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +69 -74
- package/dist/components/wrappers/WpDrawer.vue.d.ts +4 -6
- package/dist/components/wrappers/WpDrawer.vue.js +4 -6
- package/dist/composables/useStripo.js +11 -17
- package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
- package/dist/config/migrator/couponBlockMigrator.js +32 -32
- package/dist/config/migrator/index.d.ts +1 -1
- package/dist/config/migrator/index.js +6 -7
- package/dist/enums/defaults.js +3 -6
- package/dist/enums/unsubscribe.d.ts +0 -19
- package/dist/enums/unsubscribe.js +6 -39
- package/dist/extensions/Blocks/Checkbox/block.d.ts +0 -1
- package/dist/extensions/Blocks/Checkbox/block.js +24 -15
- package/dist/extensions/Blocks/Checkbox/control.js +38 -24
- package/dist/extensions/Blocks/Checkbox/extension.js +16 -5
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +25 -12
- package/dist/extensions/Blocks/Checkbox/template.js +16 -5
- package/dist/extensions/Blocks/CouponBlock/block.d.ts +0 -1
- package/dist/extensions/Blocks/CouponBlock/block.js +24 -14
- package/dist/extensions/Blocks/CouponBlock/extension.js +16 -5
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +29 -16
- package/dist/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/extensions/Blocks/CouponBlock/template.js +11 -9
- package/dist/extensions/Blocks/RadioButton/block.d.ts +0 -1
- package/dist/extensions/Blocks/RadioButton/block.js +22 -13
- package/dist/extensions/Blocks/RadioButton/control.js +46 -32
- package/dist/extensions/Blocks/RadioButton/extension.js +15 -4
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +26 -13
- package/dist/extensions/Blocks/RadioButton/template.js +18 -7
- package/dist/extensions/Blocks/_Boilerplate/block.d.ts +0 -1
- package/dist/extensions/DynamicContent/dynamic-content.js +45 -31
- package/dist/extensions/DynamicContent/extension.js +18 -6
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +75 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +77 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +123 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +7 -0
- 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 +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +119 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +7 -0
- 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 +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +7 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +24 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +24 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +11 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +33 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +40 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +5 -0
- package/dist/static/assets/icons/coupon.svg.js +4 -0
- package/dist/stores/unsubscribe.d.ts +5 -253
- package/dist/stores/unsubscribe.js +6 -126
- package/dist/utils/templatePreparation.js +16 -17
- package/package.json +2 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
- package/dist/config/migrator/unsubscribeMigrator.d.ts +0 -1
- package/dist/config/migrator/unsubscribeMigrator.js +0 -124
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.d.ts +0 -4
- package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +0 -18
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +0 -4
- package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +0 -33
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.d.ts +0 -4
- package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +0 -14
- package/dist/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
- package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
- package/dist/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
- package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/extension.d.ts +0 -2
- package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
- package/dist/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
- package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
- package/dist/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +0 -648
- package/dist/services/unsubscribeApi.d.ts +0 -4
- package/dist/services/unsubscribeApi.js +0 -16
- package/dist/stores/config.d.ts +0 -96
- package/dist/stores/config.js +0 -17
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import { Block as t
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Block as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js";
|
|
2
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js";
|
|
3
|
+
import { BlockCompositionType as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js";
|
|
4
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js";
|
|
5
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js";
|
|
6
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js";
|
|
7
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js";
|
|
8
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js";
|
|
9
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js";
|
|
10
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js";
|
|
11
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js";
|
|
12
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js";
|
|
13
|
+
import "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
14
|
+
import { getDefaultTemplate as r } from "./template.js";
|
|
15
|
+
const i = "radio-button-block";
|
|
16
|
+
class D extends t {
|
|
8
17
|
getId() {
|
|
9
|
-
return
|
|
18
|
+
return i;
|
|
10
19
|
}
|
|
11
20
|
getIcon() {
|
|
12
|
-
return "
|
|
21
|
+
return "circle";
|
|
13
22
|
}
|
|
14
23
|
getBlockCompositionType() {
|
|
15
|
-
return o.
|
|
24
|
+
return o.BLOCK;
|
|
16
25
|
}
|
|
17
26
|
getName() {
|
|
18
27
|
return this.api.translate("Radio Button Block");
|
|
@@ -21,10 +30,10 @@ class c extends t {
|
|
|
21
30
|
return this.api.translate("Radio Button Block Description");
|
|
22
31
|
}
|
|
23
32
|
getTemplate() {
|
|
24
|
-
return
|
|
33
|
+
return r();
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
i as BLOCK_ID,
|
|
38
|
+
D as RadioButtonCustomBlock
|
|
30
39
|
};
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
var E = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var a = (
|
|
4
|
-
import { useHttp as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
var p = (o, i, t) => i in o ? E(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
|
|
3
|
+
var a = (o, i, t) => p(o, typeof i != "symbol" ? i + "" : i, t);
|
|
4
|
+
import { useHttp as m } from "../../../composables/useHttp.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 e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js";
|
|
17
|
+
import { UIElementType as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js";
|
|
18
|
+
import { Control as c } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js";
|
|
19
|
+
import { ModificationDescription as d } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js";
|
|
20
|
+
const l = "ui-elements-radio-button", n = "select", { get: L } = m();
|
|
21
|
+
class R extends c {
|
|
8
22
|
constructor() {
|
|
9
23
|
super(...arguments);
|
|
10
24
|
a(this, "currentNode");
|
|
@@ -12,27 +26,27 @@ class b extends l {
|
|
|
12
26
|
a(this, "unsubList", []);
|
|
13
27
|
}
|
|
14
28
|
getId() {
|
|
15
|
-
return
|
|
29
|
+
return l;
|
|
16
30
|
}
|
|
17
31
|
_setFormValues() {
|
|
18
32
|
this.api.updateValues({
|
|
19
|
-
[
|
|
33
|
+
[n]: ""
|
|
20
34
|
});
|
|
21
35
|
}
|
|
22
|
-
_getLabel(t,
|
|
36
|
+
_getLabel(t, s = `${Math.random()}`) {
|
|
23
37
|
return `
|
|
24
|
-
<${
|
|
38
|
+
<${r.LABEL}
|
|
25
39
|
${e.LABEL.text}="${t}"
|
|
26
|
-
${e.LABEL.name}="${
|
|
27
|
-
</${
|
|
40
|
+
${e.LABEL.name}="${s}">
|
|
41
|
+
</${r.LABEL}>
|
|
28
42
|
`;
|
|
29
43
|
}
|
|
30
|
-
_getSelectItem(t,
|
|
44
|
+
_getSelectItem(t, s) {
|
|
31
45
|
return `
|
|
32
|
-
<${
|
|
46
|
+
<${r.SELECT_ITEM}
|
|
33
47
|
${e.SELECT_ITEM.text}="${t}"
|
|
34
|
-
${e.SELECT_ITEM.value}="${
|
|
35
|
-
</${
|
|
48
|
+
${e.SELECT_ITEM.value}="${s}">
|
|
49
|
+
</${r.SELECT_ITEM}>`;
|
|
36
50
|
}
|
|
37
51
|
_getSelect() {
|
|
38
52
|
return this.unsubList.map((t) => this._getSelectItem(t.name, t.sendGridId)).join("");
|
|
@@ -41,50 +55,50 @@ class b extends l {
|
|
|
41
55
|
return `
|
|
42
56
|
<div class="checkbox-controls-container">
|
|
43
57
|
<div class="checkbox-select-container container two-columns stretch">
|
|
44
|
-
<${
|
|
58
|
+
<${r.LABEL}
|
|
45
59
|
${e.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
|
|
46
60
|
${e.LABEL.name}="${Math.random()}">
|
|
47
|
-
</${
|
|
61
|
+
</${r.LABEL}>
|
|
48
62
|
|
|
49
|
-
<${
|
|
50
|
-
${e.SELECTPICKER.name}="${
|
|
63
|
+
<${r.SELECTPICKER}
|
|
64
|
+
${e.SELECTPICKER.name}="${n}"
|
|
51
65
|
${e.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
|
|
52
66
|
${this._getSelect()}
|
|
53
|
-
</${
|
|
67
|
+
</${r.SELECTPICKER}>
|
|
54
68
|
</div>
|
|
55
69
|
</div>
|
|
56
70
|
`;
|
|
57
71
|
}
|
|
58
72
|
_onSelectChange(t) {
|
|
59
|
-
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new
|
|
73
|
+
this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new d(`Updated text to ${t}`));
|
|
60
74
|
}
|
|
61
75
|
_listenToFormUpdates() {
|
|
62
|
-
this.api.onValueChanged(
|
|
76
|
+
this.api.onValueChanged(n, (t) => this._onSelectChange(t));
|
|
63
77
|
}
|
|
64
78
|
onTemplateNodeUpdated(t) {
|
|
65
79
|
if (this.currentNode = t, "getAttribute" in t) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
[
|
|
80
|
+
const s = Number(t.getAttribute("id"));
|
|
81
|
+
s && (this.selectedUnsubGroup = s, this.api.updateValues({
|
|
82
|
+
[n]: this.selectedUnsubGroup
|
|
69
83
|
}));
|
|
70
84
|
}
|
|
71
85
|
}
|
|
72
86
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
73
87
|
async onRender() {
|
|
74
|
-
const t = await
|
|
88
|
+
const t = await L(
|
|
75
89
|
"/unsubscribe-groups/unsubscribe-list"
|
|
76
|
-
),
|
|
90
|
+
), s = t.data.map((u) => ({
|
|
77
91
|
[e.SELECT_ITEM.text]: u.name,
|
|
78
92
|
[e.SELECT_ITEM.value]: u.sendGridId
|
|
79
93
|
}));
|
|
80
94
|
this.unsubList = t.data, this.api.setUIEAttribute(
|
|
81
|
-
|
|
95
|
+
n,
|
|
82
96
|
e.SELECTPICKER.items,
|
|
83
|
-
|
|
97
|
+
s
|
|
84
98
|
), this._setFormValues(), this._listenToFormUpdates();
|
|
85
99
|
}
|
|
86
100
|
}
|
|
87
101
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
102
|
+
l as CONTROL_BLOCK_ID,
|
|
103
|
+
R as RadioButtonControl
|
|
90
104
|
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import
|
|
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 o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js";
|
|
2
14
|
import { RadioButtonCustomBlock as t } from "./block.js";
|
|
3
15
|
import { RadioButtonControl as i } from "./control.js";
|
|
4
|
-
import { RadioButtonIconsRegistry as n } from "./iconsRegistry.js";
|
|
5
16
|
import { RadioButtonBlockSettingsPanel as r } from "./settingsPanel.js";
|
|
6
|
-
const
|
|
17
|
+
const C = new o().addBlock(t).withSettingsPanelRegistry(r).addControl(i).build();
|
|
7
18
|
export {
|
|
8
|
-
|
|
19
|
+
C as default
|
|
9
20
|
};
|
|
@@ -1,26 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 { ContainerControls as t, TextControls as m } 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 o } 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 e } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js";
|
|
14
|
+
import { SettingsPanelTab as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js";
|
|
15
|
+
import { BLOCK_ID as p } from "./block.js";
|
|
16
|
+
import { CONTROL_BLOCK_ID as n } from "./control.js";
|
|
17
|
+
class K extends e {
|
|
18
|
+
registerBlockControls(i) {
|
|
19
|
+
i[p] = [
|
|
20
|
+
new r(
|
|
8
21
|
o.SETTINGS,
|
|
9
22
|
[
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
n,
|
|
24
|
+
t.EXTERNAL_INDENTS,
|
|
25
|
+
t.DISPLAY_CONDITIONS
|
|
13
26
|
]
|
|
14
27
|
),
|
|
15
|
-
new
|
|
28
|
+
new r(
|
|
16
29
|
o.STYLES,
|
|
17
30
|
[
|
|
18
|
-
|
|
31
|
+
m.TEXT_BLOCK_BACKGROUND_COLOR
|
|
19
32
|
]
|
|
20
33
|
)
|
|
21
34
|
];
|
|
22
35
|
}
|
|
23
36
|
}
|
|
24
37
|
export {
|
|
25
|
-
|
|
38
|
+
K as RadioButtonBlockSettingsPanel
|
|
26
39
|
};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import
|
|
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 { BlockType as t } from "../../../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";
|
|
2
13
|
const e = {
|
|
3
14
|
TITLE: "This is a title text",
|
|
4
15
|
DESCRIPTION: "This is a description text",
|
|
5
16
|
YES: "Yes",
|
|
6
17
|
NO: "No"
|
|
7
|
-
},
|
|
18
|
+
}, i = `
|
|
8
19
|
<td align="left" class="radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
|
|
9
20
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
10
21
|
<tbody>
|
|
@@ -75,7 +86,7 @@ const e = {
|
|
|
75
86
|
</tbody>
|
|
76
87
|
</table>
|
|
77
88
|
</td>
|
|
78
|
-
`,
|
|
89
|
+
`, h = `
|
|
79
90
|
<td
|
|
80
91
|
align="left"
|
|
81
92
|
esd-extension-block-id="radio-button-block"
|
|
@@ -140,10 +151,10 @@ const e = {
|
|
|
140
151
|
</table>
|
|
141
152
|
</td>
|
|
142
153
|
`;
|
|
143
|
-
function
|
|
144
|
-
return
|
|
154
|
+
function m() {
|
|
155
|
+
return i.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
|
|
145
156
|
}
|
|
146
157
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
158
|
+
h as default,
|
|
159
|
+
m as getDefaultTemplate
|
|
149
160
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
2
|
export declare const BLOCK_ID = "{{your-block}}";
|
|
3
3
|
export declare class CustomBlock extends Block {
|
|
4
|
-
constructor();
|
|
5
4
|
getId(): string;
|
|
6
5
|
getIcon(): string;
|
|
7
6
|
getBlockCompositionType(): BlockCompositionType;
|
|
@@ -1,61 +1,75 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
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
|
-
|
|
17
|
-
|
|
30
|
+
r(this, "mergeTagsButton", null);
|
|
31
|
+
r(this, "listener", () => {
|
|
18
32
|
});
|
|
19
|
-
|
|
20
|
-
|
|
33
|
+
r(this, "mergeTagsLibrary", null);
|
|
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-2c168944] .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-
|
|
1
|
+
[data-v-2c168944] .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,75 @@
|
|
|
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
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
A as Extension
|
|
75
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
o as ExtensionBuilder
|
|
77
|
+
};
|