Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge epic/FOUR-18036 (Documentation PDF Print) to Release FALL 2024 #1885

Merged
merged 12 commits into from
Oct 22, 2024
17 changes: 17 additions & 0 deletions src/components/modeler/Modeler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@
return false;
},
},
forPrinting: {
type: Boolean,
default() {
return false;
},
},
},
mixins: [hotkeys, cloneSelection, linkEditing, transparentDragging],
data() {
Expand Down Expand Up @@ -540,9 +546,19 @@
},
},
methods: {
getSvg() {
const svg = document.querySelector('.mini-paper svg');
const css = 'text { font-family: sans-serif; }';
const style = document.createElement('style');
style.appendChild(document.createTextNode(css));
svg.appendChild(style);
const svgString = (new XMLSerializer()).serializeToString(svg);
return svgString;
},
mountedInit() {
store.commit('setReadOnly', this.readOnly);
store.commit('setForDocumenting', this.forDocumenting);
store.commit('setForPrinting', this.forPrinting);
this.graph = new dia.Graph();
store.commit('setGraph', this.graph);
this.graph.set('interactiveFunc', cellView => {
Expand Down Expand Up @@ -599,7 +615,7 @@
fill: '#1572C2',
strokeWidth: 0,
},
text: { text: event.number , fill: 'white', fontSize: 20, fontWeight: 'bold'},

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / setup

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (0)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (2)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (7)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (4)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (3)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (9)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (1)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (6)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (10)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (5)

A space is required before '}'

Check warning on line 618 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (8)

A space is required before '}'
},
});

Expand Down Expand Up @@ -1128,7 +1144,7 @@
}
},
registerStatusBar(component) {
this.owner.validationBar.push(component);

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / setup

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (0)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (2)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (7)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (4)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (3)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (9)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (1)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (6)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (10)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (5)

Unexpected mutation of "owner" prop

Check warning on line 1147 in src/components/modeler/Modeler.vue

View workflow job for this annotation

GitHub Actions / e2e (8)

Unexpected mutation of "owner" prop
},
/**
* Register a mixin into a node component.
Expand Down Expand Up @@ -1466,6 +1482,7 @@
if (emitChangeEvent) {
window.ProcessMaker.EventBus.$emit('modeler-change');
}
window.ProcessMaker.EventBus.$emit('modeler-xml-loaded');
},
getBoundaryEvents(process) {
return process.get('flowElements').filter(({ $type }) => $type === 'bpmn:BoundaryEvent');
Expand Down
5 changes: 5 additions & 0 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default new Vuex.Store({
clientLeftPaper: false,
readOnly: false,
forDocumenting: false,
forPrinting: false,
isMultiplayer: false,
},
getters: {
Expand All @@ -62,6 +63,7 @@ export default new Vuex.Store({
clientLeftPaper: state => state.clientLeftPaper,
isReadOnly: state => state.readOnly,
isForDocumenting: state => state.forDocumenting,
isForPrinting: state => state.forPrinting,
showComponent: state => !state.readOnly,
showPanTool: state => state.forDocumenting,
isMultiplayer: state => state.isMultiplayer,
Expand All @@ -73,6 +75,9 @@ export default new Vuex.Store({
setForDocumenting(state, value) {
state.forDocumenting = value;
},
setForPrinting(state, value) {
state.forPrinting = value;
},
preventSavingElementPosition(state) {
state.allowSavingElementPosition = false;
},
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { saveDebounce } from '../../../src/components/inspectors/inspectorConsta
import path from 'path';
import { boundaryEventSelector, nodeTypes, taskSelector } from './constants';

const renderTime = 300;
const renderTime = 5000;

export function getTinyMceEditor() {
return cy
Expand Down
Loading