fui-material 1.24.26 → 2.0.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 +68 -13
- package/dist/f-ui-kit.es.js +109 -93
- package/dist/f-ui-kit.es.js.map +1 -1
- package/dist/main.css +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,13 +1,68 @@
|
|
|
1
|
-
# FUI-KIT
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
# FUI-KIT
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
## 📚 О библиотеке
|
|
9
|
+
|
|
10
|
+
FUI-KIT - это современная библиотека компонентов React, специально разработанная для создания пользовательских интерфейсов сервисов и приложений gis.favr. Библиотека предоставляет набор готовых к использованию компонентов, оптимизированных для работы с TypeScript.
|
|
11
|
+
|
|
12
|
+
## 🚀 Основные возможности
|
|
13
|
+
|
|
14
|
+
- Полностью типизированные компоненты с TypeScript
|
|
15
|
+
- Современный дизайн, соответствующий требованиям gis.favr
|
|
16
|
+
- Поддержка React 18+
|
|
17
|
+
- Встроенная поддержка экспорта в DOCX и XLSX
|
|
18
|
+
- Адаптивный дизайн
|
|
19
|
+
- Подробная документация с примерами использования
|
|
20
|
+
|
|
21
|
+
## 📦 Установка
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install fui-material
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 🔧 Использование
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { FButton, FTextField } from 'fui-material';
|
|
31
|
+
|
|
32
|
+
function App() {
|
|
33
|
+
return (
|
|
34
|
+
<div>
|
|
35
|
+
<FButton>Нажми меня</FButton>
|
|
36
|
+
<FTextField placeholder="Введите текст" />
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 📖 Документация
|
|
43
|
+
|
|
44
|
+
Полную документацию и примеры использования всех компонентов можно найти в нашем Storybook:
|
|
45
|
+
|
|
46
|
+
[📚 Открыть Storybook](https://allorion.github.io/fui-storybook/)
|
|
47
|
+
|
|
48
|
+
## 🛠 Разработка
|
|
49
|
+
|
|
50
|
+
Для локальной разработки:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Установка зависимостей
|
|
54
|
+
npm install
|
|
55
|
+
|
|
56
|
+
# Запуск Storybook
|
|
57
|
+
npm run storybook
|
|
58
|
+
|
|
59
|
+
# Сборка библиотеки
|
|
60
|
+
npm run build
|
|
61
|
+
|
|
62
|
+
# Запуск линтера
|
|
63
|
+
npm run lint
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 📄 Лицензия
|
|
67
|
+
|
|
68
|
+
ISC © Allori
|
package/dist/f-ui-kit.es.js
CHANGED
|
@@ -778,9 +778,9 @@ function requireReactJsxRuntime_development() {
|
|
|
778
778
|
var iteratorFn = getIteratorFn(node);
|
|
779
779
|
if (typeof iteratorFn === "function") {
|
|
780
780
|
if (iteratorFn !== node.entries) {
|
|
781
|
-
var
|
|
781
|
+
var iterator = iteratorFn.call(node);
|
|
782
782
|
var step;
|
|
783
|
-
while (!(step =
|
|
783
|
+
while (!(step = iterator.next()).done) {
|
|
784
784
|
if (isValidElement2(step.value)) {
|
|
785
785
|
validateExplicitKey(step.value, parentType);
|
|
786
786
|
}
|
|
@@ -1277,7 +1277,7 @@ const FTextField = forwardRef(
|
|
|
1277
1277
|
{
|
|
1278
1278
|
id: inputId + "-label",
|
|
1279
1279
|
htmlFor: inputId,
|
|
1280
|
-
className:
|
|
1280
|
+
className: `f-form-element__label ${errText ? "error" : ""}`,
|
|
1281
1281
|
children: label
|
|
1282
1282
|
}
|
|
1283
1283
|
),
|
|
@@ -1904,19 +1904,19 @@ const FTableFooter = ({
|
|
|
1904
1904
|
}
|
|
1905
1905
|
);
|
|
1906
1906
|
};
|
|
1907
|
-
const active$4 = "
|
|
1908
|
-
const hide = "
|
|
1907
|
+
const active$4 = "_active_16jkc_16";
|
|
1908
|
+
const hide = "_hide_16jkc_37";
|
|
1909
1909
|
const styles$o = {
|
|
1910
|
-
"f-dialog": "_f-
|
|
1911
|
-
"active-dialog": "_active-
|
|
1912
|
-
"f-dialog__content": "_f-
|
|
1910
|
+
"f-dialog": "_f-dialog_16jkc_1",
|
|
1911
|
+
"active-dialog": "_active-dialog_16jkc_16",
|
|
1912
|
+
"f-dialog__content": "_f-dialog__content_16jkc_20",
|
|
1913
1913
|
active: active$4,
|
|
1914
1914
|
hide,
|
|
1915
|
-
"f-dialog__header": "_f-
|
|
1916
|
-
"f-dialog__header_title": "_f-
|
|
1917
|
-
"f-dialog__header_close": "_f-
|
|
1918
|
-
"f-dialog__body": "_f-
|
|
1919
|
-
"f-dialog__footer": "_f-
|
|
1915
|
+
"f-dialog__header": "_f-dialog__header_16jkc_41",
|
|
1916
|
+
"f-dialog__header_title": "_f-dialog__header_title_16jkc_53",
|
|
1917
|
+
"f-dialog__header_close": "_f-dialog__header_close_16jkc_64",
|
|
1918
|
+
"f-dialog__body": "_f-dialog__body_16jkc_79",
|
|
1919
|
+
"f-dialog__footer": "_f-dialog__footer_16jkc_84"
|
|
1920
1920
|
};
|
|
1921
1921
|
const FDialog = ({
|
|
1922
1922
|
openAndClose,
|
|
@@ -2058,9 +2058,8 @@ const FProgress = ({ st: st2, color = "primary", id, className }) => {
|
|
|
2058
2058
|
);
|
|
2059
2059
|
};
|
|
2060
2060
|
const styles$m = {
|
|
2061
|
-
"f-preloader": "_f-
|
|
2062
|
-
"active-preloader": "_active-
|
|
2063
|
-
"f-preloader-row": "_f-preloader-row_64c6c_13"
|
|
2061
|
+
"f-preloader": "_f-preloader_17f9x_1",
|
|
2062
|
+
"active-preloader": "_active-preloader_17f9x_10"
|
|
2064
2063
|
};
|
|
2065
2064
|
const FPreloader = ({
|
|
2066
2065
|
st: st2,
|
|
@@ -2087,7 +2086,7 @@ const FPreloader = ({
|
|
|
2087
2086
|
{
|
|
2088
2087
|
className: `${styles$m["f-preloader"]} ${open ? styles$m["active-preloader"] : ""}`,
|
|
2089
2088
|
style: mergedStyle,
|
|
2090
|
-
children
|
|
2089
|
+
children
|
|
2091
2090
|
}
|
|
2092
2091
|
);
|
|
2093
2092
|
};
|
|
@@ -2802,7 +2801,7 @@ const FSelect = forwardRef(
|
|
|
2802
2801
|
{
|
|
2803
2802
|
id: inputId + "-label",
|
|
2804
2803
|
htmlFor: inputId,
|
|
2805
|
-
className:
|
|
2804
|
+
className: `f-form-element__label ${errText ? "error" : ""}`,
|
|
2806
2805
|
children: label
|
|
2807
2806
|
}
|
|
2808
2807
|
),
|
|
@@ -2890,6 +2889,7 @@ const FFullDateField = forwardRef(
|
|
|
2890
2889
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2891
2890
|
FTextField,
|
|
2892
2891
|
{
|
|
2892
|
+
label,
|
|
2893
2893
|
st: st2,
|
|
2894
2894
|
width,
|
|
2895
2895
|
height,
|
|
@@ -3139,7 +3139,7 @@ const FTextArea = forwardRef(
|
|
|
3139
3139
|
{
|
|
3140
3140
|
id: areaId + "-label",
|
|
3141
3141
|
htmlFor: areaId,
|
|
3142
|
-
className:
|
|
3142
|
+
className: `f-form-element__label ${errText ? "error" : ""}`,
|
|
3143
3143
|
children: label
|
|
3144
3144
|
}
|
|
3145
3145
|
),
|
|
@@ -38697,14 +38697,14 @@ function requireReactDomServerLegacy_browser_development() {
|
|
|
38697
38697
|
{
|
|
38698
38698
|
validateIterable(node, iteratorFn);
|
|
38699
38699
|
}
|
|
38700
|
-
var
|
|
38701
|
-
if (
|
|
38702
|
-
var step =
|
|
38700
|
+
var iterator = iteratorFn.call(node);
|
|
38701
|
+
if (iterator) {
|
|
38702
|
+
var step = iterator.next();
|
|
38703
38703
|
if (!step.done) {
|
|
38704
38704
|
var children = [];
|
|
38705
38705
|
do {
|
|
38706
38706
|
children.push(step.value);
|
|
38707
|
-
step =
|
|
38707
|
+
step = iterator.next();
|
|
38708
38708
|
} while (!step.done);
|
|
38709
38709
|
renderChildrenArray(request, task, children);
|
|
38710
38710
|
return;
|
|
@@ -44080,14 +44080,14 @@ function requireReactDomServer_browser_development() {
|
|
|
44080
44080
|
{
|
|
44081
44081
|
validateIterable(node, iteratorFn);
|
|
44082
44082
|
}
|
|
44083
|
-
var
|
|
44084
|
-
if (
|
|
44085
|
-
var step =
|
|
44083
|
+
var iterator = iteratorFn.call(node);
|
|
44084
|
+
if (iterator) {
|
|
44085
|
+
var step = iterator.next();
|
|
44086
44086
|
if (!step.done) {
|
|
44087
44087
|
var children = [];
|
|
44088
44088
|
do {
|
|
44089
44089
|
children.push(step.value);
|
|
44090
|
-
step =
|
|
44090
|
+
step = iterator.next();
|
|
44091
44091
|
} while (!step.done);
|
|
44092
44092
|
renderChildrenArray(request, task, children);
|
|
44093
44093
|
return;
|
|
@@ -49533,7 +49533,6 @@ function bind(fn, thisArg) {
|
|
|
49533
49533
|
}
|
|
49534
49534
|
const { toString } = Object.prototype;
|
|
49535
49535
|
const { getPrototypeOf } = Object;
|
|
49536
|
-
const { iterator, toStringTag } = Symbol;
|
|
49537
49536
|
const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
49538
49537
|
const str = toString.call(thing);
|
|
49539
49538
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -49568,7 +49567,7 @@ const isPlainObject = (val) => {
|
|
|
49568
49567
|
return false;
|
|
49569
49568
|
}
|
|
49570
49569
|
const prototype2 = getPrototypeOf(val);
|
|
49571
|
-
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
|
|
49570
|
+
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
49572
49571
|
};
|
|
49573
49572
|
const isDate = kindOfTest("Date");
|
|
49574
49573
|
const isFile = kindOfTest("File");
|
|
@@ -49715,10 +49714,10 @@ const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
|
|
|
49715
49714
|
};
|
|
49716
49715
|
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
49717
49716
|
const forEachEntry = (obj, fn) => {
|
|
49718
|
-
const generator = obj && obj[iterator];
|
|
49719
|
-
const
|
|
49717
|
+
const generator = obj && obj[Symbol.iterator];
|
|
49718
|
+
const iterator = generator.call(obj);
|
|
49720
49719
|
let result2;
|
|
49721
|
-
while ((result2 =
|
|
49720
|
+
while ((result2 = iterator.next()) && !result2.done) {
|
|
49722
49721
|
const pair = result2.value;
|
|
49723
49722
|
fn.call(obj, pair[0], pair[1]);
|
|
49724
49723
|
}
|
|
@@ -49787,8 +49786,23 @@ const noop = () => {
|
|
|
49787
49786
|
const toFiniteNumber = (value, defaultValue) => {
|
|
49788
49787
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
49789
49788
|
};
|
|
49789
|
+
const ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
49790
|
+
const DIGIT = "0123456789";
|
|
49791
|
+
const ALPHABET = {
|
|
49792
|
+
DIGIT,
|
|
49793
|
+
ALPHA,
|
|
49794
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
49795
|
+
};
|
|
49796
|
+
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
49797
|
+
let str = "";
|
|
49798
|
+
const { length } = alphabet;
|
|
49799
|
+
while (size--) {
|
|
49800
|
+
str += alphabet[Math.random() * length | 0];
|
|
49801
|
+
}
|
|
49802
|
+
return str;
|
|
49803
|
+
};
|
|
49790
49804
|
function isSpecCompliantForm(thing) {
|
|
49791
|
-
return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
49805
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
49792
49806
|
}
|
|
49793
49807
|
const toJSONObject = (obj) => {
|
|
49794
49808
|
const stack = new Array(10);
|
|
@@ -49834,7 +49848,6 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
49834
49848
|
isFunction(_global.postMessage)
|
|
49835
49849
|
);
|
|
49836
49850
|
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
49837
|
-
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
49838
49851
|
const utils$1 = {
|
|
49839
49852
|
isArray,
|
|
49840
49853
|
isArrayBuffer,
|
|
@@ -49886,13 +49899,14 @@ const utils$1 = {
|
|
|
49886
49899
|
findKey,
|
|
49887
49900
|
global: _global,
|
|
49888
49901
|
isContextDefined,
|
|
49902
|
+
ALPHABET,
|
|
49903
|
+
generateString,
|
|
49889
49904
|
isSpecCompliantForm,
|
|
49890
49905
|
toJSONObject,
|
|
49891
49906
|
isAsyncFn,
|
|
49892
49907
|
isThenable,
|
|
49893
49908
|
setImmediate: _setImmediate,
|
|
49894
|
-
asap
|
|
49895
|
-
isIterable
|
|
49909
|
+
asap
|
|
49896
49910
|
};
|
|
49897
49911
|
function AxiosError(message, code, config, request, response) {
|
|
49898
49912
|
Error.call(this);
|
|
@@ -50114,11 +50128,6 @@ function buildURL(url, params, options) {
|
|
|
50114
50128
|
return url;
|
|
50115
50129
|
}
|
|
50116
50130
|
const _encode = options && options.encode || encode;
|
|
50117
|
-
if (utils$1.isFunction(options)) {
|
|
50118
|
-
options = {
|
|
50119
|
-
serialize: options
|
|
50120
|
-
};
|
|
50121
|
-
}
|
|
50122
50131
|
const serializeFn = options && options.serialize;
|
|
50123
50132
|
let serializedParams;
|
|
50124
50133
|
if (serializeFn) {
|
|
@@ -50515,15 +50524,10 @@ class AxiosHeaders {
|
|
|
50515
50524
|
setHeaders(header, valueOrRewrite);
|
|
50516
50525
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
50517
50526
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
50518
|
-
} else if (utils$1.
|
|
50519
|
-
|
|
50520
|
-
|
|
50521
|
-
if (!utils$1.isArray(entry)) {
|
|
50522
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
50523
|
-
}
|
|
50524
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
50527
|
+
} else if (utils$1.isHeaders(header)) {
|
|
50528
|
+
for (const [key, value] of header.entries()) {
|
|
50529
|
+
setHeader(value, key, rewrite);
|
|
50525
50530
|
}
|
|
50526
|
-
setHeaders(obj, valueOrRewrite);
|
|
50527
50531
|
} else {
|
|
50528
50532
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
50529
50533
|
}
|
|
@@ -50627,9 +50631,6 @@ class AxiosHeaders {
|
|
|
50627
50631
|
toString() {
|
|
50628
50632
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
50629
50633
|
}
|
|
50630
|
-
getSetCookie() {
|
|
50631
|
-
return this.get("set-cookie") || [];
|
|
50632
|
-
}
|
|
50633
50634
|
get [Symbol.toStringTag]() {
|
|
50634
50635
|
return "AxiosHeaders";
|
|
50635
50636
|
}
|
|
@@ -50806,13 +50807,45 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
50806
50807
|
}), throttled[1]];
|
|
50807
50808
|
};
|
|
50808
50809
|
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
50809
|
-
const isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
50810
|
-
|
|
50811
|
-
|
|
50812
|
-
|
|
50813
|
-
|
|
50814
|
-
|
|
50815
|
-
|
|
50810
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
|
|
50811
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
50812
|
+
// whether the request URL is of the same origin as current location.
|
|
50813
|
+
function standardBrowserEnv() {
|
|
50814
|
+
const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
|
|
50815
|
+
const urlParsingNode = document.createElement("a");
|
|
50816
|
+
let originURL;
|
|
50817
|
+
function resolveURL(url) {
|
|
50818
|
+
let href = url;
|
|
50819
|
+
if (msie) {
|
|
50820
|
+
urlParsingNode.setAttribute("href", href);
|
|
50821
|
+
href = urlParsingNode.href;
|
|
50822
|
+
}
|
|
50823
|
+
urlParsingNode.setAttribute("href", href);
|
|
50824
|
+
return {
|
|
50825
|
+
href: urlParsingNode.href,
|
|
50826
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
50827
|
+
host: urlParsingNode.host,
|
|
50828
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
50829
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
50830
|
+
hostname: urlParsingNode.hostname,
|
|
50831
|
+
port: urlParsingNode.port,
|
|
50832
|
+
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
50833
|
+
};
|
|
50834
|
+
}
|
|
50835
|
+
originURL = resolveURL(window.location.href);
|
|
50836
|
+
return function isURLSameOrigin2(requestURL) {
|
|
50837
|
+
const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
50838
|
+
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
50839
|
+
};
|
|
50840
|
+
}()
|
|
50841
|
+
) : (
|
|
50842
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
50843
|
+
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
50844
|
+
return function isURLSameOrigin2() {
|
|
50845
|
+
return true;
|
|
50846
|
+
};
|
|
50847
|
+
}()
|
|
50848
|
+
);
|
|
50816
50849
|
const cookies = platform.hasStandardBrowserEnv ? (
|
|
50817
50850
|
// Standard browser envs support document.cookie
|
|
50818
50851
|
{
|
|
@@ -50850,9 +50883,8 @@ function isAbsoluteURL(url) {
|
|
|
50850
50883
|
function combineURLs(baseURL, relativeURL) {
|
|
50851
50884
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
50852
50885
|
}
|
|
50853
|
-
function buildFullPath(baseURL, requestedURL
|
|
50854
|
-
|
|
50855
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
50886
|
+
function buildFullPath(baseURL, requestedURL) {
|
|
50887
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
50856
50888
|
return combineURLs(baseURL, requestedURL);
|
|
50857
50889
|
}
|
|
50858
50890
|
return requestedURL;
|
|
@@ -50861,7 +50893,7 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing }
|
|
|
50861
50893
|
function mergeConfig(config1, config2) {
|
|
50862
50894
|
config2 = config2 || {};
|
|
50863
50895
|
const config = {};
|
|
50864
|
-
function getMergedValue(target, source,
|
|
50896
|
+
function getMergedValue(target, source, caseless) {
|
|
50865
50897
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
50866
50898
|
return utils$1.merge.call({ caseless }, target, source);
|
|
50867
50899
|
} else if (utils$1.isPlainObject(source)) {
|
|
@@ -50871,11 +50903,11 @@ function mergeConfig(config1, config2) {
|
|
|
50871
50903
|
}
|
|
50872
50904
|
return source;
|
|
50873
50905
|
}
|
|
50874
|
-
function mergeDeepProperties(a, b,
|
|
50906
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
50875
50907
|
if (!utils$1.isUndefined(b)) {
|
|
50876
|
-
return getMergedValue(a, b,
|
|
50908
|
+
return getMergedValue(a, b, caseless);
|
|
50877
50909
|
} else if (!utils$1.isUndefined(a)) {
|
|
50878
|
-
return getMergedValue(void 0, a,
|
|
50910
|
+
return getMergedValue(void 0, a, caseless);
|
|
50879
50911
|
}
|
|
50880
50912
|
}
|
|
50881
50913
|
function valueFromConfig2(a, b) {
|
|
@@ -50926,7 +50958,7 @@ function mergeConfig(config1, config2) {
|
|
|
50926
50958
|
socketPath: defaultToConfig2,
|
|
50927
50959
|
responseEncoding: defaultToConfig2,
|
|
50928
50960
|
validateStatus: mergeDirectKeys,
|
|
50929
|
-
headers: (a, b
|
|
50961
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
50930
50962
|
};
|
|
50931
50963
|
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
50932
50964
|
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
@@ -50939,7 +50971,7 @@ const resolveConfig = (config) => {
|
|
|
50939
50971
|
const newConfig = mergeConfig({}, config);
|
|
50940
50972
|
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
50941
50973
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
50942
|
-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url
|
|
50974
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
|
50943
50975
|
if (auth) {
|
|
50944
50976
|
headers.set(
|
|
50945
50977
|
"Authorization",
|
|
@@ -51162,7 +51194,7 @@ const readStream = async function* (stream) {
|
|
|
51162
51194
|
}
|
|
51163
51195
|
};
|
|
51164
51196
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
51165
|
-
const
|
|
51197
|
+
const iterator = readBytes(stream, chunkSize);
|
|
51166
51198
|
let bytes = 0;
|
|
51167
51199
|
let done;
|
|
51168
51200
|
let _onFinish = (e) => {
|
|
@@ -51174,7 +51206,7 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
51174
51206
|
return new ReadableStream({
|
|
51175
51207
|
async pull(controller) {
|
|
51176
51208
|
try {
|
|
51177
|
-
const { done: done2, value } = await
|
|
51209
|
+
const { done: done2, value } = await iterator.next();
|
|
51178
51210
|
if (done2) {
|
|
51179
51211
|
_onFinish();
|
|
51180
51212
|
controller.close();
|
|
@@ -51193,7 +51225,7 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
51193
51225
|
},
|
|
51194
51226
|
cancel(reason) {
|
|
51195
51227
|
_onFinish(reason);
|
|
51196
|
-
return
|
|
51228
|
+
return iterator.return();
|
|
51197
51229
|
}
|
|
51198
51230
|
}, {
|
|
51199
51231
|
highWaterMark: 2
|
|
@@ -51350,7 +51382,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
51350
51382
|
});
|
|
51351
51383
|
} catch (err) {
|
|
51352
51384
|
unsubscribe && unsubscribe();
|
|
51353
|
-
if (err && err.name === "TypeError" && /
|
|
51385
|
+
if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
|
|
51354
51386
|
throw Object.assign(
|
|
51355
51387
|
new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request),
|
|
51356
51388
|
{
|
|
@@ -51456,7 +51488,7 @@ function dispatchRequest(config) {
|
|
|
51456
51488
|
return Promise.reject(reason);
|
|
51457
51489
|
});
|
|
51458
51490
|
}
|
|
51459
|
-
const VERSION = "1.
|
|
51491
|
+
const VERSION = "1.7.7";
|
|
51460
51492
|
const validators$1 = {};
|
|
51461
51493
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
51462
51494
|
validators$1[type] = function validator2(thing) {
|
|
@@ -51487,12 +51519,6 @@ validators$1.transitional = function transitional(validator2, version, message)
|
|
|
51487
51519
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
51488
51520
|
};
|
|
51489
51521
|
};
|
|
51490
|
-
validators$1.spelling = function spelling(correctSpelling) {
|
|
51491
|
-
return (value, opt) => {
|
|
51492
|
-
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
51493
|
-
return true;
|
|
51494
|
-
};
|
|
51495
|
-
};
|
|
51496
51522
|
function assertOptions(options, schema, allowUnknown) {
|
|
51497
51523
|
if (typeof options !== "object") {
|
|
51498
51524
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
@@ -51522,7 +51548,7 @@ const validator = {
|
|
|
51522
51548
|
const validators = validator.validators;
|
|
51523
51549
|
class Axios {
|
|
51524
51550
|
constructor(instanceConfig) {
|
|
51525
|
-
this.defaults = instanceConfig
|
|
51551
|
+
this.defaults = instanceConfig;
|
|
51526
51552
|
this.interceptors = {
|
|
51527
51553
|
request: new InterceptorManager(),
|
|
51528
51554
|
response: new InterceptorManager()
|
|
@@ -51541,8 +51567,8 @@ class Axios {
|
|
|
51541
51567
|
return await this._request(configOrUrl, config);
|
|
51542
51568
|
} catch (err) {
|
|
51543
51569
|
if (err instanceof Error) {
|
|
51544
|
-
let dummy
|
|
51545
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
51570
|
+
let dummy;
|
|
51571
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
|
|
51546
51572
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
51547
51573
|
try {
|
|
51548
51574
|
if (!err.stack) {
|
|
@@ -51584,16 +51610,6 @@ class Axios {
|
|
|
51584
51610
|
}, true);
|
|
51585
51611
|
}
|
|
51586
51612
|
}
|
|
51587
|
-
if (config.allowAbsoluteUrls !== void 0) ;
|
|
51588
|
-
else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
51589
|
-
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
51590
|
-
} else {
|
|
51591
|
-
config.allowAbsoluteUrls = true;
|
|
51592
|
-
}
|
|
51593
|
-
validator.assertOptions(config, {
|
|
51594
|
-
baseUrl: validators.spelling("baseURL"),
|
|
51595
|
-
withXsrfToken: validators.spelling("withXSRFToken")
|
|
51596
|
-
}, true);
|
|
51597
51613
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
51598
51614
|
let contextHeaders = headers && utils$1.merge(
|
|
51599
51615
|
headers.common,
|
|
@@ -51660,7 +51676,7 @@ class Axios {
|
|
|
51660
51676
|
}
|
|
51661
51677
|
getUri(config) {
|
|
51662
51678
|
config = mergeConfig(this.defaults, config);
|
|
51663
|
-
const fullPath = buildFullPath(config.baseURL, config.url
|
|
51679
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
51664
51680
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
51665
51681
|
}
|
|
51666
51682
|
}
|