@magmonium/one 0.2.47 → 0.2.49
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-CSXqQSjH.mjs} +85 -24
- package/fesm2022/magmonium-one-magmonium-one-CSXqQSjH.mjs.map +1 -0
- package/fesm2022/{magmonium-one-otp-B_s_yv6h.mjs → magmonium-one-otp-DCDSkq9D.mjs} +2 -2
- package/fesm2022/{magmonium-one-otp-B_s_yv6h.mjs.map → magmonium-one-otp-DCDSkq9D.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-BPHpE0Y5.mjs → magmonium-one-password-x0jlYhku.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-BPHpE0Y5.mjs.map → magmonium-one-password-x0jlYhku.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-toggle-DzQFBc6i.mjs → magmonium-one-toggle-CCaLEJ8V.mjs} +2 -2
- package/fesm2022/{magmonium-one-toggle-DzQFBc6i.mjs.map → magmonium-one-toggle-CCaLEJ8V.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +12 -4
- package/fesm2022/magmonium-one-magmonium-one-IbM56bN9.mjs.map +0 -1
|
@@ -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-CCaLEJ8V.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-x0jlYhku.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-DCDSkq9D.mjs');
|
|
7011
7011
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
7012
7012
|
break;
|
|
7013
7013
|
}
|
|
@@ -8736,7 +8736,7 @@ let HeaderComponent$1 = class HeaderComponent {
|
|
|
8736
8736
|
</h6>
|
|
8737
8737
|
}
|
|
8738
8738
|
}
|
|
8739
|
-
`, isInline: true, 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)}}.header__heading{display:flex;flex-direction:row;align-items:center;justify-content:var(--m-header-justify, flex-start);gap:.75rem;margin:0;padding:0;line-height:1.1;font-weight:800;letter-spacing:-.025em;color:var(--m-header-color, var(--m-text));transition:transform .2s cubic-bezier(.4,0,.2,1)}.header__heading:hover{transform:translate(2px)}.header__action{margin-left:auto}.header__action span{display:inline-block;vertical-align:middle}h1.header__heading{font-size:2.25rem;font-weight:300;color:var(--m-text-quaternary);letter-spacing:-.035em;line-height:1.15}h2.header__heading{font-size:1.75rem;font-weight:300;color:var(--m-text-tertiary);letter-spacing:-.03em;line-height:1.2}h3.header__heading{font-size:1.375rem;font-weight:400;color:var(--m-text-secondary);letter-spacing:-.025em}h4.header__heading{font-size:1.125rem;font-weight:500;color:var(--m-text);letter-spacing:-.02em}h5.header__heading{font-size:1rem;font-weight:600;color:var(--m-text);letter-spacing:-.01em}h6.header__heading{font-size
|
|
8739
|
+
`, isInline: true, 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)}}.header__heading{display:flex;flex-direction:row;align-items:center;justify-content:var(--m-header-justify, flex-start);gap:.75rem;margin:0;padding:0;line-height:1.1;font-weight:800;letter-spacing:-.025em;color:var(--m-header-color, var(--m-text));transition:transform .2s cubic-bezier(.4,0,.2,1)}.header__heading:hover{transform:translate(2px)}.header__action{margin-left:auto}.header__action span{display:inline-block;vertical-align:middle}h1.header__heading{font-size:var(--m-header-font-size, 2.25rem);font-weight:300;color:var(--m-text-quaternary);letter-spacing:-.035em;line-height:1.15}h2.header__heading{font-size:var(--m-header-font-size, 1.75rem);font-weight:300;color:var(--m-text-tertiary);letter-spacing:-.03em;line-height:1.2}h3.header__heading{font-size:var(--m-header-font-size, 1.375rem);font-weight:400;color:var(--m-text-secondary);letter-spacing:-.025em}h4.header__heading{font-size:var(--m-header-font-size, 1.125rem);font-weight:500;color:var(--m-text);letter-spacing:-.02em}h5.header__heading{font-size:var(--m-header-font-size, 1rem);font-weight:600;color:var(--m-text);letter-spacing:-.01em}h6.header__heading{font-size:var(--m-header-font-size, .875rem);font-weight:600;color:var(--m-text);letter-spacing:.05em;text-transform:uppercase}\n"], dependencies: [{ kind: "component", type: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8740
8740
|
};
|
|
8741
8741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HeaderComponent$1, decorators: [{
|
|
8742
8742
|
type: Component,
|
|
@@ -8797,7 +8797,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
8797
8797
|
</h6>
|
|
8798
8798
|
}
|
|
8799
8799
|
}
|
|
8800
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, 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)}}.header__heading{display:flex;flex-direction:row;align-items:center;justify-content:var(--m-header-justify, flex-start);gap:.75rem;margin:0;padding:0;line-height:1.1;font-weight:800;letter-spacing:-.025em;color:var(--m-header-color, var(--m-text));transition:transform .2s cubic-bezier(.4,0,.2,1)}.header__heading:hover{transform:translate(2px)}.header__action{margin-left:auto}.header__action span{display:inline-block;vertical-align:middle}h1.header__heading{font-size:2.25rem;font-weight:300;color:var(--m-text-quaternary);letter-spacing:-.035em;line-height:1.15}h2.header__heading{font-size:1.75rem;font-weight:300;color:var(--m-text-tertiary);letter-spacing:-.03em;line-height:1.2}h3.header__heading{font-size:1.375rem;font-weight:400;color:var(--m-text-secondary);letter-spacing:-.025em}h4.header__heading{font-size:1.125rem;font-weight:500;color:var(--m-text);letter-spacing:-.02em}h5.header__heading{font-size:1rem;font-weight:600;color:var(--m-text);letter-spacing:-.01em}h6.header__heading{font-size
|
|
8800
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, 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)}}.header__heading{display:flex;flex-direction:row;align-items:center;justify-content:var(--m-header-justify, flex-start);gap:.75rem;margin:0;padding:0;line-height:1.1;font-weight:800;letter-spacing:-.025em;color:var(--m-header-color, var(--m-text));transition:transform .2s cubic-bezier(.4,0,.2,1)}.header__heading:hover{transform:translate(2px)}.header__action{margin-left:auto}.header__action span{display:inline-block;vertical-align:middle}h1.header__heading{font-size:var(--m-header-font-size, 2.25rem);font-weight:300;color:var(--m-text-quaternary);letter-spacing:-.035em;line-height:1.15}h2.header__heading{font-size:var(--m-header-font-size, 1.75rem);font-weight:300;color:var(--m-text-tertiary);letter-spacing:-.03em;line-height:1.2}h3.header__heading{font-size:var(--m-header-font-size, 1.375rem);font-weight:400;color:var(--m-text-secondary);letter-spacing:-.025em}h4.header__heading{font-size:var(--m-header-font-size, 1.125rem);font-weight:500;color:var(--m-text);letter-spacing:-.02em}h5.header__heading{font-size:var(--m-header-font-size, 1rem);font-weight:600;color:var(--m-text);letter-spacing:-.01em}h6.header__heading{font-size:var(--m-header-font-size, .875rem);font-weight:600;color:var(--m-text);letter-spacing:.05em;text-transform:uppercase}\n"] }]
|
|
8801
8801
|
}], propDecorators: { level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], actionButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionButton", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], noTranslate: [{ type: i0.Input, args: [{ isSignal: true, alias: "noTranslate", required: false }] }], params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }] } });
|
|
8802
8802
|
|
|
8803
8803
|
const SECTION_CONTEXT = new InjectionToken('SECTION_CONTEXT');
|
|
@@ -15525,10 +15525,18 @@ const UserStore = signalStore({ providedIn: 'root' }, withState(initialUserState
|
|
|
15525
15525
|
};
|
|
15526
15526
|
}));
|
|
15527
15527
|
|
|
15528
|
+
// A name is stored however it was typed — `john`, `JOHN`, `mcdonald` — and a
|
|
15529
|
+
// row of people reads as one list only when every name starts the same way.
|
|
15530
|
+
// Only the first letter of each word moves: lowercasing the rest would turn
|
|
15531
|
+
// `McDonald` into `Mcdonald`, which is a different person's name.
|
|
15532
|
+
function capitalizeName(value) {
|
|
15533
|
+
return value.replace(/(^|[\s'-])(\p{L})/gu, (_, sep, ch) => sep + ch.toLocaleUpperCase());
|
|
15534
|
+
}
|
|
15528
15535
|
function fullName(user) {
|
|
15529
15536
|
if (!user)
|
|
15530
15537
|
return '';
|
|
15531
|
-
|
|
15538
|
+
const name = `${user.firstName ?? ''} ${user.lastName ?? ''}`.trim();
|
|
15539
|
+
return capitalizeName(name);
|
|
15532
15540
|
}
|
|
15533
15541
|
function initials(user) {
|
|
15534
15542
|
if (!user)
|
|
@@ -15598,7 +15606,7 @@ class UserAvatarComponent {
|
|
|
15598
15606
|
<span class="user-avatar-initials">{{ abbr() }}</span>
|
|
15599
15607
|
}
|
|
15600
15608
|
<ng-content />
|
|
15601
|
-
`, isInline: true, 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)}}:host{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;width:
|
|
15609
|
+
`, isInline: true, 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)}}:host{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;width:2.5em;height:2.5em;flex:0 0 auto;background:var(--m-background-lite, #f3f4f6);color:var(--m-text-secondary, #4b5563);border:1px solid var(--m-border, rgba(0, 0, 0, .08));box-shadow:none;transition:transform .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;box-sizing:border-box}@media(hover:hover){:host:hover{transform:scale(1.04);border-color:var(--m-text-secondary, rgba(0, 0, 0, .15))}}:host(.user-avatar--has-gradient){color:#fff;border-color:#ffffff26}@media(hover:hover){:host(.user-avatar--has-gradient):hover{border-color:#ffffff4d}}:host(.user-avatar--square){border-radius:20%}:host(.user-avatar--rounded){border-radius:50%}.user-avatar-initials{color:inherit;font-family:Outfit,Inter,system-ui,-apple-system,sans-serif;font-size:.9em;font-weight:700;letter-spacing:-.01em;text-transform:uppercase;z-index:2;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: ImgComponent, selector: "m-img", inputs: ["src", "data", "dataType", "alt", "priority", "fill", "width", "height", "remote", "ngSrcset", "sizes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15602
15610
|
}
|
|
15603
15611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: UserAvatarComponent, decorators: [{
|
|
15604
15612
|
type: Component,
|
|
@@ -15612,9 +15620,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15612
15620
|
`, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
15613
15621
|
'[style.background]': 'gradient()',
|
|
15614
15622
|
'[class]': 'hostClass()',
|
|
15615
|
-
}, 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)}}:host{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;width:
|
|
15623
|
+
}, 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)}}:host{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;width:2.5em;height:2.5em;flex:0 0 auto;background:var(--m-background-lite, #f3f4f6);color:var(--m-text-secondary, #4b5563);border:1px solid var(--m-border, rgba(0, 0, 0, .08));box-shadow:none;transition:transform .2s cubic-bezier(.4,0,.2,1),border-color .2s ease;box-sizing:border-box}@media(hover:hover){:host:hover{transform:scale(1.04);border-color:var(--m-text-secondary, rgba(0, 0, 0, .15))}}:host(.user-avatar--has-gradient){color:#fff;border-color:#ffffff26}@media(hover:hover){:host(.user-avatar--has-gradient):hover{border-color:#ffffff4d}}:host(.user-avatar--square){border-radius:20%}:host(.user-avatar--rounded){border-radius:50%}.user-avatar-initials{color:inherit;font-family:Outfit,Inter,system-ui,-apple-system,sans-serif;font-size:.9em;font-weight:700;letter-spacing:-.01em;text-transform:uppercase;z-index:2;-webkit-user-select:none;user-select:none}\n"] }]
|
|
15616
15624
|
}], propDecorators: { user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
15617
15625
|
|
|
15626
|
+
// Under DesignMode a UserControl whose four values are all still empty has no
|
|
15627
|
+
// name to draw, and an avatar over a blank line reads as broken rather than as
|
|
15628
|
+
// unfilled. A stub gives the author the shape of the row they are placing —
|
|
15629
|
+
// deliberately not translated, it stands in for data and never renders on a
|
|
15630
|
+
// real page.
|
|
15631
|
+
const DESIGN_STUB$1 = { firstName: 'Firstname', lastName: 'Lastname' };
|
|
15618
15632
|
class UserComponent {
|
|
15619
15633
|
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
15620
15634
|
user = input(undefined, ...(ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []));
|
|
@@ -15622,14 +15636,16 @@ class UserComponent {
|
|
|
15622
15636
|
lastName = input('', ...(ngDevMode ? [{ debugName: "lastName" }] : /* istanbul ignore next */ []));
|
|
15623
15637
|
profilePic = input('', ...(ngDevMode ? [{ debugName: "profilePic" }] : /* istanbul ignore next */ []));
|
|
15624
15638
|
#userStore = inject(UserStore);
|
|
15639
|
+
#isDesignMode = !!inject(IS_DESIGN_MODE, { optional: true });
|
|
15625
15640
|
resolvedUser = computed(() => {
|
|
15626
15641
|
const id = this.id();
|
|
15627
15642
|
const base = this.user() ?? (id ? this.#userStore.get(id)() : undefined);
|
|
15628
15643
|
const firstName = this.firstName();
|
|
15629
15644
|
const lastName = this.lastName();
|
|
15630
15645
|
const profilePic = this.profilePic();
|
|
15631
|
-
if (!base && !firstName && !lastName && !profilePic)
|
|
15632
|
-
return undefined;
|
|
15646
|
+
if (!base && !firstName && !lastName && !profilePic) {
|
|
15647
|
+
return this.#isDesignMode ? DESIGN_STUB$1 : undefined;
|
|
15648
|
+
}
|
|
15633
15649
|
return {
|
|
15634
15650
|
...base,
|
|
15635
15651
|
id: base?.id ?? id,
|
|
@@ -15685,7 +15701,7 @@ class UserComponent {
|
|
|
15685
15701
|
}
|
|
15686
15702
|
</div>
|
|
15687
15703
|
</div>
|
|
15688
|
-
`, isInline: true, 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)}}.user-profile{display:flex;align-items:flex-start;gap
|
|
15704
|
+
`, isInline: true, 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)}}.user-profile{display:flex;align-items:flex-start;gap:.75em;padding:.25em;border-radius:.75em;transition:all .3s cubic-bezier(.4,0,.2,1)}.user-avatar{display:flex;flex:0 0 auto}.user-info{display:flex;flex-direction:column;align-items:flex-start;gap:.15em;flex:1;min-width:0}.user-header{display:flex;align-items:center;gap:.75em;flex-wrap:wrap}.user-content{display:contents}.user-info:has(.user-content>*) .user-meta,.user-info:has(.user-content>*) .user-meta-loading{display:none}m-header{--m-header-font-size: 1em;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-meta{display:flex;align-items:center;gap:.4em;color:var(--m-text-secondary);font-size:.8em;font-weight:600;line-height:1.2;opacity:.8}.user-meta-item{display:flex;align-items:center}.user-meta-divider{width:.2em;height:.2em;border-radius:50%;background:var(--m-text-tertiary);opacity:.4}.user-name-loading,.user-meta-loading{border-radius:.35em;background:var(--m-text-tertiary);opacity:.15;animation:user-skeleton-pulse 1.4s ease-in-out infinite}.user-name-loading{width:8em;height:1.2em}.user-meta-loading{width:5em;height:.96em}@keyframes user-skeleton-pulse{0%,to{opacity:.15}50%{opacity:.28}}\n"], dependencies: [{ kind: "component", type: UserAvatarComponent, selector: "m-user-avatar", inputs: ["user", "variant"] }, { kind: "component", type: HeaderComponent$1, selector: "m-header", inputs: ["level", "label", "actionButton", "actionLabel", "noTranslate", "params"], outputs: ["actionClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15689
15705
|
}
|
|
15690
15706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: UserComponent, decorators: [{
|
|
15691
15707
|
type: Component,
|
|
@@ -15722,7 +15738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15722
15738
|
}
|
|
15723
15739
|
</div>
|
|
15724
15740
|
</div>
|
|
15725
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, 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)}}.user-profile{display:flex;align-items:flex-start;gap
|
|
15741
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, 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)}}.user-profile{display:flex;align-items:flex-start;gap:.75em;padding:.25em;border-radius:.75em;transition:all .3s cubic-bezier(.4,0,.2,1)}.user-avatar{display:flex;flex:0 0 auto}.user-info{display:flex;flex-direction:column;align-items:flex-start;gap:.15em;flex:1;min-width:0}.user-header{display:flex;align-items:center;gap:.75em;flex-wrap:wrap}.user-content{display:contents}.user-info:has(.user-content>*) .user-meta,.user-info:has(.user-content>*) .user-meta-loading{display:none}m-header{--m-header-font-size: 1em;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-meta{display:flex;align-items:center;gap:.4em;color:var(--m-text-secondary);font-size:.8em;font-weight:600;line-height:1.2;opacity:.8}.user-meta-item{display:flex;align-items:center}.user-meta-divider{width:.2em;height:.2em;border-radius:50%;background:var(--m-text-tertiary);opacity:.4}.user-name-loading,.user-meta-loading{border-radius:.35em;background:var(--m-text-tertiary);opacity:.15;animation:user-skeleton-pulse 1.4s ease-in-out infinite}.user-name-loading{width:8em;height:1.2em}.user-meta-loading{width:5em;height:.96em}@keyframes user-skeleton-pulse{0%,to{opacity:.15}50%{opacity:.28}}\n"] }]
|
|
15726
15742
|
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], firstName: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstName", required: false }] }], lastName: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastName", required: false }] }], profilePic: [{ type: i0.Input, args: [{ isSignal: true, alias: "profilePic", required: false }] }] } });
|
|
15727
15743
|
|
|
15728
15744
|
const checkPassword = (value, password) => {
|
|
@@ -20562,7 +20578,7 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20562
20578
|
break;
|
|
20563
20579
|
}
|
|
20564
20580
|
case InputType.TOGGLE: {
|
|
20565
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
20581
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-CCaLEJ8V.mjs');
|
|
20566
20582
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
20567
20583
|
break;
|
|
20568
20584
|
}
|
|
@@ -20574,12 +20590,12 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20574
20590
|
break;
|
|
20575
20591
|
}
|
|
20576
20592
|
case InputType.PASSWORD: {
|
|
20577
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
20593
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-x0jlYhku.mjs');
|
|
20578
20594
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
20579
20595
|
break;
|
|
20580
20596
|
}
|
|
20581
20597
|
case InputType.OTP: {
|
|
20582
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
20598
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-DCDSkq9D.mjs');
|
|
20583
20599
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
20584
20600
|
break;
|
|
20585
20601
|
}
|
|
@@ -32293,7 +32309,13 @@ function provideMagWcConfig(options) {
|
|
|
32293
32309
|
},
|
|
32294
32310
|
},
|
|
32295
32311
|
provideZonelessChangeDetection(),
|
|
32296
|
-
|
|
32312
|
+
// `always` rather than the default `emptyOnly`: a child route rendered in
|
|
32313
|
+
// a parent Page's RouterOutlet declares its own component, so without it
|
|
32314
|
+
// Angular hands the child none of the parent's `:params` and
|
|
32315
|
+
// `withComponentInputBinding()` has nothing to put in the child's input.
|
|
32316
|
+
// A Page nested under `app/:id` reads `id` the same way a flat
|
|
32317
|
+
// `app/:id/about` does, which is the one rule the editor can state.
|
|
32318
|
+
provideRouter(options.routes, withComponentInputBinding(), withRouterConfig({ paramsInheritanceStrategy: 'always' })),
|
|
32297
32319
|
provideMurlUrlSerializer(),
|
|
32298
32320
|
provideHttpClient(withFetch(), withInterceptors([mInterceptor])),
|
|
32299
32321
|
provideAppInitializer(initMagmoniumApp({
|
|
@@ -32454,7 +32476,13 @@ function provideMagAppConfig(options) {
|
|
|
32454
32476
|
return {
|
|
32455
32477
|
providers: [
|
|
32456
32478
|
provideBrowserGlobalErrorListeners(),
|
|
32457
|
-
|
|
32479
|
+
// `always` rather than the default `emptyOnly`: a child route rendered in
|
|
32480
|
+
// a parent Page's RouterOutlet declares its own component, so without it
|
|
32481
|
+
// Angular hands the child none of the parent's `:params` and
|
|
32482
|
+
// `withComponentInputBinding()` has nothing to put in the child's input.
|
|
32483
|
+
// A Page nested under `app/:id` reads `id` the same way a flat
|
|
32484
|
+
// `app/:id/about` does, which is the one rule the editor can state.
|
|
32485
|
+
provideRouter(options.routes, withComponentInputBinding(), withRouterConfig({ paramsInheritanceStrategy: 'always' })),
|
|
32458
32486
|
provideMurlUrlSerializer(),
|
|
32459
32487
|
provideZonelessChangeDetection(),
|
|
32460
32488
|
provideAnimations(),
|
|
@@ -34434,6 +34462,7 @@ const initialState = {
|
|
|
34434
34462
|
commentMap: new Map(),
|
|
34435
34463
|
cursorMap: new Map(),
|
|
34436
34464
|
sourceToItemsMap: new Map(),
|
|
34465
|
+
sourceToCountMap: new Map(),
|
|
34437
34466
|
loadingSources: new Set(),
|
|
34438
34467
|
expandingCursors: new Set(),
|
|
34439
34468
|
submittingSources: new Set(),
|
|
@@ -34459,7 +34488,7 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34459
34488
|
load: rxMethod(pipe(filter((sourceId) => !store.sourceToItemsMap().has(sourceId)), // skip if cached
|
|
34460
34489
|
tap((sourceId) => patchState(store, (s) => ({
|
|
34461
34490
|
loadingSources: new Set([...s.loadingSources, sourceId]),
|
|
34462
|
-
}))), switchMap$1((sourceId) => api.list(sourceId).pipe(tap(({ items }) => {
|
|
34491
|
+
}))), switchMap$1((sourceId) => api.list(sourceId).pipe(tap(({ items, commentCount }) => {
|
|
34463
34492
|
const { commentMap, cursorMap, orderedIds } = ingestItems(items);
|
|
34464
34493
|
patchState(store, (s) => ({
|
|
34465
34494
|
commentMap: new Map([...s.commentMap, ...commentMap]),
|
|
@@ -34468,6 +34497,10 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34468
34497
|
...s.sourceToItemsMap,
|
|
34469
34498
|
[sourceId, orderedIds],
|
|
34470
34499
|
]),
|
|
34500
|
+
sourceToCountMap: new Map([
|
|
34501
|
+
...s.sourceToCountMap,
|
|
34502
|
+
[sourceId, commentCount],
|
|
34503
|
+
]),
|
|
34471
34504
|
loadingSources: new Set([...s.loadingSources].filter((id) => id !== sourceId)),
|
|
34472
34505
|
}));
|
|
34473
34506
|
}), catchError(() => {
|
|
@@ -34479,7 +34512,7 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34479
34512
|
// ── Expand cursor: replace token in source list with new items ───────
|
|
34480
34513
|
expandCursor: rxMethod(pipe(tap(({ token }) => patchState(store, (s) => ({
|
|
34481
34514
|
expandingCursors: new Set([...s.expandingCursors, token]),
|
|
34482
|
-
}))), switchMap$1(({ sourceId, token }) => api.list(sourceId, token).pipe(tap(({ items: newItems }) => {
|
|
34515
|
+
}))), switchMap$1(({ sourceId, token }) => api.list(sourceId, token).pipe(tap(({ items: newItems, commentCount }) => {
|
|
34483
34516
|
const { commentMap, cursorMap, orderedIds: newIds, } = ingestItems(newItems);
|
|
34484
34517
|
patchState(store, (s) => {
|
|
34485
34518
|
const list = s.sourceToItemsMap.get(sourceId) ?? [];
|
|
@@ -34501,6 +34534,10 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34501
34534
|
...s.sourceToItemsMap,
|
|
34502
34535
|
[sourceId, updatedList],
|
|
34503
34536
|
]),
|
|
34537
|
+
sourceToCountMap: new Map([
|
|
34538
|
+
...s.sourceToCountMap,
|
|
34539
|
+
[sourceId, commentCount],
|
|
34540
|
+
]),
|
|
34504
34541
|
expandingCursors: new Set([...s.expandingCursors].filter((t) => t !== token)),
|
|
34505
34542
|
};
|
|
34506
34543
|
});
|
|
@@ -34526,12 +34563,16 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34526
34563
|
[sourceId, [normalized.id, ...existingList]],
|
|
34527
34564
|
])
|
|
34528
34565
|
: s.sourceToItemsMap;
|
|
34566
|
+
const known = s.sourceToCountMap.get(sourceId);
|
|
34529
34567
|
return {
|
|
34530
34568
|
commentMap: new Map([
|
|
34531
34569
|
...s.commentMap,
|
|
34532
34570
|
[normalized.id, normalized],
|
|
34533
34571
|
]),
|
|
34534
34572
|
sourceToItemsMap,
|
|
34573
|
+
sourceToCountMap: known === undefined
|
|
34574
|
+
? s.sourceToCountMap
|
|
34575
|
+
: new Map([...s.sourceToCountMap, [sourceId, known + 1]]),
|
|
34535
34576
|
submittingSources: new Set([...s.submittingSources].filter((id) => id !== sourceId)),
|
|
34536
34577
|
};
|
|
34537
34578
|
})), catchError(() => {
|
|
@@ -34546,12 +34587,19 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34546
34587
|
const list = s.sourceToItemsMap.get(sourceId) ?? [];
|
|
34547
34588
|
const newCommentMap = new Map(s.commentMap);
|
|
34548
34589
|
newCommentMap.delete(commentId);
|
|
34590
|
+
const known = s.sourceToCountMap.get(sourceId);
|
|
34549
34591
|
return {
|
|
34550
34592
|
commentMap: newCommentMap,
|
|
34551
34593
|
sourceToItemsMap: new Map([
|
|
34552
34594
|
...s.sourceToItemsMap,
|
|
34553
34595
|
[sourceId, list.filter((id) => id !== commentId)],
|
|
34554
34596
|
]),
|
|
34597
|
+
sourceToCountMap: known === undefined
|
|
34598
|
+
? s.sourceToCountMap
|
|
34599
|
+
: new Map([
|
|
34600
|
+
...s.sourceToCountMap,
|
|
34601
|
+
[sourceId, Math.max(0, known - 1)],
|
|
34602
|
+
]),
|
|
34555
34603
|
};
|
|
34556
34604
|
});
|
|
34557
34605
|
try {
|
|
@@ -34559,7 +34607,7 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34559
34607
|
}
|
|
34560
34608
|
catch {
|
|
34561
34609
|
// Re-fetch on failure
|
|
34562
|
-
const { items } = await firstValueFrom(api.list(sourceId));
|
|
34610
|
+
const { items, commentCount } = await firstValueFrom(api.list(sourceId));
|
|
34563
34611
|
const { commentMap, cursorMap, orderedIds } = ingestItems(items);
|
|
34564
34612
|
patchState(store, (s) => ({
|
|
34565
34613
|
commentMap: new Map([...s.commentMap, ...commentMap]),
|
|
@@ -34568,6 +34616,10 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34568
34616
|
...s.sourceToItemsMap,
|
|
34569
34617
|
[sourceId, orderedIds],
|
|
34570
34618
|
]),
|
|
34619
|
+
sourceToCountMap: new Map([
|
|
34620
|
+
...s.sourceToCountMap,
|
|
34621
|
+
[sourceId, commentCount],
|
|
34622
|
+
]),
|
|
34571
34623
|
}));
|
|
34572
34624
|
}
|
|
34573
34625
|
},
|
|
@@ -34618,6 +34670,8 @@ const CommentsStore = signalStore({ providedIn: 'root' }, withState(initialState
|
|
|
34618
34670
|
.map((id) => (cMap.get(id) ?? curMap.get(id)))
|
|
34619
34671
|
.filter(Boolean);
|
|
34620
34672
|
},
|
|
34673
|
+
// undefined until the source's feed has been fetched at least once
|
|
34674
|
+
countFor: (sourceId) => store.sourceToCountMap().get(sourceId),
|
|
34621
34675
|
isLoading: (sourceId) => store.loadingSources().has(sourceId),
|
|
34622
34676
|
isSubmitting: (sourceId) => store.submittingSources().has(sourceId),
|
|
34623
34677
|
isExpanding: (token) => store.expandingCursors().has(token),
|
|
@@ -34682,6 +34736,13 @@ class CommentItemComponent {
|
|
|
34682
34736
|
#modalStore = inject(ModalStore);
|
|
34683
34737
|
currentUserId = computed(() => this.#loginStore.userId(), ...(ngDevMode ? [{ debugName: "currentUserId" }] : /* istanbul ignore next */ []));
|
|
34684
34738
|
isAuthor = computed(() => this.currentUserId() === this.comment().uid, ...(ngDevMode ? [{ debugName: "isAuthor" }] : /* istanbul ignore next */ []));
|
|
34739
|
+
// The feed no longer carries a per-comment reply count, so the toggle shows
|
|
34740
|
+
// until this comment's own feed comes back empty — and stays while expanded
|
|
34741
|
+
// so an empty thread can still be collapsed.
|
|
34742
|
+
hasReplies = computed(() => {
|
|
34743
|
+
const count = this.#store.countFor(this.comment().id);
|
|
34744
|
+
return this.showReplies() || count === undefined || count > 0;
|
|
34745
|
+
}, ...(ngDevMode ? [{ debugName: "hasReplies" }] : /* istanbul ignore next */ []));
|
|
34685
34746
|
replyDraft = signal('', ...(ngDevMode ? [{ debugName: "replyDraft" }] : /* istanbul ignore next */ []));
|
|
34686
34747
|
replyConfig = {
|
|
34687
34748
|
type: InputType.TEXTAREA,
|
|
@@ -34732,7 +34793,7 @@ class CommentItemComponent {
|
|
|
34732
34793
|
}
|
|
34733
34794
|
}
|
|
34734
34795
|
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 (
|
|
34796
|
+
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
34797
|
}
|
|
34737
34798
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommentItemComponent, decorators: [{
|
|
34738
34799
|
type: Component,
|
|
@@ -34744,7 +34805,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
34744
34805
|
ButtonComponent,
|
|
34745
34806
|
ContextMenuComponent,
|
|
34746
34807
|
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 (
|
|
34808
|
+
], 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
34809
|
}], 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
34810
|
|
|
34750
34811
|
class CommentsComponent {
|
|
@@ -34973,4 +35034,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
34973
35034
|
*/
|
|
34974
35035
|
|
|
34975
35036
|
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-
|
|
35037
|
+
//# sourceMappingURL=magmonium-one-magmonium-one-CSXqQSjH.mjs.map
|