dicom-curate 0.24.0 → 0.26.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.
- package/dist/esm/applyMappingsWorker.js +5 -0
- package/dist/esm/curateOne.js +5 -0
- package/dist/esm/index.js +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +1 -1
- package/dist/umd/dicom-curate.umd.js +15 -0
- package/dist/umd/dicom-curate.umd.js.map +1 -1
- package/dist/umd/dicom-curate.umd.min.js +2 -2
- package/dist/umd/dicom-curate.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -79936,6 +79936,11 @@ async function curateOne({
|
|
|
79936
79936
|
dicomData,
|
|
79937
79937
|
mappingOptions
|
|
79938
79938
|
));
|
|
79939
|
+
if (Object.keys(clonedMapResults.mappings).length === 0) {
|
|
79940
|
+
mappedDicomData = {
|
|
79941
|
+
write: () => fileArrayBuffer
|
|
79942
|
+
};
|
|
79943
|
+
}
|
|
79939
79944
|
clonedMapResults.mappingRequired = true;
|
|
79940
79945
|
} else {
|
|
79941
79946
|
mappedDicomData = {
|
package/dist/esm/curateOne.js
CHANGED
|
@@ -73645,6 +73645,11 @@ async function curateOne({
|
|
|
73645
73645
|
dicomData,
|
|
73646
73646
|
mappingOptions
|
|
73647
73647
|
));
|
|
73648
|
+
if (Object.keys(clonedMapResults.mappings).length === 0) {
|
|
73649
|
+
mappedDicomData = {
|
|
73650
|
+
write: () => fileArrayBuffer
|
|
73651
|
+
};
|
|
73652
|
+
}
|
|
73648
73653
|
clonedMapResults.mappingRequired = true;
|
|
73649
73654
|
} else {
|
|
73650
73655
|
mappedDicomData = {
|
package/dist/esm/index.js
CHANGED
|
@@ -81496,6 +81496,11 @@ async function curateOne({
|
|
|
81496
81496
|
dicomData,
|
|
81497
81497
|
mappingOptions
|
|
81498
81498
|
));
|
|
81499
|
+
if (Object.keys(clonedMapResults.mappings).length === 0) {
|
|
81500
|
+
mappedDicomData = {
|
|
81501
|
+
write: () => fileArrayBuffer
|
|
81502
|
+
};
|
|
81503
|
+
}
|
|
81499
81504
|
clonedMapResults.mappingRequired = true;
|
|
81500
81505
|
} else {
|
|
81501
81506
|
mappedDicomData = {
|
|
@@ -87757,6 +87762,7 @@ export {
|
|
|
87757
87762
|
curateMany,
|
|
87758
87763
|
curateOne,
|
|
87759
87764
|
extractColumnMappings,
|
|
87765
|
+
hash,
|
|
87760
87766
|
specVersion
|
|
87761
87767
|
};
|
|
87762
87768
|
/*! Bundled license information:
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { csvTextToRows } from './csvMapping';
|
|
|
9
9
|
export type { Row } from './csvMapping';
|
|
10
10
|
export { composeSpecs } from './composeSpecs';
|
|
11
11
|
export type { SpecPart } from './composeSpecs';
|
|
12
|
+
export { hash } from './hash';
|
|
12
13
|
declare function curateMany(organizeOptions: OrganizeOptions, onProgress?: ProgressCallback): Promise<TProgressMessageDone>;
|
|
13
14
|
export * from './types';
|
|
14
15
|
export { curateMany, curateOne, extractColumnMappings };
|
package/dist/types/types.d.ts
CHANGED
|
@@ -187,7 +187,7 @@ type TMappingInputTwoPass = {
|
|
|
187
187
|
collect: TMappingTwoPassCollect[];
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
type HPPrimitive = string | number | boolean | null | RegExp;
|
|
190
|
+
type HPPrimitive = string | number | boolean | null | RegExp | ((...args: any[]) => any);
|
|
191
191
|
export type HPValue = HPPrimitive | {
|
|
192
192
|
[k: string]: HPValue;
|
|
193
193
|
} | HPValue[];
|
|
@@ -48987,6 +48987,13 @@
|
|
|
48987
48987
|
return mapResults;
|
|
48988
48988
|
}
|
|
48989
48989
|
({ dicomData: mappedDicomData, mapResults: clonedMapResults } = curateDict(`${fileInfo.path}/${fileInfo.name}`, dicomData, mappingOptions));
|
|
48990
|
+
// If the spec produced no DICOM header changes, short-circuit to
|
|
48991
|
+
// preserve the original file bytes (the dcmjs round-trip is not byte-preserving).
|
|
48992
|
+
if (Object.keys(clonedMapResults.mappings).length === 0) {
|
|
48993
|
+
mappedDicomData = {
|
|
48994
|
+
write: () => fileArrayBuffer,
|
|
48995
|
+
};
|
|
48996
|
+
}
|
|
48990
48997
|
// Indicate that mapping was required (we didn't hit the early-skip branch above)
|
|
48991
48998
|
// Previously mappingRequired was only set to false when skipping; ensure it's
|
|
48992
48999
|
// explicitly set to true when mapping was performed so consumers can rely on
|
|
@@ -110949,6 +110956,13 @@
|
|
|
110949
110956
|
return mapResults;
|
|
110950
110957
|
}
|
|
110951
110958
|
({ dicomData: mappedDicomData, mapResults: clonedMapResults } = curateDict(`${fileInfo.path}/${fileInfo.name}`, dicomData, mappingOptions));
|
|
110959
|
+
// If the spec produced no DICOM header changes, short-circuit to
|
|
110960
|
+
// preserve the original file bytes (the dcmjs round-trip is not byte-preserving).
|
|
110961
|
+
if (Object.keys(clonedMapResults.mappings).length === 0) {
|
|
110962
|
+
mappedDicomData = {
|
|
110963
|
+
write: () => fileArrayBuffer,
|
|
110964
|
+
};
|
|
110965
|
+
}
|
|
110952
110966
|
// Indicate that mapping was required (we didn't hit the early-skip branch above)
|
|
110953
110967
|
// Previously mappingRequired was only set to false when skipping; ensure it's
|
|
110954
110968
|
// explicitly set to true when mapping was performed so consumers can rely on
|
|
@@ -127001,6 +127015,7 @@
|
|
|
127001
127015
|
exports.curateMany = curateMany;
|
|
127002
127016
|
exports.curateOne = curateOne;
|
|
127003
127017
|
exports.extractColumnMappings = extractColumnMappings;
|
|
127018
|
+
exports.hash = hash;
|
|
127004
127019
|
exports.specVersion = specVersion;
|
|
127005
127020
|
|
|
127006
127021
|
}));
|