@colijnit/corecomponents_v12 12.0.70 → 12.0.72
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 +24 -3
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/collapsible/collapsible.component.js +21 -6
- package/esm2015/lib/components/collapsible/collapsible.module.js +4 -2
- package/esm2015/lib/components/filter-item/filter-item.component.js +19 -2
- package/fesm2015/colijnit-corecomponents_v12.js +40 -7
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/collapsible/collapsible.component.d.ts +4 -0
- package/lib/components/collapsible/style/_layout.scss +20 -3
- package/lib/components/collapsible/style/_material-definition.scss +7 -0
- package/lib/components/collapsible/style/_theme.scss +16 -0
- package/lib/components/filter-item/filter-item.component.d.ts +5 -0
- package/lib/components/filter-item/style/_layout.scss +4 -0
- package/lib/components/filter-item/style/_material-definition.scss +7 -4
- package/lib/components/pagination/style/_material-definition.scss +1 -1
- package/lib/components/pagination-bar/style/_layout.scss +1 -1
- package/lib/components/pagination-bar/style/_material-definition.scss +1 -1
- package/lib/modules/pagination/style/_layout.scss +1 -1
- package/lib/style/_variables.scss +3 -2
- package/package.json +1 -1
|
@@ -4219,6 +4219,7 @@
|
|
|
4219
4219
|
this.expandButtonLast = false;
|
|
4220
4220
|
this.expanded = false;
|
|
4221
4221
|
this.expandedChange = new core.EventEmitter();
|
|
4222
|
+
this.buttonClicked = new core.EventEmitter();
|
|
4222
4223
|
}
|
|
4223
4224
|
CollapsibleComponent.prototype.showClass = function () {
|
|
4224
4225
|
return true;
|
|
@@ -4235,12 +4236,15 @@
|
|
|
4235
4236
|
this.expanded = !this.expanded;
|
|
4236
4237
|
this.expandedChange.next(this.expanded);
|
|
4237
4238
|
};
|
|
4239
|
+
CollapsibleComponent.prototype.onButtonClick = function () {
|
|
4240
|
+
this.buttonClicked.emit();
|
|
4241
|
+
};
|
|
4238
4242
|
return CollapsibleComponent;
|
|
4239
4243
|
}());
|
|
4240
4244
|
CollapsibleComponent.decorators = [
|
|
4241
4245
|
{ type: core.Component, args: [{
|
|
4242
4246
|
selector: "co-collapsible",
|
|
4243
|
-
template: "\n <div class=\"collapsible-header\" [class.end]=\"expandButtonLast\" (click)=\"changeExpanded()\">\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"!expandButtonLast\">\n
|
|
4247
|
+
template: "\n <div class=\"collapsible-header\" [class.end]=\"expandButtonLast\" (click)=\"changeExpanded()\">\n <div class=\"collapsible-header-start\">\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"!expandButtonLast\">\n <co-icon class=\"expand-icon\" [iconData]=\"iconData\"></co-icon>\n </div>\n <div class=\"collapsible-title\" [textContent]=\"headerTitle\"></div>\n </div>\n <div class=\"collapsible-header-end\">\n <div class=\"collapsible-button-wrapper\" *ngIf=\"showButton !== undefined\" (click)=\"$event.stopPropagation()\">\n <button class=\"collapsible-button\" *ngIf=\"showButton\" [textContent]=\"buttonText\"\n (click)=\"onButtonClick()\"></button>\n </div>\n <div class=\"expand-icon-wrapper\" [class.expanded]=\"expanded\" *ngIf=\"expandButtonLast\">\n <co-icon class=\"expand-icon\" [iconData]=\"iconData\"></co-icon>\n </div>\n </div>\n </div>\n <div class=\"collapsible-content\" *ngIf=\"expanded\" @showHideContent>\n <ng-content></ng-content>\n </div>\n ",
|
|
4244
4248
|
animations: [
|
|
4245
4249
|
animations.trigger('showHideContent', [
|
|
4246
4250
|
animations.state('*', animations.style({ height: '*' })),
|
|
@@ -4257,10 +4261,13 @@
|
|
|
4257
4261
|
]; };
|
|
4258
4262
|
CollapsibleComponent.propDecorators = {
|
|
4259
4263
|
headerTitle: [{ type: core.Input }],
|
|
4264
|
+
buttonText: [{ type: core.Input }],
|
|
4260
4265
|
iconData: [{ type: core.Input }],
|
|
4261
4266
|
expandButtonLast: [{ type: core.Input }],
|
|
4267
|
+
showButton: [{ type: core.Input }],
|
|
4262
4268
|
expanded: [{ type: core.Input }],
|
|
4263
4269
|
expandedChange: [{ type: core.Output }],
|
|
4270
|
+
buttonClicked: [{ type: core.Output }],
|
|
4264
4271
|
showClass: [{ type: core.HostBinding, args: ["class.co-collapsible",] }],
|
|
4265
4272
|
onHostClick: [{ type: core.HostListener, args: ["click", ["$event"],] }]
|
|
4266
4273
|
};
|
|
@@ -4274,7 +4281,8 @@
|
|
|
4274
4281
|
{ type: core.NgModule, args: [{
|
|
4275
4282
|
imports: [
|
|
4276
4283
|
common.CommonModule,
|
|
4277
|
-
IconModule
|
|
4284
|
+
IconModule,
|
|
4285
|
+
ButtonModule
|
|
4278
4286
|
],
|
|
4279
4287
|
declarations: [CollapsibleComponent],
|
|
4280
4288
|
exports: [CollapsibleComponent]
|
|
@@ -10965,14 +10973,17 @@
|
|
|
10965
10973
|
// Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
|
|
10966
10974
|
this.showAllResults = false;
|
|
10967
10975
|
this.singleSelect = false;
|
|
10976
|
+
this.filterButtonLabel = "Search";
|
|
10968
10977
|
this.searchPlaceholder = 'Search...';
|
|
10969
10978
|
this.showMoreLabel = 'Show more';
|
|
10970
10979
|
this.showLessLabel = 'Show less';
|
|
10971
10980
|
this.noResultsLabel = "No results";
|
|
10972
10981
|
this.collectionChange = new core.EventEmitter();
|
|
10982
|
+
this.filterButtonClicked = new core.EventEmitter();
|
|
10973
10983
|
this.filteredCollection = [];
|
|
10974
10984
|
this.limitTo = 10;
|
|
10975
10985
|
this.filterText = "";
|
|
10986
|
+
this.showButton = false;
|
|
10976
10987
|
this._collection = [];
|
|
10977
10988
|
}
|
|
10978
10989
|
Object.defineProperty(FilterItemComponent.prototype, "collection", {
|
|
@@ -10992,6 +11003,7 @@
|
|
|
10992
11003
|
};
|
|
10993
11004
|
FilterItemComponent.prototype.ngOnInit = function () {
|
|
10994
11005
|
this.setToInitialLimit();
|
|
11006
|
+
this.showButton = this.valueSelected();
|
|
10995
11007
|
};
|
|
10996
11008
|
FilterItemComponent.prototype.setToInitialLimit = function () {
|
|
10997
11009
|
this.limitTo = this.initialLimit;
|
|
@@ -11014,6 +11026,7 @@
|
|
|
11014
11026
|
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;
|
|
11015
11027
|
};
|
|
11016
11028
|
FilterItemComponent.prototype.handleModelChange = function (model) {
|
|
11029
|
+
this.showButton = true;
|
|
11017
11030
|
if (this.singleSelect) {
|
|
11018
11031
|
this.collection.forEach(function (m) {
|
|
11019
11032
|
if (m.code !== model.code && m.description !== model.description) {
|
|
@@ -11024,6 +11037,9 @@
|
|
|
11024
11037
|
model.checked = !model.checked;
|
|
11025
11038
|
this.collectionChange.emit(this.collection);
|
|
11026
11039
|
};
|
|
11040
|
+
FilterItemComponent.prototype.valueSelected = function () {
|
|
11041
|
+
return !!this.collection.find(function (c) { return c.checked; });
|
|
11042
|
+
};
|
|
11027
11043
|
// Applies filter to the collection.
|
|
11028
11044
|
FilterItemComponent.prototype.applyFilter = function (text) {
|
|
11029
11045
|
var _a, _b;
|
|
@@ -11068,12 +11084,15 @@
|
|
|
11068
11084
|
});
|
|
11069
11085
|
});
|
|
11070
11086
|
};
|
|
11087
|
+
FilterItemComponent.prototype.onButtonClicked = function () {
|
|
11088
|
+
this.filterButtonClicked.emit();
|
|
11089
|
+
};
|
|
11071
11090
|
return FilterItemComponent;
|
|
11072
11091
|
}());
|
|
11073
11092
|
FilterItemComponent.decorators = [
|
|
11074
11093
|
{ type: core.Component, args: [{
|
|
11075
11094
|
selector: "co-filter-item",
|
|
11076
|
-
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 || minSearchCharsToLoadCollection\"\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 <ng-container\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 *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [name]=\"'radiogroup'\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\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 ",
|
|
11095
|
+
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 [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (click)=\"showButton=true\">\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 || minSearchCharsToLoadCollection\"\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 <ng-container\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 *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [name]=\"'radiogroup'\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\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 ",
|
|
11077
11096
|
encapsulation: core.ViewEncapsulation.None
|
|
11078
11097
|
},] }
|
|
11079
11098
|
];
|
|
@@ -11090,11 +11109,13 @@
|
|
|
11090
11109
|
customContent: [{ type: core.Input }],
|
|
11091
11110
|
showAllResults: [{ type: core.Input }],
|
|
11092
11111
|
singleSelect: [{ type: core.Input }],
|
|
11112
|
+
filterButtonLabel: [{ type: core.Input }],
|
|
11093
11113
|
searchPlaceholder: [{ type: core.Input }],
|
|
11094
11114
|
showMoreLabel: [{ type: core.Input }],
|
|
11095
11115
|
showLessLabel: [{ type: core.Input }],
|
|
11096
11116
|
noResultsLabel: [{ type: core.Input }],
|
|
11097
11117
|
collectionChange: [{ type: core.Output }],
|
|
11118
|
+
filterButtonClicked: [{ type: core.Output }],
|
|
11098
11119
|
showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
|
|
11099
11120
|
};
|
|
11100
11121
|
|