asap-feed-beta 12.7.9 → 12.8.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.
@@ -605,13 +605,11 @@
605
605
  this.publication = this.controlService.publication;
606
606
  this.query = this.controlService.query;
607
607
  }
608
- console.log('Query ->', this.query);
609
608
  this.route.params.subscribe((/**
610
609
  * @param {?} param
611
610
  * @return {?}
612
611
  */
613
612
  function (param) {
614
- console.log('Params ->', param);
615
613
  if (param) {
616
614
  if (param.feed_id) {
617
615
  _this.feedID = param.feed_id;
@@ -669,7 +667,6 @@
669
667
  function (feed_id) {
670
668
  var _this = this;
671
669
  if (feed_id === void 0) { feed_id = ''; }
672
- console.log('[getFeed] Query', this.query, this.filterByMe);
673
670
  this.feeds = null;
674
671
  this.loading = true;
675
672
  this.feedService.getFeed(feed_id, this.global.loggedUser(), this.query, this.filterByMe).subscribe((/**
@@ -678,7 +675,6 @@
678
675
  */
679
676
  function (response) {
680
677
  _this.feeds = response.data;
681
- console.log('Feeds', _this.feeds);
682
678
  _this.paginate = response.pagination;
683
679
  _this.loading = false;
684
680
  _this.hasFeed = (_this.feeds.length > 0);
@@ -692,7 +688,6 @@
692
688
  */
693
689
  function () {
694
690
  var _this = this;
695
- console.log('[getMore]', this.paginate.next_document);
696
691
  if (this.paginate.next_document) {
697
692
  this.loading = true;
698
693
  this.feedService.getMoreFeed(5, this.paginate.next_document, this.global.loggedUser(), this.query, this.filterByMe).subscribe((/**
@@ -700,7 +695,6 @@
700
695
  * @return {?}
701
696
  */
702
697
  function (response) {
703
- console.log('[getMore] Got: ', response);
704
698
  response.data.map((/**
705
699
  * @param {?} item
706
700
  * @return {?}
@@ -954,10 +948,23 @@
954
948
  this.filterByMe = filterByMe;
955
949
  this.getFeed();
956
950
  };
951
+ Object.defineProperty(AsapFeedBetaComponent.prototype, "isScrollDisabled", {
952
+ get: /**
953
+ * @return {?}
954
+ */
955
+ function () {
956
+ return this.loading ||
957
+ this.paginate.count >= this.paginate.limit ||
958
+ this.isSinglePost ||
959
+ this.paginate.last_document === this.paginate.next_document;
960
+ },
961
+ enumerable: true,
962
+ configurable: true
963
+ });
957
964
  AsapFeedBetaComponent.decorators = [
958
965
  { type: core.Component, args: [{
959
966
  selector: 'asap-feed-beta',
960
- template: "<ng-container *ngIf=\"!settings?.channelsHidden\">\n <app-stories *ngIf=\"stories && !hasID && !isSinglePost\"></app-stories>\n</ng-container>\n\n<feed-publication [settings]=\"settings\" [announce]=\"announce\" (feedCreated)=\"onNewFeed($event)\" (filter)=\"reload($event)\" *ngIf=\"publication && !hasID && !isSinglePost\"></feed-publication>\n\n<!-- Este trecho do c\u00F3digo foi removido, pois ele fazia o Feed ficar flicando na tela. -->\n<ng-container *ngIf=\"!feeds\">\n <div [class.col-sm-8]=\"hasID\" [class.mx-auto]=\"hasID\"> \n <ng-container *ngFor=\"let item of [0,1]\">\n <div>\n <mat-card class=\"feed-card mb-4\">\n <mat-card-header class=\"feed-header\">\n <div class=\"mr-3\" mat-card-avatar>\n <ngx-skeleton-loader animation=\"progress\" appearance=\"circle\" [theme]=\"{height:'40px'}\">\n </ngx-skeleton-loader>\n </div>\n <mat-card-title>\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'25px','transform': 'initial', marginBottom: '0'}\">\n </ngx-skeleton-loader>\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'15px','transform': 'initial'}\">\n </ngx-skeleton-loader>\n </mat-card-title>\n\n </mat-card-header>\n\n <ng-container>\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'400px','transform': 'initial'}\">\n </ngx-skeleton-loader>\n </ng-container>\n\n </mat-card>\n </div>\n </ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"feeds\">\n <ng-container *ngFor=\"let item of feeds\">\n <div [class.focus-on-me]=\"item.focus\" [class.col-sm-8]=\"hasID\" [class.mx-auto]=\"hasID\">\n <app-feed-item [owner]=\"this\" [settings]=\"settings\" [item]=\"item\" (isVisible)=\"sendVisible($event)\"></app-feed-item>\n </div>\n </ng-container>\n</ng-container>\n\n<div *ngIf=\"loading\">\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'40px', width:'100%'}\"></ngx-skeleton-loader>\n</div>\n\n<div infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"2000\" [infiniteScrollDisabled]=\"\n loading || \n paginate.count >= paginate.limit || \n isSinglePost || \n paginate.last_document === paginate.next_document\" (scrolled)=\"getMore()\">\n</div>\n\n<button \n *ngIf=\"showToTopButton\" \n (click)=\"gotoTop()\" \n style=\"position: fixed;\n bottom: 0;\n right: 0;\n color:#FFFF;\n font-size: 20px;\n margin-right: 10px;\n margin-bottom: 10px;\n height: 35px;\n width: 35px;\n border: none;\n text-align: center;\n border-radius: 50%;\n outline: none;\n transition: all 1s ease-in;\n background-color: var(--main-color);\n z-index: 99999;\"\n class=\"d-none d-sm-block\">\n <i class=\"fa fa-angle-up\"></i>\n</button>\n",
967
+ template: "<ng-container *ngIf=\"!settings?.channelsHidden\">\n <app-stories *ngIf=\"stories && !hasID && !isSinglePost\"></app-stories>\n</ng-container>\n\n<feed-publication [settings]=\"settings\" [announce]=\"announce\" (feedCreated)=\"onNewFeed($event)\" (filter)=\"reload($event)\" *ngIf=\"publication && !hasID && !isSinglePost\"></feed-publication>\n\n<!-- Este trecho do c\u00F3digo foi removido, pois ele fazia o Feed ficar flicando na tela. -->\n<ng-container *ngIf=\"!feeds\">\n <div [class.col-sm-8]=\"hasID\" [class.mx-auto]=\"hasID\"> \n <ng-container *ngFor=\"let item of [0,1]\">\n <div>\n <mat-card class=\"feed-card mb-4\">\n <mat-card-header class=\"feed-header\">\n <div class=\"mr-3\" mat-card-avatar>\n <ngx-skeleton-loader animation=\"progress\" appearance=\"circle\" [theme]=\"{height:'40px'}\">\n </ngx-skeleton-loader>\n </div>\n <mat-card-title>\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'25px','transform': 'initial', marginBottom: '0'}\">\n </ngx-skeleton-loader>\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'15px','transform': 'initial'}\">\n </ngx-skeleton-loader>\n </mat-card-title>\n\n </mat-card-header>\n\n <ng-container>\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'400px','transform': 'initial'}\">\n </ngx-skeleton-loader>\n </ng-container>\n\n </mat-card>\n </div>\n </ng-container>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"feeds\">\n <ng-container *ngFor=\"let item of feeds\">\n <div [class.focus-on-me]=\"item.focus\" [class.col-sm-8]=\"hasID\" [class.mx-auto]=\"hasID\">\n <app-feed-item [owner]=\"this\" [settings]=\"settings\" [item]=\"item\" (isVisible)=\"sendVisible($event)\"></app-feed-item>\n </div>\n </ng-container>\n</ng-container>\n\n<div *ngIf=\"loading\">\n <ngx-skeleton-loader animation=\"progress\" [theme]=\"{height:'40px', width:'100%'}\"></ngx-skeleton-loader>\n</div>\n\n<div infiniteScroll \n [infiniteScrollDistance]=\"2\" \n [infiniteScrollThrottle]=\"2000\" \n [infiniteScrollDisabled]=\"isScrollDisabled\" \n (scrolled)=\"getMore()\">\n</div>\n\n<button \n *ngIf=\"showToTopButton\" \n (click)=\"gotoTop()\" \n style=\"position: fixed;\n bottom: 0;\n right: 0;\n color:#FFFF;\n font-size: 20px;\n margin-right: 10px;\n margin-bottom: 10px;\n height: 35px;\n width: 35px;\n border: none;\n text-align: center;\n border-radius: 50%;\n outline: none;\n transition: all 1s ease-in;\n background-color: var(--main-color);\n z-index: 99999;\"\n class=\"d-none d-sm-block\">\n <i class=\"fa fa-angle-up\"></i>\n</button>\n",
961
968
  styles: ['./asap-feed.beta.componente.scss']
962
969
  }] }
963
970
  ];
@@ -1145,7 +1152,11 @@
1145
1152
  * @return {?}
1146
1153
  */
1147
1154
  function () {
1148
- _this.service.query = {};
1155
+ _this.service.query = {
1156
+ searchBy: 'user_info.id',
1157
+ searchValue: _this.global.loggedUser().id,
1158
+ typeValue: 'number'
1159
+ };
1149
1160
  _this.canShow = 3;
1150
1161
  }), 100);
1151
1162
  }
@@ -1159,11 +1170,21 @@
1159
1170
  * @return {?}
1160
1171
  */
1161
1172
  function (id) {
1173
+ console.log('Chegou evento feedCreated com ID:', id);
1174
+ if (this.feeds) {
1175
+ this.feeds.forEach((/**
1176
+ * @param {?} feed
1177
+ * @return {?}
1178
+ */
1179
+ function (feed) {
1180
+ feed.getFeed();
1181
+ }));
1182
+ }
1162
1183
  };
1163
1184
  AsapTabFeedComponent.decorators = [
1164
1185
  { type: core.Component, args: [{
1165
1186
  selector: 'asap-tab-feed',
1166
- template: "<ng-container *ngIf=\"!settings?.channelsHidden\">\n <app-stories></app-stories>\n</ng-container>\n\n<feed-publication [settings]=\"settings\" [hideFilterByMe]=\"true\" [announce]=\"false\" (feedCreated)=\"feed?.onNewFeed($event)\"></feed-publication>\n\n<div *ngIf=\"settings?.tabs\" class=\"asap-tab-feed\">\n <mat-tab-group (selectedTabChange)=\"onChangeTab($event)\" dynamicHeight>\n \n <!-- \u2705 SE o cliente tem canal -->\n <ng-container *ngIf=\"settings.tabs.channel_list?.length; else semCanal\">\n <mat-tab [label]=\"settings.tabs.channel\">\n <ng-container *ngIf=\"canShow == 0\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.allFeed\" [label]=\"settings.tabs.allFeed\">\n <ng-container *ngIf=\"canShow == 3\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed\" [label]=\"settings.tabs.feed\">\n <ng-container *ngIf=\"canShow == 1\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed_users\" [label]=\"settings.tabs.feed_users\">\n <ng-container *ngIf=\"canShow == 2\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n </ng-container>\n \n <!-- \uD83D\uDEAB SE o cliente N\u00C3O tem canal -->\n <ng-template #semCanal>\n <mat-tab *ngIf=\"settings.tabs.allFeed\" [label]=\"settings.tabs.allFeed\">\n <ng-container *ngIf=\"canShow == 3\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed\" [label]=\"settings.tabs.feed\">\n <ng-container *ngIf=\"canShow == 1\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed_users\" [label]=\"settings.tabs.feed_users\">\n <ng-container *ngIf=\"canShow == 2\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n </ng-template>\n </mat-tab-group>\n </div>\n ",
1187
+ template: "<ng-container *ngIf=\"!settings?.channelsHidden\">\n <app-stories></app-stories>\n</ng-container>\n\n<feed-publication\n [settings]=\"settings\"\n [hideFilterByMe]=\"true\"\n [announce]=\"false\"\n (feedCreated)=\"onNewFeed($event)\">\n</feed-publication>\n\n<div *ngIf=\"settings?.tabs\" class=\"asap-tab-feed\">\n <mat-tab-group (selectedTabChange)=\"onChangeTab($event)\" dynamicHeight>\n \n <!-- \u2705 SE o cliente tem canal -->\n <ng-container *ngIf=\"settings.tabs.channel_list?.length; else semCanal\">\n <mat-tab [label]=\"settings.tabs.channel\">\n <ng-container *ngIf=\"canShow == 0\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.allFeed\" [label]=\"settings.tabs.allFeed\">\n <ng-container *ngIf=\"canShow == 3\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed\" [label]=\"settings.tabs.feed\">\n <ng-container *ngIf=\"canShow == 1\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed_users\" [label]=\"settings.tabs.feed_users\">\n <ng-container *ngIf=\"canShow == 2\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n </ng-container>\n \n <!-- \uD83D\uDEAB SE o cliente N\u00C3O tem canal -->\n <ng-template #semCanal>\n <mat-tab *ngIf=\"settings.tabs.allFeed\" [label]=\"settings.tabs.allFeed\">\n <ng-container *ngIf=\"canShow == 3\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed\" [label]=\"settings.tabs.feed\">\n <ng-container *ngIf=\"canShow == 1\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n \n <mat-tab *ngIf=\"settings.tabs.feed_users\" [label]=\"settings.tabs.feed_users\">\n <ng-container *ngIf=\"canShow == 2\">\n <asap-feed-beta [settings]=\"settings\"></asap-feed-beta>\n </ng-container>\n </mat-tab>\n </ng-template>\n </mat-tab-group>\n </div>\n ",
1167
1188
  styles: [""]
1168
1189
  }] }
1169
1190
  ];
@@ -1173,14 +1194,14 @@
1173
1194
  { type: AsapFeedBetaService }
1174
1195
  ]; };
1175
1196
  AsapTabFeedComponent.propDecorators = {
1176
- feed: [{ type: core.ViewChild, args: ['feed', { static: false },] }],
1197
+ feeds: [{ type: core.ViewChildren, args: [AsapFeedBetaComponent,] }],
1177
1198
  settings: [{ type: core.Input }]
1178
1199
  };
1179
1200
  return AsapTabFeedComponent;
1180
1201
  }());
1181
1202
  if (false) {
1182
1203
  /** @type {?} */
1183
- AsapTabFeedComponent.prototype.feed;
1204
+ AsapTabFeedComponent.prototype.feeds;
1184
1205
  /** @type {?} */
1185
1206
  AsapTabFeedComponent.prototype.settings;
1186
1207
  /** @type {?} */
@@ -7200,7 +7221,6 @@
7200
7221
  * Generated from: lib/asap-feed-beta.module.ts
7201
7222
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7202
7223
  */
7203
- // import { NgAisModule } from 'angular-instantsearch';
7204
7224
  var AsapFeedBetaModule = /** @class */ (function () {
7205
7225
  function AsapFeedBetaModule(global) {
7206
7226
  var _this = this;