Skip to content

Commit f7d3117

Browse files
committed
wip
1 parent e532706 commit f7d3117

20 files changed

+1756
-642
lines changed

README.md

+19-35
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,18 @@ Note: The Google Picker API does not support file organization, moving, or copyi
8080

8181
### Properties
8282

83-
| Property | Attribute | Type | Default | Description |
84-
| -------------- | ---------------- | ---------------------- | -------------------------------------------- | ----------------------------------------------------- |
85-
| `appId` | `app-id` | `string` | | The Google Drive app ID. |
86-
| `clientId` | `client-id` | `string` | | The Google API client ID. |
87-
| `developerKey` | `developerKey` | `string \| undefined` | | The Google API developer key. |
88-
| `height` | `height` | `number \| undefined` | | The height of the picker dialog. |
89-
| `hideTitleBar` | `hide-title-bar` | `boolean \| undefined` | | Whether to hide the title bar of the picker dialog. |
90-
| `locale` | `locale` | `string \| undefined` | | The locale of the picker dialog. |
91-
| `maxItems` | `max-items` | `number \| undefined` | | The maximum number of items that the user can select. |
92-
| `multiselect` | `multiselect` | `boolean \| undefined` | | Whether the user can select multiple items. |
93-
| `oauthToken` | `oauth-token` | `string \| undefined` | | The OAuth token to authenticate the user. |
94-
| `origin` | `origin` | `string \| undefined` | | The origin of the picker dialog. |
95-
| `relayUrl` | `relay-url` | `string \| undefined` | | The relay URL to use for cross-origin communication. |
96-
| `scope` | `scope` | `string` | "https://www.googleapis.com/auth/drive.file" | The scope of the OAuth token. |
97-
| `title` | `title` | `string` | "" | The title of the picker dialog. |
98-
| `visible` | `visible` | `boolean` | true | Whether the picker dialog is visible. |
99-
| `width` | `width` | `number \| undefined` | | The width of the picker dialog. |
83+
| Property | Type |
84+
| --------- | --------- |
85+
| `visible` | `boolean` |
10086

10187
### Methods
10288

103-
| Method | Type |
104-
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
105-
| `addEventListener` | `(type: "cancel" \| "picked", listener: (ev: CustomEvent<ResponseObject>): void, options?: boolean \| AddEventListenerOptions \| undefined) => void` |
106-
| `removeEventListener` | `(type: "cancel" \| "picked", listener: (ev: CustomEvent<ResponseObject>): void, options?: boolean \| EventListenerOptions \| undefined) => void` |
89+
| Method | Type |
90+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
91+
| `addEventListener` | `(type: "cancel" \| "picked" \| "loaded", listener: (ev: DrivePickerEvent): void, options?: boolean \| AddEventListenerOptions \| undefined) => void` |
92+
| `getBooleanAttribute` | `(name: string): boolean` |
93+
| `getNumberAttribute` | `(name: string): number \| null` |
94+
| `removeEventListener` | `(type: "cancel" \| "picked" \| "loaded", listener: (ev: DrivePickerEvent): void, options?: boolean \| EventListenerOptions \| undefined) => void` |
10795

10896
### Events
10997

@@ -132,20 +120,16 @@ The `drive-picker-docs-view` element is used to define a view for the Google Dri
132120

133121
### Properties
134122

135-
| Property | Attribute | Modifiers | Type | Default | Description |
136-
| --------------------- | ----------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
137-
| `enableDrives` | `enable-drives` | | `boolean \| undefined` | | Indicates whether to enable drives in the view. |
138-
| `includeFolders` | `include-folders` | | `boolean \| undefined` | | Indicates whether to include folders in the view. |
139-
| `label` | `label` | | `string \| undefined` | | The label of the view. |
140-
| `mimeTypes` | `mime-types` | | `string \| undefined` | | The MIME types to filter the view by. |
141-
| `mode` | `mode` | | `"GRID" \| "LIST"` | "GRID" | The mode of the view. This should be one of the values of the `google.picker.DocsViewMode` enum. |
142-
| `ownedByMe` | `owned-by-me` | | `boolean \| undefined` | | Indicates whether to show only files owned by the user in the view. |
143-
| `parent` | `parent` | | `string \| undefined` | | The ID of the parent folder to restrict the view to. |
144-
| `query` | `query` | | `string \| undefined` | | The query string to filter the view by. |
145-
| `selectFolderEnabled` | `select-folder-enabled` | | `boolean \| undefined` | | Indicates whether selecting folders is enabled in the view. |
146-
| `starred` | `starred` | | `boolean \| undefined` | | Indicates whether to show only starred files in the view. |
147-
| `view` | | readonly | `DocsView` | | Gets the Google Drive Picker view based on the current property values. |
148-
| `viewId` | `view-id` | | `"DOCS" \| "DOCS_IMAGES" \| "DOCS_IMAGES_AND_VIDEOS" \| "DOCS_VIDEOS" \| "DOCUMENTS" \| "DRAWINGS" \| "FOLDERS" \| "FORMS" \| "IMAGE_SEARCH" \| "PDFS" \| "PHOTO_ALBUMS" \| "PHOTO_UPLOAD" \| ... 6 more ... \| "YOUTUBE"` | "DOCS" | The ID of the view. This should be one of the values of the<br />`google.picker.ViewId` enum.<br /><br />Note: The default value is `DOCS` which corresponds to the<br />`google.picker.ViewId.DOCS` enum value in the Google Drive Picker API and<br />corresponsds to all Google Drive document types. |
123+
| Property | Modifiers | Type | Description |
124+
| -------- | --------- | ---------- | ----------------------------------------------------------------------- |
125+
| `view` | readonly | `DocsView` | Gets the Google Drive Picker view based on the current property values. |
126+
127+
### Methods
128+
129+
| Method | Type |
130+
| --------------------- | -------------------------------- |
131+
| `getBooleanAttribute` | `(name: string): boolean` |
132+
| `getNumberAttribute` | `(name: string): number \| null` |
149133

150134
<!-- END docs -->
151135

examples/svelte/.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
/.svelte-kit
7+
/build
8+
9+
# OS
10+
.DS_Store
11+
Thumbs.db
12+
13+
# Env
14+
.env
15+
.env.*
16+
!.env.example
17+
!.env.test
18+
19+
# Vite
20+
vite.config.js.timestamp-*
21+
vite.config.ts.timestamp-*

examples/svelte/.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

examples/svelte/README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# create-svelte
2+
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npm create svelte@latest
12+
13+
# create a new project in my-app
14+
npm create svelte@latest my-app
15+
```
16+
17+
## Developing
18+
19+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+
21+
```bash
22+
npm run dev
23+
24+
# or start the server and open the app in a new browser tab
25+
npm run dev -- --open
26+
```
27+
28+
## Building
29+
30+
To create a production version of your app:
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
You can preview the production build with `npm run preview`.
37+
38+
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

examples/svelte/package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "svelte",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
10+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
11+
},
12+
"devDependencies": {
13+
"@sveltejs/adapter-auto": "^3.0.0",
14+
"@sveltejs/kit": "^2.0.0",
15+
"@sveltejs/vite-plugin-svelte": "^3.0.0",
16+
"svelte": "^4.2.7",
17+
"svelte-check": "^3.6.0",
18+
"typescript": "^5.0.0",
19+
"vite": "^5.0.3"
20+
},
21+
"type": "module"
22+
}

0 commit comments

Comments
 (0)