@useinsider/guido 1.0.3-beta.901ea7e → 1.0.3-beta.90a7855
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/README.md +3 -0
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +92 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +36 -36
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +3 -2
- package/dist/extensions/Blocks/Items/extension.js +7 -6
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +2 -2
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +17 -5
- package/dist/extensions/Blocks/Items/settingsPanel.js +25 -24
- package/dist/extensions/Blocks/Items/store/items-block.js +7 -3
- package/dist/extensions/Blocks/Items/template.js +32 -30
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +35 -26
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +29 -27
- package/dist/extensions/Blocks/Unsubscribe/block.js +34 -30
- package/dist/guido.css +1 -1
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +15 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +6 -0
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +3 -4
- package/package.json +3 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
import { CommonControl } from '../../../common-control';
|
|
3
|
+
import { ItemsBlockControlId } from '../../enums/controlEnums';
|
|
4
|
+
export declare const CONTROL_BLOCK_ID = ItemsBlockControlId.PRICE_ORIENTATION;
|
|
5
|
+
export declare class PriceOrientationControl extends CommonControl {
|
|
6
|
+
private store;
|
|
7
|
+
getId(): string;
|
|
8
|
+
getTemplate(): string;
|
|
9
|
+
onRender(): void;
|
|
10
|
+
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
11
|
+
_onPriceOrientationChange(value: string): void;
|
|
12
|
+
private _updateHorizontalLayout;
|
|
13
|
+
private _updateVerticalLayout;
|
|
14
|
+
_getPriceOrientation(): string;
|
|
15
|
+
}
|
|
@@ -44,6 +44,7 @@ export declare enum ItemsBlockControlId {
|
|
|
44
44
|
PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control",
|
|
45
45
|
PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control",
|
|
46
46
|
PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control",
|
|
47
|
+
PRICE_ORIENTATION = "items-block-price-orientation-control",
|
|
47
48
|
NAME_ALIGN = "items-block-name-align-control",
|
|
48
49
|
NAME_COLOR = "items-block-name-color-control",
|
|
49
50
|
NAME_SIZE = "items-block-name-size-control",
|
|
@@ -8,6 +8,7 @@ export declare const configAttributes: {
|
|
|
8
8
|
PRODUCT_PRICE_FORMATTED: string;
|
|
9
9
|
PRODUCT_PRICE_CURRENCY_SYMBOL: string;
|
|
10
10
|
PRODUCT_PRICE_CURRENCY_LOCATION: string;
|
|
11
|
+
PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION: string;
|
|
11
12
|
PRODUCT_BUTTON_LINK: string;
|
|
12
13
|
PRODUCT_IMAGE_LINK: string;
|
|
13
14
|
PRODUCT_NAME_CONTROL_VALUE: string;
|
|
@@ -10,6 +10,7 @@ interface ItemsBlockState {
|
|
|
10
10
|
currencySymbol: string;
|
|
11
11
|
currencyLocation: string;
|
|
12
12
|
formattedPrice: boolean;
|
|
13
|
+
priceOrientation: 'vertical' | 'horizontal';
|
|
13
14
|
templateData: {
|
|
14
15
|
imageSrc: string;
|
|
15
16
|
name: string;
|
|
@@ -30,6 +31,7 @@ export declare const useItemsBlockStore: import("pinia").StoreDefinition<"guidoI
|
|
|
30
31
|
setCurrencySymbol(currencySymbol: string): void;
|
|
31
32
|
setCurrencyLocation(currencyLocation: string): void;
|
|
32
33
|
setFormattedPrice(formattedPrice: boolean): void;
|
|
34
|
+
setPriceOrientation(priceOrientation: "vertical" | "horizontal"): void;
|
|
33
35
|
setTemplateData(templateData: ItemsBlockState["templateData"]): void;
|
|
34
36
|
updateFromAttributes(attributes: {
|
|
35
37
|
itemsType?: string;
|
|
@@ -42,3 +42,9 @@ export declare function syncButtonLinkFromAttributes(currentNode: ImmutableHtmlN
|
|
|
42
42
|
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
43
43
|
*/
|
|
44
44
|
export declare function syncImageLinkFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
45
|
+
/**
|
|
46
|
+
* Reads price orientation value from esd-config-block attribute and updates the store.
|
|
47
|
+
* This makes the price orientation value mutable by syncing it from the DOM.
|
|
48
|
+
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
49
|
+
*/
|
|
50
|
+
export declare function syncPriceOrientationFromAttributes(currentNode: ImmutableHtmlNode | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ImmutableHtmlElementNode } from '@stripoinc/ui-editor-extensions';
|
|
2
2
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
3
3
|
export declare const UNSUBSCRIBE_BLOCK_ID = "unsubscribe-block";
|
|
4
4
|
export declare class UnsubscribeBlock extends Block {
|
|
@@ -12,9 +12,8 @@ export declare class UnsubscribeBlock extends Block {
|
|
|
12
12
|
getName(): string;
|
|
13
13
|
getDescription(): string;
|
|
14
14
|
getTemplate(): string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onDelete(node: ImmutableHtmlNode): undefined;
|
|
15
|
+
onSelect(node: ImmutableHtmlElementNode): void;
|
|
16
|
+
onDelete(node: ImmutableHtmlElementNode): void;
|
|
18
17
|
onDestroy(): void;
|
|
19
18
|
private _setupSelectEventListener;
|
|
20
19
|
private _removeSelectEventListener;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.90a7855",
|
|
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",
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
"vue": "2.7.14"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@commitlint/cli": "20.2.0",
|
|
45
|
+
"@commitlint/config-conventional": "20.2.0",
|
|
44
46
|
"@cspell/eslint-plugin": "8.17.5",
|
|
45
47
|
"@eslint/eslintrc": "3.3.0",
|
|
46
48
|
"@eslint/js": "8.57.1",
|