@colijnit/corecomponents_v12 300.1.2 → 300.1.4
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.
|
@@ -9346,7 +9346,10 @@ class InputNumberPickerComponent extends BaseInputComponent {
|
|
|
9346
9346
|
}
|
|
9347
9347
|
handleInputKeyDown(event) {
|
|
9348
9348
|
// event.preventDefault();
|
|
9349
|
-
if (
|
|
9349
|
+
if (this.readonly) {
|
|
9350
|
+
return false;
|
|
9351
|
+
}
|
|
9352
|
+
if ((event.code === 'Enter' || event.code === 'NumpadEnter')) {
|
|
9350
9353
|
this.modelChange.next(this.model);
|
|
9351
9354
|
return false;
|
|
9352
9355
|
}
|
|
@@ -10720,6 +10723,7 @@ class PopupWindowShellComponent {
|
|
|
10720
10723
|
popupWindow;
|
|
10721
10724
|
hasMobileSizings;
|
|
10722
10725
|
_viewContainer;
|
|
10726
|
+
_blankViewContainer;
|
|
10723
10727
|
_appPopupButtons;
|
|
10724
10728
|
isError;
|
|
10725
10729
|
isWarning;
|
|
@@ -10762,8 +10766,10 @@ class PopupWindowShellComponent {
|
|
|
10762
10766
|
ngOnDestroy() {
|
|
10763
10767
|
this._close();
|
|
10764
10768
|
this._viewContainer.clear();
|
|
10769
|
+
this._blankViewContainer.clear();
|
|
10765
10770
|
this._popupCompRef = undefined;
|
|
10766
10771
|
this._viewContainer = undefined;
|
|
10772
|
+
this._blankViewContainer = undefined;
|
|
10767
10773
|
this._changeDetector = undefined;
|
|
10768
10774
|
}
|
|
10769
10775
|
async close(eventType) {
|
|
@@ -10795,7 +10801,12 @@ class PopupWindowShellComponent {
|
|
|
10795
10801
|
this.onCloseClick();
|
|
10796
10802
|
};
|
|
10797
10803
|
_createPopupComponent() {
|
|
10798
|
-
|
|
10804
|
+
if (this._viewContainer) {
|
|
10805
|
+
this._popupCompRef = this._viewContainer.createComponent(this.popupWindow.factory);
|
|
10806
|
+
}
|
|
10807
|
+
else {
|
|
10808
|
+
this._popupCompRef = this._blankViewContainer.createComponent(this.popupWindow.factory);
|
|
10809
|
+
}
|
|
10799
10810
|
ObjectUtils.ForOwnProperty(this.popupWindow.inputs, (value, key) => {
|
|
10800
10811
|
this._popupCompRef.instance[key] = value;
|
|
10801
10812
|
});
|
|
@@ -10840,45 +10851,61 @@ class PopupWindowShellComponent {
|
|
|
10840
10851
|
}
|
|
10841
10852
|
}
|
|
10842
10853
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PopupWindowShellComponent, deps: [{ token: IconCacheService }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10843
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10854
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: PopupWindowShellComponent, isStandalone: false, selector: "co-popup-window-shell", inputs: { popupWindow: "popupWindow", hasMobileSizings: "hasMobileSizings" }, host: { properties: { "class.mobile-sizings": "this.hasMobileSizings", "class.popup-error": "this.isError", "class.popup-warning": "this.isWarning", "class.popup-notification": "this.isNotification", "class.popup-question": "this.isQuestion", "class.movable": "this.isMovable" } }, viewQueries: [{ propertyName: "_viewContainer", first: true, predicate: ["popupContent"], descendants: true, read: ViewContainerRef }, { propertyName: "_blankViewContainer", first: true, predicate: ["blankPopupContent"], descendants: true, read: ViewContainerRef }, { propertyName: "_appPopupButtons", first: true, predicate: PopupButtonsComponent, descendants: true }], ngImport: i0, template: `
|
|
10855
|
+
@if (!isBlank) {
|
|
10856
|
+
@if (popupWindow?.settings.downloadable) {
|
|
10857
|
+
<co-button class="circle shadowed popup-downloadable" [iconData]="downloadIcon"
|
|
10858
|
+
iconClass="light"
|
|
10859
|
+
(click)="onDownloadClick()"></co-button>
|
|
10860
|
+
}
|
|
10861
|
+
@if (!popupWindow?.settings.hideCloseIcon) {
|
|
10862
|
+
<co-button class="circle shadowed popup-close" [iconData]="closeIcon"
|
|
10863
|
+
iconClass="light"
|
|
10864
|
+
(click)="onCloseClick()"></co-button>
|
|
10865
|
+
}
|
|
10866
|
+
@if (!isBlank) {
|
|
10867
|
+
<div class="popup-wrapper">
|
|
10868
|
+
<div class="popup-title"><h2 [textContent]="popupWindow?.settings.title"></h2></div>
|
|
10869
|
+
<div class="popup-content" (mousedown)="$event.stopImmediatePropagation()">
|
|
10870
|
+
<ng-template #popupContent></ng-template>
|
|
10871
|
+
</div>
|
|
10872
|
+
<co-popup-buttons [popupWindow]="popupWindow" (buttonClick)="onButtonClick($event)"></co-popup-buttons>
|
|
10855
10873
|
</div>
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10874
|
+
}
|
|
10875
|
+
}
|
|
10876
|
+
@if (isBlank) {
|
|
10877
|
+
<ng-template #blankPopupContent></ng-template>
|
|
10878
|
+
}
|
|
10879
|
+
`, isInline: true, styles: [":host{position:fixed;display:flex;top:50%;left:50%;transform:translate(-50%,-50%)}:host.popup-error div.popup-wrapper{background:#cfd0d1}:host.popup-warning .secondary-font{color:#fff}:host.popup-warning div.popup-wrapper{background:#484f60}:host.popup-warning div.popup-title,:host.popup-warning div.popup-content{color:#fff}:host.popup-notification div.popup-wrapper,:host.popup-question div.popup-wrapper{background:#cfd0d1}co-button.popup-close,co-button.popup-downloadable{position:absolute;transform:translateY(-50%)}co-button.popup-close{right:5px}co-button.popup-downloadable{right:45px}.popup-wrapper{padding:30px;border-radius:5px;box-shadow:0 0 13px -2px #0003;background:#cfd0d1;min-width:320px}.popup-wrapper .popup-title{padding-bottom:20px;border-bottom:1px solid #DAD9D9}.popup-wrapper .popup-content{margin-top:20px;margin-bottom:20px;max-height:50vh;max-width:80vw;overflow:auto}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "co-button", inputs: ["label", "iconData", "iconDataRight", "isToggleButton", "isToggled", "hidden", "disabled"], outputs: ["onClick", "clickedWhileDisabled", "isToggledChange"] }, { kind: "component", type: PopupButtonsComponent, selector: "co-popup-buttons", inputs: ["popupWindow"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10861
10880
|
}
|
|
10862
10881
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PopupWindowShellComponent, decorators: [{
|
|
10863
10882
|
type: Component,
|
|
10864
10883
|
args: [{ selector: "co-popup-window-shell", template: `
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10884
|
+
@if (!isBlank) {
|
|
10885
|
+
@if (popupWindow?.settings.downloadable) {
|
|
10886
|
+
<co-button class="circle shadowed popup-downloadable" [iconData]="downloadIcon"
|
|
10887
|
+
iconClass="light"
|
|
10888
|
+
(click)="onDownloadClick()"></co-button>
|
|
10889
|
+
}
|
|
10890
|
+
@if (!popupWindow?.settings.hideCloseIcon) {
|
|
10891
|
+
<co-button class="circle shadowed popup-close" [iconData]="closeIcon"
|
|
10892
|
+
iconClass="light"
|
|
10893
|
+
(click)="onCloseClick()"></co-button>
|
|
10894
|
+
}
|
|
10895
|
+
@if (!isBlank) {
|
|
10896
|
+
<div class="popup-wrapper">
|
|
10897
|
+
<div class="popup-title"><h2 [textContent]="popupWindow?.settings.title"></h2></div>
|
|
10898
|
+
<div class="popup-content" (mousedown)="$event.stopImmediatePropagation()">
|
|
10899
|
+
<ng-template #popupContent></ng-template>
|
|
10900
|
+
</div>
|
|
10901
|
+
<co-popup-buttons [popupWindow]="popupWindow" (buttonClick)="onButtonClick($event)"></co-popup-buttons>
|
|
10876
10902
|
</div>
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10903
|
+
}
|
|
10904
|
+
}
|
|
10905
|
+
@if (isBlank) {
|
|
10906
|
+
<ng-template #blankPopupContent></ng-template>
|
|
10907
|
+
}
|
|
10908
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{position:fixed;display:flex;top:50%;left:50%;transform:translate(-50%,-50%)}:host.popup-error div.popup-wrapper{background:#cfd0d1}:host.popup-warning .secondary-font{color:#fff}:host.popup-warning div.popup-wrapper{background:#484f60}:host.popup-warning div.popup-title,:host.popup-warning div.popup-content{color:#fff}:host.popup-notification div.popup-wrapper,:host.popup-question div.popup-wrapper{background:#cfd0d1}co-button.popup-close,co-button.popup-downloadable{position:absolute;transform:translateY(-50%)}co-button.popup-close{right:5px}co-button.popup-downloadable{right:45px}.popup-wrapper{padding:30px;border-radius:5px;box-shadow:0 0 13px -2px #0003;background:#cfd0d1;min-width:320px}.popup-wrapper .popup-title{padding-bottom:20px;border-bottom:1px solid #DAD9D9}.popup-wrapper .popup-content{margin-top:20px;margin-bottom:20px;max-height:50vh;max-width:80vw;overflow:auto}\n"] }]
|
|
10882
10909
|
}], ctorParameters: () => [{ type: IconCacheService }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }], propDecorators: { popupWindow: [{
|
|
10883
10910
|
type: Input
|
|
10884
10911
|
}], hasMobileSizings: [{
|
|
@@ -10889,6 +10916,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10889
10916
|
}], _viewContainer: [{
|
|
10890
10917
|
type: ViewChild,
|
|
10891
10918
|
args: ["popupContent", { read: ViewContainerRef }]
|
|
10919
|
+
}], _blankViewContainer: [{
|
|
10920
|
+
type: ViewChild,
|
|
10921
|
+
args: ["blankPopupContent", { read: ViewContainerRef }]
|
|
10892
10922
|
}], _appPopupButtons: [{
|
|
10893
10923
|
type: ViewChild,
|
|
10894
10924
|
args: [PopupButtonsComponent]
|
|
@@ -12043,38 +12073,36 @@ class SimpleGridCellComponent {
|
|
|
12043
12073
|
this._changeDetector.detectChanges();
|
|
12044
12074
|
}
|
|
12045
12075
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridCellComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: FormComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
12046
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
12076
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridCellComponent, isStandalone: false, selector: "co-simple-grid-cell", inputs: { editMode: "editMode", column: "column", row: "row", fieldEditMode: "fieldEditMode" }, outputs: { cellClick: "cellClick" }, host: { listeners: { "click": "handleClick($event)" }, properties: { "class.co-simple-grid-cell": "this.showClass" } }, viewQueries: [{ propertyName: "editTemplateContent", first: true, predicate: ["editTemplate"], descendants: true, read: BaseInputComponent }, { propertyName: "noEditTemplateContent", first: true, predicate: ["noEditTemplate"], descendants: true }, { propertyName: "noTemplateContent", first: true, predicate: ["noTemplate"], descendants: true }], ngImport: i0, template: `
|
|
12047
12077
|
<div class="simple-grid-column-cell-value" [ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
<
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
</div>
|
|
12075
|
-
</ng-template>
|
|
12078
|
+
@if (editMode) {
|
|
12079
|
+
<div class="simple-grid-column-cell-field">
|
|
12080
|
+
@if (column.editTemplate) {
|
|
12081
|
+
<ng-container #editTemplate
|
|
12082
|
+
[ngTemplateOutlet]="column.editTemplate"
|
|
12083
|
+
[ngTemplateOutletInjector]="columnInjector"
|
|
12084
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
12085
|
+
} @else {
|
|
12086
|
+
@if (column.template) {
|
|
12087
|
+
<ng-container [ngTemplateOutlet]="column.template"
|
|
12088
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
12089
|
+
} @else {
|
|
12090
|
+
<co-input-text [(model)]="row[column.field]" [required]="column.required"></co-input-text>
|
|
12091
|
+
}
|
|
12092
|
+
}
|
|
12093
|
+
</div>
|
|
12094
|
+
} @else {
|
|
12095
|
+
<div class="simple-grid-column-cell-field">
|
|
12096
|
+
@if (column.template) {
|
|
12097
|
+
<ng-container [ngTemplateOutlet]="column.template"
|
|
12098
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
12099
|
+
} @else {
|
|
12100
|
+
<span [textContent]="column.getFieldValue(row[column.field])" [title]="row[column.field]"></span>
|
|
12101
|
+
}
|
|
12102
|
+
</div>
|
|
12103
|
+
}
|
|
12076
12104
|
</div>
|
|
12077
|
-
|
|
12105
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputTextComponent, selector: "co-input-text", inputs: ["useContent", "placeholder", "align", "type", "formatPipe", "min", "max", "pattern", "digitsOnly", "excludePlusMinus", "showClearButton", "keyDownWhiteList", "showPlaceholderOnFocus", "leftIcon", "rightIcon", "leftIconData", "rightIconData", "selectOnFocus", "emptyPlace", "firstDayOfWeek", "noStyle", "hideArrowButtons", "model"], outputs: ["leftIconClick", "leftIconMouseDown", "leftIconMouseUp", "rightIconClick", "rightIconMouseDown", "rightIconMouseUp", "clearIconClick", "isFocused"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
12078
12106
|
}
|
|
12079
12107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridCellComponent, decorators: [{
|
|
12080
12108
|
type: Component,
|
|
@@ -12082,36 +12110,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
12082
12110
|
selector: "co-simple-grid-cell",
|
|
12083
12111
|
template: `
|
|
12084
12112
|
<div class="simple-grid-column-cell-value" [ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
<
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
</div>
|
|
12112
|
-
</ng-template>
|
|
12113
|
+
@if (editMode) {
|
|
12114
|
+
<div class="simple-grid-column-cell-field">
|
|
12115
|
+
@if (column.editTemplate) {
|
|
12116
|
+
<ng-container #editTemplate
|
|
12117
|
+
[ngTemplateOutlet]="column.editTemplate"
|
|
12118
|
+
[ngTemplateOutletInjector]="columnInjector"
|
|
12119
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
12120
|
+
} @else {
|
|
12121
|
+
@if (column.template) {
|
|
12122
|
+
<ng-container [ngTemplateOutlet]="column.template"
|
|
12123
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
12124
|
+
} @else {
|
|
12125
|
+
<co-input-text [(model)]="row[column.field]" [required]="column.required"></co-input-text>
|
|
12126
|
+
}
|
|
12127
|
+
}
|
|
12128
|
+
</div>
|
|
12129
|
+
} @else {
|
|
12130
|
+
<div class="simple-grid-column-cell-field">
|
|
12131
|
+
@if (column.template) {
|
|
12132
|
+
<ng-container [ngTemplateOutlet]="column.template"
|
|
12133
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
12134
|
+
} @else {
|
|
12135
|
+
<span [textContent]="column.getFieldValue(row[column.field])" [title]="row[column.field]"></span>
|
|
12136
|
+
}
|
|
12137
|
+
</div>
|
|
12138
|
+
}
|
|
12113
12139
|
</div>
|
|
12114
|
-
|
|
12140
|
+
`,
|
|
12115
12141
|
encapsulation: ViewEncapsulation.None,
|
|
12116
12142
|
standalone: false
|
|
12117
12143
|
}]
|
|
@@ -14319,6 +14345,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14319
14345
|
searchPlaceholder = '';
|
|
14320
14346
|
searchDisabled = false;
|
|
14321
14347
|
showChips = true;
|
|
14348
|
+
leftIconClick = new EventEmitter();
|
|
14322
14349
|
showClass() {
|
|
14323
14350
|
return true;
|
|
14324
14351
|
}
|
|
@@ -14578,7 +14605,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14578
14605
|
}
|
|
14579
14606
|
}
|
|
14580
14607
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ListOfValuesComponent, deps: [{ token: FormComponent, optional: true }, { token: IconCacheService }, { token: i0.ChangeDetectorRef }, { token: OverlayService }, { token: FormInputUserModelChangeListenerService }, { token: NgZoneWrapperService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
14581
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListOfValuesComponent, isStandalone: false, selector: "co-list-of-values", inputs: { model: "model", multiselect: "multiselect", showToggleAll: "showToggleAll", largeCollection: "largeCollection", displayField: "displayField", optionIcon: "optionIcon", collection: "collection", collectionLoadFn: "collectionLoadFn", collectionLoadFnProp: "collectionLoadFnProp", leftIconData: "leftIconData", searchPlaceholder: "searchPlaceholder", searchDisabled: "searchDisabled", showChips: "showChips" }, host: { properties: { "class.custom-height": "this.multiselect", "class.multi-select": "this.multiselect", "class.co-list-of-values": "this.showClass" } }, providers: [
|
|
14608
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ListOfValuesComponent, isStandalone: false, selector: "co-list-of-values", inputs: { model: "model", multiselect: "multiselect", showToggleAll: "showToggleAll", largeCollection: "largeCollection", displayField: "displayField", optionIcon: "optionIcon", collection: "collection", collectionLoadFn: "collectionLoadFn", collectionLoadFnProp: "collectionLoadFnProp", leftIconData: "leftIconData", searchPlaceholder: "searchPlaceholder", searchDisabled: "searchDisabled", showChips: "showChips" }, outputs: { leftIconClick: "leftIconClick" }, host: { properties: { "class.custom-height": "this.multiselect", "class.multi-select": "this.multiselect", "class.co-list-of-values": "this.showClass" } }, providers: [
|
|
14582
14609
|
OverlayService,
|
|
14583
14610
|
{
|
|
14584
14611
|
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
@@ -14613,6 +14640,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
14613
14640
|
(click)="openPopup()"
|
|
14614
14641
|
(rightIconClick)="toggleSelect()"
|
|
14615
14642
|
(keydown)="handleInputKeyDown($event)"
|
|
14643
|
+
(leftIconClick)="leftIconClick.emit()"
|
|
14616
14644
|
(clearIconClick)="clearModel($event)"
|
|
14617
14645
|
(blur)="checkModel()">
|
|
14618
14646
|
@if (multiselect && showChips) {
|
|
@@ -14665,6 +14693,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14665
14693
|
(click)="openPopup()"
|
|
14666
14694
|
(rightIconClick)="toggleSelect()"
|
|
14667
14695
|
(keydown)="handleInputKeyDown($event)"
|
|
14696
|
+
(leftIconClick)="leftIconClick.emit()"
|
|
14668
14697
|
(clearIconClick)="clearModel($event)"
|
|
14669
14698
|
(blur)="checkModel()">
|
|
14670
14699
|
@if (multiselect && showChips) {
|
|
@@ -14730,6 +14759,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14730
14759
|
type: Input
|
|
14731
14760
|
}], showChips: [{
|
|
14732
14761
|
type: Input
|
|
14762
|
+
}], leftIconClick: [{
|
|
14763
|
+
type: Output
|
|
14733
14764
|
}], showClass: [{
|
|
14734
14765
|
type: HostBinding,
|
|
14735
14766
|
args: ['class.co-list-of-values']
|
|
@@ -19694,6 +19725,7 @@ class HourSchedulingExpandableComponent {
|
|
|
19694
19725
|
hourLabels = [];
|
|
19695
19726
|
scheduledObjects = [];
|
|
19696
19727
|
selectedHour;
|
|
19728
|
+
layouts = [];
|
|
19697
19729
|
resizing = false;
|
|
19698
19730
|
resizeDirection;
|
|
19699
19731
|
initialY;
|
|
@@ -19784,6 +19816,7 @@ class HourSchedulingExpandableComponent {
|
|
|
19784
19816
|
});
|
|
19785
19817
|
}
|
|
19786
19818
|
this.scheduledObjects = schedulingObjects;
|
|
19819
|
+
this.layouts = this.calculateLeftAndWidthOfObjects();
|
|
19787
19820
|
this.cdRef.markForCheck();
|
|
19788
19821
|
this.cdRef.detectChanges();
|
|
19789
19822
|
}
|
|
@@ -19837,6 +19870,7 @@ class HourSchedulingExpandableComponent {
|
|
|
19837
19870
|
this.moveBetweenCalendarsEvent.emit({ hour: hour, data: parsed });
|
|
19838
19871
|
}
|
|
19839
19872
|
}
|
|
19873
|
+
this.layouts = this.calculateLeftAndWidthOfObjects();
|
|
19840
19874
|
}
|
|
19841
19875
|
allowDrop(event, hour) {
|
|
19842
19876
|
event.preventDefault();
|
|
@@ -19914,6 +19948,7 @@ class HourSchedulingExpandableComponent {
|
|
|
19914
19948
|
this.resizing = false;
|
|
19915
19949
|
this.currentResizingObject.selected = false;
|
|
19916
19950
|
this.currentResizingObject = null;
|
|
19951
|
+
this.layouts = this.calculateLeftAndWidthOfObjects();
|
|
19917
19952
|
}
|
|
19918
19953
|
document.removeEventListener("mousemove", this._onMouseMove);
|
|
19919
19954
|
document.removeEventListener("mouseup", this._onMouseUp);
|
|
@@ -19982,6 +20017,48 @@ class HourSchedulingExpandableComponent {
|
|
|
19982
20017
|
this.taskCreationEvent.emit(hour);
|
|
19983
20018
|
this.selectedHour = "";
|
|
19984
20019
|
}
|
|
20020
|
+
calculateLeftAndWidthOfObjects() {
|
|
20021
|
+
const layoutData = new Array(this.scheduledObjects.length);
|
|
20022
|
+
// Helper: check if two time ranges overlap
|
|
20023
|
+
const isOverlapping = (startA, endA, startB, endB) => {
|
|
20024
|
+
return startA < endB && startB < endA;
|
|
20025
|
+
};
|
|
20026
|
+
// Step 1: build overlap groups
|
|
20027
|
+
const overlapGroups = [];
|
|
20028
|
+
const processed = new Set();
|
|
20029
|
+
for (let i = 0; i < this.scheduledObjects.length; i++) {
|
|
20030
|
+
if (processed.has(i)) {
|
|
20031
|
+
continue;
|
|
20032
|
+
}
|
|
20033
|
+
const group = [i];
|
|
20034
|
+
const objA = this.scheduledObjects[i];
|
|
20035
|
+
const startA = new Date(objA.start);
|
|
20036
|
+
const endA = new Date(objA.end);
|
|
20037
|
+
for (let j = i + 1; j < this.scheduledObjects.length; j++) {
|
|
20038
|
+
const objB = this.scheduledObjects[j];
|
|
20039
|
+
const startB = new Date(objB.start);
|
|
20040
|
+
const endB = new Date(objB.end);
|
|
20041
|
+
if (isOverlapping(startA, endA, startB, endB)) {
|
|
20042
|
+
group.push(j);
|
|
20043
|
+
processed.add(j);
|
|
20044
|
+
}
|
|
20045
|
+
}
|
|
20046
|
+
group.forEach(index => processed.add(index));
|
|
20047
|
+
overlapGroups.push(group);
|
|
20048
|
+
}
|
|
20049
|
+
// Step 2: assign layout per group
|
|
20050
|
+
overlapGroups.forEach(group => {
|
|
20051
|
+
const total = group.length;
|
|
20052
|
+
const width = 100 / total;
|
|
20053
|
+
group.forEach((objectIndex, i) => {
|
|
20054
|
+
layoutData[objectIndex] = {
|
|
20055
|
+
leftPercent: i * width,
|
|
20056
|
+
widthPercent: width
|
|
20057
|
+
};
|
|
20058
|
+
});
|
|
20059
|
+
});
|
|
20060
|
+
return layoutData;
|
|
20061
|
+
}
|
|
19985
20062
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: IconCacheService }], target: i0.ɵɵFactoryTarget.Component });
|
|
19986
20063
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: HourSchedulingExpandableComponent, isStandalone: false, selector: "co-hour-scheduling-expandable", inputs: { schedule: "schedule", startTimeProp: "startTimeProp", endTimeProp: "endTimeProp", objectsProp: "objectsProp", childProp: "childProp", customTemplate: "customTemplate", idProp: "idProp" }, outputs: { timeChangeEvent: "timeChangeEvent", newObjectPlanEvent: "newObjectPlanEvent", taskCreationEvent: "taskCreationEvent", moveBetweenCalendarsEvent: "moveBetweenCalendarsEvent" }, host: { listeners: { "window:resize": "onResize($event)", "document:click": "clickOut($event)" }, properties: { "class.co-hour-scheduling-expandable": "this.showClass" } }, ngImport: i0, template: `
|
|
19987
20064
|
<div class="wrapper">
|
|
@@ -20016,6 +20093,7 @@ class HourSchedulingExpandableComponent {
|
|
|
20016
20093
|
[ngTemplateOutlet]="customTemplate"
|
|
20017
20094
|
[ngTemplateOutletContext]="{
|
|
20018
20095
|
objects: scheduledObjects,
|
|
20096
|
+
layouts: layouts,
|
|
20019
20097
|
onSelectBlock: this.onSelectBlock.bind(this),
|
|
20020
20098
|
onResizeStart: this.onResizeStart.bind(this),
|
|
20021
20099
|
onResizeEnd: this.onResizeEnd.bind(this),
|
|
@@ -20069,6 +20147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
20069
20147
|
[ngTemplateOutlet]="customTemplate"
|
|
20070
20148
|
[ngTemplateOutletContext]="{
|
|
20071
20149
|
objects: scheduledObjects,
|
|
20150
|
+
layouts: layouts,
|
|
20072
20151
|
onSelectBlock: this.onSelectBlock.bind(this),
|
|
20073
20152
|
onResizeStart: this.onResizeStart.bind(this),
|
|
20074
20153
|
onResizeEnd: this.onResizeEnd.bind(this),
|
|
@@ -20127,7 +20206,6 @@ class HourSchedulingExpandableTemplateComponent {
|
|
|
20127
20206
|
objectTemplate;
|
|
20128
20207
|
set objects(objects) {
|
|
20129
20208
|
this._objects = objects;
|
|
20130
|
-
this.layouts = this.calculateLeftAndWidthOfObjects();
|
|
20131
20209
|
}
|
|
20132
20210
|
get objects() {
|
|
20133
20211
|
return this._objects;
|
|
@@ -20144,50 +20222,8 @@ class HourSchedulingExpandableTemplateComponent {
|
|
|
20144
20222
|
event.dataTransfer?.setData("text", JSON.stringify(obj));
|
|
20145
20223
|
this.onDragStartCustom?.(obj);
|
|
20146
20224
|
}
|
|
20147
|
-
calculateLeftAndWidthOfObjects() {
|
|
20148
|
-
const layoutData = new Array(this._objects.length);
|
|
20149
|
-
// Helper: check if two time ranges overlap
|
|
20150
|
-
const isOverlapping = (startA, endA, startB, endB) => {
|
|
20151
|
-
return startA < endB && startB < endA;
|
|
20152
|
-
};
|
|
20153
|
-
// Step 1: build overlap groups
|
|
20154
|
-
const overlapGroups = [];
|
|
20155
|
-
const processed = new Set();
|
|
20156
|
-
for (let i = 0; i < this._objects.length; i++) {
|
|
20157
|
-
if (processed.has(i)) {
|
|
20158
|
-
continue;
|
|
20159
|
-
}
|
|
20160
|
-
const group = [i];
|
|
20161
|
-
const objA = this._objects[i];
|
|
20162
|
-
const startA = new Date(objA.start);
|
|
20163
|
-
const endA = new Date(objA.end);
|
|
20164
|
-
for (let j = i + 1; j < this._objects.length; j++) {
|
|
20165
|
-
const objB = this._objects[j];
|
|
20166
|
-
const startB = new Date(objB.start);
|
|
20167
|
-
const endB = new Date(objB.end);
|
|
20168
|
-
if (isOverlapping(startA, endA, startB, endB)) {
|
|
20169
|
-
group.push(j);
|
|
20170
|
-
processed.add(j);
|
|
20171
|
-
}
|
|
20172
|
-
}
|
|
20173
|
-
group.forEach(index => processed.add(index));
|
|
20174
|
-
overlapGroups.push(group);
|
|
20175
|
-
}
|
|
20176
|
-
// Step 2: assign layout per group
|
|
20177
|
-
overlapGroups.forEach(group => {
|
|
20178
|
-
const total = group.length;
|
|
20179
|
-
const width = 100 / total;
|
|
20180
|
-
group.forEach((objectIndex, i) => {
|
|
20181
|
-
layoutData[objectIndex] = {
|
|
20182
|
-
leftPercent: i * width,
|
|
20183
|
-
widthPercent: width
|
|
20184
|
-
};
|
|
20185
|
-
});
|
|
20186
|
-
});
|
|
20187
|
-
return layoutData;
|
|
20188
|
-
}
|
|
20189
20225
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20190
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: HourSchedulingExpandableTemplateComponent, isStandalone: false, selector: "co-hour-scheduling-expandable-template", inputs: { objectTemplate: "objectTemplate", objects: "objects", onDragStartCustom: "onDragStartCustom", onResizeStart: "onResizeStart", onSelectBlock: "onSelectBlock", startTimeProp: "startTimeProp", endTimeProp: "endTimeProp" }, host: { properties: { "class.co-hour-scheduling-expandable-template": "this.showClass" } }, ngImport: i0, template: `
|
|
20226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: HourSchedulingExpandableTemplateComponent, isStandalone: false, selector: "co-hour-scheduling-expandable-template", inputs: { layouts: "layouts", objectTemplate: "objectTemplate", objects: "objects", onDragStartCustom: "onDragStartCustom", onResizeStart: "onResizeStart", onSelectBlock: "onSelectBlock", startTimeProp: "startTimeProp", endTimeProp: "endTimeProp" }, host: { properties: { "class.co-hour-scheduling-expandable-template": "this.showClass" } }, ngImport: i0, template: `
|
|
20191
20227
|
|
|
20192
20228
|
@for (obj of objects; track obj.id; let i = $index) {
|
|
20193
20229
|
<div
|
|
@@ -20206,7 +20242,7 @@ class HourSchedulingExpandableTemplateComponent {
|
|
|
20206
20242
|
|
|
20207
20243
|
<ng-template
|
|
20208
20244
|
[ngTemplateOutlet]="objectTemplate"
|
|
20209
|
-
[ngTemplateOutletContext]="{object: obj}">
|
|
20245
|
+
[ngTemplateOutletContext]="{object: obj, layouts: layouts}">
|
|
20210
20246
|
</ng-template>
|
|
20211
20247
|
|
|
20212
20248
|
@if (obj.selected) {
|
|
@@ -20239,7 +20275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
20239
20275
|
|
|
20240
20276
|
<ng-template
|
|
20241
20277
|
[ngTemplateOutlet]="objectTemplate"
|
|
20242
|
-
[ngTemplateOutletContext]="{object: obj}">
|
|
20278
|
+
[ngTemplateOutletContext]="{object: obj, layouts: layouts}">
|
|
20243
20279
|
</ng-template>
|
|
20244
20280
|
|
|
20245
20281
|
@if (obj.selected) {
|
|
@@ -20251,7 +20287,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
20251
20287
|
encapsulation: ViewEncapsulation.None,
|
|
20252
20288
|
standalone: false
|
|
20253
20289
|
}]
|
|
20254
|
-
}], propDecorators: {
|
|
20290
|
+
}], propDecorators: { layouts: [{
|
|
20291
|
+
type: Input
|
|
20292
|
+
}], objectTemplate: [{
|
|
20255
20293
|
type: Input
|
|
20256
20294
|
}], objects: [{
|
|
20257
20295
|
type: Input
|