@bigbinary/neeto-themes-frontend 4.0.8 → 4.0.9
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.
|
@@ -287,7 +287,7 @@ var Card$2 = function Card(_ref) {
|
|
|
287
287
|
var isRTL = i18n.dir() === "rtl";
|
|
288
288
|
var ToggleIcon = isRTL ? Left : Right;
|
|
289
289
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
290
|
-
"data-
|
|
290
|
+
"data-testid": "theme-".concat(neetoCist.hyphenate(title), "-properties"),
|
|
291
291
|
className: classnames("neeto-themes-nano-section neeto-ui-border-gray-200 border-b pt-2 transition-all duration-300 last:border-none", className, {
|
|
292
292
|
"pb-2": !accordionOpenState[name],
|
|
293
293
|
"pb-3": accordionOpenState[name],
|
|
@@ -303,7 +303,7 @@ var Card$2 = function Card(_ref) {
|
|
|
303
303
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
304
304
|
className: "flex min-w-0 grow items-center gap-2 text-start",
|
|
305
305
|
component: "span",
|
|
306
|
-
"data-
|
|
306
|
+
"data-testid": "theme-properties",
|
|
307
307
|
lineHeight: "normal",
|
|
308
308
|
style: "h4",
|
|
309
309
|
weight: "semibold",
|
|
@@ -677,9 +677,9 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
677
677
|
name = _ref.name;
|
|
678
678
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
679
679
|
className: "flex items-center justify-between gap-2",
|
|
680
|
-
"data-
|
|
680
|
+
"data-testid": utils$1.joinHyphenCase(label),
|
|
681
681
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
682
|
-
"data-
|
|
682
|
+
"data-testid": "style-fields-labels",
|
|
683
683
|
style: "body2",
|
|
684
684
|
children: label
|
|
685
685
|
}), /*#__PURE__*/jsxRuntime.jsx(formik.Field, {
|
|
@@ -691,7 +691,7 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
691
691
|
className: "neeto-ui-border-gray-300 neeto-themes-nano-alignment-block flex items-center border",
|
|
692
692
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
693
693
|
className: "neeto-themes-nano-alignment-button neeto-themes-nano-alignment-button__alignment-left",
|
|
694
|
-
"data-
|
|
694
|
+
"data-testid": "alignment-left",
|
|
695
695
|
size: "medium",
|
|
696
696
|
style: value === "left" ? "primary" : "text",
|
|
697
697
|
icon: function icon() {
|
|
@@ -715,7 +715,7 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
715
715
|
className: "neeto-themes-nano-alignment-divider"
|
|
716
716
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
717
717
|
className: "neeto-themes-nano-alignment-button neeto-themes-nano-alignment-button__alignment-center",
|
|
718
|
-
"data-
|
|
718
|
+
"data-testid": "alignment-center",
|
|
719
719
|
size: "medium",
|
|
720
720
|
style: value === "center" ? "primary" : "text",
|
|
721
721
|
icon: function icon() {
|
|
@@ -750,9 +750,9 @@ var ColorBlock = function ColorBlock(_ref) {
|
|
|
750
750
|
showTransparencyControl = _ref.showTransparencyControl;
|
|
751
751
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
752
752
|
className: "flex items-center justify-between",
|
|
753
|
-
"data-
|
|
753
|
+
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
754
754
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
755
|
-
"data-
|
|
755
|
+
"data-testid": "style-fields-labels",
|
|
756
756
|
style: "body2",
|
|
757
757
|
children: label
|
|
758
758
|
}), /*#__PURE__*/jsxRuntime.jsx(ColorPicker, {
|
|
@@ -776,9 +776,9 @@ var FontPickerBlock = function FontPickerBlock(_ref) {
|
|
|
776
776
|
onChange = _ref.onChange;
|
|
777
777
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
778
778
|
className: "flex items-center justify-between",
|
|
779
|
-
"data-
|
|
779
|
+
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
780
780
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
781
|
-
"data-
|
|
781
|
+
"data-testid": "style-fields-labels",
|
|
782
782
|
style: "body2",
|
|
783
783
|
children: label
|
|
784
784
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -811,9 +811,9 @@ var SelectBlock = function SelectBlock(_ref) {
|
|
|
811
811
|
onChange = _ref.onChange;
|
|
812
812
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
813
813
|
className: "flex items-center justify-between",
|
|
814
|
-
"data-
|
|
814
|
+
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
815
815
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
816
|
-
"data-
|
|
816
|
+
"data-testid": "logo-field-labels",
|
|
817
817
|
style: "body2",
|
|
818
818
|
children: label
|
|
819
819
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -837,9 +837,9 @@ var SliderBlock = function SliderBlock(_ref) {
|
|
|
837
837
|
marks = _ref.marks;
|
|
838
838
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
839
839
|
className: "flex items-center justify-between gap-3",
|
|
840
|
-
"data-
|
|
840
|
+
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
841
841
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
842
|
-
"data-
|
|
842
|
+
"data-testid": "style-fields-labels",
|
|
843
843
|
style: "body2",
|
|
844
844
|
children: label
|
|
845
845
|
}), /*#__PURE__*/jsxRuntime.jsx(antd.Slider, {
|
|
@@ -870,11 +870,11 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
870
870
|
var doesHelpTextExist = i18n.exists(translationKey);
|
|
871
871
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
872
872
|
className: "flex items-center justify-between",
|
|
873
|
-
"data-
|
|
873
|
+
"data-testid": "theme-style-content-background",
|
|
874
874
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
875
875
|
className: "inline-flex items-center gap-4",
|
|
876
876
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
877
|
-
"data-
|
|
877
|
+
"data-testid": "style-fields-labels",
|
|
878
878
|
style: "body2",
|
|
879
879
|
className: classnames({
|
|
880
880
|
"w-32": doesHelpTextExist,
|
|
@@ -888,7 +888,7 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
888
888
|
}), /*#__PURE__*/jsxRuntime.jsx(Switch, _objectSpread$1(_objectSpread$1({}, _objectSpread$1({
|
|
889
889
|
name: name
|
|
890
890
|
}, switchProps)), {}, {
|
|
891
|
-
"data-
|
|
891
|
+
"data-testid": "enable-background-color-toggle"
|
|
892
892
|
}))]
|
|
893
893
|
});
|
|
894
894
|
};
|
|
@@ -903,9 +903,9 @@ var TextBlock = function TextBlock(_ref) {
|
|
|
903
903
|
placeholder = _ref.placeholder;
|
|
904
904
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
905
905
|
className: "flex items-center justify-between",
|
|
906
|
-
"data-
|
|
906
|
+
"data-testid": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
907
907
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
908
|
-
"data-
|
|
908
|
+
"data-testid": "style-fields-labels",
|
|
909
909
|
style: "body2",
|
|
910
910
|
children: label
|
|
911
911
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -1194,11 +1194,11 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
1194
1194
|
}();
|
|
1195
1195
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1196
1196
|
className: "space-y-3",
|
|
1197
|
-
"data-
|
|
1197
|
+
"data-testid": "theme-style-".concat(label ? utils$1.joinHyphenCase(label) : "image-block"),
|
|
1198
1198
|
children: [label && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1199
1199
|
className: "flex items-center justify-between",
|
|
1200
1200
|
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1201
|
-
"data-
|
|
1201
|
+
"data-testid": "style-fields-labels",
|
|
1202
1202
|
style: "body2",
|
|
1203
1203
|
children: label
|
|
1204
1204
|
})
|
|
@@ -1285,7 +1285,7 @@ var ThemeMeta = function ThemeMeta(_ref) {
|
|
|
1285
1285
|
title: t("neetoThemes.common.name"),
|
|
1286
1286
|
children: /*#__PURE__*/jsxRuntime.jsx(Input$1, {
|
|
1287
1287
|
autoFocus: true,
|
|
1288
|
-
"data-
|
|
1288
|
+
"data-testid": "theme-name-property",
|
|
1289
1289
|
name: "name"
|
|
1290
1290
|
})
|
|
1291
1291
|
});
|
|
@@ -1491,13 +1491,13 @@ var Customize = function Customize(_ref) {
|
|
|
1491
1491
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1492
1492
|
className: "neeto-ui-bg-white neeto-ui-shadow-s sticky bottom-0 start-0 end-0 flex justify-end gap-x-2 px-4 py-6 lg:px-5 xl:px-6",
|
|
1493
1493
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1494
|
-
"data-
|
|
1494
|
+
"data-testid": "reset-button",
|
|
1495
1495
|
disabled: !dirty || isSubmitting,
|
|
1496
1496
|
label: t("neetoThemes.buttons.reset"),
|
|
1497
1497
|
style: "text",
|
|
1498
1498
|
type: "reset"
|
|
1499
1499
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1500
|
-
"data-
|
|
1500
|
+
"data-testid": "save-changes-button",
|
|
1501
1501
|
disabled: !dirty && (themeData === null || themeData === void 0 ? void 0 : themeData.id) || isSubmitting,
|
|
1502
1502
|
label: t("neetoThemes.buttons.save"),
|
|
1503
1503
|
loading: isSubmitting,
|
|
@@ -1664,7 +1664,7 @@ var Card = function Card(_ref) {
|
|
|
1664
1664
|
};
|
|
1665
1665
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1666
1666
|
className: "group space-y-2 pt-0.5",
|
|
1667
|
-
"data-
|
|
1667
|
+
"data-testid": active ? "active-theme-card" : "theme-card",
|
|
1668
1668
|
id: theme.id,
|
|
1669
1669
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1670
1670
|
className: classnames("neeto-themes-theme-thumbnail neeto-ui-rounded-lg relative cursor-pointer border transition-all duration-300 ease-in-out", {
|
|
@@ -1682,7 +1682,7 @@ var Card = function Card(_ref) {
|
|
|
1682
1682
|
className: "absolute start-0 top-0 z-10 flex h-full w-full items-center justify-center gap-1 p-3",
|
|
1683
1683
|
children: active ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1684
1684
|
className: "neeto-ui-btn neeto-themes-theme-thumbnail__active-label neeto-ui-btn--style-primary neeto-ui-btn--size-medium neeto-ui-rounded-full shrink-0 cursor-auto justify-center",
|
|
1685
|
-
"data-
|
|
1685
|
+
"data-testid": "active-theme-label",
|
|
1686
1686
|
children: t("neetoThemes.common.activeTheme")
|
|
1687
1687
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1688
1688
|
className: classnames({
|
|
@@ -1692,7 +1692,7 @@ var Card = function Card(_ref) {
|
|
|
1692
1692
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1693
1693
|
className: "relative flex w-full flex-col gap-2",
|
|
1694
1694
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1695
|
-
"data-
|
|
1695
|
+
"data-testid": "preview-theme-button",
|
|
1696
1696
|
disabled: isPreviewing,
|
|
1697
1697
|
label: t("neetoThemes.common.previewTheme"),
|
|
1698
1698
|
size: "medium",
|
|
@@ -1706,7 +1706,7 @@ var Card = function Card(_ref) {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1708
1708
|
className: "neeto-themes-theme-thumbnail__apply-btn shrink-0 justify-center",
|
|
1709
|
-
"data-
|
|
1709
|
+
"data-testid": "apply-theme-button",
|
|
1710
1710
|
disabled: isApplyingTheme,
|
|
1711
1711
|
label: t("neetoThemes.common.useTheme"),
|
|
1712
1712
|
loading: isApplyingTheme,
|
|
@@ -1738,13 +1738,13 @@ var Card = function Card(_ref) {
|
|
|
1738
1738
|
className: "flex items-center space-x-2",
|
|
1739
1739
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1740
1740
|
className: "line-clamp-2 min-w-0 grow wrap-anywhere pt-1",
|
|
1741
|
-
"data-
|
|
1741
|
+
"data-testid": "theme-name",
|
|
1742
1742
|
lineHeight: "snug",
|
|
1743
1743
|
style: "body2",
|
|
1744
1744
|
children: name
|
|
1745
1745
|
}), isGlobalTheme && /*#__PURE__*/jsxRuntime.jsx(Rating, {
|
|
1746
1746
|
className: "neeto-themes-nano-global-theme-icon",
|
|
1747
|
-
"data-
|
|
1747
|
+
"data-testid": "global-theme-icon",
|
|
1748
1748
|
size: 18
|
|
1749
1749
|
})]
|
|
1750
1750
|
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
@@ -1759,18 +1759,18 @@ var Card = function Card(_ref) {
|
|
|
1759
1759
|
},
|
|
1760
1760
|
menuItems: [{
|
|
1761
1761
|
key: "edit",
|
|
1762
|
-
"data-
|
|
1762
|
+
"data-testid": "edit-theme-menu-item",
|
|
1763
1763
|
label: t("neetoThemes.common.edit"),
|
|
1764
1764
|
isVisible: neetoCist.isPresent(onEditTheme),
|
|
1765
1765
|
onClick: handleEditTheme
|
|
1766
1766
|
}, {
|
|
1767
1767
|
key: "clone",
|
|
1768
|
-
"data-
|
|
1768
|
+
"data-testid": "clone-theme-menu-item",
|
|
1769
1769
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.clone"),
|
|
1770
1770
|
onClick: handleCloneTheme
|
|
1771
1771
|
}, {
|
|
1772
1772
|
key: "set-as-global-theme",
|
|
1773
|
-
"data-
|
|
1773
|
+
"data-testid": "set-as-global-theme-menu-item",
|
|
1774
1774
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.setAsGlobalTheme.label"),
|
|
1775
1775
|
isVisible: !isGlobalTheme,
|
|
1776
1776
|
onClick: handleApplyGlobalTheme
|
|
@@ -1780,7 +1780,7 @@ var Card = function Card(_ref) {
|
|
|
1780
1780
|
isVisible: utils.isFunction(onDeleteTheme)
|
|
1781
1781
|
}, {
|
|
1782
1782
|
key: "delete",
|
|
1783
|
-
"data-
|
|
1783
|
+
"data-testid": "delete-theme-menu-item",
|
|
1784
1784
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.delete"),
|
|
1785
1785
|
isDisabled: isApplyingTheme,
|
|
1786
1786
|
isVisible: utils.isFunction(onDeleteTheme),
|
|
@@ -1906,19 +1906,19 @@ var Themes = function Themes(_ref) {
|
|
|
1906
1906
|
placeholder: t("neetoThemes.common.searchThemes")
|
|
1907
1907
|
}), ramda.isEmpty(filteredThemes) && ramda.isEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1908
1908
|
className: "text-center",
|
|
1909
|
-
"data-
|
|
1909
|
+
"data-testid": "no-data-title",
|
|
1910
1910
|
style: "body2",
|
|
1911
1911
|
children: t("neetoThemes.common.noResultsFound")
|
|
1912
1912
|
}), neetoCist.isNotEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1913
1913
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1914
1914
|
className: "my-4 px-6 uppercase lg:px-5 xl:px-6",
|
|
1915
|
-
"data-
|
|
1915
|
+
"data-testid": "system-themes-header",
|
|
1916
1916
|
style: "h6",
|
|
1917
1917
|
weight: "semibold",
|
|
1918
1918
|
children: t("neetoThemes.build.leftSideBar.themes.systemThemes")
|
|
1919
1919
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1920
1920
|
className: "flex flex-col gap-4 px-6 pb-10 lg:px-5 xl:px-6",
|
|
1921
|
-
"data-
|
|
1921
|
+
"data-testid": "system-themes",
|
|
1922
1922
|
children: filteredDefaultThemes.map(function (theme) {
|
|
1923
1923
|
return /*#__PURE__*/react.createElement(Card$1, {
|
|
1924
1924
|
onApplyTheme: onApplyTheme,
|
|
@@ -1940,13 +1940,13 @@ var Themes = function Themes(_ref) {
|
|
|
1940
1940
|
className: "mb-6 space-y-3",
|
|
1941
1941
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1942
1942
|
className: "my-4 px-6 uppercase",
|
|
1943
|
-
"data-
|
|
1943
|
+
"data-testid": "custom-themes-header",
|
|
1944
1944
|
style: "h6",
|
|
1945
1945
|
weight: "semibold",
|
|
1946
1946
|
children: t("neetoThemes.build.leftSideBar.themes.customThemes")
|
|
1947
1947
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1948
1948
|
className: "flex flex-col gap-4 px-6",
|
|
1949
|
-
"data-
|
|
1949
|
+
"data-testid": "custom-themes",
|
|
1950
1950
|
children: filteredThemes.map(function (theme) {
|
|
1951
1951
|
var isActive = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id;
|
|
1952
1952
|
var isPreviewing = (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id;
|
|
@@ -2003,7 +2003,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2003
2003
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2004
2004
|
className: "flex items-center justify-start space-x-2",
|
|
2005
2005
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2006
|
-
"data-
|
|
2006
|
+
"data-testid": "customize-themes-back-button",
|
|
2007
2007
|
icon: BackButtonIcon,
|
|
2008
2008
|
iconPosition: "left",
|
|
2009
2009
|
style: "text",
|
|
@@ -2015,7 +2015,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2015
2015
|
return handleBackPress(themeId);
|
|
2016
2016
|
}
|
|
2017
2017
|
}), /*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
2018
|
-
"data-
|
|
2018
|
+
"data-testid": "themes-header",
|
|
2019
2019
|
lineHeight: "normal",
|
|
2020
2020
|
style: "h3",
|
|
2021
2021
|
weight: "semibold",
|
|
@@ -2031,7 +2031,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2031
2031
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2032
2032
|
className: "flex space-x-2",
|
|
2033
2033
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
2034
|
-
"data-
|
|
2034
|
+
"data-testid": "themes-header",
|
|
2035
2035
|
lineHeight: "normal",
|
|
2036
2036
|
style: "h3",
|
|
2037
2037
|
weight: "semibold",
|
|
@@ -2048,7 +2048,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2048
2048
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2049
2049
|
className: "self-end",
|
|
2050
2050
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2051
|
-
"data-
|
|
2051
|
+
"data-testid": "customize-themes-add-theme-button",
|
|
2052
2052
|
icon: Plus,
|
|
2053
2053
|
iconPosition: "left",
|
|
2054
2054
|
style: "text",
|