@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
|
@@ -847,13 +847,16 @@
|
|
|
847
847
|
function TagComponent() {
|
|
848
848
|
this.label = '';
|
|
849
849
|
this.hasClose = false;
|
|
850
|
-
this.isOpen = true;
|
|
851
850
|
this.big = false;
|
|
851
|
+
this.isOpen = true;
|
|
852
|
+
this.isOpenChange = new i0.EventEmitter();
|
|
852
853
|
}
|
|
853
854
|
TagComponent.prototype.closeTag = function () {
|
|
854
|
-
if (this.hasClose) {
|
|
855
|
-
|
|
855
|
+
if (!this.hasClose) {
|
|
856
|
+
return;
|
|
856
857
|
}
|
|
858
|
+
this.isOpen = false;
|
|
859
|
+
this.isOpenChange.next(this.isOpen);
|
|
857
860
|
};
|
|
858
861
|
return TagComponent;
|
|
859
862
|
}());
|
|
@@ -868,7 +871,9 @@
|
|
|
868
871
|
label: [{ type: i0.Input }],
|
|
869
872
|
class: [{ type: i0.Input }],
|
|
870
873
|
hasClose: [{ type: i0.Input }],
|
|
871
|
-
big: [{ type: i0.Input }]
|
|
874
|
+
big: [{ type: i0.Input }],
|
|
875
|
+
isOpen: [{ type: i0.Input }],
|
|
876
|
+
isOpenChange: [{ type: i0.Output }]
|
|
872
877
|
};
|
|
873
878
|
|
|
874
879
|
var TabComponent = /** @class */ (function () {
|
|
@@ -906,6 +911,7 @@
|
|
|
906
911
|
this.label = '';
|
|
907
912
|
this.icon = '';
|
|
908
913
|
this.widthAuto = false;
|
|
914
|
+
this.contentHorizontalPosition = 'center';
|
|
909
915
|
this.iconFontSize = 12;
|
|
910
916
|
this.hasLoader = false;
|
|
911
917
|
this.disabled = false;
|
|
@@ -1000,7 +1006,7 @@
|
|
|
1000
1006
|
ButtonComponent.decorators = [
|
|
1001
1007
|
{ type: i0.Component, args: [{
|
|
1002
1008
|
selector: 'wac-button',
|
|
1003
|
-
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' : ''
|
|
1009
|
+
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"
|
|
1004
1010
|
},] }
|
|
1005
1011
|
];
|
|
1006
1012
|
ButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -1010,6 +1016,7 @@
|
|
|
1010
1016
|
icon: [{ type: i0.Input }],
|
|
1011
1017
|
iconNext: [{ type: i0.Input }],
|
|
1012
1018
|
widthAuto: [{ type: i0.Input }],
|
|
1019
|
+
contentHorizontalPosition: [{ type: i0.Input }],
|
|
1013
1020
|
iconFontSize: [{ type: i0.Input }],
|
|
1014
1021
|
hasLoader: [{ type: i0.Input }],
|
|
1015
1022
|
disabled: [{ type: i0.Input }],
|
|
@@ -1804,7 +1811,7 @@
|
|
|
1804
1811
|
this.indication = false;
|
|
1805
1812
|
this.success = false;
|
|
1806
1813
|
this.keypressEnter = new i0.EventEmitter();
|
|
1807
|
-
this.KEYPRESS_ENTER = "
|
|
1814
|
+
this.KEYPRESS_ENTER = "Enter";
|
|
1808
1815
|
this.id = 'wz-input_' +
|
|
1809
1816
|
Math.random()
|
|
1810
1817
|
.toString(36)
|
|
@@ -1846,7 +1853,6 @@
|
|
|
1846
1853
|
}
|
|
1847
1854
|
};
|
|
1848
1855
|
InputComponent.prototype.keyPress = function (event) {
|
|
1849
|
-
console.log('event', event);
|
|
1850
1856
|
if (this.keyPreventDefault.includes(event.key)) {
|
|
1851
1857
|
event.preventDefault();
|
|
1852
1858
|
}
|
|
@@ -3761,6 +3767,155 @@
|
|
|
3761
3767
|
unSelectedItemsAll: [{ type: i0.Output }]
|
|
3762
3768
|
};
|
|
3763
3769
|
|
|
3770
|
+
var TreeComponent = /** @class */ (function () {
|
|
3771
|
+
function TreeComponent() {
|
|
3772
|
+
this.treeDepth = 0;
|
|
3773
|
+
}
|
|
3774
|
+
TreeComponent.prototype.ngOnInit = function () { };
|
|
3775
|
+
return TreeComponent;
|
|
3776
|
+
}());
|
|
3777
|
+
TreeComponent.decorators = [
|
|
3778
|
+
{ type: i0.Component, args: [{
|
|
3779
|
+
selector: 'wac-tree',
|
|
3780
|
+
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>"
|
|
3781
|
+
},] }
|
|
3782
|
+
];
|
|
3783
|
+
TreeComponent.ctorParameters = function () { return []; };
|
|
3784
|
+
TreeComponent.propDecorators = {
|
|
3785
|
+
items: [{ type: i0.Input }],
|
|
3786
|
+
treeDepth: [{ type: i0.Input }],
|
|
3787
|
+
optionTemplate: [{ type: i0.Input, args: ["optionTemplate",] }]
|
|
3788
|
+
};
|
|
3789
|
+
|
|
3790
|
+
var FormatObjectToRecursifTreePipe = /** @class */ (function () {
|
|
3791
|
+
function FormatObjectToRecursifTreePipe() {
|
|
3792
|
+
this.childrenProperties = [];
|
|
3793
|
+
}
|
|
3794
|
+
FormatObjectToRecursifTreePipe.prototype.transform = function (objectList, childrenProperties) {
|
|
3795
|
+
var _this = this;
|
|
3796
|
+
this.childrenProperties = childrenProperties;
|
|
3797
|
+
var treeDepth = 0;
|
|
3798
|
+
objectList.forEach(function (object) { return _this.recursiveFormatObjectToRecursifTree(object, treeDepth); });
|
|
3799
|
+
console.log('objectList');
|
|
3800
|
+
console.log(objectList);
|
|
3801
|
+
return objectList;
|
|
3802
|
+
};
|
|
3803
|
+
FormatObjectToRecursifTreePipe.prototype.recursiveFormatObjectToRecursifTree = function (object, treeDepth) {
|
|
3804
|
+
var e_1, _a;
|
|
3805
|
+
try {
|
|
3806
|
+
for (var _b = __values(this.childrenProperties), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3807
|
+
var childrenProperty = _c.value;
|
|
3808
|
+
object.hasTreeChrildren = true;
|
|
3809
|
+
if (!object.hasOwnProperty(childrenProperty)) {
|
|
3810
|
+
// No more chrildren
|
|
3811
|
+
object.hasTreeChrildren = false;
|
|
3812
|
+
continue;
|
|
3813
|
+
}
|
|
3814
|
+
if (!Array.isArray(object[childrenProperty])) {
|
|
3815
|
+
throw "Property : \"" + childrenProperty + "\", is not an array. it could not be transform to a recursive list.";
|
|
3816
|
+
}
|
|
3817
|
+
// Add treeChildren property filled with name children property
|
|
3818
|
+
object.treeChildren = object[childrenProperty];
|
|
3819
|
+
// call this function recursively until no children can be generated
|
|
3820
|
+
this.recursiveFormatObjectToRecursifTree(object.treeChildren, treeDepth++);
|
|
3821
|
+
break;
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3824
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3825
|
+
finally {
|
|
3826
|
+
try {
|
|
3827
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3828
|
+
}
|
|
3829
|
+
finally { if (e_1) throw e_1.error; }
|
|
3830
|
+
}
|
|
3831
|
+
object.treeDepth = treeDepth;
|
|
3832
|
+
};
|
|
3833
|
+
return FormatObjectToRecursifTreePipe;
|
|
3834
|
+
}());
|
|
3835
|
+
FormatObjectToRecursifTreePipe.decorators = [
|
|
3836
|
+
{ type: i0.Pipe, args: [{
|
|
3837
|
+
name: 'formatObjectToRecursifTree'
|
|
3838
|
+
},] }
|
|
3839
|
+
];
|
|
3840
|
+
|
|
3841
|
+
var FormatObjectToSimpleTreePipe = /** @class */ (function () {
|
|
3842
|
+
function FormatObjectToSimpleTreePipe() {
|
|
3843
|
+
this.childrenProperties = [];
|
|
3844
|
+
this.labelProperties = [];
|
|
3845
|
+
}
|
|
3846
|
+
FormatObjectToSimpleTreePipe.prototype.transform = function (objectList, childrenProperties, labelProperties) {
|
|
3847
|
+
var _this = this;
|
|
3848
|
+
this.childrenProperties = childrenProperties;
|
|
3849
|
+
this.labelProperties = labelProperties;
|
|
3850
|
+
var treeDepth = 0;
|
|
3851
|
+
objectList.forEach(function (object) { return _this.recursiveFormatObjectToSimpleTree(object, treeDepth); });
|
|
3852
|
+
return objectList;
|
|
3853
|
+
};
|
|
3854
|
+
FormatObjectToSimpleTreePipe.prototype.recursiveFormatObjectToSimpleTree = function (object, treeDepth) {
|
|
3855
|
+
for (var property in object) {
|
|
3856
|
+
if (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
3857
|
+
continue;
|
|
3858
|
+
}
|
|
3859
|
+
if (this.labelProperties.includes(property)) {
|
|
3860
|
+
object.treeLabel = object[property];
|
|
3861
|
+
continue;
|
|
3862
|
+
}
|
|
3863
|
+
object.hasTreeChrildren = true;
|
|
3864
|
+
if (!this.childrenProperties.includes(property)) {
|
|
3865
|
+
// No more chrildren
|
|
3866
|
+
object.hasTreeChrildren = false;
|
|
3867
|
+
continue;
|
|
3868
|
+
}
|
|
3869
|
+
if (!Array.isArray(object[property])) {
|
|
3870
|
+
throw "Property : \"" + property + "\", is not an array. it could not be transform to a recursive list.";
|
|
3871
|
+
}
|
|
3872
|
+
// Add treeChildren property filled with name children property
|
|
3873
|
+
object.treeChildren = object[property];
|
|
3874
|
+
// call this function recursively until no children can be generated
|
|
3875
|
+
this.recursiveFormatObjectToSimpleTree(object.treeChildren, treeDepth++);
|
|
3876
|
+
break;
|
|
3877
|
+
}
|
|
3878
|
+
};
|
|
3879
|
+
return FormatObjectToSimpleTreePipe;
|
|
3880
|
+
}());
|
|
3881
|
+
FormatObjectToSimpleTreePipe.decorators = [
|
|
3882
|
+
{ type: i0.Pipe, args: [{
|
|
3883
|
+
name: 'formatObjectToSimpleTree'
|
|
3884
|
+
},] }
|
|
3885
|
+
];
|
|
3886
|
+
|
|
3887
|
+
var exportedPipes = [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe];
|
|
3888
|
+
var SharedPipes = /** @class */ (function () {
|
|
3889
|
+
function SharedPipes() {
|
|
3890
|
+
}
|
|
3891
|
+
return SharedPipes;
|
|
3892
|
+
}());
|
|
3893
|
+
SharedPipes.decorators = [
|
|
3894
|
+
{ type: i0.NgModule, args: [{
|
|
3895
|
+
imports: [common.CommonModule, forms.FormsModule],
|
|
3896
|
+
declarations: exportedPipes,
|
|
3897
|
+
exports: exportedPipes
|
|
3898
|
+
},] }
|
|
3899
|
+
];
|
|
3900
|
+
|
|
3901
|
+
var TreeModule = /** @class */ (function () {
|
|
3902
|
+
function TreeModule() {
|
|
3903
|
+
}
|
|
3904
|
+
return TreeModule;
|
|
3905
|
+
}());
|
|
3906
|
+
TreeModule.decorators = [
|
|
3907
|
+
{ type: i0.NgModule, args: [{
|
|
3908
|
+
imports: [
|
|
3909
|
+
common.CommonModule,
|
|
3910
|
+
forms.FormsModule,
|
|
3911
|
+
SharedPipes
|
|
3912
|
+
],
|
|
3913
|
+
exports: [TreeComponent],
|
|
3914
|
+
declarations: [TreeComponent],
|
|
3915
|
+
providers: [],
|
|
3916
|
+
},] }
|
|
3917
|
+
];
|
|
3918
|
+
|
|
3764
3919
|
var components = [
|
|
3765
3920
|
TagComponent,
|
|
3766
3921
|
TabComponent,
|
|
@@ -3816,7 +3971,8 @@
|
|
|
3816
3971
|
TooltipComponent,
|
|
3817
3972
|
CheckboxComponent,
|
|
3818
3973
|
LoaderComponent,
|
|
3819
|
-
ProgressBarComponent
|
|
3974
|
+
ProgressBarComponent,
|
|
3975
|
+
TreeComponent
|
|
3820
3976
|
];
|
|
3821
3977
|
var SharedComponentsModule = /** @class */ (function () {
|
|
3822
3978
|
function SharedComponentsModule() {
|
|
@@ -3844,7 +4000,8 @@
|
|
|
3844
4000
|
ProgressBarModule,
|
|
3845
4001
|
ngxPerfectScrollbar.PerfectScrollbarModule,
|
|
3846
4002
|
AlertPopupModule,
|
|
3847
|
-
router.RouterModule
|
|
4003
|
+
router.RouterModule,
|
|
4004
|
+
TreeModule
|
|
3848
4005
|
],
|
|
3849
4006
|
declarations: components,
|
|
3850
4007
|
exports: __spread(components, exportsFromModule)
|
|
@@ -3862,9 +4019,10 @@
|
|
|
3862
4019
|
common.CommonModule,
|
|
3863
4020
|
SharedComponentsModule,
|
|
3864
4021
|
SharedDirectives,
|
|
4022
|
+
SharedPipes,
|
|
3865
4023
|
i1$1.NwbAllModule
|
|
3866
4024
|
],
|
|
3867
|
-
exports: [SharedComponentsModule, SharedDirectives]
|
|
4025
|
+
exports: [SharedComponentsModule, SharedDirectives, SharedPipes]
|
|
3868
4026
|
},] }
|
|
3869
4027
|
];
|
|
3870
4028
|
|
|
@@ -3893,6 +4051,8 @@
|
|
|
3893
4051
|
exports.DropdownComponent = DropdownComponent;
|
|
3894
4052
|
exports.FiltersComponent = FiltersComponent;
|
|
3895
4053
|
exports.FiltersTableService = FiltersTableService;
|
|
4054
|
+
exports.FormatObjectToRecursifTreePipe = FormatObjectToRecursifTreePipe;
|
|
4055
|
+
exports.FormatObjectToSimpleTreePipe = FormatObjectToSimpleTreePipe;
|
|
3896
4056
|
exports.FreePopinComponent = FreePopinComponent;
|
|
3897
4057
|
exports.H1Component = H1Component;
|
|
3898
4058
|
exports.H2Component = H2Component;
|
|
@@ -3923,6 +4083,7 @@
|
|
|
3923
4083
|
exports.SettingsComponent = SettingsComponent;
|
|
3924
4084
|
exports.SharedComponentsModule = SharedComponentsModule;
|
|
3925
4085
|
exports.SharedDirectives = SharedDirectives;
|
|
4086
|
+
exports.SharedPipes = SharedPipes;
|
|
3926
4087
|
exports.SnackbarComponent = SnackbarComponent;
|
|
3927
4088
|
exports.StateComponent = StateComponent;
|
|
3928
4089
|
exports.SwitchComponent = SwitchComponent;
|
|
@@ -3935,6 +4096,8 @@
|
|
|
3935
4096
|
exports.TextAreaComponent = TextAreaComponent;
|
|
3936
4097
|
exports.TextComponent = TextComponent;
|
|
3937
4098
|
exports.TooltipComponent = TooltipComponent;
|
|
4099
|
+
exports.TreeComponent = TreeComponent;
|
|
4100
|
+
exports.TreeModule = TreeModule;
|
|
3938
4101
|
exports.UploadComponent = UploadComponent;
|
|
3939
4102
|
exports.WiziComponentsModule = WiziComponentsModule;
|
|
3940
4103
|
exports.WrapperBlocsComponent = WrapperBlocsComponent;
|