@devsym/graph-toolkit-react 1.1.0 → 1.2.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.
@@ -8,9 +8,32 @@ import { IProvider } from '../providers/IProvider';
8
8
  */
9
9
  export declare const createGraphClient: (provider: IProvider) => Client;
10
10
  /**
11
- * Extract initials from a display name
11
+ * Person name fields used to derive avatar initials.
12
12
  */
13
- export declare const getInitials: (displayName?: string) => string;
13
+ export interface InitialsNameParts {
14
+ /**
15
+ * The person's first name.
16
+ */
17
+ givenName?: string | null;
18
+ /**
19
+ * The person's last name.
20
+ */
21
+ surname?: string | null;
22
+ /**
23
+ * The person's display name.
24
+ */
25
+ displayName?: string | null;
26
+ }
27
+ /**
28
+ * Extract initials from a person's name details.
29
+ *
30
+ * Prefers first and last name when available, and otherwise falls back to the
31
+ * display name using the first and last words.
32
+ *
33
+ * @param nameOrDisplayName - Person name details or a plain display name
34
+ * @returns The resolved initials
35
+ */
36
+ export declare const getInitials: (nameOrDisplayName?: InitialsNameParts | string) => string;
14
37
  /**
15
38
  * Convert a Microsoft Graph photo response into a data URL string when possible.
16
39
  *
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/utils/graph.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,SAAS,KAAG,MAWvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,cAAc,MAAM,KAAG,MASlD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAU,eAAe,OAAO,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CA0B1F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,KAAG,MAA0C,CAAC"}
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/utils/graph.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,SAAS,KAAG,MAWvD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GAAI,oBAAoB,iBAAiB,GAAG,MAAM,KAAG,MAiC5E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAU,eAAe,OAAO,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CA0B1F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,KAAG,MAA0C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devsym/graph-toolkit-react",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "React components for Microsoft Graph powered by Fluent UI",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -66,6 +66,7 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
+ "@fluentui/react-icons": "^2.0.331",
69
70
  "@microsoft/microsoft-graph-client": "^3.0.7",
70
71
  "@microsoft/microsoft-graph-types": "^2.40.0"
71
72
  },
@@ -100,4 +101,4 @@
100
101
  "vite-plugin-dts": "^5.0.3",
101
102
  "vitest": "^4.1.9"
102
103
  }
103
- }
104
+ }