qms-angular 1.1.35 → 1.1.37

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.
Files changed (55) hide show
  1. package/bundles/qms-angular.umd.js +179 -89
  2. package/bundles/qms-angular.umd.js.map +1 -1
  3. package/esm2015/lib/components/comment/comment-log.model.js +1 -1
  4. package/esm2015/lib/components/comment/comment.js +4 -3
  5. package/esm2015/lib/components/qms-paginator/qms-paginator.component.js +2 -2
  6. package/esm2015/lib/components/qms-stepper/models/qms-stepper.model.js +4 -4
  7. package/esm2015/lib/components/qms-stepper/qms-stepper.component.js +2 -4
  8. package/esm2015/lib/components/related/model/popup-data.model.js +3 -1
  9. package/esm2015/lib/components/related/model/risk-danger.model.js +2 -1
  10. package/esm2015/lib/components/related/popup/related-popup.component.js +34 -9
  11. package/esm2015/lib/components/related/risk/list/list.component.js +4 -3
  12. package/esm2015/lib/components/select-department/select-department.component.js +3 -3
  13. package/esm2015/lib/components/select-department-tree/model/select-department-tree.config.js +5 -1
  14. package/esm2015/lib/components/select-department-tree/select-department-tree.component.js +19 -13
  15. package/esm2015/lib/components/select-process-document/select-process-document.component.js +3 -3
  16. package/esm2015/lib/components/tree/tree.component.js +1 -2
  17. package/esm2015/lib/model/en.js +5 -2
  18. package/esm2015/lib/model/no.js +5 -2
  19. package/esm2015/lib/qms-ckeditor-components/common/enums/video-upload-mode.enum.js +7 -0
  20. package/esm2015/lib/qms-ckeditor-components/common/flowchart/config/toolbar.function.js +31 -30
  21. package/esm2015/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.js +23 -2
  22. package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +3 -3
  23. package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.js +1 -1
  24. package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +22 -10
  25. package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.js +10 -1
  26. package/fesm2015/qms-angular.js +168 -82
  27. package/fesm2015/qms-angular.js.map +1 -1
  28. package/lib/components/comment/comment-log.model.d.ts +1 -0
  29. package/lib/components/comment/comment.d.ts +1 -0
  30. package/lib/components/qms-stepper/models/qms-stepper.model.d.ts +3 -3
  31. package/lib/components/qms-stepper/qms-stepper.component.d.ts +0 -2
  32. package/lib/components/related/model/popup-data.model.d.ts +3 -0
  33. package/lib/components/related/model/risk-danger.model.d.ts +1 -0
  34. package/lib/components/related/popup/related-popup.component.d.ts +9 -0
  35. package/lib/components/related/risk/list/list.component.d.ts +1 -0
  36. package/lib/components/select-department/select-department.component.d.ts +1 -1
  37. package/lib/components/select-department-tree/model/select-department-tree.config.d.ts +4 -0
  38. package/lib/model/en.d.ts +3 -0
  39. package/lib/model/no.d.ts +3 -0
  40. package/lib/qms-ckeditor-components/common/enums/video-upload-mode.enum.d.ts +5 -0
  41. package/lib/qms-ckeditor-components/common/flowchart/service/kitchensink-service.d.ts +2 -0
  42. package/lib/qms-ckeditor-components/common/models/qms-ckeditor-data.model.d.ts +1 -0
  43. package/lib/qms-ckeditor-components/services/qms-ckeditor-upload.service.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/qms-angular.metadata.json +1 -1
  46. package/src/assets/jointjs/scss/rappid.scss +17 -0
  47. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js +1 -1
  48. package/src/assets/qms-ckeditor-plugin/build/ckeditor.js.map +1 -1
  49. package/src/assets/qms-ckeditor-plugin/src/plugins/fullscreen/qmsCKEditorFullscreenPlugin.js +2 -2
  50. package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkcommand.js +4 -0
  51. package/src/assets/qms-ckeditor-plugin/src/plugins/link/linkdialogcommand.js +66 -14
  52. package/src/lib/components/related/popup/related-popup.component.scss +10 -0
  53. package/src/lib/components/select-process-document/select-process-document.component.scss +4 -0
  54. package/esm2015/lib/common/enum/document-field-status.js +0 -7
  55. package/lib/common/enum/document-field-status.d.ts +0 -5
@@ -12,7 +12,7 @@ export default class QMSCKEditorFullscreenPlugin extends Plugin {
12
12
  const view = new ButtonView(locale);
13
13
 
14
14
  view.set({
15
- label: 'Maximine',
15
+ label: 'Maximize',
16
16
  icon: fullscreenIcon,
17
17
  tooltip: true
18
18
  });
@@ -33,7 +33,7 @@ export default class QMSCKEditorFullscreenPlugin extends Plugin {
33
33
  }
34
34
  else {
35
35
  view.set({
36
- label: 'Maximine',
36
+ label: 'Maximize',
37
37
  icon: fullscreenIcon,
38
38
  tooltip: true
39
39
  });
@@ -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
- link.typeId = 0;
52
- link.targetId = 0;
53
- link.protocolId = 0;
54
- link.url = '';
55
- link.title = '';
56
- link.editorContent = '';
57
- link.ckeditorId = editor.id;
58
- for (const item of ranges.getItems()) {
59
- if (item.data) {
60
- link.title = item.data;
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
+ }
@@ -187,6 +187,11 @@
187
187
  }
188
188
  }
189
189
  }
190
+
191
+ .module-name {
192
+ margin-top: 10px;
193
+ display: block;
194
+ }
190
195
  }
191
196
 
192
197
  cdk-virtual-scroll-viewport {
@@ -312,6 +317,10 @@ cdk-virtual-scroll-viewport {
312
317
  font-weight: 600;
313
318
  font-family: "Raleway";
314
319
 
320
+ .module-title {
321
+ width: 200px;
322
+ }
323
+
315
324
  .selected-image {
316
325
  display: flex;
317
326
  align-items: center;
@@ -320,6 +329,7 @@ cdk-virtual-scroll-viewport {
320
329
  .input-upload {
321
330
  height: 60px;
322
331
  padding-left: 30px;
332
+ max-width: 260px;
323
333
  }
324
334
  }
325
335
  }
@@ -50,6 +50,10 @@
50
50
  margin-top: 12px;
51
51
  }
52
52
 
53
+ .panel-tree-min-width {
54
+ min-width: -webkit-fill-available;
55
+ }
56
+
53
57
  .panel-tree {
54
58
  overflow: auto;
55
59
  width: fit-content;
@@ -1,7 +0,0 @@
1
- export var DocumentFieldStatus;
2
- (function (DocumentFieldStatus) {
3
- DocumentFieldStatus[DocumentFieldStatus["Normal"] = 1] = "Normal";
4
- DocumentFieldStatus[DocumentFieldStatus["Mandatory"] = 2] = "Mandatory";
5
- DocumentFieldStatus[DocumentFieldStatus["Deleted"] = 3] = "Deleted";
6
- })(DocumentFieldStatus || (DocumentFieldStatus = {}));
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQtZmllbGQtc3RhdHVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcW1zLWFuZ3VsYXIvc3JjL2xpYi9jb21tb24vZW51bS9kb2N1bWVudC1maWVsZC1zdGF0dXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksbUJBSVg7QUFKRCxXQUFZLG1CQUFtQjtJQUM3QixpRUFBVSxDQUFBO0lBQ1YsdUVBQWEsQ0FBQTtJQUNiLG1FQUFXLENBQUE7QUFDYixDQUFDLEVBSlcsbUJBQW1CLEtBQW5CLG1CQUFtQixRQUk5QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIERvY3VtZW50RmllbGRTdGF0dXMge1xyXG4gIE5vcm1hbCA9IDEsXHJcbiAgTWFuZGF0b3J5ID0gMixcclxuICBEZWxldGVkID0gM1xyXG59Il19
@@ -1,5 +0,0 @@
1
- export declare enum DocumentFieldStatus {
2
- Normal = 1,
3
- Mandatory = 2,
4
- Deleted = 3
5
- }