@wizishop/angular-components 0.0.162 → 0.0.167

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.
@@ -4308,13 +4308,18 @@
4308
4308
  this.copyAction = new i0.EventEmitter();
4309
4309
  this.worldAction = new i0.EventEmitter();
4310
4310
  this.checkboxAction = new i0.EventEmitter();
4311
+ this.nameRadio = 'wacBlockCheckboxRadio';
4312
+ this.isFirst = false;
4313
+ this.opacity = '.45';
4311
4314
  }
4312
4315
  BlockWithCheckboxComponent.prototype.ngOnInit = function () {
4316
+ this.randomLabelName = 'radioBlock' + Math.random() * (900 - 700) + 700;
4313
4317
  };
4314
4318
  BlockWithCheckboxComponent.prototype.eventSelected = function (event) {
4315
- this.selected = !this.selected;
4316
- console.log(this.selected);
4319
+ console.log(event);
4320
+ this.selected = event.target.checked;
4317
4321
  this.checkboxAction.emit(this.selected);
4322
+ this.isFirst = false;
4318
4323
  };
4319
4324
  BlockWithCheckboxComponent.prototype.eventCopy = function () {
4320
4325
  this.copyAction.emit(true);
@@ -4322,12 +4327,15 @@
4322
4327
  BlockWithCheckboxComponent.prototype.eventWorld = function () {
4323
4328
  this.worldAction.emit(true);
4324
4329
  };
4330
+ BlockWithCheckboxComponent.prototype.removeFirstClass = function () {
4331
+ document.querySelectorAll('.firstWacRadioBLock')[0].classList.remove('firstWacRadioBLock');
4332
+ };
4325
4333
  return BlockWithCheckboxComponent;
4326
4334
  }());
4327
4335
  BlockWithCheckboxComponent.decorators = [
4328
4336
  { type: i0.Component, args: [{
4329
4337
  selector: 'wac-block-with-checkbox',
4330
- template: "<div class=\"block-with-checkbox\">\n <div class=\"block-with-checkbox__left\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input type=\"checkbox\" [value]=\"selected\" (click)=\"eventSelected($event)\" id=\"radioBlock\">\n <label for=\"radioBlock\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\">\n <ng-content></ng-content>\n </div>\n <div class=\"block-with-checkbox__right\">\n <div><wac-button extraClasses=\"is-blue opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconCopy\" (click)=\"eventCopy()\"></wac-button></div>\n <div><wac-button extraClasses=\"is-green opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconWorld\" (click)=\"eventWorld()\"></wac-button></div>\n </div>\n</div>\n"
4338
+ template: "<div class=\"block-with-checkbox\" [ngClass]=\"{'selected': inputRadioA.checked, 'firstWacRadioBLock': isFirst}\" [style.opacity]=\"opacity\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"inputRadioA.click()\">\n <ng-content></ng-content>\n </div>\n <div class=\"block-with-checkbox__right\">\n <div><wac-button extraClasses=\"is-blue opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconCopy\" (click)=\"eventCopy()\"></wac-button></div>\n <div><wac-button extraClasses=\"is-green opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconWorld\" (click)=\"eventWorld()\"></wac-button></div>\n </div>\n</div>\n"
4331
4339
  },] }
4332
4340
  ];
4333
4341
  BlockWithCheckboxComponent.ctorParameters = function () { return []; };
@@ -4337,7 +4345,10 @@
4337
4345
  iconWorld: [{ type: i0.Input }],
4338
4346
  copyAction: [{ type: i0.Output }],
4339
4347
  worldAction: [{ type: i0.Output }],
4340
- checkboxAction: [{ type: i0.Output }]
4348
+ checkboxAction: [{ type: i0.Output }],
4349
+ nameRadio: [{ type: i0.Input }],
4350
+ isFirst: [{ type: i0.Input }],
4351
+ opacity: [{ type: i0.Input }]
4341
4352
  };
4342
4353
 
4343
4354
  var ConfirmDeleteComponent = /** @class */ (function () {
@@ -4379,21 +4390,42 @@
4379
4390
  var MosaicComponent = /** @class */ (function () {
4380
4391
  function MosaicComponent() {
4381
4392
  this.isLoading = true;
4393
+ this.import = new i0.EventEmitter();
4382
4394
  }
4383
4395
  MosaicComponent.prototype.ngOnInit = function () {
4396
+ if (this.items) {
4397
+ var splitItems = this.sliceIntoChunks(this.items, (this.items.length / 3));
4398
+ this.columnLeft = splitItems[0];
4399
+ this.columnCenter = splitItems[1];
4400
+ this.columnRight = splitItems[2];
4401
+ }
4402
+ this.isLoading = false;
4403
+ };
4404
+ MosaicComponent.prototype.emitIndex = function (index) {
4405
+ this.import.emit(index);
4406
+ };
4407
+ MosaicComponent.prototype.sliceIntoChunks = function (arr, chunkSize) {
4408
+ var res = [];
4409
+ for (var i = 0; i < arr.length; i += chunkSize) {
4410
+ var chunk = arr.slice(i, i + chunkSize);
4411
+ res.push(chunk);
4412
+ }
4413
+ return res;
4384
4414
  };
4385
4415
  return MosaicComponent;
4386
4416
  }());
4387
4417
  MosaicComponent.decorators = [
4388
4418
  { type: i0.Component, args: [{
4389
4419
  selector: 'wac-mosaic',
4390
- template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\"></div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"items\"></div>\n <div class=\"wac-mosaic__wrapper__column\"></div>\n </div>\n</div>\n",
4391
- styles: [".wac-mosaic__loader{min-height:400px;width:100%;display:flex;justify-content:center;align-items:center}"]
4420
+ template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnLeft\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnLeft; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i)\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnCenter\" >\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnCenter; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i + this.columnLeft.length)\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnRight\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnRight; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i + this.columnLeft.length + this.columnCenter.length)\"></wac-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
4392
4421
  },] }
4393
4422
  ];
4394
4423
  MosaicComponent.ctorParameters = function () { return []; };
4395
4424
  MosaicComponent.propDecorators = {
4396
- items: [{ type: i0.Input }]
4425
+ items: [{ type: i0.Input }],
4426
+ labelButtons: [{ type: i0.Input }],
4427
+ iconButtons: [{ type: i0.Input }],
4428
+ import: [{ type: i0.Output }]
4397
4429
  };
4398
4430
 
4399
4431
  var components = [