Skip to content

Commit

Permalink
SCAL-237376 Initial Commit for powerpoint add-in
Browse files Browse the repository at this point in the history
  • Loading branch information
adityamittal3107 committed Jan 8, 2025
1 parent 442c5fd commit aed2a55
Show file tree
Hide file tree
Showing 10 changed files with 17,440 additions and 9,640 deletions.
26,957 changes: 17,318 additions & 9,639 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react-hooks": "^4.6.0",
"jsdom": "^21.1.1",
"nx": "15.8.9",
"nx": "^15.8.9",
"prettier": "^2.6.2",
"svgstore": "^3.0.1",
"syncpack": "^9.1.2",
Expand Down
85 changes: 85 additions & 0 deletions packages/slides/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>58b7b7ec-ecf6-4803-a6be-dbf22303c630</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="ThoughtSpot"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/ts_logo_32x32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/ts_logo_64x64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://localhost:3000</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Presentation"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/powerpoint.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Presentation">
<DesktopFormFactor>
<GetStarted>
<Title resid="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/ts_logo_16x16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/ts_logo_32x32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/ts_logo_80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/powerpoint.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="ThoughtSpot Analytics"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="ThoughtSpot Analytics has been successfully installed."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
13 changes: 13 additions & 0 deletions packages/slides/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"@types/google-apps-script": "^1.0.57",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"npm-run-all": "^4.1.5",
"office-addin-cli": "^1.6.5",
"office-addin-debugging": "^5.1.6",
"office-addin-dev-certs": "^1.13.5",
"office-addin-lint": "^2.3.5",
"office-addin-manifest": "^1.13.6",
"office-addin-prettier-config": "^1.2.1",
"rollup-plugin-visualizer": "^5.9.0",
"sass": "^1.58.0",
"vite": "^4.2.0"
Expand All @@ -23,7 +29,14 @@
"deploy": "HOST=$SLIDES_HOST npm-run-all -p build dist",
"lint": "eslint src/**",
"start": "HOST=https://localhost:5173/ npm-run-all -p dist:dev vite",
"start-powerpoint": "HOST=https://localhost:3000/ npm-run-all -p vite powerpoint:debug",
"start-powerpoint:desktop": "HOST=https://localhost:3000/ npm-run-all -p vite powerpoint:desktop",
"start-powerpoint:web": "HOST=https://localhost:3000/ npm-run-all -p vite powerpoint:web",
"stop-powerpoint": "office-addin-debugging stop manifest.xml",
"vite": "vite",
"powerpoint:debug": "office-addin-debugging start manifest.xml",
"powerpoint:desktop": "office-addin-debugging start manifest.xml desktop",
"powerpoint:web": "office-addin-debugging start manifest.xml web",
"copy-index": "gsuite-shell",
"test": "vitest run"
},
Expand Down
Binary file added packages/slides/src/ui/assets/ts_logo_16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/slides/src/ui/assets/ts_logo_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/slides/src/ui/assets/ts_logo_64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/slides/src/ui/assets/ts_logo_80x80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions packages/slides/src/ui/powerpoint.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Preact + TS</title>
<!-- Office JavaScript API -->
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/powerpoint.tsx"></script>
<div style="display: none"><%- iconSprite %></div>
</body>
</html>
7 changes: 7 additions & 0 deletions packages/slides/src/ui/powerpoint.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { render } from 'preact';
import './index.scss';
import { App } from './components/app';

Office.onReady(() => {
render(<App />, document.getElementById('app'));
});

0 comments on commit aed2a55

Please sign in to comment.