@bigbinary/neeto-image-uploader-frontend 2.3.18 → 2.3.20

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  # neeto-image-uploader-nano
2
- The `neeto-image-uploader-nano` manages assets across neeto products. The nano exports the `@bigbinary/neeto-image-uploader-frontend` NPM package and `neeto-image-uploader-engine` Rails engine for development.
2
+ The `neeto-image-uploader-nano` manages assets across neeto products. The nano exports the `@bigbinary/neeto-image-uploader-frontend` NPM package and `neeto-image-uploader-engine` Rails engine for development.
3
3
 
4
4
  # Contents
5
5
  - [neeto-image-uploader-nano](#neeto-image-uploader-nano)
@@ -38,7 +38,7 @@ The engine is used to manage assets across neeto products.
38
38
  ```zsh
39
39
  bundle install
40
40
  ```
41
- 3. Add this line to your application's `config/routes.rb` file:
41
+ 3. Add this line to your application's `config/routes.rb` file:
42
42
  ```ruby
43
43
  mount NeetoImageUploaderEngine::Engine => "/neeto_image_uploader_engine"
44
44
  ```
@@ -165,6 +165,61 @@ const App = () => {
165
165
  export default App;
166
166
  ```
167
167
 
168
+ #### 4. `ImageForm` ([source code](https://github.com/bigbinary/neeto-image-uploader-nano/blob/main/app/javascript/src/components/ImageForm/index.jsx))
169
+
170
+ **Props**
171
+ - `onChange`: Callback function triggered when any form field changes.
172
+ - `imageUploaderProps`: Additional props to be passed to the ImageUpload component.
173
+ - `className`: Additional classes to be applied to the component.
174
+ - `names`: Object specifying field names for form integration:
175
+ - `image`: Name of the image field in the form (e.g., "properties.imageUrl")
176
+ - `height`: Name of the height field in the form (e.g., "height")
177
+ - `alignment`: Name of the alignment field in the form (e.g., "alignment")
178
+ - `logoHeight`: Object specifying height constraints for the logo slider:
179
+ - `default`: Default height value for the slider (default: 64)
180
+ - `min`: Minimum height value for the slider (default: 64)
181
+ - `max`: Maximum height value for the slider (default: 100)
182
+ - `logoSizeVariableName`: CSS variable name for controlling logo size (required)
183
+
184
+ **Usage**
185
+ ```jsx
186
+ import { Formik } from "formik";
187
+ import { ImageForm } from "@bigbinary/neeto-image-uploader-frontend";
188
+
189
+ const App = () => {
190
+ const handleUpdate = (fieldName, value) => {
191
+ console.log(`Field ${fieldName} changed to:`, value);
192
+ };
193
+
194
+ return (
195
+ <Formik
196
+ initialValues={{
197
+ properties: {
198
+ imageUrl: "",
199
+ height: 64,
200
+ alignment: "left"
201
+ },
202
+ altText: ""
203
+ }}
204
+ >
205
+ <ImageForm
206
+ className="logo-form"
207
+ imageUploaderProps={{ maxSize: 1048576 }}
208
+ names={{
209
+ image: "properties.imageUrl",
210
+ height: "height",
211
+ alignment: "alignment",
212
+ }}
213
+ logoSizeVariableName="--my-app-logo-size"
214
+ onChange={handleUpdate}
215
+ />
216
+ </Formik>
217
+ );
218
+ };
219
+
220
+ export default App;
221
+ ```
222
+
168
223
  ### Hooks
169
224
  #### 1. `useImageUpload` ([source code](https://github.com/bigbinary/neeto-image-uploader-nano/blob/0c060e75a32bc04308491a50b96c3b7d4d6f7c83/app/javascript/src/hooks/useImageUpload.js))
170
225
 
@@ -23,7 +23,14 @@
23
23
  "uploadFromLink": "Upload from link",
24
24
  "width": "Width",
25
25
  "imageQuality": "Image quality",
26
- "searchTheWeb": "Search the web"
26
+ "searchTheWeb": "Search the web",
27
+ "addImage": "Add image",
28
+ "logoSize": "Logo size",
29
+ "alignment": "Alignment",
30
+ "logoAltText": "Logo alt text",
31
+ "leftAlign": "Left align",
32
+ "centerAlign": "Center align",
33
+ "rightAlign": "Right align"
27
34
  },
28
35
  "placeholders": {
29
36
  "searchImage": "Search by name",
@@ -64,6 +71,9 @@
64
71
  "delete": "Delete",
65
72
  "title": "Delete image permanently?",
66
73
  "message": "Deleting this image will permanently remove it from all your workspaces. This action cannot be undone and will result in data loss wherever the image is being used."
74
+ },
75
+ "tooltips": {
76
+ "logoAltText": "Add alternative text for the logo."
67
77
  }
68
78
  }
69
79
  }
@@ -11,7 +11,7 @@ import '@bigbinary/neetoui/Typography';
11
11
  import 'ramda';
12
12
  import 'react-i18next';
13
13
  import './utils-Bb1hqKhN.js';
14
- export { M as default } from './index-BWdSmwr2.js';
14
+ export { M as default } from './index-DQC5j8GS.js';
15
15
  import './useImageUploader-BfrsCPBL.js';
16
16
  import './index-B1JijZPf.js';
17
17
  import 'react/jsx-runtime';
@@ -13,7 +13,7 @@ import { mergeRight } from 'ramda';
13
13
  import { useTranslation } from 'react-i18next';
14
14
  import { D as DEFAULT_UPLOAD_CONFIG, O as OPTION_KEYS, i as isNotNilOrEmpty, I as IMAGE_WRAPPER_CLASSNAME, a as ImageDirectUpload } from './utils-Bb1hqKhN.js';
15
15
  import { I as ImageWithFallback } from './ImageWithFallback-Csv6Oivd.js';
16
- import { M as Modal, c as constructCloudflareImageURL } from './index-BWdSmwr2.js';
16
+ import { M as Modal, c as constructCloudflareImageURL } from './index-DQC5j8GS.js';
17
17
  import { a as useCreateBlob, u as useImageUploader, g as generateASCIIFileName } from './useImageUploader-BfrsCPBL.js';
18
18
  import { C as CLOUD_FLARE, I as IS_DEVELOPMENT_OR_HEROKU_ENV } from './index-B1JijZPf.js';
19
19
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -13,7 +13,7 @@ require('@bigbinary/neetoui/Typography');
13
13
  require('ramda');
14
14
  require('react-i18next');
15
15
  require('../utils-BoO2mwcq.js');
16
- var AssetLibrary = require('../index-74vOALRs.js');
16
+ var AssetLibrary = require('../index-DspO4oaA.js');
17
17
  require('../useImageUploader-YWyed_UV.js');
18
18
  require('../index-CmR3zLng.js');
19
19
  require('react/jsx-runtime');
@@ -15,7 +15,7 @@ var ramda = require('ramda');
15
15
  var reactI18next = require('react-i18next');
16
16
  var utils = require('../utils-BoO2mwcq.js');
17
17
  var ImageWithFallback = require('../ImageWithFallback-DzT_N2Su.js');
18
- var AssetLibrary = require('../index-74vOALRs.js');
18
+ var AssetLibrary = require('../index-DspO4oaA.js');
19
19
  var useImageUploader = require('../useImageUploader-YWyed_UV.js');
20
20
  var index = require('../index-CmR3zLng.js');
21
21
  var jsxRuntime = require('react/jsx-runtime');
package/dist/cjs/index.js CHANGED
@@ -1,30 +1,37 @@
1
1
  'use strict';
2
2
 
3
3
  var BasicImageUploader = require('./BasicImageUploader.js');
4
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
+ var formik = require('formik');
6
+ var ramda = require('ramda');
7
+ var reactI18next = require('react-i18next');
8
+ var neetoCist = require('@bigbinary/neeto-cist');
9
+ var Input = require('@bigbinary/neetoui/formik/Input');
10
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
11
+ var Button = require('@bigbinary/neetoui/Button');
12
+ var Typography = require('@bigbinary/neetoui/Typography');
13
+ var i18next = require('i18next');
14
+ var LeftAlign = require('@bigbinary/neeto-icons/LeftAlign');
15
+ var CenterAlign = require('@bigbinary/neeto-icons/CenterAlign');
16
+ var RightAlign = require('@bigbinary/neeto-icons/RightAlign');
17
+ var jsxRuntime = require('react/jsx-runtime');
18
+ var g = require('react');
19
+ var classnames = require('classnames');
20
+ var Spinner = require('@bigbinary/neetoui/Spinner');
4
21
  var ImageUploader = require('./ImageUploader.js');
5
- var AssetLibrary = require('../index-74vOALRs.js');
22
+ var Slider = require('@bigbinary/neetoui/Slider');
23
+ var AssetLibrary = require('../index-DspO4oaA.js');
6
24
  var useProfileImageUpload = require('../useProfileImageUpload-B3zr0KBe.js');
7
25
  var useImageUploader = require('../useImageUploader-YWyed_UV.js');
8
26
  var utils = require('./utils.js');
9
- require('@babel/runtime/helpers/defineProperty');
10
27
  require('@babel/runtime/helpers/objectWithoutProperties');
11
- require('classnames');
12
- require('@bigbinary/neeto-cist');
13
28
  require('@bigbinary/neeto-icons/Delete');
14
- require('@bigbinary/neetoui/Button');
15
29
  require('../utils-BoO2mwcq.js');
16
- require('@bigbinary/neetoui/Typography');
17
30
  require('@bigbinary/neetoui/ProgressBar');
18
- require('ramda');
19
- require('react-i18next');
20
31
  require('@bigbinary/neeto-commons-frontend/initializers');
21
- require('@babel/runtime/helpers/slicedToArray');
22
- require('react');
23
32
  require('react-dropzone');
24
- require('i18next');
25
33
  require('@bigbinary/neetoui/Toastr');
26
34
  require('../index-CmR3zLng.js');
27
- require('react/jsx-runtime');
28
35
  require('../ImageWithFallback-DzT_N2Su.js');
29
36
  require('@babel/runtime/helpers/asyncToGenerator');
30
37
  require('@babel/runtime/regenerator');
@@ -32,7 +39,6 @@ require('@bigbinary/neeto-icons/MenuHorizontal');
32
39
  require('@bigbinary/neetoui/Dropdown');
33
40
  require('@bigbinary/neetoui/Modal');
34
41
  require('@bigbinary/neetoui/Tab');
35
- require('@bigbinary/neetoui/Spinner');
36
42
  require('@bigbinary/neeto-icons/LeftArrow');
37
43
  require('@tanstack/react-query');
38
44
  require('axios');
@@ -46,7 +52,238 @@ require('@bigbinary/neeto-team-members-frontend/constants');
46
52
  require('@bigbinary/neetoui/Alert');
47
53
  require('@rails/activestorage');
48
54
 
55
+ var ALIGNMENTS = [{
56
+ label: i18next.t("neetoImageUploader.labels.leftAlign"),
57
+ value: "left",
58
+ icon: LeftAlign,
59
+ dataCy: "left-alignment"
60
+ }, {
61
+ label: i18next.t("neetoImageUploader.labels.centerAlign"),
62
+ value: "center",
63
+ icon: CenterAlign,
64
+ dataCy: "center-alignment"
65
+ }, {
66
+ label: i18next.t("neetoImageUploader.labels.rightAlign"),
67
+ value: "right",
68
+ icon: RightAlign,
69
+ dataCy: "right-alignment"
70
+ }];
71
+ var MINIMUM_LOGO_HEIGHT = 64;
72
+ var MAXIMUM_LOGO_HEIGHT = 100;
73
+ var DEFAULT_LOGO_HEIGHT = 64;
74
+ var DEFAULT_LOGO_POSITION = "left";
75
+ var ONE_MEGABYTE = 1;
49
76
 
77
+ var AlignmentBlock = function AlignmentBlock(_ref) {
78
+ var name = _ref.name,
79
+ title = _ref.title,
80
+ _ref$onChange = _ref.onChange,
81
+ onChange = _ref$onChange === void 0 ? neetoCist.noop : _ref$onChange;
82
+ var _useField = formik.useField(name),
83
+ _useField2 = _slicedToArray(_useField, 3);
84
+ _useField2[0];
85
+ var _useField2$1$value = _useField2[1].value,
86
+ alignment = _useField2$1$value === void 0 ? DEFAULT_LOGO_POSITION : _useField2$1$value,
87
+ setValue = _useField2[2].setValue;
88
+ var handleChange = function handleChange(newAlignment) {
89
+ if (alignment === newAlignment) return;
90
+ setValue(newAlignment, false);
91
+ onChange(name, newAlignment);
92
+ };
93
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
94
+ dataCy: "".concat(neetoCist.hyphenate(title), "-block"),
95
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
96
+ lineHeight: "normal",
97
+ style: "body2",
98
+ weight: "medium",
99
+ children: title
100
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
101
+ className: "mt-2 flex items-center gap-3",
102
+ children: ALIGNMENTS.map(function (_ref2) {
103
+ var label = _ref2.label,
104
+ value = _ref2.value,
105
+ icon = _ref2.icon,
106
+ dataCy = _ref2.dataCy;
107
+ return /*#__PURE__*/g.createElement(Button, {
108
+ icon: icon,
109
+ "data-cy": dataCy,
110
+ key: value,
111
+ size: "large",
112
+ style: alignment === value ? "primary" : "text",
113
+ tooltipProps: {
114
+ content: label,
115
+ position: "bottom"
116
+ },
117
+ onClick: function onClick() {
118
+ return handleChange(value);
119
+ }
120
+ });
121
+ })
122
+ })]
123
+ });
124
+ };
125
+
126
+ var Block = function Block(_ref) {
127
+ var title = _ref.title,
128
+ children = _ref.children,
129
+ dataCy = _ref.dataCy,
130
+ _ref$className = _ref.className,
131
+ className = _ref$className === void 0 ? "" : _ref$className,
132
+ _ref$childrenClassNam = _ref.childrenClassName,
133
+ childrenClassName = _ref$childrenClassNam === void 0 ? "" : _ref$childrenClassNam,
134
+ _ref$isLoading = _ref.isLoading,
135
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
136
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
137
+ className: classnames("space-y-4", className),
138
+ "data-cy": dataCy,
139
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
140
+ className: "flex items-center justify-between",
141
+ "data-cy": "properties-header",
142
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
143
+ lineHeight: "normal",
144
+ style: "body1",
145
+ weight: "semibold",
146
+ children: title
147
+ }), isLoading && /*#__PURE__*/jsxRuntime.jsx(Spinner, {})]
148
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
149
+ className: classnames("space-y-4", childrenClassName),
150
+ children: children
151
+ })]
152
+ });
153
+ };
154
+
155
+ var ImageUpload = function ImageUpload(_ref) {
156
+ var name = _ref.name,
157
+ handleUpdate = _ref.handleUpdate,
158
+ _ref$maxSize = _ref.maxSize,
159
+ maxSize = _ref$maxSize === void 0 ? ONE_MEGABYTE : _ref$maxSize;
160
+ var _useTranslation = reactI18next.useTranslation(),
161
+ t = _useTranslation.t;
162
+ var _useField = formik.useField(name),
163
+ _useField2 = _slicedToArray(_useField, 3);
164
+ _useField2[0];
165
+ var image = _useField2[1].value,
166
+ setValue = _useField2[2].setValue;
167
+ var handleImageChange = function handleImageChange(changedImage) {
168
+ if (ramda.isEmpty(changedImage === null || changedImage === void 0 ? void 0 : changedImage.url)) {
169
+ setValue(null, false);
170
+ handleUpdate(null);
171
+ return;
172
+ }
173
+ setValue(changedImage, false);
174
+ handleUpdate(changedImage);
175
+ };
176
+ return /*#__PURE__*/jsxRuntime.jsx(Block, {
177
+ dataCy: "add-image-card",
178
+ title: t("neetoImageUploader.labels.addImage"),
179
+ children: /*#__PURE__*/jsxRuntime.jsx(ImageUploader, {
180
+ className: "w-full",
181
+ src: image === null || image === void 0 ? void 0 : image.url,
182
+ uploadConfig: {
183
+ maxImageSize: maxSize
184
+ },
185
+ onUploadComplete: handleImageChange
186
+ }, image === null || image === void 0 ? void 0 : image.url)
187
+ });
188
+ };
189
+
190
+ var SliderBlock = function SliderBlock(_ref) {
191
+ var title = _ref.title,
192
+ name = _ref.name,
193
+ _ref$onChange = _ref.onChange,
194
+ onChange = _ref$onChange === void 0 ? neetoCist.noop : _ref$onChange,
195
+ defaultValue = _ref.defaultValue,
196
+ min = _ref.min,
197
+ max = _ref.max;
198
+ var _useField = formik.useField(name),
199
+ _useField2 = _slicedToArray(_useField, 3);
200
+ _useField2[0];
201
+ var value = _useField2[1].value,
202
+ setValue = _useField2[2].setValue;
203
+ var handleChange = function handleChange(newValue) {
204
+ if (value === newValue) return;
205
+ setValue(newValue, false);
206
+ onChange(newValue);
207
+ };
208
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
209
+ "data-cy": "".concat(neetoCist.hyphenate(title), "-slider-block"),
210
+ children: /*#__PURE__*/jsxRuntime.jsx(Slider, {
211
+ defaultValue: defaultValue,
212
+ max: max,
213
+ min: min,
214
+ value: value,
215
+ label: title,
216
+ onChange: handleChange
217
+ })
218
+ });
219
+ };
220
+
221
+ var root = document.querySelector(":root");
222
+ var setLogoHeight = function setLogoHeight(value, variableName) {
223
+ return root.style.setProperty(variableName, "".concat(Number(value) || DEFAULT_LOGO_HEIGHT, "px"));
224
+ };
225
+
226
+ function ownKeys(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; }
227
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
228
+ var ImageForm = function ImageForm(_ref) {
229
+ var _ref$onChange = _ref.onChange,
230
+ onChange = _ref$onChange === void 0 ? neetoCist.noop : _ref$onChange,
231
+ _ref$imageUploaderPro = _ref.imageUploaderProps,
232
+ imageUploaderProps = _ref$imageUploaderPro === void 0 ? {} : _ref$imageUploaderPro,
233
+ _ref$className = _ref.className,
234
+ className = _ref$className === void 0 ? "" : _ref$className,
235
+ _ref$names = _ref.names,
236
+ names = _ref$names === void 0 ? {} : _ref$names,
237
+ _ref$logoHeight = _ref.logoHeight,
238
+ logoHeight = _ref$logoHeight === void 0 ? {
239
+ "default": DEFAULT_LOGO_HEIGHT,
240
+ min: MINIMUM_LOGO_HEIGHT,
241
+ max: MAXIMUM_LOGO_HEIGHT
242
+ } : _ref$logoHeight,
243
+ logoSizeVariableName = _ref.logoSizeVariableName;
244
+ var _useFormikContext = formik.useFormikContext(),
245
+ values = _useFormikContext.values,
246
+ setFieldValue = _useFormikContext.setFieldValue;
247
+ var _useTranslation = reactI18next.useTranslation(),
248
+ t = _useTranslation.t;
249
+ var imageValue = formik.getIn(values, names.image);
250
+ var handleImageChange = function handleImageChange(image) {
251
+ if (ramda.isNil(image)) {
252
+ setLogoHeight(logoHeight["default"], logoSizeVariableName);
253
+ setFieldValue(names.height, logoHeight["default"]);
254
+ }
255
+ onChange === null || onChange === void 0 || onChange(names.image, image);
256
+ };
257
+ var handleSliderChange = function handleSliderChange(value) {
258
+ setLogoHeight(value, logoSizeVariableName);
259
+ onChange === null || onChange === void 0 || onChange(names.height, value);
260
+ };
261
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
262
+ className: "space-y-4 ".concat(className),
263
+ children: [/*#__PURE__*/jsxRuntime.jsx(ImageUpload, _objectSpread({
264
+ handleUpdate: handleImageChange,
265
+ name: names.image
266
+ }, imageUploaderProps)), imageValue && /*#__PURE__*/jsxRuntime.jsxs("div", {
267
+ className: "space-y-4 px-2",
268
+ children: [/*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
269
+ defaultValue: logoHeight["default"],
270
+ max: logoHeight.max,
271
+ min: logoHeight.min,
272
+ name: names.height,
273
+ title: t("neetoImageUploader.labels.logoSize"),
274
+ onChange: handleSliderChange
275
+ }), /*#__PURE__*/jsxRuntime.jsx(AlignmentBlock, {
276
+ name: names.alignment,
277
+ title: t("neetoImageUploader.labels.alignment"),
278
+ onChange: onChange
279
+ }), /*#__PURE__*/jsxRuntime.jsx(Input, {
280
+ name: "altText",
281
+ helpText: t("neetoImageUploader.tooltips.logoAltText"),
282
+ placeholder: t("neetoImageUploader.labels.logoAltText")
283
+ })]
284
+ })]
285
+ });
286
+ };
50
287
 
51
288
  exports.BasicImageUploader = BasicImageUploader;
52
289
  exports.ImageUploader = ImageUploader;
@@ -55,4 +292,5 @@ exports.useImageUpload = useProfileImageUpload.useImageUpload;
55
292
  exports.useProfileImageUpload = useProfileImageUpload.useProfileImageUpload;
56
293
  exports.useImageUploader = useImageUploader.useImageUploader;
57
294
  exports.refetchImageLibraryAssetList = utils.refetchImageLibraryAssetList;
295
+ exports.ImageForm = ImageForm;
58
296
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../app/javascript/src/components/ImageForm/constants.js","../../app/javascript/src/components/ImageForm/AlignmentBlock.jsx","../../app/javascript/src/components/ImageForm/Block.jsx","../../app/javascript/src/components/ImageForm/ImageUpload.jsx","../../app/javascript/src/components/ImageForm/SliderBlock.jsx","../../app/javascript/src/components/ImageForm/utils.js","../../app/javascript/src/components/ImageForm/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport { LeftAlign, CenterAlign, RightAlign } from \"neetoicons\";\n\nexport const ALIGNMENTS = [\n {\n label: t(\"neetoImageUploader.labels.leftAlign\"),\n value: \"left\",\n icon: LeftAlign,\n dataCy: \"left-alignment\",\n },\n {\n label: t(\"neetoImageUploader.labels.centerAlign\"),\n value: \"center\",\n icon: CenterAlign,\n dataCy: \"center-alignment\",\n },\n {\n label: t(\"neetoImageUploader.labels.rightAlign\"),\n value: \"right\",\n icon: RightAlign,\n dataCy: \"right-alignment\",\n },\n];\n\nexport const MINIMUM_LOGO_HEIGHT = 64;\nexport const MAXIMUM_LOGO_HEIGHT = 100;\nexport const DEFAULT_LOGO_HEIGHT = 64;\nexport const DEFAULT_LOGO_POSITION = \"left\";\nexport const ONE_MEGABYTE = 1;\n","import { useField } from \"formik\";\nimport { hyphenate, noop } from \"neetocist\";\nimport { Button, Typography } from \"neetoui\";\n\nimport { ALIGNMENTS, DEFAULT_LOGO_POSITION } from \"./constants\";\n\nconst AlignmentBlock = ({ name, title, onChange = noop }) => {\n const [_, { value: alignment = DEFAULT_LOGO_POSITION }, { setValue }] =\n useField(name);\n\n const handleChange = newAlignment => {\n if (alignment === newAlignment) return;\n\n setValue(newAlignment, false);\n onChange(name, newAlignment);\n };\n\n return (\n <div dataCy={`${hyphenate(title)}-block`}>\n <Typography lineHeight=\"normal\" style=\"body2\" weight=\"medium\">\n {title}\n </Typography>\n <div className=\"mt-2 flex items-center gap-3\">\n {ALIGNMENTS.map(({ label, value, icon, dataCy }) => (\n <Button\n {...{ icon }}\n data-cy={dataCy}\n key={value}\n size=\"large\"\n style={alignment === value ? \"primary\" : \"text\"}\n tooltipProps={{ content: label, position: \"bottom\" }}\n onClick={() => handleChange(value)}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default AlignmentBlock;\n","import classnames from \"classnames\";\nimport { Spinner, Typography } from \"neetoui\";\n\nconst Block = ({\n title,\n children,\n dataCy,\n className = \"\",\n childrenClassName = \"\",\n isLoading = false,\n}) => (\n <div className={classnames(\"space-y-4\", className)} data-cy={dataCy}>\n <div\n className=\"flex items-center justify-between\"\n data-cy=\"properties-header\"\n >\n <Typography lineHeight=\"normal\" style=\"body1\" weight=\"semibold\">\n {title}\n </Typography>\n {isLoading && <Spinner />}\n </div>\n <div className={classnames(\"space-y-4\", childrenClassName)}>{children}</div>\n </div>\n);\n\nexport default Block;\n","import { useField } from \"formik\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Block from \"./Block\";\nimport { ONE_MEGABYTE } from \"./constants\";\n\nimport ImageUploader from \"../ImageUploader\";\n\nconst ImageUpload = ({ name, handleUpdate, maxSize = ONE_MEGABYTE }) => {\n const { t } = useTranslation();\n const [_, { value: image }, { setValue }] = useField(name);\n\n const handleImageChange = changedImage => {\n if (isEmpty(changedImage?.url)) {\n setValue(null, false);\n handleUpdate(null);\n\n return;\n }\n setValue(changedImage, false);\n handleUpdate(changedImage);\n };\n\n return (\n <Block\n dataCy=\"add-image-card\"\n title={t(\"neetoImageUploader.labels.addImage\")}\n >\n <ImageUploader\n className=\"w-full\"\n key={image?.url}\n src={image?.url}\n uploadConfig={{ maxImageSize: maxSize }}\n onUploadComplete={handleImageChange}\n />\n </Block>\n );\n};\n\nexport default ImageUpload;\n","import { useField } from \"formik\";\nimport { hyphenate, noop } from \"neetocist\";\nimport { Slider } from \"neetoui\";\n\nconst SliderBlock = ({\n title,\n name,\n onChange = noop,\n defaultValue,\n min,\n max,\n}) => {\n const [_, { value }, { setValue }] = useField(name);\n\n const handleChange = newValue => {\n if (value === newValue) return;\n\n setValue(newValue, false);\n onChange(newValue);\n };\n\n return (\n <div data-cy={`${hyphenate(title)}-slider-block`}>\n <Slider\n {...{ defaultValue, max, min, value }}\n label={title}\n onChange={handleChange}\n />\n </div>\n );\n};\n\nexport default SliderBlock;\n","import { DEFAULT_LOGO_HEIGHT } from \"./constants\";\n\nconst root = document.querySelector(\":root\");\n\nexport const setLogoHeight = (value, variableName) =>\n root.style.setProperty(\n variableName,\n `${Number(value) || DEFAULT_LOGO_HEIGHT}px`\n );\n","import { useFormikContext, getIn } from \"formik\";\nimport { isNil } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { noop } from \"neetocist\";\nimport { Input } from \"neetoui/formik\";\n\nimport AlignmentBlock from \"./AlignmentBlock\";\nimport {\n DEFAULT_LOGO_HEIGHT,\n MAXIMUM_LOGO_HEIGHT,\n MINIMUM_LOGO_HEIGHT,\n} from \"./constants\";\nimport ImageUpload from \"./ImageUpload\";\nimport SliderBlock from \"./SliderBlock\";\nimport { setLogoHeight } from \"./utils\";\n\nconst ImageForm = ({\n onChange = noop,\n imageUploaderProps = {},\n className = \"\",\n names = {},\n logoHeight = {\n default: DEFAULT_LOGO_HEIGHT,\n min: MINIMUM_LOGO_HEIGHT,\n max: MAXIMUM_LOGO_HEIGHT,\n },\n logoSizeVariableName,\n}) => {\n const { values, setFieldValue } = useFormikContext();\n\n const { t } = useTranslation();\n\n const imageValue = getIn(values, names.image);\n\n const handleImageChange = image => {\n if (isNil(image)) {\n setLogoHeight(logoHeight.default, logoSizeVariableName);\n setFieldValue(names.height, logoHeight.default);\n }\n\n onChange?.(names.image, image);\n };\n\n const handleSliderChange = value => {\n setLogoHeight(value, logoSizeVariableName);\n onChange?.(names.height, value);\n };\n\n return (\n <div className={`space-y-4 ${className}`}>\n <ImageUpload\n handleUpdate={handleImageChange}\n name={names.image}\n {...imageUploaderProps}\n />\n {imageValue && (\n <div className=\"space-y-4 px-2\">\n <SliderBlock\n defaultValue={logoHeight.default}\n max={logoHeight.max}\n min={logoHeight.min}\n name={names.height}\n title={t(\"neetoImageUploader.labels.logoSize\")}\n onChange={handleSliderChange}\n />\n <AlignmentBlock\n name={names.alignment}\n title={t(\"neetoImageUploader.labels.alignment\")}\n {...{ onChange }}\n />\n <Input\n name=\"altText\"\n helpText={t(\"neetoImageUploader.tooltips.logoAltText\")}\n placeholder={t(\"neetoImageUploader.labels.logoAltText\")}\n />\n </div>\n )}\n </div>\n );\n};\n\nexport default ImageForm;\n"],"names":["ALIGNMENTS","label","t","value","icon","LeftAlign","dataCy","CenterAlign","RightAlign","MINIMUM_LOGO_HEIGHT","MAXIMUM_LOGO_HEIGHT","DEFAULT_LOGO_HEIGHT","DEFAULT_LOGO_POSITION","ONE_MEGABYTE","AlignmentBlock","_ref","name","title","_ref$onChange","onChange","noop","_useField","useField","_useField2","_slicedToArray","_","_useField2$1$value","alignment","setValue","handleChange","newAlignment","_jsxs","concat","hyphenate","children","_jsx","Typography","lineHeight","style","weight","className","map","_ref2","_createElement","Button","key","size","tooltipProps","content","position","onClick","Block","_ref$className","_ref$childrenClassNam","childrenClassName","_ref$isLoading","isLoading","classnames","Spinner","ImageUpload","handleUpdate","_ref$maxSize","maxSize","_useTranslation","useTranslation","image","handleImageChange","changedImage","isEmpty","url","ImageUploader","src","uploadConfig","maxImageSize","onUploadComplete","SliderBlock","defaultValue","min","max","newValue","Slider","root","document","querySelector","setLogoHeight","variableName","setProperty","Number","ImageForm","_ref$imageUploaderPro","imageUploaderProps","_ref$names","names","_ref$logoHeight","logoHeight","logoSizeVariableName","_useFormikContext","useFormikContext","values","setFieldValue","imageValue","getIn","isNil","height","handleSliderChange","_objectSpread","Input","helpText","placeholder"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,UAAU,GAAG,CACxB;AACEC,EAAAA,KAAK,EAAEC,SAAC,CAAC,qCAAqC,CAAC;AAC/CC,EAAAA,KAAK,EAAE,MAAM;AACbC,EAAAA,IAAI,EAAEC,SAAS;AACfC,EAAAA,MAAM,EAAE;AACV,CAAC,EACD;AACEL,EAAAA,KAAK,EAAEC,SAAC,CAAC,uCAAuC,CAAC;AACjDC,EAAAA,KAAK,EAAE,QAAQ;AACfC,EAAAA,IAAI,EAAEG,WAAW;AACjBD,EAAAA,MAAM,EAAE;AACV,CAAC,EACD;AACEL,EAAAA,KAAK,EAAEC,SAAC,CAAC,sCAAsC,CAAC;AAChDC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,IAAI,EAAEI,UAAU;AAChBF,EAAAA,MAAM,EAAE;AACV,CAAC,CACF;AAEM,IAAMG,mBAAmB,GAAG,EAAE;AAC9B,IAAMC,mBAAmB,GAAG,GAAG;AAC/B,IAAMC,mBAAmB,GAAG,EAAE;AAC9B,IAAMC,qBAAqB,GAAG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