mgwdev-m365-components 0.0.4 → 0.0.6

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.
Files changed (99) hide show
  1. package/dist/components/common/ConditionalRenderComponent.d.ts +7 -0
  2. package/dist/components/common/GraphGroupMembershipTrimmedComponent.d.ts +10 -0
  3. package/{lib → dist}/components/common/GraphPersona.d.ts +12 -10
  4. package/dist/components/common/SPPermissionTrimmedComponent.d.ts +11 -0
  5. package/{lib → dist}/components/common/graphEntityPicker/AbstractGraphEntityPicker.d.ts +16 -16
  6. package/{lib → dist}/components/common/graphEntityPicker/ChannelPicker.d.ts +11 -11
  7. package/{lib → dist}/components/common/graphEntityPicker/DrivePicker.d.ts +11 -11
  8. package/{lib → dist}/components/common/graphEntityPicker/ListPicker.d.ts +11 -11
  9. package/{lib → dist}/components/common/graphEntityPicker/PeoplePicker.d.ts +8 -8
  10. package/{lib → dist}/components/common/graphEntityPicker/SitePicker.d.ts +8 -8
  11. package/{lib → dist}/components/common/graphEntityPicker/TeamPicker.d.ts +8 -8
  12. package/{lib → dist}/components/common/graphEntityPicker/index.d.ts +6 -6
  13. package/dist/components/common/index.d.ts +4 -0
  14. package/dist/components/index.d.ts +2 -0
  15. package/{lib → dist}/components/search/DefaultDocumentCard.d.ts +7 -7
  16. package/{lib → dist}/components/search/M365Search.d.ts +18 -18
  17. package/{lib → dist}/components/search/SearchDefaults.d.ts +1 -1
  18. package/{lib → dist}/components/search/index.d.ts +2 -2
  19. package/dist/context/AuthenticationContext.d.ts +1 -3
  20. package/{lib → dist}/context/DataverseContext.d.ts +13 -13
  21. package/dist/context/SPContext.d.ts +2 -2
  22. package/dist/context/index.d.ts +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/{lib → dist}/model/IEntityWithIdAndDisplayName.d.ts +4 -4
  25. package/{lib → dist}/model/ISearchResult.d.ts +19 -19
  26. package/{lib → dist}/model/index.d.ts +1 -1
  27. package/{lib → dist}/model/infra/ICacheEntry.d.ts +4 -4
  28. package/dist/mwdev-m365-components.es.js +14549 -9702
  29. package/dist/mwdev-m365-components.umd.js +127 -39
  30. package/{lib → dist}/services/PersonaService.d.ts +12 -12
  31. package/{lib → dist}/utils/FileUtils.d.ts +29 -29
  32. package/{lib → dist}/utils/StringUtils.d.ts +1 -1
  33. package/{lib → dist}/utils/ThumbnailUtils.d.ts +7 -7
  34. package/{lib → dist}/utils/index.d.ts +3 -3
  35. package/package.json +70 -54
  36. package/.env +0 -2
  37. package/.env.development +0 -2
  38. package/.eslintrc.cjs +0 -18
  39. package/build/assets/index-SHI6Sf4K.js +0 -123
  40. package/build/index.html +0 -13
  41. package/build/manifest.webmanifest +0 -1
  42. package/build/registerSW.js +0 -1
  43. package/build/sw.js +0 -1
  44. package/build/vite.svg +0 -1
  45. package/build/workbox-7cfec069.js +0 -1
  46. package/gulpfile.js +0 -4
  47. package/index.html +0 -13
  48. package/lib/App.d.ts +0 -3
  49. package/lib/App.js +0 -212
  50. package/lib/components/Test.d.ts +0 -4
  51. package/lib/components/Test.js +0 -37
  52. package/lib/components/common/GraphPersona.js +0 -125
  53. package/lib/components/common/graphEntityPicker/AbstractGraphEntityPicker.js +0 -117
  54. package/lib/components/common/graphEntityPicker/ChannelPicker.js +0 -83
  55. package/lib/components/common/graphEntityPicker/DrivePicker.js +0 -77
  56. package/lib/components/common/graphEntityPicker/ListPicker.js +0 -77
  57. package/lib/components/common/graphEntityPicker/PeoplePicker.js +0 -76
  58. package/lib/components/common/graphEntityPicker/SitePicker.js +0 -73
  59. package/lib/components/common/graphEntityPicker/TeamPicker.js +0 -77
  60. package/lib/components/common/graphEntityPicker/index.js +0 -6
  61. package/lib/components/common/index.d.ts +0 -2
  62. package/lib/components/common/index.js +0 -2
  63. package/lib/components/index.d.ts +0 -2
  64. package/lib/components/index.js +0 -2
  65. package/lib/components/provisioning/GetSiteTemplate.d.ts +0 -6
  66. package/lib/components/provisioning/GetSiteTemplate.js +0 -41
  67. package/lib/components/search/DefaultDocumentCard.js +0 -59
  68. package/lib/components/search/M365Search.js +0 -69
  69. package/lib/components/search/SearchDefaults.js +0 -17
  70. package/lib/components/search/index.js +0 -2
  71. package/lib/context/AuthenticationContext.d.ts +0 -11
  72. package/lib/context/AuthenticationContext.js +0 -50
  73. package/lib/context/DataverseContext.js +0 -29
  74. package/lib/context/GraphContext.d.ts +0 -11
  75. package/lib/context/GraphContext.js +0 -26
  76. package/lib/context/SPContext.d.ts +0 -13
  77. package/lib/context/SPContext.js +0 -30
  78. package/lib/context/index.d.ts +0 -4
  79. package/lib/context/index.js +0 -4
  80. package/lib/index.d.ts +0 -2
  81. package/lib/index.js +0 -2
  82. package/lib/main.d.ts +0 -1
  83. package/lib/main.js +0 -6
  84. package/lib/model/IEntityWithIdAndDisplayName.js +0 -1
  85. package/lib/model/ISearchResult.js +0 -1
  86. package/lib/model/index.js +0 -1
  87. package/lib/model/infra/ICacheEntry.js +0 -1
  88. package/lib/service-worker/sw.d.ts +0 -3
  89. package/lib/service-worker/sw.js +0 -20
  90. package/lib/services/PersonaService.js +0 -134
  91. package/lib/utils/FileUtils.js +0 -200
  92. package/lib/utils/StringUtils.js +0 -10
  93. package/lib/utils/ThumbnailUtils.js +0 -92
  94. package/lib/utils/index.js +0 -3
  95. package/public/vite.svg +0 -1
  96. package/tsconfig.json +0 -35
  97. package/tsconfig.node.json +0 -10
  98. package/vite.config.ts +0 -33
  99. package/vitest.config.ts +0 -11
@@ -1,12 +1,12 @@
1
- import { IHttpClient } from "mgwdev-m365-helpers/lib/dal/http/IHttpClient";
2
- import { ICacheService } from "mgwdev-m365-helpers/lib/services/cache";
3
- import { IUser } from "mgwdev-m365-helpers";
4
- export declare class PersonaService {
5
- protected graphClient: IHttpClient;
6
- updatePresence?: boolean;
7
- storageService: ICacheService;
8
- protected key: string;
9
- cacheExpiration: number;
10
- constructor(graphClient: IHttpClient, updatePresence?: boolean);
11
- getUser(id?: string, size?: "48x48" | "64x64" | "96x96" | "120x120" | "240x240"): Promise<IUser>;
12
- }
1
+ import { IHttpClient } from "mgwdev-m365-helpers/lib/dal/http/IHttpClient";
2
+ import { ICacheService } from "mgwdev-m365-helpers/lib/services/cache";
3
+ import { IUser } from "mgwdev-m365-helpers";
4
+ export declare class PersonaService {
5
+ protected graphClient: IHttpClient;
6
+ updatePresence?: boolean;
7
+ storageService: ICacheService;
8
+ protected key: string;
9
+ cacheExpiration: number;
10
+ constructor(graphClient: IHttpClient, updatePresence?: boolean);
11
+ getUser(id?: string, size?: "48x48" | "64x64" | "96x96" | "120x120" | "240x240"): Promise<IUser>;
12
+ }
@@ -1,29 +1,29 @@
1
- export declare const DOCICONURL_XLSX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xlsx.png";
2
- export declare const DOCICONURL_DOCX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/docx.png";
3
- export declare const DOCICONURL_PPTX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pptx.png";
4
- export declare const DOCICONURL_MPPX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/mpp.png";
5
- export declare const DOCICONURL_PHOTO = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/photo.png";
6
- export declare const DOCICONURL_PDF = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pdf.png";
7
- export declare const DOCICONURL_TXT = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/txt.png";
8
- export declare const DOCICONURL_EMAIL = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/email.png";
9
- export declare const DOCICONURL_CSV = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/csv.png";
10
- export declare const DOCICONURL_ONE = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/one.png";
11
- export declare const DOCICONURL_VSDX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/vsdx.png";
12
- export declare const DOCICONURL_VSSX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/vssx.png";
13
- export declare const DOCICONURL_PUB = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pub.png";
14
- export declare const DOCICONURL_ACCDB = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/accdb.png";
15
- export declare const DOCICONURL_ZIP = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/zip.png";
16
- export declare const DOCICONURL_GENERIC = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/genericfile.png";
17
- export declare const DOCICONURL_CODE = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/code.png";
18
- export declare const DOCICONURL_HTML = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/html.png";
19
- export declare const DOCICONURL_XML = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xml.png";
20
- export declare const DOCICONURL_SPO = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/spo.png";
21
- export declare const DOCICONURL_VIDEO = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/video.png";
22
- export default class FileUtils {
23
- /**
24
- * GetFileImageUrl
25
- */
26
- static getFileImageUrl(_file: string): string;
27
- static getShortName: (name: string) => string;
28
- static isOndrive: (name: string) => Promise<boolean>;
29
- }
1
+ export declare const DOCICONURL_XLSX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xlsx.png";
2
+ export declare const DOCICONURL_DOCX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/docx.png";
3
+ export declare const DOCICONURL_PPTX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pptx.png";
4
+ export declare const DOCICONURL_MPPX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/mpp.png";
5
+ export declare const DOCICONURL_PHOTO = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/photo.png";
6
+ export declare const DOCICONURL_PDF = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pdf.png";
7
+ export declare const DOCICONURL_TXT = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/txt.png";
8
+ export declare const DOCICONURL_EMAIL = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/email.png";
9
+ export declare const DOCICONURL_CSV = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/csv.png";
10
+ export declare const DOCICONURL_ONE = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/one.png";
11
+ export declare const DOCICONURL_VSDX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/vsdx.png";
12
+ export declare const DOCICONURL_VSSX = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/vssx.png";
13
+ export declare const DOCICONURL_PUB = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pub.png";
14
+ export declare const DOCICONURL_ACCDB = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/accdb.png";
15
+ export declare const DOCICONURL_ZIP = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/zip.png";
16
+ export declare const DOCICONURL_GENERIC = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/genericfile.png";
17
+ export declare const DOCICONURL_CODE = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/code.png";
18
+ export declare const DOCICONURL_HTML = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/html.png";
19
+ export declare const DOCICONURL_XML = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xml.png";
20
+ export declare const DOCICONURL_SPO = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/spo.png";
21
+ export declare const DOCICONURL_VIDEO = "https://static2.sharepointonline.com/files/fabric/assets/item-types/32/video.png";
22
+ export default class FileUtils {
23
+ /**
24
+ * GetFileImageUrl
25
+ */
26
+ static getFileImageUrl(_file: string): string;
27
+ static getShortName: (name: string) => string;
28
+ static isOndrive: (name: string) => Promise<boolean>;
29
+ }
@@ -1 +1 @@
1
- export declare function camelCase(value: string): string;
1
+ export declare function camelCase(value: string): string;
@@ -1,7 +1,7 @@
1
- import { IHttpClient } from "mgwdev-m365-helpers";
2
- import { IDocumentSearchResult } from "../model";
3
- export declare class ThumbnailUtils {
4
- static getThumbnailUrl: (item: IDocumentSearchResult, size: "small" | "medium" | "large") => string;
5
- static getThumbnailImageFromGraphApiCall: (graphClient: IHttpClient, graphApiUrl: string) => Promise<any>;
6
- static getThumbnailImageFromGraph: (item: IDocumentSearchResult, graphClient: IHttpClient, size?: "small" | "medium" | "large") => Promise<any>;
7
- }
1
+ import { IHttpClient } from "mgwdev-m365-helpers";
2
+ import { IDocumentSearchResult } from "../model";
3
+ export declare class ThumbnailUtils {
4
+ static getThumbnailUrl: (item: IDocumentSearchResult, size: "small" | "medium" | "large") => string;
5
+ static getThumbnailImageFromGraphApiCall: (graphClient: IHttpClient, graphApiUrl: string) => Promise<any>;
6
+ static getThumbnailImageFromGraph: (item: IDocumentSearchResult, graphClient: IHttpClient, size?: "small" | "medium" | "large") => Promise<any>;
7
+ }
@@ -1,3 +1,3 @@
1
- export * from "./FileUtils";
2
- export * from "./ThumbnailUtils";
3
- export * from "./StringUtils";
1
+ export * from "./FileUtils";
2
+ export * from "./ThumbnailUtils";
3
+ export * from "./StringUtils";
package/package.json CHANGED
@@ -1,55 +1,71 @@
1
- {
2
- "name": "mgwdev-m365-components",
3
- "private": false,
4
- "version": "0.0.4",
5
- "scripts": {
6
- "start": "vite",
7
- "build": "tsc && vite build",
8
- "build-lib": "gulp build",
9
- "test": "vitest",
10
- "test:report": "vitest --reporter=junit --outputFile.junit=./tests/TEST-mgwdev-m365-components.xml --watch=false",
11
- "test:coverage": "vitest run --coverage",
12
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
13
- "preview": "vite preview"
14
- },
15
- "keywords": [
16
- "SharePoint",
17
- "MSGraph"
18
- ],
19
- "author": "m.g.wojciechowski@gmail.com",
20
- "license": "MIT",
21
- "dependencies": {
22
- "@azure/msal-browser": "^3.6.0",
23
- "@fluentui/react-components": "^9.42.0",
24
- "handlebars": "^4.7.8",
25
- "handlebars-group-by": "^1.0.1",
26
- "handlebars-helpers": "^0.10.0",
27
- "jspath": "^0.4.0",
28
- "mgwdev-m365-helpers": "^0.1.13",
29
- "react": ">=16.8.0",
30
- "react-dom": ">=16.8.0",
31
- "vite-plugin-dts": "^3.6.4"
32
- },
33
- "peerDependencies": {
34
- "react": ">=16.8.0",
35
- "react-dom": ">=16.8.0"
36
- },
37
- "devDependencies": {
38
- "@microsoft/rush-stack-compiler-4.7": "^0.1.0",
39
- "@microsoft/sp-build-web": "^1.18.2",
40
- "@types/react": "^18.2.43",
41
- "@types/react-dom": "^18.2.17",
42
- "@typescript-eslint/eslint-plugin": "^6.14.0",
43
- "@typescript-eslint/parser": "^6.14.0",
44
- "@vitejs/plugin-react": "^4.2.1",
45
- "@vitest/coverage-v8": "^1.6.0",
46
- "eslint": "^8.55.0",
47
- "eslint-plugin-react-hooks": "^4.6.0",
48
- "eslint-plugin-react-refresh": "^0.4.5",
49
- "jest-environment-jsdom": "^29.7.0",
50
- "ts-jest": "^29.1.1",
51
- "typescript": "^5.2.2",
52
- "vite": "^5.0.8",
53
- "vitest": "^1.6.0"
54
- }
1
+ {
2
+ "name": "mgwdev-m365-components",
3
+ "private": false,
4
+ "version": "0.0.6",
5
+ "scripts": {
6
+ "start": "vite",
7
+ "build": "tsc && vite build",
8
+ "build-lib": "gulp build",
9
+ "test": "vitest",
10
+ "test:report": "vitest --reporter=junit --outputFile.junit=./tests/TEST-mgwdev-m365-components.xml --watch=false",
11
+ "test:coverage": "vitest run --coverage",
12
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
13
+ "preview": "vite preview"
14
+ },
15
+ "keywords": [
16
+ "SharePoint",
17
+ "MSGraph"
18
+ ],
19
+ "author": "m.g.wojciechowski@gmail.com",
20
+ "license": "MIT",
21
+ "dependencies": {
22
+ "@azure/msal-browser": "^3.6.0",
23
+ "@fluentui/react-components": "^9.42.0",
24
+ "@testing-library/react": "^16.2.0",
25
+ "handlebars": "^4.7.8",
26
+ "handlebars-group-by": "^1.0.1",
27
+ "handlebars-helpers": "^0.10.0",
28
+ "jspath": "^0.4.0",
29
+ "mgwdev-m365-helpers": "^0.2.10",
30
+ "react": ">=16.8.0",
31
+ "react-dom": ">=16.8.0",
32
+ "vite-plugin-dts": "^3.6.4"
33
+ },
34
+ "peerDependencies": {
35
+ "react": ">=16.8.0",
36
+ "react-dom": ">=16.8.0"
37
+ },
38
+ "devDependencies": {
39
+ "@microsoft/rush-stack-compiler-4.7": "^0.1.0",
40
+ "@microsoft/sp-build-web": "^1.18.2",
41
+ "@testing-library/jest-dom": "^6.6.3",
42
+ "@types/react": "^18.2.43",
43
+ "@types/react-dom": "^18.2.17",
44
+ "@typescript-eslint/eslint-plugin": "^6.14.0",
45
+ "@typescript-eslint/parser": "^6.14.0",
46
+ "@vitejs/plugin-react": "^4.2.1",
47
+ "@vitest/coverage-v8": "^1.6.0",
48
+ "eslint": "^8.55.0",
49
+ "eslint-plugin-react-hooks": "^4.6.0",
50
+ "eslint-plugin-react-refresh": "^0.4.5",
51
+ "jest-environment-jsdom": "^29.7.0",
52
+ "jsdom": "^26.0.0",
53
+ "ts-jest": "^29.1.1",
54
+ "typescript": "^5.2.2",
55
+ "vite": "^5.0.8",
56
+ "vitest": "^1.6.0"
57
+ },
58
+ "files": [
59
+ "dist"
60
+ ],
61
+ "main": "./dist/mwdev-m365-components.umd.js",
62
+ "module": "./dist/mwdev-m365-components.es.js",
63
+ "types": "./dist/index.d.ts",
64
+ "exports": {
65
+ ".": {
66
+ "import": "./dist/mwdev-m365-components.es.js",
67
+ "require": "./dist/mwdev-m365-components.umd.js",
68
+ "types": "./dist/index.d.ts"
69
+ }
70
+ }
55
71
  }
package/.env DELETED
@@ -1,2 +0,0 @@
1
- VITE_FRONTEND_CLIENT_ID=<app_client_id>
2
- VITE_SITE_URL=<site_url>
package/.env.development DELETED
@@ -1,2 +0,0 @@
1
- VITE_FRONTEND_CLIENT_ID=13e88fe1-beef-46f6-84dc-76c2cba9b667
2
- VITE_SITE_URL=https://mwdevvalo.sharepoint.com/sites/dev
package/.eslintrc.cjs DELETED
@@ -1,18 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: { browser: true, es2020: true },
4
- extends: [
5
- 'eslint:recommended',
6
- 'plugin:@typescript-eslint/recommended',
7
- 'plugin:react-hooks/recommended',
8
- ],
9
- ignorePatterns: ['dist', '.eslintrc.cjs'],
10
- parser: '@typescript-eslint/parser',
11
- plugins: ['react-refresh'],
12
- rules: {
13
- 'react-refresh/only-export-components': [
14
- 'warn',
15
- { allowConstantExport: true },
16
- ],
17
- },
18
- }