@colijnit/corecomponents_v12 12.0.36 → 12.0.39
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 +194 -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/grid-toolbar-button/grid-toolbar-button.component.js +28 -0
- package/esm2015/lib/components/grid-toolbar-button/grid-toolbar-button.module.js +21 -0
- 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 +3 -1
- package/fesm2015/colijnit-corecomponents_v12.js +169 -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/grid-toolbar-button/grid-toolbar-button.component.d.ts +8 -0
- package/lib/components/grid-toolbar-button/grid-toolbar-button.module.d.ts +2 -0
- package/lib/components/grid-toolbar-button/style/_layout.scss +18 -0
- package/lib/components/grid-toolbar-button/style/_material-definition.scss +0 -0
- package/lib/components/grid-toolbar-button/style/_theme.scss +5 -0
- package/lib/components/grid-toolbar-button/style/material.scss +5 -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/directives/observe-visibility/observe-visibility.directive.d.ts +16 -0
- package/lib/directives/observe-visibility/observe-visibility.module.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -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
|
{
|
|
@@ -5959,6 +5965,50 @@
|
|
|
5959
5965
|
},] }
|
|
5960
5966
|
];
|
|
5961
5967
|
|
|
5968
|
+
var GridToolbarButtonComponent = /** @class */ (function () {
|
|
5969
|
+
function GridToolbarButtonComponent() {
|
|
5970
|
+
this.disabled = false;
|
|
5971
|
+
this.buttonClick = new core.EventEmitter();
|
|
5972
|
+
}
|
|
5973
|
+
GridToolbarButtonComponent.prototype.showClass = function () {
|
|
5974
|
+
return true;
|
|
5975
|
+
};
|
|
5976
|
+
return GridToolbarButtonComponent;
|
|
5977
|
+
}());
|
|
5978
|
+
GridToolbarButtonComponent.decorators = [
|
|
5979
|
+
{ type: core.Component, args: [{
|
|
5980
|
+
selector: "co-grid-toolbar-button",
|
|
5981
|
+
template: "\n <div class=\"grid-toolbar-button-wrapper\" [class.disabled]=\"disabled\" (click)=\"buttonClick.next()\">\n <co-icon [iconData]=\"iconData\"></co-icon>\n </div>\n ",
|
|
5982
|
+
encapsulation: core.ViewEncapsulation.None
|
|
5983
|
+
},] }
|
|
5984
|
+
];
|
|
5985
|
+
GridToolbarButtonComponent.propDecorators = {
|
|
5986
|
+
iconData: [{ type: core.Input }],
|
|
5987
|
+
disabled: [{ type: core.Input }],
|
|
5988
|
+
buttonClick: [{ type: core.Output }],
|
|
5989
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-grid-toolbar-button",] }]
|
|
5990
|
+
};
|
|
5991
|
+
|
|
5992
|
+
ej2Base.enableRipple(true);
|
|
5993
|
+
var GridToolbarButtonModule = /** @class */ (function () {
|
|
5994
|
+
function GridToolbarButtonModule() {
|
|
5995
|
+
}
|
|
5996
|
+
return GridToolbarButtonModule;
|
|
5997
|
+
}());
|
|
5998
|
+
GridToolbarButtonModule.decorators = [
|
|
5999
|
+
{ type: core.NgModule, args: [{
|
|
6000
|
+
imports: [
|
|
6001
|
+
IconModule,
|
|
6002
|
+
],
|
|
6003
|
+
declarations: [
|
|
6004
|
+
GridToolbarButtonComponent
|
|
6005
|
+
],
|
|
6006
|
+
exports: [
|
|
6007
|
+
GridToolbarButtonComponent
|
|
6008
|
+
]
|
|
6009
|
+
},] }
|
|
6010
|
+
];
|
|
6011
|
+
|
|
5962
6012
|
var InputCheckboxComponent = /** @class */ (function (_super) {
|
|
5963
6013
|
__extends(InputCheckboxComponent, _super);
|
|
5964
6014
|
function InputCheckboxComponent(formComponent, iconCacheService, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
@@ -5990,7 +6040,7 @@
|
|
|
5990
6040
|
InputCheckboxComponent.decorators = [
|
|
5991
6041
|
{ type: core.Component, args: [{
|
|
5992
6042
|
selector: "co-input-checkbox",
|
|
5993
|
-
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 ",
|
|
5994
6044
|
providers: [{
|
|
5995
6045
|
provide: COMPONENT_INTERFACE_NAME,
|
|
5996
6046
|
useExisting: core.forwardRef(function () { return InputCheckboxComponent; })
|
|
@@ -6883,17 +6933,19 @@
|
|
|
6883
6933
|
});
|
|
6884
6934
|
return _this;
|
|
6885
6935
|
}
|
|
6886
|
-
Object.defineProperty(InputNumberPickerComponent.prototype, "
|
|
6936
|
+
Object.defineProperty(InputNumberPickerComponent.prototype, "model", {
|
|
6937
|
+
get: function () {
|
|
6938
|
+
return _super.prototype.model;
|
|
6939
|
+
},
|
|
6887
6940
|
// @override
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
// }
|
|
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", {
|
|
6897
6949
|
set: function (min) {
|
|
6898
6950
|
this.numberLogic.min = min;
|
|
6899
6951
|
},
|
|
@@ -7102,6 +7154,7 @@
|
|
|
7102
7154
|
{ type: FormInputUserModelChangeListenerService }
|
|
7103
7155
|
]; };
|
|
7104
7156
|
InputNumberPickerComponent.propDecorators = {
|
|
7157
|
+
model: [{ type: core.Input }],
|
|
7105
7158
|
min: [{ type: core.Input }],
|
|
7106
7159
|
step: [{ type: core.Input }],
|
|
7107
7160
|
max: [{ type: core.Input }],
|
|
@@ -9231,6 +9284,7 @@
|
|
|
9231
9284
|
this.selectRow = new core.EventEmitter();
|
|
9232
9285
|
this.dblClickRow = new core.EventEmitter();
|
|
9233
9286
|
this.saveRow = new core.EventEmitter();
|
|
9287
|
+
this.rowVisible = new core.EventEmitter();
|
|
9234
9288
|
this.columns = [];
|
|
9235
9289
|
this.headerColumns = [];
|
|
9236
9290
|
this._data = [];
|
|
@@ -9362,6 +9416,7 @@
|
|
|
9362
9416
|
selectRow: [{ type: core.Output }],
|
|
9363
9417
|
dblClickRow: [{ type: core.Output }],
|
|
9364
9418
|
saveRow: [{ type: core.Output }],
|
|
9419
|
+
rowVisible: [{ type: core.Output }],
|
|
9365
9420
|
handleMouseMove: [{ type: core.HostListener, args: ['document:mousemove', ['$event'],] }],
|
|
9366
9421
|
handleMouseUp: [{ type: core.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
9367
9422
|
};
|
|
@@ -9643,7 +9698,7 @@
|
|
|
9643
9698
|
SimpleGridComponent.decorators = [
|
|
9644
9699
|
{ type: core.Component, args: [{
|
|
9645
9700
|
selector: "co-simple-grid",
|
|
9646
|
-
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 ",
|
|
9647
9702
|
providers: [
|
|
9648
9703
|
FormMasterService
|
|
9649
9704
|
],
|
|
@@ -9812,6 +9867,115 @@
|
|
|
9812
9867
|
handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
9813
9868
|
};
|
|
9814
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
|
+
|
|
9815
9979
|
var SimpleGridModule = /** @class */ (function () {
|
|
9816
9980
|
function SimpleGridModule() {
|
|
9817
9981
|
}
|
|
@@ -9824,7 +9988,8 @@
|
|
|
9824
9988
|
dragDrop.DragDropModule,
|
|
9825
9989
|
GridToolbarModule,
|
|
9826
9990
|
InputTextModule,
|
|
9827
|
-
FormModule
|
|
9991
|
+
FormModule,
|
|
9992
|
+
ObserveVisibilityModule
|
|
9828
9993
|
],
|
|
9829
9994
|
declarations: [
|
|
9830
9995
|
SimpleGridComponent,
|
|
@@ -9854,6 +10019,7 @@
|
|
|
9854
10019
|
this.showLessLabel = 'Show less';
|
|
9855
10020
|
this.noResultsLabel = "No results";
|
|
9856
10021
|
this.collectionChange = new core.EventEmitter();
|
|
10022
|
+
this.filterTextChange = new core.EventEmitter();
|
|
9857
10023
|
this.filteredCollection = [];
|
|
9858
10024
|
this.limitTo = 10;
|
|
9859
10025
|
this.filterText = "";
|
|
@@ -9900,6 +10066,7 @@
|
|
|
9900
10066
|
// Applies filter to the collection.
|
|
9901
10067
|
FilterItemComponent.prototype.applyFilter = function (text) {
|
|
9902
10068
|
var _a, _b;
|
|
10069
|
+
this.filterTextChange.emit(text);
|
|
9903
10070
|
if (!this.collection) {
|
|
9904
10071
|
return [];
|
|
9905
10072
|
}
|
|
@@ -9923,7 +10090,7 @@
|
|
|
9923
10090
|
FilterItemComponent.decorators = [
|
|
9924
10091
|
{ type: core.Component, args: [{
|
|
9925
10092
|
selector: "co-filter-item",
|
|
9926
|
-
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 ",
|
|
9927
10094
|
encapsulation: core.ViewEncapsulation.None
|
|
9928
10095
|
},] }
|
|
9929
10096
|
];
|
|
@@ -9942,6 +10109,7 @@
|
|
|
9942
10109
|
showLessLabel: [{ type: core.Input }],
|
|
9943
10110
|
noResultsLabel: [{ type: core.Input }],
|
|
9944
10111
|
collectionChange: [{ type: core.Output }],
|
|
10112
|
+
filterTextChange: [{ type: core.Output }],
|
|
9945
10113
|
showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
|
|
9946
10114
|
};
|
|
9947
10115
|
|
|
@@ -10055,6 +10223,8 @@
|
|
|
10055
10223
|
exports.FormComponent = FormComponent;
|
|
10056
10224
|
exports.FormMasterService = FormMasterService;
|
|
10057
10225
|
exports.FormModule = FormModule;
|
|
10226
|
+
exports.GridToolbarButtonComponent = GridToolbarButtonComponent;
|
|
10227
|
+
exports.GridToolbarButtonModule = GridToolbarButtonModule;
|
|
10058
10228
|
exports.GridToolbarComponent = GridToolbarComponent;
|
|
10059
10229
|
exports.GridToolbarModule = GridToolbarModule;
|
|
10060
10230
|
exports.IconCacheService = IconCacheService;
|
|
@@ -10103,8 +10273,10 @@
|
|
|
10103
10273
|
exports.TileModule = TileModule;
|
|
10104
10274
|
exports["ɵa"] = RippleModule;
|
|
10105
10275
|
exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
10106
|
-
exports["ɵba"] =
|
|
10107
|
-
exports["ɵbb"] =
|
|
10276
|
+
exports["ɵba"] = ObserveVisibilityDirective;
|
|
10277
|
+
exports["ɵbb"] = SimpleGridCellComponent;
|
|
10278
|
+
exports["ɵbc"] = PrependPipeModule;
|
|
10279
|
+
exports["ɵbd"] = PrependPipe;
|
|
10108
10280
|
exports["ɵc"] = CoRippleDirective;
|
|
10109
10281
|
exports["ɵd"] = CoViewportRulerService;
|
|
10110
10282
|
exports["ɵe"] = CoScrollDispatcherService;
|
|
@@ -10128,7 +10300,7 @@
|
|
|
10128
10300
|
exports["ɵw"] = CommitButtonsComponent;
|
|
10129
10301
|
exports["ɵx"] = PopupShowerService;
|
|
10130
10302
|
exports["ɵy"] = BaseSimpleGridComponent;
|
|
10131
|
-
exports["ɵz"] =
|
|
10303
|
+
exports["ɵz"] = ObserveVisibilityModule;
|
|
10132
10304
|
|
|
10133
10305
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10134
10306
|
|