@magmonium/one 0.2.47 → 0.2.48
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/fesm2022/{magmonium-one-magmonium-one-IbM56bN9.mjs → magmonium-one-magmonium-one-NPMk122K.mjs} +60 -15
- package/fesm2022/{magmonium-one-magmonium-one-IbM56bN9.mjs.map → magmonium-one-magmonium-one-NPMk122K.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-otp-B_s_yv6h.mjs → magmonium-one-otp-UHSEpR9_.mjs} +2 -2
- package/fesm2022/{magmonium-one-otp-B_s_yv6h.mjs.map → magmonium-one-otp-UHSEpR9_.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-BPHpE0Y5.mjs → magmonium-one-password-C4ExI9DU.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-BPHpE0Y5.mjs.map → magmonium-one-password-C4ExI9DU.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-toggle-DzQFBc6i.mjs → magmonium-one-toggle-BaeVonYJ.mjs} +2 -2
- package/fesm2022/{magmonium-one-toggle-DzQFBc6i.mjs.map → magmonium-one-toggle-BaeVonYJ.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +12 -4
|
@@ -7,7 +7,7 @@ import { signalStore, withState, withMethods, patchState, withHooks, withCompute
|
|
|
7
7
|
import { rxMethod } from '@ngrx/signals/rxjs-interop';
|
|
8
8
|
import { map as map$1, switchMap, catchError as catchError$1 } from 'rxjs/operators';
|
|
9
9
|
import { io } from 'socket.io-client';
|
|
10
|
-
import { DefaultUrlSerializer, UrlSerializer, Router, NavigationEnd, RouterModule, RouterLink, provideRouter, withComponentInputBinding, RouterOutlet } from '@angular/router';
|
|
10
|
+
import { DefaultUrlSerializer, UrlSerializer, Router, NavigationEnd, RouterModule, RouterLink, provideRouter, withComponentInputBinding, withRouterConfig, RouterOutlet } from '@angular/router';
|
|
11
11
|
import * as i1 from '@angular/common';
|
|
12
12
|
import { APP_BASE_HREF, Location, NgOptimizedImage, IMAGE_LOADER, NgTemplateOutlet, CommonModule, NgComponentOutlet, DecimalPipe, NgClass, DatePipe, NgStyle } from '@angular/common';
|
|
13
13
|
import { FormField, email, required, minLength, maxLength, min, max, validate, apply, form } from '@angular/forms/signals';
|
|
@@ -6990,7 +6990,7 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
6990
6990
|
break;
|
|
6991
6991
|
}
|
|
6992
6992
|
case InputType.TOGGLE: {
|
|
6993
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
6993
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-BaeVonYJ.mjs');
|
|
6994
6994
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
6995
6995
|
break;
|
|
6996
6996
|
}
|
|
@@ -7002,12 +7002,12 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
7002
7002
|
break;
|
|
7003
7003
|
}
|
|
7004
7004
|
case InputType.PASSWORD: {
|
|
7005
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
7005
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-C4ExI9DU.mjs');
|
|
7006
7006
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
7007
7007
|
break;
|
|
7008
7008
|
}
|
|
7009
7009
|
case InputType.OTP: {
|
|
7010
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
7010
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-UHSEpR9_.mjs');
|
|
7011
7011
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
7012
7012
|
break;
|
|
7013
7013
|
}
|
|
@@ -20562,7 +20562,7 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20562
20562
|
break;
|
|
20563
20563
|
}
|
|
20564
20564
|
case InputType.TOGGLE: {
|
|
20565
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
20565
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-BaeVonYJ.mjs');
|
|
20566
20566
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
20567
20567
|
break;
|
|
20568
20568
|
}
|
|
@@ -20574,12 +20574,12 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20574
20574
|
break;
|
|
20575
20575
|
}
|
|
20576
20576
|
case InputType.PASSWORD: {
|
|
20577
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
20577
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-C4ExI9DU.mjs');
|
|
20578
20578
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
20579
20579
|
break;
|
|
20580
20580
|
}
|
|
20581
20581
|
case InputType.OTP: {
|
|
20582
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
20582
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-UHSEpR9_.mjs');
|
|
20583
20583
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
20584
20584
|
break;
|
|
20585
20585
|
}
|
|
@@ -32293,7 +32293,13 @@ function provideMagWcConfig(options) {
|
|
|
32293
32293
|
},
|
|
32294
32294
|
},
|
|
32295
32295
|
provideZonelessChangeDetection(),
|
|
32296
|
-
|
|
32296
|
+
// `always` rather than the default `emptyOnly`: a child route rendered in
|
|
32297
|
+
// a parent Page's RouterOutlet declares its own component, so without it
|
|
32298
|
+
// Angular hands the child none of the parent's `:params` and
|
|
32299
|
+
// `withComponentInputBinding()` has nothing to put in the child's input.
|
|
32300
|
+
// A Page nested under `app/:id` reads `id` the same way a flat
|
|
32301
|
+
// `app/:id/about` does, which is the one rule the editor can state.
|
|
32302
|
+
provideRouter(options.routes, withComponentInputBinding(), withRouterConfig({ paramsInheritanceStrategy: 'always' })),
|
|
32297
32303
|
provideMurlUrlSerializer(),
|
|
32298
32304
|
provideHttpClient(withFetch(), withInterceptors([mInterceptor])),
|
|
32299
32305
|
provideAppInitializer(initMagmoniumApp({
|
|
@@ -32454,7 +32460,13 @@ function provideMagAppConfig(options) {
|
|
|
32454
32460
|
return {
|
|
32455
32461
|
providers: [
|
|
32456
32462
|
provideBrowserGlobalErrorListeners(),
|
|
32457
|
-
|
|
32463
|
+
// `always` rather than the default `emptyOnly`: a child route rendered in
|
|
32464
|
+
// a parent Page's RouterOutlet declares its own component, so without it
|
|
32465
|
+
// Angular hands the child none of the parent's `:params` and
|
|
32466
|
+
// `withComponentInputBinding()` has nothing to put in the child's input.
|
|
32467
|
+
// A Page nested under `app/:id` reads `id` the same way a flat
|
|
32468
|
+
// `app/:id/about` does, which is the one rule the editor can state.
|
|
32469
|
+
provideRouter(options.routes, withComponentInputBinding(), withRouterConfig({ paramsInheritanceStrategy: 'always' })),
|
|
32458
32470
|
provideMurlUrlSerializer(),
|
|
32459
32471
|
provideZonelessChangeDetection(),
|
|
32460
32472
|
provideAnimations(),
|
|
@@ -34434,6 +34446,7 @@ const initialState = {
|
|
|
34434
34446
|
commentMap: new Map(),
|
|
34435
34447
|
cursorMap: new Map(),
|
|
34436
34448
|
sourceToItemsMap: new Map(),
|
|
34449
|
+
sourceToCountMap: new Map(),
|
|
34437
34450
|
loadingSources: new Set(),
|
|
34438
34451
|
expandingCursors: new Set(),
|
|
34439
34452
|
submittingSources: new Set(),
|
|
@@ -34459,7 +34472,7 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34459
34472
|
load: rxMethod(pipe(filter((sourceId) => !store.sourceToItemsMap().has(sourceId)), // skip if cached
|
|
34460
34473
|
tap((sourceId) => patchState(store, (s) => ({
|
|
34461
34474
|
loadingSources: new Set([...s.loadingSources, sourceId]),
|
|
34462
|
-
}))), switchMap$1((sourceId) => api.list(sourceId).pipe(tap(({ items }) => {
|
|
34475
|
+
}))), switchMap$1((sourceId) => api.list(sourceId).pipe(tap(({ items, commentCount }) => {
|
|
34463
34476
|
const { commentMap, cursorMap, orderedIds } = ingestItems(items);
|
|
34464
34477
|
patchState(store, (s) => ({
|
|
34465
34478
|
commentMap: new Map([...s.commentMap, ...commentMap]),
|
|
@@ -34468,6 +34481,10 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34468
34481
|
...s.sourceToItemsMap,
|
|
34469
34482
|
[sourceId, orderedIds],
|
|
34470
34483
|
]),
|
|
34484
|
+
sourceToCountMap: new Map([
|
|
34485
|
+
...s.sourceToCountMap,
|
|
34486
|
+
[sourceId, commentCount],
|
|
34487
|
+
]),
|
|
34471
34488
|
loadingSources: new Set([...s.loadingSources].filter((id) => id !== sourceId)),
|
|
34472
34489
|
}));
|
|
34473
34490
|
}), catchError(() => {
|
|
@@ -34479,7 +34496,7 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34479
34496
|
// ── Expand cursor: replace token in source list with new items ───────
|
|
34480
34497
|
expandCursor: rxMethod(pipe(tap(({ token }) => patchState(store, (s) => ({
|
|
34481
34498
|
expandingCursors: new Set([...s.expandingCursors, token]),
|
|
34482
|
-
}))), switchMap$1(({ sourceId, token }) => api.list(sourceId, token).pipe(tap(({ items: newItems }) => {
|
|
34499
|
+
}))), switchMap$1(({ sourceId, token }) => api.list(sourceId, token).pipe(tap(({ items: newItems, commentCount }) => {
|
|
34483
34500
|
const { commentMap, cursorMap, orderedIds: newIds, } = ingestItems(newItems);
|
|
34484
34501
|
patchState(store, (s) => {
|
|
34485
34502
|
const list = s.sourceToItemsMap.get(sourceId) ?? [];
|
|
@@ -34501,6 +34518,10 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34501
34518
|
...s.sourceToItemsMap,
|
|
34502
34519
|
[sourceId, updatedList],
|
|
34503
34520
|
]),
|
|
34521
|
+
sourceToCountMap: new Map([
|
|
34522
|
+
...s.sourceToCountMap,
|
|
34523
|
+
[sourceId, commentCount],
|
|
34524
|
+
]),
|
|
34504
34525
|
expandingCursors: new Set([...s.expandingCursors].filter((t) => t !== token)),
|
|
34505
34526
|
};
|
|
34506
34527
|
});
|
|
@@ -34526,12 +34547,16 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34526
34547
|
[sourceId, [normalized.id, ...existingList]],
|
|
34527
34548
|
])
|
|
34528
34549
|
: s.sourceToItemsMap;
|
|
34550
|
+
const known = s.sourceToCountMap.get(sourceId);
|
|
34529
34551
|
return {
|
|
34530
34552
|
commentMap: new Map([
|
|
34531
34553
|
...s.commentMap,
|
|
34532
34554
|
[normalized.id, normalized],
|
|
34533
34555
|
]),
|
|
34534
34556
|
sourceToItemsMap,
|
|
34557
|
+
sourceToCountMap: known === undefined
|
|
34558
|
+
? s.sourceToCountMap
|
|
34559
|
+
: new Map([...s.sourceToCountMap, [sourceId, known + 1]]),
|
|
34535
34560
|
submittingSources: new Set([...s.submittingSources].filter((id) => id !== sourceId)),
|
|
34536
34561
|
};
|
|
34537
34562
|
})), catchError(() => {
|
|
@@ -34546,12 +34571,19 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34546
34571
|
const list = s.sourceToItemsMap.get(sourceId) ?? [];
|
|
34547
34572
|
const newCommentMap = new Map(s.commentMap);
|
|
34548
34573
|
newCommentMap.delete(commentId);
|
|
34574
|
+
const known = s.sourceToCountMap.get(sourceId);
|
|
34549
34575
|
return {
|
|
34550
34576
|
commentMap: newCommentMap,
|
|
34551
34577
|
sourceToItemsMap: new Map([
|
|
34552
34578
|
...s.sourceToItemsMap,
|
|
34553
34579
|
[sourceId, list.filter((id) => id !== commentId)],
|
|
34554
34580
|
]),
|
|
34581
|
+
sourceToCountMap: known === undefined
|
|
34582
|
+
? s.sourceToCountMap
|
|
34583
|
+
: new Map([
|
|
34584
|
+
...s.sourceToCountMap,
|
|
34585
|
+
[sourceId, Math.max(0, known - 1)],
|
|
34586
|
+
]),
|
|
34555
34587
|
};
|
|
34556
34588
|
});
|
|
34557
34589
|
try {
|
|
@@ -34559,7 +34591,7 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34559
34591
|
}
|
|
34560
34592
|
catch {
|
|
34561
34593
|
// Re-fetch on failure
|
|
34562
|
-
const { items } = await firstValueFrom(api.list(sourceId));
|
|
34594
|
+
const { items, commentCount } = await firstValueFrom(api.list(sourceId));
|
|
34563
34595
|
const { commentMap, cursorMap, orderedIds } = ingestItems(items);
|
|
34564
34596
|
patchState(store, (s) => ({
|
|
34565
34597
|
commentMap: new Map([...s.commentMap, ...commentMap]),
|
|
@@ -34568,6 +34600,10 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34568
34600
|
...s.sourceToItemsMap,
|
|
34569
34601
|
[sourceId, orderedIds],
|
|
34570
34602
|
]),
|
|
34603
|
+
sourceToCountMap: new Map([
|
|
34604
|
+
...s.sourceToCountMap,
|
|
34605
|
+
[sourceId, commentCount],
|
|
34606
|
+
]),
|
|
34571
34607
|
}));
|
|
34572
34608
|
}
|
|
34573
34609
|
},
|
|
@@ -34618,6 +34654,8 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34618
34654
|
.map((id) => (cMap.get(id) ?? curMap.get(id)))
|
|
34619
34655
|
.filter(Boolean);
|
|
34620
34656
|
},
|
|
34657
|
+
// undefined until the source's feed has been fetched at least once
|
|
34658
|
+
countFor: (sourceId) => store.sourceToCountMap().get(sourceId),
|
|
34621
34659
|
isLoading: (sourceId) => store.loadingSources().has(sourceId),
|
|
34622
34660
|
isSubmitting: (sourceId) => store.submittingSources().has(sourceId),
|
|
34623
34661
|
isExpanding: (token) => store.expandingCursors().has(token),
|
|
@@ -34682,6 +34720,13 @@ class CommentItemComponent {
|
|
|
34682
34720
|
#modalStore = inject(ModalStore);
|
|
34683
34721
|
currentUserId = computed(() => this.#loginStore.userId(), ...(ngDevMode ? [{ debugName: "currentUserId" }] : /* istanbul ignore next */ []));
|
|
34684
34722
|
isAuthor = computed(() => this.currentUserId() === this.comment().uid, ...(ngDevMode ? [{ debugName: "isAuthor" }] : /* istanbul ignore next */ []));
|
|
34723
|
+
// The feed no longer carries a per-comment reply count, so the toggle shows
|
|
34724
|
+
// until this comment's own feed comes back empty — and stays while expanded
|
|
34725
|
+
// so an empty thread can still be collapsed.
|
|
34726
|
+
hasReplies = computed(() => {
|
|
34727
|
+
const count = this.#store.countFor(this.comment().id);
|
|
34728
|
+
return this.showReplies() || count === undefined || count > 0;
|
|
34729
|
+
}, ...(ngDevMode ? [{ debugName: "hasReplies" }] : /* istanbul ignore next */ []));
|
|
34685
34730
|
replyDraft = signal('', ...(ngDevMode ? [{ debugName: "replyDraft" }] : /* istanbul ignore next */ []));
|
|
34686
34731
|
replyConfig = {
|
|
34687
34732
|
type: InputType.TEXTAREA,
|
|
@@ -34732,7 +34777,7 @@ class CommentItemComponent {
|
|
|
34732
34777
|
}
|
|
34733
34778
|
}
|
|
34734
34779
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommentItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34735
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CommentItemComponent, isStandalone: true, selector: "m-comment-item", inputs: { comment: { classPropertyName: "comment", publicName: "comment", isSignal: true, isRequired: true, transformFunction: null }, showReplies: { classPropertyName: "showReplies", publicName: "showReplies", isSignal: true, isRequired: false, transformFunction: null }, isReplying: { classPropertyName: "isReplying", publicName: "isReplying", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reply: "reply", cancelReply: "cancelReply", toggleReplies: "toggleReplies", deleted: "deleted" }, ngImport: i0, template: "<m-user [id]=\"comment().uid\">\n <p class=\"comment-item__text\">{{ comment().text }}</p>\n\n <div class=\"comment-item__actions\">\n <span class=\"comment-item__date\">{{ comment().date | date: 'shortTime' }}</span>\n\n <m-button name=\"reply\" (clicked)=\"reply.emit(comment().id)\" />\n\n <div class=\"comment-item__menu-container\">\n @if (isAuthor()) {\n <m-one-context-menu name=\"comment_actions\" (action)=\"onMenuAction($event)\" />\n }\n </div>\n </div>\n\n @if (
|
|
34780
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CommentItemComponent, isStandalone: true, selector: "m-comment-item", inputs: { comment: { classPropertyName: "comment", publicName: "comment", isSignal: true, isRequired: true, transformFunction: null }, showReplies: { classPropertyName: "showReplies", publicName: "showReplies", isSignal: true, isRequired: false, transformFunction: null }, isReplying: { classPropertyName: "isReplying", publicName: "isReplying", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reply: "reply", cancelReply: "cancelReply", toggleReplies: "toggleReplies", deleted: "deleted" }, ngImport: i0, template: "<m-user [id]=\"comment().uid\">\n <p class=\"comment-item__text\">{{ comment().text }}</p>\n\n <div class=\"comment-item__actions\">\n <span class=\"comment-item__date\">{{ comment().date | date: 'shortTime' }}</span>\n\n <m-button name=\"reply\" (clicked)=\"reply.emit(comment().id)\" />\n\n <div class=\"comment-item__menu-container\">\n @if (isAuthor()) {\n <m-one-context-menu name=\"comment_actions\" (action)=\"onMenuAction($event)\" />\n }\n </div>\n </div>\n\n @if (hasReplies()) {\n <m-button\n [name]=\"showReplies() ? 'hide-replies' : 'view-replies'\"\n (clicked)=\"toggleReplies.emit()\"\n />\n }\n\n @if (isReplying()) {\n <div class=\"comment-item__reply-compose\">\n <m-textarea-input [config]=\"replyConfig\" [(value)]=\"replyDraft\" [disabled]=\"submitting\" />\n <div class=\"comment-item__reply-actions-wrapper\">\n <m-one-button-group\n name=\"reply_actions\"\n [buttons]=\"{\n post: { disabled: !replyDraft().trim() || submitting },\n }\"\n (clicked)=\"onReplyAction($event)\"\n />\n </div>\n </div>\n }\n\n @if (showReplies()) {\n <div class=\"comment-item__nested\">\n <m-comments [id]=\"comment().id\" [isNested]=\"true\" />\n </div>\n }\n</m-user>\n", styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes slide-right{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}@keyframes slide-down{0%{opacity:0;transform:translateY(-15px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.comment-item{position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);animation:fade-in .5s cubic-bezier(.16,1,.3,1)}.comment-item__text{margin:.25rem 0 .5rem;font-size:.95rem;line-height:1.6;color:var(--m-text);font-weight:400;word-break:break-word;animation:slide-right .6s cubic-bezier(.16,1,.3,1)}.comment-item__actions{display:flex;align-items:center;gap:1.5rem;margin-top:.25rem}.comment-item__date{color:var(--m-text-tertiary);font-size:.75rem;font-weight:500;letter-spacing:.01em}.comment-item__reply-compose{margin-top:1rem;margin-bottom:.5rem;display:flex;flex-direction:column;gap:1rem;background:color-mix(in srgb,var(--m-border) 15%,transparent);border:1px solid color-mix(in srgb,var(--m-border) 30%,transparent);border-radius:20px;padding:1rem;box-shadow:0 8px 32px #00000005,0 2px 8px #00000003;transition:all .4s cubic-bezier(.2,.8,.2,1);position:relative;overflow:hidden;animation:slide-up .6s cubic-bezier(.16,1,.3,1)}.comment-item__reply-compose:focus-within{border-color:color-mix(in srgb,var(--m-mm) 50%,transparent);background:color-mix(in srgb,var(--m-border) 10%,transparent);box-shadow:0 12px 40px #0000000a}.comment-item__reply-compose .m-textarea-input{--m-textarea-input-background: transparent;--m-textarea-input-border: none;--m-textarea-input-padding: 0;--m-textarea-input-shadow: none;width:100%}.comment-item__reply-compose .m-textarea-input textarea{width:100%;font-size:.9rem;color:var(--m-text);min-height:60px;resize:none;line-height:1.5}.comment-item__reply-compose .m-textarea-input textarea::placeholder{color:var(--m-text-tertiary)}.comment-item__reply-actions-wrapper{display:flex;align-items:center;justify-content:flex-end;align-self:flex-end;width:100%;transition:all .3s ease}.comment-item__nested{margin-top:.25rem;margin-left:1rem;padding:0;border-left:2px solid color-mix(in srgb,var(--m-mm) 10%,transparent);transition:border-color .3s;animation:fade-in .5s ease-out}.comment-item__nested:hover{border-left-color:color-mix(in srgb,var(--m-mm) 30%,transparent)}.comment-item__nested .comments{padding:0;background:transparent;box-shadow:none;border-radius:0;gap:1rem}.comment-item__nested .comments .comments__compose{margin-top:.5rem;padding:1rem;border-radius:.375rem}.comment-item__menu-container{position:relative;display:inline-flex;margin-left:auto}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => UserComponent), selector: "m-user", inputs: ["id", "user", "firstName", "lastName", "profilePic"] }, { kind: "component", type: i0.forwardRef(() => TextareaInputComponent), selector: "m-textarea-input" }, { kind: "component", type: i0.forwardRef(() => ButtonGroupComponent), selector: "m-button-group, m-one-button-group", inputs: ["buttons", "names", "exclude", "vertical", "size"], outputs: ["clicked"] }, { kind: "component", type: i0.forwardRef(() => ButtonComponent), selector: "m-button,m-one-button", inputs: ["config", "color", "labelClass", "fullWidth", "nav", "navParams", "href", "disabled", "variant", "name", "baseUrl", "one", "remote", "label", "noTranslate", "params", "noNative", "icon", "isRightIcon", "iconOnly", "stacked", "imgSrc", "nonClickable", "inverted", "isSubmit", "tabindex"], outputs: ["configChange", "clicked"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuComponent), selector: "m-context-menu, m-one-context-menu", inputs: ["toggle", "remote", "exclude", "visibilityRule", "disableRule", "extraData", "inverted"], outputs: ["toggleChange", "action"] }, { kind: "component", type: i0.forwardRef(() => CommentsComponent), selector: "m-comments", inputs: ["id", "isNested"] }, { kind: "pipe", type: i0.forwardRef(() => DatePipe), name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34736
34781
|
}
|
|
34737
34782
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommentItemComponent, decorators: [{
|
|
34738
34783
|
type: Component,
|
|
@@ -34744,7 +34789,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
34744
34789
|
ButtonComponent,
|
|
34745
34790
|
ContextMenuComponent,
|
|
34746
34791
|
forwardRef(() => CommentsComponent),
|
|
34747
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<m-user [id]=\"comment().uid\">\n <p class=\"comment-item__text\">{{ comment().text }}</p>\n\n <div class=\"comment-item__actions\">\n <span class=\"comment-item__date\">{{ comment().date | date: 'shortTime' }}</span>\n\n <m-button name=\"reply\" (clicked)=\"reply.emit(comment().id)\" />\n\n <div class=\"comment-item__menu-container\">\n @if (isAuthor()) {\n <m-one-context-menu name=\"comment_actions\" (action)=\"onMenuAction($event)\" />\n }\n </div>\n </div>\n\n @if (
|
|
34792
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<m-user [id]=\"comment().uid\">\n <p class=\"comment-item__text\">{{ comment().text }}</p>\n\n <div class=\"comment-item__actions\">\n <span class=\"comment-item__date\">{{ comment().date | date: 'shortTime' }}</span>\n\n <m-button name=\"reply\" (clicked)=\"reply.emit(comment().id)\" />\n\n <div class=\"comment-item__menu-container\">\n @if (isAuthor()) {\n <m-one-context-menu name=\"comment_actions\" (action)=\"onMenuAction($event)\" />\n }\n </div>\n </div>\n\n @if (hasReplies()) {\n <m-button\n [name]=\"showReplies() ? 'hide-replies' : 'view-replies'\"\n (clicked)=\"toggleReplies.emit()\"\n />\n }\n\n @if (isReplying()) {\n <div class=\"comment-item__reply-compose\">\n <m-textarea-input [config]=\"replyConfig\" [(value)]=\"replyDraft\" [disabled]=\"submitting\" />\n <div class=\"comment-item__reply-actions-wrapper\">\n <m-one-button-group\n name=\"reply_actions\"\n [buttons]=\"{\n post: { disabled: !replyDraft().trim() || submitting },\n }\"\n (clicked)=\"onReplyAction($event)\"\n />\n </div>\n </div>\n }\n\n @if (showReplies()) {\n <div class=\"comment-item__nested\">\n <m-comments [id]=\"comment().id\" [isNested]=\"true\" />\n </div>\n }\n</m-user>\n", styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes slide-right{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}@keyframes slide-down{0%{opacity:0;transform:translateY(-15px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.comment-item{position:relative;transition:all .3s cubic-bezier(.4,0,.2,1);animation:fade-in .5s cubic-bezier(.16,1,.3,1)}.comment-item__text{margin:.25rem 0 .5rem;font-size:.95rem;line-height:1.6;color:var(--m-text);font-weight:400;word-break:break-word;animation:slide-right .6s cubic-bezier(.16,1,.3,1)}.comment-item__actions{display:flex;align-items:center;gap:1.5rem;margin-top:.25rem}.comment-item__date{color:var(--m-text-tertiary);font-size:.75rem;font-weight:500;letter-spacing:.01em}.comment-item__reply-compose{margin-top:1rem;margin-bottom:.5rem;display:flex;flex-direction:column;gap:1rem;background:color-mix(in srgb,var(--m-border) 15%,transparent);border:1px solid color-mix(in srgb,var(--m-border) 30%,transparent);border-radius:20px;padding:1rem;box-shadow:0 8px 32px #00000005,0 2px 8px #00000003;transition:all .4s cubic-bezier(.2,.8,.2,1);position:relative;overflow:hidden;animation:slide-up .6s cubic-bezier(.16,1,.3,1)}.comment-item__reply-compose:focus-within{border-color:color-mix(in srgb,var(--m-mm) 50%,transparent);background:color-mix(in srgb,var(--m-border) 10%,transparent);box-shadow:0 12px 40px #0000000a}.comment-item__reply-compose .m-textarea-input{--m-textarea-input-background: transparent;--m-textarea-input-border: none;--m-textarea-input-padding: 0;--m-textarea-input-shadow: none;width:100%}.comment-item__reply-compose .m-textarea-input textarea{width:100%;font-size:.9rem;color:var(--m-text);min-height:60px;resize:none;line-height:1.5}.comment-item__reply-compose .m-textarea-input textarea::placeholder{color:var(--m-text-tertiary)}.comment-item__reply-actions-wrapper{display:flex;align-items:center;justify-content:flex-end;align-self:flex-end;width:100%;transition:all .3s ease}.comment-item__nested{margin-top:.25rem;margin-left:1rem;padding:0;border-left:2px solid color-mix(in srgb,var(--m-mm) 10%,transparent);transition:border-color .3s;animation:fade-in .5s ease-out}.comment-item__nested:hover{border-left-color:color-mix(in srgb,var(--m-mm) 30%,transparent)}.comment-item__nested .comments{padding:0;background:transparent;box-shadow:none;border-radius:0;gap:1rem}.comment-item__nested .comments .comments__compose{margin-top:.5rem;padding:1rem;border-radius:.375rem}.comment-item__menu-container{position:relative;display:inline-flex;margin-left:auto}\n"] }]
|
|
34748
34793
|
}], propDecorators: { comment: [{ type: i0.Input, args: [{ isSignal: true, alias: "comment", required: true }] }], showReplies: [{ type: i0.Input, args: [{ isSignal: true, alias: "showReplies", required: false }] }], isReplying: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReplying", required: false }] }], reply: [{ type: i0.Output, args: ["reply"] }], cancelReply: [{ type: i0.Output, args: ["cancelReply"] }], toggleReplies: [{ type: i0.Output, args: ["toggleReplies"] }], deleted: [{ type: i0.Output, args: ["deleted"] }] } });
|
|
34749
34794
|
|
|
34750
34795
|
class CommentsComponent {
|
|
@@ -34973,4 +35018,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
34973
35018
|
*/
|
|
34974
35019
|
|
|
34975
35020
|
export { DEFAULT_NAV_PARAM as $, ACCESS_DOMAINS as A, BaseInputComponent as B, COMPONENT_INPUT_REGISTRY as C, CardComponent as D, CardWrapperComponent as E, CarouselComponent as F, ChartComponent as G, CheckboxInputComponent as H, IS_DESIGN_MODE as I, ClearableInputComponent as J, ColComponent as K, LabelComponent as L, ColorPickerInputComponent as M, CommentItemComponent as N, CommentsApiService as O, CommentsComponent as P, CommentsStore as Q, ComponentInputComponent as R, ComponentStepperComponent as S, TranslatePipe as T, ConfigComponent as U, ConfirmComponent as V, ContextMenuComponent as W, CustomIconClass as X, CustomIconEditComponent as Y, DEFAULT_FILTER_RANGE_MODE as Z, DEFAULT_FILTER_VARIANT as _, BaseTextInputComponent as a, MurlUrlSerializer as a$, DEFAULT_NAV_SEGMENT as a0, DEFAULT_SIZE as a1, DashboardCardComponent as a2, DateInputComponent as a3, DatePickerComponent as a4, DeviceService as a5, DomService as a6, Domain as a7, DotGridComponent as a8, DragListDirective as a9, InputType as aA, InstrumentScoreComponent as aB, InterceptorObservables as aC, JumbotronComponent as aD, KeyValueComponent as aE, LAYOUT_ASSET_FOLDER as aF, LOGIN_COMPONENT as aG, LOGIN_STORE as aH, LanguageComponent as aI, ListComponent as aJ, LogoComponent as aK, MAG_SOCKET_EVENT as aL, MHeroColorDirective as aM, MHeroComponent as aN, MODAL_REF as aO, MODAL_STORE_REF as aP, MRefDirective as aQ, MStepComponent as aR, MURL_PARAM as aS, MURL_SEP as aT, ManifestEnrichmentService as aU, MenuComponent as aV, ModalDirective as aW, ModalRef as aX, ModalStore as aY, MoneyPipe as aZ, MultiRangeInputComponent as a_, DragListItemDirective as aa, DraggableDirective as ab, DropdownInputComponent as ac, FILTER_GROUP_CONTEXT as ad, FILTER_RANGE_MODES as ae, FILTER_VARIANTS as af, FLEX_VARIANTS as ag, FOLDER_PICK_LISTENER as ah, FORM_ASSET_FOLDER as ai, FileService as aj, FileUploadDirective as ak, FileUploadInputComponent as al, FlexComponent as am, FlexItemComponent as an, FormGroupComponent as ao, FrameComponent as ap, FreezeService as aq, GRID_BREAKPOINTS as ar, GetNavService as as, HeaderComponent$1 as at, HighlightDirective as au, HttpService as av, ICON_SOURCE as aw, IS_SIDE_PANEL as ax, IconComponent as ay, ImgComponent as az, TextOutputComponent as b, SectionAccordionGroupDirective as b$, NAV_DEFAULT_MURL as b0, NAV_ID_SEP as b1, NAV_MAIN_BUTTONS as b2, NAV_SEGMENT_RE as b3, NAV_STORE_REF as b4, NAV_WC_COMPONENTS as b5, NAV_WIDGET_MAP as b6, NavComponent as b7, NavDetailsComponent as b8, NavHeaderComponent as b9, PlaygroundComponent as bA, PositionDirective as bB, PwaInstallComponent as bC, ROOT_NAV$1 as bD, RadioGroupComponent as bE, RadioInputComponent as bF, RangeInputComponent as bG, RatingInputComponent as bH, ReactiveElementComponent as bI, RemoteComponent as bJ, RemoteLoaderService as bK, ResizeElementComponent as bL, RouteContainer as bM, RowComponent as bN, SEARCH_QUERY as bO, SEARCH_RESULTS_EVENT as bP, SECTION_ACCORDION_GROUP as bQ, SECTION_FORM_CONTEXT as bR, SHARED_ICONS as bS, SIZE_CONTEXT as bT, ScoreComponent as bU, ScrollComponent as bV, ScrollService as bW, SearchPanelComponent as bX, SearchStore as bY, SearchUserPanelComponent as bZ, SectionAccordionDirective as b_, NavMenuComponent as ba, NavStore as bb, NavTrailComponent as bc, NothingComponent as bd, NotificationElementComponent as be, NotificationGroupComponent as bf, NotificationPopupComponent as bg, NotificationService as bh, NotificationStore as bi, NotificationType as bj, NotificationWidgetComponent as bk, ONE_ASSET_BASE_URL as bl, OPTIONS_SOURCE as bm, OVERLAY_WIDGETS as bn, OneApp as bo, OptionsSourceDirective as bp, OverlayBodyComponent as bq, OverlayRef as br, OverlayService as bs, PLATFORM_BUTTON_NAV_IDS as bt, PLATFORM_EXTENSIBLE_NAV_IDS as bu, PLATFORM_NAV_MAP as bv, PLATFORM_ROOT_CHILDREN as bw, PaginationComponent as bx, PanelComponent as by, PercentagePipe as bz, ButtonComponent as c, USER_STORE_REF as c$, SectionBackComponent as c0, SectionBadgesComponent as c1, SectionButtonGroupComponent as c2, SectionCardComponent as c3, SectionCarouselComponent as c4, SectionComponent as c5, SectionFilterComponent as c6, SectionFilterGroupComponent as c7, SectionFilterMenuComponent as c8, SectionFilterPanelComponent as c9, StorageService as cA, StrokeLinecap as cB, StrokeLinejoin as cC, SummaryComponent as cD, SvgGeneratorComponent as cE, SvgGeneratorService as cF, SvgService as cG, TOTAL_COLUMNS as cH, TRANSLATION_SOURCE as cI, TableComponent as cJ, TechnicalMeterComponent as cK, TextInputComponent as cL, TextareaInputComponent as cM, ThemeComponent as cN, ThemeDataService as cO, ThemeService as cP, ThemeStore as cQ, TimeAgoPipe as cR, TimelineComponent as cS, ToggleButtonComponent as cT, ToggleInputComponent as cU, ToggleRadioInputComponent as cV, ToolTipDirective as cW, TooltipComponent as cX, TranslateService as cY, TreeGridComponent as cZ, URL_SEP as c_, SectionFilterRangePanelComponent as ca, SectionFooterComponent as cb, SectionFormComponent as cc, SectionFormItemComponent as cd, SectionHeaderComponent as ce, SectionHeroComponent as cf, SectionPaginationComponent as cg, SectionSearchComponent as ch, SectionStepperComponent as ci, SectionTabsComponent as cj, SectionToggleComponent as ck, SectionToggleItemDirective as cl, SelectableCardInputComponent as cm, SelectorDirective as cn, SettingsSearchBarComponent as co, SettingsSearchService as cp, ShapeComponent as cq, SharedStoreRegistry as cr, SidePanelDirective as cs, Size as ct, SocketStore as cu, SortComponent as cv, StatComponent as cw, StepComponent as cx, StepperComponent as cy, StepsComponent as cz, APP_CONTEXT_REF as d, getTreeGridRow as d$, USER_TAB_MAP as d0, UniverseComponent as d1, UserApiService as d2, UserAvatarComponent as d3, UserComponent as d4, UserNavComponent as d5, UserSettingsComponent as d6, UserStore as d7, WC_ROUTE_CHANGED_EVENT as d8, WC_SEARCH_GROUPS as d9, derivePropertyName as dA, emailValidation as dB, evaluate as dC, evaluateBool as dD, filterHoldsList as dE, filterHoldsOneBound as dF, filterHoldsOptions as dG, filterHoldsRange as dH, filterList as dI, filterNumber as dJ, filterNumberList as dK, filterOne as dL, filterPanelOf as dM, filterPanelWidth as dN, filterRange as dO, filterTreeGridRows as dP, filterValueList as dQ, filterValues as dR, flattenTreeGridRows as dS, formatBadgeCount as dT, fullName as dU, generateClipPath as dV, generateTransform as dW, getClassList as dX, getProperty as dY, getScrollParent as dZ, getTierFromPreviewPath as d_, WIN_USER_TAB_HOOK as da, WIN_USER_TAB_KEY as db, WatermarkComponent as dc, WcRouterStore as dd, WrapperInputComponent as de, anchorNavId as df, applyColorsToElement as dg, assetOptions as dh, bootstrapMagApp as di, bootstrapPwaInstall as dj, buildWcBaseUrl as dk, calculateLuminance as dl, calculateRanks as dm, cellText as dn, checkFilterCondition as dp, childNavId as dq, classListSignal as dr, coerceSize as ds, cornerEdge as dt, cornerSide as du, createMap as dv, createPlatformNavMap as dw, deriveAvatarGradient as dx, deriveContrastColor as dy, deriveOppositeColor as dz, ASSET_BASE_URL as e, provideMagAppConfig as e$, getUniqueId as e0, getValue as e1, hasErrorComputed as e2, hexToRgb as e3, hslToRgb$1 as e4, initMagmoniumApp as e5, initialNotificationState as e6, initialState$2 as e7, initials as e8, injectAuthenticate as e9, maxValidation as eA, mergePlatformNav as eB, mergeUnique as eC, mergeUniqueBy as eD, mergeUniqueWith as eE, minAgeValidation as eF, minLengthValidation as eG, minValidation as eH, miniMarkToHtml as eI, navIdChain as eJ, navIdFor as eK, navIdSegment as eL, navIdToRoutePath as eM, navIdToSegments as eN, navParamOf as eO, navToId as eP, normalizeAssetOptions as eQ, parentNavId as eR, parseAddress as eS, parseColor as eT, parsePatternNames as eU, patternValidation as eV, patternsValidation as eW, platformNavWidgets as eX, privateGuard as eY, processImageToSvg as eZ, provideAppContext as e_, injectInstallApp as ea, injectParentSize as eb, injectScrollSticky as ec, isButtonName as ed, isCancelledComputed as ee, isExtensiblePlatformNavId as ef, isJson as eg, isLoadingComputed as eh, isLocalhost as ei, isNavInstanceConfig as ej, isNavMenuConfig as ek, isNavRowsConfig as el, isPlatformNavId as em, isSize as en, isTierPreview as eo, isUrlLocalhost as ep, isValidNavId as eq, isValidNavSegment as er, isWebComponent as es, linkToId as et, linkToNav as eu, loadingActions as ev, mInterceptor as ew, manualValidation as ex, matchFieldValidation as ey, maxLengthValidation as ez, AccordionBodyDirective as f, provideMagWcConfig as f0, provideMagWcRoutes as f1, provideModalComponents as f2, provideMurlUrlSerializer as f3, provideNavWidgets as f4, provideOverlayWidgets as f5, providePlatformNavWidgets as f6, provideSearch as f7, provideSizeContext as f8, provideUserTabs as f9, toLocalNavId as fA, toggleTreeGridRow as fB, unfetchedPlatformNav as fC, urlValidation as fD, publicGuard as fa, readFieldPatterns as fb, renderAddress as fc, requiredValidation as fd, resolveConfigAsset as fe, resolveIconSize as ff, resolvePallet as fg, resolvePatternRules as fh, resolveSize as fi, rgbToHex as fj, rgbToHsl as fk, rowHasChildren as fl, samePatterns as fm, segmentsToNavId as fn, setProperty as fo, setTreeGridChildren as fp, settingsWidgets as fq, shouldShowBadge as fr, splitNavId as fs, splitOnMatch as ft, stringToColor as fu, toAttrBool as fv, toAttrNumber as fw, toCssLength as fx, toHostNavId as fy, toLength$1 as fz, AccordionComponent as g, AccordionGroupComponent as h, ActionComponent as i, AnimatedGraphsComponent as j, AppCardComponent as k, AppRelationType as l, AppTileComponent as m, AssetStore as n, AssetUrlPipe as o, Assets as p, AuthActivityPageComponent as q, AuthApiService as r, AuthStore as s, AutosizeDirective as t, BadgeComponent as u, BandingComponent as v, BaseArrayInputComponent as w, BaseRootWebComponent as x, BaseWebComponent as y, ButtonGroupComponent as z };
|
|
34976
|
-
//# sourceMappingURL=magmonium-one-magmonium-one-
|
|
35021
|
+
//# sourceMappingURL=magmonium-one-magmonium-one-NPMk122K.mjs.map
|