@bigbinary/neeto-themes-frontend 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -36
- package/app/javascript/src/translations/en.json +6 -2
- package/dist/NeetoThemesBuilder.js +1899 -0
- package/dist/NeetoThemesBuilder.js.map +1 -0
- package/dist/{index.cjs.js → cjs/NeetoThemesBuilder.js} +412 -507
- package/dist/cjs/NeetoThemesBuilder.js.map +1 -0
- package/dist/cjs/hooks.js +22 -0
- package/dist/cjs/hooks.js.map +1 -0
- package/dist/cjs/index.js +56 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/utils.js +17 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/hooks.js +14 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index-09d44807.js +174 -0
- package/dist/index-09d44807.js.map +1 -0
- package/dist/index-383fae09.js +159 -0
- package/dist/index-383fae09.js.map +1 -0
- package/dist/index.js +45 -1990
- package/dist/index.js.map +1 -1
- package/dist/useThemeUtils-148b9f27.js +111 -0
- package/dist/useThemeUtils-148b9f27.js.map +1 -0
- package/dist/useThemeUtils-3875c1d1.js +102 -0
- package/dist/useThemeUtils-3875c1d1.js.map +1 -0
- package/dist/utils.js +6 -0
- package/dist/utils.js.map +1 -0
- package/package.json +27 -14
- package/dist/index.cjs.js.map +0 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var shallow = require('zustand/shallow');
|
|
6
4
|
var react = require('react');
|
|
7
5
|
var i18next = require('i18next');
|
|
@@ -10,12 +8,10 @@ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
|
10
8
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
11
9
|
var reactQuery = require('@tanstack/react-query');
|
|
12
10
|
var axios = require('axios');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
16
|
-
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
17
|
-
var Toastr = require('@bigbinary/neetoui/Toastr');
|
|
11
|
+
var utils = require('../index-09d44807.js');
|
|
12
|
+
var useThemeUtils = require('../useThemeUtils-148b9f27.js');
|
|
18
13
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
14
|
+
var classNames = require('classnames');
|
|
19
15
|
var Alert = require('@bigbinary/neetoui/Alert');
|
|
20
16
|
var reactI18next = require('react-i18next');
|
|
21
17
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -26,16 +22,20 @@ var Popover = require('@bigbinary/neetoui/Popover');
|
|
|
26
22
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
27
23
|
var Form = require('@bigbinary/neetoui/formik/Form');
|
|
28
24
|
var yup = require('yup');
|
|
25
|
+
var Editor = require('@monaco-editor/react');
|
|
29
26
|
var formik = require('formik');
|
|
30
27
|
var jsxRuntime = require('react/jsx-runtime');
|
|
28
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
29
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
31
30
|
var neetoImageUploaderFrontend = require('@bigbinary/neeto-image-uploader-frontend');
|
|
32
|
-
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
31
|
+
var utils$1 = require('@bigbinary/neeto-commons-frontend/utils');
|
|
32
|
+
var Toastr = require('@bigbinary/neetoui/Toastr');
|
|
33
|
+
var ramda = require('ramda');
|
|
33
34
|
var Select = require('@bigbinary/neetoui/Select');
|
|
34
35
|
var CenterAlign = require('@bigbinary/neeto-icons/CenterAlign');
|
|
35
36
|
var LeftAlign = require('@bigbinary/neeto-icons/LeftAlign');
|
|
36
37
|
var ColorPicker = require('@bigbinary/neetoui/ColorPicker');
|
|
37
38
|
var antd = require('antd');
|
|
38
|
-
var classnames = require('classnames');
|
|
39
39
|
var HelpPopover = require('@bigbinary/neeto-molecules/HelpPopover');
|
|
40
40
|
var Switch = require('@bigbinary/neetoui/Switch');
|
|
41
41
|
var Input = require('@bigbinary/neetoui/formik/Input');
|
|
@@ -43,6 +43,7 @@ var Search = require('@bigbinary/neeto-molecules/Search');
|
|
|
43
43
|
var MoreDropdown = require('@bigbinary/neeto-molecules/MoreDropdown');
|
|
44
44
|
var LeftArrow = require('@bigbinary/neeto-icons/LeftArrow');
|
|
45
45
|
var Plus = require('@bigbinary/neeto-icons/Plus');
|
|
46
|
+
require('zustand');
|
|
46
47
|
|
|
47
48
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
48
49
|
|
|
@@ -66,10 +67,8 @@ function _interopNamespace(e) {
|
|
|
66
67
|
|
|
67
68
|
var Spinner__default = /*#__PURE__*/_interopDefaultLegacy(Spinner);
|
|
68
69
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
69
|
-
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
70
|
-
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
71
|
-
var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
|
|
72
70
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
71
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
73
72
|
var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
|
74
73
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
75
74
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
@@ -79,11 +78,14 @@ var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
|
|
|
79
78
|
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
80
79
|
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
81
80
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
81
|
+
var Editor__default = /*#__PURE__*/_interopDefaultLegacy(Editor);
|
|
82
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
83
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
84
|
+
var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
|
|
82
85
|
var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
|
|
83
86
|
var CenterAlign__default = /*#__PURE__*/_interopDefaultLegacy(CenterAlign);
|
|
84
87
|
var LeftAlign__default = /*#__PURE__*/_interopDefaultLegacy(LeftAlign);
|
|
85
88
|
var ColorPicker__default = /*#__PURE__*/_interopDefaultLegacy(ColorPicker);
|
|
86
|
-
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
87
89
|
var HelpPopover__default = /*#__PURE__*/_interopDefaultLegacy(HelpPopover);
|
|
88
90
|
var Switch__default = /*#__PURE__*/_interopDefaultLegacy(Switch);
|
|
89
91
|
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
|
|
@@ -92,26 +94,16 @@ var MoreDropdown__default = /*#__PURE__*/_interopDefaultLegacy(MoreDropdown);
|
|
|
92
94
|
var LeftArrow__default = /*#__PURE__*/_interopDefaultLegacy(LeftArrow);
|
|
93
95
|
var Plus__default = /*#__PURE__*/_interopDefaultLegacy(Plus);
|
|
94
96
|
|
|
95
|
-
var BASE_URL = "neeto_themes_engine";
|
|
96
|
-
var WHITE = "255, 255, 255";
|
|
97
|
-
var BLACK = "0, 0, 0";
|
|
98
|
-
|
|
99
97
|
var show$1 = function show(entityId) {
|
|
100
|
-
return axios__default["default"].get("".concat(BASE_URL, "/api/v1/entities/").concat(entityId));
|
|
98
|
+
return axios__default["default"].get("".concat(utils.BASE_URL, "/api/v1/entities/").concat(entityId));
|
|
101
99
|
};
|
|
102
100
|
var entitiesApi = {
|
|
103
101
|
show: show$1
|
|
104
102
|
};
|
|
105
103
|
|
|
106
|
-
var QUERY_KEYS = {
|
|
107
|
-
THEMES_LIST: "themes-list",
|
|
108
|
-
THEME_DETAILS: "theme-details",
|
|
109
|
-
SCHEMA_DETAILS: "schema-details"
|
|
110
|
-
};
|
|
111
|
-
|
|
112
104
|
var useShowThemeEntity = function useShowThemeEntity(entityId) {
|
|
113
105
|
return reactQuery.useQuery({
|
|
114
|
-
queryKey: [QUERY_KEYS.THEME_ENTITY_DETAILS, entityId],
|
|
106
|
+
queryKey: [useThemeUtils.QUERY_KEYS.THEME_ENTITY_DETAILS, entityId],
|
|
115
107
|
queryFn: function queryFn() {
|
|
116
108
|
return entitiesApi.show(entityId);
|
|
117
109
|
},
|
|
@@ -119,246 +111,44 @@ var useShowThemeEntity = function useShowThemeEntity(entityId) {
|
|
|
119
111
|
});
|
|
120
112
|
};
|
|
121
113
|
|
|
122
|
-
|
|
123
|
-
var useConfigStore = zustand.create(reactUtils.withImmutableActions(function (set) {
|
|
124
|
-
return {
|
|
125
|
-
themePropertiesSchema: [],
|
|
126
|
-
entityType: "",
|
|
127
|
-
entityId: "",
|
|
128
|
-
variableNamesMap: {},
|
|
129
|
-
defaultThemeName: "Plain blue",
|
|
130
|
-
isFetchingSchema: true,
|
|
131
|
-
isTemplateThemesEnabled: false,
|
|
132
|
-
setConfigState: set
|
|
133
|
-
};
|
|
134
|
-
}));
|
|
135
|
-
|
|
136
|
-
/** @type {import("neetocommons/react-utils").ZustandStoreHook} */
|
|
137
|
-
var useThemeStore = zustand.create(reactUtils.withImmutableActions(function (set) {
|
|
138
|
-
return {
|
|
139
|
-
currentTheme: {},
|
|
140
|
-
isCurrentThemeLoading: true,
|
|
141
|
-
previewingTheme: {},
|
|
142
|
-
setThemeState: set
|
|
143
|
-
};
|
|
144
|
-
}));
|
|
145
|
-
|
|
146
|
-
var getImageFromUrl = function getImageFromUrl(source) {
|
|
147
|
-
var image = new Image();
|
|
148
|
-
image.crossOrigin = "anonymous";
|
|
149
|
-
image.src = source;
|
|
150
|
-
return new Promise(function (resolve) {
|
|
151
|
-
image.onload = function () {
|
|
152
|
-
resolve(image);
|
|
153
|
-
};
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
var getDominantColorFromUrl = /*#__PURE__*/function () {
|
|
157
|
-
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(imageUrl) {
|
|
158
|
-
var image, context, c;
|
|
159
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
160
|
-
while (1) switch (_context.prev = _context.next) {
|
|
161
|
-
case 0:
|
|
162
|
-
_context.prev = 0;
|
|
163
|
-
_context.next = 3;
|
|
164
|
-
return getImageFromUrl(imageUrl);
|
|
165
|
-
case 3:
|
|
166
|
-
image = _context.sent;
|
|
167
|
-
context = document.createElement("canvas").getContext("2d");
|
|
168
|
-
context === null || context === void 0 || context.drawImage(image, 0, 0, 1, 1);
|
|
169
|
-
c = context === null || context === void 0 ? void 0 : context.getImageData(0, 0, 1, 1).data;
|
|
170
|
-
if (!c) {
|
|
171
|
-
_context.next = 9;
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
return _context.abrupt("return", "#".concat(((1 << 24) + (c[0] << 16) + (c[1] << 8) + c[2]).toString(16).slice(1)));
|
|
175
|
-
case 9:
|
|
176
|
-
return _context.abrupt("return", null);
|
|
177
|
-
case 12:
|
|
178
|
-
_context.prev = 12;
|
|
179
|
-
_context.t0 = _context["catch"](0);
|
|
180
|
-
Toastr__default["default"].error(_context.t0);
|
|
181
|
-
return _context.abrupt("return", null);
|
|
182
|
-
case 16:
|
|
183
|
-
case "end":
|
|
184
|
-
return _context.stop();
|
|
185
|
-
}
|
|
186
|
-
}, _callee, null, [[0, 12]]);
|
|
187
|
-
}));
|
|
188
|
-
return function getDominantColorFromUrl(_x) {
|
|
189
|
-
return _ref.apply(this, arguments);
|
|
190
|
-
};
|
|
191
|
-
}();
|
|
192
|
-
var scrollElementIntoView = function scrollElementIntoView(elementId) {
|
|
193
|
-
var elementToScroll = document.getElementById(elementId);
|
|
194
|
-
elementToScroll === null || elementToScroll === void 0 || elementToScroll.scrollIntoView({
|
|
195
|
-
behavior: "smooth"
|
|
196
|
-
});
|
|
197
|
-
};
|
|
198
|
-
var isFunction = function isFunction(obj) {
|
|
199
|
-
return typeof obj === "function";
|
|
200
|
-
};
|
|
201
|
-
var hexToRgba = function hexToRgba(hex) {
|
|
202
|
-
var result = /^#?(?:([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2}))$/i.exec(hex);
|
|
203
|
-
if (!result) return null;
|
|
204
|
-
var r = parseInt(result[1] || result[5], 16);
|
|
205
|
-
var g = parseInt(result[2] || result[6], 16);
|
|
206
|
-
var b = parseInt(result[3] || result[7], 16);
|
|
207
|
-
var a = result[4] ? Math.round(parseInt(result[4], 16) / 2.55) / 100 : undefined;
|
|
208
|
-
return "".concat(r, ", ").concat(g, ", ").concat(b).concat(a !== undefined ? ", ".concat(a) : "");
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
var root = document.querySelector(":root");
|
|
212
|
-
var setVariable = function setVariable(name, value, variableNamesMap) {
|
|
213
|
-
var variableName = variableNamesMap[name];
|
|
214
|
-
if (!variableName) return;
|
|
215
|
-
root.style.setProperty(variableName, value);
|
|
216
|
-
};
|
|
217
|
-
var isPropertyIndependent = function isPropertyIndependent(key, theme, schema) {
|
|
218
|
-
var property = neetoCist.findBy({
|
|
219
|
-
key: key
|
|
220
|
-
}, schema);
|
|
221
|
-
if (neetoCist.isNotPresent(property)) return false;
|
|
222
|
-
var conditionalKey = property === null || property === void 0 ? void 0 : property.dependsOn;
|
|
223
|
-
if (neetoCist.isNotPresent(conditionalKey)) return true;
|
|
224
|
-
var dependentPropertySchema = neetoCist.findBy({
|
|
225
|
-
key: conditionalKey
|
|
226
|
-
}, schema);
|
|
227
|
-
var dependentProperty = neetoCist.findBy({
|
|
228
|
-
key: conditionalKey
|
|
229
|
-
}, theme.properties);
|
|
230
|
-
if (dependentPropertySchema.kind === "image") {
|
|
231
|
-
var _theme$snakeToCamelCa;
|
|
232
|
-
return neetoCist.isPresent((_theme$snakeToCamelCa = theme[neetoCist.snakeToCamelCase(conditionalKey)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url);
|
|
233
|
-
} else if (dependentPropertySchema.kind === "boolean") {
|
|
234
|
-
return (dependentProperty === null || dependentProperty === void 0 ? void 0 : dependentProperty.value) !== "false";
|
|
235
|
-
}
|
|
236
|
-
return neetoCist.isPresent(dependentProperty === null || dependentProperty === void 0 ? void 0 : dependentProperty.value);
|
|
237
|
-
};
|
|
238
|
-
var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
|
|
239
|
-
if (neetoCist.isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
|
|
240
|
-
theme.properties.forEach(function (property) {
|
|
241
|
-
var attribute = neetoCist.snakeToCamelCase(property.key);
|
|
242
|
-
if (property.kind !== "overlay_opacity" && !isPropertyIndependent(property.key, theme, themeConfig)) {
|
|
243
|
-
setVariable(attribute, "", variableNamesMap);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
if (property.kind === "color") {
|
|
247
|
-
setVariable(attribute, hexToRgba(property.value), variableNamesMap);
|
|
248
|
-
} else if (property.kind === "overlay_opacity") {
|
|
249
|
-
var overlayOpacity = Number(property.value);
|
|
250
|
-
setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_opacity")), Math.abs(overlayOpacity / 100), variableNamesMap);
|
|
251
|
-
setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE, variableNamesMap);
|
|
252
|
-
} else if (property.kind === "radius") {
|
|
253
|
-
setVariable(attribute, "".concat(property.value, "px"), variableNamesMap);
|
|
254
|
-
} else {
|
|
255
|
-
setVariable(attribute, property.value, variableNamesMap);
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
neetoCist.filterBy({
|
|
259
|
-
kind: "image"
|
|
260
|
-
}, themeConfig).forEach(function (_ref) {
|
|
261
|
-
var _theme$attribute;
|
|
262
|
-
var key = _ref.key;
|
|
263
|
-
var attribute = neetoCist.snakeToCamelCase(key);
|
|
264
|
-
setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"), variableNamesMap);
|
|
265
|
-
});
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
var list$1 = function list() {
|
|
269
|
-
return axios__default["default"].get("".concat(BASE_URL, "/api/v1/schema"));
|
|
270
|
-
};
|
|
271
|
-
var schemasApi = {
|
|
272
|
-
list: list$1
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
var useListSchema = function useListSchema() {
|
|
276
|
-
return reactQuery.useQuery({
|
|
277
|
-
queryKey: [QUERY_KEYS.SCHEMA_DETAILS],
|
|
278
|
-
queryFn: schemasApi.list
|
|
279
|
-
});
|
|
280
|
-
};
|
|
114
|
+
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
281
115
|
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
var _useThemeStore = useThemeStore(function (store) {
|
|
285
|
-
return {
|
|
286
|
-
previewingTheme: store["previewingTheme"],
|
|
287
|
-
currentTheme: store["currentTheme"]
|
|
288
|
-
};
|
|
289
|
-
}, shallow.shallow),
|
|
290
|
-
previewingTheme = _useThemeStore.previewingTheme,
|
|
291
|
-
currentTheme = _useThemeStore.currentTheme;
|
|
292
|
-
var _useListSchema = useListSchema(),
|
|
293
|
-
isFetchingSchema = _useListSchema.isLoading,
|
|
294
|
-
data = _useListSchema.data;
|
|
295
|
-
var _ref = data || {},
|
|
296
|
-
_ref$schema = _ref.schema,
|
|
297
|
-
themePropertiesSchema = _ref$schema === void 0 ? [] : _ref$schema,
|
|
298
|
-
_ref$variableNamesMap = _ref.variableNamesMap,
|
|
299
|
-
variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap;
|
|
300
|
-
react.useEffect(function () {
|
|
301
|
-
if (data) {
|
|
302
|
-
setConfigState({
|
|
303
|
-
themePropertiesSchema: data === null || data === void 0 ? void 0 : data.schema,
|
|
304
|
-
variableNamesMap: data === null || data === void 0 ? void 0 : data.variableNamesMap,
|
|
305
|
-
defaultThemeName: data === null || data === void 0 ? void 0 : data.defaultThemeName
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}, [data]);
|
|
309
|
-
react.useEffect(function () {
|
|
310
|
-
return setConfigState({
|
|
311
|
-
isFetchingSchema: isFetchingSchema
|
|
312
|
-
});
|
|
313
|
-
}, [isFetchingSchema]);
|
|
314
|
-
var setVariable$1 = function setVariable$1(name, value) {
|
|
315
|
-
return setVariable(name, value, variableNamesMap);
|
|
316
|
-
};
|
|
317
|
-
var setTheme$1 = function setTheme$1(theme) {
|
|
318
|
-
return setTheme(theme, variableNamesMap, themePropertiesSchema);
|
|
319
|
-
};
|
|
320
|
-
return {
|
|
321
|
-
setTheme: setTheme$1,
|
|
322
|
-
setVariable: setVariable$1,
|
|
323
|
-
previewingTheme: previewingTheme,
|
|
324
|
-
currentTheme: currentTheme,
|
|
325
|
-
isFetchingSchema: isFetchingSchema
|
|
326
|
-
};
|
|
327
|
-
};
|
|
116
|
+
var css = ".neeto-themes__wrapper{display:flex;width:100%}.neeto-themes__wrapper .neeto-themes-sidebar{background-color:rgb(var(--neeto-ui-white));height:calc(100vh - 64px);width:280px}@media (min-width:1024px){.neeto-themes__wrapper .neeto-themes-sidebar{width:320px}}@media (min-width:1280px){.neeto-themes__wrapper .neeto-themes-sidebar{width:340px}.neeto-themes__wrapper .neeto-themes-sidebar--expanded{max-width:50%;width:520px}}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__header{padding-bottom:8px;padding-top:16px}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll{display:flex;flex-direction:column;height:calc(100vh - 120px);overflow-y:auto}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll .neeto-ui-colorpicker__target .neeto-ui-colorpicker-target__code{display:none}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-ui-colorpicker__target-size--medium{--neeto-ui-colorpicker-target-padding:6px}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-ui-colorpicker__target-size--medium .neeto-ui-colorpicker-target__color{border-radius:0!important;height:20px;width:20px}.neeto-themes__wrapper .css-editor-height__expanded{height:calc(100vh - 300px)}.neeto-themes__wrapper .css-editor-height__regular{height:384px}.neeto-themes__wrapper .neeto-themes-preview__wrapper{flex-grow:1;height:calc(100vh - 64px);position:relative}.neeto-themes-theme-thumbnail--preview-active{border-color:rgb(var(--neeto-ui-gray-600))!important;outline:1px solid rgb(var(--neeto-ui-gray-600))!important}.neeto-themes-theme-thumbnail--active{border-color:rgb(var(--neeto-ui-primary-500))!important;outline:2px solid rgb(var(--neeto-ui-primary-500))!important}.neeto-themes-theme-thumbnail--highlight-active{border-color:rgb(var(--neeto-ui-gray-400))!important;outline:2px solid rgb(var(--neeto-ui-gray-400))!important}.neeto-themes-theme-thumbnail__apply-btn{--neeto-ui-btn-padding-x:12px;--neeto-ui-btn-border-radius:100px}.neeto-themes-theme-thumbnail__apply-btn:disabled,.neeto-themes-theme-thumbnail__apply-btn[disabled]{opacity:1!important}.neeto-themes-sidebar__custom-css-editor-header{background-color:#1e1e1e;border-top-left-radius:var(--neeto-ui-rounded-lg);border-top-right-radius:var(--neeto-ui-rounded-lg)}.neeto-themes-sidebar .monaco-editor,.neeto-themes-sidebar .overflow-guard{border-bottom-left-radius:var(--neeto-ui-rounded-lg);border-bottom-right-radius:var(--neeto-ui-rounded-lg)}.neeto-themes-sidebar__custom-css-wrapper .neeto-themes-nano-section{border-bottom:0!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvdGhlbWVzLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsdUJBRUUsWUFBQSxDQURBLFVBQUYsQ0FHRSw2Q0FHRSwyQ0FBQSxDQURBLHlCQUFBLENBREEsV0FDSixDQUdJLDBCQUxGLDZDQU1JLFdBQUosQ0FDRixDQUNJLDBCQVJGLDZDQVNJLFdBRUosQ0FBSSx1REFFRSxhQUFBLENBREEsV0FHTixDQUNGLENBQ0ksMkVBRUUsa0JBQUEsQ0FEQSxnQkFFTixDQUVJLDJFQUdFLFlBQUEsQ0FDQSxxQkFBQSxDQUhBLDBCQUFBLENBQ0EsZUFFTixDQUdRLDRJQUNFLFlBRFYsQ0FLSSx3RkFDRSx5Q0FITixDQUlNLDRIQUdFLHlCQUFBLENBRkEsV0FBQSxDQUNBLFVBRFIsQ0FPRSxvREFDRSwwQkFMSixDQVFFLG1EQUNFLFlBTkosQ0FTRSxzREFHRSxXQUFBLENBREEseUJBQUEsQ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YWRpdXM6IHZhcigtLW5lZXRvLXVpLXJvdW5kZWQtbGcpO1xuICBib3JkZXItdG9wLXJpZ2h0LXJhZGl1czogdmFyKC0tbmVldG8tdWktcm91bmRlZC1sZyk7XG59XG5cbi5uZWV0by10aGVtZXMtc2lkZWJhciB7XG4gIC5vdmVyZmxvdy1ndWFyZCxcbiAgLm1vbmFjby1lZGl0b3Ige1xuICAgIGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IHZhcigtLW5lZXRvLXVpLXJvdW5kZWQtbGcpO1xuICAgIGJvcmRlci1ib3R0b20tcmlnaHQtcmFkaXVzOiB2YXIoLS1uZWV0by11aS1yb3VuZGVkLWxnKTtcbiAgfVxufVxuXG4ubmVldG8tdGhlbWVzLXNpZGViYXJfX2N1c3RvbS1jc3Mtd3JhcHBlciB7XG4gIC5uZWV0by10aGVtZXMtbmFuby1zZWN0aW9uIHtcbiAgICBib3JkZXItYm90dG9tOiAwICFpbXBvcnRhbnQ7XG4gIH1cbn1cbiJdfQ== */";
|
|
117
|
+
n(css,{});
|
|
328
118
|
|
|
329
119
|
var _excluded$1 = ["themeId"];
|
|
330
120
|
var list = function list(entityId) {
|
|
331
|
-
return axios__default["default"].get("".concat(BASE_URL, "/api/v1/themes"), {
|
|
121
|
+
return axios__default["default"].get("".concat(utils.BASE_URL, "/api/v1/themes"), {
|
|
332
122
|
params: {
|
|
333
123
|
entity_id: entityId
|
|
334
124
|
}
|
|
335
125
|
});
|
|
336
126
|
};
|
|
337
127
|
var show = function show(id) {
|
|
338
|
-
return axios__default["default"].get("".concat(BASE_URL, "/api/v1/themes/").concat(id));
|
|
128
|
+
return axios__default["default"].get("".concat(utils.BASE_URL, "/api/v1/themes/").concat(id));
|
|
339
129
|
};
|
|
340
130
|
var create = function create(payload) {
|
|
341
|
-
return axios__default["default"].post("".concat(BASE_URL, "/api/v1/themes"), {
|
|
131
|
+
return axios__default["default"].post("".concat(utils.BASE_URL, "/api/v1/themes"), {
|
|
342
132
|
theme: payload
|
|
343
133
|
});
|
|
344
134
|
};
|
|
345
135
|
var update = function update(_ref) {
|
|
346
136
|
var id = _ref.id,
|
|
347
137
|
payload = _ref.payload;
|
|
348
|
-
return axios__default["default"].put("".concat(BASE_URL, "/api/v1/themes/").concat(id), {
|
|
138
|
+
return axios__default["default"].put("".concat(utils.BASE_URL, "/api/v1/themes/").concat(id), {
|
|
349
139
|
theme: payload
|
|
350
140
|
});
|
|
351
141
|
};
|
|
352
142
|
var destroy = function destroy(id) {
|
|
353
|
-
return axios__default["default"]["delete"]("".concat(BASE_URL, "/api/v1/themes/").concat(id));
|
|
143
|
+
return axios__default["default"]["delete"]("".concat(utils.BASE_URL, "/api/v1/themes/").concat(id));
|
|
354
144
|
};
|
|
355
145
|
var clone = function clone(id) {
|
|
356
|
-
return axios__default["default"].post("".concat(BASE_URL, "/api/v1/themes/").concat(id, "/clone"));
|
|
146
|
+
return axios__default["default"].post("".concat(utils.BASE_URL, "/api/v1/themes/").concat(id, "/clone"));
|
|
357
147
|
};
|
|
358
148
|
var apply = function apply(_ref2) {
|
|
359
149
|
var themeId = _ref2.themeId,
|
|
360
150
|
payload = _objectWithoutProperties__default["default"](_ref2, _excluded$1);
|
|
361
|
-
return axios__default["default"].post("".concat(BASE_URL, "/api/v1/themes/").concat(themeId, "/apply"), {
|
|
151
|
+
return axios__default["default"].post("".concat(utils.BASE_URL, "/api/v1/themes/").concat(themeId, "/apply"), {
|
|
362
152
|
entity: payload
|
|
363
153
|
});
|
|
364
154
|
};
|
|
@@ -373,13 +163,13 @@ var themesApi = {
|
|
|
373
163
|
};
|
|
374
164
|
|
|
375
165
|
var useListThemes = function useListThemes(entityId) {
|
|
376
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
166
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
377
167
|
return {
|
|
378
168
|
isTemplateThemesEnabled: store["isTemplateThemesEnabled"]
|
|
379
169
|
};
|
|
380
170
|
}, shallow.shallow),
|
|
381
171
|
isTemplateThemesEnabled = _useConfigStore.isTemplateThemesEnabled;
|
|
382
|
-
var queryKey = isTemplateThemesEnabled ? [QUERY_KEYS.THEMES_LIST, entityId] : [QUERY_KEYS.THEMES_LIST];
|
|
172
|
+
var queryKey = isTemplateThemesEnabled ? [useThemeUtils.QUERY_KEYS.THEMES_LIST, entityId] : [useThemeUtils.QUERY_KEYS.THEMES_LIST];
|
|
383
173
|
return reactQuery.useQuery({
|
|
384
174
|
queryKey: queryKey,
|
|
385
175
|
queryFn: function queryFn() {
|
|
@@ -389,7 +179,7 @@ var useListThemes = function useListThemes(entityId) {
|
|
|
389
179
|
};
|
|
390
180
|
var useCreateTheme = function useCreateTheme() {
|
|
391
181
|
return reactUtils.useMutationWithInvalidation(themesApi.create, {
|
|
392
|
-
keysToInvalidate: [QUERY_KEYS.THEMES_LIST]
|
|
182
|
+
keysToInvalidate: [useThemeUtils.QUERY_KEYS.THEMES_LIST]
|
|
393
183
|
});
|
|
394
184
|
};
|
|
395
185
|
var useUpdateTheme = function useUpdateTheme(themeId) {
|
|
@@ -399,23 +189,23 @@ var useUpdateTheme = function useUpdateTheme(themeId) {
|
|
|
399
189
|
payload: payload
|
|
400
190
|
});
|
|
401
191
|
}, {
|
|
402
|
-
keysToInvalidate: [[QUERY_KEYS.THEMES_LIST], [QUERY_KEYS.THEME_ENTITY_DETAILS], [QUERY_KEYS.THEME_DETAILS, themeId]]
|
|
192
|
+
keysToInvalidate: [[useThemeUtils.QUERY_KEYS.THEMES_LIST], [useThemeUtils.QUERY_KEYS.THEME_ENTITY_DETAILS], [useThemeUtils.QUERY_KEYS.THEME_DETAILS, themeId]]
|
|
403
193
|
});
|
|
404
194
|
};
|
|
405
195
|
var useDeleteTheme = function useDeleteTheme() {
|
|
406
196
|
return reactUtils.useMutationWithInvalidation(themesApi.destroy, {
|
|
407
|
-
keysToInvalidate: [[QUERY_KEYS.THEMES_LIST], [QUERY_KEYS.THEME_ENTITY_DETAILS]]
|
|
197
|
+
keysToInvalidate: [[useThemeUtils.QUERY_KEYS.THEMES_LIST], [useThemeUtils.QUERY_KEYS.THEME_ENTITY_DETAILS]]
|
|
408
198
|
});
|
|
409
199
|
};
|
|
410
200
|
var useCloneTheme = function useCloneTheme() {
|
|
411
201
|
return reactUtils.useMutationWithInvalidation(themesApi.clone, {
|
|
412
|
-
keysToInvalidate: [QUERY_KEYS.THEMES_LIST]
|
|
202
|
+
keysToInvalidate: [useThemeUtils.QUERY_KEYS.THEMES_LIST]
|
|
413
203
|
});
|
|
414
204
|
};
|
|
415
205
|
var useApplyTheme = function useApplyTheme(_ref) {
|
|
416
206
|
var onSuccess = _ref.onSuccess;
|
|
417
207
|
return reactUtils.useMutationWithInvalidation(themesApi.apply, {
|
|
418
|
-
keysToInvalidate: [[QUERY_KEYS.THEMES_LIST], [QUERY_KEYS.THEME_ENTITY_DETAILS]],
|
|
208
|
+
keysToInvalidate: [[useThemeUtils.QUERY_KEYS.THEMES_LIST], [useThemeUtils.QUERY_KEYS.THEME_ENTITY_DETAILS]],
|
|
419
209
|
onSuccess: onSuccess
|
|
420
210
|
});
|
|
421
211
|
};
|
|
@@ -496,6 +286,119 @@ var OVERLAY_OPACITY_SLIDER_MARKS = {
|
|
|
496
286
|
};
|
|
497
287
|
var HUNDRED = 100;
|
|
498
288
|
|
|
289
|
+
var DESIGN_SCREENS = {
|
|
290
|
+
THEMES: "Themes",
|
|
291
|
+
Customize: "Customize",
|
|
292
|
+
CustomCSS: "CustomCSS"
|
|
293
|
+
};
|
|
294
|
+
var ONE_MEGABYTE = 1;
|
|
295
|
+
|
|
296
|
+
var Card$2 = function Card(_ref) {
|
|
297
|
+
var _ref$title = _ref.title,
|
|
298
|
+
title = _ref$title === void 0 ? "" : _ref$title,
|
|
299
|
+
children = _ref.children;
|
|
300
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
301
|
+
className: "neeto-themes-nano-section neeto-ui-border-gray-200 mb-4 space-y-3 border-b pb-4",
|
|
302
|
+
"data-cy": "theme-".concat(neetoCist.hyphenate(title), "-properties"),
|
|
303
|
+
children: [title && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
304
|
+
className: "neeto-themes-nano-section__title flex items-center justify-between",
|
|
305
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
306
|
+
className: "min-w-0 flex-grow",
|
|
307
|
+
"data-cy": "theme-properties",
|
|
308
|
+
lineHeight: "normal",
|
|
309
|
+
style: "h4",
|
|
310
|
+
weight: "semibold",
|
|
311
|
+
children: title
|
|
312
|
+
})
|
|
313
|
+
}), children && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
314
|
+
className: "neeto-themes-nano-section__content w-full",
|
|
315
|
+
children: children
|
|
316
|
+
})]
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
var isScreenCustomCSS = function isScreenCustomCSS(screen) {
|
|
321
|
+
return screen === DESIGN_SCREENS.CustomCSS;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
var CustomCSS = function CustomCSS(_ref) {
|
|
325
|
+
var onEditCSSClick = _ref.onEditCSSClick,
|
|
326
|
+
currentScreen = _ref.currentScreen;
|
|
327
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
328
|
+
t = _useTranslation.t;
|
|
329
|
+
var _useFormikContext = formik.useFormikContext(),
|
|
330
|
+
values = _useFormikContext.values,
|
|
331
|
+
setFieldValue = _useFormikContext.setFieldValue;
|
|
332
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
333
|
+
return {
|
|
334
|
+
themePropertiesSchema: store["themePropertiesSchema"]
|
|
335
|
+
};
|
|
336
|
+
}, shallow.shallow),
|
|
337
|
+
themePropertiesSchema = _useConfigStore.themePropertiesSchema;
|
|
338
|
+
var customCSS = neetoCist.findBy({
|
|
339
|
+
kind: "custom_css"
|
|
340
|
+
}, values.properties);
|
|
341
|
+
if (!customCSS) return null;
|
|
342
|
+
var parentElementClass = neetoCist.findBy({
|
|
343
|
+
kind: "custom_css"
|
|
344
|
+
}, themePropertiesSchema).parentClass;
|
|
345
|
+
var isCustomCssScreen = isScreenCustomCSS(currentScreen);
|
|
346
|
+
var handleEditorToggle = function handleEditorToggle() {
|
|
347
|
+
if (!isCustomCssScreen) return onEditCSSClick(DESIGN_SCREENS.CustomCSS);
|
|
348
|
+
onEditCSSClick(DESIGN_SCREENS.Customize);
|
|
349
|
+
return setTimeout(function () {
|
|
350
|
+
utils.scrollElementIntoView("css-editor");
|
|
351
|
+
}, 400);
|
|
352
|
+
};
|
|
353
|
+
var handleChange = function handleChange(value) {
|
|
354
|
+
var index = neetoCist.findIndexBy({
|
|
355
|
+
key: customCSS.key
|
|
356
|
+
}, values.properties);
|
|
357
|
+
if (index !== -1 && values.properties[index].value !== value) {
|
|
358
|
+
setFieldValue("properties[".concat(index, "].value"), value);
|
|
359
|
+
utils.setCustomCSS({
|
|
360
|
+
css: value,
|
|
361
|
+
elementId: customCSS.key,
|
|
362
|
+
parentElementClass: parentElementClass
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
367
|
+
className: "neeto-themes-sidebar__custom-css-wrapper",
|
|
368
|
+
id: "css-editor",
|
|
369
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Card$2, {
|
|
370
|
+
title: isCustomCssScreen ? "" : t("neetoThemes.build.leftSideBar.themes.customCSS"),
|
|
371
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
372
|
+
className: "neeto-themes-sidebar__custom-css-editor-header flex w-full justify-end gap-1 rounded-b-none p-2",
|
|
373
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
374
|
+
size: "small",
|
|
375
|
+
style: "secondary",
|
|
376
|
+
label: isCustomCssScreen ? t("neetoThemes.buttons.minimizeEditor") : t("neetoThemes.buttons.expandEditor"),
|
|
377
|
+
onClick: handleEditorToggle
|
|
378
|
+
})
|
|
379
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Editor__default["default"], {
|
|
380
|
+
language: "css",
|
|
381
|
+
options: {
|
|
382
|
+
scrollBeyondLastLine: false,
|
|
383
|
+
minimap: {
|
|
384
|
+
enabled: false
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
theme: "vs-dark",
|
|
388
|
+
value: customCSS.value,
|
|
389
|
+
className: classNames__default["default"]({
|
|
390
|
+
rounded: true,
|
|
391
|
+
"css-editor-height__expanded": isCustomCssScreen,
|
|
392
|
+
"css-editor-height__regular": !isCustomCssScreen
|
|
393
|
+
}),
|
|
394
|
+
onChange: handleChange
|
|
395
|
+
})]
|
|
396
|
+
})
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
401
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
499
402
|
var buildInitialValues = function buildInitialValues(theme, themePropertiesSchema) {
|
|
500
403
|
if (neetoCist.isPresent(theme)) return theme;
|
|
501
404
|
return {
|
|
@@ -503,56 +406,82 @@ var buildInitialValues = function buildInitialValues(theme, themePropertiesSchem
|
|
|
503
406
|
properties: themePropertiesSchema.map(function (_ref) {
|
|
504
407
|
var key = _ref.key,
|
|
505
408
|
kind = _ref.kind,
|
|
506
|
-
defaultValue = _ref.defaultValue
|
|
409
|
+
defaultValue = _ref.defaultValue,
|
|
410
|
+
_ref$order = _ref.order,
|
|
411
|
+
order = _ref$order === void 0 ? null : _ref$order;
|
|
507
412
|
switch (kind) {
|
|
508
413
|
case "color":
|
|
509
|
-
return {
|
|
414
|
+
return _objectSpread$4({
|
|
510
415
|
value: defaultValue,
|
|
511
416
|
kind: "color",
|
|
512
417
|
key: key
|
|
513
|
-
}
|
|
418
|
+
}, order !== null && {
|
|
419
|
+
order: order
|
|
420
|
+
});
|
|
514
421
|
case "font_family":
|
|
515
|
-
return {
|
|
422
|
+
return _objectSpread$4({
|
|
516
423
|
value: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
517
424
|
kind: "font_family",
|
|
518
425
|
key: key
|
|
519
|
-
}
|
|
426
|
+
}, order !== null && {
|
|
427
|
+
order: order
|
|
428
|
+
});
|
|
520
429
|
case "overlay_opacity":
|
|
521
|
-
return {
|
|
430
|
+
return _objectSpread$4({
|
|
522
431
|
value: 0,
|
|
523
432
|
kind: "overlay_opacity",
|
|
524
433
|
key: key
|
|
525
|
-
}
|
|
434
|
+
}, order !== null && {
|
|
435
|
+
order: order
|
|
436
|
+
});
|
|
526
437
|
case "slider":
|
|
527
|
-
return {
|
|
438
|
+
return _objectSpread$4({
|
|
528
439
|
value: 0,
|
|
529
440
|
kind: "slider",
|
|
530
441
|
key: key
|
|
531
|
-
}
|
|
442
|
+
}, order !== null && {
|
|
443
|
+
order: order
|
|
444
|
+
});
|
|
532
445
|
case "radius":
|
|
533
|
-
return {
|
|
446
|
+
return _objectSpread$4({
|
|
534
447
|
value: defaultValue,
|
|
535
448
|
kind: "radius",
|
|
536
449
|
key: key
|
|
537
|
-
}
|
|
450
|
+
}, order !== null && {
|
|
451
|
+
order: order
|
|
452
|
+
});
|
|
538
453
|
case "boolean":
|
|
539
|
-
return {
|
|
454
|
+
return _objectSpread$4({
|
|
540
455
|
value: String(defaultValue),
|
|
541
456
|
kind: "boolean",
|
|
542
457
|
key: key
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
|
|
458
|
+
}, order !== null && {
|
|
459
|
+
order: order
|
|
460
|
+
});
|
|
461
|
+
case "order_selector":
|
|
462
|
+
return _objectSpread$4({
|
|
546
463
|
value: defaultValue,
|
|
547
|
-
kind: "
|
|
464
|
+
kind: "order_selector",
|
|
548
465
|
key: key
|
|
549
|
-
}
|
|
466
|
+
}, order !== null && {
|
|
467
|
+
order: order
|
|
468
|
+
});
|
|
550
469
|
case "alignment_block":
|
|
551
|
-
return {
|
|
470
|
+
return _objectSpread$4({
|
|
552
471
|
value: defaultValue,
|
|
553
472
|
kind: "alignment_block",
|
|
554
473
|
key: key
|
|
555
|
-
}
|
|
474
|
+
}, order !== null && {
|
|
475
|
+
order: order
|
|
476
|
+
});
|
|
477
|
+
case "custom_css":
|
|
478
|
+
return _objectSpread$4({
|
|
479
|
+
value: defaultValue,
|
|
480
|
+
kind: "custom_css",
|
|
481
|
+
key: key
|
|
482
|
+
}, order !== null && {
|
|
483
|
+
order: order
|
|
484
|
+
});
|
|
556
485
|
default:
|
|
557
486
|
return null;
|
|
558
487
|
}
|
|
@@ -595,29 +524,6 @@ var buildLabel = function buildLabel(key, kind) {
|
|
|
595
524
|
return i18next.t("neetoThemes.properties.".concat(neetoCist.snakeToCamelCase(kind), ".").concat(neetoCist.snakeToCamelCase(key)));
|
|
596
525
|
};
|
|
597
526
|
|
|
598
|
-
var Card$2 = function Card(_ref) {
|
|
599
|
-
var _ref$title = _ref.title,
|
|
600
|
-
title = _ref$title === void 0 ? "" : _ref$title,
|
|
601
|
-
children = _ref.children;
|
|
602
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
603
|
-
className: "neeto-ui-border-gray-300 neeto-ui-rounded-lg neeto-ui-bg-white space-y-3 border p-4",
|
|
604
|
-
"data-cy": "theme-".concat(neetoCist.hyphenate(title), "-properties"),
|
|
605
|
-
children: [title && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
606
|
-
className: "flex items-center justify-between",
|
|
607
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
608
|
-
"data-cy": "theme-properties",
|
|
609
|
-
lineHeight: "normal",
|
|
610
|
-
style: "h4",
|
|
611
|
-
weight: "semibold",
|
|
612
|
-
children: title
|
|
613
|
-
})
|
|
614
|
-
}), children && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
615
|
-
className: "space-y-4",
|
|
616
|
-
children: children
|
|
617
|
-
})]
|
|
618
|
-
});
|
|
619
|
-
};
|
|
620
|
-
|
|
621
527
|
var SelectBlock = function SelectBlock(_ref) {
|
|
622
528
|
var label = _ref.label,
|
|
623
529
|
_ref$placeholder = _ref.placeholder,
|
|
@@ -626,8 +532,8 @@ var SelectBlock = function SelectBlock(_ref) {
|
|
|
626
532
|
options = _ref.options,
|
|
627
533
|
onChange = _ref.onChange;
|
|
628
534
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
629
|
-
className: "flex items-center justify-between py-
|
|
630
|
-
"data-cy": "theme-style-".concat(utils.joinHyphenCase(label)),
|
|
535
|
+
className: "flex items-center justify-between py-2 first:pt-0 last:pb-0",
|
|
536
|
+
"data-cy": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
631
537
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
632
538
|
"data-cy": "logo-field-labels",
|
|
633
539
|
style: "body2",
|
|
@@ -644,12 +550,6 @@ var SelectBlock = function SelectBlock(_ref) {
|
|
|
644
550
|
});
|
|
645
551
|
};
|
|
646
552
|
|
|
647
|
-
var DESIGN_SCREENS = {
|
|
648
|
-
THEMES: "Themes",
|
|
649
|
-
Customize: "Customize"
|
|
650
|
-
};
|
|
651
|
-
var ONE_MEGABYTE = 1;
|
|
652
|
-
|
|
653
553
|
var ImageBlock = function ImageBlock(_ref) {
|
|
654
554
|
var _findBy;
|
|
655
555
|
var label = _ref.label,
|
|
@@ -666,7 +566,7 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
666
566
|
var _useFormikContext = formik.useFormikContext(),
|
|
667
567
|
setFieldValue = _useFormikContext.setFieldValue,
|
|
668
568
|
values = _useFormikContext.values;
|
|
669
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
569
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
670
570
|
return {
|
|
671
571
|
themePropertiesSchema: store["themePropertiesSchema"]
|
|
672
572
|
};
|
|
@@ -702,7 +602,7 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
702
602
|
return _context.abrupt("return");
|
|
703
603
|
case 4:
|
|
704
604
|
_context.next = 6;
|
|
705
|
-
return getDominantColorFromUrl(image.url);
|
|
605
|
+
return utils.getDominantColorFromUrl(image.url);
|
|
706
606
|
case 6:
|
|
707
607
|
dominantColor = _context.sent;
|
|
708
608
|
setFieldValue(name, {
|
|
@@ -728,7 +628,7 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
728
628
|
}();
|
|
729
629
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
730
630
|
className: "space-y-3 py-3 first:pt-0 last:pb-0",
|
|
731
|
-
"data-cy": "theme-style-".concat(utils.joinHyphenCase(label)),
|
|
631
|
+
"data-cy": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
732
632
|
children: [label && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
733
633
|
className: "flex items-center justify-between",
|
|
734
634
|
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
@@ -737,7 +637,7 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
737
637
|
children: label
|
|
738
638
|
})
|
|
739
639
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
740
|
-
className: "space-y-3
|
|
640
|
+
className: "space-y-3",
|
|
741
641
|
children: [/*#__PURE__*/react.createElement(neetoImageUploaderFrontend.ImageUploader, {
|
|
742
642
|
uploadConfig: uploadConfig,
|
|
743
643
|
className: "h-40 w-full",
|
|
@@ -768,13 +668,10 @@ var Images = function Images(_ref) {
|
|
|
768
668
|
var imageData = values[key];
|
|
769
669
|
return /*#__PURE__*/jsxRuntime.jsx(Card$2, {
|
|
770
670
|
title: title,
|
|
771
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
imageData: imageData,
|
|
776
|
-
name: key
|
|
777
|
-
})
|
|
671
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ImageBlock, {
|
|
672
|
+
attribute: attribute,
|
|
673
|
+
imageData: imageData,
|
|
674
|
+
name: key
|
|
778
675
|
})
|
|
779
676
|
});
|
|
780
677
|
};
|
|
@@ -784,7 +681,7 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
784
681
|
name = _ref.name;
|
|
785
682
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
786
683
|
className: "flex items-center justify-between gap-2 py-3 first:pt-0 last:pb-0",
|
|
787
|
-
"data-cy": utils.joinHyphenCase(label),
|
|
684
|
+
"data-cy": utils$1.joinHyphenCase(label),
|
|
788
685
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
789
686
|
"data-cy": "style-fields-labels",
|
|
790
687
|
style: "body2",
|
|
@@ -834,8 +731,8 @@ var ColorBlock = function ColorBlock(_ref) {
|
|
|
834
731
|
onChange = _ref.onChange,
|
|
835
732
|
showTransparencyControl = _ref.showTransparencyControl;
|
|
836
733
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
837
|
-
className: "flex items-center justify-between py-
|
|
838
|
-
"data-cy": "theme-style-".concat(utils.joinHyphenCase(label)),
|
|
734
|
+
className: "flex items-center justify-between py-2 first:pt-0 last:pb-0",
|
|
735
|
+
"data-cy": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
839
736
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
840
737
|
"data-cy": "style-fields-labels",
|
|
841
738
|
style: "body2",
|
|
@@ -844,7 +741,8 @@ var ColorBlock = function ColorBlock(_ref) {
|
|
|
844
741
|
color: color,
|
|
845
742
|
onChange: onChange,
|
|
846
743
|
showTransparencyControl: showTransparencyControl,
|
|
847
|
-
showEyeDropper: true
|
|
744
|
+
showEyeDropper: true,
|
|
745
|
+
size: "large"
|
|
848
746
|
})]
|
|
849
747
|
});
|
|
850
748
|
};
|
|
@@ -859,8 +757,8 @@ var FontPickerBlock = function FontPickerBlock(_ref) {
|
|
|
859
757
|
options = _ref.options,
|
|
860
758
|
onChange = _ref.onChange;
|
|
861
759
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
862
|
-
className: "flex items-center justify-between py-
|
|
863
|
-
"data-cy": "theme-style-".concat(utils.joinHyphenCase(label)),
|
|
760
|
+
className: "flex items-center justify-between py-2 first:pt-0 last:pb-0",
|
|
761
|
+
"data-cy": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
864
762
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
865
763
|
"data-cy": "style-fields-labels",
|
|
866
764
|
style: "body2",
|
|
@@ -895,7 +793,7 @@ var SliderBlock = function SliderBlock(_ref) {
|
|
|
895
793
|
marks = _ref.marks;
|
|
896
794
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
897
795
|
className: "flex items-center justify-between gap-3 py-3 first:pt-0 last:pb-0",
|
|
898
|
-
"data-cy": "theme-style-".concat(utils.joinHyphenCase(label)),
|
|
796
|
+
"data-cy": "theme-style-".concat(utils$1.joinHyphenCase(label)),
|
|
899
797
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
900
798
|
"data-cy": "style-fields-labels",
|
|
901
799
|
style: "body2",
|
|
@@ -927,13 +825,13 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
927
825
|
var translationKey = "neetoThemes.properties.boolean.".concat(name, "HelpText");
|
|
928
826
|
var doesHelpTextExist = i18n.exists(translationKey);
|
|
929
827
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
930
|
-
className: "flex items-center justify-between py-
|
|
828
|
+
className: "flex items-center justify-between py-2 first:pt-0 last:pb-0",
|
|
931
829
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
932
830
|
className: "inline-flex items-center gap-4",
|
|
933
831
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
934
832
|
"data-cy": "style-fields-labels",
|
|
935
833
|
style: "body2",
|
|
936
|
-
className:
|
|
834
|
+
className: classNames__default["default"]({
|
|
937
835
|
"w-32": doesHelpTextExist,
|
|
938
836
|
"w-auto": !doesHelpTextExist
|
|
939
837
|
}),
|
|
@@ -954,13 +852,13 @@ var Properties = function Properties(_ref) {
|
|
|
954
852
|
var onPropertiesChange = _ref.onPropertiesChange;
|
|
955
853
|
var _useTranslation = reactI18next.useTranslation(),
|
|
956
854
|
t = _useTranslation.t;
|
|
957
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
855
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
958
856
|
return {
|
|
959
857
|
themePropertiesSchema: store["themePropertiesSchema"]
|
|
960
858
|
};
|
|
961
859
|
}, shallow.shallow),
|
|
962
860
|
themePropertiesSchema = _useConfigStore.themePropertiesSchema;
|
|
963
|
-
var _useThemeStore = useThemeStore(function (store) {
|
|
861
|
+
var _useThemeStore = useThemeUtils.useThemeStore(function (store) {
|
|
964
862
|
return {
|
|
965
863
|
setThemeState: store["setThemeState"]
|
|
966
864
|
};
|
|
@@ -969,7 +867,7 @@ var Properties = function Properties(_ref) {
|
|
|
969
867
|
var _useFormikContext = formik.useFormikContext(),
|
|
970
868
|
setFieldValue = _useFormikContext.setFieldValue,
|
|
971
869
|
values = _useFormikContext.values;
|
|
972
|
-
var _useThemeUtils = useThemeUtils(),
|
|
870
|
+
var _useThemeUtils = useThemeUtils.useThemeUtils(),
|
|
973
871
|
setVariable = _useThemeUtils.setVariable,
|
|
974
872
|
setTheme = _useThemeUtils.setTheme;
|
|
975
873
|
var handleColorChange = function handleColorChange(name) {
|
|
@@ -1010,123 +908,110 @@ var Properties = function Properties(_ref) {
|
|
|
1010
908
|
}, [values]);
|
|
1011
909
|
return /*#__PURE__*/jsxRuntime.jsx(Card$2, {
|
|
1012
910
|
title: t("neetoThemes.common.style"),
|
|
1013
|
-
children:
|
|
1014
|
-
|
|
1015
|
-
children: [neetoCist.filterBy({
|
|
1016
|
-
kind: "font_family"
|
|
1017
|
-
}, values.properties).map(function (_ref3) {
|
|
1018
|
-
var key = _ref3.key,
|
|
1019
|
-
value = _ref3.value,
|
|
1020
|
-
kind = _ref3.kind;
|
|
1021
|
-
return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(FontPickerBlock, {
|
|
1022
|
-
label: buildLabel(key, kind),
|
|
1023
|
-
options: FONT_OPTIONS,
|
|
1024
|
-
value: neetoCist.findBy({
|
|
1025
|
-
value: value || null
|
|
1026
|
-
}, FONT_OPTIONS),
|
|
1027
|
-
onChange: function onChange(_ref4) {
|
|
1028
|
-
var value = _ref4.value;
|
|
1029
|
-
handleChange(key, value);
|
|
1030
|
-
}
|
|
1031
|
-
}, key);
|
|
1032
|
-
}), neetoCist.filterBy({
|
|
1033
|
-
kind: "color"
|
|
1034
|
-
}, values.properties).map(function (_ref5) {
|
|
911
|
+
children: values.properties.sort(function (a, b) {
|
|
912
|
+
var order = function order(key) {
|
|
1035
913
|
var _findBy;
|
|
1036
|
-
|
|
1037
|
-
value = _ref5.value,
|
|
1038
|
-
kind = _ref5.kind;
|
|
1039
|
-
return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(ColorBlock, {
|
|
1040
|
-
color: value,
|
|
1041
|
-
label: buildLabel(key, kind),
|
|
1042
|
-
showTransparencyControl: ((_findBy = neetoCist.findBy({
|
|
1043
|
-
key: key
|
|
1044
|
-
}, themePropertiesSchema)) === null || _findBy === void 0 ? void 0 : _findBy.showTransparencyControl) || false,
|
|
1045
|
-
onChange: handleColorChange(key)
|
|
1046
|
-
}, key);
|
|
1047
|
-
}), neetoCist.filterBy({
|
|
1048
|
-
kind: "radius"
|
|
1049
|
-
}, values.properties).map(function (_ref6) {
|
|
1050
|
-
var key = _ref6.key,
|
|
1051
|
-
value = _ref6.value,
|
|
1052
|
-
kind = _ref6.kind;
|
|
1053
|
-
return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
|
|
1054
|
-
label: buildLabel(key, kind),
|
|
1055
|
-
max: 50,
|
|
1056
|
-
min: 0,
|
|
1057
|
-
value: Number(value) || 0,
|
|
1058
|
-
onChange: function onChange(radius) {
|
|
1059
|
-
return handleChange(key, radius, "".concat(radius, "px"));
|
|
1060
|
-
}
|
|
1061
|
-
}, key);
|
|
1062
|
-
}), neetoCist.filterBy({
|
|
1063
|
-
kind: "overlay_opacity"
|
|
1064
|
-
}, values.properties).map(function (_ref7) {
|
|
1065
|
-
var key = _ref7.key,
|
|
1066
|
-
value = _ref7.value,
|
|
1067
|
-
kind = _ref7.kind;
|
|
1068
|
-
return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
|
|
1069
|
-
label: buildLabel(key, kind),
|
|
1070
|
-
marks: OVERLAY_OPACITY_SLIDER_MARKS,
|
|
1071
|
-
max: HUNDRED,
|
|
1072
|
-
min: ramda.negate(HUNDRED),
|
|
1073
|
-
value: Number(value) || 0,
|
|
1074
|
-
onChange: function onChange(opacity) {
|
|
1075
|
-
return handleOverlayChange(key, opacity);
|
|
1076
|
-
}
|
|
1077
|
-
}, key);
|
|
1078
|
-
}), neetoCist.filterBy({
|
|
1079
|
-
kind: "position_selector"
|
|
1080
|
-
}, values.properties).map(function (_ref8) {
|
|
1081
|
-
var _findBy2;
|
|
1082
|
-
var key = _ref8.key,
|
|
1083
|
-
kind = _ref8.kind,
|
|
1084
|
-
value = _ref8.value;
|
|
1085
|
-
var index = neetoCist.findIndexBy({
|
|
1086
|
-
key: key
|
|
1087
|
-
}, values.properties);
|
|
1088
|
-
var options = (_findBy2 = neetoCist.findBy({
|
|
914
|
+
return ((_findBy = neetoCist.findBy({
|
|
1089
915
|
key: key
|
|
1090
|
-
}, themePropertiesSchema)) === null ||
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
916
|
+
}, themePropertiesSchema)) === null || _findBy === void 0 ? void 0 : _findBy.order) || Infinity;
|
|
917
|
+
};
|
|
918
|
+
return order(a.key) - order(b.key);
|
|
919
|
+
}).map(function (_ref3) {
|
|
920
|
+
var _findBy2;
|
|
921
|
+
var key = _ref3.key,
|
|
922
|
+
value = _ref3.value,
|
|
923
|
+
kind = _ref3.kind;
|
|
924
|
+
var isCurrentPropertyVisible = isPropertyVisible(key, values, themePropertiesSchema);
|
|
925
|
+
if (!isCurrentPropertyVisible) return null;
|
|
926
|
+
switch (kind) {
|
|
927
|
+
case "font_family":
|
|
928
|
+
return /*#__PURE__*/jsxRuntime.jsx(FontPickerBlock, {
|
|
929
|
+
label: buildLabel(key, kind),
|
|
930
|
+
options: FONT_OPTIONS,
|
|
931
|
+
value: neetoCist.findBy({
|
|
932
|
+
value: value || null
|
|
933
|
+
}, FONT_OPTIONS),
|
|
934
|
+
onChange: function onChange(_ref4) {
|
|
935
|
+
var value = _ref4.value;
|
|
936
|
+
return handleChange(key, value);
|
|
937
|
+
}
|
|
938
|
+
}, key);
|
|
939
|
+
case "color":
|
|
940
|
+
return /*#__PURE__*/jsxRuntime.jsx(ColorBlock, {
|
|
941
|
+
color: value,
|
|
942
|
+
label: buildLabel(key, kind),
|
|
943
|
+
showTransparencyControl: ((_findBy2 = neetoCist.findBy({
|
|
944
|
+
key: key
|
|
945
|
+
}, themePropertiesSchema)) === null || _findBy2 === void 0 ? void 0 : _findBy2.showTransparencyControl) || false,
|
|
946
|
+
onChange: handleColorChange(key)
|
|
947
|
+
}, key);
|
|
948
|
+
case "radius":
|
|
949
|
+
return /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
|
|
950
|
+
label: buildLabel(key, kind),
|
|
951
|
+
max: 50,
|
|
952
|
+
min: 0,
|
|
953
|
+
value: Number(value) || 0,
|
|
954
|
+
onChange: function onChange(radius) {
|
|
955
|
+
return handleChange(key, radius, "".concat(radius, "px"));
|
|
956
|
+
}
|
|
957
|
+
}, key);
|
|
958
|
+
case "overlay_opacity":
|
|
959
|
+
return /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
|
|
960
|
+
label: buildLabel(key, kind),
|
|
961
|
+
marks: OVERLAY_OPACITY_SLIDER_MARKS,
|
|
962
|
+
max: HUNDRED,
|
|
963
|
+
min: ramda.negate(HUNDRED),
|
|
964
|
+
value: Number(value) || 0,
|
|
965
|
+
onChange: function onChange(opacity) {
|
|
966
|
+
return handleOverlayChange(key, opacity);
|
|
967
|
+
}
|
|
968
|
+
}, key);
|
|
969
|
+
case "position_selector":
|
|
970
|
+
{
|
|
971
|
+
var _findBy3;
|
|
972
|
+
var index = neetoCist.findIndexBy({
|
|
973
|
+
key: key
|
|
974
|
+
}, values.properties);
|
|
975
|
+
var options = (_findBy3 = neetoCist.findBy({
|
|
976
|
+
key: key
|
|
977
|
+
}, themePropertiesSchema)) === null || _findBy3 === void 0 || (_findBy3 = _findBy3.options) === null || _findBy3 === void 0 ? void 0 : _findBy3.map(neetoCist.toLabelAndValue);
|
|
978
|
+
return /*#__PURE__*/jsxRuntime.jsx(SelectBlock, {
|
|
979
|
+
label: buildLabel(key, kind),
|
|
980
|
+
options: options || POSITION_OPTIONS,
|
|
981
|
+
placeholder: "left",
|
|
982
|
+
value: neetoCist.toLabelAndValue(value),
|
|
983
|
+
onChange: function onChange(option) {
|
|
984
|
+
return setFieldValue("properties[".concat(index, "].value"), option.value);
|
|
985
|
+
}
|
|
986
|
+
}, key);
|
|
1098
987
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
name: neetoCist.snakeToCamelCase(key),
|
|
1113
|
-
onChange: function onChange(e) {
|
|
1114
|
-
return setFieldValue("properties[".concat(index, "].value"), String(e.target.checked));
|
|
988
|
+
case "boolean":
|
|
989
|
+
{
|
|
990
|
+
var _index = neetoCist.findIndexBy({
|
|
991
|
+
key: key
|
|
992
|
+
}, values.properties);
|
|
993
|
+
return /*#__PURE__*/jsxRuntime.jsx(SwitchBlock, {
|
|
994
|
+
checked: value !== "false",
|
|
995
|
+
label: buildLabel(key, kind),
|
|
996
|
+
name: neetoCist.snakeToCamelCase(key),
|
|
997
|
+
onChange: function onChange(e) {
|
|
998
|
+
return setFieldValue("properties[".concat(_index, "].value"), String(e.target.checked));
|
|
999
|
+
}
|
|
1000
|
+
}, key);
|
|
1115
1001
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
})]
|
|
1002
|
+
case "alignment_block":
|
|
1003
|
+
{
|
|
1004
|
+
var _index2 = neetoCist.findIndexBy({
|
|
1005
|
+
key: key
|
|
1006
|
+
}, values.properties);
|
|
1007
|
+
return /*#__PURE__*/jsxRuntime.jsx(AlignmentBlock, {
|
|
1008
|
+
label: buildLabel(key, kind),
|
|
1009
|
+
name: "properties[".concat(_index2, "].value")
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
default:
|
|
1013
|
+
return null;
|
|
1014
|
+
}
|
|
1130
1015
|
})
|
|
1131
1016
|
});
|
|
1132
1017
|
};
|
|
@@ -1152,14 +1037,16 @@ var Customize = function Customize(_ref) {
|
|
|
1152
1037
|
onApplyTheme = _ref.onApplyTheme,
|
|
1153
1038
|
isApplyingTheme = _ref.isApplyingTheme,
|
|
1154
1039
|
onPropertiesChange = _ref.onPropertiesChange,
|
|
1155
|
-
onUpdateThemeSuccess = _ref.onUpdateThemeSuccess
|
|
1040
|
+
onUpdateThemeSuccess = _ref.onUpdateThemeSuccess,
|
|
1041
|
+
onEditCSSClick = _ref.onEditCSSClick,
|
|
1042
|
+
currentScreen = _ref.currentScreen;
|
|
1156
1043
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1157
1044
|
t = _useTranslation.t;
|
|
1158
1045
|
var _useState = react.useState({}),
|
|
1159
1046
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
1160
1047
|
popoverInstance = _useState2[0],
|
|
1161
1048
|
setPopoverInstance = _useState2[1];
|
|
1162
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
1049
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
1163
1050
|
return {
|
|
1164
1051
|
themePropertiesSchema: store["themePropertiesSchema"],
|
|
1165
1052
|
entityType: store["entityType"]
|
|
@@ -1167,7 +1054,7 @@ var Customize = function Customize(_ref) {
|
|
|
1167
1054
|
}, shallow.shallow),
|
|
1168
1055
|
themePropertiesSchema = _useConfigStore.themePropertiesSchema,
|
|
1169
1056
|
entityType = _useConfigStore.entityType;
|
|
1170
|
-
var _useThemeUtils = useThemeUtils(),
|
|
1057
|
+
var _useThemeUtils = useThemeUtils.useThemeUtils(),
|
|
1171
1058
|
currentTheme = _useThemeUtils.currentTheme;
|
|
1172
1059
|
var isEditingCurrentlyAppliedTheme = themeId === (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id);
|
|
1173
1060
|
var submitBtnRef = react.useRef(null);
|
|
@@ -1178,6 +1065,7 @@ var Customize = function Customize(_ref) {
|
|
|
1178
1065
|
updateTheme = _useUpdateTheme.mutate,
|
|
1179
1066
|
isUpdating = _useUpdateTheme.isPending;
|
|
1180
1067
|
var isSubmitting = isCreating || isUpdating;
|
|
1068
|
+
var isCustomCssScreen = isScreenCustomCSS(currentScreen);
|
|
1181
1069
|
var onSubmit = function onSubmit(values, _ref2) {
|
|
1182
1070
|
var resetForm = _ref2.resetForm;
|
|
1183
1071
|
var imageData = buildImageData(values, themePropertiesSchema);
|
|
@@ -1216,16 +1104,34 @@ var Customize = function Customize(_ref) {
|
|
|
1216
1104
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1217
1105
|
className: "neeto-themes-sidebar__scroll",
|
|
1218
1106
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1219
|
-
className: "flex flex-col
|
|
1220
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
},
|
|
1107
|
+
className: "neeto-themes-sidebar__scroll-content flex flex-grow flex-col px-4 py-2 lg:px-5 xl:px-6",
|
|
1108
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1109
|
+
className: classNames__default["default"]({
|
|
1110
|
+
hidden: isCustomCssScreen
|
|
1111
|
+
}),
|
|
1112
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ThemeMeta, {})
|
|
1113
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1114
|
+
className: classNames__default["default"]({
|
|
1115
|
+
hidden: isCustomCssScreen
|
|
1116
|
+
}),
|
|
1117
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Properties, {
|
|
1118
|
+
onPropertiesChange: onPropertiesChange
|
|
1119
|
+
})
|
|
1120
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1121
|
+
className: classNames__default["default"]("flex flex-col gap-6", {
|
|
1122
|
+
hidden: isCustomCssScreen
|
|
1123
|
+
}),
|
|
1124
|
+
children: neetoCist.filterBy({
|
|
1125
|
+
kind: "image"
|
|
1126
|
+
}, themePropertiesSchema).map(function (_ref5) {
|
|
1127
|
+
var key = _ref5.key;
|
|
1128
|
+
return /*#__PURE__*/jsxRuntime.jsx(Images, {
|
|
1129
|
+
attribute: key
|
|
1130
|
+
}, key);
|
|
1131
|
+
})
|
|
1132
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CustomCSS, {
|
|
1133
|
+
currentScreen: currentScreen,
|
|
1134
|
+
onEditCSSClick: onEditCSSClick
|
|
1229
1135
|
})]
|
|
1230
1136
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1231
1137
|
className: "neeto-ui-bg-white neeto-ui-shadow-s sticky bottom-0 left-0 right-0 flex justify-end gap-x-2 px-4 py-6",
|
|
@@ -1367,7 +1273,7 @@ var Thumbnail = function Thumbnail(_ref) {
|
|
|
1367
1273
|
isPreviewing = _ref.isPreviewing,
|
|
1368
1274
|
isHighLightedTheme = _ref.isHighLightedTheme,
|
|
1369
1275
|
theme = _ref.theme;
|
|
1370
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
1276
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
1371
1277
|
return {
|
|
1372
1278
|
themePropertiesSchema: store["themePropertiesSchema"]
|
|
1373
1279
|
};
|
|
@@ -1394,7 +1300,7 @@ var Thumbnail = function Thumbnail(_ref) {
|
|
|
1394
1300
|
}, themePropertiesSchema)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
|
|
1395
1301
|
}, theme.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value;
|
|
1396
1302
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1397
|
-
className:
|
|
1303
|
+
className: classNames__default["default"]("neeto-themes-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
|
|
1398
1304
|
"neeto-ui-border-gray-400": !active,
|
|
1399
1305
|
"neeto-ui-border-gray-800 neeto-themes-theme-thumbnail--active": active,
|
|
1400
1306
|
"neeto-themes-theme-thumbnail--preview-active": isPreviewing,
|
|
@@ -1472,7 +1378,7 @@ var Card = function Card(_ref) {
|
|
|
1472
1378
|
"data-cy": active ? "active-theme-card" : "theme-card",
|
|
1473
1379
|
id: theme.id,
|
|
1474
1380
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1475
|
-
className:
|
|
1381
|
+
className: classNames__default["default"]("neeto-themes-theme-thumbnail neeto-ui-rounded-lg cursor-pointer border transition-all duration-300 ease-in-out", {
|
|
1476
1382
|
"neeto-ui-border-gray-200": !active,
|
|
1477
1383
|
"neeto-themes-theme-thumbnail--active": active,
|
|
1478
1384
|
"neeto-themes-theme-thumbnail--preview-active": isPreviewing,
|
|
@@ -1489,7 +1395,7 @@ var Card = function Card(_ref) {
|
|
|
1489
1395
|
className: "flex-shrink-0",
|
|
1490
1396
|
"data-cy": "active-theme-label"
|
|
1491
1397
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1492
|
-
className:
|
|
1398
|
+
className: classNames__default["default"]({
|
|
1493
1399
|
hidden: !isPreviewing,
|
|
1494
1400
|
"group-hover:block": true
|
|
1495
1401
|
}),
|
|
@@ -1518,7 +1424,7 @@ var Card = function Card(_ref) {
|
|
|
1518
1424
|
theme: theme
|
|
1519
1425
|
})]
|
|
1520
1426
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1521
|
-
className: "flex items-start justify-between gap-1 p-
|
|
1427
|
+
className: "neeto-ui-border-gray-100 flex items-start justify-between gap-1 border-t p-2",
|
|
1522
1428
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1523
1429
|
className: "line-clamp-2 min-w-0 flex-grow break-words pt-1",
|
|
1524
1430
|
"data-cy": "theme-name",
|
|
@@ -1549,12 +1455,12 @@ var Card = function Card(_ref) {
|
|
|
1549
1455
|
}, {
|
|
1550
1456
|
key: "divider",
|
|
1551
1457
|
type: "divider",
|
|
1552
|
-
isVisible: isFunction(onDeleteTheme)
|
|
1458
|
+
isVisible: utils.isFunction(onDeleteTheme)
|
|
1553
1459
|
}, {
|
|
1554
1460
|
key: "delete",
|
|
1555
1461
|
"data-cy": "delete-theme-menu-item",
|
|
1556
1462
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.delete"),
|
|
1557
|
-
isVisible: isFunction(onDeleteTheme),
|
|
1463
|
+
isVisible: utils.isFunction(onDeleteTheme),
|
|
1558
1464
|
onClick: function onClick(e) {
|
|
1559
1465
|
e.stopPropagation();
|
|
1560
1466
|
handleDeleteTheme();
|
|
@@ -1585,9 +1491,9 @@ var Themes = function Themes(_ref) {
|
|
|
1585
1491
|
isApplyingTheme = _ref.isApplyingTheme;
|
|
1586
1492
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1587
1493
|
t = _useTranslation.t;
|
|
1588
|
-
var _useThemeUtils = useThemeUtils(),
|
|
1494
|
+
var _useThemeUtils = useThemeUtils.useThemeUtils(),
|
|
1589
1495
|
setTheme = _useThemeUtils.setTheme;
|
|
1590
|
-
var _useThemeStore = useThemeStore(function (store) {
|
|
1496
|
+
var _useThemeStore = useThemeUtils.useThemeStore(function (store) {
|
|
1591
1497
|
return {
|
|
1592
1498
|
setThemeState: store["setThemeState"],
|
|
1593
1499
|
previewingTheme: store["previewingTheme"]
|
|
@@ -1605,7 +1511,7 @@ var Themes = function Themes(_ref) {
|
|
|
1605
1511
|
if (didScrollActiveThemeIntoView.current || !(currentTheme !== null && currentTheme !== void 0 && currentTheme.id)) return;
|
|
1606
1512
|
didScrollActiveThemeIntoView.current = true;
|
|
1607
1513
|
setTimeout(function () {
|
|
1608
|
-
scrollElementIntoView(currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id);
|
|
1514
|
+
utils.scrollElementIntoView(currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id);
|
|
1609
1515
|
}, 100);
|
|
1610
1516
|
}, [didScrollActiveThemeIntoView, currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id]);
|
|
1611
1517
|
var setPreviewTheme = function setPreviewTheme(theme) {
|
|
@@ -1716,56 +1622,57 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
1716
1622
|
themeToEdit = _ref.themeToEdit;
|
|
1717
1623
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1718
1624
|
t = _useTranslation.t;
|
|
1719
|
-
|
|
1625
|
+
var isCustomCssScreen = isScreenCustomCSS(currentScreen);
|
|
1626
|
+
if (currentScreen === DESIGN_SCREENS.THEMES) {
|
|
1720
1627
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1721
|
-
className: "neeto-themes-sidebar__header px-4",
|
|
1628
|
+
className: "neeto-themes-sidebar__header px-4 lg:px-5 xl:px-6",
|
|
1722
1629
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1723
|
-
className: "flex items-center justify-
|
|
1724
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1725
|
-
"data-cy": "customize-themes-back-button",
|
|
1726
|
-
icon: LeftArrow__default["default"],
|
|
1727
|
-
iconPosition: "left",
|
|
1728
|
-
style: "text",
|
|
1729
|
-
tooltipProps: {
|
|
1730
|
-
content: t("neetoThemes.buttons.backToThemes"),
|
|
1731
|
-
position: "top"
|
|
1732
|
-
},
|
|
1733
|
-
onClick: function onClick() {
|
|
1734
|
-
return handleBackPress(themeToEdit);
|
|
1735
|
-
}
|
|
1736
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1630
|
+
className: "flex items-center justify-between space-x-2",
|
|
1631
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1737
1632
|
"data-cy": "themes-header",
|
|
1738
1633
|
lineHeight: "normal",
|
|
1739
1634
|
style: "h3",
|
|
1740
1635
|
weight: "semibold",
|
|
1741
|
-
children:
|
|
1636
|
+
children: t("neetoThemes.build.leftSideBar.headerTabs.themes")
|
|
1637
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1638
|
+
className: "self-end",
|
|
1639
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
1640
|
+
"data-cy": "customize-themes-add-theme-button",
|
|
1641
|
+
icon: Plus__default["default"],
|
|
1642
|
+
iconPosition: "left",
|
|
1643
|
+
style: "text",
|
|
1644
|
+
tooltipProps: {
|
|
1645
|
+
content: t("neetoThemes.buttons.addNewTheme"),
|
|
1646
|
+
position: "top"
|
|
1647
|
+
},
|
|
1648
|
+
onClick: handleCreateNewTheme
|
|
1649
|
+
})
|
|
1742
1650
|
})]
|
|
1743
1651
|
})
|
|
1744
1652
|
});
|
|
1745
1653
|
}
|
|
1746
1654
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1747
|
-
className: "neeto-themes-sidebar__header px-4
|
|
1655
|
+
className: "neeto-themes-sidebar__header px-4",
|
|
1748
1656
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1749
|
-
className: "flex items-center justify-
|
|
1750
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1657
|
+
className: "flex items-center justify-start space-x-2",
|
|
1658
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
1659
|
+
"data-cy": "customize-themes-back-button",
|
|
1660
|
+
icon: LeftArrow__default["default"],
|
|
1661
|
+
iconPosition: "left",
|
|
1662
|
+
style: "text",
|
|
1663
|
+
tooltipProps: {
|
|
1664
|
+
content: isCustomCssScreen ? t("neetoThemes.buttons.backToEdit") : t("neetoThemes.buttons.backToThemes"),
|
|
1665
|
+
position: "top"
|
|
1666
|
+
},
|
|
1667
|
+
onClick: function onClick() {
|
|
1668
|
+
return handleBackPress(themeToEdit);
|
|
1669
|
+
}
|
|
1670
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Typography__default["default"], {
|
|
1751
1671
|
"data-cy": "themes-header",
|
|
1752
1672
|
lineHeight: "normal",
|
|
1753
1673
|
style: "h3",
|
|
1754
1674
|
weight: "semibold",
|
|
1755
|
-
children: t("neetoThemes.build.leftSideBar.
|
|
1756
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1757
|
-
className: "self-end",
|
|
1758
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
1759
|
-
"data-cy": "customize-themes-add-theme-button",
|
|
1760
|
-
icon: Plus__default["default"],
|
|
1761
|
-
iconPosition: "left",
|
|
1762
|
-
style: "text",
|
|
1763
|
-
tooltipProps: {
|
|
1764
|
-
content: t("neetoThemes.buttons.addNewTheme"),
|
|
1765
|
-
position: "top"
|
|
1766
|
-
},
|
|
1767
|
-
onClick: handleCreateNewTheme
|
|
1768
|
-
})
|
|
1675
|
+
children: [currentScreen === DESIGN_SCREENS.Customize && (isNewTheme ? t("neetoThemes.build.leftSideBar.themes.createTheme.title") : t("neetoThemes.build.leftSideBar.themes.editTheme.title")), isCustomCssScreen && t("neetoThemes.build.leftSideBar.themes.customCSS")]
|
|
1769
1676
|
})]
|
|
1770
1677
|
})
|
|
1771
1678
|
});
|
|
@@ -1794,7 +1701,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1794
1701
|
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
1795
1702
|
themeBeingApplied = _useState8[0],
|
|
1796
1703
|
setThemeBeingApplied = _useState8[1];
|
|
1797
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
1704
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
1798
1705
|
return {
|
|
1799
1706
|
entityType: store["entityType"],
|
|
1800
1707
|
entityId: store["entityId"],
|
|
@@ -1806,7 +1713,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1806
1713
|
entityId = _useConfigStore.entityId,
|
|
1807
1714
|
isFetchingSchema = _useConfigStore.isFetchingSchema,
|
|
1808
1715
|
defaultThemeName = _useConfigStore.defaultThemeName;
|
|
1809
|
-
var _useThemeStore = useThemeStore(function (store) {
|
|
1716
|
+
var _useThemeStore = useThemeUtils.useThemeStore(function (store) {
|
|
1810
1717
|
return {
|
|
1811
1718
|
setThemeState: store["setThemeState"]
|
|
1812
1719
|
};
|
|
@@ -1815,7 +1722,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1815
1722
|
var didScrollActiveThemeIntoView = react.useRef(null);
|
|
1816
1723
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1817
1724
|
t = _useTranslation.t;
|
|
1818
|
-
var _useThemeUtils = useThemeUtils(),
|
|
1725
|
+
var _useThemeUtils = useThemeUtils.useThemeUtils(),
|
|
1819
1726
|
setTheme = _useThemeUtils.setTheme;
|
|
1820
1727
|
var _useListThemes = useListThemes(entityId),
|
|
1821
1728
|
_useListThemes$data = _useListThemes.data,
|
|
@@ -1851,6 +1758,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1851
1758
|
isApplyingTheme = _useApplyTheme.isPending;
|
|
1852
1759
|
var themeToDelete = react.useRef(null);
|
|
1853
1760
|
var themeToEdit = react.useRef(null);
|
|
1761
|
+
var isCustomCssScreen = isScreenCustomCSS(currentScreen);
|
|
1854
1762
|
var handleEditTheme = function handleEditTheme(theme) {
|
|
1855
1763
|
themeToEdit.current = theme;
|
|
1856
1764
|
setCurrentScreen(DESIGN_SCREENS.Customize);
|
|
@@ -1870,12 +1778,12 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1870
1778
|
setThemeState({
|
|
1871
1779
|
previewingTheme: currentTheme
|
|
1872
1780
|
});
|
|
1873
|
-
setCurrentScreen(DESIGN_SCREENS.THEMES);
|
|
1781
|
+
setCurrentScreen(isCustomCssScreen ? DESIGN_SCREENS.Customize : DESIGN_SCREENS.THEMES);
|
|
1874
1782
|
themeToEdit.current = null;
|
|
1875
1783
|
};
|
|
1876
1784
|
var highlightTheme = function highlightTheme(themeToHighlight) {
|
|
1877
1785
|
setTimeout(function () {
|
|
1878
|
-
scrollElementIntoView(themeToHighlight.id);
|
|
1786
|
+
utils.scrollElementIntoView(themeToHighlight.id);
|
|
1879
1787
|
}, 1500);
|
|
1880
1788
|
setTimeout(function () {
|
|
1881
1789
|
setThemeToHighlight(null);
|
|
@@ -1911,7 +1819,9 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1911
1819
|
});
|
|
1912
1820
|
}, [deleteTheme, themeToDelete]);
|
|
1913
1821
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1914
|
-
className: "neeto-themes-sidebar neeto-ui-border-gray-200 flex-shrink-0 border-r",
|
|
1822
|
+
className: classNames__default["default"]("neeto-themes-sidebar neeto-ui-border-gray-200 flex-shrink-0 border-r transition-all duration-300", {
|
|
1823
|
+
"neeto-themes-sidebar--expanded": isCustomCssScreen
|
|
1824
|
+
}),
|
|
1915
1825
|
children: [/*#__PURE__*/jsxRuntime.jsx(TitleBar, {
|
|
1916
1826
|
currentScreen: currentScreen,
|
|
1917
1827
|
handleBackPress: handleBackPress,
|
|
@@ -1936,13 +1846,15 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
1936
1846
|
onDeleteTheme: handleDelete,
|
|
1937
1847
|
onEditTheme: handleEditTheme
|
|
1938
1848
|
}) : /*#__PURE__*/jsxRuntime.jsx(Customize, {
|
|
1849
|
+
currentScreen: currentScreen,
|
|
1939
1850
|
isApplyingTheme: isApplyingTheme,
|
|
1940
1851
|
onApplyTheme: onApplyTheme,
|
|
1941
1852
|
onCreateTheme: onCreateTheme,
|
|
1942
1853
|
onPropertiesChange: onPropertiesChange,
|
|
1943
1854
|
onUpdateThemeSuccess: onUpdateThemeSuccess,
|
|
1944
1855
|
theme: themeToEdit.current,
|
|
1945
|
-
themeId: (_themeToEdit$current2 = themeToEdit.current) === null || _themeToEdit$current2 === void 0 ? void 0 : _themeToEdit$current2.id
|
|
1856
|
+
themeId: (_themeToEdit$current2 = themeToEdit.current) === null || _themeToEdit$current2 === void 0 ? void 0 : _themeToEdit$current2.id,
|
|
1857
|
+
onEditCSSClick: setCurrentScreen
|
|
1946
1858
|
}), /*#__PURE__*/jsxRuntime.jsx(MemoizedAlert, {
|
|
1947
1859
|
isOpen: isDeleteAlertOpen,
|
|
1948
1860
|
isSubmitting: isDeleting,
|
|
@@ -1973,15 +1885,15 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
|
|
|
1973
1885
|
onApplyThemeSuccess = _ref$onApplyThemeSucc === void 0 ? neetoCist.noop : _ref$onApplyThemeSucc,
|
|
1974
1886
|
_ref$onUpdateThemeSuc = _ref.onUpdateThemeSuccess,
|
|
1975
1887
|
onUpdateThemeSuccess = _ref$onUpdateThemeSuc === void 0 ? neetoCist.noop : _ref$onUpdateThemeSuc;
|
|
1976
|
-
var _useThemeStore = useThemeStore(function (store) {
|
|
1888
|
+
var _useThemeStore = useThemeUtils.useThemeStore(function (store) {
|
|
1977
1889
|
return {
|
|
1978
1890
|
setThemeState: store["setThemeState"]
|
|
1979
1891
|
};
|
|
1980
1892
|
}, shallow.shallow),
|
|
1981
1893
|
setThemeState = _useThemeStore.setThemeState;
|
|
1982
|
-
var _useThemeUtils = useThemeUtils(),
|
|
1894
|
+
var _useThemeUtils = useThemeUtils.useThemeUtils(),
|
|
1983
1895
|
setTheme = _useThemeUtils.setTheme;
|
|
1984
|
-
var _useConfigStore = useConfigStore(function (store) {
|
|
1896
|
+
var _useConfigStore = useThemeUtils.useConfigStore(function (store) {
|
|
1985
1897
|
return {
|
|
1986
1898
|
setConfigState: store["setConfigState"]
|
|
1987
1899
|
};
|
|
@@ -2032,14 +1944,7 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
|
|
|
2032
1944
|
})]
|
|
2033
1945
|
});
|
|
2034
1946
|
};
|
|
2035
|
-
var index = reactUtils.withTitle(NeetoThemesBuilder, i18next.t("neetoThemes.common.
|
|
2036
|
-
|
|
2037
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
2038
|
-
|
|
2039
|
-
var css = ".neeto-themes__wrapper{display:flex;width:100%}.neeto-themes__wrapper .neeto-themes-sidebar{background-color:rgb(var(--neeto-ui-white));height:calc(100vh - 64px);width:240px}@media (min-width:1024px){.neeto-themes__wrapper .neeto-themes-sidebar{width:280px}}@media (min-width:1280px){.neeto-themes__wrapper .neeto-themes-sidebar{width:320px}}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__header{padding-bottom:8px;padding-top:16px}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll{height:calc(100vh - 120px);overflow-y:auto}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll .neeto-ui-colorpicker__target .neeto-ui-colorpicker-target__code{display:none}.neeto-themes__wrapper .neeto-themes-preview__wrapper{flex-grow:1;height:calc(100vh - 64px);position:relative}.neeto-themes-theme-thumbnail--preview-active{border-color:rgb(var(--neeto-ui-gray-600))!important;outline:1px solid rgb(var(--neeto-ui-gray-600))!important}.neeto-themes-theme-thumbnail--active{border-color:rgb(var(--neeto-ui-primary-500))!important;outline:2px solid rgb(var(--neeto-ui-primary-500))!important}.neeto-themes-theme-thumbnail--highlight-active{border-color:rgb(var(--neeto-ui-gray-400))!important;outline:2px solid rgb(var(--neeto-ui-gray-400))!important}.neeto-themes-theme-thumbnail__apply-btn{--neeto-ui-btn-padding-x:12px;--neeto-ui-btn-border-radius:100px}.neeto-themes-theme-thumbnail__apply-btn:disabled,.neeto-themes-theme-thumbnail__apply-btn[disabled]{opacity:1!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3RoZW1lcy5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1QkFFRSxZQUFBLENBREEsVUNFRixDRENFLDZDQUdFLDJDQUFBLENBREEseUJBQUEsQ0FEQSxXQ0dKLENEQ0ksMEJBTEYsNkNBTUksV0NFSixDQUNGLENEREksMEJBUkYsNkNBU0ksV0NJSixDQUNGLENERkksMkVBRUUsa0JBQUEsQ0FEQSxnQkNLTixDRERJLDJFQUNFLDBCQUFBLENBQ0EsZUNHTixDREFRLDRJQUNFLFlDRVYsQ0RJRSxzREFHRSxXQUFBLENBREEseUJBQUEsQ0FEQSxpQkNBSixDRE1BLDhDQUNFLG9EQUFBLENBQ0EseURDSEYsQ0RNQSxzQ0FDRSx1REFBQSxDQUNBLDREQ0hGLENETUEsZ0RBQ0Usb0RBQUEsQ0FDQSx5RENIRixDRE1BLHlDQUNFLDZCQUFBLENBQ0Esa0NDSEYsQ0RJRSxxR0FFRSxtQkNISiIsInNvdXJjZXNDb250ZW50IjpbIi5uZWV0by10aGVtZXNfX3dyYXBwZXIge1xuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcblxuICAubmVldG8tdGhlbWVzLXNpZGViYXIge1xuICAgIHdpZHRoOiAkdGhlbWVzLXNpZGViYXItd2lkdGgtc207XG4gICAgaGVpZ2h0OiBjYWxjKDEwMHZoIC0gI3skYnVpbGRlci1oZWFkZXIt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2IodmFyKC0tbmVldG8tdWktZ3JheS02MDApKSAhaW1wb3J0YW50O1xufVxuXG4ubmVldG8tdGhlbWVzLXRoZW1lLXRodW1ibmFpbC0tYWN0aXZlIHtcbiAgYm9yZGVyLWNvbG9yOiByZ2IodmFyKC0tbmVldG8tdWktcHJpbWFyeS01MDApKSAhaW1wb3J0YW50O1xuICBvdXRsaW5lOiAycHggc29saWQgcmdiKHZhcigtLW5lZXRvLXVpLXByaW1hcnktNTAwKSkgIWltcG9ydGFudDtcbn1cblxuLm5lZXRvLXRoZW1lcy10aGVtZS10aHVtYm5haWwtLWhpZ2hsaWdodC1hY3RpdmUge1xuICBib3JkZXItY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTQwMCkpICFpbXBvcnRhbnQ7XG4gIG91dGxpbmU6IDJweCBzb2xpZCByZ2IodmFyKC0tbmVldG8tdWktZ3JheS00MDApKSAhaW1wb3J0YW50O1xufVxuXG4ubmVldG8tdGhlbWVzLXRoZW1lLXRodW1ibmFpbF9fYXBwbHktYnRuIHtcbiAgLS1uZWV0by11aS1idG4tcGFkZGluZy14OiAxMnB4O1xuICAtLW5lZXRvLXVpLWJ0bi1ib3JkZXItcmFkaXVzOiAxMDBweDtcbn1cbi5uZWV0by10aGVtZXMtdGhlbWUtdGh1bWJuYWlsX19hcHBseS1idG46ZGlzYWJsZWQsIC5uZWV0by10aGVtZXMtdGhlbWUtdGh1bWJuYWlsX19hcHBseS1idG5bZGlzYWJsZWRdIHtcbiAgb3BhY2l0eTogMSAhaW1wb3J0YW50O1xufSJdfQ== */";
|
|
2040
|
-
n(css,{});
|
|
1947
|
+
var index = reactUtils.withTitle(NeetoThemesBuilder, i18next.t("neetoThemes.common.theme"));
|
|
2041
1948
|
|
|
2042
|
-
exports
|
|
2043
|
-
|
|
2044
|
-
exports.useThemeUtils = useThemeUtils;
|
|
2045
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
1949
|
+
module.exports = index;
|
|
1950
|
+
//# sourceMappingURL=NeetoThemesBuilder.js.map
|