qms-angular 1.0.70 → 1.0.71
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/bundles/qms-angular.umd.js +1108 -126
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/button/button.js +1 -1
- package/esm2015/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.js +5 -3
- package/esm2015/lib/components/qms-paginator/index.js +2 -0
- package/esm2015/lib/components/qms-paginator/public_api.js +3 -0
- package/esm2015/lib/components/qms-paginator/qms-paginator.component.js +173 -0
- package/esm2015/lib/components/qms-paginator/qms-paginator.module.js +34 -0
- package/esm2015/lib/components/qms-status-dropdown/qms-status-dropdown.component.js +2 -2
- package/esm2015/lib/model/en.js +21 -3
- package/esm2015/lib/model/no.js +20 -2
- package/esm2015/lib/qms-ckeditor-components/common/bpmn/inspector.function.js +68 -16
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.js +5 -1
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.js +10 -1
- package/esm2015/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.js +7 -0
- package/esm2015/lib/qms-ckeditor-components/common/enums/document-type.enum.js +2 -1
- package/esm2015/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.js +8 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.js +9 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.js +9 -0
- package/esm2015/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.js +3 -0
- package/esm2015/lib/qms-ckeditor-components/common/module/confirm/qms-ckeditor-confirm.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +545 -34
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.js +46 -18
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-imagemap/qms-ckeditor-imagemap.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/attachments/link-attachment.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-load-template/qms-ckeditor-load-template.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-relation/qmsckeditor-related.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-template/qms-ckeditor-template.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-tooltip/qms-ckeditor-tooltip.component.js +1 -1
- package/esm2015/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.js +8 -0
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +9 -3
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.module.js +4 -2
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.js +58 -20
- package/esm2015/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.js +26 -0
- package/esm2015/public-api.js +6 -1
- package/esm2015/qms-angular.js +2 -1
- package/fesm2015/qms-angular.js +1028 -104
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.d.ts +1 -0
- package/lib/components/qms-paginator/index.d.ts +1 -0
- package/lib/components/qms-paginator/public_api.d.ts +2 -0
- package/lib/components/qms-paginator/qms-paginator.component.d.ts +51 -0
- package/lib/components/qms-paginator/qms-paginator.module.d.ts +2 -0
- package/lib/model/en.d.ts +18 -0
- package/lib/model/no.d.ts +18 -0
- package/lib/qms-ckeditor-components/common/bpmn/inspector.function.d.ts +28 -0
- package/lib/qms-ckeditor-components/common/constants/ckeditorEvent.constant.d.ts +4 -0
- package/lib/qms-ckeditor-components/common/constants/ckeditorFlowchart.const.d.ts +9 -0
- package/lib/qms-ckeditor-components/common/constants/ckeditorLink.constant.d.ts +6 -0
- package/lib/qms-ckeditor-components/common/enums/document-type.enum.d.ts +1 -0
- package/lib/qms-ckeditor-components/common/enums/shape-flow-chart-connection-type.d.ts +6 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart-template.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-flowchart.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/common/models/qms-ckeditor-save-as-template.model.d.ts +5 -0
- package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.d.ts +85 -4
- package/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/save-template/save-template.component.d.ts +8 -2
- package/lib/qms-ckeditor-components/models/qms-ckeditor-bpmn-data.model.d.ts +7 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-bpmn.service.d.ts +1 -0
- package/lib/qms-ckeditor-components/services/qms-ckeditor-flowchart.service.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/qms-angular.d.ts +1 -0
- package/qms-angular.metadata.json +1 -1
- package/src/assets/jointjs/js/rappid.js +55919 -55836
- package/src/assets/jointjs/scss/bpmn.scss +2 -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/bpmn/qmsCKEditorBpmnPlugin.js +31 -6
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorConstant.js +7 -1
- package/src/assets/qms-ckeditor-plugin/src/plugins/common/qmsCKEditorUtil.js +29 -7
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/converters.js +93 -92
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemap.js +4 -4
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapcommand.js +92 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapdialogcommand.js +59 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapediting.js +92 -87
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/imagemapui.js +13 -14
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/resizeimagemapcommand.js +25 -24
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/utils.js +40 -49
- package/src/lib/components/button/button-icon.scss +5 -1
- package/src/lib/components/qms-navigation-drawer/qms-navigation-drawer.component.scss +6 -2
- package/src/lib/components/qms-paginator/qms-paginator.component.scss +128 -0
- package/src/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.scss +69 -17
- package/src/lib/qms-ckeditor-components/styles/_modules.scss +9 -1
- package/src/themes/core/_table.scss +1 -0
- package/src/assets/qms-ckeditor-plugin/src/plugins/imagemap/insertimagemapcommand.js +0 -128
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
import { trimStart } from '../common/qmsCKEditorUtil';
|
2
|
+
|
3
|
+
export const HTML_ATTRIBUTES = {
|
2
4
|
COORDS: 'coords',
|
3
5
|
HREF: 'href',
|
4
6
|
SHAPE: 'shape',
|
@@ -6,7 +8,7 @@ export const HtmlAttributes = {
|
|
6
8
|
TARGET: 'target',
|
7
9
|
USE_MAP: 'usemap',
|
8
10
|
ALT: 'alt',
|
9
|
-
WIDTH: 'width',
|
11
|
+
WIDTH: 'width',
|
10
12
|
HEIGHT: 'height',
|
11
13
|
SRC: 'src',
|
12
14
|
ID: 'id',
|
@@ -14,44 +16,48 @@ export const HtmlAttributes = {
|
|
14
16
|
}
|
15
17
|
|
16
18
|
|
17
|
-
export const
|
19
|
+
export const HTML_ELEMENTS = {
|
18
20
|
MAP: 'map',
|
19
21
|
IMAGE: 'img',
|
20
22
|
AREA: 'area'
|
21
23
|
}
|
22
24
|
|
23
25
|
|
24
|
-
export const
|
26
|
+
export const IMAGEMAP_ATTRIBUTES = {
|
25
27
|
MAP_AREAS: 'mapareas',
|
26
28
|
MAP_NAME: 'mapname' ,
|
27
|
-
MAP_WIDTH: 'mapwidth',
|
29
|
+
MAP_WIDTH: 'mapwidth',
|
28
30
|
MAP_HEIGHT: 'mapheight',
|
29
31
|
IMAGE_USE_MAP: 'imageusemap',
|
30
32
|
IMAGE_SAVED_SRC: 'imagesavedsrc',
|
31
33
|
IMAGE_SRC: 'src',//It is already defined by the image plugin
|
32
|
-
IMAGE_WIDTH: 'imagewidth',
|
34
|
+
IMAGE_WIDTH: 'imagewidth',
|
33
35
|
IMAGE_HEIGHT: 'imageheight',
|
34
36
|
}
|
35
37
|
|
36
|
-
export const
|
37
|
-
|
38
|
-
|
38
|
+
export const IMAGEMAP_COMMANDS = {
|
39
|
+
IMAGEMAP_DIALOG: 'imagemapdialog',
|
40
|
+
IMAGEMAP: 'imagemap',
|
41
|
+
RESIZE_IMAGEMAP: 'resizeimagemap'
|
39
42
|
}
|
40
43
|
|
41
|
-
export const
|
42
|
-
MAP: '
|
44
|
+
export const IMAGEMAP_ELEMENTS = {
|
45
|
+
MAP: 'qmsmap',
|
43
46
|
IMAGE: 'image'//It is already defined by the image plugin
|
44
47
|
}
|
45
48
|
|
46
|
-
export function
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
return text;
|
49
|
+
export function createInsertedEvent(mapname){
|
50
|
+
return trimStart(mapname, '#') + '_inserted';
|
51
|
+
}
|
52
|
+
|
53
|
+
export function createRemovedEvent(mapname){
|
54
|
+
return trimStart(mapname, '#') + '_removed';
|
53
55
|
}
|
54
|
-
|
56
|
+
|
57
|
+
export function createResizedEvent(mapname){
|
58
|
+
return trimStart(mapname, '#') + '_resized';
|
59
|
+
}
|
60
|
+
|
55
61
|
export function parsePixelToFloat(pixel, fractionDigits){
|
56
62
|
if(pixel){
|
57
63
|
pixel = pixel.toString().replaceAll('px', '');
|
@@ -67,13 +73,13 @@ export function parsePixelToFloat(pixel, fractionDigits){
|
|
67
73
|
}
|
68
74
|
|
69
75
|
function isMapNode(lowerCaseNameObject, node){
|
70
|
-
return node.is('element',
|
71
|
-
&& node.hasAttribute(
|
72
|
-
&& lowerCaseNameObject[getLowerCaseMapName(node)];
|
76
|
+
return node.is('element', IMAGEMAP_ELEMENTS.MAP)
|
77
|
+
&& node.hasAttribute(IMAGEMAP_ATTRIBUTES.MAP_NAME)
|
78
|
+
&& lowerCaseNameObject[getLowerCaseMapName(node)];
|
73
79
|
}
|
74
80
|
|
75
81
|
function getLowerCaseMapName(node){
|
76
|
-
return node.getAttribute(
|
82
|
+
return node.getAttribute(IMAGEMAP_ATTRIBUTES.MAP_NAME).toLowerCase();
|
77
83
|
}
|
78
84
|
|
79
85
|
export function findMapNodes(names, range) {
|
@@ -95,7 +101,7 @@ export function findMapNodes(names, range) {
|
|
95
101
|
}
|
96
102
|
return Object.keys(nodes).map(key => nodes[key]);
|
97
103
|
};
|
98
|
-
|
104
|
+
|
99
105
|
|
100
106
|
export function findFirstMapNode(name, range) {
|
101
107
|
if(!name) { return null; }
|
@@ -112,8 +118,6 @@ export function findFirstMapNode(name, range) {
|
|
112
118
|
}
|
113
119
|
return null;
|
114
120
|
};
|
115
|
-
|
116
|
-
|
117
121
|
|
118
122
|
export function resizeAreaWidth(area, ratio) {
|
119
123
|
var coords = area.coords.split(',');
|
@@ -156,22 +160,9 @@ export function resizeAreaHeight(area, ratio, widthChanged) {
|
|
156
160
|
return area;
|
157
161
|
}
|
158
162
|
};
|
159
|
-
|
160
|
-
export function debounced(fn, delay) {
|
161
|
-
let timerId;
|
162
|
-
return function (...args) {
|
163
|
-
if (timerId) {
|
164
|
-
clearTimeout(timerId);
|
165
|
-
}
|
166
|
-
timerId = setTimeout(() => {
|
167
|
-
fn(...args);
|
168
|
-
timerId = null;
|
169
|
-
}, delay);
|
170
|
-
}
|
171
|
-
}
|
172
163
|
|
173
164
|
export function drawMap(imageSrc, imageWidth, imageHeight, areas, callback){
|
174
|
-
if(areas && areas.length > 0){
|
165
|
+
if(areas && areas.length > 0){
|
175
166
|
try
|
176
167
|
{
|
177
168
|
var tempImage = new Image(imageWidth, imageHeight);
|
@@ -179,13 +170,13 @@ export function drawMap(imageSrc, imageWidth, imageHeight, areas, callback){
|
|
179
170
|
tempImage.addEventListener("load", () =>{
|
180
171
|
var canvas = document.createElement('canvas');
|
181
172
|
var context = canvas.getContext('2d');
|
182
|
-
|
173
|
+
|
183
174
|
canvas.width = imageWidth;
|
184
175
|
canvas.height = imageHeight;
|
185
176
|
context.drawImage(tempImage, 0, 0, imageWidth, imageHeight);
|
186
177
|
context.strokeStyle = "#FF0000";
|
187
178
|
context.lineWidth = 1;
|
188
|
-
|
179
|
+
|
189
180
|
for (var i = 0; i < areas.length; i++) {
|
190
181
|
const area = areas[i];
|
191
182
|
const coords = area.coords.split(',');
|
@@ -196,7 +187,7 @@ export function drawMap(imageSrc, imageWidth, imageHeight, areas, callback){
|
|
196
187
|
context.closePath();
|
197
188
|
context.stroke();
|
198
189
|
break;
|
199
|
-
|
190
|
+
|
200
191
|
case 'poly':
|
201
192
|
context.beginPath();
|
202
193
|
context.moveTo(coords[0], coords[1]);
|
@@ -206,7 +197,7 @@ export function drawMap(imageSrc, imageWidth, imageHeight, areas, callback){
|
|
206
197
|
context.closePath();
|
207
198
|
context.stroke();
|
208
199
|
break;
|
209
|
-
|
200
|
+
|
210
201
|
default:
|
211
202
|
context.strokeRect(coords[0], coords[1], coords[2] - coords[0], coords[3] - coords[1]);
|
212
203
|
break;
|
@@ -219,16 +210,16 @@ export function drawMap(imageSrc, imageWidth, imageHeight, areas, callback){
|
|
219
210
|
newSrc = canvas.toDataURL();
|
220
211
|
}
|
221
212
|
catch(err){
|
222
|
-
|
213
|
+
|
223
214
|
}
|
224
215
|
if(callback){
|
225
216
|
callback(oldSrc, newSrc);
|
226
217
|
}
|
227
|
-
|
218
|
+
|
228
219
|
}, false);
|
229
220
|
}
|
230
221
|
catch(err){
|
231
|
-
|
232
|
-
}
|
222
|
+
|
223
|
+
}
|
233
224
|
}
|
234
|
-
}
|
225
|
+
}
|
@@ -87,11 +87,15 @@ $size: 48px;
|
|
87
87
|
color: $primary;
|
88
88
|
|
89
89
|
&:not([disabled]):hover,
|
90
|
-
&:not([disabled]):active,
|
91
90
|
&:not([disabled]):focus {
|
92
91
|
background-color: $primary-light-3-opacity;
|
93
92
|
color: $primary;
|
94
93
|
}
|
94
|
+
|
95
|
+
&:not([disabled]):active {
|
96
|
+
background-color: $primary-light-6-opacity;
|
97
|
+
color: $primary;
|
98
|
+
}
|
95
99
|
}
|
96
100
|
}
|
97
101
|
|
@@ -10,6 +10,10 @@
|
|
10
10
|
margin : 16px 0px;
|
11
11
|
padding-right: 34px;
|
12
12
|
|
13
|
+
&.active {
|
14
|
+
background-color: #F2F7FD;
|
15
|
+
}
|
16
|
+
|
13
17
|
.tree-content {
|
14
18
|
width : 100%;
|
15
19
|
position: relative;
|
@@ -59,7 +63,7 @@
|
|
59
63
|
flex-grow : 1;
|
60
64
|
|
61
65
|
::ng-deep mat-icon {
|
62
|
-
color: #1954A9
|
66
|
+
color: #1954A9;
|
63
67
|
}
|
64
68
|
}
|
65
69
|
|
@@ -113,7 +117,7 @@
|
|
113
117
|
}
|
114
118
|
|
115
119
|
.favorite {
|
116
|
-
color: #b13514;
|
120
|
+
color: #b13514 !important;
|
117
121
|
}
|
118
122
|
|
119
123
|
.btn-favorite {
|
@@ -0,0 +1,128 @@
|
|
1
|
+
::ng-deep .qms-paginator {
|
2
|
+
display: block;
|
3
|
+
.qms-paginator-outer-container {
|
4
|
+
display: flex;
|
5
|
+
}
|
6
|
+
.mat-paginator-container {
|
7
|
+
display: flex;
|
8
|
+
align-items: center;
|
9
|
+
justify-content: flex-end;
|
10
|
+
padding: 0 8px;
|
11
|
+
flex-wrap: wrap-reverse;
|
12
|
+
width: 100%;
|
13
|
+
.qms-total-result {
|
14
|
+
margin-right: 24px;
|
15
|
+
margin-bottom: 15px;
|
16
|
+
span {
|
17
|
+
font-weight: normal;
|
18
|
+
font-size: 14px;
|
19
|
+
line-height: 22px;
|
20
|
+
color: rgba(0, 0, 0, 0.6);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
.qms-paginator-page-size {
|
24
|
+
margin-right: 24px;
|
25
|
+
display: flex;
|
26
|
+
align-items: baseline;
|
27
|
+
.qms-pagesize-label {
|
28
|
+
font-weight: normal;
|
29
|
+
font-size: 14px;
|
30
|
+
line-height: 22px;
|
31
|
+
color: #323232;
|
32
|
+
font-family: Open Sans;
|
33
|
+
font-style: normal;
|
34
|
+
margin-right: 8px;
|
35
|
+
}
|
36
|
+
.qms-form-page-size {
|
37
|
+
.mat-form-field-flex {
|
38
|
+
width: 80px;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
.jump-page {
|
42
|
+
.mat-form-field-wrapper {
|
43
|
+
.mat-form-field-flex {
|
44
|
+
width: 55px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
.mat-form-field-flex {
|
49
|
+
height: 40px;
|
50
|
+
.mat-form-field-infix {
|
51
|
+
padding-top: 7px;
|
52
|
+
border-top: 0px;
|
53
|
+
padding-bottom: 0px;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
.qms-paginator-range-actions {
|
58
|
+
display: flex;
|
59
|
+
align-items: center;
|
60
|
+
margin-bottom: 15px;
|
61
|
+
.selected {
|
62
|
+
background-color: #e5eefb;
|
63
|
+
color: #1954a9;
|
64
|
+
}
|
65
|
+
.qms-3d {
|
66
|
+
font-weight: 600;
|
67
|
+
font-size: 14px;
|
68
|
+
line-height: 22px;
|
69
|
+
color: #323232;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
.mat-paginator-container-mobile {
|
74
|
+
.qms-total-result {
|
75
|
+
margin-bottom: 16px;
|
76
|
+
span {
|
77
|
+
font-family: Open Sans;
|
78
|
+
font-style: normal;
|
79
|
+
font-weight: normal;
|
80
|
+
font-size: 12px;
|
81
|
+
line-height: 16px;
|
82
|
+
color: rgba(0, 0, 0, 0.6);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
.mat-paginator-container {
|
86
|
+
justify-content: flex-start;
|
87
|
+
}
|
88
|
+
.qms-paginator-page-size {
|
89
|
+
margin-right: 24px;
|
90
|
+
display: flex;
|
91
|
+
align-items: baseline;
|
92
|
+
.qms-pagesize-label {
|
93
|
+
font-weight: normal;
|
94
|
+
font-size: 12px;
|
95
|
+
line-height: 22px;
|
96
|
+
color: #323232;
|
97
|
+
font-family: Open Sans;
|
98
|
+
font-style: normal;
|
99
|
+
margin-right: 8px;
|
100
|
+
}
|
101
|
+
.qms-form-page-size {
|
102
|
+
.mat-form-field-flex {
|
103
|
+
width: 80px;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
.jump-page {
|
107
|
+
.mat-form-field-wrapper {
|
108
|
+
.mat-form-field-flex {
|
109
|
+
width: 55px;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
.mat-form-field-flex {
|
114
|
+
height: 40px;
|
115
|
+
.mat-form-field-infix {
|
116
|
+
padding-top: 7px;
|
117
|
+
border-top: 0px;
|
118
|
+
padding-bottom: 0px;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
.size-small {
|
124
|
+
.mat-paginator-container {
|
125
|
+
justify-content: flex-start;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
@@ -1,16 +1,4 @@
|
|
1
|
-
.qmsckeditor__bpmn__container {
|
2
|
-
// .cdk-overlay-pane{
|
3
|
-
// width: unset !important;
|
4
|
-
// height: unset !important;
|
5
|
-
// max-width: 100% !important;
|
6
|
-
// }
|
7
|
-
|
8
|
-
// .mat-dialog-container{
|
9
|
-
// max-width: 100%;
|
10
|
-
// max-height: 100% !important;
|
11
|
-
// resize: both;
|
12
|
-
// }
|
13
|
-
|
1
|
+
:host ::ng-deep .qmsckeditor__bpmn__container {
|
14
2
|
.bpmn__editor {
|
15
3
|
width:100%;
|
16
4
|
height: 600px;
|
@@ -37,7 +25,7 @@
|
|
37
25
|
bottom:0;
|
38
26
|
left:0;
|
39
27
|
right:0;
|
40
|
-
margin-bottom:
|
28
|
+
margin-bottom: 16px;
|
41
29
|
height:50px;
|
42
30
|
width:100%;
|
43
31
|
}
|
@@ -130,7 +118,7 @@
|
|
130
118
|
background: none;
|
131
119
|
}
|
132
120
|
|
133
|
-
|
121
|
+
.mat-expansion-indicator {
|
134
122
|
&::after {
|
135
123
|
color: white;
|
136
124
|
transform: rotate(-135deg);
|
@@ -147,10 +135,74 @@
|
|
147
135
|
}
|
148
136
|
}
|
149
137
|
|
150
|
-
|
138
|
+
.joint-inspector.joint-theme-bpmn .list-item .input-wrapper input {
|
151
139
|
width: 70%;
|
152
140
|
float: none;
|
153
141
|
}
|
154
|
-
}
|
155
142
|
|
143
|
+
.object-property[data-property$="/fill"] {
|
144
|
+
width: 100%;
|
145
|
+
}
|
146
|
+
|
147
|
+
.object-property[data-property$="/stroke"]
|
148
|
+
{
|
149
|
+
width: 100%;
|
150
|
+
}
|
151
|
+
|
152
|
+
.field[data-field$="/fill"] {
|
153
|
+
width: 100%;
|
154
|
+
}
|
155
|
+
|
156
|
+
.field[data-field$="/stroke"] {
|
157
|
+
width: 100%;
|
158
|
+
}
|
159
|
+
|
160
|
+
.joint-inspector.joint-theme-bpmn .list-item:nth-child(odd) {
|
161
|
+
background: #ecefff; /*fallback*/
|
162
|
+
background: -moz-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*Firefox*/
|
163
|
+
background: -webkit-gradient(left, #ecefff 0%, #fafafa 100%); /*Chrome + Safari*/
|
164
|
+
background: -webkit-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*Another Chrome + Safari*/
|
165
|
+
background: -o-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*Opera*/
|
166
|
+
background: -ms-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*IE10+*/
|
167
|
+
background: linear-gradient(to left, #91a1c9 0%, #fafafa 100%); /*W3C standards*/
|
168
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ECEFFF', endColorstr='#3571b0',GradientType=0); /*IE6-9*/
|
169
|
+
}
|
156
170
|
|
171
|
+
.joint-inspector.joint-theme-bpmn .list-item:nth-child(even) {
|
172
|
+
background: #ecefff; /*fallback*/
|
173
|
+
background: -moz-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*Firefox*/
|
174
|
+
background: -webkit-gradient(left, #ecefff 0%, #fafafa 100%); /*Chrome + Safari*/
|
175
|
+
background: -webkit-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*Another Chrome + Safari*/
|
176
|
+
background: -o-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*Opera*/
|
177
|
+
background: -ms-linear-gradient(left, #ecefff 0%, #fafafa 100%); /*IE10+*/
|
178
|
+
background: linear-gradient(to left, #91a1c9 0%, #fafafa 100%); /*W3C standards*/
|
179
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ECEFFF', endColorstr='#3571b0',GradientType=0); /*IE6-9*/
|
180
|
+
}
|
181
|
+
|
182
|
+
.joint-inspector.joint-theme-bpmn .list-item .list-item:nth-child(odd) {
|
183
|
+
background: #eceff7; /*fallback*/
|
184
|
+
background: -moz-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*Firefox*/
|
185
|
+
background: -webkit-gradient(left, #eceff7 0%, #eceff7 100%); /*Chrome + Safari*/
|
186
|
+
background: -webkit-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*Another Chrome + Safari*/
|
187
|
+
background: -o-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*Opera*/
|
188
|
+
background: -ms-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*IE10+*/
|
189
|
+
background: linear-gradient(to left, #eceff7 0%, #eceff7 100%); /*W3C standards*/
|
190
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eceff7', endColorstr='#eceff7',GradientType=0); /*IE6-9*/
|
191
|
+
}
|
192
|
+
|
193
|
+
.joint-inspector.joint-theme-bpmn .list-item .list-item:nth-child(even) {
|
194
|
+
background: #eceff7; /*fallback*/
|
195
|
+
background: -moz-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*Firefox*/
|
196
|
+
background: -webkit-gradient(left, #eceff7 0%, #eceff7 100%); /*Chrome + Safari*/
|
197
|
+
background: -webkit-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*Another Chrome + Safari*/
|
198
|
+
background: -o-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*Opera*/
|
199
|
+
background: -ms-linear-gradient(left, #eceff7 0%, #eceff7 100%); /*IE10+*/
|
200
|
+
background: linear-gradient(to left, #eceff7 0%, #eceff7 100%); /*W3C standards*/
|
201
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eceff7', endColorstr='#eceff7',GradientType=0); /*IE6-9*/
|
202
|
+
}
|
203
|
+
|
204
|
+
.joint-inspector.joint-theme-bpmn .list-item {
|
205
|
+
border-radius: 10px;
|
206
|
+
box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.2);
|
207
|
+
}
|
208
|
+
}
|
@@ -163,7 +163,7 @@
|
|
163
163
|
|
164
164
|
.qmsckeditor.tooltip-content.height{
|
165
165
|
min-height: 400px;
|
166
|
-
max-height:
|
166
|
+
max-height: 472px;
|
167
167
|
overflow: auto;
|
168
168
|
}
|
169
169
|
|
@@ -174,3 +174,11 @@
|
|
174
174
|
.ck-content .page-break {
|
175
175
|
width: 100%;
|
176
176
|
}
|
177
|
+
|
178
|
+
.ck-content .ck-horizontal-line {
|
179
|
+
width: 100%;
|
180
|
+
}
|
181
|
+
|
182
|
+
.ck-content hr {
|
183
|
+
background: #ccc;
|
184
|
+
}
|
@@ -1,128 +0,0 @@
|
|
1
|
-
|
2
|
-
import { Command } from '@ckeditor/ckeditor5-core';
|
3
|
-
import { isImage } from '@ckeditor/ckeditor5-image/src/image/utils';
|
4
|
-
import * as QMSCKEditorConstant from '../common/qmsCKEditorConstant';
|
5
|
-
import * as QMSCKEditorService from '../common/qmsCKEditorService';
|
6
|
-
import { ImageMapAttributes, ImageMapElements, trimStart, parsePixelToFloat, findFirstMapNode, findMapNodes, drawMap } from './utils';
|
7
|
-
import { getSelectedImageWidget } from '@ckeditor/ckeditor5-image/src/image/utils';
|
8
|
-
|
9
|
-
export default class InsertImageMapCommand extends Command {
|
10
|
-
|
11
|
-
refresh() {
|
12
|
-
const element = this.editor.model.document.selection.getSelectedElement();
|
13
|
-
this.isEnabled = isImage(element);
|
14
|
-
}
|
15
|
-
|
16
|
-
execute() {
|
17
|
-
const editor = this.editor;
|
18
|
-
const model = editor.model;
|
19
|
-
const view = editor.editing.view;
|
20
|
-
const selectedElement = model.document.selection.getSelectedElement();
|
21
|
-
|
22
|
-
const mapName = selectedElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
|
23
|
-
let originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
|
24
|
-
if(selectedElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) && selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
25
|
-
originalImageSrc = selectedElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
26
|
-
}
|
27
|
-
|
28
|
-
const data = {'imageUrl': originalImageSrc, 'areas': [], imageWidth: null, imageHeight: null};
|
29
|
-
const imageWidget = getSelectedImageWidget( view.document.selection);
|
30
|
-
const widgetResizePlugin = editor.plugins.get('WidgetResize');
|
31
|
-
const resizer = widgetResizePlugin.getResizerByViewElement( imageWidget );
|
32
|
-
|
33
|
-
if(resizer){
|
34
|
-
const resizerWrapper = resizer._viewResizerWrapper;
|
35
|
-
data.imageWidth = parsePixelToFloat(resizerWrapper.getStyle('width', 0));
|
36
|
-
data.imageHeight = parsePixelToFloat(resizerWrapper.getStyle('height', 0));
|
37
|
-
}
|
38
|
-
|
39
|
-
if(!!mapName){
|
40
|
-
const range = model.createRangeIn(model.document.getRoot());
|
41
|
-
const existingMapElement = findFirstMapNode(trimStart(mapName, '#'), range);
|
42
|
-
if(existingMapElement){
|
43
|
-
data.areas = JSON.parse(existingMapElement.getAttribute(ImageMapAttributes.MAP_AREAS) || []);
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
QMSCKEditorService.imageMapNotify(data);
|
48
|
-
window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = false;
|
49
|
-
window.addEventListener(QMSCKEditorConstant.QMSCK_IMAGEMAP_PLUGIN_RESP, (evt) => {
|
50
|
-
if (window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING]) {
|
51
|
-
return;
|
52
|
-
}
|
53
|
-
window[QMSCKEditorConstant.QMSCK_IMAGEMAP_IS_PROCESSING] = true;
|
54
|
-
model.change(writer => {
|
55
|
-
var newMapName = trimStart(evt.detail.name, '#');
|
56
|
-
const areas = evt.detail.areas;
|
57
|
-
const width = evt.detail.imageWidth;
|
58
|
-
const height = evt.detail.imageHeight;
|
59
|
-
const imageElement = model.document.selection.getSelectedElement();
|
60
|
-
const oldMapName = imageElement.getAttribute(ImageMapAttributes.IMAGE_USE_MAP);
|
61
|
-
|
62
|
-
if(!!oldMapName){
|
63
|
-
const range = model.createRangeIn(model.document.getRoot());
|
64
|
-
const existingMapElements = findMapNodes([trimStart(oldMapName, '#')], range);
|
65
|
-
if(existingMapElements && existingMapElements.length > 0){
|
66
|
-
existingMapElements.forEach(element => {
|
67
|
-
writer.remove(element);
|
68
|
-
});
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
if(!!areas && areas.length > 0)
|
73
|
-
{
|
74
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_USE_MAP, '#' + newMapName, imageElement);
|
75
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_WIDTH, width, imageElement);
|
76
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_HEIGHT, height, imageElement);
|
77
|
-
|
78
|
-
let originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SRC);
|
79
|
-
if(!imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC) || !imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
80
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, originalImageSrc, imageElement);
|
81
|
-
}
|
82
|
-
else{
|
83
|
-
originalImageSrc = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
84
|
-
}
|
85
|
-
|
86
|
-
drawMap(originalImageSrc, width, height, areas, (oldsrc, newsrc) =>{
|
87
|
-
model.enqueueChange(writer => {
|
88
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, newsrc, imageElement);
|
89
|
-
} );
|
90
|
-
});
|
91
|
-
|
92
|
-
let attrs = {};
|
93
|
-
attrs[ImageMapAttributes.MAP_NAME] = newMapName;
|
94
|
-
attrs[ImageMapAttributes.MAP_AREAS] = JSON.stringify(areas);
|
95
|
-
attrs[ImageMapAttributes.MAP_WIDTH] = width;
|
96
|
-
attrs[ImageMapAttributes.MAP_HEIGHT] = height;
|
97
|
-
const mapElement = writer.createElement(ImageMapElements.MAP, attrs);
|
98
|
-
|
99
|
-
writer.insert(mapElement, writer.createPositionAt(imageElement, "after"));
|
100
|
-
}
|
101
|
-
else {
|
102
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_USE_MAP)){
|
103
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_USE_MAP, imageElement);
|
104
|
-
}
|
105
|
-
|
106
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_SAVED_SRC)){
|
107
|
-
|
108
|
-
let src = imageElement.getAttribute(ImageMapAttributes.IMAGE_SAVED_SRC);
|
109
|
-
if(!!src){
|
110
|
-
writer.setAttribute(ImageMapAttributes.IMAGE_SRC, src, imageElement);
|
111
|
-
}
|
112
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_SAVED_SRC, imageElement);
|
113
|
-
}
|
114
|
-
|
115
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_HEIGHT)){
|
116
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_HEIGHT, imageElement);
|
117
|
-
}
|
118
|
-
|
119
|
-
if(imageElement.hasAttribute(ImageMapAttributes.IMAGE_WIDTH)){
|
120
|
-
writer.removeAttribute(ImageMapAttributes.IMAGE_WIDTH, imageElement);
|
121
|
-
}
|
122
|
-
}
|
123
|
-
});
|
124
|
-
},
|
125
|
-
{ once: true });
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|