@useinsider/guido 2.0.0-beta.c588e27 → 2.0.0-beta.c9db5fd
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 +53 -39
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/config/migrator/recommendationMigrator.js +1 -1
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +13 -4
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +11 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +100 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +243 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +152 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +370 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +76 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +224 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +39 -43
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +5 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +127 -72
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/horizontalElementRenderer.js +157 -0
- package/dist/extensions/Blocks/Recommendation/templates/horizontalTemplate.js +78 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +67 -88
- package/dist/extensions/Blocks/Recommendation/templates/verticalElementRenderer.js +186 -0
- package/dist/extensions/Blocks/Recommendation/templates/verticalMigrationTemplate.js +256 -0
- package/dist/extensions/Blocks/Recommendation/templates/verticalTemplate.js +81 -0
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/controlFactories.js +155 -121
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +361 -291
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +26 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +19 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +23 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +50 -0
- package/dist/src/extensions/Blocks/Recommendation/{control.d.ts → controls/main/index.d.ts} +19 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +77 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontalElementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontalMigrationTemplate.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontalTemplate.d.ts +28 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +59 -21
- package/dist/src/extensions/Blocks/Recommendation/templates/verticalElementRenderer.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → verticalMigrationTemplate.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/{blockTemplate.d.ts → verticalTemplate.d.ts} +13 -9
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/src/stores/config.d.ts +147 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +38 -2
- package/dist/stores/config.js +7 -0
- package/package.json +3 -3
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
- package/dist/extensions/Blocks/Recommendation/control.js +0 -306
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig } from '@@/Types/config';
|
|
1
|
+
import type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, CallbacksConfig } from '@@/Types/config';
|
|
2
2
|
interface ConfigStoreState {
|
|
3
3
|
/** Whether the config has been initialized */
|
|
4
4
|
initialized: boolean;
|
|
@@ -96,6 +96,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
96
96
|
})[];
|
|
97
97
|
ignoreDefaultRules: boolean;
|
|
98
98
|
};
|
|
99
|
+
callbacks: {
|
|
100
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
101
|
+
};
|
|
99
102
|
} | null;
|
|
100
103
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
101
104
|
/**
|
|
@@ -188,6 +191,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
188
191
|
})[];
|
|
189
192
|
ignoreDefaultRules: boolean;
|
|
190
193
|
};
|
|
194
|
+
callbacks: {
|
|
195
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
196
|
+
};
|
|
191
197
|
} | null;
|
|
192
198
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
193
199
|
/**
|
|
@@ -280,6 +286,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
280
286
|
})[];
|
|
281
287
|
ignoreDefaultRules: boolean;
|
|
282
288
|
};
|
|
289
|
+
callbacks: {
|
|
290
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
291
|
+
};
|
|
283
292
|
} | null;
|
|
284
293
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
285
294
|
/**
|
|
@@ -372,6 +381,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
372
381
|
})[];
|
|
373
382
|
ignoreDefaultRules: boolean;
|
|
374
383
|
};
|
|
384
|
+
callbacks: {
|
|
385
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
386
|
+
};
|
|
375
387
|
} | null;
|
|
376
388
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
377
389
|
/**
|
|
@@ -464,6 +476,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
464
476
|
})[];
|
|
465
477
|
ignoreDefaultRules: boolean;
|
|
466
478
|
};
|
|
479
|
+
callbacks: {
|
|
480
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
481
|
+
};
|
|
467
482
|
} | null;
|
|
468
483
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
469
484
|
/**
|
|
@@ -556,6 +571,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
556
571
|
})[];
|
|
557
572
|
ignoreDefaultRules: boolean;
|
|
558
573
|
};
|
|
574
|
+
callbacks: {
|
|
575
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
576
|
+
};
|
|
559
577
|
} | null;
|
|
560
578
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
561
579
|
/**
|
|
@@ -648,6 +666,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
648
666
|
})[];
|
|
649
667
|
ignoreDefaultRules: boolean;
|
|
650
668
|
};
|
|
669
|
+
callbacks: {
|
|
670
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
671
|
+
};
|
|
651
672
|
} | null;
|
|
652
673
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
653
674
|
/**
|
|
@@ -740,8 +761,106 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
740
761
|
})[];
|
|
741
762
|
ignoreDefaultRules: boolean;
|
|
742
763
|
};
|
|
764
|
+
callbacks: {
|
|
765
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
766
|
+
};
|
|
743
767
|
} | null;
|
|
744
768
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
769
|
+
/**
|
|
770
|
+
* Get the callbacks configuration
|
|
771
|
+
*/
|
|
772
|
+
callbacks: (state: {
|
|
773
|
+
initialized: boolean;
|
|
774
|
+
config: {
|
|
775
|
+
identity: {
|
|
776
|
+
templateId: string;
|
|
777
|
+
userId: string;
|
|
778
|
+
variationId?: string | undefined;
|
|
779
|
+
};
|
|
780
|
+
partner: {
|
|
781
|
+
name: string;
|
|
782
|
+
productType: 60 | 49 | 97;
|
|
783
|
+
messageType: 1 | 2;
|
|
784
|
+
username: string;
|
|
785
|
+
};
|
|
786
|
+
template: {
|
|
787
|
+
html: string;
|
|
788
|
+
css: string;
|
|
789
|
+
preselectedDynamicContent: {
|
|
790
|
+
text: string;
|
|
791
|
+
value: string;
|
|
792
|
+
fallback?: string | undefined;
|
|
793
|
+
format?: {
|
|
794
|
+
key: string;
|
|
795
|
+
value: string;
|
|
796
|
+
} | undefined;
|
|
797
|
+
}[];
|
|
798
|
+
selectedUnsubscribePages: number[];
|
|
799
|
+
forceRecreate: boolean;
|
|
800
|
+
};
|
|
801
|
+
editor: {
|
|
802
|
+
locale: string;
|
|
803
|
+
translationsPath: string;
|
|
804
|
+
migrationDate: number;
|
|
805
|
+
emailHeader: {
|
|
806
|
+
senderName: string;
|
|
807
|
+
subject: string;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
ui: {
|
|
811
|
+
showHeader: boolean;
|
|
812
|
+
backButtonLabel?: string | undefined;
|
|
813
|
+
};
|
|
814
|
+
features: {
|
|
815
|
+
dynamicContent: boolean;
|
|
816
|
+
saveAsTemplate: boolean;
|
|
817
|
+
versionHistory: boolean;
|
|
818
|
+
testMessage: boolean;
|
|
819
|
+
displayConditions: boolean;
|
|
820
|
+
unsubscribe: boolean;
|
|
821
|
+
modulesDisabled: boolean;
|
|
822
|
+
};
|
|
823
|
+
blocks: {
|
|
824
|
+
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
825
|
+
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
826
|
+
};
|
|
827
|
+
compiler: {
|
|
828
|
+
customRules: ({
|
|
829
|
+
type: "replace";
|
|
830
|
+
search: string;
|
|
831
|
+
replacement: string;
|
|
832
|
+
replaceAll?: boolean | undefined;
|
|
833
|
+
id: string;
|
|
834
|
+
description?: string | undefined;
|
|
835
|
+
priority: number;
|
|
836
|
+
} | {
|
|
837
|
+
type: "regex";
|
|
838
|
+
pattern: string;
|
|
839
|
+
replacement: string;
|
|
840
|
+
flags?: string | undefined;
|
|
841
|
+
id: string;
|
|
842
|
+
description?: string | undefined;
|
|
843
|
+
priority: number;
|
|
844
|
+
} | {
|
|
845
|
+
type: "remove";
|
|
846
|
+
targets: string[];
|
|
847
|
+
id: string;
|
|
848
|
+
description?: string | undefined;
|
|
849
|
+
priority: number;
|
|
850
|
+
} | {
|
|
851
|
+
type: "custom";
|
|
852
|
+
processor: (html: string) => string;
|
|
853
|
+
id: string;
|
|
854
|
+
description?: string | undefined;
|
|
855
|
+
priority: number;
|
|
856
|
+
})[];
|
|
857
|
+
ignoreDefaultRules: boolean;
|
|
858
|
+
};
|
|
859
|
+
callbacks: {
|
|
860
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
861
|
+
};
|
|
862
|
+
} | null;
|
|
863
|
+
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
745
864
|
/**
|
|
746
865
|
* Get the template ID
|
|
747
866
|
*/
|
|
@@ -832,6 +951,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
832
951
|
})[];
|
|
833
952
|
ignoreDefaultRules: boolean;
|
|
834
953
|
};
|
|
954
|
+
callbacks: {
|
|
955
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
956
|
+
};
|
|
835
957
|
} | null;
|
|
836
958
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
837
959
|
/**
|
|
@@ -924,6 +1046,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
924
1046
|
})[];
|
|
925
1047
|
ignoreDefaultRules: boolean;
|
|
926
1048
|
};
|
|
1049
|
+
callbacks: {
|
|
1050
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1051
|
+
};
|
|
927
1052
|
} | null;
|
|
928
1053
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
929
1054
|
/**
|
|
@@ -1016,6 +1141,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1016
1141
|
})[];
|
|
1017
1142
|
ignoreDefaultRules: boolean;
|
|
1018
1143
|
};
|
|
1144
|
+
callbacks: {
|
|
1145
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1146
|
+
};
|
|
1019
1147
|
} | null;
|
|
1020
1148
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1021
1149
|
/**
|
|
@@ -1108,6 +1236,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1108
1236
|
})[];
|
|
1109
1237
|
ignoreDefaultRules: boolean;
|
|
1110
1238
|
};
|
|
1239
|
+
callbacks: {
|
|
1240
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1241
|
+
};
|
|
1111
1242
|
} | null;
|
|
1112
1243
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1113
1244
|
/**
|
|
@@ -1200,6 +1331,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1200
1331
|
})[];
|
|
1201
1332
|
ignoreDefaultRules: boolean;
|
|
1202
1333
|
};
|
|
1334
|
+
callbacks: {
|
|
1335
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1336
|
+
};
|
|
1203
1337
|
} | null;
|
|
1204
1338
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1205
1339
|
/**
|
|
@@ -1292,6 +1426,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1292
1426
|
})[];
|
|
1293
1427
|
ignoreDefaultRules: boolean;
|
|
1294
1428
|
};
|
|
1429
|
+
callbacks: {
|
|
1430
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1431
|
+
};
|
|
1295
1432
|
} | null;
|
|
1296
1433
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
1297
1434
|
/**
|
|
@@ -1384,6 +1521,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1384
1521
|
})[];
|
|
1385
1522
|
ignoreDefaultRules: boolean;
|
|
1386
1523
|
};
|
|
1524
|
+
callbacks: {
|
|
1525
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1526
|
+
};
|
|
1387
1527
|
} | null;
|
|
1388
1528
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1389
1529
|
/**
|
|
@@ -1476,6 +1616,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1476
1616
|
})[];
|
|
1477
1617
|
ignoreDefaultRules: boolean;
|
|
1478
1618
|
};
|
|
1619
|
+
callbacks: {
|
|
1620
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1621
|
+
};
|
|
1479
1622
|
} | null;
|
|
1480
1623
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
1481
1624
|
/**
|
|
@@ -1568,6 +1711,9 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1568
1711
|
})[];
|
|
1569
1712
|
ignoreDefaultRules: boolean;
|
|
1570
1713
|
};
|
|
1714
|
+
callbacks: {
|
|
1715
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1716
|
+
};
|
|
1571
1717
|
} | null;
|
|
1572
1718
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
|
1573
1719
|
}, {
|
|
@@ -6,10 +6,6 @@ ue-main-editor-container[panel-position=SETTINGS_BLOCKS] ue-wide-panel {
|
|
|
6
6
|
right: calc(100% - calc(var(--ue-spacing-step, 5px) * 3) - 425px);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
ue-main-tabs-panel-component .fixed-panel-header {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
/* Remove with this writing task DT-28355 */
|
|
14
10
|
ue-description a {
|
|
15
11
|
display: none;
|
|
@@ -19,10 +19,46 @@ const n = `.esd-x,
|
|
|
19
19
|
box-shadow: none;
|
|
20
20
|
}
|
|
21
21
|
.ins-product-cart ue-node-actions,
|
|
22
|
-
|
|
23
|
-
.ins-recommendation-v3-block-v2 .product-
|
|
22
|
+
/* Horizontal layout - hide for info, image, and button cells */
|
|
23
|
+
.ins-recommendation-v3-block-v2 .product-info-cell ue-node-actions,
|
|
24
|
+
.ins-recommendation-v3-block-v2 .product-info-cell ue-node-panel,
|
|
25
|
+
.ins-recommendation-v3-block-v2 .product-image-cell ue-node-actions,
|
|
26
|
+
.ins-recommendation-v3-block-v2 .product-image-cell ue-node-panel,
|
|
27
|
+
.ins-recommendation-v3-block-v2 .button-cell ue-node-actions,
|
|
28
|
+
.ins-recommendation-v3-block-v2 .button-cell ue-node-panel,
|
|
29
|
+
/* Vertical layout - hide for product-card-segment inner cells */
|
|
30
|
+
.ins-recommendation-v3-block-v2 .product-card-segment ue-node-actions,
|
|
31
|
+
.ins-recommendation-v3-block-v2 .product-card-segment ue-node-panel,
|
|
32
|
+
/* Hide for specific product attribute cells in both layouts */
|
|
33
|
+
.ins-recommendation-v3-block-v2 .product-image ue-node-actions,
|
|
34
|
+
.ins-recommendation-v3-block-v2 .product-image ue-node-panel,
|
|
35
|
+
.ins-recommendation-v3-block-v2 .product-name ue-node-actions,
|
|
36
|
+
.ins-recommendation-v3-block-v2 .product-name ue-node-panel,
|
|
37
|
+
.ins-recommendation-v3-block-v2 .product-price ue-node-actions,
|
|
38
|
+
.ins-recommendation-v3-block-v2 .product-price ue-node-panel,
|
|
39
|
+
.ins-recommendation-v3-block-v2 .product-old-price ue-node-actions,
|
|
40
|
+
.ins-recommendation-v3-block-v2 .product-old-price ue-node-panel,
|
|
41
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-price ue-node-actions,
|
|
42
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-price ue-node-panel,
|
|
43
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-discount ue-node-actions,
|
|
44
|
+
.ins-recommendation-v3-block-v2 .product-omnibus-discount ue-node-panel,
|
|
45
|
+
.ins-recommendation-v3-block-v2 .product-button ue-node-actions,
|
|
46
|
+
.ins-recommendation-v3-block-v2 .product-button ue-node-panel {
|
|
24
47
|
display: none !important;
|
|
25
48
|
}
|
|
49
|
+
|
|
50
|
+
/* Apply to the table cell (td) with text-trim-enabled class */
|
|
51
|
+
.text-trim-enabled {
|
|
52
|
+
max-width: 0 !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.text-trim-enabled p {
|
|
56
|
+
overflow: hidden !important;
|
|
57
|
+
text-overflow: ellipsis !important;
|
|
58
|
+
white-space: nowrap !important;
|
|
59
|
+
margin: 0 !important;
|
|
60
|
+
display: block !important;
|
|
61
|
+
}
|
|
26
62
|
`;
|
|
27
63
|
export {
|
|
28
64
|
n as default
|
package/dist/stores/config.js
CHANGED
|
@@ -64,6 +64,13 @@ const s = o("guido-config", {
|
|
|
64
64
|
var e;
|
|
65
65
|
return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
|
|
66
66
|
},
|
|
67
|
+
/**
|
|
68
|
+
* Get the callbacks configuration
|
|
69
|
+
*/
|
|
70
|
+
callbacks: (i) => {
|
|
71
|
+
var e;
|
|
72
|
+
return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
|
|
73
|
+
},
|
|
67
74
|
/**
|
|
68
75
|
* Get the template ID
|
|
69
76
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.c9db5fd",
|
|
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",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "",
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stripoinc/ui-editor-extensions": "3.
|
|
34
|
+
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
35
35
|
"@useinsider/design-system-vue": "0.14.20",
|
|
36
36
|
"@vueuse/core": "11.3.0",
|
|
37
37
|
"lodash-es": "4.17.21",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"guido": {
|
|
87
87
|
"stripo": {
|
|
88
|
-
"version": "2.
|
|
88
|
+
"version": "2.52.0"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var y = (n, o, i) => o in n ? m(n, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[o] = i;
|
|
3
|
-
var a = (n, o, i) => y(n, typeof o != "symbol" ? o + "" : o, i);
|
|
4
|
-
import { ModificationDescription as u } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
-
import { CommonControl as b } from "../common-control.js";
|
|
6
|
-
const h = "ui-elements-recommendation-card-composition", s = [
|
|
7
|
-
{ key: "productImage", label: "Product Image", visible: !0 },
|
|
8
|
-
{ key: "productName", label: "Product Name", visible: !0 },
|
|
9
|
-
{ key: "productPrice", label: "Product Price", visible: !0 },
|
|
10
|
-
{ key: "productOriginalPrice", label: "Product Original Price", visible: !0 },
|
|
11
|
-
{ key: "productButton", label: "Product Button", visible: !0 }
|
|
12
|
-
];
|
|
13
|
-
class g extends b {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
a(this, "currentComposition", []);
|
|
17
|
-
a(this, "currentVisibility", {});
|
|
18
|
-
}
|
|
19
|
-
getId() {
|
|
20
|
-
return h;
|
|
21
|
-
}
|
|
22
|
-
getTemplate() {
|
|
23
|
-
const i = s.map((e) => ({
|
|
24
|
-
key: e.key,
|
|
25
|
-
label: e.label,
|
|
26
|
-
content: `
|
|
27
|
-
<div style="display: flex; align-items: center; justify-content: space-between;
|
|
28
|
-
padding: 8px; gap: 8px;">
|
|
29
|
-
<span style="flex: 1;">${e.label}</span>
|
|
30
|
-
${this._GuToggle(`visibility_${e.key}`)}
|
|
31
|
-
</div>
|
|
32
|
-
`
|
|
33
|
-
}));
|
|
34
|
-
return `
|
|
35
|
-
<div class="container">
|
|
36
|
-
${this._GuLabel({ text: "Card Element Order & Visibility" })}
|
|
37
|
-
${this._GuOrderable("cardComposition", i)}
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
onRender() {
|
|
42
|
-
this._initializeComposition(), this.api.onValueChanged("cardComposition", (i) => {
|
|
43
|
-
this.currentComposition = i, this._applyCompositionToBlock(i);
|
|
44
|
-
}), s.forEach((i) => {
|
|
45
|
-
this.api.onValueChanged(`visibility_${i.key}`, (e) => {
|
|
46
|
-
this.currentVisibility[i.key] = e, this._applyVisibilityToBlock();
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
onTemplateNodeUpdated(i) {
|
|
51
|
-
super.onTemplateNodeUpdated(i), this._initializeComposition();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Initialize the composition order and visibility from the block or use defaults
|
|
55
|
-
*/
|
|
56
|
-
_initializeComposition() {
|
|
57
|
-
var p;
|
|
58
|
-
const i = (p = this.currentNode) == null ? void 0 : p.querySelector(".ins-recommendation-v3-block-v2");
|
|
59
|
-
let e = null, l = null;
|
|
60
|
-
if (i && "getAttribute" in i && (e = i.getAttribute("data-card-composition"), l = i.getAttribute("data-card-visibility")), e) {
|
|
61
|
-
const t = e.split(",").filter(Boolean), r = s.map((c) => c.key);
|
|
62
|
-
t.every((c) => r.includes(c)) && t.length > 0 ? this.currentComposition = t : this.currentComposition = r;
|
|
63
|
-
} else
|
|
64
|
-
this.currentComposition = s.map((t) => t.key);
|
|
65
|
-
if (l)
|
|
66
|
-
try {
|
|
67
|
-
const t = JSON.parse(l);
|
|
68
|
-
this.currentVisibility = t;
|
|
69
|
-
} catch {
|
|
70
|
-
this.currentVisibility = s.reduce((t, r) => (t[r.key] = r.visible, t), {});
|
|
71
|
-
}
|
|
72
|
-
else
|
|
73
|
-
this.currentVisibility = s.reduce((t, r) => (t[r.key] = r.visible, t), {});
|
|
74
|
-
const d = {
|
|
75
|
-
cardComposition: this.currentComposition
|
|
76
|
-
};
|
|
77
|
-
s.forEach((t) => {
|
|
78
|
-
d[`visibility_${t.key}`] = this.currentVisibility[t.key] ?? !0;
|
|
79
|
-
}), this.api.updateValues(d);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Apply the reordered composition to the block's HTML structure
|
|
83
|
-
*/
|
|
84
|
-
_applyCompositionToBlock(i) {
|
|
85
|
-
if (!this.currentNode)
|
|
86
|
-
return;
|
|
87
|
-
const e = this.currentNode.querySelector(".ins-recommendation-v3-block-v2");
|
|
88
|
-
e && this.api.getDocumentModifier().modifyHtml(e).setAttribute("data-card-composition", i.join(",")).apply(new u("Stored card composition order"));
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Apply visibility changes to the block's HTML structure
|
|
92
|
-
*/
|
|
93
|
-
_applyVisibilityToBlock() {
|
|
94
|
-
if (!this.currentNode)
|
|
95
|
-
return;
|
|
96
|
-
const i = this.currentNode.querySelector(".ins-recommendation-v3-block-v2");
|
|
97
|
-
i && this.api.getDocumentModifier().modifyHtml(i).setAttribute("data-card-visibility", JSON.stringify(this.currentVisibility)).apply(new u("Stored card visibility settings"));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
export {
|
|
101
|
-
h as COMPOSITION_CONTROL_BLOCK_ID,
|
|
102
|
-
g as RecommendationCardCompositionControl
|
|
103
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var o = /* @__PURE__ */ ((c) => (c.BUTTON = "recommendation-block-button", c.NAME = "recommendation-block-name", c.PRICE = "recommendation-block-price", c.OLD_PRICE = "recommendation-block-old-price", c.IMAGE = "recommendation-block-image", c))(o || {}), r = /* @__PURE__ */ ((c) => (c.BUTTON_ALIGN = "recommendation-block-button-align-control", c.BUTTON_BORDER = "recommendation-block-button-border-control", c.BUTTON_BORDER_RADIUS = "recommendation-block-button-border-radius-control", c.BUTTON_COLOR = "recommendation-block-button-color-control", c.BUTTON_FIT_TO_CONTENT = "recommendation-block-button-fit-to-content-control", c.BUTTON_FONT_FAMILY = "recommendation-block-button-font-family-control", c.BUTTON_MARGINS = "recommendation-block-button-margins-control", c.BUTTON_PADDINGS = "recommendation-block-button-paddings-control", c.BUTTON_TEXT = "recommendation-block-button-text-control", c.BUTTON_TEXT_SIZE = "recommendation-block-button-text-size-control", c.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "recommendation-block-button-text-style-and-font-color-control", c.NAME_ALIGN = "recommendation-block-name-align-control", c.NAME_BACKGROUND = "recommendation-block-name-background-control", c.NAME_COLOR = "recommendation-block-name-color-control", c.NAME_FONT_FAMILY = "recommendation-block-name-font-family-control", c.NAME_PADDINGS = "recommendation-block-name-paddings-control", c.NAME_SIZE = "recommendation-block-name-size-control", c.NAME_STYLE = "recommendation-block-name-style-control", c.PRICE_ALIGN = "recommendation-block-price-align-control", c.PRICE_BACKGROUND = "recommendation-block-price-background-control", c.PRICE_COLOR = "recommendation-block-price-color-control", c.PRICE_FONT_FAMILY = "recommendation-block-price-font-family-control", c.PRICE_PADDINGS = "recommendation-block-price-paddings-control", c.PRICE_SIZE = "recommendation-block-price-size-control", c.PRICE_STYLE = "recommendation-block-price-style-control", c.OLD_PRICE_ALIGN = "recommendation-block-old-price-align-control", c.OLD_PRICE_BACKGROUND = "recommendation-block-old-price-background-control", c.OLD_PRICE_COLOR = "recommendation-block-old-price-color-control", c.OLD_PRICE_FONT_FAMILY = "recommendation-block-old-price-font-family-control", c.OLD_PRICE_PADDINGS = "recommendation-block-old-price-paddings-control", c.OLD_PRICE_SIZE = "recommendation-block-old-price-size-control", c.OLD_PRICE_STYLE = "recommendation-block-old-price-style-control", c.IMAGE_SIZE = "recommendation-block-image-size-control", c.IMAGE_MARGINS = "recommendation-block-image-margins-control", c))(r || {});
|
|
2
|
-
export {
|
|
3
|
-
o as RecommendationBlockId,
|
|
4
|
-
r as RecommendationControlId
|
|
5
|
-
};
|