@pepperi-addons/ngx-composite-lib 0.0.8 → 0.0.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 +112 -0
- package/bundles/pepperi-addons-ngx-composite-lib-draggable-item.umd.js.map +1 -0
- package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +219 -0
- package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js.map +1 -0
- package/draggable-item/draggable-item.component.d.ts +11 -0
- package/draggable-item/draggable-item.module.d.ts +11 -0
- package/draggable-item/package.json +13 -0
- package/draggable-item/pepperi-addons-ngx-composite-lib-draggable-item.d.ts +5 -0
- package/draggable-item/public-api.d.ts +2 -0
- package/esm2015/draggable-item/draggable-item.component.js +40 -0
- package/esm2015/draggable-item/draggable-item.module.js +36 -0
- package/esm2015/draggable-item/pepperi-addons-ngx-composite-lib-draggable-item.js +5 -0
- package/esm2015/draggable-item/public-api.js +6 -0
- package/esm2015/generic-list/generic-list.component.js +2 -2
- package/esm2015/group-buttons-settings/group-buttons-settings.component.js +132 -0
- package/esm2015/group-buttons-settings/group-buttons-settings.model.js +2 -0
- package/esm2015/group-buttons-settings/group-buttons-settings.module.js +47 -0
- package/esm2015/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +5 -0
- package/esm2015/group-buttons-settings/public-api.js +7 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-draggable-item.js +84 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-draggable-item.js.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +187 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js.map +1 -0
- package/group-buttons-settings/group-buttons-settings.component.d.ts +32 -0
- package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -0
- package/group-buttons-settings/group-buttons-settings.module.d.ts +14 -0
- package/group-buttons-settings/package.json +13 -0
- package/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.d.ts +5 -0
- package/group-buttons-settings/public-api.d.ts +3 -0
- package/package.json +1 -1
- package/src/assets/i18n/en.ngx-composite-lib.json +24 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, HostBinding, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { PepNgxLibModule } from '@pepperi-addons/ngx-lib';
|
|
6
|
+
import * as i1 from '@pepperi-addons/ngx-lib/button';
|
|
7
|
+
import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
|
|
8
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
9
|
+
|
|
10
|
+
class DraggableItemComponent {
|
|
11
|
+
// private _isDraggable = false;
|
|
12
|
+
// @Input()
|
|
13
|
+
// set isDraggable(value: boolean) {
|
|
14
|
+
// this._isDraggable = value;
|
|
15
|
+
// this._cursor = value ? 'move' : 'inherit'
|
|
16
|
+
// }
|
|
17
|
+
// get isDraggable(): boolean {
|
|
18
|
+
// return this._isDraggable;
|
|
19
|
+
// }
|
|
20
|
+
constructor() {
|
|
21
|
+
this._cursor = 'move';
|
|
22
|
+
this.title = '';
|
|
23
|
+
this.disabled = false;
|
|
24
|
+
}
|
|
25
|
+
ngOnInit() {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
DraggableItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: DraggableItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
DraggableItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: DraggableItemComponent, selector: "pep-draggable-item", inputs: { title: "title", disabled: "disabled" }, host: { properties: { "style.cursor": "this._cursor" } }, ngImport: i0, template: "<div class=\"draggable-item-container\" [ngClass]=\"{ 'disabled': disabled }\">\n <div class=\"\">\n <pep-button classNames=\"lock-events\" sizeType=\"xs\" iconName=\"system_move\"></pep-button>\n </div>\n <div *ngIf=\"title !== ''\" class=\"title-container\">\n <span class=\"body-sm bold ellipsis title\" title=\"{{title}}\">{{title}}</span>\n </div>\n <div class=\"actions\">\n <ng-content select=\"[pep-actions]\"></ng-content>\n </div>\n</div>", styles: [":host{display:block}.draggable-item-container{height:2.5rem;width:100%;display:grid;grid-template-columns:auto 1fr auto;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);padding-inline:var(--pep-spacing-sm, .5rem);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.title-container{overflow-x:hidden;margin-inline:var(--pep-spacing-sm, .5rem)}.title-container .title{display:block}.actions{display:inline-flex;grid-gap:var(--pep-spacing-xs, .25rem);gap:var(--pep-spacing-xs, .25rem)}\n"], components: [{ type: i1.PepButtonComponent, selector: "pep-button", inputs: ["styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconPosition", "visible", "key", "value", "iconName"], outputs: ["buttonClick"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: DraggableItemComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{
|
|
33
|
+
selector: 'pep-draggable-item',
|
|
34
|
+
templateUrl: './draggable-item.component.html',
|
|
35
|
+
styleUrls: ['./draggable-item.component.scss']
|
|
36
|
+
}]
|
|
37
|
+
}], ctorParameters: function () { return []; }, propDecorators: { _cursor: [{
|
|
38
|
+
type: HostBinding,
|
|
39
|
+
args: ['style.cursor']
|
|
40
|
+
}], title: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], disabled: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}] } });
|
|
45
|
+
|
|
46
|
+
class DraggableItemModule {
|
|
47
|
+
}
|
|
48
|
+
DraggableItemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: DraggableItemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
49
|
+
DraggableItemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: DraggableItemModule, declarations: [DraggableItemComponent], imports: [CommonModule,
|
|
50
|
+
PepNgxLibModule,
|
|
51
|
+
PepButtonModule,
|
|
52
|
+
DragDropModule], exports: [DraggableItemComponent] });
|
|
53
|
+
DraggableItemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: DraggableItemModule, imports: [[
|
|
54
|
+
CommonModule,
|
|
55
|
+
PepNgxLibModule,
|
|
56
|
+
PepButtonModule,
|
|
57
|
+
DragDropModule
|
|
58
|
+
]] });
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: DraggableItemModule, decorators: [{
|
|
60
|
+
type: NgModule,
|
|
61
|
+
args: [{
|
|
62
|
+
declarations: [
|
|
63
|
+
DraggableItemComponent
|
|
64
|
+
],
|
|
65
|
+
imports: [
|
|
66
|
+
CommonModule,
|
|
67
|
+
PepNgxLibModule,
|
|
68
|
+
PepButtonModule,
|
|
69
|
+
DragDropModule
|
|
70
|
+
],
|
|
71
|
+
exports: [DraggableItemComponent],
|
|
72
|
+
}]
|
|
73
|
+
}] });
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Public API Surface of ngx-composite-lib/draggable-item
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Generated bundle index. Do not edit.
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
export { DraggableItemComponent, DraggableItemModule };
|
|
84
|
+
//# sourceMappingURL=pepperi-addons-ngx-composite-lib-draggable-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-composite-lib-draggable-item.js","sources":["../../../projects/ngx-composite-lib/draggable-item/draggable-item.component.ts","../../../projects/ngx-composite-lib/draggable-item/draggable-item.component.html","../../../projects/ngx-composite-lib/draggable-item/draggable-item.module.ts","../../../projects/ngx-composite-lib/draggable-item/public-api.ts","../../../projects/ngx-composite-lib/draggable-item/pepperi-addons-ngx-composite-lib-draggable-item.ts"],"sourcesContent":["import { Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'pep-draggable-item',\n templateUrl: './draggable-item.component.html',\n styleUrls: ['./draggable-item.component.scss']\n})\nexport class DraggableItemComponent implements OnInit {\n\n @HostBinding('style.cursor') _cursor = 'move';\n\n @Input() title = '';\n \n @Input() disabled = false;\n\n // private _isDraggable = false;\n // @Input()\n // set isDraggable(value: boolean) {\n // this._isDraggable = value;\n\n // this._cursor = value ? 'move' : 'inherit'\n // }\n // get isDraggable(): boolean {\n // return this._isDraggable;\n // }\n\n constructor() { }\n\n ngOnInit(): void {\n }\n}\n","<div class=\"draggable-item-container\" [ngClass]=\"{ 'disabled': disabled }\">\n <div class=\"\">\n <pep-button classNames=\"lock-events\" sizeType=\"xs\" iconName=\"system_move\"></pep-button>\n </div>\n <div *ngIf=\"title !== ''\" class=\"title-container\">\n <span class=\"body-sm bold ellipsis title\" title=\"{{title}}\">{{title}}</span>\n </div>\n <div class=\"actions\">\n <ng-content select=\"[pep-actions]\"></ng-content>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\n\nimport { DragDropModule } from '@angular/cdk/drag-drop';\n\nimport { DraggableItemComponent } from './draggable-item.component';\n\n@NgModule({\n declarations: [\n DraggableItemComponent\n ],\n imports: [\n CommonModule,\n PepNgxLibModule,\n PepButtonModule,\n DragDropModule\n ],\n exports: [DraggableItemComponent],\n})\nexport class DraggableItemModule { }\n","/*\n * Public API Surface of ngx-composite-lib/draggable-item\n */\nexport * from './draggable-item.module';\nexport * from './draggable-item.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAOa,sBAAsB;;;;;;;;;;IAmB/B;QAjB6B,YAAO,GAAG,MAAM,CAAC;QAErC,UAAK,GAAG,EAAE,CAAC;QAEX,aAAQ,GAAG,KAAK,CAAC;KAaT;IAEjB,QAAQ;KACP;;mHAtBQ,sBAAsB;uGAAtB,sBAAsB,sKCPnC,yeAUM;2FDHO,sBAAsB;kBALlC,SAAS;mBAAC;oBACP,QAAQ,EAAE,oBAAoB;oBAC9B,WAAW,EAAE,iCAAiC;oBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;iBACjD;0EAGgC,OAAO;sBAAnC,WAAW;uBAAC,cAAc;gBAElB,KAAK;sBAAb,KAAK;gBAEG,QAAQ;sBAAhB,KAAK;;;MEQG,mBAAmB;;gHAAnB,mBAAmB;iHAAnB,mBAAmB,iBAVxB,sBAAsB,aAGtB,YAAY;QACZ,eAAe;QACf,eAAe;QACf,cAAc,aAER,sBAAsB;iHAEvB,mBAAmB,YARnB;YACL,YAAY;YACZ,eAAe;YACf,eAAe;YACf,cAAc;SACjB;2FAGQ,mBAAmB;kBAZ/B,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,sBAAsB;qBACzB;oBACD,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,cAAc;qBACjB;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBACpC;;;ACpBD;;;;ACAA;;;;;;"}
|
|
@@ -138,7 +138,7 @@ class GenericListComponent {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
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", noDataMessage: "noDataMessage", allowMultipleSelection: "allowMultipleSelection" }, 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 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 <pep-list viewType=\"table\" [supportSorting]=\"false\"\n
|
|
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", noDataMessage: "noDataMessage", allowMultipleSelection: "allowMultipleSelection" }, 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 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>", 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}\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
142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: GenericListComponent, decorators: [{
|
|
143
143
|
type: Component,
|
|
144
144
|
args: [{
|
|
@@ -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 <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</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;QAGlC,2BAAsB,GAA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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 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;QAGlC,2BAAsB,GAAY,KAAK,CAAC;QAGxC,eAAU,GAA0C,IAAI,YAAY,EAA2B,CAAC;;;QAKhG,iBAAY,GAAmD,EAAE,CAAC;QAClE,gBAAW,GAAuB,EAAE,CAAC;QASjC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI;;SAElD,CAAC,CAAC;KACN;IAEO,aAAa;QACjB,IAAI,IAAI,CAAC,cAAc,EAAE;YACrB,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;SACzD;KACJ;IAEO,mBAAmB,CAAC,MAAW,EAAE,QAAsB;QAC3D,MAAM,GAAG,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAEhB,IAAI,CAAA,QAAQ,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AW,EAAE,+BAA+B;oBAC5C,SAAS,EAAE,CAAC,+BAA+B,CAAC;iBAC/C;4KAEgC,UAAU;sBAAtC,SAAS;uBAAC,gBAAgB;gBAG3B,UAAU;sBADT,KAAK;gBAON,UAAU;sBADT,KAAK;gBAIN,KAAK;sBADJ,KAAK;gBAIN,MAAM;sBADL,KAAK;gBAIN,UAAU;sBADT,KAAK;gBAIN,cAAc;sBADb,KAAK;gBAIN,aAAa;sBADZ,KAAK;gBAIN,sBAAsB;sBADrB,KAAK;gBAIN,UAAU;sBADT,MAAM;;;MExCE,oBAAoB;;iHAApB,oBAAoB;kHAApB,oBAAoB,iBAdzB,oBAAoB,aAGpB,YAAY;QACZ,eAAe;QACf,aAAa;QACb,aAAa;QACb,aAAa;QACb,mBAAmB;QACnB,eAAe;QACf,eAAe,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;;;;;;"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 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/field-title';
|
|
7
|
+
import { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';
|
|
8
|
+
import * as i3 from '@pepperi-addons/ngx-lib/group-buttons';
|
|
9
|
+
import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
|
|
10
|
+
import { PepNgxLibModule } from '@pepperi-addons/ngx-lib';
|
|
11
|
+
import * as i1$1 from '@pepperi-addons/ngx-lib/icon';
|
|
12
|
+
import { pepIconTextAlignCenter, pepIconTextAlignLeft, pepIconTextAlignRight } from '@pepperi-addons/ngx-lib/icon';
|
|
13
|
+
|
|
14
|
+
class GroupButtonsSettingsComponent {
|
|
15
|
+
// pepB: PepSizeType | 'none' = "xs";
|
|
16
|
+
constructor(translate) {
|
|
17
|
+
this.translate = translate;
|
|
18
|
+
this.header = '';
|
|
19
|
+
this.subHeader = '';
|
|
20
|
+
this.groupType = 'sizes';
|
|
21
|
+
this.btnsArray = [];
|
|
22
|
+
this.excludeKeys = []; // for example ['xs','xl']
|
|
23
|
+
this.useNone = false;
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
this.btnkeyChange = new EventEmitter();
|
|
26
|
+
this.none = { key: 'none' };
|
|
27
|
+
this.sizes = [];
|
|
28
|
+
}
|
|
29
|
+
set btnKey(value) {
|
|
30
|
+
if (!value) {
|
|
31
|
+
this._btnKey = '';
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this._btnKey = value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
get btnKey() {
|
|
38
|
+
return this._btnKey;
|
|
39
|
+
}
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
// Get the first translation for load all translations.
|
|
42
|
+
this.translate.get('SHADOW_SETTINGS.INTENSITY_SOFT').toPromise().then((typeSoft) => {
|
|
43
|
+
this.none = { key: 'none', value: this.translate.instant('GENERAL.NONE'), callback: () => this.onKeyChange(null) };
|
|
44
|
+
this.arrayMerge();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
arrayMerge() {
|
|
48
|
+
this.btnsArray = this.getButtonsArray();
|
|
49
|
+
// check if need to remove items from the buttons array
|
|
50
|
+
if (this.excludeKeys) {
|
|
51
|
+
this.btnsArray = this.btnsArray.filter(i => !this.excludeKeys.find(f => f === i.key));
|
|
52
|
+
}
|
|
53
|
+
// check if need to add the None button
|
|
54
|
+
if (this.useNone) {
|
|
55
|
+
this.btnsArray = [this.none].concat(this.btnsArray);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
onKeyChange(event) {
|
|
59
|
+
var _a;
|
|
60
|
+
this.btnKey = ((_a = event === null || event === void 0 ? void 0 : event.source) === null || _a === void 0 ? void 0 : _a.key) || 'none';
|
|
61
|
+
this.btnkeyChange.emit(this.btnKey);
|
|
62
|
+
}
|
|
63
|
+
getButtonsArray() {
|
|
64
|
+
switch (this.groupType) {
|
|
65
|
+
case 'custom': {
|
|
66
|
+
return this.btnsArray;
|
|
67
|
+
}
|
|
68
|
+
case 'sizes': {
|
|
69
|
+
return [
|
|
70
|
+
{ key: 'xs', value: this.translate.instant('GENERAL.XS'), callback: (event) => this.onKeyChange(event) },
|
|
71
|
+
{ key: 'sm', value: this.translate.instant('GENERAL.SM'), callback: (event) => this.onKeyChange(event) },
|
|
72
|
+
{ key: 'md', value: this.translate.instant('GENERAL.MD'), callback: (event) => this.onKeyChange(event) },
|
|
73
|
+
{ key: 'lg', value: this.translate.instant('GENERAL.LG'), callback: (event) => this.onKeyChange(event) },
|
|
74
|
+
{ key: 'xl', value: this.translate.instant('GENERAL.XL'), callback: (event) => this.onKeyChange(event) }
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
case 'vertical-align': {
|
|
78
|
+
return [
|
|
79
|
+
{ key: 'start', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.TOP'), callback: (event) => this.onKeyChange(event) },
|
|
80
|
+
{ key: 'center', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.MIDDLE'), callback: (event) => this.onKeyChange(event) },
|
|
81
|
+
{ key: 'end', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.BOTTOM'), callback: (event) => this.onKeyChange(event) }
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
case 'horizontal-align': {
|
|
85
|
+
return [
|
|
86
|
+
{ key: 'left', iconName: 'text_align_right', callback: (event) => this.onKeyChange(event) },
|
|
87
|
+
{ key: 'center', iconName: 'text_align_center', callback: (event) => this.onKeyChange(event) },
|
|
88
|
+
{ key: 'right', iconName: 'text_align_left', callback: (event) => this.onKeyChange(event) },
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
case 'font-weight': {
|
|
92
|
+
return [
|
|
93
|
+
{ key: 'normal', value: this.translate.instant('GENERAL.FONT_WEIGHT.NORMAL'), callback: (event) => this.onKeyChange(event) },
|
|
94
|
+
{ key: 'bold', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLD'), callback: (event) => this.onKeyChange(event) },
|
|
95
|
+
{ key: 'bolder', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLDER'), callback: (event) => this.onKeyChange(event) }
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
case 'width-sizes': {
|
|
99
|
+
return [
|
|
100
|
+
{ key: 'narrow', value: this.translate.instant('GENERAL.WIDTH_SIZE.NARROW'), callback: (event) => this.onKeyChange(event) },
|
|
101
|
+
{ key: 'regular', value: this.translate.instant('GENERAL.WIDTH_SIZE.REGULAR'), callback: (event) => this.onKeyChange(event) },
|
|
102
|
+
{ key: 'wide', value: this.translate.instant('GENERAL.WIDTH_SIZE.WIDE'), callback: (event) => this.onKeyChange(event) }
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
default: {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
GroupButtonsSettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: GroupButtonsSettingsComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
+
GroupButtonsSettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: GroupButtonsSettingsComponent, selector: "pep-group-buttons-settings", inputs: { header: "header", subHeader: "subHeader", groupType: "groupType", btnsArray: "btnsArray", excludeKeys: "excludeKeys", useNone: "useNone", disabled: "disabled", btnKey: "btnKey" }, outputs: { btnkeyChange: "btnkeyChange" }, ngImport: i0, template: "<label *ngIf=\"header != ''\" class=\"body-xl bold ellipsis\">{{header}}</label>\n<pep-field-title *ngIf=\"subHeader !=''\" [label]=\"subHeader\" [disabled]=\"disabled\"></pep-field-title>\n<pep-group-buttons [buttons]=\"btnsArray\" \n [selectedButtonKey]=\"btnKey\" \n [stretch]=\"true\" \n buttonsClass=\"md regular\" \n [buttonsDisabled]=\"disabled\" \n viewType=\"toggle\">\n</pep-group-buttons>\n", styles: [":host{width:100%}:host .shadow-size-group,:host .shadow-type-group{display:block;margin-bottom:var(--pep-form-spacing, 1rem)}\n"], components: [{ type: i2.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { type: i3.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: GroupButtonsSettingsComponent, decorators: [{
|
|
114
|
+
type: Component,
|
|
115
|
+
args: [{
|
|
116
|
+
selector: 'pep-group-buttons-settings',
|
|
117
|
+
templateUrl: './group-buttons-settings.component.html',
|
|
118
|
+
styleUrls: ['./group-buttons-settings.component.scss']
|
|
119
|
+
}]
|
|
120
|
+
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { header: [{
|
|
121
|
+
type: Input
|
|
122
|
+
}], subHeader: [{
|
|
123
|
+
type: Input
|
|
124
|
+
}], groupType: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], btnsArray: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], excludeKeys: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], useNone: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], disabled: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], btnKey: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], btnkeyChange: [{
|
|
137
|
+
type: Output
|
|
138
|
+
}] } });
|
|
139
|
+
|
|
140
|
+
const pepIcons = [
|
|
141
|
+
pepIconTextAlignCenter,
|
|
142
|
+
pepIconTextAlignLeft,
|
|
143
|
+
pepIconTextAlignRight
|
|
144
|
+
];
|
|
145
|
+
class PepGroupButtonsSettingsModule {
|
|
146
|
+
constructor(pepIconRegistry) {
|
|
147
|
+
this.pepIconRegistry = pepIconRegistry;
|
|
148
|
+
this.pepIconRegistry.registerIcons(pepIcons);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
PepGroupButtonsSettingsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepGroupButtonsSettingsModule, deps: [{ token: i1$1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
152
|
+
PepGroupButtonsSettingsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepGroupButtonsSettingsModule, declarations: [GroupButtonsSettingsComponent], imports: [CommonModule,
|
|
153
|
+
PepNgxLibModule,
|
|
154
|
+
PepFieldTitleModule,
|
|
155
|
+
PepGroupButtonsModule], exports: [GroupButtonsSettingsComponent] });
|
|
156
|
+
PepGroupButtonsSettingsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepGroupButtonsSettingsModule, imports: [[
|
|
157
|
+
CommonModule,
|
|
158
|
+
PepNgxLibModule,
|
|
159
|
+
PepFieldTitleModule,
|
|
160
|
+
PepGroupButtonsModule,
|
|
161
|
+
]] });
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepGroupButtonsSettingsModule, decorators: [{
|
|
163
|
+
type: NgModule,
|
|
164
|
+
args: [{
|
|
165
|
+
declarations: [
|
|
166
|
+
GroupButtonsSettingsComponent
|
|
167
|
+
],
|
|
168
|
+
imports: [
|
|
169
|
+
CommonModule,
|
|
170
|
+
PepNgxLibModule,
|
|
171
|
+
PepFieldTitleModule,
|
|
172
|
+
PepGroupButtonsModule,
|
|
173
|
+
],
|
|
174
|
+
exports: [GroupButtonsSettingsComponent]
|
|
175
|
+
}]
|
|
176
|
+
}], ctorParameters: function () { return [{ type: i1$1.PepIconRegistry }]; } });
|
|
177
|
+
|
|
178
|
+
/*
|
|
179
|
+
* Public API Surface of ngx-composite-lib/shadow-settings
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Generated bundle index. Do not edit.
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
export { GroupButtonsSettingsComponent, PepGroupButtonsSettingsModule };
|
|
187
|
+
//# sourceMappingURL=pepperi-addons-ngx-composite-lib-group-buttons-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-composite-lib-group-buttons-settings.js","sources":["../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.component.ts","../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.component.html","../../../projects/ngx-composite-lib/group-buttons-settings/group-buttons-settings.module.ts","../../../projects/ngx-composite-lib/group-buttons-settings/public-api.ts","../../../projects/ngx-composite-lib/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { PepSizeType } from '@pepperi-addons/ngx-lib';\nimport { IPepButtonClickEvent, PepButton } from '@pepperi-addons/ngx-lib/button';\nimport { PepGroupbuttonsTypes } from './group-buttons-settings.model';\n\n@Component({\n selector: 'pep-group-buttons-settings',\n templateUrl: './group-buttons-settings.component.html',\n styleUrls: ['./group-buttons-settings.component.scss']\n})\nexport class GroupButtonsSettingsComponent implements OnInit {\n\n @Input() header: string = '';\n @Input() subHeader: string = '';\n\n @Input() groupType: PepGroupbuttonsTypes = 'sizes'; \n @Input() btnsArray: Array<PepButton> = [];\n @Input() excludeKeys: Array<string> = []; // for example ['xs','xl']\n\n @Input() useNone: boolean = false;\n @Input() disabled: boolean = false;\n\n private _btnKey: any;\n @Input()\n set btnKey(value: any) {\n if (!value) {\n this._btnKey = '';\n } else {\n this._btnKey = value;\n }\n }\n get btnKey(): any {\n return this._btnKey;\n }\n\n @Output()\n btnkeyChange: EventEmitter<IPepButtonClickEvent> = new EventEmitter<IPepButtonClickEvent>();\n \n \n none: PepButton = {key: 'none'};\n \n sizes: Array<PepButton> = [];\n \n // pepB: PepSizeType | 'none' = \"xs\";\n\n constructor(\n private translate: TranslateService,\n ) {\n }\n\n ngOnInit(): void { \n // Get the first translation for load all translations.\n this.translate.get('SHADOW_SETTINGS.INTENSITY_SOFT').toPromise().then((typeSoft) => {\n \n this.none = { key: 'none', value: this.translate.instant('GENERAL.NONE'), callback: () => this.onKeyChange(null) };\n \n this.arrayMerge();\n });\n }\n\n arrayMerge(){\n\n this.btnsArray = this.getButtonsArray();\n \n // check if need to remove items from the buttons array\n if(this.excludeKeys){\n this.btnsArray = this.btnsArray.filter(i => !this.excludeKeys.find(f => f === i.key));\n }\n // check if need to add the None button\n if(this.useNone){\n this.btnsArray = [this.none].concat(this.btnsArray);\n }\n }\n\n onKeyChange(event: IPepButtonClickEvent | null) {\n this.btnKey = event?.source?.key || 'none';\n this.btnkeyChange.emit(this.btnKey);\n }\n\n getButtonsArray() {\n switch(this.groupType){\n case 'custom':{\n return this.btnsArray;\n }\n case 'sizes':{\n return [\n { key: 'xs', value: this.translate.instant('GENERAL.XS'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'sm', value: this.translate.instant('GENERAL.SM'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'md', value: this.translate.instant('GENERAL.MD'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'lg', value: this.translate.instant('GENERAL.LG'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'xl', value: this.translate.instant('GENERAL.XL'), callback: (event: any) => this.onKeyChange(event) }\n ];\n }\n case 'vertical-align':{\n return [\n { key: 'start', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.TOP'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) },\n { key: 'center', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.MIDDLE'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) },\n { key: 'end', value: this.translate.instant('GENERAL.VERTICAL_ALIGN.BOTTOM'), callback: (event: IPepButtonClickEvent) => this.onKeyChange(event) }\n ];\n }\n case 'horizontal-align': {\n return [\n { key: 'left', iconName: 'text_align_right', callback: (event: any) => this.onKeyChange(event) },\n { key: 'center', iconName: 'text_align_center', callback: (event: any) => this.onKeyChange(event) },\n { key: 'right', iconName: 'text_align_left', callback: (event: any) => this.onKeyChange(event) },\n ];\n }\n case 'font-weight':{\n return [\n { key: 'normal', value: this.translate.instant('GENERAL.FONT_WEIGHT.NORMAL'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'bold', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLD'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'bolder', value: this.translate.instant('GENERAL.FONT_WEIGHT.BOLDER'), callback: (event: any) => this.onKeyChange(event) }\n ]\n }\n case 'width-sizes':{\n return [\n { key: 'narrow', value: this.translate.instant('GENERAL.WIDTH_SIZE.NARROW'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'regular', value: this.translate.instant('GENERAL.WIDTH_SIZE.REGULAR'), callback: (event: any) => this.onKeyChange(event) },\n { key: 'wide', value: this.translate.instant('GENERAL.WIDTH_SIZE.WIDE'), callback: (event: any) => this.onKeyChange(event) }\n ];\n }\n\n default: {\n return [];\n }\n }\n }\n}\n","<label *ngIf=\"header != ''\" class=\"body-xl bold ellipsis\">{{header}}</label>\n<pep-field-title *ngIf=\"subHeader !=''\" [label]=\"subHeader\" [disabled]=\"disabled\"></pep-field-title>\n<pep-group-buttons [buttons]=\"btnsArray\" \n [selectedButtonKey]=\"btnKey\" \n [stretch]=\"true\" \n buttonsClass=\"md regular\" \n [buttonsDisabled]=\"disabled\" \n viewType=\"toggle\">\n</pep-group-buttons>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GroupButtonsSettingsComponent } from './group-buttons-settings.component';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';\nimport { PepIconRegistry, pepIconTextAlignCenter, pepIconTextAlignLeft, pepIconTextAlignRight } from '@pepperi-addons/ngx-lib/icon';\n\nconst pepIcons = [\n pepIconTextAlignCenter, \n pepIconTextAlignLeft, \n pepIconTextAlignRight\n]\n\n@NgModule({\n declarations: [\n GroupButtonsSettingsComponent\n ],\n imports: [\n CommonModule,\n PepNgxLibModule,\n PepFieldTitleModule,\n PepGroupButtonsModule,\n ],\n exports: [GroupButtonsSettingsComponent]\n})\nexport class PepGroupButtonsSettingsModule { \n constructor(\n private pepIconRegistry: PepIconRegistry,\n ) {\n this.pepIconRegistry.registerIcons(pepIcons);\n }\n}\n","/*\n * Public API Surface of ngx-composite-lib/shadow-settings\n */\nexport * from './group-buttons-settings.module';\nexport * from './group-buttons-settings.component';\nexport * from './group-buttons-settings.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport *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ACzBD;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
+
import { IPepButtonClickEvent, PepButton } from '@pepperi-addons/ngx-lib/button';
|
|
4
|
+
import { PepGroupbuttonsTypes } from './group-buttons-settings.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class GroupButtonsSettingsComponent implements OnInit {
|
|
7
|
+
private translate;
|
|
8
|
+
header: string;
|
|
9
|
+
subHeader: string;
|
|
10
|
+
groupType: PepGroupbuttonsTypes;
|
|
11
|
+
btnsArray: Array<PepButton>;
|
|
12
|
+
excludeKeys: Array<string>;
|
|
13
|
+
useNone: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
private _btnKey;
|
|
16
|
+
set btnKey(value: any);
|
|
17
|
+
get btnKey(): any;
|
|
18
|
+
btnkeyChange: EventEmitter<IPepButtonClickEvent>;
|
|
19
|
+
none: PepButton;
|
|
20
|
+
sizes: Array<PepButton>;
|
|
21
|
+
constructor(translate: TranslateService);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
arrayMerge(): void;
|
|
24
|
+
onKeyChange(event: IPepButtonClickEvent | null): void;
|
|
25
|
+
getButtonsArray(): PepButton[] | {
|
|
26
|
+
key: string;
|
|
27
|
+
value: any;
|
|
28
|
+
callback: (event: IPepButtonClickEvent) => void;
|
|
29
|
+
}[];
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GroupButtonsSettingsComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupButtonsSettingsComponent, "pep-group-buttons-settings", never, { "header": "header"; "subHeader": "subHeader"; "groupType": "groupType"; "btnsArray": "btnsArray"; "excludeKeys": "excludeKeys"; "useNone": "useNone"; "disabled": "disabled"; "btnKey": "btnKey"; }, { "btnkeyChange": "btnkeyChange"; }, never, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type PepGroupbuttonsTypes = 'sizes' | 'font-weight' | 'width-sizes' | 'vertical-align' | 'horizontal-align' | 'custom';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PepIconRegistry } from '@pepperi-addons/ngx-lib/icon';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./group-buttons-settings.component";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
import * as i3 from "@pepperi-addons/ngx-lib";
|
|
6
|
+
import * as i4 from "@pepperi-addons/ngx-lib/field-title";
|
|
7
|
+
import * as i5 from "@pepperi-addons/ngx-lib/group-buttons";
|
|
8
|
+
export declare class PepGroupButtonsSettingsModule {
|
|
9
|
+
private pepIconRegistry;
|
|
10
|
+
constructor(pepIconRegistry: PepIconRegistry);
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PepGroupButtonsSettingsModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PepGroupButtonsSettingsModule, [typeof i1.GroupButtonsSettingsComponent], [typeof i2.CommonModule, typeof i3.PepNgxLibModule, typeof i4.PepFieldTitleModule, typeof i5.PepGroupButtonsModule], [typeof i1.GroupButtonsSettingsComponent]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PepGroupButtonsSettingsModule>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"peerDependencies": {
|
|
3
|
+
"@pepperi-addons/ngx-lib": "^0.2.56"
|
|
4
|
+
},
|
|
5
|
+
"main": "../bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js",
|
|
6
|
+
"module": "../fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js",
|
|
7
|
+
"es2015": "../fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js",
|
|
8
|
+
"esm2015": "../esm2015/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.js",
|
|
9
|
+
"fesm2015": "../fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js",
|
|
10
|
+
"typings": "pepperi-addons-ngx-composite-lib-group-buttons-settings.d.ts",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"name": "@pepperi-addons/ngx-composite-lib/group-buttons-settings"
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -12,9 +12,32 @@
|
|
|
12
12
|
"INTENSITY": "Shadow intensity"
|
|
13
13
|
},
|
|
14
14
|
"GENERAL": {
|
|
15
|
+
"NONE": "None",
|
|
16
|
+
"XS": "XS",
|
|
15
17
|
"SM": "SM",
|
|
16
18
|
"MD": "MD",
|
|
17
19
|
"LG": "LG",
|
|
18
|
-
"XL": "XL"
|
|
20
|
+
"XL": "XL",
|
|
21
|
+
|
|
22
|
+
"FONT_WEIGHT": {
|
|
23
|
+
"NORMAL": "Normal",
|
|
24
|
+
"BOLD": "Bold",
|
|
25
|
+
"BOLDER": "Bolder"
|
|
26
|
+
},
|
|
27
|
+
"WIDTH_SIZE": {
|
|
28
|
+
"NARROW": "Narrow",
|
|
29
|
+
"REGULAR": "Regular",
|
|
30
|
+
"WIDE": "Wide"
|
|
31
|
+
},
|
|
32
|
+
"HORIZONTAL_ALIGN": {
|
|
33
|
+
"LEFT": "Left",
|
|
34
|
+
"CENTER": "Center",
|
|
35
|
+
"RIGHT": "Right"
|
|
36
|
+
},
|
|
37
|
+
"VERTICAL_ALIGN": {
|
|
38
|
+
"TOP": "Top",
|
|
39
|
+
"MIDDLE": "Middle",
|
|
40
|
+
"BOTTOM": "Bottom"
|
|
41
|
+
}
|
|
19
42
|
}
|
|
20
43
|
}
|