@sigmacomputing/embed-sdk 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.mts CHANGED
@@ -49,13 +49,20 @@ declare const WorkbookPageSelectedNodeEventName: "workbook:selectednodeid:onchan
49
49
  declare const WorkbookPivotTableCellSelectEventName: "workbook:pivottable:oncellselect";
50
50
  declare const WorkbookChartValueSelectEventName: "workbook:chart:onvalueselect";
51
51
  declare const WorkbookCurrentVariablesEventName: "workbook:variables:current";
52
- declare const WorkbookBookmarkCreateEventName: "workbook:bookmark:oncreate";
52
+ declare const WorkbookBookmarkOnCreateEventName: "workbook:bookmark:oncreate";
53
53
  declare const WorkbookDataLoadedEventName: "workbook:dataloaded";
54
54
  declare const WorkbookChartErrorEventName: "workbook:chart:error";
55
- declare const WorkbookExploreKeyOnChangeEventName: "workbook:explorekey:onchange";
55
+ declare const WorkbookExploreKeyOnChangeEventName: "workbook:exploreKey:onchange";
56
56
  declare const WorkbookBookmarkOnChangeEventName: "workbook:bookmark:onchange";
57
57
  declare const UrlOnChangeEventName: "url:onchange";
58
58
  declare const WorkbookIdOnChangeEventName: "workbook:id:onchange";
59
+ declare const WorkbookBookmarkCreateEventName: "workbook:bookmark:create";
60
+ declare const WorkbookBookmarkUpdateEventName: "workbook:bookmark:update";
61
+ declare const WorkbookFullscreenUpdateEventName: "workbook:fullscreen:update";
62
+ declare const WorkbookSelectedNodeIdUpdateEventName: "workbook:selectednodeid:update";
63
+ declare const WorkbookVariablesListEventName: "workbook:variables:list";
64
+ declare const WorkbookVariablesUpdateEventName: "workbook:variables:update";
65
+ declare const WorkbookVariablesCurrentEventName: "workbook:variables:current";
59
66
  interface WorkbookLoadedEvent {
60
67
  type: typeof WorkbookLoadedEventName;
61
68
  workbook: {
@@ -71,6 +78,10 @@ interface WorkbookVariableOnChangeEvent {
71
78
  type: typeof WorkbookVariableEventOnChangeName;
72
79
  variables: Record<string, string>;
73
80
  }
81
+ interface WorkbookVariableCurrentEvent {
82
+ type: typeof WorkbookVariablesCurrentEventName;
83
+ variables: Record<string, string>;
84
+ }
74
85
  interface WorkbookTableCellSelectEvent {
75
86
  type: typeof WorkbookTableCellSelectEventName;
76
87
  nodeId: string;
@@ -109,8 +120,8 @@ type WorkbookCurrentVariablesEvent = {
109
120
  type: typeof WorkbookCurrentVariablesEventName;
110
121
  variables: Record<string, string>;
111
122
  };
112
- type WorkbookBookmarkCreateEvent = {
113
- type: typeof WorkbookBookmarkCreateEventName;
123
+ type WorkbookBookmarkOnCreateEvent = {
124
+ type: typeof WorkbookBookmarkOnCreateEventName;
114
125
  bookmarkName: string;
115
126
  workbookId: string;
116
127
  versionTagName: string | null;
@@ -144,10 +155,16 @@ type WorkbookIdOnChangeEvent = {
144
155
  type: typeof WorkbookIdOnChangeEventName;
145
156
  id: string;
146
157
  };
158
+ type WorkbookBookmarkCreateEvent = {
159
+ name: string;
160
+ isDefault: boolean;
161
+ isShared: boolean;
162
+ };
147
163
 
148
164
  declare const workbookLoadedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onLoaded: (event: WorkbookLoadedEvent) => void) => void;
149
165
  declare const workbookErrorListener: (event: MessageEvent, iframe: HTMLIFrameElement, onError: (event: WorkbookErrorEvent) => void) => void;
150
- declare const workbookVariableListener: (event: MessageEvent, iframe: HTMLIFrameElement, onVariable: (event: WorkbookVariableOnChangeEvent) => void) => void;
166
+ declare const workbookVariableChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onVariable: (event: WorkbookVariableOnChangeEvent) => void) => void;
167
+ declare const workbookVariableCurrentListener: (event: MessageEvent, iframe: HTMLIFrameElement, onVariable: (event: WorkbookVariableCurrentEvent) => void) => void;
151
168
  declare const workbookTableCellSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onTableCellSelect: (event: WorkbookTableCellSelectEvent) => void) => void;
152
169
  declare const workbookPublishedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onPublished: (event: WorkbookPublishedEvent) => void) => void;
153
170
  declare const workbookFullScreenListener: (event: MessageEvent, iframe: HTMLIFrameElement, onFullScreen: (event: WorkbookFullScreenEvent) => void) => void;
@@ -156,7 +173,7 @@ declare const workbookPageSelectedNodeListener: (event: MessageEvent, iframe: HT
156
173
  declare const workbookPivotTableCellSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onPivotTableCellSelect: (event: WorkbookPivotTableCellSelectEvent) => void) => void;
157
174
  declare const workbookChartValueSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartValueSelect: (event: WorkbookChartValueSelectEvent) => void) => void;
158
175
  declare const workbookCurrentVariablesListener: (event: MessageEvent, iframe: HTMLIFrameElement, onCurrentVariables: (event: WorkbookCurrentVariablesEvent) => void) => void;
159
- declare const workbookBookmarkCreateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkCreateEvent) => void) => void;
176
+ declare const workbookBookmarkCreateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkOnCreateEvent) => void) => void;
160
177
  declare const workbookDataLoadedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookDataLoaded: (event: WorkbookDataLoadedEvent) => void) => void;
161
178
  declare const workbookChartErrorListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartError: (event: WorkbookChartErrorEvent) => void) => void;
162
179
  declare const workbookExploreKeyOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onExploreKeyOnChange: (event: WorkbookExploreKeyOnChangeEvent) => void) => void;
@@ -164,4 +181,11 @@ declare const workbookBookmarkOnChangeListener: (event: MessageEvent, iframe: HT
164
181
  declare const urlOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onUrlChange: (event: UrlOnChangeEvent) => void) => void;
165
182
  declare const workbookIdOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookIdChange: (event: WorkbookIdOnChangeEvent) => void) => void;
166
183
 
167
- export { CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, type DataRow_t, type DataRows_t, type Data_t, type LevelTableCell_t, type LevelTableCells, type LevelTableColumnCell_t, type LevelTableValueCell_t, type PathChunk_t, type PivotPath_t, type PivotTableCell_t, type PivotTableCells_t, type UrlOnChangeEvent, UrlOnChangeEventName, type Value_t, type WorkbookBookmarkCreateEvent, WorkbookBookmarkCreateEventName, type WorkbookBookmarkOnChangeEvent, WorkbookBookmarkOnChangeEventName, type WorkbookChartErrorEvent, WorkbookChartErrorEventName, type WorkbookChartValueSelectEvent, WorkbookChartValueSelectEventName, type WorkbookCurrentVariablesEvent, WorkbookCurrentVariablesEventName, type WorkbookDataLoadedEvent, WorkbookDataLoadedEventName, type WorkbookErrorEvent, WorkbookErrorEventName, type WorkbookExploreKeyOnChangeEvent, WorkbookExploreKeyOnChangeEventName, type WorkbookFullScreenEvent, WorkbookFullScreenEventName, type WorkbookIdOnChangeEvent, WorkbookIdOnChangeEventName, type WorkbookLoadedEvent, WorkbookLoadedEventName, type WorkbookPageHeightEvent, WorkbookPageHeightEventName, type WorkbookPageSelectedNodeEvent, WorkbookPageSelectedNodeEventName, type WorkbookPivotTableCellSelectEvent, WorkbookPivotTableCellSelectEventName, type WorkbookPublishedEvent, WorkbookPublishedEventName, type WorkbookTableCellSelectEvent, WorkbookTableCellSelectEventName, WorkbookVariableEventOnChangeName, type WorkbookVariableOnChangeEvent, urlOnChangeListener, workbookBookmarkCreateListener, workbookBookmarkOnChangeListener, workbookChartErrorListener, workbookChartValueSelectListener, workbookCurrentVariablesListener, workbookDataLoadedListener, workbookErrorListener, workbookExploreKeyOnChangeListener, workbookFullScreenListener, workbookIdOnChangeListener, workbookLoadedListener, workbookPageHeightListener, workbookPageSelectedNodeListener, workbookPivotTableCellSelectListener, workbookPublishedListener, workbookTableCellSelectListener, workbookVariableListener };
184
+ declare const workbookBookmarkCreate: (iframe: HTMLIFrameElement, bookmark: WorkbookBookmarkCreateEvent) => void;
185
+ declare const workbookBookmarkUpdate: (iframe: HTMLIFrameElement) => void;
186
+ declare const workbookFullscreenUpdate: (iframe: HTMLIFrameElement, nodeId: string | null) => void;
187
+ declare const workbookSelectedNodeIdUpdate: (iframe: HTMLIFrameElement, nodeId: string, nodeType: "element" | "page") => void;
188
+ declare const workbookVariablesList: (iframe: HTMLIFrameElement) => void;
189
+ declare const workbookVariablesUpdate: (iframe: HTMLIFrameElement, variables: Record<string, string>) => void;
190
+
191
+ export { CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, type DataRow_t, type DataRows_t, type Data_t, type LevelTableCell_t, type LevelTableCells, type LevelTableColumnCell_t, type LevelTableValueCell_t, type PathChunk_t, type PivotPath_t, type PivotTableCell_t, type PivotTableCells_t, type UrlOnChangeEvent, UrlOnChangeEventName, type Value_t, type WorkbookBookmarkCreateEvent, WorkbookBookmarkCreateEventName, type WorkbookBookmarkOnChangeEvent, WorkbookBookmarkOnChangeEventName, type WorkbookBookmarkOnCreateEvent, WorkbookBookmarkOnCreateEventName, WorkbookBookmarkUpdateEventName, type WorkbookChartErrorEvent, WorkbookChartErrorEventName, type WorkbookChartValueSelectEvent, WorkbookChartValueSelectEventName, type WorkbookCurrentVariablesEvent, WorkbookCurrentVariablesEventName, type WorkbookDataLoadedEvent, WorkbookDataLoadedEventName, type WorkbookErrorEvent, WorkbookErrorEventName, type WorkbookExploreKeyOnChangeEvent, WorkbookExploreKeyOnChangeEventName, type WorkbookFullScreenEvent, WorkbookFullScreenEventName, WorkbookFullscreenUpdateEventName, type WorkbookIdOnChangeEvent, WorkbookIdOnChangeEventName, type WorkbookLoadedEvent, WorkbookLoadedEventName, type WorkbookPageHeightEvent, WorkbookPageHeightEventName, type WorkbookPageSelectedNodeEvent, WorkbookPageSelectedNodeEventName, type WorkbookPivotTableCellSelectEvent, WorkbookPivotTableCellSelectEventName, type WorkbookPublishedEvent, WorkbookPublishedEventName, WorkbookSelectedNodeIdUpdateEventName, type WorkbookTableCellSelectEvent, WorkbookTableCellSelectEventName, type WorkbookVariableCurrentEvent, WorkbookVariableEventOnChangeName, type WorkbookVariableOnChangeEvent, WorkbookVariablesCurrentEventName, WorkbookVariablesListEventName, WorkbookVariablesUpdateEventName, urlOnChangeListener, workbookBookmarkCreate, workbookBookmarkCreateListener, workbookBookmarkOnChangeListener, workbookBookmarkUpdate, workbookChartErrorListener, workbookChartValueSelectListener, workbookCurrentVariablesListener, workbookDataLoadedListener, workbookErrorListener, workbookExploreKeyOnChangeListener, workbookFullScreenListener, workbookFullscreenUpdate, workbookIdOnChangeListener, workbookLoadedListener, workbookPageHeightListener, workbookPageSelectedNodeListener, workbookPivotTableCellSelectListener, workbookPublishedListener, workbookSelectedNodeIdUpdate, workbookTableCellSelectListener, workbookVariableChangeListener, workbookVariableCurrentListener, workbookVariablesList, workbookVariablesUpdate };
package/dist/index.d.ts CHANGED
@@ -49,13 +49,20 @@ declare const WorkbookPageSelectedNodeEventName: "workbook:selectednodeid:onchan
49
49
  declare const WorkbookPivotTableCellSelectEventName: "workbook:pivottable:oncellselect";
50
50
  declare const WorkbookChartValueSelectEventName: "workbook:chart:onvalueselect";
51
51
  declare const WorkbookCurrentVariablesEventName: "workbook:variables:current";
52
- declare const WorkbookBookmarkCreateEventName: "workbook:bookmark:oncreate";
52
+ declare const WorkbookBookmarkOnCreateEventName: "workbook:bookmark:oncreate";
53
53
  declare const WorkbookDataLoadedEventName: "workbook:dataloaded";
54
54
  declare const WorkbookChartErrorEventName: "workbook:chart:error";
55
- declare const WorkbookExploreKeyOnChangeEventName: "workbook:explorekey:onchange";
55
+ declare const WorkbookExploreKeyOnChangeEventName: "workbook:exploreKey:onchange";
56
56
  declare const WorkbookBookmarkOnChangeEventName: "workbook:bookmark:onchange";
57
57
  declare const UrlOnChangeEventName: "url:onchange";
58
58
  declare const WorkbookIdOnChangeEventName: "workbook:id:onchange";
59
+ declare const WorkbookBookmarkCreateEventName: "workbook:bookmark:create";
60
+ declare const WorkbookBookmarkUpdateEventName: "workbook:bookmark:update";
61
+ declare const WorkbookFullscreenUpdateEventName: "workbook:fullscreen:update";
62
+ declare const WorkbookSelectedNodeIdUpdateEventName: "workbook:selectednodeid:update";
63
+ declare const WorkbookVariablesListEventName: "workbook:variables:list";
64
+ declare const WorkbookVariablesUpdateEventName: "workbook:variables:update";
65
+ declare const WorkbookVariablesCurrentEventName: "workbook:variables:current";
59
66
  interface WorkbookLoadedEvent {
60
67
  type: typeof WorkbookLoadedEventName;
61
68
  workbook: {
@@ -71,6 +78,10 @@ interface WorkbookVariableOnChangeEvent {
71
78
  type: typeof WorkbookVariableEventOnChangeName;
72
79
  variables: Record<string, string>;
73
80
  }
81
+ interface WorkbookVariableCurrentEvent {
82
+ type: typeof WorkbookVariablesCurrentEventName;
83
+ variables: Record<string, string>;
84
+ }
74
85
  interface WorkbookTableCellSelectEvent {
75
86
  type: typeof WorkbookTableCellSelectEventName;
76
87
  nodeId: string;
@@ -109,8 +120,8 @@ type WorkbookCurrentVariablesEvent = {
109
120
  type: typeof WorkbookCurrentVariablesEventName;
110
121
  variables: Record<string, string>;
111
122
  };
112
- type WorkbookBookmarkCreateEvent = {
113
- type: typeof WorkbookBookmarkCreateEventName;
123
+ type WorkbookBookmarkOnCreateEvent = {
124
+ type: typeof WorkbookBookmarkOnCreateEventName;
114
125
  bookmarkName: string;
115
126
  workbookId: string;
116
127
  versionTagName: string | null;
@@ -144,10 +155,16 @@ type WorkbookIdOnChangeEvent = {
144
155
  type: typeof WorkbookIdOnChangeEventName;
145
156
  id: string;
146
157
  };
158
+ type WorkbookBookmarkCreateEvent = {
159
+ name: string;
160
+ isDefault: boolean;
161
+ isShared: boolean;
162
+ };
147
163
 
148
164
  declare const workbookLoadedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onLoaded: (event: WorkbookLoadedEvent) => void) => void;
149
165
  declare const workbookErrorListener: (event: MessageEvent, iframe: HTMLIFrameElement, onError: (event: WorkbookErrorEvent) => void) => void;
150
- declare const workbookVariableListener: (event: MessageEvent, iframe: HTMLIFrameElement, onVariable: (event: WorkbookVariableOnChangeEvent) => void) => void;
166
+ declare const workbookVariableChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onVariable: (event: WorkbookVariableOnChangeEvent) => void) => void;
167
+ declare const workbookVariableCurrentListener: (event: MessageEvent, iframe: HTMLIFrameElement, onVariable: (event: WorkbookVariableCurrentEvent) => void) => void;
151
168
  declare const workbookTableCellSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onTableCellSelect: (event: WorkbookTableCellSelectEvent) => void) => void;
152
169
  declare const workbookPublishedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onPublished: (event: WorkbookPublishedEvent) => void) => void;
153
170
  declare const workbookFullScreenListener: (event: MessageEvent, iframe: HTMLIFrameElement, onFullScreen: (event: WorkbookFullScreenEvent) => void) => void;
@@ -156,7 +173,7 @@ declare const workbookPageSelectedNodeListener: (event: MessageEvent, iframe: HT
156
173
  declare const workbookPivotTableCellSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onPivotTableCellSelect: (event: WorkbookPivotTableCellSelectEvent) => void) => void;
157
174
  declare const workbookChartValueSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartValueSelect: (event: WorkbookChartValueSelectEvent) => void) => void;
158
175
  declare const workbookCurrentVariablesListener: (event: MessageEvent, iframe: HTMLIFrameElement, onCurrentVariables: (event: WorkbookCurrentVariablesEvent) => void) => void;
159
- declare const workbookBookmarkCreateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkCreateEvent) => void) => void;
176
+ declare const workbookBookmarkCreateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkOnCreateEvent) => void) => void;
160
177
  declare const workbookDataLoadedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookDataLoaded: (event: WorkbookDataLoadedEvent) => void) => void;
161
178
  declare const workbookChartErrorListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartError: (event: WorkbookChartErrorEvent) => void) => void;
162
179
  declare const workbookExploreKeyOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onExploreKeyOnChange: (event: WorkbookExploreKeyOnChangeEvent) => void) => void;
@@ -164,4 +181,11 @@ declare const workbookBookmarkOnChangeListener: (event: MessageEvent, iframe: HT
164
181
  declare const urlOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onUrlChange: (event: UrlOnChangeEvent) => void) => void;
165
182
  declare const workbookIdOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookIdChange: (event: WorkbookIdOnChangeEvent) => void) => void;
166
183
 
167
- export { CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, type DataRow_t, type DataRows_t, type Data_t, type LevelTableCell_t, type LevelTableCells, type LevelTableColumnCell_t, type LevelTableValueCell_t, type PathChunk_t, type PivotPath_t, type PivotTableCell_t, type PivotTableCells_t, type UrlOnChangeEvent, UrlOnChangeEventName, type Value_t, type WorkbookBookmarkCreateEvent, WorkbookBookmarkCreateEventName, type WorkbookBookmarkOnChangeEvent, WorkbookBookmarkOnChangeEventName, type WorkbookChartErrorEvent, WorkbookChartErrorEventName, type WorkbookChartValueSelectEvent, WorkbookChartValueSelectEventName, type WorkbookCurrentVariablesEvent, WorkbookCurrentVariablesEventName, type WorkbookDataLoadedEvent, WorkbookDataLoadedEventName, type WorkbookErrorEvent, WorkbookErrorEventName, type WorkbookExploreKeyOnChangeEvent, WorkbookExploreKeyOnChangeEventName, type WorkbookFullScreenEvent, WorkbookFullScreenEventName, type WorkbookIdOnChangeEvent, WorkbookIdOnChangeEventName, type WorkbookLoadedEvent, WorkbookLoadedEventName, type WorkbookPageHeightEvent, WorkbookPageHeightEventName, type WorkbookPageSelectedNodeEvent, WorkbookPageSelectedNodeEventName, type WorkbookPivotTableCellSelectEvent, WorkbookPivotTableCellSelectEventName, type WorkbookPublishedEvent, WorkbookPublishedEventName, type WorkbookTableCellSelectEvent, WorkbookTableCellSelectEventName, WorkbookVariableEventOnChangeName, type WorkbookVariableOnChangeEvent, urlOnChangeListener, workbookBookmarkCreateListener, workbookBookmarkOnChangeListener, workbookChartErrorListener, workbookChartValueSelectListener, workbookCurrentVariablesListener, workbookDataLoadedListener, workbookErrorListener, workbookExploreKeyOnChangeListener, workbookFullScreenListener, workbookIdOnChangeListener, workbookLoadedListener, workbookPageHeightListener, workbookPageSelectedNodeListener, workbookPivotTableCellSelectListener, workbookPublishedListener, workbookTableCellSelectListener, workbookVariableListener };
184
+ declare const workbookBookmarkCreate: (iframe: HTMLIFrameElement, bookmark: WorkbookBookmarkCreateEvent) => void;
185
+ declare const workbookBookmarkUpdate: (iframe: HTMLIFrameElement) => void;
186
+ declare const workbookFullscreenUpdate: (iframe: HTMLIFrameElement, nodeId: string | null) => void;
187
+ declare const workbookSelectedNodeIdUpdate: (iframe: HTMLIFrameElement, nodeId: string, nodeType: "element" | "page") => void;
188
+ declare const workbookVariablesList: (iframe: HTMLIFrameElement) => void;
189
+ declare const workbookVariablesUpdate: (iframe: HTMLIFrameElement, variables: Record<string, string>) => void;
190
+
191
+ export { CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, type DataRow_t, type DataRows_t, type Data_t, type LevelTableCell_t, type LevelTableCells, type LevelTableColumnCell_t, type LevelTableValueCell_t, type PathChunk_t, type PivotPath_t, type PivotTableCell_t, type PivotTableCells_t, type UrlOnChangeEvent, UrlOnChangeEventName, type Value_t, type WorkbookBookmarkCreateEvent, WorkbookBookmarkCreateEventName, type WorkbookBookmarkOnChangeEvent, WorkbookBookmarkOnChangeEventName, type WorkbookBookmarkOnCreateEvent, WorkbookBookmarkOnCreateEventName, WorkbookBookmarkUpdateEventName, type WorkbookChartErrorEvent, WorkbookChartErrorEventName, type WorkbookChartValueSelectEvent, WorkbookChartValueSelectEventName, type WorkbookCurrentVariablesEvent, WorkbookCurrentVariablesEventName, type WorkbookDataLoadedEvent, WorkbookDataLoadedEventName, type WorkbookErrorEvent, WorkbookErrorEventName, type WorkbookExploreKeyOnChangeEvent, WorkbookExploreKeyOnChangeEventName, type WorkbookFullScreenEvent, WorkbookFullScreenEventName, WorkbookFullscreenUpdateEventName, type WorkbookIdOnChangeEvent, WorkbookIdOnChangeEventName, type WorkbookLoadedEvent, WorkbookLoadedEventName, type WorkbookPageHeightEvent, WorkbookPageHeightEventName, type WorkbookPageSelectedNodeEvent, WorkbookPageSelectedNodeEventName, type WorkbookPivotTableCellSelectEvent, WorkbookPivotTableCellSelectEventName, type WorkbookPublishedEvent, WorkbookPublishedEventName, WorkbookSelectedNodeIdUpdateEventName, type WorkbookTableCellSelectEvent, WorkbookTableCellSelectEventName, type WorkbookVariableCurrentEvent, WorkbookVariableEventOnChangeName, type WorkbookVariableOnChangeEvent, WorkbookVariablesCurrentEventName, WorkbookVariablesListEventName, WorkbookVariablesUpdateEventName, urlOnChangeListener, workbookBookmarkCreate, workbookBookmarkCreateListener, workbookBookmarkOnChangeListener, workbookBookmarkUpdate, workbookChartErrorListener, workbookChartValueSelectListener, workbookCurrentVariablesListener, workbookDataLoadedListener, workbookErrorListener, workbookExploreKeyOnChangeListener, workbookFullScreenListener, workbookFullscreenUpdate, workbookIdOnChangeListener, workbookLoadedListener, workbookPageHeightListener, workbookPageSelectedNodeListener, workbookPivotTableCellSelectListener, workbookPublishedListener, workbookSelectedNodeIdUpdate, workbookTableCellSelectListener, workbookVariableChangeListener, workbookVariableCurrentListener, workbookVariablesList, workbookVariablesUpdate };
package/dist/index.js CHANGED
@@ -21,8 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
23
  urlOnChangeListener: () => urlOnChangeListener,
24
+ workbookBookmarkCreate: () => workbookBookmarkCreate,
24
25
  workbookBookmarkCreateListener: () => workbookBookmarkCreateListener,
25
26
  workbookBookmarkOnChangeListener: () => workbookBookmarkOnChangeListener,
27
+ workbookBookmarkUpdate: () => workbookBookmarkUpdate,
26
28
  workbookChartErrorListener: () => workbookChartErrorListener,
27
29
  workbookChartValueSelectListener: () => workbookChartValueSelectListener,
28
30
  workbookCurrentVariablesListener: () => workbookCurrentVariablesListener,
@@ -30,14 +32,19 @@ __export(src_exports, {
30
32
  workbookErrorListener: () => workbookErrorListener,
31
33
  workbookExploreKeyOnChangeListener: () => workbookExploreKeyOnChangeListener,
32
34
  workbookFullScreenListener: () => workbookFullScreenListener,
35
+ workbookFullscreenUpdate: () => workbookFullscreenUpdate,
33
36
  workbookIdOnChangeListener: () => workbookIdOnChangeListener,
34
37
  workbookLoadedListener: () => workbookLoadedListener,
35
38
  workbookPageHeightListener: () => workbookPageHeightListener,
36
39
  workbookPageSelectedNodeListener: () => workbookPageSelectedNodeListener,
37
40
  workbookPivotTableCellSelectListener: () => workbookPivotTableCellSelectListener,
38
41
  workbookPublishedListener: () => workbookPublishedListener,
42
+ workbookSelectedNodeIdUpdate: () => workbookSelectedNodeIdUpdate,
39
43
  workbookTableCellSelectListener: () => workbookTableCellSelectListener,
40
- workbookVariableListener: () => workbookVariableListener
44
+ workbookVariableChangeListener: () => workbookVariableChangeListener,
45
+ workbookVariableCurrentListener: () => workbookVariableCurrentListener,
46
+ workbookVariablesList: () => workbookVariablesList,
47
+ workbookVariablesUpdate: () => workbookVariablesUpdate
41
48
  });
42
49
  module.exports = __toCommonJS(src_exports);
43
50
 
@@ -53,13 +60,20 @@ var WorkbookPageSelectedNodeEventName = "workbook:selectednodeid:onchange";
53
60
  var WorkbookPivotTableCellSelectEventName = "workbook:pivottable:oncellselect";
54
61
  var WorkbookChartValueSelectEventName = "workbook:chart:onvalueselect";
55
62
  var WorkbookCurrentVariablesEventName = "workbook:variables:current";
56
- var WorkbookBookmarkCreateEventName = "workbook:bookmark:oncreate";
63
+ var WorkbookBookmarkOnCreateEventName = "workbook:bookmark:oncreate";
57
64
  var WorkbookDataLoadedEventName = "workbook:dataloaded";
58
65
  var WorkbookChartErrorEventName = "workbook:chart:error";
59
- var WorkbookExploreKeyOnChangeEventName = "workbook:explorekey:onchange";
66
+ var WorkbookExploreKeyOnChangeEventName = "workbook:exploreKey:onchange";
60
67
  var WorkbookBookmarkOnChangeEventName = "workbook:bookmark:onchange";
61
68
  var UrlOnChangeEventName = "url:onchange";
62
69
  var WorkbookIdOnChangeEventName = "workbook:id:onchange";
70
+ var WorkbookBookmarkCreateEventName = "workbook:bookmark:create";
71
+ var WorkbookBookmarkUpdateEventName = "workbook:bookmark:update";
72
+ var WorkbookFullscreenUpdateEventName = "workbook:fullscreen:update";
73
+ var WorkbookSelectedNodeIdUpdateEventName = "workbook:selectednodeid:update";
74
+ var WorkbookVariablesListEventName = "workbook:variables:list";
75
+ var WorkbookVariablesUpdateEventName = "workbook:variables:update";
76
+ var WorkbookVariablesCurrentEventName = "workbook:variables:current";
63
77
 
64
78
  // src/wrapper.ts
65
79
  var workbookLoadedListener = (event, iframe, onLoaded) => {
@@ -76,13 +90,20 @@ var workbookErrorListener = (event, iframe, onError) => {
76
90
  }
77
91
  }
78
92
  };
79
- var workbookVariableListener = (event, iframe, onVariable) => {
93
+ var workbookVariableChangeListener = (event, iframe, onVariable) => {
80
94
  if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
81
95
  if (event.data.type === WorkbookVariableEventOnChangeName) {
82
96
  onVariable(event.data);
83
97
  }
84
98
  }
85
99
  };
100
+ var workbookVariableCurrentListener = (event, iframe, onVariable) => {
101
+ if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
102
+ if (event.data.type === WorkbookVariablesCurrentEventName) {
103
+ onVariable(event.data);
104
+ }
105
+ }
106
+ };
86
107
  var workbookTableCellSelectListener = (event, iframe, onTableCellSelect) => {
87
108
  if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
88
109
  if (event.data.type === WorkbookTableCellSelectEventName) {
@@ -141,7 +162,7 @@ var workbookCurrentVariablesListener = (event, iframe, onCurrentVariables) => {
141
162
  };
142
163
  var workbookBookmarkCreateListener = (event, iframe, onBookmarkCreate) => {
143
164
  if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
144
- if (event.data.type === WorkbookBookmarkCreateEventName) {
165
+ if (event.data.type === WorkbookBookmarkOnCreateEventName) {
145
166
  onBookmarkCreate(event.data);
146
167
  }
147
168
  }
@@ -188,11 +209,59 @@ var workbookIdOnChangeListener = (event, iframe, onWorkbookIdChange) => {
188
209
  }
189
210
  }
190
211
  };
212
+
213
+ // src/mutations.ts
214
+ var sendIframeMessage = (iframe, message) => {
215
+ if (!iframe.contentWindow) {
216
+ throw new Error("iframe contentWindow is not available");
217
+ }
218
+ iframe.contentWindow.postMessage(
219
+ message,
220
+ "https://staging.sigmacomputing.io"
221
+ );
222
+ };
223
+ var workbookBookmarkCreate = (iframe, bookmark) => {
224
+ sendIframeMessage(iframe, {
225
+ type: WorkbookBookmarkCreateEventName,
226
+ ...bookmark
227
+ });
228
+ };
229
+ var workbookBookmarkUpdate = (iframe) => {
230
+ sendIframeMessage(iframe, {
231
+ type: WorkbookBookmarkUpdateEventName
232
+ });
233
+ };
234
+ var workbookFullscreenUpdate = (iframe, nodeId) => {
235
+ sendIframeMessage(iframe, {
236
+ type: WorkbookFullscreenUpdateEventName,
237
+ nodeId
238
+ });
239
+ };
240
+ var workbookSelectedNodeIdUpdate = (iframe, nodeId, nodeType) => {
241
+ sendIframeMessage(iframe, {
242
+ type: WorkbookSelectedNodeIdUpdateEventName,
243
+ nodeId,
244
+ nodeType
245
+ });
246
+ };
247
+ var workbookVariablesList = (iframe) => {
248
+ sendIframeMessage(iframe, {
249
+ type: WorkbookVariablesListEventName
250
+ });
251
+ };
252
+ var workbookVariablesUpdate = (iframe, variables) => {
253
+ sendIframeMessage(iframe, {
254
+ type: WorkbookVariablesUpdateEventName,
255
+ variables
256
+ });
257
+ };
191
258
  // Annotate the CommonJS export names for ESM import in node:
192
259
  0 && (module.exports = {
193
260
  urlOnChangeListener,
261
+ workbookBookmarkCreate,
194
262
  workbookBookmarkCreateListener,
195
263
  workbookBookmarkOnChangeListener,
264
+ workbookBookmarkUpdate,
196
265
  workbookChartErrorListener,
197
266
  workbookChartValueSelectListener,
198
267
  workbookCurrentVariablesListener,
@@ -200,12 +269,17 @@ var workbookIdOnChangeListener = (event, iframe, onWorkbookIdChange) => {
200
269
  workbookErrorListener,
201
270
  workbookExploreKeyOnChangeListener,
202
271
  workbookFullScreenListener,
272
+ workbookFullscreenUpdate,
203
273
  workbookIdOnChangeListener,
204
274
  workbookLoadedListener,
205
275
  workbookPageHeightListener,
206
276
  workbookPageSelectedNodeListener,
207
277
  workbookPivotTableCellSelectListener,
208
278
  workbookPublishedListener,
279
+ workbookSelectedNodeIdUpdate,
209
280
  workbookTableCellSelectListener,
210
- workbookVariableListener
281
+ workbookVariableChangeListener,
282
+ workbookVariableCurrentListener,
283
+ workbookVariablesList,
284
+ workbookVariablesUpdate
211
285
  });
package/dist/index.mjs CHANGED
@@ -10,13 +10,20 @@ var WorkbookPageSelectedNodeEventName = "workbook:selectednodeid:onchange";
10
10
  var WorkbookPivotTableCellSelectEventName = "workbook:pivottable:oncellselect";
11
11
  var WorkbookChartValueSelectEventName = "workbook:chart:onvalueselect";
12
12
  var WorkbookCurrentVariablesEventName = "workbook:variables:current";
13
- var WorkbookBookmarkCreateEventName = "workbook:bookmark:oncreate";
13
+ var WorkbookBookmarkOnCreateEventName = "workbook:bookmark:oncreate";
14
14
  var WorkbookDataLoadedEventName = "workbook:dataloaded";
15
15
  var WorkbookChartErrorEventName = "workbook:chart:error";
16
- var WorkbookExploreKeyOnChangeEventName = "workbook:explorekey:onchange";
16
+ var WorkbookExploreKeyOnChangeEventName = "workbook:exploreKey:onchange";
17
17
  var WorkbookBookmarkOnChangeEventName = "workbook:bookmark:onchange";
18
18
  var UrlOnChangeEventName = "url:onchange";
19
19
  var WorkbookIdOnChangeEventName = "workbook:id:onchange";
20
+ var WorkbookBookmarkCreateEventName = "workbook:bookmark:create";
21
+ var WorkbookBookmarkUpdateEventName = "workbook:bookmark:update";
22
+ var WorkbookFullscreenUpdateEventName = "workbook:fullscreen:update";
23
+ var WorkbookSelectedNodeIdUpdateEventName = "workbook:selectednodeid:update";
24
+ var WorkbookVariablesListEventName = "workbook:variables:list";
25
+ var WorkbookVariablesUpdateEventName = "workbook:variables:update";
26
+ var WorkbookVariablesCurrentEventName = "workbook:variables:current";
20
27
 
21
28
  // src/wrapper.ts
22
29
  var workbookLoadedListener = (event, iframe, onLoaded) => {
@@ -33,13 +40,20 @@ var workbookErrorListener = (event, iframe, onError) => {
33
40
  }
34
41
  }
35
42
  };
36
- var workbookVariableListener = (event, iframe, onVariable) => {
43
+ var workbookVariableChangeListener = (event, iframe, onVariable) => {
37
44
  if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
38
45
  if (event.data.type === WorkbookVariableEventOnChangeName) {
39
46
  onVariable(event.data);
40
47
  }
41
48
  }
42
49
  };
50
+ var workbookVariableCurrentListener = (event, iframe, onVariable) => {
51
+ if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
52
+ if (event.data.type === WorkbookVariablesCurrentEventName) {
53
+ onVariable(event.data);
54
+ }
55
+ }
56
+ };
43
57
  var workbookTableCellSelectListener = (event, iframe, onTableCellSelect) => {
44
58
  if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
45
59
  if (event.data.type === WorkbookTableCellSelectEventName) {
@@ -98,7 +112,7 @@ var workbookCurrentVariablesListener = (event, iframe, onCurrentVariables) => {
98
112
  };
99
113
  var workbookBookmarkCreateListener = (event, iframe, onBookmarkCreate) => {
100
114
  if (event.source === iframe.contentWindow && event.origin === "https://staging.sigmacomputing.io") {
101
- if (event.data.type === WorkbookBookmarkCreateEventName) {
115
+ if (event.data.type === WorkbookBookmarkOnCreateEventName) {
102
116
  onBookmarkCreate(event.data);
103
117
  }
104
118
  }
@@ -145,10 +159,58 @@ var workbookIdOnChangeListener = (event, iframe, onWorkbookIdChange) => {
145
159
  }
146
160
  }
147
161
  };
162
+
163
+ // src/mutations.ts
164
+ var sendIframeMessage = (iframe, message) => {
165
+ if (!iframe.contentWindow) {
166
+ throw new Error("iframe contentWindow is not available");
167
+ }
168
+ iframe.contentWindow.postMessage(
169
+ message,
170
+ "https://staging.sigmacomputing.io"
171
+ );
172
+ };
173
+ var workbookBookmarkCreate = (iframe, bookmark) => {
174
+ sendIframeMessage(iframe, {
175
+ type: WorkbookBookmarkCreateEventName,
176
+ ...bookmark
177
+ });
178
+ };
179
+ var workbookBookmarkUpdate = (iframe) => {
180
+ sendIframeMessage(iframe, {
181
+ type: WorkbookBookmarkUpdateEventName
182
+ });
183
+ };
184
+ var workbookFullscreenUpdate = (iframe, nodeId) => {
185
+ sendIframeMessage(iframe, {
186
+ type: WorkbookFullscreenUpdateEventName,
187
+ nodeId
188
+ });
189
+ };
190
+ var workbookSelectedNodeIdUpdate = (iframe, nodeId, nodeType) => {
191
+ sendIframeMessage(iframe, {
192
+ type: WorkbookSelectedNodeIdUpdateEventName,
193
+ nodeId,
194
+ nodeType
195
+ });
196
+ };
197
+ var workbookVariablesList = (iframe) => {
198
+ sendIframeMessage(iframe, {
199
+ type: WorkbookVariablesListEventName
200
+ });
201
+ };
202
+ var workbookVariablesUpdate = (iframe, variables) => {
203
+ sendIframeMessage(iframe, {
204
+ type: WorkbookVariablesUpdateEventName,
205
+ variables
206
+ });
207
+ };
148
208
  export {
149
209
  urlOnChangeListener,
210
+ workbookBookmarkCreate,
150
211
  workbookBookmarkCreateListener,
151
212
  workbookBookmarkOnChangeListener,
213
+ workbookBookmarkUpdate,
152
214
  workbookChartErrorListener,
153
215
  workbookChartValueSelectListener,
154
216
  workbookCurrentVariablesListener,
@@ -156,12 +218,17 @@ export {
156
218
  workbookErrorListener,
157
219
  workbookExploreKeyOnChangeListener,
158
220
  workbookFullScreenListener,
221
+ workbookFullscreenUpdate,
159
222
  workbookIdOnChangeListener,
160
223
  workbookLoadedListener,
161
224
  workbookPageHeightListener,
162
225
  workbookPageSelectedNodeListener,
163
226
  workbookPivotTableCellSelectListener,
164
227
  workbookPublishedListener,
228
+ workbookSelectedNodeIdUpdate,
165
229
  workbookTableCellSelectListener,
166
- workbookVariableListener
230
+ workbookVariableChangeListener,
231
+ workbookVariableCurrentListener,
232
+ workbookVariablesList,
233
+ workbookVariablesUpdate
167
234
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmacomputing/embed-sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "JavaScript SDK to interact with Sigma Computing's Embed API",
5
5
  "author": "sigmacomputing",
6
6
  "license": "ISC",