@wizishop/angular-components 0.0.72 → 0.0.73
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 +2602 -2602
- package/bundles/wizishop-angular-components.umd.js +160 -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 +17 -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 +32 -0
- package/esm2015/lib/pipes/tree/format-object-to-simple-tree.pipe.js +41 -0
- package/esm2015/lib/wizi-components.module.js +4 -2
- package/esm2015/public-api.js +6 -1
- package/fesm2015/wizishop-angular-components.js +134 -12
- 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 +8 -0
- package/lib/components/tree/tree.dto.d.ts +6 -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.73.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 = 'left';
|
|
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,142 @@
|
|
|
3761
3767
|
unSelectedItemsAll: [{ type: i0.Output }]
|
|
3762
3768
|
};
|
|
3763
3769
|
|
|
3770
|
+
var TreeComponent = /** @class */ (function () {
|
|
3771
|
+
function TreeComponent() {
|
|
3772
|
+
}
|
|
3773
|
+
TreeComponent.prototype.ngOnInit = function () { };
|
|
3774
|
+
return TreeComponent;
|
|
3775
|
+
}());
|
|
3776
|
+
TreeComponent.decorators = [
|
|
3777
|
+
{ type: i0.Component, args: [{
|
|
3778
|
+
selector: 'wac-tree',
|
|
3779
|
+
template: "<div *ngFor=\"let item of items; index as i\">\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\"></wac-tree>\n </li>\n </ul>\n</div>"
|
|
3780
|
+
},] }
|
|
3781
|
+
];
|
|
3782
|
+
TreeComponent.ctorParameters = function () { return []; };
|
|
3783
|
+
TreeComponent.propDecorators = {
|
|
3784
|
+
items: [{ type: i0.Input }],
|
|
3785
|
+
optionTemplateRef: [{ type: i0.ContentChild, args: ["optionTemplate", { static: false },] }]
|
|
3786
|
+
};
|
|
3787
|
+
|
|
3788
|
+
var FormatObjectToRecursifTreePipe = /** @class */ (function () {
|
|
3789
|
+
function FormatObjectToRecursifTreePipe() {
|
|
3790
|
+
this.childrenProperties = [];
|
|
3791
|
+
}
|
|
3792
|
+
FormatObjectToRecursifTreePipe.prototype.transform = function (objectList, childrenProperties) {
|
|
3793
|
+
var _this = this;
|
|
3794
|
+
this.childrenProperties = childrenProperties;
|
|
3795
|
+
objectList.forEach(function (object) { return _this.recursiveFormatObjectToRecursifTree(object); });
|
|
3796
|
+
return objectList;
|
|
3797
|
+
};
|
|
3798
|
+
FormatObjectToRecursifTreePipe.prototype.recursiveFormatObjectToRecursifTree = function (object) {
|
|
3799
|
+
var e_1, _a;
|
|
3800
|
+
try {
|
|
3801
|
+
for (var _b = __values(this.childrenProperties), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3802
|
+
var childrenProperty = _c.value;
|
|
3803
|
+
if (!object.hasOwnProperty(childrenProperty)) {
|
|
3804
|
+
continue;
|
|
3805
|
+
}
|
|
3806
|
+
if (Array.isArray(object[childrenProperty])) {
|
|
3807
|
+
throw "Property : \"" + childrenProperty + "\", is not an array. it could not be transform to a recursive list.";
|
|
3808
|
+
}
|
|
3809
|
+
// Add treeChildren property filled with name children property
|
|
3810
|
+
object.treeChildren = object[childrenProperty];
|
|
3811
|
+
// call this function recursively until no children can be generated
|
|
3812
|
+
this.recursiveFormatObjectToRecursifTree(object.treeChildren);
|
|
3813
|
+
break;
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3817
|
+
finally {
|
|
3818
|
+
try {
|
|
3819
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3820
|
+
}
|
|
3821
|
+
finally { if (e_1) throw e_1.error; }
|
|
3822
|
+
}
|
|
3823
|
+
};
|
|
3824
|
+
return FormatObjectToRecursifTreePipe;
|
|
3825
|
+
}());
|
|
3826
|
+
FormatObjectToRecursifTreePipe.decorators = [
|
|
3827
|
+
{ type: i0.Pipe, args: [{
|
|
3828
|
+
name: 'formatObjectToRecursifTree'
|
|
3829
|
+
},] }
|
|
3830
|
+
];
|
|
3831
|
+
|
|
3832
|
+
var FormatObjectToSimpleTreePipe = /** @class */ (function () {
|
|
3833
|
+
function FormatObjectToSimpleTreePipe() {
|
|
3834
|
+
this.childrenProperties = [];
|
|
3835
|
+
this.labelProperties = [];
|
|
3836
|
+
}
|
|
3837
|
+
FormatObjectToSimpleTreePipe.prototype.transform = function (objectList, childrenProperties, labelProperties) {
|
|
3838
|
+
var _this = this;
|
|
3839
|
+
this.childrenProperties = childrenProperties;
|
|
3840
|
+
this.labelProperties = labelProperties;
|
|
3841
|
+
objectList.forEach(function (object) { return _this.recursiveFormatObjectToSimpleTree(object); });
|
|
3842
|
+
return objectList;
|
|
3843
|
+
};
|
|
3844
|
+
FormatObjectToSimpleTreePipe.prototype.recursiveFormatObjectToSimpleTree = function (object) {
|
|
3845
|
+
for (var property in object) {
|
|
3846
|
+
if (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
3847
|
+
continue;
|
|
3848
|
+
}
|
|
3849
|
+
if (this.labelProperties.includes(property)) {
|
|
3850
|
+
object.treeLabel = object[property];
|
|
3851
|
+
continue;
|
|
3852
|
+
}
|
|
3853
|
+
if (!this.childrenProperties.includes(property)) {
|
|
3854
|
+
continue;
|
|
3855
|
+
}
|
|
3856
|
+
if (Array.isArray(object[property])) {
|
|
3857
|
+
throw "Property : \"" + property + "\", is not an array. it could not be transform to a recursive list.";
|
|
3858
|
+
}
|
|
3859
|
+
// Add treeChildren property filled with name children property
|
|
3860
|
+
object.treeChildren = object[property];
|
|
3861
|
+
// call this function recursively until no children can be generated
|
|
3862
|
+
this.recursiveFormatObjectToSimpleTree(object.treeChildren);
|
|
3863
|
+
break;
|
|
3864
|
+
}
|
|
3865
|
+
};
|
|
3866
|
+
return FormatObjectToSimpleTreePipe;
|
|
3867
|
+
}());
|
|
3868
|
+
FormatObjectToSimpleTreePipe.decorators = [
|
|
3869
|
+
{ type: i0.Pipe, args: [{
|
|
3870
|
+
name: 'formatObjectToSimpleTree'
|
|
3871
|
+
},] }
|
|
3872
|
+
];
|
|
3873
|
+
|
|
3874
|
+
var exportedPipes = [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe];
|
|
3875
|
+
var SharedPipes = /** @class */ (function () {
|
|
3876
|
+
function SharedPipes() {
|
|
3877
|
+
}
|
|
3878
|
+
return SharedPipes;
|
|
3879
|
+
}());
|
|
3880
|
+
SharedPipes.decorators = [
|
|
3881
|
+
{ type: i0.NgModule, args: [{
|
|
3882
|
+
imports: [common.CommonModule, forms.FormsModule],
|
|
3883
|
+
declarations: exportedPipes,
|
|
3884
|
+
exports: exportedPipes
|
|
3885
|
+
},] }
|
|
3886
|
+
];
|
|
3887
|
+
|
|
3888
|
+
var TreeModule = /** @class */ (function () {
|
|
3889
|
+
function TreeModule() {
|
|
3890
|
+
}
|
|
3891
|
+
return TreeModule;
|
|
3892
|
+
}());
|
|
3893
|
+
TreeModule.decorators = [
|
|
3894
|
+
{ type: i0.NgModule, args: [{
|
|
3895
|
+
imports: [
|
|
3896
|
+
common.CommonModule,
|
|
3897
|
+
forms.FormsModule,
|
|
3898
|
+
SharedPipes
|
|
3899
|
+
],
|
|
3900
|
+
exports: [TreeComponent],
|
|
3901
|
+
declarations: [TreeComponent],
|
|
3902
|
+
providers: [],
|
|
3903
|
+
},] }
|
|
3904
|
+
];
|
|
3905
|
+
|
|
3764
3906
|
var components = [
|
|
3765
3907
|
TagComponent,
|
|
3766
3908
|
TabComponent,
|
|
@@ -3816,7 +3958,8 @@
|
|
|
3816
3958
|
TooltipComponent,
|
|
3817
3959
|
CheckboxComponent,
|
|
3818
3960
|
LoaderComponent,
|
|
3819
|
-
ProgressBarComponent
|
|
3961
|
+
ProgressBarComponent,
|
|
3962
|
+
TreeComponent
|
|
3820
3963
|
];
|
|
3821
3964
|
var SharedComponentsModule = /** @class */ (function () {
|
|
3822
3965
|
function SharedComponentsModule() {
|
|
@@ -3844,7 +3987,8 @@
|
|
|
3844
3987
|
ProgressBarModule,
|
|
3845
3988
|
ngxPerfectScrollbar.PerfectScrollbarModule,
|
|
3846
3989
|
AlertPopupModule,
|
|
3847
|
-
router.RouterModule
|
|
3990
|
+
router.RouterModule,
|
|
3991
|
+
TreeModule
|
|
3848
3992
|
],
|
|
3849
3993
|
declarations: components,
|
|
3850
3994
|
exports: __spread(components, exportsFromModule)
|
|
@@ -3862,9 +4006,10 @@
|
|
|
3862
4006
|
common.CommonModule,
|
|
3863
4007
|
SharedComponentsModule,
|
|
3864
4008
|
SharedDirectives,
|
|
4009
|
+
SharedPipes,
|
|
3865
4010
|
i1$1.NwbAllModule
|
|
3866
4011
|
],
|
|
3867
|
-
exports: [SharedComponentsModule, SharedDirectives]
|
|
4012
|
+
exports: [SharedComponentsModule, SharedDirectives, SharedPipes]
|
|
3868
4013
|
},] }
|
|
3869
4014
|
];
|
|
3870
4015
|
|
|
@@ -3893,6 +4038,8 @@
|
|
|
3893
4038
|
exports.DropdownComponent = DropdownComponent;
|
|
3894
4039
|
exports.FiltersComponent = FiltersComponent;
|
|
3895
4040
|
exports.FiltersTableService = FiltersTableService;
|
|
4041
|
+
exports.FormatObjectToRecursifTreePipe = FormatObjectToRecursifTreePipe;
|
|
4042
|
+
exports.FormatObjectToSimpleTreePipe = FormatObjectToSimpleTreePipe;
|
|
3896
4043
|
exports.FreePopinComponent = FreePopinComponent;
|
|
3897
4044
|
exports.H1Component = H1Component;
|
|
3898
4045
|
exports.H2Component = H2Component;
|
|
@@ -3923,6 +4070,7 @@
|
|
|
3923
4070
|
exports.SettingsComponent = SettingsComponent;
|
|
3924
4071
|
exports.SharedComponentsModule = SharedComponentsModule;
|
|
3925
4072
|
exports.SharedDirectives = SharedDirectives;
|
|
4073
|
+
exports.SharedPipes = SharedPipes;
|
|
3926
4074
|
exports.SnackbarComponent = SnackbarComponent;
|
|
3927
4075
|
exports.StateComponent = StateComponent;
|
|
3928
4076
|
exports.SwitchComponent = SwitchComponent;
|
|
@@ -3935,6 +4083,8 @@
|
|
|
3935
4083
|
exports.TextAreaComponent = TextAreaComponent;
|
|
3936
4084
|
exports.TextComponent = TextComponent;
|
|
3937
4085
|
exports.TooltipComponent = TooltipComponent;
|
|
4086
|
+
exports.TreeComponent = TreeComponent;
|
|
4087
|
+
exports.TreeModule = TreeModule;
|
|
3938
4088
|
exports.UploadComponent = UploadComponent;
|
|
3939
4089
|
exports.WiziComponentsModule = WiziComponentsModule;
|
|
3940
4090
|
exports.WrapperBlocsComponent = WrapperBlocsComponent;
|