@qlik/embed-runtime
Advanced tools
Comparing version 1.0.3 to 1.1.0
# @qlik/embed-runtime | ||
## 1.1.0 | ||
### Minor Changes | ||
- 757b8f6: Add types for dynamically created charts/objects | ||
### Patch Changes | ||
- 1efc7ed: chore: update npm dependencies | ||
## 1.0.3 | ||
@@ -4,0 +14,0 @@ |
import { HostConfig } from '@qlik/api/auth'; | ||
declare global { | ||
interface QlikEmbedUIs { | ||
/** Renders a test parcel */ | ||
"private:@qlik-trial/qmfe-embed/ExampleParcel": { | ||
param: string; | ||
}; | ||
/** Renders a test parcel */ | ||
"private:@qlik-trial/qmfe-embed/ExampleParcel2": { | ||
param: string; | ||
}; | ||
} | ||
} | ||
type TypeNotYetAvailable = any; | ||
@@ -45,6 +32,20 @@ type CommonAnalyticsProps = { | ||
}; | ||
type ChartProps = CommonAnalyticsProps & { | ||
/** The id of the visualisation object to render. The visualization type will be fetched from the object itself */ | ||
type Neverify<T> = { | ||
[P in keyof T]?: never; | ||
}; | ||
type WithObjectId = { | ||
objectId: string; | ||
}; | ||
type WithChartProperties = { | ||
type: string; | ||
dimensions?: string[]; | ||
measures?: string[]; | ||
properties?: any; | ||
}; | ||
/** | ||
* Properties for an embedded object/chart | ||
* Either they are referring to an already created object | ||
* or properties are defined dynamically which will create a session object | ||
*/ | ||
type AnalyticsChartProperties = CommonAnalyticsProps & ((WithObjectId & Neverify<WithChartProperties>) | (Neverify<WithObjectId> & WithChartProperties)); | ||
type ChartRefApi = { | ||
@@ -110,3 +111,3 @@ /** | ||
"analytics/chart": { | ||
props: ChartProps; | ||
props: AnalyticsChartProperties; | ||
ref: ChartRefApi; | ||
@@ -135,2 +136,6 @@ }; | ||
} | ||
type QlikEmbedUI = keyof QlikEmbedUIs; | ||
type AllowedTypes = "json" | "number" | "boolean"; | ||
type PredefinedTypes = Partial<Record<QlikEmbedUI, Record<string, AllowedTypes>>>; | ||
declare const predefinedTypedProps: PredefinedTypes; | ||
@@ -143,2 +148,3 @@ declare global { | ||
} | ||
type QlikEmbedStandardProps = { | ||
@@ -149,3 +155,2 @@ hostConfig?: HostConfig; | ||
} & PrivateQlikEmbedProps; | ||
type QlikEmbedUI = keyof QlikEmbedUIs; | ||
type QlikEmbedRefApi<UI extends keyof QlikEmbedUIs> = UI extends keyof QlikEmbedUIs ? "ref" extends keyof QlikEmbedUIs[UI] ? QlikEmbedUIs[UI]["ref"] : object : object; | ||
@@ -175,2 +180,2 @@ type QlikEmbedUIProps<UI extends QlikEmbedUI> = UI extends keyof QlikEmbedUIs ? "props" extends keyof QlikEmbedUIs[UI] ? QlikEmbedUIs[UI]["props"] : object : object; | ||
export { type EmbedVanillaRuntimeApiV1, type MountProps, type MountVanillaEmbedComponent, type Mounted, type QlikEmbedRefApi, type QlikEmbedStandardProps, type QlikEmbedUI, type QlikEmbedUIProps, type QlikEmbedVanillaProps, _default as default }; | ||
export { type AllowedTypes, type AnalyticsChartProperties, type EmbedVanillaRuntimeApiV1, type MountProps, type MountVanillaEmbedComponent, type Mounted, type QlikEmbedRefApi, type QlikEmbedStandardProps, type QlikEmbedUI, type QlikEmbedUIProps, type QlikEmbedVanillaProps, _default as default, predefinedTypedProps }; |
@@ -0,5 +1,16 @@ | ||
// src/ui-props.ts | ||
var predefinedTypedProps = { | ||
"analytics/chart": { | ||
measures: "json", | ||
dimensions: "json", | ||
properties: "json", | ||
context: "json" | ||
} | ||
}; | ||
// src/embed.ts | ||
var embed_default = {}; | ||
export { | ||
embed_default as default | ||
embed_default as default, | ||
predefinedTypedProps | ||
}; |
{ | ||
"name": "@qlik/embed-runtime", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "Types for Qlik Embed libraries", | ||
@@ -20,12 +20,12 @@ "license": "ISC", | ||
"dependencies": { | ||
"@qlik/api": "1.5.0" | ||
"@qlik/api": "1.6.0" | ||
}, | ||
"devDependencies": { | ||
"@qlik/eslint-config": "0.7.20", | ||
"@qlik/eslint-config": "0.7.21", | ||
"@qlik/prettier-config": "0.4.13", | ||
"@qlik/tsconfig": "0.2.5", | ||
"@types/node": "20.12.11", | ||
"@types/node": "20.12.12", | ||
"eslint": "8.57.0", | ||
"prettier": "3.2.5", | ||
"rimraf": "5.0.6", | ||
"rimraf": "5.0.7", | ||
"tsup": "8.0.2", | ||
@@ -32,0 +32,0 @@ "typescript": "5.4.5" |
16850
357
+ Added@qlik/api@1.6.0(transitive)
- Removed@qlik/api@1.5.0(transitive)
Updated@qlik/api@1.6.0