@wizishop/img-manager 0.2.97 → 0.2.100

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.
Files changed (31) hide show
  1. package/assets/i18n/fr.json +1 -1
  2. package/bundles/wizishop-img-manager.umd.js +226 -198
  3. package/bundles/wizishop-img-manager.umd.js.map +1 -1
  4. package/bundles/wizishop-img-manager.umd.min.js +2 -2
  5. package/bundles/wizishop-img-manager.umd.min.js.map +1 -1
  6. package/esm2015/lib/components/canva-btn/canva-btn.component.js +6 -81
  7. package/esm2015/lib/components/images-view/images-view.component.js +18 -11
  8. package/esm2015/lib/components/img-tabs/img-tabs.component.js +2 -2
  9. package/esm2015/lib/services/canva.service.js +88 -5
  10. package/esm2015/lib/wz-img-manager.component.js +15 -1
  11. package/esm2015/wizishop-img-manager.js +4 -4
  12. package/esm5/lib/components/canva-btn/canva-btn.component.js +6 -87
  13. package/esm5/lib/components/images-view/images-view.component.js +18 -11
  14. package/esm5/lib/components/img-tabs/img-tabs.component.js +2 -2
  15. package/esm5/lib/services/canva.service.js +94 -5
  16. package/esm5/lib/wz-img-manager.component.js +19 -1
  17. package/esm5/wizishop-img-manager.js +4 -4
  18. package/fesm2015/wizishop-img-manager.js +209 -185
  19. package/fesm2015/wizishop-img-manager.js.map +1 -1
  20. package/fesm5/wizishop-img-manager.js +224 -196
  21. package/fesm5/wizishop-img-manager.js.map +1 -1
  22. package/lib/components/canva-btn/canva-btn.component.d.ts +2 -19
  23. package/lib/components/images-view/images-view.component.d.ts +1 -1
  24. package/lib/services/canva.service.d.ts +20 -1
  25. package/lib/wz-img-manager.component.d.ts +2 -0
  26. package/package.json +1 -1
  27. package/wizishop-img-manager-0.2.100.tgz +0 -0
  28. package/wizishop-img-manager.d.ts +3 -3
  29. package/wizishop-img-manager.metadata.json +1 -1
  30. package/wz-img-manager.scss +153 -148
  31. package/wizishop-img-manager-0.2.97.tgz +0 -0
@@ -1 +1 @@
1
- {"ImgManager.CanvaBtn.bigSquare":"Grand","ImgManager.CanvaBtn.createImg":"Créer une image avec","ImgManager.CanvaBtn.createImg.title":"Créer une image avec Canva","ImgManager.CanvaBtn.errorRenameCanvaImg":"Erreur : le titre de l'image provenant de Canva n'a pas pu être récupéré.","ImgManager.CanvaBtn.errorUploadCanvaImg":"Erreur : l'image provenant de Canva n'a pas pu être téléchargée.","ImgManager.CanvaBtn.info":"Sélectionner un format","ImgManager.CanvaBtn.mediumSquare":"Moyen","ImgManager.CanvaBtn.publish":"Importer","ImgManager.CanvaBtn.recommanded":"Recommandé","ImgManager.CanvaBtn.smallSquare":"Petit","ImgManager.CanvaBtn.successImport":"Votre image a bien été importée.","ImgManager.CanvaBtn.uploadingImg":"Chargement de l'image en cours.","ImgManager.ImgCard.confirmDeleteImg":"Êtes-vous sûr de supprimer cette image ?","ImgManager.ImgCard.del":"Supprimer","ImgManager.ImgCard.download":"Télécharger","ImgManager.ImgCard.edit":"Éditer","ImgManager.ImgCard.select":"Sélectionner","ImgManager.ImgCard.validImgSmall":"Sélectionner","ImgManager.ImgEditor.config.AntiSchedule":"Sens anti-horaire","ImgManager.ImgEditor.config.dezoom":"Zoomer moins","ImgManager.ImgEditor.config.flipHoriz":"Retournement Horizontal","ImgManager.ImgEditor.config.flipVert":"Retournement Vertical","ImgManager.ImgEditor.config.free":"Format libre","ImgManager.ImgEditor.config.landscape":"Paysage","ImgManager.ImgEditor.config.origin":"Format d'origine","ImgManager.ImgEditor.config.Portrait":"Portrait","ImgManager.ImgEditor.config.schedule":"Sens horaire","ImgManager.ImgEditor.config.square":"Carré","ImgManager.ImgEditor.config.zoom":"Zoomer plus","ImgManager.ImgEditor.copytoClipBoard":"Copié !","ImgManager.ImgEditor.crop":"Recadrer","ImgManager.ImgEditor.display":"Affichage","ImgManager.ImgEditor.msgFailLoad":"Erreur : Veuillez recommencer.","ImgManager.ImgEditor.msgFailSave":"Erreur : L'image n'a pu être sauvegardée.<br/>Veuillez recommencer.","ImgManager.ImgEditor.nameEx":"Par ex: T-shirt noir","ImgManager.ImgEditor.NameInfo":"Le nom de l'image est utilisé pour définir l'attribut alt.","ImgManager.ImgEditor.restart":"Réinitialiser","ImgManager.ImgEditor.rotation":"Rotation","ImgManager.ImgEditor.saveBtn":"Enregistrer et Fermer","ImgManager.ImgEditor.Valid":"Valider","ImgManager.ImgEditor.ValidtToolTip":"Cliquez ici pour rogner l'image","ImgManager.ImgLib.cancel":"Annuler","ImgManager.ImgLib.confirm":"Confirmer","ImgManager.ImgLib.confirmSupQuestion":"{{nbImage}} image à supprimer : Confirmez-vous ce choix ?","ImgManager.ImgLib.confirmSupQuestions":"{{nbImage}} images à supprimer : Confirmez-vous ce choix ?","ImgManager.ImgLib.delMlt":"Supprimer","ImgManager.ImgLib.errorGetAllImg":"Erreur : Vos images n'ont pas pu être récupérées.","ImgManager.ImgLib.errorGetCanvaImg":"Erreur : Votre image Canva n'a pas pu être récupérée.","ImgManager.ImgLib.errorGetTotalImg":"Erreur : Le nombre total d'images n'a pas été récupéré.","ImgManager.ImgLib.imgNameSaved":"Nom de l'image sauvegardé.","ImgManager.ImgLib.lastImgs":"Vos dernières images","ImgManager.ImgLib.nbImg":"Nombre d'images","ImgManager.ImgLib.noImgFound":"Aucune image trouvée.<br/>Affichage d'images gratuites.","ImgManager.ImgLib.savingImgName":"Sauvegarde en cours...","ImgManager.ImgLib.select":"Sélectionner","ImgManager.ImgList.download":"Télécharger","ImgManager.ImgList.edit":"Éditer","ImgManager.ImgList.errorAlreadyUsed":"Cette image ne peut pas être supprimée, car elle est déjà utilisée.","ImgManager.ImgList.errorRemoveImg":"Erreur : Certaines images n'ont pas pu être supprimées.","ImgManager.ImgList.errorRenameImg":"Erreur : Certaines images n'ont pas pu être renomées.","ImgManager.ImgList.remove":"Supprimer","ImgManager.ImgList.titleImgName":"Nom de l'image","ImgManager.ImgList.titleResolution":"Résolution","ImgManager.ImgSelection.deleteImg":"Retirer","ImgManager.ImgSelection.tooltips":"Cliquez pour changer l'ordre de l'image","ImgManager.ImgSelection.unselect":"Glissez l'image ici pour la retirer de la sélection","ImgManager.ImgUpload.dropImg":"Glisser-déposer votre image ici","ImgManager.ImgUpload.errorNotImg":"Erreur : Seul les images peuvent être importées.","ImgManager.ImgUpload.errorUploadingImg":"Erreur : Une image n'a pas pu être importée.","ImgManager.ImgUpload.loading":"Chargement en cours.","ImgManager.ImgUpload.or":"ou","ImgManager.ImgUpload.selectImg":"Choisir les images à importer","ImgManager.PexelLib.errorRetrievePhotos":"Erreur : Les images Pexel n'ont pas été récupérées.","ImgManager.PexelLib.errorUploadPhoto":"Erreur : L'image n'a pas pu être importée.","ImgManager.PexelLib.import":"Importer","ImgManager.PexelLib.importation":"Importation","ImgManager.PexelLib.landscape":"Paysage","ImgManager.PexelLib.nbImgFound":"Nombre d'images gratuites trouvées","ImgManager.PexelLib.noResult":"Aucune image trouvée.","ImgManager.PexelLib.original":"Original","ImgManager.PexelLib.portrait":"Portrait","ImgManager.PexelLib.successImport":"Votre image a été importée avec succès !","ImgManager.PexelLib.untitled":"Sans titre","ImgManager.PexelLib.uploadingImg":"Chargement de l'image en cours.","ImgManager.SearchBar.placeholder":"Nom de l'image à rechercher","ImgManager.snackBar.action":"Voir l'image","ImgManager.Tabs.addImg":"Ajouter une image","ImgManager.Tabs.Editor":"Editeur d'image","ImgManager.Tabs.freeImgLib":"Bibliothèque d’images gratuites","ImgManager.Tabs.imgLib":"Vos images","ImgManager.UploadList.imgSuccessImport":"images importées et optimisées pour le SEO","ImgManager.UploadList.imgSuccessImportOne":"image importée et optimisée pour le SEO","ImgManager.UploadList.properties.imgName":"Nom de l'image","ImgManager.UploadList.properties.imgSize":"Taille de l'image originale","ImgManager.UploadList.properties.imgURL":"Url de l'image","ImgManager.UploadList.properties.imgWeight":"Taille du fichier original","ImgManager.UploadList.seo.cdn":"Ajout dans le CDN.","ImgManager.UploadList.seo.cdnTooltips":"Les images que vous ajoutez sur votre site marchand sont envoyées directement vers notre CDN (Content Delivery Network). Cela permet de charger les visuels depuis les serveurs les plus proches de l'utilisateur.","ImgManager.UploadList.seo.lazyloading":"Lazyloading automatique.","ImgManager.UploadList.seo.lazyloadingTooltips":"Avec le lazyloading, le contenu se charge au fur et à mesure que l’internaute descend (scroll) dans la page. Ceci permet de charger uniquement le contenu visible.","ImgManager.UploadList.seo.rezise":"Redimensionnement et compression.","ImgManager.UploadList.seo.reziseTooltips":"Lors de l’import de votre image sur WiziShop, ce sont plus de 22 formats qui sont créés pour s’adapter aux différentes tailles d’écran. Cette optimisation nous permet d’envoyer une taille de visuel différente et compressée selon le support de l’internaute.","ImgManager.UploadList.seo.title":"Optimisations SEO","ImgManager.UploadList.seo.webp":"Génération des Webp.","ImgManager.UploadList.seo.webpTooltips":"Dès lors que vous ajoutez une image sur votre site, elle va être accessible au format standard, mais aussi se convertir automatiquement au format WebP pour Google. Ce format permet de compresser, au maximum, les images présentes sur votre boutique pour les charger très rapidement.","ImgManager.webElement.infoBulle":"Le gestionnaire d'image vous permet de <strong>télécharger</strong> des images, les <strong>sélectionner </strong>et appliquer certains <strong>effets</strong>(recadrage, rotations...).\n<br/><br/>\nIl est conseillé d'avoir <strong>plusieurs photos</strong> du produit (3 ou 4) dans divers positions ou situations.","ImgManager.webElement.OpenBtn":"Ajouter des photos","ImgManager.webElement.photosTitle":"Photos","no":"non","PaginationComponent.on":"{{low}}-{{high}} sur {{total}}","PaginationComponent.page":"Aller à la page","wac.datatable.noresult":"Il n'y a aucun résultat pour cette recherche","yes":"oui"}
1
+ {"ImgManager.CanvaBtn.bigSquare":"Grand","ImgManager.CanvaBtn.createImg":"Créer une image avec","ImgManager.CanvaBtn.createImg.title":"Créer une image avec Canva","ImgManager.CanvaBtn.errorRenameCanvaImg":"Erreur : le titre de l'image provenant de Canva n'a pas pu être récupéré.","ImgManager.CanvaBtn.errorUploadCanvaImg":"Erreur : l'image provenant de Canva n'a pas pu être téléchargée.","ImgManager.CanvaBtn.info":"Sélectionner un format","ImgManager.CanvaBtn.mediumSquare":"Moyen","ImgManager.CanvaBtn.publish":"Importer","ImgManager.CanvaBtn.recommanded":"Recommandé","ImgManager.CanvaBtn.smallSquare":"Petit","ImgManager.CanvaBtn.successImport":"Votre image a bien été importée.","ImgManager.CanvaBtn.uploadingImg":"Chargement de l'image en cours.","ImgManager.ImgCard.confirmDeleteImg":"Êtes-vous sûr de supprimer cette image ?","ImgManager.ImgCard.del":"Supprimer","ImgManager.ImgCard.download":"Télécharger","ImgManager.ImgCard.edit":"Éditer","ImgManager.ImgCard.select":"Sélectionner","ImgManager.ImgCard.validImgSmall":"Sélectionner","ImgManager.ImgEditor.config.AntiSchedule":"Sens anti-horaire","ImgManager.ImgEditor.config.dezoom":"Zoomer moins","ImgManager.ImgEditor.config.flipHoriz":"Retournement Horizontal","ImgManager.ImgEditor.config.flipVert":"Retournement Vertical","ImgManager.ImgEditor.config.free":"Format libre","ImgManager.ImgEditor.config.landscape":"Paysage","ImgManager.ImgEditor.config.origin":"Format d'origine","ImgManager.ImgEditor.config.Portrait":"Portrait","ImgManager.ImgEditor.config.schedule":"Sens horaire","ImgManager.ImgEditor.config.square":"Carré","ImgManager.ImgEditor.config.zoom":"Zoomer plus","ImgManager.ImgEditor.copytoClipBoard":"Copié !","ImgManager.ImgEditor.crop":"Recadrer","ImgManager.ImgEditor.display":"Affichage","ImgManager.ImgEditor.msgFailLoad":"Erreur : Veuillez recommencer.","ImgManager.ImgEditor.msgFailSave":"Erreur : L'image n'a pu être sauvegardée.<br/>Veuillez recommencer.","ImgManager.ImgEditor.nameEx":"Par ex: T-shirt noir","ImgManager.ImgEditor.NameInfo":"Le nom de l'image est utilisé pour définir l'attribut alt.","ImgManager.ImgEditor.restart":"Réinitialiser","ImgManager.ImgEditor.rotation":"Rotation","ImgManager.ImgEditor.saveBtn":"Enregistrer et Fermer","ImgManager.ImgEditor.Valid":"Valider","ImgManager.ImgEditor.ValidtToolTip":"Cliquez ici pour rogner l'image","ImgManager.ImgLib.cancel":"Annuler","ImgManager.ImgLib.confirm":"Confirmer","ImgManager.ImgLib.confirmSupQuestion":"{{nbImage}} image à supprimer : Confirmez-vous ce choix ?","ImgManager.ImgLib.confirmSupQuestions":"{{nbImage}} images à supprimer : Confirmez-vous ce choix ?","ImgManager.ImgLib.delMlt":"Supprimer","ImgManager.ImgLib.errorGetAllImg":"Erreur : Vos images n'ont pas pu être récupérées.","ImgManager.ImgLib.errorGetCanvaImg":"Erreur : Votre image Canva n'a pas pu être récupérée.","ImgManager.ImgLib.errorGetTotalImg":"Erreur : Le nombre total d'images n'a pas été récupéré.","ImgManager.ImgLib.imgNameSaved":"Nom de l'image sauvegardé.","ImgManager.ImgLib.lastImgs":"Vos dernières images","ImgManager.ImgLib.nbImg":"Nombre d'images","ImgManager.ImgLib.noImgFound":"Aucune image trouvée.<br/>Affichage d'images gratuites.","ImgManager.ImgLib.savingImgName":"Sauvegarde en cours...","ImgManager.ImgLib.select":"Sélectionner","ImgManager.ImgList.download":"Télécharger","ImgManager.ImgList.edit":"Éditer","ImgManager.ImgList.errorAlreadyUsed":"Cette image ne peut pas être supprimée, car elle est déjà utilisée.","ImgManager.ImgList.errorRemoveImg":"Erreur : Certaines images n'ont pas pu être supprimées.","ImgManager.ImgList.errorRenameImg":"Erreur : Certaines images n'ont pas pu être renommées.","ImgManager.ImgList.remove":"Supprimer","ImgManager.ImgList.titleImgName":"Nom de l'image","ImgManager.ImgList.titleResolution":"Résolution","ImgManager.ImgSelection.deleteImg":"Retirer","ImgManager.ImgSelection.tooltips":"Cliquez pour changer l'ordre de l'image","ImgManager.ImgSelection.unselect":"Glissez l'image ici pour la retirer de la sélection","ImgManager.ImgUpload.dropImg":"Glisser-déposer votre image ici","ImgManager.ImgUpload.errorNotImg":"Erreur : Seul les images peuvent être importées.","ImgManager.ImgUpload.errorUploadingImg":"Erreur : Une image n'a pas pu être importée.","ImgManager.ImgUpload.loading":"Chargement en cours.","ImgManager.ImgUpload.or":"ou","ImgManager.ImgUpload.selectImg":"Choisir les images à importer","ImgManager.PexelLib.errorRetrievePhotos":"Erreur : Les images Pexel n'ont pas été récupérées.","ImgManager.PexelLib.errorUploadPhoto":"Erreur : L'image n'a pas pu être importée.","ImgManager.PexelLib.import":"Importer","ImgManager.PexelLib.importation":"Importation","ImgManager.PexelLib.landscape":"Paysage","ImgManager.PexelLib.nbImgFound":"Nombre d'images gratuites trouvées","ImgManager.PexelLib.noResult":"Aucune image trouvée.","ImgManager.PexelLib.original":"Original","ImgManager.PexelLib.portrait":"Portrait","ImgManager.PexelLib.successImport":"Votre image a été importée avec succès !","ImgManager.PexelLib.untitled":"Sans titre","ImgManager.PexelLib.uploadingImg":"Chargement de l'image en cours.","ImgManager.SearchBar.placeholder":"Nom de l'image à rechercher","ImgManager.snackBar.action":"Voir l'image","ImgManager.Tabs.addImg":"Ajouter une image","ImgManager.Tabs.Editor":"Editeur d'image","ImgManager.Tabs.freeImgLib":"Bibliothèque d’images gratuites","ImgManager.Tabs.imgLib":"Vos images","ImgManager.UploadList.imgSuccessImport":"images importées et optimisées pour le SEO","ImgManager.UploadList.imgSuccessImportOne":"image importée et optimisée pour le SEO","ImgManager.UploadList.properties.imgName":"Nom de l'image","ImgManager.UploadList.properties.imgSize":"Taille de l'image originale","ImgManager.UploadList.properties.imgURL":"Url de l'image","ImgManager.UploadList.properties.imgWeight":"Taille du fichier original","ImgManager.UploadList.seo.cdn":"Ajout dans le CDN.","ImgManager.UploadList.seo.cdnTooltips":"Les images que vous ajoutez sur votre site marchand sont envoyées directement vers notre CDN (Content Delivery Network). Cela permet de charger les visuels depuis les serveurs les plus proches de l'utilisateur.","ImgManager.UploadList.seo.lazyloading":"Lazyloading automatique.","ImgManager.UploadList.seo.lazyloadingTooltips":"Avec le lazyloading, le contenu se charge au fur et à mesure que l’internaute descend (scroll) dans la page. Ceci permet de charger uniquement le contenu visible.","ImgManager.UploadList.seo.rezise":"Redimensionnement et compression.","ImgManager.UploadList.seo.reziseTooltips":"Lors de l’import de votre image sur WiziShop, ce sont plus de 22 formats qui sont créés pour s’adapter aux différentes tailles d’écran. Cette optimisation nous permet d’envoyer une taille de visuel différente et compressée selon le support de l’internaute.","ImgManager.UploadList.seo.title":"Optimisations SEO","ImgManager.UploadList.seo.webp":"Génération des Webp.","ImgManager.UploadList.seo.webpTooltips":"Dès lors que vous ajoutez une image sur votre site, elle va être accessible au format standard, mais aussi se convertir automatiquement au format WebP pour Google. Ce format permet de compresser, au maximum, les images présentes sur votre boutique pour les charger très rapidement.","ImgManager.webElement.infoBulle":"Le gestionnaire d'image vous permet de <strong>télécharger</strong> des images, les <strong>sélectionner </strong>et appliquer certains <strong>effets</strong>(recadrage, rotations...).\n<br/><br/>\nIl est conseillé d'avoir <strong>plusieurs photos</strong> du produit (3 ou 4) dans divers positions ou situations.","ImgManager.webElement.OpenBtn":"Ajouter des photos","ImgManager.webElement.photosTitle":"Photos","no":"non","PaginationComponent.on":"{{low}}-{{high}} sur {{total}}","PaginationComponent.page":"Aller à la page","wac.datatable.noresult":"Il n'y a aucun résultat pour cette recherche","yes":"oui"}
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common/http'), require('@angular/animations'), require('@ngx-translate/core'), require('@wizishop/ng-wizi-bulma'), require('rxjs/operators'), require('@angular/router'), require('@angular/common'), require('@angular/forms'), require('ngx-scrollbar'), require('ngx-scrollbar/reached-event'), require('ngx-image-cropper'), require('@angular/cdk/table'), require('@angular/cdk/drag-drop'), require('uuid'), require('ngx-perfect-scrollbar')) :
3
- typeof define === 'function' && define.amd ? define('@wizishop/img-manager', ['exports', '@angular/core', 'rxjs', '@angular/common/http', '@angular/animations', '@ngx-translate/core', '@wizishop/ng-wizi-bulma', 'rxjs/operators', '@angular/router', '@angular/common', '@angular/forms', 'ngx-scrollbar', 'ngx-scrollbar/reached-event', 'ngx-image-cropper', '@angular/cdk/table', '@angular/cdk/drag-drop', 'uuid', 'ngx-perfect-scrollbar'], factory) :
4
- (global = global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['img-manager'] = {}), global['^9']['0']['3'], global['~6']['5']['4'], global.ng.common.http, global['~9']['0']['3'], global['^13']['0']['0'], global['^9']['1']['4'], global.rxjs.operators, global.ng.router, global['^9']['0']['3'], global['~9']['0']['3'], global['^7']['2']['3'], global.reachedEvent, global['^3']['1']['9'], global.ng.cdk.table, global.ng.cdk['drag-drop'], global.uuid, global['^10']['1']['1']));
5
- }(this, (function (exports, core, rxjs, http, animations, core$1, ngWiziBulma, operators, router, common, forms, ngxScrollbar, reachedEvent, ngxImageCropper, table, dragDrop, uuid, ngxPerfectScrollbar) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common/http'), require('@ngx-translate/core'), require('@wizishop/ng-wizi-bulma'), require('rxjs/operators'), require('@angular/animations'), require('@angular/router'), require('@angular/common'), require('@angular/forms'), require('ngx-scrollbar'), require('ngx-scrollbar/reached-event'), require('ngx-image-cropper'), require('@angular/cdk/table'), require('@angular/cdk/drag-drop'), require('uuid'), require('ngx-perfect-scrollbar')) :
3
+ typeof define === 'function' && define.amd ? define('@wizishop/img-manager', ['exports', '@angular/core', 'rxjs', '@angular/common/http', '@ngx-translate/core', '@wizishop/ng-wizi-bulma', 'rxjs/operators', '@angular/animations', '@angular/router', '@angular/common', '@angular/forms', 'ngx-scrollbar', 'ngx-scrollbar/reached-event', 'ngx-image-cropper', '@angular/cdk/table', '@angular/cdk/drag-drop', 'uuid', 'ngx-perfect-scrollbar'], factory) :
4
+ (global = global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['img-manager'] = {}), global['^9']['0']['3'], global['~6']['5']['4'], global.ng.common.http, global['^13']['0']['0'], global['^9']['1']['4'], global.rxjs.operators, global['~9']['0']['3'], global.ng.router, global['^9']['0']['3'], global['~9']['0']['3'], global['^7']['2']['3'], global.reachedEvent, global['^3']['1']['9'], global.ng.cdk.table, global.ng.cdk['drag-drop'], global.uuid, global['^10']['1']['1']));
5
+ }(this, (function (exports, core, rxjs, http, core$1, ngWiziBulma, operators, animations, router, common, forms, ngxScrollbar, reachedEvent, ngxImageCropper, table, dragDrop, uuid, ngxPerfectScrollbar) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -603,9 +603,114 @@
603
603
  return UserSettingsService;
604
604
  }());
605
605
 
606
+ var AlertService = /** @class */ (function () {
607
+ function AlertService(nwbAlertService, translateService) {
608
+ this.nwbAlertService = nwbAlertService;
609
+ this.translateService = translateService;
610
+ this.actionMsg = 'ImgManager.alert.action';
611
+ this.alertConfig = {
612
+ message: '',
613
+ duration: 5000
614
+ };
615
+ }
616
+ AlertService.prototype.openAlert = function (msgKey) {
617
+ var _this = this;
618
+ this.closePreviousAlert();
619
+ this.translateService.get(msgKey).subscribe(function (trans) {
620
+ _this.alertConfig.message = trans;
621
+ _this.setAlertColor(msgKey);
622
+ _this.alertRefComponent = _this.nwbAlertService.open(_this.alertConfig);
623
+ _this.alertRefComponent.afterClosed().subscribe();
624
+ });
625
+ };
626
+ AlertService.prototype.openAlertWithBackendRespons = function (msgKey, msgBackend) {
627
+ var _this = this;
628
+ this.translateService.get(msgKey).subscribe(function (trans) {
629
+ _this.alertConfig.message = trans;
630
+ _this.alertConfig.message += '<br/>' + JSON.parse(msgBackend).message;
631
+ _this.closePreviousAlert();
632
+ _this.alertRefComponent = _this.nwbAlertService.open(_this.alertConfig);
633
+ _this.alertRefComponent.afterClosed().subscribe();
634
+ });
635
+ };
636
+ AlertService.prototype.closePreviousAlert = function () {
637
+ if (this.alertRefComponent) {
638
+ this.alertRefComponent.dismiss();
639
+ }
640
+ };
641
+ AlertService.prototype.setAlertColor = function (msgKey) {
642
+ var isErrorMsg = /error/i.test(msgKey);
643
+ this.alertConfig.color = isErrorMsg ? 'is-danger' : 'is-success';
644
+ };
645
+ AlertService.ctorParameters = function () { return [
646
+ { type: ngWiziBulma.NwbAlertService },
647
+ { type: core$1.TranslateService }
648
+ ]; };
649
+ AlertService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function AlertService_Factory() { return new AlertService(core["ɵɵinject"](ngWiziBulma.NwbAlertService), core["ɵɵinject"](core$1.TranslateService)); }, token: AlertService, providedIn: "root" });
650
+ AlertService = __decorate([
651
+ core.Injectable({
652
+ providedIn: 'root'
653
+ }),
654
+ __metadata("design:paramtypes", [ngWiziBulma.NwbAlertService,
655
+ core$1.TranslateService])
656
+ ], AlertService);
657
+ return AlertService;
658
+ }());
659
+
660
+ var ImgEventService = /** @class */ (function () {
661
+ function ImgEventService() {
662
+ this.imgToEditEvent = new rxjs.Subject();
663
+ this.imgRemoved = new rxjs.Subject();
664
+ this.imgAdded = new rxjs.Subject();
665
+ this.listDisplayedChange = new rxjs.Subject();
666
+ }
667
+ ImgEventService.prototype.emitImgRemoved = function (id_file) {
668
+ this.imgRemoved.next(id_file);
669
+ };
670
+ ImgEventService.prototype.getImgRemovedEventListner = function () {
671
+ return this.imgRemoved.asObservable();
672
+ };
673
+ ImgEventService.prototype.emitImgToEdit = function (imgToEdit) {
674
+ this.imgToEditEvent.next(imgToEdit);
675
+ };
676
+ ImgEventService.prototype.getImgToEditEventListner = function () {
677
+ return this.imgToEditEvent.asObservable();
678
+ };
679
+ ImgEventService.prototype.emitImgAdded = function (id_file) {
680
+ this.imgAdded.next(id_file);
681
+ };
682
+ ImgEventService.prototype.getImgAddedEventListner = function () {
683
+ return this.imgAdded.asObservable();
684
+ };
685
+ ImgEventService.prototype.emitlistDisplayedChange = function (value) {
686
+ this.listDisplayedChange.next(value);
687
+ };
688
+ ImgEventService.prototype.getlistDisplayedChange = function () {
689
+ return this.listDisplayedChange.asObservable();
690
+ };
691
+ ImgEventService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function ImgEventService_Factory() { return new ImgEventService(); }, token: ImgEventService, providedIn: "root" });
692
+ ImgEventService = __decorate([
693
+ core.Injectable({
694
+ providedIn: 'root'
695
+ }),
696
+ __metadata("design:paramtypes", [])
697
+ ], ImgEventService);
698
+ return ImgEventService;
699
+ }());
700
+
606
701
  var CanvaService = /** @class */ (function () {
607
- function CanvaService(externalConfigService) {
702
+ function CanvaService(externalConfigService, imgManager, wzImgEventService, alertService, translateService) {
608
703
  this.externalConfigService = externalConfigService;
704
+ this.imgManager = imgManager;
705
+ this.wzImgEventService = wzImgEventService;
706
+ this.alertService = alertService;
707
+ this.translateService = translateService;
708
+ this.imgLoading = false;
709
+ this.uploadingImg = 'ImgManager.CanvaBtn.uploadingImg';
710
+ this.successUploadPhoto = 'ImgManager.CanvaBtn.successImport';
711
+ this.errorUploadCanvaImg = 'ImgManager.CanvaBtn.errorUploadCanvaImg';
712
+ this.errorRenameCanvaImg = 'ImgManager.CanvaBtn.errorRenameCanvaImg';
713
+ this.forceToOpenCanva = false;
609
714
  this.bindExpectedImgSizeEvent = new rxjs.BehaviorSubject(null);
610
715
  this.bindExpectedSizeDone = this.bindExpectedImgSizeEvent.asObservable();
611
716
  }
@@ -621,6 +726,9 @@
621
726
  };
622
727
  CanvaService.prototype.expectedImgSizesChange = function (mediaDTO) {
623
728
  this.bindExpectedImgSizeEvent.next(mediaDTO);
729
+ if (this.forceToOpenCanva) {
730
+ this.openCanva(parseInt(mediaDTO.image_width), parseInt(mediaDTO.image_height));
731
+ }
624
732
  };
625
733
  CanvaService.prototype.getCanvaApi = function () {
626
734
  var _this = this;
@@ -675,58 +783,84 @@
675
783
  };
676
784
  document.getElementsByTagName('head')[0].appendChild(node);
677
785
  };
678
- CanvaService.ctorParameters = function () { return [
679
- { type: ImgManagerConfigService }
680
- ]; };
681
- CanvaService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function CanvaService_Factory() { return new CanvaService(core["ɵɵinject"](ImgManagerConfigService)); }, token: CanvaService, providedIn: "root" });
682
- CanvaService = __decorate([
683
- core.Injectable({
684
- providedIn: 'root'
685
- }),
686
- __metadata("design:paramtypes", [ImgManagerConfigService])
687
- ], CanvaService);
688
- return CanvaService;
689
- }());
690
-
691
- var ImgEventService = /** @class */ (function () {
692
- function ImgEventService() {
693
- this.imgToEditEvent = new rxjs.Subject();
694
- this.imgRemoved = new rxjs.Subject();
695
- this.imgAdded = new rxjs.Subject();
696
- this.listDisplayedChange = new rxjs.Subject();
697
- }
698
- ImgEventService.prototype.emitImgRemoved = function (id_file) {
699
- this.imgRemoved.next(id_file);
700
- };
701
- ImgEventService.prototype.getImgRemovedEventListner = function () {
702
- return this.imgRemoved.asObservable();
703
- };
704
- ImgEventService.prototype.emitImgToEdit = function (imgToEdit) {
705
- this.imgToEditEvent.next(imgToEdit);
706
- };
707
- ImgEventService.prototype.getImgToEditEventListner = function () {
708
- return this.imgToEditEvent.asObservable();
786
+ CanvaService.prototype.openCanva = function (width, height) {
787
+ var _this = this;
788
+ if (this.imgLoading) {
789
+ return;
790
+ }
791
+ this.getCanvaApi().pipe(operators.take(1)).subscribe(function (api) {
792
+ _this.canvaApi = api;
793
+ _this.addOverflowBody();
794
+ _this.createDesign(width, height);
795
+ });
709
796
  };
710
- ImgEventService.prototype.emitImgAdded = function (id_file) {
711
- this.imgAdded.next(id_file);
797
+ CanvaService.prototype.addOverflowBody = function () {
798
+ document.body.classList.add('ovh-canva');
712
799
  };
713
- ImgEventService.prototype.getImgAddedEventListner = function () {
714
- return this.imgAdded.asObservable();
800
+ CanvaService.prototype.removeOverflowBody = function () {
801
+ document.body.classList.remove('ovh-canva');
715
802
  };
716
- ImgEventService.prototype.emitlistDisplayedChange = function (value) {
717
- this.listDisplayedChange.next(value);
803
+ CanvaService.prototype.createDesign = function (width, height) {
804
+ var _this = this;
805
+ var createDesign = {
806
+ type: 'EtsyShopIcon',
807
+ dimensions: {
808
+ units: 'px',
809
+ width: width ? width : undefined,
810
+ height: height ? height : undefined,
811
+ },
812
+ publishLabel: this.translateService.instant('ImgManager.CanvaBtn.publish'),
813
+ };
814
+ this.canvaApi.createDesign({
815
+ design: createDesign,
816
+ onDesignPublish: function (_a) {
817
+ var exportUrl = _a.exportUrl, designTitle = _a.designTitle;
818
+ return _this.designPublished(exportUrl, designTitle);
819
+ },
820
+ onDesignClose: function () {
821
+ _this.removeOverflowBody();
822
+ }
823
+ });
718
824
  };
719
- ImgEventService.prototype.getlistDisplayedChange = function () {
720
- return this.listDisplayedChange.asObservable();
825
+ CanvaService.prototype.designPublished = function (exportUrl, designTitle) {
826
+ var _this = this;
827
+ this.alertService.openAlert(this.uploadingImg);
828
+ this.imgLoading = true;
829
+ this.imgManager.uploadFileByUrl(exportUrl, designTitle).pipe(operators.take(1)).subscribe(function (img) {
830
+ _this.imgLoading = false;
831
+ _this.removeOverflowBody();
832
+ _this.wzImgEventService.emitImgAdded(img.id_file);
833
+ _this.alertService.openAlert(_this.successUploadPhoto);
834
+ }, function (error) {
835
+ _this.imgLoading = false;
836
+ _this.removeOverflowBody();
837
+ if (error.error.code === 406 && error.error.message) {
838
+ _this.alertService.openAlertWithBackendRespons(_this.errorUploadCanvaImg, error.error.message);
839
+ }
840
+ else {
841
+ _this.alertService.openAlert(_this.errorUploadCanvaImg);
842
+ }
843
+ });
721
844
  };
722
- ImgEventService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function ImgEventService_Factory() { return new ImgEventService(); }, token: ImgEventService, providedIn: "root" });
723
- ImgEventService = __decorate([
845
+ CanvaService.ctorParameters = function () { return [
846
+ { type: ImgManagerConfigService },
847
+ { type: ImgManagerService },
848
+ { type: ImgEventService },
849
+ { type: AlertService },
850
+ { type: core$1.TranslateService }
851
+ ]; };
852
+ CanvaService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function CanvaService_Factory() { return new CanvaService(core["ɵɵinject"](ImgManagerConfigService), core["ɵɵinject"](ImgManagerService), core["ɵɵinject"](ImgEventService), core["ɵɵinject"](AlertService), core["ɵɵinject"](core$1.TranslateService)); }, token: CanvaService, providedIn: "root" });
853
+ CanvaService = __decorate([
724
854
  core.Injectable({
725
855
  providedIn: 'root'
726
856
  }),
727
- __metadata("design:paramtypes", [])
728
- ], ImgEventService);
729
- return ImgEventService;
857
+ __metadata("design:paramtypes", [ImgManagerConfigService,
858
+ ImgManagerService,
859
+ ImgEventService,
860
+ AlertService,
861
+ core$1.TranslateService])
862
+ ], CanvaService);
863
+ return CanvaService;
730
864
  }());
731
865
 
732
866
  var DomService = /** @class */ (function () {
@@ -779,6 +913,19 @@
779
913
  this.listDisplayed = false;
780
914
  this.hideTab = false;
781
915
  }
916
+ Object.defineProperty(WzImgManagerComponent.prototype, "forceToOpenCanva", {
917
+ // If forceToOpenCanva is true : Canva will open with the canvaService.expectedImgSizesChange
918
+ // If forceToOpenCanva is a WiziBlockMediaDto, Canva open immediatly
919
+ set: function (forceToOpenCanva) {
920
+ this.canvaService.forceToOpenCanva = !!forceToOpenCanva;
921
+ if (typeof forceToOpenCanva === 'boolean') {
922
+ return;
923
+ }
924
+ this.canvaService.expectedImgSizesChange(forceToOpenCanva);
925
+ },
926
+ enumerable: true,
927
+ configurable: true
928
+ });
782
929
  Object.defineProperty(WzImgManagerComponent.prototype, "multipleImgMode", {
783
930
  get: function () {
784
931
  return this._multipleImgMode;
@@ -927,6 +1074,11 @@
927
1074
  core.Input(),
928
1075
  __metadata("design:type", ImgManagerConfigDto)
929
1076
  ], WzImgManagerComponent.prototype, "externalConfig", void 0);
1077
+ __decorate([
1078
+ core.Input(),
1079
+ __metadata("design:type", Object),
1080
+ __metadata("design:paramtypes", [Object])
1081
+ ], WzImgManagerComponent.prototype, "forceToOpenCanva", null);
930
1082
  __decorate([
931
1083
  core.Output(),
932
1084
  __metadata("design:type", Object)
@@ -973,60 +1125,6 @@
973
1125
  ]),
974
1126
  ]);
975
1127
 
976
- var AlertService = /** @class */ (function () {
977
- function AlertService(nwbAlertService, translateService) {
978
- this.nwbAlertService = nwbAlertService;
979
- this.translateService = translateService;
980
- this.actionMsg = 'ImgManager.alert.action';
981
- this.alertConfig = {
982
- message: '',
983
- duration: 5000
984
- };
985
- }
986
- AlertService.prototype.openAlert = function (msgKey) {
987
- var _this = this;
988
- this.closePreviousAlert();
989
- this.translateService.get(msgKey).subscribe(function (trans) {
990
- _this.alertConfig.message = trans;
991
- _this.setAlertColor(msgKey);
992
- _this.alertRefComponent = _this.nwbAlertService.open(_this.alertConfig);
993
- _this.alertRefComponent.afterClosed().subscribe();
994
- });
995
- };
996
- AlertService.prototype.openAlertWithBackendRespons = function (msgKey, msgBackend) {
997
- var _this = this;
998
- this.translateService.get(msgKey).subscribe(function (trans) {
999
- _this.alertConfig.message = trans;
1000
- _this.alertConfig.message += '<br/>' + JSON.parse(msgBackend).message;
1001
- _this.closePreviousAlert();
1002
- _this.alertRefComponent = _this.nwbAlertService.open(_this.alertConfig);
1003
- _this.alertRefComponent.afterClosed().subscribe();
1004
- });
1005
- };
1006
- AlertService.prototype.closePreviousAlert = function () {
1007
- if (this.alertRefComponent) {
1008
- this.alertRefComponent.dismiss();
1009
- }
1010
- };
1011
- AlertService.prototype.setAlertColor = function (msgKey) {
1012
- var isErrorMsg = /error/i.test(msgKey);
1013
- this.alertConfig.color = isErrorMsg ? 'is-danger' : 'is-success';
1014
- };
1015
- AlertService.ctorParameters = function () { return [
1016
- { type: ngWiziBulma.NwbAlertService },
1017
- { type: core$1.TranslateService }
1018
- ]; };
1019
- AlertService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function AlertService_Factory() { return new AlertService(core["ɵɵinject"](ngWiziBulma.NwbAlertService), core["ɵɵinject"](core$1.TranslateService)); }, token: AlertService, providedIn: "root" });
1020
- AlertService = __decorate([
1021
- core.Injectable({
1022
- providedIn: 'root'
1023
- }),
1024
- __metadata("design:paramtypes", [ngWiziBulma.NwbAlertService,
1025
- core$1.TranslateService])
1026
- ], AlertService);
1027
- return AlertService;
1028
- }());
1029
-
1030
1128
  var ImgUploadComponent = /** @class */ (function () {
1031
1129
  function ImgUploadComponent(imgManager, alertService, externalConfigService) {
1032
1130
  this.imgManager = imgManager;
@@ -1430,7 +1528,7 @@
1430
1528
  ImgTabsComponent = __decorate([
1431
1529
  core.Component({
1432
1530
  selector: 'img-tabs',
1433
- template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\n </ul>\n <div\n class=\"img-tabs__canva\"\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\n <canva-btn\n (showImgUploaded)=\"onShowImgUploaded()\"\n [stateDisplayed]=\"stateDisplayed\">\n </canva-btn>\n </div>\n </div>\n <div class=\"select-mobile-page\">\n <wac-select\n [(ngModel)]=\"tabActive\"\n name=\"tabs\"\n [items]=\"tabs\"\n ></wac-select>\n </div>\n </div>\n\n <!-- Upload section -->\n <div\n class=\"columns img-tabs__tabsFirst\"\n [ngClass]=\"{\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\n }\"\n *ngIf=\"tabActive.value === tabs[0].value\">\n <div class=\"column img-tabs__tabsFirst__upload\">\n <img-upload\n [stateDisplayed]=\"stateDisplayed\"\n (imgUploaded)=\"onImgUploaded($event)\"\n ></img-upload>\n </div>\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\n 'img-tabs__tabsFirst__list--upload': imgUpload\n }\">\n <images-view\n *ngIf=\"!imgUpload\"\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"false\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n [maxLengthCardShow]=\"stateDisplayed === 'small' ? 16 : 8\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"false\">\n </images-view>\n\n\n <div [hidden]=\"!imgUpload\">\n <upload-list\n #imgUploadedImg\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabActive.value\"\n [multipleImgMode]=\"multipleImgMode\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n >\n </upload-list>\n </div>\n </div>\n </div>\n\n <!-- Images section -->\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\n <div class=\"column\">\n\n <images-view\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"listDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"true\">\n </images-view>\n\n </div>\n </div>\n\n <!-- Pexel img section -->\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\n <div class=\"column\">\n <pexels-lib\n [stateDisplayed]=\"stateDisplayed\"\n (showImgUploaded)=\"onShowImgUploaded()\">\n </pexels-lib>\n </div>\n </div>\n\n <!--Edition section -->\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\n <div class=\"column\">\n <img-editor\n [stateDisplayed]=\"stateDisplayed\"\n [imgToEdit]=\"imgToEdit\"\n (editClosed)=\"onEditClosed($event)\">\n </img-editor>\n </div>\n </div>\n\n</div>\n"
1531
+ template: "<div\n class=\"img-tabs\" [ngClass]=\"{'small': stateDisplayed === 'small'}\">\n <div class=\"wrapper-tabs\">\n <div\n class=\"tabs\"\n [ngClass]=\"\n {\n 'tabs--notWindow': stateDisplayed !== 'window',\n 'tabs--notDisplayed': stateDisplayed === 'window' && tabActive.value === tabs[3].value\n }\">\n\n <ul>\n <li class=\"is-active\" [ngClass]=\"{'is-active': tabActive.value === tabs[0].value}\" (click)=\"toggleTabs(tabs[0])\"><a>{{ tabs[0].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[1].value}\" (click)=\"toggleTabs(tabs[1])\"><a>{{ tabs[1].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[2].value}\" (click)=\"toggleTabs(tabs[2])\"><a>{{ tabs[2].name | translate }}</a></li>\n <li [ngClass]=\"{'is-active': tabActive.value === tabs[3].value}\" *ngIf=\"editTab\"><a>{{ tabs[3].name | translate }}</a></li>\n </ul>\n <div\n class=\"img-tabs__canva\"\n [ngClass]=\"{'img-tabs__canva--window': stateDisplayed === 'window'}\">\n <canva-btn\n (showImgUploaded)=\"onShowImgUploaded()\"\n [stateDisplayed]=\"stateDisplayed\">\n </canva-btn>\n </div>\n </div>\n <div class=\"select-mobile-page\">\n <wac-select\n [(ngModel)]=\"tabActive\"\n name=\"tabs\"\n [items]=\"tabs\"\n ></wac-select>\n </div>\n </div>\n\n <!-- Upload section -->\n <div\n class=\"columns img-tabs__tabsFirst\"\n [ngClass]=\"{\n 'img-tabs__tabsFirst--small': stateDisplayed === 'small',\n 'img-tabs__tabsFirst--window': stateDisplayed === 'window'\n }\"\n *ngIf=\"tabActive.value === tabs[0].value\">\n <div class=\"column img-tabs__tabsFirst__upload\">\n <img-upload\n [stateDisplayed]=\"stateDisplayed\"\n (imgUploaded)=\"onImgUploaded($event)\"\n ></img-upload>\n </div>\n <div class=\"column img-tabs__tabsFirst__list\" [ngClass]=\"{\n 'img-tabs__tabsFirst__list--upload': imgUpload\n }\">\n <images-view\n *ngIf=\"!imgUpload\"\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"false\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n [nbRowToShow]=\"2\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"false\">\n </images-view>\n\n\n <div [hidden]=\"!imgUpload\">\n <upload-list\n #imgUploadedImg\n [stateDisplayed]=\"stateDisplayed\"\n [tabDisplayed]=\"tabActive.value\"\n [multipleImgMode]=\"multipleImgMode\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n >\n </upload-list>\n </div>\n </div>\n </div>\n\n <!-- Images section -->\n <div class=\"columns img-tabs__tabsSecond\" *ngIf=\"tabActive.value === tabs[1].value\">\n <div class=\"column\">\n\n <images-view\n [stateDisplayed]=\"stateDisplayed\"\n [listDisplayed]=\"listDisplayed\"\n [multipleImgMode]=\"multipleImgMode\"\n [tabDisplayed]=\"tabActive.value\"\n (switchDisplayWindow)=\"switchDisplayWindowImgView()\"\n [fullSize]=\"true\">\n </images-view>\n\n </div>\n </div>\n\n <!-- Pexel img section -->\n <div class=\"columns img-tabs__tabsThird\" *ngIf=\"tabActive.value === tabs[2].value\">\n <div class=\"column\">\n <pexels-lib\n [stateDisplayed]=\"stateDisplayed\"\n (showImgUploaded)=\"onShowImgUploaded()\">\n </pexels-lib>\n </div>\n </div>\n\n <!--Edition section -->\n <div class=\"columns img-tabs__tabsEdit\" *ngIf=\"tabActive.value === tabs[3].value\">\n <div class=\"column\">\n <img-editor\n [stateDisplayed]=\"stateDisplayed\"\n [imgToEdit]=\"imgToEdit\"\n (editClosed)=\"onEditClosed($event)\">\n </img-editor>\n </div>\n </div>\n\n</div>\n"
1434
1532
  }),
1435
1533
  __metadata("design:paramtypes", [ImgEventService,
1436
1534
  AlertService,
@@ -2141,13 +2239,8 @@
2141
2239
  }());
2142
2240
 
2143
2241
  var CanvaBtnComponent = /** @class */ (function () {
2144
- function CanvaBtnComponent(canvaService, imgManager, wzImgEventService, translateService, alertService, renderer) {
2242
+ function CanvaBtnComponent(canvaService) {
2145
2243
  this.canvaService = canvaService;
2146
- this.imgManager = imgManager;
2147
- this.wzImgEventService = wzImgEventService;
2148
- this.translateService = translateService;
2149
- this.alertService = alertService;
2150
- this.renderer = renderer;
2151
2244
  this.showImgUploaded = new core.EventEmitter();
2152
2245
  this.imgLoading = false;
2153
2246
  this.availableFormat = {
@@ -2166,10 +2259,6 @@
2166
2259
  };
2167
2260
  this.openDropDownMenu = false;
2168
2261
  this.subs = [];
2169
- this.uploadingImg = 'ImgManager.CanvaBtn.uploadingImg';
2170
- this.successUploadPhoto = 'ImgManager.CanvaBtn.successImport';
2171
- this.errorUploadCanvaImg = 'ImgManager.CanvaBtn.errorUploadCanvaImg';
2172
- this.errorRenameCanvaImg = 'ImgManager.CanvaBtn.errorRenameCanvaImg';
2173
2262
  }
2174
2263
  CanvaBtnComponent.prototype.ngOnInit = function () {
2175
2264
  this.canvaLogoRouteAssets = this.canvaService.getCanvaLogo();
@@ -2191,76 +2280,13 @@
2191
2280
  this.subs.push(subExpectedImgSizesChange);
2192
2281
  };
2193
2282
  CanvaBtnComponent.prototype.onOpenCanva = function (width, height) {
2194
- var _this = this;
2195
- if (this.imgLoading) {
2196
- return;
2197
- }
2198
- var subCanvaApi = this.canvaService.getCanvaApi().subscribe(function (api) {
2199
- _this.canvaApi = api;
2200
- _this.addOverflowBody();
2201
- _this.createDesign(width, height);
2202
- });
2203
- this.subs.push(subCanvaApi);
2204
- };
2205
- CanvaBtnComponent.prototype.createDesign = function (width, height) {
2206
- var _this = this;
2207
- var createDesign = {
2208
- type: 'EtsyShopIcon',
2209
- dimensions: {
2210
- units: 'px',
2211
- width: width ? width : undefined,
2212
- height: height ? height : undefined,
2213
- },
2214
- publishLabel: this.translateService.instant('ImgManager.CanvaBtn.publish'),
2215
- };
2216
- this.canvaApi.createDesign({
2217
- design: createDesign,
2218
- onDesignPublish: function (_a) {
2219
- var exportUrl = _a.exportUrl, designTitle = _a.designTitle;
2220
- return _this.designPublished(exportUrl, designTitle);
2221
- },
2222
- onDesignClose: function () {
2223
- _this.removeOverflowBody();
2224
- }
2225
- });
2226
- };
2227
- CanvaBtnComponent.prototype.designPublished = function (exportUrl, designTitle) {
2228
- var _this = this;
2229
- this.alertService.openAlert(this.uploadingImg);
2230
- this.imgLoading = true;
2231
- var subUploadImg = this.imgManager.uploadFileByUrl(exportUrl, designTitle).subscribe(function (img) {
2232
- _this.imgLoading = false;
2233
- _this.removeOverflowBody();
2234
- _this.wzImgEventService.emitImgAdded(img.id_file);
2235
- _this.alertService.openAlert(_this.successUploadPhoto);
2236
- }, function (error) {
2237
- _this.imgLoading = false;
2238
- _this.removeOverflowBody();
2239
- if (error.error.code === 406 && error.error.message) {
2240
- _this.alertService.openAlertWithBackendRespons(_this.errorUploadCanvaImg, error.error.message);
2241
- }
2242
- else {
2243
- _this.alertService.openAlert(_this.errorUploadCanvaImg);
2244
- }
2245
- });
2246
- this.subs.push(subUploadImg);
2247
- };
2248
- CanvaBtnComponent.prototype.addOverflowBody = function () {
2249
- this.renderer.addClass(document.body, 'ovh-canva');
2250
- };
2251
- CanvaBtnComponent.prototype.removeOverflowBody = function () {
2252
- this.renderer.removeClass(document.body, 'ovh-canva');
2283
+ this.canvaService.openCanva(width, height);
2253
2284
  };
2254
2285
  CanvaBtnComponent.prototype.ngOnDestroy = function () {
2255
2286
  this.subs.forEach(function (sub) { return sub.unsubscribe(); });
2256
2287
  };
2257
2288
  CanvaBtnComponent.ctorParameters = function () { return [
2258
- { type: CanvaService },
2259
- { type: ImgManagerService },
2260
- { type: ImgEventService },
2261
- { type: core$1.TranslateService },
2262
- { type: AlertService },
2263
- { type: core.Renderer2 }
2289
+ { type: CanvaService }
2264
2290
  ]; };
2265
2291
  __decorate([
2266
2292
  core.Input(),
@@ -2275,12 +2301,7 @@
2275
2301
  selector: 'canva-btn',
2276
2302
  template: "<div class=\"canva dropdown is-right is-hoverable\"\n wzAutoHide (clickOutside)=\"openDropDownMenu = false;\"\n [ngClass]=\"{'is-up': stateDisplayed === 'small', 'noTooltip': stateDisplayed !== 'small'}\"\n >\n <div class=\"dropdown-trigger\">\n <div\n class=\"button canva-btn\"\n aria-controls=\"dropdown-menuCanva\"\n (click)=\"openDropDownMenu = true;\"\n >\n <span>{{'ImgManager.CanvaBtn.createImg' | translate}}</span>\n <img [src]=\"canvaLogoRouteAssets\" class=\"canva-btn__logo\">\n\n <span btnLoadingAnim class=\"btnLoadingAnnimation\" *ngIf=\"imgLoading\"></span>\n </div>\n </div>\n <div\n class=\"dropdown-menu dropDownShadow\"\n [ngClass]=\"{'displayDropDownMenu': openDropDownMenu }\"\n id=\"dropdown-menuCanva\"\n role=\"menu\">\n <ng-scrollbar\n #scrollable\n [visibility]=\"'hover'\"\n class=\"smallScroll\"\n >\n <div class=\"dropdown-content\">\n <div class=\"dropdownTitle\">\n <p>{{'ImgManager.CanvaBtn.createImg.title' | translate}}</p>\n </div>\n\n <div class=\"infoItem\">\n <p>{{'ImgManager.CanvaBtn.info' | translate}}</p>\n </div>\n\n <ng-container >\n <div\n *ngIf=\"expectedWidth && expectedHeight\"\n class=\"dropdown-item-wrapper\"\n >\n <div class=\"dropdown-item expectedSizes\" (click)=\"onOpenCanva(expectedWidth, expectedHeight)\">\n <p>{{'ImgManager.CanvaBtn.recommanded' | translate}}</p><p>{{expectedWidth}}*{{expectedHeight}}</p>\n </div>\n </div>\n </ng-container>\n\n <div\n *ngFor=\"let format of availableFormat| keyvalue\"\n class=\"dropdown-item-wrapper\">\n <div\n (click)=\"onOpenCanva(format.value.width, format.value.height)\"\n class=\"dropdown-item\">\n <p>{{format.key | translate}}</p><p>{{format.value.width}}*{{format.value.height}}</p>\n </div>\n </div>\n </div>\n </ng-scrollbar>\n </div>\n</div>\n"
2277
2303
  }),
2278
- __metadata("design:paramtypes", [CanvaService,
2279
- ImgManagerService,
2280
- ImgEventService,
2281
- core$1.TranslateService,
2282
- AlertService,
2283
- core.Renderer2])
2304
+ __metadata("design:paramtypes", [CanvaService])
2284
2305
  ], CanvaBtnComponent);
2285
2306
  return CanvaBtnComponent;
2286
2307
  }());
@@ -2965,9 +2986,9 @@
2965
2986
  this.errorRemoveImg = 'ImgManager.ImgList.errorRemoveImg';
2966
2987
  }
2967
2988
  ImagesViewComponent.prototype.ngOnInit = function () {
2968
- if (this.maxLengthCardShow) {
2969
- this.reducePictureListMaxLength();
2970
- }
2989
+ /* if (this.maxLengthCardShow) {
2990
+ this.reducePictureListMaxLength();
2991
+ } */
2971
2992
  this.setEvents();
2972
2993
  this.imgSelectedList = this.imgSelectionService.getImgSelection();
2973
2994
  };
@@ -2978,9 +2999,9 @@
2978
2999
  this.savePictureList = this.picturesList;
2979
3000
  }
2980
3001
  };
2981
- ImagesViewComponent.prototype.reducePictureListMaxLength = function () {
2982
- this.picturesList.splice(0, this.maxLengthCardShow);
2983
- };
3002
+ /* reducePictureListMaxLength() {
3003
+ this.picturesList.splice(0, this.maxLengthCardShow);
3004
+ } */
2984
3005
  ImagesViewComponent.prototype.getImgList = function () {
2985
3006
  this.filtersChanged.next();
2986
3007
  };
@@ -3006,6 +3027,7 @@
3006
3027
  this.getImgList();
3007
3028
  };
3008
3029
  ImagesViewComponent.prototype.onRenamePicture = function (pictureRenamed) {
3030
+ console.log('onRenamePicture pictureRenamed', pictureRenamed);
3009
3031
  this.renamePictureService.onRenamePicture(pictureRenamed);
3010
3032
  };
3011
3033
  ImagesViewComponent.prototype.removeListImg = function () {
@@ -3112,6 +3134,10 @@
3112
3134
  return imgSizesConfig;
3113
3135
  };
3114
3136
  ImagesViewComponent.prototype.getTotalImgPerPage = function () {
3137
+ if (this.nbRowToShow) {
3138
+ var nbImgPerLine = this.stateDisplayed === 'full' ? this.nbMinImgPerLine : this.nbMaxImgPerLine;
3139
+ return nbImgPerLine * this.nbRowToShow;
3140
+ }
3115
3141
  var total = this.nbMinImgPerLine;
3116
3142
  while (total < 30 || total % this.nbMaxImgPerLine !== 0 || total % this.nbMinImgPerLine !== 0) {
3117
3143
  total += this.nbMinImgPerLine;
@@ -3119,8 +3145,9 @@
3119
3145
  return total;
3120
3146
  };
3121
3147
  ImagesViewComponent.prototype.setParams = function () {
3148
+ var _a;
3122
3149
  this.params = {
3123
- limit: this.tableFilters.itemsPerPage ? this.tableFilters.itemsPerPage.toString() : this.pageSize.toString(),
3150
+ limit: ((_a = this.maxLengthCardShow) === null || _a === void 0 ? void 0 : _a.toString()) || (this.tableFilters.itemsPerPage ? this.tableFilters.itemsPerPage.toString() : this.pageSize.toString()),
3124
3151
  page: this.tableFilters.currentPage.toString()
3125
3152
  };
3126
3153
  if (this.tableFilters.searchValue) {
@@ -3267,9 +3294,6 @@
3267
3294
  _this.length = _this.isTotalRetieved ? _this.length : data.totalRecords;
3268
3295
  _this.tableFilters.totalItems = _this.isTotalRetieved ? _this.tableFilters.totalItems : data.totalRecords;
3269
3296
  _this.tableFilters.itemsPerPage = _this.tableFilters.itemsPerPage ? _this.tableFilters.itemsPerPage : _this.pageSize;
3270
- if (_this.maxLengthCardShow) {
3271
- _this.picturesList = _this.picturesList.splice(0, 8);
3272
- }
3273
3297
  // Display Pexels if no result
3274
3298
  if (data.totalRecords === 0) {
3275
3299
  _this.displayPexelsLib();
@@ -3330,6 +3354,10 @@
3330
3354
  core.Input(),
3331
3355
  __metadata("design:type", Number)
3332
3356
  ], ImagesViewComponent.prototype, "maxLengthCardShow", void 0);
3357
+ __decorate([
3358
+ core.Input(),
3359
+ __metadata("design:type", Number)
3360
+ ], ImagesViewComponent.prototype, "nbRowToShow", void 0);
3333
3361
  __decorate([
3334
3362
  core.Input(),
3335
3363
  __metadata("design:type", Object)
@@ -4970,9 +4998,9 @@
4970
4998
  exports.ɵbz = SelectFiltersPipe;
4971
4999
  exports.ɵc = UserSettingsService;
4972
5000
  exports.ɵd = ImgEventService;
4973
- exports.ɵe = DomService;
4974
- exports.ɵf = ImgTabsComponent;
4975
- exports.ɵg = AlertService;
5001
+ exports.ɵe = AlertService;
5002
+ exports.ɵf = DomService;
5003
+ exports.ɵg = ImgTabsComponent;
4976
5004
  exports.ɵh = ImgUploadComponent;
4977
5005
  exports.ɵi = easeInOut;
4978
5006
  exports.ɵj = PexelLibComponent;