@bigbinary/neeto-themes-frontend 2.2.0 → 3.0.1

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/dist/cjs/hooks.js CHANGED
@@ -1,14 +1,12 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var useThemeUtils = require('../useThemeUtils-38895e4a.js');
3
+ var useThemeUtils = require('../useThemeUtils-P5tn1h2B.js');
6
4
  require('zustand/shallow');
7
5
  require('react');
8
6
  require('ramda');
9
7
  require('@bigbinary/neeto-commons-frontend/react-utils');
10
8
  require('zustand');
11
- require('../index-2666fca8.js');
9
+ require('../index-D6l2IgrM.js');
12
10
  require('@bigbinary/neeto-cist');
13
11
  require('@babel/runtime/helpers/asyncToGenerator');
14
12
  require('@babel/runtime/regenerator');
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var NeetoThemesBuilder = require('./NeetoThemesBuilder.js');
6
- var useThemeUtils = require('../useThemeUtils-38895e4a.js');
7
- var utils = require('../index-2666fca8.js');
4
+ var useThemeUtils = require('../useThemeUtils-P5tn1h2B.js');
5
+ var utils = require('../index-D6l2IgrM.js');
8
6
  require('zustand/shallow');
9
7
  require('react');
10
8
  require('i18next');
@@ -14,34 +12,39 @@ require('@bigbinary/neetoui/Spinner');
14
12
  require('@tanstack/react-query');
15
13
  require('axios');
16
14
  require('@babel/runtime/helpers/slicedToArray');
15
+ require('classnames');
16
+ require('@bigbinary/neeto-icons/Collapse');
17
17
  require('@bigbinary/neetoui/Alert');
18
+ require('@bigbinary/neetoui/Button');
18
19
  require('react-i18next');
19
20
  require('@babel/runtime/helpers/objectWithoutProperties');
20
21
  require('@babel/runtime/helpers/defineProperty');
21
22
  require('@bigbinary/neeto-icons/Close');
22
- require('@bigbinary/neetoui/Button');
23
23
  require('@bigbinary/neetoui/Popover');
24
24
  require('@bigbinary/neetoui/Typography');
25
+ require('@bigbinary/neetoui/Switch');
26
+ require('@bigbinary/neetoui/Tooltip');
25
27
  require('@bigbinary/neetoui/formik/Form');
26
28
  require('yup');
29
+ require('@monaco-editor/react');
27
30
  require('formik');
31
+ require('@bigbinary/neeto-icons/Down');
28
32
  require('react/jsx-runtime');
29
- require('@babel/runtime/helpers/asyncToGenerator');
30
- require('@babel/runtime/regenerator');
31
- require('@bigbinary/neeto-image-uploader-frontend');
32
- require('@bigbinary/neeto-commons-frontend/utils');
33
- require('@bigbinary/neetoui/Toastr');
34
33
  require('ramda');
35
- require('@bigbinary/neetoui/Select');
34
+ require('@bigbinary/neeto-commons-frontend/utils');
36
35
  require('@bigbinary/neeto-icons/CenterAlign');
37
36
  require('@bigbinary/neeto-icons/LeftAlign');
38
37
  require('@bigbinary/neetoui/ColorPicker');
38
+ require('@bigbinary/neetoui/Select');
39
39
  require('antd');
40
- require('classnames');
41
40
  require('@bigbinary/neeto-molecules/HelpPopover');
42
- require('@bigbinary/neetoui/Switch');
41
+ require('@babel/runtime/helpers/asyncToGenerator');
42
+ require('@babel/runtime/regenerator');
43
+ require('@bigbinary/neeto-image-uploader-frontend/ImageUploader');
44
+ require('@bigbinary/neetoui/Toastr');
43
45
  require('@bigbinary/neetoui/formik/Input');
44
46
  require('@bigbinary/neeto-molecules/Search');
47
+ require('@bigbinary/neeto-icons/Rating');
45
48
  require('@bigbinary/neeto-molecules/MoreDropdown');
46
49
  require('@bigbinary/neeto-icons/LeftArrow');
47
50
  require('@bigbinary/neeto-icons/Plus');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/cjs/utils.js CHANGED
@@ -1,9 +1,7 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  require('@bigbinary/neeto-cist');
6
- var utils = require('../index-2666fca8.js');
4
+ var utils = require('../index-D6l2IgrM.js');
7
5
  require('@babel/runtime/helpers/asyncToGenerator');
8
6
  require('@babel/runtime/regenerator');
9
7
  require('@bigbinary/neetoui/Toastr');
@@ -11,6 +9,7 @@ require('@bigbinary/neetoui/Toastr');
11
9
 
12
10
 
13
11
  exports.isPropertyIndependent = utils.isPropertyIndependent;
12
+ exports.setCustomCSS = utils.setCustomCSS;
14
13
  exports.setTheme = utils.setTheme;
15
14
  exports.setVariable = utils.setVariable;
16
15
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
package/dist/hooks.js CHANGED
@@ -1,10 +1,10 @@
1
- export { u as useThemeUtils } from './useThemeUtils-36f2ce5a.js';
1
+ export { u as useThemeUtils } from './useThemeUtils-BCO-i9ZG.js';
2
2
  import 'zustand/shallow';
3
3
  import 'react';
4
4
  import 'ramda';
5
5
  import '@bigbinary/neeto-commons-frontend/react-utils';
6
6
  import 'zustand';
7
- import './index-9e15a8b1.js';
7
+ import './index-CvV1tFYS.js';
8
8
  import '@bigbinary/neeto-cist';
9
9
  import '@babel/runtime/helpers/asyncToGenerator';
10
10
  import '@babel/runtime/regenerator';
@@ -18,7 +18,7 @@ var getImageFromUrl = function getImageFromUrl(source) {
18
18
  });
19
19
  };
20
20
  var getDominantColorFromUrl = /*#__PURE__*/function () {
21
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(imageUrl) {
21
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(imageUrl) {
22
22
  var image, context, c;
23
23
  return _regeneratorRuntime.wrap(function _callee$(_context) {
24
24
  while (1) switch (_context.prev = _context.next) {
@@ -29,7 +29,7 @@ var getDominantColorFromUrl = /*#__PURE__*/function () {
29
29
  case 3:
30
30
  image = _context.sent;
31
31
  context = document.createElement("canvas").getContext("2d");
32
- context === null || context === void 0 || context.drawImage(image, 0, 0, 1, 1);
32
+ context === null || context === void 0 ? void 0 : context.drawImage(image, 0, 0, 1, 1);
33
33
  c = context === null || context === void 0 ? void 0 : context.getImageData(0, 0, 1, 1).data;
34
34
  if (!c) {
35
35
  _context.next = 9;
@@ -55,7 +55,7 @@ var getDominantColorFromUrl = /*#__PURE__*/function () {
55
55
  }();
56
56
  var scrollElementIntoView = function scrollElementIntoView(elementId) {
57
57
  var elementToScroll = document.getElementById(elementId);
58
- elementToScroll === null || elementToScroll === void 0 || elementToScroll.scrollIntoView({
58
+ elementToScroll === null || elementToScroll === void 0 ? void 0 : elementToScroll.scrollIntoView({
59
59
  behavior: "smooth"
60
60
  });
61
61
  };
@@ -99,6 +99,20 @@ var isPropertyIndependent = function isPropertyIndependent(key, theme, schema) {
99
99
  }
100
100
  return isPresent(dependentProperty === null || dependentProperty === void 0 ? void 0 : dependentProperty.value);
101
101
  };
102
+ var setCustomCSS = function setCustomCSS(_ref) {
103
+ var css = _ref.css,
104
+ elementId = _ref.elementId,
105
+ parentElementClass = _ref.parentElementClass;
106
+ var wrapper = document.querySelector(".".concat(parentElementClass));
107
+ if (!wrapper) return;
108
+ var styleTag = wrapper.querySelector("#".concat(elementId));
109
+ if (!styleTag) {
110
+ styleTag = document.createElement("style");
111
+ }
112
+ styleTag.textContent = css;
113
+ styleTag.id = elementId;
114
+ wrapper.appendChild(styleTag);
115
+ };
102
116
  var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
103
117
  if (isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
104
118
  theme.properties.forEach(function (property) {
@@ -115,19 +129,28 @@ var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
115
129
  setVariable(snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE, variableNamesMap);
116
130
  } else if (property.kind === "radius") {
117
131
  setVariable(attribute, "".concat(property.value, "px"), variableNamesMap);
132
+ } else if (property.kind === "custom_css") {
133
+ var _findBy;
134
+ setCustomCSS({
135
+ css: property.value,
136
+ elementId: property.key,
137
+ parentElementClass: (_findBy = findBy({
138
+ kind: "custom_css"
139
+ }, themeConfig)) === null || _findBy === void 0 ? void 0 : _findBy.parentClass
140
+ });
118
141
  } else {
119
142
  setVariable(attribute, property.value, variableNamesMap);
120
143
  }
121
144
  });
122
145
  filterBy({
123
146
  kind: "image"
124
- }, themeConfig).forEach(function (_ref) {
147
+ }, themeConfig).forEach(function (_ref2) {
125
148
  var _theme$attribute;
126
- var key = _ref.key;
149
+ var key = _ref2.key;
127
150
  var attribute = snakeToCamelCase(key);
128
151
  setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"), variableNamesMap);
129
152
  });
130
153
  };
131
154
 
132
- export { BASE_URL as B, scrollElementIntoView as a, setVariable as b, isPropertyIndependent as c, getDominantColorFromUrl as g, isFunction as i, setTheme as s };
133
- //# sourceMappingURL=index-9e15a8b1.js.map
155
+ export { BASE_URL as B, setVariable as a, scrollElementIntoView as b, setCustomCSS as c, isPropertyIndependent as d, getDominantColorFromUrl as g, isFunction as i, setTheme as s };
156
+ //# sourceMappingURL=index-CvV1tFYS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CvV1tFYS.js","sources":["../app/javascript/src/constants/index.js","../app/javascript/src/components/utils.js","../app/javascript/src/utils/index.js"],"sourcesContent":["export const BASE_URL = \"neeto_themes_engine\";\nexport const WHITE = \"255, 255, 255\";\nexport const BLACK = \"0, 0, 0\";\n","import { Toastr } from \"neetoui\";\n\nexport const getImageFromUrl = source => {\n const image = new Image();\n image.crossOrigin = \"anonymous\";\n image.src = source;\n\n return new Promise(resolve => {\n image.onload = () => {\n resolve(image);\n };\n });\n};\n\nexport const getDominantColorFromUrl = async imageUrl => {\n try {\n const image = await getImageFromUrl(imageUrl);\n const context = document.createElement(\"canvas\").getContext(\"2d\");\n context?.drawImage(image, 0, 0, 1, 1);\n const c = context?.getImageData(0, 0, 1, 1).data;\n\n if (c) {\n return `#${((1 << 24) + (c[0] << 16) + (c[1] << 8) + c[2])\n .toString(16)\n .slice(1)}`;\n }\n\n return null;\n } catch (error) {\n Toastr.error(error);\n\n return null;\n }\n};\n\nexport const scrollElementIntoView = elementId => {\n const elementToScroll = document.getElementById(elementId);\n elementToScroll?.scrollIntoView({ behavior: \"smooth\" });\n};\n\nexport const isFunction = obj => typeof obj === \"function\";\n\nexport const hexToRgba = hex => {\n const result =\n /^#?(?:([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(\n hex\n );\n\n if (!result) return null;\n\n const r = parseInt(result[1] || result[5], 16);\n const g = parseInt(result[2] || result[6], 16);\n const b = parseInt(result[3] || result[7], 16);\n const a = result[4]\n ? Math.round(parseInt(result[4], 16) / 2.55) / 100\n : undefined;\n\n return `${r}, ${g}, ${b}${a !== undefined ? `, ${a}` : \"\"}`;\n};\n\nexport const hexToRgb = hex => hexToRgba(hex?.slice(0, 7));\n","import {\n filterBy,\n findBy,\n isNotPresent,\n isPresent,\n snakeToCamelCase,\n} from \"neetocist\";\n\nimport { hexToRgba } from \"components/utils\";\nimport { BLACK, WHITE } from \"src/constants\";\n\nconst root = document.querySelector(\":root\");\n\nexport const setVariable = (name, value, variableNamesMap) => {\n const variableName = variableNamesMap[name];\n if (!variableName) return;\n\n root.style.setProperty(variableName, value);\n};\n\nexport const isPropertyIndependent = (key, theme, schema) => {\n const property = findBy({ key }, schema);\n\n if (isNotPresent(property)) return false;\n\n const conditionalKey = property?.dependsOn;\n if (isNotPresent(conditionalKey)) return true;\n\n const dependentPropertySchema = findBy({ key: conditionalKey }, schema);\n\n const dependentProperty = findBy({ key: conditionalKey }, theme.properties);\n\n if (dependentPropertySchema.kind === \"image\") {\n return isPresent(theme[snakeToCamelCase(conditionalKey)]?.url);\n } else if (dependentPropertySchema.kind === \"boolean\") {\n return dependentProperty?.value !== \"false\";\n }\n\n return isPresent(dependentProperty?.value);\n};\n\nexport const setCustomCSS = ({ css, elementId, parentElementClass }) => {\n const wrapper = document.querySelector(`.${parentElementClass}`);\n if (!wrapper) return;\n\n let styleTag = wrapper.querySelector(`#${elementId}`);\n if (!styleTag) {\n styleTag = document.createElement(\"style\");\n }\n\n styleTag.textContent = css;\n styleTag.id = elementId;\n wrapper.appendChild(styleTag);\n};\n\nexport const setTheme = (theme, variableNamesMap, themeConfig) => {\n if (isNotPresent(theme?.properties)) return;\n\n theme.properties.forEach(property => {\n const attribute = snakeToCamelCase(property.key);\n\n if (\n property.kind !== \"overlay_opacity\" &&\n !isPropertyIndependent(property.key, theme, themeConfig)\n ) {\n setVariable(attribute, \"\", variableNamesMap);\n\n return;\n }\n\n if (property.kind === \"color\") {\n setVariable(attribute, hexToRgba(property.value), variableNamesMap);\n } else if (property.kind === \"overlay_opacity\") {\n const overlayOpacity = Number(property.value);\n\n setVariable(\n snakeToCamelCase(`${property.key}_overlay_opacity`),\n Math.abs(overlayOpacity / 100),\n variableNamesMap\n );\n\n setVariable(\n snakeToCamelCase(`${property.key}_overlay_color`),\n overlayOpacity < 0 ? BLACK : WHITE,\n variableNamesMap\n );\n } else if (property.kind === \"radius\") {\n setVariable(attribute, `${property.value}px`, variableNamesMap);\n } else if (property.kind === \"custom_css\") {\n setCustomCSS({\n css: property.value,\n elementId: property.key,\n parentElementClass: findBy({ kind: \"custom_css\" }, themeConfig)\n ?.parentClass,\n });\n } else {\n setVariable(attribute, property.value, variableNamesMap);\n }\n });\n\n filterBy({ kind: \"image\" }, themeConfig).forEach(({ key }) => {\n const attribute = snakeToCamelCase(key);\n setVariable(attribute, `url(${theme[attribute]?.url})`, variableNamesMap);\n });\n};\n"],"names":["BASE_URL","WHITE","BLACK","getImageFromUrl","source","image","Image","crossOrigin","src","Promise","resolve","onload","getDominantColorFromUrl","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","imageUrl","context","c","wrap","_callee$","_context","prev","next","sent","document","createElement","getContext","drawImage","getImageData","data","abrupt","concat","toString","slice","t0","Toastr","error","stop","_x","apply","arguments","scrollElementIntoView","elementId","elementToScroll","getElementById","scrollIntoView","behavior","isFunction","obj","hexToRgba","hex","result","exec","r","parseInt","g","b","a","Math","round","undefined","root","querySelector","setVariable","name","value","variableNamesMap","variableName","style","setProperty","isPropertyIndependent","key","theme","schema","property","findBy","isNotPresent","conditionalKey","dependsOn","dependentPropertySchema","dependentProperty","properties","kind","_theme$snakeToCamelCa","isPresent","snakeToCamelCase","url","setCustomCSS","css","parentElementClass","wrapper","styleTag","textContent","id","appendChild","setTheme","themeConfig","forEach","attribute","overlayOpacity","Number","abs","_findBy","parentClass","filterBy","_ref2","_theme$attribute"],"mappings":";;;;;AAAO,IAAMA,QAAQ,GAAG,sBAAqB;AACtC,IAAMC,KAAK,GAAG,eAAe,CAAA;AAC7B,IAAMC,KAAK,GAAG,SAAS;;ACAvB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,MAAM,EAAI;AACvC,EAAA,IAAMC,KAAK,GAAG,IAAIC,KAAK,EAAE,CAAA;EACzBD,KAAK,CAACE,WAAW,GAAG,WAAW,CAAA;EAC/BF,KAAK,CAACG,GAAG,GAAGJ,MAAM,CAAA;AAElB,EAAA,OAAO,IAAIK,OAA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CR,IAAAA,WAAW,CAACmC,SAAS,EAAA,MAAA,CAAAnE,MAAA,CAAA2E,CAAAA,gBAAA,GAASlC,KAAK,CAAC0B,SAAS,CAAC,MAAA,IAAA,IAAAQ,gBAAA,KAAhBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAA,CAAkBpB,GAAG,EAAA,GAAA,CAAA,EAAKpB,gBAAgB,CAAC,CAAA;AAC3E,GAAC,CAAC,CAAA;AACJ;;;;"}
@@ -5,12 +5,6 @@ var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
5
5
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
6
6
  var Toastr = require('@bigbinary/neetoui/Toastr');
7
7
 
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
11
- var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
12
- var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
13
-
14
8
  var BASE_URL = "neeto_themes_engine";
15
9
  var WHITE = "255, 255, 255";
16
10
  var BLACK = "0, 0, 0";
@@ -26,9 +20,9 @@ var getImageFromUrl = function getImageFromUrl(source) {
26
20
  });
27
21
  };
28
22
  var getDominantColorFromUrl = /*#__PURE__*/function () {
29
- var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(imageUrl) {
23
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(imageUrl) {
30
24
  var image, context, c;
31
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
25
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
32
26
  while (1) switch (_context.prev = _context.next) {
33
27
  case 0:
34
28
  _context.prev = 0;
@@ -37,7 +31,7 @@ var getDominantColorFromUrl = /*#__PURE__*/function () {
37
31
  case 3:
38
32
  image = _context.sent;
39
33
  context = document.createElement("canvas").getContext("2d");
40
- context === null || context === void 0 || context.drawImage(image, 0, 0, 1, 1);
34
+ context === null || context === void 0 ? void 0 : context.drawImage(image, 0, 0, 1, 1);
41
35
  c = context === null || context === void 0 ? void 0 : context.getImageData(0, 0, 1, 1).data;
42
36
  if (!c) {
43
37
  _context.next = 9;
@@ -49,7 +43,7 @@ var getDominantColorFromUrl = /*#__PURE__*/function () {
49
43
  case 12:
50
44
  _context.prev = 12;
51
45
  _context.t0 = _context["catch"](0);
52
- Toastr__default["default"].error(_context.t0);
46
+ Toastr.error(_context.t0);
53
47
  return _context.abrupt("return", null);
54
48
  case 16:
55
49
  case "end":
@@ -63,7 +57,7 @@ var getDominantColorFromUrl = /*#__PURE__*/function () {
63
57
  }();
64
58
  var scrollElementIntoView = function scrollElementIntoView(elementId) {
65
59
  var elementToScroll = document.getElementById(elementId);
66
- elementToScroll === null || elementToScroll === void 0 || elementToScroll.scrollIntoView({
60
+ elementToScroll === null || elementToScroll === void 0 ? void 0 : elementToScroll.scrollIntoView({
67
61
  behavior: "smooth"
68
62
  });
69
63
  };
@@ -107,6 +101,20 @@ var isPropertyIndependent = function isPropertyIndependent(key, theme, schema) {
107
101
  }
108
102
  return neetoCist.isPresent(dependentProperty === null || dependentProperty === void 0 ? void 0 : dependentProperty.value);
109
103
  };
104
+ var setCustomCSS = function setCustomCSS(_ref) {
105
+ var css = _ref.css,
106
+ elementId = _ref.elementId,
107
+ parentElementClass = _ref.parentElementClass;
108
+ var wrapper = document.querySelector(".".concat(parentElementClass));
109
+ if (!wrapper) return;
110
+ var styleTag = wrapper.querySelector("#".concat(elementId));
111
+ if (!styleTag) {
112
+ styleTag = document.createElement("style");
113
+ }
114
+ styleTag.textContent = css;
115
+ styleTag.id = elementId;
116
+ wrapper.appendChild(styleTag);
117
+ };
110
118
  var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
111
119
  if (neetoCist.isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
112
120
  theme.properties.forEach(function (property) {
@@ -123,15 +131,24 @@ var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
123
131
  setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE, variableNamesMap);
124
132
  } else if (property.kind === "radius") {
125
133
  setVariable(attribute, "".concat(property.value, "px"), variableNamesMap);
134
+ } else if (property.kind === "custom_css") {
135
+ var _findBy;
136
+ setCustomCSS({
137
+ css: property.value,
138
+ elementId: property.key,
139
+ parentElementClass: (_findBy = neetoCist.findBy({
140
+ kind: "custom_css"
141
+ }, themeConfig)) === null || _findBy === void 0 ? void 0 : _findBy.parentClass
142
+ });
126
143
  } else {
127
144
  setVariable(attribute, property.value, variableNamesMap);
128
145
  }
129
146
  });
130
147
  neetoCist.filterBy({
131
148
  kind: "image"
132
- }, themeConfig).forEach(function (_ref) {
149
+ }, themeConfig).forEach(function (_ref2) {
133
150
  var _theme$attribute;
134
- var key = _ref.key;
151
+ var key = _ref2.key;
135
152
  var attribute = neetoCist.snakeToCamelCase(key);
136
153
  setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"), variableNamesMap);
137
154
  });
@@ -142,6 +159,7 @@ exports.getDominantColorFromUrl = getDominantColorFromUrl;
142
159
  exports.isFunction = isFunction;
143
160
  exports.isPropertyIndependent = isPropertyIndependent;
144
161
  exports.scrollElementIntoView = scrollElementIntoView;
162
+ exports.setCustomCSS = setCustomCSS;
145
163
  exports.setTheme = setTheme;
146
164
  exports.setVariable = setVariable;
147
- //# sourceMappingURL=index-2666fca8.js.map
165
+ //# sourceMappingURL=index-D6l2IgrM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D6l2IgrM.js","sources":["../app/javascript/src/constants/index.js","../app/javascript/src/components/utils.js","../app/javascript/src/utils/index.js"],"sourcesContent":["export const BASE_URL = \"neeto_themes_engine\";\nexport const WHITE = \"255, 255, 255\";\nexport const BLACK = \"0, 0, 0\";\n","import { Toastr } from \"neetoui\";\n\nexport const getImageFromUrl = source => {\n const image = new Image();\n image.crossOrigin = \"anonymous\";\n image.src = source;\n\n return new Promise(resolve => {\n image.onload = () => {\n resolve(image);\n };\n });\n};\n\nexport const getDominantColorFromUrl = async imageUrl => {\n try {\n const image = await getImageFromUrl(imageUrl);\n const context = document.createElement(\"canvas\").getContext(\"2d\");\n context?.drawImage(image, 0, 0, 1, 1);\n const c = context?.getImageData(0, 0, 1, 1).data;\n\n if (c) {\n return `#${((1 << 24) + (c[0] << 16) + (c[1] << 8) + c[2])\n .toString(16)\n .slice(1)}`;\n }\n\n return null;\n } catch (error) {\n Toastr.error(error);\n\n return null;\n }\n};\n\nexport const scrollElementIntoView = elementId => {\n const elementToScroll = document.getElementById(elementId);\n elementToScroll?.scrollIntoView({ behavior: \"smooth\" });\n};\n\nexport const isFunction = obj => typeof obj === \"function\";\n\nexport const hexToRgba = hex => {\n const result =\n /^#?(?:([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(\n hex\n );\n\n if (!result) return null;\n\n const r = parseInt(result[1] || result[5], 16);\n const g = parseInt(result[2] || result[6], 16);\n const b = parseInt(result[3] || result[7], 16);\n const a = result[4]\n ? Math.round(parseInt(result[4], 16) / 2.55) / 100\n : undefined;\n\n return `${r}, ${g}, ${b}${a !== undefined ? `, ${a}` : \"\"}`;\n};\n\nexport const hexToRgb = hex => hexToRgba(hex?.slice(0, 7));\n","import {\n filterBy,\n findBy,\n isNotPresent,\n isPresent,\n snakeToCamelCase,\n} from \"neetocist\";\n\nimport { hexToRgba } from \"components/utils\";\nimport { BLACK, WHITE } from \"src/constants\";\n\nconst root = document.querySelector(\":root\");\n\nexport const setVariable = (name, value, variableNamesMap) => {\n const variableName = variableNamesMap[name];\n if (!variableName) return;\n\n root.style.setProperty(variableName, value);\n};\n\nexport const isPropertyIndependent = (key, theme, schema) => {\n const property = findBy({ key }, schema);\n\n if (isNotPresent(property)) return false;\n\n const conditionalKey = property?.dependsOn;\n if (isNotPresent(conditionalKey)) return true;\n\n const dependentPropertySchema = findBy({ key: conditionalKey }, schema);\n\n const dependentProperty = findBy({ key: conditionalKey }, theme.properties);\n\n if (dependentPropertySchema.kind === \"image\") {\n return isPresent(theme[snakeToCamelCase(conditionalKey)]?.url);\n } else if (dependentPropertySchema.kind === \"boolean\") {\n return dependentProperty?.value !== \"false\";\n }\n\n return isPresent(dependentProperty?.value);\n};\n\nexport const setCustomCSS = ({ css, elementId, parentElementClass }) => {\n const wrapper = document.querySelector(`.${parentElementClass}`);\n if (!wrapper) return;\n\n let styleTag = wrapper.querySelector(`#${elementId}`);\n if (!styleTag) {\n styleTag = document.createElement(\"style\");\n }\n\n styleTag.textContent = css;\n styleTag.id = elementId;\n wrapper.appendChild(styleTag);\n};\n\nexport const setTheme = (theme, variableNamesMap, themeConfig) => {\n if (isNotPresent(theme?.properties)) return;\n\n theme.properties.forEach(property => {\n const attribute = snakeToCamelCase(property.key);\n\n if (\n property.kind !== \"overlay_opacity\" &&\n !isPropertyIndependent(property.key, theme, themeConfig)\n ) {\n setVariable(attribute, \"\", variableNamesMap);\n\n return;\n }\n\n if (property.kind === \"color\") {\n setVariable(attribute, hexToRgba(property.value), variableNamesMap);\n } else if (property.kind === \"overlay_opacity\") {\n const overlayOpacity = Number(property.value);\n\n setVariable(\n snakeToCamelCase(`${property.key}_overlay_opacity`),\n Math.abs(overlayOpacity / 100),\n variableNamesMap\n );\n\n setVariable(\n snakeToCamelCase(`${property.key}_overlay_color`),\n overlayOpacity < 0 ? BLACK : WHITE,\n variableNamesMap\n );\n } else if (property.kind === \"radius\") {\n setVariable(attribute, `${property.value}px`, variableNamesMap);\n } else if (property.kind === \"custom_css\") {\n setCustomCSS({\n css: property.value,\n elementId: property.key,\n parentElementClass: findBy({ kind: \"custom_css\" }, themeConfig)\n ?.parentClass,\n });\n } else {\n setVariable(attribute, property.value, variableNamesMap);\n }\n });\n\n filterBy({ kind: \"image\" }, themeConfig).forEach(({ key }) => {\n const attribute = snakeToCamelCase(key);\n setVariable(attribute, `url(${theme[attribute]?.url})`, variableNamesMap);\n });\n};\n"],"names":["BASE_URL","WHITE","BLACK","getImageFromUrl","source","image","Image","crossOrigin","src","Promise","resolve","onload","getDominantColorFromUrl","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","imageUrl","context","c","wrap","_callee$","_context","prev","next","sent","document","createElement","getContext","drawImage","getImageData","data","abrupt","concat","toString","slice","t0","Toastr","error","stop","_x","apply","arguments","scrollElementIntoView","elementId","elementToScroll","getElementById","scrollIntoView","behavior","isFunction","obj","hexToRgba","hex","result","exec","r","parseInt","g","b","a","Math","round","undefined","root","querySelector","setVariable","name","value","variableNamesMap","variableName","style","setProperty","isPropertyIndependent","key","theme","schema","property","findBy","isNotPresent","conditionalKey","dependsOn","dependentPropertySchema","dependentProperty","properties","kind","_theme$snakeToCamelCa","isPresent","snakeToCamelCase","url","setCustomCSS","css","parentElementClass","wrapper","styleTag","textContent","id","appendChild","setTheme","themeConfig","forEach","attribute","overlayOpacity","Number","abs","_findBy","parentClass","filterBy","_ref2","_theme$attribute"],"mappings":";;;;;;;AAAO,IAAMA,QAAQ,GAAG,sBAAqB;AACtC,IAAMC,KAAK,GAAG,eAAe,CAAA;AAC7B,IAAMC,KAAK,GAAG,SAAS;;ACAvB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,MAAM,EAAI;AACvC,EAAA,IAAMC,KAAK,GAAG,IAAIC,KAAK,EAAE,CAAA;EACzBD,KAAK,CAACE,WAAW,GAAG,WAAW,CAAA;EAC/BF,KAAK,CAACG,GAAG,GAAGJ,MAAM,CAAA;AAElB,EAAA,OAAO,IAAIK,OAAO,CAAC,UAAAC,OAAO,EAAI;IAC5BL,KAAK,CAACM,MAAM,GAAG,YAAM;MACnBD,O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E,CAAAA,gBAAA,GAASlC,KAAK,CAAC0B,SAAS,CAAC,MAAA,IAAA,IAAAQ,gBAAA,KAAhBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,gBAAA,CAAkBpB,GAAG,EAAA,GAAA,CAAA,EAAKpB,gBAAgB,CAAC,CAAA;AAC3E,GAAC,CAAC,CAAA;AACJ;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { default as NeetoThemesBuilder } from './NeetoThemesBuilder.js';
2
- export { u as useThemeUtils } from './useThemeUtils-36f2ce5a.js';
3
- export { s as setTheme } from './index-9e15a8b1.js';
2
+ export { u as useThemeUtils } from './useThemeUtils-BCO-i9ZG.js';
3
+ export { s as setTheme } from './index-CvV1tFYS.js';
4
4
  import 'zustand/shallow';
5
5
  import 'react';
6
6
  import 'i18next';
@@ -10,34 +10,39 @@ import '@bigbinary/neetoui/Spinner';
10
10
  import '@tanstack/react-query';
11
11
  import 'axios';
12
12
  import '@babel/runtime/helpers/slicedToArray';
13
+ import 'classnames';
14
+ import '@bigbinary/neeto-icons/Collapse';
13
15
  import '@bigbinary/neetoui/Alert';
16
+ import '@bigbinary/neetoui/Button';
14
17
  import 'react-i18next';
15
18
  import '@babel/runtime/helpers/objectWithoutProperties';
16
19
  import '@babel/runtime/helpers/defineProperty';
17
20
  import '@bigbinary/neeto-icons/Close';
18
- import '@bigbinary/neetoui/Button';
19
21
  import '@bigbinary/neetoui/Popover';
20
22
  import '@bigbinary/neetoui/Typography';
23
+ import '@bigbinary/neetoui/Switch';
24
+ import '@bigbinary/neetoui/Tooltip';
21
25
  import '@bigbinary/neetoui/formik/Form';
22
26
  import 'yup';
27
+ import '@monaco-editor/react';
23
28
  import 'formik';
29
+ import '@bigbinary/neeto-icons/Down';
24
30
  import 'react/jsx-runtime';
25
- import '@babel/runtime/helpers/asyncToGenerator';
26
- import '@babel/runtime/regenerator';
27
- import '@bigbinary/neeto-image-uploader-frontend';
28
- import '@bigbinary/neeto-commons-frontend/utils';
29
- import '@bigbinary/neetoui/Toastr';
30
31
  import 'ramda';
31
- import '@bigbinary/neetoui/Select';
32
+ import '@bigbinary/neeto-commons-frontend/utils';
32
33
  import '@bigbinary/neeto-icons/CenterAlign';
33
34
  import '@bigbinary/neeto-icons/LeftAlign';
34
35
  import '@bigbinary/neetoui/ColorPicker';
36
+ import '@bigbinary/neetoui/Select';
35
37
  import 'antd';
36
- import 'classnames';
37
38
  import '@bigbinary/neeto-molecules/HelpPopover';
38
- import '@bigbinary/neetoui/Switch';
39
+ import '@babel/runtime/helpers/asyncToGenerator';
40
+ import '@babel/runtime/regenerator';
41
+ import '@bigbinary/neeto-image-uploader-frontend/ImageUploader';
42
+ import '@bigbinary/neetoui/Toastr';
39
43
  import '@bigbinary/neetoui/formik/Input';
40
44
  import '@bigbinary/neeto-molecules/Search';
45
+ import '@bigbinary/neeto-icons/Rating';
41
46
  import '@bigbinary/neeto-molecules/MoreDropdown';
42
47
  import '@bigbinary/neeto-icons/LeftArrow';
43
48
  import '@bigbinary/neeto-icons/Plus';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,14 +3,16 @@ import { useEffect } from 'react';
3
3
  import { prop } from 'ramda';
4
4
  import { withImmutableActions } from '@bigbinary/neeto-commons-frontend/react-utils';
5
5
  import { create } from 'zustand';
6
- import { B as BASE_URL, b as setVariable, s as setTheme } from './index-9e15a8b1.js';
6
+ import { B as BASE_URL, a as setVariable, s as setTheme } from './index-CvV1tFYS.js';
7
7
  import { useQuery } from '@tanstack/react-query';
8
8
  import axios from 'axios';
9
9
 
10
10
  var QUERY_KEYS = {
11
11
  THEMES_LIST: "themes-list",
12
12
  THEME_DETAILS: "theme-details",
13
- SCHEMA_DETAILS: "schema-details"
13
+ SCHEMA_DETAILS: "schema-details",
14
+ THEME_ENTITY_DETAILS: "theme-entity-details",
15
+ GLOBAL_THEME_DETAILS: "global-theme-details"
14
16
  };
15
17
 
16
18
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
@@ -99,4 +101,4 @@ var useThemeUtils = function useThemeUtils() {
99
101
  };
100
102
 
101
103
  export { QUERY_KEYS as Q, useConfigStore as a, useThemeStore as b, useThemeUtils as u };
102
- //# sourceMappingURL=useThemeUtils-36f2ce5a.js.map
104
+ //# sourceMappingURL=useThemeUtils-BCO-i9ZG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemeUtils-BCO-i9ZG.js","sources":["../app/javascript/src/constants/query.js","../app/javascript/src/stores/useConfigStore.js","../app/javascript/src/stores/useThemeStore.js","../app/javascript/src/apis/schemas.js","../app/javascript/src/hooks/reactQuery/useSchemasApi.js","../app/javascript/src/hooks/useThemeUtils.js"],"sourcesContent":["export const QUERY_KEYS = {\n THEMES_LIST: \"themes-list\",\n THEME_DETAILS: \"theme-details\",\n SCHEMA_DETAILS: \"schema-details\",\n THEME_ENTITY_DETAILS: \"theme-entity-details\",\n GLOBAL_THEME_DETAILS: \"global-theme-details\",\n};\n","import { withImmutableActions } from \"neetocommons/react-utils\";\nimport { create } from \"zustand\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useConfigStore = create(\n withImmutableActions(set => ({\n themePropertiesSchema: [],\n entityType: \"\",\n entityId: \"\",\n variableNamesMap: {},\n defaultThemeName: \"Plain blue\",\n isFetchingSchema: true,\n isTemplateThemesEnabled: false,\n\n setConfigState: set,\n }))\n);\n\nexport default useConfigStore;\n","import { withImmutableActions } from \"neetocommons/react-utils\";\nimport { create } from \"zustand\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useThemeStore = create(\n withImmutableActions(set => ({\n currentTheme: {},\n isCurrentThemeLoading: true,\n previewingTheme: {},\n\n setThemeState: set,\n }))\n);\n\nexport default useThemeStore;\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = () => axios.get(`${BASE_URL}/api/v1/schema`);\n\nconst schemasApi = { list };\n\nexport default schemasApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport schemasApi from \"apis/schemas\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useListSchema = () =>\n useQuery({\n queryKey: [QUERY_KEYS.SCHEMA_DETAILS],\n queryFn: schemasApi.list,\n });\n","import { useEffect } from \"react\";\n\nimport { prop } from \"ramda\";\n\nimport useConfigStore from \"src/stores/useConfigStore\";\nimport useThemeStore from \"src/stores/useThemeStore\";\nimport {\n setTheme as setThemeUtil,\n setVariable as setVariableUtil,\n} from \"utils\";\n\nimport { useListSchema } from \"./reactQuery/useSchemasApi\";\n\nconst useThemeUtils = () => {\n const setConfigState = useConfigStore(prop(\"setConfigState\"));\n const { previewingTheme, currentTheme } = useThemeStore.pick();\n\n const { isLoading: isFetchingSchema, data } = useListSchema();\n\n const { schema: themePropertiesSchema = [], variableNamesMap = {} } =\n data || {};\n\n useEffect(() => {\n if (data) {\n setConfigState({\n themePropertiesSchema: data?.schema,\n variableNamesMap: data?.variableNamesMap,\n defaultThemeName: data?.defaultThemeName,\n });\n }\n }, [data]);\n\n useEffect(() => setConfigState({ isFetchingSchema }), [isFetchingSchema]);\n\n const setVariable = (name, value) =>\n setVariableUtil(name, value, variableNamesMap);\n\n const setTheme = theme =>\n setThemeUtil(theme, variableNamesMap, themePropertiesSchema);\n\n return {\n setTheme,\n setVariable,\n previewingTheme,\n currentTheme,\n isFetchingSchema,\n };\n};\n\nexport default useThemeUtils;\n"],"names":["QUERY_KEYS","THEMES_LIST","THEME_DETAILS","SCHEMA_DETAILS","THEME_ENTITY_DETAILS","GLOBAL_THEME_DETAILS","useConfigStore","create","withImmutableActions","set","themePropertiesSchema","entityType","entityId","variableNamesMap","defaultThemeName","isFetchingSchema","isTemplateThemesEnabled","setConfigState","useThemeStore","currentTheme","isCurrentThemeLoading","previewingTheme","setThemeState","list","axios","get","concat","BASE_URL","schemasApi","useListSchema","useQuery","queryKey","queryFn","useThemeUtils","prop","_useThemeStore","store","shallow","_useListSchema","isLoading","data","_ref","_ref$schema","schema","_ref$variableNamesMap","useEffect","setVariable","name","value","setVariableUtil","setTheme","theme","setThemeUtil"],"mappings":";;;;;;;;;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,oBAAoB,EAAE,sBAAA;AACxB;;ACHA;AACA,IAAMC,cAAc,GAAGC,MAAM,CAC3BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC3BC,IAAAA,qBAAqB,EAAE,EAAE;AACzBC,IAAAA,UAAU,EAAE,EAAE;AACdC,IAAAA,QAAQ,EAAE,EAAE;IACZC,gBAAgB,EAAE,EAAE;AACpBC,IAAAA,gBAAgB,EAAE,YAAY;AAC9BC,IAAAA,gBAAgB,EAAE,IAAI;AACtBC,IAAAA,uBAAuB,EAAE,KAAK;AAE9BC,IAAAA,cAAc,EAAER,GAAAA;GACjB,CAAA;AAAA,CAAC,CACJ;;ACbA;AACA,IAAMS,aAAa,GAAGX,MAAM,CAC1BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;IAC3BU,YAAY,EAAE,EAAE;AAChBC,IAAAA,qBAAqB,EAAE,IAAI;IAC3BC,eAAe,EAAE,EAAE;AAEnBC,IAAAA,aAAa,EAAEb,GAAAA;GAChB,CAAA;AAAA,CAAC,CACJ;;ACRA,IAAMc,IAAI,GAAG,SAAPA,IAAIA,GAAA;EAAA,OAASC,KAAK,CAACC,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ACXzB,IAAAA,eAAe,EAAfA,eAAe;AACfF,IAAAA,YAAY,EAAZA,YAAY;AACZJ,IAAAA,gBAAgB,EAAhBA,gBAAAA;GACD,CAAA;AACH;;;;"}
@@ -5,18 +5,16 @@ var react = require('react');
5
5
  var ramda = require('ramda');
6
6
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
7
7
  var zustand = require('zustand');
8
- var utils = require('./index-2666fca8.js');
8
+ var utils = require('./index-D6l2IgrM.js');
9
9
  var reactQuery = require('@tanstack/react-query');
10
10
  var axios = require('axios');
11
11
 
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
15
-
16
12
  var QUERY_KEYS = {
17
13
  THEMES_LIST: "themes-list",
18
14
  THEME_DETAILS: "theme-details",
19
- SCHEMA_DETAILS: "schema-details"
15
+ SCHEMA_DETAILS: "schema-details",
16
+ THEME_ENTITY_DETAILS: "theme-entity-details",
17
+ GLOBAL_THEME_DETAILS: "global-theme-details"
20
18
  };
21
19
 
22
20
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
@@ -44,7 +42,7 @@ var useThemeStore = zustand.create(reactUtils.withImmutableActions(function (set
44
42
  }));
45
43
 
46
44
  var list = function list() {
47
- return axios__default["default"].get("".concat(utils.BASE_URL, "/api/v1/schema"));
45
+ return axios.get("".concat(utils.BASE_URL, "/api/v1/schema"));
48
46
  };
49
47
  var schemasApi = {
50
48
  list: list
@@ -108,4 +106,4 @@ exports.QUERY_KEYS = QUERY_KEYS;
108
106
  exports.useConfigStore = useConfigStore;
109
107
  exports.useThemeStore = useThemeStore;
110
108
  exports.useThemeUtils = useThemeUtils;
111
- //# sourceMappingURL=useThemeUtils-38895e4a.js.map
109
+ //# sourceMappingURL=useThemeUtils-P5tn1h2B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemeUtils-P5tn1h2B.js","sources":["../app/javascript/src/constants/query.js","../app/javascript/src/stores/useConfigStore.js","../app/javascript/src/stores/useThemeStore.js","../app/javascript/src/apis/schemas.js","../app/javascript/src/hooks/reactQuery/useSchemasApi.js","../app/javascript/src/hooks/useThemeUtils.js"],"sourcesContent":["export const QUERY_KEYS = {\n THEMES_LIST: \"themes-list\",\n THEME_DETAILS: \"theme-details\",\n SCHEMA_DETAILS: \"schema-details\",\n THEME_ENTITY_DETAILS: \"theme-entity-details\",\n GLOBAL_THEME_DETAILS: \"global-theme-details\",\n};\n","import { withImmutableActions } from \"neetocommons/react-utils\";\nimport { create } from \"zustand\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useConfigStore = create(\n withImmutableActions(set => ({\n themePropertiesSchema: [],\n entityType: \"\",\n entityId: \"\",\n variableNamesMap: {},\n defaultThemeName: \"Plain blue\",\n isFetchingSchema: true,\n isTemplateThemesEnabled: false,\n\n setConfigState: set,\n }))\n);\n\nexport default useConfigStore;\n","import { withImmutableActions } from \"neetocommons/react-utils\";\nimport { create } from \"zustand\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useThemeStore = create(\n withImmutableActions(set => ({\n currentTheme: {},\n isCurrentThemeLoading: true,\n previewingTheme: {},\n\n setThemeState: set,\n }))\n);\n\nexport default useThemeStore;\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = () => axios.get(`${BASE_URL}/api/v1/schema`);\n\nconst schemasApi = { list };\n\nexport default schemasApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport schemasApi from \"apis/schemas\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useListSchema = () =>\n useQuery({\n queryKey: [QUERY_KEYS.SCHEMA_DETAILS],\n queryFn: schemasApi.list,\n });\n","import { useEffect } from \"react\";\n\nimport { prop } from \"ramda\";\n\nimport useConfigStore from \"src/stores/useConfigStore\";\nimport useThemeStore from \"src/stores/useThemeStore\";\nimport {\n setTheme as setThemeUtil,\n setVariable as setVariableUtil,\n} from \"utils\";\n\nimport { useListSchema } from \"./reactQuery/useSchemasApi\";\n\nconst useThemeUtils = () => {\n const setConfigState = useConfigStore(prop(\"setConfigState\"));\n const { previewingTheme, currentTheme } = useThemeStore.pick();\n\n const { isLoading: isFetchingSchema, data } = useListSchema();\n\n const { schema: themePropertiesSchema = [], variableNamesMap = {} } =\n data || {};\n\n useEffect(() => {\n if (data) {\n setConfigState({\n themePropertiesSchema: data?.schema,\n variableNamesMap: data?.variableNamesMap,\n defaultThemeName: data?.defaultThemeName,\n });\n }\n }, [data]);\n\n useEffect(() => setConfigState({ isFetchingSchema }), [isFetchingSchema]);\n\n const setVariable = (name, value) =>\n setVariableUtil(name, value, variableNamesMap);\n\n const setTheme = theme =>\n setThemeUtil(theme, variableNamesMap, themePropertiesSchema);\n\n return {\n setTheme,\n setVariable,\n previewingTheme,\n currentTheme,\n isFetchingSchema,\n };\n};\n\nexport default useThemeUtils;\n"],"names":["QUERY_KEYS","THEMES_LIST","THEME_DETAILS","SCHEMA_DETAILS","THEME_ENTITY_DETAILS","GLOBAL_THEME_DETAILS","useConfigStore","create","withImmutableActions","set","themePropertiesSchema","entityType","entityId","variableNamesMap","defaultThemeName","isFetchingSchema","isTemplateThemesEnabled","setConfigState","useThemeStore","currentTheme","isCurrentThemeLoading","previewingTheme","setThemeState","list","axios","get","concat","BASE_URL","schemasApi","useListSchema","useQuery","queryKey","queryFn","useThemeUtils","prop","_useThemeStore","store","shallow","_useListSchema","isLoading","data","_ref","_ref$schema","schema","_ref$variableNamesMap","useEffect","setVariable","name","value","setVariableUtil","setTheme","theme","setThemeUtil"],"mappings":";;;;;;;;;;;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,cAAc,EAAE,gBAAgB;AAChCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,oBAAoB,EAAE,sB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AAJA,IAAI,CAAE1B,gBAAAA;AAC1B,OAAC,CAAC,CAAA;AACJ,KAAA;AACF,GAAC,EAAE,CAAC0B,IAAI,CAAC,CAAC,CAAA;AAEVK,EAAAA,eAAS,CAAC,YAAA;AAAA,IAAA,OAAM5B,cAAc,CAAC;AAAEF,MAAAA,gBAAgB,EAAhBA,gBAAAA;AAAiB,KAAC,CAAC,CAAA;GAAE,EAAA,CAACA,gBAAgB,CAAC,CAAC,CAAA;AAEzE,EAAA,IAAM+B,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAAI,EAAEC,KAAK,EAAA;AAAA,IAAA,OAC9BC,iBAAe,CAACF,IAAI,EAAEC,KAAK,EAAEnC,gBAAgB,CAAC,CAAA;AAAA,GAAA,CAAA;AAEhD,EAAA,IAAMqC,QAAQ,GAAG,SAAXA,QAAQA,CAAGC,KAAK,EAAA;AAAA,IAAA,OACpBC,cAAY,CAACD,KAAK,EAAEtC,gBAAgB,EAAEH,qBAAqB,CAAC,CAAA;AAAA,GAAA,CAAA;EAE9D,OAAO;AACLwC,IAAAA,QAAQ,EAARA,QAAQ;AACRJ,IAAAA,WAAW,EAAXA,WAAW;AACXzB,IAAAA,eAAe,EAAfA,eAAe;AACfF,IAAAA,YAAY,EAAZA,YAAY;AACZJ,IAAAA,gBAAgB,EAAhBA,gBAAAA;GACD,CAAA;AACH;;;;;;;"}
package/dist/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@bigbinary/neeto-cist';
2
- export { c as isPropertyIndependent, s as setTheme, b as setVariable } from './index-9e15a8b1.js';
2
+ export { d as isPropertyIndependent, c as setCustomCSS, s as setTheme, a as setVariable } from './index-CvV1tFYS.js';
3
3
  import '@babel/runtime/helpers/asyncToGenerator';
4
4
  import '@babel/runtime/regenerator';
5
5
  import '@bigbinary/neetoui/Toastr';