@colijnit/corecomponents_v12 12.0.90 → 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.
- package/bundles/colijnit-corecomponents_v12.umd.js +93 -2
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12-12.0.92.tgz +0 -0
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/filter-item/filter-item-viewmodel.js +11 -0
- package/esm2015/lib/components/filter-item/filter-item.component.js +2 -2
- package/esm2015/lib/components/simple-grid/base-simple-grid.component.js +3 -1
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +2 -2
- package/esm2015/lib/components/view-mode-buttons/content-view-mode.enum.js +11 -0
- package/esm2015/lib/components/view-mode-buttons/view-mode-buttons.component.js +61 -0
- package/esm2015/lib/components/view-mode-buttons/view-mode-buttons.module.js +21 -0
- package/esm2015/public-api.js +5 -1
- package/fesm2015/colijnit-corecomponents_v12.js +101 -3
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/filter-item/filter-item-viewmodel.d.ts +8 -0
- package/lib/components/filter-item/filter-item.component.d.ts +1 -1
- package/lib/components/simple-grid/base-simple-grid.component.d.ts +1 -0
- package/lib/components/view-mode-buttons/content-view-mode.enum.d.ts +8 -0
- package/lib/components/view-mode-buttons/style/_layout.scss +24 -0
- package/lib/components/view-mode-buttons/style/_material-definition.scss +6 -0
- package/lib/components/view-mode-buttons/style/_theme.scss +20 -0
- package/lib/components/view-mode-buttons/style/material.scss +3 -0
- package/lib/components/view-mode-buttons/view-mode-buttons.component.d.ts +17 -0
- package/lib/components/view-mode-buttons/view-mode-buttons.module.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/esm2015/lib/core/interface/filter-item-viewmodel.js +0 -2
- package/lib/core/interface/filter-item-viewmodel.d.ts +0 -7
|
@@ -9753,6 +9753,7 @@
|
|
|
9753
9753
|
this.dragDropEnabled = false;
|
|
9754
9754
|
this.resizable = false;
|
|
9755
9755
|
this.inlineEdit = false;
|
|
9756
|
+
this.showEdit = false;
|
|
9756
9757
|
this.showToolbar = false;
|
|
9757
9758
|
this.autoAddRow = false;
|
|
9758
9759
|
/**
|
|
@@ -9898,6 +9899,7 @@
|
|
|
9898
9899
|
dragDropEnabled: [{ type: i0.Input }],
|
|
9899
9900
|
resizable: [{ type: i0.Input }],
|
|
9900
9901
|
inlineEdit: [{ type: i0.Input }],
|
|
9902
|
+
showEdit: [{ type: i0.Input }],
|
|
9901
9903
|
showToolbar: [{ type: i0.Input }],
|
|
9902
9904
|
autoAddRow: [{ type: i0.Input }],
|
|
9903
9905
|
emitDragDrop: [{ type: i0.Input }],
|
|
@@ -10215,7 +10217,7 @@
|
|
|
10215
10217
|
SimpleGridComponent.decorators = [
|
|
10216
10218
|
{ type: i0.Component, args: [{
|
|
10217
10219
|
selector: 'co-simple-grid',
|
|
10218
|
-
template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"
|
|
10220
|
+
template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"showEdit\"\n [showAdd]=\"showAdd\"\n [showDelete]=\"showDelete\"\n [deleteEnabled]=\"selectedRowIndex > -1\"\n (addClick)=\"addNewRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n (deleteClick)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; let index = index\"\n [class.simple-grid-column-auto-fit]=\"column.autoFit\"\n [style.width.px]=\"column.width\"\n [style.min-width.px]=\"MIN_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\"\n [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 (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; 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 <co-pagination-bar *ngIf=\"data?.length > rowsPerPage\" class=\"pagination-bar\"\n [itemsPerPage]=\"rowsPerPage\"\n [currentPage]=\"currentPage\"\n [totalItems]=\"data.length\"\n [autoHide]=\"true\"\n (previousClick)=\"goToPreviousPage()\"\n (nextClick)=\"goToNextPage()\"\n (pageClick)=\"setCurrentPage($event)\"\n ></co-pagination-bar>\n ",
|
|
10219
10221
|
providers: [
|
|
10220
10222
|
FormMasterService
|
|
10221
10223
|
],
|
|
@@ -11009,6 +11011,80 @@
|
|
|
11009
11011
|
},] }
|
|
11010
11012
|
];
|
|
11011
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
|
+
|
|
11012
11088
|
var FilterPipe = /** @class */ (function () {
|
|
11013
11089
|
function FilterPipe() {
|
|
11014
11090
|
}
|
|
@@ -11176,7 +11252,7 @@
|
|
|
11176
11252
|
FilterItemComponent.decorators = [
|
|
11177
11253
|
{ type: i0.Component, args: [{
|
|
11178
11254
|
selector: "co-filter-item",
|
|
11179
|
-
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\" (
|
|
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 ",
|
|
11180
11256
|
encapsulation: i0.ViewEncapsulation.None
|
|
11181
11257
|
},] }
|
|
11182
11258
|
];
|
|
@@ -11623,6 +11699,18 @@
|
|
|
11623
11699
|
},] }
|
|
11624
11700
|
];
|
|
11625
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
|
+
|
|
11626
11714
|
/*
|
|
11627
11715
|
* Public API Surface of corecomponents
|
|
11628
11716
|
*/
|
|
@@ -11674,6 +11762,7 @@
|
|
|
11674
11762
|
exports.DropDownModule = DropDownModule;
|
|
11675
11763
|
exports.FilterItemComponent = FilterItemComponent;
|
|
11676
11764
|
exports.FilterItemModule = FilterItemModule;
|
|
11765
|
+
exports.FilterItemViewmodel = FilterItemViewmodel;
|
|
11677
11766
|
exports.FilterPipe = FilterPipe;
|
|
11678
11767
|
exports.FilterPipeModule = FilterPipeModule;
|
|
11679
11768
|
exports.FormComponent = FormComponent;
|
|
@@ -11735,6 +11824,8 @@
|
|
|
11735
11824
|
exports.TextInputPopupComponent = TextInputPopupComponent;
|
|
11736
11825
|
exports.TileComponent = TileComponent;
|
|
11737
11826
|
exports.TileModule = TileModule;
|
|
11827
|
+
exports.ViewModeButtonsComponent = ViewModeButtonsComponent;
|
|
11828
|
+
exports.ViewModeButtonsModule = ViewModeButtonsModule;
|
|
11738
11829
|
exports.showHideDialogAnimation = showHideDialogAnimation;
|
|
11739
11830
|
exports["ɵa"] = RippleModule;
|
|
11740
11831
|
exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
|