Skip to content

Commit 8b49d21

Browse files
authored
Merging pull request #18142
* new components * pnpm-lock.yaml * versions * updates
1 parent 3aee12f commit 8b49d21

File tree

20 files changed

+552
-23
lines changed

20 files changed

+552
-23
lines changed

components/google_slides/actions/create-image/create-image.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_slides-create-image",
55
name: "Create Image",
66
description: "Creates an image in a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateImageRequest)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
googleSlides,

components/google_slides/actions/create-page-element/create-page-element.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "google_slides-create-page-element",
66
name: "Create Page Element",
77
description: "Create a new page element in a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateShapeRequest)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
googleSlides,

components/google_slides/actions/create-presentation/create-presentation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_slides-create-presentation",
55
name: "Create Presentation",
66
description: "Create a blank presentation or duplicate an existing presentation. [See the docs here](https://developers.google.com/slides/api/guides/presentations#copy_an_existing_presentation)",
7-
version: "0.0.4",
7+
version: "0.0.5",
88
type: "action",
99
props: {
1010
app,

components/google_slides/actions/create-slide/create-slide.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "google_slides-create-slide",
66
name: "Create Slide",
77
description: "Create a new slide in a presentation. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateSlideRequest)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
googleSlides,
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import googleSlides from "../../google_slides.app.mjs";
2+
3+
export default {
4+
key: "google_slides-create-table",
5+
name: "Create Table",
6+
description: "Create a new table in a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#CreateTableRequest)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
googleSlides,
11+
presentationId: {
12+
propDefinition: [
13+
googleSlides,
14+
"presentationId",
15+
],
16+
},
17+
slideId: {
18+
propDefinition: [
19+
googleSlides,
20+
"slideId",
21+
(c) => ({
22+
presentationId: c.presentationId,
23+
}),
24+
],
25+
},
26+
rows: {
27+
type: "integer",
28+
label: "Rows",
29+
description: "The number of rows in the table",
30+
},
31+
columns: {
32+
type: "integer",
33+
label: "Columns",
34+
description: "The number of columns in the table",
35+
},
36+
height: {
37+
type: "integer",
38+
label: "Height",
39+
description: "The height of the shape in points (1/72 of an inch)",
40+
},
41+
width: {
42+
type: "integer",
43+
label: "Width",
44+
description: "The width of the shape in points (1/72 of an inch)",
45+
},
46+
translateX: {
47+
type: "integer",
48+
label: "Translate X",
49+
description: "The translation of the table on the x-axis",
50+
optional: true,
51+
},
52+
translateY: {
53+
type: "integer",
54+
label: "Translate Y",
55+
description: "The translation of the table on the y-axis",
56+
optional: true,
57+
},
58+
},
59+
async run({ $ }) {
60+
const response = await this.googleSlides.createTable(this.presentationId, {
61+
elementProperties: {
62+
pageObjectId: this.slideId,
63+
size: {
64+
height: {
65+
magnitude: this.height,
66+
unit: "PT",
67+
},
68+
width: {
69+
magnitude: this.width,
70+
unit: "PT",
71+
},
72+
},
73+
transform: {
74+
scaleX: 1,
75+
scaleY: 1,
76+
translateX: this.translateX,
77+
translateY: this.translateY,
78+
unit: "PT",
79+
},
80+
},
81+
rows: this.rows,
82+
columns: this.columns,
83+
});
84+
85+
$.export("$summary", "Successfully created table in the slide");
86+
return response.data;
87+
},
88+
};

components/google_slides/actions/delete-page-element/delete-page-element.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_slides-delete-page-element",
55
name: "Delete Page Element",
66
description: "Deletes a page element from a slide. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteObjectRequest)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
googleSlides,

components/google_slides/actions/delete-slide/delete-slide.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_slides-delete-slide",
55
name: "Delete Slide",
66
description: "Deletes a slide from a presentation. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteObjectRequest)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
googleSlides,
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import googleSlides from "../../google_slides.app.mjs";
2+
3+
export default {
4+
key: "google_slides-delete-table-column",
5+
name: "Delete Table Column",
6+
description: "Delete column from a table. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteTableColumnRequest)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
googleSlides,
11+
presentationId: {
12+
propDefinition: [
13+
googleSlides,
14+
"presentationId",
15+
],
16+
},
17+
slideId: {
18+
propDefinition: [
19+
googleSlides,
20+
"slideId",
21+
(c) => ({
22+
presentationId: c.presentationId,
23+
}),
24+
],
25+
},
26+
tableId: {
27+
propDefinition: [
28+
googleSlides,
29+
"tableId",
30+
(c) => ({
31+
presentationId: c.presentationId,
32+
slideId: c.slideId,
33+
}),
34+
],
35+
},
36+
columnIndex: {
37+
type: "integer",
38+
label: "Column Index",
39+
description: "The index of the column to delete",
40+
},
41+
},
42+
async run({ $ }) {
43+
const response = await this.googleSlides.deleteTableColumn(this.presentationId, {
44+
tableObjectId: this.tableId,
45+
cellLocation: {
46+
columnIndex: this.columnIndex,
47+
},
48+
});
49+
$.export("$summary", "Successfully deleted table column");
50+
return response.data;
51+
},
52+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import googleSlides from "../../google_slides.app.mjs";
2+
3+
export default {
4+
key: "google_slides-delete-table-row",
5+
name: "Delete Table Row",
6+
description: "Delete row from a table. [See the documentation](https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations/request#DeleteTableRowRequest)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
googleSlides,
11+
presentationId: {
12+
propDefinition: [
13+
googleSlides,
14+
"presentationId",
15+
],
16+
},
17+
slideId: {
18+
propDefinition: [
19+
googleSlides,
20+
"slideId",
21+
(c) => ({
22+
presentationId: c.presentationId,
23+
}),
24+
],
25+
},
26+
tableId: {
27+
propDefinition: [
28+
googleSlides,
29+
"tableId",
30+
(c) => ({
31+
presentationId: c.presentationId,
32+
slideId: c.slideId,
33+
}),
34+
],
35+
},
36+
rowIndex: {
37+
type: "integer",
38+
label: "Row Index",
39+
description: "The index of the row to delete",
40+
},
41+
},
42+
async run({ $ }) {
43+
const response = await this.googleSlides.deleteTableRow(this.presentationId, {
44+
tableObjectId: this.tableId,
45+
cellLocation: {
46+
rowIndex: this.rowIndex,
47+
},
48+
});
49+
$.export("$summary", "Successfully deleted table row");
50+
return response.data;
51+
},
52+
};

components/google_slides/actions/find-presentation/find-presentation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "google_slides-find-presentation",
55
name: "Find a Presentation",
66
description: "Find a presentation on Google Drive. [See the docs here](https://developers.google.com/slides/api/samples/presentation#list_existing_presentation_files)",
7-
version: "0.0.4",
7+
version: "0.0.5",
88
type: "action",
99
props: {
1010
app,

0 commit comments

Comments
 (0)