@seniorsistemas/angular-components 17.17.14 → 17.18.0

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 (39) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +196 -11
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/index.d.ts +1 -0
  6. package/components/thumbnails/components/thumbnail-item/components/thumbnail-item-image/thumbnail-item-image.component.d.ts +3 -0
  7. package/components/thumbnails/components/thumbnail-item/components/thumbnail-item-video/thumbnail-item-video.component.d.ts +8 -0
  8. package/components/thumbnails/components/thumbnail-item/thumbnail-item.component.d.ts +18 -0
  9. package/components/thumbnails/index.d.ts +3 -0
  10. package/components/thumbnails/models/thumbnails-item.d.ts +20 -0
  11. package/components/thumbnails/thumbnails.component.d.ts +16 -0
  12. package/components/thumbnails/thumbnails.module.d.ts +2 -0
  13. package/esm2015/components/index.js +2 -1
  14. package/esm2015/components/thumbnails/components/thumbnail-item/components/thumbnail-item-image/thumbnail-item-image.component.js +16 -0
  15. package/esm2015/components/thumbnails/components/thumbnail-item/components/thumbnail-item-video/thumbnail-item-video.component.js +41 -0
  16. package/esm2015/components/thumbnails/components/thumbnail-item/thumbnail-item.component.js +56 -0
  17. package/esm2015/components/thumbnails/index.js +3 -0
  18. package/esm2015/components/thumbnails/models/thumbnails-item.js +1 -0
  19. package/esm2015/components/thumbnails/thumbnails.component.js +52 -0
  20. package/esm2015/components/thumbnails/thumbnails.module.js +21 -0
  21. package/esm2015/locale/fallback.js +4 -1
  22. package/esm2015/seniorsistemas-angular-components.js +15 -12
  23. package/esm5/components/index.js +2 -1
  24. package/esm5/components/thumbnails/components/thumbnail-item/components/thumbnail-item-image/thumbnail-item-image.component.js +19 -0
  25. package/esm5/components/thumbnails/components/thumbnail-item/components/thumbnail-item-video/thumbnail-item-video.component.js +44 -0
  26. package/esm5/components/thumbnails/components/thumbnail-item/thumbnail-item.component.js +58 -0
  27. package/esm5/components/thumbnails/index.js +3 -0
  28. package/esm5/components/thumbnails/models/thumbnails-item.js +1 -0
  29. package/esm5/components/thumbnails/thumbnails.component.js +57 -0
  30. package/esm5/components/thumbnails/thumbnails.module.js +24 -0
  31. package/esm5/locale/fallback.js +4 -1
  32. package/esm5/seniorsistemas-angular-components.js +15 -12
  33. package/fesm2015/seniorsistemas-angular-components.js +165 -1
  34. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  35. package/fesm5/seniorsistemas-angular-components.js +181 -1
  36. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  37. package/package.json +1 -1
  38. package/seniorsistemas-angular-components.d.ts +14 -11
  39. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -19778,6 +19778,183 @@
19778
19778
  return StepsModule;
19779
19779
  }());
19780
19780
 
19781
+ var ThumbnailsComponent = /** @class */ (function () {
19782
+ function ThumbnailsComponent() {
19783
+ this.selectable = true;
19784
+ this.selectionChange = new core.EventEmitter();
19785
+ this.itemOpened = new core.EventEmitter();
19786
+ this._selection = [];
19787
+ }
19788
+ Object.defineProperty(ThumbnailsComponent.prototype, "selection", {
19789
+ set: function (items) {
19790
+ this._selection = __spread(items);
19791
+ },
19792
+ enumerable: true,
19793
+ configurable: true
19794
+ });
19795
+ ThumbnailsComponent.prototype.onItemOpened = function (item) {
19796
+ this.itemOpened.emit(item);
19797
+ };
19798
+ ThumbnailsComponent.prototype.onItemSelected = function (items) {
19799
+ if (items.selected) {
19800
+ this._selection.push(items.item);
19801
+ }
19802
+ else {
19803
+ this._selection.splice(this._selection.findIndex(function (item) { return item === items.item; }), 1);
19804
+ }
19805
+ this.selectionChange.emit(this._selection);
19806
+ };
19807
+ ThumbnailsComponent.prototype.isSelected = function (item) {
19808
+ return this._selection.some(function (i) { return i.id === item.id; });
19809
+ };
19810
+ __decorate([
19811
+ core.Input()
19812
+ ], ThumbnailsComponent.prototype, "items", void 0);
19813
+ __decorate([
19814
+ core.Input()
19815
+ ], ThumbnailsComponent.prototype, "selectable", void 0);
19816
+ __decorate([
19817
+ core.Input()
19818
+ ], ThumbnailsComponent.prototype, "selection", null);
19819
+ __decorate([
19820
+ core.Output()
19821
+ ], ThumbnailsComponent.prototype, "selectionChange", void 0);
19822
+ __decorate([
19823
+ core.Output()
19824
+ ], ThumbnailsComponent.prototype, "itemOpened", void 0);
19825
+ ThumbnailsComponent = __decorate([
19826
+ core.Component({
19827
+ selector: "s-thumbnails",
19828
+ template: "<div class=\"thumbnails\">\n <s-thumbnail-item\n *ngFor=\"let item of items\"\n [itemData]=\"item\"\n [isCheckable]=\"selectable\"\n [isChecked]=\"isSelected(item)\"\n (checked)=\"onItemSelected($event)\"\n (opened)=\"onItemOpened($event)\">\n </s-thumbnail-item>\n</div>\n",
19829
+ styles: [".thumbnails{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px}"]
19830
+ })
19831
+ ], ThumbnailsComponent);
19832
+ return ThumbnailsComponent;
19833
+ }());
19834
+
19835
+ var ThumbnailItemComponent = /** @class */ (function () {
19836
+ function ThumbnailItemComponent() {
19837
+ this.isCheckable = true;
19838
+ this.isChecked = false;
19839
+ this.checked = new core.EventEmitter();
19840
+ this.opened = new core.EventEmitter();
19841
+ }
19842
+ ThumbnailItemComponent.prototype.ngOnInit = function () {
19843
+ this._validateItemData();
19844
+ this._createFormGroup();
19845
+ };
19846
+ ThumbnailItemComponent.prototype.onClick = function () {
19847
+ this.opened.emit(this.itemData);
19848
+ };
19849
+ ThumbnailItemComponent.prototype._createFormGroup = function () {
19850
+ var _this = this;
19851
+ this.checkboxFormGroup = new forms.FormGroup({
19852
+ checkbox: new forms.FormControl({ checked: this.isChecked }),
19853
+ });
19854
+ this.checkboxFormGroup.get("checkbox").valueChanges.subscribe(function (value) {
19855
+ _this.checked.emit({ item: _this.itemData, checked: value.checked });
19856
+ });
19857
+ };
19858
+ ThumbnailItemComponent.prototype._validateItemData = function () {
19859
+ if (isNullOrUndefined(this.itemData)) {
19860
+ throw new Error("itemData is required");
19861
+ }
19862
+ };
19863
+ __decorate([
19864
+ core.Input()
19865
+ ], ThumbnailItemComponent.prototype, "itemData", void 0);
19866
+ __decorate([
19867
+ core.Input()
19868
+ ], ThumbnailItemComponent.prototype, "isCheckable", void 0);
19869
+ __decorate([
19870
+ core.Input()
19871
+ ], ThumbnailItemComponent.prototype, "isChecked", void 0);
19872
+ __decorate([
19873
+ core.Output()
19874
+ ], ThumbnailItemComponent.prototype, "checked", void 0);
19875
+ __decorate([
19876
+ core.Output()
19877
+ ], ThumbnailItemComponent.prototype, "opened", void 0);
19878
+ ThumbnailItemComponent = __decorate([
19879
+ core.Component({
19880
+ selector: "s-thumbnail-item",
19881
+ template: "<button *ngIf=\"itemData\" class=\"thumbnail-item\" (click)=\"onClick()\">\n <div class=\"thumbnail-item-content\">\n <div class=\"content\">\n <ng-container *ngIf=\"itemData.type === 'video'\">\n <s-thumbnail-item-video\n [imageUrl]=\"itemData.imageUrl\"\n [videoUrl]=\"itemData.videoUrl\">\n </s-thumbnail-item-video>\n </ng-container>\n <ng-container *ngIf=\"itemData.type === 'image'\">\n <s-thumbnail-item-image [imageUrl]=\"itemData.imageUrl\"></s-thumbnail-item-image>\n </ng-container>\n <ng-container *ngIf=\"itemData.type === 'audio'\">\n <i class=\"icon fas fa-volume-down\"></i>\n <span class=\"label\">{{ \"platform.angular_components.listen\" | translate }}</span>\n </ng-container>\n <ng-container *ngIf=\"itemData.type === 'file'\">\n <i class=\"icon fas fa-file-alt\"></i>\n <span class=\"label\">{{ \"platform.angular_components.view\" | translate }}</span>\n </ng-container>\n </div>\n <form *ngIf=\"isCheckable\" [formGroup]=\"checkboxFormGroup\" class=\"checkbox\">\n <s-checkbox [data]=\"{ label: '' }\" formControlName=\"checkbox\"> </s-checkbox>\n </form>\n </div>\n <span class=\"file-name-label\">{{ itemData.fileName }}</span>\n</button>\n",
19882
+ styles: [".thumbnail-item{-ms-flex-align:center;align-items:center;background:0 0;border:none;cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;width:100px}.thumbnail-item-content{-ms-flex-align:center;align-items:center;background-image:linear-gradient(to top right,#5288b6,#00c89a);border-radius:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100px;-ms-flex-pack:center;justify-content:center;position:relative;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%;overflow:hidden}.thumbnail-item-content .checkbox{position:absolute;right:8px;top:8px}.thumbnail-item-content .content{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:4px;overflow:hidden;width:100%}.thumbnail-item-content .content .icon{font-size:24px}.thumbnail-item-content .content .label{font-size:12px;width:100%;padding:0 8px;overflow:hidden;text-overflow:ellipsis}.thumbnail-item:hover{transform:scale(1.05);transition:.2s ease-in-out}.thumbnail-item .file-name-label{color:#525966;font-family:\"Open Sans\",sans-serif;font-size:12px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-wrap:nowrap;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%}"]
19883
+ })
19884
+ ], ThumbnailItemComponent);
19885
+ return ThumbnailItemComponent;
19886
+ }());
19887
+
19888
+ var ThumbnailItemVideoComponent = /** @class */ (function () {
19889
+ function ThumbnailItemVideoComponent() {
19890
+ }
19891
+ ThumbnailItemVideoComponent.prototype.onMouseEnter = function () {
19892
+ var _a;
19893
+ if ((_a = this.videoPlayer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
19894
+ this.videoPlayer.nativeElement.play();
19895
+ }
19896
+ };
19897
+ ThumbnailItemVideoComponent.prototype.onMouseLeave = function () {
19898
+ var _a;
19899
+ if ((_a = this.videoPlayer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
19900
+ this.videoPlayer.nativeElement.pause();
19901
+ this.videoPlayer.nativeElement.currentTime = 0;
19902
+ }
19903
+ };
19904
+ __decorate([
19905
+ core.Input()
19906
+ ], ThumbnailItemVideoComponent.prototype, "imageUrl", void 0);
19907
+ __decorate([
19908
+ core.Input()
19909
+ ], ThumbnailItemVideoComponent.prototype, "videoUrl", void 0);
19910
+ __decorate([
19911
+ core.ViewChild("videoPlayer")
19912
+ ], ThumbnailItemVideoComponent.prototype, "videoPlayer", void 0);
19913
+ __decorate([
19914
+ core.HostListener("mouseenter")
19915
+ ], ThumbnailItemVideoComponent.prototype, "onMouseEnter", null);
19916
+ __decorate([
19917
+ core.HostListener("mouseleave")
19918
+ ], ThumbnailItemVideoComponent.prototype, "onMouseLeave", null);
19919
+ ThumbnailItemVideoComponent = __decorate([
19920
+ core.Component({
19921
+ selector: "s-thumbnail-item-video",
19922
+ template: "<div class=\"thumbnail-item-video\" [ngClass]=\"{ 'thumbnail-item-video--playable': videoUrl }\">\n <div\n class=\"thumbnail-image\"\n [ngStyle]=\"{'backgroundImage': 'url(' + imageUrl + ')'}\">\n </div>\n <div class=\"play-overlay\">\n <i class=\"icon fas fa-play\"></i>\n <span class=\"label\">{{ \"platform.angular_components.watch\" | translate }}</span>\n </div>\n <video\n *ngIf=\"videoUrl\"\n #videoPlayer\n class=\"thumbnail-video-preview\"\n [src]=\"videoUrl\"\n [loop]=\"true\"\n [muted]=\"true\"\n preload=\"none\">\n </video>\n</div>\n",
19923
+ styles: [".thumbnail-item-video{cursor:pointer;height:100px;overflow:hidden;position:relative;width:100px}.thumbnail-item-video .thumbnail-image{background-repeat:no-repeat;background-size:cover;height:100%;width:100%}.thumbnail-item-video .thumbnail-video-preview{height:100%;left:0;width:100%;object-fit:cover;opacity:0;position:absolute;top:0;transition:opacity .3s ease-in-out}.thumbnail-item-video:hover .thumbnail-video-preview{opacity:1}.thumbnail-item-video .play-overlay{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-flex-pack:center;justify-content:center;left:50%;opacity:1;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity .3s ease-in-out;width:100%;z-index:10}.thumbnail-item-video .play-overlay .icon{color:#fff;font-size:24px}.thumbnail-item-video .play-overlay .label{overflow:hidden;padding:0 8px;text-overflow:ellipsis;width:100%}.thumbnail-item-video--playable:hover .play-overlay{opacity:0}"]
19924
+ })
19925
+ ], ThumbnailItemVideoComponent);
19926
+ return ThumbnailItemVideoComponent;
19927
+ }());
19928
+
19929
+ var ThumbnailItemImageComponent = /** @class */ (function () {
19930
+ function ThumbnailItemImageComponent() {
19931
+ }
19932
+ __decorate([
19933
+ core.Input()
19934
+ ], ThumbnailItemImageComponent.prototype, "imageUrl", void 0);
19935
+ ThumbnailItemImageComponent = __decorate([
19936
+ core.Component({
19937
+ selector: "s-thumbnail-item-image",
19938
+ template: "<div class=\"thumbnail-item-image\">\n <div\n *ngIf=\"imageUrl; else noImage\"\n class=\"thumbnail-image\"\n [ngStyle]=\"{ backgroundImage: 'url(' + imageUrl + ')' }\">\n </div>\n\n <ng-template #noImage>\n <div class=\"content\">\n <i class=\"icon fas fa-image\"></i>\n <span class=\"label\">{{ \"platform.angular_components.view\" | translate }}</span>\n </div>\n </ng-template>\n</div>\n",
19939
+ styles: [".thumbnail-item-image{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100px;-ms-flex-pack:center;justify-content:center;width:100px}.thumbnail-item-image .thumbnail-image{background-repeat:no-repeat;background-size:cover;height:100%;width:100%}.thumbnail-item-image .content{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:\"Open Sans\",sans-serif;-ms-flex-pack:center;justify-content:center;width:100%}.thumbnail-item-image .content .icon{font-size:24px}.thumbnail-item-image .content .label{font-size:12px;overflow:hidden;padding:0 8px;text-overflow:ellipsis;width:100%}"]
19940
+ })
19941
+ ], ThumbnailItemImageComponent);
19942
+ return ThumbnailItemImageComponent;
19943
+ }());
19944
+
19945
+ var ThumbnailsModule = /** @class */ (function () {
19946
+ function ThumbnailsModule() {
19947
+ }
19948
+ ThumbnailsModule = __decorate([
19949
+ core.NgModule({
19950
+ imports: [common.CommonModule, forms.ReactiveFormsModule, core$1.TranslateModule, CheckboxModule],
19951
+ declarations: [ThumbnailsComponent, ThumbnailItemComponent, ThumbnailItemVideoComponent, ThumbnailItemImageComponent],
19952
+ exports: [ThumbnailsComponent],
19953
+ })
19954
+ ], ThumbnailsModule);
19955
+ return ThumbnailsModule;
19956
+ }());
19957
+
19781
19958
  var TileComponent = /** @class */ (function () {
19782
19959
  function TileComponent() {
19783
19960
  this.id = "s-tile-" + TileComponent_1.nextId++;
@@ -21144,6 +21321,9 @@
21144
21321
  }());
21145
21322
 
21146
21323
  var fallback = {
21324
+ "platform.angular_components.watch": "assistir",
21325
+ "platform.angular_components.view": "visualizar",
21326
+ "platform.angular_components.listen": "ouvir",
21147
21327
  "platform.angular_components.drag_your_photo_or": "Arraste sua foto ou",
21148
21328
  "platform.angular_components.select_a_file": "selecione um arquivo",
21149
21329
  "platform.angular_components.change_photo": "Alterar foto",
@@ -21641,6 +21821,8 @@
21641
21821
  exports.TextField = TextField;
21642
21822
  exports.ThumbnailComponent = ThumbnailComponent;
21643
21823
  exports.ThumbnailModule = ThumbnailModule;
21824
+ exports.ThumbnailsComponent = ThumbnailsComponent;
21825
+ exports.ThumbnailsModule = ThumbnailsModule;
21644
21826
  exports.TieredMenuDirective = TieredMenuDirective;
21645
21827
  exports.TieredMenuModule = TieredMenuModule;
21646
21828
  exports.TileComponent = TileComponent;
@@ -21734,18 +21916,21 @@
21734
21916
  exports.ɵdn = ProgressBarIndeterminateComponent;
21735
21917
  exports.ɵdo = SelectButtonItemComponent;
21736
21918
  exports.ɵdp = SlidePanelService;
21737
- exports.ɵdq = TimelineItemModule;
21738
- exports.ɵdr = TimelineIconItemComponent;
21739
- exports.ɵds = HorizontalTimelineModule;
21740
- exports.ɵdt = HorizontalTimelineComponent;
21741
- exports.ɵdu = VerticalTimelineModule;
21742
- exports.ɵdv = VerticalTimelineComponent;
21743
- exports.ɵdw = RangeLineComponent;
21744
- exports.ɵdx = CollapseOptionComponent;
21745
- exports.ɵdy = CollapsedItemsComponent;
21746
- exports.ɵdz = VerticalItemsComponent;
21919
+ exports.ɵdq = ThumbnailItemComponent;
21920
+ exports.ɵdr = ThumbnailItemVideoComponent;
21921
+ exports.ɵds = ThumbnailItemImageComponent;
21922
+ exports.ɵdt = TimelineItemModule;
21923
+ exports.ɵdu = TimelineIconItemComponent;
21924
+ exports.ɵdv = HorizontalTimelineModule;
21925
+ exports.ɵdw = HorizontalTimelineComponent;
21926
+ exports.ɵdx = VerticalTimelineModule;
21927
+ exports.ɵdy = VerticalTimelineComponent;
21928
+ exports.ɵdz = RangeLineComponent;
21747
21929
  exports.ɵe = TieredMenuGlobalService;
21748
- exports.ɵea = ChipItemComponent;
21930
+ exports.ɵea = CollapseOptionComponent;
21931
+ exports.ɵeb = CollapsedItemsComponent;
21932
+ exports.ɵec = VerticalItemsComponent;
21933
+ exports.ɵed = ChipItemComponent;
21749
21934
  exports.ɵf = TieredMenuComponent;
21750
21935
  exports.ɵg = TieredMenuNestedComponent;
21751
21936
  exports.ɵh = TieredMenuItemComponent;