@uniformdev/mesh-sdk 18.17.1-alpha.13 → 18.19.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/dist/index.d.ts +5 -0
- package/dist/index.esm.js +33 -0
- package/dist/index.js +37 -0
- package/dist/index.mjs +33 -0
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -367,6 +367,7 @@ interface paths {
|
|
|
367
367
|
query: {
|
|
368
368
|
projectId: string;
|
|
369
369
|
type?: string;
|
|
370
|
+
exactType?: boolean | null;
|
|
370
371
|
teamSpecificType?: boolean | null;
|
|
371
372
|
};
|
|
372
373
|
};
|
|
@@ -410,6 +411,8 @@ interface paths {
|
|
|
410
411
|
* @description The project ID
|
|
411
412
|
*/
|
|
412
413
|
projectId: string;
|
|
414
|
+
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
415
|
+
exactType?: boolean | null;
|
|
413
416
|
type: string;
|
|
414
417
|
data?: {
|
|
415
418
|
[key: string]: unknown;
|
|
@@ -441,6 +444,8 @@ interface paths {
|
|
|
441
444
|
projectId: string;
|
|
442
445
|
/** @description The integration type to remove */
|
|
443
446
|
type: string;
|
|
447
|
+
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
448
|
+
exactType?: boolean | null;
|
|
444
449
|
};
|
|
445
450
|
};
|
|
446
451
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -19,11 +19,13 @@ var _IntegrationDefinitionClient = class extends ApiClient {
|
|
|
19
19
|
constructor(options) {
|
|
20
20
|
super(options);
|
|
21
21
|
}
|
|
22
|
+
/** Fetches all mesh apps for a team (and optionally also those shared across teams) */
|
|
22
23
|
async get(options) {
|
|
23
24
|
const { teamId } = this.options;
|
|
24
25
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
|
|
25
26
|
return await this.apiClient(fetchUri);
|
|
26
27
|
}
|
|
28
|
+
/** Creates or updates a mesh app definition on a team */
|
|
27
29
|
async upsert(body) {
|
|
28
30
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
29
31
|
return await this.apiClient(fetchUri, {
|
|
@@ -31,6 +33,7 @@ var _IntegrationDefinitionClient = class extends ApiClient {
|
|
|
31
33
|
body: JSON.stringify({ ...body, teamId: this.options.teamId })
|
|
32
34
|
});
|
|
33
35
|
}
|
|
36
|
+
/** Deletes a mesh app from a team */
|
|
34
37
|
async remove(body) {
|
|
35
38
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
36
39
|
await this.apiClient(fetchUri, {
|
|
@@ -51,11 +54,13 @@ var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
|
51
54
|
constructor(options) {
|
|
52
55
|
super(options);
|
|
53
56
|
}
|
|
57
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
54
58
|
async get(options) {
|
|
55
59
|
const { projectId } = this.options;
|
|
56
60
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
57
61
|
return await this.apiClient(fetchUri);
|
|
58
62
|
}
|
|
63
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
59
64
|
async getOne(options) {
|
|
60
65
|
const { projectId } = this.options;
|
|
61
66
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
@@ -65,6 +70,7 @@ var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
|
65
70
|
}
|
|
66
71
|
return response.results[0];
|
|
67
72
|
}
|
|
73
|
+
/** Updates or creates (based on id) a IntegrationInstallation */
|
|
68
74
|
async upsert(body) {
|
|
69
75
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
70
76
|
await this.apiClient(fetchUri, {
|
|
@@ -73,6 +79,7 @@ var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
|
73
79
|
expectNoContent: true
|
|
74
80
|
});
|
|
75
81
|
}
|
|
82
|
+
/** Deletes a IntegrationInstallation */
|
|
76
83
|
async remove(body) {
|
|
77
84
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
78
85
|
await this.apiClient(fetchUri, {
|
|
@@ -215,9 +222,15 @@ var SharedClient = class {
|
|
|
215
222
|
this.logger.log(reason);
|
|
216
223
|
});
|
|
217
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Sends an event to the opposite client
|
|
227
|
+
*/
|
|
218
228
|
async send(eventType, data) {
|
|
219
229
|
return this.postMessage("event" /* EVENT */, eventType, data);
|
|
220
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Subscribes an event handler for the given eventType. Returns an unsubscribe hook
|
|
233
|
+
*/
|
|
221
234
|
on(eventType, handler) {
|
|
222
235
|
if (!this.eventSubscriptions[eventType]) {
|
|
223
236
|
this.eventSubscriptions[eventType] = {};
|
|
@@ -230,6 +243,10 @@ var SharedClient = class {
|
|
|
230
243
|
this.logger.log(`Unsubscribed handler for event ${eventType}`);
|
|
231
244
|
};
|
|
232
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Sends a request to the opposite client. There must be an accompanying request handler
|
|
248
|
+
* subscribed with `onRequest`. Resolves with the returned data or times out.
|
|
249
|
+
*/
|
|
233
250
|
async request(requestKey, data, options = {}) {
|
|
234
251
|
const sentMessage = await this.postMessage("request" /* REQUEST */, requestKey, data);
|
|
235
252
|
const requestId = sentMessage.id;
|
|
@@ -264,6 +281,12 @@ var SharedClient = class {
|
|
|
264
281
|
}, options.timeout || this.requestTimeout);
|
|
265
282
|
});
|
|
266
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Subscribes a request handler for the given request key. The return value
|
|
286
|
+
* from the subscribed handler is sent back to the opposite client. The handler may be async.
|
|
287
|
+
* Unlike event handlers, there may be only one request handler per request key. Returns
|
|
288
|
+
* an unsubscribe hook.
|
|
289
|
+
*/
|
|
267
290
|
onRequest(requestKey, requestHandler) {
|
|
268
291
|
const requestEventHandler = async (requestData, requestMessage) => {
|
|
269
292
|
try {
|
|
@@ -278,6 +301,10 @@ var SharedClient = class {
|
|
|
278
301
|
this.requestSubscriptions = omit(this.requestSubscriptions, requestKey);
|
|
279
302
|
};
|
|
280
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* A wrapper around the channel deferred object that also checks
|
|
306
|
+
* if the client has been destroyed before returning
|
|
307
|
+
*/
|
|
281
308
|
async getChannel() {
|
|
282
309
|
await this.channel.promise;
|
|
283
310
|
if (this.destroyed) {
|
|
@@ -592,6 +619,7 @@ async function initializeUniformMeshSDK({
|
|
|
592
619
|
sdk.events.emit("onValueChanged", { newValue: value });
|
|
593
620
|
await parent.setValue(value, options);
|
|
594
621
|
},
|
|
622
|
+
// DEPRECATED
|
|
595
623
|
getMetadata: () => contextData.locationMetadata,
|
|
596
624
|
metadata: contextData.locationMetadata,
|
|
597
625
|
setValidationResult: async (value) => {
|
|
@@ -613,6 +641,10 @@ async function initializeUniformMeshSDK({
|
|
|
613
641
|
onHeightChange: (height) => {
|
|
614
642
|
parent.resize(height);
|
|
615
643
|
},
|
|
644
|
+
// If we're in a dialog context and the dialog was opened with a specified `contentHeight`,
|
|
645
|
+
// then we disable autoResizing for the dialog location.
|
|
646
|
+
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
647
|
+
// developers very sad and confused. No one wants a sad and confused developer.
|
|
616
648
|
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) ? true : autoResizingDisabled
|
|
617
649
|
}),
|
|
618
650
|
version: contextData.uniformApiVersion,
|
|
@@ -651,6 +683,7 @@ async function initializeUniformMeshSDK({
|
|
|
651
683
|
return;
|
|
652
684
|
}
|
|
653
685
|
return {
|
|
686
|
+
/** @deprecated don't use this */
|
|
654
687
|
dialogId: result.dialogId,
|
|
655
688
|
value: result.value,
|
|
656
689
|
closeDialog: async () => {
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -52,11 +56,13 @@ var _IntegrationDefinitionClient = class extends import_api.ApiClient {
|
|
|
52
56
|
constructor(options) {
|
|
53
57
|
super(options);
|
|
54
58
|
}
|
|
59
|
+
/** Fetches all mesh apps for a team (and optionally also those shared across teams) */
|
|
55
60
|
async get(options) {
|
|
56
61
|
const { teamId } = this.options;
|
|
57
62
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
|
|
58
63
|
return await this.apiClient(fetchUri);
|
|
59
64
|
}
|
|
65
|
+
/** Creates or updates a mesh app definition on a team */
|
|
60
66
|
async upsert(body) {
|
|
61
67
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
62
68
|
return await this.apiClient(fetchUri, {
|
|
@@ -64,6 +70,7 @@ var _IntegrationDefinitionClient = class extends import_api.ApiClient {
|
|
|
64
70
|
body: JSON.stringify({ ...body, teamId: this.options.teamId })
|
|
65
71
|
});
|
|
66
72
|
}
|
|
73
|
+
/** Deletes a mesh app from a team */
|
|
67
74
|
async remove(body) {
|
|
68
75
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
69
76
|
await this.apiClient(fetchUri, {
|
|
@@ -84,11 +91,13 @@ var _IntegrationInstallationClient = class extends import_api2.ApiClient {
|
|
|
84
91
|
constructor(options) {
|
|
85
92
|
super(options);
|
|
86
93
|
}
|
|
94
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
87
95
|
async get(options) {
|
|
88
96
|
const { projectId } = this.options;
|
|
89
97
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
90
98
|
return await this.apiClient(fetchUri);
|
|
91
99
|
}
|
|
100
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
92
101
|
async getOne(options) {
|
|
93
102
|
const { projectId } = this.options;
|
|
94
103
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
@@ -98,6 +107,7 @@ var _IntegrationInstallationClient = class extends import_api2.ApiClient {
|
|
|
98
107
|
}
|
|
99
108
|
return response.results[0];
|
|
100
109
|
}
|
|
110
|
+
/** Updates or creates (based on id) a IntegrationInstallation */
|
|
101
111
|
async upsert(body) {
|
|
102
112
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
103
113
|
await this.apiClient(fetchUri, {
|
|
@@ -106,6 +116,7 @@ var _IntegrationInstallationClient = class extends import_api2.ApiClient {
|
|
|
106
116
|
expectNoContent: true
|
|
107
117
|
});
|
|
108
118
|
}
|
|
119
|
+
/** Deletes a IntegrationInstallation */
|
|
109
120
|
async remove(body) {
|
|
110
121
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
111
122
|
await this.apiClient(fetchUri, {
|
|
@@ -248,9 +259,15 @@ var SharedClient = class {
|
|
|
248
259
|
this.logger.log(reason);
|
|
249
260
|
});
|
|
250
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Sends an event to the opposite client
|
|
264
|
+
*/
|
|
251
265
|
async send(eventType, data) {
|
|
252
266
|
return this.postMessage("event" /* EVENT */, eventType, data);
|
|
253
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Subscribes an event handler for the given eventType. Returns an unsubscribe hook
|
|
270
|
+
*/
|
|
254
271
|
on(eventType, handler) {
|
|
255
272
|
if (!this.eventSubscriptions[eventType]) {
|
|
256
273
|
this.eventSubscriptions[eventType] = {};
|
|
@@ -263,6 +280,10 @@ var SharedClient = class {
|
|
|
263
280
|
this.logger.log(`Unsubscribed handler for event ${eventType}`);
|
|
264
281
|
};
|
|
265
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Sends a request to the opposite client. There must be an accompanying request handler
|
|
285
|
+
* subscribed with `onRequest`. Resolves with the returned data or times out.
|
|
286
|
+
*/
|
|
266
287
|
async request(requestKey, data, options = {}) {
|
|
267
288
|
const sentMessage = await this.postMessage("request" /* REQUEST */, requestKey, data);
|
|
268
289
|
const requestId = sentMessage.id;
|
|
@@ -297,6 +318,12 @@ var SharedClient = class {
|
|
|
297
318
|
}, options.timeout || this.requestTimeout);
|
|
298
319
|
});
|
|
299
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Subscribes a request handler for the given request key. The return value
|
|
323
|
+
* from the subscribed handler is sent back to the opposite client. The handler may be async.
|
|
324
|
+
* Unlike event handlers, there may be only one request handler per request key. Returns
|
|
325
|
+
* an unsubscribe hook.
|
|
326
|
+
*/
|
|
300
327
|
onRequest(requestKey, requestHandler) {
|
|
301
328
|
const requestEventHandler = async (requestData, requestMessage) => {
|
|
302
329
|
try {
|
|
@@ -311,6 +338,10 @@ var SharedClient = class {
|
|
|
311
338
|
this.requestSubscriptions = omit(this.requestSubscriptions, requestKey);
|
|
312
339
|
};
|
|
313
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* A wrapper around the channel deferred object that also checks
|
|
343
|
+
* if the client has been destroyed before returning
|
|
344
|
+
*/
|
|
314
345
|
async getChannel() {
|
|
315
346
|
await this.channel.promise;
|
|
316
347
|
if (this.destroyed) {
|
|
@@ -625,6 +656,7 @@ async function initializeUniformMeshSDK({
|
|
|
625
656
|
sdk.events.emit("onValueChanged", { newValue: value });
|
|
626
657
|
await parent.setValue(value, options);
|
|
627
658
|
},
|
|
659
|
+
// DEPRECATED
|
|
628
660
|
getMetadata: () => contextData.locationMetadata,
|
|
629
661
|
metadata: contextData.locationMetadata,
|
|
630
662
|
setValidationResult: async (value) => {
|
|
@@ -646,6 +678,10 @@ async function initializeUniformMeshSDK({
|
|
|
646
678
|
onHeightChange: (height) => {
|
|
647
679
|
parent.resize(height);
|
|
648
680
|
},
|
|
681
|
+
// If we're in a dialog context and the dialog was opened with a specified `contentHeight`,
|
|
682
|
+
// then we disable autoResizing for the dialog location.
|
|
683
|
+
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
684
|
+
// developers very sad and confused. No one wants a sad and confused developer.
|
|
649
685
|
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) ? true : autoResizingDisabled
|
|
650
686
|
}),
|
|
651
687
|
version: contextData.uniformApiVersion,
|
|
@@ -684,6 +720,7 @@ async function initializeUniformMeshSDK({
|
|
|
684
720
|
return;
|
|
685
721
|
}
|
|
686
722
|
return {
|
|
723
|
+
/** @deprecated don't use this */
|
|
687
724
|
dialogId: result.dialogId,
|
|
688
725
|
value: result.value,
|
|
689
726
|
closeDialog: async () => {
|
package/dist/index.mjs
CHANGED
|
@@ -19,11 +19,13 @@ var _IntegrationDefinitionClient = class extends ApiClient {
|
|
|
19
19
|
constructor(options) {
|
|
20
20
|
super(options);
|
|
21
21
|
}
|
|
22
|
+
/** Fetches all mesh apps for a team (and optionally also those shared across teams) */
|
|
22
23
|
async get(options) {
|
|
23
24
|
const { teamId } = this.options;
|
|
24
25
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url), { ...options, teamId });
|
|
25
26
|
return await this.apiClient(fetchUri);
|
|
26
27
|
}
|
|
28
|
+
/** Creates or updates a mesh app definition on a team */
|
|
27
29
|
async upsert(body) {
|
|
28
30
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
29
31
|
return await this.apiClient(fetchUri, {
|
|
@@ -31,6 +33,7 @@ var _IntegrationDefinitionClient = class extends ApiClient {
|
|
|
31
33
|
body: JSON.stringify({ ...body, teamId: this.options.teamId })
|
|
32
34
|
});
|
|
33
35
|
}
|
|
36
|
+
/** Deletes a mesh app from a team */
|
|
34
37
|
async remove(body) {
|
|
35
38
|
const fetchUri = this.createUrl(__privateGet(_IntegrationDefinitionClient, _url));
|
|
36
39
|
await this.apiClient(fetchUri, {
|
|
@@ -51,11 +54,13 @@ var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
|
51
54
|
constructor(options) {
|
|
52
55
|
super(options);
|
|
53
56
|
}
|
|
57
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
54
58
|
async get(options) {
|
|
55
59
|
const { projectId } = this.options;
|
|
56
60
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
57
61
|
return await this.apiClient(fetchUri);
|
|
58
62
|
}
|
|
63
|
+
/** Fetches all IntegrationInstallations for a project */
|
|
59
64
|
async getOne(options) {
|
|
60
65
|
const { projectId } = this.options;
|
|
61
66
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2), { ...options, projectId });
|
|
@@ -65,6 +70,7 @@ var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
|
65
70
|
}
|
|
66
71
|
return response.results[0];
|
|
67
72
|
}
|
|
73
|
+
/** Updates or creates (based on id) a IntegrationInstallation */
|
|
68
74
|
async upsert(body) {
|
|
69
75
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
70
76
|
await this.apiClient(fetchUri, {
|
|
@@ -73,6 +79,7 @@ var _IntegrationInstallationClient = class extends ApiClient2 {
|
|
|
73
79
|
expectNoContent: true
|
|
74
80
|
});
|
|
75
81
|
}
|
|
82
|
+
/** Deletes a IntegrationInstallation */
|
|
76
83
|
async remove(body) {
|
|
77
84
|
const fetchUri = this.createUrl(__privateGet(_IntegrationInstallationClient, _url2));
|
|
78
85
|
await this.apiClient(fetchUri, {
|
|
@@ -215,9 +222,15 @@ var SharedClient = class {
|
|
|
215
222
|
this.logger.log(reason);
|
|
216
223
|
});
|
|
217
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Sends an event to the opposite client
|
|
227
|
+
*/
|
|
218
228
|
async send(eventType, data) {
|
|
219
229
|
return this.postMessage("event" /* EVENT */, eventType, data);
|
|
220
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Subscribes an event handler for the given eventType. Returns an unsubscribe hook
|
|
233
|
+
*/
|
|
221
234
|
on(eventType, handler) {
|
|
222
235
|
if (!this.eventSubscriptions[eventType]) {
|
|
223
236
|
this.eventSubscriptions[eventType] = {};
|
|
@@ -230,6 +243,10 @@ var SharedClient = class {
|
|
|
230
243
|
this.logger.log(`Unsubscribed handler for event ${eventType}`);
|
|
231
244
|
};
|
|
232
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Sends a request to the opposite client. There must be an accompanying request handler
|
|
248
|
+
* subscribed with `onRequest`. Resolves with the returned data or times out.
|
|
249
|
+
*/
|
|
233
250
|
async request(requestKey, data, options = {}) {
|
|
234
251
|
const sentMessage = await this.postMessage("request" /* REQUEST */, requestKey, data);
|
|
235
252
|
const requestId = sentMessage.id;
|
|
@@ -264,6 +281,12 @@ var SharedClient = class {
|
|
|
264
281
|
}, options.timeout || this.requestTimeout);
|
|
265
282
|
});
|
|
266
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Subscribes a request handler for the given request key. The return value
|
|
286
|
+
* from the subscribed handler is sent back to the opposite client. The handler may be async.
|
|
287
|
+
* Unlike event handlers, there may be only one request handler per request key. Returns
|
|
288
|
+
* an unsubscribe hook.
|
|
289
|
+
*/
|
|
267
290
|
onRequest(requestKey, requestHandler) {
|
|
268
291
|
const requestEventHandler = async (requestData, requestMessage) => {
|
|
269
292
|
try {
|
|
@@ -278,6 +301,10 @@ var SharedClient = class {
|
|
|
278
301
|
this.requestSubscriptions = omit(this.requestSubscriptions, requestKey);
|
|
279
302
|
};
|
|
280
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* A wrapper around the channel deferred object that also checks
|
|
306
|
+
* if the client has been destroyed before returning
|
|
307
|
+
*/
|
|
281
308
|
async getChannel() {
|
|
282
309
|
await this.channel.promise;
|
|
283
310
|
if (this.destroyed) {
|
|
@@ -592,6 +619,7 @@ async function initializeUniformMeshSDK({
|
|
|
592
619
|
sdk.events.emit("onValueChanged", { newValue: value });
|
|
593
620
|
await parent.setValue(value, options);
|
|
594
621
|
},
|
|
622
|
+
// DEPRECATED
|
|
595
623
|
getMetadata: () => contextData.locationMetadata,
|
|
596
624
|
metadata: contextData.locationMetadata,
|
|
597
625
|
setValidationResult: async (value) => {
|
|
@@ -613,6 +641,10 @@ async function initializeUniformMeshSDK({
|
|
|
613
641
|
onHeightChange: (height) => {
|
|
614
642
|
parent.resize(height);
|
|
615
643
|
},
|
|
644
|
+
// If we're in a dialog context and the dialog was opened with a specified `contentHeight`,
|
|
645
|
+
// then we disable autoResizing for the dialog location.
|
|
646
|
+
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
647
|
+
// developers very sad and confused. No one wants a sad and confused developer.
|
|
616
648
|
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) ? true : autoResizingDisabled
|
|
617
649
|
}),
|
|
618
650
|
version: contextData.uniformApiVersion,
|
|
@@ -651,6 +683,7 @@ async function initializeUniformMeshSDK({
|
|
|
651
683
|
return;
|
|
652
684
|
}
|
|
653
685
|
return {
|
|
686
|
+
/** @deprecated don't use this */
|
|
654
687
|
dialogId: result.dialogId,
|
|
655
688
|
value: result.value,
|
|
656
689
|
closeDialog: async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.19.0",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
23
23
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
24
24
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
25
|
-
"update-openapi": "tsx ./scripts/update-openapi.cts"
|
|
25
|
+
"update-openapi": "tsx ./scripts/update-openapi.cts",
|
|
26
|
+
"document": "api-extractor run --local"
|
|
26
27
|
},
|
|
27
28
|
"files": [
|
|
28
29
|
"/dist"
|
|
@@ -31,9 +32,9 @@
|
|
|
31
32
|
"access": "public"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@uniformdev/canvas": "18.
|
|
35
|
-
"@uniformdev/context": "18.
|
|
35
|
+
"@uniformdev/canvas": "18.19.0",
|
|
36
|
+
"@uniformdev/context": "18.19.0",
|
|
36
37
|
"mitt": "^3.0.0"
|
|
37
38
|
},
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "bd4414826a6d38b928b5ba2ea68e58160b784562"
|
|
39
40
|
}
|