@pepperi-addons/ngx-lib 0.2.51 → 0.2.55
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-lib-slider.umd.js +16 -8
- package/bundles/pepperi-addons-ngx-lib-slider.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib.umd.js +300 -253
- package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
- package/core/common/services/addon.service.d.ts +8 -3
- package/core/common/services/public-api.d.ts +1 -0
- package/core/common/services/translate.service.d.ts +9 -0
- package/esm2015/core/common/services/addon.service.js +36 -34
- package/esm2015/core/common/services/public-api.js +2 -1
- package/esm2015/core/common/services/translate.service.js +48 -0
- package/esm2015/slider/slider.component.js +17 -9
- package/fesm2015/pepperi-addons-ngx-lib-slider.js +16 -8
- package/fesm2015/pepperi-addons-ngx-lib-slider.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.js +285 -243
- package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
- package/package.json +1 -1
- package/pepperi-addons-ngx-lib.metadata.json +1 -1
- package/slider/pepperi-addons-ngx-lib-slider.metadata.json +1 -1
- package/slider/slider.component.d.ts +5 -3
- package/src/core/style/base/typography.scss +28 -0
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
this.step = 1;
|
|
25
25
|
this.minValue = NaN;
|
|
26
26
|
this.maxValue = NaN;
|
|
27
|
-
this._value =
|
|
27
|
+
this._value = NaN;
|
|
28
28
|
this.valueChange = new core.EventEmitter();
|
|
29
|
+
this.inputChange = new core.EventEmitter();
|
|
29
30
|
this.xAlignment = ngxLib.DEFAULT_HORIZONTAL_ALIGNMENT;
|
|
30
31
|
this.sliderWrapper = null;
|
|
31
32
|
}
|
|
@@ -48,22 +49,25 @@
|
|
|
48
49
|
return this._value;
|
|
49
50
|
},
|
|
50
51
|
set: function (value) {
|
|
51
|
-
if (!value) {
|
|
52
|
-
value = '';
|
|
53
|
-
}
|
|
54
52
|
this._value = value;
|
|
55
53
|
},
|
|
56
54
|
enumerable: false,
|
|
57
55
|
configurable: true
|
|
58
56
|
});
|
|
59
57
|
PepSliderComponent.prototype.setBackground = function () {
|
|
60
|
-
var _a;
|
|
58
|
+
var _a, _b;
|
|
61
59
|
// Get the wrapper for set the background.
|
|
62
60
|
if (!this.sliderWrapper) {
|
|
63
61
|
this.sliderWrapper = this.element.nativeElement.querySelector('.mat-slider-wrapper');
|
|
64
62
|
}
|
|
65
63
|
if (this.sliderWrapper) {
|
|
66
|
-
this.renderer.setStyle(this.sliderWrapper, 'background', ((_a = this.background) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.background : '
|
|
64
|
+
this.renderer.setStyle(this.sliderWrapper, 'background', ((_a = this.background) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.background : '');
|
|
65
|
+
if (((_b = this.background) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
66
|
+
this.renderer.removeClass(this.sliderWrapper, 'background-color-dimmed');
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
this.renderer.addClass(this.sliderWrapper, 'background-color-dimmed');
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
};
|
|
69
73
|
PepSliderComponent.prototype.ngOnInit = function () {
|
|
@@ -73,12 +77,15 @@
|
|
|
73
77
|
PepSliderComponent.prototype.onValueChange = function (event) {
|
|
74
78
|
this.valueChange.emit(event.value);
|
|
75
79
|
};
|
|
80
|
+
PepSliderComponent.prototype.onInputChange = function (event) {
|
|
81
|
+
this.inputChange.emit(event.value);
|
|
82
|
+
};
|
|
76
83
|
return PepSliderComponent;
|
|
77
84
|
}());
|
|
78
85
|
PepSliderComponent.decorators = [
|
|
79
86
|
{ type: core.Component, args: [{
|
|
80
87
|
selector: 'pep-slider',
|
|
81
|
-
template: "<div class=\"pep-slider-container\">\n <pep-field-title [label]=\"label\" [disabled]=\"disabled\" [hint]=\"hint\" [xAlignment]=\"xAlignment\">\n </pep-field-title>\n <mat-slider [min]=\"minValue\" [max]=\"maxValue\" [step]=\"step\" [value]=\"value\" [disabled]=\"disabled\" [title]=\"value\"\n (change)=\"onValueChange($event)\">\n </mat-slider>\n</div>",
|
|
88
|
+
template: "<div class=\"pep-slider-container\">\n <pep-field-title [label]=\"label\" [disabled]=\"disabled\" [hint]=\"hint\" [xAlignment]=\"xAlignment\">\n </pep-field-title>\n <mat-slider [min]=\"minValue\" [max]=\"maxValue\" [step]=\"step\" [value]=\"value\" [disabled]=\"disabled\" [title]=\"value\"\n (change)=\"onValueChange($event)\" (input)=\"onInputChange($event)\">\n </mat-slider>\n</div>",
|
|
82
89
|
styles: [""]
|
|
83
90
|
},] }
|
|
84
91
|
];
|
|
@@ -96,7 +103,8 @@
|
|
|
96
103
|
minValue: [{ type: core.Input }],
|
|
97
104
|
maxValue: [{ type: core.Input }],
|
|
98
105
|
value: [{ type: core.Input }],
|
|
99
|
-
valueChange: [{ type: core.Output }]
|
|
106
|
+
valueChange: [{ type: core.Output }],
|
|
107
|
+
inputChange: [{ type: core.Output }]
|
|
100
108
|
};
|
|
101
109
|
|
|
102
110
|
var PepSliderModule = /** @class */ (function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-slider.umd.js","sources":["../../../projects/ngx-lib/slider/slider.component.ts","../../../projects/ngx-lib/slider/slider.module.ts","../../../projects/ngx-lib/slider/public-api.ts","../../../projects/ngx-lib/slider/pepperi-addons-ngx-lib-slider.ts"],"sourcesContent":["import {\n Component,\n OnDestroy,\n Input,\n Output,\n EventEmitter,\n Renderer2,\n ElementRef,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { PepLayoutService, DEFAULT_HORIZONTAL_ALIGNMENT, PepHorizontalAlignment } from '@pepperi-addons/ngx-lib';\n\n/**\n * This is a slider component that support pepperi theme\n * style & state & sizes\n *\n * @export\n * @class PepSliderComponent\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'pep-slider',\n templateUrl: './slider.component.html',\n styleUrls: ['./slider.component.scss'],\n})\nexport class PepSliderComponent implements OnInit {\n @Input() label = '';\n @Input() disabled = false;\n @Input() hint = '';\n\n private _background = '';\n @Input()\n set background(background: string) {\n if (!background) {\n background = '';\n }\n\n this._background = background;\n this.setBackground();\n }\n get background(): string {\n return this._background;\n }\n\n @Input() step = 1;\n @Input() minValue = NaN;\n @Input() maxValue = NaN;\n\n private _value =
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-slider.umd.js","sources":["../../../projects/ngx-lib/slider/slider.component.ts","../../../projects/ngx-lib/slider/slider.module.ts","../../../projects/ngx-lib/slider/public-api.ts","../../../projects/ngx-lib/slider/pepperi-addons-ngx-lib-slider.ts"],"sourcesContent":["import {\n Component,\n OnDestroy,\n Input,\n Output,\n EventEmitter,\n Renderer2,\n ElementRef,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { PepLayoutService, DEFAULT_HORIZONTAL_ALIGNMENT, PepHorizontalAlignment } from '@pepperi-addons/ngx-lib';\n\n/**\n * This is a slider component that support pepperi theme\n * style & state & sizes\n *\n * @export\n * @class PepSliderComponent\n * @implements {OnDestroy}\n */\n@Component({\n selector: 'pep-slider',\n templateUrl: './slider.component.html',\n styleUrls: ['./slider.component.scss'],\n})\nexport class PepSliderComponent implements OnInit {\n @Input() label = '';\n @Input() disabled = false;\n @Input() hint = '';\n\n private _background = '';\n @Input()\n set background(background: string) {\n if (!background) {\n background = '';\n }\n\n this._background = background;\n this.setBackground();\n }\n get background(): string {\n return this._background;\n }\n\n @Input() step = 1;\n @Input() minValue = NaN;\n @Input() maxValue = NaN;\n\n private _value: number = NaN;\n @Input()\n set value(value: number) {\n this._value = value;\n }\n get value(): number {\n return this._value;\n }\n\n @Output()\n valueChange: EventEmitter<number> = new EventEmitter<number>();\n\n @Output()\n inputChange: EventEmitter<number> = new EventEmitter<number>();\n\n xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n sliderWrapper: any = null;\n\n constructor(private renderer: Renderer2, private element: ElementRef, private pepLayoutService: PepLayoutService) { }\n\n private setBackground(): void {\n // Get the wrapper for set the background.\n if (!this.sliderWrapper) {\n this.sliderWrapper = this.element.nativeElement.querySelector('.mat-slider-wrapper');\n }\n\n if (this.sliderWrapper) {\n this.renderer.setStyle(this.sliderWrapper, 'background', this.background?.length > 0 ? this.background : '');\n\n if (this.background?.length > 0) {\n this.renderer.removeClass(this.sliderWrapper, 'background-color-dimmed');\n } else {\n this.renderer.addClass(this.sliderWrapper, 'background-color-dimmed');\n }\n }\n }\n\n ngOnInit(): void {\n this.xAlignment = this.pepLayoutService.isRtl() ? 'right' : 'left';\n this.setBackground();\n }\n\n onValueChange(event) {\n this.valueChange.emit(event.value);\n }\n\n onInputChange(event) {\n this.inputChange.emit(event.value);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\n\nimport { PepSliderComponent } from './slider.component';\n\n@NgModule({\n imports: [\n CommonModule,\n // Material modules\n MatCommonModule,\n MatSliderModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepFieldTitleModule,\n ],\n exports: [PepSliderComponent],\n declarations: [PepSliderComponent],\n})\nexport class PepSliderModule { }\n","/*\n * Public API Surface of ngx-lib/slider\n */\nexport * from './slider.module';\nexport * from './slider.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EventEmitter","DEFAULT_HORIZONTAL_ALIGNMENT","Component","Renderer2","ElementRef","PepLayoutService","Input","Output","NgModule","CommonModule","MatCommonModule","MatSliderModule","PepNgxLibModule","PepFieldTitleModule"],"mappings":";;;;;;IAaA;;;;;;;;;QAsDI,4BAAoB,QAAmB,EAAU,OAAmB,EAAU,gBAAkC;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