@useinsider/guido 3.2.0-beta.565bfaf → 3.2.0-beta.570fb6d
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/config/schemas.js +1 -1
- package/dist/@types/config/validator.js +27 -34
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +76 -81
- package/dist/components/organisms/base/Toaster.vue2.js +10 -11
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +9 -15
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +31 -40
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +19 -20
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +11 -14
- package/dist/components/organisms/header/EditorActions.vue.js +11 -12
- package/dist/components/organisms/header/EditorActions.vue2.js +18 -22
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +12 -15
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -19
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -11
- package/dist/components/organisms/header/RightSlot.vue2.js +14 -17
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +20 -22
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +38 -41
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +38 -43
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +18 -21
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +27 -31
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +27 -29
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +19 -21
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +8 -9
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +9 -10
- package/dist/composables/useActionsApi.js +37 -38
- package/dist/composables/useBlocksConfig.js +26 -26
- package/dist/composables/useFullStoryBridge.js +13 -0
- package/dist/composables/useHtmlCompiler.js +34 -26
- package/dist/composables/useHtmlValidator.js +101 -109
- package/dist/composables/useHttp.js +30 -30
- package/dist/composables/usePartner.js +1 -1
- package/dist/composables/useRecommendation.js +14 -15
- package/dist/composables/useSave.js +21 -22
- package/dist/composables/useStripo.js +47 -42
- package/dist/composables/useSyncModuleExtractor.js +31 -29
- package/dist/composables/useTimerClone.js +24 -25
- package/dist/composables/useTranslations.js +23 -16
- package/dist/composables/useValidation.js +7 -8
- package/dist/composables/validators/useLiquidValidator.js +13 -13
- package/dist/config/compiler/recommendationCompilerRules.js +72 -67
- package/dist/config/compiler/unsubscribeCompilerRules.js +38 -37
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +36 -34
- package/dist/config/migrator/checkboxMigrator.js +20 -21
- package/dist/config/migrator/couponBlockMigrator.js +18 -19
- package/dist/config/migrator/itemsBlockMigrator.js +87 -89
- package/dist/config/migrator/radioButtonMigrator.js +12 -13
- package/dist/config/migrator/recommendationMigrator.js +107 -110
- package/dist/config/migrator/unsubscribeMigrator.js +10 -11
- package/dist/enums/displayConditions.js +78 -82
- package/dist/enums/extensions/recommendationBlock.js +41 -95
- package/dist/enums/unsubscribe.js +35 -30
- package/dist/extensions/Blocks/Checkbox/control.js +23 -23
- package/dist/extensions/Blocks/Items/block.js +9 -9
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +89 -97
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +23 -24
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +13 -14
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +44 -47
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +38 -40
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +155 -162
- package/dist/extensions/Blocks/Items/enums/productEnums.js +21 -14
- package/dist/extensions/Blocks/Items/template.js +210 -210
- package/dist/extensions/Blocks/RadioButton/control.js +15 -15
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +128 -133
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +23 -20
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +19 -20
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +4 -6
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +84 -90
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
- package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +35 -36
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +134 -135
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +18 -20
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -32
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +25 -32
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +72 -69
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +22 -23
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +24 -25
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +45 -47
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +13 -16
- package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
- package/dist/extensions/Blocks/Unsubscribe/control.js +11 -13
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +16 -18
- package/dist/extensions/Blocks/common-control.js +25 -26
- package/dist/extensions/DynamicContent/dynamic-content.js +53 -58
- package/dist/guido.css +1 -1
- package/dist/library.js +11 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +272 -167
- package/dist/node_modules/valibot/dist/index.js +122 -126
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +14 -17
- package/dist/services/templateLibraryApi.js +37 -38
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
- package/dist/src/composables/useHtmlCompiler.d.ts +1 -2
- package/dist/src/composables/useTranslations.d.ts +1 -1
- package/dist/src/enums/displayConditions.d.ts +1 -5
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
- package/dist/src/enums/unsubscribe.d.ts +8 -8
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/static/styles/components/button.css.js +16 -9
- package/dist/static/styles/components/loader.css.js +4 -0
- package/dist/static/styles/components/narrow-panel.css.js +52 -0
- package/dist/stores/config.js +25 -81
- package/dist/stores/dynamic-content.js +6 -11
- package/dist/stores/onboarding.js +5 -5
- package/dist/stores/preview.js +6 -9
- package/dist/stores/unsubscribe.js +1 -4
- package/dist/utils/dateUtil.js +7 -10
- package/dist/utils/genericUtil.js +10 -13
- package/dist/utils/pairProductVariables.js +13 -14
- package/package.json +8 -5
- package/dist/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/lodash-es/_Hash.js +0 -20
- package/dist/node_modules/lodash-es/_ListCache.js +0 -20
- package/dist/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/lodash-es/_MapCache.js +0 -20
- package/dist/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/lodash-es/_SetCache.js +0 -13
- package/dist/node_modules/lodash-es/_Stack.js +0 -18
- package/dist/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -20
- package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
- package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
- package/dist/node_modules/lodash-es/_arraySome.js +0 -9
- package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -10
- package/dist/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/lodash-es/_baseGet.js +0 -11
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
- package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
- package/dist/node_modules/lodash-es/_baseIsNative.js +0 -16
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
- package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
- package/dist/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/lodash-es/_baseRange.js +0 -9
- package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
- package/dist/node_modules/lodash-es/_baseToString.js +0 -18
- package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
- package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
- package/dist/node_modules/lodash-es/_createRange.js +0 -11
- package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
- package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
- package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
- package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
- package/dist/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
- package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/lodash-es/_getTag.js +0 -28
- package/dist/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/lodash-es/_hasPath.js +0 -19
- package/dist/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
- package/dist/node_modules/lodash-es/_isKey.js +0 -12
- package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
- package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
- package/dist/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/lodash-es/_stackSet.js +0 -17
- package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/lodash-es/_toSource.js +0 -17
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/lodash-es/flatMap.js +0 -8
- package/dist/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/lodash-es/isFunction.js +0 -12
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/lodash-es/map.js +0 -11
- package/dist/node_modules/lodash-es/memoize.js +0 -18
- package/dist/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/lodash-es/range.js +0 -5
- package/dist/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/lodash-es/toFinite.js +0 -14
- package/dist/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/node_modules/lodash-es/toString.js +0 -7
|
@@ -11,7 +11,7 @@ var B = class d {
|
|
|
11
11
|
if (i && i.length > 0)
|
|
12
12
|
throw new Error(
|
|
13
13
|
`${n.name} has validation errors:
|
|
14
|
-
${i.map((
|
|
14
|
+
${i.map((E) => ` - ${E}`).join(`
|
|
15
15
|
`)}`
|
|
16
16
|
);
|
|
17
17
|
}
|
|
@@ -21,22 +21,28 @@ ${i.map((o) => ` - ${o}`).join(`
|
|
|
21
21
|
* This validation runs only once per class type and results are cached.
|
|
22
22
|
*/
|
|
23
23
|
validateImplementation(t, n) {
|
|
24
|
-
|
|
25
|
-
const i = [], o = n.name, Y = Object.getPrototypeOf(this);
|
|
24
|
+
const i = [], E = n.name, Y = Object.getPrototypeOf(this);
|
|
26
25
|
t.forEach((u) => {
|
|
27
26
|
if (typeof this[u] != "function") {
|
|
28
27
|
i.push(`Method ${u}() is not defined`);
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
30
|
Y[u] === n.prototype[u] && i.push(`Method ${u}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
|
-
}), d.validatedClasses.add(n), i.length > 0 ? (d.validationErrors.set(n, i), console.error(`[${
|
|
31
|
+
}), d.validatedClasses.add(n), i.length > 0 ? (d.validationErrors.set(n, i), console.error(`[${E} Validation] ${E} validation failed:`, i)) : typeof process < "u" && process.env?.NODE_ENV === "development" && console.log(`[${E} Validation] ✅ ${E} validated successfully`);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Lifecycle method for cleaning up resources (e.g., removing DOM artifacts from document.body).
|
|
35
|
+
* Override this method in subclasses to implement custom cleanup logic.
|
|
36
|
+
* Called when the editor is reinitialized or the extension is uninstalled.
|
|
37
|
+
*/
|
|
38
|
+
destroy() {
|
|
33
39
|
}
|
|
34
40
|
};
|
|
35
41
|
B.validatedClasses = /* @__PURE__ */ new Set();
|
|
36
42
|
B.validationErrors = /* @__PURE__ */ new Map();
|
|
37
|
-
var
|
|
43
|
+
var a = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))($ || {}), v = class T extends a {
|
|
38
44
|
constructor() {
|
|
39
|
-
super(
|
|
45
|
+
super(T.REQUIRED_METHODS, T);
|
|
40
46
|
}
|
|
41
47
|
/**
|
|
42
48
|
* Determines if the block should be available for use in the editor.
|
|
@@ -133,6 +139,14 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
133
139
|
shouldDisplayQuickAddIcon() {
|
|
134
140
|
return !1;
|
|
135
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Determines if the block should be shown in the blocks panel.
|
|
144
|
+
* Override to hide the block from the blocks panel while keeping it available elsewhere.
|
|
145
|
+
* @returns True if the block should appear in the blocks panel. Defaults to true.
|
|
146
|
+
*/
|
|
147
|
+
shouldDisplayInBlocksPanel() {
|
|
148
|
+
return !0;
|
|
149
|
+
}
|
|
136
150
|
/**
|
|
137
151
|
* @description Determines if nested blocks selection allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
138
152
|
*/
|
|
@@ -161,6 +175,14 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
161
175
|
getTemplate() {
|
|
162
176
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
163
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Gets a CSS template string that contains the custom styles that apply to the block.
|
|
180
|
+
* This CSS will be used when a block is dragged into the editor and removed when the last block is deleted.
|
|
181
|
+
* @returns An CSS string.
|
|
182
|
+
*/
|
|
183
|
+
getTemplateStyles() {
|
|
184
|
+
return "";
|
|
185
|
+
}
|
|
164
186
|
/**
|
|
165
187
|
* Gets the URL or path to the icon representing this block in the editor's block panel.
|
|
166
188
|
* @returns A string representing the icon source (e.g., URL, data URI).
|
|
@@ -196,9 +218,9 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
196
218
|
}
|
|
197
219
|
};
|
|
198
220
|
v.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
199
|
-
var
|
|
221
|
+
var Ye = v, W = class I extends a {
|
|
200
222
|
constructor() {
|
|
201
|
-
super(
|
|
223
|
+
super(I.REQUIRED_METHODS, I);
|
|
202
224
|
}
|
|
203
225
|
/**
|
|
204
226
|
* @deprecated - use {@link getPreviewInnerHtml} instead
|
|
@@ -214,7 +236,7 @@ var Qe = v, W = class T extends s {
|
|
|
214
236
|
}
|
|
215
237
|
};
|
|
216
238
|
W.REQUIRED_METHODS = ["getPreviewInnerHtml"];
|
|
217
|
-
var
|
|
239
|
+
var $e = class {
|
|
218
240
|
/**
|
|
219
241
|
* Generates HTML representation for a block item
|
|
220
242
|
* @param block - The block item to generate HTML for
|
|
@@ -232,6 +254,13 @@ var fe = class {
|
|
|
232
254
|
isBlockHintVisible(e) {
|
|
233
255
|
return !0;
|
|
234
256
|
}
|
|
257
|
+
/**
|
|
258
|
+
* Determines whether a draggable handle should be displayed in modules panel
|
|
259
|
+
* @returns True if the block panel should be reorderable
|
|
260
|
+
*/
|
|
261
|
+
isPanelPlacementChangeEnabled() {
|
|
262
|
+
return !0;
|
|
263
|
+
}
|
|
235
264
|
/**
|
|
236
265
|
* Gets the hint text for a block
|
|
237
266
|
* @param block - The block item to get hint for
|
|
@@ -281,7 +310,7 @@ var fe = class {
|
|
|
281
310
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
282
311
|
getModulesTabIconName(e) {
|
|
283
312
|
}
|
|
284
|
-
}, z = class b extends
|
|
313
|
+
}, z = class b extends a {
|
|
285
314
|
constructor() {
|
|
286
315
|
super(b.REQUIRED_METHODS, b);
|
|
287
316
|
}
|
|
@@ -305,21 +334,21 @@ var Z = {
|
|
|
305
334
|
href: "href",
|
|
306
335
|
width: "width",
|
|
307
336
|
height: "height"
|
|
308
|
-
},
|
|
337
|
+
}, We = {
|
|
309
338
|
BLOCK_IMAGE: Z
|
|
310
|
-
}, y = "esd-block-button",
|
|
311
|
-
BLOCK_BUTTON:
|
|
312
|
-
BLOCK_TEXT:
|
|
313
|
-
BLOCK_IMAGE:
|
|
314
|
-
GENERAL:
|
|
315
|
-
}, de = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(ue || {}),
|
|
339
|
+
}, y = "esd-block-button", P = "esd-block-text", p = "esd-block-image", j = "esd-structure", q = "esd-block-video", J = "esd-block-social", ee = "esd-block-banner", te = "esd-block-timer", re = "esd-block-menu", ne = "esd-block-html", se = "esd-block-spacer", ae = "esd-container-frame", ie = "esd-stripe", le = "esd-amp-form", c = ((e) => (e.BUTTON = `.${y}`, e.TEXT = `.${P}`, e.IMAGE = `.${p}`, e.STRUCTURE = `.${j}`, e.VIDEO = `.${q}`, e.SOCIAL = `.${J}`, e.BANNER = `.${ee}`, e.TIMER = `.${te}`, e.MENU = `.${re}`, e.HTML = `.${ne}`, e.SPACER = `.${se}`, e.CONTAINER = `.${ae}`, e.STRIPE = `.${ie}`, e.FORM = `.${le}`, e))(c || {}), oe = /* @__PURE__ */ ((e) => (e.BLOCK_IMAGE = "BLOCK_IMAGE", e.BLOCK_TEXT = "BLOCK_TEXT", e.BLOCK_BUTTON = "BLOCK_BUTTON", e.BLOCK_SPACER = "BLOCK_SPACER", e.BLOCK_VIDEO = "BLOCK_VIDEO", e.BLOCK_SOCIAL = "BLOCK_SOCIAL", e.BLOCK_BANNER = "BLOCK_BANNER", e.BLOCK_TIMER = "BLOCK_TIMER", e.BLOCK_MENU = "BLOCK_MENU", e.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", e.BLOCK_HTML = "BLOCK_HTML", e.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", e.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", e.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", e.CONTAINER = "CONTAINER", e.FORM_CONTAINER = "FORM_CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e.EMPTY_CONTAINER = "EMPTY_CONTAINER", e.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", e.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", e.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", e))(oe || {}), U = /* @__PURE__ */ ((e) => (e.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", e.APPLY_CONDITION = "applyCondition", e.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", e.BACKGROUND_COLOR = "backgroundColor", e.BACKGROUND_IMAGE = "generalImageContainer", e.TEXT_COLOR = "textColor", e.TEXT_STYLE = "textStyle", e.TEXT_SIZE = "textSize", e.TEXT_LINE_SPACING = "textLineSpacing", e.TEXT_ALIGN = "textAlign", e.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", e.HIDDEN_NODE = "hiddenNode", e.SMART_BLOCK = "smartBlock", e.SYNCHRONIZED_MODULE = "synchronizedModuleForm", e.FONT_FAMILY = "generalFontFamilyForm", e.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", e.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", e))(U || {}), w = /* @__PURE__ */ ((e) => (e.ADJUST_TO_WIDTH = "adjustToWidth", e.ALIGNMENT = "buttonAlignment", e.BORDER = "buttonBorder", e.BORDER_RADIUS = "buttonBorderRadius", e.COLOR = "buttonColor", e.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", e.EXTERNAL_INDENTS = "buttonExternalIndents", e.FIXED_HEIGHT = "buttonFixedHeightForm", e.FONT_COLOR = "buttonFontColor", e.FONT_FAMILY = "buttonFontFamily", e.FONT_SIZE = "buttonFontSize", e.ICON = "buttonIconContainer", e.ICON_ALIGN = "buttonIconAlign", e.ICON_INDENT = "buttonIconIndent", e.ICON_WIDTH = "buttonIconWidth", e.IMAGE = "buttonImageForm", e.INTERNAL_INDENTS = "buttonInternalIndents", e.LINK = "buttonLink", e.MIME_TYPE = "buttonMimeTypeForm", e.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", e.TEXT = "buttonText", e.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", e.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", e.HOVERED_COLOR = "hoveredButtonColorForm", e.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", e))(w || {}), K = /* @__PURE__ */ ((e) => (e.HIDDEN_NODE = "hiddenNodeText", e.PARAGRAPH_STYLE = "paragraphStyleForm", e.ALIGN = "textAlignmentForm", e.ANCHOR_CONTAINER = "textAnchorForm", e.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", e.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", e.FONT_COLOR = "textBlockFontColor", e.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", e.FONT_FAMILY = "textFontFamily", e.FONT_SIZE = "textBlockFontSize", e.DIRECTION = "textBlockDirectionForm", e.INSERT_FORM = "textBlockInsertForm", e.LINK_DATA = "textBlockLinkDataForm", e.FORMAT = "textBlockTextFormatForm", e.FIXED_HEIGHT = "textFixedHeightForm", e.INTERNAL_INDENTS = "textInternalIndents", e.LINE_HEIGHT = "textLineHeightForm", e.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(K || {}), F = /* @__PURE__ */ ((e) => (e.ALT_TEXT = "altText", e.LINK = "blockLink", e.ALIGNMENT = "imageAlignment", e.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", e.BORDER_RADIUS = "imageBorderRadiusForm", e.IMAGE = "imageImageForm", e.EXTERNAL_INDENTS = "imageExternalIndents", e.MIME_TYPE = "imageMimeTypeForm", e.RESPONSIVE = "imageResponsive", e.ROLLOVER_IMAGE = "imageRolloverImageForm", e.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", e.SIZE = "imageSizeContainer", e))(F || {}), Ee = /* @__PURE__ */ ((e) => (e.BACKGROUND_COLOR = "containerBackgroundColorForm", e.BORDER_FORM = "containerBorderForm", e.BORDER_RADIUS = "containerBorderRadiusForm", e.EXTERNAL_INDENTS = "containerExternalIndentsForm", e.IMAGE_CONTAINER = "containerImageContainerForm", e.MIME_TYPE = "containerMimeTypeForm", e.DISPLAY_CONDITIONS = "displayConditions", e.HIDDEN_NODE = "containerHiddenNodeForm", e))(Ee || {}), s = {
|
|
340
|
+
BLOCK_BUTTON: w,
|
|
341
|
+
BLOCK_TEXT: K,
|
|
342
|
+
BLOCK_IMAGE: F,
|
|
343
|
+
GENERAL: U
|
|
344
|
+
}, de = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(ue || {}), ce = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(ce || {}), r = {
|
|
316
345
|
name: "name",
|
|
317
346
|
disabled: "disabled"
|
|
318
|
-
},
|
|
347
|
+
}, Te = {
|
|
319
348
|
...r,
|
|
320
349
|
caption: "caption",
|
|
321
350
|
icon: "icon"
|
|
322
|
-
},
|
|
351
|
+
}, Ie = {
|
|
323
352
|
...r,
|
|
324
353
|
caption: "caption"
|
|
325
354
|
}, be = {
|
|
@@ -327,28 +356,28 @@ var Z = {
|
|
|
327
356
|
minValue: "min-value",
|
|
328
357
|
maxValue: "max-value",
|
|
329
358
|
step: "step"
|
|
330
|
-
},
|
|
359
|
+
}, he = {
|
|
331
360
|
...r,
|
|
332
361
|
placeholder: "placeholder",
|
|
333
362
|
minDate: "min-date"
|
|
334
|
-
},
|
|
363
|
+
}, me = {
|
|
335
364
|
...r,
|
|
336
365
|
text: "text",
|
|
337
366
|
hint: "hint"
|
|
338
367
|
}, ge = {
|
|
339
368
|
...r,
|
|
340
369
|
type: "type"
|
|
341
|
-
},
|
|
370
|
+
}, Oe = {
|
|
342
371
|
...r,
|
|
343
372
|
buttons: "buttons"
|
|
344
|
-
},
|
|
373
|
+
}, H = {
|
|
345
374
|
...r,
|
|
346
375
|
searchable: "searchable",
|
|
347
376
|
multiSelect: "multi-select",
|
|
348
377
|
placeholder: "placeholder",
|
|
349
378
|
items: "items"
|
|
350
379
|
}, Re = {
|
|
351
|
-
...
|
|
380
|
+
...H,
|
|
352
381
|
addCustomFontOption: "add-custom-font-option"
|
|
353
382
|
}, Le = {
|
|
354
383
|
...r,
|
|
@@ -387,10 +416,10 @@ var Z = {
|
|
|
387
416
|
isActive: "is-active",
|
|
388
417
|
visibility: "visibility",
|
|
389
418
|
transform: "transform"
|
|
390
|
-
},
|
|
419
|
+
}, Me = {
|
|
391
420
|
...r,
|
|
392
421
|
controlId: "control-id"
|
|
393
|
-
},
|
|
422
|
+
}, Be = {
|
|
394
423
|
...r,
|
|
395
424
|
expanded: "expanded"
|
|
396
425
|
}, xe = {
|
|
@@ -402,20 +431,23 @@ var Z = {
|
|
|
402
431
|
}, ye = {
|
|
403
432
|
...r,
|
|
404
433
|
icon: "icon"
|
|
405
|
-
},
|
|
434
|
+
}, Pe = {
|
|
406
435
|
...r
|
|
407
|
-
},
|
|
436
|
+
}, pe = {
|
|
437
|
+
...r,
|
|
438
|
+
blockId: "block-id"
|
|
439
|
+
}, ze = {
|
|
408
440
|
DEFAULT: r,
|
|
409
|
-
BUTTON:
|
|
410
|
-
CHECKBOX:
|
|
441
|
+
BUTTON: Te,
|
|
442
|
+
CHECKBOX: Ie,
|
|
411
443
|
CHECK_BUTTONS: Ce,
|
|
412
444
|
COLOR: r,
|
|
413
445
|
COUNTER: be,
|
|
414
|
-
DATEPICKER:
|
|
415
|
-
LABEL:
|
|
446
|
+
DATEPICKER: he,
|
|
447
|
+
LABEL: me,
|
|
416
448
|
MESSAGE: ge,
|
|
417
|
-
RADIO_BUTTONS:
|
|
418
|
-
SELECTPICKER:
|
|
449
|
+
RADIO_BUTTONS: Oe,
|
|
450
|
+
SELECTPICKER: H,
|
|
419
451
|
FONT_FAMILY_SELECT: Re,
|
|
420
452
|
SWITCHER: r,
|
|
421
453
|
TEXT: Ne,
|
|
@@ -424,13 +456,14 @@ var Z = {
|
|
|
424
456
|
CHECK_ITEM: _e,
|
|
425
457
|
SELECT_ITEM: Le,
|
|
426
458
|
RADIO_ITEM: Ae,
|
|
427
|
-
NESTED_CONTROL:
|
|
428
|
-
EXPANDABLE:
|
|
459
|
+
NESTED_CONTROL: Me,
|
|
460
|
+
EXPANDABLE: Be,
|
|
429
461
|
ORDERABLE: xe,
|
|
430
462
|
ORDERABLE_ITEM: ve,
|
|
431
463
|
ORDERABLE_ICON: ye,
|
|
432
|
-
REPEATABLE:
|
|
433
|
-
|
|
464
|
+
REPEATABLE: Pe,
|
|
465
|
+
DRAGGABLE_BLOCK: pe
|
|
466
|
+
}, Ue = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e))(Ue || {}), x = class {
|
|
434
467
|
/**
|
|
435
468
|
* @description returns map of nodes parent control operates on
|
|
436
469
|
*/
|
|
@@ -461,68 +494,68 @@ var Z = {
|
|
|
461
494
|
isVisible(e) {
|
|
462
495
|
return !0;
|
|
463
496
|
}
|
|
464
|
-
}, l = class extends
|
|
497
|
+
}, l = class extends x {
|
|
465
498
|
getTargetNodes(e) {
|
|
466
|
-
const t = e.querySelectorAll(
|
|
499
|
+
const t = e.querySelectorAll(c.BUTTON), n = e.asElement().hasClass(y) ? [e] : [];
|
|
467
500
|
return t.length ? t : n;
|
|
468
501
|
}
|
|
469
|
-
},
|
|
502
|
+
}, Ze = class extends l {
|
|
470
503
|
getParentControlId() {
|
|
471
|
-
return
|
|
504
|
+
return s.BLOCK_BUTTON.BORDER_RADIUS;
|
|
472
505
|
}
|
|
473
506
|
getLabels() {
|
|
474
507
|
}
|
|
475
|
-
}, ze = class extends l {
|
|
476
|
-
getParentControlId() {
|
|
477
|
-
return a.BLOCK_BUTTON.ALIGNMENT;
|
|
478
|
-
}
|
|
479
|
-
}, Ze = class extends l {
|
|
480
|
-
getParentControlId() {
|
|
481
|
-
return a.GENERAL.BACKGROUND_COLOR;
|
|
482
|
-
}
|
|
483
508
|
}, je = class extends l {
|
|
484
509
|
getParentControlId() {
|
|
485
|
-
return
|
|
486
|
-
}
|
|
487
|
-
getLabels() {
|
|
510
|
+
return s.BLOCK_BUTTON.ALIGNMENT;
|
|
488
511
|
}
|
|
489
512
|
}, qe = class extends l {
|
|
490
513
|
getParentControlId() {
|
|
491
|
-
return
|
|
514
|
+
return s.GENERAL.BACKGROUND_COLOR;
|
|
492
515
|
}
|
|
493
516
|
}, Je = class extends l {
|
|
494
517
|
getParentControlId() {
|
|
495
|
-
return
|
|
518
|
+
return s.BLOCK_BUTTON.BORDER;
|
|
519
|
+
}
|
|
520
|
+
getLabels() {
|
|
496
521
|
}
|
|
497
522
|
}, et = class extends l {
|
|
498
523
|
getParentControlId() {
|
|
499
|
-
return
|
|
524
|
+
return s.BLOCK_BUTTON.COLOR;
|
|
500
525
|
}
|
|
501
526
|
}, tt = class extends l {
|
|
502
527
|
getParentControlId() {
|
|
503
|
-
return
|
|
528
|
+
return s.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
504
529
|
}
|
|
505
530
|
}, rt = class extends l {
|
|
506
531
|
getParentControlId() {
|
|
507
|
-
return
|
|
532
|
+
return s.BLOCK_BUTTON.FONT_FAMILY;
|
|
508
533
|
}
|
|
509
534
|
}, nt = class extends l {
|
|
510
535
|
getParentControlId() {
|
|
511
|
-
return
|
|
536
|
+
return s.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
537
|
+
}
|
|
538
|
+
}, st = class extends l {
|
|
539
|
+
getParentControlId() {
|
|
540
|
+
return s.BLOCK_BUTTON.INTERNAL_INDENTS;
|
|
512
541
|
}
|
|
513
542
|
}, at = class extends l {
|
|
514
543
|
getParentControlId() {
|
|
515
|
-
return
|
|
544
|
+
return s.BLOCK_BUTTON.TEXT;
|
|
516
545
|
}
|
|
517
|
-
},
|
|
546
|
+
}, it = class extends l {
|
|
547
|
+
getParentControlId() {
|
|
548
|
+
return s.BLOCK_BUTTON.FONT_SIZE;
|
|
549
|
+
}
|
|
550
|
+
}, lt = class extends l {
|
|
518
551
|
getParentControlId() {
|
|
519
|
-
return
|
|
552
|
+
return s.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
|
|
520
553
|
}
|
|
521
554
|
getLabels() {
|
|
522
555
|
}
|
|
523
|
-
},
|
|
556
|
+
}, k = class h extends a {
|
|
524
557
|
constructor() {
|
|
525
|
-
super(
|
|
558
|
+
super(h.REQUIRED_METHODS, h);
|
|
526
559
|
}
|
|
527
560
|
/**
|
|
528
561
|
* @description Allows to determine if control should be visible or hidden in control panel.
|
|
@@ -575,10 +608,10 @@ var Z = {
|
|
|
575
608
|
onDocumentChanged(t) {
|
|
576
609
|
}
|
|
577
610
|
};
|
|
578
|
-
|
|
579
|
-
var
|
|
611
|
+
k.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
612
|
+
var ot = k, we = class m extends a {
|
|
580
613
|
constructor() {
|
|
581
|
-
super(
|
|
614
|
+
super(m.REQUIRED_METHODS, m);
|
|
582
615
|
}
|
|
583
616
|
/**
|
|
584
617
|
* Gets the unique identifier for this tab.
|
|
@@ -646,29 +679,94 @@ var it = X, we = class h extends s {
|
|
|
646
679
|
}
|
|
647
680
|
};
|
|
648
681
|
we.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
649
|
-
var
|
|
682
|
+
var X = class extends x {
|
|
650
683
|
getTargetNodes(e) {
|
|
651
|
-
const t = e.querySelectorAll(
|
|
684
|
+
const t = e.querySelectorAll(c.IMAGE), n = e.asElement().hasClass(p) ? [e] : [];
|
|
652
685
|
return t.length ? t : n;
|
|
653
686
|
}
|
|
654
|
-
},
|
|
687
|
+
}, Et = class extends X {
|
|
655
688
|
getParentControlId() {
|
|
656
|
-
return
|
|
689
|
+
return s.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
657
690
|
}
|
|
658
|
-
},
|
|
691
|
+
}, dt = class extends X {
|
|
659
692
|
getParentControlId() {
|
|
660
|
-
return
|
|
693
|
+
return s.BLOCK_IMAGE.SIZE;
|
|
661
694
|
}
|
|
662
|
-
},
|
|
695
|
+
}, Ke = class g extends a {
|
|
663
696
|
constructor() {
|
|
664
697
|
super(g.REQUIRED_METHODS, g);
|
|
665
698
|
}
|
|
699
|
+
/**
|
|
700
|
+
* Gets the unique identifier for this tab.
|
|
701
|
+
* This ID is used for registration.
|
|
702
|
+
* @returns A unique string ID.
|
|
703
|
+
*/
|
|
704
|
+
getId() {
|
|
705
|
+
throw new Error("Method getId() must be implemented by the subclass");
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Gets the icon key representing this tab in the header.
|
|
709
|
+
* @returns A string representing the icon key from the IconsRegistry
|
|
710
|
+
*/
|
|
711
|
+
getIcon() {
|
|
712
|
+
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Retrieves the index of the tab associated with the panel.
|
|
716
|
+
* The index represents the position/order of the tab in the UI.
|
|
717
|
+
*
|
|
718
|
+
* @returns {number} The index of the tab.
|
|
719
|
+
*/
|
|
720
|
+
getTabIndex() {
|
|
721
|
+
throw new Error("Method getTabIndex() must be implemented by the subclass");
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Gets the display name of the tab shown to the user in the header hint.
|
|
725
|
+
* Use `this.api.translate()` for localization.
|
|
726
|
+
* @returns The localized tab name string.
|
|
727
|
+
*/
|
|
728
|
+
getName() {
|
|
729
|
+
throw new Error("Method getName() must be implemented by the subclass");
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Determines if the tab should be available for use in the editor.
|
|
733
|
+
* Override to provide custom logic based on the editor state or configuration.
|
|
734
|
+
* @returns True if the tab is enabled, false otherwise. Defaults to true.
|
|
735
|
+
*/
|
|
736
|
+
isEnabled() {
|
|
737
|
+
return !0;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Gets the HTML template string that defines the initial structure of this tab.
|
|
741
|
+
* @returns An HTML string.
|
|
742
|
+
*/
|
|
743
|
+
getTemplate() {
|
|
744
|
+
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Optional hook called when the modules panel tab is initially rendered.
|
|
748
|
+
* Use this for setup tasks like attaching event listeners to the panel's template elements.
|
|
749
|
+
*/
|
|
750
|
+
onRender() {
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Lifecycle hook called when any part of the document template has changed.
|
|
754
|
+
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
755
|
+
*/
|
|
756
|
+
onDocumentChanged() {
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
Ke.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
760
|
+
var G = class O extends a {
|
|
761
|
+
constructor() {
|
|
762
|
+
super(O.REQUIRED_METHODS, O);
|
|
763
|
+
}
|
|
666
764
|
registerBlockControls(t) {
|
|
667
765
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
668
766
|
}
|
|
669
767
|
};
|
|
670
768
|
G.REQUIRED_METHODS = ["registerBlockControls"];
|
|
671
|
-
var
|
|
769
|
+
var ut = G, ct = class {
|
|
672
770
|
constructor(e, t) {
|
|
673
771
|
this.tabId = e, this.controlsIds = t;
|
|
674
772
|
}
|
|
@@ -691,42 +789,42 @@ var ot = G, dt = class {
|
|
|
691
789
|
const t = this.controlsIds.indexOf(e);
|
|
692
790
|
t !== -1 && this.controlsIds.splice(t, 1);
|
|
693
791
|
}
|
|
694
|
-
},
|
|
792
|
+
}, o = class extends x {
|
|
695
793
|
getTargetNodes(e) {
|
|
696
|
-
const t = e.querySelectorAll(
|
|
794
|
+
const t = e.querySelectorAll(c.TEXT), n = e.asElement().hasClass(P) ? [e] : [];
|
|
697
795
|
return t.length ? t : n;
|
|
698
796
|
}
|
|
699
|
-
},
|
|
797
|
+
}, Tt = class extends o {
|
|
700
798
|
getParentControlId() {
|
|
701
|
-
return
|
|
799
|
+
return s.GENERAL.TEXT_ALIGN;
|
|
702
800
|
}
|
|
703
|
-
}, It = class extends
|
|
801
|
+
}, It = class extends o {
|
|
704
802
|
getParentControlId() {
|
|
705
|
-
return
|
|
803
|
+
return s.GENERAL.TEXT_COLOR;
|
|
706
804
|
}
|
|
707
|
-
},
|
|
805
|
+
}, bt = class extends o {
|
|
708
806
|
getParentControlId() {
|
|
709
|
-
return
|
|
807
|
+
return s.BLOCK_TEXT.FONT_FAMILY;
|
|
710
808
|
}
|
|
711
|
-
},
|
|
809
|
+
}, ht = class extends o {
|
|
712
810
|
getParentControlId() {
|
|
713
|
-
return
|
|
811
|
+
return s.GENERAL.TEXT_LINE_SPACING;
|
|
714
812
|
}
|
|
715
|
-
},
|
|
813
|
+
}, mt = class extends o {
|
|
716
814
|
getParentControlId() {
|
|
717
|
-
return
|
|
815
|
+
return s.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
718
816
|
}
|
|
719
|
-
},
|
|
817
|
+
}, gt = class extends o {
|
|
720
818
|
getParentControlId() {
|
|
721
|
-
return
|
|
819
|
+
return s.GENERAL.TEXT_SIZE;
|
|
722
820
|
}
|
|
723
|
-
},
|
|
821
|
+
}, Ot = class extends o {
|
|
724
822
|
getParentControlId() {
|
|
725
|
-
return
|
|
823
|
+
return s.GENERAL.TEXT_STYLE;
|
|
726
824
|
}
|
|
727
|
-
},
|
|
825
|
+
}, Fe = class {
|
|
728
826
|
constructor(e) {
|
|
729
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.
|
|
827
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.modulesPanelTabs = [], this.i18n = e?.i18n, this.styles = e?.styles, this.previewStyles = e?.previewStyles, this.uiElements = e?.uiElements ?? [], this.uiElementTagRegistry = e?.uiElementTagRegistry, this.controls = e?.controls ?? [], this.settingsPanelRegistry = e?.settingsPanelRegistry, this.contextActions = e?.contextActions ?? [], this.blocks = e?.blocks ?? [], this.generalPanelTabs = e?.generalPanelTabs ?? [], this.modulesPanelTabs = e?.modulesPanelTabs ?? [], this.externalSmartElementsLibrary = e?.externalSmartElementsLibrary, this.externalImageLibrary = e?.externalImageLibrary, this.externalImageLibraryTab = e?.externalImageLibraryTab, this.externalAiAssistant = e?.externalAiAssistant, this.externalDisplayConditionsLibrary = e?.externalDisplayConditionsLibrary, this.externalVideoLibrary = e?.externalVideoLibrary, this.blocksPanel = e?.blocksPanel, this.iconsRegistry = e?.iconsRegistry, this.id = Math.random().toString(36).substring(2);
|
|
730
828
|
}
|
|
731
829
|
getI18n() {
|
|
732
830
|
return this.i18n;
|
|
@@ -785,9 +883,12 @@ var ot = G, dt = class {
|
|
|
785
883
|
getGeneralPanelTabs() {
|
|
786
884
|
return this.generalPanelTabs;
|
|
787
885
|
}
|
|
788
|
-
|
|
886
|
+
getModulesPanelTabs() {
|
|
887
|
+
return this.modulesPanelTabs;
|
|
888
|
+
}
|
|
889
|
+
}, Rt = class {
|
|
789
890
|
constructor() {
|
|
790
|
-
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [];
|
|
891
|
+
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.modulesPanelTabs = [];
|
|
791
892
|
}
|
|
792
893
|
withLocalization(e) {
|
|
793
894
|
return this.i18n = e, this;
|
|
@@ -852,8 +953,11 @@ var ot = G, dt = class {
|
|
|
852
953
|
addGeneralPanelTab(e) {
|
|
853
954
|
return this.generalPanelTabs.push(e), this;
|
|
854
955
|
}
|
|
956
|
+
addModulesPanelTab(e) {
|
|
957
|
+
return this.modulesPanelTabs.push(e), this;
|
|
958
|
+
}
|
|
855
959
|
build() {
|
|
856
|
-
return new
|
|
960
|
+
return new Fe({
|
|
857
961
|
i18n: this.i18n,
|
|
858
962
|
styles: this.styles.map((e) => e.trim()).join(`
|
|
859
963
|
`),
|
|
@@ -872,21 +976,22 @@ var ot = G, dt = class {
|
|
|
872
976
|
blocksPanel: this.blocksPanel,
|
|
873
977
|
iconsRegistry: this.iconsRegistry,
|
|
874
978
|
externalImageLibraryTab: this.externalImageLibraryTab,
|
|
875
|
-
generalPanelTabs: this.generalPanelTabs
|
|
979
|
+
generalPanelTabs: this.generalPanelTabs,
|
|
980
|
+
modulesPanelTabs: this.modulesPanelTabs
|
|
876
981
|
});
|
|
877
982
|
}
|
|
878
|
-
},
|
|
983
|
+
}, He = class R extends a {
|
|
879
984
|
constructor() {
|
|
880
|
-
super(
|
|
985
|
+
super(R.REQUIRED_METHODS, R);
|
|
881
986
|
}
|
|
882
987
|
openAiAssistant(t) {
|
|
883
988
|
throw new Error("Method openAiAssistant() must be implemented by the subclass");
|
|
884
989
|
}
|
|
885
990
|
};
|
|
886
|
-
|
|
887
|
-
var
|
|
991
|
+
He.REQUIRED_METHODS = ["openAiAssistant"];
|
|
992
|
+
var ke = class L extends a {
|
|
888
993
|
constructor() {
|
|
889
|
-
super(
|
|
994
|
+
super(L.REQUIRED_METHODS, L);
|
|
890
995
|
}
|
|
891
996
|
/**
|
|
892
997
|
* Retrieves the name of the category.
|
|
@@ -924,19 +1029,19 @@ var He = class R extends s {
|
|
|
924
1029
|
throw new Error("Method getContextActionIndex() must be implemented by the subclass");
|
|
925
1030
|
}
|
|
926
1031
|
};
|
|
927
|
-
|
|
928
|
-
var
|
|
1032
|
+
ke.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
1033
|
+
var Xe = class _ extends a {
|
|
929
1034
|
constructor() {
|
|
930
|
-
super(
|
|
1035
|
+
super(_.REQUIRED_METHODS, _);
|
|
931
1036
|
}
|
|
932
1037
|
openImageLibrary(t, n, i) {
|
|
933
1038
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
934
1039
|
}
|
|
935
1040
|
};
|
|
936
|
-
|
|
937
|
-
var
|
|
1041
|
+
Xe.REQUIRED_METHODS = ["openImageLibrary"];
|
|
1042
|
+
var Ge = class C extends a {
|
|
938
1043
|
constructor() {
|
|
939
|
-
super(
|
|
1044
|
+
super(C.REQUIRED_METHODS, C);
|
|
940
1045
|
}
|
|
941
1046
|
/**
|
|
942
1047
|
* @description Returns the translated name/label for the tab
|
|
@@ -955,35 +1060,35 @@ var Xe = class _ extends s {
|
|
|
955
1060
|
throw new Error("Method openImageLibraryTab() must be implemented by the subclass");
|
|
956
1061
|
}
|
|
957
1062
|
};
|
|
958
|
-
|
|
959
|
-
var
|
|
1063
|
+
Ge.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
1064
|
+
var Ve = class A extends a {
|
|
960
1065
|
constructor() {
|
|
961
|
-
super(
|
|
1066
|
+
super(A.REQUIRED_METHODS, A);
|
|
962
1067
|
}
|
|
963
1068
|
openSmartElementsLibrary(t, n) {
|
|
964
1069
|
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
965
1070
|
}
|
|
966
1071
|
};
|
|
967
|
-
|
|
968
|
-
var
|
|
1072
|
+
Ve.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
1073
|
+
var Qe = class N extends a {
|
|
969
1074
|
constructor() {
|
|
970
|
-
super(
|
|
1075
|
+
super(N.REQUIRED_METHODS, N);
|
|
971
1076
|
}
|
|
972
1077
|
openExternalVideosLibraryDialog(t, n, i) {
|
|
973
1078
|
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
974
1079
|
}
|
|
975
1080
|
};
|
|
976
|
-
|
|
977
|
-
var V = class
|
|
1081
|
+
Qe.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
1082
|
+
var V = class D extends a {
|
|
978
1083
|
constructor() {
|
|
979
|
-
super(
|
|
1084
|
+
super(D.REQUIRED_METHODS, D);
|
|
980
1085
|
}
|
|
981
1086
|
registerIconsSvg(t) {
|
|
982
1087
|
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
983
1088
|
}
|
|
984
1089
|
};
|
|
985
1090
|
V.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
986
|
-
var
|
|
1091
|
+
var Lt = V, _t = class {
|
|
987
1092
|
constructor(e) {
|
|
988
1093
|
this.key = e;
|
|
989
1094
|
}
|
|
@@ -996,9 +1101,9 @@ var mt = V, Rt = class {
|
|
|
996
1101
|
params: this.params
|
|
997
1102
|
};
|
|
998
1103
|
}
|
|
999
|
-
}, Q = class
|
|
1104
|
+
}, Q = class S extends a {
|
|
1000
1105
|
constructor() {
|
|
1001
|
-
super(
|
|
1106
|
+
super(S.REQUIRED_METHODS, S);
|
|
1002
1107
|
}
|
|
1003
1108
|
/**
|
|
1004
1109
|
* Called when the UI element should render its content into the provided container.
|
|
@@ -1052,63 +1157,63 @@ var mt = V, Rt = class {
|
|
|
1052
1157
|
}
|
|
1053
1158
|
};
|
|
1054
1159
|
Q.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
1055
|
-
var
|
|
1160
|
+
var Ct = Q, f = class M extends a {
|
|
1056
1161
|
constructor() {
|
|
1057
|
-
super(
|
|
1162
|
+
super(M.REQUIRED_METHODS, M);
|
|
1058
1163
|
}
|
|
1059
1164
|
registerUiElements(t) {
|
|
1060
1165
|
throw new Error("Method registerUiElements() must be implemented by the subclass");
|
|
1061
1166
|
}
|
|
1062
1167
|
};
|
|
1063
1168
|
f.REQUIRED_METHODS = ["registerUiElements"];
|
|
1064
|
-
var
|
|
1169
|
+
var At = f;
|
|
1065
1170
|
export {
|
|
1066
|
-
|
|
1067
|
-
|
|
1171
|
+
Ye as Block,
|
|
1172
|
+
We as BlockAttr,
|
|
1068
1173
|
$ as BlockCompositionType,
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1174
|
+
c as BlockSelector,
|
|
1175
|
+
oe as BlockType,
|
|
1176
|
+
$e as BlocksPanel,
|
|
1177
|
+
x as BuiltInControl,
|
|
1178
|
+
s as BuiltInControlTypes,
|
|
1179
|
+
je as ButtonAlignBuiltInControl,
|
|
1180
|
+
qe as ButtonBackgroundColorBuiltInControl,
|
|
1181
|
+
Je as ButtonBorderBuiltInControl,
|
|
1182
|
+
Ze as ButtonBorderRadiusBuiltInControl,
|
|
1183
|
+
et as ButtonColorBuiltInControl,
|
|
1184
|
+
w as ButtonControls,
|
|
1185
|
+
tt as ButtonFitToContainerBuiltInControl,
|
|
1186
|
+
rt as ButtonFontFamilyBuiltInControl,
|
|
1187
|
+
nt as ButtonMarginsBuiltInControl,
|
|
1188
|
+
st as ButtonPaddingsBuiltInControl,
|
|
1189
|
+
at as ButtonTextBuiltInControl,
|
|
1190
|
+
it as ButtonTextSizeBuiltInControl,
|
|
1191
|
+
lt as ButtonTextStyleAndFontColorBuiltInControl,
|
|
1192
|
+
Ee as ContainerControls,
|
|
1193
|
+
ot as Control,
|
|
1089
1194
|
de as EditorStatePropertyType,
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1195
|
+
Fe as Extension,
|
|
1196
|
+
Rt as ExtensionBuilder,
|
|
1197
|
+
U as GeneralControls,
|
|
1198
|
+
Lt as IconsRegistry,
|
|
1199
|
+
F as ImageControls,
|
|
1200
|
+
Et as ImageMarginsBuiltInControl,
|
|
1201
|
+
dt as ImageSizeBuiltInControl,
|
|
1202
|
+
_t as ModificationDescription,
|
|
1098
1203
|
ue as PreviewDeviceMode,
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1204
|
+
ut as SettingsPanelRegistry,
|
|
1205
|
+
ct as SettingsPanelTab,
|
|
1206
|
+
ce as SettingsTab,
|
|
1207
|
+
Tt as TextAlignBuiltInControl,
|
|
1103
1208
|
It as TextColorBuiltInControl,
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1209
|
+
K as TextControls,
|
|
1210
|
+
bt as TextFontFamilyBuiltInControl,
|
|
1211
|
+
ht as TextLineSpacingBuiltInControl,
|
|
1212
|
+
mt as TextPaddingsBuiltInControl,
|
|
1213
|
+
gt as TextSizeBuiltInControl,
|
|
1214
|
+
Ot as TextStyleBuiltInControl,
|
|
1215
|
+
ze as UEAttr,
|
|
1216
|
+
Ct as UIElement,
|
|
1217
|
+
At as UIElementTagRegistry,
|
|
1218
|
+
Ue as UIElementType
|
|
1114
1219
|
};
|