@wizishop/angular-components 15.1.126 → 15.1.127
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/esm2020/lib/components/border-picker/border-picker.component.mjs +20 -11
- package/fesm2015/wizishop-angular-components.mjs +19 -10
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +19 -10
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/border-picker/border-picker.component.d.ts +2 -1
- package/package.json +1 -1
- package/wizishop-angular-components-15.1.127.tgz +0 -0
- package/wizishop-angular-components-15.1.126.tgz +0 -0
|
@@ -6667,7 +6667,8 @@ class BorderPickerComponent {
|
|
|
6667
6667
|
this.gap = '12px';
|
|
6668
6668
|
this.fontSize = '14px';
|
|
6669
6669
|
this.disabled = false;
|
|
6670
|
-
this.value = '
|
|
6670
|
+
this.value = '0px';
|
|
6671
|
+
this.maxPixels = 50; // Valeur maximale en pixels
|
|
6671
6672
|
this.blurred = new EventEmitter();
|
|
6672
6673
|
this.borderRadiusChange = new EventEmitter();
|
|
6673
6674
|
this.sliderValue = 0;
|
|
@@ -6676,7 +6677,7 @@ class BorderPickerComponent {
|
|
|
6676
6677
|
}
|
|
6677
6678
|
ngOnInit() {
|
|
6678
6679
|
if (this.value) {
|
|
6679
|
-
const numericValue = parseInt(this.value.replace('
|
|
6680
|
+
const numericValue = parseInt(this.value.replace('px', ''), 10);
|
|
6680
6681
|
if (!isNaN(numericValue)) {
|
|
6681
6682
|
this.sliderValue = numericValue;
|
|
6682
6683
|
}
|
|
@@ -6685,6 +6686,11 @@ class BorderPickerComponent {
|
|
|
6685
6686
|
writeValue(value) {
|
|
6686
6687
|
if (value !== undefined) {
|
|
6687
6688
|
this.value = value;
|
|
6689
|
+
const numericValue = parseInt(this.value.replace('px', ''), 10);
|
|
6690
|
+
if (!isNaN(numericValue)) {
|
|
6691
|
+
this.sliderValue = numericValue;
|
|
6692
|
+
this.updateSliderPercentage();
|
|
6693
|
+
}
|
|
6688
6694
|
}
|
|
6689
6695
|
}
|
|
6690
6696
|
registerOnChange(fn) {
|
|
@@ -6695,7 +6701,7 @@ class BorderPickerComponent {
|
|
|
6695
6701
|
}
|
|
6696
6702
|
setValue(event) {
|
|
6697
6703
|
this.value = event.target.value;
|
|
6698
|
-
const numericValue = parseInt(this.value.replace('
|
|
6704
|
+
const numericValue = parseInt(this.value.replace('px', ''), 10);
|
|
6699
6705
|
if (!isNaN(numericValue)) {
|
|
6700
6706
|
this.sliderValue = numericValue;
|
|
6701
6707
|
this.updateSliderPercentage();
|
|
@@ -6706,21 +6712,22 @@ class BorderPickerComponent {
|
|
|
6706
6712
|
updateSliderPercentage() {
|
|
6707
6713
|
const slider = document.querySelector('.bp-range');
|
|
6708
6714
|
if (slider) {
|
|
6709
|
-
|
|
6715
|
+
const percentage = (this.sliderValue / this.maxPixels) * 100;
|
|
6716
|
+
slider.style.setProperty('--slider-percentage', `${percentage}%`);
|
|
6710
6717
|
}
|
|
6711
6718
|
}
|
|
6712
6719
|
ngAfterViewInit() {
|
|
6713
6720
|
this.updateSliderPercentage();
|
|
6714
6721
|
}
|
|
6715
6722
|
onFocusOut() {
|
|
6716
|
-
if (!this.value.endsWith('
|
|
6717
|
-
this.value = this.value + '
|
|
6723
|
+
if (!this.value.endsWith('px') && this.value) {
|
|
6724
|
+
this.value = this.value + 'px';
|
|
6718
6725
|
this.onChange(this.value);
|
|
6719
6726
|
this.borderRadiusChange.emit(this.value);
|
|
6720
6727
|
}
|
|
6721
6728
|
}
|
|
6722
6729
|
updateBorderRadius(value) {
|
|
6723
|
-
this.value = value + '
|
|
6730
|
+
this.value = value + 'px';
|
|
6724
6731
|
this.updateSliderPercentage();
|
|
6725
6732
|
this.onChange(this.value);
|
|
6726
6733
|
this.borderRadiusChange.emit(this.value);
|
|
@@ -6731,13 +6738,13 @@ class BorderPickerComponent {
|
|
|
6731
6738
|
}
|
|
6732
6739
|
}
|
|
6733
6740
|
BorderPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BorderPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6734
|
-
BorderPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: BorderPickerComponent, isStandalone: true, selector: "wac-border-picker", inputs: { label: "label", gap: "gap", fontSize: "fontSize", disabled: "disabled", value: "value" }, outputs: { blurred: "blurred", borderRadiusChange: "borderRadiusChange" }, providers: [
|
|
6741
|
+
BorderPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: BorderPickerComponent, isStandalone: true, selector: "wac-border-picker", inputs: { label: "label", gap: "gap", fontSize: "fontSize", disabled: "disabled", value: "value", maxPixels: "maxPixels" }, outputs: { blurred: "blurred", borderRadiusChange: "borderRadiusChange" }, providers: [
|
|
6735
6742
|
{
|
|
6736
6743
|
provide: NG_VALUE_ACCESSOR,
|
|
6737
6744
|
useExisting: forwardRef(() => BorderPickerComponent),
|
|
6738
6745
|
multi: true
|
|
6739
6746
|
}
|
|
6740
|
-
], ngImport: i0, template: "<div class=\"w-border-picker\" [ngStyle]=\"{'gap': gap}\">\r\n\r\n <label class=\"bp-label\" for=\"borderPicker\" [ngStyle]=\"{'font-size': fontSize}\">{{ label }}</label>\r\n\r\n <div class=\"w-input\">\r\n\r\n <div class=\"border-preview\" [ngStyle]=\"{'border-radius': value}\">\r\n <div class=\"mask1\"></div>\r\n <div class=\"mask2\"></div>\r\n </div>\r\n\r\n <input\r\n class=\"bp-range\"\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"
|
|
6747
|
+
], ngImport: i0, template: "<div class=\"w-border-picker\" [ngStyle]=\"{'gap': gap}\">\r\n\r\n <label class=\"bp-label\" for=\"borderPicker\" [ngStyle]=\"{'font-size': fontSize}\">{{ label }}</label>\r\n\r\n <div class=\"w-input\">\r\n\r\n <div class=\"border-preview\" [ngStyle]=\"{'border-radius': value}\">\r\n <div class=\"mask1\"></div>\r\n <div class=\"mask2\"></div>\r\n </div>\r\n\r\n <input\r\n class=\"bp-range\"\r\n type=\"range\"\r\n min=\"0\"\r\n [max]=\"maxPixels\"\r\n [(ngModel)]=\"sliderValue\"\r\n (ngModelChange)=\"updateBorderRadius($event)\"\r\n />\r\n\r\n <input\r\n class=\"bp-input\"\r\n id=\"borderPicker\"\r\n [placeholder]=\"sliderValue\"\r\n maxlength=\"5\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onChange($event)\"\r\n (focusout)=\"onFocusOut()\"\r\n (input)=\"setValue($event)\"\r\n />\r\n\r\n </div>\r\n\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
6741
6748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BorderPickerComponent, decorators: [{
|
|
6742
6749
|
type: Component,
|
|
6743
6750
|
args: [{ selector: "wac-border-picker", standalone: true, imports: [
|
|
@@ -6749,7 +6756,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
6749
6756
|
useExisting: forwardRef(() => BorderPickerComponent),
|
|
6750
6757
|
multi: true
|
|
6751
6758
|
}
|
|
6752
|
-
], template: "<div class=\"w-border-picker\" [ngStyle]=\"{'gap': gap}\">\r\n\r\n <label class=\"bp-label\" for=\"borderPicker\" [ngStyle]=\"{'font-size': fontSize}\">{{ label }}</label>\r\n\r\n <div class=\"w-input\">\r\n\r\n <div class=\"border-preview\" [ngStyle]=\"{'border-radius': value}\">\r\n <div class=\"mask1\"></div>\r\n <div class=\"mask2\"></div>\r\n </div>\r\n\r\n <input\r\n class=\"bp-range\"\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"
|
|
6759
|
+
], template: "<div class=\"w-border-picker\" [ngStyle]=\"{'gap': gap}\">\r\n\r\n <label class=\"bp-label\" for=\"borderPicker\" [ngStyle]=\"{'font-size': fontSize}\">{{ label }}</label>\r\n\r\n <div class=\"w-input\">\r\n\r\n <div class=\"border-preview\" [ngStyle]=\"{'border-radius': value}\">\r\n <div class=\"mask1\"></div>\r\n <div class=\"mask2\"></div>\r\n </div>\r\n\r\n <input\r\n class=\"bp-range\"\r\n type=\"range\"\r\n min=\"0\"\r\n [max]=\"maxPixels\"\r\n [(ngModel)]=\"sliderValue\"\r\n (ngModelChange)=\"updateBorderRadius($event)\"\r\n />\r\n\r\n <input\r\n class=\"bp-input\"\r\n id=\"borderPicker\"\r\n [placeholder]=\"sliderValue\"\r\n maxlength=\"5\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onChange($event)\"\r\n (focusout)=\"onFocusOut()\"\r\n (input)=\"setValue($event)\"\r\n />\r\n\r\n </div>\r\n\r\n</div>" }]
|
|
6753
6760
|
}], ctorParameters: function () { return []; }, propDecorators: { label: [{
|
|
6754
6761
|
type: Input
|
|
6755
6762
|
}], gap: [{
|
|
@@ -6760,6 +6767,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
6760
6767
|
type: Input
|
|
6761
6768
|
}], value: [{
|
|
6762
6769
|
type: Input
|
|
6770
|
+
}], maxPixels: [{
|
|
6771
|
+
type: Input
|
|
6763
6772
|
}], blurred: [{
|
|
6764
6773
|
type: Output
|
|
6765
6774
|
}], borderRadiusChange: [{
|