easy-email-extensions 4.4.5 → 4.7.0
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/AttributePanel/components/adapter/Json.adapter.d.ts +4 -0
- package/lib/AttributePanel/components/adapter/color.adapter.d.ts +4 -0
- package/lib/AttributePanel/components/adapter/image-height.adapter.d.ts +4 -0
- package/lib/AttributePanel/components/adapter/index.d.ts +5 -0
- package/lib/AttributePanel/components/adapter/pixel.adapter.d.ts +4 -0
- package/lib/AttributePanel/components/adapter/slider.adapter.d.ts +4 -0
- package/lib/AttributePanel/components/attributes/BorderStyle.d.ts +1 -1
- package/lib/AttributePanel/components/attributes/Height.d.ts +3 -1
- package/lib/AttributePanel/components/attributes/Padding.d.ts +1 -0
- package/lib/AttributePanel/components/attributes/Width.d.ts +3 -1
- package/lib/AttributePanel/components/blocks/Page/index.d.ts +6 -1
- package/lib/AttributePanel/index.d.ts +1 -0
- package/lib/AttributePanel/utils/BlockAttributeConfigurationManager.d.ts +2 -1
- package/lib/ShortcutToolbar/components/BlocksPanel/presetTemplate/index.d.ts +5 -5
- package/lib/ShortcutToolbar/components/DragIcon/index.d.ts +1 -2
- package/lib/components/Form/ColorPickerField/index.d.ts +5 -0
- package/lib/components/Form/index.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/index2.js +1202 -911
- package/lib/index2.js.map +1 -1
- package/package.json +3 -3
package/lib/index2.js
CHANGED
@@ -56,7 +56,7 @@ var __async = (__this, __arguments, generator) => {
|
|
56
56
|
};
|
57
57
|
import * as React from "react";
|
58
58
|
import React__default, { Children, isValidElement, cloneElement, createContext, useContext, Component, useMemo, memo, forwardRef, useEffect, useRef, useLayoutEffect, useState, useImperativeHandle, PureComponent, useCallback, useReducer, createRef, Fragment, createElement, Suspense } from "react";
|
59
|
-
import { IconFont, useEditorProps,
|
59
|
+
import { IconFont, useEditorProps, Stack as Stack$4, useRefState, getShadowRoot, DATA_CONTENT_EDITABLE_TYPE, ContentEditableType, TextStyle, useEditorContext, useBlock, useFocusIdx, useFocusBlockLayout, MergeTagBadge, FIXED_CONTAINER_ID, getPluginElement, RICH_TEXT_BAR_ID, CONTENT_EDITABLE_CLASS_NAME, getEditorRoot, DATA_CONTENT_EDITABLE_IDX, scrollBlockEleIntoView, useHoverIdx, useDataTransfer, getBlockNodeByChildEle, getDirectionPosition, DATA_ATTRIBUTE_DROP_CONTAINER, BlockAvatarWrapper, isTextBlock, getBlockNodeByIdx, useLazyState, useActiveTab, ActiveTabKeys } from "easy-email-editor";
|
60
60
|
import { BasicType, ImageManager, EMAIL_BLOCK_CLASS_NAME, BlockManager, createBlockDataByType, AdvancedType, Operator, OperatorSymbol, isAdvancedBlock, getParentByIdx, getParentIdx, getIndexByIdx, getSiblingIdx, getNodeIdxFromClassName, getNodeIdxClassName, getPageIdx, getChildIdx, MjmlToJson, JsonToMjml, getNodeTypeFromClassName } from "easy-email-core";
|
61
61
|
import ReactDOM, { findDOMNode, createPortal } from "react-dom";
|
62
62
|
import { Field, useForm as useForm$1, useField, Form as Form$3, version as version$2, useFormState } from "react-final-form";
|
@@ -6669,7 +6669,7 @@ function isObject$e(obj) {
|
|
6669
6669
|
function isString$1(obj) {
|
6670
6670
|
return opt$1.call(obj) === "[object String]";
|
6671
6671
|
}
|
6672
|
-
function isNumber$
|
6672
|
+
function isNumber$2(obj) {
|
6673
6673
|
return opt$1.call(obj) === "[object Number]" && obj === obj;
|
6674
6674
|
}
|
6675
6675
|
function isUndefined(obj) {
|
@@ -7829,7 +7829,7 @@ var Notification = function(_super) {
|
|
7829
7829
|
if (options2.prefixCls) {
|
7830
7830
|
prefixCls = options2.prefixCls;
|
7831
7831
|
}
|
7832
|
-
if (isNumber$
|
7832
|
+
if (isNumber$2(options2.duration)) {
|
7833
7833
|
duration = options2.duration;
|
7834
7834
|
}
|
7835
7835
|
if (options2.getContainer && options2.getContainer() !== container$1) {
|
@@ -9621,7 +9621,7 @@ function autoSizeTextAreaHeight(autoSize, node) {
|
|
9621
9621
|
if (minRows || maxRows) {
|
9622
9622
|
mirrorTextArea.value = "";
|
9623
9623
|
var singleRowHeight = mirrorTextArea.scrollHeight - paddingSize;
|
9624
|
-
if (isNumber$
|
9624
|
+
if (isNumber$2(minRows)) {
|
9625
9625
|
minHeight = singleRowHeight * minRows;
|
9626
9626
|
if (boxSizing === "border-box") {
|
9627
9627
|
minHeight += paddingSize;
|
@@ -9629,7 +9629,7 @@ function autoSizeTextAreaHeight(autoSize, node) {
|
|
9629
9629
|
}
|
9630
9630
|
mirrorTextAreaHeight = Math.max(mirrorTextAreaHeight, minHeight);
|
9631
9631
|
}
|
9632
|
-
if (isNumber$
|
9632
|
+
if (isNumber$2(maxRows)) {
|
9633
9633
|
maxHeight = singleRowHeight * maxRows;
|
9634
9634
|
if (boxSizing === "border-box") {
|
9635
9635
|
maxHeight += paddingSize;
|
@@ -13123,7 +13123,7 @@ var VirtualList = React__default.forwardRef(function(props, ref) {
|
|
13123
13123
|
useComputeVirtualItemHeight(refItemHeightMap);
|
13124
13124
|
var itemCount = data.length;
|
13125
13125
|
var itemHeight = propItemHeight || refItemHeightMap.current[KEY_VIRTUAL_ITEM_HEIGHT] || DEFAULT_VIRTUAL_ITEM_HEIGHT;
|
13126
|
-
var viewportHeight = isNumber$
|
13126
|
+
var viewportHeight = isNumber$2(styleListMaxHeight) ? styleListMaxHeight : stateHeight;
|
13127
13127
|
var itemCountVisible = Math.ceil(viewportHeight / itemHeight);
|
13128
13128
|
var itemTotalHeight = itemHeight * itemCount;
|
13129
13129
|
var isVirtual = threshold !== null && itemCount >= threshold && itemTotalHeight > viewportHeight;
|
@@ -13446,7 +13446,7 @@ var VirtualList = React__default.forwardRef(function(props, ref) {
|
|
13446
13446
|
return null;
|
13447
13447
|
};
|
13448
13448
|
return React__default.createElement(ResizeObserver, { onResize: function() {
|
13449
|
-
if (refList.current && !isNumber$
|
13449
|
+
if (refList.current && !isNumber$2(styleListMaxHeight)) {
|
13450
13450
|
var clientHeight = refList.current.clientHeight;
|
13451
13451
|
setStateHeight(clientHeight);
|
13452
13452
|
}
|
@@ -13956,7 +13956,7 @@ function flatChildren(_a, _b, _c) {
|
|
13956
13956
|
var extendChildren = function(arr, origin) {
|
13957
13957
|
if (origin && isArray$c(arr) && arr.length) {
|
13958
13958
|
arr.forEach(function(option) {
|
13959
|
-
option = isString$1(option) || isNumber$
|
13959
|
+
option = isString$1(option) || isNumber$2(option) ? {
|
13960
13960
|
label: option,
|
13961
13961
|
value: option
|
13962
13962
|
} : option;
|
@@ -16636,7 +16636,7 @@ function SplitGroup(props, ref) {
|
|
16636
16636
|
};
|
16637
16637
|
function formatSize(size) {
|
16638
16638
|
var totalPX = isHorizontal ? wrapperRef.current.offsetWidth : wrapperRef.current.offsetHeight;
|
16639
|
-
if (!size || isNumber$
|
16639
|
+
if (!size || isNumber$2(size) && size < 0) {
|
16640
16640
|
return 0;
|
16641
16641
|
}
|
16642
16642
|
var percent = isString$1(size) ? parseFloat(size) / totalPX : size;
|
@@ -16983,7 +16983,7 @@ function ResizeBox(baseProps, ref) {
|
|
16983
16983
|
return __assign$X(__assign$X({}, pre), (_a2 = {}, _a2["padding" + styleDirection] = size, _a2));
|
16984
16984
|
});
|
16985
16985
|
}
|
16986
|
-
var wrapperStyles = __assign$X(__assign$X(__assign$X(__assign$X({}, paddingStyles), style || {}), isNumber$
|
16986
|
+
var wrapperStyles = __assign$X(__assign$X(__assign$X(__assign$X({}, paddingStyles), style || {}), isNumber$2(width) ? { width } : {}), isNumber$2(height) ? { height } : {});
|
16987
16987
|
var Tag2 = component;
|
16988
16988
|
return React__default.createElement(Tag2, { style: wrapperStyles, className: classNames, ref: wrapperRef }, children, directions.map(function(direction) {
|
16989
16989
|
if (allDirections.indexOf(direction) !== -1) {
|
@@ -17144,7 +17144,7 @@ function Sider(props, ref) {
|
|
17144
17144
|
var _g = __read$L(useMergeValue(false, {
|
17145
17145
|
value: props.collapsed
|
17146
17146
|
}), 2), collapsed = _g[0], setCollapsed = _g[1];
|
17147
|
-
var propsWidth = isNumber$
|
17147
|
+
var propsWidth = isNumber$2(width) ? width + "px" : String(width);
|
17148
17148
|
var _h = __read$L(useState(propsWidth), 2), siderWidth = _h[0], setSiderWidth = _h[1];
|
17149
17149
|
var refResponsiveHandlerToken = useRef(null);
|
17150
17150
|
var refStateForResponsiveHandler = useRef(null);
|
@@ -17177,7 +17177,7 @@ function Sider(props, ref) {
|
|
17177
17177
|
};
|
17178
17178
|
}, []);
|
17179
17179
|
useEffect(function() {
|
17180
|
-
var _collapsedWidth = isNumber$
|
17180
|
+
var _collapsedWidth = isNumber$2(collapsedWidth) ? collapsedWidth + "px" : String(collapsedWidth);
|
17181
17181
|
setSiderWidth(collapsed ? _collapsedWidth : propsWidth);
|
17182
17182
|
}, [collapsed, propsWidth, collapsedWidth]);
|
17183
17183
|
var resizable = resizeDirections && isArray$c(resizeDirections) || ((_b = resizeBoxProps.directions) === null || _b === void 0 ? void 0 : _b.length);
|
@@ -18519,7 +18519,7 @@ function DotLoading(props) {
|
|
18519
18519
|
var sizeNumber = props.size ? parseInt(String(props.size)) : 0;
|
18520
18520
|
return React__default.createElement("div", { className: prefixCls2 + "-list", style: {
|
18521
18521
|
height: props.size,
|
18522
|
-
width: isNumber$
|
18522
|
+
width: isNumber$2(sizeNumber) && sizeNumber > 0 ? sizeNumber * 7 : ""
|
18523
18523
|
} }, __spreadArray$h([], __read$G(new Array(5)), false).map(function(_, index2) {
|
18524
18524
|
return React__default.createElement("div", { key: index2, className: prefixCls2, style: dotStyle });
|
18525
18525
|
}));
|
@@ -20946,7 +20946,7 @@ function isObject(obj) {
|
|
20946
20946
|
function isString(obj) {
|
20947
20947
|
return opt.call(obj) === "[object String]";
|
20948
20948
|
}
|
20949
|
-
function isNumber(obj) {
|
20949
|
+
function isNumber$1(obj) {
|
20950
20950
|
return opt.call(obj) === "[object Number]" && obj === obj;
|
20951
20951
|
}
|
20952
20952
|
function isBoolean(obj) {
|
@@ -21163,7 +21163,7 @@ var StringValidator = /* @__PURE__ */ function(Base3) {
|
|
21163
21163
|
var NumberValidator = /* @__PURE__ */ function(Base3) {
|
21164
21164
|
function NumberValidator2(obj, options2) {
|
21165
21165
|
Base3.call(this, obj, Object.assign(Object.assign({}, options2), { type: "number" }));
|
21166
|
-
this.validate(options2 && options2.strict ? isNumber(this.obj) : true, this.getValidateMsg("type.number"));
|
21166
|
+
this.validate(options2 && options2.strict ? isNumber$1(this.obj) : true, this.getValidateMsg("type.number"));
|
21167
21167
|
}
|
21168
21168
|
if (Base3)
|
21169
21169
|
NumberValidator2.__proto__ = Base3;
|
@@ -22399,7 +22399,7 @@ function Col$1(baseProps, ref) {
|
|
22399
22399
|
var screenList = { xs, sm, md, lg, xl, xxl };
|
22400
22400
|
Object.keys(screenList).forEach(function(screen) {
|
22401
22401
|
var screenValue = screenList[screen];
|
22402
|
-
if (isNumber$
|
22402
|
+
if (isNumber$2(screenValue)) {
|
22403
22403
|
if (screenValue >= 0) {
|
22404
22404
|
mergeClassName2[prefixCls3 + "-" + screen + "-" + screenValue] = true;
|
22405
22405
|
}
|
@@ -23663,7 +23663,7 @@ function InputNumber(baseProps, ref) {
|
|
23663
23663
|
var prefixCls2 = getPrefixCls("input-number");
|
23664
23664
|
var mergedSize = size || ctxSize;
|
23665
23665
|
var mergedPrecision = function() {
|
23666
|
-
if (isNumber$
|
23666
|
+
if (isNumber$2(precision)) {
|
23667
23667
|
var decimal = ("" + step).split(".")[1];
|
23668
23668
|
var stepPrecision = decimal && decimal.length || 0;
|
23669
23669
|
return Math.max(stepPrecision, precision);
|
@@ -23687,7 +23687,7 @@ function InputNumber(baseProps, ref) {
|
|
23687
23687
|
}, []);
|
23688
23688
|
var setValue = function(newVal) {
|
23689
23689
|
setInnerValue(newVal);
|
23690
|
-
var newValue = isNumber$
|
23690
|
+
var newValue = isNumber$2(+newVal) ? +newVal : void 0;
|
23691
23691
|
if (newValue !== value) {
|
23692
23692
|
onChange && onChange(newValue);
|
23693
23693
|
}
|
@@ -23700,7 +23700,7 @@ function InputNumber(baseProps, ref) {
|
|
23700
23700
|
var finalValue = Number(changedValue);
|
23701
23701
|
if (!changedValue && changedValue !== 0) {
|
23702
23702
|
finalValue = void 0;
|
23703
|
-
} else if (!isNumber$
|
23703
|
+
} else if (!isNumber$2(finalValue)) {
|
23704
23704
|
finalValue = changedValue === "-" ? changedValue : "";
|
23705
23705
|
}
|
23706
23706
|
if (finalValue < min) {
|
@@ -23709,7 +23709,7 @@ function InputNumber(baseProps, ref) {
|
|
23709
23709
|
if (finalValue > max) {
|
23710
23710
|
finalValue = max;
|
23711
23711
|
}
|
23712
|
-
return isNumber$
|
23712
|
+
return isNumber$2(finalValue) ? isNumber$2(mergedPrecision) ? Number(toFixed(finalValue, mergedPrecision)) : finalValue : void 0;
|
23713
23713
|
}, [min, max, mergedPrecision]);
|
23714
23714
|
useEffect(function() {
|
23715
23715
|
return function() {
|
@@ -23720,7 +23720,7 @@ function InputNumber(baseProps, ref) {
|
|
23720
23720
|
refHasOperateSincePropValueChanged.current = false;
|
23721
23721
|
}, [props.value]);
|
23722
23722
|
useEffect(function() {
|
23723
|
-
var _isOutOfRange = isNumber$
|
23723
|
+
var _isOutOfRange = isNumber$2(min) && value < min || isNumber$2(max) && value > max;
|
23724
23724
|
if (_isOutOfRange && refHasOperateSincePropValueChanged.current) {
|
23725
23725
|
setValue(getLegalValue(value));
|
23726
23726
|
}
|
@@ -23753,7 +23753,7 @@ function InputNumber(baseProps, ref) {
|
|
23753
23753
|
var _value;
|
23754
23754
|
if (isUserInputting) {
|
23755
23755
|
_value = inputValue;
|
23756
|
-
} else if (isNumber$
|
23756
|
+
} else if (isNumber$2(value) && isNumber$2(mergedPrecision)) {
|
23757
23757
|
_value = toFixed(value, mergedPrecision);
|
23758
23758
|
} else if (value == null) {
|
23759
23759
|
_value = "";
|
@@ -23767,7 +23767,7 @@ function InputNumber(baseProps, ref) {
|
|
23767
23767
|
setIsUserInputting(true);
|
23768
23768
|
var targetValue = value2.trim().replace(/。/g, ".");
|
23769
23769
|
targetValue = parser ? parser(targetValue) : targetValue;
|
23770
|
-
if (isNumber$
|
23770
|
+
if (isNumber$2(+targetValue) || targetValue === "-" || !targetValue || targetValue === ".") {
|
23771
23771
|
var formatValue2 = getLegalValue(targetValue);
|
23772
23772
|
setInputValue(targetValue);
|
23773
23773
|
setValue(formatValue2);
|
@@ -25204,7 +25204,7 @@ var SliderButton = function(props) {
|
|
25204
25204
|
bottom: 12
|
25205
25205
|
}, ref: tooltip, popup: function() {
|
25206
25206
|
return renderTooltipContent(position);
|
25207
|
-
}, popupVisible, disabled: tooltipVisible === false, getPopupContainer: getTooltipContainer, position, childrenPrefix: getPrefixCls("tooltip") }, React__default.createElement("div", { className: cs$1(prefixCls2 + "-button", (_a = {}, _a[prefixCls2 + "-button-active"] = isActive, _a)), onMouseDown: handleMouseDown, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style, role: "slider", "aria-valuemax": props.maxValue, "aria-valuemin": props.minValue, "aria-valuenow": value, "aria-disabled": !!disabled, tabIndex: 0, "aria-valuetext": isString$1(tooltipText) || isNumber$
|
25207
|
+
}, popupVisible, disabled: tooltipVisible === false, getPopupContainer: getTooltipContainer, position, childrenPrefix: getPrefixCls("tooltip") }, React__default.createElement("div", { className: cs$1(prefixCls2 + "-button", (_a = {}, _a[prefixCls2 + "-button-active"] = isActive, _a)), onMouseDown: handleMouseDown, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style, role: "slider", "aria-valuemax": props.maxValue, "aria-valuemin": props.minValue, "aria-valuenow": value, "aria-disabled": !!disabled, tabIndex: 0, "aria-valuetext": isString$1(tooltipText) || isNumber$2(tooltipText) ? String(tooltipText) : void 0 }));
|
25208
25208
|
};
|
25209
25209
|
var SliderButton$1 = memo(SliderButton);
|
25210
25210
|
var __read$l = globalThis && globalThis.__read || function(o, n) {
|
@@ -25498,7 +25498,7 @@ function useLegalValue(props) {
|
|
25498
25498
|
} else {
|
25499
25499
|
console.error("value must be an array when range is true");
|
25500
25500
|
}
|
25501
|
-
} else if (isNumber$
|
25501
|
+
} else if (isNumber$2(val)) {
|
25502
25502
|
endVal = getLegalValue(val);
|
25503
25503
|
} else {
|
25504
25504
|
console.error("value must be a number when range is false");
|
@@ -25548,7 +25548,7 @@ function useInterval(props) {
|
|
25548
25548
|
var _a = props.marks, marks = _a === void 0 ? {} : _a, getIntervalConfig = props.getIntervalConfig, max = props.max, min = props.min;
|
25549
25549
|
var _b = useMemo(function() {
|
25550
25550
|
var markKeys = Object.keys(marks).filter(function(key) {
|
25551
|
-
return isNumber$
|
25551
|
+
return isNumber$2(+key) && +key >= min && +key <= max;
|
25552
25552
|
}).sort(function(a, b) {
|
25553
25553
|
return +a > +b ? 1 : -1;
|
25554
25554
|
});
|
@@ -25587,10 +25587,10 @@ function useInterval(props) {
|
|
25587
25587
|
var customConfig = getIntervalConfig([begin, end], index2) || {};
|
25588
25588
|
var step = customConfig.step;
|
25589
25589
|
var width = rateToFloat(customConfig.width);
|
25590
|
-
if (isNumber$
|
25590
|
+
if (isNumber$2(step) && step) {
|
25591
25591
|
config2.step = step;
|
25592
25592
|
}
|
25593
|
-
if (isNumber$
|
25593
|
+
if (isNumber$2(width) && width) {
|
25594
25594
|
config2.width = width;
|
25595
25595
|
}
|
25596
25596
|
return config2;
|
@@ -25936,7 +25936,7 @@ function Space(baseProps, ref) {
|
|
25936
25936
|
var innerAlign = align || (direction === "horizontal" ? "center" : "");
|
25937
25937
|
var classNames = cs$1(prefixCls2, (_a = {}, _a[prefixCls2 + "-" + direction] = direction, _a[prefixCls2 + "-align-" + innerAlign] = innerAlign, _a[prefixCls2 + "-wrap"] = wrap2, _a[prefixCls2 + "-rtl"] = rtl, _a), className);
|
25938
25938
|
function getMargin(size2) {
|
25939
|
-
if (isNumber$
|
25939
|
+
if (isNumber$2(size2)) {
|
25940
25940
|
return size2;
|
25941
25941
|
}
|
25942
25942
|
switch (size2) {
|
@@ -26604,7 +26604,7 @@ var TabHeader = React__default.forwardRef(function(props, ref) {
|
|
26604
26604
|
nextOffset_1 = bottomOffset;
|
26605
26605
|
} else if (scrollAlign_1 === "center") {
|
26606
26606
|
nextOffset_1 = topOffset - (diffStyle.top - diffStyle.bottom) / 2;
|
26607
|
-
} else if (isNumber$
|
26607
|
+
} else if (isNumber$2(scrollAlign_1)) {
|
26608
26608
|
nextOffset_1 = Math.max(topOffset - scrollAlign_1, bottomOffset);
|
26609
26609
|
}
|
26610
26610
|
return nextOffset_1;
|
@@ -26623,7 +26623,7 @@ var TabHeader = React__default.forwardRef(function(props, ref) {
|
|
26623
26623
|
nextOffset_2 = endOffset_1;
|
26624
26624
|
} else if (scrollAlign_2 === "center") {
|
26625
26625
|
nextOffset_2 = startOffset_1 + (diffStyle.left - diffStyle.right) / 2;
|
26626
|
-
} else if (isNumber$
|
26626
|
+
} else if (isNumber$2(scrollAlign_2)) {
|
26627
26627
|
nextOffset_2 = Math.min(startOffset_1 + scrollAlign_2, endOffset_1);
|
26628
26628
|
}
|
26629
26629
|
return nextOffset_2;
|
@@ -26641,7 +26641,7 @@ var TabHeader = React__default.forwardRef(function(props, ref) {
|
|
26641
26641
|
nextOffset = endOffset;
|
26642
26642
|
} else if (scrollAlign === "center") {
|
26643
26643
|
nextOffset = startOffset - (diffStyle.left - diffStyle.right) / 2;
|
26644
|
-
} else if (isNumber$
|
26644
|
+
} else if (isNumber$2(scrollAlign)) {
|
26645
26645
|
nextOffset = Math.max(startOffset - scrollAlign, endOffset);
|
26646
26646
|
}
|
26647
26647
|
return nextOffset;
|
@@ -27070,7 +27070,7 @@ var TreeAnimation = function(props) {
|
|
27070
27070
|
return result;
|
27071
27071
|
}, [childrenPropsList, props._key, expanded]);
|
27072
27072
|
var realHeight = (_a = treeContext.virtualListProps) === null || _a === void 0 ? void 0 : _a.height;
|
27073
|
-
realHeight = isNumber$
|
27073
|
+
realHeight = isNumber$2(realHeight) ? realHeight : 0;
|
27074
27074
|
useEffect(function() {
|
27075
27075
|
if (currentExpandKeys.indexOf(props._key) > -1 && filtedData.length === 0) {
|
27076
27076
|
treeContext.onExpandEnd(props._key);
|
@@ -29513,7 +29513,7 @@ IconEdit.defaultProps = {
|
|
29513
29513
|
IconEdit.displayName = "IconEdit";
|
29514
29514
|
var IconEdit$1 = IconEdit;
|
29515
29515
|
var isSingleNode = function(child) {
|
29516
|
-
return isString$1(child) || isNumber$
|
29516
|
+
return isString$1(child) || isNumber$2(child);
|
29517
29517
|
};
|
29518
29518
|
function mergedToString(children) {
|
29519
29519
|
var mergedResult = [""];
|
@@ -29668,7 +29668,7 @@ function useEllipsis(props) {
|
|
29668
29668
|
onEllipsis && onEllipsis(isEllipsis);
|
29669
29669
|
}, [isEllipsis]);
|
29670
29670
|
var isSimpleNode = function(node) {
|
29671
|
-
return isString$1(node) || isNumber$
|
29671
|
+
return isString$1(node) || isNumber$2(node);
|
29672
29672
|
};
|
29673
29673
|
var getTotalLen = function(list2) {
|
29674
29674
|
var total = 0;
|
@@ -30803,7 +30803,7 @@ function ImageUploader(props) {
|
|
30803
30803
|
const onChange = props.onChange;
|
30804
30804
|
const onUpload = useCallback(() => {
|
30805
30805
|
if (isUploading) {
|
30806
|
-
return Message$1.warning("Uploading...");
|
30806
|
+
return Message$1.warning(t("Uploading..."));
|
30807
30807
|
}
|
30808
30808
|
if (!uploadHandlerRef.current)
|
30809
30809
|
return;
|
@@ -30842,7 +30842,7 @@ function ImageUploader(props) {
|
|
30842
30842
|
props.onChange(picture);
|
30843
30843
|
setIsUploading(false);
|
30844
30844
|
} catch (error2) {
|
30845
|
-
Message$1.error((error2 == null ? void 0 : error2.message) || error2 || "Upload failed");
|
30845
|
+
Message$1.error((error2 == null ? void 0 : error2.message) || error2 || t("Upload failed"));
|
30846
30846
|
setIsUploading(false);
|
30847
30847
|
}
|
30848
30848
|
}
|
@@ -30876,10 +30876,10 @@ function ImageUploader(props) {
|
|
30876
30876
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
30877
30877
|
className: styles$8["btn-wrap"]
|
30878
30878
|
}, /* @__PURE__ */ React__default.createElement("a", {
|
30879
|
-
title: "Preview",
|
30879
|
+
title: t("Preview"),
|
30880
30880
|
onClick: () => setPreview(true)
|
30881
30881
|
}, /* @__PURE__ */ React__default.createElement(IconEye$1, null)), /* @__PURE__ */ React__default.createElement("a", {
|
30882
|
-
title: "Remove",
|
30882
|
+
title: t("Remove"),
|
30883
30883
|
onClick: () => onRemove()
|
30884
30884
|
}, /* @__PURE__ */ React__default.createElement(IconDelete$1, null)))));
|
30885
30885
|
}, [isUploading, onRemove, onUpload, props.value]);
|
@@ -30936,7 +30936,7 @@ function ImageUploader(props) {
|
|
30936
30936
|
footer: null,
|
30937
30937
|
onCancel: () => setPreview(false)
|
30938
30938
|
}, /* @__PURE__ */ React__default.createElement("img", {
|
30939
|
-
alt: "Preview",
|
30939
|
+
alt: t("Preview"),
|
30940
30940
|
style: { width: "100%" },
|
30941
30941
|
src: props.value
|
30942
30942
|
})));
|
@@ -30970,125 +30970,255 @@ function UploadField$1(props) {
|
|
30970
30970
|
onChange: inputDisabled ? void 0 : (value) => onChange(value)
|
30971
30971
|
});
|
30972
30972
|
}
|
30973
|
-
|
30974
|
-
|
30975
|
-
|
30976
|
-
|
30977
|
-
|
30978
|
-
|
30979
|
-
|
30980
|
-
|
30981
|
-
|
30973
|
+
function Select(props) {
|
30974
|
+
return /* @__PURE__ */ React__default.createElement(Select$2, __spreadProps(__spreadValues({}, props), {
|
30975
|
+
dropdownMenuClassName: "easy-email-overlay",
|
30976
|
+
style: lodash.exports.merge({ width: "100%" }, props.style),
|
30977
|
+
value: props.value,
|
30978
|
+
onChange: props.onChange
|
30979
|
+
}), props.options.map((item2, index2) => /* @__PURE__ */ React__default.createElement(Select$2.Option, {
|
30980
|
+
key: index2,
|
30981
|
+
value: item2.value
|
30982
|
+
}, item2.label)));
|
30982
30983
|
}
|
30983
|
-
|
30984
|
-
};
|
30985
|
-
|
30986
|
-
|
30987
|
-
|
30988
|
-
|
30989
|
-
}
|
30990
|
-
|
30991
|
-
|
30992
|
-
}
|
30993
|
-
|
30994
|
-
|
30995
|
-
}
|
30996
|
-
|
30997
|
-
|
30998
|
-
|
30999
|
-
|
31000
|
-
|
31001
|
-
|
31002
|
-
|
31003
|
-
|
31004
|
-
|
30984
|
+
function RadioGroup(props) {
|
30985
|
+
const _a = props, { type, vertical } = _a, rest = __objRest(_a, ["type", "vertical"]);
|
30986
|
+
return /* @__PURE__ */ React__default.createElement(Radio.Group, __spreadProps(__spreadValues({}, rest), {
|
30987
|
+
style: lodash.exports.merge({ width: "100%" }, rest.style),
|
30988
|
+
value: rest.value,
|
30989
|
+
onChange: rest.onChange
|
30990
|
+
}), /* @__PURE__ */ React__default.createElement(Stack$4, {
|
30991
|
+
vertical,
|
30992
|
+
spacing: "extraTight"
|
30993
|
+
}, rest.options.map((item2, index2) => /* @__PURE__ */ React__default.createElement(Radio, {
|
30994
|
+
key: index2,
|
30995
|
+
value: item2.value
|
30996
|
+
}, item2.label))));
|
30997
|
+
}
|
30998
|
+
const parse = (v) => v;
|
30999
|
+
function enhancer(Component2, changeAdapter, option) {
|
31000
|
+
return (props) => {
|
31001
|
+
const _a = props, {
|
31002
|
+
name: name2,
|
31003
|
+
validate: validate3,
|
31004
|
+
onChangeAdapter,
|
31005
|
+
changeOnBlur,
|
31006
|
+
inline,
|
31007
|
+
equalSpacing,
|
31008
|
+
formItem,
|
31009
|
+
label,
|
31010
|
+
required,
|
31011
|
+
style,
|
31012
|
+
helpText,
|
31013
|
+
autoComplete,
|
31014
|
+
labelHidden: labelHidden2
|
31015
|
+
} = _a, rest = __objRest(_a, [
|
31016
|
+
"name",
|
31017
|
+
"validate",
|
31018
|
+
"onChangeAdapter",
|
31019
|
+
"changeOnBlur",
|
31020
|
+
"inline",
|
31021
|
+
"equalSpacing",
|
31022
|
+
"formItem",
|
31023
|
+
"label",
|
31024
|
+
"required",
|
31025
|
+
"style",
|
31026
|
+
"helpText",
|
31027
|
+
"autoComplete",
|
31028
|
+
"labelHidden"
|
31029
|
+
]);
|
31030
|
+
const debounceTime = props.debounceTime || (option == null ? void 0 : option.debounceTime) || 300;
|
31031
|
+
const config2 = useMemo(() => {
|
31032
|
+
var _a2;
|
31033
|
+
return __spreadProps(__spreadValues({}, props.config), {
|
31034
|
+
validate: validate3,
|
31035
|
+
parse: ((_a2 = props.config) == null ? void 0 : _a2.parse) || parse
|
31036
|
+
});
|
31037
|
+
}, [props.config, validate3]);
|
31038
|
+
const [currentValue, setCurrentValue] = useState("");
|
31039
|
+
const currentValueRef = useRefState(currentValue);
|
31040
|
+
const layoutStyle = useMemo(() => {
|
31041
|
+
if (equalSpacing) {
|
31042
|
+
return {
|
31043
|
+
labelCol: {
|
31044
|
+
span: 11,
|
31045
|
+
style: {
|
31046
|
+
textAlign: "left",
|
31047
|
+
paddingRight: 0
|
31048
|
+
}
|
31049
|
+
},
|
31050
|
+
wrapperCol: {
|
31051
|
+
span: 11,
|
31052
|
+
offset: 1,
|
31053
|
+
style: {
|
31054
|
+
textAlign: "right"
|
31055
|
+
}
|
31056
|
+
}
|
31057
|
+
};
|
31005
31058
|
}
|
31006
|
-
|
31007
|
-
|
31008
|
-
|
31009
|
-
|
31010
|
-
|
31011
|
-
|
31012
|
-
|
31013
|
-
|
31014
|
-
|
31015
|
-
|
31016
|
-
|
31017
|
-
|
31018
|
-
|
31019
|
-
|
31020
|
-
|
31021
|
-
|
31022
|
-
|
31023
|
-
|
31024
|
-
|
31025
|
-
|
31026
|
-
|
31027
|
-
|
31028
|
-
|
31029
|
-
|
31030
|
-
|
31031
|
-
|
31032
|
-
|
31033
|
-
|
31034
|
-
|
31035
|
-
|
31036
|
-
|
31037
|
-
|
31038
|
-
|
31039
|
-
|
31040
|
-
|
31041
|
-
|
31042
|
-
|
31043
|
-
|
31059
|
+
if (inline) {
|
31060
|
+
return {
|
31061
|
+
labelCol: {
|
31062
|
+
span: 7,
|
31063
|
+
style: {
|
31064
|
+
textAlign: "right",
|
31065
|
+
paddingRight: 0
|
31066
|
+
}
|
31067
|
+
},
|
31068
|
+
wrapperCol: {
|
31069
|
+
span: 16,
|
31070
|
+
offset: 1,
|
31071
|
+
style: {}
|
31072
|
+
}
|
31073
|
+
};
|
31074
|
+
}
|
31075
|
+
return {
|
31076
|
+
labelCol: {
|
31077
|
+
span: 24,
|
31078
|
+
style: {
|
31079
|
+
paddingRight: 0
|
31080
|
+
}
|
31081
|
+
},
|
31082
|
+
wrapperCol: {
|
31083
|
+
span: 24
|
31084
|
+
}
|
31085
|
+
};
|
31086
|
+
}, [equalSpacing, inline]);
|
31087
|
+
return useMemo(() => {
|
31088
|
+
return /* @__PURE__ */ React__default.createElement(Field, __spreadValues({
|
31089
|
+
name: name2
|
31090
|
+
}, config2), ({ input: { onBlur: onBlur3, onChange, value }, meta }) => {
|
31091
|
+
const debounceCallbackChange = useCallback(lodash.exports.debounce((val) => {
|
31092
|
+
onChange(val);
|
31093
|
+
onBlur3();
|
31094
|
+
}, debounceTime, {}), [onChange, onBlur3]);
|
31095
|
+
const onFieldChange = useCallback((e) => {
|
31096
|
+
const newVal = onChangeAdapter ? onChangeAdapter(changeAdapter(e)) : changeAdapter(e);
|
31097
|
+
setCurrentValue(newVal);
|
31098
|
+
if (!changeOnBlur) {
|
31099
|
+
debounceCallbackChange(newVal);
|
31100
|
+
}
|
31101
|
+
}, [debounceCallbackChange]);
|
31102
|
+
const onFieldBlur = useCallback(() => {
|
31103
|
+
if (changeOnBlur) {
|
31104
|
+
onChange(currentValueRef.current);
|
31105
|
+
onBlur3();
|
31106
|
+
}
|
31107
|
+
}, [onBlur3, onChange]);
|
31108
|
+
useEffect(() => {
|
31109
|
+
setCurrentValue(value);
|
31110
|
+
}, [value]);
|
31111
|
+
return /* @__PURE__ */ React__default.createElement(Form.Item, __spreadProps(__spreadValues(__spreadValues({
|
31112
|
+
style: __spreadProps(__spreadValues({}, style), {
|
31113
|
+
margin: "0px"
|
31114
|
+
}),
|
31115
|
+
rules: required ? [{ required: true }] : void 0
|
31116
|
+
}, layoutStyle), formItem), {
|
31117
|
+
label: labelHidden2 ? void 0 : label || (formItem == null ? void 0 : formItem.label),
|
31118
|
+
labelAlign: "left",
|
31119
|
+
validateStatus: meta.touched && meta.error ? "error" : void 0,
|
31120
|
+
help: meta.touched && meta.error ? meta.error : helpText
|
31121
|
+
}), /* @__PURE__ */ React__default.createElement(Component2, __spreadProps(__spreadValues({
|
31122
|
+
autoComplete
|
31123
|
+
}, rest), {
|
31124
|
+
name: name2,
|
31125
|
+
checked: currentValue,
|
31126
|
+
value: currentValue,
|
31127
|
+
onChange: onFieldChange,
|
31128
|
+
onBlur: onFieldBlur
|
31129
|
+
})));
|
31130
|
+
});
|
31131
|
+
}, [
|
31132
|
+
autoComplete,
|
31133
|
+
changeOnBlur,
|
31134
|
+
config2,
|
31135
|
+
currentValue,
|
31136
|
+
currentValueRef,
|
31137
|
+
debounceTime,
|
31138
|
+
formItem,
|
31139
|
+
helpText,
|
31140
|
+
label,
|
31141
|
+
labelHidden2,
|
31142
|
+
layoutStyle,
|
31143
|
+
name2,
|
31144
|
+
onChangeAdapter,
|
31145
|
+
required,
|
31146
|
+
rest,
|
31147
|
+
style
|
31148
|
+
]);
|
31149
|
+
};
|
31150
|
+
}
|
31151
|
+
function Input(props) {
|
31152
|
+
const {
|
31153
|
+
quickchange,
|
31154
|
+
value = "",
|
31155
|
+
onKeyDown: onPropsKeyDown,
|
31156
|
+
onChange: propsOnChange
|
31157
|
+
} = props;
|
31158
|
+
const onChange = useCallback((val) => {
|
31159
|
+
propsOnChange(val);
|
31160
|
+
}, [propsOnChange]);
|
31161
|
+
const onKeyDown = useCallback((ev) => {
|
31162
|
+
if (onPropsKeyDown) {
|
31163
|
+
onPropsKeyDown == null ? void 0 : onPropsKeyDown(ev);
|
31044
31164
|
}
|
31045
|
-
|
31046
|
-
|
31047
|
-
|
31048
|
-
|
31049
|
-
|
31050
|
-
|
31051
|
-
|
31052
|
-
|
31053
|
-
|
31054
|
-
|
31055
|
-
|
31056
|
-
|
31057
|
-
|
31058
|
-
|
31059
|
-
|
31060
|
-
|
31061
|
-
const PresetColorsContext = React__default.createContext({
|
31062
|
-
colors: [],
|
31063
|
-
addCurrentColor: () => {
|
31064
|
-
}
|
31065
|
-
});
|
31066
|
-
const PresetColorsProvider = (props) => {
|
31067
|
-
const [currentColors, setCurrentColors] = useLocalStorage$1(CURRENT_COLORS_KEY, defaultPresetColor);
|
31068
|
-
const currentColorsRef = useRefState(currentColors);
|
31069
|
-
const colorDivRef = useRef(document.createElement("div"));
|
31070
|
-
const addCurrentColor = useCallback(lodash.exports.debounce((newColor) => {
|
31071
|
-
colorDivRef.current.style.color = "";
|
31072
|
-
colorDivRef.current.style.color = newColor;
|
31073
|
-
if (colorDivRef.current.style.color) {
|
31074
|
-
if (currentColorsRef.current.includes(newColor))
|
31075
|
-
return;
|
31076
|
-
const newColors = [...new Set([...currentColorsRef.current, newColor])].filter(Boolean).slice(-MAX_RECORD_SIZE);
|
31077
|
-
setCurrentColors(newColors);
|
31165
|
+
if (quickchange) {
|
31166
|
+
let step = 0;
|
31167
|
+
if (ev.key === "ArrowUp") {
|
31168
|
+
step = 1;
|
31169
|
+
}
|
31170
|
+
if (ev.key === "ArrowDown") {
|
31171
|
+
step = -1;
|
31172
|
+
}
|
31173
|
+
if (step) {
|
31174
|
+
if (/^\d+/.test(value)) {
|
31175
|
+
ev.preventDefault();
|
31176
|
+
onChange(String(value).replace(/^(\d+)/, (_, match) => {
|
31177
|
+
return (Number(match) + step).toString();
|
31178
|
+
}));
|
31179
|
+
}
|
31180
|
+
}
|
31078
31181
|
}
|
31079
|
-
},
|
31080
|
-
|
31081
|
-
|
31082
|
-
|
31083
|
-
|
31084
|
-
|
31085
|
-
|
31086
|
-
|
31087
|
-
|
31088
|
-
|
31089
|
-
|
31090
|
-
},
|
31091
|
-
|
31182
|
+
}, [onPropsKeyDown, quickchange, value, onChange]);
|
31183
|
+
return /* @__PURE__ */ React__default.createElement(Input$4, __spreadProps(__spreadValues({}, __spreadProps(__spreadValues({}, props), { quickchange: void 0 })), {
|
31184
|
+
onChange: (value2) => onChange(value2),
|
31185
|
+
onKeyDown
|
31186
|
+
}));
|
31187
|
+
}
|
31188
|
+
function InputWithUnit(props) {
|
31189
|
+
const _a = props, {
|
31190
|
+
value = "",
|
31191
|
+
onKeyDown: onPropsKeyDown,
|
31192
|
+
unitOptions: propsUnitOptions
|
31193
|
+
} = _a, restProps = __objRest(_a, [
|
31194
|
+
"value",
|
31195
|
+
"onKeyDown",
|
31196
|
+
"unitOptions"
|
31197
|
+
]);
|
31198
|
+
return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({
|
31199
|
+
value
|
31200
|
+
}, restProps), {
|
31201
|
+
quickchange: true
|
31202
|
+
}));
|
31203
|
+
}
|
31204
|
+
function CheckBoxGroup(props) {
|
31205
|
+
const _a = props, { vertical = false } = _a, rest = __objRest(_a, ["vertical"]);
|
31206
|
+
return /* @__PURE__ */ React__default.createElement(Checkbox$1.Group, {
|
31207
|
+
style: lodash.exports.merge({ width: "100%" }, rest.style),
|
31208
|
+
value: rest.value,
|
31209
|
+
onChange: rest.onChange
|
31210
|
+
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
31211
|
+
vertical,
|
31212
|
+
spacing: "extraTight"
|
31213
|
+
}, rest.options.map((item2, index2) => /* @__PURE__ */ React__default.createElement(Checkbox$1, {
|
31214
|
+
style: rest.checkboxStyle,
|
31215
|
+
key: index2,
|
31216
|
+
value: item2.value
|
31217
|
+
}, item2.label))));
|
31218
|
+
}
|
31219
|
+
function classnames(...rest) {
|
31220
|
+
return rest.filter((item2) => typeof item2 === "string").join(" ");
|
31221
|
+
}
|
31092
31222
|
const helperText = "_helperText_1m9nq_1";
|
31093
31223
|
const labelHidden = "_label-hidden_1m9nq_9";
|
31094
31224
|
const editTab = "_editTab_1m9nq_20";
|
@@ -31104,6 +31234,145 @@ var styles$7 = {
|
|
31104
31234
|
inputWithUnitSelectOption,
|
31105
31235
|
colorPicker
|
31106
31236
|
};
|
31237
|
+
const { TabPane: TabPane$1 } = Tabs$1;
|
31238
|
+
function EditTab(props) {
|
31239
|
+
const { value, additionItem } = props;
|
31240
|
+
const [activeTab, setActiveTab] = useState("0");
|
31241
|
+
const onAddTab = () => {
|
31242
|
+
setActiveTab(value.length.toString());
|
31243
|
+
props.onChange([...value, additionItem]);
|
31244
|
+
};
|
31245
|
+
const onDeleteTab = (index2) => {
|
31246
|
+
if (index2 < activeTab) {
|
31247
|
+
setActiveTab((Number(activeTab) - 1).toString());
|
31248
|
+
}
|
31249
|
+
if (index2 === activeTab) {
|
31250
|
+
setActiveTab(Number(index2) > 0 ? `${Number(index2) - 1}` : "0");
|
31251
|
+
}
|
31252
|
+
props.onChange(value.filter((_, vIndex) => Number(index2) !== vIndex));
|
31253
|
+
};
|
31254
|
+
return /* @__PURE__ */ React__default.createElement(Tabs$1, {
|
31255
|
+
destroyOnHide: true,
|
31256
|
+
className: classnames(styles$7.editTab),
|
31257
|
+
style: { border: "none" },
|
31258
|
+
type: "card",
|
31259
|
+
activeTab,
|
31260
|
+
tabPosition: props.tabPosition,
|
31261
|
+
editable: true,
|
31262
|
+
onAddTab,
|
31263
|
+
onDeleteTab,
|
31264
|
+
onChange: setActiveTab
|
31265
|
+
}, (Array.isArray(value) ? value : []).map((item2, index2) => /* @__PURE__ */ React__default.createElement(TabPane$1, {
|
31266
|
+
style: { paddingLeft: 12 },
|
31267
|
+
title: `${props.label || t("Tab")} ${index2 + 1}`,
|
31268
|
+
key: index2
|
31269
|
+
}, props.renderItem(item2, index2))));
|
31270
|
+
}
|
31271
|
+
function EditGridTab(props) {
|
31272
|
+
const { value, additionItem } = props;
|
31273
|
+
const onAdd = (index2) => {
|
31274
|
+
let newItem = additionItem || lodash.exports.cloneDeep(value[index2]);
|
31275
|
+
value.splice(index2 + 1, 0, newItem);
|
31276
|
+
props.onChange([...value]);
|
31277
|
+
};
|
31278
|
+
const onDelete = (index2) => {
|
31279
|
+
props.onChange(value.filter((_, vIndex) => Number(index2) !== vIndex));
|
31280
|
+
};
|
31281
|
+
return /* @__PURE__ */ React__default.createElement(Card$1, {
|
31282
|
+
bordered: false
|
31283
|
+
}, (Array.isArray(value) ? value : []).map((item2, index2) => /* @__PURE__ */ React__default.createElement(Card$1.Grid, {
|
31284
|
+
style: { width: "100%" },
|
31285
|
+
key: index2
|
31286
|
+
}, /* @__PURE__ */ React__default.createElement(Card$1, {
|
31287
|
+
title: /* @__PURE__ */ React__default.createElement(Space$1, null, /* @__PURE__ */ React__default.createElement(Typography$1.Text, null, t("Item"), " ", index2 + 1)),
|
31288
|
+
extra: /* @__PURE__ */ React__default.createElement(Space$1, {
|
31289
|
+
size: "large"
|
31290
|
+
}, /* @__PURE__ */ React__default.createElement(IconPlus$1, {
|
31291
|
+
style: { color: "#000", cursor: "pointer" },
|
31292
|
+
onClick: () => onAdd(index2)
|
31293
|
+
}), /* @__PURE__ */ React__default.createElement(IconClose$1, {
|
31294
|
+
style: { color: "#000", cursor: "pointer" },
|
31295
|
+
onClick: () => onDelete(index2)
|
31296
|
+
}))
|
31297
|
+
}, props.renderItem(item2, index2)))));
|
31298
|
+
}
|
31299
|
+
function InlineText({ idx, onChange, children }) {
|
31300
|
+
const {
|
31301
|
+
mutators: { setFieldTouched }
|
31302
|
+
} = useForm$1();
|
31303
|
+
useField(idx);
|
31304
|
+
useEffect(() => {
|
31305
|
+
const shadowRoot = getShadowRoot();
|
31306
|
+
const onPaste = (e) => {
|
31307
|
+
var _a, _b;
|
31308
|
+
if (!(e.target instanceof Element) || !e.target.getAttribute("contenteditable"))
|
31309
|
+
return;
|
31310
|
+
e.preventDefault();
|
31311
|
+
const text = ((_a = e.clipboardData) == null ? void 0 : _a.getData("text/plain")) || "";
|
31312
|
+
document.execCommand("insertHTML", false, text);
|
31313
|
+
const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);
|
31314
|
+
if (contentEditableType === ContentEditableType.RichText) {
|
31315
|
+
onChange(e.target.innerHTML || "");
|
31316
|
+
} else if (contentEditableType === ContentEditableType.Text) {
|
31317
|
+
onChange(((_b = e.target.textContent) == null ? void 0 : _b.trim()) || "");
|
31318
|
+
}
|
31319
|
+
};
|
31320
|
+
const onInput = (e) => {
|
31321
|
+
var _a;
|
31322
|
+
if (e.target instanceof Element && e.target.getAttribute("contenteditable")) {
|
31323
|
+
const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);
|
31324
|
+
if (contentEditableType === ContentEditableType.RichText) {
|
31325
|
+
onChange(e.target.innerHTML || "");
|
31326
|
+
} else if (contentEditableType === ContentEditableType.Text) {
|
31327
|
+
onChange(((_a = e.target.textContent) == null ? void 0 : _a.trim()) || "");
|
31328
|
+
}
|
31329
|
+
}
|
31330
|
+
};
|
31331
|
+
shadowRoot.addEventListener("paste", onPaste, true);
|
31332
|
+
shadowRoot.addEventListener("input", onInput);
|
31333
|
+
return () => {
|
31334
|
+
shadowRoot.removeEventListener("paste", onPaste, true);
|
31335
|
+
shadowRoot.removeEventListener("input", onInput);
|
31336
|
+
};
|
31337
|
+
}, [onChange, setFieldTouched]);
|
31338
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
|
31339
|
+
}
|
31340
|
+
function AutoComplete(props) {
|
31341
|
+
const options2 = useMemo(() => {
|
31342
|
+
const selectedValue = (props.value || "").toLowerCase();
|
31343
|
+
return props.options.filter((item2) => {
|
31344
|
+
return lodash.exports.isString(item2.value) && item2.value.toLowerCase().startsWith(selectedValue) || lodash.exports.isString(item2.label) && item2.label.toLowerCase().startsWith(selectedValue);
|
31345
|
+
}).map((item2) => __spreadProps(__spreadValues({}, item2), { name: item2.label }));
|
31346
|
+
}, [props.options, props.value]);
|
31347
|
+
return /* @__PURE__ */ React__default.createElement(ArcoAutoComplete, __spreadProps(__spreadValues({}, props), {
|
31348
|
+
data: options2
|
31349
|
+
}));
|
31350
|
+
}
|
31351
|
+
function isNumber(num) {
|
31352
|
+
if (typeof num !== "string" && typeof num !== "number")
|
31353
|
+
return false;
|
31354
|
+
return new RegExp("^(\\-|\\+)?\\d+(\\.\\d+)?$").test(num.toString());
|
31355
|
+
}
|
31356
|
+
const pixelAdapter = {
|
31357
|
+
format(val) {
|
31358
|
+
if (!lodash.exports.isString(val) && !val)
|
31359
|
+
return "";
|
31360
|
+
val = val.toString();
|
31361
|
+
if (/^\d+px$/.test(val.trim()))
|
31362
|
+
return val.trim().replace("px", "");
|
31363
|
+
return val.trim();
|
31364
|
+
},
|
31365
|
+
parse(val) {
|
31366
|
+
if (!lodash.exports.isString(val) && !isNumber(val))
|
31367
|
+
return void 0;
|
31368
|
+
val = val.toString().trim();
|
31369
|
+
if (!val)
|
31370
|
+
return void 0;
|
31371
|
+
if (/^\d+$/.test(val))
|
31372
|
+
return val + "px";
|
31373
|
+
return val;
|
31374
|
+
}
|
31375
|
+
};
|
31107
31376
|
var colorString$1 = { exports: {} };
|
31108
31377
|
var colorName = {
|
31109
31378
|
"aliceblue": [240, 248, 255],
|
@@ -32615,6 +32884,171 @@ function zeroArray(array, length2) {
|
|
32615
32884
|
}
|
32616
32885
|
var color = Color$1;
|
32617
32886
|
var Color$2 = color;
|
32887
|
+
const colorAdapter = {
|
32888
|
+
format(val) {
|
32889
|
+
if (!lodash.exports.isString(val) && !val)
|
32890
|
+
return "";
|
32891
|
+
val = val.toString();
|
32892
|
+
if (val.length === 7 && val.startsWith("#"))
|
32893
|
+
return val.replace("#", "");
|
32894
|
+
return val;
|
32895
|
+
},
|
32896
|
+
parse(val) {
|
32897
|
+
if (!lodash.exports.isString(val))
|
32898
|
+
return void 0;
|
32899
|
+
val = val.toString().trim();
|
32900
|
+
if (!val)
|
32901
|
+
return void 0;
|
32902
|
+
try {
|
32903
|
+
if (val.length === 6 && Color$2(`#${val}`).hex())
|
32904
|
+
return `#${val}`;
|
32905
|
+
} catch (error2) {
|
32906
|
+
console.log("err", val);
|
32907
|
+
}
|
32908
|
+
return val;
|
32909
|
+
}
|
32910
|
+
};
|
32911
|
+
const imageHeightAdapter = {
|
32912
|
+
format(val) {
|
32913
|
+
if (!lodash.exports.isString(val) && !val)
|
32914
|
+
return "";
|
32915
|
+
val = val.toString();
|
32916
|
+
if (val === "auto")
|
32917
|
+
return void 0;
|
32918
|
+
if (/^\d+px$/.test(val.trim()))
|
32919
|
+
return val.trim().replace("px", "");
|
32920
|
+
return val.trim();
|
32921
|
+
},
|
32922
|
+
parse(val) {
|
32923
|
+
if (!lodash.exports.isString(val) && !isNumber(val))
|
32924
|
+
return void 0;
|
32925
|
+
val = val.toString().trim();
|
32926
|
+
if (!val)
|
32927
|
+
return void 0;
|
32928
|
+
if (/^\d+$/.test(val))
|
32929
|
+
return val + "px";
|
32930
|
+
return val;
|
32931
|
+
}
|
32932
|
+
};
|
32933
|
+
const defaultImagesMap$1 = {
|
32934
|
+
IMAGE_59: "https://easy-email-m-ryan.vercel.app/images/06ca521d-9728-4de6-a709-1b75a828bfc3-2a9b1224-3d71-43b8-b52f-e7cdcdc9107b.png",
|
32935
|
+
AttributePanel_01: "https://easy-email-m-ryan.vercel.app/images/e22f78f2-aa76-408d-ba94-c95c7abe1908-image.png",
|
32936
|
+
AttributePanel_02: "https://easy-email-m-ryan.vercel.app/images/3e952a6e-2506-470e-b395-3e0d995157c5.png",
|
32937
|
+
AttributePanel_03: "https://easy-email-m-ryan.vercel.app/images/Fi_vI4vyLhTM-Tp6ivq4dR_ieGHk.png"
|
32938
|
+
};
|
32939
|
+
ImageManager.add(defaultImagesMap$1);
|
32940
|
+
function getImg$1(name2) {
|
32941
|
+
return ImageManager.get(name2);
|
32942
|
+
}
|
32943
|
+
var noop = function() {
|
32944
|
+
};
|
32945
|
+
var isBrowser = typeof window !== "undefined";
|
32946
|
+
var useLocalStorage = function(key, initialValue, options2) {
|
32947
|
+
if (!isBrowser) {
|
32948
|
+
return [initialValue, noop, noop];
|
32949
|
+
}
|
32950
|
+
if (!key) {
|
32951
|
+
throw new Error("useLocalStorage key may not be falsy");
|
32952
|
+
}
|
32953
|
+
var deserializer = options2 ? options2.raw ? function(value) {
|
32954
|
+
return value;
|
32955
|
+
} : options2.deserializer : JSON.parse;
|
32956
|
+
var initializer = useRef(function(key2) {
|
32957
|
+
try {
|
32958
|
+
var serializer = options2 ? options2.raw ? String : options2.serializer : JSON.stringify;
|
32959
|
+
var localStorageValue = localStorage.getItem(key2);
|
32960
|
+
if (localStorageValue !== null) {
|
32961
|
+
return deserializer(localStorageValue);
|
32962
|
+
} else {
|
32963
|
+
initialValue && localStorage.setItem(key2, serializer(initialValue));
|
32964
|
+
return initialValue;
|
32965
|
+
}
|
32966
|
+
} catch (_a2) {
|
32967
|
+
return initialValue;
|
32968
|
+
}
|
32969
|
+
});
|
32970
|
+
var _a = useState(function() {
|
32971
|
+
return initializer.current(key);
|
32972
|
+
}), state = _a[0], setState = _a[1];
|
32973
|
+
useLayoutEffect(function() {
|
32974
|
+
return setState(initializer.current(key));
|
32975
|
+
}, [key]);
|
32976
|
+
var set2 = useCallback(function(valOrFunc) {
|
32977
|
+
try {
|
32978
|
+
var newState = typeof valOrFunc === "function" ? valOrFunc(state) : valOrFunc;
|
32979
|
+
if (typeof newState === "undefined")
|
32980
|
+
return;
|
32981
|
+
var value = void 0;
|
32982
|
+
if (options2)
|
32983
|
+
if (options2.raw)
|
32984
|
+
if (typeof newState === "string")
|
32985
|
+
value = newState;
|
32986
|
+
else
|
32987
|
+
value = JSON.stringify(newState);
|
32988
|
+
else if (options2.serializer)
|
32989
|
+
value = options2.serializer(newState);
|
32990
|
+
else
|
32991
|
+
value = JSON.stringify(newState);
|
32992
|
+
else
|
32993
|
+
value = JSON.stringify(newState);
|
32994
|
+
localStorage.setItem(key, value);
|
32995
|
+
setState(deserializer(value));
|
32996
|
+
} catch (_a2) {
|
32997
|
+
}
|
32998
|
+
}, [key, setState]);
|
32999
|
+
var remove = useCallback(function() {
|
33000
|
+
try {
|
33001
|
+
localStorage.removeItem(key);
|
33002
|
+
setState(void 0);
|
33003
|
+
} catch (_a2) {
|
33004
|
+
}
|
33005
|
+
}, [key, setState]);
|
33006
|
+
return [state, set2, remove];
|
33007
|
+
};
|
33008
|
+
var useLocalStorage$1 = useLocalStorage;
|
33009
|
+
const defaultPresetColor = [
|
33010
|
+
"#000000",
|
33011
|
+
"#FFFFFF",
|
33012
|
+
"#9b9b9b",
|
33013
|
+
"#d0021b",
|
33014
|
+
"#4a90e2",
|
33015
|
+
"#7ed321",
|
33016
|
+
"#bd10e0",
|
33017
|
+
"#f8e71c"
|
33018
|
+
];
|
33019
|
+
const CURRENT_COLORS_KEY = "CURRENT_COLORS_KEY";
|
33020
|
+
const MAX_RECORD_SIZE = 20;
|
33021
|
+
const PresetColorsContext = React__default.createContext({
|
33022
|
+
colors: [],
|
33023
|
+
addCurrentColor: () => {
|
33024
|
+
}
|
33025
|
+
});
|
33026
|
+
const PresetColorsProvider = (props) => {
|
33027
|
+
const [currentColors, setCurrentColors] = useLocalStorage$1(CURRENT_COLORS_KEY, defaultPresetColor);
|
33028
|
+
const currentColorsRef = useRefState(currentColors);
|
33029
|
+
const colorDivRef = useRef(document.createElement("div"));
|
33030
|
+
const addCurrentColor = useCallback(lodash.exports.debounce((newColor) => {
|
33031
|
+
colorDivRef.current.style.color = "";
|
33032
|
+
colorDivRef.current.style.color = newColor;
|
33033
|
+
if (colorDivRef.current.style.color) {
|
33034
|
+
if (currentColorsRef.current.includes(newColor))
|
33035
|
+
return;
|
33036
|
+
const newColors = [...new Set([...currentColorsRef.current, newColor])].filter(Boolean).slice(-MAX_RECORD_SIZE);
|
33037
|
+
setCurrentColors(newColors);
|
33038
|
+
}
|
33039
|
+
}, 500), [currentColorsRef, setCurrentColors]);
|
33040
|
+
const value = useMemo(() => {
|
33041
|
+
return {
|
33042
|
+
colors: currentColors,
|
33043
|
+
addCurrentColor
|
33044
|
+
};
|
33045
|
+
}, [addCurrentColor, currentColors]);
|
33046
|
+
return useMemo(() => {
|
33047
|
+
return /* @__PURE__ */ React__default.createElement(PresetColorsContext.Provider, {
|
33048
|
+
value
|
33049
|
+
}, props.children);
|
33050
|
+
}, [props.children, value]);
|
33051
|
+
};
|
32618
33052
|
const transparentColor$1 = "rgba(0,0,0,0)";
|
32619
33053
|
function ColorPickerContent(props) {
|
32620
33054
|
const { colors: presetColors } = useContext(PresetColorsContext);
|
@@ -32667,7 +33101,7 @@ function ColorPickerContent(props) {
|
|
32667
33101
|
paddingLeft: 10,
|
32668
33102
|
position: "relative"
|
32669
33103
|
}
|
32670
|
-
}, /* @__PURE__ */ React__default.createElement("span", null, "Picker..."), /* @__PURE__ */ React__default.createElement("input", {
|
33104
|
+
}, /* @__PURE__ */ React__default.createElement("span", null, t("Picker...")), /* @__PURE__ */ React__default.createElement("input", {
|
32671
33105
|
style: {
|
32672
33106
|
position: "absolute",
|
32673
33107
|
width: "100%",
|
@@ -32706,6 +33140,21 @@ function ColorPicker(props) {
|
|
32706
33140
|
const getPopupContainer = useCallback(() => {
|
32707
33141
|
return getCollapseItemEle(refEle);
|
32708
33142
|
}, [refEle]);
|
33143
|
+
const inputColor = useMemo(() => {
|
33144
|
+
var _a, _b, _c;
|
33145
|
+
if (((_a = props.value) == null ? void 0 : _a.startsWith("#")) && ((_b = props.value) == null ? void 0 : _b.length) === 7)
|
33146
|
+
return (_c = props.value) == null ? void 0 : _c.replace("#", "");
|
33147
|
+
return props.value;
|
33148
|
+
}, [props.value]);
|
33149
|
+
const adapterColor = useMemo(() => {
|
33150
|
+
try {
|
33151
|
+
if (value.length === 6 && Color$2(`#${value}`).hex())
|
33152
|
+
return `#${value}`;
|
33153
|
+
} catch (error2) {
|
33154
|
+
console.log("err", value);
|
33155
|
+
}
|
33156
|
+
return value;
|
33157
|
+
}, [value]);
|
32709
33158
|
return /* @__PURE__ */ React__default.createElement("div", {
|
32710
33159
|
style: { flex: 1, display: "flex" }
|
32711
33160
|
}, /* @__PURE__ */ React__default.createElement(Popover$1, __spreadValues({
|
@@ -32713,7 +33162,7 @@ function ColorPicker(props) {
|
|
32713
33162
|
trigger: "click",
|
32714
33163
|
className: "color-picker-popup",
|
32715
33164
|
content: /* @__PURE__ */ React__default.createElement(ColorPickerContent, {
|
32716
|
-
value,
|
33165
|
+
value: adapterColor,
|
32717
33166
|
onChange: onInputChange
|
32718
33167
|
}),
|
32719
33168
|
getPopupContainer
|
@@ -32741,7 +33190,7 @@ function ColorPicker(props) {
|
|
32741
33190
|
width: "100%",
|
32742
33191
|
height: "100%",
|
32743
33192
|
textAlign: "center",
|
32744
|
-
backgroundColor:
|
33193
|
+
backgroundColor: adapterColor
|
32745
33194
|
}
|
32746
33195
|
}) : /* @__PURE__ */ React__default.createElement("img", {
|
32747
33196
|
style: {
|
@@ -32756,374 +33205,19 @@ function ColorPicker(props) {
|
|
32756
33205
|
}
|
32757
33206
|
|
32758
33207
|
`))), showInput && /* @__PURE__ */ React__default.createElement(Input$4, {
|
32759
|
-
value:
|
33208
|
+
value: inputColor,
|
32760
33209
|
style: { outline: "none", flex: 1 },
|
32761
33210
|
onChange: onInputChange
|
32762
33211
|
}));
|
32763
33212
|
}
|
32764
|
-
|
32765
|
-
|
32766
|
-
|
32767
|
-
|
32768
|
-
|
32769
|
-
|
32770
|
-
}
|
32771
|
-
|
32772
|
-
value: item2.value
|
32773
|
-
}, item2.label)));
|
32774
|
-
}
|
32775
|
-
function RadioGroup(props) {
|
32776
|
-
const _a = props, { type, vertical } = _a, rest = __objRest(_a, ["type", "vertical"]);
|
32777
|
-
return /* @__PURE__ */ React__default.createElement(Radio.Group, __spreadProps(__spreadValues({}, rest), {
|
32778
|
-
style: lodash.exports.merge({ width: "100%" }, rest.style),
|
32779
|
-
value: rest.value,
|
32780
|
-
onChange: rest.onChange
|
32781
|
-
}), /* @__PURE__ */ React__default.createElement(Stack$4, {
|
32782
|
-
vertical,
|
32783
|
-
spacing: "extraTight"
|
32784
|
-
}, rest.options.map((item2, index2) => /* @__PURE__ */ React__default.createElement(Radio, {
|
32785
|
-
key: index2,
|
32786
|
-
value: item2.value
|
32787
|
-
}, item2.label))));
|
32788
|
-
}
|
32789
|
-
const parse = (v) => v;
|
32790
|
-
function enhancer(Component2, changeAdapter, option) {
|
32791
|
-
return (props) => {
|
32792
|
-
const _a = props, {
|
32793
|
-
name: name2,
|
32794
|
-
validate: validate3,
|
32795
|
-
onChangeAdapter,
|
32796
|
-
changeOnBlur,
|
32797
|
-
inline,
|
32798
|
-
equalSpacing,
|
32799
|
-
formItem,
|
32800
|
-
label,
|
32801
|
-
required,
|
32802
|
-
style,
|
32803
|
-
helpText,
|
32804
|
-
autoComplete,
|
32805
|
-
labelHidden: labelHidden2
|
32806
|
-
} = _a, rest = __objRest(_a, [
|
32807
|
-
"name",
|
32808
|
-
"validate",
|
32809
|
-
"onChangeAdapter",
|
32810
|
-
"changeOnBlur",
|
32811
|
-
"inline",
|
32812
|
-
"equalSpacing",
|
32813
|
-
"formItem",
|
32814
|
-
"label",
|
32815
|
-
"required",
|
32816
|
-
"style",
|
32817
|
-
"helpText",
|
32818
|
-
"autoComplete",
|
32819
|
-
"labelHidden"
|
32820
|
-
]);
|
32821
|
-
const debounceTime = props.debounceTime || (option == null ? void 0 : option.debounceTime) || 300;
|
32822
|
-
const config2 = useMemo(() => {
|
32823
|
-
var _a2;
|
32824
|
-
return __spreadProps(__spreadValues({}, props.config), {
|
32825
|
-
validate: validate3,
|
32826
|
-
parse: ((_a2 = props.config) == null ? void 0 : _a2.parse) || parse
|
32827
|
-
});
|
32828
|
-
}, [props.config, validate3]);
|
32829
|
-
const [currentValue, setCurrentValue] = useState("");
|
32830
|
-
const currentValueRef = useRefState(currentValue);
|
32831
|
-
const layoutStyle = useMemo(() => {
|
32832
|
-
if (equalSpacing) {
|
32833
|
-
return {
|
32834
|
-
labelCol: {
|
32835
|
-
span: 11,
|
32836
|
-
style: {
|
32837
|
-
textAlign: "left",
|
32838
|
-
paddingRight: 0
|
32839
|
-
}
|
32840
|
-
},
|
32841
|
-
wrapperCol: {
|
32842
|
-
span: 11,
|
32843
|
-
offset: 1,
|
32844
|
-
style: {
|
32845
|
-
textAlign: "right"
|
32846
|
-
}
|
32847
|
-
}
|
32848
|
-
};
|
32849
|
-
}
|
32850
|
-
if (inline) {
|
32851
|
-
return {
|
32852
|
-
labelCol: {
|
32853
|
-
span: 7,
|
32854
|
-
style: {
|
32855
|
-
textAlign: "right",
|
32856
|
-
paddingRight: 0
|
32857
|
-
}
|
32858
|
-
},
|
32859
|
-
wrapperCol: {
|
32860
|
-
span: 16,
|
32861
|
-
offset: 1,
|
32862
|
-
style: {}
|
32863
|
-
}
|
32864
|
-
};
|
32865
|
-
}
|
32866
|
-
return {
|
32867
|
-
labelCol: {
|
32868
|
-
span: 24,
|
32869
|
-
style: {
|
32870
|
-
paddingRight: 0
|
32871
|
-
}
|
32872
|
-
},
|
32873
|
-
wrapperCol: {
|
32874
|
-
span: 24
|
32875
|
-
}
|
32876
|
-
};
|
32877
|
-
}, [equalSpacing, inline]);
|
32878
|
-
return useMemo(() => {
|
32879
|
-
return /* @__PURE__ */ React__default.createElement(Field, __spreadValues({
|
32880
|
-
name: name2
|
32881
|
-
}, config2), ({ input: { onBlur: onBlur3, onChange, value }, meta }) => {
|
32882
|
-
const debounceCallbackChange = useCallback(lodash.exports.debounce((val) => {
|
32883
|
-
onChange(val);
|
32884
|
-
onBlur3();
|
32885
|
-
}, debounceTime, {}), [onChange, onBlur3]);
|
32886
|
-
const onFieldChange = useCallback((e) => {
|
32887
|
-
const newVal = onChangeAdapter ? onChangeAdapter(changeAdapter(e)) : changeAdapter(e);
|
32888
|
-
setCurrentValue(newVal);
|
32889
|
-
if (!changeOnBlur) {
|
32890
|
-
debounceCallbackChange(newVal);
|
32891
|
-
}
|
32892
|
-
}, [debounceCallbackChange]);
|
32893
|
-
const onFieldBlur = useCallback(() => {
|
32894
|
-
if (changeOnBlur) {
|
32895
|
-
onChange(currentValueRef.current);
|
32896
|
-
onBlur3();
|
32897
|
-
}
|
32898
|
-
}, [onBlur3, onChange]);
|
32899
|
-
useEffect(() => {
|
32900
|
-
setCurrentValue(value);
|
32901
|
-
}, [value]);
|
32902
|
-
return /* @__PURE__ */ React__default.createElement(Form.Item, __spreadProps(__spreadValues(__spreadValues({
|
32903
|
-
style: __spreadProps(__spreadValues({}, style), {
|
32904
|
-
margin: "0px"
|
32905
|
-
}),
|
32906
|
-
rules: required ? [{ required: true }] : void 0
|
32907
|
-
}, layoutStyle), formItem), {
|
32908
|
-
label: labelHidden2 ? void 0 : label || (formItem == null ? void 0 : formItem.label),
|
32909
|
-
labelAlign: "left",
|
32910
|
-
validateStatus: meta.touched && meta.error ? "error" : void 0,
|
32911
|
-
help: meta.touched && meta.error ? meta.error : helpText
|
32912
|
-
}), /* @__PURE__ */ React__default.createElement(Component2, __spreadProps(__spreadValues({
|
32913
|
-
autoComplete
|
32914
|
-
}, rest), {
|
32915
|
-
name: name2,
|
32916
|
-
checked: currentValue,
|
32917
|
-
value: currentValue,
|
32918
|
-
onChange: onFieldChange,
|
32919
|
-
onBlur: onFieldBlur
|
32920
|
-
})));
|
32921
|
-
});
|
32922
|
-
}, [
|
32923
|
-
autoComplete,
|
32924
|
-
changeOnBlur,
|
32925
|
-
config2,
|
32926
|
-
currentValue,
|
32927
|
-
currentValueRef,
|
32928
|
-
debounceTime,
|
32929
|
-
formItem,
|
32930
|
-
helpText,
|
32931
|
-
label,
|
32932
|
-
labelHidden2,
|
32933
|
-
layoutStyle,
|
32934
|
-
name2,
|
32935
|
-
onChangeAdapter,
|
32936
|
-
required,
|
32937
|
-
rest,
|
32938
|
-
style
|
32939
|
-
]);
|
32940
|
-
};
|
32941
|
-
}
|
32942
|
-
function Input(props) {
|
32943
|
-
const {
|
32944
|
-
quickchange,
|
32945
|
-
value = "",
|
32946
|
-
onKeyDown: onPropsKeyDown,
|
32947
|
-
onChange: propsOnChange
|
32948
|
-
} = props;
|
32949
|
-
const onChange = useCallback((val) => {
|
32950
|
-
propsOnChange(val);
|
32951
|
-
}, [propsOnChange]);
|
32952
|
-
const onKeyDown = useCallback((ev) => {
|
32953
|
-
if (onPropsKeyDown) {
|
32954
|
-
onPropsKeyDown == null ? void 0 : onPropsKeyDown(ev);
|
32955
|
-
}
|
32956
|
-
if (quickchange) {
|
32957
|
-
let step = 0;
|
32958
|
-
if (ev.key === "ArrowUp") {
|
32959
|
-
step = 1;
|
32960
|
-
}
|
32961
|
-
if (ev.key === "ArrowDown") {
|
32962
|
-
step = -1;
|
32963
|
-
}
|
32964
|
-
if (step) {
|
32965
|
-
if (/^\d+/.test(value)) {
|
32966
|
-
ev.preventDefault();
|
32967
|
-
onChange(String(value).replace(/^(\d+)/, (_, match) => {
|
32968
|
-
return (Number(match) + step).toString();
|
32969
|
-
}));
|
32970
|
-
}
|
32971
|
-
}
|
32972
|
-
}
|
32973
|
-
}, [onPropsKeyDown, quickchange, value, onChange]);
|
32974
|
-
return /* @__PURE__ */ React__default.createElement(Input$4, __spreadProps(__spreadValues({}, __spreadProps(__spreadValues({}, props), { quickchange: void 0 })), {
|
32975
|
-
onChange: (value2) => onChange(value2),
|
32976
|
-
onKeyDown
|
32977
|
-
}));
|
32978
|
-
}
|
32979
|
-
function InputWithUnit(props) {
|
32980
|
-
const _a = props, {
|
32981
|
-
value = "",
|
32982
|
-
onKeyDown: onPropsKeyDown,
|
32983
|
-
unitOptions: propsUnitOptions
|
32984
|
-
} = _a, restProps = __objRest(_a, [
|
32985
|
-
"value",
|
32986
|
-
"onKeyDown",
|
32987
|
-
"unitOptions"
|
32988
|
-
]);
|
32989
|
-
return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({
|
32990
|
-
value
|
32991
|
-
}, restProps), {
|
32992
|
-
quickchange: true
|
32993
|
-
}));
|
32994
|
-
}
|
32995
|
-
function CheckBoxGroup(props) {
|
32996
|
-
const _a = props, { vertical = false } = _a, rest = __objRest(_a, ["vertical"]);
|
32997
|
-
return /* @__PURE__ */ React__default.createElement(Checkbox$1.Group, {
|
32998
|
-
style: lodash.exports.merge({ width: "100%" }, rest.style),
|
32999
|
-
value: rest.value,
|
33000
|
-
onChange: rest.onChange
|
33001
|
-
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
33002
|
-
vertical,
|
33003
|
-
spacing: "extraTight"
|
33004
|
-
}, rest.options.map((item2, index2) => /* @__PURE__ */ React__default.createElement(Checkbox$1, {
|
33005
|
-
style: rest.checkboxStyle,
|
33006
|
-
key: index2,
|
33007
|
-
value: item2.value
|
33008
|
-
}, item2.label))));
|
33009
|
-
}
|
33010
|
-
function classnames(...rest) {
|
33011
|
-
return rest.filter((item2) => typeof item2 === "string").join(" ");
|
33012
|
-
}
|
33013
|
-
const { TabPane: TabPane$1 } = Tabs$1;
|
33014
|
-
function EditTab(props) {
|
33015
|
-
const { value, additionItem } = props;
|
33016
|
-
const [activeTab, setActiveTab] = useState("0");
|
33017
|
-
const onAddTab = () => {
|
33018
|
-
setActiveTab(value.length.toString());
|
33019
|
-
props.onChange([...value, additionItem]);
|
33020
|
-
};
|
33021
|
-
const onDeleteTab = (index2) => {
|
33022
|
-
if (index2 < activeTab) {
|
33023
|
-
setActiveTab((Number(activeTab) - 1).toString());
|
33024
|
-
}
|
33025
|
-
if (index2 === activeTab) {
|
33026
|
-
setActiveTab(Number(index2) > 0 ? `${Number(index2) - 1}` : "0");
|
33027
|
-
}
|
33028
|
-
props.onChange(value.filter((_, vIndex) => Number(index2) !== vIndex));
|
33029
|
-
};
|
33030
|
-
return /* @__PURE__ */ React__default.createElement(Tabs$1, {
|
33031
|
-
destroyOnHide: true,
|
33032
|
-
className: classnames(styles$7.editTab),
|
33033
|
-
style: { border: "none" },
|
33034
|
-
type: "card",
|
33035
|
-
activeTab,
|
33036
|
-
tabPosition: props.tabPosition,
|
33037
|
-
editable: true,
|
33038
|
-
onAddTab,
|
33039
|
-
onDeleteTab,
|
33040
|
-
onChange: setActiveTab
|
33041
|
-
}, (Array.isArray(value) ? value : []).map((item2, index2) => /* @__PURE__ */ React__default.createElement(TabPane$1, {
|
33042
|
-
style: { paddingLeft: 12 },
|
33043
|
-
title: `${props.label || "Tab"} ${index2 + 1}`,
|
33044
|
-
key: index2
|
33045
|
-
}, props.renderItem(item2, index2))));
|
33046
|
-
}
|
33047
|
-
function EditGridTab(props) {
|
33048
|
-
const { value, additionItem } = props;
|
33049
|
-
const onAdd = (index2) => {
|
33050
|
-
let newItem = additionItem || lodash.exports.cloneDeep(value[index2]);
|
33051
|
-
value.splice(index2 + 1, 0, newItem);
|
33052
|
-
props.onChange([...value]);
|
33053
|
-
};
|
33054
|
-
const onDelete = (index2) => {
|
33055
|
-
props.onChange(value.filter((_, vIndex) => Number(index2) !== vIndex));
|
33056
|
-
};
|
33057
|
-
return /* @__PURE__ */ React__default.createElement(Card$1, {
|
33058
|
-
bordered: false
|
33059
|
-
}, (Array.isArray(value) ? value : []).map((item2, index2) => /* @__PURE__ */ React__default.createElement(Card$1.Grid, {
|
33060
|
-
style: { width: "100%" },
|
33061
|
-
key: index2
|
33062
|
-
}, /* @__PURE__ */ React__default.createElement(Card$1, {
|
33063
|
-
title: /* @__PURE__ */ React__default.createElement(Space$1, null, /* @__PURE__ */ React__default.createElement(Typography$1.Text, null, "Item ", index2 + 1)),
|
33064
|
-
extra: /* @__PURE__ */ React__default.createElement(Space$1, {
|
33065
|
-
size: "large"
|
33066
|
-
}, /* @__PURE__ */ React__default.createElement(IconPlus$1, {
|
33067
|
-
style: { color: "#000", cursor: "pointer" },
|
33068
|
-
onClick: () => onAdd(index2)
|
33069
|
-
}), /* @__PURE__ */ React__default.createElement(IconClose$1, {
|
33070
|
-
style: { color: "#000", cursor: "pointer" },
|
33071
|
-
onClick: () => onDelete(index2)
|
33072
|
-
}))
|
33073
|
-
}, props.renderItem(item2, index2)))));
|
33074
|
-
}
|
33075
|
-
function InlineText({ idx, onChange, children }) {
|
33076
|
-
const {
|
33077
|
-
mutators: { setFieldTouched }
|
33078
|
-
} = useForm$1();
|
33079
|
-
useField(idx);
|
33080
|
-
useEffect(() => {
|
33081
|
-
const shadowRoot = getShadowRoot();
|
33082
|
-
const onPaste = (e) => {
|
33083
|
-
var _a, _b;
|
33084
|
-
if (!(e.target instanceof Element) || !e.target.getAttribute("contenteditable"))
|
33085
|
-
return;
|
33086
|
-
e.preventDefault();
|
33087
|
-
const text = ((_a = e.clipboardData) == null ? void 0 : _a.getData("text/plain")) || "";
|
33088
|
-
document.execCommand("insertHTML", false, text);
|
33089
|
-
const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);
|
33090
|
-
if (contentEditableType === ContentEditableType.RichText) {
|
33091
|
-
onChange(e.target.innerHTML || "");
|
33092
|
-
} else if (contentEditableType === ContentEditableType.Text) {
|
33093
|
-
onChange(((_b = e.target.textContent) == null ? void 0 : _b.trim()) || "");
|
33094
|
-
}
|
33095
|
-
};
|
33096
|
-
const onInput = (e) => {
|
33097
|
-
var _a;
|
33098
|
-
if (e.target instanceof Element && e.target.getAttribute("contenteditable")) {
|
33099
|
-
const contentEditableType = e.target.getAttribute(DATA_CONTENT_EDITABLE_TYPE);
|
33100
|
-
if (contentEditableType === ContentEditableType.RichText) {
|
33101
|
-
onChange(e.target.innerHTML || "");
|
33102
|
-
} else if (contentEditableType === ContentEditableType.Text) {
|
33103
|
-
onChange(((_a = e.target.textContent) == null ? void 0 : _a.trim()) || "");
|
33104
|
-
}
|
33105
|
-
}
|
33106
|
-
};
|
33107
|
-
shadowRoot.addEventListener("paste", onPaste, true);
|
33108
|
-
shadowRoot.addEventListener("input", onInput);
|
33109
|
-
return () => {
|
33110
|
-
shadowRoot.removeEventListener("paste", onPaste, true);
|
33111
|
-
shadowRoot.removeEventListener("input", onInput);
|
33112
|
-
};
|
33113
|
-
}, [onChange, setFieldTouched]);
|
33114
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
|
33115
|
-
}
|
33116
|
-
function AutoComplete(props) {
|
33117
|
-
const options2 = useMemo(() => {
|
33118
|
-
const selectedValue = (props.value || "").toLowerCase();
|
33119
|
-
return props.options.filter((item2) => {
|
33120
|
-
return lodash.exports.isString(item2.value) && item2.value.toLowerCase().startsWith(selectedValue) || lodash.exports.isString(item2.label) && item2.label.toLowerCase().startsWith(selectedValue);
|
33121
|
-
}).map((item2) => __spreadProps(__spreadValues({}, item2), { name: item2.label }));
|
33122
|
-
}, [props.options, props.value]);
|
33123
|
-
return /* @__PURE__ */ React__default.createElement(ArcoAutoComplete, __spreadProps(__spreadValues({}, props), {
|
33124
|
-
data: options2
|
33125
|
-
}));
|
33126
|
-
}
|
33213
|
+
const ColorPickerFieldSource = enhancer(ColorPicker, (e) => e, {
|
33214
|
+
debounceTime: 1
|
33215
|
+
});
|
33216
|
+
const ColorPickerField = (props) => {
|
33217
|
+
return /* @__PURE__ */ React__default.createElement(ColorPickerFieldSource, __spreadValues({
|
33218
|
+
config: colorAdapter
|
33219
|
+
}, props));
|
33220
|
+
};
|
33127
33221
|
const ToolItem$1 = (props) => {
|
33128
33222
|
if (!props.title) {
|
33129
33223
|
return /* @__PURE__ */ React__default.createElement("button", {
|
@@ -33202,10 +33296,10 @@ function Link$1(props) {
|
|
33202
33296
|
}, /* @__PURE__ */ React__default.createElement(SearchField, {
|
33203
33297
|
size: "small",
|
33204
33298
|
name: "link",
|
33205
|
-
label: "Link",
|
33299
|
+
label: t("Link"),
|
33206
33300
|
labelHidden: true,
|
33207
|
-
searchButton: "Apply",
|
33208
|
-
placeholder: "https://www.example.com",
|
33301
|
+
searchButton: t("Apply"),
|
33302
|
+
placeholder: t("https://www.example.com"),
|
33209
33303
|
onSearch: () => handleSubmit()
|
33210
33304
|
})), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33211
33305
|
span: 12
|
@@ -33214,13 +33308,13 @@ function Link$1(props) {
|
|
33214
33308
|
size: "mini"
|
33215
33309
|
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
33216
33310
|
size: "smallest"
|
33217
|
-
}, "Target"), /* @__PURE__ */ React__default.createElement(SwitchField, {
|
33311
|
+
}, t("Target")), /* @__PURE__ */ React__default.createElement(SwitchField, {
|
33218
33312
|
size: "small",
|
33219
|
-
label: "Target",
|
33313
|
+
label: t("Target"),
|
33220
33314
|
labelHidden: true,
|
33221
33315
|
name: "blank",
|
33222
|
-
checkedText: "blank",
|
33223
|
-
uncheckedText: "self",
|
33316
|
+
checkedText: t("blank"),
|
33317
|
+
uncheckedText: t("self"),
|
33224
33318
|
inline: true
|
33225
33319
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33226
33320
|
span: 12
|
@@ -33229,18 +33323,18 @@ function Link$1(props) {
|
|
33229
33323
|
size: "mini"
|
33230
33324
|
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
33231
33325
|
size: "smallest"
|
33232
|
-
}, "Underline"), /* @__PURE__ */ React__default.createElement(SwitchField, {
|
33326
|
+
}, t("Underline")), /* @__PURE__ */ React__default.createElement(SwitchField, {
|
33233
33327
|
size: "small",
|
33234
|
-
label: "Underline",
|
33328
|
+
label: t("Underline"),
|
33235
33329
|
labelHidden: true,
|
33236
33330
|
name: "underline",
|
33237
|
-
checkedText: "off",
|
33238
|
-
uncheckedText: "on",
|
33331
|
+
checkedText: t("off"),
|
33332
|
+
uncheckedText: t("on"),
|
33239
33333
|
inline: true
|
33240
33334
|
})))))
|
33241
33335
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
33242
33336
|
isActive: Boolean(initialValues.link),
|
33243
|
-
title: "Link",
|
33337
|
+
title: t("Link"),
|
33244
33338
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
33245
33339
|
iconName: "icon-link"
|
33246
33340
|
})
|
@@ -33483,12 +33577,12 @@ function AddFont() {
|
|
33483
33577
|
fill: true
|
33484
33578
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33485
33579
|
name: `${focusIdx2}.data.value.fonts.${index2}.name`,
|
33486
|
-
label: "Name"
|
33580
|
+
label: t("Name")
|
33487
33581
|
})), /* @__PURE__ */ React__default.createElement(Stack$4.Item, {
|
33488
33582
|
fill: true
|
33489
33583
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33490
33584
|
name: `${focusIdx2}.data.value.fonts.${index2}.href`,
|
33491
|
-
label: "Href"
|
33585
|
+
label: t("Href")
|
33492
33586
|
})), /* @__PURE__ */ React__default.createElement(Stack$4, {
|
33493
33587
|
vertical: true,
|
33494
33588
|
spacing: "loose"
|
@@ -33572,7 +33666,7 @@ function FontFamily({ name: name2 }) {
|
|
33572
33666
|
});
|
33573
33667
|
}, [focusIdx2, fontList2, name2]);
|
33574
33668
|
}
|
33575
|
-
function Page() {
|
33669
|
+
function Page({ hideSubTitle, hideSubject }) {
|
33576
33670
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
33577
33671
|
if (!focusIdx2)
|
33578
33672
|
return null;
|
@@ -33587,11 +33681,11 @@ function Page() {
|
|
33587
33681
|
header: t("Email Setting")
|
33588
33682
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
33589
33683
|
direction: "vertical"
|
33590
|
-
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33684
|
+
}, !hideSubject && /* @__PURE__ */ React__default.createElement(TextField, {
|
33591
33685
|
label: t("Subject"),
|
33592
33686
|
name: "subject",
|
33593
33687
|
inline: true
|
33594
|
-
}), /* @__PURE__ */ React__default.createElement(TextField, {
|
33688
|
+
}), !hideSubTitle && /* @__PURE__ */ React__default.createElement(TextField, {
|
33595
33689
|
label: t("SubTitle"),
|
33596
33690
|
name: "subTitle",
|
33597
33691
|
inline: true
|
@@ -33617,13 +33711,15 @@ function Page() {
|
|
33617
33711
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33618
33712
|
offset: 1,
|
33619
33713
|
span: 11
|
33620
|
-
}, /* @__PURE__ */ React__default.createElement(
|
33621
|
-
label:
|
33622
|
-
name: `${focusIdx2}.data.value.font-size
|
33714
|
+
}, /* @__PURE__ */ React__default.createElement(NumberField, {
|
33715
|
+
label: "Font size (px)",
|
33716
|
+
name: `${focusIdx2}.data.value.font-size`,
|
33717
|
+
config: pixelAdapter,
|
33718
|
+
autoComplete: "off"
|
33623
33719
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33624
33720
|
span: 11
|
33625
33721
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
33626
|
-
label: "Line height",
|
33722
|
+
label: t("Line height"),
|
33627
33723
|
unitOptions: "percent",
|
33628
33724
|
name: `${focusIdx2}.data.value.line-height`
|
33629
33725
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -33654,7 +33750,7 @@ function Page() {
|
|
33654
33750
|
}), /* @__PURE__ */ React__default.createElement(Stack$4.Item, null), /* @__PURE__ */ React__default.createElement(Stack$4.Item, null), /* @__PURE__ */ React__default.createElement(AddFont, null), /* @__PURE__ */ React__default.createElement(Stack$4.Item, null), /* @__PURE__ */ React__default.createElement(Stack$4.Item, null))))));
|
33655
33751
|
}
|
33656
33752
|
function Padding(props = {}) {
|
33657
|
-
const { title: title2 = t("Padding"), attributeName = "padding", name: name2 } = props;
|
33753
|
+
const { title: title2 = t("Padding"), attributeName = "padding", name: name2, showResetAll } = props;
|
33658
33754
|
const { focusBlock: focusBlock2, change, values: values2 } = useBlock();
|
33659
33755
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
33660
33756
|
const type = focusBlock2 && focusBlock2.type;
|
@@ -33692,6 +33788,13 @@ function Padding(props = {}) {
|
|
33692
33788
|
change(focusIdx2 + `.attributes[${attributeName}]`, val);
|
33693
33789
|
}
|
33694
33790
|
}, [name2, change, focusIdx2, attributeName]);
|
33791
|
+
const onResetPadding = useCallback(() => {
|
33792
|
+
if (name2) {
|
33793
|
+
change(name2, "0px 0px 0px 0px");
|
33794
|
+
} else {
|
33795
|
+
change(focusIdx2 + `.attributes[${attributeName}]`, "0px 0px 0px 0px");
|
33796
|
+
}
|
33797
|
+
}, [name2, change, focusIdx2, attributeName]);
|
33695
33798
|
return /* @__PURE__ */ React__default.createElement(Form$3, {
|
33696
33799
|
initialValues: paddingFormValues,
|
33697
33800
|
subscription: { submitting: true, pristine: true },
|
@@ -33702,30 +33805,49 @@ function Padding(props = {}) {
|
|
33702
33805
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
33703
33806
|
vertical: true,
|
33704
33807
|
spacing: "extraTight"
|
33808
|
+
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
33809
|
+
align: "center"
|
33705
33810
|
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
33706
33811
|
variation: "strong"
|
33707
|
-
}, title2),
|
33812
|
+
}, title2), showResetAll && /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
33813
|
+
content: "Remove all padding"
|
33814
|
+
}, /* @__PURE__ */ React__default.createElement(Button$4, {
|
33815
|
+
onClick: onResetPadding,
|
33816
|
+
size: "mini",
|
33817
|
+
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
33818
|
+
iconName: "icon-remove",
|
33819
|
+
size: 12
|
33820
|
+
})
|
33821
|
+
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33708
33822
|
span: 11
|
33709
33823
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
33710
|
-
label: "Top",
|
33711
|
-
name: "top"
|
33824
|
+
label: t("Top (px)"),
|
33825
|
+
name: "top",
|
33826
|
+
autoComplete: "off",
|
33827
|
+
config: pixelAdapter
|
33712
33828
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33713
33829
|
offset: 1,
|
33714
33830
|
span: 11
|
33715
33831
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
33716
|
-
label: "Left",
|
33717
|
-
name: "left"
|
33832
|
+
label: t("Left (px)"),
|
33833
|
+
name: "left",
|
33834
|
+
autoComplete: "off",
|
33835
|
+
config: pixelAdapter
|
33718
33836
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33719
33837
|
span: 11
|
33720
33838
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
33721
|
-
label: "Bottom",
|
33722
|
-
name: "bottom"
|
33839
|
+
label: t("Bottom (px)"),
|
33840
|
+
name: "bottom",
|
33841
|
+
config: pixelAdapter,
|
33842
|
+
autoComplete: "off"
|
33723
33843
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33724
33844
|
offset: 1,
|
33725
33845
|
span: 11
|
33726
33846
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
33727
|
-
label: "Right",
|
33728
|
-
name: "right"
|
33847
|
+
label: t("Right (px)"),
|
33848
|
+
name: "right",
|
33849
|
+
autoComplete: "off",
|
33850
|
+
config: pixelAdapter
|
33729
33851
|
})))), /* @__PURE__ */ React__default.createElement(PaddingChangeWrapper, {
|
33730
33852
|
onChange: onChancePadding
|
33731
33853
|
}));
|
@@ -33741,7 +33863,7 @@ const PaddingChangeWrapper = (props) => {
|
|
33741
33863
|
}, [top, right, bottom, left, onChange]);
|
33742
33864
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
33743
33865
|
};
|
33744
|
-
function BackgroundColor({ title: title2 = "Background color" }) {
|
33866
|
+
function BackgroundColor({ title: title2 = t("Background color") }) {
|
33745
33867
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
33746
33868
|
return useMemo(() => {
|
33747
33869
|
return /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
@@ -33753,19 +33875,27 @@ function BackgroundColor({ title: title2 = "Background color" }) {
|
|
33753
33875
|
const backgroundRepeatOptions = [
|
33754
33876
|
{
|
33755
33877
|
value: "no-repeat",
|
33756
|
-
label
|
33878
|
+
get label() {
|
33879
|
+
return t("No repeat");
|
33880
|
+
}
|
33757
33881
|
},
|
33758
33882
|
{
|
33759
33883
|
value: "repeat",
|
33760
|
-
label
|
33884
|
+
get label() {
|
33885
|
+
return t("Repeat");
|
33886
|
+
}
|
33761
33887
|
},
|
33762
33888
|
{
|
33763
33889
|
value: "repeat-x",
|
33764
|
-
label
|
33890
|
+
get label() {
|
33891
|
+
return t("Repeat X");
|
33892
|
+
}
|
33765
33893
|
},
|
33766
33894
|
{
|
33767
33895
|
value: "repeat-y",
|
33768
|
-
label
|
33896
|
+
get label() {
|
33897
|
+
return t("Repeat Y");
|
33898
|
+
}
|
33769
33899
|
}
|
33770
33900
|
];
|
33771
33901
|
function Background() {
|
@@ -33776,9 +33906,9 @@ function Background() {
|
|
33776
33906
|
key: focusIdx2,
|
33777
33907
|
direction: "vertical"
|
33778
33908
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
33779
|
-
label: "Background image",
|
33909
|
+
label: t("Background image"),
|
33780
33910
|
name: `${focusIdx2}.attributes.background-url`,
|
33781
|
-
helpText: "The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.",
|
33911
|
+
helpText: t("The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally."),
|
33782
33912
|
uploadHandler: onUploadImage
|
33783
33913
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33784
33914
|
span: 11
|
@@ -33786,11 +33916,11 @@ function Background() {
|
|
33786
33916
|
offset: 1,
|
33787
33917
|
span: 11
|
33788
33918
|
}, /* @__PURE__ */ React__default.createElement(SelectField, {
|
33789
|
-
label: "Background repeat",
|
33919
|
+
label: t("Background repeat"),
|
33790
33920
|
name: `${focusIdx2}.attributes.background-repeat`,
|
33791
33921
|
options: backgroundRepeatOptions
|
33792
33922
|
}))), /* @__PURE__ */ React__default.createElement(TextField, {
|
33793
|
-
label: "Background size",
|
33923
|
+
label: t("Background size"),
|
33794
33924
|
name: `${focusIdx2}.attributes.background-size`
|
33795
33925
|
}));
|
33796
33926
|
}, [focusIdx2, onUploadImage]);
|
@@ -33801,13 +33931,13 @@ function Border() {
|
|
33801
33931
|
return /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33802
33932
|
span: 11
|
33803
33933
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33804
|
-
label: "Border",
|
33934
|
+
label: t("Border"),
|
33805
33935
|
name: `${focusIdx2}.attributes.border`
|
33806
33936
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33807
33937
|
offset: 1,
|
33808
33938
|
span: 11
|
33809
33939
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
33810
|
-
label: "Border radius",
|
33940
|
+
label: t("Border radius"),
|
33811
33941
|
name: `${focusIdx2}.attributes.border-radius`,
|
33812
33942
|
unitOptions: "percent"
|
33813
33943
|
})));
|
@@ -33817,7 +33947,7 @@ function ClassName() {
|
|
33817
33947
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
33818
33948
|
return useMemo(() => {
|
33819
33949
|
return /* @__PURE__ */ React__default.createElement(TextField, {
|
33820
|
-
label: "Class name",
|
33950
|
+
label: t("Class name"),
|
33821
33951
|
name: `${focusIdx2}.attributes.css-class`
|
33822
33952
|
});
|
33823
33953
|
}, [focusIdx2]);
|
@@ -33849,7 +33979,7 @@ function Iteration() {
|
|
33849
33979
|
className: "iteration",
|
33850
33980
|
destroyOnHide: true,
|
33851
33981
|
name: "Iteration",
|
33852
|
-
header: "Iteration",
|
33982
|
+
header: t("Iteration"),
|
33853
33983
|
extra: /* @__PURE__ */ React__default.createElement("div", {
|
33854
33984
|
style: { marginRight: 10 }
|
33855
33985
|
}, /* @__PURE__ */ React__default.createElement(Switch$1, {
|
@@ -33861,18 +33991,18 @@ function Iteration() {
|
|
33861
33991
|
}, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33862
33992
|
span: 11
|
33863
33993
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33864
|
-
label: "Data source",
|
33994
|
+
label: t("Data source"),
|
33865
33995
|
name: `${focusIdx2}.data.value.iteration.dataSource`
|
33866
33996
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33867
33997
|
offset: 1,
|
33868
33998
|
span: 11
|
33869
33999
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33870
|
-
label: "Item name",
|
34000
|
+
label: t("Item name"),
|
33871
34001
|
name: `${focusIdx2}.data.value.iteration.itemName`
|
33872
34002
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
33873
34003
|
span: 11
|
33874
34004
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33875
|
-
label: "Limit",
|
34005
|
+
label: t("Limit"),
|
33876
34006
|
name: `${focusIdx2}.data.value.iteration.limit`,
|
33877
34007
|
quickchange: true,
|
33878
34008
|
type: "number",
|
@@ -33881,7 +34011,7 @@ function Iteration() {
|
|
33881
34011
|
offset: 1,
|
33882
34012
|
span: 11
|
33883
34013
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
33884
|
-
label: "Mock quantity",
|
34014
|
+
label: t("Mock quantity"),
|
33885
34015
|
max: iteration == null ? void 0 : iteration.limit,
|
33886
34016
|
name: `${focusIdx2}.data.value.iteration.mockQuantity`,
|
33887
34017
|
type: "number",
|
@@ -33950,7 +34080,7 @@ function Condition() {
|
|
33950
34080
|
subGroups.splice(ggIndex, 1);
|
33951
34081
|
if (subGroups.length === 0) {
|
33952
34082
|
if (groups.length === 1) {
|
33953
|
-
Message$1.warning("At least one condition");
|
34083
|
+
Message$1.warning(t("At least one condition"));
|
33954
34084
|
return;
|
33955
34085
|
}
|
33956
34086
|
groups.splice(gIndex, 1);
|
@@ -33970,7 +34100,7 @@ function Condition() {
|
|
33970
34100
|
className: "condition",
|
33971
34101
|
destroyOnHide: true,
|
33972
34102
|
name: "Condition",
|
33973
|
-
header: "Condition",
|
34103
|
+
header: t("Condition"),
|
33974
34104
|
extra: /* @__PURE__ */ React__default.createElement("div", {
|
33975
34105
|
style: { marginRight: 10 }
|
33976
34106
|
}, /* @__PURE__ */ React__default.createElement(Switch$1, {
|
@@ -33988,14 +34118,14 @@ function Condition() {
|
|
33988
34118
|
}, condition.groups.length > 1 && /* @__PURE__ */ React__default.createElement(SelectField, {
|
33989
34119
|
inline: true,
|
33990
34120
|
name: `${focusIdx2}.data.value.condition.symbol`,
|
33991
|
-
label: "Symbol",
|
34121
|
+
label: t("Symbol"),
|
33992
34122
|
options: [
|
33993
34123
|
{
|
33994
|
-
label: "And",
|
34124
|
+
label: t("And"),
|
33995
34125
|
value: OperatorSymbol.AND
|
33996
34126
|
},
|
33997
34127
|
{
|
33998
|
-
label: "Or",
|
34128
|
+
label: t("Or"),
|
33999
34129
|
value: OperatorSymbol.OR
|
34000
34130
|
}
|
34001
34131
|
]
|
@@ -34015,14 +34145,14 @@ function Condition() {
|
|
34015
34145
|
}, group.groups.length > 1 && /* @__PURE__ */ React__default.createElement(SelectField, {
|
34016
34146
|
inline: true,
|
34017
34147
|
name: `${focusIdx2}.data.value.condition.symbol`,
|
34018
|
-
label: "Symbol",
|
34148
|
+
label: t("Symbol"),
|
34019
34149
|
options: [
|
34020
34150
|
{
|
34021
|
-
label: "And",
|
34151
|
+
label: t("And"),
|
34022
34152
|
value: OperatorSymbol.AND
|
34023
34153
|
},
|
34024
34154
|
{
|
34025
|
-
label: "Or",
|
34155
|
+
label: t("Or"),
|
34026
34156
|
value: OperatorSymbol.OR
|
34027
34157
|
}
|
34028
34158
|
]
|
@@ -34050,12 +34180,12 @@ function ConditionItem({ path, onDelete, gIndex, ggIndex }) {
|
|
34050
34180
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34051
34181
|
span: 7
|
34052
34182
|
}, " ", /* @__PURE__ */ React__default.createElement(TextField, {
|
34053
|
-
label: "Variable path",
|
34183
|
+
label: t("Variable path"),
|
34054
34184
|
name: `${name2}.left`
|
34055
34185
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34056
34186
|
span: 7
|
34057
34187
|
}, " ", /* @__PURE__ */ React__default.createElement(SelectField, {
|
34058
|
-
label: "Operator",
|
34188
|
+
label: t("Operator"),
|
34059
34189
|
name: `${name2}.operator`,
|
34060
34190
|
options: options$b
|
34061
34191
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -34145,7 +34275,7 @@ function Section() {
|
|
34145
34275
|
defaultActiveKey: ["0", "1", "2"]
|
34146
34276
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34147
34277
|
name: "0",
|
34148
|
-
header: "Dimension"
|
34278
|
+
header: t("Dimension")
|
34149
34279
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
34150
34280
|
direction: "vertical"
|
34151
34281
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -34154,32 +34284,33 @@ function Section() {
|
|
34154
34284
|
style: { width: "100%", display: "flex" }
|
34155
34285
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
34156
34286
|
style: { flex: 1 }
|
34157
|
-
}, "Group")), /* @__PURE__ */ React__default.createElement(Switch$1, {
|
34287
|
+
}, t("Group"))), /* @__PURE__ */ React__default.createElement(Switch$1, {
|
34158
34288
|
checked: noWrap,
|
34159
|
-
checkedText: "True",
|
34160
|
-
uncheckedText: "False",
|
34289
|
+
checkedText: t("True"),
|
34290
|
+
uncheckedText: t("False"),
|
34161
34291
|
onChange
|
34162
34292
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34163
34293
|
span: 12
|
34164
34294
|
})), /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34165
34295
|
name: "1",
|
34166
|
-
header: "Background"
|
34296
|
+
header: t("Background")
|
34167
34297
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
34168
34298
|
vertical: true,
|
34169
34299
|
spacing: "tight"
|
34170
34300
|
}, /* @__PURE__ */ React__default.createElement(Background, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34171
34301
|
name: "2",
|
34172
|
-
header: "Border"
|
34302
|
+
header: t("Border")
|
34173
34303
|
}, /* @__PURE__ */ React__default.createElement(Border, null)), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34174
34304
|
name: "4",
|
34175
|
-
header: "Extra"
|
34305
|
+
header: t("Extra")
|
34176
34306
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34177
34307
|
span: 24
|
34178
34308
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
34179
34309
|
}
|
34180
34310
|
function Width({
|
34181
34311
|
inline = false,
|
34182
|
-
unitOptions
|
34312
|
+
unitOptions,
|
34313
|
+
config: config2
|
34183
34314
|
}) {
|
34184
34315
|
var _a;
|
34185
34316
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
@@ -34187,30 +34318,37 @@ function Width({
|
|
34187
34318
|
const parentType = (_a = getParentByIdx(values2, focusIdx2)) == null ? void 0 : _a.type;
|
34188
34319
|
const validate3 = useCallback((val) => {
|
34189
34320
|
if ((focusBlock2 == null ? void 0 : focusBlock2.type) === BasicType.COLUMN && parentType === BasicType.GROUP) {
|
34190
|
-
return /(\d)*%/.test(val) ? void 0 : "Column inside a group must have a width in percentage, not in pixel";
|
34321
|
+
return /(\d)*%/.test(val) ? void 0 : t("Column inside a group must have a width in percentage, not in pixel");
|
34191
34322
|
}
|
34192
34323
|
return void 0;
|
34193
34324
|
}, [focusBlock2 == null ? void 0 : focusBlock2.type, parentType]);
|
34194
34325
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
34195
34326
|
validate: validate3,
|
34196
|
-
label: "Width",
|
34327
|
+
label: t("Width"),
|
34197
34328
|
inline,
|
34198
34329
|
name: `${focusIdx2}.attributes.width`,
|
34199
|
-
unitOptions
|
34330
|
+
unitOptions,
|
34331
|
+
config: config2
|
34200
34332
|
});
|
34201
34333
|
}
|
34202
34334
|
const options$a = [
|
34203
34335
|
{
|
34204
34336
|
value: "top",
|
34205
|
-
label
|
34337
|
+
get label() {
|
34338
|
+
return t("top");
|
34339
|
+
}
|
34206
34340
|
},
|
34207
34341
|
{
|
34208
34342
|
value: "middle",
|
34209
|
-
label
|
34343
|
+
get label() {
|
34344
|
+
return t("middle");
|
34345
|
+
}
|
34210
34346
|
},
|
34211
34347
|
{
|
34212
34348
|
value: "bottom",
|
34213
|
-
label
|
34349
|
+
get label() {
|
34350
|
+
return t("bottom");
|
34351
|
+
}
|
34214
34352
|
}
|
34215
34353
|
];
|
34216
34354
|
function VerticalAlign({
|
@@ -34220,7 +34358,7 @@ function VerticalAlign({
|
|
34220
34358
|
return useMemo(() => {
|
34221
34359
|
return /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(SelectField, {
|
34222
34360
|
style: { width: 120 },
|
34223
|
-
label: "Vertical align",
|
34361
|
+
label: t("Vertical align"),
|
34224
34362
|
name: `${focusIdx2}.attributes.${attributeName}`,
|
34225
34363
|
options: options$a
|
34226
34364
|
}));
|
@@ -34231,7 +34369,7 @@ function Column() {
|
|
34231
34369
|
defaultActiveKey: ["0", "1", "2"]
|
34232
34370
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34233
34371
|
name: "0",
|
34234
|
-
header: "Dimension"
|
34372
|
+
header: t("Dimension")
|
34235
34373
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
34236
34374
|
direction: "vertical"
|
34237
34375
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -34241,13 +34379,13 @@ function Column() {
|
|
34241
34379
|
span: 11
|
34242
34380
|
}, /* @__PURE__ */ React__default.createElement(VerticalAlign, null))), /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34243
34381
|
name: "1",
|
34244
|
-
header: "Background"
|
34382
|
+
header: t("Background")
|
34245
34383
|
}, /* @__PURE__ */ React__default.createElement(Background, null)), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34246
34384
|
name: "2",
|
34247
|
-
header: "Border"
|
34385
|
+
header: t("Border")
|
34248
34386
|
}, /* @__PURE__ */ React__default.createElement(Border, null)), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34249
34387
|
name: "4",
|
34250
|
-
header: "Extra"
|
34388
|
+
header: t("Extra")
|
34251
34389
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34252
34390
|
span: 24
|
34253
34391
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -34255,34 +34393,46 @@ function Column() {
|
|
34255
34393
|
const options$9 = [
|
34256
34394
|
{
|
34257
34395
|
value: "",
|
34258
|
-
label
|
34396
|
+
get label() {
|
34397
|
+
return t("None");
|
34398
|
+
}
|
34259
34399
|
},
|
34260
34400
|
{
|
34261
34401
|
value: "underline",
|
34262
|
-
label
|
34402
|
+
get label() {
|
34403
|
+
return t("Underline");
|
34404
|
+
}
|
34263
34405
|
},
|
34264
34406
|
{
|
34265
34407
|
value: "overline",
|
34266
|
-
label
|
34408
|
+
get label() {
|
34409
|
+
return t("Overline");
|
34410
|
+
}
|
34267
34411
|
},
|
34268
34412
|
{
|
34269
34413
|
value: "line-through",
|
34270
|
-
label
|
34414
|
+
get label() {
|
34415
|
+
return t("Line through");
|
34416
|
+
}
|
34271
34417
|
},
|
34272
34418
|
{
|
34273
34419
|
value: "blink",
|
34274
|
-
label
|
34420
|
+
get label() {
|
34421
|
+
return t("Blink");
|
34422
|
+
}
|
34275
34423
|
},
|
34276
34424
|
{
|
34277
34425
|
value: "inherit",
|
34278
|
-
label
|
34426
|
+
get label() {
|
34427
|
+
return t("Inherit");
|
34428
|
+
}
|
34279
34429
|
}
|
34280
34430
|
];
|
34281
34431
|
function TextDecoration({ name: name2 }) {
|
34282
34432
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34283
34433
|
return useMemo(() => {
|
34284
34434
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
34285
|
-
label: "Text decoration",
|
34435
|
+
label: t("Text decoration"),
|
34286
34436
|
name: name2 || `${focusIdx2}.attributes.text-decoration`,
|
34287
34437
|
options: options$9
|
34288
34438
|
});
|
@@ -34291,11 +34441,15 @@ function TextDecoration({ name: name2 }) {
|
|
34291
34441
|
const options$8 = [
|
34292
34442
|
{
|
34293
34443
|
value: "normal",
|
34294
|
-
label
|
34444
|
+
get label() {
|
34445
|
+
return t("Normal");
|
34446
|
+
}
|
34295
34447
|
},
|
34296
34448
|
{
|
34297
34449
|
value: "bold",
|
34298
|
-
label
|
34450
|
+
get label() {
|
34451
|
+
return t("Bold");
|
34452
|
+
}
|
34299
34453
|
},
|
34300
34454
|
{
|
34301
34455
|
value: "100",
|
@@ -34338,7 +34492,7 @@ function FontWeight({ name: name2 }) {
|
|
34338
34492
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34339
34493
|
return useMemo(() => {
|
34340
34494
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
34341
|
-
label: "Font weight",
|
34495
|
+
label: t("Font weight"),
|
34342
34496
|
name: name2 || `${focusIdx2}.attributes.font-weight`,
|
34343
34497
|
options: options$8
|
34344
34498
|
});
|
@@ -34347,22 +34501,29 @@ function FontWeight({ name: name2 }) {
|
|
34347
34501
|
const options$7 = [
|
34348
34502
|
{
|
34349
34503
|
value: "normal",
|
34350
|
-
label
|
34504
|
+
get label() {
|
34505
|
+
return t("Normal");
|
34506
|
+
}
|
34351
34507
|
},
|
34352
34508
|
{
|
34353
34509
|
value: "italic",
|
34354
|
-
label
|
34510
|
+
get label() {
|
34511
|
+
return t("Italic");
|
34512
|
+
}
|
34355
34513
|
}
|
34356
34514
|
];
|
34357
34515
|
function FontStyle({ name: name2 }) {
|
34358
34516
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34359
34517
|
return /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
34360
|
-
label: "Font style",
|
34518
|
+
label: t("Font style"),
|
34361
34519
|
name: name2 || `${focusIdx2}.attributes.font-style`,
|
34362
34520
|
options: options$7
|
34363
34521
|
});
|
34364
34522
|
}
|
34365
|
-
function Height({
|
34523
|
+
function Height({
|
34524
|
+
inline,
|
34525
|
+
config: config2
|
34526
|
+
}) {
|
34366
34527
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34367
34528
|
return useMemo(() => {
|
34368
34529
|
return /* @__PURE__ */ React__default.createElement(Stack$4, {
|
@@ -34370,15 +34531,16 @@ function Height({ inline }) {
|
|
34370
34531
|
}, /* @__PURE__ */ React__default.createElement(Stack$4.Item, {
|
34371
34532
|
fill: true
|
34372
34533
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34373
|
-
label: "Height",
|
34534
|
+
label: t("Height"),
|
34374
34535
|
name: `${focusIdx2}.attributes.height`,
|
34375
34536
|
quickchange: true,
|
34376
|
-
inline
|
34537
|
+
inline,
|
34538
|
+
config: config2
|
34377
34539
|
})));
|
34378
34540
|
}, [focusIdx2, inline]);
|
34379
34541
|
}
|
34380
34542
|
function ContainerBackgroundColor({
|
34381
|
-
title: title2 = "Container background color"
|
34543
|
+
title: title2 = t("Container background color")
|
34382
34544
|
}) {
|
34383
34545
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34384
34546
|
return useMemo(() => {
|
@@ -34391,11 +34553,13 @@ function ContainerBackgroundColor({
|
|
34391
34553
|
function FontSize$1() {
|
34392
34554
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34393
34555
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
34394
|
-
label: "Font size",
|
34395
|
-
name: `${focusIdx2}.attributes.font-size
|
34556
|
+
label: t("Font size (px)"),
|
34557
|
+
name: `${focusIdx2}.attributes.font-size`,
|
34558
|
+
config: pixelAdapter,
|
34559
|
+
autoComplete: "off"
|
34396
34560
|
});
|
34397
34561
|
}
|
34398
|
-
function Color({ title: title2 = "Color" }) {
|
34562
|
+
function Color({ title: title2 = t("Color") }) {
|
34399
34563
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34400
34564
|
return /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
34401
34565
|
label: title2,
|
@@ -34433,7 +34597,7 @@ function Align({ inline }) {
|
|
34433
34597
|
function LineHeight({ name: name2 }) {
|
34434
34598
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34435
34599
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
34436
|
-
label: "Line height",
|
34600
|
+
label: t("Line height"),
|
34437
34601
|
unitOptions: "percent",
|
34438
34602
|
name: name2 || `${focusIdx2}.attributes.line-height`
|
34439
34603
|
});
|
@@ -34441,7 +34605,7 @@ function LineHeight({ name: name2 }) {
|
|
34441
34605
|
function LetterSpacing({ name: name2 }) {
|
34442
34606
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34443
34607
|
return /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
34444
|
-
label: "Letter spacing",
|
34608
|
+
label: t("Letter spacing"),
|
34445
34609
|
name: name2 || `${focusIdx2}.attributes.letter-spacing`
|
34446
34610
|
});
|
34447
34611
|
}
|
@@ -34501,10 +34665,10 @@ const HtmlEditor = (props) => {
|
|
34501
34665
|
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
34502
34666
|
variation: "strong",
|
34503
34667
|
size: "large"
|
34504
|
-
}, "Html"), /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(Button$4, {
|
34668
|
+
}, t("Html")), /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(Button$4, {
|
34505
34669
|
type: "primary",
|
34506
34670
|
onClick: onSave
|
34507
|
-
}, "Save"))),
|
34671
|
+
}, t("Save")))),
|
34508
34672
|
closable: false,
|
34509
34673
|
escToExit: false,
|
34510
34674
|
width: "100vw",
|
@@ -34527,7 +34691,7 @@ const HtmlEditor = (props) => {
|
|
34527
34691
|
fontSize: 24,
|
34528
34692
|
color: "#fff"
|
34529
34693
|
}
|
34530
|
-
}, "Editor Loading...")
|
34694
|
+
}, t("Editor Loading..."))
|
34531
34695
|
}, /* @__PURE__ */ React__default.createElement(CodeMirrorEditor, {
|
34532
34696
|
value: content,
|
34533
34697
|
onChange: setContent
|
@@ -34548,7 +34712,7 @@ function Text() {
|
|
34548
34712
|
const [visible, setVisible] = useState(false);
|
34549
34713
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
|
34550
34714
|
extra: /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
34551
|
-
content: "Html mode"
|
34715
|
+
content: t("Html mode")
|
34552
34716
|
}, /* @__PURE__ */ React__default.createElement(Button$4, {
|
34553
34717
|
onClick: () => setVisible(true),
|
34554
34718
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
@@ -34559,22 +34723,24 @@ function Text() {
|
|
34559
34723
|
defaultActiveKey: ["0", "1", "2"]
|
34560
34724
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34561
34725
|
name: "0",
|
34562
|
-
header: "Dimension"
|
34726
|
+
header: t("Dimension")
|
34563
34727
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
34564
34728
|
direction: "vertical"
|
34565
|
-
}, /* @__PURE__ */ React__default.createElement(Height, null), /* @__PURE__ */ React__default.createElement(Padding,
|
34729
|
+
}, /* @__PURE__ */ React__default.createElement(Height, null), /* @__PURE__ */ React__default.createElement(Padding, {
|
34730
|
+
showResetAll: true
|
34731
|
+
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34566
34732
|
name: "1",
|
34567
|
-
header: "Color"
|
34733
|
+
header: t("Color")
|
34568
34734
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34569
34735
|
span: 11
|
34570
34736
|
}, /* @__PURE__ */ React__default.createElement(Color, null)), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34571
34737
|
offset: 1,
|
34572
34738
|
span: 11
|
34573
34739
|
}, /* @__PURE__ */ React__default.createElement(ContainerBackgroundColor, {
|
34574
|
-
title: "Background color"
|
34740
|
+
title: t("Background color")
|
34575
34741
|
})))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34576
34742
|
name: "2",
|
34577
|
-
header: "Typography"
|
34743
|
+
header: t("Typography")
|
34578
34744
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
34579
34745
|
direction: "vertical"
|
34580
34746
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -34599,7 +34765,7 @@ function Text() {
|
|
34599
34765
|
span: 11
|
34600
34766
|
})))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34601
34767
|
name: "4",
|
34602
|
-
header: "Extra"
|
34768
|
+
header: t("Extra")
|
34603
34769
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34604
34770
|
span: 24
|
34605
34771
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))), /* @__PURE__ */ React__default.createElement(HtmlEditor, {
|
@@ -34614,22 +34780,22 @@ function Link() {
|
|
34614
34780
|
span: 11
|
34615
34781
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34616
34782
|
prefix: /* @__PURE__ */ React__default.createElement(IconLink$1, null),
|
34617
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Href\xA0\xA0\xA0"),
|
34783
|
+
label: /* @__PURE__ */ React__default.createElement("span", null, t("Href"), "\xA0\xA0\xA0"),
|
34618
34784
|
name: `${focusIdx2}.attributes.href`
|
34619
34785
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34620
34786
|
offset: 1,
|
34621
34787
|
span: 11
|
34622
34788
|
}, /* @__PURE__ */ React__default.createElement(SelectField, {
|
34623
|
-
label: "Target",
|
34789
|
+
label: t("Target"),
|
34624
34790
|
name: `${focusIdx2}.attributes.target`,
|
34625
34791
|
options: [
|
34626
34792
|
{
|
34627
34793
|
value: "",
|
34628
|
-
label: "_self"
|
34794
|
+
label: t("_self")
|
34629
34795
|
},
|
34630
34796
|
{
|
34631
34797
|
value: "_blank",
|
34632
|
-
label: "_blank"
|
34798
|
+
label: t("_blank")
|
34633
34799
|
}
|
34634
34800
|
]
|
34635
34801
|
})));
|
@@ -34644,59 +34810,65 @@ function Image$1() {
|
|
34644
34810
|
defaultActiveKey: ["0", "1", "2", "3", "4"]
|
34645
34811
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34646
34812
|
name: "1",
|
34647
|
-
header: "Setting"
|
34813
|
+
header: t("Setting")
|
34648
34814
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
34649
34815
|
vertical: true,
|
34650
34816
|
spacing: "tight"
|
34651
34817
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
34652
|
-
label: "src",
|
34818
|
+
label: t("src"),
|
34653
34819
|
labelHidden: true,
|
34654
34820
|
name: `${focusIdx2}.attributes.src`,
|
34655
|
-
helpText: "The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.",
|
34821
|
+
helpText: t("The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally."),
|
34656
34822
|
uploadHandler: onUploadImage
|
34657
34823
|
}), /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
34658
|
-
label: "Background color",
|
34824
|
+
label: t("Background color"),
|
34659
34825
|
name: `${focusIdx2}.attributes.container-background-color`,
|
34660
34826
|
inline: true
|
34661
34827
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34662
34828
|
name: "0",
|
34663
|
-
header: "Dimension"
|
34829
|
+
header: t("Dimension")
|
34664
34830
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
34665
34831
|
direction: "vertical"
|
34666
34832
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34667
34833
|
span: 11
|
34668
|
-
}, /* @__PURE__ */ React__default.createElement(Width,
|
34834
|
+
}, /* @__PURE__ */ React__default.createElement(Width, {
|
34835
|
+
config: pixelAdapter
|
34836
|
+
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34669
34837
|
offset: 1,
|
34670
34838
|
span: 11
|
34671
|
-
}, /* @__PURE__ */ React__default.createElement(Height,
|
34839
|
+
}, /* @__PURE__ */ React__default.createElement(Height, {
|
34840
|
+
config: imageHeightAdapter
|
34841
|
+
}))), /* @__PURE__ */ React__default.createElement(Padding, {
|
34842
|
+
showResetAll: true
|
34843
|
+
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34672
34844
|
span: 24
|
34673
34845
|
}, /* @__PURE__ */ React__default.createElement(Align, null))))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34674
34846
|
name: "2",
|
34675
|
-
header: "Link"
|
34847
|
+
header: t("Link")
|
34676
34848
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
34677
34849
|
vertical: true,
|
34678
34850
|
spacing: "tight"
|
34679
34851
|
}, /* @__PURE__ */ React__default.createElement(Link, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34680
34852
|
name: "3",
|
34681
|
-
header: "Border"
|
34853
|
+
header: t("Border")
|
34682
34854
|
}, /* @__PURE__ */ React__default.createElement(Border, null)), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34683
34855
|
name: "4",
|
34684
|
-
header: "Extra"
|
34856
|
+
header: t("Extra")
|
34685
34857
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34686
34858
|
span: 11
|
34687
34859
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34688
|
-
label: "title",
|
34860
|
+
label: t("title"),
|
34689
34861
|
name: `${focusIdx2}.attributes.title`
|
34690
34862
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34691
34863
|
offset: 1,
|
34692
34864
|
span: 11
|
34693
34865
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34694
|
-
label: "alt",
|
34866
|
+
label: t("alt"),
|
34695
34867
|
name: `${focusIdx2}.attributes.alt`
|
34696
34868
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34697
34869
|
span: 24
|
34698
34870
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34699
|
-
label: "class name",
|
34871
|
+
label: t("class name"),
|
34700
34872
|
name: `${focusIdx2}.attributes.css-class`
|
34701
34873
|
})))));
|
34702
34874
|
}
|
@@ -34705,7 +34877,7 @@ function Group() {
|
|
34705
34877
|
defaultActiveKey: ["0", "1", "2"]
|
34706
34878
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34707
34879
|
name: "0",
|
34708
|
-
header: "Dimension"
|
34880
|
+
header: t("Dimension")
|
34709
34881
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34710
34882
|
span: 11
|
34711
34883
|
}, /* @__PURE__ */ React__default.createElement(Width, null)), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -34713,7 +34885,7 @@ function Group() {
|
|
34713
34885
|
span: 11
|
34714
34886
|
}, /* @__PURE__ */ React__default.createElement(VerticalAlign, null)))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34715
34887
|
name: "1",
|
34716
|
-
header: "Background"
|
34888
|
+
header: t("Background")
|
34717
34889
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34718
34890
|
span: 11
|
34719
34891
|
}, /* @__PURE__ */ React__default.createElement(BackgroundColor, null)), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -34721,7 +34893,7 @@ function Group() {
|
|
34721
34893
|
span: 11
|
34722
34894
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
34723
34895
|
name: "4",
|
34724
|
-
header: "Extra"
|
34896
|
+
header: t("Extra")
|
34725
34897
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
34726
34898
|
span: 24
|
34727
34899
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -34729,15 +34901,21 @@ function Group() {
|
|
34729
34901
|
const options$5 = [
|
34730
34902
|
{
|
34731
34903
|
value: "left",
|
34732
|
-
label
|
34904
|
+
get label() {
|
34905
|
+
return t("Left");
|
34906
|
+
}
|
34733
34907
|
},
|
34734
34908
|
{
|
34735
34909
|
value: "center",
|
34736
|
-
label
|
34910
|
+
get label() {
|
34911
|
+
return t("Center");
|
34912
|
+
}
|
34737
34913
|
},
|
34738
34914
|
{
|
34739
34915
|
value: "right",
|
34740
|
-
label
|
34916
|
+
get label() {
|
34917
|
+
return t("Right");
|
34918
|
+
}
|
34741
34919
|
}
|
34742
34920
|
];
|
34743
34921
|
function TextAlign({ name: name2 }) {
|
@@ -34761,15 +34939,15 @@ function Decoration() {
|
|
34761
34939
|
variation: "strong",
|
34762
34940
|
size: "large"
|
34763
34941
|
}, "Decoration"), /* @__PURE__ */ React__default.createElement(TextField, {
|
34764
|
-
label: "Border radius",
|
34942
|
+
label: t("Border radius"),
|
34765
34943
|
name: `${focusIdx2}.attributes.borderRadius`,
|
34766
34944
|
inline: true
|
34767
34945
|
}), /* @__PURE__ */ React__default.createElement(TextField, {
|
34768
|
-
label: "Border",
|
34946
|
+
label: t("Border"),
|
34769
34947
|
name: `${focusIdx2}.attributes.border`,
|
34770
34948
|
inline: true
|
34771
34949
|
}), /* @__PURE__ */ React__default.createElement(NumberField, {
|
34772
|
-
label: "Opacity",
|
34950
|
+
label: t("Opacity"),
|
34773
34951
|
max: 1,
|
34774
34952
|
min: 0,
|
34775
34953
|
step: 0.1,
|
@@ -34781,26 +34959,34 @@ function Decoration() {
|
|
34781
34959
|
const options$4 = [
|
34782
34960
|
{
|
34783
34961
|
value: "initial",
|
34784
|
-
label
|
34962
|
+
get label() {
|
34963
|
+
return t("None");
|
34964
|
+
}
|
34785
34965
|
},
|
34786
34966
|
{
|
34787
34967
|
value: "uppercase",
|
34788
|
-
label
|
34968
|
+
get label() {
|
34969
|
+
return t("uppercase");
|
34970
|
+
}
|
34789
34971
|
},
|
34790
34972
|
{
|
34791
34973
|
value: "lowercase",
|
34792
|
-
label
|
34974
|
+
get label() {
|
34975
|
+
return t("lowercase");
|
34976
|
+
}
|
34793
34977
|
},
|
34794
34978
|
{
|
34795
34979
|
value: "capitalize",
|
34796
|
-
label
|
34980
|
+
get label() {
|
34981
|
+
return t("capitalize");
|
34982
|
+
}
|
34797
34983
|
}
|
34798
34984
|
];
|
34799
34985
|
function TextTransform({ name: name2 }) {
|
34800
34986
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34801
34987
|
return useMemo(() => {
|
34802
34988
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
34803
|
-
label: "Text transform",
|
34989
|
+
label: t("Text transform"),
|
34804
34990
|
name: name2 || `${focusIdx2}.attributes.text-transform`,
|
34805
34991
|
options: options$4
|
34806
34992
|
});
|
@@ -34809,18 +34995,22 @@ function TextTransform({ name: name2 }) {
|
|
34809
34995
|
const options$3 = [
|
34810
34996
|
{
|
34811
34997
|
value: "ltr",
|
34812
|
-
label
|
34998
|
+
get label() {
|
34999
|
+
return t("ltr");
|
35000
|
+
}
|
34813
35001
|
},
|
34814
35002
|
{
|
34815
35003
|
value: "rtl",
|
34816
|
-
label
|
35004
|
+
get label() {
|
35005
|
+
return t("rtl");
|
35006
|
+
}
|
34817
35007
|
}
|
34818
35008
|
];
|
34819
35009
|
function Direction() {
|
34820
35010
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34821
35011
|
return useMemo(() => {
|
34822
35012
|
return /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
34823
|
-
label: "Direction",
|
35013
|
+
label: t("Direction"),
|
34824
35014
|
name: `${focusIdx2}.attributes.direction`,
|
34825
35015
|
options: options$3,
|
34826
35016
|
inline: true
|
@@ -34835,19 +35025,19 @@ function Margin() {
|
|
34835
35025
|
spacing: "extraTight"
|
34836
35026
|
}, /* @__PURE__ */ React__default.createElement(TextStyle, {
|
34837
35027
|
size: "large"
|
34838
|
-
}, "Margin"), /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35028
|
+
}, t("Margin")), /* @__PURE__ */ React__default.createElement(Stack$4, {
|
34839
35029
|
wrap: false
|
34840
35030
|
}, /* @__PURE__ */ React__default.createElement(Stack$4.Item, {
|
34841
35031
|
fill: true
|
34842
35032
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34843
|
-
label: "Top",
|
35033
|
+
label: t("Top"),
|
34844
35034
|
quickchange: true,
|
34845
35035
|
name: `${focusIdx2}.attributes.marginTop`,
|
34846
35036
|
inline: true
|
34847
35037
|
})), /* @__PURE__ */ React__default.createElement(Stack$4.Item, {
|
34848
35038
|
fill: true
|
34849
35039
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34850
|
-
label: "Bottom",
|
35040
|
+
label: t("Bottom"),
|
34851
35041
|
quickchange: true,
|
34852
35042
|
name: `${focusIdx2}.attributes.marginBottom`,
|
34853
35043
|
inline: true
|
@@ -34856,14 +35046,14 @@ function Margin() {
|
|
34856
35046
|
}, /* @__PURE__ */ React__default.createElement(Stack$4.Item, {
|
34857
35047
|
fill: true
|
34858
35048
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34859
|
-
label: "Left",
|
35049
|
+
label: t("Left"),
|
34860
35050
|
quickchange: true,
|
34861
35051
|
name: `${focusIdx2}.attributes.marginLeft`,
|
34862
35052
|
inline: true
|
34863
35053
|
})), /* @__PURE__ */ React__default.createElement(Stack$4.Item, {
|
34864
35054
|
fill: true
|
34865
35055
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
34866
|
-
label: "Right",
|
35056
|
+
label: t("Right"),
|
34867
35057
|
quickchange: true,
|
34868
35058
|
name: `${focusIdx2}.attributes.marginRight`,
|
34869
35059
|
inline: true
|
@@ -34874,7 +35064,7 @@ function BorderColor() {
|
|
34874
35064
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
34875
35065
|
return useMemo(() => {
|
34876
35066
|
return /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
34877
|
-
label: "Color",
|
35067
|
+
label: t("Color"),
|
34878
35068
|
name: `${focusIdx2}.attributes.border-color`
|
34879
35069
|
});
|
34880
35070
|
}, [focusIdx2]);
|
@@ -34974,7 +35164,7 @@ const MergeTags$1 = React__default.memo((props) => {
|
|
34974
35164
|
value: props.value,
|
34975
35165
|
size: "small",
|
34976
35166
|
dropdownMenuStyle: { maxHeight: 400, overflow: "auto" },
|
34977
|
-
placeholder: "Please select",
|
35167
|
+
placeholder: t("Please select"),
|
34978
35168
|
treeData: treeOptions,
|
34979
35169
|
onChange: (val) => onSelect(val)
|
34980
35170
|
}) : /* @__PURE__ */ React__default.createElement(Tree$1, {
|
@@ -34992,42 +35182,58 @@ const MergeTags$1 = React__default.memo((props) => {
|
|
34992
35182
|
const borderStyleOptions = [
|
34993
35183
|
{
|
34994
35184
|
value: "dashed",
|
34995
|
-
label
|
35185
|
+
get label() {
|
35186
|
+
return t("Dashed");
|
35187
|
+
}
|
34996
35188
|
},
|
34997
35189
|
{
|
34998
35190
|
value: "dotted",
|
34999
|
-
label
|
35191
|
+
get label() {
|
35192
|
+
return t("Dotted");
|
35193
|
+
}
|
35000
35194
|
},
|
35001
35195
|
{
|
35002
35196
|
value: "solid",
|
35003
|
-
label
|
35197
|
+
get label() {
|
35198
|
+
return t("Solid");
|
35199
|
+
}
|
35004
35200
|
},
|
35005
35201
|
{
|
35006
35202
|
value: "double",
|
35007
|
-
label
|
35203
|
+
get label() {
|
35204
|
+
return t("double");
|
35205
|
+
}
|
35008
35206
|
},
|
35009
35207
|
{
|
35010
35208
|
value: "ridge",
|
35011
|
-
label
|
35209
|
+
get label() {
|
35210
|
+
return t("ridge");
|
35211
|
+
}
|
35012
35212
|
},
|
35013
35213
|
{
|
35014
35214
|
value: "groove",
|
35015
|
-
label
|
35215
|
+
get label() {
|
35216
|
+
return t("groove");
|
35217
|
+
}
|
35016
35218
|
},
|
35017
35219
|
{
|
35018
35220
|
value: "inset",
|
35019
|
-
label
|
35221
|
+
get label() {
|
35222
|
+
return t("inset");
|
35223
|
+
}
|
35020
35224
|
},
|
35021
35225
|
{
|
35022
35226
|
value: "outset",
|
35023
|
-
label
|
35227
|
+
get label() {
|
35228
|
+
return t("outset");
|
35229
|
+
}
|
35024
35230
|
}
|
35025
35231
|
];
|
35026
35232
|
function BorderStyle() {
|
35027
35233
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
35028
35234
|
return useMemo(() => {
|
35029
35235
|
return /* @__PURE__ */ React__default.createElement(SelectField, {
|
35030
|
-
label: "Style",
|
35236
|
+
label: t("Style"),
|
35031
35237
|
name: `${focusIdx2}.attributes.border-style`,
|
35032
35238
|
options: borderStyleOptions
|
35033
35239
|
});
|
@@ -35047,7 +35253,7 @@ function BorderWidth() {
|
|
35047
35253
|
const { focusIdx: focusIdx2 } = useFocusIdx();
|
35048
35254
|
return useMemo(() => {
|
35049
35255
|
return /* @__PURE__ */ React__default.createElement(TextField, {
|
35050
|
-
label: "Width",
|
35256
|
+
label: t("Width"),
|
35051
35257
|
quickchange: true,
|
35052
35258
|
name: `${focusIdx2}.attributes.border-width`
|
35053
35259
|
});
|
@@ -35063,11 +35269,11 @@ function Button() {
|
|
35063
35269
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
35064
35270
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35065
35271
|
name: "-1",
|
35066
|
-
header: "Setting"
|
35272
|
+
header: t("Setting")
|
35067
35273
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35068
35274
|
direction: "vertical"
|
35069
35275
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35070
|
-
label: /* @__PURE__ */ React__default.createElement(Space$1, null, /* @__PURE__ */ React__default.createElement("span", null, "Content"), mergeTags2 && /* @__PURE__ */ React__default.createElement(Popover$1, {
|
35276
|
+
label: /* @__PURE__ */ React__default.createElement(Space$1, null, /* @__PURE__ */ React__default.createElement("span", null, t("Content")), mergeTags2 && /* @__PURE__ */ React__default.createElement(Popover$1, {
|
35071
35277
|
trigger: "click",
|
35072
35278
|
content: /* @__PURE__ */ React__default.createElement(MergeTags$1, {
|
35073
35279
|
value: input.value,
|
@@ -35082,7 +35288,7 @@ function Button() {
|
|
35082
35288
|
name: `${focusIdx2}.data.value.content`
|
35083
35289
|
}), /* @__PURE__ */ React__default.createElement(Link, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35084
35290
|
name: "0",
|
35085
|
-
header: "Dimension"
|
35291
|
+
header: t("Dimension")
|
35086
35292
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35087
35293
|
direction: "vertical"
|
35088
35294
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35091,32 +35297,33 @@ function Button() {
|
|
35091
35297
|
offset: 1,
|
35092
35298
|
span: 11
|
35093
35299
|
}, /* @__PURE__ */ React__default.createElement(FontWeight, null))), /* @__PURE__ */ React__default.createElement(Padding, {
|
35094
|
-
title: "Padding",
|
35095
|
-
attributeName: "padding"
|
35300
|
+
title: t("Padding"),
|
35301
|
+
attributeName: "padding",
|
35302
|
+
showResetAll: true
|
35096
35303
|
}), /* @__PURE__ */ React__default.createElement(Padding, {
|
35097
|
-
title: "Inner padding",
|
35304
|
+
title: t("Inner padding"),
|
35098
35305
|
attributeName: "inner-padding"
|
35099
35306
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35100
35307
|
name: "1",
|
35101
|
-
header: "Color"
|
35308
|
+
header: t("Color")
|
35102
35309
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35103
35310
|
direction: "vertical"
|
35104
35311
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35105
35312
|
span: 11
|
35106
35313
|
}, /* @__PURE__ */ React__default.createElement(Color, {
|
35107
|
-
title: "Text color"
|
35314
|
+
title: t("Text color")
|
35108
35315
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35109
35316
|
offset: 1,
|
35110
35317
|
span: 11
|
35111
35318
|
}, /* @__PURE__ */ React__default.createElement(BackgroundColor, {
|
35112
|
-
title: "Button color"
|
35319
|
+
title: t("Button color")
|
35113
35320
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35114
35321
|
span: 11
|
35115
35322
|
}, /* @__PURE__ */ React__default.createElement(ContainerBackgroundColor, {
|
35116
|
-
title: "Background color"
|
35323
|
+
title: t("Background color")
|
35117
35324
|
}))))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35118
35325
|
name: "2",
|
35119
|
-
header: "Typography"
|
35326
|
+
header: t("Typography")
|
35120
35327
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35121
35328
|
direction: "vertical"
|
35122
35329
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35136,10 +35343,10 @@ function Button() {
|
|
35136
35343
|
span: 11
|
35137
35344
|
}, /* @__PURE__ */ React__default.createElement(LetterSpacing, null))), /* @__PURE__ */ React__default.createElement(Align, null), /* @__PURE__ */ React__default.createElement(FontStyle, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35138
35345
|
name: "3",
|
35139
|
-
header: "Border"
|
35346
|
+
header: t("Border")
|
35140
35347
|
}, /* @__PURE__ */ React__default.createElement(Border, null)), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35141
35348
|
name: "4",
|
35142
|
-
header: "Extra"
|
35349
|
+
header: t("Extra")
|
35143
35350
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35144
35351
|
span: 24
|
35145
35352
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35149,7 +35356,7 @@ function Divider() {
|
|
35149
35356
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
35150
35357
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35151
35358
|
name: "1",
|
35152
|
-
header: "Dimension"
|
35359
|
+
header: t("Dimension")
|
35153
35360
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35154
35361
|
direction: "vertical"
|
35155
35362
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35161,7 +35368,7 @@ function Divider() {
|
|
35161
35368
|
span: 11
|
35162
35369
|
})), /* @__PURE__ */ React__default.createElement(Align, null), /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35163
35370
|
name: "2",
|
35164
|
-
header: "Border"
|
35371
|
+
header: t("Border")
|
35165
35372
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35166
35373
|
wrap: false,
|
35167
35374
|
spacing: "tight"
|
@@ -35173,17 +35380,17 @@ function Divider() {
|
|
35173
35380
|
style: { width: 100 }
|
35174
35381
|
}, /* @__PURE__ */ React__default.createElement(BorderColor, null)))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35175
35382
|
name: "3",
|
35176
|
-
header: "Background"
|
35383
|
+
header: t("Background")
|
35177
35384
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35178
35385
|
span: 11
|
35179
35386
|
}, /* @__PURE__ */ React__default.createElement(ContainerBackgroundColor, {
|
35180
|
-
title: "Background"
|
35387
|
+
title: t("Background")
|
35181
35388
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35182
35389
|
offset: 1,
|
35183
35390
|
span: 11
|
35184
35391
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35185
35392
|
name: "4",
|
35186
|
-
header: "Extra"
|
35393
|
+
header: t("Extra")
|
35187
35394
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35188
35395
|
span: 24
|
35189
35396
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35196,33 +35403,33 @@ function Wrapper() {
|
|
35196
35403
|
defaultActiveKey: ["0", "1", "2"]
|
35197
35404
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35198
35405
|
name: "0",
|
35199
|
-
header: "Dimension"
|
35406
|
+
header: t("Dimension")
|
35200
35407
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35201
35408
|
vertical: true,
|
35202
35409
|
spacing: "tight"
|
35203
35410
|
}, /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35204
35411
|
name: "1",
|
35205
|
-
header: "Background"
|
35412
|
+
header: t("Background")
|
35206
35413
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35207
35414
|
vertical: true,
|
35208
35415
|
spacing: "tight"
|
35209
35416
|
}, /* @__PURE__ */ React__default.createElement(Background, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35210
35417
|
name: "2",
|
35211
|
-
header: "Border"
|
35418
|
+
header: t("Border")
|
35212
35419
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35213
35420
|
vertical: true,
|
35214
35421
|
spacing: "tight"
|
35215
35422
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35216
|
-
label: "Border",
|
35423
|
+
label: t("Border"),
|
35217
35424
|
name: `${focusIdx2}.attributes.border`,
|
35218
35425
|
inline: true
|
35219
35426
|
}), /* @__PURE__ */ React__default.createElement(TextField, {
|
35220
|
-
label: "Background border radius",
|
35427
|
+
label: t("Background border radius"),
|
35221
35428
|
name: `${focusIdx2}.attributes.border-radius`,
|
35222
35429
|
inline: true
|
35223
35430
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35224
35431
|
name: "4",
|
35225
|
-
header: "Extra"
|
35432
|
+
header: t("Extra")
|
35226
35433
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35227
35434
|
span: 24
|
35228
35435
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35232,17 +35439,17 @@ function Spacer() {
|
|
35232
35439
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
35233
35440
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35234
35441
|
name: "1",
|
35235
|
-
header: "Dimension"
|
35442
|
+
header: t("Dimension")
|
35236
35443
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35237
35444
|
direction: "vertical"
|
35238
35445
|
}, /* @__PURE__ */ React__default.createElement(Height, null), /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35239
35446
|
name: "2",
|
35240
|
-
header: "Background"
|
35447
|
+
header: t("Background")
|
35241
35448
|
}, /* @__PURE__ */ React__default.createElement(ContainerBackgroundColor, {
|
35242
|
-
title: "Background color"
|
35449
|
+
title: t("Background color")
|
35243
35450
|
})), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35244
35451
|
name: "4",
|
35245
|
-
header: "Extra"
|
35452
|
+
header: t("Extra")
|
35246
35453
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35247
35454
|
span: 24
|
35248
35455
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35253,7 +35460,7 @@ function Raw() {
|
|
35253
35460
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
|
35254
35461
|
style: { padding: 20 },
|
35255
35462
|
extra: /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
35256
|
-
content: "Html mode"
|
35463
|
+
content: t("Html mode")
|
35257
35464
|
}, /* @__PURE__ */ React__default.createElement(Button$4, {
|
35258
35465
|
onClick: () => setVisible(true),
|
35259
35466
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
@@ -35272,25 +35479,35 @@ function Raw() {
|
|
35272
35479
|
const positionOptions = [
|
35273
35480
|
{
|
35274
35481
|
value: "left",
|
35275
|
-
label
|
35482
|
+
get label() {
|
35483
|
+
return t("Left");
|
35484
|
+
}
|
35276
35485
|
},
|
35277
35486
|
{
|
35278
35487
|
value: "right",
|
35279
|
-
label
|
35488
|
+
get label() {
|
35489
|
+
return t("Right");
|
35490
|
+
}
|
35280
35491
|
}
|
35281
35492
|
];
|
35282
35493
|
const alignOptions = [
|
35283
35494
|
{
|
35284
35495
|
value: "top",
|
35285
|
-
label
|
35496
|
+
get label() {
|
35497
|
+
return t("top");
|
35498
|
+
}
|
35286
35499
|
},
|
35287
35500
|
{
|
35288
35501
|
value: "middle",
|
35289
|
-
label
|
35502
|
+
get label() {
|
35503
|
+
return t("middle");
|
35504
|
+
}
|
35290
35505
|
},
|
35291
35506
|
{
|
35292
35507
|
value: "bottom",
|
35293
|
-
label
|
35508
|
+
get label() {
|
35509
|
+
return t("bottom");
|
35510
|
+
}
|
35294
35511
|
}
|
35295
35512
|
];
|
35296
35513
|
function Accordion() {
|
@@ -35300,7 +35517,7 @@ function Accordion() {
|
|
35300
35517
|
defaultActiveKey: ["0", "1", "2"]
|
35301
35518
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35302
35519
|
name: "0",
|
35303
|
-
header: "Setting"
|
35520
|
+
header: t("Setting")
|
35304
35521
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35305
35522
|
direction: "vertical"
|
35306
35523
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35311,31 +35528,31 @@ function Accordion() {
|
|
35311
35528
|
}, /* @__PURE__ */ React__default.createElement(FontFamily, null))), /* @__PURE__ */ React__default.createElement(Padding, null), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35312
35529
|
span: 11
|
35313
35530
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35314
|
-
label: "Icon width",
|
35531
|
+
label: t("Icon width"),
|
35315
35532
|
name: `${focusIdx2}.attributes.icon-width`
|
35316
35533
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35317
35534
|
offset: 1,
|
35318
35535
|
span: 11
|
35319
35536
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35320
|
-
label: "Icon height",
|
35537
|
+
label: t("Icon height"),
|
35321
35538
|
name: `${focusIdx2}.attributes.icon-height`
|
35322
35539
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35323
35540
|
span: 11
|
35324
35541
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
35325
|
-
label: "Unwrapped icon",
|
35542
|
+
label: t("Unwrapped icon"),
|
35326
35543
|
name: `${focusIdx2}.attributes.icon-unwrapped-url`,
|
35327
35544
|
uploadHandler: onUploadImage
|
35328
35545
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35329
35546
|
offset: 1,
|
35330
35547
|
span: 11
|
35331
35548
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
35332
|
-
label: "Wrapped icon",
|
35549
|
+
label: t("Wrapped icon"),
|
35333
35550
|
name: `${focusIdx2}.attributes.icon-wrapped-url`,
|
35334
35551
|
uploadHandler: onUploadImage
|
35335
35552
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35336
35553
|
span: 11
|
35337
35554
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
35338
|
-
label: "Icon position",
|
35555
|
+
label: t("Icon position"),
|
35339
35556
|
name: `${focusIdx2}.attributes.icon-position`,
|
35340
35557
|
options: positionOptions
|
35341
35558
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35343,15 +35560,15 @@ function Accordion() {
|
|
35343
35560
|
span: 11
|
35344
35561
|
}, /* @__PURE__ */ React__default.createElement(SelectField, {
|
35345
35562
|
style: { width: 120 },
|
35346
|
-
label: "Icon align",
|
35563
|
+
label: t("Icon align"),
|
35347
35564
|
name: `${focusIdx2}.attributes.icon-align`,
|
35348
35565
|
options: alignOptions
|
35349
35566
|
}))), /* @__PURE__ */ React__default.createElement(TextField, {
|
35350
|
-
label: "
|
35567
|
+
label: t("Border"),
|
35351
35568
|
name: `${focusIdx2}.attributes.border`
|
35352
35569
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35353
35570
|
name: "4",
|
35354
|
-
header: "Extra"
|
35571
|
+
header: t("Extra")
|
35355
35572
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35356
35573
|
span: 24
|
35357
35574
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35362,7 +35579,7 @@ function AccordionElement() {
|
|
35362
35579
|
defaultActiveKey: ["0", "1", "2"]
|
35363
35580
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35364
35581
|
name: "0",
|
35365
|
-
header: "Setting"
|
35582
|
+
header: t("Setting")
|
35366
35583
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35367
35584
|
direction: "vertical"
|
35368
35585
|
}, /* @__PURE__ */ React__default.createElement(Border, null), /* @__PURE__ */ React__default.createElement(BackgroundColor, null), /* @__PURE__ */ React__default.createElement(FontFamily, null)))));
|
@@ -35373,11 +35590,11 @@ function AccordionTitle() {
|
|
35373
35590
|
defaultActiveKey: ["0", "1", "2"]
|
35374
35591
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35375
35592
|
name: "0",
|
35376
|
-
header: "Setting"
|
35593
|
+
header: t("Setting")
|
35377
35594
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35378
35595
|
direction: "vertical"
|
35379
35596
|
}, /* @__PURE__ */ React__default.createElement(TextAreaField, {
|
35380
|
-
label: "Content",
|
35597
|
+
label: t("Content"),
|
35381
35598
|
name: `${focusIdx2}.data.value.content`
|
35382
35599
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35383
35600
|
span: 11
|
@@ -35395,7 +35612,7 @@ function AccordionTitle() {
|
|
35395
35612
|
offset: 1,
|
35396
35613
|
span: 11
|
35397
35614
|
})), /* @__PURE__ */ React__default.createElement(Padding, {
|
35398
|
-
title: "Padding",
|
35615
|
+
title: t("Padding"),
|
35399
35616
|
attributeName: "padding"
|
35400
35617
|
})))));
|
35401
35618
|
}
|
@@ -35405,11 +35622,11 @@ function AccordionText() {
|
|
35405
35622
|
defaultActiveKey: ["0", "1", "2"]
|
35406
35623
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35407
35624
|
name: "0",
|
35408
|
-
header: "Setting"
|
35625
|
+
header: t("Setting")
|
35409
35626
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35410
35627
|
direction: "vertical"
|
35411
35628
|
}, /* @__PURE__ */ React__default.createElement(TextAreaField, {
|
35412
|
-
label: "Content",
|
35629
|
+
label: t("Content"),
|
35413
35630
|
name: `${focusIdx2}.data.value.content`,
|
35414
35631
|
autoSize: { minRows: 5 }
|
35415
35632
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35428,18 +35645,22 @@ function AccordionText() {
|
|
35428
35645
|
offset: 1,
|
35429
35646
|
span: 11
|
35430
35647
|
}, /* @__PURE__ */ React__default.createElement(BackgroundColor, null))), /* @__PURE__ */ React__default.createElement(Padding, {
|
35431
|
-
title: "Padding",
|
35648
|
+
title: t("Padding"),
|
35432
35649
|
attributeName: "padding"
|
35433
35650
|
})))));
|
35434
35651
|
}
|
35435
35652
|
const options$2 = [
|
35436
35653
|
{
|
35437
35654
|
value: "hidden",
|
35438
|
-
label
|
35655
|
+
get label() {
|
35656
|
+
return t("hidden");
|
35657
|
+
}
|
35439
35658
|
},
|
35440
35659
|
{
|
35441
35660
|
value: "visible",
|
35442
|
-
label
|
35661
|
+
get label() {
|
35662
|
+
return t("visible");
|
35663
|
+
}
|
35443
35664
|
}
|
35444
35665
|
];
|
35445
35666
|
function Carousel() {
|
@@ -35450,16 +35671,16 @@ function Carousel() {
|
|
35450
35671
|
defaultActiveKey: ["0", "1", "2", "3", "4"]
|
35451
35672
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35452
35673
|
name: "0",
|
35453
|
-
header: "Dimension"
|
35674
|
+
header: t("Dimension")
|
35454
35675
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35455
35676
|
direction: "vertical"
|
35456
35677
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35457
|
-
label: "Thumbnail width",
|
35678
|
+
label: t("Thumbnail width"),
|
35458
35679
|
name: `${focusIdx2}.attributes.tb-width`,
|
35459
35680
|
quickchange: true,
|
35460
35681
|
inline: true
|
35461
35682
|
}), /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
35462
|
-
label: "Thumbnails",
|
35683
|
+
label: t("Thumbnails"),
|
35463
35684
|
name: `${focusIdx2}.attributes.thumbnails`,
|
35464
35685
|
options: options$2,
|
35465
35686
|
inline: true
|
@@ -35468,7 +35689,7 @@ function Carousel() {
|
|
35468
35689
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35469
35690
|
name: "4",
|
35470
35691
|
contentStyle: { padding: 0 },
|
35471
|
-
header: "Images"
|
35692
|
+
header: t("Images")
|
35472
35693
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35473
35694
|
vertical: true,
|
35474
35695
|
spacing: "tight"
|
@@ -35487,54 +35708,54 @@ function Carousel() {
|
|
35487
35708
|
}
|
35488
35709
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35489
35710
|
name: "3",
|
35490
|
-
header: "Icon"
|
35711
|
+
header: t("Icon")
|
35491
35712
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35492
35713
|
span: 11
|
35493
35714
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35494
|
-
label: "Left icon",
|
35715
|
+
label: t("Left icon"),
|
35495
35716
|
name: `${focusIdx2}.attributes.left-icon`
|
35496
35717
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35497
35718
|
offset: 1,
|
35498
35719
|
span: 11
|
35499
35720
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35500
|
-
label: "Right icon",
|
35721
|
+
label: t("Right icon"),
|
35501
35722
|
name: `${focusIdx2}.attributes.right-icon`
|
35502
35723
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35503
35724
|
span: 11
|
35504
35725
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35505
|
-
label: "Icon width",
|
35726
|
+
label: t("Icon width"),
|
35506
35727
|
name: `${focusIdx2}.attributes.icon-width`
|
35507
35728
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35508
35729
|
offset: 1,
|
35509
35730
|
span: 11
|
35510
35731
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35511
35732
|
name: "1",
|
35512
|
-
header: "Border"
|
35733
|
+
header: t("Border")
|
35513
35734
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35514
35735
|
span: 11
|
35515
35736
|
}, /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
35516
|
-
label: "Hovered border",
|
35737
|
+
label: t("Hovered border"),
|
35517
35738
|
name: `${focusIdx2}.attributes.tb-hover-border-color`
|
35518
35739
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35519
35740
|
offset: 1,
|
35520
35741
|
span: 11
|
35521
35742
|
}, /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
35522
|
-
label: "Selected Border",
|
35743
|
+
label: t("Selected Border"),
|
35523
35744
|
name: `${focusIdx2}.attributes.tb-selected-border-color`
|
35524
35745
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35525
35746
|
span: 11
|
35526
35747
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35527
|
-
label: "Border of the thumbnails",
|
35748
|
+
label: t("Border of the thumbnails"),
|
35528
35749
|
name: `${focusIdx2}.attributes.tb-border`
|
35529
35750
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35530
35751
|
offset: 1,
|
35531
35752
|
span: 11
|
35532
35753
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35533
|
-
label: "Border radius of the thumbnails",
|
35754
|
+
label: t("Border radius of the thumbnails"),
|
35534
35755
|
name: `${focusIdx2}.attributes.tb-border-radius`
|
35535
35756
|
})))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35536
35757
|
name: "4",
|
35537
|
-
header: "Extra"
|
35758
|
+
header: t("Extra")
|
35538
35759
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35539
35760
|
span: 24
|
35540
35761
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35548,46 +35769,50 @@ function CarouselImage({
|
|
35548
35769
|
return /* @__PURE__ */ React__default.createElement(Space$1, {
|
35549
35770
|
direction: "vertical"
|
35550
35771
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
35551
|
-
label: "Image",
|
35772
|
+
label: t("Image"),
|
35552
35773
|
labelHidden: true,
|
35553
35774
|
name: `${focusIdx2}.data.value.images.[${index2}].src`,
|
35554
|
-
helpText: "The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.",
|
35775
|
+
helpText: t("The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally."),
|
35555
35776
|
uploadHandler: onUploadImage
|
35556
35777
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35557
35778
|
span: 11
|
35558
35779
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35559
35780
|
prefix: /* @__PURE__ */ React__default.createElement(IconLink$1, null),
|
35560
|
-
label: "Url",
|
35781
|
+
label: t("Url"),
|
35561
35782
|
name: `${focusIdx2}.data.value.images.[${index2}].href`
|
35562
35783
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35563
35784
|
offset: 1,
|
35564
35785
|
span: 11
|
35565
35786
|
}, /* @__PURE__ */ React__default.createElement(SelectField, {
|
35566
|
-
label: "Target",
|
35787
|
+
label: t("Target"),
|
35567
35788
|
name: `${focusIdx2}.data.value.images.[${index2}].target`,
|
35568
35789
|
options: [
|
35569
35790
|
{
|
35570
35791
|
value: "",
|
35571
|
-
label: "_self"
|
35792
|
+
label: t("_self")
|
35572
35793
|
},
|
35573
35794
|
{
|
35574
35795
|
value: "_blank",
|
35575
|
-
label: "_blank"
|
35796
|
+
label: t("_blank")
|
35576
35797
|
}
|
35577
35798
|
]
|
35578
35799
|
}))), /* @__PURE__ */ React__default.createElement(TextField, {
|
35579
|
-
label: "Title",
|
35800
|
+
label: t("Title"),
|
35580
35801
|
name: `${focusIdx2}.data.value.image.[${index2}].title`
|
35581
35802
|
}));
|
35582
35803
|
}
|
35583
35804
|
const options$1 = [
|
35584
35805
|
{
|
35585
35806
|
value: "fluid-height",
|
35586
|
-
label
|
35807
|
+
get label() {
|
35808
|
+
return t("Fluid height");
|
35809
|
+
}
|
35587
35810
|
},
|
35588
35811
|
{
|
35589
35812
|
value: "fixed-height",
|
35590
|
-
label
|
35813
|
+
get label() {
|
35814
|
+
return t("Fixed height");
|
35815
|
+
}
|
35591
35816
|
}
|
35592
35817
|
];
|
35593
35818
|
function Hero() {
|
@@ -35597,11 +35822,11 @@ function Hero() {
|
|
35597
35822
|
defaultActiveKey: ["0", "1", "2"]
|
35598
35823
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35599
35824
|
name: "0",
|
35600
|
-
header: "Dimension"
|
35825
|
+
header: t("Dimension")
|
35601
35826
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35602
35827
|
direction: "vertical"
|
35603
35828
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
35604
|
-
label: "Mode",
|
35829
|
+
label: t("Mode"),
|
35605
35830
|
name: `${focusIdx2}.attributes.mode`,
|
35606
35831
|
options: options$1
|
35607
35832
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35611,42 +35836,42 @@ function Hero() {
|
|
35611
35836
|
span: 11
|
35612
35837
|
}, /* @__PURE__ */ React__default.createElement(Height, null))), /* @__PURE__ */ React__default.createElement(Padding, null), /* @__PURE__ */ React__default.createElement(VerticalAlign, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35613
35838
|
name: "1",
|
35614
|
-
header: "Background"
|
35839
|
+
header: t("Background")
|
35615
35840
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35616
35841
|
direction: "vertical"
|
35617
35842
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
35618
|
-
label: "src",
|
35843
|
+
label: t("src"),
|
35619
35844
|
name: `${focusIdx2}.attributes.background-url`,
|
35620
|
-
helpText: "The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally.",
|
35845
|
+
helpText: t("The image suffix should be .jpg, jpeg, png, gif, etc. Otherwise, the picture may not be displayed normally."),
|
35621
35846
|
uploadHandler: onUploadImage
|
35622
35847
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35623
35848
|
span: 11
|
35624
35849
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35625
|
-
label: "Background width",
|
35850
|
+
label: t("Background width"),
|
35626
35851
|
name: `${focusIdx2}.attributes.background-width`
|
35627
35852
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35628
35853
|
offset: 1,
|
35629
35854
|
span: 11
|
35630
35855
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35631
|
-
label: "Background height",
|
35856
|
+
label: t("Background height"),
|
35632
35857
|
name: `${focusIdx2}.attributes.background-height`
|
35633
35858
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35634
35859
|
span: 11
|
35635
35860
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35636
|
-
label: "Background position",
|
35861
|
+
label: t("Background position"),
|
35637
35862
|
name: `${focusIdx2}.attributes.background-position`
|
35638
35863
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35639
35864
|
offset: 1,
|
35640
35865
|
span: 11
|
35641
35866
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35642
|
-
label: "Border radius",
|
35867
|
+
label: t("Border radius"),
|
35643
35868
|
name: `${focusIdx2}.attributes.border-radius`,
|
35644
35869
|
unitOptions: "percent"
|
35645
35870
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35646
35871
|
span: 11
|
35647
35872
|
}, /* @__PURE__ */ React__default.createElement(BackgroundColor, null))))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35648
35873
|
name: "4",
|
35649
|
-
header: "Extra"
|
35874
|
+
header: t("Extra")
|
35650
35875
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35651
35876
|
span: 24
|
35652
35877
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35659,21 +35884,21 @@ function Navbar() {
|
|
35659
35884
|
defaultActiveKey: ["0", "1", "2"]
|
35660
35885
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35661
35886
|
name: "0",
|
35662
|
-
header: "Layout"
|
35887
|
+
header: t("Layout")
|
35663
35888
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35664
35889
|
vertical: true,
|
35665
35890
|
spacing: "tight"
|
35666
35891
|
}, /* @__PURE__ */ React__default.createElement(Align, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35667
35892
|
contentStyle: { padding: 0 },
|
35668
35893
|
name: "1",
|
35669
|
-
header: "Navbar links"
|
35894
|
+
header: t("Navbar links")
|
35670
35895
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35671
35896
|
direction: "vertical",
|
35672
35897
|
style: { width: "100%" }
|
35673
35898
|
}, /* @__PURE__ */ React__default.createElement(EditTabField, {
|
35674
35899
|
tabPosition: "top",
|
35675
35900
|
name: `${focusIdx2}.data.value.links`,
|
35676
|
-
label: "Links",
|
35901
|
+
label: t("Links"),
|
35677
35902
|
labelHidden: true,
|
35678
35903
|
renderItem: (item2, index2) => /* @__PURE__ */ React__default.createElement(NavbarLink, {
|
35679
35904
|
item: item2,
|
@@ -35688,7 +35913,7 @@ function Navbar() {
|
|
35688
35913
|
}
|
35689
35914
|
}), /* @__PURE__ */ React__default.createElement("div", null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35690
35915
|
name: "4",
|
35691
|
-
header: "Extra"
|
35916
|
+
header: t("Extra")
|
35692
35917
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35693
35918
|
span: 24
|
35694
35919
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35706,13 +35931,13 @@ function NavbarLink({
|
|
35706
35931
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35707
35932
|
span: 11
|
35708
35933
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35709
|
-
label: "Content",
|
35934
|
+
label: t("Content"),
|
35710
35935
|
name: `${focusIdx2}.data.value.links.[${index2}].content`
|
35711
35936
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35712
35937
|
offset: 1,
|
35713
35938
|
span: 11
|
35714
35939
|
}, /* @__PURE__ */ React__default.createElement(ColorPickerField, {
|
35715
|
-
label: "Color",
|
35940
|
+
label: t("Color"),
|
35716
35941
|
name: `${focusIdx2}.data.value.links.[${index2}].color`
|
35717
35942
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35718
35943
|
span: 11
|
@@ -35722,9 +35947,10 @@ function NavbarLink({
|
|
35722
35947
|
offset: 1,
|
35723
35948
|
span: 11
|
35724
35949
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35725
|
-
label: "Font size",
|
35726
|
-
|
35727
|
-
|
35950
|
+
label: t("Font size (px)"),
|
35951
|
+
name: `${focusIdx2}.data.value.links.[${index2}].font-size`,
|
35952
|
+
config: pixelAdapter,
|
35953
|
+
autoComplete: "off"
|
35728
35954
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35729
35955
|
span: 11
|
35730
35956
|
}, /* @__PURE__ */ React__default.createElement(LineHeight, {
|
@@ -35756,23 +35982,23 @@ function NavbarLink({
|
|
35756
35982
|
span: 11
|
35757
35983
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35758
35984
|
prefix: /* @__PURE__ */ React__default.createElement(IconLink$1, null),
|
35759
|
-
label: /* @__PURE__ */ React__default.createElement("span", null, "Url"),
|
35985
|
+
label: /* @__PURE__ */ React__default.createElement("span", null, t("Url")),
|
35760
35986
|
name: `${focusIdx2}.data.value.links.[${index2}].href`
|
35761
35987
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35762
35988
|
offset: 1,
|
35763
35989
|
span: 11
|
35764
35990
|
}, /* @__PURE__ */ React__default.createElement(SelectField, {
|
35765
35991
|
style: { minWidth: 65 },
|
35766
|
-
label: "Target",
|
35992
|
+
label: t("Target"),
|
35767
35993
|
name: `${focusIdx2}.data.value.links.[${index2}].target`,
|
35768
35994
|
options: [
|
35769
35995
|
{
|
35770
35996
|
value: "_blank",
|
35771
|
-
label: "_blank"
|
35997
|
+
label: t("_blank")
|
35772
35998
|
},
|
35773
35999
|
{
|
35774
36000
|
value: "_self",
|
35775
|
-
label: "_self"
|
36001
|
+
label: t("_self")
|
35776
36002
|
}
|
35777
36003
|
]
|
35778
36004
|
}))), /* @__PURE__ */ React__default.createElement(NavbarLinkPadding, {
|
@@ -35783,11 +36009,15 @@ function NavbarLink({
|
|
35783
36009
|
const options = [
|
35784
36010
|
{
|
35785
36011
|
value: "vertical",
|
35786
|
-
label
|
36012
|
+
get label() {
|
36013
|
+
return t("vertical");
|
36014
|
+
}
|
35787
36015
|
},
|
35788
36016
|
{
|
35789
36017
|
value: "horizontal",
|
35790
|
-
label
|
36018
|
+
get label() {
|
36019
|
+
return t("horizontal");
|
36020
|
+
}
|
35791
36021
|
}
|
35792
36022
|
];
|
35793
36023
|
function Social() {
|
@@ -35802,16 +36032,16 @@ function Social() {
|
|
35802
36032
|
defaultActiveKey: ["0", "1", "2", "3"]
|
35803
36033
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35804
36034
|
name: "1",
|
35805
|
-
header: "Setting"
|
36035
|
+
header: t("Setting")
|
35806
36036
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35807
36037
|
direction: "vertical"
|
35808
36038
|
}, /* @__PURE__ */ React__default.createElement(RadioGroupField, {
|
35809
|
-
label: "Mode",
|
36039
|
+
label: t("Mode"),
|
35810
36040
|
name: `${focusIdx2}.attributes.mode`,
|
35811
36041
|
options
|
35812
36042
|
}), /* @__PURE__ */ React__default.createElement(Align, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35813
36043
|
name: "3",
|
35814
|
-
header: "Typography"
|
36044
|
+
header: t("Typography")
|
35815
36045
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35816
36046
|
direction: "vertical"
|
35817
36047
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35830,7 +36060,7 @@ function Social() {
|
|
35830
36060
|
offset: 1,
|
35831
36061
|
span: 11
|
35832
36062
|
}, /* @__PURE__ */ React__default.createElement(ContainerBackgroundColor, {
|
35833
|
-
title: "Background color"
|
36063
|
+
title: t("Background color")
|
35834
36064
|
}))), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35835
36065
|
span: 11
|
35836
36066
|
}, /* @__PURE__ */ React__default.createElement(TextDecoration, null)), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35838,7 +36068,7 @@ function Social() {
|
|
35838
36068
|
span: 11
|
35839
36069
|
}, /* @__PURE__ */ React__default.createElement(FontStyle, null))))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35840
36070
|
name: "2",
|
35841
|
-
header: "Social item",
|
36071
|
+
header: t("Social item"),
|
35842
36072
|
contentStyle: { padding: 10 }
|
35843
36073
|
}, /* @__PURE__ */ React__default.createElement(EditGridTabField, {
|
35844
36074
|
tabPosition: "top",
|
@@ -35851,30 +36081,30 @@ function Social() {
|
|
35851
36081
|
})
|
35852
36082
|
})), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35853
36083
|
name: "0",
|
35854
|
-
header: "Dimension"
|
36084
|
+
header: t("Dimension")
|
35855
36085
|
}, /* @__PURE__ */ React__default.createElement(Space$1, {
|
35856
36086
|
direction: "vertical",
|
35857
36087
|
size: "large"
|
35858
36088
|
}, /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35859
36089
|
span: 11
|
35860
36090
|
}, /* @__PURE__ */ React__default.createElement(InputWithUnitField, {
|
35861
|
-
label: "Icon width",
|
36091
|
+
label: t("Icon width"),
|
35862
36092
|
name: `${focusIdx2}.attributes.icon-size`
|
35863
36093
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35864
36094
|
offset: 1,
|
35865
36095
|
span: 11
|
35866
36096
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35867
|
-
label: "Border radius",
|
36097
|
+
label: t("Border radius"),
|
35868
36098
|
name: `${focusIdx2}.attributes.border-radius`
|
35869
36099
|
}))), /* @__PURE__ */ React__default.createElement(Padding, null), /* @__PURE__ */ React__default.createElement(Padding, {
|
35870
36100
|
attributeName: "inner-padding",
|
35871
|
-
title: "Icon padding"
|
36101
|
+
title: t("Icon padding")
|
35872
36102
|
}), /* @__PURE__ */ React__default.createElement(Padding, {
|
35873
36103
|
attributeName: "text-padding",
|
35874
|
-
title: "Text padding"
|
36104
|
+
title: t("Text padding")
|
35875
36105
|
}))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35876
36106
|
name: "4",
|
35877
|
-
header: "Extra"
|
36107
|
+
header: t("Extra")
|
35878
36108
|
}, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35879
36109
|
span: 24
|
35880
36110
|
}, /* @__PURE__ */ React__default.createElement(ClassName, null)))));
|
@@ -35897,7 +36127,7 @@ function SocialElement({
|
|
35897
36127
|
return /* @__PURE__ */ React__default.createElement(Space$1, {
|
35898
36128
|
direction: "vertical"
|
35899
36129
|
}, /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
35900
|
-
label: "Image",
|
36130
|
+
label: t("Image"),
|
35901
36131
|
autoCompleteOptions,
|
35902
36132
|
labelHidden: true,
|
35903
36133
|
name: `${focusIdx2}.data.value.elements.[${index2}].src`,
|
@@ -35905,7 +36135,7 @@ function SocialElement({
|
|
35905
36135
|
}), /* @__PURE__ */ React__default.createElement(Grid.Row, null, /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
35906
36136
|
span: 11
|
35907
36137
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35908
|
-
label: "Content",
|
36138
|
+
label: t("Content"),
|
35909
36139
|
name: `${focusIdx2}.data.value.elements.[${index2}].content`,
|
35910
36140
|
quickchange: true
|
35911
36141
|
})), /* @__PURE__ */ React__default.createElement(Grid.Col, {
|
@@ -35913,7 +36143,7 @@ function SocialElement({
|
|
35913
36143
|
span: 11
|
35914
36144
|
}, /* @__PURE__ */ React__default.createElement(TextField, {
|
35915
36145
|
prefix: /* @__PURE__ */ React__default.createElement(IconLink$1, null),
|
35916
|
-
label: "Link",
|
36146
|
+
label: t("Link"),
|
35917
36147
|
name: `${focusIdx2}.data.value.elements.[${index2}].href`
|
35918
36148
|
}))));
|
35919
36149
|
}
|
@@ -35921,7 +36151,7 @@ function Table() {
|
|
35921
36151
|
const [visible, setVisible] = useState(false);
|
35922
36152
|
return /* @__PURE__ */ React__default.createElement(AttributesPanelWrapper, {
|
35923
36153
|
extra: /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
35924
|
-
content: "Edit"
|
36154
|
+
content: t("Edit")
|
35925
36155
|
}, /* @__PURE__ */ React__default.createElement(Button$4, {
|
35926
36156
|
onClick: () => setVisible(true),
|
35927
36157
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
@@ -35932,15 +36162,15 @@ function Table() {
|
|
35932
36162
|
defaultActiveKey: ["-1", "0", "1", "2", "3"]
|
35933
36163
|
}, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35934
36164
|
name: "1",
|
35935
|
-
header: "Dimension"
|
36165
|
+
header: t("Dimension")
|
35936
36166
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(Width, null), /* @__PURE__ */ React__default.createElement(Stack$4.Item, null)), /* @__PURE__ */ React__default.createElement(Stack$4, {
|
35937
36167
|
vertical: true
|
35938
36168
|
}, /* @__PURE__ */ React__default.createElement(Padding, null))), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35939
36169
|
name: "2",
|
35940
|
-
header: "Decoration"
|
36170
|
+
header: t("Decoration")
|
35941
36171
|
}, /* @__PURE__ */ React__default.createElement(Color, null), /* @__PURE__ */ React__default.createElement(ContainerBackgroundColor, null), /* @__PURE__ */ React__default.createElement(Border, null)), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
35942
36172
|
name: "2",
|
35943
|
-
header: "Typography"
|
36173
|
+
header: t("Typography")
|
35944
36174
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, null, /* @__PURE__ */ React__default.createElement(FontFamily, null), /* @__PURE__ */ React__default.createElement(FontSize$1, null)), /* @__PURE__ */ React__default.createElement(FontStyle, null), /* @__PURE__ */ React__default.createElement(TextAlign, null))), /* @__PURE__ */ React__default.createElement(HtmlEditor, {
|
35945
36175
|
visible,
|
35946
36176
|
setVisible
|
@@ -36083,7 +36313,7 @@ function MergeTags(props) {
|
|
36083
36313
|
})),
|
36084
36314
|
getPopupContainer: props.getPopupContainer
|
36085
36315
|
}, /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36086
|
-
title: "Merge tag",
|
36316
|
+
title: t("Merge tag"),
|
36087
36317
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36088
36318
|
iconName: "icon-merge-tags"
|
36089
36319
|
})
|
@@ -36143,7 +36373,7 @@ function IconBgColor({ selectionRange, execCommand, getPopoverMountNode }) {
|
|
36143
36373
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
36144
36374
|
style: { borderBottom: `2px solid ${color2}`, position: "absolute", width: "130%", left: "-15%", top: 16 }
|
36145
36375
|
})),
|
36146
|
-
title: "Background color"
|
36376
|
+
title: t("Background color")
|
36147
36377
|
}));
|
36148
36378
|
}
|
36149
36379
|
function IconFontColor({ selectionRange, execCommand, getPopoverMountNode }) {
|
@@ -36175,7 +36405,7 @@ function IconFontColor({ selectionRange, execCommand, getPopoverMountNode }) {
|
|
36175
36405
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
36176
36406
|
style: { borderBottom: `2px solid ${color2}`, position: "absolute", width: "130%", left: "-15%", top: 16 }
|
36177
36407
|
})),
|
36178
|
-
title: "Text color"
|
36408
|
+
title: t("Text color")
|
36179
36409
|
}));
|
36180
36410
|
}
|
36181
36411
|
function BasicTools() {
|
@@ -36213,25 +36443,25 @@ function BasicTools() {
|
|
36213
36443
|
style: { position: "relative", marginRight: 10, color: "#fff", fontFamily: "-apple-system, BlinkMacSystemFont, San Francisco, Segoe UI" }
|
36214
36444
|
}, "Text"), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36215
36445
|
onClick: handleSelectParent,
|
36216
|
-
title: "Select parent block",
|
36446
|
+
title: t("Select parent block"),
|
36217
36447
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36218
36448
|
iconName: "icon-back-parent"
|
36219
36449
|
})
|
36220
36450
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36221
36451
|
onClick: handleCopy,
|
36222
|
-
title: "Copy",
|
36452
|
+
title: t("Copy"),
|
36223
36453
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36224
36454
|
iconName: "icon-copy"
|
36225
36455
|
})
|
36226
36456
|
}), onAddCollection && /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36227
36457
|
onClick: handleAddToCollection,
|
36228
|
-
title: "Add to collection",
|
36458
|
+
title: t("Add to collection"),
|
36229
36459
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36230
36460
|
iconName: "icon-collection"
|
36231
36461
|
})
|
36232
36462
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36233
36463
|
onClick: handleDelete,
|
36234
|
-
title: "Delete",
|
36464
|
+
title: t("Delete"),
|
36235
36465
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36236
36466
|
iconName: "icon-delete"
|
36237
36467
|
})
|
@@ -36268,9 +36498,9 @@ function Unlink(props) {
|
|
36268
36498
|
return /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
36269
36499
|
color: "#fff",
|
36270
36500
|
position: "tl",
|
36271
|
-
content: "Unlink"
|
36501
|
+
content: t("Unlink")
|
36272
36502
|
}, /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36273
|
-
title: "Unlink",
|
36503
|
+
title: t("Unlink"),
|
36274
36504
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36275
36505
|
iconName: "icon-unlink"
|
36276
36506
|
}),
|
@@ -36302,9 +36532,9 @@ function StrikeThrough(props) {
|
|
36302
36532
|
return /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
36303
36533
|
color: "#fff",
|
36304
36534
|
position: "tl",
|
36305
|
-
content: "Strikethrough"
|
36535
|
+
content: t("Strikethrough")
|
36306
36536
|
}, /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36307
|
-
title: "Strikethrough",
|
36537
|
+
title: t("Strikethrough"),
|
36308
36538
|
isActive: Boolean(node),
|
36309
36539
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36310
36540
|
iconName: "icon-strikethrough"
|
@@ -36337,9 +36567,9 @@ function Underline(props) {
|
|
36337
36567
|
return /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
36338
36568
|
color: "#fff",
|
36339
36569
|
position: "tl",
|
36340
|
-
content: "Underline"
|
36570
|
+
content: t("Underline")
|
36341
36571
|
}, /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36342
|
-
title: "Underline",
|
36572
|
+
title: t("Underline"),
|
36343
36573
|
isActive: Boolean(node),
|
36344
36574
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36345
36575
|
iconName: "icon-underline"
|
@@ -36372,9 +36602,9 @@ function Italic(props) {
|
|
36372
36602
|
return /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
36373
36603
|
color: "#fff",
|
36374
36604
|
position: "tl",
|
36375
|
-
content: "Italic"
|
36605
|
+
content: t("Italic")
|
36376
36606
|
}, /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36377
|
-
title: "Italic",
|
36607
|
+
title: t("Italic"),
|
36378
36608
|
isActive: Boolean(node),
|
36379
36609
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36380
36610
|
iconName: "icon-italic"
|
@@ -36407,9 +36637,9 @@ function Bold(props) {
|
|
36407
36637
|
return /* @__PURE__ */ React__default.createElement(Tooltip$1, {
|
36408
36638
|
color: "#fff",
|
36409
36639
|
position: "tl",
|
36410
|
-
content: "Bold"
|
36640
|
+
content: t("Bold")
|
36411
36641
|
}, /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36412
|
-
title: "Bold",
|
36642
|
+
title: t("Bold"),
|
36413
36643
|
isActive: Boolean(node),
|
36414
36644
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36415
36645
|
iconName: "icon-bold"
|
@@ -36494,11 +36724,11 @@ function Tools(props) {
|
|
36494
36724
|
const execCommand = useCallback((cmd, val) => {
|
36495
36725
|
var _a;
|
36496
36726
|
if (!selectionRange) {
|
36497
|
-
console.error("No selectionRange");
|
36727
|
+
console.error(t("No selectionRange"));
|
36498
36728
|
return;
|
36499
36729
|
}
|
36500
36730
|
if (!(focusBlockNode == null ? void 0 : focusBlockNode.contains(selectionRange == null ? void 0 : selectionRange.commonAncestorContainer))) {
|
36501
|
-
console.error("Not commonAncestorContainer");
|
36731
|
+
console.error(t("Not commonAncestorContainer"));
|
36502
36732
|
return;
|
36503
36733
|
}
|
36504
36734
|
restoreRange(selectionRange);
|
@@ -36629,19 +36859,19 @@ function Tools(props) {
|
|
36629
36859
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36630
36860
|
iconName: "icon-align-left"
|
36631
36861
|
}),
|
36632
|
-
title: "Align left"
|
36862
|
+
title: t("Align left")
|
36633
36863
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36634
36864
|
onClick: () => execCommand("justifyCenter"),
|
36635
36865
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36636
36866
|
iconName: "icon-align-center"
|
36637
36867
|
}),
|
36638
|
-
title: "Align center"
|
36868
|
+
title: t("Align center")
|
36639
36869
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36640
36870
|
onClick: () => execCommand("justifyRight"),
|
36641
36871
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36642
36872
|
iconName: "icon-align-right"
|
36643
36873
|
}),
|
36644
|
-
title: "Align right"
|
36874
|
+
title: t("Align right")
|
36645
36875
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
36646
36876
|
className: "easy-email-extensions-divider"
|
36647
36877
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
@@ -36649,13 +36879,13 @@ function Tools(props) {
|
|
36649
36879
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36650
36880
|
iconName: "icon-list-ol"
|
36651
36881
|
}),
|
36652
|
-
title: "Orderlist"
|
36882
|
+
title: t("Orderlist")
|
36653
36883
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
36654
36884
|
onClick: () => execCommand("insertUnorderedList"),
|
36655
36885
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36656
36886
|
iconName: "icon-list-ul"
|
36657
36887
|
}),
|
36658
|
-
title: "Unorderlist"
|
36888
|
+
title: t("Unorderlist")
|
36659
36889
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
36660
36890
|
className: "easy-email-extensions-divider"
|
36661
36891
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
@@ -36663,7 +36893,7 @@ function Tools(props) {
|
|
36663
36893
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36664
36894
|
iconName: "icon-line"
|
36665
36895
|
}),
|
36666
|
-
title: "Line"
|
36896
|
+
title: t("Line")
|
36667
36897
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
36668
36898
|
className: "easy-email-extensions-divider"
|
36669
36899
|
}), /* @__PURE__ */ React__default.createElement(ToolItem$1, {
|
@@ -36671,7 +36901,7 @@ function Tools(props) {
|
|
36671
36901
|
icon: /* @__PURE__ */ React__default.createElement(IconFont, {
|
36672
36902
|
iconName: "icon-close"
|
36673
36903
|
}),
|
36674
|
-
title: "Remove format"
|
36904
|
+
title: t("Remove format")
|
36675
36905
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
36676
36906
|
className: "easy-email-extensions-divider"
|
36677
36907
|
})));
|
@@ -36792,7 +37022,6 @@ const SearchField = enhancer(Input$4.Search, (val) => val);
|
|
36792
37022
|
const TextAreaField = enhancer(Input$4.TextArea, (val) => val);
|
36793
37023
|
const NumberField = enhancer(InputNumber$1, (e) => e);
|
36794
37024
|
const SliderField = enhancer(Slider$1, (e) => e);
|
36795
|
-
const ColorPickerField = enhancer(ColorPicker, (e) => e);
|
36796
37025
|
const UploadField = enhancer(UploadField$1, (val) => val);
|
36797
37026
|
const ImageUploaderField = enhancer(ImageUploader, (url) => url);
|
36798
37027
|
const SelectField = enhancer(Select, (e) => e);
|
@@ -36827,29 +37056,29 @@ const AddToCollection = ({ visible, setVisible }) => {
|
|
36827
37056
|
maskClosable: false,
|
36828
37057
|
style: { zIndex: 2e3 },
|
36829
37058
|
visible,
|
36830
|
-
title: "Add to collection",
|
37059
|
+
title: t("Add to collection"),
|
36831
37060
|
onOk: () => handleSubmit(),
|
36832
37061
|
onCancel: () => setVisible(false)
|
36833
37062
|
}, /* @__PURE__ */ React__default.createElement(Stack$4, {
|
36834
37063
|
vertical: true
|
36835
37064
|
}, /* @__PURE__ */ React__default.createElement(Stack$4.Item, null), /* @__PURE__ */ React__default.createElement(TextField, {
|
36836
|
-
label: "Title",
|
37065
|
+
label: t("Title"),
|
36837
37066
|
name: "label",
|
36838
37067
|
validate: (val) => {
|
36839
37068
|
if (!val)
|
36840
|
-
return "Title required!";
|
37069
|
+
return t("Title required!");
|
36841
37070
|
return void 0;
|
36842
37071
|
}
|
36843
37072
|
}), /* @__PURE__ */ React__default.createElement(TextAreaField, {
|
36844
|
-
label: "Description",
|
37073
|
+
label: t("Description"),
|
36845
37074
|
name: "helpText"
|
36846
37075
|
}), /* @__PURE__ */ React__default.createElement(ImageUploaderField, {
|
36847
|
-
label: "Thumbnail",
|
37076
|
+
label: t("Thumbnail"),
|
36848
37077
|
name: "thumbnail",
|
36849
37078
|
uploadHandler: onUploadImage,
|
36850
37079
|
validate: (val) => {
|
36851
37080
|
if (!val)
|
36852
|
-
return "Thumbnail required!";
|
37081
|
+
return t("Thumbnail required!");
|
36853
37082
|
return void 0;
|
36854
37083
|
}
|
36855
37084
|
}))));
|
@@ -36923,19 +37152,19 @@ function ContextMenu({
|
|
36923
37152
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
36924
37153
|
iconName: "icon-top",
|
36925
37154
|
style: { marginRight: 10 }
|
36926
|
-
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Move up")), /* @__PURE__ */ React__default.createElement("div", {
|
37155
|
+
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Move up"))), /* @__PURE__ */ React__default.createElement("div", {
|
36927
37156
|
className: styles$9.listItem,
|
36928
37157
|
onClick: handleMoveDown
|
36929
37158
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
36930
37159
|
iconName: "icon-bottom",
|
36931
37160
|
style: { marginRight: 10 }
|
36932
|
-
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Move down")), /* @__PURE__ */ React__default.createElement("div", {
|
37161
|
+
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Move down"))), /* @__PURE__ */ React__default.createElement("div", {
|
36933
37162
|
className: styles$9.listItem,
|
36934
37163
|
onClick: handleCopy
|
36935
37164
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
36936
37165
|
iconName: "icon-copy",
|
36937
37166
|
style: { marginRight: 10 }
|
36938
|
-
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Copy")), props.onAddCollection && /* @__PURE__ */ React__default.createElement("div", {
|
37167
|
+
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Copy"))), props.onAddCollection && /* @__PURE__ */ React__default.createElement("div", {
|
36939
37168
|
className: styles$9.listItem,
|
36940
37169
|
onClick: handleAddToCollection
|
36941
37170
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
@@ -36947,7 +37176,7 @@ function ContextMenu({
|
|
36947
37176
|
}, /* @__PURE__ */ React__default.createElement(IconFont, {
|
36948
37177
|
iconName: "icon-delete",
|
36949
37178
|
style: { marginRight: 10 }
|
36950
|
-
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, "Delete"))), /* @__PURE__ */ React__default.createElement("div", {
|
37179
|
+
}), " ", /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Delete")))), /* @__PURE__ */ React__default.createElement("div", {
|
36951
37180
|
className: styles$9.contextmenuMark,
|
36952
37181
|
onClick: onClose,
|
36953
37182
|
onContextMenu: (e) => {
|
@@ -39338,119 +39567,171 @@ const list = [
|
|
39338
39567
|
];
|
39339
39568
|
const defaultCategories$1 = [
|
39340
39569
|
{
|
39341
|
-
title
|
39570
|
+
get title() {
|
39571
|
+
return t("Content");
|
39572
|
+
},
|
39342
39573
|
name: "CONTENT",
|
39343
39574
|
blocks: [
|
39344
39575
|
{
|
39345
39576
|
type: AdvancedType.TEXT,
|
39346
|
-
title
|
39347
|
-
|
39577
|
+
get title() {
|
39578
|
+
return t("Text");
|
39579
|
+
},
|
39580
|
+
get description() {
|
39581
|
+
return t("This block allows you to display text in your email");
|
39582
|
+
},
|
39348
39583
|
component: TextBlockItem
|
39349
39584
|
},
|
39350
39585
|
{
|
39351
39586
|
type: AdvancedType.IMAGE,
|
39352
|
-
title
|
39353
|
-
|
39354
|
-
|
39355
|
-
|
39356
|
-
|
39587
|
+
get title() {
|
39588
|
+
return t("Image");
|
39589
|
+
},
|
39590
|
+
get description() {
|
39591
|
+
return /* @__PURE__ */ React__default.createElement(Stack$4, {
|
39592
|
+
vertical: true,
|
39593
|
+
spacing: "none"
|
39594
|
+
}, /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Displays a responsive image in your email. It is similar to the HTML '<img/>' tag. Note that if no width is provided, the image will use the parent column width.")));
|
39595
|
+
},
|
39357
39596
|
component: ImageBlockItem
|
39358
39597
|
},
|
39359
39598
|
{
|
39360
39599
|
type: AdvancedType.BUTTON,
|
39361
|
-
title
|
39362
|
-
|
39600
|
+
get title() {
|
39601
|
+
return t("Button");
|
39602
|
+
},
|
39603
|
+
get description() {
|
39604
|
+
return t("Displays a customizable button.");
|
39605
|
+
},
|
39363
39606
|
component: ButtonBlockItem
|
39364
39607
|
},
|
39365
39608
|
{
|
39366
39609
|
type: AdvancedType.HERO,
|
39367
|
-
title
|
39368
|
-
|
39369
|
-
|
39610
|
+
get title() {
|
39611
|
+
return t("Hero");
|
39612
|
+
},
|
39613
|
+
get description() {
|
39614
|
+
return t("This block displays a hero image. It behaves like an 'section' with a single 'column'.");
|
39615
|
+
},
|
39370
39616
|
component: HeroBlockItem
|
39371
39617
|
},
|
39372
39618
|
{
|
39373
39619
|
type: AdvancedType.NAVBAR,
|
39374
|
-
title
|
39375
|
-
|
39376
|
-
|
39620
|
+
get title() {
|
39621
|
+
return t("Navbar");
|
39622
|
+
},
|
39623
|
+
get description() {
|
39624
|
+
return t("Displays a menu for navigation with an optional hamburger mode for mobile devices.");
|
39625
|
+
},
|
39377
39626
|
component: NavbarBlockItem
|
39378
39627
|
},
|
39379
39628
|
{
|
39380
39629
|
type: AdvancedType.SPACER,
|
39381
|
-
title
|
39382
|
-
|
39630
|
+
get title() {
|
39631
|
+
return t("Spacer");
|
39632
|
+
},
|
39633
|
+
get description() {
|
39634
|
+
return t("Displays a blank space.");
|
39635
|
+
},
|
39383
39636
|
component: SpacerBlockItem
|
39384
39637
|
},
|
39385
39638
|
{
|
39386
39639
|
type: AdvancedType.DIVIDER,
|
39387
|
-
title
|
39388
|
-
|
39389
|
-
|
39640
|
+
get title() {
|
39641
|
+
return t("Divider");
|
39642
|
+
},
|
39643
|
+
get description() {
|
39644
|
+
return t("Displays a horizontal divider that can be customized like a HTML border.");
|
39645
|
+
},
|
39390
39646
|
component: DividerBlockItem
|
39391
39647
|
},
|
39392
39648
|
{
|
39393
39649
|
type: AdvancedType.ACCORDION,
|
39394
|
-
title
|
39395
|
-
|
39396
|
-
|
39397
|
-
|
39398
|
-
|
39399
|
-
|
39650
|
+
get title() {
|
39651
|
+
return t("Accordion");
|
39652
|
+
},
|
39653
|
+
get description() {
|
39654
|
+
return t("Accordion is an interactive component to stack content in tabs, so the information is collapsed and only the titles are visible. Readers can interact by clicking on the tabs to reveal the content, providing a great experience on mobile devices where space is scarce.");
|
39655
|
+
},
|
39400
39656
|
component: AccordionBlockItem
|
39401
39657
|
},
|
39402
39658
|
{
|
39403
39659
|
type: AdvancedType.CAROUSEL,
|
39404
|
-
title
|
39405
|
-
|
39406
|
-
|
39407
|
-
|
39660
|
+
get title() {
|
39661
|
+
return t("Carousel");
|
39662
|
+
},
|
39663
|
+
get description() {
|
39664
|
+
return t("This block displays a gallery of images or 'carousel'. Readers can interact by hovering and clicking on thumbnails depending on the email client they use.");
|
39665
|
+
},
|
39408
39666
|
component: CarouselBlockItem
|
39409
39667
|
},
|
39410
39668
|
{
|
39411
39669
|
type: AdvancedType.SOCIAL,
|
39412
|
-
title
|
39413
|
-
|
39414
|
-
|
39670
|
+
get title() {
|
39671
|
+
return t("Social");
|
39672
|
+
},
|
39673
|
+
get description() {
|
39674
|
+
return t("Displays calls-to-action for various social networks with their associated logo.");
|
39675
|
+
},
|
39415
39676
|
component: SocialBlockItem
|
39416
39677
|
}
|
39417
39678
|
]
|
39418
39679
|
},
|
39419
39680
|
{
|
39420
|
-
title
|
39681
|
+
get title() {
|
39682
|
+
return t("Layout");
|
39683
|
+
},
|
39421
39684
|
name: "LAYOUT",
|
39422
39685
|
blocks: [
|
39423
39686
|
{
|
39424
39687
|
type: AdvancedType.WRAPPER,
|
39425
|
-
title
|
39426
|
-
|
39427
|
-
|
39688
|
+
get title() {
|
39689
|
+
return t("Wrapper");
|
39690
|
+
},
|
39691
|
+
get description() {
|
39692
|
+
return t('Wrapper enables to wrap multiple sections together. It"s especially useful to achieve nested layouts with shared border or background images across sections.');
|
39693
|
+
},
|
39428
39694
|
component: WrapperBlockItem
|
39429
39695
|
},
|
39430
39696
|
{
|
39431
39697
|
type: AdvancedType.SECTION,
|
39432
|
-
title
|
39433
|
-
|
39434
|
-
|
39435
|
-
|
39436
|
-
|
39698
|
+
get title() {
|
39699
|
+
return t("Section");
|
39700
|
+
},
|
39701
|
+
get description() {
|
39702
|
+
return /* @__PURE__ */ React__default.createElement(Stack$4, {
|
39703
|
+
vertical: true,
|
39704
|
+
spacing: "none"
|
39705
|
+
}, /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Sections are intended to be used as rows within your email. They will be used to structure the layout.")), /* @__PURE__ */ React__default.createElement(TextStyle, null, t("Sections cannot nest in sections. Columns can nest in sections; all content must be in a column.")));
|
39706
|
+
},
|
39437
39707
|
component: SectionBlockItem
|
39438
39708
|
},
|
39439
39709
|
{
|
39440
39710
|
type: AdvancedType.GROUP,
|
39441
|
-
title
|
39442
|
-
|
39443
|
-
|
39444
|
-
|
39711
|
+
get title() {
|
39712
|
+
return t("Group");
|
39713
|
+
},
|
39714
|
+
get description() {
|
39715
|
+
return t('Group allows you to prevent columns from stacking on mobile. To do so, wrap the columns inside a group block, so they"ll stay side by side on mobile.');
|
39716
|
+
},
|
39445
39717
|
component: GroupBlockItem
|
39446
39718
|
},
|
39447
39719
|
{
|
39448
39720
|
type: AdvancedType.COLUMN,
|
39449
|
-
title
|
39450
|
-
|
39451
|
-
|
39452
|
-
|
39453
|
-
|
39721
|
+
get title() {
|
39722
|
+
return t("Column");
|
39723
|
+
},
|
39724
|
+
get description() {
|
39725
|
+
return /* @__PURE__ */ React__default.createElement(Stack$4, {
|
39726
|
+
vertical: true,
|
39727
|
+
spacing: "none"
|
39728
|
+
}, /* @__PURE__ */ React__default.createElement(TextStyle, null, t(`Columns enable you to horizontally organize the content within
|
39729
|
+
your sections. They must be located under "Section" block in order
|
39730
|
+
to be considered by the engine. To be responsive, columns are
|
39731
|
+
expressed in terms of percentage.`)), /* @__PURE__ */ React__default.createElement(TextStyle, null, t(`Every single column has to contain something because they are
|
39732
|
+
responsive containers, and will be vertically stacked on a mobile
|
39733
|
+
view.`)));
|
39734
|
+
},
|
39454
39735
|
component: ColumnBlockItem
|
39455
39736
|
}
|
39456
39737
|
]
|
@@ -39672,10 +39953,10 @@ function SourceCodePanel() {
|
|
39672
39953
|
const parseValue = JSON.parse(JSON.stringify(eval("(" + event.target.value + ")")));
|
39673
39954
|
const block = BlockManager.getBlockByType(parseValue.type);
|
39674
39955
|
if (!block) {
|
39675
|
-
throw new Error("Invalid content");
|
39956
|
+
throw new Error(t("Invalid content"));
|
39676
39957
|
}
|
39677
39958
|
if (!parseValue.data || !parseValue.data.value || !parseValue.attributes || !Array.isArray(parseValue.children)) {
|
39678
|
-
throw new Error("Invalid content");
|
39959
|
+
throw new Error(t("Invalid content"));
|
39679
39960
|
}
|
39680
39961
|
setValueByIdx(focusIdx, parseValue);
|
39681
39962
|
} catch (error2) {
|
@@ -39689,14 +39970,14 @@ function SourceCodePanel() {
|
|
39689
39970
|
const parentBlock = getParentByIdx(values, focusIdx);
|
39690
39971
|
const parseBlock = BlockManager.getBlockByType(parseValue2.type);
|
39691
39972
|
if (!(parseBlock == null ? void 0 : parseBlock.validParentType.includes(parentBlock == null ? void 0 : parentBlock.type))) {
|
39692
|
-
throw new Error("Invalid content");
|
39973
|
+
throw new Error(t("Invalid content"));
|
39693
39974
|
}
|
39694
39975
|
} else if (focusIdx !== getPageIdx()) {
|
39695
|
-
throw new Error("Invalid content");
|
39976
|
+
throw new Error(t("Invalid content"));
|
39696
39977
|
}
|
39697
39978
|
setValueByIdx(focusIdx, parseValue2);
|
39698
39979
|
} catch (error2) {
|
39699
|
-
Message$1.error("Invalid content");
|
39980
|
+
Message$1.error(t("Invalid content"));
|
39700
39981
|
}
|
39701
39982
|
}, [focusIdx, setValueByIdx, values]);
|
39702
39983
|
const onChangeMjmlText = useCallback((value) => {
|
@@ -39715,7 +39996,7 @@ function SourceCodePanel() {
|
|
39715
39996
|
return null;
|
39716
39997
|
return /* @__PURE__ */ React__default.createElement(Collapse$1, null, /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
39717
39998
|
name: "json",
|
39718
|
-
header: "Json source",
|
39999
|
+
header: t("Json source"),
|
39719
40000
|
contentStyle: { padding: "8px 13px" }
|
39720
40001
|
}, /* @__PURE__ */ React__default.createElement(Input$4.TextArea, {
|
39721
40002
|
key: code,
|
@@ -39724,7 +40005,7 @@ function SourceCodePanel() {
|
|
39724
40005
|
onBlur: onChangeCode
|
39725
40006
|
})), /* @__PURE__ */ React__default.createElement(Collapse$1.Item, {
|
39726
40007
|
name: "mjml",
|
39727
|
-
header: "MJML source",
|
40008
|
+
header: t("MJML source"),
|
39728
40009
|
contentStyle: { padding: "8px 13px" }
|
39729
40010
|
}, /* @__PURE__ */ React__default.createElement(Input$4.TextArea, {
|
39730
40011
|
key: code,
|
@@ -40006,13 +40287,13 @@ function TipNode(props) {
|
|
40006
40287
|
const { direction, title: title2, lineWidth, type } = props;
|
40007
40288
|
const dragTitle = useMemo(() => {
|
40008
40289
|
if (direction === "top" || direction === "noEnoughTop") {
|
40009
|
-
return t(
|
40290
|
+
return `${t("Insert before")} ${title2}`;
|
40010
40291
|
} else if (direction === "bottom") {
|
40011
|
-
return t(
|
40292
|
+
return `${t("Insert after")} ${title2}`;
|
40012
40293
|
} else if (direction === "right" || direction === "left") {
|
40013
40294
|
return t("Drag here");
|
40014
40295
|
}
|
40015
|
-
return
|
40296
|
+
return `${t("Drag to")} ${title2}`;
|
40016
40297
|
}, [direction, title2]);
|
40017
40298
|
const color2 = useMemo(() => {
|
40018
40299
|
if (type === "drag") {
|
@@ -40446,13 +40727,13 @@ function MergeTagBadgePrompt() {
|
|
40446
40727
|
className: classnames("easy-email-merge-tag-popover")
|
40447
40728
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
40448
40729
|
className: "easy-email-merge-tag-popover-container"
|
40449
|
-
}, /* @__PURE__ */ React__default.createElement("h3", null, /* @__PURE__ */ React__default.createElement("span", null, "Default value"), /* @__PURE__ */ React__default.createElement(IconFont, {
|
40730
|
+
}, /* @__PURE__ */ React__default.createElement("h3", null, /* @__PURE__ */ React__default.createElement("span", null, t("Default value")), /* @__PURE__ */ React__default.createElement(IconFont, {
|
40450
40731
|
style: { color: "rgb(92, 95, 98)" },
|
40451
40732
|
iconName: "icon-close",
|
40452
40733
|
onClick: onClose
|
40453
40734
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
40454
40735
|
className: "easy-email-merge-tag-popover-desc"
|
40455
|
-
}, /* @__PURE__ */ React__default.createElement("p", null,
|
40736
|
+
}, /* @__PURE__ */ React__default.createElement("p", null, t('If a personalized text value isn"t available, then a default value is shown.')), /* @__PURE__ */ React__default.createElement("div", {
|
40456
40737
|
className: "easy-email-merge-tag-popover-desc-label"
|
40457
40738
|
}, /* @__PURE__ */ React__default.createElement("input", {
|
40458
40739
|
autoFocus: true,
|
@@ -40467,7 +40748,7 @@ function MergeTagBadgePrompt() {
|
|
40467
40748
|
className: "easy-email-merge-tag-popover-desc-label-button"
|
40468
40749
|
}, /* @__PURE__ */ React__default.createElement("button", {
|
40469
40750
|
onClick: onSave
|
40470
|
-
}, "Save"))))), textContainer));
|
40751
|
+
}, t("Save")))))), textContainer));
|
40471
40752
|
}
|
40472
40753
|
const SimpleLayout = (props) => {
|
40473
40754
|
const { height: containerHeight } = useEditorProps();
|
@@ -40516,7 +40797,7 @@ const SimpleLayout = (props) => {
|
|
40516
40797
|
overflowX: "hidden"
|
40517
40798
|
}
|
40518
40799
|
}, /* @__PURE__ */ React__default.createElement(Card$1, {
|
40519
|
-
title: "Layout",
|
40800
|
+
title: t("Layout"),
|
40520
40801
|
style: { border: "none" },
|
40521
40802
|
headerStyle: { height: 50 }
|
40522
40803
|
}, !collapsed && /* @__PURE__ */ React__default.createElement(BlockLayer, {
|
@@ -40546,13 +40827,13 @@ const SimpleLayout = (props) => {
|
|
40546
40827
|
}, /* @__PURE__ */ React__default.createElement(Tabs$1.TabPane, {
|
40547
40828
|
title: /* @__PURE__ */ React__default.createElement("div", {
|
40548
40829
|
style: { height: 31, lineHeight: "31px" }
|
40549
|
-
}, "Configuration")
|
40830
|
+
}, t("Configuration"))
|
40550
40831
|
}, /* @__PURE__ */ React__default.createElement(AttributePanel, null)), showSourceCode && /* @__PURE__ */ React__default.createElement(Tabs$1.TabPane, {
|
40551
40832
|
destroyOnHide: true,
|
40552
40833
|
key: "Source code",
|
40553
40834
|
title: /* @__PURE__ */ React__default.createElement("div", {
|
40554
40835
|
style: { height: 31, lineHeight: "31px" }
|
40555
|
-
}, "Source code")
|
40836
|
+
}, t("Source code"))
|
40556
40837
|
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, null))))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadgePrompt, null)));
|
40557
40838
|
};
|
40558
40839
|
const StandardLayout$1 = "_StandardLayout_xv0bc_1";
|
@@ -45737,7 +46018,9 @@ function EditPanel({ showSourceCode }) {
|
|
45737
46018
|
}
|
45738
46019
|
const defaultCategories = [
|
45739
46020
|
{
|
45740
|
-
label
|
46021
|
+
get label() {
|
46022
|
+
return t("Content");
|
46023
|
+
},
|
45741
46024
|
active: true,
|
45742
46025
|
blocks: [
|
45743
46026
|
{
|
@@ -45768,12 +46051,16 @@ const defaultCategories = [
|
|
45768
46051
|
]
|
45769
46052
|
},
|
45770
46053
|
{
|
45771
|
-
label
|
46054
|
+
get label() {
|
46055
|
+
return t("Layout");
|
46056
|
+
},
|
45772
46057
|
active: true,
|
45773
46058
|
displayType: "column",
|
45774
46059
|
blocks: [
|
45775
46060
|
{
|
45776
|
-
title
|
46061
|
+
get title() {
|
46062
|
+
return t("2 columns");
|
46063
|
+
},
|
45777
46064
|
payload: [
|
45778
46065
|
["50%", "50%"],
|
45779
46066
|
["33%", "67%"],
|
@@ -45783,7 +46070,9 @@ const defaultCategories = [
|
|
45783
46070
|
]
|
45784
46071
|
},
|
45785
46072
|
{
|
45786
|
-
title
|
46073
|
+
get title() {
|
46074
|
+
return t("3 columns");
|
46075
|
+
},
|
45787
46076
|
payload: [
|
45788
46077
|
["33.33%", "33.33%", "33.33%"],
|
45789
46078
|
["25%", "25%", "50%"],
|
@@ -45791,7 +46080,9 @@ const defaultCategories = [
|
|
45791
46080
|
]
|
45792
46081
|
},
|
45793
46082
|
{
|
45794
|
-
title
|
46083
|
+
get title() {
|
46084
|
+
return t("4 columns");
|
46085
|
+
},
|
45795
46086
|
payload: [[["25%", "25%", "25%", "25%"]]]
|
45796
46087
|
}
|
45797
46088
|
]
|
@@ -45845,5 +46136,5 @@ const StandardLayout = (props) => {
|
|
45845
46136
|
style: { width: 0, overflow: "hidden" }
|
45846
46137
|
}))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadgePrompt, null)));
|
45847
46138
|
};
|
45848
|
-
export {
|
46139
|
+
export { SearchField as $, AttributePanel as A, BlockLayer as B, Color as C, Decoration as D, BlockMarketManager as E, FontFamily as F, BlockMaskWrapper as G, Height as H, SourceCodePanel as I, InteractivePrompt as J, SimpleLayout as K, LetterSpacing as L, Margin as M, NavbarLinkPadding as N, StandardLayout as O, Page as P, MergeTagBadgePrompt as Q, ExtensionContext as R, ShortcutToolbar as S, TextAlign as T, ExtensionProvider as U, VerticalAlign as V, Width as W, useExtensionProps as X, RICH_TEXT_TOOL_BAR as Y, TextField as Z, InputWithUnitField as _, getIconNameByBlockType as a, TextAreaField as a0, NumberField as a1, SliderField as a2, UploadField as a3, ImageUploaderField as a4, SelectField as a5, TreeSelectField as a6, AutoCompleteField as a7, RadioGroupField as a8, SwitchField as a9, CheckboxField as aa, EditTabField as ab, EditGridTabField as ac, InlineTextField as ad, ColorPickerField as ae, enhancer as af, RichTextField as ag, getBlockTitle as b, commonjsGlobal as c, BlockAttributeConfigurationManager as d, Align as e, AttributesPanelWrapper as f, getContextMergeTags as g, CollapseWrapper as h, ContainerBackgroundColor as i, TextDecoration as j, Background as k, LineHeight as l, TextTransform as m, BackgroundColor as n, Direction as o, Link as p, Border as q, BorderColor as r, FontSize$1 as s, MergeTags$1 as t, BorderStyle as u, FontStyle as v, BorderWidth as w, FontWeight as x, Padding as y, ClassName as z };
|
45849
46140
|
//# sourceMappingURL=index2.js.map
|