@pnp/spfx-controls-react 3.25.0-beta.2845356 → 3.25.0-beta.3152906
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/jest-output/JUnit.xml +103 -83
- package/lib/SPFilePicker.d.ts +2 -0
- package/lib/SPFilePicker.d.ts.map +1 -0
- package/lib/SPFilePicker.js +2 -0
- package/lib/SPFilePicker.js.map +1 -0
- package/lib/common/telemetry/version.js +1 -1
- package/lib/controls/SPFilePicker/ISPFilePicker.types.d.ts +152 -0
- package/lib/controls/SPFilePicker/ISPFilePicker.types.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/ISPFilePicker.types.js +11 -0
- package/lib/controls/SPFilePicker/ISPFilePicker.types.js.map +1 -0
- package/lib/controls/SPFilePicker/ISPFilePickerProps.d.ts +80 -0
- package/lib/controls/SPFilePicker/ISPFilePickerProps.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/ISPFilePickerProps.js +2 -0
- package/lib/controls/SPFilePicker/ISPFilePickerProps.js.map +1 -0
- package/lib/controls/SPFilePicker/SPFilePicker.d.ts +22 -0
- package/lib/controls/SPFilePicker/SPFilePicker.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/SPFilePicker.js +83 -0
- package/lib/controls/SPFilePicker/SPFilePicker.js.map +1 -0
- package/lib/controls/SPFilePicker/hooks/SPFilePicker.helpers.d.ts +20 -0
- package/lib/controls/SPFilePicker/hooks/SPFilePicker.helpers.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/hooks/SPFilePicker.helpers.js +27 -0
- package/lib/controls/SPFilePicker/hooks/SPFilePicker.helpers.js.map +1 -0
- package/lib/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.d.ts +2 -0
- package/lib/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/hooks/useLogging.d.ts +28 -0
- package/lib/controls/SPFilePicker/hooks/useLogging.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/hooks/useLogging.js +28 -0
- package/lib/controls/SPFilePicker/hooks/useLogging.js.map +1 -0
- package/lib/controls/SPFilePicker/hooks/useSPFilePicker.d.ts +68 -0
- package/lib/controls/SPFilePicker/hooks/useSPFilePicker.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/hooks/useSPFilePicker.js +356 -0
- package/lib/controls/SPFilePicker/hooks/useSPFilePicker.js.map +1 -0
- package/lib/controls/SPFilePicker/index.d.ts +5 -0
- package/lib/controls/SPFilePicker/index.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/index.js +5 -0
- package/lib/controls/SPFilePicker/index.js.map +1 -0
- package/lib/controls/SPFilePicker/useSPFilePickerStyles.d.ts +8 -0
- package/lib/controls/SPFilePicker/useSPFilePickerStyles.d.ts.map +1 -0
- package/lib/controls/SPFilePicker/useSPFilePickerStyles.js +33 -0
- package/lib/controls/SPFilePicker/useSPFilePickerStyles.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/loc/en-us.js +5 -0
- package/lib/loc/en-us.js.map +1 -1
- package/lib-commonjs/SPFilePicker.js +5 -0
- package/lib-commonjs/SPFilePicker.js.map +1 -0
- package/lib-commonjs/common/telemetry/version.js +1 -1
- package/lib-commonjs/controls/SPFilePicker/ISPFilePicker.types.js +12 -0
- package/lib-commonjs/controls/SPFilePicker/ISPFilePicker.types.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/ISPFilePickerProps.js +3 -0
- package/lib-commonjs/controls/SPFilePicker/ISPFilePickerProps.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/SPFilePicker.js +88 -0
- package/lib-commonjs/controls/SPFilePicker/SPFilePicker.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.js +32 -0
- package/lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/hooks/useLogging.js +31 -0
- package/lib-commonjs/controls/SPFilePicker/hooks/useLogging.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/hooks/useSPFilePicker.js +359 -0
- package/lib-commonjs/controls/SPFilePicker/hooks/useSPFilePicker.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/index.js +8 -0
- package/lib-commonjs/controls/SPFilePicker/index.js.map +1 -0
- package/lib-commonjs/controls/SPFilePicker/useSPFilePickerStyles.js +37 -0
- package/lib-commonjs/controls/SPFilePicker/useSPFilePickerStyles.js.map +1 -0
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/loc/en-us.js +5 -0
- package/lib-commonjs/loc/en-us.js.map +1 -1
- package/lib-commonjs/webparts/controlsTest/ControlsTestWebPart.manifest.json +1 -0
- package/lib-commonjs/webparts/controlsTest/components/ControlsTest.js +4 -0
- package/lib-commonjs/webparts/controlsTest/components/ControlsTest.js.map +1 -1
- package/lib-commonjs/webparts/controlsTest/components/TestSPFilePickerControl.js +29 -0
- package/lib-commonjs/webparts/controlsTest/components/TestSPFilePickerControl.js.map +1 -0
- package/lib-commonjs/webparts/controlsTest/propertyPane/controls/ControlToggles.js +1 -0
- package/lib-commonjs/webparts/controlsTest/propertyPane/controls/ControlToggles.js.map +1 -1
- package/package.json +1 -1
- package/release/analysis-logs/lint.sarif +639 -584
- package/release/manifests/45165954-80f9-44c1-9967-cd38ae92a33b.manifest.json +4 -3
- package/release/manifests/57ebd944-98ed-43f9-b722-e959d6dac6ad.manifest.json +3 -3
- package/release/manifests/f9c6b930-8d5d-4550-bfd9-ed5f6ca443a8.manifest.json +3 -3
package/jest-output/JUnit.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<testsuites name="jest tests" tests="
|
|
3
|
-
<testsuite name="<ComboBoxListItemPicker />" errors="0" failures="0" skipped="7" timestamp="2026-
|
|
2
|
+
<testsuites name="jest tests" tests="94" failures="0" errors="0" time="5.38">
|
|
3
|
+
<testsuite name="<ComboBoxListItemPicker />" errors="0" failures="0" skipped="7" timestamp="2026-08-11T19:43:31" time="1.217" tests="7">
|
|
4
4
|
<testcase classname="<ComboBoxListItemPicker /> > " name="Should render initial data (lib-commonjs/controls/listItemPicker/ComboBoxListItemPicker.test.js)" time="0">
|
|
5
5
|
<skipped/>
|
|
6
6
|
</testcase>
|
|
@@ -23,178 +23,198 @@
|
|
|
23
23
|
<skipped/>
|
|
24
24
|
</testcase>
|
|
25
25
|
</testsuite>
|
|
26
|
-
<testsuite name="<AccessibleChartTable />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
27
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render only one table (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
26
|
+
<testsuite name="<AccessibleChartTable />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:30" time="1.367" tests="13">
|
|
27
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render only one table (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.07">
|
|
28
28
|
</testcase>
|
|
29
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render with a custom className if one is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
29
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render with a custom className if one is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.006">
|
|
30
30
|
</testcase>
|
|
31
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render a caption if one is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
31
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render a caption if one is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.007">
|
|
32
32
|
</testcase>
|
|
33
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render a caption if no caption is provided but a title is available (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
33
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render a caption if no caption is provided but a title is available (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.006">
|
|
34
34
|
</testcase>
|
|
35
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should prioritize the caption if both caption and title are provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
35
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should prioritize the caption if both caption and title are provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.007">
|
|
36
36
|
</testcase>
|
|
37
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render the same number of rows as there are data elements (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
37
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render the same number of rows as there are data elements (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.014">
|
|
38
38
|
</testcase>
|
|
39
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render a table matching the data provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
39
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render a table matching the data provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.018">
|
|
40
40
|
</testcase>
|
|
41
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should include a summary in the caption if one is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
41
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should include a summary in the caption if one is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.02">
|
|
42
42
|
</testcase>
|
|
43
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should include a summary in the caption if one is provided -- even if no title is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
43
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should include a summary in the caption if one is provided -- even if no title is provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.012">
|
|
44
44
|
</testcase>
|
|
45
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should do nothing if there are no data labels (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
45
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should do nothing if there are no data labels (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.007">
|
|
46
46
|
</testcase>
|
|
47
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render an X and Y label if axis labels are provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
47
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render an X and Y label if axis labels are provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.022">
|
|
48
48
|
</testcase>
|
|
49
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render multi dataset labels (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
49
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render multi dataset labels (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.032">
|
|
50
50
|
</testcase>
|
|
51
|
-
<testcase classname="<AccessibleChartTable /> > " name="Should render a multi dataset table matching the data provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.
|
|
51
|
+
<testcase classname="<AccessibleChartTable /> > " name="Should render a multi dataset table matching the data provided (lib-commonjs/controls/chartControl/AccessibleChartTable.test.js)" time="0.022">
|
|
52
52
|
</testcase>
|
|
53
53
|
</testsuite>
|
|
54
|
-
<testsuite name="<FileTypeIcon />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
55
|
-
<testcase classname="<FileTypeIcon /> > " name="Font icon test with application (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
54
|
+
<testsuite name="<FileTypeIcon />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:30" time="1.318" tests="21">
|
|
55
|
+
<testcase classname="<FileTypeIcon /> > " name="Font icon test with application (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.128">
|
|
56
56
|
</testcase>
|
|
57
|
-
<testcase classname="<FileTypeIcon /> > " name="Font icon test with path (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
57
|
+
<testcase classname="<FileTypeIcon /> > " name="Font icon test with path (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.008">
|
|
58
58
|
</testcase>
|
|
59
59
|
<testcase classname="<FileTypeIcon /> > " name="Font icon test with path that contains querystring params (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.007">
|
|
60
60
|
</testcase>
|
|
61
|
-
<testcase classname="<FileTypeIcon /> > " name="Font icon test with path of unknown extension (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
61
|
+
<testcase classname="<FileTypeIcon /> > " name="Font icon test with path of unknown extension (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.013">
|
|
62
62
|
</testcase>
|
|
63
|
-
<testcase classname="<FileTypeIcon /> > " name="Font icon test without application or path, should render the generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
63
|
+
<testcase classname="<FileTypeIcon /> > " name="Font icon test without application or path, should render the generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.005">
|
|
64
64
|
</testcase>
|
|
65
|
-
<testcase classname="<FileTypeIcon /> > " name="Font icon test with both the application and path, should take the path into account (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
65
|
+
<testcase classname="<FileTypeIcon /> > " name="Font icon test with both the application and path, should take the path into account (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.006">
|
|
66
66
|
</testcase>
|
|
67
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test with application (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
67
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test with application (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.013">
|
|
68
68
|
</testcase>
|
|
69
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test with path (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
69
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test with path (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.005">
|
|
70
70
|
</testcase>
|
|
71
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test with path that contains querystring params (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
71
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test with path that contains querystring params (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.005">
|
|
72
72
|
</testcase>
|
|
73
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test with path of unknown extension (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
73
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test with path of unknown extension (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.007">
|
|
74
74
|
</testcase>
|
|
75
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test without application or path, should render the generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
75
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test without application or path, should render the generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.005">
|
|
76
76
|
</testcase>
|
|
77
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test with both application and path, should take the path into account (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
77
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test with both application and path, should take the path into account (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.007">
|
|
78
78
|
</testcase>
|
|
79
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size SMALL test (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
79
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size SMALL test (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.005">
|
|
80
80
|
</testcase>
|
|
81
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size MEDIUM test (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
81
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size MEDIUM test (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.008">
|
|
82
82
|
</testcase>
|
|
83
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size LARGE test (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
83
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size LARGE test (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.005">
|
|
84
84
|
</testcase>
|
|
85
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size SMALL test for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
85
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size SMALL test for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.019">
|
|
86
86
|
</testcase>
|
|
87
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size MEDIUM test for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
87
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size MEDIUM test for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.003">
|
|
88
88
|
</testcase>
|
|
89
89
|
<testcase classname="<FileTypeIcon /> > " name="Image icon size LARGE test for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.008">
|
|
90
90
|
</testcase>
|
|
91
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size test with unkown size (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
91
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size test with unkown size (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.003">
|
|
92
92
|
</testcase>
|
|
93
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon size test with unkown size for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
93
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon size test with unkown size for generic icon (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.003">
|
|
94
94
|
</testcase>
|
|
95
|
-
<testcase classname="<FileTypeIcon /> > " name="Image icon test with unkown application (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.
|
|
95
|
+
<testcase classname="<FileTypeIcon /> > " name="Image icon test with unkown application (lib-commonjs/controls/fileTypeIcon/FileTypeIcon.test.js)" time="0.006">
|
|
96
96
|
</testcase>
|
|
97
97
|
</testsuite>
|
|
98
|
-
<testsuite name="<WebPartTitle />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
99
|
-
<testcase classname="<WebPartTitle /> > " name="Check the read mode of the component (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
98
|
+
<testsuite name="<WebPartTitle />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:32" time="0.649" tests="8">
|
|
99
|
+
<testcase classname="<WebPartTitle /> > " name="Check the read mode of the component (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.06">
|
|
100
100
|
</testcase>
|
|
101
|
-
<testcase classname="<WebPartTitle /> > " name="Check the edit mode of the component (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
101
|
+
<testcase classname="<WebPartTitle /> > " name="Check the edit mode of the component (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.007">
|
|
102
102
|
</testcase>
|
|
103
|
-
<testcase classname="<WebPartTitle /> > " name="Check class change (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
103
|
+
<testcase classname="<WebPartTitle /> > " name="Check class change (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.007">
|
|
104
104
|
</testcase>
|
|
105
|
-
<testcase classname="<WebPartTitle /> > " name="Check if the change is processed correctly (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
105
|
+
<testcase classname="<WebPartTitle /> > " name="Check if the change is processed correctly (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.007">
|
|
106
106
|
</testcase>
|
|
107
|
-
<testcase classname="<WebPartTitle /> > " name="Check more link is shown if function specified (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
107
|
+
<testcase classname="<WebPartTitle /> > " name="Check more link is shown if function specified (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.006">
|
|
108
108
|
</testcase>
|
|
109
|
-
<testcase classname="<WebPartTitle /> > " name="Check more link is shown if children specified (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
109
|
+
<testcase classname="<WebPartTitle /> > " name="Check more link is shown if children specified (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.005">
|
|
110
110
|
</testcase>
|
|
111
|
-
<testcase classname="<WebPartTitle /> > " name="Check more link is not shown otherwise (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
111
|
+
<testcase classname="<WebPartTitle /> > " name="Check more link is not shown otherwise (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.006">
|
|
112
112
|
</testcase>
|
|
113
|
-
<testcase classname="<WebPartTitle /> > " name="Check theme's color is used if specified (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.
|
|
113
|
+
<testcase classname="<WebPartTitle /> > " name="Check theme's color is used if specified (lib-commonjs/controls/webPartTitle/WebPartTitle.test.js)" time="0.015">
|
|
114
114
|
</testcase>
|
|
115
115
|
</testsuite>
|
|
116
|
-
<testsuite name="<ChartControl />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
117
|
-
<testcase classname="<ChartControl /> > " name="Check that an accessible table gets created by default (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
116
|
+
<testsuite name="<ChartControl />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:32" time="0.875" tests="12">
|
|
117
|
+
<testcase classname="<ChartControl /> > " name="Check that an accessible table gets created by default (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.084">
|
|
118
118
|
</testcase>
|
|
119
|
-
<testcase classname="<ChartControl /> > " name="Check that the accessible table accepts a custom classname (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
119
|
+
<testcase classname="<ChartControl /> > " name="Check that the accessible table accepts a custom classname (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.018">
|
|
120
120
|
</testcase>
|
|
121
121
|
<testcase classname="<ChartControl /> > " name="Check that the accessible table doesn't get rendered if disabled (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.007">
|
|
122
122
|
</testcase>
|
|
123
|
-
<testcase classname="<ChartControl /> > " name="Check that an accessible table gets created with the caption matching the title (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
123
|
+
<testcase classname="<ChartControl /> > " name="Check that an accessible table gets created with the caption matching the title (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.014">
|
|
124
124
|
</testcase>
|
|
125
|
-
<testcase classname="<ChartControl /> > " name="Check that an accessible table gets created with a caption (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
125
|
+
<testcase classname="<ChartControl /> > " name="Check that an accessible table gets created with a caption (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.012">
|
|
126
126
|
</testcase>
|
|
127
|
-
<testcase classname="<ChartControl /> > " name="Check that the accessible table has a number of rows matching the number of data elements (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
127
|
+
<testcase classname="<ChartControl /> > " name="Check that the accessible table has a number of rows matching the number of data elements (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.015">
|
|
128
128
|
</testcase>
|
|
129
|
-
<testcase classname="<ChartControl /> > " name="Check that the accessible table has only one header row (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
129
|
+
<testcase classname="<ChartControl /> > " name="Check that the accessible table has only one header row (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.016">
|
|
130
130
|
</testcase>
|
|
131
|
-
<testcase classname="<ChartControl /> > " name="Check that custom class gets rendered (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
131
|
+
<testcase classname="<ChartControl /> > " name="Check that custom class gets rendered (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.008">
|
|
132
132
|
</testcase>
|
|
133
|
-
<testcase classname="<ChartControl /> > " name="Check that a canvas gets rendered (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
133
|
+
<testcase classname="<ChartControl /> > " name="Check that a canvas gets rendered (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.008">
|
|
134
134
|
</testcase>
|
|
135
|
-
<testcase classname="<ChartControl /> > " name="Check that it doesn't crash if data is omitted (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
135
|
+
<testcase classname="<ChartControl /> > " name="Check that it doesn't crash if data is omitted (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.007">
|
|
136
136
|
</testcase>
|
|
137
|
-
<testcase classname="<ChartControl /> > " name="Check that it applies a themed background by default (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
137
|
+
<testcase classname="<ChartControl /> > " name="Check that it applies a themed background by default (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.009">
|
|
138
138
|
</testcase>
|
|
139
|
-
<testcase classname="<ChartControl /> > " name="Check that it disables themed background when useTheme is set to false (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.
|
|
139
|
+
<testcase classname="<ChartControl /> > " name="Check that it disables themed background when useTheme is set to false (lib-commonjs/controls/chartControl/ChartControl.test.js)" time="0.018">
|
|
140
140
|
</testcase>
|
|
141
141
|
</testsuite>
|
|
142
|
-
<testsuite name="<ListView />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
143
|
-
<testcase classname="<ListView /> > " name="Test view with an empty array of items (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
142
|
+
<testsuite name="<ListView />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:32" time="1.475" tests="8">
|
|
143
|
+
<testcase classname="<ListView /> > " name="Test view with an empty array of items (lib-commonjs/controls/listView/ListView.test.js)" time="0.137">
|
|
144
144
|
</testcase>
|
|
145
|
-
<testcase classname="<ListView /> > " name="Test view with two items (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
145
|
+
<testcase classname="<ListView /> > " name="Test view with two items (lib-commonjs/controls/listView/ListView.test.js)" time="0.074">
|
|
146
146
|
</testcase>
|
|
147
|
-
<testcase classname="<ListView /> > " name="Test view by updating the items porperty (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
147
|
+
<testcase classname="<ListView /> > " name="Test view by updating the items porperty (lib-commonjs/controls/listView/ListView.test.js)" time="0.046">
|
|
148
148
|
</testcase>
|
|
149
|
-
<testcase classname="<ListView /> > " name="Test view with iconFieldName (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
149
|
+
<testcase classname="<ListView /> > " name="Test view with iconFieldName (lib-commonjs/controls/listView/ListView.test.js)" time="0.111">
|
|
150
150
|
</testcase>
|
|
151
|
-
<testcase classname="<ListView /> > " name="Test view with iconFieldName render method (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
151
|
+
<testcase classname="<ListView /> > " name="Test view with iconFieldName render method (lib-commonjs/controls/listView/ListView.test.js)" time="0.03">
|
|
152
152
|
</testcase>
|
|
153
|
-
<testcase classname="<ListView /> > " name="Test view with _flattenItems function (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
153
|
+
<testcase classname="<ListView /> > " name="Test view with _flattenItems function (lib-commonjs/controls/listView/ListView.test.js)" time="0.023">
|
|
154
154
|
</testcase>
|
|
155
|
-
<testcase classname="<ListView /> > " name="Test view with viewFields (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
155
|
+
<testcase classname="<ListView /> > " name="Test view with viewFields (lib-commonjs/controls/listView/ListView.test.js)" time="0.03">
|
|
156
156
|
</testcase>
|
|
157
|
-
<testcase classname="<ListView /> > " name="Test out the sorting method (lib-commonjs/controls/listView/ListView.test.js)" time="0.
|
|
157
|
+
<testcase classname="<ListView /> > " name="Test out the sorting method (lib-commonjs/controls/listView/ListView.test.js)" time="0.072">
|
|
158
158
|
</testcase>
|
|
159
159
|
</testsuite>
|
|
160
|
-
<testsuite name="<GridLayout />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
161
|
-
<testcase classname="<GridLayout /> > " name="Test grid layout (lib-commonjs/controls/gridLayout/GridLayout.test.js)" time="0.
|
|
160
|
+
<testsuite name="<GridLayout />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:33" time="0.955" tests="1">
|
|
161
|
+
<testcase classname="<GridLayout /> > " name="Test grid layout (lib-commonjs/controls/gridLayout/GridLayout.test.js)" time="0.172">
|
|
162
162
|
</testcase>
|
|
163
163
|
</testsuite>
|
|
164
|
-
<testsuite name="PaletteGenerator" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
164
|
+
<testsuite name="PaletteGenerator" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:33" time="0.591" tests="8">
|
|
165
165
|
<testcase classname="PaletteGenerator > " name="Should repeat palette if array is longer than number of available colors in repeating palette (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.004">
|
|
166
166
|
</testcase>
|
|
167
|
-
<testcase classname="PaletteGenerator > " name="Should stretch palette if array is longer than number of available colors in non-repeating palette (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.
|
|
167
|
+
<testcase classname="PaletteGenerator > " name="Should stretch palette if array is longer than number of available colors in non-repeating palette (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.003">
|
|
168
168
|
</testcase>
|
|
169
|
-
<testcase classname="PaletteGenerator > " name="Should return the right alpha palette length (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.
|
|
169
|
+
<testcase classname="PaletteGenerator > " name="Should return the right alpha palette length (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.009">
|
|
170
170
|
</testcase>
|
|
171
171
|
<testcase classname="PaletteGenerator > " name="Should repeat a shorter array of colors (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.001">
|
|
172
172
|
</testcase>
|
|
173
|
-
<testcase classname="PaletteGenerator > " name="Should not repeat colors in a gradient (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.
|
|
173
|
+
<testcase classname="PaletteGenerator > " name="Should not repeat colors in a gradient (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.001">
|
|
174
174
|
</testcase>
|
|
175
|
-
<testcase classname="PaletteGenerator > " name="Should return an array of alpha value for a given array of colors (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.
|
|
175
|
+
<testcase classname="PaletteGenerator > " name="Should return an array of alpha value for a given array of colors (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.001">
|
|
176
176
|
</testcase>
|
|
177
|
-
<testcase classname="PaletteGenerator > " name="Should return a single alpha value for a single color (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.
|
|
177
|
+
<testcase classname="PaletteGenerator > " name="Should return a single alpha value for a single color (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.002">
|
|
178
178
|
</testcase>
|
|
179
179
|
<testcase classname="PaletteGenerator > " name="Should return a single alpha value for any valid type of color value (lib-commonjs/controls/chartControl/PaletteGenerator.test.js)" time="0.002">
|
|
180
180
|
</testcase>
|
|
181
181
|
</testsuite>
|
|
182
|
-
<testsuite name="
|
|
183
|
-
<testcase classname="
|
|
182
|
+
<testsuite name="SPFilePicker helpers" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:34" time="0.647" tests="9">
|
|
183
|
+
<testcase classname="SPFilePicker helpers buildSPFilePickerConfiguration > " name="builds a token-authenticated file picker configuration (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.004">
|
|
184
|
+
</testcase>
|
|
185
|
+
<testcase classname="SPFilePicker helpers buildSPFilePickerConfiguration > " name="omits host authentication in cookie mode (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.001">
|
|
186
|
+
</testcase>
|
|
187
|
+
<testcase classname="SPFilePicker helpers isExpectedPickerInitializeEvent > " name="accepts initialization from the expected picker window (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.001">
|
|
188
|
+
</testcase>
|
|
189
|
+
<testcase classname="SPFilePicker helpers isExpectedPickerInitializeEvent > " name="rejects initialization with the wrong origin (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.001">
|
|
190
|
+
</testcase>
|
|
191
|
+
<testcase classname="SPFilePicker helpers isExpectedPickerInitializeEvent > " name="rejects initialization with the wrong window (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.001">
|
|
192
|
+
</testcase>
|
|
193
|
+
<testcase classname="SPFilePicker helpers isExpectedPickerInitializeEvent > " name="rejects initialization with the wrong channel (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.001">
|
|
194
|
+
</testcase>
|
|
195
|
+
<testcase classname="SPFilePicker helpers isExpectedPickerInitializeEvent > " name="rejects initialization with the wrong message type (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.001">
|
|
196
|
+
</testcase>
|
|
197
|
+
<testcase classname="SPFilePicker helpers requireAccessToken > " name="returns a valid token (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.002">
|
|
198
|
+
</testcase>
|
|
199
|
+
<testcase classname="SPFilePicker helpers requireAccessToken > " name="rejects an empty token (lib-commonjs/controls/SPFilePicker/hooks/SPFilePicker.helpers.test.js)" time="0.013">
|
|
200
|
+
</testcase>
|
|
201
|
+
</testsuite>
|
|
202
|
+
<testsuite name="ControlsTestWebPart" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:34" time="0.569" tests="1">
|
|
203
|
+
<testcase classname="ControlsTestWebPart > " name="should do something (lib-commonjs/webparts/controlsTest/test/ControlsTestWebPart.test.js)" time="0.001">
|
|
184
204
|
</testcase>
|
|
185
205
|
</testsuite>
|
|
186
|
-
<testsuite name="<Placeholder />" errors="0" failures="0" skipped="0" timestamp="2026-
|
|
187
|
-
<testcase classname="<Placeholder /> > " name="Test that placeholder renders (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.
|
|
206
|
+
<testsuite name="<Placeholder />" errors="0" failures="0" skipped="0" timestamp="2026-08-11T19:43:33" time="2.576" tests="6">
|
|
207
|
+
<testcase classname="<Placeholder /> > " name="Test that placeholder renders (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.035">
|
|
188
208
|
</testcase>
|
|
189
|
-
<testcase classname="<Placeholder /> > " name="Test placeholder without button (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.
|
|
209
|
+
<testcase classname="<Placeholder /> > " name="Test placeholder without button (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.01">
|
|
190
210
|
</testcase>
|
|
191
|
-
<testcase classname="<Placeholder /> > " name="Test placeholder with custom classname (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.
|
|
211
|
+
<testcase classname="<Placeholder /> > " name="Test placeholder with custom classname (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.005">
|
|
192
212
|
</testcase>
|
|
193
|
-
<testcase classname="<Placeholder /> > " name="Test placeholder with null values (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.
|
|
213
|
+
<testcase classname="<Placeholder /> > " name="Test placeholder with null values (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.007">
|
|
194
214
|
</testcase>
|
|
195
|
-
<testcase classname="<Placeholder /> > " name="Test placeholder with button (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.
|
|
215
|
+
<testcase classname="<Placeholder /> > " name="Test placeholder with button (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.012">
|
|
196
216
|
</testcase>
|
|
197
|
-
<testcase classname="<Placeholder /> > " name="Test button onConfigure trigger (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.
|
|
217
|
+
<testcase classname="<Placeholder /> > " name="Test button onConfigure trigger (lib-commonjs/controls/placeholder/PlaceholderComponent.test.js)" time="0.007">
|
|
198
218
|
</testcase>
|
|
199
219
|
</testsuite>
|
|
200
220
|
</testsuites>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SPFilePicker.d.ts","sourceRoot":"","sources":["../src/SPFilePicker.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SPFilePicker.js","sourceRoot":"","sources":["../src/SPFilePicker.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var version = "3.25.0-beta.
|
|
1
|
+
export var version = "3.25.0-beta.3152906";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the SharePoint / OneDrive File Picker (SDK v8).
|
|
3
|
+
*
|
|
4
|
+
* The picker is a Microsoft-hosted page (`/_layouts/15/FilePicker.aspx`) that is
|
|
5
|
+
* embedded in an iframe (or opened in a popup window). The host application and
|
|
6
|
+
* the picker communicate through `postMessage` + a `MessageChannel` port.
|
|
7
|
+
*
|
|
8
|
+
* @see https://learn.microsoft.com/onedrive/developer/controls/file-pickers/
|
|
9
|
+
*/
|
|
10
|
+
/** Selection mode passed to the picker configuration. */
|
|
11
|
+
export type SPFilePickerSelectionMode = 'single' | 'multiple' | 'pick';
|
|
12
|
+
/** What kind of items the user is allowed to pick. */
|
|
13
|
+
export type SPFilePickerItemsMode = 'files' | 'folders' | 'all';
|
|
14
|
+
/** How the picker surface is hosted. */
|
|
15
|
+
export type SPFilePickerTarget = 'iframe' | 'window';
|
|
16
|
+
/**
|
|
17
|
+
* How the picker authenticates.
|
|
18
|
+
* - `token` (default): the host supplies SharePoint bearer tokens in response to
|
|
19
|
+
* the picker's `authenticate` command (via the SPFx `aadTokenProviderFactory`
|
|
20
|
+
* or a custom `getToken`). This is REQUIRED when embedding the picker in an
|
|
21
|
+
* iframe (`target: 'iframe'`) — the picker only delivers `pick`/`close`
|
|
22
|
+
* commands once a token channel is established — and is the correct mode for
|
|
23
|
+
* SPFx web parts. It requires the SharePoint API permissions
|
|
24
|
+
* (`AllSites.Read`, `MyFiles.Read`) to be approved in the tenant.
|
|
25
|
+
* - `cookie`: relies on the user's existing SharePoint session cookies and omits
|
|
26
|
+
* the `authentication` config. This ONLY works with the popup window target
|
|
27
|
+
* (`target: 'window'`); it is not supported for iframe embedding, where the
|
|
28
|
+
* picker would render but never return a selection.
|
|
29
|
+
*/
|
|
30
|
+
export type SPFilePickerAuthMode = 'cookie' | 'token';
|
|
31
|
+
/**
|
|
32
|
+
* The `entry` section of the picker configuration. Only ONE of these should be
|
|
33
|
+
* supplied — the picker works with either OneDrive OR SharePoint per instance.
|
|
34
|
+
* When omitted, the picker defaults to the SharePoint site of `baseUrl`.
|
|
35
|
+
*/
|
|
36
|
+
export interface ISPFilePickerEntry {
|
|
37
|
+
/** Show the user's OneDrive. */
|
|
38
|
+
oneDrive?: Record<string, unknown>;
|
|
39
|
+
/** Show a SharePoint location. */
|
|
40
|
+
sharePoint?: Record<string, unknown>;
|
|
41
|
+
/** Show the current SharePoint site (of `baseUrl`). */
|
|
42
|
+
site?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Raw v8 picker configuration object. Provided as an escape hatch through
|
|
46
|
+
* {@link ISPFilePickerConfig.raw} for advanced scenarios not covered by the
|
|
47
|
+
* friendly options.
|
|
48
|
+
*/
|
|
49
|
+
export interface ISPFilePickerRawConfiguration extends Record<string, unknown> {
|
|
50
|
+
sdk: string;
|
|
51
|
+
entry: ISPFilePickerEntry;
|
|
52
|
+
/**
|
|
53
|
+
* Presence of this object (even if empty) tells the picker the HOST will
|
|
54
|
+
* supply tokens (token mode). Omit it entirely to make the picker rely on
|
|
55
|
+
* the user's SharePoint cookies (cookie mode).
|
|
56
|
+
*/
|
|
57
|
+
authentication?: Record<string, unknown>;
|
|
58
|
+
messaging: {
|
|
59
|
+
origin: string;
|
|
60
|
+
channelId: string;
|
|
61
|
+
/** Whether the picker should identify/verify the parent window. */
|
|
62
|
+
identifyParent?: boolean;
|
|
63
|
+
/** Whether the picker waits for the host configuration before rendering. */
|
|
64
|
+
waitForConfiguration?: boolean;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Friendly configuration used to build the v8 picker configuration.
|
|
69
|
+
*/
|
|
70
|
+
export interface ISPFilePickerConfig {
|
|
71
|
+
/**
|
|
72
|
+
* SharePoint web URL used both as the picker host and the token resource,
|
|
73
|
+
* e.g. `https://contoso.sharepoint.com/sites/dev` or
|
|
74
|
+
* `https://contoso-my.sharepoint.com`.
|
|
75
|
+
*/
|
|
76
|
+
baseUrl: string;
|
|
77
|
+
/** Picker entry point. Defaults to `{ sharePoint: {} }`. */
|
|
78
|
+
entry?: ISPFilePickerEntry;
|
|
79
|
+
/** Selection mode. Defaults to `single`. */
|
|
80
|
+
selectionMode?: SPFilePickerSelectionMode;
|
|
81
|
+
/** Kind of items that can be picked. Defaults to `files`. */
|
|
82
|
+
itemsMode?: SPFilePickerItemsMode;
|
|
83
|
+
/**
|
|
84
|
+
* Allowed file extensions (without the dot), e.g. `['docx', 'pdf']`.
|
|
85
|
+
* When omitted, all file types are allowed.
|
|
86
|
+
*/
|
|
87
|
+
fileTypes?: string[];
|
|
88
|
+
/** Locale / LCID for the picker UI, e.g. `en-us`. Defaults to `en-us`. */
|
|
89
|
+
locale?: string;
|
|
90
|
+
/**
|
|
91
|
+
* How the picker authenticates. Defaults to `token` (SharePoint bearer tokens
|
|
92
|
+
* via the SPFx `aadTokenProviderFactory`), which is REQUIRED for the iframe
|
|
93
|
+
* target and is the correct mode for SPFx web parts. Use `cookie` only with
|
|
94
|
+
* the popup window target (`target: 'window'`).
|
|
95
|
+
*/
|
|
96
|
+
authMode?: SPFilePickerAuthMode;
|
|
97
|
+
/**
|
|
98
|
+
* The hosting app identifier passed to the picker (query string `app`).
|
|
99
|
+
* Not set by default. Only needed to opt into a specific SharePoint scenario.
|
|
100
|
+
*/
|
|
101
|
+
app?: string;
|
|
102
|
+
/**
|
|
103
|
+
* The picker scenario passed to the picker (query string `scenario`).
|
|
104
|
+
* Not set by default. Avoid SharePoint-internal scenarios (e.g. `SPBannerEdit`)
|
|
105
|
+
* when embedding in a third-party context, as they run scenario-specific init.
|
|
106
|
+
*/
|
|
107
|
+
scenario?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Advanced escape hatch. When supplied, this object is merged over the
|
|
110
|
+
* generated configuration, allowing any v8 option to be set directly.
|
|
111
|
+
*/
|
|
112
|
+
raw?: Partial<ISPFilePickerRawConfiguration>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The `authenticate` command the picker sends when it needs a token.
|
|
116
|
+
*/
|
|
117
|
+
export interface ISPFilePickerAuthenticateCommand {
|
|
118
|
+
command: 'authenticate';
|
|
119
|
+
/** The resource the token must be issued for (a SharePoint URL). */
|
|
120
|
+
resource: string;
|
|
121
|
+
/** Token type requested by the picker, e.g. `SharePoint`. */
|
|
122
|
+
type?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* A single item returned by the picker. Only the guaranteed fields are typed;
|
|
126
|
+
* the picker returns many more properties depending on the item.
|
|
127
|
+
*
|
|
128
|
+
* A drive-item URL can be built as:
|
|
129
|
+
* `item['@sharePoint.endpoint'] + '/drives/' + item.parentReference.driveId + '/items/' + item.id`
|
|
130
|
+
*/
|
|
131
|
+
export interface ISPFilePickerItem extends Record<string, unknown> {
|
|
132
|
+
id: string;
|
|
133
|
+
name?: string;
|
|
134
|
+
webUrl?: string;
|
|
135
|
+
size?: number;
|
|
136
|
+
parentReference?: {
|
|
137
|
+
driveId?: string;
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
};
|
|
140
|
+
'@sharePoint.endpoint'?: string;
|
|
141
|
+
}
|
|
142
|
+
/** Error surfaced by the picker workflow. */
|
|
143
|
+
export interface ISPFilePickerError {
|
|
144
|
+
code: string;
|
|
145
|
+
message: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Signature for the token resolver. Given the resource requested by the picker
|
|
149
|
+
* it must return a valid SharePoint access token for that resource.
|
|
150
|
+
*/
|
|
151
|
+
export type SPFilePickerTokenResolver = (resource: string) => Promise<string>;
|
|
152
|
+
//# sourceMappingURL=ISPFilePicker.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISPFilePicker.types.d.ts","sourceRoot":"","sources":["../../../src/controls/SPFilePicker/ISPFilePicker.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEvE,sDAAsD;AACtD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;AAEhE,wCAAwC;AACxC,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,kBAAkB,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,SAAS,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,mEAAmE;QACnE,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,4EAA4E;QAC5E,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAE3B,4CAA4C;IAC5C,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAE1C,6DAA6D;IAC7D,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAElC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAEhC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,cAAc,CAAC;IACxB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAkB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the SharePoint / OneDrive File Picker (SDK v8).
|
|
3
|
+
*
|
|
4
|
+
* The picker is a Microsoft-hosted page (`/_layouts/15/FilePicker.aspx`) that is
|
|
5
|
+
* embedded in an iframe (or opened in a popup window). The host application and
|
|
6
|
+
* the picker communicate through `postMessage` + a `MessageChannel` port.
|
|
7
|
+
*
|
|
8
|
+
* @see https://learn.microsoft.com/onedrive/developer/controls/file-pickers/
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ISPFilePicker.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISPFilePicker.types.js","sourceRoot":"","sources":["../../../src/controls/SPFilePicker/ISPFilePicker.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { MouseEventHandler, ReactElement } from 'react';
|
|
2
|
+
import type { WebPartContext } from '@microsoft/sp-webpart-base';
|
|
3
|
+
import type { ISPFilePickerEntry, ISPFilePickerError, ISPFilePickerItem, SPFilePickerAuthMode, SPFilePickerItemsMode, SPFilePickerSelectionMode, SPFilePickerTarget, SPFilePickerTokenResolver } from './ISPFilePicker.types';
|
|
4
|
+
export interface ISPFilePickerTriggerProps {
|
|
5
|
+
'aria-disabled'?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Props for the ready-to-use {@link SPFilePicker} component.
|
|
11
|
+
*
|
|
12
|
+
* The component renders a trigger button that opens the SharePoint / OneDrive
|
|
13
|
+
* File Picker (v8) inside a modal dialog (iframe) or a popup window. For full
|
|
14
|
+
* control over the surface, use the {@link useSPFilePicker} hook directly.
|
|
15
|
+
*/
|
|
16
|
+
export interface ISPFilePickerProps {
|
|
17
|
+
/**
|
|
18
|
+
* The SPFx web part context. Used to resolve the default `baseUrl` from
|
|
19
|
+
* `pageContext.web.absoluteUrl` and to acquire SharePoint access tokens via
|
|
20
|
+
* the `aadTokenProviderFactory` when no custom `getToken` is supplied.
|
|
21
|
+
*/
|
|
22
|
+
context: WebPartContext;
|
|
23
|
+
/**
|
|
24
|
+
* SharePoint web URL used as the picker host and token resource. When omitted,
|
|
25
|
+
* the component falls back to `context.pageContext.web.absoluteUrl`.
|
|
26
|
+
*/
|
|
27
|
+
baseUrl?: string;
|
|
28
|
+
/** Picker entry point. Defaults to `{ sharePoint: {} }`. */
|
|
29
|
+
entry?: ISPFilePickerEntry;
|
|
30
|
+
/** Selection mode. Defaults to `single`. */
|
|
31
|
+
selectionMode?: SPFilePickerSelectionMode;
|
|
32
|
+
/** Kind of items that can be picked. Defaults to `files`. */
|
|
33
|
+
itemsMode?: SPFilePickerItemsMode;
|
|
34
|
+
/** Allowed file extensions (without the dot), e.g. `['docx', 'pdf']`. */
|
|
35
|
+
fileTypes?: string[];
|
|
36
|
+
/** Locale / LCID for the picker UI. Defaults to `en-us`. */
|
|
37
|
+
locale?: string;
|
|
38
|
+
/**
|
|
39
|
+
* How the picker authenticates. Defaults to `token` (SharePoint bearer tokens
|
|
40
|
+
* via the SPFx `aadTokenProviderFactory` or a custom `getToken`), which is
|
|
41
|
+
* REQUIRED for the iframe target and is the correct mode for SPFx web parts.
|
|
42
|
+
* Use `cookie` only with the popup window target (`target: 'window'`).
|
|
43
|
+
*/
|
|
44
|
+
authMode?: SPFilePickerAuthMode;
|
|
45
|
+
/** Hosting app identifier (query string `app`). Not set by default. */
|
|
46
|
+
app?: string;
|
|
47
|
+
/** Picker scenario (query string `scenario`). Not set by default. */
|
|
48
|
+
scenario?: string;
|
|
49
|
+
/** Where the picker is hosted. Defaults to `iframe` (rendered in a dialog). */
|
|
50
|
+
target?: SPFilePickerTarget;
|
|
51
|
+
/**
|
|
52
|
+
* Custom token resolver. When omitted, the SPFx `aadTokenProviderFactory`
|
|
53
|
+
* from `context` is used to acquire a token for the SharePoint resource.
|
|
54
|
+
*/
|
|
55
|
+
getToken?: SPFilePickerTokenResolver;
|
|
56
|
+
/** Fired with the picked items when the user confirms a selection. */
|
|
57
|
+
onPicked: (items: ISPFilePickerItem[]) => void;
|
|
58
|
+
/** Fired when the picker is cancelled / closed without a selection. */
|
|
59
|
+
onCancel?: () => void;
|
|
60
|
+
/** Fired when an error occurs during the picker workflow. */
|
|
61
|
+
onError?: (error: ISPFilePickerError) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Custom interactive trigger element. When provided it replaces the default
|
|
64
|
+
* button and receives an `onClick` handler that opens the picker.
|
|
65
|
+
*/
|
|
66
|
+
trigger?: ReactElement<ISPFilePickerTriggerProps>;
|
|
67
|
+
/** Text for the default trigger button. Defaults to `Select from SharePoint`. */
|
|
68
|
+
buttonText?: string;
|
|
69
|
+
/** Accessible title applied to the picker iframe. Defaults to `Select a file`. */
|
|
70
|
+
dialogTitle?: string;
|
|
71
|
+
/** Disable the trigger. */
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/** Dialog width in px (iframe target). Defaults to `1080`. */
|
|
74
|
+
dialogWidth?: number;
|
|
75
|
+
/** Dialog / iframe height in px (iframe target). Defaults to `680`. */
|
|
76
|
+
dialogHeight?: number;
|
|
77
|
+
/** Additional CSS class applied to the trigger element. */
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=ISPFilePickerProps.d.ts.map
|