@useinsider/guido 1.0.0-beta.3bcd23c → 1.0.0-beta.401ddbd

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 (148) hide show
  1. package/README.md +1 -6
  2. package/dist/@types/generic.d.ts +0 -4
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/components/Guido.vue.d.ts +2 -6
  5. package/dist/components/Guido.vue.js +1 -1
  6. package/dist/components/Guido.vue2.js +24 -35
  7. package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
  8. package/dist/components/organisms/header/LeftSlot.vue.js +8 -8
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +3 -5
  10. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  11. package/dist/components/organisms/header/MiddleSlot.vue2.js +4 -6
  12. package/dist/components/organisms/header/RightSlot.vue.js +7 -4
  13. package/dist/components/organisms/header/RightSlot.vue2.js +27 -14
  14. package/dist/components/organisms/header/SaveTemplateModal.vue.d.ts +21 -0
  15. package/dist/components/organisms/header/SaveTemplateModal.vue.js +21 -0
  16. package/dist/components/organisms/header/SaveTemplateModal.vue2.js +61 -0
  17. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  18. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
  19. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
  20. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +10 -13
  21. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  22. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  23. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  24. package/dist/composables/useActionsApi.d.ts +0 -1
  25. package/dist/composables/useActionsApi.js +12 -14
  26. package/dist/composables/useCustomInterfaceAppearance.js +9 -45
  27. package/dist/composables/useStripo.js +28 -44
  28. package/dist/composables/useTemplateValidation.d.ts +13 -0
  29. package/dist/composables/useTemplateValidation.js +57 -0
  30. package/dist/guido.css +1 -1
  31. package/dist/mock/api/template-library.d.ts +2 -0
  32. package/dist/static/editor.css.js +232 -0
  33. package/package.json +4 -5
  34. package/dist/_virtual/AddCustomFont.js +0 -4
  35. package/dist/_virtual/AiAssistantValueType.js +0 -4
  36. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  37. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  38. package/dist/_virtual/Block.js +0 -4
  39. package/dist/_virtual/BlockAttributes.js +0 -4
  40. package/dist/_virtual/BlockCompositionType.js +0 -4
  41. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  42. package/dist/_virtual/BlockRenderer.js +0 -4
  43. package/dist/_virtual/BlockType.js +0 -4
  44. package/dist/_virtual/BlocksPanel.js +0 -4
  45. package/dist/_virtual/BuiltInControl.js +0 -4
  46. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  47. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  48. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  49. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  50. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  51. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  52. package/dist/_virtual/ContextAction.js +0 -4
  53. package/dist/_virtual/ContextActionType.js +0 -4
  54. package/dist/_virtual/Control.js +0 -4
  55. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  56. package/dist/_virtual/Extension.js +0 -4
  57. package/dist/_virtual/ExtensionBuilder.js +0 -4
  58. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  59. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  60. package/dist/_virtual/ModificationDescription.js +0 -4
  61. package/dist/_virtual/PanelPosition.js +0 -4
  62. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  63. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  64. package/dist/_virtual/SettingsPanelTab.js +0 -4
  65. package/dist/_virtual/SettingsTab.js +0 -4
  66. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  67. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  68. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  69. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  70. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  71. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  72. package/dist/_virtual/UIElement.js +0 -4
  73. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  74. package/dist/_virtual/UIElementType.js +0 -4
  75. package/dist/_virtual/UIElementsAttributes.js +0 -4
  76. package/dist/_virtual/index.js +0 -5
  77. package/dist/_virtual/index2.js +0 -4
  78. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
  79. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
  80. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
  81. package/dist/enums/displayConditions.d.ts +0 -2
  82. package/dist/enums/displayConditions.js +0 -80
  83. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
  84. package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
  85. package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
  86. package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
  87. package/dist/extensions/DynamicContent/dynamic-content.js +0 -63
  88. package/dist/extensions/DynamicContent/extension.d.ts +0 -2
  89. package/dist/extensions/DynamicContent/extension.js +0 -11
  90. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  96. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  97. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  130. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  131. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  132. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  133. package/dist/static/styles/base.css.js +0 -11
  134. package/dist/static/styles/components/alert-message.css.js +0 -39
  135. package/dist/static/styles/components/amp-block.css.js +0 -18
  136. package/dist/static/styles/components/base-input.css.js +0 -47
  137. package/dist/static/styles/components/button-group.css.js +0 -54
  138. package/dist/static/styles/components/button.css.js +0 -106
  139. package/dist/static/styles/components/combobox.css.js +0 -49
  140. package/dist/static/styles/components/counter.css.js +0 -42
  141. package/dist/static/styles/components/dropdown-menu.css.js +0 -52
  142. package/dist/static/styles/components/narrow-panel.css.js +0 -38
  143. package/dist/static/styles/components/switcher.css.js +0 -11
  144. package/dist/static/styles/components/tabs.css.js +0 -97
  145. package/dist/static/styles/components/tools.css.js +0 -23
  146. package/dist/static/styles/components/version-history.css.js +0 -30
  147. package/dist/static/styles/components/wide-panel.css.js +0 -135
  148. package/dist/static/styles/variables.css.js +0 -23
@@ -1,4 +0,0 @@
1
- var o = {};
2
- export {
3
- o as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var i = {};
2
- export {
3
- i as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var o = {};
2
- export {
3
- o as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var a = {};
2
- export {
3
- a as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var t = {};
2
- export {
3
- t as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var o = {};
2
- export {
3
- o as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var t = {};
2
- export {
3
- t as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var t = {};
2
- export {
3
- t as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var t = {};
2
- export {
3
- t as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var t = {};
2
- export {
3
- t as __exports
4
- };
@@ -1,5 +0,0 @@
1
- import { __require as r } from "../node_modules/@stripoinc/ui-editor-extensions/dist/index.js";
2
- var i = r();
3
- export {
4
- i as d
5
- };
@@ -1,4 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
@@ -1,19 +0,0 @@
1
- import n from "./RestoreButton.vue2.js";
2
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var s = function() {
4
- var e = this, r = e._self._c, t = e._self._setupProxy;
5
- return r(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore", type: "subtle-primary" }, on: { click: function(a) {
6
- return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
7
- } } });
8
- }, _ = [], i = /* @__PURE__ */ o(
9
- n,
10
- s,
11
- _,
12
- !1,
13
- null,
14
- null
15
- );
16
- const f = i.exports;
17
- export {
18
- f as default
19
- };
@@ -1,14 +0,0 @@
1
- import { defineComponent as t } from "vue";
2
- import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
3
- import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
4
- import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
- const _ = /* @__PURE__ */ t({
6
- __name: "RestoreButton",
7
- setup(i) {
8
- const { restoreVersion: o } = e(), r = s();
9
- return { __sfc: !0, restoreVersion: o, versionHistoryStore: r, InButtonV2: n };
10
- }
11
- });
12
- export {
13
- _ as default
14
- };
@@ -1,2 +0,0 @@
1
- import type { ConditionCategories } from '@@/Types/condition-categories';
2
- export declare const displayConditions: ConditionCategories;
@@ -1,80 +0,0 @@
1
- const e = [
2
- {
3
- category: "Demographics",
4
- conditions: [
5
- {
6
- id: 1,
7
- name: "Language",
8
- description: "Users who are in the English will see the banner",
9
- beforeScript: '{% if language == "en_US" %}',
10
- afterScript: "{% endif %}"
11
- },
12
- {
13
- id: 2,
14
- name: "Country",
15
- description: "Only people who live in Australia will see the banner",
16
- beforeScript: '{% if country == "Australia" %}',
17
- afterScript: "{% endif %}"
18
- },
19
- {
20
- id: 3,
21
- name: "Country & City",
22
- description: "Only people who are located in that country and city",
23
- beforeScript: '{% if country == "United Kingdom" and city == "London" %}',
24
- afterScript: "{% endif %}"
25
- },
26
- {
27
- id: 4,
28
- name: "Age (Less than operator)",
29
- description: "Users whose age is less than 18",
30
- beforeScript: "{% if age < 18 %}",
31
- afterScript: "{% endif %}"
32
- },
33
- {
34
- id: 5,
35
- name: "Age (Equal and greater than operator)",
36
- description: "Users whose age is equal or greater than 25",
37
- beforeScript: "{% if age >= 25 %}",
38
- afterScript: "{% endif %}"
39
- },
40
- {
41
- id: 6,
42
- name: "Age (Greater than & less than operators)",
43
- description: "Users whose age is between 18 and 25",
44
- beforeScript: "{% if age > 18 and age < 25 %}",
45
- afterScript: "{% endif %}"
46
- },
47
- {
48
- id: 7,
49
- name: "Gender",
50
- description: "Users whose gender is Female",
51
- beforeScript: '{% if gender == "Female" %}',
52
- afterScript: "{% endif %}"
53
- },
54
- {
55
- id: 8,
56
- name: "State",
57
- description: "Users whose state is one of the followings. c_state is a custom attribute. Use this condition if you have the attribute with the same naming. ",
58
- beforeScript: '{% if c_state == "VIC" or c_state == "NSW" or c_state == "QLD" %}',
59
- afterScript: "{% endif %}"
60
- },
61
- {
62
- id: 9,
63
- name: "VIP User",
64
- description: "Users who are VIP users for that brand. c_is_vip_user = true. c_is_vip_user is a custom attribute. Use this condition if you have the attribute with the same naming.",
65
- beforeScript: "{% if c_is_vip_user %}",
66
- afterScript: "{% endif %}"
67
- },
68
- {
69
- id: 10,
70
- name: "Membership Type",
71
- description: "Users who belong to gold or silver membership type. c_is_gold_member = true, c_is_silver_member = true. These are custom attributes. Use this condition if you have the attribute with the same naming.",
72
- beforeScript: "{% if c_is_gold_member or c_is_silver_member %}",
73
- afterScript: "{% endif %}"
74
- }
75
- ]
76
- }
77
- ];
78
- export {
79
- e as displayConditions
80
- };
@@ -1,6 +0,0 @@
1
- import type { DynamicContent } from '@@/Types/generic';
2
- export declare class ExternalMergeTagsLibrary {
3
- selectedDynamicContent: DynamicContent | null;
4
- dataSelectCallback: (data: DynamicContent) => void;
5
- openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void): void;
6
- }
@@ -1,27 +0,0 @@
1
- var i = Object.defineProperty;
2
- var d = (e, t, n) => t in e ? i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var a = (e, t, n) => d(e, typeof t != "symbol" ? t + "" : t, n);
4
- class u {
5
- constructor() {
6
- a(this, "selectedDynamicContent", null);
7
- a(this, "dataSelectCallback", () => {
8
- });
9
- }
10
- openMergeTagsLibrary(t, n) {
11
- this.dataSelectCallback = n, this.selectedDynamicContent = t;
12
- const o = new CustomEvent("dynamic-content:open", {
13
- detail: {
14
- attribute: t
15
- }
16
- });
17
- document.dispatchEvent(o);
18
- const l = (s) => {
19
- const c = s.detail;
20
- this.selectedDynamicContent = c || null, c && this.dataSelectCallback(c), document.removeEventListener("dynamic-content:close", l);
21
- };
22
- document.addEventListener("dynamic-content:close", l);
23
- }
24
- }
25
- export {
26
- u as ExternalMergeTagsLibrary
27
- };
@@ -1,24 +0,0 @@
1
- const n = `
2
- #guido__btn-add-dynamic-content {
3
- background-color: transparent;
4
- }
5
-
6
- #guido__btn-add-dynamic-content > button {
7
- color: var(--guido-color-primary-500);
8
- background-color: transparent;
9
- box-shadow: none;
10
- padding: 0;
11
- border: none;
12
- }
13
-
14
- #guido__btn-add-dynamic-content > button:hover {
15
- text-decoration: underline;
16
- }
17
-
18
- .color-primary {
19
- color: var(--guido-color-primary-500) !important;
20
- }
21
- `;
22
- export {
23
- n as default
24
- };
@@ -1,16 +0,0 @@
1
- import { UIElementType, UIElement, UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
2
- export declare class DynamicContentTagRegistry extends UIElementTagRegistry {
3
- registerUiElements(uiElementsTagsMap: Record<UIElementType, string>): void;
4
- }
5
- export declare class DynamicContentUiElementExtension extends UIElement {
6
- private mergeTagsButton;
7
- private listener;
8
- private mergeTagsLibrary;
9
- private selectedDynamicContent;
10
- getId(): string;
11
- onRender(container: HTMLElement): void;
12
- onDestroy(): void;
13
- _onClick(): void;
14
- openMergeTagLibrary(): void;
15
- getTemplate(): string;
16
- }
@@ -1,63 +0,0 @@
1
- var l = Object.defineProperty;
2
- var o = (i, t, e) => t in i ? l(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var r = (i, t, e) => o(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { d as n } from "../../_virtual/index.js";
5
- import { ExternalMergeTagsLibrary as m } from "./dynamic-content-modal.js";
6
- const a = "external-dynamic-content-ui-element", g = "button-add-dynamic-content";
7
- class y extends n.UIElementTagRegistry {
8
- registerUiElements(t) {
9
- t[n.UIElementType.MERGETAGS] = a;
10
- }
11
- }
12
- class E extends n.UIElement {
13
- constructor() {
14
- super(...arguments);
15
- r(this, "mergeTagsButton", null);
16
- r(this, "listener", () => {
17
- });
18
- r(this, "mergeTagsLibrary", null);
19
- r(this, "selectedDynamicContent", { value: "", text: "" });
20
- }
21
- getId() {
22
- return a;
23
- }
24
- onRender(e) {
25
- var s;
26
- this.listener = this._onClick.bind(this), this.mergeTagsButton = e.querySelector("#guido__btn-add-dynamic-content"), (s = this.mergeTagsButton) == null || s.addEventListener("click", this.listener);
27
- }
28
- onDestroy() {
29
- var e;
30
- (e = this.mergeTagsButton) == null || e.removeEventListener("click", this.listener);
31
- }
32
- _onClick() {
33
- this.openMergeTagLibrary();
34
- }
35
- openMergeTagLibrary() {
36
- this.mergeTagsLibrary || (this.mergeTagsLibrary = new m()), this.mergeTagsLibrary.openMergeTagsLibrary(
37
- this.selectedDynamicContent,
38
- (e) => {
39
- this.api.onValueChanged({
40
- label: e.text,
41
- value: e.value
42
- });
43
- }
44
- );
45
- }
46
- getTemplate() {
47
- return `
48
- <div>
49
- <${n.UIElementType.BUTTON}
50
- id="guido__btn-add-dynamic-content"
51
- class="btn btn-primary"
52
- ${n.UEAttr.BUTTON.name}="${g}">
53
- <${n.UIElementType.ICON} src="plus" class="icon icon-button color-primary">
54
- </${n.UIElementType.ICON}>
55
- ${this.api.translate("Add Dynamic Content")}
56
- </${n.UIElementType.BUTTON}>
57
- </div>`;
58
- }
59
- }
60
- export {
61
- y as DynamicContentTagRegistry,
62
- E as DynamicContentUiElementExtension
63
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("@stripoinc/ui-editor-extensions").Extension;
2
- export default _default;
@@ -1,11 +0,0 @@
1
- import { d as t } from "../../_virtual/index.js";
2
- import { DynamicContentUiElementExtension as n, DynamicContentTagRegistry as i } from "./dynamic-content.js";
3
- import e from "./dynamic-content.css.js";
4
- const s = new t.ExtensionBuilder().addUiElement(n).withStyles(e).withLocalization({
5
- en: {
6
- "Add Dynamic Content": "Add Dynamic Content"
7
- }
8
- }).withUiElementTagRegistry(i).build();
9
- export {
10
- s as default
11
- };
@@ -1,51 +0,0 @@
1
- import { __exports as e } from "../../../../_virtual/Extension.js";
2
- var o;
3
- function m() {
4
- if (o) return e;
5
- o = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.Extension = void 0;
6
- var a = (
7
- /** @class */
8
- function() {
9
- function t(u, l, i, y, n, p, r, s, h, g, c, f, x, E, d) {
10
- i === void 0 && (i = []), n === void 0 && (n = []), r === void 0 && (r = []), s === void 0 && (s = []), this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = u, this.styles = l, this.previewStyles = c, this.uiElements = i, this.uiElementTagRegistry = y, this.controls = n, this.settingsPanelRegistry = p, this.contextActions = r, this.blocks = s, this.externalSmartElementsLibrary = h, this.externalImageLibrary = g, this.externalAiAssistant = f, this.externalDisplayConditionsLibrary = x, this.externalVideoLibrary = E, this.blocksPanel = d, this.id = Math.random().toString(36).substring(2);
11
- }
12
- return t.prototype.getI18n = function() {
13
- return this.i18n;
14
- }, t.prototype.getStyles = function() {
15
- return this.styles;
16
- }, t.prototype.getPreviewStyles = function() {
17
- return this.previewStyles;
18
- }, t.prototype.getUiElements = function() {
19
- return this.uiElements;
20
- }, t.prototype.getUiElementTagRegistry = function() {
21
- return this.uiElementTagRegistry;
22
- }, t.prototype.getControls = function() {
23
- return this.controls;
24
- }, t.prototype.getSettingsPanelRegistry = function() {
25
- return this.settingsPanelRegistry;
26
- }, t.prototype.getContextActions = function() {
27
- return this.contextActions;
28
- }, t.prototype.getBlocks = function() {
29
- return this.blocks;
30
- }, t.prototype.getId = function() {
31
- return this.id;
32
- }, t.prototype.getExternalSmartElementsLibrary = function() {
33
- return this.externalSmartElementsLibrary;
34
- }, t.prototype.getExternalImageLibrary = function() {
35
- return this.externalImageLibrary;
36
- }, t.prototype.getExternalAiAssistant = function() {
37
- return this.externalAiAssistant;
38
- }, t.prototype.getExternalDisplayConditionsLibrary = function() {
39
- return this.externalDisplayConditionsLibrary;
40
- }, t.prototype.getExternalVideoLibrary = function() {
41
- return this.externalVideoLibrary;
42
- }, t.prototype.getBlocksPanel = function() {
43
- return this.blocksPanel;
44
- }, t;
45
- }()
46
- );
47
- return e.Extension = a, e;
48
- }
49
- export {
50
- m as __require
51
- };
@@ -1,52 +0,0 @@
1
- import { __exports as e } from "../../../../_virtual/ExtensionBuilder.js";
2
- import { __require as o } from "./Extension.js";
3
- var n;
4
- function l() {
5
- if (n) return e;
6
- n = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.ExtensionBuilder = void 0;
7
- var r = o(), s = (
8
- /** @class */
9
- function() {
10
- function i() {
11
- this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
12
- }
13
- return i.prototype.withLocalization = function(t) {
14
- return this.i18n = t, this;
15
- }, i.prototype.withStyles = function(t) {
16
- return this.styles = t, this;
17
- }, i.prototype.withPreviewStyles = function(t) {
18
- return this.previewStyles = t, this;
19
- }, i.prototype.addContextAction = function(t) {
20
- return this.contextActions.push(t), this;
21
- }, i.prototype.addUiElement = function(t) {
22
- return this.uiElements.push(t), this;
23
- }, i.prototype.withUiElementTagRegistry = function(t) {
24
- return this.uiElementTagRegistry = t, this;
25
- }, i.prototype.addControl = function(t) {
26
- return this.controls.push(t), this;
27
- }, i.prototype.withSettingsPanelRegistry = function(t) {
28
- return this.settingsPanelRegistry = t, this;
29
- }, i.prototype.withExternalSmartElementsLibrary = function(t) {
30
- return this.externalSmartElementsLibrary = t, this;
31
- }, i.prototype.withExternalImageLibrary = function(t) {
32
- return this.externalImageLibrary = t, this;
33
- }, i.prototype.withExternalAiAssistant = function(t) {
34
- return this.externalAiAssistant = t, this;
35
- }, i.prototype.withExternalDisplayCondition = function(t) {
36
- return this.externalDisplayConditionsLibrary = t, this;
37
- }, i.prototype.withExternalVideosLibrary = function(t) {
38
- return this.externalVideoLibrary = t, this;
39
- }, i.prototype.withBlocksPanel = function(t) {
40
- return this.blocksPanel = t, this;
41
- }, i.prototype.addBlock = function(t) {
42
- return this.blocks.push(t), this;
43
- }, i.prototype.build = function() {
44
- return new r.Extension(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);
45
- }, i;
46
- }()
47
- );
48
- return e.ExtensionBuilder = s, e;
49
- }
50
- export {
51
- l as __require
52
- };
@@ -1,41 +0,0 @@
1
- import { __exports as o } from "../../../../../_virtual/Block.js";
2
- import { __require as i } from "../constants/BlockCompositionType.js";
3
- var n;
4
- function f() {
5
- if (n) return o;
6
- n = 1, Object.defineProperty(o, "__esModule", { value: !0 }), o.Block = void 0;
7
- var r = i(), u = (
8
- /** @class */
9
- function() {
10
- function e() {
11
- }
12
- return e.prototype.isEnabled = function() {
13
- return !0;
14
- }, e.prototype.canBeSavedAsModule = function() {
15
- return !1;
16
- }, e.prototype.getContextActionsIds = function() {
17
- }, e.prototype.getCustomRenderer = function() {
18
- }, e.prototype.getUniqueBlockClassname = function() {
19
- return "esd-".concat(this.getId());
20
- }, e.prototype.onDocumentInit = function() {
21
- }, e.prototype.onSelect = function(t) {
22
- }, e.prototype.onCopy = function(t, p) {
23
- }, e.prototype.onDelete = function(t) {
24
- }, e.prototype.onCreated = function(t) {
25
- }, e.prototype.onDocumentChanged = function() {
26
- }, e.prototype.getBlockCompositionType = function() {
27
- return r.BlockCompositionType.BLOCK;
28
- }, e.prototype.shouldDisplayQuickAddIcon = function() {
29
- return !1;
30
- }, e.prototype.allowInnerBlocksSelection = function() {
31
- return !0;
32
- }, e.prototype.allowInnerBlocksDND = function() {
33
- return !0;
34
- }, e;
35
- }()
36
- );
37
- return o.Block = u, o;
38
- }
39
- export {
40
- f as __require
41
- };
@@ -1,18 +0,0 @@
1
- import { __exports as e } from "../../../../../_virtual/BlockRenderer.js";
2
- var r;
3
- function u() {
4
- if (r) return e;
5
- r = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.BlockRenderer = void 0;
6
- var n = (
7
- /** @class */
8
- /* @__PURE__ */ function() {
9
- function o() {
10
- }
11
- return o;
12
- }()
13
- );
14
- return e.BlockRenderer = n, e;
15
- }
16
- export {
17
- u as __require
18
- };
@@ -1,32 +0,0 @@
1
- import { __exports as t } from "../../../../../_virtual/BlocksPanel.js";
2
- var o;
3
- function l() {
4
- if (o) return t;
5
- o = 1, Object.defineProperty(t, "__esModule", { value: !0 }), t.BlocksPanel = void 0;
6
- var r = (
7
- /** @class */
8
- function() {
9
- function e() {
10
- }
11
- return e.prototype.getBlockItemHtml = function(n) {
12
- }, e.prototype.isBlockHintVisible = function(n) {
13
- return !0;
14
- }, e.prototype.getBlockHint = function(n) {
15
- return {
16
- title: n.title,
17
- description: n.description
18
- };
19
- }, e.prototype.getBlocksPanelHeaderHtml = function() {
20
- }, e.prototype.getModulesPanelCollapsedHtml = function() {
21
- }, e.prototype.isModulesPanelCollapsedHintVisible = function() {
22
- return !0;
23
- }, e.prototype.getHintDelay = function() {
24
- }, e.prototype.getModulesPanelHint = function() {
25
- }, e;
26
- }()
27
- );
28
- return t.BlocksPanel = r, t;
29
- }
30
- export {
31
- l as __require
32
- };
@@ -1,18 +0,0 @@
1
- import { __exports as t } from "../../../../../_virtual/ContextAction.js";
2
- var e;
3
- function i() {
4
- if (e) return t;
5
- e = 1, Object.defineProperty(t, "__esModule", { value: !0 }), t.ContextAction = void 0;
6
- var n = (
7
- /** @class */
8
- /* @__PURE__ */ function() {
9
- function o() {
10
- }
11
- return o;
12
- }()
13
- );
14
- return t.ContextAction = n, t;
15
- }
16
- export {
17
- i as __require
18
- };
@@ -1,8 +0,0 @@
1
- import { __exports as e } from "../../../../../_virtual/AddCustomFont.js";
2
- var r;
3
- function _() {
4
- return r ? e : (r = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.ADD_CUSTOM_FONT_OPTION = void 0, e.ADD_CUSTOM_FONT_OPTION = "ADD_CUSTOM_FONT_OPTION", e);
5
- }
6
- export {
7
- _ as __require
8
- };
@@ -1,13 +0,0 @@
1
- import { __exports as e } from "../../../../../_virtual/AiAssistantValueType.js";
2
- var i;
3
- function a() {
4
- if (i) return e;
5
- i = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.AiAssistantValueType = void 0;
6
- var r;
7
- return function(t) {
8
- t.SUBJECT = "subject", t.HIDDEN_PREHEADER = "hiddenPreheader", t.TEXT_BLOCK = "textBlock";
9
- }(r || (e.AiAssistantValueType = r = {})), e;
10
- }
11
- export {
12
- a as __require
13
- };