@apia/api 4.0.28 → 4.0.30
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.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from '@apia/theme/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { createContext, useState, useCallback, useEffect, useId, useRef, useMemo } from 'react';
|
|
4
4
|
import { Box, Label, spacing, getVariant, Input as Input$1, Select as Select$1 } from '@apia/theme';
|
|
5
|
-
import { debugDispatcher, parseXmlAsync,
|
|
5
|
+
import { debugDispatcher, parseXmlAsync, arrayOrArray, EventEmitter, useMount, encrypt, noNaN, getIndex, getLabel, StatefulEmitter, focus, focusSelector, useLatest, useIntermediateValue, formatMessage, getDateFormat, Mutex, uniqueId as uniqueId$1 } from '@apia/util';
|
|
6
6
|
import { notify, getNotificationMessageObj, dispatchNotifications } from '@apia/notifications';
|
|
7
7
|
import { classToValidate, Checkbox, FileInput, classToValidationFunction, Input, Radio, Select, Textarea, useFormContext, validationsStore, hasSucceedFormValidation, Form } from '@apia/validations';
|
|
8
8
|
import { Accordion, AccordionItem, useModal, LabelBox, SimpleButton, ApiaUtil, Modal, ProgressBar, DateInput } from '@apia/components';
|
|
@@ -174,6 +174,11 @@ function handleOnClose({
|
|
|
174
174
|
console.error(e);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
+
function parseMessages2(messages) {
|
|
178
|
+
for (const m of messages) {
|
|
179
|
+
notify({ message: m.text, title: m.title, trace: m.stack, type: m.type });
|
|
180
|
+
}
|
|
181
|
+
}
|
|
177
182
|
function parseMessages(response) {
|
|
178
183
|
if (!response)
|
|
179
184
|
return;
|
|
@@ -230,6 +235,7 @@ const parseSuccessfulResponse = async (response, currentUrl, outerBehaveConfig =
|
|
|
230
235
|
exceptions,
|
|
231
236
|
sysExceptions,
|
|
232
237
|
sysMessages,
|
|
238
|
+
messages,
|
|
233
239
|
load,
|
|
234
240
|
...rest
|
|
235
241
|
} = parsedObj;
|
|
@@ -237,6 +243,9 @@ const parseSuccessfulResponse = async (response, currentUrl, outerBehaveConfig =
|
|
|
237
243
|
session.invalidate();
|
|
238
244
|
return null;
|
|
239
245
|
}
|
|
246
|
+
if (messages) {
|
|
247
|
+
parseMessages2(arrayOrArray(messages?.message));
|
|
248
|
+
}
|
|
240
249
|
if (exceptions && behaveConfig.debug) {
|
|
241
250
|
console.log(
|
|
242
251
|
`%cparseSuccessfulResponse`,
|
|
@@ -3592,7 +3601,8 @@ class TableController {
|
|
|
3592
3601
|
onPageChange: this.emitter.emit.bind(this.emitter, "onPage"),
|
|
3593
3602
|
onRefresh: this.emitter.emit.bind(this.emitter, "onRefresh", null),
|
|
3594
3603
|
isLoading: this.state.isLoading,
|
|
3595
|
-
hideMaximizeButton: true
|
|
3604
|
+
hideMaximizeButton: true,
|
|
3605
|
+
listId: this.tableName
|
|
3596
3606
|
}
|
|
3597
3607
|
);
|
|
3598
3608
|
}));
|