@wizishop/angular-components 14.3.32 → 14.4.1
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/angular-components.scss +2 -73
- package/esm2020/lib/components/inputs/input-with-select/input-with-select.component.mjs +8 -47
- package/esm2020/lib/components/selects/select-test/select.directive.mjs +2 -1
- package/esm2020/lib/components/selects/select-test/value-change.service.mjs +2 -2
- package/fesm2015/wizishop-angular-components.mjs +45 -81
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +45 -81
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/inputs/input-with-select/input-with-select.component.d.ts +3 -17
- package/package.json +1 -1
- package/wizishop-angular-components-14.4.1.tgz +0 -0
- package/wizishop-angular-components-14.3.32.tgz +0 -0
|
@@ -547,7 +547,7 @@ class ValueChangeService {
|
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
updateSelectPlaceholder() {
|
|
550
|
-
if (!this.value) {
|
|
550
|
+
if (!this.value && typeof this.value !== 'number') {
|
|
551
551
|
this.selectedOptionContent = null;
|
|
552
552
|
return;
|
|
553
553
|
}
|
|
@@ -593,6 +593,7 @@ class SelectDirective {
|
|
|
593
593
|
this.onChange = () => { };
|
|
594
594
|
this.onTouch = () => { };
|
|
595
595
|
}
|
|
596
|
+
// TODO add default value in wacSelect/wacOption
|
|
596
597
|
get tabindex() {
|
|
597
598
|
return this.tabIndex;
|
|
598
599
|
}
|
|
@@ -3808,80 +3809,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
3808
3809
|
type: Output
|
|
3809
3810
|
}] } });
|
|
3810
3811
|
|
|
3811
|
-
class
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
if (!options) {
|
|
3815
|
-
return isFieldArray ? [] : '';
|
|
3816
|
-
}
|
|
3817
|
-
const optionSelected = options.find((item) => item.active);
|
|
3818
|
-
if (!optionSelected) {
|
|
3819
|
-
return isFieldArray ? [] : '';
|
|
3820
|
-
}
|
|
3821
|
-
if (isFieldArray) {
|
|
3822
|
-
return field.reduce((acc, curr) => {
|
|
3823
|
-
return acc[curr];
|
|
3824
|
-
}, optionSelected);
|
|
3825
|
-
}
|
|
3826
|
-
return optionSelected[field];
|
|
3812
|
+
class LabelComponent {
|
|
3813
|
+
constructor() { }
|
|
3814
|
+
ngOnInit() {
|
|
3827
3815
|
}
|
|
3828
3816
|
}
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type:
|
|
3832
|
-
type:
|
|
3833
|
-
args: [{
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
}] });
|
|
3817
|
+
LabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3818
|
+
LabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: LabelComponent, selector: "wac-label", host: { classAttribute: "wac-label" }, ngImport: i0, template: "<ng-content></ng-content>" });
|
|
3819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LabelComponent, decorators: [{
|
|
3820
|
+
type: Component,
|
|
3821
|
+
args: [{ selector: 'wac-label', host: {
|
|
3822
|
+
'class': 'wac-label'
|
|
3823
|
+
}, template: "<ng-content></ng-content>" }]
|
|
3824
|
+
}], ctorParameters: function () { return []; } });
|
|
3837
3825
|
|
|
3838
3826
|
class InputWithSelectComponent {
|
|
3839
|
-
constructor() {
|
|
3840
|
-
this.showSelect = false;
|
|
3841
|
-
this.inputValueChange = new EventEmitter();
|
|
3842
|
-
this.selectValueChange = new EventEmitter();
|
|
3843
|
-
}
|
|
3844
|
-
onClickItem(index) {
|
|
3845
|
-
this.unActiveAll();
|
|
3846
|
-
const optionSelected = this.options[index];
|
|
3847
|
-
optionSelected.active = true;
|
|
3848
|
-
this.showSelect = false;
|
|
3849
|
-
this.selectValueChange.emit(index);
|
|
3850
|
-
}
|
|
3851
|
-
onToggleSelect() {
|
|
3852
|
-
this.showSelect = !this.showSelect;
|
|
3853
|
-
}
|
|
3854
|
-
onCloseSelect() {
|
|
3855
|
-
this.showSelect = false;
|
|
3856
|
-
}
|
|
3857
|
-
onChangeInputValue(e) {
|
|
3858
|
-
this.inputValueChange.emit(e.target.value);
|
|
3859
|
-
}
|
|
3860
|
-
unActiveAll() {
|
|
3861
|
-
this.options.forEach((item) => {
|
|
3862
|
-
item.active = false;
|
|
3863
|
-
});
|
|
3864
|
-
}
|
|
3865
3827
|
}
|
|
3866
3828
|
InputWithSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputWithSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3867
|
-
InputWithSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputWithSelectComponent, selector: "wac-input-with-select",
|
|
3829
|
+
InputWithSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputWithSelectComponent, selector: "wac-input-with-select", queries: [{ propertyName: "label", first: true, predicate: LabelComponent, descendants: true }], ngImport: i0, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n<div class=\"wac-input-with-select\">\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"wac-select-test\"></ng-content>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <ng-content select=\"[text]\"></ng-content>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3868
3830
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputWithSelectComponent, decorators: [{
|
|
3869
3831
|
type: Component,
|
|
3870
|
-
args: [{ selector: 'wac-input-with-select', template: "<
|
|
3871
|
-
}],
|
|
3872
|
-
type:
|
|
3873
|
-
|
|
3874
|
-
type: Input
|
|
3875
|
-
}], options: [{
|
|
3876
|
-
type: Input
|
|
3877
|
-
}], placeholder: [{
|
|
3878
|
-
type: Input
|
|
3879
|
-
}], id: [{
|
|
3880
|
-
type: Input
|
|
3881
|
-
}], inputValueChange: [{
|
|
3882
|
-
type: Output
|
|
3883
|
-
}], selectValueChange: [{
|
|
3884
|
-
type: Output
|
|
3832
|
+
args: [{ selector: 'wac-input-with-select', encapsulation: ViewEncapsulation.None, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n<div class=\"wac-input-with-select\">\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\">\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"wac-select-test\"></ng-content>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <ng-content select=\"[text]\"></ng-content>\n </div>\n </div>\n</div>\n" }]
|
|
3833
|
+
}], propDecorators: { label: [{
|
|
3834
|
+
type: ContentChild,
|
|
3835
|
+
args: [LabelComponent]
|
|
3885
3836
|
}] } });
|
|
3886
3837
|
|
|
3887
3838
|
class PopinComponent {
|
|
@@ -4641,6 +4592,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4641
4592
|
}]
|
|
4642
4593
|
}] });
|
|
4643
4594
|
|
|
4595
|
+
class FindOptionSelectedPipe {
|
|
4596
|
+
transform(options, field) {
|
|
4597
|
+
const isFieldArray = Array.isArray(field);
|
|
4598
|
+
if (!options) {
|
|
4599
|
+
return isFieldArray ? [] : '';
|
|
4600
|
+
}
|
|
4601
|
+
const optionSelected = options.find((item) => item.active);
|
|
4602
|
+
if (!optionSelected) {
|
|
4603
|
+
return isFieldArray ? [] : '';
|
|
4604
|
+
}
|
|
4605
|
+
if (isFieldArray) {
|
|
4606
|
+
return field.reduce((acc, curr) => {
|
|
4607
|
+
return acc[curr];
|
|
4608
|
+
}, optionSelected);
|
|
4609
|
+
}
|
|
4610
|
+
return optionSelected[field];
|
|
4611
|
+
}
|
|
4612
|
+
}
|
|
4613
|
+
FindOptionSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FindOptionSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4614
|
+
FindOptionSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.7", ngImport: i0, type: FindOptionSelectedPipe, name: "wacFindOptionSelectedField" });
|
|
4615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: FindOptionSelectedPipe, decorators: [{
|
|
4616
|
+
type: Pipe,
|
|
4617
|
+
args: [{
|
|
4618
|
+
name: 'wacFindOptionSelectedField'
|
|
4619
|
+
}]
|
|
4620
|
+
}] });
|
|
4621
|
+
|
|
4644
4622
|
const exportedPipes = [
|
|
4645
4623
|
FormatObjectToRecursifTreePipe,
|
|
4646
4624
|
FormatObjectToSimpleTreePipe,
|
|
@@ -4730,20 +4708,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
4730
4708
|
args: ['searchInput']
|
|
4731
4709
|
}] } });
|
|
4732
4710
|
|
|
4733
|
-
class LabelComponent {
|
|
4734
|
-
constructor() { }
|
|
4735
|
-
ngOnInit() {
|
|
4736
|
-
}
|
|
4737
|
-
}
|
|
4738
|
-
LabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4739
|
-
LabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: LabelComponent, selector: "wac-label", host: { classAttribute: "wac-label" }, ngImport: i0, template: "<ng-content></ng-content>" });
|
|
4740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: LabelComponent, decorators: [{
|
|
4741
|
-
type: Component,
|
|
4742
|
-
args: [{ selector: 'wac-label', host: {
|
|
4743
|
-
'class': 'wac-label'
|
|
4744
|
-
}, template: "<ng-content></ng-content>" }]
|
|
4745
|
-
}], ctorParameters: function () { return []; } });
|
|
4746
|
-
|
|
4747
4711
|
class SelectTestComponent extends SelectDirective {
|
|
4748
4712
|
constructor(valueChangeService) {
|
|
4749
4713
|
super(valueChangeService);
|