easy-email-pro-theme 1.37.2 → 1.37.3

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/lib/index.js CHANGED
@@ -26461,6 +26461,16 @@ const arrayStringAdapter = {
26461
26461
  return val.join(",");
26462
26462
  }
26463
26463
  };
26464
+ const directionAdapter = {
26465
+ formatter(direction) {
26466
+ return direction === "rtl";
26467
+ },
26468
+ normalize(isRTL) {
26469
+ if (!isRTL)
26470
+ return void 0;
26471
+ return "rtl";
26472
+ }
26473
+ };
26464
26474
  const transparentIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAABAElEQVRIie2WwW7CMBBEZ8NKOJd8CPRABVVJ+fxUUEgQPbT9kBziFAWbU4FkjXCBICExtxk9Z7KxZYWSJLFoiJmbEYwxMMaI/JC1dv+oQmvE8QTWWvDo5VUs/FwtHSUWvmxTwUniQhHRdUuIyJm3Oslf6dVLmtMQEfhjNhVgFEUiq6oCvmye5zXPSnUF1Os/iSxLF/BlZ9P3mm9tTw4/231uvKuo9RIA4MHzUITHrgpfNgxDFFrv/E0meZT8S/zz/SXCsvyVIDP82U7dr9cSGsdvIsvSBXzZm10rj5KzJf99AGTpXGRB4H4fF6uUgi7LfYnrCLq18eSAqtpAddXObwEoMVtvVloS0QAAAABJRU5ErkJggg==";
26465
26475
  const transparentColor$1 = "rgba(0,0,0,0)";
26466
26476
  function ColorPicker$1(props) {
@@ -36526,6 +36536,7 @@ const getFallbackValue = (params) => {
36526
36536
  return mode === ActiveTabKeys.DESKTOP ? get(defaultElement, "attributes." + name) : get(defaultElement, "mobileAttributes." + name);
36527
36537
  };
36528
36538
  function Typography(props) {
36539
+ const { showTextDirectionMode } = useEditorProps();
36529
36540
  const { label = t("Font"), path: path2, defaultElement } = props;
36530
36541
  return useMemo$1(() => {
36531
36542
  return /* @__PURE__ */ React__default.createElement("div", { key: props.type }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
@@ -36606,7 +36617,13 @@ function Typography(props) {
36606
36617
  path: path2,
36607
36618
  name: `${props.name}`
36608
36619
  }
36609
- )));
36620
+ ), showTextDirectionMode && /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 20 } }, /* @__PURE__ */ React__default.createElement(
36621
+ AttributeField.RTLDirection,
36622
+ {
36623
+ name: `${props.name}.direction`,
36624
+ path: path2
36625
+ }
36626
+ ))));
36610
36627
  }, [
36611
36628
  defaultElement,
36612
36629
  label,
@@ -36616,7 +36633,8 @@ function Typography(props) {
36616
36633
  props.hideStyle,
36617
36634
  props.mode,
36618
36635
  props.name,
36619
- props.type
36636
+ props.type,
36637
+ showTextDirectionMode
36620
36638
  ]);
36621
36639
  }
36622
36640
  const elements = [
@@ -36910,6 +36928,7 @@ const PaddingRow = (props) => {
36910
36928
  };
36911
36929
  function Buttons(props) {
36912
36930
  const { label = t("Font"), type, defaultElement, path: path2 } = props;
36931
+ const { showTextDirectionMode } = useEditorProps();
36913
36932
  return useMemo$1(() => {
36914
36933
  return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
36915
36934
  AttributeField.FontFamily,
@@ -37017,7 +37036,14 @@ function Buttons(props) {
37017
37036
  path: path2,
37018
37037
  name: `${props.name}`
37019
37038
  }
37020
- ), !props.hidePadding && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Divider$2, null), /* @__PURE__ */ React__default.createElement(
37039
+ ), showTextDirectionMode && /* @__PURE__ */ React__default.createElement("div", { style: { marginTop: 20 } }, /* @__PURE__ */ React__default.createElement(
37040
+ AttributeField.RTLDirection,
37041
+ {
37042
+ label: t(`RTL text direction `),
37043
+ name: `${props.name}.direction`,
37044
+ path: path2
37045
+ }
37046
+ )), !props.hidePadding && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Divider$2, null), /* @__PURE__ */ React__default.createElement(
37021
37047
  AttributeField.Padding,
37022
37048
  {
37023
37049
  path: path2,
@@ -37032,6 +37058,7 @@ function Buttons(props) {
37032
37058
  props.hidePadding,
37033
37059
  props.mode,
37034
37060
  props.name,
37061
+ showTextDirectionMode,
37035
37062
  type
37036
37063
  ]);
37037
37064
  }
@@ -38409,6 +38436,31 @@ function ButtonContent(props) {
38409
38436
  return /* @__PURE__ */ React__default.createElement(AttributeField.TextField, { path: props.path, name: "text", label });
38410
38437
  }, [label, props]);
38411
38438
  }
38439
+ function RTLDirection(props) {
38440
+ const _a = props, { path: path2, name } = _a, rest = __objRest(_a, ["path", "name"]);
38441
+ return useMemo$1(() => {
38442
+ return /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
38443
+ AttributeField.SwitchField,
38444
+ __spreadProps(__spreadValues({
38445
+ label: rest.label || /* @__PURE__ */ React__default.createElement(Space, null, t(`RTL text direction `)),
38446
+ name,
38447
+ path: path2
38448
+ }, rest), {
38449
+ formItem: __spreadProps(__spreadValues(__spreadValues({}, rest.formItem), directionAdapter), {
38450
+ wrapperCol: {
38451
+ span: 10,
38452
+ style: {
38453
+ textAlign: "right"
38454
+ }
38455
+ },
38456
+ labelCol: {
38457
+ span: 12
38458
+ }
38459
+ })
38460
+ })
38461
+ )));
38462
+ }, [name, path2, rest]);
38463
+ }
38412
38464
  const defaultAttributeFields = {
38413
38465
  // Basic Form Field
38414
38466
  WatchField,
@@ -38428,6 +38480,7 @@ const defaultAttributeFields = {
38428
38480
  // Attributes Field
38429
38481
  Heading,
38430
38482
  Direction,
38483
+ RTLDirection,
38431
38484
  Preheader,
38432
38485
  Height,
38433
38486
  Width,
@@ -0,0 +1,9 @@
1
+ import React, { ComponentProps } from "react";
2
+ import { AttributeField } from ".";
3
+ export declare const DirectionOptions: {
4
+ value: string;
5
+ readonly label: string;
6
+ }[];
7
+ export declare function RTLDirection(props: Omit<ComponentProps<typeof AttributeField.SwitchField>, "label" | "options"> & {
8
+ label?: React.ReactNode;
9
+ }): React.JSX.Element;
@@ -34,6 +34,7 @@ import { Direction } from "./Direction";
34
34
  import { FieldItem } from "../WidgetConfigPanel/widgetFields";
35
35
  import { Preheader } from "./Preheader";
36
36
  import { ButtonContent } from "./ButtonContent";
37
+ import { RTLDirection } from "./RTLDirection";
37
38
  export declare const defaultAttributeFields: {
38
39
  WatchField: (props: import("../../../Form/WatchField").WatchFieldProps) => import("react").JSX.Element;
39
40
  SyncChildrenField: (props: import("../../../Form/SyncChildrenField").SyncChildrenFieldProps) => import("react").JSX.Element;
@@ -70,6 +71,7 @@ export declare const defaultAttributeFields: {
70
71
  PixelAndPercentField: typeof PixelAndPercentField;
71
72
  Heading: typeof Heading;
72
73
  Direction: typeof Direction;
74
+ RTLDirection: typeof RTLDirection;
73
75
  Preheader: typeof Preheader;
74
76
  Height: typeof Height;
75
77
  Width: typeof Width;
@@ -0,0 +1,4 @@
1
+ export declare const directionAdapter: {
2
+ formatter(direction?: "rtl" | "ltr"): boolean;
3
+ normalize(isRTL?: boolean): "rtl" | undefined;
4
+ };
@@ -7,3 +7,4 @@ export { fontStyleAdapter } from "./fontStyle.adapter";
7
7
  export { fontWeightAdapter } from "./fontWeight.adapter";
8
8
  export { italicAdapter } from "./italic.adapter";
9
9
  export { arrayStringAdapter } from "./arrayString.adapter";
10
+ export { directionAdapter } from "./direction.adapter";
@@ -92,6 +92,7 @@ export interface PluginsCustomEditorTypes {
92
92
  showLogic?: boolean;
93
93
  showLayer?: boolean;
94
94
  showTextHTMLMode?: boolean;
95
+ showTextDirectionMode?: boolean;
95
96
  showDragMoveIcon?: boolean;
96
97
  showInsertTips?: boolean;
97
98
  layerConfig?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.37.2",
3
+ "version": "1.37.3",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"