@colijnit/corecomponents_v12 259.1.1 → 259.1.3
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 +61 -191
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12-259.1.2.tgz +0 -0
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +25 -2
- package/esm2015/lib/components/input-date-picker/input-date-picker.module.js +4 -2
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +28 -6
- package/esm2015/lib/core/utils/file-utils.js +2 -2
- package/fesm2015/colijnit-corecomponents_v12.js +58 -146
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/input-date-picker/input-date-picker.component.d.ts +13 -0
- package/lib/components/list-of-values/list-of-values.component.d.ts +13 -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,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Input, Injectable, NgZone, Component, ViewEncapsulation, HostBinding, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, Renderer2, ViewChildren, ElementRef, Output, Directive, ChangeDetectorRef, Optional, ViewChild, ViewContainerRef, HostListener, NgModule, SkipSelf, InjectionToken, Inject, forwardRef, ChangeDetectionStrategy, Pipe, ContentChildren, NO_ERRORS_SCHEMA, ContentChild } from '@angular/core';
|
|
4
|
-
import { NgModel, FormGroup, FormsModule } from '@angular/forms';
|
|
4
|
+
import { NgModel, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { Subject, merge, fromEvent, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import { DomSanitizer, HammerGestureConfig, HammerModule, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
|
|
7
7
|
import { trigger, state, style, transition, animate, query, animateChild } from '@angular/animations';
|
|
@@ -13,6 +13,7 @@ import { CSS3DObject, CSS3DRenderer } from 'three/examples/jsm/renderers/CSS3DRe
|
|
|
13
13
|
import * as TWEEN from '@tweenjs/tween.js';
|
|
14
14
|
import 'hammerjs';
|
|
15
15
|
import { DragDropModule, moveItemInArray } from '@angular/cdk/drag-drop';
|
|
16
|
+
import { CoDocument } from '@colijnit/mainapi/build/model/co-document.bo';
|
|
16
17
|
import * as i1 from '@angular/cdk/overlay';
|
|
17
18
|
import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
|
|
18
19
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
@@ -5423,6 +5424,17 @@ CalendarComponent.propDecorators = {
|
|
|
5423
5424
|
};
|
|
5424
5425
|
|
|
5425
5426
|
class InputDatePickerComponent extends BaseInputDatePickerDirective {
|
|
5427
|
+
constructor(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
5428
|
+
super(changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef);
|
|
5429
|
+
this.formComponent = formComponent;
|
|
5430
|
+
this.changeDetector = changeDetector;
|
|
5431
|
+
this.overlayService = overlayService;
|
|
5432
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
5433
|
+
this.formUserChangeListener = formUserChangeListener;
|
|
5434
|
+
this.ngZoneWrapper = ngZoneWrapper;
|
|
5435
|
+
this.elementRef = elementRef;
|
|
5436
|
+
super._markAsOnPush();
|
|
5437
|
+
}
|
|
5426
5438
|
showClass() {
|
|
5427
5439
|
return true;
|
|
5428
5440
|
}
|
|
@@ -5528,6 +5540,15 @@ InputDatePickerComponent.decorators = [
|
|
|
5528
5540
|
encapsulation: ViewEncapsulation.None
|
|
5529
5541
|
},] }
|
|
5530
5542
|
];
|
|
5543
|
+
InputDatePickerComponent.ctorParameters = () => [
|
|
5544
|
+
{ type: FormComponent, decorators: [{ type: Optional }] },
|
|
5545
|
+
{ type: ChangeDetectorRef },
|
|
5546
|
+
{ type: OverlayService },
|
|
5547
|
+
{ type: ComponentFactoryResolver },
|
|
5548
|
+
{ type: FormInputUserModelChangeListenerService },
|
|
5549
|
+
{ type: NgZoneWrapperService },
|
|
5550
|
+
{ type: ElementRef }
|
|
5551
|
+
];
|
|
5531
5552
|
InputDatePickerComponent.propDecorators = {
|
|
5532
5553
|
showClass: [{ type: HostBinding, args: ['class.co-input-date',] }]
|
|
5533
5554
|
};
|
|
@@ -6823,7 +6844,8 @@ InputDatePickerModule.decorators = [
|
|
|
6823
6844
|
InputTextModule,
|
|
6824
6845
|
CalendarModule,
|
|
6825
6846
|
ClickoutsideModule,
|
|
6826
|
-
OverlayModule
|
|
6847
|
+
OverlayModule,
|
|
6848
|
+
ReactiveFormsModule
|
|
6827
6849
|
],
|
|
6828
6850
|
schemas: [
|
|
6829
6851
|
NO_ERRORS_SCHEMA
|
|
@@ -8093,146 +8115,6 @@ var FileTypeInternal;
|
|
|
8093
8115
|
FileTypeInternal[FileTypeInternal["Undefined"] = 8] = "Undefined";
|
|
8094
8116
|
})(FileTypeInternal || (FileTypeInternal = {}));
|
|
8095
8117
|
|
|
8096
|
-
// DOM_BESTANDSSOORT
|
|
8097
|
-
var FileType;
|
|
8098
|
-
(function (FileType) {
|
|
8099
|
-
// DOC: Document
|
|
8100
|
-
FileType["Document"] = "DOC";
|
|
8101
|
-
// IMG: Afbeelding
|
|
8102
|
-
FileType["Image"] = "IMG";
|
|
8103
|
-
// SDWEB: Digitale handtekening
|
|
8104
|
-
FileType["DigitalSignature"] = "SDWEB";
|
|
8105
|
-
})(FileType || (FileType = {}));
|
|
8106
|
-
|
|
8107
|
-
var CoDocumentImageDisplayKind;
|
|
8108
|
-
(function (CoDocumentImageDisplayKind) {
|
|
8109
|
-
CoDocumentImageDisplayKind["NormalImage"] = "N";
|
|
8110
|
-
CoDocumentImageDisplayKind["LayeredImage"] = "L";
|
|
8111
|
-
CoDocumentImageDisplayKind["Avatar"] = "A";
|
|
8112
|
-
})(CoDocumentImageDisplayKind || (CoDocumentImageDisplayKind = {}));
|
|
8113
|
-
|
|
8114
|
-
var ObjectRightType;
|
|
8115
|
-
(function (ObjectRightType) {
|
|
8116
|
-
ObjectRightType[ObjectRightType["NoAccess"] = 0] = "NoAccess";
|
|
8117
|
-
ObjectRightType[ObjectRightType["ReadOnly"] = 1] = "ReadOnly";
|
|
8118
|
-
ObjectRightType[ObjectRightType["ReadWrite"] = 2] = "ReadWrite";
|
|
8119
|
-
})(ObjectRightType || (ObjectRightType = {}));
|
|
8120
|
-
|
|
8121
|
-
// See DocumentDTO.
|
|
8122
|
-
class CoDocument {
|
|
8123
|
-
constructor() {
|
|
8124
|
-
// @ComplexArray(CoDocumentRight)
|
|
8125
|
-
this.rights = [];
|
|
8126
|
-
this.retailFormulas = [];
|
|
8127
|
-
//
|
|
8128
|
-
// @NoDbField()
|
|
8129
|
-
// @ComplexField(Subject)
|
|
8130
|
-
this.documentBodyChange = new Subject();
|
|
8131
|
-
}
|
|
8132
|
-
set documentId(value) {
|
|
8133
|
-
this._documentId = value;
|
|
8134
|
-
// this._idObject.docId = value;
|
|
8135
|
-
}
|
|
8136
|
-
get documentId() {
|
|
8137
|
-
return this._documentId;
|
|
8138
|
-
}
|
|
8139
|
-
set documentBody(documentBody) {
|
|
8140
|
-
const prev = this._documentBody;
|
|
8141
|
-
this._documentBody = documentBody;
|
|
8142
|
-
if (prev !== this._documentBody) {
|
|
8143
|
-
this.documentBodyChange.next(this._documentBody);
|
|
8144
|
-
}
|
|
8145
|
-
}
|
|
8146
|
-
get documentBody() {
|
|
8147
|
-
return this._documentBody;
|
|
8148
|
-
}
|
|
8149
|
-
// @NoDbField()
|
|
8150
|
-
// public idForLink: number;
|
|
8151
|
-
// The internal file type of this document (the MimeType iOneJS uses internally)
|
|
8152
|
-
get fileTypeInternal() {
|
|
8153
|
-
if (!this._fileTypeInternal) {
|
|
8154
|
-
const fileType = FileUtils.FileNameToFileTypeInternal(this.fileName);
|
|
8155
|
-
if (fileType) {
|
|
8156
|
-
this._fileTypeInternal = fileType;
|
|
8157
|
-
}
|
|
8158
|
-
}
|
|
8159
|
-
return this._fileTypeInternal;
|
|
8160
|
-
}
|
|
8161
|
-
/**
|
|
8162
|
-
* The mimetype of this document: uses database-fetched this.mimeType, or calculates / guesses the mime type of the document
|
|
8163
|
-
* if that was not set.
|
|
8164
|
-
*/
|
|
8165
|
-
get mimeTypeInternal() {
|
|
8166
|
-
if (this._mimeTypeInternal) {
|
|
8167
|
-
return this._mimeTypeInternal;
|
|
8168
|
-
}
|
|
8169
|
-
else {
|
|
8170
|
-
this._initMimetypeInternal();
|
|
8171
|
-
return this._mimeTypeInternal;
|
|
8172
|
-
}
|
|
8173
|
-
}
|
|
8174
|
-
set mimeTypeInternal(value) {
|
|
8175
|
-
this._mimeTypeInternal = value;
|
|
8176
|
-
}
|
|
8177
|
-
// Gives either the document-(prio) or the thumbnail body. Or undefined if not exist.
|
|
8178
|
-
get bodyAsDataUri() {
|
|
8179
|
-
if (this._documentBody) {
|
|
8180
|
-
return this.documentBodyAsDataUri;
|
|
8181
|
-
}
|
|
8182
|
-
else if (this.thumbnailBody) {
|
|
8183
|
-
return this.thumbnailBodyAsDataUri;
|
|
8184
|
-
}
|
|
8185
|
-
}
|
|
8186
|
-
// 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.
|
|
8187
|
-
get documentBodyAsDataUri() {
|
|
8188
|
-
try {
|
|
8189
|
-
return FileUtils.DocumentBodyToDataUri(this.documentBody, this.mimeTypeInternal);
|
|
8190
|
-
}
|
|
8191
|
-
catch (error) {
|
|
8192
|
-
return "";
|
|
8193
|
-
}
|
|
8194
|
-
}
|
|
8195
|
-
// 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.
|
|
8196
|
-
get thumbnailBodyAsDataUri() {
|
|
8197
|
-
try {
|
|
8198
|
-
return FileUtils.DocumentBodyToDataUri(this.thumbnailBody, this.mimeTypeInternal);
|
|
8199
|
-
}
|
|
8200
|
-
catch (error) {
|
|
8201
|
-
return "";
|
|
8202
|
-
}
|
|
8203
|
-
}
|
|
8204
|
-
get isAvatar() {
|
|
8205
|
-
return this.imageDisplayKind === CoDocumentImageDisplayKind.Avatar;
|
|
8206
|
-
}
|
|
8207
|
-
//
|
|
8208
|
-
// @NoDbField()
|
|
8209
|
-
// private _idObject: any = {};
|
|
8210
|
-
get readonly() {
|
|
8211
|
-
return this.rightLevel === ObjectRightType.ReadOnly;
|
|
8212
|
-
}
|
|
8213
|
-
getId() {
|
|
8214
|
-
return this.documentId;
|
|
8215
|
-
}
|
|
8216
|
-
// Returns whether this is an image document or not.
|
|
8217
|
-
isImageDocument() {
|
|
8218
|
-
return (this.fileTypeInternal === FileTypeInternal.Image);
|
|
8219
|
-
}
|
|
8220
|
-
// @BoSerializerStep()
|
|
8221
|
-
preventOverridingThumbnailToEmpty() {
|
|
8222
|
-
if (!this.thumbnailBody) {
|
|
8223
|
-
this.thumbnailBody = this._documentBody;
|
|
8224
|
-
}
|
|
8225
|
-
}
|
|
8226
|
-
// POSTCONDITION: this._mimeTypeInternal contains, to our best abilities, the true mimeType of this document, a-la "image/jpg"
|
|
8227
|
-
_initMimetypeInternal() {
|
|
8228
|
-
// if no fileType, default to FileType.Image for internal mimetype initialization
|
|
8229
|
-
if ((this.fileType === FileType.Image || !this.fileType) && this.fileName) {
|
|
8230
|
-
const fileExtension = this.fileName.substr(this.fileName.lastIndexOf(".") + 1);
|
|
8231
|
-
this._mimeTypeInternal = "image/" + fileExtension;
|
|
8232
|
-
}
|
|
8233
|
-
}
|
|
8234
|
-
}
|
|
8235
|
-
|
|
8236
8118
|
// for refcode CV_DOCUMENTATIE.DOC_TYPE
|
|
8237
8119
|
var CoDocumentType;
|
|
8238
8120
|
(function (CoDocumentType) {
|
|
@@ -8244,6 +8126,17 @@ var CoDocumentType;
|
|
|
8244
8126
|
CoDocumentType["SaveAsLinkOnDefaultLocation"] = "LW";
|
|
8245
8127
|
})(CoDocumentType || (CoDocumentType = {}));
|
|
8246
8128
|
|
|
8129
|
+
// DOM_BESTANDSSOORT
|
|
8130
|
+
var FileType;
|
|
8131
|
+
(function (FileType) {
|
|
8132
|
+
// DOC: Document
|
|
8133
|
+
FileType["Document"] = "DOC";
|
|
8134
|
+
// IMG: Afbeelding
|
|
8135
|
+
FileType["Image"] = "IMG";
|
|
8136
|
+
// SDWEB: Digitale handtekening
|
|
8137
|
+
FileType["DigitalSignature"] = "SDWEB";
|
|
8138
|
+
})(FileType || (FileType = {}));
|
|
8139
|
+
|
|
8247
8140
|
const MaxUploadSize = 3145728; // 3Mb
|
|
8248
8141
|
// @dynamic
|
|
8249
8142
|
class FileUtils {
|
|
@@ -11445,8 +11338,15 @@ ListOfValuesPopupComponent.propDecorators = {
|
|
|
11445
11338
|
};
|
|
11446
11339
|
|
|
11447
11340
|
class ListOfValuesComponent extends BaseInputComponent {
|
|
11448
|
-
constructor() {
|
|
11449
|
-
super(
|
|
11341
|
+
constructor(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
11342
|
+
super(changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef);
|
|
11343
|
+
this.formComponent = formComponent;
|
|
11344
|
+
this.changeDetector = changeDetector;
|
|
11345
|
+
this.overlayService = overlayService;
|
|
11346
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
11347
|
+
this.formUserChangeListener = formUserChangeListener;
|
|
11348
|
+
this.ngZoneWrapper = ngZoneWrapper;
|
|
11349
|
+
this.elementRef = elementRef;
|
|
11450
11350
|
this.icons = CoreComponentsIcon;
|
|
11451
11351
|
this.multiselect = false;
|
|
11452
11352
|
this.largeCollection = false;
|
|
@@ -11460,6 +11360,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
11460
11360
|
this.filteredCollection = [];
|
|
11461
11361
|
this.isLoading = false;
|
|
11462
11362
|
this._collection = [];
|
|
11363
|
+
super._markAsOnPush();
|
|
11463
11364
|
}
|
|
11464
11365
|
set model(value) {
|
|
11465
11366
|
super.model = value;
|
|
@@ -11604,7 +11505,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
11604
11505
|
}
|
|
11605
11506
|
}
|
|
11606
11507
|
}
|
|
11607
|
-
this.
|
|
11508
|
+
this.setModel(option);
|
|
11608
11509
|
this.modelChange.emit(this.model);
|
|
11609
11510
|
this.detectChanges();
|
|
11610
11511
|
}
|
|
@@ -11669,6 +11570,7 @@ ListOfValuesComponent.decorators = [
|
|
|
11669
11570
|
[id]="label"
|
|
11670
11571
|
[model]="multiselect ? selectedModels : selectedModel"
|
|
11671
11572
|
[placeholder]="label"
|
|
11573
|
+
[myFormInputInstance]="this"
|
|
11672
11574
|
[readonly]="readonly"
|
|
11673
11575
|
[disabled]="disabled"
|
|
11674
11576
|
[required]="required"
|
|
@@ -11694,7 +11596,7 @@ ListOfValuesComponent.decorators = [
|
|
|
11694
11596
|
</div>
|
|
11695
11597
|
</ng-container>
|
|
11696
11598
|
</co-input-text>
|
|
11697
|
-
|
|
11599
|
+
|
|
11698
11600
|
<co-input-text
|
|
11699
11601
|
*ngIf="largeCollection"
|
|
11700
11602
|
[model]="filterText"
|
|
@@ -11705,6 +11607,7 @@ ListOfValuesComponent.decorators = [
|
|
|
11705
11607
|
(modelChange)="onModelChange($event)">
|
|
11706
11608
|
</co-input-text>
|
|
11707
11609
|
<div *ngIf="isLoading" class="filter-loader"><span></span></div>
|
|
11610
|
+
<input type="hidden" [ngModel]="model">
|
|
11708
11611
|
`,
|
|
11709
11612
|
providers: [
|
|
11710
11613
|
OverlayService,
|
|
@@ -11716,6 +11619,15 @@ ListOfValuesComponent.decorators = [
|
|
|
11716
11619
|
encapsulation: ViewEncapsulation.None
|
|
11717
11620
|
},] }
|
|
11718
11621
|
];
|
|
11622
|
+
ListOfValuesComponent.ctorParameters = () => [
|
|
11623
|
+
{ type: FormComponent, decorators: [{ type: Optional }] },
|
|
11624
|
+
{ type: ChangeDetectorRef },
|
|
11625
|
+
{ type: OverlayService },
|
|
11626
|
+
{ type: ComponentFactoryResolver },
|
|
11627
|
+
{ type: FormInputUserModelChangeListenerService },
|
|
11628
|
+
{ type: NgZoneWrapperService },
|
|
11629
|
+
{ type: ElementRef }
|
|
11630
|
+
];
|
|
11719
11631
|
ListOfValuesComponent.propDecorators = {
|
|
11720
11632
|
model: [{ type: Input }],
|
|
11721
11633
|
parentForOverlay: [{ type: ViewChild, args: ['parentForOverlay', { read: ElementRef },] }],
|