@wizishop/angular-components 0.0.239 → 0.0.241

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.
@@ -3251,6 +3251,28 @@ $wac-subtitle-color: #7A87A1!default;
3251
3251
  }
3252
3252
  }
3253
3253
  .wac-text-area {
3254
+
3255
+ ::-webkit-input-placeholder {
3256
+ /* Chrome/Opera/Safari */
3257
+ color: $wac-placeholder-color !important;
3258
+ opacity: 1;
3259
+ }
3260
+ ::-moz-placeholder {
3261
+ /* Firefox 19+ */
3262
+ color: $wac-placeholder-color !important;
3263
+ opacity: 1;
3264
+ }
3265
+ :-ms-input-placeholder {
3266
+ /* IE 10+ */
3267
+ color: $wac-placeholder-color !important;
3268
+ opacity: 1;
3269
+ }
3270
+ :-moz-placeholder {
3271
+ /* Firefox 18- */
3272
+ color: $wac-placeholder-color !important;
3273
+ opacity: 1;
3274
+ }
3275
+
3254
3276
  label {
3255
3277
  padding: 0!important;
3256
3278
  font-size: rem(14)!important;
@@ -4982,6 +5004,60 @@ span.wac-tooltip {
4982
5004
  }
4983
5005
  }
4984
5006
 
5007
+ &.is-green {
5008
+ .wac-button__tooltips {
5009
+ background-color: $wac-green-color-darken!important;
5010
+ color: $wac-white!important;
5011
+ &.right {
5012
+ &:before {
5013
+ border-color: transparent $wac-green-color-darken transparent transparent;
5014
+ }
5015
+ }
5016
+
5017
+ &.left {
5018
+ &:before {
5019
+ border-color: transparent transparent transparent $wac-green-color-darken;
5020
+ }
5021
+ }
5022
+
5023
+ &.top-center {
5024
+ &:before {
5025
+ border-color: $wac-green-color-darken transparent transparent transparent;
5026
+ }
5027
+ }
5028
+
5029
+ &.top-right {
5030
+ &:before {
5031
+ border-color: $wac-green-color-darken transparent transparent transparent;
5032
+ }
5033
+ }
5034
+
5035
+ &.top-left {
5036
+ &:before {
5037
+ border-color: $wac-green-color-darken transparent transparent transparent;
5038
+ }
5039
+ }
5040
+
5041
+ &.bottom-center {
5042
+ &:before {
5043
+ border-color: transparent transparent $wac-green-color-darken transparent;
5044
+ }
5045
+ }
5046
+
5047
+ &.bottom-right {
5048
+ &:before {
5049
+ border-color: transparent transparent $wac-green-color-darken transparent;
5050
+ }
5051
+ }
5052
+
5053
+ &.bottom-left {
5054
+ &:before {
5055
+ border-color: transparent transparent $wac-green-color-darken transparent;
5056
+ }
5057
+ }
5058
+ }
5059
+ }
5060
+
4985
5061
  &.is-success {
4986
5062
  background-color: $wac-green-color;
4987
5063
  border-color: $wac-green-color;
@@ -6895,6 +6971,26 @@ div.wac-field-input-search {
6895
6971
  }
6896
6972
  }
6897
6973
  .wac-input {
6974
+ ::-webkit-input-placeholder {
6975
+ /* Chrome/Opera/Safari */
6976
+ color: $wac-placeholder-color !important;
6977
+ opacity: 1;
6978
+ }
6979
+ ::-moz-placeholder {
6980
+ /* Firefox 19+ */
6981
+ color: $wac-placeholder-color !important;
6982
+ opacity: 1;
6983
+ }
6984
+ :-ms-input-placeholder {
6985
+ /* IE 10+ */
6986
+ color: $wac-placeholder-color !important;
6987
+ opacity: 1;
6988
+ }
6989
+ :-moz-placeholder {
6990
+ /* Firefox 18- */
6991
+ color: $wac-placeholder-color !important;
6992
+ opacity: 1;
6993
+ }
6898
6994
  .field-label {
6899
6995
  margin-bottom: 0!important;
6900
6996
  &.is-normal {
@@ -6943,26 +7039,6 @@ div.wac-field-input-search {
6943
7039
  background-color: transparent;
6944
7040
  }
6945
7041
  }
6946
- ::-webkit-input-placeholder {
6947
- /* Chrome/Opera/Safari */
6948
- color: $wac-placeholder-color !important;
6949
- opacity: 1;
6950
- }
6951
- ::-moz-placeholder {
6952
- /* Firefox 19+ */
6953
- color: $wac-placeholder-color !important;
6954
- opacity: 1;
6955
- }
6956
- :-ms-input-placeholder {
6957
- /* IE 10+ */
6958
- color: $wac-placeholder-color !important;
6959
- opacity: 1;
6960
- }
6961
- :-moz-placeholder {
6962
- /* Firefox 18- */
6963
- color: $wac-placeholder-color !important;
6964
- opacity: 1;
6965
- }
6966
7042
  }
6967
7043
 
6968
7044
  label {
@@ -2398,36 +2398,66 @@
2398
2398
  };
2399
2399
 
2400
2400
  var SwitchComponent = /** @class */ (function () {
2401
- function SwitchComponent() {
2402
- // todo add ngmodel and review texts display (textState is mandaoty in order to display textStateEnable and textStateDisable)
2401
+ function SwitchComponent(changeDetectorRef) {
2402
+ this.changeDetectorRef = changeDetectorRef;
2403
+ // todo add ngmodel and review texts display (textState is mandatory in order to display textStateEnable and textStateDisable)
2403
2404
  this.value = false;
2404
2405
  this.textState = false;
2405
2406
  this.textStateEnable = '';
2406
2407
  this.textStateDisable = '';
2407
- this.showInput = false;
2408
+ this.showInput = false; // todo should not be handle here, but in another component
2408
2409
  this.danger = false;
2409
2410
  this.whiteSpace = false;
2410
2411
  this.switchChange = new i0.EventEmitter(); // todo set emitted type
2411
- this.changeInput = new i0.EventEmitter(); // todo set emitted type
2412
+ this.changeInput = new i0.EventEmitter(); // todo set emitted type, should be removed
2413
+ this.onChange = function (value) { };
2414
+ this.onTouched = function () { };
2412
2415
  }
2413
2416
  SwitchComponent.prototype.ngOnInit = function () {
2414
2417
  this.id = 'switch-' + Math.floor(Math.random() * Math.floor(1000));
2415
2418
  };
2416
2419
  SwitchComponent.prototype.changeValue = function (event) {
2417
- this.switchChange.emit(event.target.checked);
2420
+ if (this.disabled) {
2421
+ return;
2422
+ }
2423
+ this.value = event.target.checked;
2424
+ this.switchChange.emit(this.value);
2425
+ this.onChange(this.value);
2418
2426
  };
2419
2427
  SwitchComponent.prototype.triggerInput = function () {
2420
2428
  this.changeInput.emit(this.valueInput);
2421
2429
  };
2430
+ SwitchComponent.prototype.writeValue = function (value) {
2431
+ this.value = value;
2432
+ };
2433
+ SwitchComponent.prototype.registerOnChange = function (onChange) {
2434
+ this.onChange = onChange;
2435
+ };
2436
+ SwitchComponent.prototype.onBlur = function () {
2437
+ this.onTouched();
2438
+ };
2439
+ SwitchComponent.prototype.registerOnTouched = function (onTouched) {
2440
+ this.onTouched = onTouched;
2441
+ };
2442
+ SwitchComponent.prototype.setDisabledState = function (disabled) {
2443
+ this.disabled = disabled;
2444
+ this.changeDetectorRef.markForCheck();
2445
+ };
2422
2446
  return SwitchComponent;
2423
2447
  }());
2424
2448
  SwitchComponent.decorators = [
2425
2449
  { type: i0.Component, args: [{
2426
2450
  selector: 'wac-switch',
2427
- template: "<div class=\"wac-switch\">\n <input type=\"checkbox\" [checked]=\"value\" (change)=\"changeValue($event)\" [id]=\"id\" [ngClass]=\"{ danger: danger }\"/>\n <label [for]=\"id\" class=\"wac-switch__label\">\n <span class=\"wac-switch__label__text\"\n ><ng-content></ng-content\n ><span\n *ngIf=\"textState\"\n [ngStyle]=\"{'whiteSpace': whiteSpace ? 'nowrap' :'normal'}\"\n >{{ textState }} <strong class=\"disable\" *ngIf=\"textStateDisable\">{{ textStateDisable }}</strong>\n <strong class=\"enable\" *ngIf=\"textStateEnable\">{{ textStateEnable }}</strong></span\n ></span\n >\n </label>\n</div>\n<div class=\"wac-show-input\" *ngIf=\"showInput && value\">\n <input [placeholder]=\"placholderInput\" type=\"text\" [(ngModel)]=\"valueInput\" (blur)=\"triggerInput()\" />\n</div>\n"
2451
+ template: "<div class=\"wac-switch\">\n <input type=\"checkbox\" [checked]=\"value\" (change)=\"changeValue($event)\" [id]=\"id\" [ngClass]=\"{ danger: danger }\" [disabled]=\"disabled\"/>\n <label [for]=\"id\" class=\"wac-switch__label\">\n <span class=\"wac-switch__label__text\"\n ><ng-content></ng-content\n ><span\n *ngIf=\"textState\"\n [ngStyle]=\"{'whiteSpace': whiteSpace ? 'nowrap' :'normal'}\"\n >{{ textState }} <strong class=\"disable\" *ngIf=\"textStateDisable\">{{ textStateDisable }}</strong>\n <strong class=\"enable\" *ngIf=\"textStateEnable\">{{ textStateEnable }}</strong></span\n ></span\n >\n </label>\n</div>\n<div class=\"wac-show-input\" *ngIf=\"showInput && value\">\n <input [placeholder]=\"placholderInput\" type=\"text\" [(ngModel)]=\"valueInput\" (blur)=\"triggerInput()\" />\n</div>\n",
2452
+ providers: [
2453
+ { provide: forms.NG_VALUE_ACCESSOR, useExisting: SwitchComponent, multi: true },
2454
+ ],
2455
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2428
2456
  },] }
2429
2457
  ];
2430
- SwitchComponent.ctorParameters = function () { return []; };
2458
+ SwitchComponent.ctorParameters = function () { return [
2459
+ { type: i0.ChangeDetectorRef }
2460
+ ]; };
2431
2461
  SwitchComponent.propDecorators = {
2432
2462
  value: [{ type: i0.Input }],
2433
2463
  textState: [{ type: i0.Input }],