@looker/extension-sdk 24.18.0 → 24.20.0
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/CHANGELOG.md +28 -0
- package/lib/connect/tile/tile_sdk.d.ts +0 -1
- package/lib/connect/tile/tile_sdk.js.map +1 -1
- package/lib/connect/tile/types.d.ts +0 -1
- package/lib/connect/tile/types.js.map +1 -1
- package/lib/esm/connect/tile/tile_sdk.js.map +1 -1
- package/lib/esm/connect/tile/types.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [24.20.0](https://github.com/looker-open-source/sdk-codegen/compare/extension-sdk-v24.18.1...extension-sdk-v24.20.0) (2024-11-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove reference to react in extension-sdk ([#1532](https://github.com/looker-open-source/sdk-codegen/issues/1532)) ([bae0fe3](https://github.com/looker-open-source/sdk-codegen/commit/bae0fe3a599ac081af5573a7c8632fd5f31dfefe))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* The following workspace dependencies were updated
|
|
19
|
+
* dependencies
|
|
20
|
+
* @looker/sdk bumped from 24.18.1 to 24.20.0
|
|
21
|
+
|
|
22
|
+
## [24.18.1](https://github.com/looker-open-source/sdk-codegen/compare/extension-sdk-v24.18.0...extension-sdk-v24.18.1) (2024-10-21)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Chores
|
|
26
|
+
|
|
27
|
+
* **extension-sdk:** Synchronize undefined versions
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* @looker/sdk bumped from 24.18.0 to 24.18.1
|
|
35
|
+
|
|
8
36
|
## [24.18.0](https://github.com/looker-open-source/sdk-codegen/compare/extension-sdk-v24.16.2...extension-sdk-v24.18.0) (2024-10-11)
|
|
9
37
|
|
|
10
38
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { MouseEvent } from 'react';
|
|
2
1
|
import type { ExtensionHostApiImpl } from '../extension_host_api';
|
|
3
2
|
import type { CrossFilterOptions, DrillMenuOptions, Filters, TileError, TileHostData, TileSDKInternal } from './types';
|
|
4
3
|
export declare class TileSDKImpl implements TileSDKInternal {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile_sdk.js","names":["_errors","require","_types","_types2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","defaultHostData","isDashboardEditing","dashboardRunState","DashboardRunState","UNKNOWN","dashboardFilters","TileSDKImpl","constructor","hostApi","tileHostData","tileHostDataChanged","partialHostData","isDashboardMountSupported","addError","error","send","ExtensionRequestType","TILE_ADD_ERRORS","errors","NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR","clearError","TILE_CLEAR_ERRORS","group","undefined","addErrors","_len","Array","_key","clearErrors","openDrillMenu","options","event","TILE_OPEN_DRILL_MENU","sanitizeEvent","toggleCrossFilter","TILE_TOGGLE_CROSS_FILTER","runDashboard","TILE_RUN_DASHBOARD","stopDashboard","TILE_STOP_DASHBOARD","updateFilters","filters","run","TILE_UPDATE_FILTERS","openScheduleDialog","sendAndReceive","TILE_OPEN_SCHEDULE_DIALOG","metaKey","pageX","pageY","type","exports"],"sources":["../../../src/connect/tile/tile_sdk.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { MouseEvent } from 'react';\nimport { NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR } from '../../util/errors';\nimport { ExtensionRequestType } from '../types';\nimport type { ExtensionHostApiImpl } from '../extension_host_api';\nimport type {\n CrossFilterOptions,\n DrillMenuOptions,\n Filters,\n TileError,\n TileHostData,\n TileSDKInternal,\n} from './types';\nimport { DashboardRunState } from './types';\n\nconst defaultHostData: TileHostData = {\n isDashboardEditing: false,\n dashboardRunState: DashboardRunState.UNKNOWN,\n dashboardFilters: {},\n};\nexport class TileSDKImpl implements TileSDKInternal {\n hostApi: ExtensionHostApiImpl;\n tileHostData: TileHostData;\n\n constructor(hostApi: ExtensionHostApiImpl) {\n this.hostApi = hostApi;\n this.tileHostData = { ...defaultHostData };\n }\n\n tileHostDataChanged(partialHostData: Partial<TileHostData>) {\n // Ignore update messages if dashboard mounts not supported.\n // Should never happen.\n if (this.hostApi.isDashboardMountSupported) {\n this.tileHostData = { ...this.tileHostData, ...partialHostData };\n }\n }\n\n addError(error: TileError) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_ADD_ERRORS, {\n errors: [error],\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n clearError() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_CLEAR_ERRORS, {\n group: undefined,\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n addErrors(...errors: TileError[]) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_ADD_ERRORS, { errors });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n clearErrors(group?: string) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_CLEAR_ERRORS, { group });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n openDrillMenu(options: DrillMenuOptions, event?: MouseEvent) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_OPEN_DRILL_MENU, {\n options,\n event: this.sanitizeEvent(event),\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n toggleCrossFilter(options: CrossFilterOptions, event?: MouseEvent) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_TOGGLE_CROSS_FILTER, {\n options,\n event: this.sanitizeEvent(event),\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n runDashboard() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_RUN_DASHBOARD, {});\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n stopDashboard() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_STOP_DASHBOARD, {});\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n updateFilters(filters: Filters, run = false) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_UPDATE_FILTERS, {\n filters,\n run,\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n openScheduleDialog() {\n if (this.hostApi.isDashboardMountSupported) {\n return this.hostApi.sendAndReceive(\n ExtensionRequestType.TILE_OPEN_SCHEDULE_DIALOG,\n {}\n );\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n sanitizeEvent(event?: MouseEvent) {\n if (event) {\n return {\n metaKey: event.metaKey,\n pageX: event.pageX,\n pageY: event.pageY,\n type: event.type,\n };\n }\n return undefined;\n }\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAUA,IAAAE,OAAA,GAAAF,OAAA;AAA4C,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,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;AACF;AAAC4B,OAAA,CAAA7C,WAAA,GAAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"tile_sdk.js","names":["_errors","require","_types","_types2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","defaultHostData","isDashboardEditing","dashboardRunState","DashboardRunState","UNKNOWN","dashboardFilters","TileSDKImpl","constructor","hostApi","tileHostData","tileHostDataChanged","partialHostData","isDashboardMountSupported","addError","error","send","ExtensionRequestType","TILE_ADD_ERRORS","errors","NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR","clearError","TILE_CLEAR_ERRORS","group","undefined","addErrors","_len","Array","_key","clearErrors","openDrillMenu","options","event","TILE_OPEN_DRILL_MENU","sanitizeEvent","toggleCrossFilter","TILE_TOGGLE_CROSS_FILTER","runDashboard","TILE_RUN_DASHBOARD","stopDashboard","TILE_STOP_DASHBOARD","updateFilters","filters","run","TILE_UPDATE_FILTERS","openScheduleDialog","sendAndReceive","TILE_OPEN_SCHEDULE_DIALOG","metaKey","pageX","pageY","type","exports"],"sources":["../../../src/connect/tile/tile_sdk.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport { NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR } from '../../util/errors';\nimport { ExtensionRequestType } from '../types';\nimport type { ExtensionHostApiImpl } from '../extension_host_api';\nimport type {\n CrossFilterOptions,\n DrillMenuOptions,\n Filters,\n TileError,\n TileHostData,\n TileSDKInternal,\n} from './types';\nimport { DashboardRunState } from './types';\n\nconst defaultHostData: TileHostData = {\n isDashboardEditing: false,\n dashboardRunState: DashboardRunState.UNKNOWN,\n dashboardFilters: {},\n};\nexport class TileSDKImpl implements TileSDKInternal {\n hostApi: ExtensionHostApiImpl;\n tileHostData: TileHostData;\n\n constructor(hostApi: ExtensionHostApiImpl) {\n this.hostApi = hostApi;\n this.tileHostData = { ...defaultHostData };\n }\n\n tileHostDataChanged(partialHostData: Partial<TileHostData>) {\n // Ignore update messages if dashboard mounts not supported.\n // Should never happen.\n if (this.hostApi.isDashboardMountSupported) {\n this.tileHostData = { ...this.tileHostData, ...partialHostData };\n }\n }\n\n addError(error: TileError) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_ADD_ERRORS, {\n errors: [error],\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n clearError() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_CLEAR_ERRORS, {\n group: undefined,\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n addErrors(...errors: TileError[]) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_ADD_ERRORS, { errors });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n clearErrors(group?: string) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_CLEAR_ERRORS, { group });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n openDrillMenu(options: DrillMenuOptions, event?: MouseEvent) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_OPEN_DRILL_MENU, {\n options,\n event: this.sanitizeEvent(event),\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n toggleCrossFilter(options: CrossFilterOptions, event?: MouseEvent) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_TOGGLE_CROSS_FILTER, {\n options,\n event: this.sanitizeEvent(event),\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n runDashboard() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_RUN_DASHBOARD, {});\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n stopDashboard() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_STOP_DASHBOARD, {});\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n updateFilters(filters: Filters, run = false) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_UPDATE_FILTERS, {\n filters,\n run,\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n openScheduleDialog() {\n if (this.hostApi.isDashboardMountSupported) {\n return this.hostApi.sendAndReceive(\n ExtensionRequestType.TILE_OPEN_SCHEDULE_DIALOG,\n {}\n );\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n sanitizeEvent(event?: MouseEvent) {\n if (event) {\n return {\n metaKey: event.metaKey,\n pageX: event.pageX,\n pageY: event.pageY,\n type: event.type,\n };\n }\n return undefined;\n }\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAUA,IAAAE,OAAA,GAAAF,OAAA;AAA4C,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,CAAAf,CAAA,KAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAa,OAAA,WAAAd,C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AAAC,MAAA,QAAAD,SAAA,QAAA4C,SAAA,GAAA5C,SAAA,MAAG,KAAK;IACzC,IAAI,IAAI,CAAC6B,OAAO,CAACI,yBAAyB,EAAE;MAC1C,IAAI,CAACJ,OAAO,CAACO,IAAI,CAACC,2BAAoB,CAAC2B,mBAAmB,EAAE;QAC1DF,OAAO;QACPC;MACF,CAAC,CAAC;IACJ,CAAC,MAAM;MACL,MAAMvB,+CAAuC;IAC/C;EACF;EAEAyB,kBAAkBA,CAAA,EAAG;IACnB,IAAI,IAAI,CAACpC,OAAO,CAACI,yBAAyB,EAAE;MAC1C,OAAO,IAAI,CAACJ,OAAO,CAACqC,cAAc,CAChC7B,2BAAoB,CAAC8B,yBAAyB,EAC9C,CAAC,CACH,CAAC;IACH,CAAC,MAAM;MACL,MAAM3B,+CAAuC;IAC/C;EACF;EAEAc,aAAaA,CAACF,KAAkB,EAAE;IAChC,IAAIA,KAAK,EAAE;MACT,OAAO;QACLgB,OAAO,EAAEhB,KAAK,CAACgB,OAAO;QACtBC,KAAK,EAAEjB,KAAK,CAACiB,KAAK;QAClBC,KAAK,EAAElB,KAAK,CAACkB,KAAK;QAClBC,IAAI,EAAEnB,KAAK,CAACmB;MACd,CAAC;IACH;IACA,OAAO3B,SAAS;EAClB;AACF;AAAC4B,OAAA,CAAA7C,WAAA,GAAAA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["DashboardRunState","exports"],"sources":["../../../src/connect/tile/types.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type {
|
|
1
|
+
{"version":3,"file":"types.js","names":["DashboardRunState","exports"],"sources":["../../../src/connect/tile/types.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IQuery } from '@looker/sdk';\n\n/**\n * Callback that is invoked when a change in the host happens\n * <code>Looker >=22.8</code>\n */\nexport type TileHostDataChangedCallback = (\n tileHostData: Partial<TileHostData>\n) => void;\n\n/**\n * Defines the current run state of the dashboard\n */\nexport enum DashboardRunState {\n UNKNOWN = 'UNKNOWN',\n RUNNING = 'RUNNING',\n NOT_RUNNING = 'NOT_RUNNING',\n}\n\nexport interface TileHostData {\n /**\n * When true indicates that the tile is being configured as\n * a visualization inside of an explore.\n */\n isExploring?: boolean;\n /**\n * The dashboard id the tile is being rendered in. If the tile\n * is being configured as an explore this will not be populated.\n */\n dashboardId?: string;\n /**\n * The element id of the tile being rendered. If the tile\n * is being configured as an explore this will not be populated.\n */\n elementId?: string;\n /**\n * The query id of the tile being rendered if it is associated with\n * a visualization. If the tile is being configured as an explore\n * this will not be populated.\n *\n * Note that queryId is that of the query created when the visualization\n * is built in the Looker explore. It does not contain any filters or\n * cross filtering applied to the dashboard. Filters and cross filters\n * will need to be applied and a new query generated in order to reflect\n * the data shown in the QueryResponse. As such the queryId may not be\n * that useful. See filteredQuery for query object with filters applied.\n */\n queryId?: string;\n /**\n * The query slug of the tile being rendered if it is associated with\n * a visualization. If the tile is being configured as an explore\n * this will not be populated.\n *\n * Note that querySlug is that of the query created when the visualization\n * is built in the Looker explore. It does not contain any filters or\n * cross filtering applied to the dashboard. Filters and cross filters\n * will need to be applied and a new query generated in order to reflect\n * the data shown in the QueryResponse. As such the queryId may not be\n * that useful. See filteredQuery for query object with filters applied.\n */\n querySlug?: string;\n /**\n * The filters being applied to the dashboard. If the tile\n * is being configured as an explore this will not be populated.\n */\n dashboardFilters?: Filters;\n /**\n * Indicates whether the dashboard is running. If the tile\n * is being configured as an explore the state will be UNKNOWN.\n * Note that for dashboard performance reasons, the runstate\n * may NEVER be shown as running. This generally will happen\n * if there are no other tiles associated with a query (including\n * the one the extension is associated with).\n * If the extension needs to know for certain that a dashboard\n * has been run, detecting differences in the lastRunStartTime\n * is the reliable way.\n */\n dashboardRunState?: DashboardRunState;\n /**\n * When true, the dashboard is being edited. If the tile\n * is being configured as an explore this will not be populated.\n */\n isDashboardEditing?: boolean;\n /**\n * When true, cross filtering. If the tile\n * is being configured as an explore this will not be populated.\n */\n isDashboardCrossFilteringEnabled?: boolean;\n /**\n * A query object that matches the query ID associated with the\n * underlying dashboard element with any dashboard filters and\n * timezone changes made at the dashboard level applied.\n */\n filteredQuery?: IQuery;\n /**\n * The id of the tile extension element that triggered the last\n * dashboard run. The id will be undefined if the dashboard run\n * was triggered by the dashboard run button or auto run or if\n * the run was triggered using the embed SDK. If the tile\n * is being configured as an explore this will not be populated.\n * Note that the lastRunSourceElementId CAN be the same as the\n * element id of the current extension instance, in other words,\n * if the extension triggers a dashboard run, it will be notified\n * when the dashboard run starts and finishes.\n */\n lastRunSourceElementId?: string;\n /**\n * Indicates the last dashboard run start time. If the tile\n * is being configured as an explore this will not be populated.\n * Note that the start and end times reported should not\n * used for capturing performance metrics.\n */\n lastRunStartTime?: number;\n /**\n * Indicates the last dashboard run end time. If the tile\n * is being configured as an explore this will not be populated.\n * If the tile is running, this will not be populated.\n * Note that the start and end times reported should not\n * used for capturing performance metrics.\n */\n lastRunEndTime?: number;\n /**\n * Indicates whether the last dashboard run was succesful or not.\n * If the tile is being configured as an explore this will not be\n * populated.\n * If the tile is running, this will not be populated.\n */\n lastRunSuccess?: boolean;\n}\n\nexport interface Pivot {\n key: string;\n is_total: boolean;\n data: { [key: string]: string };\n metadata: { [key: string]: { [key: string]: string | Link[] } };\n labels: { [key: string]: string };\n sort_values?: { [key: string]: string };\n}\n\nexport interface Cell {\n [key: string]: any;\n value: any;\n rendered?: string;\n html?: string;\n links?: Link[];\n}\n\nexport interface Link {\n label: string;\n type: string;\n type_label: string;\n url: string;\n}\n\nexport interface PivotCell {\n [pivotKey: string]: Cell;\n}\n\nexport interface Row {\n [fieldName: string]: PivotCell | Cell;\n}\n\nexport interface TileError {\n title: string;\n message: string;\n group: string;\n}\n\nexport interface CrossFilterOptions {\n pivot: Pivot;\n row: Row;\n}\n\nexport type DrillMenuOptions = any;\n\nexport interface Filters {\n [key: string]: string;\n}\n\n/**\n * For internal use only\n */\nexport interface TileSDKInternal extends TileSDK {\n tileHostDataChanged: (hostData: Partial<TileHostData>) => void;\n}\n\n/**\n * Extension tile SDK\n */\nexport interface TileSDK {\n /**\n * Tile host data.\n */\n tileHostData: TileHostData;\n /**\n * Display an error beneath the tile extension.\n */\n addError: (error: TileError) => void;\n /**\n * Clear an error beneath the tile extension.\n */\n clearError: () => void;\n /**\n * Display an error beneath the tile extension.\n * @deprecated\n */\n addErrors: (...errors: TileError[]) => void;\n /**\n * Clear an error beneath the tile extension.\n * @deprecated\n */\n clearErrors: (group?: string) => void;\n /**\n * Open a drill menu. The event controls positioning of the drill menu.\n * Set the pageX and pageY properties on the event to control the\n * positioning (all other properties are ignored).\n */\n openDrillMenu: (options: DrillMenuOptions, event?: MouseEvent) => void;\n /**\n * Toggle cross filters. This is ignored when running in an explore.\n */\n toggleCrossFilter: (options: CrossFilterOptions, event?: MouseEvent) => void;\n /**\n * Run the current dashboard. This is ignored when running in an explore.\n */\n runDashboard: () => void;\n /**\n * Stop the current dashboard. This is ignored when running in an explore.\n */\n stopDashboard: () => void;\n /**\n * Update the current filters.\n */\n updateFilters: (filters: Filters, run?: boolean) => void;\n /**\n * Open the schedule dialog. This is ignored when running in an explore.\n */\n openScheduleDialog: () => Promise<void>;\n}\n"],"mappings":";;;;;;IAuCYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,aAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile_sdk.js","names":["NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR","ExtensionRequestType","DashboardRunState","defaultHostData","isDashboardEditing","dashboardRunState","UNKNOWN","dashboardFilters","TileSDKImpl","constructor","hostApi","_defineProperty","tileHostData","_objectSpread","tileHostDataChanged","partialHostData","isDashboardMountSupported","addError","error","send","TILE_ADD_ERRORS","errors","clearError","TILE_CLEAR_ERRORS","group","undefined","addErrors","_len","arguments","length","Array","_key","clearErrors","openDrillMenu","options","event","TILE_OPEN_DRILL_MENU","sanitizeEvent","toggleCrossFilter","TILE_TOGGLE_CROSS_FILTER","runDashboard","TILE_RUN_DASHBOARD","stopDashboard","TILE_STOP_DASHBOARD","updateFilters","filters","run","TILE_UPDATE_FILTERS","openScheduleDialog","sendAndReceive","TILE_OPEN_SCHEDULE_DIALOG","metaKey","pageX","pageY","type"],"sources":["../../../../src/connect/tile/tile_sdk.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"tile_sdk.js","names":["NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR","ExtensionRequestType","DashboardRunState","defaultHostData","isDashboardEditing","dashboardRunState","UNKNOWN","dashboardFilters","TileSDKImpl","constructor","hostApi","_defineProperty","tileHostData","_objectSpread","tileHostDataChanged","partialHostData","isDashboardMountSupported","addError","error","send","TILE_ADD_ERRORS","errors","clearError","TILE_CLEAR_ERRORS","group","undefined","addErrors","_len","arguments","length","Array","_key","clearErrors","openDrillMenu","options","event","TILE_OPEN_DRILL_MENU","sanitizeEvent","toggleCrossFilter","TILE_TOGGLE_CROSS_FILTER","runDashboard","TILE_RUN_DASHBOARD","stopDashboard","TILE_STOP_DASHBOARD","updateFilters","filters","run","TILE_UPDATE_FILTERS","openScheduleDialog","sendAndReceive","TILE_OPEN_SCHEDULE_DIALOG","metaKey","pageX","pageY","type"],"sources":["../../../../src/connect/tile/tile_sdk.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport { NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR } from '../../util/errors';\nimport { ExtensionRequestType } from '../types';\nimport type { ExtensionHostApiImpl } from '../extension_host_api';\nimport type {\n CrossFilterOptions,\n DrillMenuOptions,\n Filters,\n TileError,\n TileHostData,\n TileSDKInternal,\n} from './types';\nimport { DashboardRunState } from './types';\n\nconst defaultHostData: TileHostData = {\n isDashboardEditing: false,\n dashboardRunState: DashboardRunState.UNKNOWN,\n dashboardFilters: {},\n};\nexport class TileSDKImpl implements TileSDKInternal {\n hostApi: ExtensionHostApiImpl;\n tileHostData: TileHostData;\n\n constructor(hostApi: ExtensionHostApiImpl) {\n this.hostApi = hostApi;\n this.tileHostData = { ...defaultHostData };\n }\n\n tileHostDataChanged(partialHostData: Partial<TileHostData>) {\n // Ignore update messages if dashboard mounts not supported.\n // Should never happen.\n if (this.hostApi.isDashboardMountSupported) {\n this.tileHostData = { ...this.tileHostData, ...partialHostData };\n }\n }\n\n addError(error: TileError) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_ADD_ERRORS, {\n errors: [error],\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n clearError() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_CLEAR_ERRORS, {\n group: undefined,\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n addErrors(...errors: TileError[]) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_ADD_ERRORS, { errors });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n clearErrors(group?: string) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_CLEAR_ERRORS, { group });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n openDrillMenu(options: DrillMenuOptions, event?: MouseEvent) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_OPEN_DRILL_MENU, {\n options,\n event: this.sanitizeEvent(event),\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n toggleCrossFilter(options: CrossFilterOptions, event?: MouseEvent) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_TOGGLE_CROSS_FILTER, {\n options,\n event: this.sanitizeEvent(event),\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n runDashboard() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_RUN_DASHBOARD, {});\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n stopDashboard() {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_STOP_DASHBOARD, {});\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n updateFilters(filters: Filters, run = false) {\n if (this.hostApi.isDashboardMountSupported) {\n this.hostApi.send(ExtensionRequestType.TILE_UPDATE_FILTERS, {\n filters,\n run,\n });\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n openScheduleDialog() {\n if (this.hostApi.isDashboardMountSupported) {\n return this.hostApi.sendAndReceive(\n ExtensionRequestType.TILE_OPEN_SCHEDULE_DIALOG,\n {}\n );\n } else {\n throw NOT_DASHBOARD_MOUNT_NOT_SUPPORTED_ERROR;\n }\n }\n\n sanitizeEvent(event?: MouseEvent) {\n if (event) {\n return {\n metaKey: event.metaKey,\n pageX: event.pageX,\n pageY: event.pageY,\n type: event.type,\n };\n }\n return undefined;\n }\n}\n"],"mappings":";;;;;AA0BA,SAASA,uCAAuC,QAAQ,mBAAmB;AAC3E,SAASC,oBAAoB,QAAQ,UAAU;AAU/C,SAASC,iBAAiB,QAAQ,SAAS;AAE3C,IAAMC,eAA6B,GAAG;EACpCC,kBAAkB,EAAE,KAAK;EACzBC,iBAAiB,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;EAEA0C,aAAaA,CAAA,EAAG;IACd,IAAI,IAAI,CAAChC,OAAO,CAACM,yBAAyB,EAAE;MAC1C,IAAI,CAACN,OAAO,CAACS,IAAI,CAAClB,oBAAoB,CAAC0C,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC,MAAM;MACL,MAAM3C,uCAAuC;IAC/C;EACF;EAEA4C,aAAaA,CAACC,OAAgB,EAAe;IAAA,IAAbC,GAAG,GAAAlB,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAH,SAAA,GAAAG,SAAA,MAAG,KAAK;IACzC,IAAI,IAAI,CAAClB,OAAO,CAACM,yBAAyB,EAAE;MAC1C,IAAI,CAACN,OAAO,CAACS,IAAI,CAAClB,oBAAoB,CAAC8C,mBAAmB,EAAE;QAC1DF,OAAO;QACPC;MACF,CAAC,CAAC;IACJ,CAAC,MAAM;MACL,MAAM9C,uCAAuC;IAC/C;EACF;EAEAgD,kBAAkBA,CAAA,EAAG;IACnB,IAAI,IAAI,CAACtC,OAAO,CAACM,yBAAyB,EAAE;MAC1C,OAAO,IAAI,CAACN,OAAO,CAACuC,cAAc,CAChChD,oBAAoB,CAACiD,yBAAyB,EAC9C,CAAC,CACH,CAAC;IACH,CAAC,MAAM;MACL,MAAMlD,uCAAuC;IAC/C;EACF;EAEAqC,aAAaA,CAACF,KAAkB,EAAE;IAChC,IAAIA,KAAK,EAAE;MACT,OAAO;QACLgB,OAAO,EAAEhB,KAAK,CAACgB,OAAO;QACtBC,KAAK,EAAEjB,KAAK,CAACiB,KAAK;QAClBC,KAAK,EAAElB,KAAK,CAACkB,KAAK;QAClBC,IAAI,EAAEnB,KAAK,CAACmB;MACd,CAAC;IACH;IACA,OAAO7B,SAAS;EAClB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["DashboardRunState"],"sources":["../../../../src/connect/tile/types.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type {
|
|
1
|
+
{"version":3,"file":"types.js","names":["DashboardRunState"],"sources":["../../../../src/connect/tile/types.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IQuery } from '@looker/sdk';\n\n/**\n * Callback that is invoked when a change in the host happens\n * <code>Looker >=22.8</code>\n */\nexport type TileHostDataChangedCallback = (\n tileHostData: Partial<TileHostData>\n) => void;\n\n/**\n * Defines the current run state of the dashboard\n */\nexport enum DashboardRunState {\n UNKNOWN = 'UNKNOWN',\n RUNNING = 'RUNNING',\n NOT_RUNNING = 'NOT_RUNNING',\n}\n\nexport interface TileHostData {\n /**\n * When true indicates that the tile is being configured as\n * a visualization inside of an explore.\n */\n isExploring?: boolean;\n /**\n * The dashboard id the tile is being rendered in. If the tile\n * is being configured as an explore this will not be populated.\n */\n dashboardId?: string;\n /**\n * The element id of the tile being rendered. If the tile\n * is being configured as an explore this will not be populated.\n */\n elementId?: string;\n /**\n * The query id of the tile being rendered if it is associated with\n * a visualization. If the tile is being configured as an explore\n * this will not be populated.\n *\n * Note that queryId is that of the query created when the visualization\n * is built in the Looker explore. It does not contain any filters or\n * cross filtering applied to the dashboard. Filters and cross filters\n * will need to be applied and a new query generated in order to reflect\n * the data shown in the QueryResponse. As such the queryId may not be\n * that useful. See filteredQuery for query object with filters applied.\n */\n queryId?: string;\n /**\n * The query slug of the tile being rendered if it is associated with\n * a visualization. If the tile is being configured as an explore\n * this will not be populated.\n *\n * Note that querySlug is that of the query created when the visualization\n * is built in the Looker explore. It does not contain any filters or\n * cross filtering applied to the dashboard. Filters and cross filters\n * will need to be applied and a new query generated in order to reflect\n * the data shown in the QueryResponse. As such the queryId may not be\n * that useful. See filteredQuery for query object with filters applied.\n */\n querySlug?: string;\n /**\n * The filters being applied to the dashboard. If the tile\n * is being configured as an explore this will not be populated.\n */\n dashboardFilters?: Filters;\n /**\n * Indicates whether the dashboard is running. If the tile\n * is being configured as an explore the state will be UNKNOWN.\n * Note that for dashboard performance reasons, the runstate\n * may NEVER be shown as running. This generally will happen\n * if there are no other tiles associated with a query (including\n * the one the extension is associated with).\n * If the extension needs to know for certain that a dashboard\n * has been run, detecting differences in the lastRunStartTime\n * is the reliable way.\n */\n dashboardRunState?: DashboardRunState;\n /**\n * When true, the dashboard is being edited. If the tile\n * is being configured as an explore this will not be populated.\n */\n isDashboardEditing?: boolean;\n /**\n * When true, cross filtering. If the tile\n * is being configured as an explore this will not be populated.\n */\n isDashboardCrossFilteringEnabled?: boolean;\n /**\n * A query object that matches the query ID associated with the\n * underlying dashboard element with any dashboard filters and\n * timezone changes made at the dashboard level applied.\n */\n filteredQuery?: IQuery;\n /**\n * The id of the tile extension element that triggered the last\n * dashboard run. The id will be undefined if the dashboard run\n * was triggered by the dashboard run button or auto run or if\n * the run was triggered using the embed SDK. If the tile\n * is being configured as an explore this will not be populated.\n * Note that the lastRunSourceElementId CAN be the same as the\n * element id of the current extension instance, in other words,\n * if the extension triggers a dashboard run, it will be notified\n * when the dashboard run starts and finishes.\n */\n lastRunSourceElementId?: string;\n /**\n * Indicates the last dashboard run start time. If the tile\n * is being configured as an explore this will not be populated.\n * Note that the start and end times reported should not\n * used for capturing performance metrics.\n */\n lastRunStartTime?: number;\n /**\n * Indicates the last dashboard run end time. If the tile\n * is being configured as an explore this will not be populated.\n * If the tile is running, this will not be populated.\n * Note that the start and end times reported should not\n * used for capturing performance metrics.\n */\n lastRunEndTime?: number;\n /**\n * Indicates whether the last dashboard run was succesful or not.\n * If the tile is being configured as an explore this will not be\n * populated.\n * If the tile is running, this will not be populated.\n */\n lastRunSuccess?: boolean;\n}\n\nexport interface Pivot {\n key: string;\n is_total: boolean;\n data: { [key: string]: string };\n metadata: { [key: string]: { [key: string]: string | Link[] } };\n labels: { [key: string]: string };\n sort_values?: { [key: string]: string };\n}\n\nexport interface Cell {\n [key: string]: any;\n value: any;\n rendered?: string;\n html?: string;\n links?: Link[];\n}\n\nexport interface Link {\n label: string;\n type: string;\n type_label: string;\n url: string;\n}\n\nexport interface PivotCell {\n [pivotKey: string]: Cell;\n}\n\nexport interface Row {\n [fieldName: string]: PivotCell | Cell;\n}\n\nexport interface TileError {\n title: string;\n message: string;\n group: string;\n}\n\nexport interface CrossFilterOptions {\n pivot: Pivot;\n row: Row;\n}\n\nexport type DrillMenuOptions = any;\n\nexport interface Filters {\n [key: string]: string;\n}\n\n/**\n * For internal use only\n */\nexport interface TileSDKInternal extends TileSDK {\n tileHostDataChanged: (hostData: Partial<TileHostData>) => void;\n}\n\n/**\n * Extension tile SDK\n */\nexport interface TileSDK {\n /**\n * Tile host data.\n */\n tileHostData: TileHostData;\n /**\n * Display an error beneath the tile extension.\n */\n addError: (error: TileError) => void;\n /**\n * Clear an error beneath the tile extension.\n */\n clearError: () => void;\n /**\n * Display an error beneath the tile extension.\n * @deprecated\n */\n addErrors: (...errors: TileError[]) => void;\n /**\n * Clear an error beneath the tile extension.\n * @deprecated\n */\n clearErrors: (group?: string) => void;\n /**\n * Open a drill menu. The event controls positioning of the drill menu.\n * Set the pageX and pageY properties on the event to control the\n * positioning (all other properties are ignored).\n */\n openDrillMenu: (options: DrillMenuOptions, event?: MouseEvent) => void;\n /**\n * Toggle cross filters. This is ignored when running in an explore.\n */\n toggleCrossFilter: (options: CrossFilterOptions, event?: MouseEvent) => void;\n /**\n * Run the current dashboard. This is ignored when running in an explore.\n */\n runDashboard: () => void;\n /**\n * Stop the current dashboard. This is ignored when running in an explore.\n */\n stopDashboard: () => void;\n /**\n * Update the current filters.\n */\n updateFilters: (filters: Filters, run?: boolean) => void;\n /**\n * Open the schedule dialog. This is ignored when running in an explore.\n */\n openScheduleDialog: () => Promise<void>;\n}\n"],"mappings":"AAuCA,WAAYA,iBAAiB,aAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@looker/extension-sdk",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.20.0",
|
|
4
4
|
"description": "Looker Extension SDK",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@looker/chatty": "2.3.9",
|
|
41
|
-
"@looker/sdk": "24.
|
|
41
|
+
"@looker/sdk": "24.20.0",
|
|
42
42
|
"@looker/sdk-rtl": "21.6.3",
|
|
43
43
|
"deepmerge": "^4.2.2",
|
|
44
44
|
"semver": "^7.3.4"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"Looker",
|
|
48
48
|
"extension-sdk"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "143636824fd506b8fa5f43691746738860449744"
|
|
51
51
|
}
|