@modusoperandi/licit 0.13.3 → 0.13.10
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/.eslintrc.js +59 -55
- package/README.md +15 -1
- package/dist/bom.xml +5177 -8773
- package/dist/client/EditorConnection.js +2 -2
- package/dist/client/EditorConnection.js.flow +3 -3
- package/dist/client/Licit.js +63 -15
- package/dist/client/Licit.js.flow +81 -35
- package/dist/client/Licit.test.js +29 -2
- package/dist/client/Licit.test.js.flow +33 -2
- package/dist/client/http.js +12 -0
- package/dist/client/http.js.flow +4 -0
- package/dist/convertFromDOMElement.js.flow +2 -2
- package/dist/convertFromHTML.js +1 -4
- package/dist/convertFromHTML.js.flow +3 -5
- package/dist/convertFromJSON.js +12 -28
- package/dist/convertFromJSON.js.flow +9 -31
- package/dist/createEmptyEditorState.js +3 -6
- package/dist/createEmptyEditorState.js.flow +4 -8
- package/dist/index.js +11 -1
- package/dist/index.js.flow +1 -1
- package/dist/patchStyleElements.js +1 -3
- package/dist/patchStyleElements.js.flow +2 -2
- package/dist/ui/czi-link-tooltip.css +1 -1
- package/dist/ui/czi-vars.css +1 -1
- package/licit/client/index.js +2 -1
- package/licit/server/collab/instance.js +11 -8
- package/licit/server/collab/server.js +6 -6
- package/package.json +3 -8
- package/src/client/EditorConnection.js +3 -3
- package/src/client/Licit.js +81 -35
- package/src/client/Licit.test.js +33 -2
- package/src/client/http.js +4 -0
- package/src/convertFromDOMElement.js +2 -2
- package/src/convertFromHTML.js +3 -5
- package/src/convertFromJSON.js +9 -31
- package/src/createEmptyEditorState.js +4 -8
- package/src/index.js +1 -1
- package/src/patchStyleElements.js +2 -2
- package/src/ui/czi-link-tooltip.css +1 -1
- package/src/ui/czi-vars.css +1 -1
- package/node_modules/prosemirror-utils/LICENSE +0 -13
- package/node_modules/prosemirror-utils/README.md +0 -0
- package/node_modules/prosemirror-utils/dist/helpers.js +0 -119
- package/node_modules/prosemirror-utils/dist/index.js +0 -17
- package/node_modules/prosemirror-utils/dist/index.js.map +0 -1
- package/node_modules/prosemirror-utils/dist/node.js +0 -106
- package/node_modules/prosemirror-utils/dist/selection.js +0 -168
- package/node_modules/prosemirror-utils/dist/transforms.js +0 -257
- package/node_modules/prosemirror-utils/package.json +0 -81
- package/node_modules/prosemirror-utils/typings.d.ts +0 -79
package/.eslintrc.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
parser: 'babel-eslint',
|
|
3
|
+
parserOptions: {
|
|
4
|
+
sourceType: 'module',
|
|
5
|
+
allowImportExportEverywhere: false,
|
|
6
|
+
codeFrame: true,
|
|
7
|
+
ecmaFeatures: {
|
|
8
|
+
jsx: true,
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
plugins: ['react'],
|
|
12
|
+
rules: {
|
|
13
13
|
'react/jsx-sort-props': 'error',
|
|
14
14
|
'react/jsx-uses-react': 'error',
|
|
15
15
|
'react/jsx-uses-vars': 'error',
|
|
@@ -22,59 +22,63 @@ module.exports = {
|
|
|
22
22
|
// The following rule was being reported as misconfigured. After correcting
|
|
23
23
|
// that, it was reported as not existing at all.
|
|
24
24
|
// "no-unused-expression": [true, "allow-fast-null-checks"],
|
|
25
|
-
'no-unused-vars': [
|
|
25
|
+
'no-unused-vars': [
|
|
26
|
+
'error',
|
|
27
|
+
{ vars: 'all', args: 'none', ignoreRestSiblings: false },
|
|
28
|
+
],
|
|
26
29
|
'no-var': 'error',
|
|
27
30
|
'prefer-const': 'error',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
quotes: [2, 'single', { avoidEscape: true }],
|
|
32
|
+
semi: [2, 'always'],
|
|
33
|
+
strict: 0,
|
|
31
34
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
35
|
+
globals: {
|
|
36
|
+
__dirname: false,
|
|
37
|
+
$ReadOnlyArray: false,
|
|
38
|
+
Blob: false,
|
|
39
|
+
File: false,
|
|
40
|
+
Class: false,
|
|
41
|
+
Component: false,
|
|
42
|
+
Document: true,
|
|
43
|
+
Element: false,
|
|
44
|
+
Event: false,
|
|
45
|
+
HTMLElement: false,
|
|
46
|
+
HTMLTableCellElement: false,
|
|
47
|
+
HTMLButtonElement: false,
|
|
48
|
+
HTMLLIElement: false,
|
|
49
|
+
Image: false,
|
|
50
|
+
localStorage: false,
|
|
51
|
+
Map: false,
|
|
52
|
+
DragEvent: false,
|
|
53
|
+
MouseEvent: false,
|
|
54
|
+
KeyboardEvent: false,
|
|
55
|
+
MutationObserver: false,
|
|
56
|
+
Promise: false,
|
|
57
|
+
Set: false,
|
|
58
|
+
Slice: false,
|
|
59
|
+
Symbol: false,
|
|
60
|
+
SyntheticEvent: false,
|
|
61
|
+
SyntheticInputEvent: false,
|
|
62
|
+
SyntheticMouseEvent: false,
|
|
63
|
+
cancelAnimationFrame: false,
|
|
64
|
+
clearTimeout: false,
|
|
65
|
+
console: false,
|
|
66
|
+
document: false,
|
|
67
|
+
module: false,
|
|
68
|
+
process: false,
|
|
69
|
+
require: false,
|
|
70
|
+
requestAnimationFrame: false,
|
|
71
|
+
setTimeout: false,
|
|
72
|
+
window: false,
|
|
69
73
|
},
|
|
70
|
-
|
|
74
|
+
overrides: [
|
|
71
75
|
{
|
|
72
76
|
// enable jest globals in test files
|
|
73
77
|
files: '*.test.js',
|
|
74
78
|
plugins: ['jest'],
|
|
75
79
|
env: {
|
|
76
|
-
'jest/globals': true
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
+
'jest/globals': true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
80
84
|
};
|
package/README.md
CHANGED
|
@@ -192,7 +192,8 @@ Please refer *licit\client\index.js* for getting more detailed idea on passing p
|
|
|
192
192
|
| width|Width of the editor|100%
|
|
193
193
|
| height|Height of the editor|100%
|
|
194
194
|
| readOnly |To enable/disable editing mode|false
|
|
195
|
-
| data |Document data to be loaded into the editor|null
|
|
195
|
+
| data |Document JSON/HTML data to be loaded into the editor|null
|
|
196
|
+
| dataType |Document data type - JSON/HTML|JSON
|
|
196
197
|
| disabled|To disable the editor|false
|
|
197
198
|
| embedded|To disable/enable inline behavior of the editor|false
|
|
198
199
|
| fitToContent|To disable/enable fit to content behavior of the editor|false
|
|
@@ -204,6 +205,19 @@ Please refer *licit\client\index.js* for getting more detailed idea on passing p
|
|
|
204
205
|
|onChange | Fires after each significant change |<ul><li>data: document JSON</li><li>isEmpty: true when empty</li><li>view: prosemirror view</li></ul>
|
|
205
206
|
|onReady| Fires once when the editor is ready |licit reference
|
|
206
207
|
|
|
208
|
+
|Method Name| Description|Parameter|
|
|
209
|
+
|--|--|--|
|
|
210
|
+
|setProps | Update properties of the editor using an editor instance |<ul><li>props: Licit properties' object</li></ul>
|
|
211
|
+
|
|
212
|
+
To set data to editor:
|
|
213
|
+
|
|
214
|
+
> function setData() { const props = {};
|
|
215
|
+
> Object.assign(props, this.props);
|
|
216
|
+
> // here the *this.props* is the *ref* input from the onReadyCB(ref) (Please refer *licit\client\index.js* for onReadyCB(ref) method)
|
|
217
|
+
> props.data = {
|
|
218
|
+
> "type":"doc","attrs":{"layout":null,"padding":null,"width":null,"counterFlags":null},"content":[{"type":"paragraph","attrs":{"align":null,"color":null,"id":null,"indent":null,"lineSpacing":null,"paddingBottom":null,"paddingTop":null},"content":[{"type":"text","text":"Hello
|
|
219
|
+
> World!!!"}]}]};
|
|
220
|
+
> this.setProps(props); }
|
|
207
221
|
|
|
208
222
|
To load the styles:
|
|
209
223
|
Either in *angular.json*, add
|