@bbl-digital/snorre 4.1.22 → 4.1.23

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -35588,7 +35588,13 @@ to {top: 100vh;}
35588
35588
  const delta = quillRef.current.clipboard.convert({
35589
35589
  html: defaultValueRef.current
35590
35590
  });
35591
- quillRef.current.setContents(delta);
35591
+ const formattedDelta = delta.ops.map(op => {
35592
+ if (op.attributes && op.attributes.indent) {
35593
+ op.attributes.indent = parseInt(op.attributes.indent, 10);
35594
+ }
35595
+ return op;
35596
+ });
35597
+ quillRef.current.setContents(formattedDelta);
35592
35598
  }
35593
35599
  quillRef.current.on(Quill__default["default"].events.TEXT_CHANGE, (...args) => handleChange(...args, quillRef.current));
35594
35600
  if (onFocus || onBlur) {
@@ -12,7 +12,7 @@ export const Default = {
12
12
  onFocus: () => console.log('focus'),
13
13
  maxHeight: "500px",
14
14
  width: "500px",
15
- initialValue: `<p>Beskrivelse av selve styremøtet.</p><p><br></p><ol><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="ordered" style="margin-left: 1em;"><span class="ql-ui" contenteditable="false"></span>test</li></ol>`,
15
+ initialValue: `<p><strong>test</strong></p><ol><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="ordered" style="margin-left: 3em;"><span class="ql-ui" contenteditable="false"></span>test</li></ol><p><br></p><ul><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="bullet" style="margin-left: 4em;"><span class="ql-ui" contenteditable="false"></span>test</li></ul>`,
16
16
  pasteAsText: true
17
17
  });
18
18
  },
@@ -184,7 +184,13 @@ const QuillEditor = ({
184
184
  const delta = quillRef.current.clipboard.convert({
185
185
  html: defaultValueRef.current
186
186
  });
187
- quillRef.current.setContents(delta);
187
+ const formattedDelta = delta.ops.map(op => {
188
+ if (op.attributes && op.attributes.indent) {
189
+ op.attributes.indent = parseInt(op.attributes.indent, 10);
190
+ }
191
+ return op;
192
+ });
193
+ quillRef.current.setContents(formattedDelta);
188
194
  }
189
195
  quillRef.current.on(Quill.events.TEXT_CHANGE, (...args) => handleChange(...args, quillRef.current));
190
196
  if (onFocus || onBlur) {
@@ -10,7 +10,7 @@ pool:
10
10
  steps:
11
11
  - task: NodeTool@0
12
12
  inputs:
13
- versionSpec: '16.20.0'
13
+ versionSpec: '18.20.4'
14
14
  displayName: 'Install Node.js 16.20.0'
15
15
 
16
16
  - script: yarn install
@@ -12,7 +12,7 @@ export const Default = {
12
12
  onFocus: () => console.log('focus'),
13
13
  maxHeight: "500px",
14
14
  width: "500px",
15
- initialValue: `<p>Beskrivelse av selve styremøtet.</p><p><br></p><ol><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="ordered" style="margin-left: 1em;"><span class="ql-ui" contenteditable="false"></span>test</li></ol>`,
15
+ initialValue: `<p><strong>test</strong></p><ol><li data-list="ordered"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="ordered" style="margin-left: 3em;"><span class="ql-ui" contenteditable="false"></span>test</li></ol><p><br></p><ul><li data-list="bullet"><span class="ql-ui" contenteditable="false"></span>test</li><li data-list="bullet" style="margin-left: 4em;"><span class="ql-ui" contenteditable="false"></span>test</li></ul>`,
16
16
  pasteAsText: true
17
17
  });
18
18
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AASA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoP3C,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AASA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0P3C,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -184,7 +184,13 @@ const QuillEditor = ({
184
184
  const delta = quillRef.current.clipboard.convert({
185
185
  html: defaultValueRef.current
186
186
  });
187
- quillRef.current.setContents(delta);
187
+ const formattedDelta = delta.ops.map(op => {
188
+ if (op.attributes && op.attributes.indent) {
189
+ op.attributes.indent = parseInt(op.attributes.indent, 10);
190
+ }
191
+ return op;
192
+ });
193
+ quillRef.current.setContents(formattedDelta);
188
194
  }
189
195
  quillRef.current.on(Quill.events.TEXT_CHANGE, (...args) => handleChange(...args, quillRef.current));
190
196
  if (onFocus || onBlur) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.1.22",
3
+ "version": "4.1.23",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",