Skip to content

Commit 1303a32

Browse files
[All hosts] Get latest (#2372)
1 parent 4cdea5d commit 1303a32

File tree

62 files changed

+2180
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2180
-5
lines changed

docs/docs-ref-autogen/outlook/outlook/office.draganddropeventargs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,40 @@ remarks: >-
1818
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1919
-->.
2020
21+
22+
#### Examples
23+
24+
25+
```TypeScript
26+
27+
// Link to full sample:
28+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
29+
30+
31+
function dragAndDropEventHandler(event) {
32+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
33+
console.log(`Event type: ${event.type}`);
34+
35+
const eventData = event.dragAndDropEventData;
36+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
37+
38+
if (eventData.type == "drop") {
39+
console.log("Items dropped into task pane.");
40+
const files = eventData.dataTransfer.files;
41+
files.forEach((file) => {
42+
const content = file.fileContent;
43+
const name = file.name;
44+
const fileType = file.type;
45+
console.log(`File name: ${name}`);
46+
console.log(`File type: ${fileType}`);
47+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
48+
});
49+
}
50+
});
51+
}
52+
53+
```
54+
2155
isPreview: false
2256
isDeprecated: false
2357
type: interface

docs/docs-ref-autogen/outlook/outlook/office.dragovereventdata.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

docs/docs-ref-autogen/outlook/outlook/office.dropeventdata.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

docs/docs-ref-autogen/outlook/outlook/office.droppeditemdetails.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

docs/docs-ref-autogen/outlook/outlook/office.droppeditems.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

docs/docs-ref-autogen/outlook_1_10/outlook/office.draganddropeventargs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,40 @@ remarks: >-
1818
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1919
-->.
2020
21+
22+
#### Examples
23+
24+
25+
```TypeScript
26+
27+
// Link to full sample:
28+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
29+
30+
31+
function dragAndDropEventHandler(event) {
32+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
33+
console.log(`Event type: ${event.type}`);
34+
35+
const eventData = event.dragAndDropEventData;
36+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
37+
38+
if (eventData.type == "drop") {
39+
console.log("Items dropped into task pane.");
40+
const files = eventData.dataTransfer.files;
41+
files.forEach((file) => {
42+
const content = file.fileContent;
43+
const name = file.name;
44+
const fileType = file.type;
45+
console.log(`File name: ${name}`);
46+
console.log(`File type: ${fileType}`);
47+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
48+
});
49+
}
50+
});
51+
}
52+
53+
```
54+
2155
isPreview: false
2256
isDeprecated: false
2357
type: interface

docs/docs-ref-autogen/outlook_1_10/outlook/office.dragovereventdata.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

docs/docs-ref-autogen/outlook_1_10/outlook/office.dropeventdata.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

docs/docs-ref-autogen/outlook_1_10/outlook/office.droppeditemdetails.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ remarks: >-
1717
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/drag-drop-items)<!--
1818
-->.
1919
20+
21+
#### Examples
22+
23+
24+
```TypeScript
25+
26+
// Link to full sample:
27+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
28+
29+
30+
function dragAndDropEventHandler(event) {
31+
Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
32+
console.log(`Event type: ${event.type}`);
33+
34+
const eventData = event.dragAndDropEventData;
35+
console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
36+
37+
if (eventData.type == "drop") {
38+
console.log("Items dropped into task pane.");
39+
const files = eventData.dataTransfer.files;
40+
files.forEach((file) => {
41+
const content = file.fileContent;
42+
const name = file.name;
43+
const fileType = file.type;
44+
console.log(`File name: ${name}`);
45+
console.log(`File type: ${fileType}`);
46+
console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
47+
});
48+
}
49+
});
50+
}
51+
52+
```
53+
2054
isPreview: false
2155
isDeprecated: false
2256
type: interface

0 commit comments

Comments
 (0)