@colijnit/corecomponents_v12 12.0.91 → 12.0.92

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.
Files changed (25) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +90 -1
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12-12.0.92.tgz +0 -0
  4. package/colijnit-corecomponents_v12.metadata.json +1 -1
  5. package/esm2015/lib/components/filter-item/filter-item-viewmodel.js +11 -0
  6. package/esm2015/lib/components/filter-item/filter-item.component.js +2 -2
  7. package/esm2015/lib/components/view-mode-buttons/content-view-mode.enum.js +11 -0
  8. package/esm2015/lib/components/view-mode-buttons/view-mode-buttons.component.js +61 -0
  9. package/esm2015/lib/components/view-mode-buttons/view-mode-buttons.module.js +21 -0
  10. package/esm2015/public-api.js +5 -1
  11. package/fesm2015/colijnit-corecomponents_v12.js +98 -2
  12. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  13. package/lib/components/filter-item/filter-item-viewmodel.d.ts +8 -0
  14. package/lib/components/filter-item/filter-item.component.d.ts +1 -1
  15. package/lib/components/view-mode-buttons/content-view-mode.enum.d.ts +8 -0
  16. package/lib/components/view-mode-buttons/style/_layout.scss +24 -0
  17. package/lib/components/view-mode-buttons/style/_material-definition.scss +6 -0
  18. package/lib/components/view-mode-buttons/style/_theme.scss +20 -0
  19. package/lib/components/view-mode-buttons/style/material.scss +3 -0
  20. package/lib/components/view-mode-buttons/view-mode-buttons.component.d.ts +17 -0
  21. package/lib/components/view-mode-buttons/view-mode-buttons.module.d.ts +2 -0
  22. package/package.json +1 -1
  23. package/public-api.d.ts +4 -0
  24. package/esm2015/lib/core/interface/filter-item-viewmodel.js +0 -2
  25. package/lib/core/interface/filter-item-viewmodel.d.ts +0 -7
@@ -11011,6 +11011,80 @@
11011
11011
  },] }
11012
11012
  ];
11013
11013
 
11014
+ // The different view modes for content, e.g. list, grid, ..
11015
+ exports.ContentViewMode = void 0;
11016
+ (function (ContentViewMode) {
11017
+ ContentViewMode[ContentViewMode["List"] = 0] = "List";
11018
+ ContentViewMode[ContentViewMode["Grid"] = 1] = "Grid";
11019
+ ContentViewMode[ContentViewMode["GridExpanded"] = 2] = "GridExpanded";
11020
+ ContentViewMode[ContentViewMode["MasterDetail"] = 3] = "MasterDetail";
11021
+ ContentViewMode[ContentViewMode["Timeline"] = 4] = "Timeline";
11022
+ ContentViewMode[ContentViewMode["Tiles"] = 5] = "Tiles";
11023
+ })(exports.ContentViewMode || (exports.ContentViewMode = {}));
11024
+
11025
+ var ViewModeButtonsComponent = /** @class */ (function () {
11026
+ function ViewModeButtonsComponent(iconCacheService) {
11027
+ this.iconCacheService = iconCacheService;
11028
+ this.icons = exports.CoreComponentsIcon;
11029
+ this.viewModes = exports.ContentViewMode;
11030
+ this.showViewModes = [this.viewModes.List, this.viewModes.Grid, this.viewModes.Tiles];
11031
+ this.viewModeChange = new i0.EventEmitter();
11032
+ }
11033
+ ViewModeButtonsComponent.prototype.showClass = function () {
11034
+ return true;
11035
+ };
11036
+ Object.defineProperty(ViewModeButtonsComponent.prototype, "activeViewMode", {
11037
+ get: function () {
11038
+ return this._activeViewMode;
11039
+ },
11040
+ set: function (value) {
11041
+ this._activeViewMode = value;
11042
+ this.viewModeChange.emit(this._activeViewMode);
11043
+ },
11044
+ enumerable: false,
11045
+ configurable: true
11046
+ });
11047
+ ViewModeButtonsComponent.prototype.ngOnInit = function () {
11048
+ this.activeViewMode = this.showViewModes.includes(exports.ContentViewMode.List) ? exports.ContentViewMode.List : this.showViewModes[0];
11049
+ };
11050
+ return ViewModeButtonsComponent;
11051
+ }());
11052
+ ViewModeButtonsComponent.decorators = [
11053
+ { type: i0.Component, args: [{
11054
+ selector: 'co-view-mode-buttons',
11055
+ template: "\n <co-button class=\"view-button white\"\n *ngIf=\"showViewModes.includes(viewModes.Tiles)\"\n [class.selected]=\"this.activeViewMode === viewModes.Tiles\"\n [iconData]=\"iconCacheService.getIcon(icons.ListView)\"\n [title]=\"'TILE_VIEW'\"\n (click)=\"this.activeViewMode = viewModes.Tiles\"></co-button>\n <co-button class=\"view-button white\"\n *ngIf=\"showViewModes.includes(viewModes.List)\"\n [class.selected]=\"this.activeViewMode === viewModes.List\"\n [iconData]=\"iconCacheService.getIcon(icons.ThickLines)\"\n [title]=\"'LIST_VIEW'\"\n (click)=\"this.activeViewMode = viewModes.List\"></co-button>\n <co-button class=\"view-button white\"\n *ngIf=\"showViewModes.includes(viewModes.Grid)\"\n [class.selected]=\"this.activeViewMode === viewModes.Grid\"\n [iconData]=\"iconCacheService.getIcon(icons.ThinLines)\"\n [title]=\"'GRID_VIEW'\"\n (click)=\"this.activeViewMode = viewModes.Grid\"></co-button>\n ",
11056
+ encapsulation: i0.ViewEncapsulation.None
11057
+ },] }
11058
+ ];
11059
+ ViewModeButtonsComponent.ctorParameters = function () { return [
11060
+ { type: IconCacheService }
11061
+ ]; };
11062
+ ViewModeButtonsComponent.propDecorators = {
11063
+ showViewModes: [{ type: i0.Input }],
11064
+ viewModeChange: [{ type: i0.Output }],
11065
+ showClass: [{ type: i0.HostBinding, args: ["class.co-view-mode-buttons",] }]
11066
+ };
11067
+
11068
+ var ViewModeButtonsModule = /** @class */ (function () {
11069
+ function ViewModeButtonsModule() {
11070
+ }
11071
+ return ViewModeButtonsModule;
11072
+ }());
11073
+ ViewModeButtonsModule.decorators = [
11074
+ { type: i0.NgModule, args: [{
11075
+ imports: [
11076
+ common.CommonModule,
11077
+ ButtonModule,
11078
+ ],
11079
+ declarations: [
11080
+ ViewModeButtonsComponent
11081
+ ],
11082
+ exports: [
11083
+ ViewModeButtonsComponent
11084
+ ]
11085
+ },] }
11086
+ ];
11087
+
11014
11088
  var FilterPipe = /** @class */ (function () {
11015
11089
  function FilterPipe() {
11016
11090
  }
@@ -11178,7 +11252,7 @@
11178
11252
  FilterItemComponent.decorators = [
11179
11253
  { type: i0.Component, args: [{
11180
11254
  selector: "co-filter-item",
11181
- 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 [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\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 ",
11255
+ 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\" (mousedown)=\"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 [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\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 ",
11182
11256
  encapsulation: i0.ViewEncapsulation.None
11183
11257
  },] }
11184
11258
  ];
@@ -11625,6 +11699,18 @@
11625
11699
  },] }
11626
11700
  ];
11627
11701
 
11702
+ var FilterItemViewmodel = /** @class */ (function () {
11703
+ function FilterItemViewmodel(code, description, checked, count, valueName) {
11704
+ this.checked = false;
11705
+ this.code = code;
11706
+ this.description = description === null || description === void 0 ? void 0 : description.toString();
11707
+ this.checked = checked;
11708
+ this.count = count;
11709
+ this.valueName = valueName;
11710
+ }
11711
+ return FilterItemViewmodel;
11712
+ }());
11713
+
11628
11714
  /*
11629
11715
  * Public API Surface of corecomponents
11630
11716
  */
@@ -11676,6 +11762,7 @@
11676
11762
  exports.DropDownModule = DropDownModule;
11677
11763
  exports.FilterItemComponent = FilterItemComponent;
11678
11764
  exports.FilterItemModule = FilterItemModule;
11765
+ exports.FilterItemViewmodel = FilterItemViewmodel;
11679
11766
  exports.FilterPipe = FilterPipe;
11680
11767
  exports.FilterPipeModule = FilterPipeModule;
11681
11768
  exports.FormComponent = FormComponent;
@@ -11737,6 +11824,8 @@
11737
11824
  exports.TextInputPopupComponent = TextInputPopupComponent;
11738
11825
  exports.TileComponent = TileComponent;
11739
11826
  exports.TileModule = TileModule;
11827
+ exports.ViewModeButtonsComponent = ViewModeButtonsComponent;
11828
+ exports.ViewModeButtonsModule = ViewModeButtonsModule;
11740
11829
  exports.showHideDialogAnimation = showHideDialogAnimation;
11741
11830
  exports["ɵa"] = RippleModule;
11742
11831
  exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;