@seniorsistemas/angular-components 17.17.14 → 17.18.1

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 (41) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +197 -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/country-phone-picker/resources/countries.js +2 -1
  14. package/esm2015/components/index.js +2 -1
  15. package/esm2015/components/thumbnails/components/thumbnail-item/components/thumbnail-item-image/thumbnail-item-image.component.js +16 -0
  16. package/esm2015/components/thumbnails/components/thumbnail-item/components/thumbnail-item-video/thumbnail-item-video.component.js +41 -0
  17. package/esm2015/components/thumbnails/components/thumbnail-item/thumbnail-item.component.js +56 -0
  18. package/esm2015/components/thumbnails/index.js +3 -0
  19. package/esm2015/components/thumbnails/models/thumbnails-item.js +1 -0
  20. package/esm2015/components/thumbnails/thumbnails.component.js +52 -0
  21. package/esm2015/components/thumbnails/thumbnails.module.js +21 -0
  22. package/esm2015/locale/fallback.js +4 -1
  23. package/esm2015/seniorsistemas-angular-components.js +15 -12
  24. package/esm5/components/country-phone-picker/resources/countries.js +2 -1
  25. package/esm5/components/index.js +2 -1
  26. package/esm5/components/thumbnails/components/thumbnail-item/components/thumbnail-item-image/thumbnail-item-image.component.js +19 -0
  27. package/esm5/components/thumbnails/components/thumbnail-item/components/thumbnail-item-video/thumbnail-item-video.component.js +44 -0
  28. package/esm5/components/thumbnails/components/thumbnail-item/thumbnail-item.component.js +58 -0
  29. package/esm5/components/thumbnails/index.js +3 -0
  30. package/esm5/components/thumbnails/models/thumbnails-item.js +1 -0
  31. package/esm5/components/thumbnails/thumbnails.component.js +57 -0
  32. package/esm5/components/thumbnails/thumbnails.module.js +24 -0
  33. package/esm5/locale/fallback.js +4 -1
  34. package/esm5/seniorsistemas-angular-components.js +15 -12
  35. package/fesm2015/seniorsistemas-angular-components.js +166 -1
  36. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  37. package/fesm5/seniorsistemas-angular-components.js +182 -1
  38. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  39. package/package.json +1 -1
  40. package/seniorsistemas-angular-components.d.ts +14 -11
  41. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -5002,6 +5002,7 @@
5002
5002
  }());
5003
5003
 
5004
5004
  var countries = [
5005
+ { id: "gb", ddi: "+44", mask: "00-0000-0000" },
5005
5006
  { id: "br", ddi: "+55", mask: ["(00) 0000-00009", "(00) 00000-0000"] },
5006
5007
  { id: "ar", ddi: "+54", mask: ["(00) 0000-00009", "(000) 0000-0000"] },
5007
5008
  { id: "bo", ddi: "+591", mask: "0 000 0000" },
@@ -19778,6 +19779,183 @@
19778
19779
  return StepsModule;
19779
19780
  }());
19780
19781
 
19782
+ var ThumbnailsComponent = /** @class */ (function () {
19783
+ function ThumbnailsComponent() {
19784
+ this.selectable = true;
19785
+ this.selectionChange = new core.EventEmitter();
19786
+ this.itemOpened = new core.EventEmitter();
19787
+ this._selection = [];
19788
+ }
19789
+ Object.defineProperty(ThumbnailsComponent.prototype, "selection", {
19790
+ set: function (items) {
19791
+ this._selection = __spread(items);
19792
+ },
19793
+ enumerable: true,
19794
+ configurable: true
19795
+ });
19796
+ ThumbnailsComponent.prototype.onItemOpened = function (item) {
19797
+ this.itemOpened.emit(item);
19798
+ };
19799
+ ThumbnailsComponent.prototype.onItemSelected = function (items) {
19800
+ if (items.selected) {
19801
+ this._selection.push(items.item);
19802
+ }
19803
+ else {
19804
+ this._selection.splice(this._selection.findIndex(function (item) { return item === items.item; }), 1);
19805
+ }
19806
+ this.selectionChange.emit(this._selection);
19807
+ };
19808
+ ThumbnailsComponent.prototype.isSelected = function (item) {
19809
+ return this._selection.some(function (i) { return i.id === item.id; });
19810
+ };
19811
+ __decorate([
19812
+ core.Input()
19813
+ ], ThumbnailsComponent.prototype, "items", void 0);
19814
+ __decorate([
19815
+ core.Input()
19816
+ ], ThumbnailsComponent.prototype, "selectable", void 0);
19817
+ __decorate([
19818
+ core.Input()
19819
+ ], ThumbnailsComponent.prototype, "selection", null);
19820
+ __decorate([
19821
+ core.Output()
19822
+ ], ThumbnailsComponent.prototype, "selectionChange", void 0);
19823
+ __decorate([
19824
+ core.Output()
19825
+ ], ThumbnailsComponent.prototype, "itemOpened", void 0);
19826
+ ThumbnailsComponent = __decorate([
19827
+ core.Component({
19828
+ selector: "s-thumbnails",
19829
+ 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",
19830
+ styles: [".thumbnails{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px}"]
19831
+ })
19832
+ ], ThumbnailsComponent);
19833
+ return ThumbnailsComponent;
19834
+ }());
19835
+
19836
+ var ThumbnailItemComponent = /** @class */ (function () {
19837
+ function ThumbnailItemComponent() {
19838
+ this.isCheckable = true;
19839
+ this.isChecked = false;
19840
+ this.checked = new core.EventEmitter();
19841
+ this.opened = new core.EventEmitter();
19842
+ }
19843
+ ThumbnailItemComponent.prototype.ngOnInit = function () {
19844
+ this._validateItemData();
19845
+ this._createFormGroup();
19846
+ };
19847
+ ThumbnailItemComponent.prototype.onClick = function () {
19848
+ this.opened.emit(this.itemData);
19849
+ };
19850
+ ThumbnailItemComponent.prototype._createFormGroup = function () {
19851
+ var _this = this;
19852
+ this.checkboxFormGroup = new forms.FormGroup({
19853
+ checkbox: new forms.FormControl({ checked: this.isChecked }),
19854
+ });
19855
+ this.checkboxFormGroup.get("checkbox").valueChanges.subscribe(function (value) {
19856
+ _this.checked.emit({ item: _this.itemData, checked: value.checked });
19857
+ });
19858
+ };
19859
+ ThumbnailItemComponent.prototype._validateItemData = function () {
19860
+ if (isNullOrUndefined(this.itemData)) {
19861
+ throw new Error("itemData is required");
19862
+ }
19863
+ };
19864
+ __decorate([
19865
+ core.Input()
19866
+ ], ThumbnailItemComponent.prototype, "itemData", void 0);
19867
+ __decorate([
19868
+ core.Input()
19869
+ ], ThumbnailItemComponent.prototype, "isCheckable", void 0);
19870
+ __decorate([
19871
+ core.Input()
19872
+ ], ThumbnailItemComponent.prototype, "isChecked", void 0);
19873
+ __decorate([
19874
+ core.Output()
19875
+ ], ThumbnailItemComponent.prototype, "checked", void 0);
19876
+ __decorate([
19877
+ core.Output()
19878
+ ], ThumbnailItemComponent.prototype, "opened", void 0);
19879
+ ThumbnailItemComponent = __decorate([
19880
+ core.Component({
19881
+ selector: "s-thumbnail-item",
19882
+ 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",
19883
+ 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%}"]
19884
+ })
19885
+ ], ThumbnailItemComponent);
19886
+ return ThumbnailItemComponent;
19887
+ }());
19888
+
19889
+ var ThumbnailItemVideoComponent = /** @class */ (function () {
19890
+ function ThumbnailItemVideoComponent() {
19891
+ }
19892
+ ThumbnailItemVideoComponent.prototype.onMouseEnter = function () {
19893
+ var _a;
19894
+ if ((_a = this.videoPlayer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
19895
+ this.videoPlayer.nativeElement.play();
19896
+ }
19897
+ };
19898
+ ThumbnailItemVideoComponent.prototype.onMouseLeave = function () {
19899
+ var _a;
19900
+ if ((_a = this.videoPlayer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
19901
+ this.videoPlayer.nativeElement.pause();
19902
+ this.videoPlayer.nativeElement.currentTime = 0;
19903
+ }
19904
+ };
19905
+ __decorate([
19906
+ core.Input()
19907
+ ], ThumbnailItemVideoComponent.prototype, "imageUrl", void 0);
19908
+ __decorate([
19909
+ core.Input()
19910
+ ], ThumbnailItemVideoComponent.prototype, "videoUrl", void 0);
19911
+ __decorate([
19912
+ core.ViewChild("videoPlayer")
19913
+ ], ThumbnailItemVideoComponent.prototype, "videoPlayer", void 0);
19914
+ __decorate([
19915
+ core.HostListener("mouseenter")
19916
+ ], ThumbnailItemVideoComponent.prototype, "onMouseEnter", null);
19917
+ __decorate([
19918
+ core.HostListener("mouseleave")
19919
+ ], ThumbnailItemVideoComponent.prototype, "onMouseLeave", null);
19920
+ ThumbnailItemVideoComponent = __decorate([
19921
+ core.Component({
19922
+ selector: "s-thumbnail-item-video",
19923
+ 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",
19924
+ 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}"]
19925
+ })
19926
+ ], ThumbnailItemVideoComponent);
19927
+ return ThumbnailItemVideoComponent;
19928
+ }());
19929
+
19930
+ var ThumbnailItemImageComponent = /** @class */ (function () {
19931
+ function ThumbnailItemImageComponent() {
19932
+ }
19933
+ __decorate([
19934
+ core.Input()
19935
+ ], ThumbnailItemImageComponent.prototype, "imageUrl", void 0);
19936
+ ThumbnailItemImageComponent = __decorate([
19937
+ core.Component({
19938
+ selector: "s-thumbnail-item-image",
19939
+ 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",
19940
+ 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%}"]
19941
+ })
19942
+ ], ThumbnailItemImageComponent);
19943
+ return ThumbnailItemImageComponent;
19944
+ }());
19945
+
19946
+ var ThumbnailsModule = /** @class */ (function () {
19947
+ function ThumbnailsModule() {
19948
+ }
19949
+ ThumbnailsModule = __decorate([
19950
+ core.NgModule({
19951
+ imports: [common.CommonModule, forms.ReactiveFormsModule, core$1.TranslateModule, CheckboxModule],
19952
+ declarations: [ThumbnailsComponent, ThumbnailItemComponent, ThumbnailItemVideoComponent, ThumbnailItemImageComponent],
19953
+ exports: [ThumbnailsComponent],
19954
+ })
19955
+ ], ThumbnailsModule);
19956
+ return ThumbnailsModule;
19957
+ }());
19958
+
19781
19959
  var TileComponent = /** @class */ (function () {
19782
19960
  function TileComponent() {
19783
19961
  this.id = "s-tile-" + TileComponent_1.nextId++;
@@ -21144,6 +21322,9 @@
21144
21322
  }());
21145
21323
 
21146
21324
  var fallback = {
21325
+ "platform.angular_components.watch": "assistir",
21326
+ "platform.angular_components.view": "visualizar",
21327
+ "platform.angular_components.listen": "ouvir",
21147
21328
  "platform.angular_components.drag_your_photo_or": "Arraste sua foto ou",
21148
21329
  "platform.angular_components.select_a_file": "selecione um arquivo",
21149
21330
  "platform.angular_components.change_photo": "Alterar foto",
@@ -21641,6 +21822,8 @@
21641
21822
  exports.TextField = TextField;
21642
21823
  exports.ThumbnailComponent = ThumbnailComponent;
21643
21824
  exports.ThumbnailModule = ThumbnailModule;
21825
+ exports.ThumbnailsComponent = ThumbnailsComponent;
21826
+ exports.ThumbnailsModule = ThumbnailsModule;
21644
21827
  exports.TieredMenuDirective = TieredMenuDirective;
21645
21828
  exports.TieredMenuModule = TieredMenuModule;
21646
21829
  exports.TileComponent = TileComponent;
@@ -21734,18 +21917,21 @@
21734
21917
  exports.ɵdn = ProgressBarIndeterminateComponent;
21735
21918
  exports.ɵdo = SelectButtonItemComponent;
21736
21919
  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;
21920
+ exports.ɵdq = ThumbnailItemComponent;
21921
+ exports.ɵdr = ThumbnailItemVideoComponent;
21922
+ exports.ɵds = ThumbnailItemImageComponent;
21923
+ exports.ɵdt = TimelineItemModule;
21924
+ exports.ɵdu = TimelineIconItemComponent;
21925
+ exports.ɵdv = HorizontalTimelineModule;
21926
+ exports.ɵdw = HorizontalTimelineComponent;
21927
+ exports.ɵdx = VerticalTimelineModule;
21928
+ exports.ɵdy = VerticalTimelineComponent;
21929
+ exports.ɵdz = RangeLineComponent;
21747
21930
  exports.ɵe = TieredMenuGlobalService;
21748
- exports.ɵea = ChipItemComponent;
21931
+ exports.ɵea = CollapseOptionComponent;
21932
+ exports.ɵeb = CollapsedItemsComponent;
21933
+ exports.ɵec = VerticalItemsComponent;
21934
+ exports.ɵed = ChipItemComponent;
21749
21935
  exports.ɵf = TieredMenuComponent;
21750
21936
  exports.ɵg = TieredMenuNestedComponent;
21751
21937
  exports.ɵh = TieredMenuItemComponent;