@manuscripts/transform 4.3.23 → 4.3.25
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/dist/cjs/jats/exporter/jats-exporter.js +0 -8
- package/dist/cjs/jats/importer/jats-transformations.js +10 -0
- package/dist/cjs/schema/migration/migration-scripts/{4.3.12.js → 4.3.23.js} +4 -4
- package/dist/cjs/schema/migration/migration-scripts/index.js +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +0 -8
- package/dist/es/jats/importer/jats-transformations.js +10 -0
- package/dist/es/schema/migration/migration-scripts/{4.3.12.js → 4.3.23.js} +4 -4
- package/dist/es/schema/migration/migration-scripts/index.js +2 -2
- package/dist/es/version.js +1 -1
- package/dist/types/schema/migration/migration-scripts/{4.3.12.d.ts → 4.3.23.d.ts} +2 -2
- package/dist/types/schema/migration/migration-scripts/index.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1224,7 +1224,6 @@ class JATSExporter {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
const tbodyRows = Array.from(tbody.childNodes);
|
|
1226
1226
|
const thead = this.createElement('thead');
|
|
1227
|
-
const tfoot = this.createElement('tfoot');
|
|
1228
1227
|
tbodyRows.forEach((row, i) => {
|
|
1229
1228
|
const isRow = row instanceof Element && row.tagName.toLowerCase() === 'tr';
|
|
1230
1229
|
if (isRow) {
|
|
@@ -1237,18 +1236,11 @@ class JATSExporter {
|
|
|
1237
1236
|
}
|
|
1238
1237
|
thead.appendChild(row);
|
|
1239
1238
|
}
|
|
1240
|
-
else if (i === tbodyRows.length - 1) {
|
|
1241
|
-
tbody?.removeChild(row);
|
|
1242
|
-
tfoot.appendChild(row);
|
|
1243
|
-
}
|
|
1244
1239
|
}
|
|
1245
1240
|
});
|
|
1246
1241
|
if (thead.hasChildNodes()) {
|
|
1247
1242
|
table.insertBefore(thead, tbody);
|
|
1248
1243
|
}
|
|
1249
|
-
if (tfoot.hasChildNodes()) {
|
|
1250
|
-
table.insertBefore(tfoot, tbody);
|
|
1251
|
-
}
|
|
1252
1244
|
};
|
|
1253
1245
|
this.unwrapBody = (body) => {
|
|
1254
1246
|
const container = body.querySelector(':scope > sec[sec-type="body"]');
|
|
@@ -386,6 +386,16 @@ const fixTables = (doc, body, createElement) => {
|
|
|
386
386
|
if (!table) {
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
|
+
const tfoot = table.querySelector('tfoot');
|
|
390
|
+
const tbody = table.querySelector('tbody');
|
|
391
|
+
if (tfoot && tbody) {
|
|
392
|
+
const tfootRows = Array.from(tfoot.querySelectorAll(':scope > tr'));
|
|
393
|
+
for (const row of tfootRows) {
|
|
394
|
+
removeNodeFromParent(row);
|
|
395
|
+
tbody.appendChild(row);
|
|
396
|
+
}
|
|
397
|
+
removeNodeFromParent(tfoot);
|
|
398
|
+
}
|
|
389
399
|
const colgroup = table.querySelector('colgroup');
|
|
390
400
|
const cols = table.querySelectorAll('col');
|
|
391
401
|
if (!colgroup && table.firstChild && cols.length > 0) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class
|
|
3
|
+
class Migration4323 {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.fromVersion = '4.3.
|
|
6
|
-
this.toVersion = '4.3.
|
|
5
|
+
this.fromVersion = '4.3.22';
|
|
6
|
+
this.toVersion = '4.3.23';
|
|
7
7
|
}
|
|
8
8
|
migrateNode(node) {
|
|
9
9
|
if (node.type === 'contributor') {
|
|
@@ -36,4 +36,4 @@ class Migration4312 {
|
|
|
36
36
|
return node;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
exports.default =
|
|
39
|
+
exports.default = Migration4323;
|
|
@@ -29,7 +29,7 @@ const _3_0_55_1 = __importDefault(require("./3.0.55"));
|
|
|
29
29
|
const _3_0_56_1 = __importDefault(require("./3.0.56"));
|
|
30
30
|
const _4_2_13_1 = __importDefault(require("./4.2.13"));
|
|
31
31
|
const _4_2_15_1 = __importDefault(require("./4.2.15"));
|
|
32
|
-
const
|
|
32
|
+
const _4_3_23_1 = __importDefault(require("./4.3.23"));
|
|
33
33
|
const migrations = [
|
|
34
34
|
new _1_2_5_1.default(),
|
|
35
35
|
new _2_3_22_1.default(),
|
|
@@ -42,6 +42,6 @@ const migrations = [
|
|
|
42
42
|
new _3_0_56_1.default(),
|
|
43
43
|
new _4_2_13_1.default(),
|
|
44
44
|
new _4_2_15_1.default(),
|
|
45
|
-
new
|
|
45
|
+
new _4_3_23_1.default(),
|
|
46
46
|
];
|
|
47
47
|
exports.default = migrations;
|
package/dist/cjs/version.js
CHANGED
|
@@ -1184,7 +1184,6 @@ export class JATSExporter {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
const tbodyRows = Array.from(tbody.childNodes);
|
|
1186
1186
|
const thead = this.createElement('thead');
|
|
1187
|
-
const tfoot = this.createElement('tfoot');
|
|
1188
1187
|
tbodyRows.forEach((row, i) => {
|
|
1189
1188
|
const isRow = row instanceof Element && row.tagName.toLowerCase() === 'tr';
|
|
1190
1189
|
if (isRow) {
|
|
@@ -1197,18 +1196,11 @@ export class JATSExporter {
|
|
|
1197
1196
|
}
|
|
1198
1197
|
thead.appendChild(row);
|
|
1199
1198
|
}
|
|
1200
|
-
else if (i === tbodyRows.length - 1) {
|
|
1201
|
-
tbody?.removeChild(row);
|
|
1202
|
-
tfoot.appendChild(row);
|
|
1203
|
-
}
|
|
1204
1199
|
}
|
|
1205
1200
|
});
|
|
1206
1201
|
if (thead.hasChildNodes()) {
|
|
1207
1202
|
table.insertBefore(thead, tbody);
|
|
1208
1203
|
}
|
|
1209
|
-
if (tfoot.hasChildNodes()) {
|
|
1210
|
-
table.insertBefore(tfoot, tbody);
|
|
1211
|
-
}
|
|
1212
1204
|
};
|
|
1213
1205
|
this.unwrapBody = (body) => {
|
|
1214
1206
|
const container = body.querySelector(':scope > sec[sec-type="body"]');
|
|
@@ -364,6 +364,16 @@ export const fixTables = (doc, body, createElement) => {
|
|
|
364
364
|
if (!table) {
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
|
+
const tfoot = table.querySelector('tfoot');
|
|
368
|
+
const tbody = table.querySelector('tbody');
|
|
369
|
+
if (tfoot && tbody) {
|
|
370
|
+
const tfootRows = Array.from(tfoot.querySelectorAll(':scope > tr'));
|
|
371
|
+
for (const row of tfootRows) {
|
|
372
|
+
removeNodeFromParent(row);
|
|
373
|
+
tbody.appendChild(row);
|
|
374
|
+
}
|
|
375
|
+
removeNodeFromParent(tfoot);
|
|
376
|
+
}
|
|
367
377
|
const colgroup = table.querySelector('colgroup');
|
|
368
378
|
const cols = table.querySelectorAll('col');
|
|
369
379
|
if (!colgroup && table.firstChild && cols.length > 0) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Migration4323 {
|
|
2
2
|
constructor() {
|
|
3
|
-
this.fromVersion = '4.3.
|
|
4
|
-
this.toVersion = '4.3.
|
|
3
|
+
this.fromVersion = '4.3.22';
|
|
4
|
+
this.toVersion = '4.3.23';
|
|
5
5
|
}
|
|
6
6
|
migrateNode(node) {
|
|
7
7
|
if (node.type === 'contributor') {
|
|
@@ -34,4 +34,4 @@ class Migration4312 {
|
|
|
34
34
|
return node;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
export default
|
|
37
|
+
export default Migration4323;
|
|
@@ -24,7 +24,7 @@ import Migration3055 from './3.0.55';
|
|
|
24
24
|
import Migration3056 from './3.0.56';
|
|
25
25
|
import Migration4213 from './4.2.13';
|
|
26
26
|
import Migration4215 from './4.2.15';
|
|
27
|
-
import
|
|
27
|
+
import Migration4323 from './4.3.23';
|
|
28
28
|
const migrations = [
|
|
29
29
|
new Migration125(),
|
|
30
30
|
new Migration2322(),
|
|
@@ -37,6 +37,6 @@ const migrations = [
|
|
|
37
37
|
new Migration3056(),
|
|
38
38
|
new Migration4213(),
|
|
39
39
|
new Migration4215(),
|
|
40
|
-
new
|
|
40
|
+
new Migration4323(),
|
|
41
41
|
];
|
|
42
42
|
export default migrations;
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "4.3.
|
|
1
|
+
export const VERSION = "4.3.25";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSONProsemirrorNode } from '../../../types';
|
|
2
2
|
import { MigrationScript } from '../migration-script';
|
|
3
|
-
declare class
|
|
3
|
+
declare class Migration4323 implements MigrationScript {
|
|
4
4
|
fromVersion: string;
|
|
5
5
|
toVersion: string;
|
|
6
6
|
migrateNode(node: JSONProsemirrorNode): JSONProsemirrorNode;
|
|
7
7
|
}
|
|
8
|
-
export default
|
|
8
|
+
export default Migration4323;
|
|
@@ -24,6 +24,6 @@ import Migration3055 from './3.0.55';
|
|
|
24
24
|
import Migration3056 from './3.0.56';
|
|
25
25
|
import Migration4213 from './4.2.13';
|
|
26
26
|
import Migration4215 from './4.2.15';
|
|
27
|
-
import
|
|
28
|
-
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041 | Migration3055 | Migration3056 | Migration4213 | Migration4215 |
|
|
27
|
+
import Migration4323 from './4.3.23';
|
|
28
|
+
declare const migrations: (Migration125 | Migration2322 | Migration3012 | Migration3021 | Migration3030 | Migration3031 | Migration3041 | Migration3055 | Migration3056 | Migration4213 | Migration4215 | Migration4323)[];
|
|
29
29
|
export default migrations;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.3.
|
|
1
|
+
export declare const VERSION = "4.3.25";
|
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": "4.3.
|
|
4
|
+
"version": "4.3.25",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|