@pepperi-addons/ngx-composite-lib 0.0.9-beta.1 → 0.0.10-beta.10
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/pepperi-addons-ngx-composite-lib-draggable-item.umd.js +10 -10
- package/bundles/pepperi-addons-ngx-composite-lib-draggable-item.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js +116 -0
- package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js.map +1 -0
- package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +17 -4
- package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib.umd.js +43 -0
- package/bundles/pepperi-addons-ngx-composite-lib.umd.js.map +1 -1
- package/core/common/index.d.ts +1 -0
- package/core/common/public-api.d.ts +1 -0
- package/core/common/services/index.d.ts +1 -0
- package/core/common/services/public-api.d.ts +1 -0
- package/core/common/services/utilities.service.d.ts +6 -0
- package/core/index.d.ts +1 -0
- package/core/public-api.d.ts +1 -0
- package/draggable-item/draggable-item.module.d.ts +4 -4
- package/esm2015/core/common/index.js +5 -0
- package/esm2015/core/common/public-api.js +5 -0
- package/esm2015/core/common/services/index.js +5 -0
- package/esm2015/core/common/services/public-api.js +5 -0
- package/esm2015/core/common/services/utilities.service.js +19 -0
- package/esm2015/core/index.js +5 -0
- package/esm2015/core/public-api.js +5 -0
- package/esm2015/draggable-item/draggable-item.component.js +1 -1
- package/esm2015/draggable-item/draggable-item.module.js +6 -6
- package/esm2015/file-status-panel/file-status-panel.component.js +31 -0
- package/esm2015/file-status-panel/file-status-panel.model.js +8 -0
- package/esm2015/file-status-panel/file-status-panel.module.js +41 -0
- package/esm2015/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.js +5 -0
- package/esm2015/file-status-panel/public-api.js +7 -0
- package/esm2015/generic-list/generic-list.component.js +16 -4
- package/esm2015/public-api.js +2 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-draggable-item.js +7 -7
- package/fesm2015/pepperi-addons-ngx-composite-lib-draggable-item.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js +88 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +15 -3
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib.js +43 -2
- package/fesm2015/pepperi-addons-ngx-composite-lib.js.map +1 -1
- package/file-status-panel/file-status-panel.component.d.ts +14 -0
- package/file-status-panel/file-status-panel.model.d.ts +6 -0
- package/file-status-panel/file-status-panel.module.d.ts +13 -0
- package/file-status-panel/package.json +13 -0
- package/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.d.ts +5 -0
- package/file-status-panel/public-api.d.ts +3 -0
- package/generic-list/generic-list.component.d.ts +6 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/core/style/abstracts/functions.scss +0 -0
- package/src/core/style/abstracts/mixins.scss +0 -0
- package/src/core/style/abstracts/variables.scss +1 -0
- package/src/core/style/base/helpers.scss +0 -0
- package/{styles.scss → src/core/style/components/general.scss} +1 -0
- package/styling.scss +14 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@ngx-translate/core';
|
|
6
|
+
import * as i2 from '@pepperi-addons/ngx-lib/button';
|
|
7
|
+
import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
|
|
8
|
+
import { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';
|
|
9
|
+
import { PepTopBarModule } from '@pepperi-addons/ngx-lib/top-bar';
|
|
10
|
+
import { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';
|
|
11
|
+
|
|
12
|
+
class FileStatusPanelComponent {
|
|
13
|
+
constructor(translate) {
|
|
14
|
+
this.translate = translate;
|
|
15
|
+
this.title = '';
|
|
16
|
+
this.filesList = [];
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
}
|
|
20
|
+
closeClick(event) {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
FileStatusPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: FileStatusPanelComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
FileStatusPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: FileStatusPanelComponent, selector: "pep-file-status-panel", inputs: { title: "title", filesList: "filesList" }, ngImport: i0, template: "<div *ngIf=\"filesList.length\" id=\"uploadPanelCont\">\n <div class=\"panel-header pep-border-bottom\">\n <label class=\"body-md ellipsis\">{{title}}</label>\n <pep-button\n styleType=\"weak\"\n styleStateType=\"system\"\n sizeType=\"xs\"\n classNames=\"roundCorners\"\n [disabled]=\"false\"\n iconName=\"system_close\"\n iconPosition=\"end\"\n [visible]=\"true\"\n (buttonClick)=\"closeClick($event)\">\n </pep-button>\n </div>\n <div class=\"panel-content\">\n <ul>\n <ng-container *ngFor=\"let file of filesList\">\n <li *ngIf=\"file?.status !== 'hidden'\">\n \n <span class=\"color-dimmed body-sm ellipsis\">{{file.name}}</span>\n <pep-button\n styleType=\"weak-invert\"\n styleStateType=\"system\"\n classNames=\"xxs-btn\"\n [disabled]=\"false\"\n iconName=\"arrow_right_alt\">\n </pep-button>\n <span class=\"body-sm\">{{file.status}}</span>\n \n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n", styles: ["#uploadPanelCont{position:absolute;bottom:10px;right:2.5rem;width:22rem;padding:1rem;min-height:7rem;background:white;border:1px solid #595959;box-shadow:0 0 16px #0000003d;border-radius:.25rem;z-index:9999}#uploadPanelCont .panel-header{display:flex;flex-direction:row;justify-content:space-between;height:2.5rem}#uploadPanelCont .panel-header ::ng-deep .roundCorners{border-radius:1.5rem}.panel-content{max-height:50vh;overflow:auto}.panel-content ul{list-style-type:none;padding:0}.panel-content ul li{height:1.25rem;margin-top:.5rem;display:flex;flex-direction:row}.panel-content ul li .done{color:green!important}.panel-content ul li ::ng-deep .xxs-btn{min-width:1rem!important;height:1.3rem}.panel-content ul li ::ng-deep .xxs-btn pep-icon{width:.75rem!important}\n"], components: [{ type: i2.PepButtonComponent, selector: "pep-button", inputs: ["styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconPosition", "visible", "key", "value", "iconName"], outputs: ["buttonClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: FileStatusPanelComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{
|
|
28
|
+
selector: 'pep-file-status-panel',
|
|
29
|
+
templateUrl: './file-status-panel.component.html',
|
|
30
|
+
styleUrls: ['./file-status-panel.component.scss']
|
|
31
|
+
}]
|
|
32
|
+
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { title: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}], filesList: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}] } });
|
|
37
|
+
|
|
38
|
+
class PepFileStatusPanelModule {
|
|
39
|
+
constructor() { }
|
|
40
|
+
}
|
|
41
|
+
PepFileStatusPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepFileStatusPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
42
|
+
PepFileStatusPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepFileStatusPanelModule, declarations: [FileStatusPanelComponent], imports: [CommonModule,
|
|
43
|
+
PepTopBarModule,
|
|
44
|
+
PepTextboxModule,
|
|
45
|
+
PepButtonModule,
|
|
46
|
+
PepDialogModule], exports: [FileStatusPanelComponent] });
|
|
47
|
+
PepFileStatusPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepFileStatusPanelModule, imports: [[
|
|
48
|
+
CommonModule,
|
|
49
|
+
PepTopBarModule,
|
|
50
|
+
PepTextboxModule,
|
|
51
|
+
PepButtonModule,
|
|
52
|
+
PepDialogModule,
|
|
53
|
+
]] });
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepFileStatusPanelModule, decorators: [{
|
|
55
|
+
type: NgModule,
|
|
56
|
+
args: [{
|
|
57
|
+
declarations: [
|
|
58
|
+
FileStatusPanelComponent
|
|
59
|
+
],
|
|
60
|
+
imports: [
|
|
61
|
+
CommonModule,
|
|
62
|
+
PepTopBarModule,
|
|
63
|
+
PepTextboxModule,
|
|
64
|
+
PepButtonModule,
|
|
65
|
+
PepDialogModule,
|
|
66
|
+
],
|
|
67
|
+
exports: [FileStatusPanelComponent]
|
|
68
|
+
}]
|
|
69
|
+
}], ctorParameters: function () { return []; } });
|
|
70
|
+
|
|
71
|
+
class IFile {
|
|
72
|
+
constructor() {
|
|
73
|
+
this.key = 0;
|
|
74
|
+
this.name = '';
|
|
75
|
+
this.status = 'uploading';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Public API Surface of ngx-composite-lib/file-status-panel
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Generated bundle index. Do not edit.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
export { FileStatusPanelComponent, IFile, PepFileStatusPanelModule };
|
|
88
|
+
//# sourceMappingURL=pepperi-addons-ngx-composite-lib-file-status-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-composite-lib-file-status-panel.js","sources":["../../../projects/ngx-composite-lib/file-status-panel/file-status-panel.component.ts","../../../projects/ngx-composite-lib/file-status-panel/file-status-panel.component.html","../../../projects/ngx-composite-lib/file-status-panel/file-status-panel.module.ts","../../../projects/ngx-composite-lib/file-status-panel/file-status-panel.model.ts","../../../projects/ngx-composite-lib/file-status-panel/public-api.ts","../../../projects/ngx-composite-lib/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.ts"],"sourcesContent":["import { Component, OnInit, Injectable, Input, Output, EventEmitter, Optional, Inject } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IFile } from './file-status-panel.model';\n\n@Component({\n selector: 'pep-file-status-panel',\n templateUrl: './file-status-panel.component.html',\n styleUrls: ['./file-status-panel.component.scss']\n})\n\nexport class FileStatusPanelComponent implements OnInit {\n \n @Input() title: string = '';\n @Input() filesList: Array<IFile> = [];\n \n constructor( public translate: TranslateService) {\n \n }\n ngOnInit(): void {\n \n }\n\n closeClick(event: any){\n\n }\n\n\n}","<div *ngIf=\"filesList.length\" id=\"uploadPanelCont\">\n <div class=\"panel-header pep-border-bottom\">\n <label class=\"body-md ellipsis\">{{title}}</label>\n <pep-button\n styleType=\"weak\"\n styleStateType=\"system\"\n sizeType=\"xs\"\n classNames=\"roundCorners\"\n [disabled]=\"false\"\n iconName=\"system_close\"\n iconPosition=\"end\"\n [visible]=\"true\"\n (buttonClick)=\"closeClick($event)\">\n </pep-button>\n </div>\n <div class=\"panel-content\">\n <ul>\n <ng-container *ngFor=\"let file of filesList\">\n <li *ngIf=\"file?.status !== 'hidden'\">\n \n <span class=\"color-dimmed body-sm ellipsis\">{{file.name}}</span>\n <pep-button\n styleType=\"weak-invert\"\n styleStateType=\"system\"\n classNames=\"xxs-btn\"\n [disabled]=\"false\"\n iconName=\"arrow_right_alt\">\n </pep-button>\n <span class=\"body-sm\">{{file.status}}</span>\n \n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PepFileService, PepAddonService, PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { FileStatusPanelComponent } from './file-status-panel.component';\nimport { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';\nimport { PepTopBarModule } from '@pepperi-addons/ngx-lib/top-bar';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\n\n\n@NgModule({\n declarations: [\n FileStatusPanelComponent\n ],\n imports: [\n CommonModule,\n PepTopBarModule,\n PepTextboxModule,\n PepButtonModule,\n PepDialogModule,\n ],\n exports: [FileStatusPanelComponent]\n})\n\nexport class PepFileStatusPanelModule { \n constructor() { }\n}","export type fileStatus = 'uploading' | 'downloading' | 'done' | 'failed' | 'hidden';\r\n\r\nexport class IFile {\r\n key: number = 0;\r\n name = '';\r\n status: fileStatus = 'uploading';\r\n}","/*\n * Public API Surface of ngx-composite-lib/file-status-panel\n */\nexport * from './file-status-panel.module';\nexport * from './file-status-panel.component';\nexport * from './file-status-panel.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAUa,wBAAwB;IAKjC,YAAoB,SAA2B;QAA3B,cAAS,GAAT,SAAS,CAAkB;QAHtC,UAAK,GAAW,EAAE,CAAC;QACnB,cAAS,GAAiB,EAAE,CAAC;KAIrC;IACD,QAAQ;KAEP;IAED,UAAU,CAAC,KAAU;KAEpB;;qHAdQ,wBAAwB;yGAAxB,wBAAwB,iHCVrC,wvCAmCA;2FDzBa,wBAAwB;kBANpC,SAAS;mBAAC;oBACP,QAAQ,EAAE,uBAAuB;oBACjC,WAAW,EAAE,oCAAoC;oBACjD,SAAS,EAAE,CAAC,oCAAoC,CAAC;iBACpD;uGAIY,KAAK;sBAAb,KAAK;gBACG,SAAS;sBAAjB,KAAK;;;MEWG,wBAAwB;IACjC,iBAAiB;;qHADR,wBAAwB;sHAAxB,wBAAwB,iBAZ7B,wBAAwB,aAGxB,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,eAAe;QACf,eAAe,aAET,wBAAwB;sHAGzB,wBAAwB,YAVxB;YACL,YAAY;YACZ,eAAe;YACf,gBAAgB;YAChB,eAAe;YACf,eAAe;SAClB;2FAIQ,wBAAwB;kBAdpC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,wBAAwB;qBAC3B;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,gBAAgB;wBAChB,eAAe;wBACf,eAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,wBAAwB,CAAC;iBACtC;;;MCpBY,KAAK;IAAlB;QACI,QAAG,GAAW,CAAC,CAAC;QAChB,SAAI,GAAG,EAAE,CAAC;QACV,WAAM,GAAe,WAAW,CAAC;KACpC;;;ACND;;;;ACAA;;;;;;"}
|
|
@@ -32,13 +32,17 @@ class GenericListComponent {
|
|
|
32
32
|
this.inline = false;
|
|
33
33
|
this.showSearch = false;
|
|
34
34
|
this.allowSelection = true;
|
|
35
|
-
this.
|
|
35
|
+
this.noDataFoundMsg = this.translate.instant('GENERIC_LIST.NO_DATA');
|
|
36
36
|
this.allowMultipleSelection = false;
|
|
37
|
+
this.firstFieldAsLink = false;
|
|
38
|
+
this.supportSorting = false;
|
|
39
|
+
this.showTopBar = true;
|
|
37
40
|
this.fieldClick = new EventEmitter();
|
|
38
41
|
// @Output()
|
|
39
42
|
// onAddClicked = new EventEmitter<void>();
|
|
40
43
|
this.menuHandlers = {};
|
|
41
44
|
this.menuActions = [];
|
|
45
|
+
this.hasRows = true;
|
|
42
46
|
this.layoutService.onResize$.pipe().subscribe((size) => {
|
|
43
47
|
// this.screenSize = size;
|
|
44
48
|
});
|
|
@@ -113,6 +117,7 @@ class GenericListComponent {
|
|
|
113
117
|
this.reload();
|
|
114
118
|
}
|
|
115
119
|
reload() {
|
|
120
|
+
var _a;
|
|
116
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
122
|
if (this.customList && this.dataSource) {
|
|
118
123
|
this.dataObjects = yield this.dataSource.getList({
|
|
@@ -128,6 +133,7 @@ class GenericListComponent {
|
|
|
128
133
|
this.customList.initListData(uiControl, data.length, data);
|
|
129
134
|
this.loadMenuItems();
|
|
130
135
|
}
|
|
136
|
+
this.hasRows = ((_a = this.dataObjects) === null || _a === void 0 ? void 0 : _a.length) > 0 ? true : false;
|
|
131
137
|
});
|
|
132
138
|
}
|
|
133
139
|
selectedRowsChanged(selectedRowsCount) {
|
|
@@ -138,7 +144,7 @@ class GenericListComponent {
|
|
|
138
144
|
}
|
|
139
145
|
}
|
|
140
146
|
GenericListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: GenericListComponent, deps: [{ token: i1.PepDataConvertorService }, { token: i1.PepLayoutService }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
-
GenericListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: GenericListComponent, selector: "pep-generic-list", inputs: { dataSource: "dataSource", addPadding: "addPadding", title: "title", inline: "inline", showSearch: "showSearch", allowSelection: "allowSelection",
|
|
147
|
+
GenericListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: GenericListComponent, selector: "pep-generic-list", inputs: { dataSource: "dataSource", addPadding: "addPadding", title: "title", inline: "inline", showSearch: "showSearch", allowSelection: "allowSelection", noDataFoundMsg: "noDataFoundMsg", allowMultipleSelection: "allowMultipleSelection", firstFieldAsLink: "firstFieldAsLink", supportSorting: "supportSorting", showTopBar: "showTopBar" }, outputs: { fieldClick: "fieldClick" }, viewQueries: [{ propertyName: "customList", first: true, predicate: PepListComponent, descendants: true }], ngImport: i0, template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n</div>\n\n<pep-page-layout *ngIf=\"!inline\" [addPadding]=\"addPadding\">\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n\n <div pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n \n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <pep-list-actions [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\" (actionClick)=\"onMenuItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"customList ? customList.totalRows : -1\"></pep-list-total>\n\n <pep-search *ngIf=\"showSearch\" [sizeType]=\"inline ? 'sm' : 'md'\" (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #listTemplate>\n <div #listContainer class=\"list-container\">\n \n <pep-list *ngIf=\"hasRows\" viewType=\"table\" [supportSorting]=\"supportSorting\"\n [selectionTypeForActions]=\"allowMultipleSelection ? 'multi' : (allowSelection ? 'single' : 'none')\" [noDataFoundMsg]=\"noDataFoundMsg\"\n (fieldClick)=\"onCustomizeFieldClick($event)\" [firstFieldAsLink]=\"firstFieldAsLink\"\n (selectedItemsChange)=\"selectedRowsChanged($event)\">\n </pep-list>\n <ng-container *ngIf=\"!hasRows\">\n <div class=\"noDataFoundMsg\">\n <h2>{{noDataFoundMsg}}</h2>\n </div>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:block}.main-area-container{display:grid;height:inherit}.list-container{height:100%}.inline-container{height:inherit;display:grid;grid-template-rows:auto 1fr}.inline-container.add-padding{padding-inline:var(--pep-spacing-lg, 1rem)}.inline-container ::ng-deep .pep-top-bar-container.inline{height:auto;overflow:hidden}.noDataFoundMsg{height:100%;width:100%;background:rgba(26,26,26,.12);display:flex;justify-content:center;align-items:center}\n"], components: [{ type: i3.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { type: i4.PepTopBarComponent, selector: "pep-top-bar", inputs: ["inline", "title"], outputs: ["footerStateChange"] }, { type: i5.PepListActionsComponent, selector: "pep-list-actions", inputs: ["actions", "sizeType", "xPosition", "hidden"], outputs: ["actionClick", "stateChange", "menuClick"] }, { type: i5.PepListTotalComponent, selector: "pep-list-total", inputs: ["totalRows", "totalAmount", "isMapView", "sizeType"] }, { type: i6.PepSearchComponent, selector: "pep-search", inputs: ["triggerOn", "autoCompleteTop", "shrinkInSmallScreen", "sizeType", "autoCompleteValues", "value", "searchControl", "useAsWebComponent"], outputs: ["search", "autocompleteChange", "stateChange"] }, { type: i5.PepListComponent, selector: "pep-list", inputs: ["noDataFoundMsg", "selectionTypeForActions", "showCardSelection", "hideAllSelectionInMulti", "cardSize", "firstFieldAsLink", "supportSorting", "supportResizing", "disabled", "lockItemInnerEvents", "printMode", "isReport", "totalsRow", "pagerType", "pageSize", "pageIndex", "scrollAnimationTime", "scrollDebounceTime", "scrollThrottlingTime", "viewType", "parentScroll", "lockEvents", "useAsWebComponent"], outputs: ["itemClick", "fieldClick", "valueChange", "sortingChange", "selectedItemsChange", "selectedItemChange", "selectAllClick", "listLoad", "loadItems", "loadPage", "startIndexChange"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
142
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: GenericListComponent, decorators: [{
|
|
143
149
|
type: Component,
|
|
144
150
|
args: [{
|
|
@@ -161,10 +167,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
|
|
|
161
167
|
type: Input
|
|
162
168
|
}], allowSelection: [{
|
|
163
169
|
type: Input
|
|
164
|
-
}],
|
|
170
|
+
}], noDataFoundMsg: [{
|
|
165
171
|
type: Input
|
|
166
172
|
}], allowMultipleSelection: [{
|
|
167
173
|
type: Input
|
|
174
|
+
}], firstFieldAsLink: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], supportSorting: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}], showTopBar: [{
|
|
179
|
+
type: Input
|
|
168
180
|
}], fieldClick: [{
|
|
169
181
|
type: Output
|
|
170
182
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-composite-lib-generic-list.js","sources":["../../../projects/ngx-composite-lib/generic-list/generic-list.component.ts","../../../projects/ngx-composite-lib/generic-list/generic-list.component.html","../../../projects/ngx-composite-lib/generic-list/generic-list.module.ts","../../../projects/ngx-composite-lib/generic-list/public-api.ts","../../../projects/ngx-composite-lib/generic-list/pepperi-addons-ngx-composite-lib-generic-list.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n AfterViewInit,\n ViewChild,\n Input,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepDataConvertorService,\n PepLayoutService,\n PepRowData,\n PepScreenSizeType,\n PepGuid,\n } from '@pepperi-addons/ngx-lib';\nimport { IPepFormFieldClickEvent } from '@pepperi-addons/ngx-lib/form';\nimport {\n PepListComponent\n} from '@pepperi-addons/ngx-lib/list';\nimport {\n PepMenuItem,\n IPepMenuItemClickEvent,\n} from '@pepperi-addons/ngx-lib/menu';\nimport { IPepSearchClickEvent } from '@pepperi-addons/ngx-lib/search';\n \nimport { GridDataViewField, DataViewFieldTypes, GridDataView } from '@pepperi-addons/papi-sdk/dist/entities/data-view';\nimport { GenericListDataSource } from './generic-list.model';\n\nimport * as tween from '@tweenjs/tween.js'\n\n@Component({\n selector: 'pep-generic-list',\n templateUrl: './generic-list.component.html',\n styleUrls: ['./generic-list.component.scss'],\n})\nexport class GenericListComponent implements OnInit, AfterViewInit {\n @ViewChild(PepListComponent) customList: PepListComponent | undefined;\n \n @Input()\n dataSource: GenericListDataSource | undefined;\n dataObjects: any[] = []\n \n searchString: string = '';\n \n @Input()\n addPadding: boolean = false;\n\n @Input()\n title: string = '';\n \n @Input()\n inline: boolean = false;\n \n @Input()\n showSearch: boolean = false;\n \n @Input()\n allowSelection: boolean = true;\n \n @Input()\n noDataMessage: string = \"No data\";\n \n @Input()\n allowMultipleSelection: boolean = false;\n \n @Output()\n fieldClick: EventEmitter<IPepFormFieldClickEvent> = new EventEmitter<IPepFormFieldClickEvent>();\n\n // @Output()\n // onAddClicked = new EventEmitter<void>();\n\n menuHandlers: { [key: string]: (obj: any) => Promise<void> } = {};\n menuActions: Array<PepMenuItem> = [];\n // PepScreenSizeType = PepScreenSizeType;\n // screenSize: PepScreenSizeType;\n \n constructor(\n private dataConvertorService: PepDataConvertorService,\n private layoutService: PepLayoutService,\n private translate: TranslateService\n ) {\n this.layoutService.onResize$.pipe().subscribe((size) => {\n // this.screenSize = size;\n });\n }\n \n private loadMenuItems(): void {\n if (this.allowSelection) {\n this.getMenuActions().then(x => this.menuActions = x);\n }\n }\n \n private convertToPepRowData(object: any, dataView: GridDataView) {\n const row = new PepRowData();\n row.Fields = [];\n\n if (dataView?.Fields && dataView.Columns) {\n for (let index = 0; index < dataView.Fields.length; index++) {\n let field = dataView.Fields[index] as GridDataViewField\n row.Fields.push({\n ApiName: field.FieldID,\n Title: this.translate.instant(field.Title),\n XAlignment: 1,\n FormattedValue: (object[field.FieldID] || '').toString(),\n Value: (object[field.FieldID] || '').toString(),\n ColumnWidth: dataView.Columns[index].Width,\n AdditionalValue: '',\n OptionalValues: [],\n FieldType: DataViewFieldTypes[field.Type],\n ReadOnly: field.ReadOnly,\n Enabled: !field.ReadOnly\n })\n }\n }\n return row;\n }\n \n private async getMenuActions(): Promise<PepMenuItem[]> {\n const actions = await this.dataSource?.getActions(this.getMenuObjects());\n const res: PepMenuItem[] = []\n this.menuHandlers = {};\n \n actions?.forEach(item => {\n const uuid = PepGuid.newGuid();\n this.menuHandlers[uuid] = item.handler;\n res.push({\n key: uuid,\n text: item.title\n })\n })\n \n return res;\n }\n \n private getMenuObjects() {\n let uuids = this.customList?.getSelectedItemsData().rows ?? [];\n if (this.customList?.getIsAllSelectedForActions()) {\n uuids = this.dataObjects.map(obj => obj.UID).filter(x => uuids.indexOf(x) != -1);\n }\n const objects = uuids.map(uuid => this.getObject(uuid))\n return objects;\n }\n \n private getObject(uuid: string) {\n return this.dataObjects.find(obj => obj.UID === uuid);\n }\n \n ngOnInit() {\n }\n \n ngAfterViewInit(): void {\n this.reload();\n }\n \n onMenuItemClicked(action: IPepMenuItemClickEvent): void {\n this.menuHandlers[action.source.key](this.getMenuObjects());\n }\n \n onSearchChanged(event: IPepSearchClickEvent) {\n this.searchString = event.value\n this.reload();\n }\n \n async reload() {\n if (this.customList && this.dataSource) {\n this.dataObjects = await this.dataSource.getList({\n searchString: this.searchString\n });\n const dataView = await this.dataSource.getDataView();\n const tableData = this.dataObjects.map(x => this.convertToPepRowData(x, dataView));\n const data = this.dataConvertorService.convertListData(tableData);\n data.forEach((obj, i) => {\n this.dataObjects[i].UID = obj.UID;\n })\n const uiControl = this.dataConvertorService.getUiControl(tableData[0]);\n this.customList.initListData(uiControl, data.length, data);\n \n this.loadMenuItems();\n }\n }\n\n selectedRowsChanged(selectedRowsCount: number) {\n this.loadMenuItems();\n }\n\n onCustomizeFieldClick(fieldClickEvent: IPepFormFieldClickEvent) {\n this.fieldClick.emit(fieldClickEvent);\n }\n \n}\n ","<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n</div>\n\n<pep-page-layout *ngIf=\"!inline\" [addPadding]=\"addPadding\">\n <ng-container pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n\n <div pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n \n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <pep-list-actions [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\" (actionClick)=\"onMenuItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"customList ? customList.totalRows : -1\"></pep-list-total>\n\n <pep-search *ngIf=\"showSearch\" [sizeType]=\"inline ? 'sm' : 'md'\" (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #listTemplate>\n <div #listContainer class=\"list-container\">\n <pep-list viewType=\"table\" [supportSorting]=\"false\"\n [selectionTypeForActions]=\"allowMultipleSelection ? 'multi' : (allowSelection ? 'single' : 'none')\" [noDataFoundMsg]=\"noDataMessage\"\n (fieldClick)=\"onCustomizeFieldClick($event)\"\n (selectedItemsChange)=\"selectedRowsChanged($event)\">\n </pep-list>\n </div>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GenericListComponent } from './generic-list.component';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepListModule } from '@pepperi-addons/ngx-lib/list';\nimport { PepFormModule } from '@pepperi-addons/ngx-lib/form';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport { PepPageLayoutModule } from '@pepperi-addons/ngx-lib/page-layout';\nimport { PepTopBarModule } from '@pepperi-addons/ngx-lib/top-bar';\nimport { PepSearchModule } from '@pepperi-addons/ngx-lib/search';\n\n@NgModule({\n declarations: [\n GenericListComponent\n ],\n imports: [\n CommonModule,\n PepNgxLibModule,\n PepListModule,\n PepFormModule,\n PepMenuModule,\n PepPageLayoutModule,\n PepTopBarModule,\n PepSearchModule\n ],\n exports: [GenericListComponent],\n})\nexport class PepGenericListModule { }\n","/*\n * Public API Surface of ngx-composite-lib/generic-list\n */\nexport * from './generic-list.module';\nexport * from './generic-list.component';\nexport * from './generic-list.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAqCa,oBAAoB;;;IAyC7B,YACY,oBAA6C,EAC7C,aAA+B,EAC/B,SAA2B;QAF3B,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,kBAAa,GAAb,aAAa,CAAkB;QAC/B,cAAS,GAAT,SAAS,CAAkB;QAvCvC,gBAAW,GAAU,EAAE,CAAA;QAEvB,iBAAY,GAAW,EAAE,CAAC;QAG1B,eAAU,GAAY,KAAK,CAAC;QAG5B,UAAK,GAAW,EAAE,CAAC;QAGnB,WAAM,GAAY,KAAK,CAAC;QAGxB,eAAU,GAAY,KAAK,CAAC;QAG5B,mBAAc,GAAY,IAAI,CAAC;QAG/B,kBAAa,GAAW,SAAS,CAAC;Q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kBAhBhC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,oBAAoB;qBACvB;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,mBAAmB;wBACnB,eAAe;wBACf,eAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;iBAClC;;;AC1BD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-composite-lib-generic-list.js","sources":["../../../projects/ngx-composite-lib/generic-list/generic-list.component.ts","../../../projects/ngx-composite-lib/generic-list/generic-list.component.html","../../../projects/ngx-composite-lib/generic-list/generic-list.module.ts","../../../projects/ngx-composite-lib/generic-list/public-api.ts","../../../projects/ngx-composite-lib/generic-list/pepperi-addons-ngx-composite-lib-generic-list.ts"],"sourcesContent":["import {\n Component,\n OnInit,\n AfterViewInit,\n ViewChild,\n Input,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n PepDataConvertorService,\n PepLayoutService,\n PepRowData,\n PepScreenSizeType,\n PepGuid,\n } from '@pepperi-addons/ngx-lib';\nimport { IPepFormFieldClickEvent } from '@pepperi-addons/ngx-lib/form';\nimport {\n PepListComponent\n} from '@pepperi-addons/ngx-lib/list';\nimport {\n PepMenuItem,\n IPepMenuItemClickEvent,\n} from '@pepperi-addons/ngx-lib/menu';\nimport { IPepSearchClickEvent } from '@pepperi-addons/ngx-lib/search';\n \nimport { GridDataViewField, DataViewFieldTypes, GridDataView } from '@pepperi-addons/papi-sdk/dist/entities/data-view';\nimport { GenericListDataSource } from './generic-list.model';\n\nimport * as tween from '@tweenjs/tween.js'\n\n@Component({\n selector: 'pep-generic-list',\n templateUrl: './generic-list.component.html',\n styleUrls: ['./generic-list.component.scss'],\n})\nexport class GenericListComponent implements OnInit, AfterViewInit {\n @ViewChild(PepListComponent) customList: PepListComponent | undefined;\n \n @Input()\n dataSource: GenericListDataSource | undefined;\n dataObjects: any[] = []\n \n searchString: string = '';\n \n @Input()\n addPadding: boolean = false;\n\n @Input()\n title: string = '';\n \n @Input()\n inline: boolean = false;\n \n @Input()\n showSearch: boolean = false;\n \n @Input()\n allowSelection: boolean = true;\n \n @Input()\n noDataFoundMsg: string = this.translate.instant('GENERIC_LIST.NO_DATA');\n \n @Input()\n allowMultipleSelection: boolean = false;\n \n @Input() \n firstFieldAsLink: boolean = false;\n\n @Input()\n supportSorting: boolean = false;\n\n @Input()\n showTopBar: boolean = true;\n\n @Output()\n fieldClick: EventEmitter<IPepFormFieldClickEvent> = new EventEmitter<IPepFormFieldClickEvent>();\n\n // @Output()\n // onAddClicked = new EventEmitter<void>();\n\n menuHandlers: { [key: string]: (obj: any) => Promise<void> } = {};\n menuActions: Array<PepMenuItem> = [];\n hasRows: boolean = true;\n // PepScreenSizeType = PepScreenSizeType;\n // screenSize: PepScreenSizeType;\n \n constructor(\n private dataConvertorService: PepDataConvertorService,\n private layoutService: PepLayoutService,\n private translate: TranslateService\n ) {\n this.layoutService.onResize$.pipe().subscribe((size) => {\n // this.screenSize = size;\n });\n }\n \n private loadMenuItems(): void {\n if (this.allowSelection) {\n this.getMenuActions().then(x => this.menuActions = x);\n }\n }\n \n private convertToPepRowData(object: any, dataView: GridDataView) {\n const row = new PepRowData();\n row.Fields = [];\n\n if (dataView?.Fields && dataView.Columns) {\n for (let index = 0; index < dataView.Fields.length; index++) {\n let field = dataView.Fields[index] as GridDataViewField\n row.Fields.push({\n ApiName: field.FieldID,\n Title: this.translate.instant(field.Title),\n XAlignment: 1,\n FormattedValue: (object[field.FieldID] || '').toString(),\n Value: (object[field.FieldID] || '').toString(),\n ColumnWidth: dataView.Columns[index].Width,\n AdditionalValue: '',\n OptionalValues: [],\n FieldType: DataViewFieldTypes[field.Type],\n ReadOnly: field.ReadOnly,\n Enabled: !field.ReadOnly\n })\n }\n }\n return row;\n }\n \n private async getMenuActions(): Promise<PepMenuItem[]> {\n const actions = await this.dataSource?.getActions(this.getMenuObjects());\n const res: PepMenuItem[] = []\n this.menuHandlers = {};\n \n actions?.forEach(item => {\n const uuid = PepGuid.newGuid();\n this.menuHandlers[uuid] = item.handler;\n res.push({\n key: uuid,\n text: item.title\n })\n })\n \n return res;\n }\n \n private getMenuObjects() {\n let uuids = this.customList?.getSelectedItemsData().rows ?? [];\n if (this.customList?.getIsAllSelectedForActions()) {\n uuids = this.dataObjects.map(obj => obj.UID).filter(x => uuids.indexOf(x) != -1);\n }\n const objects = uuids.map(uuid => this.getObject(uuid))\n return objects;\n }\n \n private getObject(uuid: string) {\n return this.dataObjects.find(obj => obj.UID === uuid);\n }\n \n ngOnInit() {\n }\n \n ngAfterViewInit(): void {\n this.reload();\n }\n \n onMenuItemClicked(action: IPepMenuItemClickEvent): void {\n this.menuHandlers[action.source.key](this.getMenuObjects());\n }\n \n onSearchChanged(event: IPepSearchClickEvent) {\n this.searchString = event.value\n this.reload();\n }\n \n async reload() {\n if (this.customList && this.dataSource) {\n this.dataObjects = await this.dataSource.getList({\n searchString: this.searchString\n });\n const dataView = await this.dataSource.getDataView();\n const tableData = this.dataObjects.map(x => this.convertToPepRowData(x, dataView));\n const data = this.dataConvertorService.convertListData(tableData);\n data.forEach((obj, i) => {\n this.dataObjects[i].UID = obj.UID;\n })\n const uiControl = this.dataConvertorService.getUiControl(tableData[0]);\n this.customList.initListData(uiControl, data.length, data);\n \n this.loadMenuItems();\n }\n this.hasRows = this.dataObjects?.length > 0 ? true : false;\n }\n\n selectedRowsChanged(selectedRowsCount: number) {\n this.loadMenuItems();\n }\n\n onCustomizeFieldClick(fieldClickEvent: IPepFormFieldClickEvent) {\n this.fieldClick.emit(fieldClickEvent);\n }\n \n}\n ","<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n</div>\n\n<pep-page-layout *ngIf=\"!inline\" [addPadding]=\"addPadding\">\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n\n <div pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n \n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <pep-list-actions [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\" (actionClick)=\"onMenuItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"customList ? customList.totalRows : -1\"></pep-list-total>\n\n <pep-search *ngIf=\"showSearch\" [sizeType]=\"inline ? 'sm' : 'md'\" (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #listTemplate>\n <div #listContainer class=\"list-container\">\n \n <pep-list *ngIf=\"hasRows\" viewType=\"table\" [supportSorting]=\"supportSorting\"\n [selectionTypeForActions]=\"allowMultipleSelection ? 'multi' : (allowSelection ? 'single' : 'none')\" [noDataFoundMsg]=\"noDataFoundMsg\"\n (fieldClick)=\"onCustomizeFieldClick($event)\" [firstFieldAsLink]=\"firstFieldAsLink\"\n (selectedItemsChange)=\"selectedRowsChanged($event)\">\n </pep-list>\n <ng-container *ngIf=\"!hasRows\">\n <div class=\"noDataFoundMsg\">\n <h2>{{noDataFoundMsg}}</h2>\n </div>\n </ng-container>\n </div>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GenericListComponent } from './generic-list.component';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepListModule } from '@pepperi-addons/ngx-lib/list';\nimport { PepFormModule } from '@pepperi-addons/ngx-lib/form';\nimport { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';\nimport { PepPageLayoutModule } from '@pepperi-addons/ngx-lib/page-layout';\nimport { PepTopBarModule } from '@pepperi-addons/ngx-lib/top-bar';\nimport { PepSearchModule } from '@pepperi-addons/ngx-lib/search';\n\n@NgModule({\n declarations: [\n GenericListComponent\n ],\n imports: [\n CommonModule,\n PepNgxLibModule,\n PepListModule,\n PepFormModule,\n PepMenuModule,\n PepPageLayoutModule,\n PepTopBarModule,\n PepSearchModule\n ],\n exports: [GenericListComponent],\n})\nexport class PepGenericListModule { }\n","/*\n * Public API Surface of ngx-composite-lib/generic-list\n */\nexport * from './generic-list.module';\nexport * from './generic-list.component';\nexport * from './generic-list.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAqCa,oBAAoB;;;IAmD7B,YACY,oBAA6C,EAC7C,aAA+B,EAC/B,SAA2B;QAF3B,yBAAoB,GAApB,oBAAoB,CAAyB;QAC7C,kBAAa,GAAb,aAAa,CAAkB;QAC/B,cAAS,GAAT,SAAS,CAAkB;QAjDvC,gBAAW,GAAU,EAAE,CAAA;QAEvB,iBAAY,GAAW,EAAE,CAAC;QAG1B,eAAU,GAAY,KAAK,CAAC;QAG5B,UAAK,GAAW,EAAE,CAAC;QAGnB,WAAM,GAAY,KAAK,CAAC;QAGxB,eAAU,GAAY,KAAK,CAAC;QAG5B,mBAAc,GAAY,IAAI,CAAC;QAG/B,mBAAc,GAAW,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAGxE,2BAAsB,GAAY,KAAK,CAAC;QAGxC,qBAAgB,GAAY,KAAK,CAAC;QAGlC,mBAAc,GAAY,KAAK,CAAC;QAGhC,eAAU,GAAY,IAAI,CAAC;QAG3B,eAAU,GAA0C,IAAI,YAAY,EAA2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e,aAET,oBAAoB;kHAErB,oBAAoB,YAZpB;YACL,YAAY;YACZ,eAAe;YACf,aAAa;YACb,aAAa;YACb,aAAa;YACb,mBAAmB;YACnB,eAAe;YACf,eAAe;SAClB;2FAGQ,oBAAoB;kBAhBhC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,oBAAoB;qBACvB;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,mBAAmB;wBACnB,eAAe;wBACf,eAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;iBAClC;;;AC1BD;;;;ACAA;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
2
|
+
import { NgModule, Injectable } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
// import { TranslateModule } from '@ngx-translate/core';
|
|
5
5
|
// import { CommonModule } from '@angular/common';
|
|
@@ -25,6 +25,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
|
|
|
25
25
|
}]
|
|
26
26
|
}] });
|
|
27
27
|
|
|
28
|
+
/*
|
|
29
|
+
This service is for utillity usege.
|
|
30
|
+
*/
|
|
31
|
+
class PepCompositeLibUtilitiesService {
|
|
32
|
+
constructor() {
|
|
33
|
+
//
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
PepCompositeLibUtilitiesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
37
|
+
PepCompositeLibUtilitiesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, providedIn: 'root' });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepCompositeLibUtilitiesService, decorators: [{
|
|
39
|
+
type: Injectable,
|
|
40
|
+
args: [{
|
|
41
|
+
providedIn: 'root',
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: function () { return []; } });
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* Public API Surface of ngx-composite-lib/core/common/services
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* export from ngx-composite-lib/core/common/services
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* Public API Surface of ngx-composite-lib/core/common
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* export from ngx-composite-lib/core/common
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
* Public API Surface of ngx-composite-lib/core
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* export from ngx-composite-lib/core
|
|
67
|
+
*/
|
|
68
|
+
|
|
28
69
|
/*
|
|
29
70
|
* Public API Surface of ngx-composite-lib
|
|
30
71
|
*/
|
|
@@ -33,5 +74,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
|
|
|
33
74
|
* Generated bundle index. Do not edit.
|
|
34
75
|
*/
|
|
35
76
|
|
|
36
|
-
export { PepNgxCompositeLibModule };
|
|
77
|
+
export { PepCompositeLibUtilitiesService, PepNgxCompositeLibModule };
|
|
37
78
|
//# sourceMappingURL=pepperi-addons-ngx-composite-lib.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-composite-lib.js","sources":["../../../projects/ngx-composite-lib/src/ngx-composite-lib.module.ts","../../../projects/ngx-composite-lib/src/public-api.ts","../../../projects/ngx-composite-lib/src/pepperi-addons-ngx-composite-lib.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n// import { TranslateModule } from '@ngx-translate/core';\n// import { CommonModule } from '@angular/common';\n// import { HttpClientModule } from '@angular/common/http';\n// import { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n \n ],\n imports: [\n // CommonModule, HttpClientModule, ReactiveFormsModule\n ],\n exports: [\n // TranslateModule\n ]\n})\nexport class PepNgxCompositeLibModule { }\n","/*\n * Public API Surface of ngx-composite-lib\n */\nexport * from './ngx-composite-lib.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AACA;AACA;AACA;AACA;MAaa,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB;sHAAxB,wBAAwB,YAPxB;;SAER;2FAKQ,wBAAwB;kBAXpC,QAAQ;mBAAC;oBACN,YAAY,EAAE,EAEb;oBACD,OAAO,EAAE;;qBAER;oBACD,OAAO,EAAE;;qBAER;iBACJ;;;
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-composite-lib.js","sources":["../../../projects/ngx-composite-lib/src/ngx-composite-lib.module.ts","../../../projects/ngx-composite-lib/src/core/common/services/utilities.service.ts","../../../projects/ngx-composite-lib/src/core/common/services/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/services/index.ts","../../../projects/ngx-composite-lib/src/core/common/public-api.ts","../../../projects/ngx-composite-lib/src/core/common/index.ts","../../../projects/ngx-composite-lib/src/core/public-api.ts","../../../projects/ngx-composite-lib/src/core/index.ts","../../../projects/ngx-composite-lib/src/public-api.ts","../../../projects/ngx-composite-lib/src/pepperi-addons-ngx-composite-lib.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n// import { TranslateModule } from '@ngx-translate/core';\n// import { CommonModule } from '@angular/common';\n// import { HttpClientModule } from '@angular/common/http';\n// import { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n \n ],\n imports: [\n // CommonModule, HttpClientModule, ReactiveFormsModule\n ],\n exports: [\n // TranslateModule\n ]\n})\nexport class PepNgxCompositeLibModule { }\n","import { Injectable } from '@angular/core';\r\n\r\n/*\r\n This service is for utillity usege.\r\n*/\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class PepCompositeLibUtilitiesService {\r\n constructor(\r\n // private sessionService: PepSessionService,\r\n // private httpService: PepHttpService,\r\n // private loaderService: PepLoaderService\r\n ) {\r\n //\r\n }\r\n}\r\n","/*\n * Public API Surface of ngx-composite-lib/core/common/services\n */\nexport * from './utilities.service';\n","/*\n * export from ngx-composite-lib/core/common/services\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core/common\n */\nexport * from './services/index';\n","/*\n * export from ngx-composite-lib/core/common\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib/core\n */\nexport * from './common/index';","/*\n * export from ngx-composite-lib/core\n */\nexport * from './public-api';\n","/*\n * Public API Surface of ngx-composite-lib\n */\nexport * from './ngx-composite-lib.module';\nexport * from './core/index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AACA;AACA;AACA;AACA;MAaa,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB;sHAAxB,wBAAwB,YAPxB;;SAER;2FAKQ,wBAAwB;kBAXpC,QAAQ;mBAAC;oBACN,YAAY,EAAE,EAEb;oBACD,OAAO,EAAE;;qBAER;oBACD,OAAO,EAAE;;qBAER;iBACJ;;;ACdD;;;MAMa,+BAA+B;IACxC;;KAMC;;4HAPQ,+BAA+B;gIAA/B,+BAA+B,cAF5B,MAAM;2FAET,+BAA+B;kBAH3C,UAAU;mBAAC;oBACR,UAAU,EAAE,MAAM;iBACrB;;;ACPD;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
+
import { IFile } from './file-status-panel.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FileStatusPanelComponent implements OnInit {
|
|
6
|
+
translate: TranslateService;
|
|
7
|
+
title: string;
|
|
8
|
+
filesList: Array<IFile>;
|
|
9
|
+
constructor(translate: TranslateService);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
closeClick(event: any): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileStatusPanelComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileStatusPanelComponent, "pep-file-status-panel", never, { "title": "title"; "filesList": "filesList"; }, {}, never, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./file-status-panel.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@pepperi-addons/ngx-lib/top-bar";
|
|
5
|
+
import * as i4 from "@pepperi-addons/ngx-lib/textbox";
|
|
6
|
+
import * as i5 from "@pepperi-addons/ngx-lib/button";
|
|
7
|
+
import * as i6 from "@pepperi-addons/ngx-lib/dialog";
|
|
8
|
+
export declare class PepFileStatusPanelModule {
|
|
9
|
+
constructor();
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PepFileStatusPanelModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PepFileStatusPanelModule, [typeof i1.FileStatusPanelComponent], [typeof i2.CommonModule, typeof i3.PepTopBarModule, typeof i4.PepTextboxModule, typeof i5.PepButtonModule, typeof i6.PepDialogModule], [typeof i1.FileStatusPanelComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PepFileStatusPanelModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"peerDependencies": {
|
|
3
|
+
"@pepperi-addons/ngx-lib": "^0.2.56"
|
|
4
|
+
},
|
|
5
|
+
"main": "../bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js",
|
|
6
|
+
"module": "../fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js",
|
|
7
|
+
"es2015": "../fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js",
|
|
8
|
+
"esm2015": "../esm2015/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.js",
|
|
9
|
+
"fesm2015": "../fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js",
|
|
10
|
+
"typings": "pepperi-addons-ngx-composite-lib-file-status-panel.d.ts",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"name": "@pepperi-addons/ngx-composite-lib/file-status-panel"
|
|
13
|
+
}
|
|
@@ -20,13 +20,17 @@ export declare class GenericListComponent implements OnInit, AfterViewInit {
|
|
|
20
20
|
inline: boolean;
|
|
21
21
|
showSearch: boolean;
|
|
22
22
|
allowSelection: boolean;
|
|
23
|
-
|
|
23
|
+
noDataFoundMsg: string;
|
|
24
24
|
allowMultipleSelection: boolean;
|
|
25
|
+
firstFieldAsLink: boolean;
|
|
26
|
+
supportSorting: boolean;
|
|
27
|
+
showTopBar: boolean;
|
|
25
28
|
fieldClick: EventEmitter<IPepFormFieldClickEvent>;
|
|
26
29
|
menuHandlers: {
|
|
27
30
|
[key: string]: (obj: any) => Promise<void>;
|
|
28
31
|
};
|
|
29
32
|
menuActions: Array<PepMenuItem>;
|
|
33
|
+
hasRows: boolean;
|
|
30
34
|
constructor(dataConvertorService: PepDataConvertorService, layoutService: PepLayoutService, translate: TranslateService);
|
|
31
35
|
private loadMenuItems;
|
|
32
36
|
private convertToPepRowData;
|
|
@@ -41,5 +45,5 @@ export declare class GenericListComponent implements OnInit, AfterViewInit {
|
|
|
41
45
|
selectedRowsChanged(selectedRowsCount: number): void;
|
|
42
46
|
onCustomizeFieldClick(fieldClickEvent: IPepFormFieldClickEvent): void;
|
|
43
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericListComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GenericListComponent, "pep-generic-list", never, { "dataSource": "dataSource"; "addPadding": "addPadding"; "title": "title"; "inline": "inline"; "showSearch": "showSearch"; "allowSelection": "allowSelection"; "
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenericListComponent, "pep-generic-list", never, { "dataSource": "dataSource"; "addPadding": "addPadding"; "title": "title"; "inline": "inline"; "showSearch": "showSearch"; "allowSelection": "allowSelection"; "noDataFoundMsg": "noDataFoundMsg"; "allowMultipleSelection": "allowMultipleSelection"; "firstFieldAsLink": "firstFieldAsLink"; "supportSorting": "supportSorting"; "showTopBar": "showTopBar"; }, { "fieldClick": "fieldClick"; }, never, ["[left-buttons]", "[right-buttons]"]>;
|
|
45
49
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$draggable-item-height: 2.5rem;
|
|
File without changes
|
package/styling.scss
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// 1. Add ngx-lib styles
|
|
2
|
+
@import '~@pepperi-addons/ngx-lib/theming';
|
|
3
|
+
// @include pepperi-theme();
|
|
4
|
+
|
|
5
|
+
// 2. Configuration and helpers
|
|
6
|
+
@import './src/core/style/abstracts/functions',
|
|
7
|
+
'./src/core/style/abstracts/variables',
|
|
8
|
+
'./src/core/style/abstracts/mixins';
|
|
9
|
+
|
|
10
|
+
// 3. Base stuff
|
|
11
|
+
@import './src/core/style/base/helpers';
|
|
12
|
+
|
|
13
|
+
// 4. Components
|
|
14
|
+
@import './src/core/style/components/general';
|