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.
- package/asap-feed-beta.metadata.json +1 -1
- package/bundles/asap-feed-beta.umd.js +32 -12
- package/bundles/asap-feed-beta.umd.js.map +1 -1
- package/bundles/asap-feed-beta.umd.min.js +1 -1
- package/bundles/asap-feed-beta.umd.min.js.map +1 -1
- package/esm2015/lib/asap-feed-beta.component.js +11 -8
- package/esm2015/lib/asap-feed-beta.module.js +1 -2
- package/esm2015/lib/tab-feed/asap-tab-feed.component.js +20 -6
- package/esm5/lib/asap-feed-beta.component.js +15 -8
- package/esm5/lib/asap-feed-beta.module.js +1 -2
- package/esm5/lib/tab-feed/asap-tab-feed.component.js +20 -6
- package/fesm2015/asap-feed-beta.js +29 -13
- package/fesm2015/asap-feed-beta.js.map +1 -1
- package/fesm5/asap-feed-beta.js +33 -13
- package/fesm5/asap-feed-beta.js.map +1 -1
- package/lib/asap-feed-beta.component.d.ts +1 -0
- package/lib/tab-feed/asap-tab-feed.component.d.ts +2 -2
- package/package.json +1 -1
package/fesm5/asap-feed-beta.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Injectable, ɵɵdefineInjectable, ɵɵinject, Component, Input, HostListener,
|
|
1
|
+
import { Injectable, ɵɵdefineInjectable, ɵɵinject, Component, Input, HostListener, ViewChildren, Inject, EventEmitter, Output, ViewChild, ElementRef, Pipe, NgModule } from '@angular/core';
|
|
2
2
|
import { __values, __spread, __awaiter, __generator, __extends, __assign } from 'tslib';
|
|
3
3
|
import { HttpClient, HttpRequest, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
4
4
|
import { AngularFirestore } from '@angular/fire/firestore';
|
|
@@ -387,13 +387,11 @@ var AsapFeedBetaComponent = /** @class */ (function () {
|
|
|
387
387
|
this.publication = this.controlService.publication;
|
|
388
388
|
this.query = this.controlService.query;
|
|
389
389
|
}
|
|
390
|
-
console.log('Query ->', this.query);
|
|
391
390
|
this.route.params.subscribe((/**
|
|
392
391
|
* @param {?} param
|
|
393
392
|
* @return {?}
|
|
394
393
|
*/
|
|
395
394
|
function (param) {
|
|
396
|
-
console.log('Params ->', param);
|
|
397
395
|
if (param) {
|
|
398
396
|
if (param.feed_id) {
|
|
399
397
|
_this.feedID = param.feed_id;
|
|
@@ -451,7 +449,6 @@ var AsapFeedBetaComponent = /** @class */ (function () {
|
|
|
451
449
|
function (feed_id) {
|
|
452
450
|
var _this = this;
|
|
453
451
|
if (feed_id === void 0) { feed_id = ''; }
|
|
454
|
-
console.log('[getFeed] Query', this.query, this.filterByMe);
|
|
455
452
|
this.feeds = null;
|
|
456
453
|
this.loading = true;
|
|
457
454
|
this.feedService.getFeed(feed_id, this.global.loggedUser(), this.query, this.filterByMe).subscribe((/**
|
|
@@ -460,7 +457,6 @@ var AsapFeedBetaComponent = /** @class */ (function () {
|
|
|
460
457
|
*/
|
|
461
458
|
function (response) {
|
|
462
459
|
_this.feeds = response.data;
|
|
463
|
-
console.log('Feeds', _this.feeds);
|
|
464
460
|
_this.paginate = response.pagination;
|
|
465
461
|
_this.loading = false;
|
|
466
462
|
_this.hasFeed = (_this.feeds.length > 0);
|
|
@@ -474,7 +470,6 @@ var AsapFeedBetaComponent = /** @class */ (function () {
|
|
|
474
470
|
*/
|
|
475
471
|
function () {
|
|
476
472
|
var _this = this;
|
|
477
|
-
console.log('[getMore]', this.paginate.next_document);
|
|
478
473
|
if (this.paginate.next_document) {
|
|
479
474
|
this.loading = true;
|
|
480
475
|
this.feedService.getMoreFeed(5, this.paginate.next_document, this.global.loggedUser(), this.query, this.filterByMe).subscribe((/**
|
|
@@ -482,7 +477,6 @@ var AsapFeedBetaComponent = /** @class */ (function () {
|
|
|
482
477
|
* @return {?}
|
|
483
478
|
*/
|
|
484
479
|
function (response) {
|
|
485
|
-
console.log('[getMore] Got: ', response);
|
|
486
480
|
response.data.map((/**
|
|
487
481
|
* @param {?} item
|
|
488
482
|
* @return {?}
|
|
@@ -736,10 +730,23 @@ var AsapFeedBetaComponent = /** @class */ (function () {
|
|
|
736
730
|
this.filterByMe = filterByMe;
|
|
737
731
|
this.getFeed();
|
|
738
732
|
};
|
|
733
|
+
Object.defineProperty(AsapFeedBetaComponent.prototype, "isScrollDisabled", {
|
|
734
|
+
get: /**
|
|
735
|
+
* @return {?}
|
|
736
|
+
*/
|
|
737
|
+
function () {
|
|
738
|
+
return this.loading ||
|
|
739
|
+
this.paginate.count >= this.paginate.limit ||
|
|
740
|
+
this.isSinglePost ||
|
|
741
|
+
this.paginate.last_document === this.paginate.next_document;
|
|
742
|
+
},
|
|
743
|
+
enumerable: true,
|
|
744
|
+
configurable: true
|
|
745
|
+
});
|
|
739
746
|
AsapFeedBetaComponent.decorators = [
|
|
740
747
|
{ type: Component, args: [{
|
|
741
748
|
selector: 'asap-feed-beta',
|
|
742
|
-
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]=\"\
|
|
749
|
+
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",
|
|
743
750
|
styles: ['./asap-feed.beta.componente.scss']
|
|
744
751
|
}] }
|
|
745
752
|
];
|
|
@@ -927,7 +934,11 @@ var AsapTabFeedComponent = /** @class */ (function () {
|
|
|
927
934
|
* @return {?}
|
|
928
935
|
*/
|
|
929
936
|
function () {
|
|
930
|
-
_this.service.query = {
|
|
937
|
+
_this.service.query = {
|
|
938
|
+
searchBy: 'user_info.id',
|
|
939
|
+
searchValue: _this.global.loggedUser().id,
|
|
940
|
+
typeValue: 'number'
|
|
941
|
+
};
|
|
931
942
|
_this.canShow = 3;
|
|
932
943
|
}), 100);
|
|
933
944
|
}
|
|
@@ -941,11 +952,21 @@ var AsapTabFeedComponent = /** @class */ (function () {
|
|
|
941
952
|
* @return {?}
|
|
942
953
|
*/
|
|
943
954
|
function (id) {
|
|
955
|
+
console.log('Chegou evento feedCreated com ID:', id);
|
|
956
|
+
if (this.feeds) {
|
|
957
|
+
this.feeds.forEach((/**
|
|
958
|
+
* @param {?} feed
|
|
959
|
+
* @return {?}
|
|
960
|
+
*/
|
|
961
|
+
function (feed) {
|
|
962
|
+
feed.getFeed();
|
|
963
|
+
}));
|
|
964
|
+
}
|
|
944
965
|
};
|
|
945
966
|
AsapTabFeedComponent.decorators = [
|
|
946
967
|
{ type: Component, args: [{
|
|
947
968
|
selector: 'asap-tab-feed',
|
|
948
|
-
template: "<ng-container *ngIf=\"!settings?.channelsHidden\">\n <app-stories></app-stories>\n</ng-container>\n\n<feed-publication
|
|
969
|
+
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 ",
|
|
949
970
|
styles: [""]
|
|
950
971
|
}] }
|
|
951
972
|
];
|
|
@@ -955,14 +976,14 @@ var AsapTabFeedComponent = /** @class */ (function () {
|
|
|
955
976
|
{ type: AsapFeedBetaService }
|
|
956
977
|
]; };
|
|
957
978
|
AsapTabFeedComponent.propDecorators = {
|
|
958
|
-
|
|
979
|
+
feeds: [{ type: ViewChildren, args: [AsapFeedBetaComponent,] }],
|
|
959
980
|
settings: [{ type: Input }]
|
|
960
981
|
};
|
|
961
982
|
return AsapTabFeedComponent;
|
|
962
983
|
}());
|
|
963
984
|
if (false) {
|
|
964
985
|
/** @type {?} */
|
|
965
|
-
AsapTabFeedComponent.prototype.
|
|
986
|
+
AsapTabFeedComponent.prototype.feeds;
|
|
966
987
|
/** @type {?} */
|
|
967
988
|
AsapTabFeedComponent.prototype.settings;
|
|
968
989
|
/** @type {?} */
|
|
@@ -6982,7 +7003,6 @@ if (false) {
|
|
|
6982
7003
|
* Generated from: lib/asap-feed-beta.module.ts
|
|
6983
7004
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
6984
7005
|
*/
|
|
6985
|
-
// import { NgAisModule } from 'angular-instantsearch';
|
|
6986
7006
|
var AsapFeedBetaModule = /** @class */ (function () {
|
|
6987
7007
|
function AsapFeedBetaModule(global) {
|
|
6988
7008
|
var _this = this;
|