@txstate-mws/sveltekit-utils 1.2.6 → 1.2.7
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/api.d.ts +1 -0
- package/dist/api.js +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -147,6 +147,7 @@ export declare class APIBase {
|
|
|
147
147
|
* and user. However, SubmitResponse always expects a `data` property. You can pass `user` as the dataName
|
|
148
148
|
* and it will be returned as the `data` property.
|
|
149
149
|
*/
|
|
150
|
+
mutationForDialog(resp: MutationResponseFromAPI): SubmitResponse<undefined>;
|
|
150
151
|
mutationForDialog(resp: MutationResponseFromAPI, { prefix }: {
|
|
151
152
|
prefix?: string;
|
|
152
153
|
}): SubmitResponse<undefined>;
|
package/dist/api.js
CHANGED
|
@@ -302,7 +302,7 @@ export class APIBase {
|
|
|
302
302
|
return { ...omit(m, 'arg'), path: isNull(m.arg) ? null : isNotBlank(prefix) ? m.arg.replace(RegExp('^' + prefix + '\\.'), '') : m.arg };
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
mutationForDialog(resp, { prefix, dataName }) {
|
|
305
|
+
mutationForDialog(resp, { prefix, dataName } = {}) {
|
|
306
306
|
return { success: resp.success, messages: this.messageForDialog(resp.messages, prefix), data: (dataName ? resp[dataName] : undefined) };
|
|
307
307
|
}
|
|
308
308
|
}
|