@colijnit/corecomponents_v12 259.1.1 → 259.1.2
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/colijnit-corecomponents_v12.umd.js +18 -184
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12-259.1.0.tgz +0 -0
- package/esm2015/lib/core/utils/file-utils.js +2 -2
- package/fesm2015/colijnit-corecomponents_v12.js +12 -140
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/core/utils/file-utils.d.ts +1 -1
- package/package.json +1 -1
- package/esm2015/lib/core/enum/co-document-image-display-kind.enum.js +0 -7
- package/esm2015/lib/core/enum/object-right-type.enum.js +0 -7
- package/esm2015/lib/core/enum/table-name.enum.js +0 -81
- package/esm2015/lib/core/model/co-document-right.bo.js +0 -3
- package/esm2015/lib/core/model/co-document.bo.js +0 -121
- package/lib/core/enum/co-document-image-display-kind.enum.d.ts +0 -5
- package/lib/core/enum/object-right-type.enum.d.ts +0 -5
- package/lib/core/enum/table-name.enum.d.ts +0 -79
- package/lib/core/model/co-document-right.bo.d.ts +0 -6
- package/lib/core/model/co-document.bo.d.ts +0 -61
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/cdk/drag-drop'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('xlsx'), require('@colijnit/ioneconnector/build/enum/user-right-type.enum'), require('@angular/cdk/scrolling'), require('@colijnit/ioneconnector/build/utils/array-utils'), require('@colijnit/ioneconnector/build/model/default-get-object-configurations-params'), require('@colijnit/ioneconnector/build/model/object-configuration')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/forms', 'rxjs', '@angular/platform-browser', '@angular/animations', '@angular/common', '@angular/common/http', 'rxjs/operators', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/cdk/drag-drop', '@angular/cdk/overlay', '@angular/cdk/portal', 'xlsx', '@colijnit/ioneconnector/build/enum/user-right-type.enum', '@angular/cdk/scrolling', '@colijnit/ioneconnector/build/utils/array-utils', '@colijnit/ioneconnector/build/model/default-get-object-configurations-params', '@colijnit/ioneconnector/build/model/object-configuration'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.forms, global.rxjs, global.ng.platformBrowser, global.ng.animations, global.ng.common, global.ng.common.http, global.rxjs.operators, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.cdk.dragDrop, global.ng.cdk.overlay, global.ng.cdk.portal, global.XLSX, global.userRightType_enum, global.ng.cdk.scrolling, global.arrayUtils, global.defaultGetObjectConfigurationsParams, global.objectConfiguration));
|
|
5
|
-
})(this, (function (exports, i0, forms, rxjs, platformBrowser, animations, common, http, operators, three, CSS3DRenderer, TWEEN, hammerjs, dragDrop, i1, portal, XLSX, userRightType_enum, scrolling, arrayUtils, defaultGetObjectConfigurationsParams, objectConfiguration) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/cdk/drag-drop'), require('@colijnit/mainapi/build/model/co-document.bo'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('xlsx'), require('@colijnit/ioneconnector/build/enum/user-right-type.enum'), require('@angular/cdk/scrolling'), require('@colijnit/ioneconnector/build/utils/array-utils'), require('@colijnit/ioneconnector/build/model/default-get-object-configurations-params'), require('@colijnit/ioneconnector/build/model/object-configuration')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/forms', 'rxjs', '@angular/platform-browser', '@angular/animations', '@angular/common', '@angular/common/http', 'rxjs/operators', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/cdk/drag-drop', '@colijnit/mainapi/build/model/co-document.bo', '@angular/cdk/overlay', '@angular/cdk/portal', 'xlsx', '@colijnit/ioneconnector/build/enum/user-right-type.enum', '@angular/cdk/scrolling', '@colijnit/ioneconnector/build/utils/array-utils', '@colijnit/ioneconnector/build/model/default-get-object-configurations-params', '@colijnit/ioneconnector/build/model/object-configuration'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.forms, global.rxjs, global.ng.platformBrowser, global.ng.animations, global.ng.common, global.ng.common.http, global.rxjs.operators, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.cdk.dragDrop, global.coDocument_bo, global.ng.cdk.overlay, global.ng.cdk.portal, global.XLSX, global.userRightType_enum, global.ng.cdk.scrolling, global.arrayUtils, global.defaultGetObjectConfigurationsParams, global.objectConfiguration));
|
|
5
|
+
})(this, (function (exports, i0, forms, rxjs, platformBrowser, animations, common, http, operators, three, CSS3DRenderer, TWEEN, hammerjs, dragDrop, coDocument_bo, i1, portal, XLSX, userRightType_enum, scrolling, arrayUtils, defaultGetObjectConfigurationsParams, objectConfiguration) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -8575,183 +8575,6 @@
|
|
|
8575
8575
|
FileTypeInternal[FileTypeInternal["Undefined"] = 8] = "Undefined";
|
|
8576
8576
|
})(FileTypeInternal || (FileTypeInternal = {}));
|
|
8577
8577
|
|
|
8578
|
-
// DOM_BESTANDSSOORT
|
|
8579
|
-
var FileType;
|
|
8580
|
-
(function (FileType) {
|
|
8581
|
-
// DOC: Document
|
|
8582
|
-
FileType["Document"] = "DOC";
|
|
8583
|
-
// IMG: Afbeelding
|
|
8584
|
-
FileType["Image"] = "IMG";
|
|
8585
|
-
// SDWEB: Digitale handtekening
|
|
8586
|
-
FileType["DigitalSignature"] = "SDWEB";
|
|
8587
|
-
})(FileType || (FileType = {}));
|
|
8588
|
-
|
|
8589
|
-
var CoDocumentImageDisplayKind;
|
|
8590
|
-
(function (CoDocumentImageDisplayKind) {
|
|
8591
|
-
CoDocumentImageDisplayKind["NormalImage"] = "N";
|
|
8592
|
-
CoDocumentImageDisplayKind["LayeredImage"] = "L";
|
|
8593
|
-
CoDocumentImageDisplayKind["Avatar"] = "A";
|
|
8594
|
-
})(CoDocumentImageDisplayKind || (CoDocumentImageDisplayKind = {}));
|
|
8595
|
-
|
|
8596
|
-
var ObjectRightType;
|
|
8597
|
-
(function (ObjectRightType) {
|
|
8598
|
-
ObjectRightType[ObjectRightType["NoAccess"] = 0] = "NoAccess";
|
|
8599
|
-
ObjectRightType[ObjectRightType["ReadOnly"] = 1] = "ReadOnly";
|
|
8600
|
-
ObjectRightType[ObjectRightType["ReadWrite"] = 2] = "ReadWrite";
|
|
8601
|
-
})(ObjectRightType || (ObjectRightType = {}));
|
|
8602
|
-
|
|
8603
|
-
// See DocumentDTO.
|
|
8604
|
-
var CoDocument = /** @class */ (function () {
|
|
8605
|
-
function CoDocument() {
|
|
8606
|
-
// @ComplexArray(CoDocumentRight)
|
|
8607
|
-
this.rights = [];
|
|
8608
|
-
this.retailFormulas = [];
|
|
8609
|
-
//
|
|
8610
|
-
// @NoDbField()
|
|
8611
|
-
// @ComplexField(Subject)
|
|
8612
|
-
this.documentBodyChange = new rxjs.Subject();
|
|
8613
|
-
}
|
|
8614
|
-
Object.defineProperty(CoDocument.prototype, "documentId", {
|
|
8615
|
-
get: function () {
|
|
8616
|
-
return this._documentId;
|
|
8617
|
-
},
|
|
8618
|
-
set: function (value) {
|
|
8619
|
-
this._documentId = value;
|
|
8620
|
-
// this._idObject.docId = value;
|
|
8621
|
-
},
|
|
8622
|
-
enumerable: false,
|
|
8623
|
-
configurable: true
|
|
8624
|
-
});
|
|
8625
|
-
Object.defineProperty(CoDocument.prototype, "documentBody", {
|
|
8626
|
-
get: function () {
|
|
8627
|
-
return this._documentBody;
|
|
8628
|
-
},
|
|
8629
|
-
set: function (documentBody) {
|
|
8630
|
-
var prev = this._documentBody;
|
|
8631
|
-
this._documentBody = documentBody;
|
|
8632
|
-
if (prev !== this._documentBody) {
|
|
8633
|
-
this.documentBodyChange.next(this._documentBody);
|
|
8634
|
-
}
|
|
8635
|
-
},
|
|
8636
|
-
enumerable: false,
|
|
8637
|
-
configurable: true
|
|
8638
|
-
});
|
|
8639
|
-
Object.defineProperty(CoDocument.prototype, "fileTypeInternal", {
|
|
8640
|
-
// @NoDbField()
|
|
8641
|
-
// public idForLink: number;
|
|
8642
|
-
// The internal file type of this document (the MimeType iOneJS uses internally)
|
|
8643
|
-
get: function () {
|
|
8644
|
-
if (!this._fileTypeInternal) {
|
|
8645
|
-
var fileType = FileUtils.FileNameToFileTypeInternal(this.fileName);
|
|
8646
|
-
if (fileType) {
|
|
8647
|
-
this._fileTypeInternal = fileType;
|
|
8648
|
-
}
|
|
8649
|
-
}
|
|
8650
|
-
return this._fileTypeInternal;
|
|
8651
|
-
},
|
|
8652
|
-
enumerable: false,
|
|
8653
|
-
configurable: true
|
|
8654
|
-
});
|
|
8655
|
-
Object.defineProperty(CoDocument.prototype, "mimeTypeInternal", {
|
|
8656
|
-
/**
|
|
8657
|
-
* The mimetype of this document: uses database-fetched this.mimeType, or calculates / guesses the mime type of the document
|
|
8658
|
-
* if that was not set.
|
|
8659
|
-
*/
|
|
8660
|
-
get: function () {
|
|
8661
|
-
if (this._mimeTypeInternal) {
|
|
8662
|
-
return this._mimeTypeInternal;
|
|
8663
|
-
}
|
|
8664
|
-
else {
|
|
8665
|
-
this._initMimetypeInternal();
|
|
8666
|
-
return this._mimeTypeInternal;
|
|
8667
|
-
}
|
|
8668
|
-
},
|
|
8669
|
-
set: function (value) {
|
|
8670
|
-
this._mimeTypeInternal = value;
|
|
8671
|
-
},
|
|
8672
|
-
enumerable: false,
|
|
8673
|
-
configurable: true
|
|
8674
|
-
});
|
|
8675
|
-
Object.defineProperty(CoDocument.prototype, "bodyAsDataUri", {
|
|
8676
|
-
// Gives either the document-(prio) or the thumbnail body. Or undefined if not exist.
|
|
8677
|
-
get: function () {
|
|
8678
|
-
if (this._documentBody) {
|
|
8679
|
-
return this.documentBodyAsDataUri;
|
|
8680
|
-
}
|
|
8681
|
-
else if (this.thumbnailBody) {
|
|
8682
|
-
return this.thumbnailBodyAsDataUri;
|
|
8683
|
-
}
|
|
8684
|
-
},
|
|
8685
|
-
enumerable: false,
|
|
8686
|
-
configurable: true
|
|
8687
|
-
});
|
|
8688
|
-
Object.defineProperty(CoDocument.prototype, "documentBodyAsDataUri", {
|
|
8689
|
-
// The body of this document as a data uri. The data uri also contains the mimetype in its string, and the fact that it's base64.
|
|
8690
|
-
get: function () {
|
|
8691
|
-
try {
|
|
8692
|
-
return FileUtils.DocumentBodyToDataUri(this.documentBody, this.mimeTypeInternal);
|
|
8693
|
-
}
|
|
8694
|
-
catch (error) {
|
|
8695
|
-
return "";
|
|
8696
|
-
}
|
|
8697
|
-
},
|
|
8698
|
-
enumerable: false,
|
|
8699
|
-
configurable: true
|
|
8700
|
-
});
|
|
8701
|
-
Object.defineProperty(CoDocument.prototype, "thumbnailBodyAsDataUri", {
|
|
8702
|
-
// The Thumbnailbody of this document as a data uri. The data uri also contains the mimetype in its string, and the fact that it's base64.
|
|
8703
|
-
get: function () {
|
|
8704
|
-
try {
|
|
8705
|
-
return FileUtils.DocumentBodyToDataUri(this.thumbnailBody, this.mimeTypeInternal);
|
|
8706
|
-
}
|
|
8707
|
-
catch (error) {
|
|
8708
|
-
return "";
|
|
8709
|
-
}
|
|
8710
|
-
},
|
|
8711
|
-
enumerable: false,
|
|
8712
|
-
configurable: true
|
|
8713
|
-
});
|
|
8714
|
-
Object.defineProperty(CoDocument.prototype, "isAvatar", {
|
|
8715
|
-
get: function () {
|
|
8716
|
-
return this.imageDisplayKind === CoDocumentImageDisplayKind.Avatar;
|
|
8717
|
-
},
|
|
8718
|
-
enumerable: false,
|
|
8719
|
-
configurable: true
|
|
8720
|
-
});
|
|
8721
|
-
Object.defineProperty(CoDocument.prototype, "readonly", {
|
|
8722
|
-
//
|
|
8723
|
-
// @NoDbField()
|
|
8724
|
-
// private _idObject: any = {};
|
|
8725
|
-
get: function () {
|
|
8726
|
-
return this.rightLevel === ObjectRightType.ReadOnly;
|
|
8727
|
-
},
|
|
8728
|
-
enumerable: false,
|
|
8729
|
-
configurable: true
|
|
8730
|
-
});
|
|
8731
|
-
CoDocument.prototype.getId = function () {
|
|
8732
|
-
return this.documentId;
|
|
8733
|
-
};
|
|
8734
|
-
// Returns whether this is an image document or not.
|
|
8735
|
-
CoDocument.prototype.isImageDocument = function () {
|
|
8736
|
-
return (this.fileTypeInternal === FileTypeInternal.Image);
|
|
8737
|
-
};
|
|
8738
|
-
// @BoSerializerStep()
|
|
8739
|
-
CoDocument.prototype.preventOverridingThumbnailToEmpty = function () {
|
|
8740
|
-
if (!this.thumbnailBody) {
|
|
8741
|
-
this.thumbnailBody = this._documentBody;
|
|
8742
|
-
}
|
|
8743
|
-
};
|
|
8744
|
-
// POSTCONDITION: this._mimeTypeInternal contains, to our best abilities, the true mimeType of this document, a-la "image/jpg"
|
|
8745
|
-
CoDocument.prototype._initMimetypeInternal = function () {
|
|
8746
|
-
// if no fileType, default to FileType.Image for internal mimetype initialization
|
|
8747
|
-
if ((this.fileType === FileType.Image || !this.fileType) && this.fileName) {
|
|
8748
|
-
var fileExtension = this.fileName.substr(this.fileName.lastIndexOf(".") + 1);
|
|
8749
|
-
this._mimeTypeInternal = "image/" + fileExtension;
|
|
8750
|
-
}
|
|
8751
|
-
};
|
|
8752
|
-
return CoDocument;
|
|
8753
|
-
}());
|
|
8754
|
-
|
|
8755
8578
|
// for refcode CV_DOCUMENTATIE.DOC_TYPE
|
|
8756
8579
|
var CoDocumentType;
|
|
8757
8580
|
(function (CoDocumentType) {
|
|
@@ -8763,6 +8586,17 @@
|
|
|
8763
8586
|
CoDocumentType["SaveAsLinkOnDefaultLocation"] = "LW";
|
|
8764
8587
|
})(CoDocumentType || (CoDocumentType = {}));
|
|
8765
8588
|
|
|
8589
|
+
// DOM_BESTANDSSOORT
|
|
8590
|
+
var FileType;
|
|
8591
|
+
(function (FileType) {
|
|
8592
|
+
// DOC: Document
|
|
8593
|
+
FileType["Document"] = "DOC";
|
|
8594
|
+
// IMG: Afbeelding
|
|
8595
|
+
FileType["Image"] = "IMG";
|
|
8596
|
+
// SDWEB: Digitale handtekening
|
|
8597
|
+
FileType["DigitalSignature"] = "SDWEB";
|
|
8598
|
+
})(FileType || (FileType = {}));
|
|
8599
|
+
|
|
8766
8600
|
var MaxUploadSize = 3145728; // 3Mb
|
|
8767
8601
|
// @dynamic
|
|
8768
8602
|
var FileUtils = /** @class */ (function () {
|
|
@@ -8825,7 +8659,7 @@
|
|
|
8825
8659
|
}
|
|
8826
8660
|
var fileName;
|
|
8827
8661
|
var mimeType;
|
|
8828
|
-
if (file instanceof CoDocument) {
|
|
8662
|
+
if (file instanceof coDocument_bo.CoDocument) {
|
|
8829
8663
|
fileName = file.fileName;
|
|
8830
8664
|
mimeType = file.mimeTypeInternal;
|
|
8831
8665
|
}
|
|
@@ -8870,7 +8704,7 @@
|
|
|
8870
8704
|
// Checks filesize of given file and returns false if size exceeds maximum upload size.
|
|
8871
8705
|
FileUtils.CheckMaxUploadSize = function (file) {
|
|
8872
8706
|
var fileSize = 0;
|
|
8873
|
-
if (file instanceof CoDocument) {
|
|
8707
|
+
if (file instanceof coDocument_bo.CoDocument) {
|
|
8874
8708
|
fileSize = NumberUtils.ParseInt(file.fileSize);
|
|
8875
8709
|
}
|
|
8876
8710
|
else {
|
|
@@ -9001,7 +8835,7 @@
|
|
|
9001
8835
|
reader.readAsDataURL(file);
|
|
9002
8836
|
reader.onloadend = function (event) {
|
|
9003
8837
|
if (event.target.readyState === 2) {
|
|
9004
|
-
var coDocument = new CoDocument();
|
|
8838
|
+
var coDocument = new coDocument_bo.CoDocument();
|
|
9005
8839
|
coDocument.fileSize = file.size.toString();
|
|
9006
8840
|
coDocument.mimeTypeInternal = file.type;
|
|
9007
8841
|
coDocument.mimeType = file.type;
|