@colijnit/corecomponents_v12 12.0.35 → 12.0.38
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 -28
- 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/drop-down-list/drop-down-list.component.js +2 -1
- package/esm2015/lib/components/filter-item/filter-item.component.js +6 -9
- 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-date-range-picker/input-date-range-picker.component.js +8 -3
- 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 +166 -26
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/filter-item/filter-item.component.d.ts +1 -2
- 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-date-range-picker/input-date-range-picker.component.d.ts +2 -1
- 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
|
@@ -4870,7 +4870,7 @@
|
|
|
4870
4870
|
var _this = this;
|
|
4871
4871
|
if (this.elementRef && this.elementRef.nativeElement) {
|
|
4872
4872
|
//try to find input element
|
|
4873
|
-
this.
|
|
4873
|
+
this._findInputNode(this.elementRef.nativeElement.children);
|
|
4874
4874
|
if (this.input) {
|
|
4875
4875
|
this.input.addEventListener('blur', function (event) { return _this.doBlur(event); });
|
|
4876
4876
|
this.input.addEventListener('focus', function (event) { return _this.doFocus(event); });
|
|
@@ -4881,7 +4881,8 @@
|
|
|
4881
4881
|
for (var i = 0; i < nodes.length; i++) {
|
|
4882
4882
|
var node = nodes[i];
|
|
4883
4883
|
if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) {
|
|
4884
|
-
|
|
4884
|
+
this.input = node;
|
|
4885
|
+
break;
|
|
4885
4886
|
}
|
|
4886
4887
|
else if (node.children.length > 0) {
|
|
4887
4888
|
this._findInputNode(node.children);
|
|
@@ -5394,7 +5395,7 @@
|
|
|
5394
5395
|
DropDownListComponent.decorators = [
|
|
5395
5396
|
{ type: core.Component, args: [{
|
|
5396
5397
|
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 ",
|
|
5398
|
+
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
5399
|
providers: [
|
|
5399
5400
|
ej2AngularDropdowns.CheckBoxSelectionService,
|
|
5400
5401
|
{
|
|
@@ -5959,6 +5960,50 @@
|
|
|
5959
5960
|
},] }
|
|
5960
5961
|
];
|
|
5961
5962
|
|
|
5963
|
+
var GridToolbarButtonComponent = /** @class */ (function () {
|
|
5964
|
+
function GridToolbarButtonComponent() {
|
|
5965
|
+
this.disabled = false;
|
|
5966
|
+
this.buttonClick = new core.EventEmitter();
|
|
5967
|
+
}
|
|
5968
|
+
GridToolbarButtonComponent.prototype.showClass = function () {
|
|
5969
|
+
return true;
|
|
5970
|
+
};
|
|
5971
|
+
return GridToolbarButtonComponent;
|
|
5972
|
+
}());
|
|
5973
|
+
GridToolbarButtonComponent.decorators = [
|
|
5974
|
+
{ type: core.Component, args: [{
|
|
5975
|
+
selector: "co-grid-toolbar-button",
|
|
5976
|
+
template: "\n <div class=\"grid-toolbar-button-wrapper\" [class.disabled]=\"disabled\" (click)=\"buttonClick.next()\">\n <co-icon [iconData]=\"iconData\"></co-icon>\n </div>\n ",
|
|
5977
|
+
encapsulation: core.ViewEncapsulation.None
|
|
5978
|
+
},] }
|
|
5979
|
+
];
|
|
5980
|
+
GridToolbarButtonComponent.propDecorators = {
|
|
5981
|
+
iconData: [{ type: core.Input }],
|
|
5982
|
+
disabled: [{ type: core.Input }],
|
|
5983
|
+
buttonClick: [{ type: core.Output }],
|
|
5984
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-grid-toolbar-button",] }]
|
|
5985
|
+
};
|
|
5986
|
+
|
|
5987
|
+
ej2Base.enableRipple(true);
|
|
5988
|
+
var GridToolbarButtonModule = /** @class */ (function () {
|
|
5989
|
+
function GridToolbarButtonModule() {
|
|
5990
|
+
}
|
|
5991
|
+
return GridToolbarButtonModule;
|
|
5992
|
+
}());
|
|
5993
|
+
GridToolbarButtonModule.decorators = [
|
|
5994
|
+
{ type: core.NgModule, args: [{
|
|
5995
|
+
imports: [
|
|
5996
|
+
IconModule,
|
|
5997
|
+
],
|
|
5998
|
+
declarations: [
|
|
5999
|
+
GridToolbarButtonComponent
|
|
6000
|
+
],
|
|
6001
|
+
exports: [
|
|
6002
|
+
GridToolbarButtonComponent
|
|
6003
|
+
]
|
|
6004
|
+
},] }
|
|
6005
|
+
];
|
|
6006
|
+
|
|
5962
6007
|
var InputCheckboxComponent = /** @class */ (function (_super) {
|
|
5963
6008
|
__extends(InputCheckboxComponent, _super);
|
|
5964
6009
|
function InputCheckboxComponent(formComponent, iconCacheService, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
@@ -5990,7 +6035,7 @@
|
|
|
5990
6035
|
InputCheckboxComponent.decorators = [
|
|
5991
6036
|
{ type: core.Component, args: [{
|
|
5992
6037
|
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 ",
|
|
6038
|
+
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
6039
|
providers: [{
|
|
5995
6040
|
provide: COMPONENT_INTERFACE_NAME,
|
|
5996
6041
|
useExisting: core.forwardRef(function () { return InputCheckboxComponent; })
|
|
@@ -6338,21 +6383,25 @@
|
|
|
6338
6383
|
_this.placeholder = "";
|
|
6339
6384
|
_this.startDateChange = new core.EventEmitter();
|
|
6340
6385
|
_this.endDateChange = new core.EventEmitter();
|
|
6386
|
+
_this.dateRangeChange = new core.EventEmitter();
|
|
6341
6387
|
return _this;
|
|
6342
6388
|
}
|
|
6343
6389
|
InputDateRangePickerComponent.prototype.showClass = function () {
|
|
6344
6390
|
return true;
|
|
6345
6391
|
};
|
|
6346
|
-
InputDateRangePickerComponent.prototype.
|
|
6392
|
+
InputDateRangePickerComponent.prototype.rangeChange = function () {
|
|
6347
6393
|
this.startDateChange.emit(this.startDate);
|
|
6348
6394
|
this.endDateChange.emit(this.endDate);
|
|
6395
|
+
if (this.startDate && this.endDate) {
|
|
6396
|
+
this.dateRangeChange.emit([this.startDate, this.endDate]);
|
|
6397
|
+
}
|
|
6349
6398
|
};
|
|
6350
6399
|
return InputDateRangePickerComponent;
|
|
6351
6400
|
}(BaseInputComponent));
|
|
6352
6401
|
InputDateRangePickerComponent.decorators = [
|
|
6353
6402
|
{ type: core.Component, args: [{
|
|
6354
6403
|
selector: "co-input-date-range",
|
|
6355
|
-
template: "\n <ejs-daterangepicker\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"
|
|
6404
|
+
template: "\n <ejs-daterangepicker\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"rangeChange()\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
6356
6405
|
encapsulation: core.ViewEncapsulation.None
|
|
6357
6406
|
},] }
|
|
6358
6407
|
];
|
|
@@ -6363,6 +6412,7 @@
|
|
|
6363
6412
|
endDate: [{ type: core.Input }],
|
|
6364
6413
|
startDateChange: [{ type: core.Output }],
|
|
6365
6414
|
endDateChange: [{ type: core.Output }],
|
|
6415
|
+
dateRangeChange: [{ type: core.Output }],
|
|
6366
6416
|
showClass: [{ type: core.HostBinding, args: ["class.co-input-date-range-picker",] }]
|
|
6367
6417
|
};
|
|
6368
6418
|
|
|
@@ -6878,17 +6928,19 @@
|
|
|
6878
6928
|
});
|
|
6879
6929
|
return _this;
|
|
6880
6930
|
}
|
|
6881
|
-
Object.defineProperty(InputNumberPickerComponent.prototype, "
|
|
6931
|
+
Object.defineProperty(InputNumberPickerComponent.prototype, "model", {
|
|
6932
|
+
get: function () {
|
|
6933
|
+
return _super.prototype.model;
|
|
6934
|
+
},
|
|
6882
6935
|
// @override
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
// }
|
|
6936
|
+
set: function (model) {
|
|
6937
|
+
this.setValue(model, true);
|
|
6938
|
+
_super.prototype.model = model;
|
|
6939
|
+
},
|
|
6940
|
+
enumerable: false,
|
|
6941
|
+
configurable: true
|
|
6942
|
+
});
|
|
6943
|
+
Object.defineProperty(InputNumberPickerComponent.prototype, "min", {
|
|
6892
6944
|
set: function (min) {
|
|
6893
6945
|
this.numberLogic.min = min;
|
|
6894
6946
|
},
|
|
@@ -7097,6 +7149,7 @@
|
|
|
7097
7149
|
{ type: FormInputUserModelChangeListenerService }
|
|
7098
7150
|
]; };
|
|
7099
7151
|
InputNumberPickerComponent.propDecorators = {
|
|
7152
|
+
model: [{ type: core.Input }],
|
|
7100
7153
|
min: [{ type: core.Input }],
|
|
7101
7154
|
step: [{ type: core.Input }],
|
|
7102
7155
|
max: [{ type: core.Input }],
|
|
@@ -9226,6 +9279,7 @@
|
|
|
9226
9279
|
this.selectRow = new core.EventEmitter();
|
|
9227
9280
|
this.dblClickRow = new core.EventEmitter();
|
|
9228
9281
|
this.saveRow = new core.EventEmitter();
|
|
9282
|
+
this.rowVisible = new core.EventEmitter();
|
|
9229
9283
|
this.columns = [];
|
|
9230
9284
|
this.headerColumns = [];
|
|
9231
9285
|
this._data = [];
|
|
@@ -9357,6 +9411,7 @@
|
|
|
9357
9411
|
selectRow: [{ type: core.Output }],
|
|
9358
9412
|
dblClickRow: [{ type: core.Output }],
|
|
9359
9413
|
saveRow: [{ type: core.Output }],
|
|
9414
|
+
rowVisible: [{ type: core.Output }],
|
|
9360
9415
|
handleMouseMove: [{ type: core.HostListener, args: ['document:mousemove', ['$event'],] }],
|
|
9361
9416
|
handleMouseUp: [{ type: core.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
9362
9417
|
};
|
|
@@ -9638,7 +9693,7 @@
|
|
|
9638
9693
|
SimpleGridComponent.decorators = [
|
|
9639
9694
|
{ type: core.Component, args: [{
|
|
9640
9695
|
selector: "co-simple-grid",
|
|
9641
|
-
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 ",
|
|
9696
|
+
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 ",
|
|
9642
9697
|
providers: [
|
|
9643
9698
|
FormMasterService
|
|
9644
9699
|
],
|
|
@@ -9807,6 +9862,115 @@
|
|
|
9807
9862
|
handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
9808
9863
|
};
|
|
9809
9864
|
|
|
9865
|
+
var ObserveVisibilityDirective = /** @class */ (function () {
|
|
9866
|
+
function ObserveVisibilityDirective(_element) {
|
|
9867
|
+
this._element = _element;
|
|
9868
|
+
this.debounceTime = 0;
|
|
9869
|
+
this.threshold = 0;
|
|
9870
|
+
this.visible = new core.EventEmitter();
|
|
9871
|
+
this._subject = new rxjs.Subject();
|
|
9872
|
+
}
|
|
9873
|
+
ObserveVisibilityDirective.prototype.ngOnInit = function () {
|
|
9874
|
+
this._createObserver();
|
|
9875
|
+
};
|
|
9876
|
+
ObserveVisibilityDirective.prototype.ngAfterViewInit = function () {
|
|
9877
|
+
this._startObservingElements();
|
|
9878
|
+
};
|
|
9879
|
+
ObserveVisibilityDirective.prototype.ngOnDestroy = function () {
|
|
9880
|
+
if (this._observer) {
|
|
9881
|
+
this._observer.disconnect();
|
|
9882
|
+
this._observer = undefined;
|
|
9883
|
+
}
|
|
9884
|
+
this._subject.next();
|
|
9885
|
+
this._subject.complete();
|
|
9886
|
+
};
|
|
9887
|
+
ObserveVisibilityDirective.prototype._isVisible = function (element) {
|
|
9888
|
+
var _this = this;
|
|
9889
|
+
return new Promise(function (resolve) {
|
|
9890
|
+
var observer = new IntersectionObserver(function (_a) {
|
|
9891
|
+
var _b = __read(_a, 1), entry = _b[0];
|
|
9892
|
+
resolve(entry.isIntersecting && entry.intersectionRatio >= _this.threshold);
|
|
9893
|
+
observer.disconnect();
|
|
9894
|
+
});
|
|
9895
|
+
observer.observe(element);
|
|
9896
|
+
});
|
|
9897
|
+
};
|
|
9898
|
+
ObserveVisibilityDirective.prototype._createObserver = function () {
|
|
9899
|
+
var _this = this;
|
|
9900
|
+
var options = {
|
|
9901
|
+
rootMargin: '0px',
|
|
9902
|
+
threshold: this.threshold,
|
|
9903
|
+
};
|
|
9904
|
+
var isIntersecting = function (entry) { return entry.isIntersecting || entry.intersectionRatio > 0; };
|
|
9905
|
+
this._observer = new IntersectionObserver(function (entries, observer) {
|
|
9906
|
+
entries.forEach(function (entry) {
|
|
9907
|
+
if (isIntersecting(entry)) {
|
|
9908
|
+
_this._subject.next({ entry: entry, observer: observer });
|
|
9909
|
+
}
|
|
9910
|
+
});
|
|
9911
|
+
}, options);
|
|
9912
|
+
};
|
|
9913
|
+
ObserveVisibilityDirective.prototype._startObservingElements = function () {
|
|
9914
|
+
var _this = this;
|
|
9915
|
+
if (!this._observer) {
|
|
9916
|
+
return;
|
|
9917
|
+
}
|
|
9918
|
+
this._observer.observe(this._element.nativeElement);
|
|
9919
|
+
this._subject
|
|
9920
|
+
.pipe(operators.delay(this.debounceTime), operators.filter(Boolean))
|
|
9921
|
+
.subscribe(function (_a) {
|
|
9922
|
+
var entry = _a.entry, observer = _a.observer;
|
|
9923
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
9924
|
+
var target, isStillVisible;
|
|
9925
|
+
return __generator(this, function (_a) {
|
|
9926
|
+
switch (_a.label) {
|
|
9927
|
+
case 0:
|
|
9928
|
+
target = entry.target;
|
|
9929
|
+
return [4 /*yield*/, this._isVisible(target)];
|
|
9930
|
+
case 1:
|
|
9931
|
+
isStillVisible = _a.sent();
|
|
9932
|
+
if (isStillVisible) {
|
|
9933
|
+
this.visible.emit(target);
|
|
9934
|
+
observer.unobserve(target);
|
|
9935
|
+
}
|
|
9936
|
+
return [2 /*return*/];
|
|
9937
|
+
}
|
|
9938
|
+
});
|
|
9939
|
+
});
|
|
9940
|
+
});
|
|
9941
|
+
};
|
|
9942
|
+
return ObserveVisibilityDirective;
|
|
9943
|
+
}());
|
|
9944
|
+
ObserveVisibilityDirective.decorators = [
|
|
9945
|
+
{ type: core.Directive, args: [{
|
|
9946
|
+
selector: '[observeVisibility]',
|
|
9947
|
+
},] }
|
|
9948
|
+
];
|
|
9949
|
+
ObserveVisibilityDirective.ctorParameters = function () { return [
|
|
9950
|
+
{ type: core.ElementRef }
|
|
9951
|
+
]; };
|
|
9952
|
+
ObserveVisibilityDirective.propDecorators = {
|
|
9953
|
+
debounceTime: [{ type: core.Input }],
|
|
9954
|
+
threshold: [{ type: core.Input }],
|
|
9955
|
+
visible: [{ type: core.Output }]
|
|
9956
|
+
};
|
|
9957
|
+
|
|
9958
|
+
var ObserveVisibilityModule = /** @class */ (function () {
|
|
9959
|
+
function ObserveVisibilityModule() {
|
|
9960
|
+
}
|
|
9961
|
+
return ObserveVisibilityModule;
|
|
9962
|
+
}());
|
|
9963
|
+
ObserveVisibilityModule.decorators = [
|
|
9964
|
+
{ type: core.NgModule, args: [{
|
|
9965
|
+
declarations: [
|
|
9966
|
+
ObserveVisibilityDirective
|
|
9967
|
+
],
|
|
9968
|
+
exports: [
|
|
9969
|
+
ObserveVisibilityDirective
|
|
9970
|
+
]
|
|
9971
|
+
},] }
|
|
9972
|
+
];
|
|
9973
|
+
|
|
9810
9974
|
var SimpleGridModule = /** @class */ (function () {
|
|
9811
9975
|
function SimpleGridModule() {
|
|
9812
9976
|
}
|
|
@@ -9819,7 +9983,8 @@
|
|
|
9819
9983
|
dragDrop.DragDropModule,
|
|
9820
9984
|
GridToolbarModule,
|
|
9821
9985
|
InputTextModule,
|
|
9822
|
-
FormModule
|
|
9986
|
+
FormModule,
|
|
9987
|
+
ObserveVisibilityModule
|
|
9823
9988
|
],
|
|
9824
9989
|
declarations: [
|
|
9825
9990
|
SimpleGridComponent,
|
|
@@ -9849,10 +10014,10 @@
|
|
|
9849
10014
|
this.showLessLabel = 'Show less';
|
|
9850
10015
|
this.noResultsLabel = "No results";
|
|
9851
10016
|
this.collectionChange = new core.EventEmitter();
|
|
10017
|
+
this.filterTextChange = new core.EventEmitter();
|
|
9852
10018
|
this.filteredCollection = [];
|
|
9853
10019
|
this.limitTo = 10;
|
|
9854
10020
|
this.filterText = "";
|
|
9855
|
-
this.searchable = true;
|
|
9856
10021
|
this._collection = [];
|
|
9857
10022
|
}
|
|
9858
10023
|
Object.defineProperty(FilterItemComponent.prototype, "collection", {
|
|
@@ -9872,11 +10037,6 @@
|
|
|
9872
10037
|
};
|
|
9873
10038
|
FilterItemComponent.prototype.ngOnInit = function () {
|
|
9874
10039
|
this.setToInitialLimit();
|
|
9875
|
-
this.setSearchable();
|
|
9876
|
-
};
|
|
9877
|
-
FilterItemComponent.prototype.setSearchable = function () {
|
|
9878
|
-
var _a;
|
|
9879
|
-
this.searchable = ((_a = this.collection) === null || _a === void 0 ? void 0 : _a.length) > 10;
|
|
9880
10040
|
};
|
|
9881
10041
|
FilterItemComponent.prototype.setToInitialLimit = function () {
|
|
9882
10042
|
this.limitTo = this.initialLimit;
|
|
@@ -9901,6 +10061,7 @@
|
|
|
9901
10061
|
// Applies filter to the collection.
|
|
9902
10062
|
FilterItemComponent.prototype.applyFilter = function (text) {
|
|
9903
10063
|
var _a, _b;
|
|
10064
|
+
this.filterTextChange.emit(text);
|
|
9904
10065
|
if (!this.collection) {
|
|
9905
10066
|
return [];
|
|
9906
10067
|
}
|
|
@@ -9924,7 +10085,7 @@
|
|
|
9924
10085
|
FilterItemComponent.decorators = [
|
|
9925
10086
|
{ type: core.Component, args: [{
|
|
9926
10087
|
selector: "co-filter-item",
|
|
9927
|
-
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=\"
|
|
10088
|
+
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 ",
|
|
9928
10089
|
encapsulation: core.ViewEncapsulation.None
|
|
9929
10090
|
},] }
|
|
9930
10091
|
];
|
|
@@ -9943,6 +10104,7 @@
|
|
|
9943
10104
|
showLessLabel: [{ type: core.Input }],
|
|
9944
10105
|
noResultsLabel: [{ type: core.Input }],
|
|
9945
10106
|
collectionChange: [{ type: core.Output }],
|
|
10107
|
+
filterTextChange: [{ type: core.Output }],
|
|
9946
10108
|
showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
|
|
9947
10109
|
};
|
|
9948
10110
|
|
|
@@ -10056,6 +10218,8 @@
|
|
|
10056
10218
|
exports.FormComponent = FormComponent;
|
|
10057
10219
|
exports.FormMasterService = FormMasterService;
|
|
10058
10220
|
exports.FormModule = FormModule;
|
|
10221
|
+
exports.GridToolbarButtonComponent = GridToolbarButtonComponent;
|
|
10222
|
+
exports.GridToolbarButtonModule = GridToolbarButtonModule;
|
|
10059
10223
|
exports.GridToolbarComponent = GridToolbarComponent;
|
|
10060
10224
|
exports.GridToolbarModule = GridToolbarModule;
|
|
10061
10225
|
exports.IconCacheService = IconCacheService;
|
|
@@ -10104,8 +10268,10 @@
|
|
|
10104
10268
|
exports.TileModule = TileModule;
|
|
10105
10269
|
exports["ɵa"] = RippleModule;
|
|
10106
10270
|
exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
10107
|
-
exports["ɵba"] =
|
|
10108
|
-
exports["ɵbb"] =
|
|
10271
|
+
exports["ɵba"] = ObserveVisibilityDirective;
|
|
10272
|
+
exports["ɵbb"] = SimpleGridCellComponent;
|
|
10273
|
+
exports["ɵbc"] = PrependPipeModule;
|
|
10274
|
+
exports["ɵbd"] = PrependPipe;
|
|
10109
10275
|
exports["ɵc"] = CoRippleDirective;
|
|
10110
10276
|
exports["ɵd"] = CoViewportRulerService;
|
|
10111
10277
|
exports["ɵe"] = CoScrollDispatcherService;
|
|
@@ -10129,7 +10295,7 @@
|
|
|
10129
10295
|
exports["ɵw"] = CommitButtonsComponent;
|
|
10130
10296
|
exports["ɵx"] = PopupShowerService;
|
|
10131
10297
|
exports["ɵy"] = BaseSimpleGridComponent;
|
|
10132
|
-
exports["ɵz"] =
|
|
10298
|
+
exports["ɵz"] = ObserveVisibilityModule;
|
|
10133
10299
|
|
|
10134
10300
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10135
10301
|
|