@wizishop/angular-components 0.0.71 → 0.0.74
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 +4681 -4670
- package/bundles/wizishop-angular-components.umd.js +170 -8
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +2 -2
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/button/button.component.js +4 -2
- package/esm2015/lib/components/shared-components.module.js +7 -3
- package/esm2015/lib/components/tag/tag.component.js +11 -6
- package/esm2015/lib/components/tree/tree.component.js +20 -0
- package/esm2015/lib/components/tree/tree.dto.js +2 -0
- package/esm2015/lib/components/tree/tree.module.js +20 -0
- package/esm2015/lib/pipes/shared-pipes.module.js +16 -0
- package/esm2015/lib/pipes/tree/format-object-to-recursif-tree.pipe.js +37 -0
- package/esm2015/lib/pipes/tree/format-object-to-simple-tree.pipe.js +45 -0
- package/esm2015/lib/wizi-components.module.js +4 -2
- package/esm2015/public-api.js +6 -1
- package/fesm2015/wizishop-angular-components.js +145 -10
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/button/button.component.d.ts +1 -0
- package/lib/components/tag/tag.component.d.ts +3 -1
- package/lib/components/tree/tree.component.d.ts +9 -0
- package/lib/components/tree/tree.dto.d.ts +8 -0
- package/lib/components/tree/tree.module.d.ts +2 -0
- package/lib/pipes/shared-pipes.module.d.ts +2 -0
- package/lib/pipes/tree/format-object-to-recursif-tree.pipe.d.ts +6 -0
- package/lib/pipes/tree/format-object-to-simple-tree.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
- package/wizishop-angular-components-0.0.74.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.71.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NwbFilterRoutingBuilder, NwbAllModule } from '@wizishop/ng-wizi-bulma';
|
|
2
|
-
import { Component, ViewEncapsulation, Input, EventEmitter, Output, Directive, HostListener, ɵɵdefineInjectable, ɵɵinject, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injectable, Injector, ElementRef, Renderer2, NgModule, ViewChild, Pipe, Inject } from '@angular/core';
|
|
2
|
+
import { Component, ViewEncapsulation, Input, EventEmitter, Output, Directive, HostListener, ɵɵdefineInjectable, ɵɵinject, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injectable, Injector, ElementRef, Renderer2, NgModule, ViewChild, Pipe, Inject, ContentChild } from '@angular/core';
|
|
3
3
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
@@ -517,13 +517,16 @@ class TagComponent {
|
|
|
517
517
|
constructor() {
|
|
518
518
|
this.label = '';
|
|
519
519
|
this.hasClose = false;
|
|
520
|
-
this.isOpen = true;
|
|
521
520
|
this.big = false;
|
|
521
|
+
this.isOpen = true;
|
|
522
|
+
this.isOpenChange = new EventEmitter();
|
|
522
523
|
}
|
|
523
524
|
closeTag() {
|
|
524
|
-
if (this.hasClose) {
|
|
525
|
-
|
|
525
|
+
if (!this.hasClose) {
|
|
526
|
+
return;
|
|
526
527
|
}
|
|
528
|
+
this.isOpen = false;
|
|
529
|
+
this.isOpenChange.next(this.isOpen);
|
|
527
530
|
}
|
|
528
531
|
}
|
|
529
532
|
TagComponent.decorators = [
|
|
@@ -537,7 +540,9 @@ TagComponent.propDecorators = {
|
|
|
537
540
|
label: [{ type: Input }],
|
|
538
541
|
class: [{ type: Input }],
|
|
539
542
|
hasClose: [{ type: Input }],
|
|
540
|
-
big: [{ type: Input }]
|
|
543
|
+
big: [{ type: Input }],
|
|
544
|
+
isOpen: [{ type: Input }],
|
|
545
|
+
isOpenChange: [{ type: Output }]
|
|
541
546
|
};
|
|
542
547
|
|
|
543
548
|
class TabComponent {
|
|
@@ -574,6 +579,7 @@ class ButtonComponent {
|
|
|
574
579
|
this.label = '';
|
|
575
580
|
this.icon = '';
|
|
576
581
|
this.widthAuto = false;
|
|
582
|
+
this.contentHorizontalPosition = 'center';
|
|
577
583
|
this.iconFontSize = 12;
|
|
578
584
|
this.hasLoader = false;
|
|
579
585
|
this.disabled = false;
|
|
@@ -665,7 +671,7 @@ class ButtonComponent {
|
|
|
665
671
|
ButtonComponent.decorators = [
|
|
666
672
|
{ type: Component, args: [{
|
|
667
673
|
selector: 'wac-button',
|
|
668
|
-
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]=\"[label === '' ? 'alone' : ''
|
|
674
|
+
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 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\">\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\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\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"
|
|
669
675
|
},] }
|
|
670
676
|
];
|
|
671
677
|
ButtonComponent.ctorParameters = () => [];
|
|
@@ -675,6 +681,7 @@ ButtonComponent.propDecorators = {
|
|
|
675
681
|
icon: [{ type: Input }],
|
|
676
682
|
iconNext: [{ type: Input }],
|
|
677
683
|
widthAuto: [{ type: Input }],
|
|
684
|
+
contentHorizontalPosition: [{ type: Input }],
|
|
678
685
|
iconFontSize: [{ type: Input }],
|
|
679
686
|
hasLoader: [{ type: Input }],
|
|
680
687
|
disabled: [{ type: Input }],
|
|
@@ -3291,6 +3298,131 @@ SelectedListComponent.propDecorators = {
|
|
|
3291
3298
|
unSelectedItemsAll: [{ type: Output }]
|
|
3292
3299
|
};
|
|
3293
3300
|
|
|
3301
|
+
class TreeComponent {
|
|
3302
|
+
constructor() {
|
|
3303
|
+
this.treeDepth = 0;
|
|
3304
|
+
}
|
|
3305
|
+
ngOnInit() { }
|
|
3306
|
+
}
|
|
3307
|
+
TreeComponent.decorators = [
|
|
3308
|
+
{ type: Component, args: [{
|
|
3309
|
+
selector: 'wac-tree',
|
|
3310
|
+
template: "<div *ngFor=\"let item of items; index as i\" [ngClass]=\"['treeDepth-' + treeDepth]\">\n <ul>\n <li>\n\n <ng-template #defaultItem>\n {{ item?.treeLabel }}\n </ng-template>\n\n <ng-container\n [ngTemplateOutlet]=\"optionTemplateRef || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n >\n </ng-container>\n\n <wac-tree [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\">\n <!-- Todo maybe pass child template -->\n </wac-tree>\n </li>\n </ul>\n</div>"
|
|
3311
|
+
},] }
|
|
3312
|
+
];
|
|
3313
|
+
TreeComponent.ctorParameters = () => [];
|
|
3314
|
+
TreeComponent.propDecorators = {
|
|
3315
|
+
items: [{ type: Input }],
|
|
3316
|
+
treeDepth: [{ type: Input }],
|
|
3317
|
+
optionTemplateRef: [{ type: ContentChild, args: ["optionTemplate", { static: false },] }]
|
|
3318
|
+
};
|
|
3319
|
+
|
|
3320
|
+
class FormatObjectToRecursifTreePipe {
|
|
3321
|
+
constructor() {
|
|
3322
|
+
this.childrenProperties = [];
|
|
3323
|
+
}
|
|
3324
|
+
transform(objectList, childrenProperties) {
|
|
3325
|
+
this.childrenProperties = childrenProperties;
|
|
3326
|
+
const treeDepth = 0;
|
|
3327
|
+
objectList.forEach(object => this.recursiveFormatObjectToRecursifTree(object, treeDepth));
|
|
3328
|
+
return objectList;
|
|
3329
|
+
}
|
|
3330
|
+
recursiveFormatObjectToRecursifTree(object, treeDepth) {
|
|
3331
|
+
for (const childrenProperty of this.childrenProperties) {
|
|
3332
|
+
object.hasTreeChrildren = true;
|
|
3333
|
+
if (!object.hasOwnProperty(childrenProperty)) {
|
|
3334
|
+
// No more chrildren
|
|
3335
|
+
object.hasTreeChrildren = false;
|
|
3336
|
+
continue;
|
|
3337
|
+
}
|
|
3338
|
+
if (Array.isArray(object[childrenProperty])) {
|
|
3339
|
+
throw `Property : "${childrenProperty}", is not an array. it could not be transform to a recursive list.`;
|
|
3340
|
+
}
|
|
3341
|
+
// Add treeChildren property filled with name children property
|
|
3342
|
+
object.treeChildren = object[childrenProperty];
|
|
3343
|
+
// call this function recursively until no children can be generated
|
|
3344
|
+
this.recursiveFormatObjectToRecursifTree(object.treeChildren, treeDepth++);
|
|
3345
|
+
break;
|
|
3346
|
+
}
|
|
3347
|
+
object.treeDepth = treeDepth;
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
FormatObjectToRecursifTreePipe.decorators = [
|
|
3351
|
+
{ type: Pipe, args: [{
|
|
3352
|
+
name: 'formatObjectToRecursifTree'
|
|
3353
|
+
},] }
|
|
3354
|
+
];
|
|
3355
|
+
|
|
3356
|
+
class FormatObjectToSimpleTreePipe {
|
|
3357
|
+
constructor() {
|
|
3358
|
+
this.childrenProperties = [];
|
|
3359
|
+
this.labelProperties = [];
|
|
3360
|
+
}
|
|
3361
|
+
transform(objectList, childrenProperties, labelProperties) {
|
|
3362
|
+
this.childrenProperties = childrenProperties;
|
|
3363
|
+
this.labelProperties = labelProperties;
|
|
3364
|
+
const treeDepth = 0;
|
|
3365
|
+
objectList.forEach(object => this.recursiveFormatObjectToSimpleTree(object, treeDepth));
|
|
3366
|
+
return objectList;
|
|
3367
|
+
}
|
|
3368
|
+
recursiveFormatObjectToSimpleTree(object, treeDepth) {
|
|
3369
|
+
for (const property in object) {
|
|
3370
|
+
if (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
3371
|
+
continue;
|
|
3372
|
+
}
|
|
3373
|
+
if (this.labelProperties.includes(property)) {
|
|
3374
|
+
object.treeLabel = object[property];
|
|
3375
|
+
continue;
|
|
3376
|
+
}
|
|
3377
|
+
object.hasTreeChrildren = true;
|
|
3378
|
+
if (!this.childrenProperties.includes(property)) {
|
|
3379
|
+
// No more chrildren
|
|
3380
|
+
object.hasTreeChrildren = false;
|
|
3381
|
+
continue;
|
|
3382
|
+
}
|
|
3383
|
+
if (Array.isArray(object[property])) {
|
|
3384
|
+
throw `Property : "${property}", is not an array. it could not be transform to a recursive list.`;
|
|
3385
|
+
}
|
|
3386
|
+
// Add treeChildren property filled with name children property
|
|
3387
|
+
object.treeChildren = object[property];
|
|
3388
|
+
// call this function recursively until no children can be generated
|
|
3389
|
+
this.recursiveFormatObjectToSimpleTree(object.treeChildren, treeDepth++);
|
|
3390
|
+
break;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
FormatObjectToSimpleTreePipe.decorators = [
|
|
3395
|
+
{ type: Pipe, args: [{
|
|
3396
|
+
name: 'formatObjectToSimpleTree'
|
|
3397
|
+
},] }
|
|
3398
|
+
];
|
|
3399
|
+
|
|
3400
|
+
const exportedPipes = [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe];
|
|
3401
|
+
class SharedPipes {
|
|
3402
|
+
}
|
|
3403
|
+
SharedPipes.decorators = [
|
|
3404
|
+
{ type: NgModule, args: [{
|
|
3405
|
+
imports: [CommonModule, FormsModule],
|
|
3406
|
+
declarations: exportedPipes,
|
|
3407
|
+
exports: exportedPipes
|
|
3408
|
+
},] }
|
|
3409
|
+
];
|
|
3410
|
+
|
|
3411
|
+
class TreeModule {
|
|
3412
|
+
}
|
|
3413
|
+
TreeModule.decorators = [
|
|
3414
|
+
{ type: NgModule, args: [{
|
|
3415
|
+
imports: [
|
|
3416
|
+
CommonModule,
|
|
3417
|
+
FormsModule,
|
|
3418
|
+
SharedPipes
|
|
3419
|
+
],
|
|
3420
|
+
exports: [TreeComponent],
|
|
3421
|
+
declarations: [TreeComponent],
|
|
3422
|
+
providers: [],
|
|
3423
|
+
},] }
|
|
3424
|
+
];
|
|
3425
|
+
|
|
3294
3426
|
const components = [
|
|
3295
3427
|
TagComponent,
|
|
3296
3428
|
TabComponent,
|
|
@@ -3346,7 +3478,8 @@ const exportsFromModule = [
|
|
|
3346
3478
|
TooltipComponent,
|
|
3347
3479
|
CheckboxComponent,
|
|
3348
3480
|
LoaderComponent,
|
|
3349
|
-
ProgressBarComponent
|
|
3481
|
+
ProgressBarComponent,
|
|
3482
|
+
TreeComponent
|
|
3350
3483
|
];
|
|
3351
3484
|
class SharedComponentsModule {
|
|
3352
3485
|
}
|
|
@@ -3371,7 +3504,8 @@ SharedComponentsModule.decorators = [
|
|
|
3371
3504
|
ProgressBarModule,
|
|
3372
3505
|
PerfectScrollbarModule,
|
|
3373
3506
|
AlertPopupModule,
|
|
3374
|
-
RouterModule
|
|
3507
|
+
RouterModule,
|
|
3508
|
+
TreeModule
|
|
3375
3509
|
],
|
|
3376
3510
|
declarations: components,
|
|
3377
3511
|
exports: [...components, ...exportsFromModule]
|
|
@@ -3386,9 +3520,10 @@ WiziComponentsModule.decorators = [
|
|
|
3386
3520
|
CommonModule,
|
|
3387
3521
|
SharedComponentsModule,
|
|
3388
3522
|
SharedDirectives,
|
|
3523
|
+
SharedPipes,
|
|
3389
3524
|
NwbAllModule
|
|
3390
3525
|
],
|
|
3391
|
-
exports: [SharedComponentsModule, SharedDirectives]
|
|
3526
|
+
exports: [SharedComponentsModule, SharedDirectives, SharedPipes]
|
|
3392
3527
|
},] }
|
|
3393
3528
|
];
|
|
3394
3529
|
|
|
@@ -3400,5 +3535,5 @@ WiziComponentsModule.decorators = [
|
|
|
3400
3535
|
* Generated bundle index. Do not edit.
|
|
3401
3536
|
*/
|
|
3402
3537
|
|
|
3403
|
-
export { AbstractDebounceDirective, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AutoHideDirective, BackComponent, BlockComponent, ButtonComponent, CalendarComponent, CheckBoxRow, CheckboxComponent, DebounceKeyupDirective, DeleteComponent, DropdownComponent, FiltersComponent, FiltersTableService, FreePopinComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MultipleSearchComponent, MultipleSearchPlusComponent, PaginationComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectInTextComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SnackbarComponent, StateComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableRow, TagComponent, TextAreaComponent, TextComponent, TooltipComponent, UploadComponent, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WzEditInPlaceComponent, ZindexToggleDirective, DomService as ɵa, PaginationModule as ɵb, PagniationArrayTotalPages as ɵc, PagniationIsLastPage as ɵd, PagniationText as ɵe, TableModule as ɵf, InputSearchModule as ɵg, InputModule as ɵh, TooltipModule as ɵi, ProgressBarModule as ɵj, LoaderModule as ɵk, CheckboxModule as ɵl, inOutY as ɵm, inOutX as ɵn };
|
|
3538
|
+
export { AbstractDebounceDirective, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AutoHideDirective, BackComponent, BlockComponent, ButtonComponent, CalendarComponent, CheckBoxRow, CheckboxComponent, DebounceKeyupDirective, DeleteComponent, DropdownComponent, FiltersComponent, FiltersTableService, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MultipleSearchComponent, MultipleSearchPlusComponent, PaginationComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectInTextComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableRow, TagComponent, TextAreaComponent, TextComponent, TooltipComponent, TreeComponent, TreeModule, UploadComponent, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WzEditInPlaceComponent, ZindexToggleDirective, DomService as ɵa, PaginationModule as ɵb, PagniationArrayTotalPages as ɵc, PagniationIsLastPage as ɵd, PagniationText as ɵe, TableModule as ɵf, InputSearchModule as ɵg, InputModule as ɵh, TooltipModule as ɵi, ProgressBarModule as ɵj, LoaderModule as ɵk, CheckboxModule as ɵl, inOutY as ɵm, inOutX as ɵn };
|
|
3404
3539
|
//# sourceMappingURL=wizishop-angular-components.js.map
|