@colijnit/corecomponents_v12 260.1.3 → 260.1.5
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 +51 -13
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/hour-scheduling-expandable-template.component.js +36 -33
- package/esm2015/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.component.js +10 -5
- package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +4 -1
- package/esm2015/lib/components/list-of-values/list-of-values-popup.component.js +59 -31
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +4 -1
- package/esm2015/lib/components/list-of-values/list-of-values.module.js +4 -2
- package/fesm2015/colijnit-corecomponents_v12.js +109 -66
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/hour-scheduling-expandable-template.component.d.ts +1 -1
- package/lib/components/input-date-picker/input-date-picker.component.d.ts +1 -0
- package/lib/components/list-of-values/list-of-values-popup.component.d.ts +4 -0
- package/lib/components/list-of-values/list-of-values.component.d.ts +1 -0
- package/lib/components/list-of-values/style/_layout.scss +7 -0
- package/package.json +1 -1
|
@@ -5441,6 +5441,7 @@ class InputDatePickerComponent extends BaseInputDatePickerDirective {
|
|
|
5441
5441
|
this.ngZoneWrapper = ngZoneWrapper;
|
|
5442
5442
|
this.elementRef = elementRef;
|
|
5443
5443
|
this.firstDayOfWeek = '';
|
|
5444
|
+
this.showClearButton = true;
|
|
5444
5445
|
super._markAsOnPush();
|
|
5445
5446
|
}
|
|
5446
5447
|
showClass() {
|
|
@@ -5528,6 +5529,7 @@ InputDatePickerComponent.decorators = [
|
|
|
5528
5529
|
[pattern]="'yyyy-MM-dd'"
|
|
5529
5530
|
[type]="'date'"
|
|
5530
5531
|
[placeholder]="placeholder"
|
|
5532
|
+
[showClearButton]="showClearButton"
|
|
5531
5533
|
(leftIconClick)="leftIconClick.emit($event)"
|
|
5532
5534
|
(rightIconClick)="toggleCalendar(true)"
|
|
5533
5535
|
(modelChange)="modelAsString = $event"
|
|
@@ -5561,6 +5563,7 @@ InputDatePickerComponent.ctorParameters = () => [
|
|
|
5561
5563
|
];
|
|
5562
5564
|
InputDatePickerComponent.propDecorators = {
|
|
5563
5565
|
firstDayOfWeek: [{ type: Input }],
|
|
5566
|
+
showClearButton: [{ type: Input }],
|
|
5564
5567
|
showClass: [{ type: HostBinding, args: ['class.co-input-date',] }]
|
|
5565
5568
|
};
|
|
5566
5569
|
|
|
@@ -11225,6 +11228,7 @@ class ListOfValuesPopupComponent {
|
|
|
11225
11228
|
this.iconCacheService = iconCacheService;
|
|
11226
11229
|
this._elementRef = _elementRef;
|
|
11227
11230
|
this.multiselect = false;
|
|
11231
|
+
this.showToggleAll = false;
|
|
11228
11232
|
this.displayField = 'description';
|
|
11229
11233
|
this.searchDisabled = false;
|
|
11230
11234
|
this.modelChange = new EventEmitter();
|
|
@@ -11232,6 +11236,7 @@ class ListOfValuesPopupComponent {
|
|
|
11232
11236
|
this.keyDown = new EventEmitter();
|
|
11233
11237
|
this.viewModels = [];
|
|
11234
11238
|
this.viewModelsMain = [];
|
|
11239
|
+
this.allSelected = false;
|
|
11235
11240
|
this._collection = [];
|
|
11236
11241
|
this._searchTerm = '';
|
|
11237
11242
|
this._lovItems = [];
|
|
@@ -11377,6 +11382,27 @@ class ListOfValuesPopupComponent {
|
|
|
11377
11382
|
this._scrollIntoView();
|
|
11378
11383
|
}
|
|
11379
11384
|
}
|
|
11385
|
+
selectAll() {
|
|
11386
|
+
if (this.viewModels.length > 0) {
|
|
11387
|
+
this.viewModels.forEach(vm => vm.checked = true);
|
|
11388
|
+
this.selectOptions();
|
|
11389
|
+
}
|
|
11390
|
+
}
|
|
11391
|
+
toggleAll() {
|
|
11392
|
+
if (!this.allSelected) {
|
|
11393
|
+
if (this.viewModels.length > 0) {
|
|
11394
|
+
this.viewModels.forEach(vm => vm.checked = true);
|
|
11395
|
+
this.selectOptions();
|
|
11396
|
+
}
|
|
11397
|
+
}
|
|
11398
|
+
else {
|
|
11399
|
+
if (this.viewModels.length > 0) {
|
|
11400
|
+
this.viewModels.forEach(vm => vm.checked = false);
|
|
11401
|
+
this.selectOptions();
|
|
11402
|
+
}
|
|
11403
|
+
}
|
|
11404
|
+
this.allSelected = !this.allSelected;
|
|
11405
|
+
}
|
|
11380
11406
|
_prepareViewModelsMain() {
|
|
11381
11407
|
this.viewModelsMain.length = 0;
|
|
11382
11408
|
this.collection.forEach(m => {
|
|
@@ -11417,36 +11443,40 @@ ListOfValuesPopupComponent.decorators = [
|
|
|
11417
11443
|
{ type: Component, args: [{
|
|
11418
11444
|
selector: 'co-list-of-values-popup',
|
|
11419
11445
|
template: `
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11446
|
+
<div class="lov-options" [overlay]="parentForOverlay" [inheritWidth]="true" [ngClass]="customCssClass"
|
|
11447
|
+
id="lov-popup"
|
|
11448
|
+
role="listbox" [tabindex]="-1"
|
|
11449
|
+
(clickOutside)="closePopup.emit($event)">
|
|
11450
|
+
<co-input-search *ngIf="multiselect"
|
|
11451
|
+
tabindex="-1"
|
|
11452
|
+
[(model)]="searchTerm"
|
|
11453
|
+
[placeholder]="searchPlaceholder"
|
|
11454
|
+
(keydown)="handleInputKeyDown($event)"
|
|
11455
|
+
(modelChange)="filterViewModels()"></co-input-search>
|
|
11456
|
+
<div class="row gap" *ngIf="showToggleAll && multiselect">
|
|
11457
|
+
<co-input-checkbox [model]="allSelected" (modelChange)="toggleAll()"></co-input-checkbox>
|
|
11458
|
+
<span [textContent]="'DESELECT_ALL' | coreLocalize" (click)="toggleAll()"></span>
|
|
11459
|
+
</div>
|
|
11460
|
+
<ul class="dropdown-list" #dropDownList>
|
|
11461
|
+
<li
|
|
11462
|
+
#lovItem
|
|
11463
|
+
*ngFor="let viewModel of viewModels; let index = index"
|
|
11464
|
+
[class.selected]="viewModel === highLightModel || viewModels.length === 1"
|
|
11465
|
+
(click)="selectViewModel(viewModel, !multiselect)"
|
|
11466
|
+
role="option">
|
|
11467
|
+
<ng-container *ngIf="!multiselect">
|
|
11468
|
+
<co-icon *ngIf="viewModel.model[optionIcon]" class="input-text-left-icon" [iconData]="iconCacheService.getIcon(viewModel.model[optionIcon])">
|
|
11469
|
+
</co-icon>
|
|
11470
|
+
<span class="lov-options-text" [textContent]="viewModel.model[displayField]"></span>
|
|
11471
|
+
</ng-container>
|
|
11472
|
+
<ng-container *ngIf="multiselect">
|
|
11473
|
+
<co-input-checkbox [model]="viewModel.checked"
|
|
11474
|
+
(modelChange)="selectViewModel(viewModel, false)"></co-input-checkbox>
|
|
11475
|
+
<span class="lov-options-text" [textContent]="viewModel.model[displayField]"></span>
|
|
11476
|
+
</ng-container>
|
|
11477
|
+
</li>
|
|
11478
|
+
</ul>
|
|
11479
|
+
</div>
|
|
11450
11480
|
`,
|
|
11451
11481
|
encapsulation: ViewEncapsulation.None
|
|
11452
11482
|
},] }
|
|
@@ -11461,6 +11491,7 @@ ListOfValuesPopupComponent.propDecorators = {
|
|
|
11461
11491
|
inputSearch: [{ type: ViewChild, args: [InputSearchComponent,] }],
|
|
11462
11492
|
model: [{ type: Input }],
|
|
11463
11493
|
multiselect: [{ type: Input }],
|
|
11494
|
+
showToggleAll: [{ type: Input }],
|
|
11464
11495
|
displayField: [{ type: Input }],
|
|
11465
11496
|
searchPlaceholder: [{ type: Input }],
|
|
11466
11497
|
customCssClass: [{ type: Input }],
|
|
@@ -11487,6 +11518,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
11487
11518
|
this.elementRef = elementRef;
|
|
11488
11519
|
this.icons = CoreComponentsIcon;
|
|
11489
11520
|
this.multiselect = false;
|
|
11521
|
+
this.showToggleAll = false;
|
|
11490
11522
|
this.largeCollection = false;
|
|
11491
11523
|
this.displayField = 'description';
|
|
11492
11524
|
this.searchDisabled = false;
|
|
@@ -11615,6 +11647,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
11615
11647
|
searchPlaceholder: this.searchPlaceholder,
|
|
11616
11648
|
displayField: this.displayField,
|
|
11617
11649
|
multiselect: this.multiselect,
|
|
11650
|
+
showToggleAll: this.showToggleAll,
|
|
11618
11651
|
model: this.model,
|
|
11619
11652
|
collection: this.collection,
|
|
11620
11653
|
optionIcon: this.optionIcon,
|
|
@@ -11772,6 +11805,7 @@ ListOfValuesComponent.propDecorators = {
|
|
|
11772
11805
|
model: [{ type: Input }],
|
|
11773
11806
|
parentForOverlay: [{ type: ViewChild, args: ['parentForOverlay', { read: ElementRef },] }],
|
|
11774
11807
|
multiselect: [{ type: HostBinding, args: ['class.custom-height',] }, { type: HostBinding, args: ['class.multi-select',] }, { type: Input }],
|
|
11808
|
+
showToggleAll: [{ type: Input }],
|
|
11775
11809
|
largeCollection: [{ type: Input }],
|
|
11776
11810
|
displayField: [{ type: Input }],
|
|
11777
11811
|
optionIcon: [{ type: Input }],
|
|
@@ -11907,7 +11941,8 @@ ListOfValuesModule.decorators = [
|
|
|
11907
11941
|
OverlayModule,
|
|
11908
11942
|
ClickoutsideModule,
|
|
11909
11943
|
IconModule,
|
|
11910
|
-
InputSearchModule
|
|
11944
|
+
InputSearchModule,
|
|
11945
|
+
CoreComponentsTranslationModule
|
|
11911
11946
|
],
|
|
11912
11947
|
declarations: [
|
|
11913
11948
|
ListOfValuesComponent,
|
|
@@ -15056,6 +15091,11 @@ class HourSchedulingExpandableComponent {
|
|
|
15056
15091
|
this.currentDraggingObject = obj;
|
|
15057
15092
|
}
|
|
15058
15093
|
handleDrop(dragEvent, hour) {
|
|
15094
|
+
dragEvent.preventDefault();
|
|
15095
|
+
dragEvent.stopPropagation();
|
|
15096
|
+
if (!this.schedule[this.objectsProp] || !this.schedule[this.objectsProp].find((object) => object[this.idProp] === this.currentDraggingObject.id) && this.currentDraggingObject) {
|
|
15097
|
+
this.currentDraggingObject = undefined;
|
|
15098
|
+
}
|
|
15059
15099
|
if (this.currentDraggingObject) {
|
|
15060
15100
|
//The order was scheduled and needs to be moved
|
|
15061
15101
|
let start = this.currentDraggingObject.start;
|
|
@@ -15073,17 +15113,17 @@ class HourSchedulingExpandableComponent {
|
|
|
15073
15113
|
scheduledObject.top = this.timeDifference(this.schedule[this.childProp][this.startTimeProp], scheduledObject.start);
|
|
15074
15114
|
scheduledObject.height = this.timeDifference(scheduledObject.start, scheduledObject.end);
|
|
15075
15115
|
this.timeChangeEvent.emit(originalObject);
|
|
15076
|
-
this.currentDraggingObject = undefined;
|
|
15077
15116
|
}
|
|
15117
|
+
this.currentDraggingObject = undefined;
|
|
15078
15118
|
}
|
|
15079
15119
|
else {
|
|
15080
15120
|
let parsed = this.tryParseJSONObject(dragEvent.dataTransfer.getData("text"));
|
|
15081
15121
|
if (!parsed) {
|
|
15082
15122
|
this.newObjectPlanEvent.emit({ currentHour: hour, data: parsed.toString() });
|
|
15083
|
-
return;
|
|
15084
15123
|
}
|
|
15085
|
-
|
|
15086
|
-
|
|
15124
|
+
else {
|
|
15125
|
+
this.moveBetweenCalendarsEvent.emit({ hour: hour, data: parsed });
|
|
15126
|
+
}
|
|
15087
15127
|
}
|
|
15088
15128
|
}
|
|
15089
15129
|
allowDrop(event, hour) {
|
|
@@ -15303,8 +15343,10 @@ class HourSchedulingExpandableTemplateComponent {
|
|
|
15303
15343
|
return true;
|
|
15304
15344
|
}
|
|
15305
15345
|
onExpandableDragStart(event, obj, onDragStartCustom) {
|
|
15306
|
-
|
|
15307
|
-
|
|
15346
|
+
event.dataTransfer.setData('text', JSON.stringify({ obj }));
|
|
15347
|
+
if (onDragStartCustom) {
|
|
15348
|
+
onDragStartCustom === null || onDragStartCustom === void 0 ? void 0 : onDragStartCustom.call(obj);
|
|
15349
|
+
}
|
|
15308
15350
|
}
|
|
15309
15351
|
calculateLeftAndWidthOfObjects() {
|
|
15310
15352
|
const layoutData = new Array(this._objects.length);
|
|
@@ -15316,8 +15358,9 @@ class HourSchedulingExpandableTemplateComponent {
|
|
|
15316
15358
|
const overlapGroups = [];
|
|
15317
15359
|
const processed = new Set();
|
|
15318
15360
|
for (let i = 0; i < this._objects.length; i++) {
|
|
15319
|
-
if (processed.has(i))
|
|
15361
|
+
if (processed.has(i)) {
|
|
15320
15362
|
continue;
|
|
15363
|
+
}
|
|
15321
15364
|
const group = [i];
|
|
15322
15365
|
const objA = this._objects[i];
|
|
15323
15366
|
const startA = new Date(objA.start);
|
|
@@ -15350,37 +15393,37 @@ class HourSchedulingExpandableTemplateComponent {
|
|
|
15350
15393
|
}
|
|
15351
15394
|
HourSchedulingExpandableTemplateComponent.decorators = [
|
|
15352
15395
|
{ type: Component, args: [{
|
|
15353
|
-
selector:
|
|
15396
|
+
selector: 'co-hour-scheduling-expandable-template',
|
|
15354
15397
|
template: `
|
|
15355
|
-
|
|
15356
|
-
<div
|
|
15357
|
-
*ngFor="let obj of objects"
|
|
15358
|
-
[class]="'custom-scheduled-object'"
|
|
15359
|
-
[class.selected]="obj.selected"
|
|
15360
|
-
[draggable]="!obj.selected"
|
|
15361
|
-
[style.--height]="obj.height + 'px'"
|
|
15362
|
-
[style.--top]="obj.top + 'px'"
|
|
15363
|
-
[style.--left]="layouts[objects.indexOf(obj)].leftPercent + '%'"
|
|
15364
|
-
[style.--width]="layouts[objects.indexOf(obj)].widthPercent + '%'"
|
|
15365
|
-
(click)="onSelectBlock(obj)"
|
|
15366
|
-
(dragstart)="onExpandableDragStart($event, obj, onDragStartCustom(obj) )">
|
|
15367
15398
|
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15399
|
+
<div
|
|
15400
|
+
*ngFor="let obj of objects"
|
|
15401
|
+
[class]="'custom-scheduled-object'"
|
|
15402
|
+
[class.selected]="obj.selected"
|
|
15403
|
+
[draggable]="!obj.selected"
|
|
15404
|
+
[style.--height]="obj.height + 'px'"
|
|
15405
|
+
[style.--top]="obj.top + 'px'"
|
|
15406
|
+
[style.--left]="layouts[objects.indexOf(obj)].leftPercent + '%'"
|
|
15407
|
+
[style.--width]="layouts[objects.indexOf(obj)].widthPercent + '%'"
|
|
15408
|
+
(click)="onSelectBlock(obj)"
|
|
15409
|
+
(dragstart)="onExpandableDragStart($event, obj, onDragStartCustom(obj) )">
|
|
15410
|
+
|
|
15411
|
+
<div
|
|
15412
|
+
*ngIf="obj.selected"
|
|
15413
|
+
class="top-resizer"
|
|
15414
|
+
(mousedown)="onResizeStart($event, obj, 'top')"></div>
|
|
15415
|
+
<ng-template
|
|
15416
|
+
[ngTemplateOutlet]="objectTemplate"
|
|
15417
|
+
[ngTemplateOutletContext]="{
|
|
15375
15418
|
object: obj
|
|
15376
15419
|
}"
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15420
|
+
>
|
|
15421
|
+
</ng-template>
|
|
15422
|
+
<div *ngIf="obj.selected"
|
|
15423
|
+
class="bottom-resizer"
|
|
15424
|
+
(mousedown)="onResizeStart($event, obj, 'bottom')"></div>
|
|
15425
|
+
</div>
|
|
15426
|
+
`,
|
|
15384
15427
|
encapsulation: ViewEncapsulation.None
|
|
15385
15428
|
},] }
|
|
15386
15429
|
];
|
|
@@ -15392,7 +15435,7 @@ HourSchedulingExpandableTemplateComponent.propDecorators = {
|
|
|
15392
15435
|
onSelectBlock: [{ type: Input }],
|
|
15393
15436
|
startTimeProp: [{ type: Input }],
|
|
15394
15437
|
endTimeProp: [{ type: Input }],
|
|
15395
|
-
showClass: [{ type: HostBinding, args: [
|
|
15438
|
+
showClass: [{ type: HostBinding, args: ['class.co-hour-scheduling-expandable-template',] }]
|
|
15396
15439
|
};
|
|
15397
15440
|
|
|
15398
15441
|
class HourSchedulingExpandableTemplateModule {
|