@formicoidea/labre-framework-bpmn 0.42.0 → 0.43.1
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/element-view.js +1 -1
- package/dist/import.d.ts +10 -0
- package/dist/import.js +26 -1
- package/package.json +2 -2
package/dist/element-view.js
CHANGED
|
@@ -301,7 +301,7 @@ export class BpmnPoolView extends GfxElementModelView {
|
|
|
301
301
|
font: '14px Inter, sans-serif',
|
|
302
302
|
color: 'var(--affine-text-primary-color, #1f2328)',
|
|
303
303
|
background: 'var(--affine-background-overlay-panel-color, #ffffff)',
|
|
304
|
-
border: '1px solid var(--affine-primary-color
|
|
304
|
+
border: '1px solid var(--affine-primary-color)',
|
|
305
305
|
borderRadius: '6px',
|
|
306
306
|
boxShadow: 'var(--affine-shadow-2, 0 2px 8px rgba(0,0,0,0.18))',
|
|
307
307
|
outline: 'none',
|
package/dist/import.d.ts
CHANGED
|
@@ -62,6 +62,16 @@ export declare const BPMN_IMPORT_ERRORS: {
|
|
|
62
62
|
readonly malformedXml: readonly ["com.labre.bpmn.import.error.malformed-xml", "This file is not well-formed XML, so no BPMN can be read out of it: {{detail}}"];
|
|
63
63
|
readonly notDefinitions: readonly ["com.labre.bpmn.import.error.not-definitions", "A BPMN file opens on <definitions>; this one opens on <{{tag}}>."];
|
|
64
64
|
readonly wrongNamespace: readonly ["com.labre.bpmn.import.error.wrong-namespace", "This <definitions> is in \"{{namespace}}\", not in BPMN 2.0's (\"{{bpmnNamespace}}\"). A DMN decision model and a BPMN process open on the same element name and are not the same file."];
|
|
65
|
+
/**
|
|
66
|
+
* Its OWN entry rather than `wrongNamespace` with the words "no namespace"
|
|
67
|
+
* poured into `{{namespace}}` (#390). That fragment was English prose
|
|
68
|
+
* substituted into a translated sentence — the one shape a `messageParams`
|
|
69
|
+
* hole cannot carry, because the reader is pure and has no `std` to resolve
|
|
70
|
+
* it with. It is also a different FACT, which is what this table is a list
|
|
71
|
+
* of: a `<definitions>` in the wrong namespace names one, a `<definitions>`
|
|
72
|
+
* in none names nothing at all.
|
|
73
|
+
*/
|
|
74
|
+
readonly missingNamespace: readonly ["com.labre.bpmn.import.error.missing-namespace", "This <definitions> declares no namespace, so it does not say it is BPMN 2.0 (\"{{bpmnNamespace}}\"). A DMN decision model and a BPMN process open on the same element name and are not the same file."];
|
|
65
75
|
readonly declinedRootKind: readonly ["com.labre.bpmn.import.error.declined-root-kind", "This file is a BPMN {{kind}}, which Labre does not draw. Only a process or a collaboration can be imported."];
|
|
66
76
|
};
|
|
67
77
|
/**
|
package/dist/import.js
CHANGED
|
@@ -120,6 +120,19 @@ export const BPMN_IMPORT_ERRORS = {
|
|
|
120
120
|
'com.labre.bpmn.import.error.wrong-namespace',
|
|
121
121
|
'This <definitions> is in "{{namespace}}", not in BPMN 2.0\'s ("{{bpmnNamespace}}"). A DMN decision model and a BPMN process open on the same element name and are not the same file.',
|
|
122
122
|
],
|
|
123
|
+
/**
|
|
124
|
+
* Its OWN entry rather than `wrongNamespace` with the words "no namespace"
|
|
125
|
+
* poured into `{{namespace}}` (#390). That fragment was English prose
|
|
126
|
+
* substituted into a translated sentence — the one shape a `messageParams`
|
|
127
|
+
* hole cannot carry, because the reader is pure and has no `std` to resolve
|
|
128
|
+
* it with. It is also a different FACT, which is what this table is a list
|
|
129
|
+
* of: a `<definitions>` in the wrong namespace names one, a `<definitions>`
|
|
130
|
+
* in none names nothing at all.
|
|
131
|
+
*/
|
|
132
|
+
missingNamespace: [
|
|
133
|
+
'com.labre.bpmn.import.error.missing-namespace',
|
|
134
|
+
'This <definitions> declares no namespace, so it does not say it is BPMN 2.0 ("{{bpmnNamespace}}"). A DMN decision model and a BPMN process open on the same element name and are not the same file.',
|
|
135
|
+
],
|
|
123
136
|
declinedRootKind: [
|
|
124
137
|
'com.labre.bpmn.import.error.declined-root-kind',
|
|
125
138
|
'This file is a BPMN {{kind}}, which Labre does not draw. Only a process or a collaboration can be imported.',
|
|
@@ -469,7 +482,19 @@ function parseDefinitions(source) {
|
|
|
469
482
|
// Without this a `.dmn` imports as an empty board, which is exactly the
|
|
470
483
|
// "three zeroes claiming an empty process" this reader refuses to return.
|
|
471
484
|
if (root.namespaceURI !== BPMN_NS.model) {
|
|
472
|
-
|
|
485
|
+
// Two facts, two refusals: a namespace this reader can quote back, and no
|
|
486
|
+
// namespace at all. The second used to borrow the first's sentence with
|
|
487
|
+
// the English words "no namespace" poured into its `{{namespace}}` hole,
|
|
488
|
+
// which put a fragment of English inside a translated sentence (#390).
|
|
489
|
+
const namespace = root.namespaceURI;
|
|
490
|
+
if (namespace === null) {
|
|
491
|
+
throw new InterchangeImportError(`This <definitions> declares no namespace, so it does not say it is ` +
|
|
492
|
+
`BPMN 2.0 ("${BPMN_NS.model}"). A DMN decision model and a BPMN ` +
|
|
493
|
+
`process open on the same element name and are not the same file.`, {
|
|
494
|
+
messageKey: BPMN_IMPORT_ERRORS.missingNamespace[0],
|
|
495
|
+
messageParams: { bpmnNamespace: BPMN_NS.model },
|
|
496
|
+
});
|
|
497
|
+
}
|
|
473
498
|
throw new InterchangeImportError(`This <definitions> is in "${namespace}", not ` +
|
|
474
499
|
`in BPMN 2.0's ("${BPMN_NS.model}"). A DMN decision model and a BPMN ` +
|
|
475
500
|
`process open on the same element name and are not the same file.`, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-bpmn",
|
|
3
3
|
"description": "Labre bpmn framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.43.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formicoidea/labre-core": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.43.1",
|
|
35
35
|
"lit": "^3.2.0"
|
|
36
36
|
}
|
|
37
37
|
}
|