@useinsider/guido 1.0.0-beta.7f477db → 1.0.0-beta.80693fc

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 (147) hide show
  1. package/README.md +259 -11
  2. package/dist/@types/generic.d.ts +14 -0
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/_virtual/AddCustomFont.js +4 -0
  5. package/dist/_virtual/AiAssistantValueType.js +4 -0
  6. package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
  7. package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
  8. package/dist/_virtual/Block.js +4 -0
  9. package/dist/_virtual/BlockAttributes.js +4 -0
  10. package/dist/_virtual/BlockCompositionType.js +4 -0
  11. package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
  12. package/dist/_virtual/BlockRenderer.js +4 -0
  13. package/dist/_virtual/BlockType.js +4 -0
  14. package/dist/_virtual/BlocksPanel.js +4 -0
  15. package/dist/_virtual/BuiltInControl.js +4 -0
  16. package/dist/_virtual/BuiltInControlTypes.js +4 -0
  17. package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
  18. package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
  19. package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
  20. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
  21. package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
  22. package/dist/_virtual/ContextAction.js +4 -0
  23. package/dist/_virtual/ContextActionType.js +4 -0
  24. package/dist/_virtual/Control.js +4 -0
  25. package/dist/_virtual/EditorStatePropertyType.js +4 -0
  26. package/dist/_virtual/Extension.js +4 -0
  27. package/dist/_virtual/ExtensionBuilder.js +4 -0
  28. package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
  29. package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
  30. package/dist/_virtual/ModificationDescription.js +4 -0
  31. package/dist/_virtual/PanelPosition.js +4 -0
  32. package/dist/_virtual/PreviewDeviceMode.js +4 -0
  33. package/dist/_virtual/SettingsPanelRegistry.js +4 -0
  34. package/dist/_virtual/SettingsPanelTab.js +4 -0
  35. package/dist/_virtual/SettingsTab.js +4 -0
  36. package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
  37. package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
  38. package/dist/_virtual/TextColorBuiltInControl.js +4 -0
  39. package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
  40. package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
  41. package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
  42. package/dist/_virtual/UIElement.js +4 -0
  43. package/dist/_virtual/UIElementTagRegistry.js +4 -0
  44. package/dist/_virtual/UIElementType.js +4 -0
  45. package/dist/_virtual/UIElementsAttributes.js +4 -0
  46. package/dist/_virtual/index.js +5 -0
  47. package/dist/_virtual/index2.js +4 -0
  48. package/dist/components/Guido.vue.d.ts +9 -2
  49. package/dist/components/Guido.vue.js +8 -8
  50. package/dist/components/Guido.vue2.js +38 -27
  51. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  52. package/dist/components/organisms/header/MiddleSlot.vue2.js +19 -17
  53. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
  54. package/dist/components/organisms/header/RightSlot.vue.js +7 -7
  55. package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
  56. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  57. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +1 -1
  58. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  59. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  60. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  61. package/dist/composables/useActionsApi.d.ts +2 -2
  62. package/dist/composables/useActionsApi.js +36 -43
  63. package/dist/composables/useExport.d.ts +1 -1
  64. package/dist/composables/useExport.js +35 -20
  65. package/dist/composables/useHtmlCompiler.d.ts +4 -0
  66. package/dist/composables/useHtmlCompiler.js +16 -0
  67. package/dist/composables/useHttp.js +21 -23
  68. package/dist/composables/useStripo.js +39 -28
  69. package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
  70. package/dist/config/compiler/htmlCompilerRules.js +145 -0
  71. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  72. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  73. package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
  74. package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
  75. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  76. package/dist/extensions/DynamicContent/dynamic-content.js +63 -0
  77. package/dist/extensions/DynamicContent/extension.d.ts +2 -0
  78. package/dist/extensions/DynamicContent/extension.js +11 -0
  79. package/dist/guido.css +1 -1
  80. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
  81. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
  82. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
  83. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  84. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  85. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  86. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  87. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
  88. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  89. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
  90. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
  96. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
  97. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
  123. package/dist/stores/editor.d.ts +1 -1
  124. package/dist/stores/editor.js +4 -4
  125. package/dist/utils/htmlCompiler.d.ts +12 -0
  126. package/dist/utils/htmlCompiler.js +70 -0
  127. package/dist/utils/tooltipUtils.d.ts +2 -0
  128. package/dist/utils/tooltipUtils.js +9 -0
  129. package/package.json +4 -1
  130. package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -16
  131. package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -20
  132. package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -78
  133. package/dist/components/wrappers/ModalWrapper.vue.d.ts +0 -72
  134. package/dist/components/wrappers/ModalWrapper.vue.js +0 -19
  135. package/dist/components/wrappers/ModalWrapper.vue2.js +0 -43
  136. package/dist/composables/useSaveAsTemplate.d.ts +0 -7
  137. package/dist/composables/useSaveAsTemplate.js +0 -51
  138. package/dist/composables/useTemplateNameValidation.d.ts +0 -7
  139. package/dist/composables/useTemplateNameValidation.js +0 -33
  140. package/dist/mock/api/template-library.d.ts +0 -2
  141. package/dist/stores/template-categories.d.ts +0 -41
  142. package/dist/stores/template-categories.js +0 -91
  143. package/dist/utils/base64.d.ts +0 -2
  144. package/dist/utils/base64.js +0 -14
  145. package/dist/utils/generic.d.ts +0 -1
  146. package/dist/utils/generic.js +0 -7
  147. package/dist/utils/textUtil.d.ts +0 -2
@@ -0,0 +1,266 @@
1
+ import { __exports as t } from "../../../../_virtual/index2.js";
2
+ import { __require as J } from "./ui-elements/UIElement.js";
3
+ import { __require as K } from "./controls/Control.js";
4
+ import { __require as Q } from "./controls/SettingsPanelRegistry.js";
5
+ import { __require as W } from "./blocks/ContextAction.js";
6
+ import { __require as X } from "./blocks/BlockRenderer.js";
7
+ import { __require as Y } from "./blocks/Block.js";
8
+ import { __require as Z } from "./ExtensionBuilder.js";
9
+ import { __require as $ } from "./Extension.js";
10
+ import { __require as x } from "./ui-elements/UIElementTagRegistry.js";
11
+ import { __require as ee } from "./modifications/ModificationDescription.js";
12
+ import { __require as re } from "./controls/SettingsPanelTab.js";
13
+ import { __require as te } from "./constants/UIElementType.js";
14
+ import { __require as ne } from "./constants/BuiltInControlTypes.js";
15
+ import { __require as oe } from "./constants/SettingsTab.js";
16
+ import { __require as ie } from "./constants/UIElementsAttributes.js";
17
+ import { __require as ue } from "./constants/BlockType.js";
18
+ import { __require as le } from "./constants/ContextActionType.js";
19
+ import { __require as ae } from "./constants/BlockCompositionType.js";
20
+ import { __require as ce } from "./constants/BlockAttributes.js";
21
+ import { __require as Ce } from "./constants/AiAssistantValueType.js";
22
+ import { __require as me } from "./constants/AddCustomFont.js";
23
+ import { __require as Be } from "./controls/BuiltInControl.js";
24
+ import { __require as fe } from "./controls/FontFamilyBuiltInControl.js";
25
+ import { __require as de } from "./controls/BackgroundColorBuiltInControl.js";
26
+ import { __require as be } from "./controls/BlockPaddingsBuiltInControl.js";
27
+ import { __require as _e } from "./controls/BackgroundImageBuiltInControl.js";
28
+ import { __require as ge } from "./constants/EditorStatePropertyType.js";
29
+ import { __require as Ie } from "./constants/PreviewDeviceMode.js";
30
+ import { __require as ye } from "./controls/StructurePaddingsBuiltInControl.js";
31
+ import { __require as Pe } from "./controls/TextColorBuiltInControl.js";
32
+ import { __require as se } from "./controls/ButtonFontColorBuiltInControl.js";
33
+ import { __require as Te } from "./controls/ButtonColorBuiltInControl.js";
34
+ import { __require as qe } from "./controls/ButtonInternalIndentsBuiltInControl.js";
35
+ import { __require as Oe } from "./controls/StructureBorderBuiltInControl.js";
36
+ import { __require as je } from "./controls/TextSizeBuiltInControl.js";
37
+ import { __require as Se } from "./controls/TextStyleBuiltInControl.js";
38
+ import { __require as ve } from "./controls/LinkColorBuiltInControl.js";
39
+ import { __require as ke } from "./controls/ButtonTextBuiltInControl.js";
40
+ import { __require as pe } from "./controls/ButtonBorderBuiltInControl.js";
41
+ import { __require as Ae } from "./controls/TextLineSpacingBuiltInControl.js";
42
+ import { __require as Ee } from "./blocks/BlocksPanel.js";
43
+ import { __require as Fe } from "./constants/PanelPosition.js";
44
+ var n;
45
+ function Tr() {
46
+ return n ? t : (n = 1, function(e) {
47
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.ButtonTextBuiltInControl = e.LinkColorBuiltInControl = e.BackgroundImageBuiltInControl = e.BackgroundColorBuiltInControl = e.FontFamilyBuiltInControl = e.BuiltInControl = e.ADD_CUSTOM_FONT_OPTION = e.BlockAttr = e.AiAssistantValueType = e.BlockCompositionType = e.AmpFormControls = e.GeneralControls = e.GeneralStylesControls = e.MessageSettingsControls = e.ContainerControls = e.StructureControls = e.StripeControls = e.CarouselControls = e.AccordionControls = e.MenuControls = e.SocialControls = e.CustomTextControls = e.CustomImageControls = e.CustomLinkControls = e.HTMLControls = e.ImageControls = e.SpacerControls = e.TimerControls = e.VideoControls = e.TextControls = e.ButtonControls = e.BannerChildControls = e.BannerControls = e.BlockType = e.SettingsTab = e.BuiltInControlTypes = e.ContextActionType = e.UEAttr = e.UIElementType = e.ModificationDescription = e.Extension = e.ExtensionBuilder = e.SettingsPanelTab = e.Block = e.BlockRenderer = e.ContextAction = e.SettingsPanelRegistry = e.Control = e.UIElementTagRegistry = e.UIElement = void 0, e.TextLineSpacingBuiltInControl = e.ButtonBorderBuiltInControl = e.PanelPosition = e.BlocksPanel = e.StructureBorderBuiltInControl = e.TextStyleBuiltInControl = e.TextSizeBuiltInControl = e.PreviewDeviceMode = e.EditorStatePropertyType = e.ButtonColorBuiltInControl = e.ButtonFontColorBuiltInControl = e.TextColorBuiltInControl = e.ButtonInternalIndentsBuiltInControl = e.StructurePaddingsBuiltInControl = e.BlockPaddingsBuiltInControl = void 0;
48
+ var o = J();
49
+ Object.defineProperty(e, "UIElement", { enumerable: !0, get: function() {
50
+ return o.UIElement;
51
+ } });
52
+ var i = K();
53
+ Object.defineProperty(e, "Control", { enumerable: !0, get: function() {
54
+ return i.Control;
55
+ } });
56
+ var u = Q();
57
+ Object.defineProperty(e, "SettingsPanelRegistry", { enumerable: !0, get: function() {
58
+ return u.SettingsPanelRegistry;
59
+ } });
60
+ var l = W();
61
+ Object.defineProperty(e, "ContextAction", { enumerable: !0, get: function() {
62
+ return l.ContextAction;
63
+ } });
64
+ var a = X();
65
+ Object.defineProperty(e, "BlockRenderer", { enumerable: !0, get: function() {
66
+ return a.BlockRenderer;
67
+ } });
68
+ var c = Y();
69
+ Object.defineProperty(e, "Block", { enumerable: !0, get: function() {
70
+ return c.Block;
71
+ } });
72
+ var C = Z();
73
+ Object.defineProperty(e, "ExtensionBuilder", { enumerable: !0, get: function() {
74
+ return C.ExtensionBuilder;
75
+ } });
76
+ var m = $();
77
+ Object.defineProperty(e, "Extension", { enumerable: !0, get: function() {
78
+ return m.Extension;
79
+ } });
80
+ var B = x();
81
+ Object.defineProperty(e, "UIElementTagRegistry", { enumerable: !0, get: function() {
82
+ return B.UIElementTagRegistry;
83
+ } });
84
+ var f = ee();
85
+ Object.defineProperty(e, "ModificationDescription", { enumerable: !0, get: function() {
86
+ return f.ModificationDescription;
87
+ } });
88
+ var d = re();
89
+ Object.defineProperty(e, "SettingsPanelTab", { enumerable: !0, get: function() {
90
+ return d.SettingsPanelTab;
91
+ } });
92
+ var b = te();
93
+ Object.defineProperty(e, "UIElementType", { enumerable: !0, get: function() {
94
+ return b.UIElementType;
95
+ } });
96
+ var r = ne();
97
+ Object.defineProperty(e, "AccordionControls", { enumerable: !0, get: function() {
98
+ return r.AccordionControls;
99
+ } }), Object.defineProperty(e, "AmpFormControls", { enumerable: !0, get: function() {
100
+ return r.AmpFormControls;
101
+ } }), Object.defineProperty(e, "BannerChildControls", { enumerable: !0, get: function() {
102
+ return r.BannerChildControls;
103
+ } }), Object.defineProperty(e, "BannerControls", { enumerable: !0, get: function() {
104
+ return r.BannerControls;
105
+ } }), Object.defineProperty(e, "BuiltInControlTypes", { enumerable: !0, get: function() {
106
+ return r.BuiltInControlTypes;
107
+ } }), Object.defineProperty(e, "ButtonControls", { enumerable: !0, get: function() {
108
+ return r.ButtonControls;
109
+ } }), Object.defineProperty(e, "CarouselControls", { enumerable: !0, get: function() {
110
+ return r.CarouselControls;
111
+ } }), Object.defineProperty(e, "ContainerControls", { enumerable: !0, get: function() {
112
+ return r.ContainerControls;
113
+ } }), Object.defineProperty(e, "CustomImageControls", { enumerable: !0, get: function() {
114
+ return r.CustomImageControls;
115
+ } }), Object.defineProperty(e, "CustomLinkControls", { enumerable: !0, get: function() {
116
+ return r.CustomLinkControls;
117
+ } }), Object.defineProperty(e, "CustomTextControls", { enumerable: !0, get: function() {
118
+ return r.CustomTextControls;
119
+ } }), Object.defineProperty(e, "GeneralControls", { enumerable: !0, get: function() {
120
+ return r.GeneralControls;
121
+ } }), Object.defineProperty(e, "GeneralStylesControls", { enumerable: !0, get: function() {
122
+ return r.GeneralStylesControls;
123
+ } }), Object.defineProperty(e, "HTMLControls", { enumerable: !0, get: function() {
124
+ return r.HTMLControls;
125
+ } }), Object.defineProperty(e, "ImageControls", { enumerable: !0, get: function() {
126
+ return r.ImageControls;
127
+ } }), Object.defineProperty(e, "MenuControls", { enumerable: !0, get: function() {
128
+ return r.MenuControls;
129
+ } }), Object.defineProperty(e, "MessageSettingsControls", { enumerable: !0, get: function() {
130
+ return r.MessageSettingsControls;
131
+ } }), Object.defineProperty(e, "SocialControls", { enumerable: !0, get: function() {
132
+ return r.SocialControls;
133
+ } }), Object.defineProperty(e, "SpacerControls", { enumerable: !0, get: function() {
134
+ return r.SpacerControls;
135
+ } }), Object.defineProperty(e, "StripeControls", { enumerable: !0, get: function() {
136
+ return r.StripeControls;
137
+ } }), Object.defineProperty(e, "StructureControls", { enumerable: !0, get: function() {
138
+ return r.StructureControls;
139
+ } }), Object.defineProperty(e, "TextControls", { enumerable: !0, get: function() {
140
+ return r.TextControls;
141
+ } }), Object.defineProperty(e, "TimerControls", { enumerable: !0, get: function() {
142
+ return r.TimerControls;
143
+ } }), Object.defineProperty(e, "VideoControls", { enumerable: !0, get: function() {
144
+ return r.VideoControls;
145
+ } });
146
+ var _ = oe();
147
+ Object.defineProperty(e, "SettingsTab", { enumerable: !0, get: function() {
148
+ return _.SettingsTab;
149
+ } });
150
+ var g = ie();
151
+ Object.defineProperty(e, "UEAttr", { enumerable: !0, get: function() {
152
+ return g.UEAttr;
153
+ } });
154
+ var I = ue();
155
+ Object.defineProperty(e, "BlockType", { enumerable: !0, get: function() {
156
+ return I.BlockType;
157
+ } });
158
+ var y = le();
159
+ Object.defineProperty(e, "ContextActionType", { enumerable: !0, get: function() {
160
+ return y.ContextActionType;
161
+ } });
162
+ var P = ae();
163
+ Object.defineProperty(e, "BlockCompositionType", { enumerable: !0, get: function() {
164
+ return P.BlockCompositionType;
165
+ } });
166
+ var s = ce();
167
+ Object.defineProperty(e, "BlockAttr", { enumerable: !0, get: function() {
168
+ return s.BlockAttr;
169
+ } });
170
+ var T = Ce();
171
+ Object.defineProperty(e, "AiAssistantValueType", { enumerable: !0, get: function() {
172
+ return T.AiAssistantValueType;
173
+ } });
174
+ var q = me();
175
+ Object.defineProperty(e, "ADD_CUSTOM_FONT_OPTION", { enumerable: !0, get: function() {
176
+ return q.ADD_CUSTOM_FONT_OPTION;
177
+ } });
178
+ var O = Be();
179
+ Object.defineProperty(e, "BuiltInControl", { enumerable: !0, get: function() {
180
+ return O.BuiltInControl;
181
+ } });
182
+ var j = fe();
183
+ Object.defineProperty(e, "FontFamilyBuiltInControl", { enumerable: !0, get: function() {
184
+ return j.FontFamilyBuiltInControl;
185
+ } });
186
+ var S = de();
187
+ Object.defineProperty(e, "BackgroundColorBuiltInControl", { enumerable: !0, get: function() {
188
+ return S.BackgroundColorBuiltInControl;
189
+ } });
190
+ var v = be();
191
+ Object.defineProperty(e, "BlockPaddingsBuiltInControl", { enumerable: !0, get: function() {
192
+ return v.BlockPaddingsBuiltInControl;
193
+ } });
194
+ var k = _e();
195
+ Object.defineProperty(e, "BackgroundImageBuiltInControl", { enumerable: !0, get: function() {
196
+ return k.BackgroundImageBuiltInControl;
197
+ } });
198
+ var p = ge();
199
+ Object.defineProperty(e, "EditorStatePropertyType", { enumerable: !0, get: function() {
200
+ return p.EditorStatePropertyType;
201
+ } });
202
+ var A = Ie();
203
+ Object.defineProperty(e, "PreviewDeviceMode", { enumerable: !0, get: function() {
204
+ return A.PreviewDeviceMode;
205
+ } });
206
+ var E = ye();
207
+ Object.defineProperty(e, "StructurePaddingsBuiltInControl", { enumerable: !0, get: function() {
208
+ return E.StructurePaddingsBuiltInControl;
209
+ } });
210
+ var F = Pe();
211
+ Object.defineProperty(e, "TextColorBuiltInControl", { enumerable: !0, get: function() {
212
+ return F.TextColorBuiltInControl;
213
+ } });
214
+ var M = se();
215
+ Object.defineProperty(e, "ButtonFontColorBuiltInControl", { enumerable: !0, get: function() {
216
+ return M.ButtonFontColorBuiltInControl;
217
+ } });
218
+ var U = Te();
219
+ Object.defineProperty(e, "ButtonColorBuiltInControl", { enumerable: !0, get: function() {
220
+ return U.ButtonColorBuiltInControl;
221
+ } });
222
+ var D = qe();
223
+ Object.defineProperty(e, "ButtonInternalIndentsBuiltInControl", { enumerable: !0, get: function() {
224
+ return D.ButtonInternalIndentsBuiltInControl;
225
+ } });
226
+ var L = Oe();
227
+ Object.defineProperty(e, "StructureBorderBuiltInControl", { enumerable: !0, get: function() {
228
+ return L.StructureBorderBuiltInControl;
229
+ } });
230
+ var R = je();
231
+ Object.defineProperty(e, "TextSizeBuiltInControl", { enumerable: !0, get: function() {
232
+ return R.TextSizeBuiltInControl;
233
+ } });
234
+ var V = Se();
235
+ Object.defineProperty(e, "TextStyleBuiltInControl", { enumerable: !0, get: function() {
236
+ return V.TextStyleBuiltInControl;
237
+ } });
238
+ var G = ve();
239
+ Object.defineProperty(e, "LinkColorBuiltInControl", { enumerable: !0, get: function() {
240
+ return G.LinkColorBuiltInControl;
241
+ } });
242
+ var N = ke();
243
+ Object.defineProperty(e, "ButtonTextBuiltInControl", { enumerable: !0, get: function() {
244
+ return N.ButtonTextBuiltInControl;
245
+ } });
246
+ var w = pe();
247
+ Object.defineProperty(e, "ButtonBorderBuiltInControl", { enumerable: !0, get: function() {
248
+ return w.ButtonBorderBuiltInControl;
249
+ } });
250
+ var z = Ae();
251
+ Object.defineProperty(e, "TextLineSpacingBuiltInControl", { enumerable: !0, get: function() {
252
+ return z.TextLineSpacingBuiltInControl;
253
+ } });
254
+ var h = Ee();
255
+ Object.defineProperty(e, "BlocksPanel", { enumerable: !0, get: function() {
256
+ return h.BlocksPanel;
257
+ } });
258
+ var H = Fe();
259
+ Object.defineProperty(e, "PanelPosition", { enumerable: !0, get: function() {
260
+ return H.PanelPosition;
261
+ } });
262
+ }(t), t);
263
+ }
264
+ export {
265
+ Tr as __require
266
+ };
@@ -0,0 +1,26 @@
1
+ import { __exports as i } from "../../../../../_virtual/ModificationDescription.js";
2
+ var r;
3
+ function a() {
4
+ if (r) return i;
5
+ r = 1, Object.defineProperty(i, "__esModule", { value: !0 }), i.ModificationDescription = void 0;
6
+ var e = (
7
+ /** @class */
8
+ function() {
9
+ function t(o) {
10
+ this.key = o;
11
+ }
12
+ return t.prototype.withParams = function(o) {
13
+ return this.params = o, this;
14
+ }, t.prototype.getValue = function() {
15
+ return {
16
+ key: this.key,
17
+ params: this.params
18
+ };
19
+ }, t;
20
+ }()
21
+ );
22
+ return i.ModificationDescription = e, i;
23
+ }
24
+ export {
25
+ a as __require
26
+ };
@@ -0,0 +1,22 @@
1
+ import { __exports as t } from "../../../../../_virtual/UIElement.js";
2
+ var n;
3
+ function l() {
4
+ if (n) return t;
5
+ n = 1, Object.defineProperty(t, "__esModule", { value: !0 }), t.UIElement = void 0;
6
+ var r = (
7
+ /** @class */
8
+ function() {
9
+ function e() {
10
+ }
11
+ return e.prototype.onDestroy = function() {
12
+ }, e.prototype.getValue = function() {
13
+ }, e.prototype.setValue = function(o) {
14
+ }, e.prototype.onAttributeUpdated = function(o, u) {
15
+ }, e;
16
+ }()
17
+ );
18
+ return t.UIElement = r, t;
19
+ }
20
+ export {
21
+ l as __require
22
+ };
@@ -0,0 +1,18 @@
1
+ import { __exports as e } from "../../../../../_virtual/UIElementTagRegistry.js";
2
+ var r;
3
+ function g() {
4
+ if (r) return e;
5
+ r = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.UIElementTagRegistry = void 0;
6
+ var t = (
7
+ /** @class */
8
+ /* @__PURE__ */ function() {
9
+ function i() {
10
+ }
11
+ return i;
12
+ }()
13
+ );
14
+ return e.UIElementTagRegistry = t, e;
15
+ }
16
+ export {
17
+ g as __require
18
+ };
@@ -1,6 +1,6 @@
1
1
  export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
2
2
  isCodeEditorOpen: boolean;
3
3
  isVersionHistoryOpen: boolean;
4
+ isPreviewModeOpen: boolean;
4
5
  editorVisualMode: string;
5
- isSaveTemplateModalOpen: boolean;
6
6
  }, {}, {}>;
@@ -1,12 +1,12 @@
1
1
  import { defineStore as e } from "pinia";
2
- const t = e("editor", {
2
+ const i = e("editor", {
3
3
  state: () => ({
4
4
  isCodeEditorOpen: !1,
5
5
  isVersionHistoryOpen: !1,
6
- editorVisualMode: "desktop",
7
- isSaveTemplateModalOpen: !1
6
+ isPreviewModeOpen: !1,
7
+ editorVisualMode: "desktop"
8
8
  })
9
9
  });
10
10
  export {
11
- t as useEditorStore
11
+ i as useEditorStore
12
12
  };
@@ -0,0 +1,12 @@
1
+ import type { CompilerRule, CompilationResult, HtmlCompiler } from '@@/Types/html-compiler';
2
+ export declare class HtmlCompilerEngine implements HtmlCompiler {
3
+ private rules;
4
+ constructor(rules?: CompilerRule[]);
5
+ compile(html: string, rules?: CompilerRule[]): CompilationResult;
6
+ private applyRule;
7
+ private applyReplaceRule;
8
+ private applyRegexRule;
9
+ private applyRemoveRule;
10
+ private applyCustomRule;
11
+ }
12
+ export declare const createHtmlCompiler: (rules?: CompilerRule[]) => HtmlCompiler;
@@ -0,0 +1,70 @@
1
+ var y = Object.defineProperty;
2
+ var g = (p, e, r) => e in p ? y(p, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : p[e] = r;
3
+ var u = (p, e, r) => g(p, typeof e != "symbol" ? e + "" : e, r);
4
+ import { useToaster as m } from "../composables/useToaster.js";
5
+ class d {
6
+ constructor(e = []) {
7
+ u(this, "rules");
8
+ this.rules = e;
9
+ }
10
+ compile(e, r) {
11
+ const l = performance.now(), t = e, o = e.length;
12
+ let s = e;
13
+ const a = [];
14
+ (r || this.rules).sort((n, c) => n.priority - c.priority).forEach((n) => {
15
+ const c = s.length;
16
+ s = this.applyRule(s, n), s.length !== c && a.push(n.id);
17
+ });
18
+ const i = s.length, R = o > 0 ? (o - i) / o * 100 : 0;
19
+ return {
20
+ originalHtml: t,
21
+ compiledHtml: s,
22
+ appliedRules: a,
23
+ // TODO: We can use stats for monitoring in the future
24
+ stats: {
25
+ originalSize: o,
26
+ compiledSize: i,
27
+ reductionPercentage: R,
28
+ executionTime: performance.now() - l
29
+ }
30
+ };
31
+ }
32
+ applyRule(e, r) {
33
+ try {
34
+ switch (r.type) {
35
+ case "replace":
36
+ return this.applyReplaceRule(e, r);
37
+ case "regex":
38
+ return this.applyRegexRule(e, r);
39
+ case "remove":
40
+ return this.applyRemoveRule(e, r);
41
+ case "custom":
42
+ return this.applyCustomRule(e, r);
43
+ default:
44
+ return e;
45
+ }
46
+ } catch (l) {
47
+ const { handleError: t } = m();
48
+ return t(l, `Failed to apply rule ${r.id}:`), e;
49
+ }
50
+ }
51
+ applyReplaceRule(e, r) {
52
+ const { search: l, replacement: t, replaceAll: o = !0 } = r;
53
+ return o ? e.replaceAll(l, t) : e.replace(l, t);
54
+ }
55
+ applyRegexRule(e, r) {
56
+ const { pattern: l, replacement: t, flags: o = "g" } = r, s = new RegExp(l, o);
57
+ return e.replace(s, t);
58
+ }
59
+ applyRemoveRule(e, r) {
60
+ return r.targets.reduce((l, t) => t instanceof RegExp ? l.replace(t, "") : l.replaceAll(t, ""), e);
61
+ }
62
+ applyCustomRule(e, r) {
63
+ return r.processor(e);
64
+ }
65
+ }
66
+ const A = (p = []) => new d(p);
67
+ export {
68
+ d as HtmlCompilerEngine,
69
+ A as createHtmlCompiler
70
+ };
@@ -0,0 +1,2 @@
1
+ import type { TooltipOptions } from '../@types/generic';
2
+ export declare const getTooltipOptions: (id: string) => TooltipOptions;
@@ -0,0 +1,9 @@
1
+ const o = (t) => ({
2
+ id: t,
3
+ dynamicPosition: !0,
4
+ staticPosition: "top",
5
+ iconStatus: !1
6
+ });
7
+ export {
8
+ o as getTooltipOptions
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.0-beta.7f477db",
3
+ "version": "1.0.0-beta.80693fc",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -29,7 +29,10 @@
29
29
  "author": "",
30
30
  "license": "ISC",
31
31
  "dependencies": {
32
+ "@stripoinc/ui-editor-extensions": "^1.0.6",
32
33
  "@useinsider/design-system-vue": "0.14.8",
34
+ "@vuelidate/core": "2.0.3",
35
+ "@vuelidate/validators": "2.0.4",
33
36
  "lodash-es": "4.17.21",
34
37
  "pinia": "2.3.1",
35
38
  "vite": "6.3.5",
@@ -1,16 +0,0 @@
1
- interface Props {
2
- isOpen: boolean;
3
- }
4
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
5
- close: () => void;
6
- }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
7
- export default _default;
8
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
- type __VLS_TypePropsToOption<T> = {
10
- [K in keyof T]-?: {} extends Pick<T, K> ? {
11
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
- } : {
13
- type: import('vue').PropType<T[K]>;
14
- required: true;
15
- };
16
- };
@@ -1,20 +0,0 @@
1
- import s from "./SaveTemplateModal.vue2.js";
2
- import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var o = function() {
4
- var a = this, t = a._self._c, e = a._self._setupProxy;
5
- return t(e.ModalWrapper, { attrs: { "cancel-button-text": e.trans("products.cancel"), description: e.trans("newsletter.save-template-description"), "is-open": e.props.isOpen, "primary-button-loading": e.saveState.saving, "primary-button-text": e.trans(e.saveState.saving ? "newsletter.saving" : "products.save"), title: e.trans("products.save-template") }, on: { cancel: e.closeModal, close: e.closeModal, save: e.saveTemplate } }, [t(e.InBasicTextInput, { staticClass: "mb-5 w-1", attrs: { id: "template-name-input", name: "templateName", "character-counter-status": !1, "disabled-status": e.saveState.saving, "label-text": e.trans("products.template-name"), "placeholder-text": e.trans("newsletter.enter-template-name"), "state-message": e.getValidationMessage(), states: e.hasError() ? "error" : "", "tooltip-status": !1, value: e.templateName }, on: { input: e.templateNameInputHandler } }), t(e.InMultiSelect, { staticClass: "template-category-dropdown mb-5 w-1", attrs: { "create-option-status": "", "search-status": "", "button-status": !1, "character-limit-validation-text": e.trans("validation-v2.duration-value", {
6
- min: 1,
7
- max: e.templateCategorySearchInputLimit
8
- }), "create-button-label": e.trans("products.create-new-category"), "disabled-status": e.saveState.saving, "label-text": e.trans("products.template-category"), "loading-state": e.categoriesStore.loading || e.categoriesStore.loadingCreate, "max-character-limit": e.templateCategorySearchInputLimit, options: e.categoriesStore.mappedCategories, "placeholder-text": e.trans("products.select-template-category"), value: e.categoriesStore.selectedCategories }, on: { addOption: e.addOption, change: e.categoriesStore.setSelectedCategories, resetAllOptions: e.categoriesStore.setSelectedCategories, selectAllOptions: e.categoriesStore.setSelectedCategories } })], 1);
9
- }, n = [], l = /* @__PURE__ */ r(
10
- s,
11
- o,
12
- n,
13
- !1,
14
- null,
15
- null
16
- );
17
- const d = l.exports;
18
- export {
19
- d as default
20
- };
@@ -1,78 +0,0 @@
1
- import { defineComponent as b, ref as u, computed as A, watch as H } from "vue";
2
- import L from "../../wrappers/ModalWrapper.vue.js";
3
- import { useActionsApi as N } from "../../../composables/useActionsApi.js";
4
- import { useToaster as V } from "../../../composables/useToaster.js";
5
- import { useTranslations as j } from "../../../composables/useTranslations.js";
6
- import { useTemplateCategoriesStore as x } from "../../../stores/template-categories.js";
7
- import { InMultiSelect as B, InBasicTextInput as P } from "@useinsider/design-system-vue";
8
- import { useSaveAsTemplate as E } from "../../../composables/useSaveAsTemplate.js";
9
- import { useTemplateNameValidation as R } from "../../../composables/useTemplateNameValidation.js";
10
- const U = /* @__PURE__ */ b({
11
- __name: "SaveTemplateModal",
12
- props: {
13
- isOpen: { type: Boolean }
14
- },
15
- emits: ["close"],
16
- setup(S, { emit: p }) {
17
- const v = S, n = j(), { showToaster: c } = V(), { getRawTemplateData: f } = N(), a = x(), {
18
- state: t,
19
- saveTemplate: d
20
- } = E(), {
21
- templateName: s,
22
- getValidationMessage: I,
23
- hasError: w,
24
- validateInputs: g,
25
- resetValidation: i
26
- } = R(), l = u(!1), o = u(""), r = u(""), C = 40, y = A(() => t.saving || l.value || a.loading || a.loadingCreate), m = () => {
27
- s.value = "", o.value = "", r.value = "", a.resetSelection(), i();
28
- }, M = (e) => {
29
- s.value = e, i();
30
- }, T = () => {
31
- m(), p("close");
32
- }, _ = async () => {
33
- if (!y.value) {
34
- if (t.saving = !0, !await g()) {
35
- t.saving = !1;
36
- return;
37
- }
38
- try {
39
- await d({
40
- name: s.value,
41
- htmlContent: o.value,
42
- categoryIds: a.getSelectedCategoryIds,
43
- css: r.value
44
- }) && (t.saving = !1, c({
45
- message: n("journey-builder.template-saved-successfully", { name: s.value }),
46
- type: "success"
47
- }), T());
48
- } catch {
49
- t.saving = !1, c({
50
- message: n("journey-builder.template-save-error", { name: s.value }),
51
- type: "error"
52
- });
53
- }
54
- }
55
- }, h = async () => {
56
- l.value = !0;
57
- try {
58
- const { html: e, css: O } = await f();
59
- r.value = O || "", o.value = e || "";
60
- } catch {
61
- o.value = "", r.value = "";
62
- } finally {
63
- l.value = !1;
64
- }
65
- }, D = async (e) => {
66
- await a.createCategory(e);
67
- };
68
- return H(() => v.isOpen, async (e) => {
69
- e ? await Promise.all([
70
- h(),
71
- a.fetchCategories()
72
- ]) : m();
73
- }), { __sfc: !0, props: v, emit: p, trans: n, showToaster: c, getRawTemplateData: f, categoriesStore: a, saveState: t, saveTemplateToLibrary: d, templateName: s, getValidationMessage: I, hasError: w, validateInputs: g, resetValidation: i, isLoadingHtml: l, htmlData: o, cssData: r, templateCategorySearchInputLimit: C, isOperationInProgress: y, resetModalState: m, templateNameInputHandler: M, closeModal: T, saveTemplate: _, fetchHtmlData: h, addOption: D, ModalWrapper: L, InBasicTextInput: P, InMultiSelect: B };
74
- }
75
- });
76
- export {
77
- U as default
78
- };