@sigmacomputing/embed-sdk 0.6.0 → 0.7.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/README.md +40 -8
- package/dist/index.d.mts +42 -16
- package/dist/index.d.ts +42 -16
- package/dist/index.js +45 -9
- package/dist/index.mjs +41 -9
- package/package.json +1 -1
package/README.md
CHANGED
@@ -138,6 +138,30 @@ Listen for a workbook bookmark create event, and execute the given callback when
|
|
138
138
|
workbookBookmarkCreateListener(event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkOnCreateEvent) => void)
|
139
139
|
```
|
140
140
|
|
141
|
+
#### workbookBookmarkOnChangeListener
|
142
|
+
|
143
|
+
Listen for a workbook bookmark change event, and execute the given callback when it occurs.
|
144
|
+
|
145
|
+
```typescript
|
146
|
+
workbookBookmarkOnChangeListener(event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkChange: (event: WorkbookBookmarkOnChangeEvent) => void)
|
147
|
+
```
|
148
|
+
|
149
|
+
#### workbookBookmarkOnUpdateListener
|
150
|
+
|
151
|
+
Listen for a workbook bookmark update event, and execute the given callback when it occurs.
|
152
|
+
|
153
|
+
```typescript
|
154
|
+
workbookBookmarkOnUpdateListener(event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkUpdate: (event: WorkbookBookmarkOnUpdateEvent) => void)
|
155
|
+
```
|
156
|
+
|
157
|
+
#### workbookBookmarkOnDeleteListener
|
158
|
+
|
159
|
+
Listen for a workbook bookmark delete event, and execute the given callback when it occurs.
|
160
|
+
|
161
|
+
```typescript
|
162
|
+
workbookBookmarkOnDeleteListener(event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkDelete: (event: WorkbookBookmarkOnDeleteEvent) => void)
|
163
|
+
```
|
164
|
+
|
141
165
|
#### workbookDataLoadedListener
|
142
166
|
|
143
167
|
Listen for a workbook data loaded event, and execute the given callback when it occurs.
|
@@ -162,14 +186,6 @@ Listen for a workbook explore key change event, and execute the given callback w
|
|
162
186
|
workbookExploreKeyOnChangeListener(event: MessageEvent, iframe: HTMLIFrameElement, onExploreKeyOnChange: (event: WorkbookExploreKeyOnChangeEvent) => void)
|
163
187
|
```
|
164
188
|
|
165
|
-
#### workbookBookmarkOnChangeListener
|
166
|
-
|
167
|
-
Listen for a workbook bookmark change event, and execute the given callback when it occurs.
|
168
|
-
|
169
|
-
```typescript
|
170
|
-
workbookBookmarkOnChangeListener(event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkChange: (event: WorkbookBookmarkOnChangeEvent) => void)
|
171
|
-
```
|
172
|
-
|
173
189
|
#### urlOnChangeListener
|
174
190
|
|
175
191
|
Listen for a url change event, and execute the given callback when it occurs.
|
@@ -230,6 +246,22 @@ Send a message to the embed to update the current bookmark.
|
|
230
246
|
workbookBookmarkUpdate(iframe: HTMLIFrameElement)
|
231
247
|
```
|
232
248
|
|
249
|
+
#### workbookBookmarkDelete
|
250
|
+
|
251
|
+
Send a message to the embed to delete the given bookmark.
|
252
|
+
|
253
|
+
```typescript
|
254
|
+
workbookBookmarkDelete(iframe: HTMLIFrameElement, bookmarkId: string)
|
255
|
+
```
|
256
|
+
|
257
|
+
#### workbookBookmarkSelect
|
258
|
+
|
259
|
+
Send a message to the embed to select the given bookmark. If no bookmarkId is provided, the current bookmark will be deselected.
|
260
|
+
|
261
|
+
```typescript
|
262
|
+
workbookBookmarkSelect(iframe: HTMLIFrameElement, bookmarkId?: string)
|
263
|
+
```
|
264
|
+
|
233
265
|
#### workbookFullscreenUpdate
|
234
266
|
|
235
267
|
Send a message to the embed to toggle the fullscreen state of the given element.
|
package/dist/index.d.mts
CHANGED
@@ -53,11 +53,15 @@ declare const WorkbookBookmarkOnCreateEventName: "workbook:bookmark:oncreate";
|
|
53
53
|
declare const WorkbookDataLoadedEventName: "workbook:dataloaded";
|
54
54
|
declare const WorkbookChartErrorEventName: "workbook:chart:error";
|
55
55
|
declare const WorkbookExploreKeyOnChangeEventName: "workbook:exploreKey:onchange";
|
56
|
-
declare const WorkbookBookmarkOnChangeEventName: "workbook:bookmark:onchange";
|
57
56
|
declare const UrlOnChangeEventName: "url:onchange";
|
58
57
|
declare const WorkbookIdOnChangeEventName: "workbook:id:onchange";
|
59
58
|
declare const WorkbookBookmarkCreateEventName: "workbook:bookmark:create";
|
60
59
|
declare const WorkbookBookmarkUpdateEventName: "workbook:bookmark:update";
|
60
|
+
declare const WorkbookBookmarkDeleteEventName: "workbook:bookmark:delete";
|
61
|
+
declare const WorkbookBookmarkSelectEventName: "workbook:bookmark:select";
|
62
|
+
declare const WorkbookBookmarkOnChangeEventName: "workbook:bookmark:onchange";
|
63
|
+
declare const WorkbookBookmarkOnDeleteEventName: "workbook:bookmark:ondelete";
|
64
|
+
declare const WorkbookBookmarkOnUpdateEventName: "workbook:bookmark:onupdate";
|
61
65
|
declare const WorkbookFullscreenUpdateEventName: "workbook:fullscreen:update";
|
62
66
|
declare const WorkbookSelectedNodeIdUpdateEventName: "workbook:selectednodeid:update";
|
63
67
|
declare const WorkbookVariablesListEventName: "workbook:variables:list";
|
@@ -111,6 +115,7 @@ type WorkbookPageHeightEvent = {
|
|
111
115
|
type WorkbookSelectedNodeEvent = {
|
112
116
|
type: typeof WorkbookSelectedNodeEventName;
|
113
117
|
selectedNodeId: string | null;
|
118
|
+
nodeType: "element" | "page" | null;
|
114
119
|
};
|
115
120
|
type WorkbookPivotTableCellSelectEvent = {
|
116
121
|
type: typeof WorkbookPivotTableCellSelectEventName;
|
@@ -128,13 +133,6 @@ type WorkbookCurrentVariablesEvent = {
|
|
128
133
|
type: typeof WorkbookCurrentVariablesEventName;
|
129
134
|
variables: Record<string, string>;
|
130
135
|
};
|
131
|
-
type WorkbookBookmarkOnCreateEvent = {
|
132
|
-
type: typeof WorkbookBookmarkOnCreateEventName;
|
133
|
-
bookmarkName: string;
|
134
|
-
workbookId: string;
|
135
|
-
versionTagName: string | null;
|
136
|
-
bookmarkId: string;
|
137
|
-
};
|
138
136
|
type WorkbookDataLoadedEvent = {
|
139
137
|
type: typeof WorkbookDataLoadedEventName;
|
140
138
|
};
|
@@ -148,6 +146,14 @@ type WorkbookExploreKeyOnChangeEvent = {
|
|
148
146
|
type: typeof WorkbookExploreKeyOnChangeEventName;
|
149
147
|
exploreKey: string | null;
|
150
148
|
};
|
149
|
+
declare const WorkbookBookmarkOnCreateEvent: "workbook:bookmark:oncreate";
|
150
|
+
type WorkbookBookmarkOnCreateEvent = {
|
151
|
+
type: typeof WorkbookBookmarkOnCreateEventName;
|
152
|
+
bookmarkName: string;
|
153
|
+
workbookId: string;
|
154
|
+
versionTagName: string | null;
|
155
|
+
bookmarkId: string;
|
156
|
+
};
|
151
157
|
type WorkbookBookmarkOnChangeEvent = {
|
152
158
|
type: typeof WorkbookBookmarkOnChangeEventName;
|
153
159
|
bookmarkName: string | null;
|
@@ -155,6 +161,27 @@ type WorkbookBookmarkOnChangeEvent = {
|
|
155
161
|
versionTagName: string | null;
|
156
162
|
bookmarkId: string | null;
|
157
163
|
};
|
164
|
+
type WorkbookBookmarkOnUpdateEvent = {
|
165
|
+
type: typeof WorkbookBookmarkOnUpdateEventName;
|
166
|
+
bookmarkName?: string;
|
167
|
+
workbookId: string;
|
168
|
+
versionTagName: string | null;
|
169
|
+
bookmarkId: string;
|
170
|
+
isDefault?: boolean;
|
171
|
+
isShared?: boolean;
|
172
|
+
};
|
173
|
+
type WorkbookBookmarkOnDeleteEvent = {
|
174
|
+
type: typeof WorkbookBookmarkOnDeleteEventName;
|
175
|
+
bookmarkName: string;
|
176
|
+
workbookId: string;
|
177
|
+
versionTagName: string | null;
|
178
|
+
bookmarkId: string;
|
179
|
+
};
|
180
|
+
type WorkbookBookmarkCreateEvent = {
|
181
|
+
name: string;
|
182
|
+
isDefault: boolean;
|
183
|
+
isShared: boolean;
|
184
|
+
};
|
158
185
|
type UrlOnChangeEvent = {
|
159
186
|
type: typeof UrlOnChangeEventName;
|
160
187
|
url: string;
|
@@ -163,11 +190,6 @@ type WorkbookIdOnChangeEvent = {
|
|
163
190
|
type: typeof WorkbookIdOnChangeEventName;
|
164
191
|
id: string;
|
165
192
|
};
|
166
|
-
type WorkbookBookmarkCreateEvent = {
|
167
|
-
name: string;
|
168
|
-
isDefault: boolean;
|
169
|
-
isShared: boolean;
|
170
|
-
};
|
171
193
|
type ActionOutboundEvent = {
|
172
194
|
type: typeof ActionOutboundEventName;
|
173
195
|
name: string;
|
@@ -188,10 +210,12 @@ declare const workbookPivotTableCellSelectListener: (event: MessageEvent, iframe
|
|
188
210
|
declare const workbookChartValueSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartValueSelect: (event: WorkbookChartValueSelectEvent) => void) => void;
|
189
211
|
declare const workbookCurrentVariablesListener: (event: MessageEvent, iframe: HTMLIFrameElement, onCurrentVariables: (event: WorkbookCurrentVariablesEvent) => void) => void;
|
190
212
|
declare const workbookBookmarkCreateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkOnCreateEvent) => void) => void;
|
213
|
+
declare const workbookBookmarkOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkChange: (event: WorkbookBookmarkOnChangeEvent) => void) => void;
|
214
|
+
declare const workbookBookmarkOnUpdateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkUpdate: (event: WorkbookBookmarkOnUpdateEvent) => void) => void;
|
215
|
+
declare const workbookBookmarkOnDeleteListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkDelete: (event: WorkbookBookmarkOnDeleteEvent) => void) => void;
|
191
216
|
declare const workbookDataLoadedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookDataLoaded: (event: WorkbookDataLoadedEvent) => void) => void;
|
192
217
|
declare const workbookChartErrorListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartError: (event: WorkbookChartErrorEvent) => void) => void;
|
193
218
|
declare const workbookExploreKeyOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onExploreKeyOnChange: (event: WorkbookExploreKeyOnChangeEvent) => void) => void;
|
194
|
-
declare const workbookBookmarkOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkChange: (event: WorkbookBookmarkOnChangeEvent) => void) => void;
|
195
219
|
declare const urlOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onUrlChange: (event: UrlOnChangeEvent) => void) => void;
|
196
220
|
declare const workbookIdOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookIdChange: (event: WorkbookIdOnChangeEvent) => void) => void;
|
197
221
|
declare const actionOutboundListener: (event: MessageEvent, iframe: HTMLIFrameElement, onActionOutbound: (event: ActionOutboundEvent) => void) => void;
|
@@ -206,10 +230,12 @@ declare const actionOutboundListener: (event: MessageEvent, iframe: HTMLIFrameEl
|
|
206
230
|
declare const DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl: (url: string) => void;
|
207
231
|
declare const workbookBookmarkCreate: (iframe: HTMLIFrameElement, bookmark: WorkbookBookmarkCreateEvent) => void;
|
208
232
|
declare const workbookBookmarkUpdate: (iframe: HTMLIFrameElement) => void;
|
233
|
+
declare const workbookBookmarkSelect: (iframe: HTMLIFrameElement, bookmarkId?: string) => void;
|
234
|
+
declare const workbookBookmarkDelete: (iframe: HTMLIFrameElement, bookmarkId: string) => void;
|
209
235
|
declare const workbookFullscreenUpdate: (iframe: HTMLIFrameElement, nodeId: string | null) => void;
|
210
|
-
declare const workbookSelectedNodeIdUpdate: (iframe: HTMLIFrameElement, nodeId: string, nodeType: "element" | "page") => void;
|
236
|
+
declare const workbookSelectedNodeIdUpdate: (iframe: HTMLIFrameElement, nodeId: string | null, nodeType: "element" | "page") => void;
|
211
237
|
declare const workbookVariablesList: (iframe: HTMLIFrameElement) => void;
|
212
238
|
declare const workbookVariablesUpdate: (iframe: HTMLIFrameElement, variables: Record<string, string>) => void;
|
213
239
|
declare const workbookSharingLinkUpdate: (iframe: HTMLIFrameElement, sharingLink: string | null, sharingExplorationLink?: string | null) => void;
|
214
240
|
|
215
|
-
export { type ActionOutboundEvent, ActionOutboundEventName, CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl, 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,
|
241
|
+
export { type ActionOutboundEvent, ActionOutboundEventName, CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl, 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, WorkbookBookmarkDeleteEventName, type WorkbookBookmarkOnChangeEvent, WorkbookBookmarkOnChangeEventName, WorkbookBookmarkOnCreateEvent, WorkbookBookmarkOnCreateEventName, type WorkbookBookmarkOnDeleteEvent, WorkbookBookmarkOnDeleteEventName, type WorkbookBookmarkOnUpdateEvent, WorkbookBookmarkOnUpdateEventName, WorkbookBookmarkSelectEventName, 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 WorkbookPivotTableCellSelectEvent, WorkbookPivotTableCellSelectEventName, type WorkbookPublishedEvent, WorkbookPublishedEventName, type WorkbookSelectedNodeEvent, WorkbookSelectedNodeEventName, WorkbookSelectedNodeIdUpdateEventName, type WorkbookSharingLinkUpdateEvent, WorkbookSharingLinkUpdateEventName, type WorkbookTableCellSelectEvent, WorkbookTableCellSelectEventName, type WorkbookVariableCurrentEvent, WorkbookVariableEventOnChangeName, type WorkbookVariableOnChangeEvent, WorkbookVariablesCurrentEventName, WorkbookVariablesListEventName, WorkbookVariablesUpdateEventName, actionOutboundListener, urlOnChangeListener, workbookBookmarkCreate, workbookBookmarkCreateListener, workbookBookmarkDelete, workbookBookmarkOnChangeListener, workbookBookmarkOnDeleteListener, workbookBookmarkOnUpdateListener, workbookBookmarkSelect, workbookBookmarkUpdate, workbookChartErrorListener, workbookChartValueSelectListener, workbookCurrentVariablesListener, workbookDataLoadedListener, workbookErrorListener, workbookExploreKeyOnChangeListener, workbookFullScreenListener, workbookFullscreenUpdate, workbookIdOnChangeListener, workbookLinkSharingUpdateListener, workbookLoadedListener, workbookPageHeightListener, workbookPivotTableCellSelectListener, workbookPublishedListener, workbookSelectedNodeIdUpdate, workbookSelectedNodeListener, workbookSharingLinkUpdate, workbookTableCellSelectListener, workbookVariableChangeListener, workbookVariableCurrentListener, workbookVariablesList, workbookVariablesUpdate };
|
package/dist/index.d.ts
CHANGED
@@ -53,11 +53,15 @@ declare const WorkbookBookmarkOnCreateEventName: "workbook:bookmark:oncreate";
|
|
53
53
|
declare const WorkbookDataLoadedEventName: "workbook:dataloaded";
|
54
54
|
declare const WorkbookChartErrorEventName: "workbook:chart:error";
|
55
55
|
declare const WorkbookExploreKeyOnChangeEventName: "workbook:exploreKey:onchange";
|
56
|
-
declare const WorkbookBookmarkOnChangeEventName: "workbook:bookmark:onchange";
|
57
56
|
declare const UrlOnChangeEventName: "url:onchange";
|
58
57
|
declare const WorkbookIdOnChangeEventName: "workbook:id:onchange";
|
59
58
|
declare const WorkbookBookmarkCreateEventName: "workbook:bookmark:create";
|
60
59
|
declare const WorkbookBookmarkUpdateEventName: "workbook:bookmark:update";
|
60
|
+
declare const WorkbookBookmarkDeleteEventName: "workbook:bookmark:delete";
|
61
|
+
declare const WorkbookBookmarkSelectEventName: "workbook:bookmark:select";
|
62
|
+
declare const WorkbookBookmarkOnChangeEventName: "workbook:bookmark:onchange";
|
63
|
+
declare const WorkbookBookmarkOnDeleteEventName: "workbook:bookmark:ondelete";
|
64
|
+
declare const WorkbookBookmarkOnUpdateEventName: "workbook:bookmark:onupdate";
|
61
65
|
declare const WorkbookFullscreenUpdateEventName: "workbook:fullscreen:update";
|
62
66
|
declare const WorkbookSelectedNodeIdUpdateEventName: "workbook:selectednodeid:update";
|
63
67
|
declare const WorkbookVariablesListEventName: "workbook:variables:list";
|
@@ -111,6 +115,7 @@ type WorkbookPageHeightEvent = {
|
|
111
115
|
type WorkbookSelectedNodeEvent = {
|
112
116
|
type: typeof WorkbookSelectedNodeEventName;
|
113
117
|
selectedNodeId: string | null;
|
118
|
+
nodeType: "element" | "page" | null;
|
114
119
|
};
|
115
120
|
type WorkbookPivotTableCellSelectEvent = {
|
116
121
|
type: typeof WorkbookPivotTableCellSelectEventName;
|
@@ -128,13 +133,6 @@ type WorkbookCurrentVariablesEvent = {
|
|
128
133
|
type: typeof WorkbookCurrentVariablesEventName;
|
129
134
|
variables: Record<string, string>;
|
130
135
|
};
|
131
|
-
type WorkbookBookmarkOnCreateEvent = {
|
132
|
-
type: typeof WorkbookBookmarkOnCreateEventName;
|
133
|
-
bookmarkName: string;
|
134
|
-
workbookId: string;
|
135
|
-
versionTagName: string | null;
|
136
|
-
bookmarkId: string;
|
137
|
-
};
|
138
136
|
type WorkbookDataLoadedEvent = {
|
139
137
|
type: typeof WorkbookDataLoadedEventName;
|
140
138
|
};
|
@@ -148,6 +146,14 @@ type WorkbookExploreKeyOnChangeEvent = {
|
|
148
146
|
type: typeof WorkbookExploreKeyOnChangeEventName;
|
149
147
|
exploreKey: string | null;
|
150
148
|
};
|
149
|
+
declare const WorkbookBookmarkOnCreateEvent: "workbook:bookmark:oncreate";
|
150
|
+
type WorkbookBookmarkOnCreateEvent = {
|
151
|
+
type: typeof WorkbookBookmarkOnCreateEventName;
|
152
|
+
bookmarkName: string;
|
153
|
+
workbookId: string;
|
154
|
+
versionTagName: string | null;
|
155
|
+
bookmarkId: string;
|
156
|
+
};
|
151
157
|
type WorkbookBookmarkOnChangeEvent = {
|
152
158
|
type: typeof WorkbookBookmarkOnChangeEventName;
|
153
159
|
bookmarkName: string | null;
|
@@ -155,6 +161,27 @@ type WorkbookBookmarkOnChangeEvent = {
|
|
155
161
|
versionTagName: string | null;
|
156
162
|
bookmarkId: string | null;
|
157
163
|
};
|
164
|
+
type WorkbookBookmarkOnUpdateEvent = {
|
165
|
+
type: typeof WorkbookBookmarkOnUpdateEventName;
|
166
|
+
bookmarkName?: string;
|
167
|
+
workbookId: string;
|
168
|
+
versionTagName: string | null;
|
169
|
+
bookmarkId: string;
|
170
|
+
isDefault?: boolean;
|
171
|
+
isShared?: boolean;
|
172
|
+
};
|
173
|
+
type WorkbookBookmarkOnDeleteEvent = {
|
174
|
+
type: typeof WorkbookBookmarkOnDeleteEventName;
|
175
|
+
bookmarkName: string;
|
176
|
+
workbookId: string;
|
177
|
+
versionTagName: string | null;
|
178
|
+
bookmarkId: string;
|
179
|
+
};
|
180
|
+
type WorkbookBookmarkCreateEvent = {
|
181
|
+
name: string;
|
182
|
+
isDefault: boolean;
|
183
|
+
isShared: boolean;
|
184
|
+
};
|
158
185
|
type UrlOnChangeEvent = {
|
159
186
|
type: typeof UrlOnChangeEventName;
|
160
187
|
url: string;
|
@@ -163,11 +190,6 @@ type WorkbookIdOnChangeEvent = {
|
|
163
190
|
type: typeof WorkbookIdOnChangeEventName;
|
164
191
|
id: string;
|
165
192
|
};
|
166
|
-
type WorkbookBookmarkCreateEvent = {
|
167
|
-
name: string;
|
168
|
-
isDefault: boolean;
|
169
|
-
isShared: boolean;
|
170
|
-
};
|
171
193
|
type ActionOutboundEvent = {
|
172
194
|
type: typeof ActionOutboundEventName;
|
173
195
|
name: string;
|
@@ -188,10 +210,12 @@ declare const workbookPivotTableCellSelectListener: (event: MessageEvent, iframe
|
|
188
210
|
declare const workbookChartValueSelectListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartValueSelect: (event: WorkbookChartValueSelectEvent) => void) => void;
|
189
211
|
declare const workbookCurrentVariablesListener: (event: MessageEvent, iframe: HTMLIFrameElement, onCurrentVariables: (event: WorkbookCurrentVariablesEvent) => void) => void;
|
190
212
|
declare const workbookBookmarkCreateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkCreate: (event: WorkbookBookmarkOnCreateEvent) => void) => void;
|
213
|
+
declare const workbookBookmarkOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkChange: (event: WorkbookBookmarkOnChangeEvent) => void) => void;
|
214
|
+
declare const workbookBookmarkOnUpdateListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkUpdate: (event: WorkbookBookmarkOnUpdateEvent) => void) => void;
|
215
|
+
declare const workbookBookmarkOnDeleteListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkDelete: (event: WorkbookBookmarkOnDeleteEvent) => void) => void;
|
191
216
|
declare const workbookDataLoadedListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookDataLoaded: (event: WorkbookDataLoadedEvent) => void) => void;
|
192
217
|
declare const workbookChartErrorListener: (event: MessageEvent, iframe: HTMLIFrameElement, onChartError: (event: WorkbookChartErrorEvent) => void) => void;
|
193
218
|
declare const workbookExploreKeyOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onExploreKeyOnChange: (event: WorkbookExploreKeyOnChangeEvent) => void) => void;
|
194
|
-
declare const workbookBookmarkOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onBookmarkChange: (event: WorkbookBookmarkOnChangeEvent) => void) => void;
|
195
219
|
declare const urlOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onUrlChange: (event: UrlOnChangeEvent) => void) => void;
|
196
220
|
declare const workbookIdOnChangeListener: (event: MessageEvent, iframe: HTMLIFrameElement, onWorkbookIdChange: (event: WorkbookIdOnChangeEvent) => void) => void;
|
197
221
|
declare const actionOutboundListener: (event: MessageEvent, iframe: HTMLIFrameElement, onActionOutbound: (event: ActionOutboundEvent) => void) => void;
|
@@ -206,10 +230,12 @@ declare const actionOutboundListener: (event: MessageEvent, iframe: HTMLIFrameEl
|
|
206
230
|
declare const DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl: (url: string) => void;
|
207
231
|
declare const workbookBookmarkCreate: (iframe: HTMLIFrameElement, bookmark: WorkbookBookmarkCreateEvent) => void;
|
208
232
|
declare const workbookBookmarkUpdate: (iframe: HTMLIFrameElement) => void;
|
233
|
+
declare const workbookBookmarkSelect: (iframe: HTMLIFrameElement, bookmarkId?: string) => void;
|
234
|
+
declare const workbookBookmarkDelete: (iframe: HTMLIFrameElement, bookmarkId: string) => void;
|
209
235
|
declare const workbookFullscreenUpdate: (iframe: HTMLIFrameElement, nodeId: string | null) => void;
|
210
|
-
declare const workbookSelectedNodeIdUpdate: (iframe: HTMLIFrameElement, nodeId: string, nodeType: "element" | "page") => void;
|
236
|
+
declare const workbookSelectedNodeIdUpdate: (iframe: HTMLIFrameElement, nodeId: string | null, nodeType: "element" | "page") => void;
|
211
237
|
declare const workbookVariablesList: (iframe: HTMLIFrameElement) => void;
|
212
238
|
declare const workbookVariablesUpdate: (iframe: HTMLIFrameElement, variables: Record<string, string>) => void;
|
213
239
|
declare const workbookSharingLinkUpdate: (iframe: HTMLIFrameElement, sharingLink: string | null, sharingExplorationLink?: string | null) => void;
|
214
240
|
|
215
|
-
export { type ActionOutboundEvent, ActionOutboundEventName, CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl, 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,
|
241
|
+
export { type ActionOutboundEvent, ActionOutboundEventName, CellType_t, type Cell_t, type ChartValue_t, type ChartValues_t, DO_NOT_USE_IN_PRODUCTION_overrideMutationUrl, 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, WorkbookBookmarkDeleteEventName, type WorkbookBookmarkOnChangeEvent, WorkbookBookmarkOnChangeEventName, WorkbookBookmarkOnCreateEvent, WorkbookBookmarkOnCreateEventName, type WorkbookBookmarkOnDeleteEvent, WorkbookBookmarkOnDeleteEventName, type WorkbookBookmarkOnUpdateEvent, WorkbookBookmarkOnUpdateEventName, WorkbookBookmarkSelectEventName, 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 WorkbookPivotTableCellSelectEvent, WorkbookPivotTableCellSelectEventName, type WorkbookPublishedEvent, WorkbookPublishedEventName, type WorkbookSelectedNodeEvent, WorkbookSelectedNodeEventName, WorkbookSelectedNodeIdUpdateEventName, type WorkbookSharingLinkUpdateEvent, WorkbookSharingLinkUpdateEventName, type WorkbookTableCellSelectEvent, WorkbookTableCellSelectEventName, type WorkbookVariableCurrentEvent, WorkbookVariableEventOnChangeName, type WorkbookVariableOnChangeEvent, WorkbookVariablesCurrentEventName, WorkbookVariablesListEventName, WorkbookVariablesUpdateEventName, actionOutboundListener, urlOnChangeListener, workbookBookmarkCreate, workbookBookmarkCreateListener, workbookBookmarkDelete, workbookBookmarkOnChangeListener, workbookBookmarkOnDeleteListener, workbookBookmarkOnUpdateListener, workbookBookmarkSelect, workbookBookmarkUpdate, workbookChartErrorListener, workbookChartValueSelectListener, workbookCurrentVariablesListener, workbookDataLoadedListener, workbookErrorListener, workbookExploreKeyOnChangeListener, workbookFullScreenListener, workbookFullscreenUpdate, workbookIdOnChangeListener, workbookLinkSharingUpdateListener, workbookLoadedListener, workbookPageHeightListener, workbookPivotTableCellSelectListener, workbookPublishedListener, workbookSelectedNodeIdUpdate, workbookSelectedNodeListener, workbookSharingLinkUpdate, workbookTableCellSelectListener, workbookVariableChangeListener, workbookVariableCurrentListener, workbookVariablesList, workbookVariablesUpdate };
|
package/dist/index.js
CHANGED
@@ -25,7 +25,11 @@ __export(src_exports, {
|
|
25
25
|
urlOnChangeListener: () => urlOnChangeListener,
|
26
26
|
workbookBookmarkCreate: () => workbookBookmarkCreate,
|
27
27
|
workbookBookmarkCreateListener: () => workbookBookmarkCreateListener,
|
28
|
+
workbookBookmarkDelete: () => workbookBookmarkDelete,
|
28
29
|
workbookBookmarkOnChangeListener: () => workbookBookmarkOnChangeListener,
|
30
|
+
workbookBookmarkOnDeleteListener: () => workbookBookmarkOnDeleteListener,
|
31
|
+
workbookBookmarkOnUpdateListener: () => workbookBookmarkOnUpdateListener,
|
32
|
+
workbookBookmarkSelect: () => workbookBookmarkSelect,
|
29
33
|
workbookBookmarkUpdate: () => workbookBookmarkUpdate,
|
30
34
|
workbookChartErrorListener: () => workbookChartErrorListener,
|
31
35
|
workbookChartValueSelectListener: () => workbookChartValueSelectListener,
|
@@ -68,11 +72,13 @@ var WorkbookBookmarkOnCreateEventName = "workbook:bookmark:oncreate";
|
|
68
72
|
var WorkbookDataLoadedEventName = "workbook:dataloaded";
|
69
73
|
var WorkbookChartErrorEventName = "workbook:chart:error";
|
70
74
|
var WorkbookExploreKeyOnChangeEventName = "workbook:exploreKey:onchange";
|
71
|
-
var WorkbookBookmarkOnChangeEventName = "workbook:bookmark:onchange";
|
72
75
|
var UrlOnChangeEventName = "url:onchange";
|
73
76
|
var WorkbookIdOnChangeEventName = "workbook:id:onchange";
|
74
77
|
var WorkbookBookmarkCreateEventName = "workbook:bookmark:create";
|
75
78
|
var WorkbookBookmarkUpdateEventName = "workbook:bookmark:update";
|
79
|
+
var WorkbookBookmarkOnChangeEventName = "workbook:bookmark:onchange";
|
80
|
+
var WorkbookBookmarkOnDeleteEventName = "workbook:bookmark:ondelete";
|
81
|
+
var WorkbookBookmarkOnUpdateEventName = "workbook:bookmark:onupdate";
|
76
82
|
var WorkbookFullscreenUpdateEventName = "workbook:fullscreen:update";
|
77
83
|
var WorkbookSelectedNodeIdUpdateEventName = "workbook:selectednodeid:update";
|
78
84
|
var WorkbookVariablesListEventName = "workbook:variables:list";
|
@@ -186,6 +192,27 @@ var workbookBookmarkCreateListener = (event, iframe, onBookmarkCreate) => {
|
|
186
192
|
}
|
187
193
|
}
|
188
194
|
};
|
195
|
+
var workbookBookmarkOnChangeListener = (event, iframe, onBookmarkChange) => {
|
196
|
+
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
197
|
+
if (event.data.type === WorkbookBookmarkOnChangeEventName) {
|
198
|
+
onBookmarkChange(event.data);
|
199
|
+
}
|
200
|
+
}
|
201
|
+
};
|
202
|
+
var workbookBookmarkOnUpdateListener = (event, iframe, onBookmarkUpdate) => {
|
203
|
+
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
204
|
+
if (event.data.type === WorkbookBookmarkOnUpdateEventName) {
|
205
|
+
onBookmarkUpdate(event.data);
|
206
|
+
}
|
207
|
+
}
|
208
|
+
};
|
209
|
+
var workbookBookmarkOnDeleteListener = (event, iframe, onBookmarkDelete) => {
|
210
|
+
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
211
|
+
if (event.data.type === WorkbookBookmarkOnDeleteEventName) {
|
212
|
+
onBookmarkDelete(event.data);
|
213
|
+
}
|
214
|
+
}
|
215
|
+
};
|
189
216
|
var workbookDataLoadedListener = (event, iframe, onWorkbookDataLoaded) => {
|
190
217
|
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
191
218
|
if (event.data.type === WorkbookDataLoadedEventName) {
|
@@ -207,13 +234,6 @@ var workbookExploreKeyOnChangeListener = (event, iframe, onExploreKeyOnChange) =
|
|
207
234
|
}
|
208
235
|
}
|
209
236
|
};
|
210
|
-
var workbookBookmarkOnChangeListener = (event, iframe, onBookmarkChange) => {
|
211
|
-
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
212
|
-
if (event.data.type === WorkbookBookmarkOnChangeEventName) {
|
213
|
-
onBookmarkChange(event.data);
|
214
|
-
}
|
215
|
-
}
|
216
|
-
};
|
217
237
|
var urlOnChangeListener = (event, iframe, onUrlChange) => {
|
218
238
|
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
219
239
|
if (event.data.type === UrlOnChangeEventName) {
|
@@ -258,6 +278,18 @@ var workbookBookmarkUpdate = (iframe) => {
|
|
258
278
|
type: WorkbookBookmarkUpdateEventName
|
259
279
|
});
|
260
280
|
};
|
281
|
+
var workbookBookmarkSelect = (iframe, bookmarkId) => {
|
282
|
+
sendIframeMessage(iframe, {
|
283
|
+
type: "workbook:bookmark:select",
|
284
|
+
bookmarkId
|
285
|
+
});
|
286
|
+
};
|
287
|
+
var workbookBookmarkDelete = (iframe, bookmarkId) => {
|
288
|
+
sendIframeMessage(iframe, {
|
289
|
+
type: "workbook:bookmark:delete",
|
290
|
+
bookmarkId
|
291
|
+
});
|
292
|
+
};
|
261
293
|
var workbookFullscreenUpdate = (iframe, nodeId) => {
|
262
294
|
sendIframeMessage(iframe, {
|
263
295
|
type: WorkbookFullscreenUpdateEventName,
|
@@ -267,7 +299,7 @@ var workbookFullscreenUpdate = (iframe, nodeId) => {
|
|
267
299
|
var workbookSelectedNodeIdUpdate = (iframe, nodeId, nodeType) => {
|
268
300
|
sendIframeMessage(iframe, {
|
269
301
|
type: WorkbookSelectedNodeIdUpdateEventName,
|
270
|
-
nodeId,
|
302
|
+
selectedNodeId: nodeId,
|
271
303
|
nodeType
|
272
304
|
});
|
273
305
|
};
|
@@ -296,7 +328,11 @@ var workbookSharingLinkUpdate = (iframe, sharingLink, sharingExplorationLink) =>
|
|
296
328
|
urlOnChangeListener,
|
297
329
|
workbookBookmarkCreate,
|
298
330
|
workbookBookmarkCreateListener,
|
331
|
+
workbookBookmarkDelete,
|
299
332
|
workbookBookmarkOnChangeListener,
|
333
|
+
workbookBookmarkOnDeleteListener,
|
334
|
+
workbookBookmarkOnUpdateListener,
|
335
|
+
workbookBookmarkSelect,
|
300
336
|
workbookBookmarkUpdate,
|
301
337
|
workbookChartErrorListener,
|
302
338
|
workbookChartValueSelectListener,
|
package/dist/index.mjs
CHANGED
@@ -14,11 +14,13 @@ var WorkbookBookmarkOnCreateEventName = "workbook:bookmark:oncreate";
|
|
14
14
|
var WorkbookDataLoadedEventName = "workbook:dataloaded";
|
15
15
|
var WorkbookChartErrorEventName = "workbook:chart:error";
|
16
16
|
var WorkbookExploreKeyOnChangeEventName = "workbook:exploreKey:onchange";
|
17
|
-
var WorkbookBookmarkOnChangeEventName = "workbook:bookmark:onchange";
|
18
17
|
var UrlOnChangeEventName = "url:onchange";
|
19
18
|
var WorkbookIdOnChangeEventName = "workbook:id:onchange";
|
20
19
|
var WorkbookBookmarkCreateEventName = "workbook:bookmark:create";
|
21
20
|
var WorkbookBookmarkUpdateEventName = "workbook:bookmark:update";
|
21
|
+
var WorkbookBookmarkOnChangeEventName = "workbook:bookmark:onchange";
|
22
|
+
var WorkbookBookmarkOnDeleteEventName = "workbook:bookmark:ondelete";
|
23
|
+
var WorkbookBookmarkOnUpdateEventName = "workbook:bookmark:onupdate";
|
22
24
|
var WorkbookFullscreenUpdateEventName = "workbook:fullscreen:update";
|
23
25
|
var WorkbookSelectedNodeIdUpdateEventName = "workbook:selectednodeid:update";
|
24
26
|
var WorkbookVariablesListEventName = "workbook:variables:list";
|
@@ -132,6 +134,27 @@ var workbookBookmarkCreateListener = (event, iframe, onBookmarkCreate) => {
|
|
132
134
|
}
|
133
135
|
}
|
134
136
|
};
|
137
|
+
var workbookBookmarkOnChangeListener = (event, iframe, onBookmarkChange) => {
|
138
|
+
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
139
|
+
if (event.data.type === WorkbookBookmarkOnChangeEventName) {
|
140
|
+
onBookmarkChange(event.data);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
};
|
144
|
+
var workbookBookmarkOnUpdateListener = (event, iframe, onBookmarkUpdate) => {
|
145
|
+
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
146
|
+
if (event.data.type === WorkbookBookmarkOnUpdateEventName) {
|
147
|
+
onBookmarkUpdate(event.data);
|
148
|
+
}
|
149
|
+
}
|
150
|
+
};
|
151
|
+
var workbookBookmarkOnDeleteListener = (event, iframe, onBookmarkDelete) => {
|
152
|
+
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
153
|
+
if (event.data.type === WorkbookBookmarkOnDeleteEventName) {
|
154
|
+
onBookmarkDelete(event.data);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
};
|
135
158
|
var workbookDataLoadedListener = (event, iframe, onWorkbookDataLoaded) => {
|
136
159
|
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
137
160
|
if (event.data.type === WorkbookDataLoadedEventName) {
|
@@ -153,13 +176,6 @@ var workbookExploreKeyOnChangeListener = (event, iframe, onExploreKeyOnChange) =
|
|
153
176
|
}
|
154
177
|
}
|
155
178
|
};
|
156
|
-
var workbookBookmarkOnChangeListener = (event, iframe, onBookmarkChange) => {
|
157
|
-
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
158
|
-
if (event.data.type === WorkbookBookmarkOnChangeEventName) {
|
159
|
-
onBookmarkChange(event.data);
|
160
|
-
}
|
161
|
-
}
|
162
|
-
};
|
163
179
|
var urlOnChangeListener = (event, iframe, onUrlChange) => {
|
164
180
|
if (event.source === iframe.contentWindow && checkEventOrigin(event.origin)) {
|
165
181
|
if (event.data.type === UrlOnChangeEventName) {
|
@@ -204,6 +220,18 @@ var workbookBookmarkUpdate = (iframe) => {
|
|
204
220
|
type: WorkbookBookmarkUpdateEventName
|
205
221
|
});
|
206
222
|
};
|
223
|
+
var workbookBookmarkSelect = (iframe, bookmarkId) => {
|
224
|
+
sendIframeMessage(iframe, {
|
225
|
+
type: "workbook:bookmark:select",
|
226
|
+
bookmarkId
|
227
|
+
});
|
228
|
+
};
|
229
|
+
var workbookBookmarkDelete = (iframe, bookmarkId) => {
|
230
|
+
sendIframeMessage(iframe, {
|
231
|
+
type: "workbook:bookmark:delete",
|
232
|
+
bookmarkId
|
233
|
+
});
|
234
|
+
};
|
207
235
|
var workbookFullscreenUpdate = (iframe, nodeId) => {
|
208
236
|
sendIframeMessage(iframe, {
|
209
237
|
type: WorkbookFullscreenUpdateEventName,
|
@@ -213,7 +241,7 @@ var workbookFullscreenUpdate = (iframe, nodeId) => {
|
|
213
241
|
var workbookSelectedNodeIdUpdate = (iframe, nodeId, nodeType) => {
|
214
242
|
sendIframeMessage(iframe, {
|
215
243
|
type: WorkbookSelectedNodeIdUpdateEventName,
|
216
|
-
nodeId,
|
244
|
+
selectedNodeId: nodeId,
|
217
245
|
nodeType
|
218
246
|
});
|
219
247
|
};
|
@@ -241,7 +269,11 @@ export {
|
|
241
269
|
urlOnChangeListener,
|
242
270
|
workbookBookmarkCreate,
|
243
271
|
workbookBookmarkCreateListener,
|
272
|
+
workbookBookmarkDelete,
|
244
273
|
workbookBookmarkOnChangeListener,
|
274
|
+
workbookBookmarkOnDeleteListener,
|
275
|
+
workbookBookmarkOnUpdateListener,
|
276
|
+
workbookBookmarkSelect,
|
245
277
|
workbookBookmarkUpdate,
|
246
278
|
workbookChartErrorListener,
|
247
279
|
workbookChartValueSelectListener,
|