@pepperi-addons/ngx-composite-lib 0.0.10-beta.1 → 0.0.10-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js +122 -122
  2. package/bundles/pepperi-addons-ngx-composite-lib-draggable-item.umd.js +71 -71
  3. package/bundles/pepperi-addons-ngx-composite-lib-draggable-item.umd.js.map +1 -1
  4. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +535 -535
  5. package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +173 -173
  6. package/bundles/pepperi-addons-ngx-composite-lib-shadow-settings.umd.js +117 -117
  7. package/bundles/pepperi-addons-ngx-composite-lib.umd.js +72 -29
  8. package/bundles/pepperi-addons-ngx-composite-lib.umd.js.map +1 -1
  9. package/color-settings/color-settings.component.d.ts +22 -22
  10. package/color-settings/color-settings.model.d.ts +5 -5
  11. package/color-settings/color-settings.module.d.ts +12 -12
  12. package/color-settings/pepperi-addons-ngx-composite-lib-color-settings.d.ts +5 -5
  13. package/color-settings/public-api.d.ts +3 -3
  14. package/core/common/index.d.ts +1 -0
  15. package/core/common/public-api.d.ts +1 -0
  16. package/core/common/services/index.d.ts +1 -0
  17. package/core/common/services/public-api.d.ts +1 -0
  18. package/core/common/services/utilities.service.d.ts +6 -0
  19. package/core/index.d.ts +1 -0
  20. package/core/public-api.d.ts +1 -0
  21. package/draggable-item/draggable-item.component.d.ts +11 -11
  22. package/draggable-item/draggable-item.module.d.ts +11 -11
  23. package/draggable-item/pepperi-addons-ngx-composite-lib-draggable-item.d.ts +5 -5
  24. package/draggable-item/public-api.d.ts +2 -2
  25. package/esm2015/color-settings/color-settings.component.js +80 -80
  26. package/esm2015/color-settings/color-settings.model.js +8 -8
  27. package/esm2015/color-settings/color-settings.module.js +39 -39
  28. package/esm2015/color-settings/pepperi-addons-ngx-composite-lib-color-settings.js +4 -4
  29. package/esm2015/color-settings/public-api.js +6 -6
  30. package/esm2015/core/common/index.js +5 -0
  31. package/esm2015/core/common/public-api.js +5 -0
  32. package/esm2015/core/common/services/index.js +5 -0
  33. package/esm2015/core/common/services/public-api.js +5 -0
  34. package/esm2015/core/common/services/utilities.service.js +19 -0
  35. package/esm2015/core/index.js +5 -0
  36. package/esm2015/core/public-api.js +5 -0
  37. package/esm2015/draggable-item/draggable-item.component.js +39 -39
  38. package/esm2015/draggable-item/draggable-item.module.js +36 -36
  39. package/esm2015/draggable-item/pepperi-addons-ngx-composite-lib-draggable-item.js +4 -4
  40. package/esm2015/draggable-item/public-api.js +5 -5
  41. package/esm2015/generic-list/generic-list.component.js +163 -163
  42. package/esm2015/generic-list/generic-list.model.js +1 -1
  43. package/esm2015/generic-list/generic-list.module.js +51 -51
  44. package/esm2015/generic-list/pepperi-addons-ngx-composite-lib-generic-list.js +4 -4
  45. package/esm2015/generic-list/public-api.js +6 -6
  46. package/esm2015/group-buttons-settings/group-buttons-settings.component.js +131 -131
  47. package/esm2015/group-buttons-settings/group-buttons-settings.model.js +1 -1
  48. package/esm2015/group-buttons-settings/group-buttons-settings.module.js +46 -46
  49. package/esm2015/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +4 -4
  50. package/esm2015/group-buttons-settings/public-api.js +6 -6
  51. package/esm2015/ngx-composite-lib.module.js +25 -25
  52. package/esm2015/pepperi-addons-ngx-composite-lib.js +4 -4
  53. package/esm2015/public-api.js +6 -5
  54. package/esm2015/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.js +4 -4
  55. package/esm2015/shadow-settings/public-api.js +6 -6
  56. package/esm2015/shadow-settings/shadow-settings.component.js +72 -72
  57. package/esm2015/shadow-settings/shadow-settings.model.js +7 -7
  58. package/esm2015/shadow-settings/shadow-settings.module.js +43 -43
  59. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js +112 -112
  60. package/fesm2015/pepperi-addons-ngx-composite-lib-draggable-item.js +66 -66
  61. package/fesm2015/pepperi-addons-ngx-composite-lib-draggable-item.js.map +1 -1
  62. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +192 -192
  63. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +164 -164
  64. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.js +107 -107
  65. package/fesm2015/pepperi-addons-ngx-composite-lib.js +70 -29
  66. package/fesm2015/pepperi-addons-ngx-composite-lib.js.map +1 -1
  67. package/generic-list/generic-list.component.d.ts +45 -45
  68. package/generic-list/generic-list.model.d.ts +11 -11
  69. package/generic-list/generic-list.module.d.ts +15 -15
  70. package/generic-list/pepperi-addons-ngx-composite-lib-generic-list.d.ts +5 -5
  71. package/generic-list/public-api.d.ts +3 -3
  72. package/group-buttons-settings/group-buttons-settings.component.d.ts +32 -32
  73. package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
  74. package/group-buttons-settings/group-buttons-settings.module.d.ts +14 -14
  75. package/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.d.ts +5 -5
  76. package/group-buttons-settings/public-api.d.ts +3 -3
  77. package/ngx-composite-lib.module.d.ts +6 -6
  78. package/package.json +1 -1
  79. package/pepperi-addons-ngx-composite-lib.d.ts +5 -5
  80. package/public-api.d.ts +2 -1
  81. package/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.d.ts +5 -5
  82. package/shadow-settings/public-api.d.ts +3 -3
  83. package/shadow-settings/shadow-settings.component.d.ts +23 -23
  84. package/shadow-settings/shadow-settings.model.d.ts +7 -7
  85. package/shadow-settings/shadow-settings.module.d.ts +13 -13
  86. package/src/core/style/abstracts/functions.scss +0 -0
  87. package/src/core/style/abstracts/mixins.scss +0 -0
  88. package/src/core/style/abstracts/variables.scss +5 -0
  89. package/src/core/style/base/helpers.scss +0 -0
  90. package/src/core/style/components/general.scss +37 -0
  91. package/styles.scss +11 -35
@@ -11,176 +11,176 @@ import { PepNgxLibModule } from '@pepperi-addons/ngx-lib';
11
11
  import * as i1$1 from '@pepperi-addons/ngx-lib/icon';
12
12
  import { pepIconTextAlignCenter, pepIconTextAlignLeft, pepIconTextAlignRight } from '@pepperi-addons/ngx-lib/icon';
13
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
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
138
  }] } });
139
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
- }]
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
176
  }], ctorParameters: function () { return [{ type: i1$1.PepIconRegistry }]; } });
177
177
 
178
- /*
179
- * Public API Surface of ngx-composite-lib/shadow-settings
178
+ /*
179
+ * Public API Surface of ngx-composite-lib/shadow-settings
180
180
  */
181
181
 
182
- /**
183
- * Generated bundle index. Do not edit.
182
+ /**
183
+ * Generated bundle index. Do not edit.
184
184
  */
185
185
 
186
186
  export { GroupButtonsSettingsComponent, PepGroupButtonsSettingsModule };
@@ -11,121 +11,121 @@ import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
11
11
  import { PepNgxLibModule } from '@pepperi-addons/ngx-lib';
12
12
  import { PepSliderModule } from '@pepperi-addons/ngx-lib/slider';
13
13
 
14
- class PepShadowSettings {
15
- constructor() {
16
- this.use = false;
17
- this.size = 'md';
18
- this.intensity = 'regular';
19
- }
14
+ class PepShadowSettings {
15
+ constructor() {
16
+ this.use = false;
17
+ this.size = 'md';
18
+ this.intensity = 'regular';
19
+ }
20
20
  }
21
21
 
22
- class ShadowSettingsComponent {
23
- constructor(translate) {
24
- this.translate = translate;
25
- this._shadow = new PepShadowSettings();
26
- this.shadowChange = new EventEmitter();
27
- this.shadowSizes = [];
28
- this.shadowIntensities = [];
29
- }
30
- set shadow(value) {
31
- if (!value) {
32
- this._shadow = new PepShadowSettings();
33
- }
34
- else {
35
- this._shadow = value;
36
- }
37
- }
38
- get shadow() {
39
- return this._shadow;
40
- }
41
- ngOnInit() {
42
- // Get the first translation for load all translations.
43
- this.translate.get('SHADOW_SETTINGS.INTENSITY_SOFT').toPromise().then((typeSoft) => {
44
- this.shadowSizes = [
45
- { key: 'sm', value: this.translate.instant('GENERAL.SM'), callback: () => this.onSizeChange('sm') },
46
- { key: 'md', value: this.translate.instant('GENERAL.MD'), callback: () => this.onSizeChange('md') },
47
- { key: 'lg', value: this.translate.instant('GENERAL.LG'), callback: () => this.onSizeChange('lg') },
48
- { key: 'xl', value: this.translate.instant('GENERAL.XL'), callback: () => this.onSizeChange('xl') }
49
- ];
50
- this.shadowIntensities = [
51
- { key: 'soft', value: typeSoft, callback: () => this.onIntensityChange('soft') },
52
- { key: 'regular', value: this.translate.instant('SHADOW_SETTINGS.INTENSITY_REGULAR'), callback: () => this.onIntensityChange('regular') },
53
- { key: 'hard', value: this.translate.instant('SHADOW_SETTINGS.INTENSITY_HARD'), callback: () => this.onIntensityChange('hard') }
54
- ];
55
- });
56
- }
57
- raiseShadowChange() {
58
- this.shadowChange.emit(this.shadow);
59
- }
60
- onUseChanged(value) {
61
- this.shadow.use = value;
62
- this.raiseShadowChange();
63
- }
64
- onSizeChange(value) {
65
- this.shadow.size = value;
66
- this.raiseShadowChange();
67
- }
68
- onIntensityChange(value) {
69
- this.shadow.intensity = value;
70
- this.raiseShadowChange();
71
- }
72
- }
73
- ShadowSettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: ShadowSettingsComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
74
- ShadowSettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: ShadowSettingsComponent, selector: "pep-shadow-settings", inputs: { shadow: "shadow" }, outputs: { shadowChange: "shadowChange" }, ngImport: i0, template: "<pep-checkbox class=\"checkbox-as-title\" [label]=\"'SHADOW_SETTINGS.TITLE' | translate\" [renderTitle]=\"false\" [value]=\"shadow.use\" (valueChange)=\"onUseChanged($event)\"></pep-checkbox>\n<pep-field-title [label]=\"'SHADOW_SETTINGS.SIZE' | translate\" [disabled]=\"!shadow.use\"></pep-field-title>\n<pep-group-buttons class=\"shadow-size-group\" [buttons]=\"shadowSizes\" [selectedButtonKey]=\"shadow.size\" [stretch]=\"true\" buttonsClass=\"md regular\" [buttonsDisabled]=\"!shadow.use\" viewType=\"toggle\">\n</pep-group-buttons>\n<pep-field-title [label]=\"'SHADOW_SETTINGS.INTENSITY' | translate\" [disabled]=\"!shadow.use\"></pep-field-title>\n<pep-group-buttons class=\"shadow-intensity-group\" [buttons]=\"shadowIntensities\" [selectedButtonKey]=\"shadow.intensity\" [stretch]=\"true\" buttonsClass=\"md regular\" [buttonsDisabled]=\"!shadow.use\" viewType=\"toggle\">\n</pep-group-buttons>", 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.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "form", "isActive", "showTitle", "renderTitle", "layoutType", "type", "additionalValue", "visible"], outputs: ["valueChange"] }, { type: i3.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { type: i4.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }], pipes: { "translate": i1.TranslatePipe } });
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: ShadowSettingsComponent, decorators: [{
76
- type: Component,
77
- args: [{
78
- selector: 'pep-shadow-settings',
79
- templateUrl: './shadow-settings.component.html',
80
- styleUrls: ['./shadow-settings.component.scss']
81
- }]
82
- }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { shadow: [{
83
- type: Input
84
- }], shadowChange: [{
85
- type: Output
22
+ class ShadowSettingsComponent {
23
+ constructor(translate) {
24
+ this.translate = translate;
25
+ this._shadow = new PepShadowSettings();
26
+ this.shadowChange = new EventEmitter();
27
+ this.shadowSizes = [];
28
+ this.shadowIntensities = [];
29
+ }
30
+ set shadow(value) {
31
+ if (!value) {
32
+ this._shadow = new PepShadowSettings();
33
+ }
34
+ else {
35
+ this._shadow = value;
36
+ }
37
+ }
38
+ get shadow() {
39
+ return this._shadow;
40
+ }
41
+ ngOnInit() {
42
+ // Get the first translation for load all translations.
43
+ this.translate.get('SHADOW_SETTINGS.INTENSITY_SOFT').toPromise().then((typeSoft) => {
44
+ this.shadowSizes = [
45
+ { key: 'sm', value: this.translate.instant('GENERAL.SM'), callback: () => this.onSizeChange('sm') },
46
+ { key: 'md', value: this.translate.instant('GENERAL.MD'), callback: () => this.onSizeChange('md') },
47
+ { key: 'lg', value: this.translate.instant('GENERAL.LG'), callback: () => this.onSizeChange('lg') },
48
+ { key: 'xl', value: this.translate.instant('GENERAL.XL'), callback: () => this.onSizeChange('xl') }
49
+ ];
50
+ this.shadowIntensities = [
51
+ { key: 'soft', value: typeSoft, callback: () => this.onIntensityChange('soft') },
52
+ { key: 'regular', value: this.translate.instant('SHADOW_SETTINGS.INTENSITY_REGULAR'), callback: () => this.onIntensityChange('regular') },
53
+ { key: 'hard', value: this.translate.instant('SHADOW_SETTINGS.INTENSITY_HARD'), callback: () => this.onIntensityChange('hard') }
54
+ ];
55
+ });
56
+ }
57
+ raiseShadowChange() {
58
+ this.shadowChange.emit(this.shadow);
59
+ }
60
+ onUseChanged(value) {
61
+ this.shadow.use = value;
62
+ this.raiseShadowChange();
63
+ }
64
+ onSizeChange(value) {
65
+ this.shadow.size = value;
66
+ this.raiseShadowChange();
67
+ }
68
+ onIntensityChange(value) {
69
+ this.shadow.intensity = value;
70
+ this.raiseShadowChange();
71
+ }
72
+ }
73
+ ShadowSettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: ShadowSettingsComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
74
+ ShadowSettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: ShadowSettingsComponent, selector: "pep-shadow-settings", inputs: { shadow: "shadow" }, outputs: { shadowChange: "shadowChange" }, ngImport: i0, template: "<pep-checkbox class=\"checkbox-as-title\" [label]=\"'SHADOW_SETTINGS.TITLE' | translate\" [renderTitle]=\"false\" [value]=\"shadow.use\" (valueChange)=\"onUseChanged($event)\"></pep-checkbox>\n<pep-field-title [label]=\"'SHADOW_SETTINGS.SIZE' | translate\" [disabled]=\"!shadow.use\"></pep-field-title>\n<pep-group-buttons class=\"shadow-size-group\" [buttons]=\"shadowSizes\" [selectedButtonKey]=\"shadow.size\" [stretch]=\"true\" buttonsClass=\"md regular\" [buttonsDisabled]=\"!shadow.use\" viewType=\"toggle\">\n</pep-group-buttons>\n<pep-field-title [label]=\"'SHADOW_SETTINGS.INTENSITY' | translate\" [disabled]=\"!shadow.use\"></pep-field-title>\n<pep-group-buttons class=\"shadow-intensity-group\" [buttons]=\"shadowIntensities\" [selectedButtonKey]=\"shadow.intensity\" [stretch]=\"true\" buttonsClass=\"md regular\" [buttonsDisabled]=\"!shadow.use\" viewType=\"toggle\">\n</pep-group-buttons>", 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.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "form", "isActive", "showTitle", "renderTitle", "layoutType", "type", "additionalValue", "visible"], outputs: ["valueChange"] }, { type: i3.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength"] }, { type: i4.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }], pipes: { "translate": i1.TranslatePipe } });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: ShadowSettingsComponent, decorators: [{
76
+ type: Component,
77
+ args: [{
78
+ selector: 'pep-shadow-settings',
79
+ templateUrl: './shadow-settings.component.html',
80
+ styleUrls: ['./shadow-settings.component.scss']
81
+ }]
82
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { shadow: [{
83
+ type: Input
84
+ }], shadowChange: [{
85
+ type: Output
86
86
  }] } });
87
87
 
88
- class PepShadowSettingsModule {
89
- }
90
- PepShadowSettingsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
91
- PepShadowSettingsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, declarations: [ShadowSettingsComponent], imports: [CommonModule,
92
- PepNgxLibModule,
93
- PepCheckboxModule,
94
- PepFieldTitleModule,
95
- PepGroupButtonsModule,
96
- PepSliderModule], exports: [ShadowSettingsComponent] });
97
- PepShadowSettingsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, imports: [[
98
- CommonModule,
99
- PepNgxLibModule,
100
- PepCheckboxModule,
101
- PepFieldTitleModule,
102
- PepGroupButtonsModule,
103
- PepSliderModule
104
- ]] });
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, decorators: [{
106
- type: NgModule,
107
- args: [{
108
- declarations: [
109
- ShadowSettingsComponent
110
- ],
111
- imports: [
112
- CommonModule,
113
- PepNgxLibModule,
114
- PepCheckboxModule,
115
- PepFieldTitleModule,
116
- PepGroupButtonsModule,
117
- PepSliderModule
118
- ],
119
- exports: [ShadowSettingsComponent],
120
- }]
88
+ class PepShadowSettingsModule {
89
+ }
90
+ PepShadowSettingsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
91
+ PepShadowSettingsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, declarations: [ShadowSettingsComponent], imports: [CommonModule,
92
+ PepNgxLibModule,
93
+ PepCheckboxModule,
94
+ PepFieldTitleModule,
95
+ PepGroupButtonsModule,
96
+ PepSliderModule], exports: [ShadowSettingsComponent] });
97
+ PepShadowSettingsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, imports: [[
98
+ CommonModule,
99
+ PepNgxLibModule,
100
+ PepCheckboxModule,
101
+ PepFieldTitleModule,
102
+ PepGroupButtonsModule,
103
+ PepSliderModule
104
+ ]] });
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: PepShadowSettingsModule, decorators: [{
106
+ type: NgModule,
107
+ args: [{
108
+ declarations: [
109
+ ShadowSettingsComponent
110
+ ],
111
+ imports: [
112
+ CommonModule,
113
+ PepNgxLibModule,
114
+ PepCheckboxModule,
115
+ PepFieldTitleModule,
116
+ PepGroupButtonsModule,
117
+ PepSliderModule
118
+ ],
119
+ exports: [ShadowSettingsComponent],
120
+ }]
121
121
  }] });
122
122
 
123
- /*
124
- * Public API Surface of ngx-composite-lib/shadow-settings
123
+ /*
124
+ * Public API Surface of ngx-composite-lib/shadow-settings
125
125
  */
126
126
 
127
- /**
128
- * Generated bundle index. Do not edit.
127
+ /**
128
+ * Generated bundle index. Do not edit.
129
129
  */
130
130
 
131
131
  export { PepShadowSettings, PepShadowSettingsModule, ShadowSettingsComponent };