@useinsider/guido 1.0.3-beta.d1ff593 → 1.0.3-beta.d6f4719

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 (68) hide show
  1. package/README.md +126 -0
  2. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  3. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
  4. package/dist/components/organisms/header/RightSlot.vue.js +5 -5
  5. package/dist/components/organisms/header/RightSlot.vue2.js +20 -19
  6. package/dist/composables/useBlocksConfig.js +58 -0
  7. package/dist/composables/usePartner.js +9 -5
  8. package/dist/composables/useStripo.js +39 -50
  9. package/dist/config/migrator/index.js +6 -7
  10. package/dist/enums/defaults.js +10 -5
  11. package/dist/extensions/Blocks/Recommendation/block.js +2 -5
  12. package/dist/extensions/Blocks/Recommendation/control.js +40 -68
  13. package/dist/extensions/Blocks/Recommendation/extension.js +6 -25
  14. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -58
  15. package/dist/extensions/Blocks/Recommendation/template.js +151 -265
  16. package/dist/extensions/Blocks/common-control.js +43 -125
  17. package/dist/guido.css +1 -1
  18. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +104 -289
  19. package/dist/src/@types/generic.d.ts +7 -0
  20. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  21. package/dist/src/composables/useBlocksConfig.d.ts +11 -0
  22. package/dist/src/composables/usePartner.d.ts +1 -0
  23. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -1
  24. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -6
  25. package/dist/src/extensions/Blocks/Recommendation/template.d.ts +1 -38
  26. package/dist/src/extensions/Blocks/common-control.d.ts +0 -21
  27. package/dist/src/stores/config.d.ts +4 -0
  28. package/package.json +2 -2
  29. package/dist/config/migrator/recommendationMigrator.js +0 -203
  30. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -335
  31. package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -12
  32. package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -12
  33. package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -12
  34. package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -12
  35. package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -12
  36. package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -12
  37. package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -12
  38. package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -12
  39. package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -12
  40. package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -12
  41. package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -12
  42. package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -12
  43. package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -12
  44. package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -12
  45. package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -12
  46. package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -12
  47. package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -12
  48. package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -12
  49. package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
  50. package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -65
  51. package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
  52. package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
  53. package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
  54. package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
  55. package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
  56. package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
  57. package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
  58. package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
  59. package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
  60. package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
  61. package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
  62. package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
  63. package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
  64. package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
  65. package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
  66. package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
  67. package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
  68. package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
@@ -1,12 +0,0 @@
1
- import { ButtonBorderRadiusBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class d extends o {
3
- getId() {
4
- return "recommendation-block-button-border-radius-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- d as ButtonBorderRadiusControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonColorBuiltInControl as t } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends t {
3
- getId() {
4
- return "recommendation-block-button-color-control";
5
- }
6
- getTargetNodes(o) {
7
- return o.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- l as ButtonColorControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonFitToContainerBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class c extends o {
3
- getId() {
4
- return "recommendation-block-button-fit-to-content-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- c as ButtonFitToContentControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonFontFamilyBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends o {
3
- getId() {
4
- return "recommendation-block-button-font-family-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- l as ButtonFontFamilyControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonMarginsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class s extends o {
3
- getId() {
4
- return "recommendation-block-button-margins-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- s as ButtonMarginsControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonPaddingsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class d extends o {
3
- getId() {
4
- return "recommendation-block-button-paddings-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- d as ButtonPaddingsControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonTextBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends o {
3
- getId() {
4
- return "recommendation-block-button-text-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- l as ButtonTextControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonTextSizeBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends e {
3
- getId() {
4
- return "recommendation-block-button-text-size-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- l as ButtonTextSizeControl
12
- };
@@ -1,12 +0,0 @@
1
- import { ButtonTextStyleAndFontColorBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends o {
3
- getId() {
4
- return "recommendation-block-button-text-style-and-font-color-control";
5
- }
6
- getTargetNodes(t) {
7
- return t.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-button"]');
8
- }
9
- }
10
- export {
11
- l as ButtonTextStyleAndFontColorControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextAlignBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends o {
3
- getId() {
4
- return "recommendation-block-name-align-control";
5
- }
6
- getTargetNodes(e) {
7
- return e.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- l as NameAlignControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextBlockBackgroundBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class c extends o {
3
- getId() {
4
- return "recommendation-block-name-background-control";
5
- }
6
- getTargetNodes(e) {
7
- return e.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- c as NameBackgroundControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextColorBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class c extends e {
3
- getId() {
4
- return "recommendation-block-name-color-control";
5
- }
6
- getTargetNodes(o) {
7
- return o.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- c as NameColorControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextFontFamilyBuiltInControl as e } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class c extends e {
3
- getId() {
4
- return "recommendation-block-name-font-family-control";
5
- }
6
- getTargetNodes(o) {
7
- return o.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- c as NameFontFamilyControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextPaddingsBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class d extends o {
3
- getId() {
4
- return "recommendation-block-name-paddings-control";
5
- }
6
- getTargetNodes(e) {
7
- return e.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- d as NamePaddingsControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextSizeBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class c extends o {
3
- getId() {
4
- return "recommendation-block-name-size-control";
5
- }
6
- getTargetNodes(e) {
7
- return e.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- c as NameSizeControl
12
- };
@@ -1,12 +0,0 @@
1
- import { TextStyleBuiltInControl as o } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class c extends o {
3
- getId() {
4
- return "recommendation-block-name-style-control";
5
- }
6
- getTargetNodes(e) {
7
- return e.closest(".ins-recommendation-product-container").querySelectorAll('[esd-extension-block-id="recommendation-block-name"]');
8
- }
9
- }
10
- export {
11
- c as NameStyleControl
12
- };
@@ -1 +0,0 @@
1
- export declare function migrateRecommendation(html: string): string;
@@ -1,65 +0,0 @@
1
- import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
- import { CommonControl } from '../common-control';
3
- export declare const COMPOSITION_CONTROL_BLOCK_ID = "ui-elements-recommendation-card-composition";
4
- export interface CardCompositionItem {
5
- key: string;
6
- label: string;
7
- }
8
- export declare class RecommendationCardCompositionControl extends CommonControl {
9
- private currentComposition;
10
- private currentStyling;
11
- getId(): string;
12
- getTemplate(): string;
13
- _getTextColor(label: string, name: string): string;
14
- _getFontFamily(label: string, name: string): string;
15
- /**
16
- * Generate styling controls for Product Name element
17
- */
18
- private _getProductNameStylingControls;
19
- /**
20
- * Generate styling controls for Product Price element
21
- */
22
- private _getProductPriceStylingControls;
23
- /**
24
- * Generate styling controls for Product Original Price element
25
- */
26
- private _getProductOriginalPriceStylingControls;
27
- /**
28
- * Generate styling controls for Product Button element
29
- */
30
- private _getProductButtonStylingControls;
31
- onRender(): void;
32
- onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
33
- /**
34
- * Initialize the composition order from the block or use defaults
35
- */
36
- private _initializeComposition;
37
- /**
38
- * Apply the reordered composition to the block's HTML structure
39
- */
40
- private _applyCompositionToBlock;
41
- /**
42
- * Initialize styling from stored block attributes
43
- */
44
- private _initializeStyling;
45
- /**
46
- * Load default styling values and populate controls
47
- */
48
- private _loadDefaultStyling;
49
- /**
50
- * Populate control values with current styling
51
- */
52
- private _populateControlsWithStyling;
53
- /**
54
- * Update styling object for a specific element and property
55
- */
56
- private _updateElementStyling;
57
- /**
58
- * Persist current styling to block attributes
59
- */
60
- private _persistStyling;
61
- /**
62
- * Apply styling to a specific element in the DOM
63
- */
64
- private _applyStylingToElement;
65
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonAlignBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonAlignControl extends ButtonAlignBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonBorderBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonBorderControl extends ButtonBorderBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonBorderRadiusBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonBorderRadiusControl extends ButtonBorderRadiusBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonColorBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonColorControl extends ButtonColorBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonFitToContainerBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonFitToContentControl extends ButtonFitToContainerBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonFontFamilyBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonFontFamilyControl extends ButtonFontFamilyBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonMarginsBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonMarginsControl extends ButtonMarginsBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonPaddingsBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonPaddingsControl extends ButtonPaddingsBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonTextBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonTextControl extends ButtonTextBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonTextSizeBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonTextSizeControl extends ButtonTextSizeBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, ButtonTextStyleAndFontColorBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class ButtonTextStyleAndFontColorControl extends ButtonTextStyleAndFontColorBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextAlignBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NameAlignControl extends TextAlignBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextBlockBackgroundBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NameBackgroundControl extends TextBlockBackgroundBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextColorBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NameColorControl extends TextColorBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextFontFamilyBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NameFontFamilyControl extends TextFontFamilyBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextPaddingsBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NamePaddingsControl extends TextPaddingsBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextSizeBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NameSizeControl extends TextSizeBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }
@@ -1,5 +0,0 @@
1
- import { ImmutableHtmlNode, TextStyleBuiltInControl } from '@stripoinc/ui-editor-extensions';
2
- export declare class NameStyleControl extends TextStyleBuiltInControl {
3
- getId(): string;
4
- getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
5
- }