@colijnit/corecomponents_v12 12.0.34 → 12.0.37
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 +68 -23
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/filter-item/filter-item.component.js +23 -27
- package/esm2015/lib/components/filter-item/filter-item.module.js +5 -5
- 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-date-range-picker/input-date-range-picker.component.js +8 -3
- package/esm2015/lib/core/interface/filter-item-viewmodel.js +1 -1
- package/esm2015/public-api.js +3 -1
- package/fesm2015/colijnit-corecomponents_v12.js +74 -29
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/filter-item/filter-item.component.d.ts +6 -12
- package/lib/components/filter-item/style/_layout.scss +9 -3
- package/lib/components/filter-item/style/_material-definition.scss +8 -1
- 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/core/interface/filter-item-viewmodel.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/esm2015/lib/core/interface/filter-viewmodel.js +0 -2
- package/lib/core/interface/filter-viewmodel.d.ts +0 -4
|
@@ -5959,6 +5959,50 @@
|
|
|
5959
5959
|
},] }
|
|
5960
5960
|
];
|
|
5961
5961
|
|
|
5962
|
+
var GridToolbarButtonComponent = /** @class */ (function () {
|
|
5963
|
+
function GridToolbarButtonComponent() {
|
|
5964
|
+
this.disabled = false;
|
|
5965
|
+
this.buttonClick = new core.EventEmitter();
|
|
5966
|
+
}
|
|
5967
|
+
GridToolbarButtonComponent.prototype.showClass = function () {
|
|
5968
|
+
return true;
|
|
5969
|
+
};
|
|
5970
|
+
return GridToolbarButtonComponent;
|
|
5971
|
+
}());
|
|
5972
|
+
GridToolbarButtonComponent.decorators = [
|
|
5973
|
+
{ type: core.Component, args: [{
|
|
5974
|
+
selector: "co-grid-toolbar-button",
|
|
5975
|
+
template: "\n <div class=\"grid-toolbar-button-wrapper\" [class.disabled]=\"disabled\" (click)=\"buttonClick.next()\">\n <co-icon [iconData]=\"iconData\"></co-icon>\n </div>\n ",
|
|
5976
|
+
encapsulation: core.ViewEncapsulation.None
|
|
5977
|
+
},] }
|
|
5978
|
+
];
|
|
5979
|
+
GridToolbarButtonComponent.propDecorators = {
|
|
5980
|
+
iconData: [{ type: core.Input }],
|
|
5981
|
+
disabled: [{ type: core.Input }],
|
|
5982
|
+
buttonClick: [{ type: core.Output }],
|
|
5983
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-grid-toolbar-button",] }]
|
|
5984
|
+
};
|
|
5985
|
+
|
|
5986
|
+
ej2Base.enableRipple(true);
|
|
5987
|
+
var GridToolbarButtonModule = /** @class */ (function () {
|
|
5988
|
+
function GridToolbarButtonModule() {
|
|
5989
|
+
}
|
|
5990
|
+
return GridToolbarButtonModule;
|
|
5991
|
+
}());
|
|
5992
|
+
GridToolbarButtonModule.decorators = [
|
|
5993
|
+
{ type: core.NgModule, args: [{
|
|
5994
|
+
imports: [
|
|
5995
|
+
IconModule,
|
|
5996
|
+
],
|
|
5997
|
+
declarations: [
|
|
5998
|
+
GridToolbarButtonComponent
|
|
5999
|
+
],
|
|
6000
|
+
exports: [
|
|
6001
|
+
GridToolbarButtonComponent
|
|
6002
|
+
]
|
|
6003
|
+
},] }
|
|
6004
|
+
];
|
|
6005
|
+
|
|
5962
6006
|
var InputCheckboxComponent = /** @class */ (function (_super) {
|
|
5963
6007
|
__extends(InputCheckboxComponent, _super);
|
|
5964
6008
|
function InputCheckboxComponent(formComponent, iconCacheService, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
@@ -6338,21 +6382,25 @@
|
|
|
6338
6382
|
_this.placeholder = "";
|
|
6339
6383
|
_this.startDateChange = new core.EventEmitter();
|
|
6340
6384
|
_this.endDateChange = new core.EventEmitter();
|
|
6385
|
+
_this.dateRangeChange = new core.EventEmitter();
|
|
6341
6386
|
return _this;
|
|
6342
6387
|
}
|
|
6343
6388
|
InputDateRangePickerComponent.prototype.showClass = function () {
|
|
6344
6389
|
return true;
|
|
6345
6390
|
};
|
|
6346
|
-
InputDateRangePickerComponent.prototype.
|
|
6391
|
+
InputDateRangePickerComponent.prototype.rangeChange = function () {
|
|
6347
6392
|
this.startDateChange.emit(this.startDate);
|
|
6348
6393
|
this.endDateChange.emit(this.endDate);
|
|
6394
|
+
if (this.startDate && this.endDate) {
|
|
6395
|
+
this.dateRangeChange.emit([this.startDate, this.endDate]);
|
|
6396
|
+
}
|
|
6349
6397
|
};
|
|
6350
6398
|
return InputDateRangePickerComponent;
|
|
6351
6399
|
}(BaseInputComponent));
|
|
6352
6400
|
InputDateRangePickerComponent.decorators = [
|
|
6353
6401
|
{ type: core.Component, args: [{
|
|
6354
6402
|
selector: "co-input-date-range",
|
|
6355
|
-
template: "\n <ejs-daterangepicker\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"
|
|
6403
|
+
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
6404
|
encapsulation: core.ViewEncapsulation.None
|
|
6357
6405
|
},] }
|
|
6358
6406
|
];
|
|
@@ -6363,6 +6411,7 @@
|
|
|
6363
6411
|
endDate: [{ type: core.Input }],
|
|
6364
6412
|
startDateChange: [{ type: core.Output }],
|
|
6365
6413
|
endDateChange: [{ type: core.Output }],
|
|
6414
|
+
dateRangeChange: [{ type: core.Output }],
|
|
6366
6415
|
showClass: [{ type: core.HostBinding, args: ["class.co-input-date-range-picker",] }]
|
|
6367
6416
|
};
|
|
6368
6417
|
|
|
@@ -9842,33 +9891,30 @@
|
|
|
9842
9891
|
this.expanded = false;
|
|
9843
9892
|
// Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
|
|
9844
9893
|
this.customContent = false;
|
|
9845
|
-
// Set to true to show filter input field.
|
|
9846
|
-
this.searchable = true;
|
|
9847
9894
|
// Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
|
|
9848
9895
|
this.showAllResults = false;
|
|
9849
9896
|
this.searchPlaceholder = "Search...";
|
|
9850
9897
|
this.showMoreLabel = 'Show more';
|
|
9851
9898
|
this.showLessLabel = 'Show less';
|
|
9852
9899
|
this.noResultsLabel = "No results";
|
|
9853
|
-
this.
|
|
9854
|
-
this.filteredCollection =
|
|
9900
|
+
this.collectionChange = new core.EventEmitter();
|
|
9901
|
+
this.filteredCollection = [];
|
|
9855
9902
|
this.limitTo = 10;
|
|
9856
9903
|
this.filterText = "";
|
|
9857
|
-
this._collection =
|
|
9904
|
+
this._collection = [];
|
|
9858
9905
|
}
|
|
9859
9906
|
Object.defineProperty(FilterItemComponent.prototype, "collection", {
|
|
9860
9907
|
get: function () {
|
|
9861
9908
|
return this._collection;
|
|
9862
9909
|
},
|
|
9863
9910
|
set: function (value) {
|
|
9864
|
-
var _a
|
|
9911
|
+
var _a;
|
|
9865
9912
|
this._collection = value;
|
|
9866
|
-
this.filteredCollection
|
|
9913
|
+
this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
|
|
9867
9914
|
},
|
|
9868
9915
|
enumerable: false,
|
|
9869
9916
|
configurable: true
|
|
9870
9917
|
});
|
|
9871
|
-
// output bij: filtertext, kan gebruikt worden voor wanneer collectie opgehaald wordt
|
|
9872
9918
|
FilterItemComponent.prototype.showClass = function () {
|
|
9873
9919
|
return true;
|
|
9874
9920
|
};
|
|
@@ -9882,32 +9928,31 @@
|
|
|
9882
9928
|
this.limitTo += 10;
|
|
9883
9929
|
};
|
|
9884
9930
|
FilterItemComponent.prototype.moreToShow = function () {
|
|
9885
|
-
var _a
|
|
9931
|
+
var _a;
|
|
9886
9932
|
if (this.showAllResults) {
|
|
9887
9933
|
return false;
|
|
9888
9934
|
}
|
|
9889
|
-
return ((
|
|
9935
|
+
return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
|
|
9890
9936
|
};
|
|
9891
9937
|
FilterItemComponent.prototype.lessToShow = function () {
|
|
9892
|
-
var _a, _b
|
|
9938
|
+
var _a, _b;
|
|
9893
9939
|
if (this.showAllResults) {
|
|
9894
9940
|
return false;
|
|
9895
9941
|
}
|
|
9896
|
-
return ((
|
|
9942
|
+
return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
|
|
9897
9943
|
};
|
|
9898
9944
|
// Applies filter to the collection.
|
|
9899
9945
|
FilterItemComponent.prototype.applyFilter = function (text) {
|
|
9900
|
-
var _this = this;
|
|
9901
9946
|
var _a, _b;
|
|
9902
9947
|
if (!this.collection) {
|
|
9903
|
-
return
|
|
9948
|
+
return [];
|
|
9904
9949
|
}
|
|
9905
9950
|
var filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
|
|
9906
9951
|
var filteredItemCount = 0;
|
|
9907
|
-
this.filteredCollection
|
|
9952
|
+
this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
|
|
9908
9953
|
var _a;
|
|
9909
|
-
var labelText = (_a = item
|
|
9910
|
-
var isHiddenByFilter = (labelText.indexOf(filterText) === -1);
|
|
9954
|
+
var labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
|
|
9955
|
+
var isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
|
|
9911
9956
|
if (isHiddenByFilter) {
|
|
9912
9957
|
return false;
|
|
9913
9958
|
}
|
|
@@ -9922,7 +9967,7 @@
|
|
|
9922
9967
|
FilterItemComponent.decorators = [
|
|
9923
9968
|
{ type: core.Component, args: [{
|
|
9924
9969
|
selector: "co-filter-item",
|
|
9925
|
-
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=\"
|
|
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($event)\"\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 ",
|
|
9926
9971
|
encapsulation: core.ViewEncapsulation.None
|
|
9927
9972
|
},] }
|
|
9928
9973
|
];
|
|
@@ -9931,18 +9976,16 @@
|
|
|
9931
9976
|
]; };
|
|
9932
9977
|
FilterItemComponent.propDecorators = {
|
|
9933
9978
|
collection: [{ type: core.Input }],
|
|
9934
|
-
fields: [{ type: core.Input }],
|
|
9935
9979
|
placeholder: [{ type: core.Input }],
|
|
9936
9980
|
initialLimit: [{ type: core.Input }],
|
|
9937
9981
|
expanded: [{ type: core.Input }],
|
|
9938
9982
|
customContent: [{ type: core.Input }],
|
|
9939
|
-
searchable: [{ type: core.Input }],
|
|
9940
9983
|
showAllResults: [{ type: core.Input }],
|
|
9941
9984
|
searchPlaceholder: [{ type: core.Input }],
|
|
9942
9985
|
showMoreLabel: [{ type: core.Input }],
|
|
9943
9986
|
showLessLabel: [{ type: core.Input }],
|
|
9944
9987
|
noResultsLabel: [{ type: core.Input }],
|
|
9945
|
-
|
|
9988
|
+
collectionChange: [{ type: core.Output }],
|
|
9946
9989
|
showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
|
|
9947
9990
|
};
|
|
9948
9991
|
|
|
@@ -10056,6 +10099,8 @@
|
|
|
10056
10099
|
exports.FormComponent = FormComponent;
|
|
10057
10100
|
exports.FormMasterService = FormMasterService;
|
|
10058
10101
|
exports.FormModule = FormModule;
|
|
10102
|
+
exports.GridToolbarButtonComponent = GridToolbarButtonComponent;
|
|
10103
|
+
exports.GridToolbarButtonModule = GridToolbarButtonModule;
|
|
10059
10104
|
exports.GridToolbarComponent = GridToolbarComponent;
|
|
10060
10105
|
exports.GridToolbarModule = GridToolbarModule;
|
|
10061
10106
|
exports.IconCacheService = IconCacheService;
|