@softheon/armature 21.10.1 → 21.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softheon/armature",
3
- "version": "21.10.1",
3
+ "version": "21.11.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.8.1"
6
6
  },
@@ -1261,8 +1261,9 @@ interface NavNodeAvailableBadge {
1261
1261
  /** Interface for badge update events */
1262
1262
  interface NavBadgeUpdate {
1263
1263
  nodeIndex: number;
1264
- value: string;
1264
+ value?: string;
1265
1265
  subIndex?: number;
1266
+ seen?: boolean;
1266
1267
  }
1267
1268
 
1268
1269
  /**
@@ -3179,6 +3180,12 @@ declare class SofNavPanelComponent implements OnInit, OnChanges, AfterViewInit {
3179
3180
  * @example { 0: '5', 2: '12' } - node at index 0 shows '5', node at index 2 shows '12'
3180
3181
  */
3181
3182
  badgeValues: WritableSignal<Record<number, string>>;
3183
+ /**
3184
+ * Badge seen signal
3185
+ * @description Map of node index to seen boolean
3186
+ * @example { 0: false, 2: true } - node at index 0 is unseen (bold), node at index 2 is seen (not bold)
3187
+ */
3188
+ badgeSeen: WritableSignal<Record<number, boolean>>;
3182
3189
  /** The nodes with badge configs */
3183
3190
  nodeBadges: WritableSignal<Array<NavNodeAvailableBadge>>;
3184
3191
  /** Emits the nodes with badge configs */
@@ -3214,18 +3221,31 @@ declare class SofNavPanelComponent implements OnInit, OnChanges, AfterViewInit {
3214
3221
  */
3215
3222
  getBadgeValue(index: number): string;
3216
3223
  /**
3217
- * Updates the badge value for a specific node or subnode
3224
+ * Gets the badge seen status for a specific node index
3225
+ * @param index The flattened node index (accounts for subnodes)
3226
+ * @returns True if seen (not bold), false if unseen (bold)
3227
+ */
3228
+ getBadgeSeen(index: number): boolean;
3229
+ /**
3230
+ * Updates the badge value and/or seen status for a specific node or subnode
3218
3231
  * @param nodeIndex The parent node index
3219
- * @param value The badge value to set
3232
+ * @param value The badge value to set (optional)
3233
+ * @param seen Whether the badge has been seen (optional)
3220
3234
  * @param subIndex The subnode index (optional, for subnodes only)
3221
3235
  * @example
3222
- * // Update a regular node badge
3223
- * updateBadgeValue(0, '5');
3236
+ * // Update both value and seen
3237
+ * updateBadge(0, '5', false);
3238
+ *
3239
+ * // Update only value (seen unchanged)
3240
+ * updateBadge(0, '5');
3241
+ *
3242
+ * // Update only seen (value unchanged)
3243
+ * updateBadge(0, undefined, true);
3224
3244
  *
3225
- * // Update a subnode badge
3226
- * updateBadgeValue(6, '12', 0); // 6th node, 1st subnode
3245
+ * // Update subnode badge
3246
+ * updateBadge(6, '12', false, 0);
3227
3247
  */
3228
- updateBadgeValue(nodeIndex: number, value: string, subIndex?: number): void;
3248
+ updateBadge(nodeIndex: number, value?: string, seen?: boolean, subIndex?: number): void;
3229
3249
  /**
3230
3250
  * Calculates the flattened index for a node or subnode
3231
3251
  * @param nodeIndex The parent node index
@@ -3809,7 +3829,7 @@ declare class SofStarRatingComponent {
3809
3829
  static ɵcmp: i0.ɵɵComponentDeclaration<SofStarRatingComponent, "sof-star-rating", never, { "rating": { "alias": "rating"; "required": false; }; "maxStars": { "alias": "maxStars"; "required": false; }; }, {}, never, never, false, never>;
3810
3830
  }
3811
3831
 
3812
- declare class SofBadgeComponent implements OnInit, OnChanges {
3832
+ declare class SofBadgeComponent implements OnInit {
3813
3833
  /** Whether to show bold background color not */
3814
3834
  bold: boolean;
3815
3835
  /** The language text or a key that will be shown in this component */
@@ -3831,8 +3851,6 @@ declare class SofBadgeComponent implements OnInit, OnChanges {
3831
3851
  iconAria: string;
3832
3852
  /** The icon aria label */
3833
3853
  tooltipData: BadgeTooltipData;
3834
- /** Whether or not the component has been init */
3835
- initialized: boolean;
3836
3854
  /**
3837
3855
  * Any logic related to ag grid cell renderer data can be added here
3838
3856
  * @note All `@Inputs` should be accepted through `params`
@@ -3840,12 +3858,6 @@ declare class SofBadgeComponent implements OnInit, OnChanges {
3840
3858
  agInit(params: any & SofBadgeComponent): void;
3841
3859
  /** On component init */
3842
3860
  ngOnInit(): void;
3843
- /**
3844
- * On component changes
3845
- * This method is used to help show the toggle in the Armature documentation
3846
- * TODO: Implement using signals
3847
- */
3848
- ngOnChanges(changes: any): void;
3849
3861
  /** Sets the icon based on badge type */
3850
3862
  private setIcon;
3851
3863
  static ɵfac: i0.ɵɵFactoryDeclaration<SofBadgeComponent, never>;