qms-angular 1.1.34 → 1.1.36
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/qms-angular.umd.js +373 -194
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/common/enum/document-field-status.js +7 -0
- package/esm2015/lib/common/models/qms-flat-node.model.js +1 -1
- package/esm2015/lib/common/models/qms-tree-node.model.js +1 -1
- package/esm2015/lib/components/qms-stepper/models/qms-stepper.model.js +4 -3
- package/esm2015/lib/components/qms-stepper/qms-stepper.component.js +5 -3
- package/esm2015/lib/components/related/common/video.const.js +4 -0
- package/esm2015/lib/components/related/model/popup-data.model.js +1 -1
- package/esm2015/lib/components/related/model/risk-danger.model.js +2 -1
- package/esm2015/lib/components/related/popup/related-popup.component.js +30 -12
- package/esm2015/lib/components/related/risk/list/list.component.js +4 -3
- package/esm2015/lib/components/select-department/model/select-department-popup-data.model.js +1 -1
- package/esm2015/lib/components/select-department/select-department.component.js +29 -7
- package/esm2015/lib/components/select-department-tree/model/select-department-tree.config.js +5 -1
- package/esm2015/lib/components/select-department-tree/select-department-tree.component.js +45 -8
- package/esm2015/lib/components/select-process-document/select-process-document.component.js +1 -1
- package/esm2015/lib/components/tree/model/tree-node.model.js +1 -1
- package/esm2015/lib/components/tree/tree.component.js +75 -42
- package/esm2015/lib/components/tree/tree.function.js +2 -1
- package/esm2015/lib/model/en.js +5 -2
- package/esm2015/lib/model/no.js +5 -2
- package/esm2015/lib/qms-ckeditor-components/common/classes/qmsUploadAdapter.js +1 -5
- package/esm2015/lib/qms-ckeditor-components/common/constants/iconSvg.constants.js +2 -1
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +3 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +9 -2
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link-simple/qms-ckeditor-link-simple.component.js +2 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +14 -9
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +17 -47
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +68 -28
- package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-template.model.js +3 -2
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +10 -8
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +3 -1
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.js +5 -2
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckedtior-template.service.js +8 -5
- package/fesm2015/qms-angular.js +336 -181
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/common/enum/document-field-status.d.ts +5 -0
- package/lib/common/models/qms-flat-node.model.d.ts +3 -0
- package/lib/common/models/qms-tree-node.model.d.ts +3 -0
- package/lib/components/qms-stepper/models/qms-stepper.model.d.ts +3 -2
- package/lib/components/qms-stepper/qms-stepper.component.d.ts +2 -0
- package/lib/components/related/common/video.const.d.ts +3 -0
- package/lib/components/related/model/popup-data.model.d.ts +2 -0
- package/lib/components/related/model/risk-danger.model.d.ts +1 -0
- package/lib/components/related/popup/related-popup.component.d.ts +5 -2
- package/lib/components/related/risk/list/list.component.d.ts +1 -0
- package/lib/components/select-department/model/select-department-popup-data.model.d.ts +2 -0
- package/lib/components/select-department/select-department.component.d.ts +9 -1
- package/lib/components/select-department-tree/model/select-department-tree.config.d.ts +4 -0
- package/lib/components/select-department-tree/select-department-tree.component.d.ts +7 -1
- package/lib/components/tree/model/tree-node.model.d.ts +1 -0
- package/lib/components/tree/tree.component.d.ts +2 -1
- package/lib/model/en.d.ts +3 -0
- package/lib/model/no.d.ts +3 -0
- package/lib/qms-ckeditor-components/common/classes/qmsUploadAdapter.d.ts +0 -1
- package/lib/qms-ckeditor-components/common/constants/iconSvg.constants.d.ts +1 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.d.ts +2 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.d.ts +1 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.d.ts +4 -2
- package/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.d.ts +1 -1
- package/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.d.ts +17 -3
- package/lib/qms-ckeditor-components/models/qms-ckeditor-template.model.d.ts +3 -1
- package/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.d.ts +1 -1
- package/lib/qms-ckeditor-components/services/qms-ckedtior-template.service.d.ts +2 -1
- package/package.json +1 -1
- package/qms-angular.metadata.json +1 -1
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
- package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkcommand.js +4 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkdialogcommand.js +66 -14
- package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkui.js +1 -1
- package/src/lib/components/qms-stepper/qms-stepper.component.scss +4 -0
- package/src/lib/components/select-process-document/select-process-document.component.scss +3 -0
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.scss +26 -0
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.scss +5 -0
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.scss +21 -0
@@ -149,6 +149,10 @@ export default class LinkCommand extends Command {
|
|
149
149
|
* @param {Object} [manualDecoratorIds={}] The information about manual decorator attributes to be applied or removed upon execution.
|
150
150
|
*/
|
151
151
|
execute(options) {
|
152
|
+
if(!options) {
|
153
|
+
return;
|
154
|
+
}
|
155
|
+
|
152
156
|
const model = this.editor.model;
|
153
157
|
const selection = model.document.selection;
|
154
158
|
const manualDecoratorIds = {};
|
@@ -4,9 +4,10 @@ import { Collection, first } from '@ckeditor/ckeditor5-utils';
|
|
4
4
|
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
|
5
5
|
import * as QMSCKEditorEnum from '../common/qmsCKEditorEnum';
|
6
6
|
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
7
|
-
import { isImageAllowed } from './utils';
|
7
|
+
import { isImageAllowed, isLinkElement} from './utils';
|
8
8
|
import AutomaticDecorators from './utils/automaticdecorators';
|
9
|
-
|
9
|
+
import * as QMSCKEditorUtil from '../common/qmsCKEditorUtil';
|
10
|
+
|
10
11
|
export default class LinkDialogCommand extends Command {
|
11
12
|
constructor( editor ) {
|
12
13
|
super( editor );
|
@@ -48,18 +49,38 @@ import AutomaticDecorators from './utils/automaticdecorators';
|
|
48
49
|
const ranges = selection.getFirstRange();
|
49
50
|
|
50
51
|
let link = QMSCKEditorEnum.hyperLink;
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
52
|
+
|
53
|
+
let parentLink = this._getSelectedLinkElement();
|
54
|
+
|
55
|
+
if(parentLink) {
|
56
|
+
let linkOption = parentLink.getAttribute('url') || parentLink.getAttribute('option');
|
57
|
+
link.typeId = QMSCKEditorUtil.getLinkType(linkOption);
|
58
|
+
link.targetId = parentLink.getAttribute('target') ? QMSCKEditorEnum.targetEnum[parentLink.getAttribute('target')] : 0;
|
59
|
+
if (parentLink._children.length > 0) {
|
60
|
+
link.title = parentLink._children[0]._textData ? parentLink._children[0]._textData.trim() : '';
|
61
|
+
}
|
62
|
+
else {
|
63
|
+
link.title = '';
|
64
|
+
}
|
65
|
+
link.protocolId = QMSCKEditorUtil.getProtocolId(linkOption);
|
66
|
+
link.url = parentLink.getAttribute('href') || '';
|
67
|
+
link.edit = true;
|
68
|
+
link.ckeditorId = editor.id;
|
69
|
+
} else {
|
70
|
+
link.typeId = 0;
|
71
|
+
link.targetId = 0;
|
72
|
+
link.protocolId = 0;
|
73
|
+
link.url = '';
|
74
|
+
link.title = '';
|
75
|
+
link.editorContent = '';
|
76
|
+
link.ckeditorId = editor.id;
|
77
|
+
for (const item of ranges.getItems()) {
|
78
|
+
if (item.data) {
|
79
|
+
link.title = item.data;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
63
84
|
QMSCKEditorService.linkNotify(link);
|
64
85
|
window[QMSCKEditorConstant.QMSCK_LINKED] = false;
|
65
86
|
window.addEventListener(QMSCKEditorConstant.QMSCK_LINK_PLUGIN_RESP, function(evt) {
|
@@ -88,4 +109,35 @@ import AutomaticDecorators from './utils/automaticdecorators';
|
|
88
109
|
|
89
110
|
return doc.selection.getAttribute( decoratorName );
|
90
111
|
}
|
112
|
+
|
113
|
+
_getSelectedLinkElement() {
|
114
|
+
const view = this.editor.editing.view;
|
115
|
+
const selection = view.document.selection;
|
116
|
+
|
117
|
+
if ( selection.isCollapsed ) {
|
118
|
+
return findLinkElementAncestor( selection.getFirstPosition() );
|
119
|
+
} else {
|
120
|
+
// The range for fully selected link is usually anchored in adjacent text nodes.
|
121
|
+
// Trim it to get closer to the actual link element.
|
122
|
+
const range = selection.getFirstRange().getTrimmed();
|
123
|
+
const startLink = findLinkElementAncestor( range.start );
|
124
|
+
const endLink = findLinkElementAncestor( range.end );
|
125
|
+
|
126
|
+
if ( !startLink || startLink != endLink ) {
|
127
|
+
return null;
|
128
|
+
}
|
129
|
+
|
130
|
+
// Check if the link element is fully selected.
|
131
|
+
if ( view.createRangeIn( startLink ).getTrimmed().isEqual( range ) ) {
|
132
|
+
return startLink;
|
133
|
+
} else {
|
134
|
+
return null;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
91
139
|
}
|
140
|
+
|
141
|
+
function findLinkElementAncestor( position ) {
|
142
|
+
return position.getAncestors().find( ancestor => isLinkElement( ancestor ) );
|
143
|
+
}
|
@@ -144,7 +144,7 @@ export default class LinkUI extends Plugin {
|
|
144
144
|
|
145
145
|
parentLink = this._getSelectedLinkElement();
|
146
146
|
|
147
|
-
|
147
|
+
let linkOption = parentLink.getAttribute('url') || parentLink.getAttribute('option');
|
148
148
|
link.typeId = QMSCKEditorUtil.getLinkType(linkOption);
|
149
149
|
link.targetId = parentLink.getAttribute('target') ? QMSCKEditorEnum.targetEnum[parentLink.getAttribute('target')] : 0;
|
150
150
|
if (parentLink._children.length > 0) {
|
@@ -17,6 +17,32 @@
|
|
17
17
|
border: solid;
|
18
18
|
border-width: 0px 1px 1px 0px;
|
19
19
|
overflow-y: auto;
|
20
|
+
|
21
|
+
.textarea-field {
|
22
|
+
display: flex;
|
23
|
+
justify-content: space-between;
|
24
|
+
}
|
25
|
+
|
26
|
+
.range-field {
|
27
|
+
height: 40px;
|
28
|
+
margin-bottom: 15px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.units {
|
32
|
+
font-size: 12px;
|
33
|
+
}
|
34
|
+
|
35
|
+
.connection-wrapper {
|
36
|
+
padding-bottom: 1.34375em;
|
37
|
+
|
38
|
+
.mat-card-wrapper {
|
39
|
+
padding-right: 0px;
|
40
|
+
}
|
41
|
+
.connection-content {
|
42
|
+
display: flex;
|
43
|
+
justify-content: space-between;
|
44
|
+
}
|
45
|
+
}
|
20
46
|
}
|
21
47
|
|
22
48
|
#toolbarpanel {
|
@@ -11,4 +11,25 @@
|
|
11
11
|
.template-checkbox{
|
12
12
|
padding-top: 20px;
|
13
13
|
}
|
14
|
+
|
15
|
+
.selected-image {
|
16
|
+
display: flex;
|
17
|
+
align-items: center;
|
18
|
+
padding-bottom: 10px;
|
19
|
+
|
20
|
+
.input-upload {
|
21
|
+
height: 60px;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
.form-content-height {
|
26
|
+
min-height: 350px;
|
27
|
+
max-height: 410px;
|
28
|
+
}
|
29
|
+
|
30
|
+
.template-button-group {
|
31
|
+
padding-top: 10px;
|
32
|
+
padding-right: 0.5rem;
|
33
|
+
padding-left: 0.5rem;
|
34
|
+
}
|
14
35
|
}
|