@ifsworld/granite-components 12.0.0 → 12.1.1

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.
@@ -1,11 +1,11 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { Contact, ContactOptions } from '../contacts-types/contacts.component.public-types';
2
+ import { SelectedContact } from '../contacts-types/contacts.component.public-types';
3
3
  import { ContactExtended } from '../contacts-types/contacts.component.private-types';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class GraniteContactItemComponent {
6
6
  contact: ContactExtended;
7
- selectedContact: EventEmitter<Contact | ContactOptions>;
8
- emitSelectedContact(contact: ContactExtended): void;
7
+ readonly selectedContact: EventEmitter<SelectedContact>;
8
+ emitSelectedContact(selectedContact: SelectedContact): void;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<GraniteContactItemComponent, never>;
10
10
  static ɵcmp: i0.ɵɵComponentDeclaration<GraniteContactItemComponent, "granite-contact-item", never, { "contact": { "alias": "contact"; "required": false; }; }, { "selectedContact": "selectedContact"; }, never, never, false, never>;
11
11
  }
@@ -12,10 +12,15 @@ export interface Contact {
12
12
  label: string;
13
13
  iconName?: string;
14
14
  status?: ContactDefaultStatuses | string;
15
- options?: ContactOptions[];
15
+ options?: ContactOption[];
16
16
  disabled?: boolean;
17
+ data?: unknown;
17
18
  }
18
- export type ContactOptions = Omit<Contact, 'options'>;
19
+ export interface SelectedContact {
20
+ contact: ContactOption;
21
+ parent?: Contact;
22
+ }
23
+ export type ContactOption = Omit<Contact, 'options'>;
19
24
  export interface Profile {
20
25
  name?: string;
21
26
  surname?: string;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter, QueryList, AfterContentChecked, OnChanges, SimpleChanges } from '@angular/core';
2
- import { Contact, ContactOptions, Profile } from './contacts-types/contacts.component.public-types';
2
+ import { Contact, Profile, SelectedContact } from './contacts-types/contacts.component.public-types';
3
3
  import { ContactsTriggerDataComponent } from './contacts-trigger/contacts-trigger-data';
4
4
  import { GraniteCustomStatusDirective } from './custom-status.directive';
5
5
  import { ContactExtended } from './contacts-types/contacts.component.private-types';
@@ -10,13 +10,13 @@ export declare class GraniteContactsComponent extends ContactsTriggerDataCompone
10
10
  profile: Profile | unknown;
11
11
  profileClass: string;
12
12
  defaultShow: boolean;
13
- readonly selectedContact: EventEmitter<Contact | ContactOptions>;
13
+ readonly selectedContact: EventEmitter<SelectedContact>;
14
14
  _customStatuses: QueryList<GraniteCustomStatusDirective>;
15
15
  customProfileDirective: GraniteCustomProfileDirective;
16
16
  _contactsExtended: ContactExtended[];
17
17
  ngOnChanges(changes: SimpleChanges): void;
18
18
  ngAfterContentChecked(): void;
19
- onSelectedContact(contact: Contact | ContactOptions): void;
19
+ onSelectedContact(contact: SelectedContact): void;
20
20
  private setProperCustomStatusTemplates;
21
21
  private applyTemplates;
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<GraniteContactsComponent, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ifsworld/granite-components",
3
- "version": "12.0.0",
3
+ "version": "12.1.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": ">=17.3.4",