@drayman/elements 1.79.0 → 1.81.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.
@@ -0,0 +1,38 @@
1
+ export interface DraymanSuperset {
2
+ /**
3
+ * Superset instance URL, including protocol.
4
+ */
5
+ supersetDomain: string;
6
+ /**
7
+ * Embed identifier generated by the Superset embedding UI.
8
+ */
9
+ embedId: string;
10
+ /**
11
+ * Called by the element when Superset needs a guest token.
12
+ */
13
+ onFetchGuestToken: ElementEvent<{}>;
14
+ /**
15
+ * Dashboard UI configuration passed to the Superset Embedded SDK.
16
+ */
17
+ dashboardUiConfig?: {
18
+ hideTitle?: boolean;
19
+ hideTab?: boolean;
20
+ hideChartControls?: boolean;
21
+ filters?: {
22
+ [key: string]: boolean | undefined;
23
+ visible?: boolean;
24
+ expanded?: boolean;
25
+ };
26
+ urlParams?: {
27
+ [key: string]: string | number | boolean;
28
+ };
29
+ };
30
+ /**
31
+ * Additional iframe sandbox permissions.
32
+ */
33
+ iframeSandboxExtras?: string[];
34
+ /**
35
+ * Referrer policy applied to the embedded iframe request.
36
+ */
37
+ referrerPolicy?: ReferrerPolicy;
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drayman/elements",
3
- "version": "1.79.0",
3
+ "version": "1.81.0",
4
4
  "description": "A collection of web components for Drayman.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -12,7 +12,7 @@
12
12
  "build:types": "tsc -p ./tsconfig.types.json",
13
13
  "typedoc": "npm run build:types && typedoc --tsconfig ./tsconfig.types.json",
14
14
  "lint": "ng lint",
15
- "build": "npm run build:calendar && npm run build:code-editor && npm run build:button && npm run build:text-field && npm run build:claviz-charts && npm run build:file-uploader && npm run build:number-field && npm run build:select && npm run build:table && npm run build:checkbox && npm run build:slider && npm run build:textarea-field && npm run build:radio-group && npm run build:datepicker && npm run build:timepicker && npm run build:pdf-viewer && npm run build:ngx-charts && npm run build:menu && npm run build:ngx-graph && npm run build:youtube-player && npm run build:nebula && npm run build:grid && npm run build:gauge && npm run build:year-calendar && npm run typedoc",
15
+ "build": "npm run build:calendar && npm run build:code-editor && npm run build:button && npm run build:text-field && npm run build:claviz-charts && npm run build:file-uploader && npm run build:number-field && npm run build:select && npm run build:table && npm run build:checkbox && npm run build:slider && npm run build:textarea-field && npm run build:radio-group && npm run build:datepicker && npm run build:timepicker && npm run build:pdf-viewer && npm run build:ngx-charts && npm run build:menu && npm run build:ngx-graph && npm run build:youtube-player && npm run build:nebula && npm run build:superset && npm run build:grid && npm run build:gauge && npm run build:year-calendar && npm run typedoc",
16
16
  "build:code-editor": "ng build code-editor --extra-webpack-config webpack.partial.js --configuration production --single-bundle --output-hashing=none",
17
17
  "build:calendar": "ng build calendar --configuration production --single-bundle --output-hashing=none",
18
18
  "build:button": "ng build button --configuration production --single-bundle --output-hashing=none",
@@ -24,6 +24,7 @@
24
24
  "build:grid": "ng build grid --configuration production --single-bundle --output-hashing=none",
25
25
  "build:youtube-player": "ng build youtube-player --configuration production --single-bundle --output-hashing=none",
26
26
  "build:nebula": "ng build nebula --configuration production --single-bundle --output-hashing=none",
27
+ "build:superset": "ng build superset --configuration production --single-bundle --output-hashing=none",
27
28
  "build:table": "ng build table --configuration production --single-bundle --output-hashing=none",
28
29
  "build:checkbox": "ng build checkbox --configuration production --single-bundle --output-hashing=none",
29
30
  "build:slider": "ng build slider --configuration production --single-bundle --output-hashing=none",
@@ -78,6 +79,9 @@
78
79
  "drayman-nebula": {
79
80
  "script": "./dist/nebula/main.js"
80
81
  },
82
+ "drayman-superset": {
83
+ "script": "./dist/superset/main.js"
84
+ },
81
85
  "drayman-table": {
82
86
  "script": "./dist/table/main.js"
83
87
  },
@@ -143,6 +147,7 @@
143
147
  "@nebula.js/stardust": "5.11.0",
144
148
  "@ngneat/spectator": "5.13.2",
145
149
  "@qlik/api": "^1.29.0",
150
+ "@superset-ui/embedded-sdk": "^0.3.0",
146
151
  "@swimlane/ngx-charts": "16.0.0",
147
152
  "@swimlane/ngx-graph": "8.0.0",
148
153
  "@types/jest": "26.0.13",
@@ -197,4 +202,4 @@
197
202
  "typescript-json-schema": "0.43.0",
198
203
  "zone.js": "~0.11.4"
199
204
  }
200
- }
205
+ }
package/types/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import { DraymanTextareaField } from '../dist/types/textarea-field/src/app/model
18
18
  import { DraymanTimepicker } from '../dist/types/timepicker/src/app/models/timepicker-options';
19
19
  import { DraymanYoutubePlayer } from '../dist/types/youtube-player/src/app/models/youtube-player-options';
20
20
  import { DraymanNebula } from '../dist/types/nebula/src/app/models/nebula-options';
21
+ import { DraymanSuperset } from '../dist/types/superset/src/app/models/superset-options';
21
22
  import { DraymanGrid } from '../dist/types/grid/src/app/models/grid-options';
22
23
  import { DraymanCodeEditor } from '../dist/types/code-editor/src/app/models/code-editor-options';
23
24
  import { DraymanCalendar } from '../dist/types/calendar/src/app/models/calendar-options';
@@ -1296,6 +1297,43 @@ declare global {
1296
1297
  * ```
1297
1298
  */
1298
1299
  interface DraymanNebulaProps extends DraymanNebula, DraymanElementsProps { }
1300
+ /**
1301
+ * # <drayman-superset \/>
1302
+ *
1303
+ * Apache Superset dashboard integration element powered by the
1304
+ * [Superset Embedded SDK](https://www.npmjs.com/package/@superset-ui/embedded-sdk).
1305
+ *
1306
+ * ## Example of usage
1307
+ *
1308
+ * ```typescript
1309
+ * export const component: DraymanComponent = async ({ forceUpdate }) => {
1310
+ *
1311
+ * return () => {
1312
+ * const dashboardUiConfig = {
1313
+ * hideTitle: true,
1314
+ * hideTab: true,
1315
+ * hideChartControls: false,
1316
+ * filters: {
1317
+ * visible: true,
1318
+ * expanded: false,
1319
+ * },
1320
+ * };
1321
+ *
1322
+ * return (
1323
+ * <drayman-superset
1324
+ * supersetDomain="http://superset"
1325
+ * embedId="01879ce0-6016-4332-b535-f5f1950f9364"
1326
+ * onFetchGuestToken={async () => {
1327
+ * return `token`;
1328
+ * }}
1329
+ * dashboardUiConfig={dashboardUiConfig}
1330
+ * />
1331
+ * );
1332
+ * }
1333
+ * }
1334
+ * ```
1335
+ */
1336
+ interface DraymanSupersetProps extends DraymanSuperset, DraymanElementsProps { }
1299
1337
 
1300
1338
  namespace JSX {
1301
1339
  export interface IntrinsicElements {
@@ -1317,6 +1355,7 @@ declare global {
1317
1355
  'drayman-timepicker': DraymanTimepickerProps;
1318
1356
  'drayman-youtube-player': DraymanYoutubePlayerProps;
1319
1357
  'drayman-nebula': DraymanNebulaProps;
1358
+ 'drayman-superset': DraymanSupersetProps;
1320
1359
  'drayman-grid': DraymanGridProps;
1321
1360
  'drayman-code-editor': DraymanCodeEditorProps;
1322
1361
  'drayman-calendar': DraymanCalendarProps;
@@ -1324,4 +1363,4 @@ declare global {
1324
1363
  }
1325
1364
  }
1326
1365
 
1327
- export { };
1366
+ export { };