@colijnit/corecomponents_v12 260.1.4 → 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 +48 -12
- 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/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 +106 -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/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
|
@@ -11699,6 +11699,7 @@
|
|
|
11699
11699
|
this.iconCacheService = iconCacheService;
|
|
11700
11700
|
this._elementRef = _elementRef;
|
|
11701
11701
|
this.multiselect = false;
|
|
11702
|
+
this.showToggleAll = false;
|
|
11702
11703
|
this.displayField = 'description';
|
|
11703
11704
|
this.searchDisabled = false;
|
|
11704
11705
|
this.modelChange = new i0.EventEmitter();
|
|
@@ -11706,6 +11707,7 @@
|
|
|
11706
11707
|
this.keyDown = new i0.EventEmitter();
|
|
11707
11708
|
this.viewModels = [];
|
|
11708
11709
|
this.viewModelsMain = [];
|
|
11710
|
+
this.allSelected = false;
|
|
11709
11711
|
this._collection = [];
|
|
11710
11712
|
this._searchTerm = '';
|
|
11711
11713
|
this._lovItems = [];
|
|
@@ -11877,6 +11879,27 @@
|
|
|
11877
11879
|
this._scrollIntoView();
|
|
11878
11880
|
}
|
|
11879
11881
|
};
|
|
11882
|
+
ListOfValuesPopupComponent.prototype.selectAll = function () {
|
|
11883
|
+
if (this.viewModels.length > 0) {
|
|
11884
|
+
this.viewModels.forEach(function (vm) { return vm.checked = true; });
|
|
11885
|
+
this.selectOptions();
|
|
11886
|
+
}
|
|
11887
|
+
};
|
|
11888
|
+
ListOfValuesPopupComponent.prototype.toggleAll = function () {
|
|
11889
|
+
if (!this.allSelected) {
|
|
11890
|
+
if (this.viewModels.length > 0) {
|
|
11891
|
+
this.viewModels.forEach(function (vm) { return vm.checked = true; });
|
|
11892
|
+
this.selectOptions();
|
|
11893
|
+
}
|
|
11894
|
+
}
|
|
11895
|
+
else {
|
|
11896
|
+
if (this.viewModels.length > 0) {
|
|
11897
|
+
this.viewModels.forEach(function (vm) { return vm.checked = false; });
|
|
11898
|
+
this.selectOptions();
|
|
11899
|
+
}
|
|
11900
|
+
}
|
|
11901
|
+
this.allSelected = !this.allSelected;
|
|
11902
|
+
};
|
|
11880
11903
|
ListOfValuesPopupComponent.prototype._prepareViewModelsMain = function () {
|
|
11881
11904
|
var _this = this;
|
|
11882
11905
|
this.viewModelsMain.length = 0;
|
|
@@ -11920,7 +11943,7 @@
|
|
|
11920
11943
|
ListOfValuesPopupComponent.decorators = [
|
|
11921
11944
|
{ type: i0.Component, args: [{
|
|
11922
11945
|
selector: 'co-list-of-values-popup',
|
|
11923
|
-
template: "\n
|
|
11946
|
+
template: "\n <div class=\"lov-options\" [overlay]=\"parentForOverlay\" [inheritWidth]=\"true\" [ngClass]=\"customCssClass\"\n id=\"lov-popup\"\n role=\"listbox\" [tabindex]=\"-1\"\n (clickOutside)=\"closePopup.emit($event)\">\n <co-input-search *ngIf=\"multiselect\"\n tabindex=\"-1\"\n [(model)]=\"searchTerm\"\n [placeholder]=\"searchPlaceholder\"\n (keydown)=\"handleInputKeyDown($event)\"\n (modelChange)=\"filterViewModels()\"></co-input-search>\n <div class=\"row gap\" *ngIf=\"showToggleAll && multiselect\">\n <co-input-checkbox [model]=\"allSelected\" (modelChange)=\"toggleAll()\"></co-input-checkbox>\n <span [textContent]=\"'DESELECT_ALL' | coreLocalize\" (click)=\"toggleAll()\"></span>\n </div>\n <ul class=\"dropdown-list\" #dropDownList>\n <li\n #lovItem\n *ngFor=\"let viewModel of viewModels; let index = index\"\n [class.selected]=\"viewModel === highLightModel || viewModels.length === 1\"\n (click)=\"selectViewModel(viewModel, !multiselect)\"\n role=\"option\">\n <ng-container *ngIf=\"!multiselect\">\n <co-icon *ngIf=\"viewModel.model[optionIcon]\" class=\"input-text-left-icon\" [iconData]=\"iconCacheService.getIcon(viewModel.model[optionIcon])\">\n </co-icon>\n <span class=\"lov-options-text\" [textContent]=\"viewModel.model[displayField]\"></span>\n </ng-container>\n <ng-container *ngIf=\"multiselect\">\n <co-input-checkbox [model]=\"viewModel.checked\"\n (modelChange)=\"selectViewModel(viewModel, false)\"></co-input-checkbox>\n <span class=\"lov-options-text\" [textContent]=\"viewModel.model[displayField]\"></span>\n </ng-container>\n </li>\n </ul>\n </div>\n ",
|
|
11924
11947
|
encapsulation: i0.ViewEncapsulation.None
|
|
11925
11948
|
},] }
|
|
11926
11949
|
];
|
|
@@ -11934,6 +11957,7 @@
|
|
|
11934
11957
|
inputSearch: [{ type: i0.ViewChild, args: [InputSearchComponent,] }],
|
|
11935
11958
|
model: [{ type: i0.Input }],
|
|
11936
11959
|
multiselect: [{ type: i0.Input }],
|
|
11960
|
+
showToggleAll: [{ type: i0.Input }],
|
|
11937
11961
|
displayField: [{ type: i0.Input }],
|
|
11938
11962
|
searchPlaceholder: [{ type: i0.Input }],
|
|
11939
11963
|
customCssClass: [{ type: i0.Input }],
|
|
@@ -11961,6 +11985,7 @@
|
|
|
11961
11985
|
_this.elementRef = elementRef;
|
|
11962
11986
|
_this.icons = exports.CoreComponentsIcon;
|
|
11963
11987
|
_this.multiselect = false;
|
|
11988
|
+
_this.showToggleAll = false;
|
|
11964
11989
|
_this.largeCollection = false;
|
|
11965
11990
|
_this.displayField = 'description';
|
|
11966
11991
|
_this.searchDisabled = false;
|
|
@@ -12114,6 +12139,7 @@
|
|
|
12114
12139
|
searchPlaceholder: this.searchPlaceholder,
|
|
12115
12140
|
displayField: this.displayField,
|
|
12116
12141
|
multiselect: this.multiselect,
|
|
12142
|
+
showToggleAll: this.showToggleAll,
|
|
12117
12143
|
model: this.model,
|
|
12118
12144
|
collection: this.collection,
|
|
12119
12145
|
optionIcon: this.optionIcon,
|
|
@@ -12223,6 +12249,7 @@
|
|
|
12223
12249
|
model: [{ type: i0.Input }],
|
|
12224
12250
|
parentForOverlay: [{ type: i0.ViewChild, args: ['parentForOverlay', { read: i0.ElementRef },] }],
|
|
12225
12251
|
multiselect: [{ type: i0.HostBinding, args: ['class.custom-height',] }, { type: i0.HostBinding, args: ['class.multi-select',] }, { type: i0.Input }],
|
|
12252
|
+
showToggleAll: [{ type: i0.Input }],
|
|
12226
12253
|
largeCollection: [{ type: i0.Input }],
|
|
12227
12254
|
displayField: [{ type: i0.Input }],
|
|
12228
12255
|
optionIcon: [{ type: i0.Input }],
|
|
@@ -12350,7 +12377,8 @@
|
|
|
12350
12377
|
OverlayModule,
|
|
12351
12378
|
ClickoutsideModule,
|
|
12352
12379
|
IconModule,
|
|
12353
|
-
InputSearchModule
|
|
12380
|
+
InputSearchModule,
|
|
12381
|
+
CoreComponentsTranslationModule
|
|
12354
12382
|
],
|
|
12355
12383
|
declarations: [
|
|
12356
12384
|
ListOfValuesComponent,
|
|
@@ -15365,6 +15393,11 @@
|
|
|
15365
15393
|
};
|
|
15366
15394
|
HourSchedulingExpandableComponent.prototype.handleDrop = function (dragEvent, hour) {
|
|
15367
15395
|
var _this = this;
|
|
15396
|
+
dragEvent.preventDefault();
|
|
15397
|
+
dragEvent.stopPropagation();
|
|
15398
|
+
if (!this.schedule[this.objectsProp] || !this.schedule[this.objectsProp].find(function (object) { return object[_this.idProp] === _this.currentDraggingObject.id; }) && this.currentDraggingObject) {
|
|
15399
|
+
this.currentDraggingObject = undefined;
|
|
15400
|
+
}
|
|
15368
15401
|
if (this.currentDraggingObject) {
|
|
15369
15402
|
//The order was scheduled and needs to be moved
|
|
15370
15403
|
var start = this.currentDraggingObject.start;
|
|
@@ -15382,17 +15415,17 @@
|
|
|
15382
15415
|
scheduledObject.top = this.timeDifference(this.schedule[this.childProp][this.startTimeProp], scheduledObject.start);
|
|
15383
15416
|
scheduledObject.height = this.timeDifference(scheduledObject.start, scheduledObject.end);
|
|
15384
15417
|
this.timeChangeEvent.emit(originalObject);
|
|
15385
|
-
this.currentDraggingObject = undefined;
|
|
15386
15418
|
}
|
|
15419
|
+
this.currentDraggingObject = undefined;
|
|
15387
15420
|
}
|
|
15388
15421
|
else {
|
|
15389
15422
|
var parsed = this.tryParseJSONObject(dragEvent.dataTransfer.getData("text"));
|
|
15390
15423
|
if (!parsed) {
|
|
15391
15424
|
this.newObjectPlanEvent.emit({ currentHour: hour, data: parsed.toString() });
|
|
15392
|
-
return;
|
|
15393
15425
|
}
|
|
15394
|
-
|
|
15395
|
-
|
|
15426
|
+
else {
|
|
15427
|
+
this.moveBetweenCalendarsEvent.emit({ hour: hour, data: parsed });
|
|
15428
|
+
}
|
|
15396
15429
|
}
|
|
15397
15430
|
};
|
|
15398
15431
|
HourSchedulingExpandableComponent.prototype.allowDrop = function (event, hour) {
|
|
@@ -15579,8 +15612,10 @@
|
|
|
15579
15612
|
return true;
|
|
15580
15613
|
};
|
|
15581
15614
|
HourSchedulingExpandableTemplateComponent.prototype.onExpandableDragStart = function (event, obj, onDragStartCustom) {
|
|
15582
|
-
|
|
15583
|
-
|
|
15615
|
+
event.dataTransfer.setData('text', JSON.stringify({ obj: obj }));
|
|
15616
|
+
if (onDragStartCustom) {
|
|
15617
|
+
onDragStartCustom === null || onDragStartCustom === void 0 ? void 0 : onDragStartCustom.call(obj);
|
|
15618
|
+
}
|
|
15584
15619
|
};
|
|
15585
15620
|
HourSchedulingExpandableTemplateComponent.prototype.calculateLeftAndWidthOfObjects = function () {
|
|
15586
15621
|
var layoutData = new Array(this._objects.length);
|
|
@@ -15592,8 +15627,9 @@
|
|
|
15592
15627
|
var overlapGroups = [];
|
|
15593
15628
|
var processed = new Set();
|
|
15594
15629
|
for (var i = 0; i < this._objects.length; i++) {
|
|
15595
|
-
if (processed.has(i))
|
|
15630
|
+
if (processed.has(i)) {
|
|
15596
15631
|
continue;
|
|
15632
|
+
}
|
|
15597
15633
|
var group = [i];
|
|
15598
15634
|
var objA = this._objects[i];
|
|
15599
15635
|
var startA = new Date(objA.start);
|
|
@@ -15627,8 +15663,8 @@
|
|
|
15627
15663
|
}());
|
|
15628
15664
|
HourSchedulingExpandableTemplateComponent.decorators = [
|
|
15629
15665
|
{ type: i0.Component, args: [{
|
|
15630
|
-
selector:
|
|
15631
|
-
template: "\n
|
|
15666
|
+
selector: 'co-hour-scheduling-expandable-template',
|
|
15667
|
+
template: "\n\n <div\n *ngFor=\"let obj of objects\"\n [class]=\"'custom-scheduled-object'\"\n [class.selected]=\"obj.selected\"\n [draggable]=\"!obj.selected\"\n [style.--height]=\"obj.height + 'px'\"\n [style.--top]=\"obj.top + 'px'\"\n [style.--left]=\"layouts[objects.indexOf(obj)].leftPercent + '%'\"\n [style.--width]=\"layouts[objects.indexOf(obj)].widthPercent + '%'\"\n (click)=\"onSelectBlock(obj)\"\n (dragstart)=\"onExpandableDragStart($event, obj, onDragStartCustom(obj) )\">\n\n <div\n *ngIf=\"obj.selected\"\n class=\"top-resizer\"\n (mousedown)=\"onResizeStart($event, obj, 'top')\"></div>\n <ng-template\n [ngTemplateOutlet]=\"objectTemplate\"\n [ngTemplateOutletContext]=\"{\n object: obj\n }\"\n >\n </ng-template>\n <div *ngIf=\"obj.selected\"\n class=\"bottom-resizer\"\n (mousedown)=\"onResizeStart($event, obj, 'bottom')\"></div>\n </div>\n ",
|
|
15632
15668
|
encapsulation: i0.ViewEncapsulation.None
|
|
15633
15669
|
},] }
|
|
15634
15670
|
];
|
|
@@ -15640,7 +15676,7 @@
|
|
|
15640
15676
|
onSelectBlock: [{ type: i0.Input }],
|
|
15641
15677
|
startTimeProp: [{ type: i0.Input }],
|
|
15642
15678
|
endTimeProp: [{ type: i0.Input }],
|
|
15643
|
-
showClass: [{ type: i0.HostBinding, args: [
|
|
15679
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-hour-scheduling-expandable-template',] }]
|
|
15644
15680
|
};
|
|
15645
15681
|
|
|
15646
15682
|
var HourSchedulingExpandableTemplateModule = /** @class */ (function () {
|