@colijnit/corecomponents_v12 12.0.50 → 12.0.51
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 +181 -108
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/input-combo-box/input-combo-box.component.js +1 -2
- package/esm2015/lib/components/pagination/pagination.component.js +12 -12
- package/esm2015/lib/components/pagination/pagination.module.js +6 -4
- package/esm2015/lib/components/pagination-bar/pagination-bar.component.js +63 -0
- package/esm2015/lib/components/pagination-bar/pagination-bar.module.js +19 -0
- package/esm2015/public-api.js +3 -1
- package/fesm2015/colijnit-corecomponents_v12.js +196 -118
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/pagination/pagination.component.d.ts +2 -5
- package/lib/components/pagination/style/_layout.scss +0 -70
- package/lib/components/pagination/style/material.scss +1 -0
- package/lib/components/pagination-bar/pagination-bar.component.d.ts +21 -0
- package/lib/components/pagination-bar/pagination-bar.module.d.ts +2 -0
- package/lib/components/pagination-bar/style/_layout.scss +67 -0
- package/lib/components/pagination-bar/style/_material-definition.scss +3 -0
- package/lib/components/pagination-bar/style/_theme.scss +24 -0
- package/lib/components/pagination-bar/style/material.scss +3 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -6246,7 +6246,7 @@
|
|
|
6246
6246
|
InputComboBoxComponent.decorators = [
|
|
6247
6247
|
{ type: core.Component, args: [{
|
|
6248
6248
|
selector: "co-input-combo-box",
|
|
6249
|
-
template: "\n <ejs-combobox #combo [dataSource]=\"collection\"\n [fields]=\"fields\"\n [
|
|
6249
|
+
template: "\n <ejs-combobox #combo [dataSource]=\"collection\"\n [fields]=\"fields\"\n [placeholder]=\"placeholder\"\n [autofill]=\"true\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"valueChange.emit($event)\"\n (focus)=\"onFocus()\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-combobox>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
6250
6250
|
providers: [{
|
|
6251
6251
|
provide: COMPONENT_INTERFACE_NAME,
|
|
6252
6252
|
useExisting: core.forwardRef(function () { return InputComboBoxComponent; })
|
|
@@ -9809,6 +9809,76 @@
|
|
|
9809
9809
|
handleKeyDown: [{ type: core.HostListener, args: ['keydown', ['$event'],] }]
|
|
9810
9810
|
};
|
|
9811
9811
|
|
|
9812
|
+
var PaginationBarComponent = /** @class */ (function () {
|
|
9813
|
+
function PaginationBarComponent() {
|
|
9814
|
+
this.pages = [];
|
|
9815
|
+
this.directionLinks = true;
|
|
9816
|
+
this.previousLabel = 'Vorige pagina';
|
|
9817
|
+
this.nextLabel = 'Volgende pagina';
|
|
9818
|
+
this.currentPage = 1;
|
|
9819
|
+
this.previousClick = new core.EventEmitter();
|
|
9820
|
+
this.nextClick = new core.EventEmitter();
|
|
9821
|
+
this.pageClick = new core.EventEmitter();
|
|
9822
|
+
}
|
|
9823
|
+
PaginationBarComponent.prototype.showClass = function () {
|
|
9824
|
+
return true;
|
|
9825
|
+
};
|
|
9826
|
+
PaginationBarComponent.prototype.isOnFirstPage = function () {
|
|
9827
|
+
return this.currentPage === 1;
|
|
9828
|
+
};
|
|
9829
|
+
PaginationBarComponent.prototype.isOnLastPage = function () {
|
|
9830
|
+
return this.pages.length === this.currentPage;
|
|
9831
|
+
};
|
|
9832
|
+
PaginationBarComponent.prototype.onPreviousClick = function () {
|
|
9833
|
+
this.previousClick.emit();
|
|
9834
|
+
};
|
|
9835
|
+
PaginationBarComponent.prototype.onNextClick = function () {
|
|
9836
|
+
this.nextClick.emit();
|
|
9837
|
+
};
|
|
9838
|
+
PaginationBarComponent.prototype.onPageClick = function (value) {
|
|
9839
|
+
this.currentPage = value;
|
|
9840
|
+
this.pageClick.emit(value);
|
|
9841
|
+
};
|
|
9842
|
+
return PaginationBarComponent;
|
|
9843
|
+
}());
|
|
9844
|
+
PaginationBarComponent.decorators = [
|
|
9845
|
+
{ type: core.Component, args: [{
|
|
9846
|
+
selector: "co-pagination-bar",
|
|
9847
|
+
template: "\n <ul class=\"pagination\">\n <li *ngIf=\"directionLinks\" class=\"pagination-previous\">\n <a (click)=\"onPreviousClick()\" [class.disabled]=\"isOnFirstPage()\">{{ previousLabel }}</a>\n </li>\n <li *ngFor=\"let page of pages\" [class.current]=\"currentPage === page.value\" (click)=\"onPageClick(page.value)\">\n <span>{{page.label}}</span>\n </li>\n <li *ngIf=\"directionLinks\" class=\"pagination-next\">\n <a (click)=\"onNextClick()\" [class.disabled]=\"isOnLastPage()\">{{ nextLabel }}</a>\n </li>\n </ul>\n ",
|
|
9848
|
+
encapsulation: core.ViewEncapsulation.None
|
|
9849
|
+
},] }
|
|
9850
|
+
];
|
|
9851
|
+
PaginationBarComponent.propDecorators = {
|
|
9852
|
+
pages: [{ type: core.Input }],
|
|
9853
|
+
directionLinks: [{ type: core.Input }],
|
|
9854
|
+
previousLabel: [{ type: core.Input }],
|
|
9855
|
+
nextLabel: [{ type: core.Input }],
|
|
9856
|
+
currentPage: [{ type: core.Input }],
|
|
9857
|
+
previousClick: [{ type: core.Output }],
|
|
9858
|
+
nextClick: [{ type: core.Output }],
|
|
9859
|
+
pageClick: [{ type: core.Output }],
|
|
9860
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-pagination-bar",] }]
|
|
9861
|
+
};
|
|
9862
|
+
|
|
9863
|
+
var PaginationBarModule = /** @class */ (function () {
|
|
9864
|
+
function PaginationBarModule() {
|
|
9865
|
+
}
|
|
9866
|
+
return PaginationBarModule;
|
|
9867
|
+
}());
|
|
9868
|
+
PaginationBarModule.decorators = [
|
|
9869
|
+
{ type: core.NgModule, args: [{
|
|
9870
|
+
imports: [
|
|
9871
|
+
common.CommonModule
|
|
9872
|
+
],
|
|
9873
|
+
declarations: [
|
|
9874
|
+
PaginationBarComponent
|
|
9875
|
+
],
|
|
9876
|
+
exports: [
|
|
9877
|
+
PaginationBarComponent
|
|
9878
|
+
]
|
|
9879
|
+
},] }
|
|
9880
|
+
];
|
|
9881
|
+
|
|
9812
9882
|
var PaginationService = /** @class */ (function () {
|
|
9813
9883
|
function PaginationService() {
|
|
9814
9884
|
this.change = new rxjs.Subject();
|
|
@@ -9900,6 +9970,111 @@
|
|
|
9900
9970
|
];
|
|
9901
9971
|
PaginationService.ctorParameters = function () { return []; };
|
|
9902
9972
|
|
|
9973
|
+
var LARGE_NUMBER = 999999999;
|
|
9974
|
+
var PaginatePipe = /** @class */ (function () {
|
|
9975
|
+
function PaginatePipe(paginateService) {
|
|
9976
|
+
this.paginateService = paginateService;
|
|
9977
|
+
// store the values from the last time the pipe
|
|
9978
|
+
this.state = {};
|
|
9979
|
+
}
|
|
9980
|
+
PaginatePipe.prototype.transform = function (collection, args) {
|
|
9981
|
+
// When an observable is passed through the AsyncPipe, it will output
|
|
9982
|
+
// `null` until the subscription resolves. In this case, we want to
|
|
9983
|
+
// use the cached data from the `state` object to prevent the NgFor
|
|
9984
|
+
// from flashing empty until the real values arrive.
|
|
9985
|
+
if (!(collection instanceof Array)) {
|
|
9986
|
+
var _id = args.id || this.paginateService.DEFAULT_ID;
|
|
9987
|
+
if (this.state[_id]) {
|
|
9988
|
+
return this.state[_id].slice;
|
|
9989
|
+
}
|
|
9990
|
+
else {
|
|
9991
|
+
return collection;
|
|
9992
|
+
}
|
|
9993
|
+
}
|
|
9994
|
+
var serverSideMode = args.totalItems !== undefined;
|
|
9995
|
+
var instance = this._createInstance(collection, args);
|
|
9996
|
+
var id = instance.id;
|
|
9997
|
+
var start;
|
|
9998
|
+
var end;
|
|
9999
|
+
var perPage = instance.itemsPerPage;
|
|
10000
|
+
this.paginateService.register(instance);
|
|
10001
|
+
if (!serverSideMode && collection instanceof Array) {
|
|
10002
|
+
perPage = perPage || LARGE_NUMBER;
|
|
10003
|
+
start = (instance.currentPage - 1) * perPage;
|
|
10004
|
+
end = start + perPage;
|
|
10005
|
+
var isIdentical = this._stateIsIdentical(id, collection, start, end);
|
|
10006
|
+
if (isIdentical) {
|
|
10007
|
+
return this.state[id].slice;
|
|
10008
|
+
}
|
|
10009
|
+
else {
|
|
10010
|
+
var slice = collection.slice(start, end);
|
|
10011
|
+
this._saveState(id, collection, slice, start, end);
|
|
10012
|
+
this.paginateService.change.next(id);
|
|
10013
|
+
return slice;
|
|
10014
|
+
}
|
|
10015
|
+
}
|
|
10016
|
+
// save the state for server-side collection to avoid null
|
|
10017
|
+
// flash as new data loads.
|
|
10018
|
+
this._saveState(id, collection, collection, start, end);
|
|
10019
|
+
return collection;
|
|
10020
|
+
};
|
|
10021
|
+
// Create an IPaginationInstance object, using defaults for any optional properties not supplied.
|
|
10022
|
+
PaginatePipe.prototype._createInstance = function (collection, args) {
|
|
10023
|
+
var config = args;
|
|
10024
|
+
this._checkConfig(config);
|
|
10025
|
+
return {
|
|
10026
|
+
id: config.id || this.paginateService.DEFAULT_ID,
|
|
10027
|
+
itemsPerPage: config.itemsPerPage || 0,
|
|
10028
|
+
currentPage: config.currentPage || 1,
|
|
10029
|
+
totalItems: config.totalItems || collection.length
|
|
10030
|
+
};
|
|
10031
|
+
};
|
|
10032
|
+
// Ensure the argument passed to the filter contains the required properties.
|
|
10033
|
+
PaginatePipe.prototype._checkConfig = function (config) {
|
|
10034
|
+
var required = ["itemsPerPage", "currentPage"];
|
|
10035
|
+
var missing = required.filter(function (prop) { return !config.hasOwnProperty(prop); });
|
|
10036
|
+
if (0 < missing.length) {
|
|
10037
|
+
throw new Error("PaginatePipe: Argument is missing the following required properties: " + missing.join(", "));
|
|
10038
|
+
}
|
|
10039
|
+
};
|
|
10040
|
+
/**
|
|
10041
|
+
* To avoid returning a brand new array each time the pipe is run, we store the state of the sliced
|
|
10042
|
+
* array for a given id. This means that the next time the pipe is run on this collection & id, we just
|
|
10043
|
+
* need to check that the collection, start and end points are all identical, and if so, return the
|
|
10044
|
+
* last sliced array.
|
|
10045
|
+
*/
|
|
10046
|
+
PaginatePipe.prototype._saveState = function (id, collection, slice, start, end) {
|
|
10047
|
+
this.state[id] = {
|
|
10048
|
+
collection: collection,
|
|
10049
|
+
size: collection.length,
|
|
10050
|
+
slice: slice,
|
|
10051
|
+
start: start,
|
|
10052
|
+
end: end
|
|
10053
|
+
};
|
|
10054
|
+
};
|
|
10055
|
+
// For a given id, returns true if the collection, size, start and end values are identical.
|
|
10056
|
+
PaginatePipe.prototype._stateIsIdentical = function (id, collection, start, end) {
|
|
10057
|
+
var state = this.state[id];
|
|
10058
|
+
if (!state) {
|
|
10059
|
+
return false;
|
|
10060
|
+
}
|
|
10061
|
+
return state.collection === collection &&
|
|
10062
|
+
state.size === collection.length &&
|
|
10063
|
+
state.start === start &&
|
|
10064
|
+
state.end === end;
|
|
10065
|
+
};
|
|
10066
|
+
return PaginatePipe;
|
|
10067
|
+
}());
|
|
10068
|
+
PaginatePipe.decorators = [
|
|
10069
|
+
{ type: core.Pipe, args: [{
|
|
10070
|
+
name: 'paginate',
|
|
10071
|
+
pure: false
|
|
10072
|
+
},] }
|
|
10073
|
+
];
|
|
10074
|
+
PaginatePipe.ctorParameters = function () { return [
|
|
10075
|
+
{ type: PaginationService }
|
|
10076
|
+
]; };
|
|
10077
|
+
|
|
9903
10078
|
var PaginationComponent = /** @class */ (function () {
|
|
9904
10079
|
function PaginationComponent(_paginationService) {
|
|
9905
10080
|
var _this = this;
|
|
@@ -10058,7 +10233,7 @@
|
|
|
10058
10233
|
PaginationComponent.decorators = [
|
|
10059
10234
|
{ type: core.Component, args: [{
|
|
10060
10235
|
selector: 'co-pagination',
|
|
10061
|
-
template: "\n <div class=\"pagination-component-main-wrapper\" *ngIf=\"!shouldBeHidden()\">\n <div>\n <ng-content></ng-content>\n </div>\n <
|
|
10236
|
+
template: "\n <div class=\"pagination-component-main-wrapper\" *ngIf=\"!shouldBeHidden()\">\n <div>\n <ng-content></ng-content>\n </div>\n\n <co-pagination-bar\n [pages]=\"pages\"\n [directionLinks]=\"directionLinks\"\n [previousLabel]=\"previousLabel\"\n [nextLabel]=\"nextLabel\"\n [currentPage]=\"getCurrentPage()\"\n (previousClick)=\"goToPreviousPage()\"\n (nextClick)=\"goToNextPage()\"\n (pageClick)=\"setCurrentPage($event)\"\n ></co-pagination-bar>\n </div>\n ",
|
|
10062
10237
|
encapsulation: core.ViewEncapsulation.None
|
|
10063
10238
|
},] }
|
|
10064
10239
|
];
|
|
@@ -10077,111 +10252,6 @@
|
|
|
10077
10252
|
showClass: [{ type: core.HostBinding, args: ['class.co-pagination',] }]
|
|
10078
10253
|
};
|
|
10079
10254
|
|
|
10080
|
-
var LARGE_NUMBER = 999999999;
|
|
10081
|
-
var PaginatePipe = /** @class */ (function () {
|
|
10082
|
-
function PaginatePipe(paginateService) {
|
|
10083
|
-
this.paginateService = paginateService;
|
|
10084
|
-
// store the values from the last time the pipe
|
|
10085
|
-
this.state = {};
|
|
10086
|
-
}
|
|
10087
|
-
PaginatePipe.prototype.transform = function (collection, args) {
|
|
10088
|
-
// When an observable is passed through the AsyncPipe, it will output
|
|
10089
|
-
// `null` until the subscription resolves. In this case, we want to
|
|
10090
|
-
// use the cached data from the `state` object to prevent the NgFor
|
|
10091
|
-
// from flashing empty until the real values arrive.
|
|
10092
|
-
if (!(collection instanceof Array)) {
|
|
10093
|
-
var _id = args.id || this.paginateService.DEFAULT_ID;
|
|
10094
|
-
if (this.state[_id]) {
|
|
10095
|
-
return this.state[_id].slice;
|
|
10096
|
-
}
|
|
10097
|
-
else {
|
|
10098
|
-
return collection;
|
|
10099
|
-
}
|
|
10100
|
-
}
|
|
10101
|
-
var serverSideMode = args.totalItems !== undefined;
|
|
10102
|
-
var instance = this._createInstance(collection, args);
|
|
10103
|
-
var id = instance.id;
|
|
10104
|
-
var start;
|
|
10105
|
-
var end;
|
|
10106
|
-
var perPage = instance.itemsPerPage;
|
|
10107
|
-
this.paginateService.register(instance);
|
|
10108
|
-
if (!serverSideMode && collection instanceof Array) {
|
|
10109
|
-
perPage = perPage || LARGE_NUMBER;
|
|
10110
|
-
start = (instance.currentPage - 1) * perPage;
|
|
10111
|
-
end = start + perPage;
|
|
10112
|
-
var isIdentical = this._stateIsIdentical(id, collection, start, end);
|
|
10113
|
-
if (isIdentical) {
|
|
10114
|
-
return this.state[id].slice;
|
|
10115
|
-
}
|
|
10116
|
-
else {
|
|
10117
|
-
var slice = collection.slice(start, end);
|
|
10118
|
-
this._saveState(id, collection, slice, start, end);
|
|
10119
|
-
this.paginateService.change.next(id);
|
|
10120
|
-
return slice;
|
|
10121
|
-
}
|
|
10122
|
-
}
|
|
10123
|
-
// save the state for server-side collection to avoid null
|
|
10124
|
-
// flash as new data loads.
|
|
10125
|
-
this._saveState(id, collection, collection, start, end);
|
|
10126
|
-
return collection;
|
|
10127
|
-
};
|
|
10128
|
-
// Create an IPaginationInstance object, using defaults for any optional properties not supplied.
|
|
10129
|
-
PaginatePipe.prototype._createInstance = function (collection, args) {
|
|
10130
|
-
var config = args;
|
|
10131
|
-
this._checkConfig(config);
|
|
10132
|
-
return {
|
|
10133
|
-
id: config.id || this.paginateService.DEFAULT_ID,
|
|
10134
|
-
itemsPerPage: config.itemsPerPage || 0,
|
|
10135
|
-
currentPage: config.currentPage || 1,
|
|
10136
|
-
totalItems: config.totalItems || collection.length
|
|
10137
|
-
};
|
|
10138
|
-
};
|
|
10139
|
-
// Ensure the argument passed to the filter contains the required properties.
|
|
10140
|
-
PaginatePipe.prototype._checkConfig = function (config) {
|
|
10141
|
-
var required = ["itemsPerPage", "currentPage"];
|
|
10142
|
-
var missing = required.filter(function (prop) { return !config.hasOwnProperty(prop); });
|
|
10143
|
-
if (0 < missing.length) {
|
|
10144
|
-
throw new Error("PaginatePipe: Argument is missing the following required properties: " + missing.join(", "));
|
|
10145
|
-
}
|
|
10146
|
-
};
|
|
10147
|
-
/**
|
|
10148
|
-
* To avoid returning a brand new array each time the pipe is run, we store the state of the sliced
|
|
10149
|
-
* array for a given id. This means that the next time the pipe is run on this collection & id, we just
|
|
10150
|
-
* need to check that the collection, start and end points are all identical, and if so, return the
|
|
10151
|
-
* last sliced array.
|
|
10152
|
-
*/
|
|
10153
|
-
PaginatePipe.prototype._saveState = function (id, collection, slice, start, end) {
|
|
10154
|
-
this.state[id] = {
|
|
10155
|
-
collection: collection,
|
|
10156
|
-
size: collection.length,
|
|
10157
|
-
slice: slice,
|
|
10158
|
-
start: start,
|
|
10159
|
-
end: end
|
|
10160
|
-
};
|
|
10161
|
-
};
|
|
10162
|
-
// For a given id, returns true if the collection, size, start and end values are identical.
|
|
10163
|
-
PaginatePipe.prototype._stateIsIdentical = function (id, collection, start, end) {
|
|
10164
|
-
var state = this.state[id];
|
|
10165
|
-
if (!state) {
|
|
10166
|
-
return false;
|
|
10167
|
-
}
|
|
10168
|
-
return state.collection === collection &&
|
|
10169
|
-
state.size === collection.length &&
|
|
10170
|
-
state.start === start &&
|
|
10171
|
-
state.end === end;
|
|
10172
|
-
};
|
|
10173
|
-
return PaginatePipe;
|
|
10174
|
-
}());
|
|
10175
|
-
PaginatePipe.decorators = [
|
|
10176
|
-
{ type: core.Pipe, args: [{
|
|
10177
|
-
name: 'paginate',
|
|
10178
|
-
pure: false
|
|
10179
|
-
},] }
|
|
10180
|
-
];
|
|
10181
|
-
PaginatePipe.ctorParameters = function () { return [
|
|
10182
|
-
{ type: PaginationService }
|
|
10183
|
-
]; };
|
|
10184
|
-
|
|
10185
10255
|
var PaginationModule = /** @class */ (function () {
|
|
10186
10256
|
function PaginationModule() {
|
|
10187
10257
|
}
|
|
@@ -10190,7 +10260,8 @@
|
|
|
10190
10260
|
PaginationModule.decorators = [
|
|
10191
10261
|
{ type: core.NgModule, args: [{
|
|
10192
10262
|
imports: [
|
|
10193
|
-
common.CommonModule
|
|
10263
|
+
common.CommonModule,
|
|
10264
|
+
PaginationBarModule
|
|
10194
10265
|
],
|
|
10195
10266
|
providers: [
|
|
10196
10267
|
PaginationService
|
|
@@ -11017,6 +11088,8 @@
|
|
|
11017
11088
|
exports.MultiSelectListComponent = MultiSelectListComponent;
|
|
11018
11089
|
exports.MultiSelectListModule = MultiSelectListModule;
|
|
11019
11090
|
exports.ObserveVisibilityModule = ObserveVisibilityModule;
|
|
11091
|
+
exports.PaginationBarComponent = PaginationBarComponent;
|
|
11092
|
+
exports.PaginationBarModule = PaginationBarModule;
|
|
11020
11093
|
exports.PaginationComponent = PaginationComponent;
|
|
11021
11094
|
exports.PaginationModule = PaginationModule;
|
|
11022
11095
|
exports.PopupButtonsComponent = PopupButtonsComponent;
|