qms-angular 1.1.38 → 1.1.39
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 +33 -32
- package/bundles/qms-angular.umd.js.map +1 -1
- package/esm2015/lib/components/related/popup/related-popup.component.js +1 -2
- package/esm2015/lib/components/select-one/select-one.component.js +2 -2
- package/esm2015/lib/model/no.js +2 -2
- package/esm2015/lib/qms-ckeditor-components/common/functions/common.function.js +5 -9
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-bpmn/qms-ckeditor-bpmn.component.js +6 -3
- package/esm2015/lib/qms-ckeditor-components/components/qms-ckeditor-link/qms-ckeditor-link.component.js +2 -2
- package/esm2015/lib/qms-ckeditor-components/qms-ckeditor.component.js +2 -2
- package/fesm2015/qms-angular.js +13 -13
- package/fesm2015/qms-angular.js.map +1 -1
- package/lib/model/no.d.ts +1 -1
- package/lib/qms-ckeditor-components/common/functions/common.function.d.ts +1 -1
- package/package.json +1 -1
- package/qms-angular.metadata.json +1 -1
@@ -654,7 +654,7 @@
|
|
654
654
|
"EXTENSION_IS_NOT_SUPPORTED": "Utvidelsen støttes ikke.",
|
655
655
|
"ACCEPT_MP4_ONLY": "Støtter ikke denne videotypen.Godta kun MP4.",
|
656
656
|
"MAXIMIZE": "Maksimer",
|
657
|
-
"
|
657
|
+
"MINIMIZE": "Minimer",
|
658
658
|
"HEADING": "Avsnittsformat",
|
659
659
|
"FONT_SIZE": "Størrelse",
|
660
660
|
"FONT_FAMILY": "Font-familie",
|
@@ -7120,7 +7120,6 @@
|
|
7120
7120
|
};
|
7121
7121
|
RelatedPopupComponent.prototype.ngOnInit = function () {
|
7122
7122
|
var _this = this;
|
7123
|
-
this.disabledList = this.treeData1;
|
7124
7123
|
this.translate.getLanguageSubject$.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (res) {
|
7125
7124
|
if (res) {
|
7126
7125
|
_this.LANG = _this.translate.getObjectLang(res);
|
@@ -11510,7 +11509,7 @@
|
|
11510
11509
|
};
|
11511
11510
|
data = new SelectProcessDocumentPopupData();
|
11512
11511
|
data.moduleId = exports.ModuleType.documentProcess;
|
11513
|
-
data.moduleName =
|
11512
|
+
data.moduleName = this.LANG.QMSCKEDITOR.DOCUMENT_PROCESS;
|
11514
11513
|
if (!!isOnlyDocument) return [3 /*break*/, 2];
|
11515
11514
|
return [4 /*yield*/, this.treeService.getProcessAreaContents().toPromise()];
|
11516
11515
|
case 1:
|
@@ -12950,9 +12949,8 @@
|
|
12950
12949
|
|
12951
12950
|
var IFRAME_SRC = '//cdn.iframe.ly/api/iframe';
|
12952
12951
|
var API_KEY = 'b499e92e857f435c39c14d';
|
12953
|
-
function getCKEditorConfiguration(itemToolbar) {
|
12954
|
-
|
12955
|
-
var availableLanguages = { en: en, no: no };
|
12952
|
+
function getCKEditorConfiguration(itemToolbar, availableLanguages) {
|
12953
|
+
if (availableLanguages === void 0) { availableLanguages = null; }
|
12956
12954
|
var ckeditorConfig = {
|
12957
12955
|
toolbar: {
|
12958
12956
|
items: [],
|
@@ -12960,7 +12958,7 @@
|
|
12960
12958
|
viewportTopOffset: 30,
|
12961
12959
|
shouldNotGroupWhenFull: true
|
12962
12960
|
},
|
12963
|
-
language:
|
12961
|
+
language: 'en',
|
12964
12962
|
table: {
|
12965
12963
|
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties']
|
12966
12964
|
},
|
@@ -13229,8 +13227,8 @@
|
|
13229
13227
|
]
|
13230
13228
|
},
|
13231
13229
|
getTranslateLabel: function (propertyResource, defaultLabel) {
|
13232
|
-
if (availableLanguages
|
13233
|
-
return availableLanguages
|
13230
|
+
if (availableLanguages && availableLanguages.QMSCKEDITOR[propertyResource])
|
13231
|
+
return availableLanguages.QMSCKEDITOR[propertyResource];
|
13234
13232
|
return defaultLabel;
|
13235
13233
|
}
|
13236
13234
|
};
|
@@ -17222,26 +17220,26 @@
|
|
17222
17220
|
};
|
17223
17221
|
QMSCKEditorBpmnComponent.prototype.ngOnInit = function () {
|
17224
17222
|
return __awaiter(this, void 0, void 0, function () {
|
17225
|
-
var
|
17223
|
+
var _c, _d;
|
17226
17224
|
var _this = this;
|
17227
|
-
return __generator(this, function (
|
17228
|
-
switch (
|
17225
|
+
return __generator(this, function (_e) {
|
17226
|
+
switch (_e.label) {
|
17229
17227
|
case 0:
|
17230
17228
|
this.translate.getLanguageSubject$.pipe(operators.takeUntil(this.ngUnsubcribe)).subscribe(function (res) {
|
17231
17229
|
if (res) {
|
17232
17230
|
_this.LANG = _this.translate.getObjectLang(res);
|
17233
17231
|
}
|
17234
17232
|
});
|
17235
|
-
|
17233
|
+
_c = this;
|
17236
17234
|
return [4 /*yield*/, this.getTemplates()];
|
17237
17235
|
case 1:
|
17238
|
-
|
17236
|
+
_c.bpmnTemlates = _e.sent();
|
17239
17237
|
if (!this.id) return [3 /*break*/, 3];
|
17240
|
-
|
17238
|
+
_d = this;
|
17241
17239
|
return [4 /*yield*/, this.getJsonContent(this.id)];
|
17242
17240
|
case 2:
|
17243
|
-
|
17244
|
-
|
17241
|
+
_d.jsonContent = _e.sent();
|
17242
|
+
_e.label = 3;
|
17245
17243
|
case 3:
|
17246
17244
|
this.bpmnService.buildDiagram(this.bpmnTemlates, null, CKEditorEventConst.QMSCK_BPMN, this.jsonContent, 1, this.LANG);
|
17247
17245
|
this.initDocumentIcons();
|
@@ -17321,7 +17319,7 @@
|
|
17321
17319
|
QMSCKEditorBpmnComponent.prototype.getTemplates = function () {
|
17322
17320
|
return __awaiter(this, void 0, void 0, function () {
|
17323
17321
|
var _this = this;
|
17324
|
-
return __generator(this, function (
|
17322
|
+
return __generator(this, function (_c) {
|
17325
17323
|
return [2 /*return*/, new Promise(function (resolve) {
|
17326
17324
|
_this.bpmnApiService
|
17327
17325
|
.bpmnGetTemplates()
|
@@ -17336,7 +17334,7 @@
|
|
17336
17334
|
QMSCKEditorBpmnComponent.prototype.getJsonContent = function (id) {
|
17337
17335
|
return __awaiter(this, void 0, void 0, function () {
|
17338
17336
|
var _this = this;
|
17339
|
-
return __generator(this, function (
|
17337
|
+
return __generator(this, function (_c) {
|
17340
17338
|
return [2 /*return*/, new Promise(function (resolve) {
|
17341
17339
|
_this.bpmnApiService
|
17342
17340
|
.getBpmnById(id)
|
@@ -17353,7 +17351,7 @@
|
|
17353
17351
|
QMSCKEditorBpmnComponent.prototype.saveImageContent = function (graphObject) {
|
17354
17352
|
return __awaiter(this, void 0, void 0, function () {
|
17355
17353
|
var _this = this;
|
17356
|
-
return __generator(this, function (
|
17354
|
+
return __generator(this, function (_c) {
|
17357
17355
|
return [2 /*return*/, new Promise(function (resolve) {
|
17358
17356
|
var jsonContent = JSON.stringify(graphObject);
|
17359
17357
|
_this.bpmn = {
|
@@ -17376,7 +17374,7 @@
|
|
17376
17374
|
};
|
17377
17375
|
QMSCKEditorBpmnComponent.prototype.getImageContent = function (paper) {
|
17378
17376
|
return __awaiter(this, void 0, void 0, function () {
|
17379
|
-
return __generator(this, function (
|
17377
|
+
return __generator(this, function (_c) {
|
17380
17378
|
return [2 /*return*/, new Promise(function (resolve) {
|
17381
17379
|
paper.toPNG(function (imageData) {
|
17382
17380
|
var arrString = imageData.split(',');
|
@@ -17388,9 +17386,9 @@
|
|
17388
17386
|
};
|
17389
17387
|
QMSCKEditorBpmnComponent.prototype.onInsertImage = function () {
|
17390
17388
|
return __awaiter(this, void 0, void 0, function () {
|
17391
|
-
var graph, paper, clientRect, graphObject, id, imageContent,
|
17392
|
-
return __generator(this, function (
|
17393
|
-
switch (
|
17389
|
+
var graph, paper, clientRect, graphObject, id, imageContent, _c, file, relativeUrl, imagemap, result, scrollTop;
|
17390
|
+
return __generator(this, function (_d) {
|
17391
|
+
switch (_d.label) {
|
17394
17392
|
case 0:
|
17395
17393
|
graph = window[FlowChartConst.GRAPH];
|
17396
17394
|
paper = window["paper"];
|
@@ -17398,15 +17396,15 @@
|
|
17398
17396
|
graphObject = graph.toJSON();
|
17399
17397
|
return [4 /*yield*/, this.saveImageContent(graphObject)];
|
17400
17398
|
case 1:
|
17401
|
-
id =
|
17402
|
-
|
17399
|
+
id = _d.sent();
|
17400
|
+
_c = 'data:image/png;base64,';
|
17403
17401
|
return [4 /*yield*/, this.getImageContent(paper)];
|
17404
17402
|
case 2:
|
17405
|
-
imageContent =
|
17403
|
+
imageContent = _c + (_d.sent());
|
17406
17404
|
file = base64StringToFile(imageContent, CKEditorEventConst.QMSCK_BPMN + "#" + id);
|
17407
17405
|
return [4 /*yield*/, this.uploadService.uploadImage(file).toPromise()];
|
17408
17406
|
case 3:
|
17409
|
-
relativeUrl =
|
17407
|
+
relativeUrl = _d.sent();
|
17410
17408
|
this.calculateAdditionalWidth(graph, paper, graphObject.cells);
|
17411
17409
|
imagemap = this.toImageMap(id, graphObject.cells, clientRect);
|
17412
17410
|
result = { key: CKEditorEventConst.QMSCK_BPMN + "#" + id, values: relativeUrl, imagemap: imagemap };
|
@@ -17811,9 +17809,12 @@
|
|
17811
17809
|
});
|
17812
17810
|
};
|
17813
17811
|
QMSCKEditorBpmnComponent.prototype.calculateAdditionalWidth = function (graph, paper, cells) {
|
17812
|
+
var _a, _b;
|
17814
17813
|
for (var i = 0; i < cells.length; i++) {
|
17815
|
-
var bbox = graph.getCell(cells[i]).findView(paper).
|
17816
|
-
cells[i].additionalWidth =
|
17814
|
+
var bbox = graph.getCell(cells[i]).findView(paper).getBBoxToCalculateAdditionalWidth();
|
17815
|
+
cells[i].additionalWidth = 0;
|
17816
|
+
if (bbox && ((_b = (_a = cells[i]) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.width))
|
17817
|
+
cells[i].additionalWidth = (bbox.width > cells[i].size.width) ? (bbox.width - cells[i].size.width) : 0;
|
17817
17818
|
}
|
17818
17819
|
};
|
17819
17820
|
QMSCKEditorBpmnComponent.prototype.toImageMap = function (id, cells, clientRect) {
|
@@ -27214,7 +27215,7 @@
|
|
27214
27215
|
}
|
27215
27216
|
toolbarItems += ',' + strToolbars; // disable qmsFlowchart until NK-440 done
|
27216
27217
|
}
|
27217
|
-
this.ckeditorConfig = CKEditorCommonFunctions.getCKEditorConfiguration(toolbarItems);
|
27218
|
+
this.ckeditorConfig = CKEditorCommonFunctions.getCKEditorConfiguration(toolbarItems, this.LANG);
|
27218
27219
|
if (this.ckeditorConfig)
|
27219
27220
|
this.ckeditorConfig.containerId = this.editorId;
|
27220
27221
|
if (this.qmsckData.hideImgOptions) {
|
@@ -30448,7 +30449,7 @@
|
|
30448
30449
|
};
|
30449
30450
|
SelectOneDialog.prototype.nodeCondensedEvent = function (id) {
|
30450
30451
|
var index = this.expandToChildNode.findIndex(function (x) { return x.toLowerCase() === id.toLowerCase(); });
|
30451
|
-
if (index) {
|
30452
|
+
if (index >= 0) {
|
30452
30453
|
this.expandToChildNode.splice(index, 1);
|
30453
30454
|
}
|
30454
30455
|
};
|