@manuscripts/transform 2.3.4 → 2.3.5-LEAN-3607.0
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.
|
@@ -117,6 +117,14 @@ exports.listItem = {
|
|
|
117
117
|
if (listItemNode.attrs.placeholder) {
|
|
118
118
|
attrs['data-placeholder-text'] = listItemNode.attrs.placeholder;
|
|
119
119
|
}
|
|
120
|
+
const dataTracked = listItemNode.attrs.dataTracked;
|
|
121
|
+
if (dataTracked && dataTracked.length) {
|
|
122
|
+
const { id, status, operation } = dataTracked[0];
|
|
123
|
+
attrs['data-track-id'] = id;
|
|
124
|
+
attrs['data-track-status'] = status;
|
|
125
|
+
attrs['data-track-op'] = operation;
|
|
126
|
+
attrs['class'] = `${status} ${operation}`;
|
|
127
|
+
}
|
|
120
128
|
return ['li', attrs, 0];
|
|
121
129
|
},
|
|
122
130
|
};
|
|
@@ -114,6 +114,14 @@ export const listItem = {
|
|
|
114
114
|
if (listItemNode.attrs.placeholder) {
|
|
115
115
|
attrs['data-placeholder-text'] = listItemNode.attrs.placeholder;
|
|
116
116
|
}
|
|
117
|
+
const dataTracked = listItemNode.attrs.dataTracked;
|
|
118
|
+
if (dataTracked && dataTracked.length) {
|
|
119
|
+
const { id, status, operation } = dataTracked[0];
|
|
120
|
+
attrs['data-track-id'] = id;
|
|
121
|
+
attrs['data-track-status'] = status;
|
|
122
|
+
attrs['data-track-op'] = operation;
|
|
123
|
+
attrs['class'] = `${status} ${operation}`;
|
|
124
|
+
}
|
|
117
125
|
return ['li', attrs, 0];
|
|
118
126
|
},
|
|
119
127
|
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
17
|
+
import { DataTrackedAttrs, ManuscriptNode } from '../types';
|
|
18
18
|
export interface BulletListNode extends ManuscriptNode {
|
|
19
19
|
attrs: {
|
|
20
20
|
id: string;
|
|
@@ -34,6 +34,7 @@ export declare const orderedList: NodeSpec;
|
|
|
34
34
|
export interface ListItemNode extends ManuscriptNode {
|
|
35
35
|
attrs: {
|
|
36
36
|
placeholder: string;
|
|
37
|
+
dataTracked?: DataTrackedAttrs[];
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
export declare const listItem: NodeSpec;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/transform",
|
|
3
3
|
"description": "ProseMirror transformer for Manuscripts applications",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.5-LEAN-3607.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|