@wizishop/angular-components 0.0.174 → 0.0.175
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 +2505 -2132
- package/bundles/wizishop-angular-components.umd.js +69 -31
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/block-with-checkbox/block-with-checkbox.component.js +11 -8
- package/esm2015/lib/components/button/button.component.js +5 -2
- package/esm2015/lib/components/content-with-buttons/content-with-buttons.component.js +14 -0
- package/esm2015/lib/components/mosaic/mosaic.component.js +38 -19
- package/esm2015/lib/components/shared-components.module.js +4 -2
- package/esm2015/public-api.js +2 -1
- package/fesm2015/wizishop-angular-components.js +67 -28
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/block-with-checkbox/block-with-checkbox.component.d.ts +1 -0
- package/lib/components/button/button.component.d.ts +2 -0
- package/lib/components/content-with-buttons/content-with-buttons.component.d.ts +5 -0
- package/lib/components/mosaic/mosaic.component.d.ts +9 -7
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/wizishop-angular-components-0.0.175.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.174.tgz +0 -0
|
@@ -1243,6 +1243,7 @@
|
|
|
1243
1243
|
this.animationText = '';
|
|
1244
1244
|
this.confirmDelete = false;
|
|
1245
1245
|
this.confirmDeleteText = '';
|
|
1246
|
+
this.tooltipPosition = 'top-center';
|
|
1246
1247
|
this.confirmDeletePosition = 'right';
|
|
1247
1248
|
this.click = new i0.EventEmitter();
|
|
1248
1249
|
this.isLoadingChange = new i0.EventEmitter();
|
|
@@ -1332,7 +1333,7 @@
|
|
|
1332
1333
|
ButtonComponent.decorators = [
|
|
1333
1334
|
{ type: i0.Component, args: [{
|
|
1334
1335
|
selector: 'wac-button',
|
|
1335
|
-
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"confirmDelete && waitForConfirmDelete ? addMaxWidthDelete() : '';onButtonClick($event);\"\n (mouseleave)=\"animation ? resetMaxWidth() : '';\"\n (mouseenter)=\"animation ? addMaxWidth() : '';\"\n wzAutoHide (clickOutside)=\"confirmDelete && !waitForConfirmDelete ? resetMaxWidthDelete() : ''\"\n [ngClass]=\"[\n label === '' ? 'alone' : '',\n coin ? 'has-coin width-auto' : '',\n animationRight ? 'animation-right' : '',\n animation ? 'animationText' : '',\n isLoading ? 'is-loading' : '',\n opacity ? 'opacity' : '',\n disabled ? 'disabled' : '',\n widthAuto ? 'width-auto' : '',\n whiteSpaceNowrap ? 'white-space-no-wrap' : '',\n !waitForConfirmDelete && confirmDelete ? 'step-delete' : '',\n confirmDelete ? 'deletePosition-' + confirmDeletePosition : ''\n ]\"\n [ngStyle]=\"{\n 'text-align': contentHorizontalPosition\n }\"\n>\n <span class=\"wac-button__wrapper\" [style.color]=\"textcolor ? textcolor : ''\">\n <i *ngIf=\"icon\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"buttonWidth + 'px'\">\n <span #calculWidth class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span class=\"wac-button__confirmDelete\" [style.maxWidth]=\"buttonMaxWidthDelete\" [style.width]=\"buttonWidthDelete + 'px'\">\n <span #calculWidthDelete class=\"wac-button__confirmDelete__text\" [innerHTML]=\"confirmDeleteText\"></span>\n </span>\n <span *ngIf=\"coin\" class=\"wac-button__coin\"><i class=\"fa-solid fa-coin-front\"></i><span [innerHTML]=\"coin\"></span></span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n"
|
|
1336
|
+
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"confirmDelete && waitForConfirmDelete ? addMaxWidthDelete() : '';onButtonClick($event);\"\n (mouseleave)=\"animation ? resetMaxWidth() : '';\"\n (mouseenter)=\"animation ? addMaxWidth() : '';\"\n wzAutoHide (clickOutside)=\"confirmDelete && !waitForConfirmDelete ? resetMaxWidthDelete() : ''\"\n [ngClass]=\"[\n label === '' ? 'alone' : '',\n coin ? 'has-coin width-auto' : '',\n animationRight ? 'animation-right' : '',\n animation ? 'animationText' : '',\n isLoading ? 'is-loading' : '',\n opacity ? 'opacity' : '',\n disabled ? 'disabled' : '',\n widthAuto ? 'width-auto' : '',\n whiteSpaceNowrap ? 'white-space-no-wrap' : '',\n !waitForConfirmDelete && confirmDelete ? 'step-delete' : '',\n confirmDelete ? 'deletePosition-' + confirmDeletePosition : ''\n ]\"\n [ngStyle]=\"{\n 'text-align': contentHorizontalPosition\n }\"\n>\n <span class=\"wac-button__wrapper\" [style.color]=\"textcolor ? textcolor : ''\">\n <i *ngIf=\"icon\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"buttonWidth + 'px'\">\n <span #calculWidth class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span class=\"wac-button__confirmDelete\" [style.maxWidth]=\"buttonMaxWidthDelete\" [style.width]=\"buttonWidthDelete + 'px'\">\n <span #calculWidthDelete class=\"wac-button__confirmDelete__text\" [innerHTML]=\"confirmDeleteText\"></span>\n </span>\n <span *ngIf=\"coin\" class=\"wac-button__coin\"><i class=\"fa-solid fa-coin-front\"></i><span [innerHTML]=\"coin\"></span></span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n </span>\n <span class=\"wac-button__tooltips {{ tooltipPosition }}\" *ngIf=\"tooltip\">\n {{ tooltip }}\n </span>\n</a>\n"
|
|
1336
1337
|
},] }
|
|
1337
1338
|
];
|
|
1338
1339
|
ButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -1355,6 +1356,8 @@
|
|
|
1355
1356
|
confirmDelete: [{ type: i0.Input }],
|
|
1356
1357
|
confirmDeleteText: [{ type: i0.Input }],
|
|
1357
1358
|
coin: [{ type: i0.Input }],
|
|
1359
|
+
tooltip: [{ type: i0.Input }],
|
|
1360
|
+
tooltipPosition: [{ type: i0.Input }],
|
|
1358
1361
|
confirmDeletePosition: [{ type: i0.Input }],
|
|
1359
1362
|
click: [{ type: i0.Output }],
|
|
1360
1363
|
isLoading: [{ type: i0.Input }],
|
|
@@ -4310,8 +4313,9 @@
|
|
|
4310
4313
|
var BlockWithCheckboxComponent = /** @class */ (function () {
|
|
4311
4314
|
function BlockWithCheckboxComponent() {
|
|
4312
4315
|
this.selected = false;
|
|
4313
|
-
this.
|
|
4314
|
-
this.
|
|
4316
|
+
this.disabled = false;
|
|
4317
|
+
this.iconCopy = 'fa-solid fa-paste';
|
|
4318
|
+
this.iconWorld = 'fa-light fa-globe';
|
|
4315
4319
|
this.copyAction = new i0.EventEmitter();
|
|
4316
4320
|
this.worldAction = new i0.EventEmitter();
|
|
4317
4321
|
this.checkboxAction = new i0.EventEmitter();
|
|
@@ -4323,10 +4327,11 @@
|
|
|
4323
4327
|
this.randomLabelName = 'radioBlock' + Math.random() * (900 - 700) + 700;
|
|
4324
4328
|
};
|
|
4325
4329
|
BlockWithCheckboxComponent.prototype.eventSelected = function (event) {
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
+
if (!this.disabled) {
|
|
4331
|
+
this.selected = event.target.checked;
|
|
4332
|
+
this.checkboxAction.emit(this.selected);
|
|
4333
|
+
this.isFirst = false;
|
|
4334
|
+
}
|
|
4330
4335
|
};
|
|
4331
4336
|
BlockWithCheckboxComponent.prototype.eventCopy = function () {
|
|
4332
4337
|
this.copyAction.emit(true);
|
|
@@ -4344,12 +4349,13 @@
|
|
|
4344
4349
|
BlockWithCheckboxComponent.decorators = [
|
|
4345
4350
|
{ type: i0.Component, args: [{
|
|
4346
4351
|
selector: 'wac-block-with-checkbox',
|
|
4347
|
-
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"
|
|
4352
|
+
template: "<div class=\"block-with-checkbox\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [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\" [checked]=\"selected\" [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"
|
|
4348
4353
|
},] }
|
|
4349
4354
|
];
|
|
4350
4355
|
BlockWithCheckboxComponent.ctorParameters = function () { return []; };
|
|
4351
4356
|
BlockWithCheckboxComponent.propDecorators = {
|
|
4352
4357
|
selected: [{ type: i0.Input }],
|
|
4358
|
+
disabled: [{ type: i0.Input }],
|
|
4353
4359
|
iconCopy: [{ type: i0.Input }],
|
|
4354
4360
|
iconWorld: [{ type: i0.Input }],
|
|
4355
4361
|
copyAction: [{ type: i0.Output }],
|
|
@@ -4398,36 +4404,49 @@
|
|
|
4398
4404
|
|
|
4399
4405
|
var MosaicComponent = /** @class */ (function () {
|
|
4400
4406
|
function MosaicComponent() {
|
|
4401
|
-
this.
|
|
4407
|
+
this.imagesList = [];
|
|
4402
4408
|
this.isLoading = false;
|
|
4403
4409
|
this.numberOfColumn = 3;
|
|
4404
4410
|
this.importImageSrc = new i0.EventEmitter();
|
|
4411
|
+
this.loadMoreImages = new i0.EventEmitter();
|
|
4405
4412
|
}
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
});
|
|
4417
|
-
MosaicComponent.prototype.generateColumns = function () {
|
|
4418
|
-
this.columns = this.sliceIntoChunks();
|
|
4413
|
+
MosaicComponent.prototype.ngOnChanges = function (changes) {
|
|
4414
|
+
console.log('changes', changes);
|
|
4415
|
+
var isNumberOfColumnChange = changes.numberOfColumn && (changes.numberOfColumn.currentValue !== changes.numberOfColumn.previousValue);
|
|
4416
|
+
if (changes.imagesList) {
|
|
4417
|
+
this.generateColumns(changes.imagesList.previousValue, changes.imagesList.currentValue, isNumberOfColumnChange);
|
|
4418
|
+
return;
|
|
4419
|
+
}
|
|
4420
|
+
if (isNumberOfColumnChange) {
|
|
4421
|
+
this.generateColumns(null, this.imagesList, isNumberOfColumnChange);
|
|
4422
|
+
}
|
|
4419
4423
|
};
|
|
4420
|
-
MosaicComponent.prototype.
|
|
4424
|
+
MosaicComponent.prototype.generateColumns = function (previousList, currentList, isNumberOfColumnChange) {
|
|
4425
|
+
var isNewListSmaller = (currentList && previousList) && (currentList.length < previousList.length);
|
|
4426
|
+
var resetColumns = isNumberOfColumnChange || isNewListSmaller;
|
|
4427
|
+
var isPreviousListExisting = previousList === null || previousList === void 0 ? void 0 : previousList.length;
|
|
4428
|
+
var newImagesToDisplay = !isPreviousListExisting || resetColumns ? currentList : currentList.slice(previousList.length);
|
|
4429
|
+
var columns = this.separateImagesIntoColumns(newImagesToDisplay);
|
|
4430
|
+
if (isPreviousListExisting && !resetColumns) {
|
|
4431
|
+
var existingColumns = this.columns;
|
|
4432
|
+
columns = this.concatColumns(existingColumns, columns);
|
|
4433
|
+
}
|
|
4434
|
+
this.columns = columns;
|
|
4435
|
+
};
|
|
4436
|
+
MosaicComponent.prototype.separateImagesIntoColumns = function (newImagesToDisplay) {
|
|
4421
4437
|
var columns = [];
|
|
4422
|
-
var numberOfImagePerColumn =
|
|
4423
|
-
for (var i = 0; i <
|
|
4424
|
-
var chunk =
|
|
4438
|
+
var numberOfImagePerColumn = Math.floor(newImagesToDisplay.length / this.numberOfColumn);
|
|
4439
|
+
for (var i = 0; i < newImagesToDisplay.length; i += numberOfImagePerColumn) {
|
|
4440
|
+
var chunk = newImagesToDisplay.slice(i, i + numberOfImagePerColumn);
|
|
4425
4441
|
columns.push(chunk);
|
|
4426
4442
|
}
|
|
4427
4443
|
return columns;
|
|
4428
4444
|
};
|
|
4445
|
+
MosaicComponent.prototype.concatColumns = function (oldColumns, newColumns) {
|
|
4446
|
+
return oldColumns.map(function (oldColumn, columnIndex) { return __spread(oldColumn, newColumns[columnIndex]); });
|
|
4447
|
+
};
|
|
4429
4448
|
MosaicComponent.prototype.onBottomReached = function () {
|
|
4430
|
-
|
|
4449
|
+
this.loadMoreImages.emit();
|
|
4431
4450
|
};
|
|
4432
4451
|
MosaicComponent.prototype.onImportImage = function (src) {
|
|
4433
4452
|
this.importImageSrc.emit(src);
|
|
@@ -4437,8 +4456,9 @@
|
|
|
4437
4456
|
MosaicComponent.decorators = [
|
|
4438
4457
|
{ type: i0.Component, args: [{
|
|
4439
4458
|
selector: 'wac-mosaic',
|
|
4440
|
-
template: "<div class=\"wac-mosaic\"
|
|
4441
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
4459
|
+
template: "<div class=\"wac-mosaic\">\n <ng-scrollbar (reachedBottom)=\"onBottomReached()\" reachedOffset=\"200\" class=\"wac-mosaic__wrapper__scrollbar\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngFor=\"let column of columns\">\n <div class=\"wac-mosaic__wrapper__column__image\" *ngFor=\"let image of column; let i = index;\">\n <img [src]=\"image.src\" [alt]=\"image.alt\"/>\n <div class=\"hover\">\n <ng-container\n [ngTemplateOutlet]=\"importButtonTemplate || defaultImportButton\"\n [ngTemplateOutletContext]=\"{ $implicit: image }\"\n >\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </ng-scrollbar>\n</div>\n\n<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n\n<ng-template #defaultImportButton let-image>\n <wac-button [icon]=\"'fa-solid fa-image'\" [label]=\"'wac.MosaicComponent.import' | translate\" [extraClasses]=\"'is-success'\" (click)=\"onImportImage(image.src)\"></wac-button>\n</ng-template>\n",
|
|
4460
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
4461
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
4442
4462
|
},] }
|
|
4443
4463
|
];
|
|
4444
4464
|
MosaicComponent.ctorParameters = function () { return []; };
|
|
@@ -4447,9 +4467,25 @@
|
|
|
4447
4467
|
isLoading: [{ type: i0.Input }],
|
|
4448
4468
|
numberOfColumn: [{ type: i0.Input }],
|
|
4449
4469
|
importButtonTemplate: [{ type: i0.Input }],
|
|
4450
|
-
importImageSrc: [{ type: i0.Output }]
|
|
4470
|
+
importImageSrc: [{ type: i0.Output }],
|
|
4471
|
+
loadMoreImages: [{ type: i0.Output }]
|
|
4451
4472
|
};
|
|
4452
4473
|
|
|
4474
|
+
var ContentWithButtonsComponent = /** @class */ (function () {
|
|
4475
|
+
function ContentWithButtonsComponent() {
|
|
4476
|
+
}
|
|
4477
|
+
ContentWithButtonsComponent.prototype.ngOnInit = function () {
|
|
4478
|
+
};
|
|
4479
|
+
return ContentWithButtonsComponent;
|
|
4480
|
+
}());
|
|
4481
|
+
ContentWithButtonsComponent.decorators = [
|
|
4482
|
+
{ type: i0.Component, args: [{
|
|
4483
|
+
selector: 'wac-content-with-buttons',
|
|
4484
|
+
template: "<p>content-with-buttons works!</p>\n"
|
|
4485
|
+
},] }
|
|
4486
|
+
];
|
|
4487
|
+
ContentWithButtonsComponent.ctorParameters = function () { return []; };
|
|
4488
|
+
|
|
4453
4489
|
var components = [
|
|
4454
4490
|
TagComponent,
|
|
4455
4491
|
TabComponent,
|
|
@@ -4498,7 +4534,8 @@
|
|
|
4498
4534
|
TokenCheckComponent,
|
|
4499
4535
|
BlockWithCheckboxComponent,
|
|
4500
4536
|
ConfirmDeleteComponent,
|
|
4501
|
-
MosaicComponent
|
|
4537
|
+
MosaicComponent,
|
|
4538
|
+
ContentWithButtonsComponent
|
|
4502
4539
|
];
|
|
4503
4540
|
var exportsFromModule = [
|
|
4504
4541
|
PaginationComponent,
|
|
@@ -4610,6 +4647,7 @@
|
|
|
4610
4647
|
exports.CheckBoxRow = CheckBoxRow;
|
|
4611
4648
|
exports.CheckboxComponent = CheckboxComponent;
|
|
4612
4649
|
exports.ConfirmDeleteComponent = ConfirmDeleteComponent;
|
|
4650
|
+
exports.ContentWithButtonsComponent = ContentWithButtonsComponent;
|
|
4613
4651
|
exports.DebounceKeyupDirective = DebounceKeyupDirective;
|
|
4614
4652
|
exports.DeleteComponent = DeleteComponent;
|
|
4615
4653
|
exports.DropdownComponent = DropdownComponent;
|