@bbl-digital/snorre 4.0.89 → 4.0.90

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -35453,6 +35453,15 @@ to {top: 100vh;}
35453
35453
  onChange(html, delta, source, quill);
35454
35454
  }
35455
35455
  }, [quill, onChange]);
35456
+ const applySizes = () => {
35457
+ if (!quill) return;
35458
+ minHeight && (quill.root.style.minHeight = `${minHeight}px`);
35459
+ maxHeight && (quill.root.style.maxHeight = `${maxHeight}px`);
35460
+ maxWidth && (quill.root.style.maxWidth = `${maxWidth}px`);
35461
+ width && (quill.root.style.width = `${width}px`);
35462
+ height && (quill.root.style.height = `${height}px`);
35463
+ minWidth && (quill.root.style.minWidth = `${minWidth}px`);
35464
+ };
35456
35465
  React.useEffect(() => {
35457
35466
  if (!isMounted.current) {
35458
35467
  const editor = document.createElement('div');
@@ -35469,10 +35478,12 @@ to {top: 100vh;}
35469
35478
  if (initialValue) {
35470
35479
  quillInstance.root.innerHTML = initialValue;
35471
35480
  }
35472
- applySizes(quillInstance);
35473
35481
  setQuill(quillInstance);
35474
35482
  }
35475
35483
  }, []);
35484
+ React.useEffect(() => {
35485
+ applySizes();
35486
+ }, [quill, height, width, maxHeight, maxWidth, minHeight, minWidth]);
35476
35487
  React.useEffect(() => {
35477
35488
  if (quill && disabled) {
35478
35489
  quill.disable();
@@ -35510,14 +35521,6 @@ to {top: 100vh;}
35510
35521
  quill.off('selection-change');
35511
35522
  };
35512
35523
  }, [quill?.container]);
35513
- const applySizes = quill => {
35514
- minHeight && (quill.root.style.minHeight = `${minHeight}px`);
35515
- maxHeight && (quill.root.style.maxHeight = `${maxHeight}px`);
35516
- maxWidth && (quill.root.style.maxWidth = `${maxWidth}px`);
35517
- width && (quill.root.style.width = `${width}px`);
35518
- height && (quill.root.style.height = `${height}px`);
35519
- minWidth && (quill.root.style.minWidth = `${minWidth}px`);
35520
- };
35521
35524
  return jsxRuntime.jsxs("div", {
35522
35525
  css: theme => [styles.default(theme, maxHeight)],
35523
35526
  children: [label && jsxRuntime.jsx(Label, {
@@ -79,6 +79,15 @@ const QuillEditor = ({
79
79
  onChange(html, delta, source, quill);
80
80
  }
81
81
  }, [quill, onChange]);
82
+ const applySizes = () => {
83
+ if (!quill) return;
84
+ minHeight && (quill.root.style.minHeight = `${minHeight}px`);
85
+ maxHeight && (quill.root.style.maxHeight = `${maxHeight}px`);
86
+ maxWidth && (quill.root.style.maxWidth = `${maxWidth}px`);
87
+ width && (quill.root.style.width = `${width}px`);
88
+ height && (quill.root.style.height = `${height}px`);
89
+ minWidth && (quill.root.style.minWidth = `${minWidth}px`);
90
+ };
82
91
  useEffect(() => {
83
92
  if (!isMounted.current) {
84
93
  const editor = document.createElement('div');
@@ -95,10 +104,12 @@ const QuillEditor = ({
95
104
  if (initialValue) {
96
105
  quillInstance.root.innerHTML = initialValue;
97
106
  }
98
- applySizes(quillInstance);
99
107
  setQuill(quillInstance);
100
108
  }
101
109
  }, []);
110
+ useEffect(() => {
111
+ applySizes();
112
+ }, [quill, height, width, maxHeight, maxWidth, minHeight, minWidth]);
102
113
  useEffect(() => {
103
114
  if (quill && disabled) {
104
115
  quill.disable();
@@ -136,14 +147,6 @@ const QuillEditor = ({
136
147
  quill.off('selection-change');
137
148
  };
138
149
  }, [quill?.container]);
139
- const applySizes = quill => {
140
- minHeight && (quill.root.style.minHeight = `${minHeight}px`);
141
- maxHeight && (quill.root.style.maxHeight = `${maxHeight}px`);
142
- maxWidth && (quill.root.style.maxWidth = `${maxWidth}px`);
143
- width && (quill.root.style.width = `${width}px`);
144
- height && (quill.root.style.height = `${height}px`);
145
- minWidth && (quill.root.style.minWidth = `${minWidth}px`);
146
- };
147
150
  return _jsxs("div", {
148
151
  css: theme => [styles.default(theme, maxHeight)],
149
152
  children: [label && _jsx(Label, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAqC3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8J3C,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAqC3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkK3C,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -79,6 +79,15 @@ const QuillEditor = ({
79
79
  onChange(html, delta, source, quill);
80
80
  }
81
81
  }, [quill, onChange]);
82
+ const applySizes = () => {
83
+ if (!quill) return;
84
+ minHeight && (quill.root.style.minHeight = `${minHeight}px`);
85
+ maxHeight && (quill.root.style.maxHeight = `${maxHeight}px`);
86
+ maxWidth && (quill.root.style.maxWidth = `${maxWidth}px`);
87
+ width && (quill.root.style.width = `${width}px`);
88
+ height && (quill.root.style.height = `${height}px`);
89
+ minWidth && (quill.root.style.minWidth = `${minWidth}px`);
90
+ };
82
91
  useEffect(() => {
83
92
  if (!isMounted.current) {
84
93
  const editor = document.createElement('div');
@@ -95,10 +104,12 @@ const QuillEditor = ({
95
104
  if (initialValue) {
96
105
  quillInstance.root.innerHTML = initialValue;
97
106
  }
98
- applySizes(quillInstance);
99
107
  setQuill(quillInstance);
100
108
  }
101
109
  }, []);
110
+ useEffect(() => {
111
+ applySizes();
112
+ }, [quill, height, width, maxHeight, maxWidth, minHeight, minWidth]);
102
113
  useEffect(() => {
103
114
  if (quill && disabled) {
104
115
  quill.disable();
@@ -136,14 +147,6 @@ const QuillEditor = ({
136
147
  quill.off('selection-change');
137
148
  };
138
149
  }, [quill?.container]);
139
- const applySizes = quill => {
140
- minHeight && (quill.root.style.minHeight = `${minHeight}px`);
141
- maxHeight && (quill.root.style.maxHeight = `${maxHeight}px`);
142
- maxWidth && (quill.root.style.maxWidth = `${maxWidth}px`);
143
- width && (quill.root.style.width = `${width}px`);
144
- height && (quill.root.style.height = `${height}px`);
145
- minWidth && (quill.root.style.minWidth = `${minWidth}px`);
146
- };
147
150
  return _jsxs("div", {
148
151
  css: theme => [styles.default(theme, maxHeight)],
149
152
  children: [label && _jsx(Label, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.0.89",
3
+ "version": "4.0.90",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",