@wizishop/angular-components 0.0.72 → 0.0.75
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 +3236 -3235
- package/bundles/wizishop-angular-components.umd.js +173 -10
- 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/inputs/input/input.component.js +2 -3
- 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 +39 -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 +147 -11
- 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.75.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.72.tgz +0 -0
|
@@ -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 }],
|
|
@@ -1436,7 +1443,7 @@ class InputComponent {
|
|
|
1436
1443
|
this.indication = false;
|
|
1437
1444
|
this.success = false;
|
|
1438
1445
|
this.keypressEnter = new EventEmitter();
|
|
1439
|
-
this.KEYPRESS_ENTER = "
|
|
1446
|
+
this.KEYPRESS_ENTER = "Enter";
|
|
1440
1447
|
this.id = 'wz-input_' +
|
|
1441
1448
|
Math.random()
|
|
1442
1449
|
.toString(36)
|
|
@@ -1478,7 +1485,6 @@ class InputComponent {
|
|
|
1478
1485
|
}
|
|
1479
1486
|
}
|
|
1480
1487
|
keyPress(event) {
|
|
1481
|
-
console.log('event', event);
|
|
1482
1488
|
if (this.keyPreventDefault.includes(event.key)) {
|
|
1483
1489
|
event.preventDefault();
|
|
1484
1490
|
}
|
|
@@ -3292,6 +3298,133 @@ SelectedListComponent.propDecorators = {
|
|
|
3292
3298
|
unSelectedItemsAll: [{ type: Output }]
|
|
3293
3299
|
};
|
|
3294
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]=\"optionTemplate || defaultItem\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n >\n </ng-container>\n\n <wac-tree [optionTemplate]=\"optionTemplate\" [items]=\"item.treeChildren\" *ngIf=\"item.treeChildren?.length\" [treeDepth]=\"treeDepth + 1\">\n <!-- Todo maybe pass child template -->\n\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
|
+
optionTemplate: [{ type: Input, args: ["optionTemplate",] }]
|
|
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
|
+
console.log('objectList');
|
|
3329
|
+
console.log(objectList);
|
|
3330
|
+
return objectList;
|
|
3331
|
+
}
|
|
3332
|
+
recursiveFormatObjectToRecursifTree(object, treeDepth) {
|
|
3333
|
+
for (const childrenProperty of this.childrenProperties) {
|
|
3334
|
+
object.hasTreeChrildren = true;
|
|
3335
|
+
if (!object.hasOwnProperty(childrenProperty)) {
|
|
3336
|
+
// No more chrildren
|
|
3337
|
+
object.hasTreeChrildren = false;
|
|
3338
|
+
continue;
|
|
3339
|
+
}
|
|
3340
|
+
if (!Array.isArray(object[childrenProperty])) {
|
|
3341
|
+
throw `Property : "${childrenProperty}", is not an array. it could not be transform to a recursive list.`;
|
|
3342
|
+
}
|
|
3343
|
+
// Add treeChildren property filled with name children property
|
|
3344
|
+
object.treeChildren = object[childrenProperty];
|
|
3345
|
+
// call this function recursively until no children can be generated
|
|
3346
|
+
this.recursiveFormatObjectToRecursifTree(object.treeChildren, treeDepth++);
|
|
3347
|
+
break;
|
|
3348
|
+
}
|
|
3349
|
+
object.treeDepth = treeDepth;
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
FormatObjectToRecursifTreePipe.decorators = [
|
|
3353
|
+
{ type: Pipe, args: [{
|
|
3354
|
+
name: 'formatObjectToRecursifTree'
|
|
3355
|
+
},] }
|
|
3356
|
+
];
|
|
3357
|
+
|
|
3358
|
+
class FormatObjectToSimpleTreePipe {
|
|
3359
|
+
constructor() {
|
|
3360
|
+
this.childrenProperties = [];
|
|
3361
|
+
this.labelProperties = [];
|
|
3362
|
+
}
|
|
3363
|
+
transform(objectList, childrenProperties, labelProperties) {
|
|
3364
|
+
this.childrenProperties = childrenProperties;
|
|
3365
|
+
this.labelProperties = labelProperties;
|
|
3366
|
+
const treeDepth = 0;
|
|
3367
|
+
objectList.forEach(object => this.recursiveFormatObjectToSimpleTree(object, treeDepth));
|
|
3368
|
+
return objectList;
|
|
3369
|
+
}
|
|
3370
|
+
recursiveFormatObjectToSimpleTree(object, treeDepth) {
|
|
3371
|
+
for (const property in object) {
|
|
3372
|
+
if (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
3373
|
+
continue;
|
|
3374
|
+
}
|
|
3375
|
+
if (this.labelProperties.includes(property)) {
|
|
3376
|
+
object.treeLabel = object[property];
|
|
3377
|
+
continue;
|
|
3378
|
+
}
|
|
3379
|
+
object.hasTreeChrildren = true;
|
|
3380
|
+
if (!this.childrenProperties.includes(property)) {
|
|
3381
|
+
// No more chrildren
|
|
3382
|
+
object.hasTreeChrildren = false;
|
|
3383
|
+
continue;
|
|
3384
|
+
}
|
|
3385
|
+
if (!Array.isArray(object[property])) {
|
|
3386
|
+
throw `Property : "${property}", is not an array. it could not be transform to a recursive list.`;
|
|
3387
|
+
}
|
|
3388
|
+
// Add treeChildren property filled with name children property
|
|
3389
|
+
object.treeChildren = object[property];
|
|
3390
|
+
// call this function recursively until no children can be generated
|
|
3391
|
+
this.recursiveFormatObjectToSimpleTree(object.treeChildren, treeDepth++);
|
|
3392
|
+
break;
|
|
3393
|
+
}
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
FormatObjectToSimpleTreePipe.decorators = [
|
|
3397
|
+
{ type: Pipe, args: [{
|
|
3398
|
+
name: 'formatObjectToSimpleTree'
|
|
3399
|
+
},] }
|
|
3400
|
+
];
|
|
3401
|
+
|
|
3402
|
+
const exportedPipes = [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe];
|
|
3403
|
+
class SharedPipes {
|
|
3404
|
+
}
|
|
3405
|
+
SharedPipes.decorators = [
|
|
3406
|
+
{ type: NgModule, args: [{
|
|
3407
|
+
imports: [CommonModule, FormsModule],
|
|
3408
|
+
declarations: exportedPipes,
|
|
3409
|
+
exports: exportedPipes
|
|
3410
|
+
},] }
|
|
3411
|
+
];
|
|
3412
|
+
|
|
3413
|
+
class TreeModule {
|
|
3414
|
+
}
|
|
3415
|
+
TreeModule.decorators = [
|
|
3416
|
+
{ type: NgModule, args: [{
|
|
3417
|
+
imports: [
|
|
3418
|
+
CommonModule,
|
|
3419
|
+
FormsModule,
|
|
3420
|
+
SharedPipes
|
|
3421
|
+
],
|
|
3422
|
+
exports: [TreeComponent],
|
|
3423
|
+
declarations: [TreeComponent],
|
|
3424
|
+
providers: [],
|
|
3425
|
+
},] }
|
|
3426
|
+
];
|
|
3427
|
+
|
|
3295
3428
|
const components = [
|
|
3296
3429
|
TagComponent,
|
|
3297
3430
|
TabComponent,
|
|
@@ -3347,7 +3480,8 @@ const exportsFromModule = [
|
|
|
3347
3480
|
TooltipComponent,
|
|
3348
3481
|
CheckboxComponent,
|
|
3349
3482
|
LoaderComponent,
|
|
3350
|
-
ProgressBarComponent
|
|
3483
|
+
ProgressBarComponent,
|
|
3484
|
+
TreeComponent
|
|
3351
3485
|
];
|
|
3352
3486
|
class SharedComponentsModule {
|
|
3353
3487
|
}
|
|
@@ -3372,7 +3506,8 @@ SharedComponentsModule.decorators = [
|
|
|
3372
3506
|
ProgressBarModule,
|
|
3373
3507
|
PerfectScrollbarModule,
|
|
3374
3508
|
AlertPopupModule,
|
|
3375
|
-
RouterModule
|
|
3509
|
+
RouterModule,
|
|
3510
|
+
TreeModule
|
|
3376
3511
|
],
|
|
3377
3512
|
declarations: components,
|
|
3378
3513
|
exports: [...components, ...exportsFromModule]
|
|
@@ -3387,9 +3522,10 @@ WiziComponentsModule.decorators = [
|
|
|
3387
3522
|
CommonModule,
|
|
3388
3523
|
SharedComponentsModule,
|
|
3389
3524
|
SharedDirectives,
|
|
3525
|
+
SharedPipes,
|
|
3390
3526
|
NwbAllModule
|
|
3391
3527
|
],
|
|
3392
|
-
exports: [SharedComponentsModule, SharedDirectives]
|
|
3528
|
+
exports: [SharedComponentsModule, SharedDirectives, SharedPipes]
|
|
3393
3529
|
},] }
|
|
3394
3530
|
];
|
|
3395
3531
|
|
|
@@ -3401,5 +3537,5 @@ WiziComponentsModule.decorators = [
|
|
|
3401
3537
|
* Generated bundle index. Do not edit.
|
|
3402
3538
|
*/
|
|
3403
3539
|
|
|
3404
|
-
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 };
|
|
3540
|
+
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 };
|
|
3405
3541
|
//# sourceMappingURL=wizishop-angular-components.js.map
|