@propbinder/mobile-design 0.1.20 → 0.1.22

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/index.d.ts CHANGED
@@ -342,7 +342,7 @@ declare class DsMobilePageMainComponent extends MobilePageBase implements AfterV
342
342
  title: _angular_core.InputSignal<string>;
343
343
  headerTitle: _angular_core.InputSignal<string>;
344
344
  headerSubtitle: _angular_core.InputSignal<string>;
345
- avatarType: _angular_core.InputSignal<"photo" | "initials" | "icon">;
345
+ avatarType: _angular_core.InputSignal<"initials" | "photo" | "icon">;
346
346
  avatarInitials: _angular_core.InputSignal<string>;
347
347
  avatarSrc: _angular_core.InputSignal<string>;
348
348
  avatarIconName: _angular_core.InputSignal<string>;
@@ -676,7 +676,7 @@ declare class DsMobileCommentComponent {
676
676
  /**
677
677
  * Avatar type
678
678
  */
679
- avatarType: _angular_core.InputSignal<"photo" | "initials" | "icon">;
679
+ avatarType: _angular_core.InputSignal<"initials" | "photo" | "icon">;
680
680
  /**
681
681
  * Whether the comment is clickable
682
682
  */
@@ -689,6 +689,13 @@ declare class DsMobileCommentComponent {
689
689
  * Whether the comment is liked by current user
690
690
  */
691
691
  isLiked: _angular_core.ModelSignal<boolean>;
692
+ /**
693
+ * Emits when like is toggled (after UI is opdateret)
694
+ */
695
+ likeToggled: _angular_core.OutputEmitterRef<{
696
+ active: boolean;
697
+ count: number;
698
+ }>;
692
699
  /**
693
700
  * Number of likes
694
701
  */
@@ -752,7 +759,7 @@ declare class DsMobileCommentComponent {
752
759
  */
753
760
  handleMoreButtonClick(event: Event): void;
754
761
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DsMobileCommentComponent, never>;
755
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DsMobileCommentComponent, "ds-mobile-comment", never, { "authorName": { "alias": "authorName"; "required": true; "isSignal": true; }; "authorRole": { "alias": "authorRole"; "required": true; "isSignal": true; }; "timestamp": { "alias": "timestamp"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "avatarInitials": { "alias": "avatarInitials"; "required": false; "isSignal": true; }; "avatarType": { "alias": "avatarType"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "isOwnComment": { "alias": "isOwnComment"; "required": false; "isSignal": true; }; "isLiked": { "alias": "isLiked"; "required": false; "isSignal": true; }; "likeCount": { "alias": "likeCount"; "required": false; "isSignal": true; }; }, { "isLiked": "isLikedChange"; "likeCount": "likeCountChange"; "commentClick": "commentClick"; "replyClick": "replyClick"; "editClick": "editClick"; "longPress": "longPress"; }, never, never, true, never>;
762
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DsMobileCommentComponent, "ds-mobile-comment", never, { "authorName": { "alias": "authorName"; "required": true; "isSignal": true; }; "authorRole": { "alias": "authorRole"; "required": true; "isSignal": true; }; "timestamp": { "alias": "timestamp"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "avatarInitials": { "alias": "avatarInitials"; "required": false; "isSignal": true; }; "avatarType": { "alias": "avatarType"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "isOwnComment": { "alias": "isOwnComment"; "required": false; "isSignal": true; }; "isLiked": { "alias": "isLiked"; "required": false; "isSignal": true; }; "likeCount": { "alias": "likeCount"; "required": false; "isSignal": true; }; }, { "isLiked": "isLikedChange"; "likeToggled": "likeToggled"; "likeCount": "likeCountChange"; "commentClick": "commentClick"; "replyClick": "replyClick"; "editClick": "editClick"; "longPress": "longPress"; }, never, never, true, never>;
756
763
  }
757
764
 
758
765
  /**
@@ -780,7 +787,7 @@ declare class DsMobilePostComposerComponent {
780
787
  /**
781
788
  * Avatar type
782
789
  */
783
- avatarType: _angular_core.InputSignal<"photo" | "initials" | "icon">;
790
+ avatarType: _angular_core.InputSignal<"initials" | "photo" | "icon">;
784
791
  /**
785
792
  * Avatar photo source (for photo type)
786
793
  */
@@ -1185,7 +1192,7 @@ declare class DsMobileInteractiveListItemPostComponent {
1185
1192
  /**
1186
1193
  * Avatar type
1187
1194
  */
1188
- avatarType: _angular_core.InputSignal<"photo" | "initials" | "icon">;
1195
+ avatarType: _angular_core.InputSignal<"initials" | "photo" | "icon">;
1189
1196
  /**
1190
1197
  * Avatar photo source (for photo type)
1191
1198
  */
@@ -1482,7 +1489,7 @@ declare class DsMobileInteractiveListItemMessageComponent {
1482
1489
  /**
1483
1490
  * Avatar type
1484
1491
  */
1485
- avatarType: _angular_core.InputSignal<"photo" | "initials" | "icon">;
1492
+ avatarType: _angular_core.InputSignal<"initials" | "photo" | "icon">;
1486
1493
  /**
1487
1494
  * Avatar photo source (for photo type)
1488
1495
  */
@@ -2543,6 +2550,8 @@ interface PostDetailData {
2543
2550
  * ```
2544
2551
  */
2545
2552
  interface CommentData {
2553
+ /** Unique comment identifier */
2554
+ id?: string;
2546
2555
  /** Comment author name */
2547
2556
  authorName: string;
2548
2557
  /** Author role */
@@ -2600,6 +2609,17 @@ declare class DsMobilePostDetailModalComponent implements AfterViewInit, OnDestr
2600
2609
  postId: string;
2601
2610
  text: string;
2602
2611
  }) => void;
2612
+ onToggleCommentLike?: (payload: {
2613
+ commentId: string;
2614
+ active: boolean;
2615
+ }) => void;
2616
+ onEditComment?: (payload: {
2617
+ commentId: string;
2618
+ newText: string;
2619
+ }) => void;
2620
+ onDeleteComment?: (payload: {
2621
+ commentId: string;
2622
+ }) => void;
2603
2623
  /**
2604
2624
  * Loading state - when true, shows loading indicator
2605
2625
  * Set this to true while fetching post data from your API
@@ -2619,6 +2639,7 @@ declare class DsMobilePostDetailModalComponent implements AfterViewInit, OnDestr
2619
2639
  content: string;
2620
2640
  } | null>;
2621
2641
  editingComment: _angular_core.WritableSignal<{
2642
+ id?: string;
2622
2643
  authorName: string;
2623
2644
  originalContent: string;
2624
2645
  timestamp: string;
@@ -2679,7 +2700,16 @@ declare class DsMobilePostDetailModalComponent implements AfterViewInit, OnDestr
2679
2700
  /**
2680
2701
  * Handle edit comment
2681
2702
  */
2682
- handleEditComment(authorName: string, originalContent: string, timestamp: string): void;
2703
+ handleEditComment(comment: CommentData): void;
2704
+ /**
2705
+ * Handle comment like/unlike toggle
2706
+ * @param comment The comment being liked/unliked
2707
+ * @param ev Event data with active state and new count
2708
+ */
2709
+ handleCommentLikeToggle(comment: CommentData, ev: {
2710
+ active: boolean;
2711
+ count: number;
2712
+ }): void;
2683
2713
  /**
2684
2714
  * Close the modal
2685
2715
  */
@@ -2697,7 +2727,7 @@ declare class DsMobilePostDetailModalComponent implements AfterViewInit, OnDestr
2697
2727
  */
2698
2728
  handleCommentLongPress(authorName: string, content: string, isOwnComment: boolean): Promise<void>;
2699
2729
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DsMobilePostDetailModalComponent, never>;
2700
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DsMobilePostDetailModalComponent, "ds-mobile-post-detail-modal", never, { "postData": { "alias": "postData"; "required": false; }; "currentUserName": { "alias": "currentUserName"; "required": false; }; "currentUserInitialsInput": { "alias": "currentUserInitialsInput"; "required": false; }; "onSubmitComment": { "alias": "onSubmitComment"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, {}, never, never, true, never>;
2730
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DsMobilePostDetailModalComponent, "ds-mobile-post-detail-modal", never, { "postData": { "alias": "postData"; "required": false; }; "currentUserName": { "alias": "currentUserName"; "required": false; }; "currentUserInitialsInput": { "alias": "currentUserInitialsInput"; "required": false; }; "onSubmitComment": { "alias": "onSubmitComment"; "required": false; }; "onToggleCommentLike": { "alias": "onToggleCommentLike"; "required": false; }; "onEditComment": { "alias": "onEditComment"; "required": false; }; "onDeleteComment": { "alias": "onDeleteComment"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, {}, never, never, true, never>;
2701
2731
  }
2702
2732
 
2703
2733
  /**
@@ -2760,6 +2790,17 @@ declare class DsMobilePostDetailModalService {
2760
2790
  postId: string;
2761
2791
  text: string;
2762
2792
  }) => void;
2793
+ onToggleCommentLike?: (payload: {
2794
+ commentId: string;
2795
+ active: boolean;
2796
+ }) => void;
2797
+ onEditComment?: (payload: {
2798
+ commentId: string;
2799
+ newText: string;
2800
+ }) => void;
2801
+ onDeleteComment?: (payload: {
2802
+ commentId: string;
2803
+ }) => void;
2763
2804
  currentUserName?: string;
2764
2805
  currentUserInitials?: string;
2765
2806
  }): Promise<void>;
@@ -3197,7 +3238,7 @@ declare class DsMobileHandbookFolderMiniComponent {
3197
3238
  * ```
3198
3239
  */
3199
3240
  declare class DsTextInputComponent implements ControlValueAccessor {
3200
- type: _angular_core.InputSignal<"search" | "email" | "tel" | "url" | "password" | "text">;
3241
+ type: _angular_core.InputSignal<"search" | "text" | "email" | "tel" | "password" | "url">;
3201
3242
  placeholder: _angular_core.InputSignal<string>;
3202
3243
  disabled: _angular_core.InputSignal<boolean>;
3203
3244
  readonly: _angular_core.InputSignal<boolean>;
@@ -3205,7 +3246,7 @@ declare class DsTextInputComponent implements ControlValueAccessor {
3205
3246
  hasError: _angular_core.InputSignal<boolean>;
3206
3247
  errorMessage: _angular_core.InputSignal<string>;
3207
3248
  autocomplete: _angular_core.InputSignal<string>;
3208
- inputmode: _angular_core.InputSignal<"search" | "email" | "tel" | "url" | "text" | "numeric" | undefined>;
3249
+ inputmode: _angular_core.InputSignal<"search" | "text" | "email" | "tel" | "url" | "numeric" | undefined>;
3209
3250
  autoClearError: _angular_core.InputSignal<boolean>;
3210
3251
  validator: _angular_core.InputSignal<((value: string) => boolean) | null>;
3211
3252
  valueChange: _angular_core.OutputEmitterRef<string>;
@@ -3241,7 +3282,7 @@ declare class UserService {
3241
3282
  private _avatarSrc;
3242
3283
  private _profileMenuItems;
3243
3284
  readonly avatarInitials: _angular_core.Signal<string>;
3244
- readonly avatarType: _angular_core.Signal<"photo" | "initials" | "icon">;
3285
+ readonly avatarType: _angular_core.Signal<"initials" | "photo" | "icon">;
3245
3286
  readonly avatarSrc: _angular_core.Signal<string>;
3246
3287
  readonly profileMenuItems: _angular_core.Signal<ActionGroup[] | undefined>;
3247
3288
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@propbinder/mobile-design",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.0 || ^21.0.0",
6
6
  "@angular/core": "^20.3.0 || ^21.0.0"