@rtsee/ngx 0.0.75 → 0.0.77
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/dist/ngx/fesm2022/rtsee-ngx.mjs +312 -35
- package/dist/ngx/fesm2022/rtsee-ngx.mjs.map +1 -1
- package/dist/ngx/index.d.ts +39 -8
- package/dist/ngx/src/lib/theme/containers/shell.scss +69 -10
- package/dist/ngx/src/lib/theme/messenger/chat.scss +28 -1
- package/dist/ngx/src/lib/theme/messenger/message.scss +12 -19
- package/dist/ngx/src/lib/theme/messenger/messages-list.scss +113 -5
- package/dist/ngx/src/lib/theme/messenger/messenger.scss +7 -2
- package/dist/ngx/src/lib/theme/presentation/index.scss +1 -0
- package/dist/ngx/src/lib/theme/presentation/join-call.scss +0 -1
- package/dist/ngx/src/lib/theme/presentation/presentation.scss +8 -0
- package/dist/ngx/src/lib/theme/presentation/settings.scss +0 -1
- package/dist/ngx/src/lib/theme/presentation/slide.scss +11 -0
- package/dist/ngx/src/lib/theme/presentation/story-details.scss +73 -0
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Input, Component, ViewChild, Directive, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Input, Component, ViewChild, Directive, DOCUMENT, HostListener, Inject, EventEmitter, Output, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/common';
|
|
4
4
|
import { NgClass, NgIf, NgForOf, SlicePipe, NgStyle, NgOptimizedImage, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
@@ -8,12 +8,12 @@ import { Select } from 'primeng/select';
|
|
|
8
8
|
import { FloatLabel } from 'primeng/floatlabel';
|
|
9
9
|
import * as i4 from 'primeng/button';
|
|
10
10
|
import { Button, ButtonModule } from 'primeng/button';
|
|
11
|
-
import { interval, tap } from 'rxjs';
|
|
11
|
+
import { interval, tap, filter } from 'rxjs';
|
|
12
12
|
import * as i2$2 from 'primeng/message';
|
|
13
13
|
import { Message, MessageModule } from 'primeng/message';
|
|
14
14
|
import { AuthEndpointsKeys, DEFAULT_ROUTE_NAMES } from '@rtsee/auth';
|
|
15
15
|
import * as i2 from '@angular/router';
|
|
16
|
-
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
16
|
+
import { RouterLink, RouterLinkActive, NavigationEnd } from '@angular/router';
|
|
17
17
|
import * as i1$1 from '@angular/common/http';
|
|
18
18
|
import { InfiniteScrollDirective, InfiniteScrollModule } from 'ngx-infinite-scroll';
|
|
19
19
|
import { RTSeeChatTypes } from '@rtsee/common';
|
|
@@ -37,6 +37,7 @@ import * as i1$3 from 'primeng/autocomplete';
|
|
|
37
37
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
38
38
|
import { OrderList } from 'primeng/orderlist';
|
|
39
39
|
import { Divider } from 'primeng/divider';
|
|
40
|
+
import { ToggleSwitch } from 'primeng/toggleswitch';
|
|
40
41
|
import { Tabs, TabList, Tab, TabPanels, TabPanel } from 'primeng/tabs';
|
|
41
42
|
import { ColorPicker } from 'primeng/colorpicker';
|
|
42
43
|
import { Slider } from 'primeng/slider';
|
|
@@ -497,7 +498,8 @@ const COMMON_CONSTANTS = {
|
|
|
497
498
|
customDateFormat: 'dd/MM/YYYY',
|
|
498
499
|
customDateFormatDaysJs: 'DD/MM/YYYY',
|
|
499
500
|
customDateTimeFormat: 'dd/MM/YYYY HH:mm',
|
|
500
|
-
defaultProfileImgUrl: 'https://werf.co/assets/images/default-profile.png'
|
|
501
|
+
defaultProfileImgUrl: 'https://werf.co/assets/images/default-profile.png',
|
|
502
|
+
mobileBreakpoint: 800
|
|
501
503
|
};
|
|
502
504
|
|
|
503
505
|
class ChatThumbnailComponent {
|
|
@@ -637,7 +639,7 @@ class MessageComponent {
|
|
|
637
639
|
/* eslint-enable */
|
|
638
640
|
}
|
|
639
641
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessageComponent, deps: [{ token: MessageWidgetsService }, { token: i0.ComponentFactoryResolver }, { token: TimeFormatHelperService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
640
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessageComponent, isStandalone: true, selector: "rtsee-message", inputs: { chat: "chat", message: "message", member: "member", messenger: "messenger" }, viewQueries: [{ propertyName: "widgetHost", first: true, predicate: WidgetDirective, descendants: true }], ngImport: i0, template: "<div class=\"rtsee-messenger-message-container\" #rtsMessageContainer\n [ngClass]=\"{'rtsee-message-from-me': message.from.id === messenger.clientId}\"\n>\n <div class=\"rtsee-messenger-message\">\n @if (message.widget) {\n <ng-template widgetHost></ng-template>\n }\n @if (!message.widget) {\n <p class=\"rtsee-messenger-message-text\"\n >{{ message.text }}</p>\n }\n <div class=\"rtsee-messenger-message-info\" #rtsMessageInfo>\n <rtsee-message-time-and-status [message]=\"message\"\n [inChat]=\"true\"\n [hideStatus]=\"message.from.id !== messenger.clientId\"\n ></rtsee-message-time-and-status>\n </div>\n </div>\n
|
|
642
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessageComponent, isStandalone: true, selector: "rtsee-message", inputs: { chat: "chat", message: "message", member: "member", messenger: "messenger" }, viewQueries: [{ propertyName: "widgetHost", first: true, predicate: WidgetDirective, descendants: true }], ngImport: i0, template: "<div class=\"rtsee-messenger-message-container\" #rtsMessageContainer\n [ngClass]=\"{'rtsee-message-from-me': message.from.id === messenger.clientId}\"\n>\n <div class=\"rtsee-messenger-message\">\n @if (message.widget) {\n <ng-template widgetHost></ng-template>\n }\n @if (!message.widget) {\n <p class=\"rtsee-messenger-message-text\"\n >{{ message.text }}</p>\n }\n <div class=\"rtsee-messenger-message-info\" #rtsMessageInfo>\n <rtsee-message-time-and-status [message]=\"message\"\n [inChat]=\"true\"\n [hideStatus]=\"message.from.id !== messenger.clientId\"\n ></rtsee-message-time-and-status>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MessageTimeAndStatusComponent, selector: "rtsee-message-time-and-status", inputs: ["message", "hideStatus", "inChat"] }, { kind: "directive", type: WidgetDirective, selector: "[widgetHost]" }] }); }
|
|
641
643
|
}
|
|
642
644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessageComponent, decorators: [{
|
|
643
645
|
type: Component,
|
|
@@ -645,7 +647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
645
647
|
NgClass,
|
|
646
648
|
MessageTimeAndStatusComponent,
|
|
647
649
|
WidgetDirective
|
|
648
|
-
], standalone: true, template: "<div class=\"rtsee-messenger-message-container\" #rtsMessageContainer\n [ngClass]=\"{'rtsee-message-from-me': message.from.id === messenger.clientId}\"\n>\n <div class=\"rtsee-messenger-message\">\n @if (message.widget) {\n <ng-template widgetHost></ng-template>\n }\n @if (!message.widget) {\n <p class=\"rtsee-messenger-message-text\"\n >{{ message.text }}</p>\n }\n <div class=\"rtsee-messenger-message-info\" #rtsMessageInfo>\n <rtsee-message-time-and-status [message]=\"message\"\n [inChat]=\"true\"\n [hideStatus]=\"message.from.id !== messenger.clientId\"\n ></rtsee-message-time-and-status>\n </div>\n </div>\n
|
|
650
|
+
], standalone: true, template: "<div class=\"rtsee-messenger-message-container\" #rtsMessageContainer\n [ngClass]=\"{'rtsee-message-from-me': message.from.id === messenger.clientId}\"\n>\n <div class=\"rtsee-messenger-message\">\n @if (message.widget) {\n <ng-template widgetHost></ng-template>\n }\n @if (!message.widget) {\n <p class=\"rtsee-messenger-message-text\"\n >{{ message.text }}</p>\n }\n <div class=\"rtsee-messenger-message-info\" #rtsMessageInfo>\n <rtsee-message-time-and-status [message]=\"message\"\n [inChat]=\"true\"\n [hideStatus]=\"message.from.id !== messenger.clientId\"\n ></rtsee-message-time-and-status>\n </div>\n </div>\n</div>\n" }]
|
|
649
651
|
}], ctorParameters: () => [{ type: MessageWidgetsService }, { type: i0.ComponentFactoryResolver }, { type: TimeFormatHelperService }], propDecorators: { chat: [{
|
|
650
652
|
type: Input
|
|
651
653
|
}], message: [{
|
|
@@ -660,16 +662,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
660
662
|
}] } });
|
|
661
663
|
|
|
662
664
|
class MessagesListComponent {
|
|
663
|
-
constructor(timeFormatService, scroller) {
|
|
665
|
+
constructor(timeFormatService, scroller, document) {
|
|
664
666
|
this.timeFormatService = timeFormatService;
|
|
665
667
|
this.scroller = scroller;
|
|
668
|
+
this.document = document;
|
|
669
|
+
this.messagesGroups = [];
|
|
670
|
+
this.firstGroupedMessage = null;
|
|
671
|
+
this.lastGroupedMessage = null;
|
|
672
|
+
this.RTSeeChatTypes = RTSeeChatTypes;
|
|
666
673
|
this.bindScrollFunction = this.scrollToBottom.bind(this);
|
|
674
|
+
this.bindedGroupFunction = this.groupMessages.bind(this);
|
|
675
|
+
}
|
|
676
|
+
onWindowScroll(event) {
|
|
677
|
+
// Get the vertical scroll position
|
|
678
|
+
const verticalOffset = window.pageYOffset || this.document.documentElement.scrollTop || this.document.body.scrollTop || 0;
|
|
679
|
+
if (window.innerWidth >= COMMON_CONSTANTS.mobileBreakpoint) {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
// You can add logic here, e.g., show a 'scroll to top' button
|
|
683
|
+
if (verticalOffset < 300) {
|
|
684
|
+
// Logic to show button
|
|
685
|
+
console.log('scrolled to top');
|
|
686
|
+
this.onScrolledToTop();
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
console.log('scrolled to bottom');
|
|
690
|
+
// Logic to hide button
|
|
691
|
+
}
|
|
667
692
|
}
|
|
668
693
|
ngOnInit() {
|
|
694
|
+
this.chat.on(RTSeeChatEvents.MESSAGES_LIST_CHANGED, this.bindedGroupFunction);
|
|
669
695
|
this.chat.on(RTSeeChatEvents.MESSAGE_ADDED, this.bindScrollFunction);
|
|
696
|
+
this.groupMessages();
|
|
670
697
|
}
|
|
671
698
|
ngAfterViewInit() {
|
|
672
|
-
|
|
699
|
+
if (this.chat.isStandalone) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
673
702
|
this.scrollToBottom();
|
|
674
703
|
}
|
|
675
704
|
onMessageSent() {
|
|
@@ -677,6 +706,7 @@ class MessagesListComponent {
|
|
|
677
706
|
}
|
|
678
707
|
ngOnDestroy() {
|
|
679
708
|
this.chat.off(RTSeeChatEvents.MESSAGE_ADDED, this.bindScrollFunction);
|
|
709
|
+
this.chat.off(RTSeeChatEvents.MESSAGES_LIST_CHANGED, this.bindedGroupFunction);
|
|
680
710
|
}
|
|
681
711
|
onScrolledToTop() {
|
|
682
712
|
console.log('scrolledToTop');
|
|
@@ -696,8 +726,13 @@ class MessagesListComponent {
|
|
|
696
726
|
this.chat.loadRemoteMessages('front');
|
|
697
727
|
}
|
|
698
728
|
scrollToBottom() {
|
|
729
|
+
if (this.chat.isStandalone) {
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
699
732
|
setTimeout(() => {
|
|
700
|
-
|
|
733
|
+
if (window.innerWidth < COMMON_CONSTANTS.mobileBreakpoint) {
|
|
734
|
+
this.scroller.scrollToPosition([0, document.body.scrollHeight]);
|
|
735
|
+
}
|
|
701
736
|
if (!this.scrollContainer?.nativeElement?.scrollHeight) {
|
|
702
737
|
console.log('scrollToBottom early return');
|
|
703
738
|
return;
|
|
@@ -714,23 +749,147 @@ class MessagesListComponent {
|
|
|
714
749
|
formatDate(message) {
|
|
715
750
|
return this.timeFormatService.formatDate(message.createdAt);
|
|
716
751
|
}
|
|
717
|
-
|
|
718
|
-
|
|
752
|
+
groupMessages() {
|
|
753
|
+
if (!this.chat || !this.chat.messages.length) {
|
|
754
|
+
this.messagesGroups.length = 0;
|
|
755
|
+
}
|
|
756
|
+
if (!this.firstGroupedMessage || !this.lastGroupedMessage) {
|
|
757
|
+
this.performGrouping();
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
if (this.areForwardMessagesAdded()) {
|
|
761
|
+
this.performGrouping(this.chat.messages.indexOf(this.lastGroupedMessage) + 1);
|
|
762
|
+
}
|
|
763
|
+
if (this.areBackwardMessagesAdded()) {
|
|
764
|
+
console.log('backward added', this.chat.messages);
|
|
765
|
+
this.performGrouping(0, this.chat.messages.indexOf(this.firstGroupedMessage) - 1, true);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
this.saveFirstAndLastGroupedMessages();
|
|
769
|
+
}
|
|
770
|
+
performGrouping(startIndex, endIndex, prepend) {
|
|
771
|
+
const processedGroups = [];
|
|
772
|
+
let lastSenderId = null;
|
|
773
|
+
let currentGroup = null;
|
|
774
|
+
const startFrom = startIndex || 0;
|
|
775
|
+
for (let i = startFrom; i < (endIndex || this.chat.messages.length); i++) {
|
|
776
|
+
const message = this.chat.messages[i];
|
|
777
|
+
if (message.from.id === lastSenderId && currentGroup) {
|
|
778
|
+
currentGroup.messages.push(message);
|
|
779
|
+
}
|
|
780
|
+
else {
|
|
781
|
+
lastSenderId = message.from.id;
|
|
782
|
+
if (currentGroup) {
|
|
783
|
+
processedGroups.push(currentGroup);
|
|
784
|
+
}
|
|
785
|
+
if (!message.id && !message.temporaryId) {
|
|
786
|
+
throw new Error('Either m.id or m.temporary id is required');
|
|
787
|
+
}
|
|
788
|
+
const isFromMe = message.from.id === this.messenger.clientId;
|
|
789
|
+
const isSenderVisible = (this.chat.type !== RTSeeChatTypes.INDIVIDUAL && !isFromMe)
|
|
790
|
+
|| this.chat.type === RTSeeChatTypes.COMMENTS
|
|
791
|
+
|| this.chat.type === RTSeeChatTypes.RATINGS;
|
|
792
|
+
currentGroup = {
|
|
793
|
+
id: message.id || message.temporaryId,
|
|
794
|
+
sender: message.from,
|
|
795
|
+
senderVisible: isSenderVisible,
|
|
796
|
+
messages: [message]
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
if (currentGroup) {
|
|
801
|
+
processedGroups.push(currentGroup);
|
|
802
|
+
}
|
|
803
|
+
if (prepend) {
|
|
804
|
+
this.stitchGroups(processedGroups, true);
|
|
805
|
+
}
|
|
806
|
+
else {
|
|
807
|
+
this.stitchGroups(processedGroups);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
stitchGroups(newGroups, prepend) {
|
|
811
|
+
if (!newGroups.length) {
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
if (!this.messagesGroups.length) {
|
|
815
|
+
this.messagesGroups.push(...newGroups);
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
if (prepend) {
|
|
819
|
+
const lastOfNewGroups = newGroups[newGroups.length - 1];
|
|
820
|
+
const firstOfExistingGroups = this.messagesGroups[0];
|
|
821
|
+
if (lastOfNewGroups.sender.id === firstOfExistingGroups.sender.id) {
|
|
822
|
+
firstOfExistingGroups.messages.unshift(...lastOfNewGroups.messages);
|
|
823
|
+
newGroups.splice(newGroups.length - 1, 1);
|
|
824
|
+
}
|
|
825
|
+
this.messagesGroups.unshift(...newGroups);
|
|
826
|
+
}
|
|
827
|
+
else {
|
|
828
|
+
const firstOfNewGroups = newGroups[0];
|
|
829
|
+
const lastOfExistingGroups = this.messagesGroups[this.messagesGroups.length - 1];
|
|
830
|
+
if (firstOfNewGroups.sender.id === lastOfExistingGroups.sender.id) {
|
|
831
|
+
lastOfExistingGroups.messages.push(...firstOfNewGroups.messages);
|
|
832
|
+
newGroups.splice(0, 1);
|
|
833
|
+
}
|
|
834
|
+
this.messagesGroups.push(...newGroups);
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
areForwardMessagesAdded() {
|
|
838
|
+
console.log('last grouped present', this.lastGroupedMessage);
|
|
839
|
+
if (!this.lastGroupedMessage) {
|
|
840
|
+
return false;
|
|
841
|
+
}
|
|
842
|
+
const index = this.chat.messages.indexOf(this.lastGroupedMessage);
|
|
843
|
+
return index !== -1 && index < this.chat.messages.length - 1;
|
|
844
|
+
}
|
|
845
|
+
areBackwardMessagesAdded() {
|
|
846
|
+
console.log('first grouped present', this.firstGroupedMessage);
|
|
847
|
+
if (!this.firstGroupedMessage) {
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
const index = this.chat.messages.indexOf(this.firstGroupedMessage);
|
|
851
|
+
console.log('outcome', index !== -1 && index > 0);
|
|
852
|
+
return index !== -1 && index > 0;
|
|
853
|
+
}
|
|
854
|
+
saveFirstAndLastGroupedMessages() {
|
|
855
|
+
const firstAndLast = this.getFirstAndLastMessage();
|
|
856
|
+
if (!firstAndLast) {
|
|
857
|
+
this.firstGroupedMessage = null;
|
|
858
|
+
this.lastGroupedMessage = null;
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
this.firstGroupedMessage = firstAndLast[0];
|
|
862
|
+
this.lastGroupedMessage = firstAndLast[1];
|
|
863
|
+
}
|
|
864
|
+
getFirstAndLastMessage() {
|
|
865
|
+
if (!this.chat.messages.length) {
|
|
866
|
+
return null;
|
|
867
|
+
}
|
|
868
|
+
return [this.chat.messages[0], this.chat.messages[this.chat.messages.length - 1]];
|
|
869
|
+
}
|
|
870
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessagesListComponent, deps: [{ token: TimeFormatHelperService }, { token: i2$1.ViewportScroller }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
871
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessagesListComponent, isStandalone: true, selector: "rtsee-messages-list", inputs: { chat: "chat", messenger: "messenger" }, host: { listeners: { "window:scroll": "onWindowScroll($event)" } }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollBlock"], descendants: true }], ngImport: i0, template: "<div class=\"rtsee-messenger-messages-list\"\n #scrollBlock\n infiniteScroll\n [infiniteScrollUpDistance]=\"2\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [scrollWindow]=\"false\"\n (scrolledUp)=\"onScrolledToTop()\"\n (scroll)=\"onScroll()\"\n [style.padding-bottom]=\"messenger.chatInputHeight + 'px'\"\n>\n @for (messageGroup of messagesGroups; track messageGroup.id) {\n <div class=\"rtsee-messenger-message-wrapper\" [ngClass]=\"{\n 'rtsee-messenger-message-wrapper-with-sender': messageGroup.senderVisible\n }\">\n <div class=\"rtsee-messenger-message-inset\">\n <img [src]=\"messageGroup.sender.imageUrl\"\n class=\"rtsee-messenger-message-sender-image\"\n >\n </div>\n\n <div class=\"rtsee-messenger-message-sender-name\">\n <p>{{messageGroup.sender.name}}</p>\n </div>\n\n @for (message of messageGroup.messages; track message.id) {\n <rtsee-message [message]=\"message\"\n [messenger]=\"messenger\"\n [chat]=\"chat\"\n ></rtsee-message>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: MessageComponent, selector: "rtsee-message", inputs: ["chat", "message", "member", "messenger"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
719
872
|
}
|
|
720
873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessagesListComponent, decorators: [{
|
|
721
874
|
type: Component,
|
|
722
875
|
args: [{ selector: 'rtsee-messages-list', imports: [
|
|
723
876
|
InfiniteScrollDirective,
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
], standalone: true, template: "<div class=\"rtsee-messenger-messages-list\"\n #scrollBlock\n infiniteScroll\n [infiniteScrollUpDistance]=\"2\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [scrollWindow]=\"
|
|
727
|
-
}], ctorParameters: () => [{ type: TimeFormatHelperService }, { type: i2$1.ViewportScroller }
|
|
877
|
+
MessageComponent,
|
|
878
|
+
NgClass
|
|
879
|
+
], standalone: true, template: "<div class=\"rtsee-messenger-messages-list\"\n #scrollBlock\n infiniteScroll\n [infiniteScrollUpDistance]=\"2\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [scrollWindow]=\"false\"\n (scrolledUp)=\"onScrolledToTop()\"\n (scroll)=\"onScroll()\"\n [style.padding-bottom]=\"messenger.chatInputHeight + 'px'\"\n>\n @for (messageGroup of messagesGroups; track messageGroup.id) {\n <div class=\"rtsee-messenger-message-wrapper\" [ngClass]=\"{\n 'rtsee-messenger-message-wrapper-with-sender': messageGroup.senderVisible\n }\">\n <div class=\"rtsee-messenger-message-inset\">\n <img [src]=\"messageGroup.sender.imageUrl\"\n class=\"rtsee-messenger-message-sender-image\"\n >\n </div>\n\n <div class=\"rtsee-messenger-message-sender-name\">\n <p>{{messageGroup.sender.name}}</p>\n </div>\n\n @for (message of messageGroup.messages; track message.id) {\n <rtsee-message [message]=\"message\"\n [messenger]=\"messenger\"\n [chat]=\"chat\"\n ></rtsee-message>\n }\n </div>\n }\n</div>\n" }]
|
|
880
|
+
}], ctorParameters: () => [{ type: TimeFormatHelperService }, { type: i2$1.ViewportScroller }, { type: Document, decorators: [{
|
|
881
|
+
type: Inject,
|
|
882
|
+
args: [DOCUMENT]
|
|
883
|
+
}] }], propDecorators: { chat: [{
|
|
728
884
|
type: Input
|
|
729
885
|
}], messenger: [{
|
|
730
886
|
type: Input
|
|
731
887
|
}], scrollContainer: [{
|
|
732
888
|
type: ViewChild,
|
|
733
889
|
args: ['scrollBlock']
|
|
890
|
+
}], onWindowScroll: [{
|
|
891
|
+
type: HostListener,
|
|
892
|
+
args: ['window:scroll', ['$event']]
|
|
734
893
|
}] } });
|
|
735
894
|
|
|
736
895
|
class ChatInputComponent {
|
|
@@ -780,18 +939,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
780
939
|
args: ['chatInput']
|
|
781
940
|
}] } });
|
|
782
941
|
|
|
942
|
+
class ViewportObserverDirective {
|
|
943
|
+
constructor(element) {
|
|
944
|
+
this.element = element;
|
|
945
|
+
this.inViewport = new EventEmitter();
|
|
946
|
+
}
|
|
947
|
+
ngAfterViewInit() {
|
|
948
|
+
// Options for the observer: 0.2 means 20% of the element must be visible
|
|
949
|
+
// to trigger the callback
|
|
950
|
+
const options = {
|
|
951
|
+
root: null, // observing relative to the document's viewport
|
|
952
|
+
rootMargin: '0px',
|
|
953
|
+
threshold: 0
|
|
954
|
+
};
|
|
955
|
+
this.observer = new IntersectionObserver((entries) => {
|
|
956
|
+
entries.forEach(entry => {
|
|
957
|
+
// entry.isIntersecting is true if the element is in the viewport
|
|
958
|
+
this.inViewport.emit(entry.isIntersecting);
|
|
959
|
+
});
|
|
960
|
+
}, options);
|
|
961
|
+
this.observer.observe(this.element.nativeElement);
|
|
962
|
+
}
|
|
963
|
+
ngOnDestroy() {
|
|
964
|
+
if (this.observer) {
|
|
965
|
+
this.observer.disconnect();
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ViewportObserverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
969
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: ViewportObserverDirective, isStandalone: true, selector: "[rtseeViewportObserver]", outputs: { inViewport: "inViewport" }, ngImport: i0 }); }
|
|
970
|
+
}
|
|
971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ViewportObserverDirective, decorators: [{
|
|
972
|
+
type: Directive,
|
|
973
|
+
args: [{
|
|
974
|
+
selector: '[rtseeViewportObserver]',
|
|
975
|
+
standalone: true // Use `standalone: true` in modern Angular
|
|
976
|
+
}]
|
|
977
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { inViewport: [{
|
|
978
|
+
type: Output
|
|
979
|
+
}] } });
|
|
980
|
+
|
|
783
981
|
class ChatComponent {
|
|
982
|
+
onInViewPortChange(value) {
|
|
983
|
+
console.log('Received inViewPortChange', value);
|
|
984
|
+
this.chat.isInViewPort = value;
|
|
985
|
+
}
|
|
986
|
+
ngOnInit() {
|
|
987
|
+
if (!this.chat && !this.chatData) {
|
|
988
|
+
console.log(`Either chat ot chatData is required!`);
|
|
989
|
+
}
|
|
990
|
+
if (!this.chat && this.chatData) {
|
|
991
|
+
this.chat = this.messenger.addStandaloneChat(this.chatData);
|
|
992
|
+
this.chat.loadRemoteMessages('back');
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
ngOnDestroy() {
|
|
996
|
+
if (this.chat.isStandalone) {
|
|
997
|
+
this.messenger.removeStandaloneChat(this.chat.id);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
784
1000
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
785
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: ChatComponent, isStandalone: true, selector: "rtsee-chat", inputs: { chat: "chat", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-chat\">\n <div class=\"rtsee-chat-
|
|
1001
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: ChatComponent, isStandalone: true, selector: "rtsee-chat", inputs: { chat: "chat", chatData: "chatData", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-chat\"\n [ngClass]=\"{\n 'rtsee-chat-standalone': chat.isStandalone,\n 'rtsee-chat-in-viewport': chat.isInViewPort\n }\"\n rtseeViewportObserver\n (inViewport)=\"onInViewPortChange($event)\"\n>\n <div class=\"rtsee-chat-footer-container\">\n <div class=\"rtsee-chat-footer-container-inner\">\n <rtsee-chat-input [messenger]=\"messenger\" [chat]=\"chat\"></rtsee-chat-input>\n </div>\n </div>\n <div class=\"rtsee-chat-body-container\">\n <rtsee-messages-list [messenger]=\"messenger\" [chat]=\"chat\"></rtsee-messages-list>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: MessagesListComponent, selector: "rtsee-messages-list", inputs: ["chat", "messenger"] }, { kind: "component", type: ChatInputComponent, selector: "rtsee-chat-input", inputs: ["messenger", "chat"] }, { kind: "directive", type: ViewportObserverDirective, selector: "[rtseeViewportObserver]", outputs: ["inViewport"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
786
1002
|
}
|
|
787
1003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ChatComponent, decorators: [{
|
|
788
1004
|
type: Component,
|
|
789
1005
|
args: [{ selector: 'rtsee-chat', imports: [
|
|
790
1006
|
MessagesListComponent,
|
|
791
|
-
ChatInputComponent
|
|
792
|
-
|
|
1007
|
+
ChatInputComponent,
|
|
1008
|
+
ViewportObserverDirective,
|
|
1009
|
+
NgClass
|
|
1010
|
+
], standalone: true, template: "<div class=\"rtsee-chat\"\n [ngClass]=\"{\n 'rtsee-chat-standalone': chat.isStandalone,\n 'rtsee-chat-in-viewport': chat.isInViewPort\n }\"\n rtseeViewportObserver\n (inViewport)=\"onInViewPortChange($event)\"\n>\n <div class=\"rtsee-chat-footer-container\">\n <div class=\"rtsee-chat-footer-container-inner\">\n <rtsee-chat-input [messenger]=\"messenger\" [chat]=\"chat\"></rtsee-chat-input>\n </div>\n </div>\n <div class=\"rtsee-chat-body-container\">\n <rtsee-messages-list [messenger]=\"messenger\" [chat]=\"chat\"></rtsee-messages-list>\n </div>\n</div>\n" }]
|
|
793
1011
|
}], propDecorators: { chat: [{
|
|
794
1012
|
type: Input
|
|
1013
|
+
}], chatData: [{
|
|
1014
|
+
type: Input
|
|
795
1015
|
}], messenger: [{
|
|
796
1016
|
type: Input
|
|
797
1017
|
}] } });
|
|
@@ -802,7 +1022,7 @@ class MessengerComponent {
|
|
|
802
1022
|
this.messenger.loadChats();
|
|
803
1023
|
}
|
|
804
1024
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessengerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
805
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessengerComponent, isStandalone: true, selector: "rtsee-messenger", inputs: { messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-messenger\" [ngClass]=\"{\n 'rtsee-messenger-header-expanded': messenger.openedProfile || messenger.openedChatDetails,\n 'rtsee-messenger-folded': messenger.folded\n}\">\n <div class=\"rtsee-messenger-header-container\">\n <rtsee-messenger-header [messenger]=\"messenger\"\n ></rtsee-messenger-header>\n </div>\n <div class=\"rtsee-messenger-body-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [scrollWindow]=\"false\"\n (scrolled)=\"onScroll()\"\n >\n @if (messenger.openedChat) {\n <rtsee-chat [messenger]=\"messenger\" [chat]=\"messenger.openedChat\"></rtsee-chat>\n } @else if (!messenger.openedChat) {\n <rtsee-chats-list [chats]=\"messenger.chats\" [messenger]=\"messenger\"></rtsee-chats-list>\n } @else if (messenger.openedProfile) {\n <rtsee-profile></rtsee-profile>\n }\n @if (messenger.loadingChatsInProgress) {\n <rtsee-preloader [diameter]=\"50\" ></rtsee-preloader>\n }\n </div>\n</div>\n\n\n", dependencies: [{ kind: "component", type: MessengerHeaderComponent, selector: "rtsee-messenger-header", inputs: ["messenger"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ChatsListComponent, selector: "rtsee-chats-list", inputs: ["messenger", "chats"] }, { kind: "component", type: ChatComponent, selector: "rtsee-chat", inputs: ["chat", "messenger"] }, { kind: "component", type: PreloaderComponent, selector: "rtsee-preloader", inputs: ["diameter", "color"] }, { kind: "component", type: ProfileComponent, selector: "rtsee-profile", inputs: ["messenger", "peer"] }] }); }
|
|
1025
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessengerComponent, isStandalone: true, selector: "rtsee-messenger", inputs: { messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-messenger\" [ngClass]=\"{\n 'rtsee-messenger-header-expanded': messenger.openedProfile || messenger.openedChatDetails,\n 'rtsee-messenger-folded': messenger.folded\n}\">\n <div class=\"rtsee-messenger-header-container\">\n <rtsee-messenger-header [messenger]=\"messenger\"\n ></rtsee-messenger-header>\n </div>\n <div class=\"rtsee-messenger-body-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [scrollWindow]=\"false\"\n (scrolled)=\"onScroll()\"\n >\n @if (messenger.openedChat) {\n <rtsee-chat [messenger]=\"messenger\" [chat]=\"messenger.openedChat\"></rtsee-chat>\n } @else if (!messenger.openedChat) {\n <rtsee-chats-list [chats]=\"messenger.chats\" [messenger]=\"messenger\"></rtsee-chats-list>\n } @else if (messenger.openedProfile) {\n <rtsee-profile></rtsee-profile>\n }\n @if (messenger.loadingChatsInProgress) {\n <rtsee-preloader [diameter]=\"50\" ></rtsee-preloader>\n }\n </div>\n</div>\n\n\n", dependencies: [{ kind: "component", type: MessengerHeaderComponent, selector: "rtsee-messenger-header", inputs: ["messenger"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ChatsListComponent, selector: "rtsee-chats-list", inputs: ["messenger", "chats"] }, { kind: "component", type: ChatComponent, selector: "rtsee-chat", inputs: ["chat", "chatData", "messenger"] }, { kind: "component", type: PreloaderComponent, selector: "rtsee-preloader", inputs: ["diameter", "color"] }, { kind: "component", type: ProfileComponent, selector: "rtsee-profile", inputs: ["messenger", "peer"] }] }); }
|
|
806
1026
|
}
|
|
807
1027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessengerComponent, decorators: [{
|
|
808
1028
|
type: Component,
|
|
@@ -1323,7 +1543,9 @@ class ManageStoryComponent {
|
|
|
1323
1543
|
Validators.maxLength(244)
|
|
1324
1544
|
]
|
|
1325
1545
|
}),
|
|
1326
|
-
averageReadTime: this.formBuilder.control(0)
|
|
1546
|
+
averageReadTime: this.formBuilder.control(0),
|
|
1547
|
+
isPublished: this.formBuilder.control(false),
|
|
1548
|
+
isDiscussable: this.formBuilder.control(false)
|
|
1327
1549
|
});
|
|
1328
1550
|
}
|
|
1329
1551
|
submit() {
|
|
@@ -1332,6 +1554,8 @@ class ManageStoryComponent {
|
|
|
1332
1554
|
name: this.nameField.value,
|
|
1333
1555
|
description: this.descriptionField.value,
|
|
1334
1556
|
averageReadTime: this.averageReadTimeField.value,
|
|
1557
|
+
commentsEnabled: this.isDiscussableField.value,
|
|
1558
|
+
isPublished: this.isPublishedField.value
|
|
1335
1559
|
});
|
|
1336
1560
|
}
|
|
1337
1561
|
else {
|
|
@@ -1342,6 +1566,8 @@ class ManageStoryComponent {
|
|
|
1342
1566
|
this.nameField.setValue(this.manageStory.story.name);
|
|
1343
1567
|
this.descriptionField.setValue(this.manageStory.story.description || '');
|
|
1344
1568
|
this.averageReadTimeField.setValue(this.manageStory.story.averageReadTime || 0);
|
|
1569
|
+
this.isPublishedField.setValue(this.manageStory.story.isPublished || false);
|
|
1570
|
+
this.isDiscussableField.setValue(this.manageStory.story.commentsEnabled || false);
|
|
1345
1571
|
}
|
|
1346
1572
|
get nameField() {
|
|
1347
1573
|
return this.storyForm.get('name');
|
|
@@ -1352,6 +1578,12 @@ class ManageStoryComponent {
|
|
|
1352
1578
|
get averageReadTimeField() {
|
|
1353
1579
|
return this.storyForm.get('averageReadTime');
|
|
1354
1580
|
}
|
|
1581
|
+
get isPublishedField() {
|
|
1582
|
+
return this.storyForm.get('isPublished');
|
|
1583
|
+
}
|
|
1584
|
+
get isDiscussableField() {
|
|
1585
|
+
return this.storyForm.get('isDiscussable');
|
|
1586
|
+
}
|
|
1355
1587
|
disableFormFields() {
|
|
1356
1588
|
this.nameField.disable();
|
|
1357
1589
|
this.descriptionField.disable();
|
|
@@ -1363,7 +1595,7 @@ class ManageStoryComponent {
|
|
|
1363
1595
|
this.averageReadTimeField.disable();
|
|
1364
1596
|
}
|
|
1365
1597
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ManageStoryComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1366
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ManageStoryComponent, isStandalone: true, selector: "rtsee-manage-story", inputs: { manageStory: "manageStory" }, ngImport: i0, template: "<div class=\"rtsee-manage-story\">\n @if (!manageStory.manageSlides.selectedSlide) {\n <div class=\"rtsee-manage-story-info rtsee-form-container\">\n <div class=\"rtsee-manage-story-image\">\n <rtsee-image-uploader [imageUploader]=\"manageStory.imageUploader\"\n ></rtsee-image-uploader>\n </div>\n <form class=\"rtsee-story-form rtsee-form\"\n [formGroup]=\"storyForm\"\n (ngSubmit)=\"submit()\"\n >\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"sign-up-email\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <rtsee-autocomplete [config]=\"manageStory.categoriesMultiselect\"></rtsee-autocomplete>\n <rtsee-autocomplete [config]=\"manageStory.labelsMultiselect\"></rtsee-autocomplete>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-input-number [formControl]=\"averageReadTimeField\"\n id=\"rtsee-story-average-read-time\"\n mode=\"decimal\"\n [min]=\"2\"\n [max]=\"10000\"\n />\n <label for=\"rtsee-story-average-read-time\">Average Read Time</label>\n </p-floatlabel>\n </p-inputgroup>\n </div>\n <p-divider />\n <div class=\"rtsee-story-slides-wrapper\">\n <rtsee-manage-slides [manageSlides]=\"manageStory.manageSlides\"></rtsee-manage-slides>\n </div>\n <p-divider />\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageStory.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"manageStory.cancel()\"\n [disabled]=\"manageStory.saveInProgress\"\n />\n </form>\n </div>\n }\n @if (manageStory.manageSlides.selectedSlide) {\n <div class=\"rtsee-manage-story-slide-wrapper\">\n <rtsee-manage-slide [manageSlide]=\"manageStory.manageSlides.selectedSlide\"\n ></rtsee-manage-slide>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: RTSeeImageUploaderComponent, selector: "rtsee-image-uploader", inputs: ["imageUploader"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }, { kind: "component", type: ManageSlidesComponent, selector: "rtsee-manage-slides", inputs: ["manageSlides"] }, { kind: "component", type: ManageSlideComponent, selector: "rtsee-manage-slide", inputs: ["manageSlide"] }, { kind: "component", type: Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }] }); }
|
|
1598
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ManageStoryComponent, isStandalone: true, selector: "rtsee-manage-story", inputs: { manageStory: "manageStory" }, ngImport: i0, template: "<div class=\"rtsee-manage-story\">\n @if (!manageStory.manageSlides.selectedSlide) {\n <div class=\"rtsee-manage-story-info rtsee-form-container\">\n <div class=\"rtsee-manage-story-image\">\n <rtsee-image-uploader [imageUploader]=\"manageStory.imageUploader\"\n ></rtsee-image-uploader>\n </div>\n <form class=\"rtsee-story-form rtsee-form\"\n [formGroup]=\"storyForm\"\n (ngSubmit)=\"submit()\"\n >\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"sign-up-email\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <rtsee-autocomplete [config]=\"manageStory.categoriesMultiselect\"></rtsee-autocomplete>\n <rtsee-autocomplete [config]=\"manageStory.labelsMultiselect\"></rtsee-autocomplete>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-input-number [formControl]=\"averageReadTimeField\"\n id=\"rtsee-story-average-read-time\"\n mode=\"decimal\"\n [min]=\"2\"\n [max]=\"10000\"\n />\n <label for=\"rtsee-story-average-read-time\">Average Read Time</label>\n </p-floatlabel>\n </p-inputgroup>\n <div class=\"rtsee-form-field-container\">\n <p>Published</p>\n <p-toggleswitch name=\"publishing\" formControlName=\"isPublished\"/>\n </div>\n <div class=\"rtsee-form-field-container\">\n <p>Enable Comments</p>\n <p-toggleswitch name=\"publishing\" formControlName=\"isDiscussable\"/>\n </div>\n </div>\n <p-divider />\n <div class=\"rtsee-story-slides-wrapper\">\n <rtsee-manage-slides [manageSlides]=\"manageStory.manageSlides\"></rtsee-manage-slides>\n </div>\n <p-divider />\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageStory.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"manageStory.cancel()\"\n [disabled]=\"manageStory.saveInProgress\"\n />\n </form>\n </div>\n }\n @if (manageStory.manageSlides.selectedSlide) {\n <div class=\"rtsee-manage-story-slide-wrapper\">\n <rtsee-manage-slide [manageSlide]=\"manageStory.manageSlides.selectedSlide\"\n ></rtsee-manage-slide>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: RTSeeImageUploaderComponent, selector: "rtsee-image-uploader", inputs: ["imageUploader"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }, { kind: "component", type: ManageSlidesComponent, selector: "rtsee-manage-slides", inputs: ["manageSlides"] }, { kind: "component", type: ManageSlideComponent, selector: "rtsee-manage-slide", inputs: ["manageSlide"] }, { kind: "component", type: Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "component", type: ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }] }); }
|
|
1367
1599
|
}
|
|
1368
1600
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ManageStoryComponent, decorators: [{
|
|
1369
1601
|
type: Component,
|
|
@@ -1381,8 +1613,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1381
1613
|
AutocompleteComponent,
|
|
1382
1614
|
ManageSlidesComponent,
|
|
1383
1615
|
ManageSlideComponent,
|
|
1384
|
-
Divider
|
|
1385
|
-
|
|
1616
|
+
Divider,
|
|
1617
|
+
ToggleSwitch
|
|
1618
|
+
], template: "<div class=\"rtsee-manage-story\">\n @if (!manageStory.manageSlides.selectedSlide) {\n <div class=\"rtsee-manage-story-info rtsee-form-container\">\n <div class=\"rtsee-manage-story-image\">\n <rtsee-image-uploader [imageUploader]=\"manageStory.imageUploader\"\n ></rtsee-image-uploader>\n </div>\n <form class=\"rtsee-story-form rtsee-form\"\n [formGroup]=\"storyForm\"\n (ngSubmit)=\"submit()\"\n >\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"sign-up-email\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <rtsee-autocomplete [config]=\"manageStory.categoriesMultiselect\"></rtsee-autocomplete>\n <rtsee-autocomplete [config]=\"manageStory.labelsMultiselect\"></rtsee-autocomplete>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-input-number [formControl]=\"averageReadTimeField\"\n id=\"rtsee-story-average-read-time\"\n mode=\"decimal\"\n [min]=\"2\"\n [max]=\"10000\"\n />\n <label for=\"rtsee-story-average-read-time\">Average Read Time</label>\n </p-floatlabel>\n </p-inputgroup>\n <div class=\"rtsee-form-field-container\">\n <p>Published</p>\n <p-toggleswitch name=\"publishing\" formControlName=\"isPublished\"/>\n </div>\n <div class=\"rtsee-form-field-container\">\n <p>Enable Comments</p>\n <p-toggleswitch name=\"publishing\" formControlName=\"isDiscussable\"/>\n </div>\n </div>\n <p-divider />\n <div class=\"rtsee-story-slides-wrapper\">\n <rtsee-manage-slides [manageSlides]=\"manageStory.manageSlides\"></rtsee-manage-slides>\n </div>\n <p-divider />\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageStory.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"manageStory.cancel()\"\n [disabled]=\"manageStory.saveInProgress\"\n />\n </form>\n </div>\n }\n @if (manageStory.manageSlides.selectedSlide) {\n <div class=\"rtsee-manage-story-slide-wrapper\">\n <rtsee-manage-slide [manageSlide]=\"manageStory.manageSlides.selectedSlide\"\n ></rtsee-manage-slide>\n </div>\n }\n</div>\n" }]
|
|
1386
1619
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { manageStory: [{
|
|
1387
1620
|
type: Input
|
|
1388
1621
|
}] } });
|
|
@@ -1623,10 +1856,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1623
1856
|
type: Input
|
|
1624
1857
|
}] } });
|
|
1625
1858
|
|
|
1859
|
+
class StoryDetailsComponent {
|
|
1860
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1861
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: StoryDetailsComponent, isStandalone: true, selector: "rtsee-story-details", inputs: { story: "story", presentation: "presentation", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-story-details\">\n <div class=\"rtsee-story-details-image-container\" (click)=\"presentation.setActiveStory(story)\">\n <img [src]=\"story.imageUrl\" alt=\"story_image\" class=\"rtsee-story-details-image\">\n <p-button label=\"Start Reading\"\n class=\"rtsee-story-details-start-reading\"\n ></p-button>\n <p-button label=\"Close\"\n class=\"rtsee-story-details-close\"\n severity=\"secondary\"\n (click)=\"presentation.closeStoryDetails()\"\n ></p-button>\n </div>\n <div class=\"rtsee-story-details-title-container\">\n <h1 class=\"rtsee-story-details-title\">{{story.name}}</h1>\n </div>\n @if (story.categories?.length && false) {\n <div class=\"rtsee-story-details-categories\">\n @for (category of story.categories; track category.id) {\n <p-tag [value]=\"category.name\"></p-tag>\n }\n </div>\n }\n\n @if (story.labels?.length) {\n <div class=\"rtsee-story-details-labels\">\n @for (label of story.labels; track label .id) {\n <p-chip class=\"rtsee-story-details-label\">\n <span class=\"rtsee-story-details-label-left\"\n >{{label.symbol}}</span>\n <span class=\"rtsee-story-details-label-right\"\n >{{label.name}}</span>\n </p-chip>\n }\n </div>\n }\n\n <div class=\"rtsee-story-details-description-container\">\n <p class=\"rtsee-story-details-description\">{{story.description}}</p>\n </div>\n <div class=\"rtsee-story-details-description-history\">\n </div>\n @if (story.isPublished) {\n <div class=\"rtsee-story-details-feedback\">\n <p>feedback here</p>\n </div>\n } @else if (messenger && story.discussion) {\n\n <div class=\"rtsee-story-details-votes\">\n <p class=\"rtsee-story-details-comments-label\">Comments</p>\n <rtsee-chat [messenger]=\"messenger\"\n [chatData]=\"story.discussion\"\n ></rtsee-chat>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ChatComponent, selector: "rtsee-chat", inputs: ["chat", "chatData", "messenger"] }] }); }
|
|
1862
|
+
}
|
|
1863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryDetailsComponent, decorators: [{
|
|
1864
|
+
type: Component,
|
|
1865
|
+
args: [{ selector: 'rtsee-story-details', imports: [
|
|
1866
|
+
Chip,
|
|
1867
|
+
Tag,
|
|
1868
|
+
Button,
|
|
1869
|
+
ChatComponent
|
|
1870
|
+
], template: "<div class=\"rtsee-story-details\">\n <div class=\"rtsee-story-details-image-container\" (click)=\"presentation.setActiveStory(story)\">\n <img [src]=\"story.imageUrl\" alt=\"story_image\" class=\"rtsee-story-details-image\">\n <p-button label=\"Start Reading\"\n class=\"rtsee-story-details-start-reading\"\n ></p-button>\n <p-button label=\"Close\"\n class=\"rtsee-story-details-close\"\n severity=\"secondary\"\n (click)=\"presentation.closeStoryDetails()\"\n ></p-button>\n </div>\n <div class=\"rtsee-story-details-title-container\">\n <h1 class=\"rtsee-story-details-title\">{{story.name}}</h1>\n </div>\n @if (story.categories?.length && false) {\n <div class=\"rtsee-story-details-categories\">\n @for (category of story.categories; track category.id) {\n <p-tag [value]=\"category.name\"></p-tag>\n }\n </div>\n }\n\n @if (story.labels?.length) {\n <div class=\"rtsee-story-details-labels\">\n @for (label of story.labels; track label .id) {\n <p-chip class=\"rtsee-story-details-label\">\n <span class=\"rtsee-story-details-label-left\"\n >{{label.symbol}}</span>\n <span class=\"rtsee-story-details-label-right\"\n >{{label.name}}</span>\n </p-chip>\n }\n </div>\n }\n\n <div class=\"rtsee-story-details-description-container\">\n <p class=\"rtsee-story-details-description\">{{story.description}}</p>\n </div>\n <div class=\"rtsee-story-details-description-history\">\n </div>\n @if (story.isPublished) {\n <div class=\"rtsee-story-details-feedback\">\n <p>feedback here</p>\n </div>\n } @else if (messenger && story.discussion) {\n\n <div class=\"rtsee-story-details-votes\">\n <p class=\"rtsee-story-details-comments-label\">Comments</p>\n <rtsee-chat [messenger]=\"messenger\"\n [chatData]=\"story.discussion\"\n ></rtsee-chat>\n </div>\n }\n</div>\n" }]
|
|
1871
|
+
}], propDecorators: { story: [{
|
|
1872
|
+
type: Input
|
|
1873
|
+
}], presentation: [{
|
|
1874
|
+
type: Input
|
|
1875
|
+
}], messenger: [{
|
|
1876
|
+
type: Input
|
|
1877
|
+
}] } });
|
|
1878
|
+
|
|
1626
1879
|
class PresentationComponent {
|
|
1627
1880
|
constructor() { }
|
|
1628
1881
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PresentationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1629
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PresentationComponent, isStandalone: true, selector: "rtsee-presentation", inputs: { presentation: "presentation" }, ngImport: i0, template: "<div class=\"rtsee-presentation\">\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (
|
|
1882
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PresentationComponent, isStandalone: true, selector: "rtsee-presentation", inputs: { presentation: "presentation", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-presentation\">\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (presentation.isCategoriesListVisible && !presentation.storyLoadInProgress) {\n <div class=\"rtsee-presentation-categories-list\">\n @if (presentation.categoriesLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n @for (category of presentation.categories; track category.id) {\n <p class=\"rtsee-presentation-category-name\">{{category.name}}</p>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of category.stories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"presentation.openStoryDetails(story.id)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (presentation.activeStory) {\n <div class=\"rtsee-presentation-story-viewer-container\">\n <rtsee-story-player [story]=\"presentation.activeStory\"\n [settings]=\"presentation.settings\"\n ></rtsee-story-player>\n </div>\n } @else if (presentation.openedStoryDetails) {\n <rtsee-story-details [story]=\"presentation.openedStoryDetails\"\n [presentation]=\"presentation\"\n [messenger]=\"messenger\"\n ></rtsee-story-details>\n }\n</div>\n", dependencies: [{ kind: "component", type: PresentationHeaderComponent, selector: "rtsee-presentation-header", inputs: ["presentation"] }, { kind: "component", type: StoryThumbnailComponent, selector: "rtsee-story-thumbnail", inputs: ["story"] }, { kind: "component", type: StoryPlayerComponent, selector: "rtsee-story-player", inputs: ["story", "settings"] }, { kind: "component", type: PreloaderComponent, selector: "rtsee-preloader", inputs: ["diameter", "color"] }, { kind: "component", type: PresentationsDashboardComponent, selector: "rtsee-presentations-dashboard", inputs: ["dashboard"] }, { kind: "component", type: PresentationSettingsComponent, selector: "rtsee-presentation-settings", inputs: ["settings", "presentation"] }, { kind: "component", type: StoryDetailsComponent, selector: "rtsee-story-details", inputs: ["story", "presentation", "messenger"] }] }); }
|
|
1630
1883
|
}
|
|
1631
1884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PresentationComponent, decorators: [{
|
|
1632
1885
|
type: Component,
|
|
@@ -1637,10 +1890,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1637
1890
|
PreloaderComponent,
|
|
1638
1891
|
PreloaderComponent,
|
|
1639
1892
|
PresentationsDashboardComponent,
|
|
1640
|
-
PresentationSettingsComponent
|
|
1641
|
-
|
|
1893
|
+
PresentationSettingsComponent,
|
|
1894
|
+
StoryDetailsComponent
|
|
1895
|
+
], standalone: true, template: "<div class=\"rtsee-presentation\">\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (presentation.isCategoriesListVisible && !presentation.storyLoadInProgress) {\n <div class=\"rtsee-presentation-categories-list\">\n @if (presentation.categoriesLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n @for (category of presentation.categories; track category.id) {\n <p class=\"rtsee-presentation-category-name\">{{category.name}}</p>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of category.stories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"presentation.openStoryDetails(story.id)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (presentation.activeStory) {\n <div class=\"rtsee-presentation-story-viewer-container\">\n <rtsee-story-player [story]=\"presentation.activeStory\"\n [settings]=\"presentation.settings\"\n ></rtsee-story-player>\n </div>\n } @else if (presentation.openedStoryDetails) {\n <rtsee-story-details [story]=\"presentation.openedStoryDetails\"\n [presentation]=\"presentation\"\n [messenger]=\"messenger\"\n ></rtsee-story-details>\n }\n</div>\n" }]
|
|
1642
1896
|
}], ctorParameters: () => [], propDecorators: { presentation: [{
|
|
1643
1897
|
type: Input
|
|
1898
|
+
}], messenger: [{
|
|
1899
|
+
type: Input
|
|
1644
1900
|
}] } });
|
|
1645
1901
|
|
|
1646
1902
|
class RtseeNavComponent {
|
|
@@ -1666,8 +1922,6 @@ class RtseeNavComponent {
|
|
|
1666
1922
|
console.log('RTSeeContainer: user peer not found');
|
|
1667
1923
|
return false;
|
|
1668
1924
|
}
|
|
1669
|
-
console.log('peer', peer);
|
|
1670
|
-
console.log('peer', peer.permissions?.length);
|
|
1671
1925
|
const profileRoute = this.config.routes
|
|
1672
1926
|
.find((r) => r.rtseeRoute === RTSeeRoutesList.PROFILE) || null;
|
|
1673
1927
|
const dashboardRoute = this.config.routes
|
|
@@ -1709,18 +1963,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1709
1963
|
}] } });
|
|
1710
1964
|
|
|
1711
1965
|
class RTSeeContainerComponent {
|
|
1712
|
-
constructor(authService) {
|
|
1966
|
+
constructor(authService, router) {
|
|
1713
1967
|
this.authService = authService;
|
|
1968
|
+
this.router = router;
|
|
1714
1969
|
this.isSidenavExpanded = true;
|
|
1970
|
+
this.isSidenavContent = false;
|
|
1971
|
+
this.isSidenavFullScreen = false;
|
|
1972
|
+
}
|
|
1973
|
+
ngOnInit() {
|
|
1974
|
+
this.authService.init(this.auth);
|
|
1975
|
+
this.routeSubscription = this.router.events.pipe(
|
|
1976
|
+
// Filter for the NavigationEnd event to know when navigation is complete
|
|
1977
|
+
filter((event) => event instanceof NavigationEnd)).subscribe((event) => {
|
|
1978
|
+
this.defineSideNavState(event.url);
|
|
1979
|
+
});
|
|
1715
1980
|
}
|
|
1716
1981
|
onSidenavToggleClicked() {
|
|
1717
1982
|
this.isSidenavExpanded = !this.isSidenavExpanded;
|
|
1718
1983
|
}
|
|
1719
|
-
|
|
1720
|
-
|
|
1984
|
+
defineSideNavState(url) {
|
|
1985
|
+
const isBase = url === '/' || url.startsWith('/?');
|
|
1986
|
+
const routeUrlSplit = url.split('/');
|
|
1987
|
+
const rootRoutePath = isBase ? '' : (routeUrlSplit[1] || null);
|
|
1988
|
+
if (!rootRoutePath && !isBase) {
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1991
|
+
const rtseeRoute = this.navigationConfig.routes
|
|
1992
|
+
.find((rn) => rn.link === rootRoutePath) || null;
|
|
1993
|
+
if (!rtseeRoute) {
|
|
1994
|
+
return;
|
|
1995
|
+
}
|
|
1996
|
+
this.isSidenavContent = rtseeRoute.fullContent || false;
|
|
1997
|
+
this.isSidenavFullScreen = rtseeRoute.fullScreen || false;
|
|
1721
1998
|
}
|
|
1722
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeContainerComponent, deps: [{ token: RTSeeAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1723
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeContainerComponent, isStandalone: true, selector: "rtsee-container", inputs: { rtsee: "rtsee", navigationConfig: "navigationConfig", auth: "auth" }, ngImport: i0, template: "<div class=\"rtsee-shell\"\n [ngClass]=\"{\n 'rtsee-shell-conference-mode': rtsee.conference && rtsee.conference.isInActiveCall,\n 'rtsee-shell-messenger-active': rtsee.messenger && rtsee.activeTab === 'messenger',\n 'rtsee-shell-dashboard-active': rtsee.eventsDashboard && rtsee.activeTab === 'events-dashboard',\n 'rtsee-shell-presentation-active': rtsee.presentation && rtsee.activeTab === 'presentation',\n 'rtsee-shell-side-nav-expanded': isSidenavExpanded\n }\"\n>\n <div class=\"rtsee-nav-block\">\n <rtsee-nav [config]=\"navigationConfig\" [rtsee]=\"rtsee\"></rtsee-nav>\n </div>\n\n <div class=\"rtsee-shell-panel\">\n <div class=\"rtsee-shell-panel-inner\">\n @if (rtsee.conference && rtsee.conference.isInActiveCall) {\n <div class=\"rtsee-conference-container\">\n <rtsee-conference [rtSee]=\"rtsee.conference\"\n ></rtsee-conference>\n </div>\n }\n\n @if (rtsee.messenger) {\n <div class=\"rtsee-messenger-container\">\n <rtsee-messenger [messenger]=\"rtsee.messenger\"\n ></rtsee-messenger>\n </div>\n }\n\n @if (rtsee.eventsDashboard && rtsee.eventsDashboard.isReady) {\n <div class=\"rtsee-events-dashboard-container\">\n <rtsee-events-dashboard [eventsDashboard]=\"rtsee.eventsDashboard\"\n ></rtsee-events-dashboard>\n </div>\n }\n\n @if (rtsee.presentation && rtsee.presentation.isActive) {\n <div class=\"rtsee-presentation-container\">\n <rtsee-presentation [presentation]=\"rtsee.presentation\"\n ></rtsee-presentation>\n </div>\n }\n </div>\n </div>\n\n <div class=\"rtsee-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RTSeeConferenceComponent, selector: "rtsee-conference", inputs: ["rtSee"] }, { kind: "component", type: MessengerComponent, selector: "rtsee-messenger", inputs: ["messenger"] }, { kind: "component", type: RtseeEventsDashboardComponent, selector: "rtsee-events-dashboard", inputs: ["eventsDashboard"] }, { kind: "component", type: PresentationComponent, selector: "rtsee-presentation", inputs: ["presentation"] }, { kind: "component", type: RtseeNavComponent, selector: "rtsee-nav", inputs: ["config", "rtsee"] }] }); }
|
|
1999
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeContainerComponent, deps: [{ token: RTSeeAuthService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2000
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeContainerComponent, isStandalone: true, selector: "rtsee-container", inputs: { rtsee: "rtsee", navigationConfig: "navigationConfig", auth: "auth" }, ngImport: i0, template: "<div class=\"rtsee-shell\"\n [ngClass]=\"{\n 'rtsee-shell-conference-mode': rtsee.conference && rtsee.conference.isInActiveCall,\n 'rtsee-shell-messenger-active': rtsee.messenger && rtsee.activeTab === 'messenger',\n 'rtsee-shell-dashboard-active': rtsee.eventsDashboard && rtsee.activeTab === 'events-dashboard',\n 'rtsee-shell-presentation-active': rtsee.presentation && rtsee.activeTab === 'presentation',\n 'rtsee-shell-side-nav-expanded': isSidenavExpanded,\n 'rtsee-shell-side-nav-is-content': isSidenavContent,\n 'rtsee-shell-side-nav-full-screen': isSidenavFullScreen\n }\"\n>\n <div class=\"rtsee-nav-block\">\n <rtsee-nav [config]=\"navigationConfig\" [rtsee]=\"rtsee\"></rtsee-nav>\n </div>\n\n <div class=\"rtsee-shell-panel\">\n <div class=\"rtsee-shell-panel-inner\">\n @if (rtsee.conference && rtsee.conference.isInActiveCall) {\n <div class=\"rtsee-conference-container\">\n <rtsee-conference [rtSee]=\"rtsee.conference\"\n ></rtsee-conference>\n </div>\n }\n\n @if (rtsee.messenger) {\n <div class=\"rtsee-messenger-container\">\n <rtsee-messenger [messenger]=\"rtsee.messenger\"\n ></rtsee-messenger>\n </div>\n }\n\n @if (rtsee.eventsDashboard && rtsee.eventsDashboard.isReady) {\n <div class=\"rtsee-events-dashboard-container\">\n <rtsee-events-dashboard [eventsDashboard]=\"rtsee.eventsDashboard\"\n ></rtsee-events-dashboard>\n </div>\n }\n\n @if (rtsee.presentation && rtsee.presentation.isActive) {\n <div class=\"rtsee-presentation-container\">\n <rtsee-presentation [presentation]=\"rtsee.presentation\"\n [messenger]=\"rtsee.messenger\"\n ></rtsee-presentation>\n </div>\n }\n </div>\n </div>\n\n <div class=\"rtsee-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RTSeeConferenceComponent, selector: "rtsee-conference", inputs: ["rtSee"] }, { kind: "component", type: MessengerComponent, selector: "rtsee-messenger", inputs: ["messenger"] }, { kind: "component", type: RtseeEventsDashboardComponent, selector: "rtsee-events-dashboard", inputs: ["eventsDashboard"] }, { kind: "component", type: PresentationComponent, selector: "rtsee-presentation", inputs: ["presentation", "messenger"] }, { kind: "component", type: RtseeNavComponent, selector: "rtsee-nav", inputs: ["config", "rtsee"] }] }); }
|
|
1724
2001
|
}
|
|
1725
2002
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeContainerComponent, decorators: [{
|
|
1726
2003
|
type: Component,
|
|
@@ -1731,8 +2008,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1731
2008
|
RtseeEventsDashboardComponent,
|
|
1732
2009
|
PresentationComponent,
|
|
1733
2010
|
RtseeNavComponent
|
|
1734
|
-
], standalone: true, template: "<div class=\"rtsee-shell\"\n [ngClass]=\"{\n 'rtsee-shell-conference-mode': rtsee.conference && rtsee.conference.isInActiveCall,\n 'rtsee-shell-messenger-active': rtsee.messenger && rtsee.activeTab === 'messenger',\n 'rtsee-shell-dashboard-active': rtsee.eventsDashboard && rtsee.activeTab === 'events-dashboard',\n 'rtsee-shell-presentation-active': rtsee.presentation && rtsee.activeTab === 'presentation',\n 'rtsee-shell-side-nav-expanded': isSidenavExpanded\n }\"\n>\n <div class=\"rtsee-nav-block\">\n <rtsee-nav [config]=\"navigationConfig\" [rtsee]=\"rtsee\"></rtsee-nav>\n </div>\n\n <div class=\"rtsee-shell-panel\">\n <div class=\"rtsee-shell-panel-inner\">\n @if (rtsee.conference && rtsee.conference.isInActiveCall) {\n <div class=\"rtsee-conference-container\">\n <rtsee-conference [rtSee]=\"rtsee.conference\"\n ></rtsee-conference>\n </div>\n }\n\n @if (rtsee.messenger) {\n <div class=\"rtsee-messenger-container\">\n <rtsee-messenger [messenger]=\"rtsee.messenger\"\n ></rtsee-messenger>\n </div>\n }\n\n @if (rtsee.eventsDashboard && rtsee.eventsDashboard.isReady) {\n <div class=\"rtsee-events-dashboard-container\">\n <rtsee-events-dashboard [eventsDashboard]=\"rtsee.eventsDashboard\"\n ></rtsee-events-dashboard>\n </div>\n }\n\n @if (rtsee.presentation && rtsee.presentation.isActive) {\n <div class=\"rtsee-presentation-container\">\n <rtsee-presentation [presentation]=\"rtsee.presentation\"\n ></rtsee-presentation>\n </div>\n }\n </div>\n </div>\n\n <div class=\"rtsee-content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
|
|
1735
|
-
}], ctorParameters: () => [{ type: RTSeeAuthService }], propDecorators: { rtsee: [{
|
|
2011
|
+
], standalone: true, template: "<div class=\"rtsee-shell\"\n [ngClass]=\"{\n 'rtsee-shell-conference-mode': rtsee.conference && rtsee.conference.isInActiveCall,\n 'rtsee-shell-messenger-active': rtsee.messenger && rtsee.activeTab === 'messenger',\n 'rtsee-shell-dashboard-active': rtsee.eventsDashboard && rtsee.activeTab === 'events-dashboard',\n 'rtsee-shell-presentation-active': rtsee.presentation && rtsee.activeTab === 'presentation',\n 'rtsee-shell-side-nav-expanded': isSidenavExpanded,\n 'rtsee-shell-side-nav-is-content': isSidenavContent,\n 'rtsee-shell-side-nav-full-screen': isSidenavFullScreen\n }\"\n>\n <div class=\"rtsee-nav-block\">\n <rtsee-nav [config]=\"navigationConfig\" [rtsee]=\"rtsee\"></rtsee-nav>\n </div>\n\n <div class=\"rtsee-shell-panel\">\n <div class=\"rtsee-shell-panel-inner\">\n @if (rtsee.conference && rtsee.conference.isInActiveCall) {\n <div class=\"rtsee-conference-container\">\n <rtsee-conference [rtSee]=\"rtsee.conference\"\n ></rtsee-conference>\n </div>\n }\n\n @if (rtsee.messenger) {\n <div class=\"rtsee-messenger-container\">\n <rtsee-messenger [messenger]=\"rtsee.messenger\"\n ></rtsee-messenger>\n </div>\n }\n\n @if (rtsee.eventsDashboard && rtsee.eventsDashboard.isReady) {\n <div class=\"rtsee-events-dashboard-container\">\n <rtsee-events-dashboard [eventsDashboard]=\"rtsee.eventsDashboard\"\n ></rtsee-events-dashboard>\n </div>\n }\n\n @if (rtsee.presentation && rtsee.presentation.isActive) {\n <div class=\"rtsee-presentation-container\">\n <rtsee-presentation [presentation]=\"rtsee.presentation\"\n [messenger]=\"rtsee.messenger\"\n ></rtsee-presentation>\n </div>\n }\n </div>\n </div>\n\n <div class=\"rtsee-content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
|
|
2012
|
+
}], ctorParameters: () => [{ type: RTSeeAuthService }, { type: i2.Router }], propDecorators: { rtsee: [{
|
|
1736
2013
|
type: Input
|
|
1737
2014
|
}], navigationConfig: [{
|
|
1738
2015
|
type: Input
|