@wizishop/angular-components 0.0.201 → 0.0.205

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.
@@ -2170,37 +2170,50 @@ $wac-subtitle-color: #7A87A1!default;
2170
2170
  }
2171
2171
  }
2172
2172
  }
2173
- .wac-delete {
2174
- width: 40px;
2175
- height: 40px;
2176
-
2177
- &__wrapper {
2178
- @include flexbox();
2179
- @include justify-content(center);
2180
- @include align-items(center);
2173
+ .wac-content-with-buttons {
2174
+ display: flex;
2175
+ align-items: center;
2176
+ width: 100%;
2177
+ @include media('<tablet') {
2178
+ flex-direction: column;
2179
+ justify-content: flex-start;
2180
+ align-items: flex-start;
2181
+ }
2182
+ &__text {
2181
2183
  width: 100%;
2182
- height: 100%;
2183
- border-radius: 3px;
2184
- background-color: transparent;
2185
- transition: background-color 0.3s ease-in-out;
2186
-
2187
- i {
2188
- color: $wac-border-form;
2189
- font-size: 14px;
2190
- line-height: 23px;
2191
- transition: color 0.3s ease-in-out;
2192
- }
2193
-
2194
- &:hover {
2195
- background-color: $wac-primary-button;
2196
- transition: background-color 0.3s ease-in-out;
2197
-
2198
- i {
2199
- color: $wac-white;
2200
- transition: color 0.3s ease-in-out;
2184
+ &__count {
2185
+ margin: 10px 0 0;
2186
+ width: 100%;
2187
+ display: flex;
2188
+ align-items: flex-end;
2189
+ justify-content: flex-start;
2190
+ > span {
2191
+ &:first-child {
2192
+ font-size: rem(12);
2193
+ font-style: italic;
2194
+ color: $wac-color-text-grey;
2195
+ line-height: rem(16);
2196
+ display: inline-block;
2197
+ transform: translateY(-3px);
2198
+ }
2199
+ &:last-child {
2200
+ display: inline-block;
2201
+ margin: 0 0 0 20px;
2202
+ }
2201
2203
  }
2202
2204
  }
2203
2205
  }
2206
+ &__cta {
2207
+ display: flex;
2208
+ align-items: center;
2209
+ width: auto;
2210
+ > div {
2211
+ margin: 0 0 0 20px;
2212
+ }
2213
+ @include media('<tablet') {
2214
+ margin: 15px 0 0;
2215
+ }
2216
+ }
2204
2217
  }
2205
2218
 
2206
2219
  .wac-switch {
@@ -2362,10 +2375,12 @@ $wac-subtitle-color: #7A87A1!default;
2362
2375
  }
2363
2376
  .wac-draganddrop-list {
2364
2377
  width: 100%;
2378
+ background-color: $wac-white;
2365
2379
  &--disabled {
2366
2380
  .wac-draganddrop-list {
2367
2381
  &__wrapper {
2368
2382
  &__item {
2383
+ margin: 0 0 10px;
2369
2384
  &__label {
2370
2385
  margin: 0;
2371
2386
  }
@@ -2379,6 +2394,13 @@ $wac-subtitle-color: #7A87A1!default;
2379
2394
  }
2380
2395
  }
2381
2396
  }
2397
+ &__label {
2398
+ font-size: rem(14);
2399
+ line-height: 1.4;
2400
+ color: $wac-main-text;
2401
+ font-weight: 500;
2402
+ margin: 0 0 10px;
2403
+ }
2382
2404
  &__wrapper {
2383
2405
  width: 100%;
2384
2406
  display: flex;
@@ -2387,8 +2409,15 @@ $wac-subtitle-color: #7A87A1!default;
2387
2409
  justify-content: flex-start;
2388
2410
  &__item {
2389
2411
  width: 100%;
2390
- margin: 0 0 10px;
2412
+ margin: 0 0 -4px;
2391
2413
  display: flex;
2414
+ background-color: $wac-white;
2415
+ &--trigger {
2416
+ > div {
2417
+ margin: 0!important;
2418
+ width: 100% !important;
2419
+ }
2420
+ }
2392
2421
  &__icon {
2393
2422
  display: flex;
2394
2423
  align-items: center;
@@ -2427,6 +2456,18 @@ $wac-subtitle-color: #7A87A1!default;
2427
2456
  text-overflow: ellipsis;
2428
2457
  border: 1px solid $wac-border-form;
2429
2458
  }
2459
+ &__input {
2460
+ width: 100%;
2461
+ margin: 0 0 0 8px;
2462
+ min-height: 40px;
2463
+ display: flex;
2464
+ justify-content: flex-start;
2465
+ align-items: center;
2466
+ overflow: hidden;
2467
+ > * {
2468
+ width: 100%;
2469
+ }
2470
+ }
2430
2471
  > div {
2431
2472
  &:first-child {
2432
2473
  width: 100%;
@@ -2436,6 +2477,13 @@ $wac-subtitle-color: #7A87A1!default;
2436
2477
  &:last-child {
2437
2478
  width: auto;
2438
2479
  margin: 0 0 0 10px;
2480
+ display: flex;
2481
+ align-items: center;
2482
+ > div {
2483
+ &:last-child:not(:first-child) {
2484
+ margin: 0 0 0 10px;
2485
+ }
2486
+ }
2439
2487
  }
2440
2488
  }
2441
2489
  }
@@ -2452,7 +2500,7 @@ $wac-subtitle-color: #7A87A1!default;
2452
2500
  }
2453
2501
 
2454
2502
  .cdk-drag-placeholder {
2455
- opacity: 0;
2503
+ opacity: 0.2;
2456
2504
  }
2457
2505
 
2458
2506
  .cdk-drag-animating {
@@ -4463,6 +4511,35 @@ span.wac-tooltip {
4463
4511
  transition: background-color 0.3s ease-in-out;
4464
4512
  }
4465
4513
 
4514
+ &.opacity {
4515
+ background-color: $wac-wizishop-blue-button-light;
4516
+ border-color: $wac-wizishop-blue-button-light;
4517
+
4518
+ i {
4519
+ color: $wac-wizishop-blue-button;
4520
+ }
4521
+
4522
+ &:hover,
4523
+ &.hover {
4524
+ background-color: $wac-wizishop-blue-button;
4525
+ border-color: $wac-wizishop-blue-button;
4526
+ transition: background-color 0.3s ease-in-out;
4527
+ i {
4528
+ color: $white;
4529
+ }
4530
+ }
4531
+
4532
+ &:focus,
4533
+ &.focus {
4534
+ background-color: $wac-wizishop-blue-button;
4535
+ border-color: $wac-wizishop-blue-button;
4536
+ transition: background-color 0.3s ease-in-out;
4537
+ i {
4538
+ color: $white;
4539
+ }
4540
+ }
4541
+ }
4542
+
4466
4543
  &.is-outlined {
4467
4544
  background-color: transparent;
4468
4545
  border-color: $wac-wizishop-blue-button;
@@ -6800,6 +6877,9 @@ div.wac-field-input-search {
6800
6877
  margin: 0 !important;
6801
6878
  font-size: rem(14) !important;
6802
6879
  color: $wac-placeholder-color;
6880
+ &.transparent {
6881
+ background-color: transparent;
6882
+ }
6803
6883
  }
6804
6884
  ::-webkit-input-placeholder {
6805
6885
  /* Chrome/Opera/Safari */
@@ -6864,6 +6944,10 @@ div.wac-field-input-search {
6864
6944
  margin-bottom: rem(8);
6865
6945
  height: rem(40);
6866
6946
 
6947
+ &.transparent {
6948
+ background-color: transparent;
6949
+ }
6950
+
6867
6951
  &::placeholder {
6868
6952
  color: $wac-placeholder-color;
6869
6953
  font-weight: 400;
@@ -7260,48 +7344,35 @@ div.wac-field-input-search {
7260
7344
  }
7261
7345
  }
7262
7346
  }
7263
- .wac-content-with-buttons {
7264
- display: flex;
7265
- align-items: center;
7266
- width: 100%;
7267
- @include media('<tablet') {
7268
- flex-direction: column;
7269
- justify-content: flex-start;
7270
- align-items: flex-start;
7271
- }
7272
- &__text {
7347
+ .wac-delete {
7348
+ width: 40px;
7349
+ height: 40px;
7350
+
7351
+ &__wrapper {
7352
+ @include flexbox();
7353
+ @include justify-content(center);
7354
+ @include align-items(center);
7273
7355
  width: 100%;
7274
- &__count {
7275
- margin: 10px 0 0;
7276
- width: 100%;
7277
- display: flex;
7278
- align-items: flex-end;
7279
- justify-content: flex-start;
7280
- > span {
7281
- &:first-child {
7282
- font-size: rem(12);
7283
- font-style: italic;
7284
- color: $wac-color-text-grey;
7285
- line-height: rem(16);
7286
- display: inline-block;
7287
- transform: translateY(-3px);
7288
- }
7289
- &:last-child {
7290
- display: inline-block;
7291
- margin: 0 0 0 20px;
7292
- }
7293
- }
7356
+ height: 100%;
7357
+ border-radius: 3px;
7358
+ background-color: transparent;
7359
+ transition: background-color 0.3s ease-in-out;
7360
+
7361
+ i {
7362
+ color: $wac-border-form;
7363
+ font-size: 14px;
7364
+ line-height: 23px;
7365
+ transition: color 0.3s ease-in-out;
7294
7366
  }
7295
- }
7296
- &__cta {
7297
- display: flex;
7298
- align-items: center;
7299
- width: auto;
7300
- > div {
7301
- margin: 0 0 0 20px;
7302
- }
7303
- @include media('<tablet') {
7304
- margin: 15px 0 0;
7367
+
7368
+ &:hover {
7369
+ background-color: $wac-primary-button;
7370
+ transition: background-color 0.3s ease-in-out;
7371
+
7372
+ i {
7373
+ color: $wac-white;
7374
+ transition: color 0.3s ease-in-out;
7375
+ }
7305
7376
  }
7306
7377
  }
7307
7378
  }
@@ -4571,33 +4571,66 @@
4571
4571
 
4572
4572
  var DraganddropListComponent = /** @class */ (function () {
4573
4573
  function DraganddropListComponent() {
4574
- this.disable = false;
4574
+ this.label = '';
4575
+ this.disabled = false;
4576
+ this.backgroundColor = '#fff';
4577
+ this.showTriggerSave = false;
4575
4578
  this.itemsChange = new i0.EventEmitter();
4576
4579
  }
4580
+ DraganddropListComponent.prototype.ngOnInit = function () {
4581
+ this.setTempCopy();
4582
+ };
4577
4583
  DraganddropListComponent.prototype.drop = function (event) {
4578
- if (!this.disable) {
4584
+ if (!this.disabled) {
4579
4585
  dragDrop.moveItemInArray(this.items, event.previousIndex, event.currentIndex);
4580
4586
  this.itemsChange.emit(this.items);
4587
+ this.setTempCopy();
4581
4588
  }
4582
4589
  };
4583
4590
  DraganddropListComponent.prototype.delete = function (index) {
4584
- if (!this.disable) {
4591
+ if (!this.disabled) {
4585
4592
  this.items = this.items.filter(function (value, i) { return i !== index; });
4586
4593
  this.itemsChange.emit(this.items);
4594
+ this.setTempCopy();
4587
4595
  }
4588
4596
  };
4597
+ DraganddropListComponent.prototype.saveField = function (index, event) {
4598
+ this.copyTemps[index] = event.target.value;
4599
+ this.itemsChange.emit(this.copyTemps);
4600
+ };
4601
+ DraganddropListComponent.prototype.saveFieldEnd = function (index, event) {
4602
+ this.items[index] = event.target.value;
4603
+ this.itemsChange.emit(this.items);
4604
+ this.setTempCopy();
4605
+ };
4606
+ DraganddropListComponent.prototype.addField = function () {
4607
+ this.showTriggerSave = true;
4608
+ };
4609
+ DraganddropListComponent.prototype.saveNewField = function (event) {
4610
+ this.items.push(event.target.value);
4611
+ this.itemsChange.emit(this.items);
4612
+ this.setTempCopy();
4613
+ this.showTriggerSave = false;
4614
+ };
4615
+ DraganddropListComponent.prototype.setTempCopy = function () {
4616
+ this.copyTemps = Object.assign({}, this.items);
4617
+ };
4589
4618
  return DraganddropListComponent;
4590
4619
  }());
4591
4620
  DraganddropListComponent.decorators = [
4592
4621
  { type: i0.Component, args: [{
4593
4622
  selector: 'wac-draganddrop-list',
4594
- template: "<div class=\"wac-draganddrop-list\" *ngIf=\"!disable\">\n <div class=\"wac-draganddrop-list__wrapper\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\" cdkDrag>\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n <div>\n <wac-button [iconFontSize]=\"'14px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-trash-can'\" [extraClasses]=\"'is-danger'\" (click)=\"delete(i)\"></wac-button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"wac-draganddrop-list wac-draganddrop-list--disabled\" *ngIf=\"disable\">\n <div class=\"wac-draganddrop-list__wrapper\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n </div>\n </div>\n</div>\n",
4623
+ template: "<div class=\"wac-draganddrop-list\" *ngIf=\"!disabled\" [style.backgroundColor]=\"backgroundColor\">\n <div class=\"wac-draganddrop-list__label\" *ngIf=\"label\"><span [innerHTML]=\"label\"></span></div>\n <div class=\"wac-draganddrop-list__wrapper\" [cdkDropListLockAxis]=\"'y'\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" [style.backgroundColor]=\"backgroundColor\" *ngFor=\"let item of items;let i = index;\" cdkDrag>\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span (mousedown)=\"$event.stopPropagation()\" class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [value]=\"item\" [extraClasses]=\"'transparent'\" (keydown)=\"saveField(i, $event)\" (focusout)=\"saveFieldEnd(i, $event)\"></wac-input>\n </span>\n </div>\n <div (mousedown)=\"$event.stopPropagation()\">\n <div>\n <wac-button [iconFontSize]=\"'14px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-trash-can'\" [extraClasses]=\"'is-danger'\" (click)=\"delete(i)\"></wac-button>\n </div>\n <div *ngIf=\"i === (items.length - 1) && max > items.length && !showTriggerSave\">\n <wac-button [extraClasses]=\"'is-info'\" [iconFontSize]=\"'18px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-plus'\" (click)=\"addField()\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-draganddrop-list__wrapper__item wac-draganddrop-list__wrapper__item--trigger\" *ngIf=\"showTriggerSave\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [extraClasses]=\"'transparent'\" (keyup.enter)=\"saveNewField($event)\" (focusout)=\"saveNewField($event)\"></wac-input>\n </span>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"wac-draganddrop-list wac-draganddrop-list--disabled\" *ngIf=\"disabled\">\n <div class=\"wac-draganddrop-list__label\" *ngIf=\"label\"><span [innerHTML]=\"label\"></span></div>\n <div class=\"wac-draganddrop-list__wrapper\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n </div>\n </div>\n</div>\n",
4595
4624
  changeDetection: i0.ChangeDetectionStrategy.OnPush
4596
4625
  },] }
4597
4626
  ];
4598
4627
  DraganddropListComponent.propDecorators = {
4628
+ label: [{ type: i0.Input }],
4599
4629
  items: [{ type: i0.Input }],
4600
- disable: [{ type: i0.Input }],
4630
+ disabled: [{ type: i0.Input }],
4631
+ max: [{ type: i0.Input }],
4632
+ labelBtnAdd: [{ type: i0.Input }],
4633
+ backgroundColor: [{ type: i0.Input }],
4601
4634
  itemsChange: [{ type: i0.Output }]
4602
4635
  };
4603
4636