@wizishop/angular-components 14.3.31 → 14.3.33

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.
@@ -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
  }
@@ -824,11 +825,12 @@ const inOutY = trigger('inOutYAnimation', [
824
825
  class CheckboxComponent {
825
826
  constructor() {
826
827
  this.label = '';
828
+ this.type = 'checkbox';
827
829
  this.alone = false;
828
830
  this.checked = false;
829
831
  this.hasInput = false; // todo remove from it ! That is not a part of a checkbox
830
832
  this.inputPlaceholder = ''; // todo remove from it ! That is not a part of a checkbox
831
- this.id = '';
833
+ this.id = ''; // todo maybe create a static property for unique id
832
834
  this.whiteSpace = true;
833
835
  this.disabled = false;
834
836
  this.valueChange = new EventEmitter();
@@ -863,10 +865,10 @@ class CheckboxComponent {
863
865
  }
864
866
  }
865
867
  CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
866
- CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CheckboxComponent, selector: "wac-checkbox", inputs: { label: "label", value: "value", type: "type", alone: "alone", checked: "checked", hasInput: "hasInput", inputPlaceholder: "inputPlaceholder", id: "id", name: "name", whiteSpace: "whiteSpace" }, outputs: { valueChange: "valueChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], ngImport: i0, template: "<div class=\"wac-field-checkbox\" [ngClass]=\"{ 'wac-field-checkbox--nowrap': type === 'column', 'disable-wt' : !whiteSpace, alone: alone }\">\n <div class=\"wac-field-checkbox__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n />\n <label [attr.for]=\"id\"><span [innerHTML]=\"label\"></span></label>\n </div>\n <input\n *ngIf=\"hasInput && checked\"\n [@inOutYAnimation]\n type=\"text\"\n [placeholder]=\"inputPlaceholder\"\n (click)=\"inputClick($event)\"\n />\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [inOutY] });
868
+ CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CheckboxComponent, selector: "wac-checkbox", inputs: { label: "label", value: "value", type: "type", alone: "alone", checked: "checked", hasInput: "hasInput", inputPlaceholder: "inputPlaceholder", id: "id", name: "name", whiteSpace: "whiteSpace" }, outputs: { valueChange: "valueChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], ngImport: i0, template: "<div class=\"wac-field-checkbox\" [ngClass]=\"{ 'disable-wt' : !whiteSpace, alone: alone }\">\n <div class=\"wac-field-checkbox__row\">\n <!-- TODO handle radio styles -->\n <input\n [type]=\"type\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n />\n <label [attr.for]=\"id\"><span [innerHTML]=\"label\"></span></label>\n </div>\n <input\n *ngIf=\"hasInput && checked\"\n [@inOutYAnimation]\n type=\"text\"\n [placeholder]=\"inputPlaceholder\"\n (click)=\"inputClick($event)\"\n />\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [inOutY], encapsulation: i0.ViewEncapsulation.None });
867
869
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CheckboxComponent, decorators: [{
868
870
  type: Component,
869
- args: [{ selector: 'wac-checkbox', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], animations: [inOutY], template: "<div class=\"wac-field-checkbox\" [ngClass]=\"{ 'wac-field-checkbox--nowrap': type === 'column', 'disable-wt' : !whiteSpace, alone: alone }\">\n <div class=\"wac-field-checkbox__row\">\n <input\n type=\"checkbox\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n />\n <label [attr.for]=\"id\"><span [innerHTML]=\"label\"></span></label>\n </div>\n <input\n *ngIf=\"hasInput && checked\"\n [@inOutYAnimation]\n type=\"text\"\n [placeholder]=\"inputPlaceholder\"\n (click)=\"inputClick($event)\"\n />\n</div>\n" }]
871
+ args: [{ selector: 'wac-checkbox', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }], animations: [inOutY], encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-field-checkbox\" [ngClass]=\"{ 'disable-wt' : !whiteSpace, alone: alone }\">\n <div class=\"wac-field-checkbox__row\">\n <!-- TODO handle radio styles -->\n <input\n [type]=\"type\"\n [id]=\"id\"\n class=\"is-checkradio\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n />\n <label [attr.for]=\"id\"><span [innerHTML]=\"label\"></span></label>\n </div>\n <input\n *ngIf=\"hasInput && checked\"\n [@inOutYAnimation]\n type=\"text\"\n [placeholder]=\"inputPlaceholder\"\n (click)=\"inputClick($event)\"\n />\n</div>\n" }]
870
872
  }], ctorParameters: function () { return []; }, propDecorators: { label: [{
871
873
  type: Input
872
874
  }], value: [{
@@ -3863,10 +3865,10 @@ class InputWithSelectComponent {
3863
3865
  }
3864
3866
  }
3865
3867
  InputWithSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputWithSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3866
- InputWithSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputWithSelectComponent, selector: "wac-input-with-select", inputs: { label: "label", text: "text", options: "options", placeholder: "placeholder", id: "id" }, outputs: { inputValueChange: "inputValueChange", selectValueChange: "selectValueChange" }, ngImport: i0, template: "<div class=\"wac-input-with-select\" [zIndexToggle]=\"showSelect\">\n <label class=\"wac-input-with-select__label\" [for]=\"id\" [innerHTML]=\"label\"></label>\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\" wzAutoHide (clickOutside)=\"onCloseSelect()\">\n <input [id]=\"id\" type=\"text\" [placeholder]=\"placeholder\" (change)=\"onChangeInputValue($event)\" />\n <div class=\"wac-input-with-select__wrapper__left__current\">\n <span (click)=\"onToggleSelect()\">{{ options | wacFindOptionSelectedField: 'label' }}</span>\n </div>\n <div class=\"wac-input-with-select__wrapper__left__select\" *ngIf=\"showSelect\">\n <div class=\"wac-input-with-select__wrapper__left__select__item\" *ngFor=\"let option of options; let index = index\">\n <div (click)=\"onClickItem(index)\">{{ option.label }}</div>\n </div>\n </div>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <p [innerHTML]=\"text\"></p>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "pipe", type: FindOptionSelectedPipe, name: "wacFindOptionSelectedField" }] });
3868
+ InputWithSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: InputWithSelectComponent, selector: "wac-input-with-select", inputs: { label: "label", text: "text", options: "options", placeholder: "placeholder", id: "id", value: "value" }, outputs: { inputValueChange: "inputValueChange", selectValueChange: "selectValueChange" }, ngImport: i0, template: "<div class=\"wac-input-with-select\" [zIndexToggle]=\"showSelect\">\n <label class=\"wac-input-with-select__label\" [for]=\"id\" [innerHTML]=\"label\"></label>\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\" wzAutoHide (clickOutside)=\"onCloseSelect()\">\n <input [id]=\"id\" type=\"text\" [placeholder]=\"placeholder\" [(ngModel)]=\"value\" (ngModelChange)=\"onChangeInputValue($event)\"/>\n <div class=\"wac-input-with-select__wrapper__left__current\">\n <span (click)=\"onToggleSelect()\">{{ options | wacFindOptionSelectedField: 'label' }}</span>\n </div>\n <div class=\"wac-input-with-select__wrapper__left__select\" *ngIf=\"showSelect\">\n <div class=\"wac-input-with-select__wrapper__left__select__item\" *ngFor=\"let option of options; let index = index\">\n <div (click)=\"onClickItem(index)\">{{ option.label }}</div>\n </div>\n </div>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <p [innerHTML]=\"text\"></p>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "pipe", type: FindOptionSelectedPipe, name: "wacFindOptionSelectedField" }] });
3867
3869
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: InputWithSelectComponent, decorators: [{
3868
3870
  type: Component,
3869
- args: [{ selector: 'wac-input-with-select', template: "<div class=\"wac-input-with-select\" [zIndexToggle]=\"showSelect\">\n <label class=\"wac-input-with-select__label\" [for]=\"id\" [innerHTML]=\"label\"></label>\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\" wzAutoHide (clickOutside)=\"onCloseSelect()\">\n <input [id]=\"id\" type=\"text\" [placeholder]=\"placeholder\" (change)=\"onChangeInputValue($event)\" />\n <div class=\"wac-input-with-select__wrapper__left__current\">\n <span (click)=\"onToggleSelect()\">{{ options | wacFindOptionSelectedField: 'label' }}</span>\n </div>\n <div class=\"wac-input-with-select__wrapper__left__select\" *ngIf=\"showSelect\">\n <div class=\"wac-input-with-select__wrapper__left__select__item\" *ngFor=\"let option of options; let index = index\">\n <div (click)=\"onClickItem(index)\">{{ option.label }}</div>\n </div>\n </div>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <p [innerHTML]=\"text\"></p>\n </div>\n </div>\n</div>\n" }]
3871
+ args: [{ selector: 'wac-input-with-select', template: "<div class=\"wac-input-with-select\" [zIndexToggle]=\"showSelect\">\n <label class=\"wac-input-with-select__label\" [for]=\"id\" [innerHTML]=\"label\"></label>\n <div class=\"wac-input-with-select__wrapper\">\n <div class=\"wac-input-with-select__wrapper__left\" wzAutoHide (clickOutside)=\"onCloseSelect()\">\n <input [id]=\"id\" type=\"text\" [placeholder]=\"placeholder\" [(ngModel)]=\"value\" (ngModelChange)=\"onChangeInputValue($event)\"/>\n <div class=\"wac-input-with-select__wrapper__left__current\">\n <span (click)=\"onToggleSelect()\">{{ options | wacFindOptionSelectedField: 'label' }}</span>\n </div>\n <div class=\"wac-input-with-select__wrapper__left__select\" *ngIf=\"showSelect\">\n <div class=\"wac-input-with-select__wrapper__left__select__item\" *ngFor=\"let option of options; let index = index\">\n <div (click)=\"onClickItem(index)\">{{ option.label }}</div>\n </div>\n </div>\n </div>\n <div class=\"wac-input-with-select__wrapper__right\">\n <p [innerHTML]=\"text\"></p>\n </div>\n </div>\n</div>\n" }]
3870
3872
  }], ctorParameters: function () { return []; }, propDecorators: { label: [{
3871
3873
  type: Input
3872
3874
  }], text: [{
@@ -3877,6 +3879,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
3877
3879
  type: Input
3878
3880
  }], id: [{
3879
3881
  type: Input
3882
+ }], value: [{
3883
+ type: Input
3880
3884
  }], inputValueChange: [{
3881
3885
  type: Output
3882
3886
  }], selectValueChange: [{