@colijnit/corecomponents_v12 12.0.37 → 12.0.40
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 +148 -22
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +5 -3
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +6 -4
- package/esm2015/lib/components/base/base-input.component.js +4 -3
- package/esm2015/lib/components/co-dialog/co-dialog.component.js +15 -8
- package/esm2015/lib/components/drop-down-list/drop-down-list.component.js +2 -1
- package/esm2015/lib/components/filter-item/filter-item.component.js +5 -2
- package/esm2015/lib/components/input-checkbox/input-checkbox.component.js +2 -1
- package/esm2015/lib/components/input-number-picker/input-number-picker.component.js +9 -10
- package/esm2015/lib/components/simple-grid/base-simple-grid.component.js +3 -1
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +3 -3
- package/esm2015/lib/components/simple-grid/simple-grid.module.js +4 -2
- package/esm2015/lib/directives/observe-visibility/observe-visibility.directive.js +80 -0
- package/esm2015/lib/directives/observe-visibility/observe-visibility.module.js +15 -0
- package/esm2015/public-api.js +1 -1
- package/fesm2015/colijnit-corecomponents_v12.js +125 -21
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/co-dialog/co-dialog.component.d.ts +4 -2
- package/lib/components/co-dialog/style/_layout.scss +6 -0
- package/lib/components/co-dialog/style/_theme.scss +1 -1
- package/lib/components/filter-item/filter-item.component.d.ts +1 -0
- package/lib/components/input-number-picker/input-number-picker.component.d.ts +2 -0
- package/lib/components/simple-grid/base-simple-grid.component.d.ts +1 -0
- package/lib/components/simple-grid/style/_material-definition.scss +2 -2
- package/lib/components/simple-grid/style/_theme.scss +2 -0
- package/lib/directives/observe-visibility/observe-visibility.directive.d.ts +16 -0
- package/lib/directives/observe-visibility/observe-visibility.module.d.ts +2 -0
- package/lib/style/_variables.scss +3 -2
- package/package.json +1 -1
|
@@ -3475,6 +3475,7 @@
|
|
|
3475
3475
|
this.icons = exports.CoreComponentsIcon;
|
|
3476
3476
|
this.showCloseIcon = true;
|
|
3477
3477
|
this.modal = false;
|
|
3478
|
+
this.borderless = false;
|
|
3478
3479
|
this.animation = true;
|
|
3479
3480
|
this.closeClick = new core.EventEmitter();
|
|
3480
3481
|
this.overlayClick = new core.EventEmitter();
|
|
@@ -3482,9 +3483,12 @@
|
|
|
3482
3483
|
CoDialogComponent.prototype.showClass = function () {
|
|
3483
3484
|
return true;
|
|
3484
3485
|
};
|
|
3486
|
+
CoDialogComponent.prototype.handleCloseDialog = function (event) {
|
|
3487
|
+
this.closeClick.emit(event);
|
|
3488
|
+
};
|
|
3485
3489
|
CoDialogComponent.prototype.handleOverlayClick = function (event) {
|
|
3486
3490
|
if (!this.modal) {
|
|
3487
|
-
this.overlayClick.
|
|
3491
|
+
this.overlayClick.emit(event);
|
|
3488
3492
|
}
|
|
3489
3493
|
};
|
|
3490
3494
|
return CoDialogComponent;
|
|
@@ -3492,7 +3496,7 @@
|
|
|
3492
3496
|
CoDialogComponent.decorators = [
|
|
3493
3497
|
{ type: core.Component, args: [{
|
|
3494
3498
|
selector: 'co-dialog',
|
|
3495
|
-
template: "\n <div class=\"co-dialog-overlay\" (click)=\"handleOverlayClick($event)\" [@showHideOverlay]=\"animation\"></div>\n <div class=\"co-dialog-wrapper\" [@showHideDialog]=\"animation\">\n <div class=\"dialog-header\">\n <ng-content select=\"[header]\"></ng-content>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"
|
|
3499
|
+
template: "\n <div class=\"co-dialog-overlay\" (click)=\"handleOverlayClick($event)\" [@showHideOverlay]=\"animation\"></div>\n <div class=\"co-dialog-wrapper\" [@showHideDialog]=\"animation\">\n <div class=\"dialog-header\" *ngIf=\"!borderless\">\n <div class=\"dialog-header-caption\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"handleCloseDialog($event)\">\n <co-icon [icon]=\"icons.Cancel\"></co-icon>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"dialog-footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n ",
|
|
3496
3500
|
animations: [
|
|
3497
3501
|
animations.trigger('showHideOverlay', [
|
|
3498
3502
|
animations.state('*', animations.style({ opacity: 1 })),
|
|
@@ -3513,6 +3517,7 @@
|
|
|
3513
3517
|
CoDialogComponent.propDecorators = {
|
|
3514
3518
|
showCloseIcon: [{ type: core.Input }],
|
|
3515
3519
|
modal: [{ type: core.Input }],
|
|
3520
|
+
borderless: [{ type: core.HostBinding, args: ['class.borderless',] }, { type: core.Input }],
|
|
3516
3521
|
animation: [{ type: core.Input }],
|
|
3517
3522
|
closeClick: [{ type: core.Output }],
|
|
3518
3523
|
overlayClick: [{ type: core.Output }],
|
|
@@ -4870,7 +4875,7 @@
|
|
|
4870
4875
|
var _this = this;
|
|
4871
4876
|
if (this.elementRef && this.elementRef.nativeElement) {
|
|
4872
4877
|
//try to find input element
|
|
4873
|
-
this.
|
|
4878
|
+
this._findInputNode(this.elementRef.nativeElement.children);
|
|
4874
4879
|
if (this.input) {
|
|
4875
4880
|
this.input.addEventListener('blur', function (event) { return _this.doBlur(event); });
|
|
4876
4881
|
this.input.addEventListener('focus', function (event) { return _this.doFocus(event); });
|
|
@@ -4881,7 +4886,8 @@
|
|
|
4881
4886
|
for (var i = 0; i < nodes.length; i++) {
|
|
4882
4887
|
var node = nodes[i];
|
|
4883
4888
|
if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) {
|
|
4884
|
-
|
|
4889
|
+
this.input = node;
|
|
4890
|
+
break;
|
|
4885
4891
|
}
|
|
4886
4892
|
else if (node.children.length > 0) {
|
|
4887
4893
|
this._findInputNode(node.children);
|
|
@@ -5394,7 +5400,7 @@
|
|
|
5394
5400
|
DropDownListComponent.decorators = [
|
|
5395
5401
|
{ type: core.Component, args: [{
|
|
5396
5402
|
selector: "co-drop-down-list",
|
|
5397
|
-
template: "\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [value]=\"model\"\n [fields]=\"fields\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"handleValueChanged($event)\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-dropdownlist>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
5403
|
+
template: "\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [value]=\"model\"\n [fields]=\"fields\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [disabled]=\"disabled\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"handleValueChanged($event)\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-dropdownlist>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
5398
5404
|
providers: [
|
|
5399
5405
|
ej2AngularDropdowns.CheckBoxSelectionService,
|
|
5400
5406
|
{
|
|
@@ -6034,7 +6040,7 @@
|
|
|
6034
6040
|
InputCheckboxComponent.decorators = [
|
|
6035
6041
|
{ type: core.Component, args: [{
|
|
6036
6042
|
selector: "co-input-checkbox",
|
|
6037
|
-
template: "\n <ejs-checkbox [label]=\"label\"\n [name]=\"name\"\n [cssClass]=\"cssClass\"\n [ngModel]=\"model\"\n (ngModelChange)=\"handleModelChange($event)\"\n ></ejs-checkbox>\n ",
|
|
6043
|
+
template: "\n <ejs-checkbox [label]=\"label\"\n [name]=\"name\"\n [cssClass]=\"cssClass\"\n [ngModel]=\"model\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"handleModelChange($event)\"\n ></ejs-checkbox>\n ",
|
|
6038
6044
|
providers: [{
|
|
6039
6045
|
provide: COMPONENT_INTERFACE_NAME,
|
|
6040
6046
|
useExisting: core.forwardRef(function () { return InputCheckboxComponent; })
|
|
@@ -6927,17 +6933,19 @@
|
|
|
6927
6933
|
});
|
|
6928
6934
|
return _this;
|
|
6929
6935
|
}
|
|
6930
|
-
Object.defineProperty(InputNumberPickerComponent.prototype, "
|
|
6936
|
+
Object.defineProperty(InputNumberPickerComponent.prototype, "model", {
|
|
6937
|
+
get: function () {
|
|
6938
|
+
return _super.prototype.model;
|
|
6939
|
+
},
|
|
6931
6940
|
// @override
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
// }
|
|
6941
|
+
set: function (model) {
|
|
6942
|
+
this.setValue(model, true);
|
|
6943
|
+
_super.prototype.model = model;
|
|
6944
|
+
},
|
|
6945
|
+
enumerable: false,
|
|
6946
|
+
configurable: true
|
|
6947
|
+
});
|
|
6948
|
+
Object.defineProperty(InputNumberPickerComponent.prototype, "min", {
|
|
6941
6949
|
set: function (min) {
|
|
6942
6950
|
this.numberLogic.min = min;
|
|
6943
6951
|
},
|
|
@@ -7146,6 +7154,7 @@
|
|
|
7146
7154
|
{ type: FormInputUserModelChangeListenerService }
|
|
7147
7155
|
]; };
|
|
7148
7156
|
InputNumberPickerComponent.propDecorators = {
|
|
7157
|
+
model: [{ type: core.Input }],
|
|
7149
7158
|
min: [{ type: core.Input }],
|
|
7150
7159
|
step: [{ type: core.Input }],
|
|
7151
7160
|
max: [{ type: core.Input }],
|
|
@@ -9275,6 +9284,7 @@
|
|
|
9275
9284
|
this.selectRow = new core.EventEmitter();
|
|
9276
9285
|
this.dblClickRow = new core.EventEmitter();
|
|
9277
9286
|
this.saveRow = new core.EventEmitter();
|
|
9287
|
+
this.rowVisible = new core.EventEmitter();
|
|
9278
9288
|
this.columns = [];
|
|
9279
9289
|
this.headerColumns = [];
|
|
9280
9290
|
this._data = [];
|
|
@@ -9406,6 +9416,7 @@
|
|
|
9406
9416
|
selectRow: [{ type: core.Output }],
|
|
9407
9417
|
dblClickRow: [{ type: core.Output }],
|
|
9408
9418
|
saveRow: [{ type: core.Output }],
|
|
9419
|
+
rowVisible: [{ type: core.Output }],
|
|
9409
9420
|
handleMouseMove: [{ type: core.HostListener, args: ['document:mousemove', ['$event'],] }],
|
|
9410
9421
|
handleMouseUp: [{ type: core.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
9411
9422
|
};
|
|
@@ -9687,7 +9698,7 @@
|
|
|
9687
9698
|
SimpleGridComponent.decorators = [
|
|
9688
9699
|
{ type: core.Component, args: [{
|
|
9689
9700
|
selector: "co-simple-grid",
|
|
9690
|
-
template: "\n <co-grid-toolbar *ngIf=\"inlineEdit && showToolbar\"\n (addClick)=\"addRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\" [attr.width]=\"column.width\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || ' '\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\"\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of data; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\">\n <co-form class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\"\n ></co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumns; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex\"\n (cellClick)=\"handleCellClick(columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n </ng-container>\n </co-form>\n </tr>\n </tbody>\n </table>\n ",
|
|
9701
|
+
template: "\n <co-grid-toolbar *ngIf=\"inlineEdit && showToolbar\"\n (addClick)=\"addRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\" [attr.width]=\"column.width\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || ' '\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of data; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\" (visible)=\"rowVisible.next(row)\">\n <co-form class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\"\n ></co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumns; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex\"\n (cellClick)=\"handleCellClick(columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n </ng-container>\n </co-form>\n </tr>\n </tbody>\n </table>\n ",
|
|
9691
9702
|
providers: [
|
|
9692
9703
|
FormMasterService
|
|
9693
9704
|
],
|
|
@@ -9856,6 +9867,115 @@
|
|
|
9856
9867
|
handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
9857
9868
|
};
|
|
9858
9869
|
|
|
9870
|
+
var ObserveVisibilityDirective = /** @class */ (function () {
|
|
9871
|
+
function ObserveVisibilityDirective(_element) {
|
|
9872
|
+
this._element = _element;
|
|
9873
|
+
this.debounceTime = 0;
|
|
9874
|
+
this.threshold = 0;
|
|
9875
|
+
this.visible = new core.EventEmitter();
|
|
9876
|
+
this._subject = new rxjs.Subject();
|
|
9877
|
+
}
|
|
9878
|
+
ObserveVisibilityDirective.prototype.ngOnInit = function () {
|
|
9879
|
+
this._createObserver();
|
|
9880
|
+
};
|
|
9881
|
+
ObserveVisibilityDirective.prototype.ngAfterViewInit = function () {
|
|
9882
|
+
this._startObservingElements();
|
|
9883
|
+
};
|
|
9884
|
+
ObserveVisibilityDirective.prototype.ngOnDestroy = function () {
|
|
9885
|
+
if (this._observer) {
|
|
9886
|
+
this._observer.disconnect();
|
|
9887
|
+
this._observer = undefined;
|
|
9888
|
+
}
|
|
9889
|
+
this._subject.next();
|
|
9890
|
+
this._subject.complete();
|
|
9891
|
+
};
|
|
9892
|
+
ObserveVisibilityDirective.prototype._isVisible = function (element) {
|
|
9893
|
+
var _this = this;
|
|
9894
|
+
return new Promise(function (resolve) {
|
|
9895
|
+
var observer = new IntersectionObserver(function (_a) {
|
|
9896
|
+
var _b = __read(_a, 1), entry = _b[0];
|
|
9897
|
+
resolve(entry.isIntersecting && entry.intersectionRatio >= _this.threshold);
|
|
9898
|
+
observer.disconnect();
|
|
9899
|
+
});
|
|
9900
|
+
observer.observe(element);
|
|
9901
|
+
});
|
|
9902
|
+
};
|
|
9903
|
+
ObserveVisibilityDirective.prototype._createObserver = function () {
|
|
9904
|
+
var _this = this;
|
|
9905
|
+
var options = {
|
|
9906
|
+
rootMargin: '0px',
|
|
9907
|
+
threshold: this.threshold,
|
|
9908
|
+
};
|
|
9909
|
+
var isIntersecting = function (entry) { return entry.isIntersecting || entry.intersectionRatio > 0; };
|
|
9910
|
+
this._observer = new IntersectionObserver(function (entries, observer) {
|
|
9911
|
+
entries.forEach(function (entry) {
|
|
9912
|
+
if (isIntersecting(entry)) {
|
|
9913
|
+
_this._subject.next({ entry: entry, observer: observer });
|
|
9914
|
+
}
|
|
9915
|
+
});
|
|
9916
|
+
}, options);
|
|
9917
|
+
};
|
|
9918
|
+
ObserveVisibilityDirective.prototype._startObservingElements = function () {
|
|
9919
|
+
var _this = this;
|
|
9920
|
+
if (!this._observer) {
|
|
9921
|
+
return;
|
|
9922
|
+
}
|
|
9923
|
+
this._observer.observe(this._element.nativeElement);
|
|
9924
|
+
this._subject
|
|
9925
|
+
.pipe(operators.delay(this.debounceTime), operators.filter(Boolean))
|
|
9926
|
+
.subscribe(function (_a) {
|
|
9927
|
+
var entry = _a.entry, observer = _a.observer;
|
|
9928
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
9929
|
+
var target, isStillVisible;
|
|
9930
|
+
return __generator(this, function (_a) {
|
|
9931
|
+
switch (_a.label) {
|
|
9932
|
+
case 0:
|
|
9933
|
+
target = entry.target;
|
|
9934
|
+
return [4 /*yield*/, this._isVisible(target)];
|
|
9935
|
+
case 1:
|
|
9936
|
+
isStillVisible = _a.sent();
|
|
9937
|
+
if (isStillVisible) {
|
|
9938
|
+
this.visible.emit(target);
|
|
9939
|
+
observer.unobserve(target);
|
|
9940
|
+
}
|
|
9941
|
+
return [2 /*return*/];
|
|
9942
|
+
}
|
|
9943
|
+
});
|
|
9944
|
+
});
|
|
9945
|
+
});
|
|
9946
|
+
};
|
|
9947
|
+
return ObserveVisibilityDirective;
|
|
9948
|
+
}());
|
|
9949
|
+
ObserveVisibilityDirective.decorators = [
|
|
9950
|
+
{ type: core.Directive, args: [{
|
|
9951
|
+
selector: '[observeVisibility]',
|
|
9952
|
+
},] }
|
|
9953
|
+
];
|
|
9954
|
+
ObserveVisibilityDirective.ctorParameters = function () { return [
|
|
9955
|
+
{ type: core.ElementRef }
|
|
9956
|
+
]; };
|
|
9957
|
+
ObserveVisibilityDirective.propDecorators = {
|
|
9958
|
+
debounceTime: [{ type: core.Input }],
|
|
9959
|
+
threshold: [{ type: core.Input }],
|
|
9960
|
+
visible: [{ type: core.Output }]
|
|
9961
|
+
};
|
|
9962
|
+
|
|
9963
|
+
var ObserveVisibilityModule = /** @class */ (function () {
|
|
9964
|
+
function ObserveVisibilityModule() {
|
|
9965
|
+
}
|
|
9966
|
+
return ObserveVisibilityModule;
|
|
9967
|
+
}());
|
|
9968
|
+
ObserveVisibilityModule.decorators = [
|
|
9969
|
+
{ type: core.NgModule, args: [{
|
|
9970
|
+
declarations: [
|
|
9971
|
+
ObserveVisibilityDirective
|
|
9972
|
+
],
|
|
9973
|
+
exports: [
|
|
9974
|
+
ObserveVisibilityDirective
|
|
9975
|
+
]
|
|
9976
|
+
},] }
|
|
9977
|
+
];
|
|
9978
|
+
|
|
9859
9979
|
var SimpleGridModule = /** @class */ (function () {
|
|
9860
9980
|
function SimpleGridModule() {
|
|
9861
9981
|
}
|
|
@@ -9868,7 +9988,8 @@
|
|
|
9868
9988
|
dragDrop.DragDropModule,
|
|
9869
9989
|
GridToolbarModule,
|
|
9870
9990
|
InputTextModule,
|
|
9871
|
-
FormModule
|
|
9991
|
+
FormModule,
|
|
9992
|
+
ObserveVisibilityModule
|
|
9872
9993
|
],
|
|
9873
9994
|
declarations: [
|
|
9874
9995
|
SimpleGridComponent,
|
|
@@ -9898,6 +10019,7 @@
|
|
|
9898
10019
|
this.showLessLabel = 'Show less';
|
|
9899
10020
|
this.noResultsLabel = "No results";
|
|
9900
10021
|
this.collectionChange = new core.EventEmitter();
|
|
10022
|
+
this.filterTextChange = new core.EventEmitter();
|
|
9901
10023
|
this.filteredCollection = [];
|
|
9902
10024
|
this.limitTo = 10;
|
|
9903
10025
|
this.filterText = "";
|
|
@@ -9944,6 +10066,7 @@
|
|
|
9944
10066
|
// Applies filter to the collection.
|
|
9945
10067
|
FilterItemComponent.prototype.applyFilter = function (text) {
|
|
9946
10068
|
var _a, _b;
|
|
10069
|
+
this.filterTextChange.emit(text);
|
|
9947
10070
|
if (!this.collection) {
|
|
9948
10071
|
return [];
|
|
9949
10072
|
}
|
|
@@ -9967,7 +10090,7 @@
|
|
|
9967
10090
|
FilterItemComponent.decorators = [
|
|
9968
10091
|
{ type: core.Component, args: [{
|
|
9969
10092
|
selector: "co-filter-item",
|
|
9970
|
-
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10\"\n [placeholder]=\"searchPlaceholder\"\n [(model)]=\"filterText\"\n (modelChange)=\"applyFilter(
|
|
10093
|
+
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10\"\n [placeholder]=\"searchPlaceholder\"\n [(model)]=\"filterText\"\n (modelChange)=\"applyFilter(filterText)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <div class=\"co-filter-item-collection-result-items\"\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox [label]=\"option.description\"\n [(model)]=\"option.checked\"\n (modelChange)=\"collectionChange.emit(collection)\"\n ></co-input-checkbox>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </div>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
|
|
9971
10094
|
encapsulation: core.ViewEncapsulation.None
|
|
9972
10095
|
},] }
|
|
9973
10096
|
];
|
|
@@ -9986,6 +10109,7 @@
|
|
|
9986
10109
|
showLessLabel: [{ type: core.Input }],
|
|
9987
10110
|
noResultsLabel: [{ type: core.Input }],
|
|
9988
10111
|
collectionChange: [{ type: core.Output }],
|
|
10112
|
+
filterTextChange: [{ type: core.Output }],
|
|
9989
10113
|
showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
|
|
9990
10114
|
};
|
|
9991
10115
|
|
|
@@ -10149,8 +10273,10 @@
|
|
|
10149
10273
|
exports.TileModule = TileModule;
|
|
10150
10274
|
exports["ɵa"] = RippleModule;
|
|
10151
10275
|
exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
10152
|
-
exports["ɵba"] =
|
|
10153
|
-
exports["ɵbb"] =
|
|
10276
|
+
exports["ɵba"] = ObserveVisibilityDirective;
|
|
10277
|
+
exports["ɵbb"] = SimpleGridCellComponent;
|
|
10278
|
+
exports["ɵbc"] = PrependPipeModule;
|
|
10279
|
+
exports["ɵbd"] = PrependPipe;
|
|
10154
10280
|
exports["ɵc"] = CoRippleDirective;
|
|
10155
10281
|
exports["ɵd"] = CoViewportRulerService;
|
|
10156
10282
|
exports["ɵe"] = CoScrollDispatcherService;
|
|
@@ -10174,7 +10300,7 @@
|
|
|
10174
10300
|
exports["ɵw"] = CommitButtonsComponent;
|
|
10175
10301
|
exports["ɵx"] = PopupShowerService;
|
|
10176
10302
|
exports["ɵy"] = BaseSimpleGridComponent;
|
|
10177
|
-
exports["ɵz"] =
|
|
10303
|
+
exports["ɵz"] = ObserveVisibilityModule;
|
|
10178
10304
|
|
|
10179
10305
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10180
10306
|
|