@pepperi-addons/ngx-lib 0.3.15-beta.51 → 0.3.15-beta.54
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/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +2 -88
- package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-lib.umd.js +25 -0
- package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
- package/esm2015/core/common/services/utilities.service.js +26 -1
- package/esm2015/images-filmstrip/images-filmstrip.component.js +3 -86
- package/esm2015/images-filmstrip/images-filmstrip.module.js +1 -20
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +2 -88
- package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-lib.js +25 -0
- package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
- package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -4,64 +4,6 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['pepperi-addons'] = global['pepperi-addons'] || {}, global['pepperi-addons']['ngx-lib'] = global['pepperi-addons']['ngx-lib'] || {}, global['pepperi-addons']['ngx-lib']['images-filmstrip'] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.core, global.ng.material.formField, global.ng.material.dialog, global.ng.material.icon, global['pepperi-addons']['ngx-lib'], global['pepperi-addons']['ngx-lib']['field-title'], global['pepperi-addons']['ngx-lib'].button, global['pepperi-addons']['ngx-lib'].icon, global['pepperi-addons']['ngx-lib'].dialog, global.gallery));
|
|
5
5
|
}(this, (function (exports, core, common, forms, core$1, formField, dialog$1, icon$1, ngxLib, fieldTitle, button, icon, dialog, ngGallery) { 'use strict';
|
|
6
6
|
|
|
7
|
-
// export function createViewerConfig(
|
|
8
|
-
// translate: TranslateService
|
|
9
|
-
// ): ImageViewerConfig {
|
|
10
|
-
// return {
|
|
11
|
-
// // width: 850,
|
|
12
|
-
// // height: 150,
|
|
13
|
-
// bgStyle: '#FFF', // component background style
|
|
14
|
-
// // scaleStep: 0.1, // zoom scale step (using the zoom in/out buttons)
|
|
15
|
-
// // rotateStepper: false, // touch rotate should rotate only 90 to 90 degrees
|
|
16
|
-
// loadingMessage: translate.instant('MESSAGES.INFO_LOADING_FILE'), // 'Loading...',
|
|
17
|
-
// // buttonStyle: {
|
|
18
|
-
// // iconFontFamily: 'Material Icons', // font used to render the button icons
|
|
19
|
-
// // alpha: 0.5, // buttons' transparence value
|
|
20
|
-
// // hoverAlpha: 0.7, // buttons' transparence value when mouse is over
|
|
21
|
-
// // bgStyle: '#000000', // buttons' background style
|
|
22
|
-
// // iconStyle: '#ffffff', // buttons' icon colors
|
|
23
|
-
// // borderStyle: '#000000', // buttons' border style
|
|
24
|
-
// // borderWidth: 0, // buttons' border width (0 == disabled)
|
|
25
|
-
// // },
|
|
26
|
-
// // tooltips: {
|
|
27
|
-
// // enabled: true, // enable or disable tooltips for buttons
|
|
28
|
-
// // bgStyle: '#000000', // tooltip background style
|
|
29
|
-
// // bgAlpha: 0.5, // tooltip background transparence
|
|
30
|
-
// // textStyle: '#ffffff', // tooltip's text style
|
|
31
|
-
// // textAlpha: 0.9, // tooltip's text transparence
|
|
32
|
-
// // padding: 15, // tooltip padding
|
|
33
|
-
// // radius: 20, // tooltip border radius
|
|
34
|
-
// // },
|
|
35
|
-
// // shorter button configuration style
|
|
36
|
-
// nextPageButton: createButtonConfig(
|
|
37
|
-
// 'navigate_next',
|
|
38
|
-
// 'Next page',
|
|
39
|
-
// 0,
|
|
40
|
-
// false
|
|
41
|
-
// ),
|
|
42
|
-
// beforePageButton: createButtonConfig(
|
|
43
|
-
// 'navigate_before',
|
|
44
|
-
// 'Previous page',
|
|
45
|
-
// 1,
|
|
46
|
-
// false
|
|
47
|
-
// ),
|
|
48
|
-
// zoomOutButton: createButtonConfig('zoom_out', 'Zoom out', 0, false),
|
|
49
|
-
// zoomInButton: createButtonConfig('zoom_in', 'Zoom in', 1, false),
|
|
50
|
-
// rotateLeftButton: createButtonConfig(
|
|
51
|
-
// 'rotate_left',
|
|
52
|
-
// 'Rotate left',
|
|
53
|
-
// 2,
|
|
54
|
-
// false
|
|
55
|
-
// ),
|
|
56
|
-
// rotateRightButton: createButtonConfig(
|
|
57
|
-
// 'rotate_right',
|
|
58
|
-
// 'Rotate right',
|
|
59
|
-
// 3,
|
|
60
|
-
// false
|
|
61
|
-
// ),
|
|
62
|
-
// resetButton: createButtonConfig('autorenew', 'Reset', 4, false),
|
|
63
|
-
// };
|
|
64
|
-
// }
|
|
65
7
|
var PepImagesFilmstripComponent = /** @class */ (function () {
|
|
66
8
|
function PepImagesFilmstripComponent(customizationService, dialogService, layoutService, fileService, iconRegistry, utilitiesService, gallery, renderer, element, cd, document, dialogRef, data) {
|
|
67
9
|
var _this = this;
|
|
@@ -78,7 +20,6 @@
|
|
|
78
20
|
this.document = document;
|
|
79
21
|
this.dialogRef = dialogRef;
|
|
80
22
|
this.data = data;
|
|
81
|
-
// @ViewChild('ngxViewerImage') ngxViewerImage: any; // TODO: Check if we need to use this??
|
|
82
23
|
this.key = '';
|
|
83
24
|
this.value = '';
|
|
84
25
|
this.label = '';
|
|
@@ -347,17 +288,8 @@
|
|
|
347
288
|
PepImagesFilmstripComponent.decorators = [
|
|
348
289
|
{ type: core.Component, args: [{
|
|
349
290
|
selector: 'pep-images-filmstrip',
|
|
350
|
-
template: "<ng-container *ngIf=\"inDialog; then galleryDialogTemplate; else regularTemplate\"></ng-container>\n<ng-template #regularTemplate>\n <ng-container [formGroup]=\"form\">\n <div class=\"images-filmstrip-container\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <div #galleryCont class=\"img-wrapper\" [ngClass]=\"isVertical ? 'vertical-gallery' : 'horizontal-gallery'\"\n [style.height]=\"fieldHeight\">\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_left_alt\" styleType=\"weak-invert\" sizeType=\"sm\"\n (click)=\"formGallery.prev()\" class=\"gallery-arrow start-arrow\">\n </pep-button>\n <gallery #formGallery id=\"{{guid}}-gallery\" (itemClick)=\"enlargeImage($event);\" [imageSize]=\"'contain'\"\n (indexChange)=\"indexChange($event)\" (error)=\"onError($event)\">\n </gallery>\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_right_alt\" styleType=\"weak-invert\" sizeType=\"sm\"\n (click)=\"formGallery.next()\" class=\"gallery-arrow end-arrow\">\n </pep-button>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #galleryDialogTemplate>\n <div class=\"gallery-dialog\">\n <pep-dialog [title]=\"label\" [showFooter]=\"showFooter\" [showClose]=\"showClose\" (close)=\"closeDialog($event)\">\n <div pep-dialog-content #galleryDialogCont class=\"gallery-dialog-content\"\n [ngClass]=\"isVertical ? 'vertical-gallery' : 'horizontal-gallery'\">\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_left_alt\" styleType=\"weak-invert\"\n (click)=\"dialogGallery.prev()\" class=\"gallery-arrow start-arrow\">\n </pep-button>\n <gallery #dialogGallery id=\"{{guid}}-dlgGallery\" [imageSize]=\"'contain'\"\n (indexChange)=\"indexChange($event)\" (error)=\"onError($event)\">\n </gallery>\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_right_alt\" styleType=\"weak-invert\"\n (click)=\"dialogGallery.next()\" class=\"gallery-arrow end-arrow\">\n </pep-button>\n </div>\n </pep-dialog>\n </div>\n</ng-template
|
|
351
|
-
|
|
352
|
-
providers: [
|
|
353
|
-
// {
|
|
354
|
-
// provide: IMAGEVIEWER_CONFIG,
|
|
355
|
-
// // useValue: IMAGEVIEWER_CONFIG_DEFAULT,
|
|
356
|
-
// useFactory: createViewerConfig,
|
|
357
|
-
// deps: [TranslateService],
|
|
358
|
-
// },
|
|
359
|
-
],
|
|
360
|
-
styles: [":host{width:100%;height:inherit;display:block}:host>*{align-self:center}.gallery-dialog{height:inherit}.images-filmstrip-container{height:100%}.images-filmstrip-container .img-wrapper{height:100%;position:relative}.images-filmstrip-container .gallery-arrow{padding:.5rem;position:absolute;top:50%;transform:translateY(-50%);z-index:2}.images-filmstrip-container .gallery-arrow.start-arrow{left:0}.images-filmstrip-container .gallery-arrow.end-arrow{right:0}gallery{direction:ltr;height:100%;min-height:100%}.gallery-dialog-content{position:relative}.gallery-dialog-content .gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2}.gallery-dialog-content .gallery-arrow.start-arrow{left:0}.gallery-dialog-content .gallery-arrow.end-arrow{right:0}.gallery-dialog-content gallery{min-width:65vw}.gallery-dialog-content ::ng-deep gallery-item gallery-image .g-image-item{background-size:content!important}.gallery-dialog-content ::ng-deep gallery-item .g-item-template ngx-imageviewer canvas{max-width:100%!important;max-height:100%!important}::ng-deep gallery-thumbs{margin:0 1rem 0 .5rem;margin:0 var(--pep-spacing-lg,1rem) 0 var(--pep-spacing-sm,.5rem)}::ng-deep gallery-thumbs gallery-thumb{padding:0!important;border-radius:.25rem;border-radius:var(--pep-border-radius-md,.25rem);margin:.5rem 0;margin:var(--pep-spacing-sm,.5rem) 0}::ng-deep gallery-thumbs gallery-thumb .g-image-item{background-size:cover!important}::ng-deep gallery-item gallery-image .g-image-item{border-radius:.5rem;border-radius:var(--pep-border-radius-lg,.5rem)}::ng-deep gallery-item:hover{cursor:pointer}::ng-deep gallery-dots{position:absolute!important;border-radius:.25rem;border-radius:var(--pep-border-radius-md,.25rem)}::ng-deep gallery-dots.pep-button,::ng-deep gallery-dots.pepperi-button{display:flex!important}::ng-deep .img-container{display:flex;align-items:center}::ng-deep gallery-nav{display:none}.vertical-gallery ::ng-deep gallery-thumbs{margin:1rem 0 .5rem;margin:var(--pep-spacing-lg,1rem) 0 var(--pep-spacing-sm,.5rem) 0}.vertical-gallery ::ng-deep gallery-thumbs gallery-thumb{margin:0 .5rem;margin:0 var(--pep-spacing-sm,.5rem)}", "gallery{background-color:transparent}::ng-deep gallery-thumb{box-shadow:0 .25rem .5rem 0 rgba(26,26,26,.32);box-shadow:var(--pep-shadow-sm-offset,0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.32)}::ng-deep .g-nav-next,::ng-deep .g-nav-prev{background:hsla(0,0%,100%,.5);background:hsla(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%),.5)}::ng-deep .g-nav-next:hover,::ng-deep .g-nav-prev:hover{background:hsla(0,0%,100%,.5);background:hsla(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%),.5);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);cursor:pointer}::ng-deep .g-nav-next:focus,::ng-deep .g-nav-prev:focus{background:#fff;background:hsl(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%));box-shadow:0 0 0 .25rem rgba(23,102,166,.5);box-shadow:0 0 0 var(--pep-spacing-xs,.25rem) hsla(var(--pep-color-text-link-h,207),var(--pep-color-text-link-s,76%),var(--pep-color-text-link-l,37%),.5)}::ng-deep .g-nav-next:active,::ng-deep .g-nav-prev:active{background:#fff;background:hsl(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%));box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.16);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.16)}::ng-deep .g-nav-next:disabled,::ng-deep .g-nav-prev:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:hsla(0,0%,100%,.08)!important;background:hsla(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%),.08)!important}::ng-deep .g-nav-next:disabled:after,::ng-deep .g-nav-prev:disabled:after{border:unset}::ng-deep .g-nav-next:disabled .svg-icon,::ng-deep .g-nav-prev:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .g-nav-next:disabled .svg-icon.stroke,::ng-deep .g-nav-prev:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep gallery-dots{background:rgba(26,26,26,.12);background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.12)}"]
|
|
291
|
+
template: "<ng-container *ngIf=\"inDialog; then galleryDialogTemplate; else regularTemplate\"></ng-container>\n<ng-template #regularTemplate>\n <ng-container [formGroup]=\"form\">\n <div class=\"images-filmstrip-container\">\n <pep-field-title *ngIf=\"renderTitle\" [label]=\"label\" [xAlignment]=\"xAlignment\" [showTitle]=\"showTitle\">\n </pep-field-title>\n <div #galleryCont class=\"img-wrapper\" [ngClass]=\"isVertical ? 'vertical-gallery' : 'horizontal-gallery'\"\n [style.height]=\"fieldHeight\">\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_left_alt\" styleType=\"weak-invert\" sizeType=\"sm\"\n (click)=\"formGallery.prev()\" class=\"gallery-arrow start-arrow\">\n </pep-button>\n <gallery #formGallery id=\"{{guid}}-gallery\" (itemClick)=\"enlargeImage($event);\" [imageSize]=\"'contain'\"\n (indexChange)=\"indexChange($event)\" (error)=\"onError($event)\">\n </gallery>\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_right_alt\" styleType=\"weak-invert\" sizeType=\"sm\"\n (click)=\"formGallery.next()\" class=\"gallery-arrow end-arrow\">\n </pep-button>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #galleryDialogTemplate>\n <div class=\"gallery-dialog\">\n <pep-dialog [title]=\"label\" [showFooter]=\"showFooter\" [showClose]=\"showClose\" (close)=\"closeDialog($event)\">\n <div pep-dialog-content #galleryDialogCont class=\"gallery-dialog-content\"\n [ngClass]=\"isVertical ? 'vertical-gallery' : 'horizontal-gallery'\">\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_left_alt\" styleType=\"weak-invert\"\n (click)=\"dialogGallery.prev()\" class=\"gallery-arrow start-arrow\">\n </pep-button>\n <gallery #dialogGallery id=\"{{guid}}-dlgGallery\" [imageSize]=\"'contain'\"\n (indexChange)=\"indexChange($event)\" (error)=\"onError($event)\">\n </gallery>\n <pep-button *ngIf=\"items?.length > 1\" iconName=\"arrow_right_alt\" styleType=\"weak-invert\"\n (click)=\"dialogGallery.next()\" class=\"gallery-arrow end-arrow\">\n </pep-button>\n </div>\n </pep-dialog>\n </div>\n</ng-template>",
|
|
292
|
+
styles: [":host{width:100%;height:inherit;display:block}:host>*{align-self:center}.gallery-dialog{height:inherit}.images-filmstrip-container{height:100%}.images-filmstrip-container .img-wrapper{height:100%;position:relative}.images-filmstrip-container .gallery-arrow{padding:.5rem;position:absolute;top:50%;transform:translateY(-50%);z-index:2}.images-filmstrip-container .gallery-arrow.start-arrow{left:0}.images-filmstrip-container .gallery-arrow.end-arrow{right:0}gallery{direction:ltr;height:100%;min-height:100%}.gallery-dialog-content{position:relative}.gallery-dialog-content .gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2}.gallery-dialog-content .gallery-arrow.start-arrow{left:0}.gallery-dialog-content .gallery-arrow.end-arrow{right:0}.gallery-dialog-content gallery{min-width:65vw}.gallery-dialog-content ::ng-deep gallery-item gallery-image .g-image-item{background-size:content!important}::ng-deep gallery-thumbs{margin:0 1rem 0 .5rem;margin:0 var(--pep-spacing-lg,1rem) 0 var(--pep-spacing-sm,.5rem)}::ng-deep gallery-thumbs gallery-thumb{padding:0!important;border-radius:.25rem;border-radius:var(--pep-border-radius-md,.25rem);margin:.5rem 0;margin:var(--pep-spacing-sm,.5rem) 0}::ng-deep gallery-thumbs gallery-thumb .g-image-item{background-size:cover!important}::ng-deep gallery-item gallery-image .g-image-item{border-radius:.5rem;border-radius:var(--pep-border-radius-lg,.5rem)}::ng-deep gallery-item:hover{cursor:pointer}::ng-deep gallery-dots{position:absolute!important;border-radius:.25rem;border-radius:var(--pep-border-radius-md,.25rem)}::ng-deep gallery-dots.pep-button,::ng-deep gallery-dots.pepperi-button{display:flex!important}::ng-deep .img-container{display:flex;align-items:center}::ng-deep gallery-nav{display:none}.vertical-gallery ::ng-deep gallery-thumbs{margin:1rem 0 .5rem;margin:var(--pep-spacing-lg,1rem) 0 var(--pep-spacing-sm,.5rem) 0}.vertical-gallery ::ng-deep gallery-thumbs gallery-thumb{margin:0 .5rem;margin:0 var(--pep-spacing-sm,.5rem)}", "gallery{background-color:transparent}::ng-deep gallery-thumb{box-shadow:0 .25rem .5rem 0 rgba(26,26,26,.32);box-shadow:var(--pep-shadow-sm-offset,0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.32)}::ng-deep .g-nav-next,::ng-deep .g-nav-prev{background:hsla(0,0%,100%,.5);background:hsla(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%),.5)}::ng-deep .g-nav-next:hover,::ng-deep .g-nav-prev:hover{background:hsla(0,0%,100%,.5);background:hsla(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%),.5);box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.08);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.08);cursor:pointer}::ng-deep .g-nav-next:focus,::ng-deep .g-nav-prev:focus{background:#fff;background:hsl(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%));box-shadow:0 0 0 .25rem rgba(23,102,166,.5);box-shadow:0 0 0 var(--pep-spacing-xs,.25rem) hsla(var(--pep-color-text-link-h,207),var(--pep-color-text-link-s,76%),var(--pep-color-text-link-l,37%),.5)}::ng-deep .g-nav-next:active,::ng-deep .g-nav-prev:active{background:#fff;background:hsl(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%));box-shadow:0 .125rem .25rem 0 rgba(26,26,26,.16);box-shadow:var(--pep-shadow-xs-offset,0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.16)}::ng-deep .g-nav-next:disabled,::ng-deep .g-nav-prev:disabled{box-shadow:unset;border:unset;color:rgba(26,26,26,.35)!important;color:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)!important;background:hsla(0,0%,100%,.08)!important;background:hsla(var(--pep-color-system-primary-invert-h,255),var(--pep-color-system-primary-invert-s,100%),var(--pep-color-system-primary-invert-l,100%),.08)!important}::ng-deep .g-nav-next:disabled:after,::ng-deep .g-nav-prev:disabled:after{border:unset}::ng-deep .g-nav-next:disabled .svg-icon,::ng-deep .g-nav-prev:disabled .svg-icon{fill:rgba(26,26,26,.35);fill:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep .g-nav-next:disabled .svg-icon.stroke,::ng-deep .g-nav-prev:disabled .svg-icon.stroke{fill:unset;stroke:rgba(26,26,26,.35);stroke:hsla(var(--pep-color-system-primary-h,0),var(--pep-color-system-primary-s,0%),var(--pep-color-system-primary-l,10%),.35)}::ng-deep gallery-dots{background:rgba(26,26,26,.12);background:hsla(var(--pep-color-weak-h,0),var(--pep-color-weak-s,0%),var(--pep-color-weak-l,10%),.12)}"]
|
|
361
293
|
},] }
|
|
362
294
|
];
|
|
363
295
|
PepImagesFilmstripComponent.ctorParameters = function () { return [
|
|
@@ -417,24 +349,6 @@
|
|
|
417
349
|
icon$1.MatIconModule,
|
|
418
350
|
// External modules
|
|
419
351
|
ngGallery.GalleryModule,
|
|
420
|
-
// ImageViewerModule,
|
|
421
|
-
// ImageViewerModule.forRoot({
|
|
422
|
-
// btnClass: 'default', // The CSS class(es) that will apply to the buttons
|
|
423
|
-
// zoomFactor: 0.1, // The amount that the scale will be increased by
|
|
424
|
-
// containerBackgroundColor: 'transparent', // The color to use for the background. This can provided in hex, or rgb(a).
|
|
425
|
-
// wheelZoom: true, // If true, the mouse wheel can be used to zoom in
|
|
426
|
-
// allowFullscreen: false, // If true, the fullscreen button will be shown, allowing the user to entr fullscreen mode
|
|
427
|
-
// btnIcons: {
|
|
428
|
-
// // The icon classes that will apply to the buttons. By default, font-awesome is used.
|
|
429
|
-
// zoomIn: 'fa fa-plus',
|
|
430
|
-
// zoomOut: 'fa fa-minus',
|
|
431
|
-
// rotateClockwise: 'fa fa-repeat',
|
|
432
|
-
// rotateCounterClockwise: 'fa fa-undo',
|
|
433
|
-
// next: 'fa fa-arrow-right',
|
|
434
|
-
// prev: 'fa fa-arrow-left',
|
|
435
|
-
// fullscreen: 'fa fa-arrows-alt'
|
|
436
|
-
// }
|
|
437
|
-
// }),
|
|
438
352
|
// ngx-lib modules
|
|
439
353
|
ngxLib.PepNgxLibModule,
|
|
440
354
|
button.PepButtonModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pepperi-addons-ngx-lib-images-filmstrip.umd.js","sources":["../../../projects/ngx-lib/images-filmstrip/images-filmstrip.component.ts","../../../projects/ngx-lib/images-filmstrip/images-filmstrip.module.ts","../../../projects/ngx-lib/images-filmstrip/public-api.ts","../../../projects/ngx-lib/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n AfterViewInit,\n ElementRef,\n Input,\n TemplateRef,\n Renderer2,\n ChangeDetectorRef,\n Inject,\n Optional,\n ViewContainerRef,\n OnChanges,\n} from '@angular/core';\nimport {\n trigger,\n state,\n style,\n transition,\n animate,\n} from '@angular/animations';\nimport { FormGroup } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n Gallery,\n GalleryConfig,\n LoadingStrategy,\n SlidingDirection,\n ThumbnailsPosition,\n GalleryItem,\n ImageItem,\n GalleryRef,\n} from 'ng-gallery';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepLayoutService,\n PepFileService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepImagesField,\n PepUtilitiesService,\n PepGuid\n} from '@pepperi-addons/ngx-lib';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\nimport { pepIconArrowRightAlt, pepIconArrowLeftAlt, PepIconRegistry, pepIconNoImage2 } from '@pepperi-addons/ngx-lib/icon';\n\nimport 'hammerjs';\n\ninterface IPepImagesFilmstripDialogData {\n currIndex: number;\n key: string;\n value: string;\n label: string;\n showFooter: boolean;\n uid: string;\n showThumbnails: boolean;\n}\n\n// export const slideInAnimation = trigger('slideAnimation', [\n// state('in', style({ transform: 'translateY(0)', opacity: 1 })),\n// transition(':enter', [\n// style({ transform: 'translateY(-100%)', opacity: 0 }),\n// animate(400)\n// ]),\n// transition(':leave', [\n// animate(400, style({ transform: 'translateY(-100%)', opacity: 0 }))\n// ])\n// ]);\n\n// import {\n// IMAGEVIEWER_CONFIG,\n// ImageViewerConfig,\n// createButtonConfig,\n// } from '@hallysonh/ngx-imageviewer';\nimport { DOCUMENT } from '@angular/common';\n\n// export function createViewerConfig(\n// translate: TranslateService\n// ): ImageViewerConfig {\n// return {\n// // width: 850,\n// // height: 150,\n// bgStyle: '#FFF', // component background style\n// // scaleStep: 0.1, // zoom scale step (using the zoom in/out buttons)\n// // rotateStepper: false, // touch rotate should rotate only 90 to 90 degrees\n// loadingMessage: translate.instant('MESSAGES.INFO_LOADING_FILE'), // 'Loading...',\n// // buttonStyle: {\n// // iconFontFamily: 'Material Icons', // font used to render the button icons\n// // alpha: 0.5, // buttons' transparence value\n// // hoverAlpha: 0.7, // buttons' transparence value when mouse is over\n// // bgStyle: '#000000', // buttons' background style\n// // iconStyle: '#ffffff', // buttons' icon colors\n// // borderStyle: '#000000', // buttons' border style\n// // borderWidth: 0, // buttons' border width (0 == disabled)\n// // },\n// // tooltips: {\n// // enabled: true, // enable or disable tooltips for buttons\n// // bgStyle: '#000000', // tooltip background style\n// // bgAlpha: 0.5, // tooltip background transparence\n// // textStyle: '#ffffff', // tooltip's text style\n// // textAlpha: 0.9, // tooltip's text transparence\n// // padding: 15, // tooltip padding\n// // radius: 20, // tooltip border radius\n// // },\n// // shorter button configuration style\n// nextPageButton: createButtonConfig(\n// 'navigate_next',\n// 'Next page',\n// 0,\n// false\n// ),\n// beforePageButton: createButtonConfig(\n// 'navigate_before',\n// 'Previous page',\n// 1,\n// false\n// ),\n// zoomOutButton: createButtonConfig('zoom_out', 'Zoom out', 0, false),\n// zoomInButton: createButtonConfig('zoom_in', 'Zoom in', 1, false),\n// rotateLeftButton: createButtonConfig(\n// 'rotate_left',\n// 'Rotate left',\n// 2,\n// false\n// ),\n// rotateRightButton: createButtonConfig(\n// 'rotate_right',\n// 'Rotate right',\n// 3,\n// false\n// ),\n// resetButton: createButtonConfig('autorenew', 'Reset', 4, false),\n// };\n// }\n\n@Component({\n selector: 'pep-images-filmstrip',\n templateUrl: './images-filmstrip.component.html',\n styleUrls: ['./images-filmstrip.component.scss', './images-filmstrip.component.theme.scss'],\n // animations: [slideInAnimation],\n providers: [\n // {\n // provide: IMAGEVIEWER_CONFIG,\n // // useValue: IMAGEVIEWER_CONFIG_DEFAULT,\n // useFactory: createViewerConfig,\n // deps: [TranslateService],\n // },\n ],\n})\nexport class PepImagesFilmstripComponent\n implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n // @ViewChild('ngxViewerImage') ngxViewerImage: any; // TODO: Check if we need to use this??\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n controlType = 'images';\n\n @Input() form: FormGroup = null;\n @Input() uid = '0';\n @Input() showTitle = false;\n @Input() renderTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Input() currIndex = 0;\n @Input() showThumbnails = false;\n\n @ViewChild('galleryCont') galleryCont: ElementRef;\n @ViewChild('galleryDialogTemplate', { read: TemplateRef })\n galleryDialogTemplate: TemplateRef<any>;\n @ViewChild('galleryDialogCont') galleryDialogCont: ElementRef;\n\n config: GalleryConfig;\n items: GalleryItem[] = null;\n inDialog = false;\n showFooter = false;\n showClose = true;\n \n mandatory = false;\n readonly = false;\n disabled = false;\n fieldHeight = '';\n standAlone = false;\n\n galleryWidth = 0;\n galleryHeight;\n isVertical = false;\n galleryRef: GalleryRef;\n dialogGalleryRef: GalleryRef;\n guid: string;\n\n private enlargeImageDialogRef: MatDialogRef<any>;\n\n constructor(\n private customizationService: PepCustomizationService,\n private dialogService: PepDialogService,\n private layoutService: PepLayoutService,\n private fileService: PepFileService,\n private iconRegistry: PepIconRegistry,\n private utilitiesService: PepUtilitiesService,\n private gallery: Gallery,\n private renderer: Renderer2,\n private element: ElementRef,\n private cd: ChangeDetectorRef,\n @Optional() @Inject(DOCUMENT) private document: any,\n @Optional()\n private dialogRef: MatDialogRef<PepImagesFilmstripComponent>,\n @Optional()\n @Inject(MAT_DIALOG_DATA)\n private data: IPepImagesFilmstripDialogData\n ) {\n // If data exist copy all data properties into this.\n if (dialogRef && data) {\n this.inDialog = true;\n\n Object.keys(data).forEach((key) => {\n if (key in this) {\n this[key] = data[key];\n }\n });\n }\n\n this.config = {\n nav: false, // Show navigation buttons\n // navIcon: pepIconArrowRightAlt.data,\n // loop: true,\n // zoomOut: 0,\n // dots: false,\n // dotsPosition: 'bottom',\n // counterPosition: 'top',\n // thumb: true,\n counter: false, // Show counter\n gestures: true, // Use touch events (requires hammer.js)\n // autoPlay: false,\n // thumbWidth: 120,\n // thumbHeight: 90,\n imageSize: 'contain',\n // panSensitivity: 25,\n // disableThumb: false,\n // playerInterval: 3000,\n // thumbMode: ThumbnailsMode.Free,\n // thumbPosition: ThumbnailsPosition.Bottom,\n loadingStrategy: LoadingStrategy.Preload,\n // slidingDirection: SlidingDirection.Horizontal,\n };\n\n this.guid = PepGuid.newGuid();\n }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepImagesField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n // private renderNavIcon(galleryContainer, isLeft: boolean) {\n // let iconName = isLeft ? pepIconArrowLeftAlt.name : pepIconArrowRightAlt.name;\n // const svgData = this.iconRegistry.getIcon(iconName);\n // const svgIcon = this.utilitiesService.getSvgElementFromString(\n // this.document,\n // svgData\n // );\n\n // const elementNameToFind = isLeft ? 'g-nav-prev' : 'g-nav-next'\n\n // const elementArr = galleryContainer.nativeElement.querySelectorAll(`.${elementNameToFind}`);\n // if (elementArr && elementArr.length > 0) {\n // elementArr[0].appendChild(svgIcon);\n // this.renderer.addClass(svgIcon, 'svg-icon');\n // }\n // }\n\n ngOnInit(): void {\n if (!this.inDialog) {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n if (this.items === null) {\n const imgArr = this.value ? this.value.split(';') : [];\n // add No image image when there is no images\n if (imgArr.length === 0) {\n const noImageSrc = this.fileService.getSvgAsImageSrc(\n pepIconNoImage2.data\n );\n imgArr.push(noImageSrc);\n }\n\n this.items = imgArr.map(\n (img) => new ImageItem({ src: img, thumb: img })\n );\n }\n\n this.config.dots = this.config.nav = this.items.length > 1;\n this.config.thumb =\n (this.key === 'ItemFilmstripImages' || this.showThumbnails) &&\n this.items.length > 1\n ? true\n : false;\n this.currIndex =\n this.key === 'ItemFilmstripImages' &&\n this.currIndex === 0 &&\n this.items.length > 1\n ? Math.floor(this.items.length / 2) - 1\n : this.currIndex;\n }\n\n ngAfterViewInit(): void {\n if (this.inDialog) {\n this.afterDialogOpened();\n } else {\n this.galleryRef = this.gallery.ref(\n `${this.guid}-gallery`\n );\n this.initGalleryStyle(this.galleryCont, this.galleryRef);\n }\n }\n\n ngOnChanges(): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n if (this.galleryRef) {\n this.galleryRef.destroy();\n }\n if (this.dialogGalleryRef) {\n this.dialogGalleryRef.destroy();\n }\n // if (this.myPinch) { this.myPinch.destroy(); }\n }\n\n initGalleryStyle(galleryContainer, galleryRef): void {\n setTimeout(() => {\n // Set thumbnails position and sliding direction\n this.setThumbnailDimension(galleryContainer);\n galleryRef.setConfig(this.config);\n // this.renderNavIcon(galleryContainer, true);\n // this.renderNavIcon(galleryContainer, false);\n }, 0);\n\n const currentIndex = this.currIndex;\n if (currentIndex > 0) {\n setTimeout(() => {\n galleryRef.load(this.items);\n galleryRef.set(currentIndex);\n }, 0);\n // galleryRef.set(currentIndex);\n } else {\n galleryRef.load(this.items);\n }\n }\n\n onError(e): void {\n const noImageSrc = this.fileService.getSvgAsImageSrc(\n pepIconNoImage2.data\n );\n const noimg = new ImageItem({ src: noImageSrc, thumb: noImageSrc });\n this.items.splice(e.itemIndex, 1, noimg);\n }\n\n enlargeImage(event: any): void {\n const config = this.dialogService.getDialogConfig({}, 'inline');\n config.maxWidth = '75vw';\n config.height = '95vh';\n\n this.enlargeImageDialogRef = this.dialogService.openDialog(\n this.galleryDialogTemplate,\n {\n currIndex: this.currIndex,\n },\n config\n );\n\n this.enlargeImageDialogRef.afterOpened().subscribe(() => {\n this.afterDialogOpened();\n });\n\n // Update currentIndex in galleryRef\n // dialogRef.afterClosed().subscribe(value => {\n // this.galleryRef.set(this.currIndex);\n // });\n }\n\n afterDialogOpened(): void {\n this.dialogGalleryRef = this.gallery.ref(\n `${this.guid}-dlgGallery`\n );\n this.initGalleryStyle(this.galleryDialogCont, this.dialogGalleryRef);\n }\n\n closeDialog(event) {\n if (this.inDialog) {\n this.dialogRef?.close(event);\n } else {\n this.enlargeImageDialogRef?.close(event);\n }\n }\n\n setThumbnailDimension(galleryContainer): void {\n this.galleryWidth = galleryContainer.nativeElement.clientWidth;\n // this.galleryHeight = galleryContainer.nativeElement.clientHeight - 32; // TODO - TALK WITH TOMER\n this.galleryHeight = this.inDialog\n ? galleryContainer.nativeElement.clientHeight - 32\n : galleryContainer.nativeElement.clientHeight;\n // this.galleryHeight = galleryContainer.nativeElement.clientHeight - 32;\n this.cd.detectChanges();\n\n this.isVertical = this.galleryWidth < this.galleryHeight;\n this.cd.detectChanges();\n if (this.isVertical) {\n let width =\n (this.galleryWidth - (this.items.length - 1) * 16) /\n this.items.length;\n width = Math.min(Math.max(width, 24), 96);\n\n this.config.thumbHeight = width;\n this.config.thumbWidth = width + 16;\n } else {\n let height =\n (this.galleryHeight - (this.items.length - 1) * 16) /\n this.items.length;\n height = Math.min(Math.max(height, 24), 96);\n\n this.config.thumbHeight = height + 16;\n this.config.thumbWidth = height;\n }\n\n this.config.thumbPosition = this.isVertical\n ? ThumbnailsPosition.Bottom\n : this.layoutService.isRtl()\n ? ThumbnailsPosition.Right\n : ThumbnailsPosition.Left;\n this.config.slidingDirection =\n this.key !== 'ItemFilmstripImages'\n ? SlidingDirection.Horizontal\n : this.isVertical\n ? SlidingDirection.Horizontal\n : SlidingDirection.Vertical;\n\n this.config.imageSize = 'contain';\n }\n\n indexChange(item: any): void {\n this.currIndex = item.currIndex;\n // if (this.ngxViewerImage && this.ngxViewerImage.scale) {\n // this.ngxViewerImage.scale = 1;\n // this.updateStyle();\n // }\n }\n\n\n // scrollFunction(e: any): boolean {\n // e.deltaY > 0 ? this.zoomOut() : this.zoomIn();\n // return false;\n // }\n\n // zoomIn(): void {\n // if (this.ngxViewerImage.scale < 2) {\n // this.ngxViewerImage.scale *= (1 + this.ngxViewerImage.config.zoomFactor);\n // } else {\n // this.ngxViewerImage.scale = 2;\n // }\n // this.updateStyle();\n // }\n\n // zoomOut(): void {\n // if (this.ngxViewerImage.scale > this.ngxViewerImage.config.zoomFactor) {\n // this.ngxViewerImage.scale /= (1 + this.ngxViewerImage.config.zoomFactor);\n // }\n // this.updateStyle();\n // }\n\n // private updateStyle(): void {\n // this.ngxViewerImage.style.transform = `translate(${this.ngxViewerImage.translateX}px,\n // ${this.ngxViewerImage.translateY}px) rotate(${this.ngxViewerImage.rotation}deg) scale(${this.ngxViewerImage.scale})`;\n\n // this.cd.detectChanges();\n // }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemClose,\n pepIconArrowRightAlt,\n pepIconArrowLeftAlt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\n\nimport { GalleryModule } from 'ng-gallery';\n// import { ImageViewerModule } from '@hallysonh/ngx-imageviewer';\n\nimport { PepImagesFilmstripComponent } from './images-filmstrip.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatFormFieldModule,\n MatDialogModule,\n MatIconModule,\n // External modules\n GalleryModule,\n // ImageViewerModule,\n // ImageViewerModule.forRoot({\n // btnClass: 'default', // The CSS class(es) that will apply to the buttons\n // zoomFactor: 0.1, // The amount that the scale will be increased by\n // containerBackgroundColor: 'transparent', // The color to use for the background. This can provided in hex, or rgb(a).\n // wheelZoom: true, // If true, the mouse wheel can be used to zoom in\n // allowFullscreen: false, // If true, the fullscreen button will be shown, allowing the user to entr fullscreen mode\n // btnIcons: {\n // // The icon classes that will apply to the buttons. By default, font-awesome is used.\n // zoomIn: 'fa fa-plus',\n // zoomOut: 'fa fa-minus',\n // rotateClockwise: 'fa fa-repeat',\n // rotateCounterClockwise: 'fa fa-undo',\n // next: 'fa fa-arrow-right',\n // prev: 'fa fa-arrow-left',\n // fullscreen: 'fa fa-arrows-alt'\n // }\n // }),\n // ngx-lib modules\n PepNgxLibModule,\n PepButtonModule,\n PepIconModule,\n PepFieldTitleModule,\n PepDialogModule,\n ],\n exports: [PepImagesFilmstripComponent],\n declarations: [PepImagesFilmstripComponent],\n})\nexport class PepImagesFilmstripModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n pepIconArrowRightAlt,\n pepIconArrowLeftAlt,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/images-filmstrip\n */\nexport * from './images-filmstrip.module';\nexport * from './images-filmstrip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","LoadingStrategy","PepGuid","PepImagesField","PepCustomizationService","pepIconNoImage2","ImageItem","ThumbnailsPosition","SlidingDirection","Component","PepDialogService","PepLayoutService","PepFileService","PepIconRegistry","PepUtilitiesService","Gallery","Renderer2","ElementRef","ChangeDetectorRef","Optional","Inject","DOCUMENT","MatDialogRef","MAT_DIALOG_DATA","Input","ViewChild","TemplateRef","pepIconSystemEdit","pepIconSystemClose","pepIconArrowRightAlt","pepIconArrowLeftAlt","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatFormFieldModule","MatDialogModule","MatIconModule","GalleryModule","PepNgxLibModule","PepButtonModule","PepIconModule","PepFieldTitleModule","PepDialogModule"],"mappings":";;;;;;IAgFA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;QAgFI,qCACY,oBAA6C,EAC7C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BAClBC,wBAAe;wBACfC,oBAAa;;wBAEbC,uBAAa;;;;;;;;;;;;;;;;;;;;wBAoBbC,sBAAe;wBACfC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;wBACnBC,sBAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,2BAA2B,CAAC;oBACtC,YAAY,EAAE,CAAC,2BAA2B,CAAC;iBAC9C;;;gBAnDG9B,oBAAe;;;ICdnB;;;;ICAA;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pepperi-addons-ngx-lib-images-filmstrip.umd.js","sources":["../../../projects/ngx-lib/images-filmstrip/images-filmstrip.component.ts","../../../projects/ngx-lib/images-filmstrip/images-filmstrip.module.ts","../../../projects/ngx-lib/images-filmstrip/public-api.ts","../../../projects/ngx-lib/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n OnInit,\n OnDestroy,\n AfterViewInit,\n ElementRef,\n Input,\n TemplateRef,\n Renderer2,\n ChangeDetectorRef,\n Inject,\n Optional,\n ViewContainerRef,\n OnChanges,\n} from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport {\n Gallery,\n GalleryConfig,\n LoadingStrategy,\n SlidingDirection,\n ThumbnailsPosition,\n GalleryItem,\n ImageItem,\n GalleryRef,\n} from 'ng-gallery';\nimport {\n PepCustomizationService,\n PepLayoutType,\n PepLayoutService,\n PepFileService,\n PepHorizontalAlignment,\n DEFAULT_HORIZONTAL_ALIGNMENT,\n PepImagesField,\n PepUtilitiesService,\n PepGuid\n} from '@pepperi-addons/ngx-lib';\nimport { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';\nimport { PepIconRegistry, pepIconNoImage2 } from '@pepperi-addons/ngx-lib/icon';\n\nimport 'hammerjs';\n\ninterface IPepImagesFilmstripDialogData {\n currIndex: number;\n key: string;\n value: string;\n label: string;\n showFooter: boolean;\n uid: string;\n showThumbnails: boolean;\n}\n\nimport { DOCUMENT } from '@angular/common';\n\n@Component({\n selector: 'pep-images-filmstrip',\n templateUrl: './images-filmstrip.component.html',\n styleUrls: ['./images-filmstrip.component.scss', './images-filmstrip.component.theme.scss'],\n})\nexport class PepImagesFilmstripComponent\n implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n @Input() key = '';\n @Input() value = '';\n @Input() label = '';\n @Input() xAlignment: PepHorizontalAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;\n\n private _rowSpan = 1;\n @Input()\n set rowSpan(value) {\n this._rowSpan = value;\n this.setFieldHeight();\n }\n get rowSpan(): number {\n return this._rowSpan;\n }\n\n controlType = 'images';\n\n @Input() form: FormGroup = null;\n @Input() uid = '0';\n @Input() showTitle = false;\n @Input() renderTitle = true;\n\n private _layoutType: PepLayoutType = 'form';\n @Input()\n set layoutType(value: PepLayoutType) {\n this._layoutType = value;\n this.setFieldHeight();\n }\n get layoutType(): PepLayoutType {\n return this._layoutType;\n }\n\n @Input() currIndex = 0;\n @Input() showThumbnails = false;\n\n @ViewChild('galleryCont') galleryCont: ElementRef;\n @ViewChild('galleryDialogTemplate', { read: TemplateRef })\n galleryDialogTemplate: TemplateRef<any>;\n @ViewChild('galleryDialogCont') galleryDialogCont: ElementRef;\n\n config: GalleryConfig;\n items: GalleryItem[] = null;\n inDialog = false;\n showFooter = false;\n showClose = true;\n \n mandatory = false;\n readonly = false;\n disabled = false;\n fieldHeight = '';\n standAlone = false;\n\n galleryWidth = 0;\n galleryHeight;\n isVertical = false;\n galleryRef: GalleryRef;\n dialogGalleryRef: GalleryRef;\n guid: string;\n\n private enlargeImageDialogRef: MatDialogRef<any>;\n\n constructor(\n private customizationService: PepCustomizationService,\n private dialogService: PepDialogService,\n private layoutService: PepLayoutService,\n private fileService: PepFileService,\n private iconRegistry: PepIconRegistry,\n private utilitiesService: PepUtilitiesService,\n private gallery: Gallery,\n private renderer: Renderer2,\n private element: ElementRef,\n private cd: ChangeDetectorRef,\n @Optional() @Inject(DOCUMENT) private document: any,\n @Optional()\n private dialogRef: MatDialogRef<PepImagesFilmstripComponent>,\n @Optional()\n @Inject(MAT_DIALOG_DATA)\n private data: IPepImagesFilmstripDialogData\n ) {\n // If data exist copy all data properties into this.\n if (dialogRef && data) {\n this.inDialog = true;\n\n Object.keys(data).forEach((key) => {\n if (key in this) {\n this[key] = data[key];\n }\n });\n }\n\n this.config = {\n nav: false, // Show navigation buttons\n // navIcon: pepIconArrowRightAlt.data,\n // loop: true,\n // zoomOut: 0,\n // dots: false,\n // dotsPosition: 'bottom',\n // counterPosition: 'top',\n // thumb: true,\n counter: false, // Show counter\n gestures: true, // Use touch events (requires hammer.js)\n // autoPlay: false,\n // thumbWidth: 120,\n // thumbHeight: 90,\n imageSize: 'contain',\n // panSensitivity: 25,\n // disableThumb: false,\n // playerInterval: 3000,\n // thumbMode: ThumbnailsMode.Free,\n // thumbPosition: ThumbnailsPosition.Bottom,\n loadingStrategy: LoadingStrategy.Preload,\n // slidingDirection: SlidingDirection.Horizontal,\n };\n\n this.guid = PepGuid.newGuid();\n }\n\n private setFieldHeight(): void {\n this.fieldHeight = this.customizationService.calculateFieldHeight(\n this.layoutType,\n this.rowSpan,\n this.standAlone\n );\n }\n\n private setDefaultForm(): void {\n const pepField = new PepImagesField({\n key: this.key,\n value: this.value,\n mandatory: this.mandatory,\n readonly: this.readonly,\n disabled: this.disabled,\n });\n this.form = this.customizationService.getDefaultFromGroup(pepField);\n }\n\n // private renderNavIcon(galleryContainer, isLeft: boolean) {\n // let iconName = isLeft ? pepIconArrowLeftAlt.name : pepIconArrowRightAlt.name;\n // const svgData = this.iconRegistry.getIcon(iconName);\n // const svgIcon = this.utilitiesService.getSvgElementFromString(\n // this.document,\n // svgData\n // );\n\n // const elementNameToFind = isLeft ? 'g-nav-prev' : 'g-nav-next'\n\n // const elementArr = galleryContainer.nativeElement.querySelectorAll(`.${elementNameToFind}`);\n // if (elementArr && elementArr.length > 0) {\n // elementArr[0].appendChild(svgIcon);\n // this.renderer.addClass(svgIcon, 'svg-icon');\n // }\n // }\n\n ngOnInit(): void {\n if (!this.inDialog) {\n if (this.form === null) {\n this.standAlone = true;\n this.setFieldHeight();\n this.setDefaultForm();\n\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME\n );\n\n if (!this.renderTitle) {\n this.renderer.addClass(\n this.element.nativeElement,\n PepCustomizationService.STAND_ALONE_FIELD_NO_SPACING_CLASS_NAME\n );\n }\n }\n }\n\n if (this.items === null) {\n const imgArr = this.value ? this.value.split(';') : [];\n // add No image image when there is no images\n if (imgArr.length === 0) {\n const noImageSrc = this.fileService.getSvgAsImageSrc(\n pepIconNoImage2.data\n );\n imgArr.push(noImageSrc);\n }\n\n this.items = imgArr.map(\n (img) => new ImageItem({ src: img, thumb: img })\n );\n }\n\n this.config.dots = this.config.nav = this.items.length > 1;\n this.config.thumb =\n (this.key === 'ItemFilmstripImages' || this.showThumbnails) &&\n this.items.length > 1\n ? true\n : false;\n this.currIndex =\n this.key === 'ItemFilmstripImages' &&\n this.currIndex === 0 &&\n this.items.length > 1\n ? Math.floor(this.items.length / 2) - 1\n : this.currIndex;\n }\n\n ngAfterViewInit(): void {\n if (this.inDialog) {\n this.afterDialogOpened();\n } else {\n this.galleryRef = this.gallery.ref(\n `${this.guid}-gallery`\n );\n this.initGalleryStyle(this.galleryCont, this.galleryRef);\n }\n }\n\n ngOnChanges(): void {\n if (this.standAlone) {\n this.setDefaultForm();\n }\n }\n\n ngOnDestroy(): void {\n if (this.galleryRef) {\n this.galleryRef.destroy();\n }\n if (this.dialogGalleryRef) {\n this.dialogGalleryRef.destroy();\n }\n // if (this.myPinch) { this.myPinch.destroy(); }\n }\n\n initGalleryStyle(galleryContainer, galleryRef): void {\n setTimeout(() => {\n // Set thumbnails position and sliding direction\n this.setThumbnailDimension(galleryContainer);\n galleryRef.setConfig(this.config);\n // this.renderNavIcon(galleryContainer, true);\n // this.renderNavIcon(galleryContainer, false);\n }, 0);\n\n const currentIndex = this.currIndex;\n if (currentIndex > 0) {\n setTimeout(() => {\n galleryRef.load(this.items);\n galleryRef.set(currentIndex);\n }, 0);\n // galleryRef.set(currentIndex);\n } else {\n galleryRef.load(this.items);\n }\n }\n\n onError(e): void {\n const noImageSrc = this.fileService.getSvgAsImageSrc(\n pepIconNoImage2.data\n );\n const noimg = new ImageItem({ src: noImageSrc, thumb: noImageSrc });\n this.items.splice(e.itemIndex, 1, noimg);\n }\n\n enlargeImage(event: any): void {\n const config = this.dialogService.getDialogConfig({}, 'inline');\n config.maxWidth = '75vw';\n config.height = '95vh';\n\n this.enlargeImageDialogRef = this.dialogService.openDialog(\n this.galleryDialogTemplate,\n {\n currIndex: this.currIndex,\n },\n config\n );\n\n this.enlargeImageDialogRef.afterOpened().subscribe(() => {\n this.afterDialogOpened();\n });\n\n // Update currentIndex in galleryRef\n // dialogRef.afterClosed().subscribe(value => {\n // this.galleryRef.set(this.currIndex);\n // });\n }\n\n afterDialogOpened(): void {\n this.dialogGalleryRef = this.gallery.ref(\n `${this.guid}-dlgGallery`\n );\n this.initGalleryStyle(this.galleryDialogCont, this.dialogGalleryRef);\n }\n\n closeDialog(event) {\n if (this.inDialog) {\n this.dialogRef?.close(event);\n } else {\n this.enlargeImageDialogRef?.close(event);\n }\n }\n\n setThumbnailDimension(galleryContainer): void {\n this.galleryWidth = galleryContainer.nativeElement.clientWidth;\n // this.galleryHeight = galleryContainer.nativeElement.clientHeight - 32; // TODO - TALK WITH TOMER\n this.galleryHeight = this.inDialog\n ? galleryContainer.nativeElement.clientHeight - 32\n : galleryContainer.nativeElement.clientHeight;\n // this.galleryHeight = galleryContainer.nativeElement.clientHeight - 32;\n this.cd.detectChanges();\n\n this.isVertical = this.galleryWidth < this.galleryHeight;\n this.cd.detectChanges();\n if (this.isVertical) {\n let width =\n (this.galleryWidth - (this.items.length - 1) * 16) /\n this.items.length;\n width = Math.min(Math.max(width, 24), 96);\n\n this.config.thumbHeight = width;\n this.config.thumbWidth = width + 16;\n } else {\n let height =\n (this.galleryHeight - (this.items.length - 1) * 16) /\n this.items.length;\n height = Math.min(Math.max(height, 24), 96);\n\n this.config.thumbHeight = height + 16;\n this.config.thumbWidth = height;\n }\n\n this.config.thumbPosition = this.isVertical\n ? ThumbnailsPosition.Bottom\n : this.layoutService.isRtl()\n ? ThumbnailsPosition.Right\n : ThumbnailsPosition.Left;\n this.config.slidingDirection =\n this.key !== 'ItemFilmstripImages'\n ? SlidingDirection.Horizontal\n : this.isVertical\n ? SlidingDirection.Horizontal\n : SlidingDirection.Vertical;\n\n this.config.imageSize = 'contain';\n }\n\n indexChange(item: any): void {\n this.currIndex = item.currIndex;\n // if (this.ngxViewerImage && this.ngxViewerImage.scale) {\n // this.ngxViewerImage.scale = 1;\n // this.updateStyle();\n // }\n }\n\n\n // scrollFunction(e: any): boolean {\n // e.deltaY > 0 ? this.zoomOut() : this.zoomIn();\n // return false;\n // }\n\n // zoomIn(): void {\n // if (this.ngxViewerImage.scale < 2) {\n // this.ngxViewerImage.scale *= (1 + this.ngxViewerImage.config.zoomFactor);\n // } else {\n // this.ngxViewerImage.scale = 2;\n // }\n // this.updateStyle();\n // }\n\n // zoomOut(): void {\n // if (this.ngxViewerImage.scale > this.ngxViewerImage.config.zoomFactor) {\n // this.ngxViewerImage.scale /= (1 + this.ngxViewerImage.config.zoomFactor);\n // }\n // this.updateStyle();\n // }\n\n // private updateStyle(): void {\n // this.ngxViewerImage.style.transform = `translate(${this.ngxViewerImage.translateX}px,\n // ${this.ngxViewerImage.translateY}px) rotate(${this.ngxViewerImage.rotation}deg) scale(${this.ngxViewerImage.scale})`;\n\n // this.cd.detectChanges();\n // }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { PepNgxLibModule } from '@pepperi-addons/ngx-lib';\nimport { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';\nimport { PepButtonModule } from '@pepperi-addons/ngx-lib/button';\nimport {\n PepIconModule,\n PepIconRegistry,\n pepIconSystemEdit,\n pepIconSystemClose,\n pepIconArrowRightAlt,\n pepIconArrowLeftAlt,\n} from '@pepperi-addons/ngx-lib/icon';\nimport { PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';\n\nimport { GalleryModule } from 'ng-gallery';\n\nimport { PepImagesFilmstripComponent } from './images-filmstrip.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n // Material modules,\n MatCommonModule,\n MatFormFieldModule,\n MatDialogModule,\n MatIconModule,\n // External modules\n GalleryModule,\n // ngx-lib modules\n PepNgxLibModule,\n PepButtonModule,\n PepIconModule,\n PepFieldTitleModule,\n PepDialogModule,\n ],\n exports: [PepImagesFilmstripComponent],\n declarations: [PepImagesFilmstripComponent],\n})\nexport class PepImagesFilmstripModule {\n constructor(private pepIconRegistry: PepIconRegistry) {\n this.pepIconRegistry.registerIcons([\n pepIconSystemEdit,\n pepIconSystemClose,\n pepIconArrowRightAlt,\n pepIconArrowLeftAlt,\n ]);\n }\n}\n","/*\n * Public API Surface of ngx-lib/images-filmstrip\n */\nexport * from './images-filmstrip.module';\nexport * from './images-filmstrip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["DEFAULT_HORIZONTAL_ALIGNMENT","LoadingStrategy","PepGuid","PepImagesField","PepCustomizationService","pepIconNoImage2","ImageItem","ThumbnailsPosition","SlidingDirection","Component","PepDialogService","PepLayoutService","PepFileService","PepIconRegistry","PepUtilitiesService","Gallery","Renderer2","ElementRef","ChangeDetectorRef","Optional","Inject","DOCUMENT","MatDialogRef","MAT_DIALOG_DATA","Input","ViewChild","TemplateRef","pepIconSystemEdit","pepIconSystemClose","pepIconArrowRightAlt","pepIconArrowLeftAlt","NgModule","CommonModule","ReactiveFormsModule","MatCommonModule","MatFormFieldModule","MatDialogModule","MatIconModule","GalleryModule","PepNgxLibModule","PepButtonModule","PepIconModule","PepFieldTitleModule","PepDialogModule"],"mappings":";;;;;;;QA4HI,qCACY,oBAA6C,EAC7C,aAA+B,EAC/B,aAA+B,EAC/B,WAA2B,EAC3B,YAA6B,EAC7B,gBAAqC,EACrC,OAAgB,EAChB,QAAmB,EACnB,OAAmB,EACnB,EAAqB,EACS,QAAa,EAE3C,SAAoD,EAGpD,IAAmC;YAhB/C,iBAsDC;YArDW,yBAAoB,GAApB,oBAAoB,CAAyB;YAC7C,kBAAa,GAAb,aAAa,CAAkB;YAC/B,kBAAa,GAAb,aAAa,CAAkB;YAC/B,gBAAW,GAAX,WAAW,CAAgB;YAC3B,iBAAY,GAAZ,YAAY,CAAiB;YAC7B,qBAAgB,GAAhB,gBAAgB,CAAqB;YACrC,YAAO,GAAP,OAAO,CAAS;YAChB,aAAQ,GAAR,QAAQ,CAAW;YACnB,YAAO,GAAP,OAAO,CAAY;YACnB,OAAE,GAAF,EAAE,CAAmB;YACS,aAAQ,GAAR,QAAQ,CAAK;YAE3C,cAAS,GAAT,SAAS,CAA2C;YAGpD,SAAI,GAAJ,IAAI,CAA+B;YA7EtC,QAAG,GAAG,EAAE,CAAC;YACT,UAAK,GAAG,EAAE,CAAC;YACX,UAAK,GAAG,EAAE,CAAC;YACX,eAAU,GAA2BA,mCAA4B,CAAC;YAEnE,aAAQ,GAAG,CAAC,CAAC;YAUrB,gBAAW,GAAG,QAAQ,CAAC;YAEd,SAAI,GAAc,IAAI,CAAC;YACvB,QAAG,GAAG,GAAG,CAAC;YACV,cAAS,GAAG,KAAK,CAAC;YAClB,gBAAW,GAAG,IAAI,CAAC;YAEpB,gBAAW,GAAkB,MAAM,CAAC;YAUnC,cAAS,GAAG,CAAC,CAAC;YACd,mBAAc,GAAG,KAAK,CAAC;YAQhC,UAAK,GAAkB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,yBAAoB;gBACpBC,wBAAmB;aACtB,CAAC,CAAC;SACN;;;;gBA7BJC,aAAQ,SAAC;oBACN,OAAO,EAAE;wBACLC,mBAAY;wBACZC,yBAAmB;;wBAEnBC,sBAAe;wBACfC,4BAAkB;wBAClBC,wBAAe;wBACfC,oBAAa;;wBAEbC,uBAAa;;wBAEbC,sBAAe;wBACfC,sBAAe;wBACfC,kBAAa;wBACbC,8BAAmB;wBACnBC,sBAAe;qBAClB;oBACD,OAAO,EAAE,CAAC,2BAA2B,CAAC;oBACtC,YAAY,EAAE,CAAC,2BAA2B,CAAC;iBAC9C;;;gBAhCG9B,oBAAe;;;ICdnB;;;;ICAA;;;;;;;;;;;;;"}
|
|
@@ -753,6 +753,10 @@
|
|
|
753
753
|
this.translate = translate;
|
|
754
754
|
this.culture = 'en-US';
|
|
755
755
|
this.culture = ((_a = this.translate) === null || _a === void 0 ? void 0 : _a.getBrowserCultureLang()) || 'en-US';
|
|
756
|
+
try {
|
|
757
|
+
import("@angular/common/locales/global/" + this.culture);
|
|
758
|
+
}
|
|
759
|
+
catch (_b) { }
|
|
756
760
|
}
|
|
757
761
|
PepUtilitiesService.prototype.changeDecimalSeperator = function (value, reverse) {
|
|
758
762
|
if (reverse === void 0) { reverse = false; }
|
|
@@ -870,17 +874,30 @@
|
|
|
870
874
|
}
|
|
871
875
|
else {
|
|
872
876
|
return i1$1.formatPercent(number / 100, this.culture, digitsInfo);
|
|
877
|
+
// return new Intl.NumberFormat(this.culture, {
|
|
878
|
+
// style: 'percent',
|
|
879
|
+
// minimumFractionDigits: 0,
|
|
880
|
+
// maximumFractionDigits: 2,
|
|
881
|
+
// }).format(number / 100);
|
|
873
882
|
}
|
|
874
883
|
};
|
|
875
884
|
PepUtilitiesService.prototype.formatCurrency = function (value, currencySign, digitsInfo) {
|
|
876
885
|
if (currencySign === void 0) { currencySign = ''; }
|
|
877
886
|
if (digitsInfo === void 0) { digitsInfo = '1.2-2'; }
|
|
878
887
|
var number = this.coerceNumberProperty(value);
|
|
888
|
+
// const styleOptions = {
|
|
889
|
+
// style: 'currency',
|
|
890
|
+
// currencySign: currencySign,
|
|
891
|
+
// minimumFractionDigits: 0,
|
|
892
|
+
// maximumFractionDigits: 2,
|
|
893
|
+
// };
|
|
879
894
|
if (number === 0) {
|
|
880
895
|
return i1$1.formatCurrency(0, this.culture, currencySign, undefined, digitsInfo);
|
|
896
|
+
// return new Intl.NumberFormat(this.culture, styleOptions).format(0);
|
|
881
897
|
}
|
|
882
898
|
else {
|
|
883
899
|
return i1$1.formatCurrency(value, this.culture, currencySign, undefined, digitsInfo);
|
|
900
|
+
// return new Intl.NumberFormat(this.culture, styleOptions).format(number);
|
|
884
901
|
}
|
|
885
902
|
};
|
|
886
903
|
PepUtilitiesService.prototype.formatDecimal = function (value, digitsInfo) {
|
|
@@ -891,6 +908,10 @@
|
|
|
891
908
|
}
|
|
892
909
|
else {
|
|
893
910
|
return i1$1.formatNumber(value, this.culture, digitsInfo);
|
|
911
|
+
// return new Intl.NumberFormat(this.culture, {
|
|
912
|
+
// minimumFractionDigits: 2,
|
|
913
|
+
// maximumFractionDigits: 2,
|
|
914
|
+
// }).format(number)
|
|
894
915
|
}
|
|
895
916
|
};
|
|
896
917
|
PepUtilitiesService.prototype.formatNumber = function (value, digitsInfo) {
|
|
@@ -901,6 +922,10 @@
|
|
|
901
922
|
}
|
|
902
923
|
else {
|
|
903
924
|
return i1$1.formatNumber(value, this.culture, digitsInfo);
|
|
925
|
+
// return new Intl.NumberFormat(this.culture, {
|
|
926
|
+
// minimumFractionDigits: 0,
|
|
927
|
+
// maximumFractionDigits: 0,
|
|
928
|
+
// }).format(number)
|
|
904
929
|
}
|
|
905
930
|
};
|
|
906
931
|
/**
|