tp-react-elements-dev 1.14.14 → 1.15.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.
Files changed (71) hide show
  1. package/dist/_virtual/index.esm11.js +2 -2
  2. package/dist/_virtual/index.esm12.js +2 -2
  3. package/dist/_virtual/index.esm13.js +2 -2
  4. package/dist/_virtual/index.esm4.js +2 -2
  5. package/dist/_virtual/index.esm5.js +2 -2
  6. package/dist/_virtual/index.esm6.js +2 -2
  7. package/dist/_virtual/index.esm7.js +2 -2
  8. package/dist/components/Form/FormConstants.esm.js +6 -0
  9. package/dist/components/Form/FormRender.esm.js +3 -0
  10. package/dist/components/FormComponents/Select/SingleSelectSearchApi.d.ts +6 -2
  11. package/dist/components/FormComponents/Select/SingleSelectSearchApi.esm.js +82 -199
  12. package/dist/components/FormComponents/index.esm.js +2 -2
  13. package/dist/node_modules/axios/index.esm.js +25 -0
  14. package/dist/node_modules/axios/lib/adapters/adapters.esm.js +128 -0
  15. package/dist/node_modules/axios/lib/adapters/fetch.esm.js +288 -0
  16. package/dist/node_modules/axios/lib/adapters/xhr.esm.js +202 -0
  17. package/dist/node_modules/axios/lib/axios.esm.js +86 -0
  18. package/dist/node_modules/axios/lib/cancel/CancelToken.esm.js +133 -0
  19. package/dist/node_modules/axios/lib/cancel/CanceledError.esm.js +23 -0
  20. package/dist/node_modules/axios/lib/cancel/isCancel.esm.js +5 -0
  21. package/dist/node_modules/axios/lib/core/Axios.esm.js +236 -0
  22. package/dist/node_modules/axios/lib/core/AxiosError.esm.js +108 -0
  23. package/dist/node_modules/axios/lib/core/AxiosHeaders.esm.js +312 -0
  24. package/dist/node_modules/axios/lib/core/InterceptorManager.esm.js +69 -0
  25. package/dist/node_modules/axios/lib/core/buildFullPath.esm.js +22 -0
  26. package/dist/node_modules/axios/lib/core/dispatchRequest.esm.js +81 -0
  27. package/dist/node_modules/axios/lib/core/mergeConfig.esm.js +106 -0
  28. package/dist/node_modules/axios/lib/core/settle.esm.js +27 -0
  29. package/dist/node_modules/axios/lib/core/transformData.esm.js +28 -0
  30. package/dist/node_modules/axios/lib/defaults/index.esm.js +159 -0
  31. package/dist/node_modules/axios/lib/defaults/transitional.esm.js +7 -0
  32. package/dist/node_modules/axios/lib/env/data.esm.js +3 -0
  33. package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.esm.js +56 -0
  34. package/dist/node_modules/axios/lib/helpers/HttpStatusCode.esm.js +77 -0
  35. package/dist/node_modules/axios/lib/helpers/bind.esm.js +14 -0
  36. package/dist/node_modules/axios/lib/helpers/buildURL.esm.js +67 -0
  37. package/dist/node_modules/axios/lib/helpers/combineURLs.esm.js +15 -0
  38. package/dist/node_modules/axios/lib/helpers/composeSignals.esm.js +48 -0
  39. package/dist/node_modules/axios/lib/helpers/cookies.esm.js +54 -0
  40. package/dist/node_modules/axios/lib/helpers/formDataToJSON.esm.js +93 -0
  41. package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.esm.js +15 -0
  42. package/dist/node_modules/axios/lib/helpers/isAxiosError.esm.js +14 -0
  43. package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.esm.js +16 -0
  44. package/dist/node_modules/axios/lib/helpers/null.esm.js +4 -0
  45. package/dist/node_modules/axios/lib/helpers/parseHeaders.esm.js +55 -0
  46. package/dist/node_modules/axios/lib/helpers/parseProtocol.esm.js +6 -0
  47. package/dist/node_modules/axios/lib/helpers/progressEventReducer.esm.js +46 -0
  48. package/dist/node_modules/axios/lib/helpers/resolveConfig.esm.js +62 -0
  49. package/dist/node_modules/axios/lib/helpers/speedometer.esm.js +53 -0
  50. package/dist/node_modules/axios/lib/helpers/spread.esm.js +28 -0
  51. package/dist/node_modules/axios/lib/helpers/throttle.esm.js +44 -0
  52. package/dist/node_modules/axios/lib/helpers/toFormData.esm.js +219 -0
  53. package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.esm.js +19 -0
  54. package/dist/node_modules/axios/lib/helpers/trackStream.esm.js +88 -0
  55. package/dist/node_modules/axios/lib/helpers/validator.esm.js +99 -0
  56. package/dist/node_modules/axios/lib/platform/browser/classes/Blob.esm.js +3 -0
  57. package/dist/node_modules/axios/lib/platform/browser/classes/FormData.esm.js +3 -0
  58. package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.esm.js +5 -0
  59. package/dist/node_modules/axios/lib/platform/browser/index.esm.js +15 -0
  60. package/dist/node_modules/axios/lib/platform/common/utils.esm.js +45 -0
  61. package/dist/node_modules/axios/lib/platform/index.esm.js +9 -0
  62. package/dist/node_modules/axios/lib/utils.esm.js +782 -0
  63. package/dist/node_modules/react-date-range/dist/components/Calendar/index.esm.js +1 -1
  64. package/dist/node_modules/react-date-range/dist/components/DateInput/index.esm.js +1 -1
  65. package/dist/node_modules/react-date-range/dist/components/DateRange/index.esm.js +1 -1
  66. package/dist/node_modules/react-date-range/dist/components/DateRangePicker/index.esm.js +1 -1
  67. package/dist/node_modules/react-date-range/dist/components/DayCell/index.esm.js +1 -1
  68. package/dist/node_modules/react-date-range/dist/components/DefinedRange/index.esm.js +1 -1
  69. package/dist/node_modules/react-date-range/dist/components/InputRangeField/index.esm.js +1 -1
  70. package/dist/utils/Interface/FormInterface.d.ts +7 -1
  71. package/package.json +2 -1
@@ -0,0 +1,219 @@
1
+ import utils from '../utils.esm.js';
2
+ import AxiosError from '../core/AxiosError.esm.js';
3
+
4
+ /**
5
+ * Determines if the given thing is a array or js object.
6
+ *
7
+ * @param {string} thing - The object or array to be visited.
8
+ *
9
+ * @returns {boolean}
10
+ */
11
+ function isVisitable(thing) {
12
+ return utils.isPlainObject(thing) || utils.isArray(thing);
13
+ }
14
+
15
+ /**
16
+ * It removes the brackets from the end of a string
17
+ *
18
+ * @param {string} key - The key of the parameter.
19
+ *
20
+ * @returns {string} the key without the brackets.
21
+ */
22
+ function removeBrackets(key) {
23
+ return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
24
+ }
25
+
26
+ /**
27
+ * It takes a path, a key, and a boolean, and returns a string
28
+ *
29
+ * @param {string} path - The path to the current key.
30
+ * @param {string} key - The key of the current object being iterated over.
31
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
32
+ *
33
+ * @returns {string} The path to the current key.
34
+ */
35
+ function renderKey(path, key, dots) {
36
+ if (!path) return key;
37
+ return path.concat(key).map(function each(token, i) {
38
+ // eslint-disable-next-line no-param-reassign
39
+ token = removeBrackets(token);
40
+ return !dots && i ? '[' + token + ']' : token;
41
+ }).join(dots ? '.' : '');
42
+ }
43
+
44
+ /**
45
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
46
+ *
47
+ * @param {Array<any>} arr - The array to check
48
+ *
49
+ * @returns {boolean}
50
+ */
51
+ function isFlatArray(arr) {
52
+ return utils.isArray(arr) && !arr.some(isVisitable);
53
+ }
54
+
55
+ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
56
+ return /^is[A-Z]/.test(prop);
57
+ });
58
+
59
+ /**
60
+ * Convert a data object to FormData
61
+ *
62
+ * @param {Object} obj
63
+ * @param {?Object} [formData]
64
+ * @param {?Object} [options]
65
+ * @param {Function} [options.visitor]
66
+ * @param {Boolean} [options.metaTokens = true]
67
+ * @param {Boolean} [options.dots = false]
68
+ * @param {?Boolean} [options.indexes = false]
69
+ *
70
+ * @returns {Object}
71
+ **/
72
+
73
+ /**
74
+ * It converts an object into a FormData object
75
+ *
76
+ * @param {Object<any, any>} obj - The object to convert to form data.
77
+ * @param {string} formData - The FormData object to append to.
78
+ * @param {Object<string, any>} options
79
+ *
80
+ * @returns
81
+ */
82
+ function toFormData(obj, formData, options) {
83
+ if (!utils.isObject(obj)) {
84
+ throw new TypeError('target must be an object');
85
+ }
86
+
87
+ // eslint-disable-next-line no-param-reassign
88
+ formData = formData || new (FormData)();
89
+
90
+ // eslint-disable-next-line no-param-reassign
91
+ options = utils.toFlatObject(options, {
92
+ metaTokens: true,
93
+ dots: false,
94
+ indexes: false
95
+ }, false, function defined(option, source) {
96
+ // eslint-disable-next-line no-eq-null,eqeqeq
97
+ return !utils.isUndefined(source[option]);
98
+ });
99
+
100
+ const metaTokens = options.metaTokens;
101
+ // eslint-disable-next-line no-use-before-define
102
+ const visitor = options.visitor || defaultVisitor;
103
+ const dots = options.dots;
104
+ const indexes = options.indexes;
105
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
106
+ const useBlob = _Blob && utils.isSpecCompliantForm(formData);
107
+
108
+ if (!utils.isFunction(visitor)) {
109
+ throw new TypeError('visitor must be a function');
110
+ }
111
+
112
+ function convertValue(value) {
113
+ if (value === null) return '';
114
+
115
+ if (utils.isDate(value)) {
116
+ return value.toISOString();
117
+ }
118
+
119
+ if (utils.isBoolean(value)) {
120
+ return value.toString();
121
+ }
122
+
123
+ if (!useBlob && utils.isBlob(value)) {
124
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
125
+ }
126
+
127
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
128
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
129
+ }
130
+
131
+ return value;
132
+ }
133
+
134
+ /**
135
+ * Default visitor.
136
+ *
137
+ * @param {*} value
138
+ * @param {String|Number} key
139
+ * @param {Array<String|Number>} path
140
+ * @this {FormData}
141
+ *
142
+ * @returns {boolean} return true to visit the each prop of the value recursively
143
+ */
144
+ function defaultVisitor(value, key, path) {
145
+ let arr = value;
146
+
147
+ if (value && !path && typeof value === 'object') {
148
+ if (utils.endsWith(key, '{}')) {
149
+ // eslint-disable-next-line no-param-reassign
150
+ key = metaTokens ? key : key.slice(0, -2);
151
+ // eslint-disable-next-line no-param-reassign
152
+ value = JSON.stringify(value);
153
+ } else if (
154
+ (utils.isArray(value) && isFlatArray(value)) ||
155
+ ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
156
+ )) {
157
+ // eslint-disable-next-line no-param-reassign
158
+ key = removeBrackets(key);
159
+
160
+ arr.forEach(function each(el, index) {
161
+ !(utils.isUndefined(el) || el === null) && formData.append(
162
+ // eslint-disable-next-line no-nested-ternary
163
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
164
+ convertValue(el)
165
+ );
166
+ });
167
+ return false;
168
+ }
169
+ }
170
+
171
+ if (isVisitable(value)) {
172
+ return true;
173
+ }
174
+
175
+ formData.append(renderKey(path, key, dots), convertValue(value));
176
+
177
+ return false;
178
+ }
179
+
180
+ const stack = [];
181
+
182
+ const exposedHelpers = Object.assign(predicates, {
183
+ defaultVisitor,
184
+ convertValue,
185
+ isVisitable
186
+ });
187
+
188
+ function build(value, path) {
189
+ if (utils.isUndefined(value)) return;
190
+
191
+ if (stack.indexOf(value) !== -1) {
192
+ throw Error('Circular reference detected in ' + path.join('.'));
193
+ }
194
+
195
+ stack.push(value);
196
+
197
+ utils.forEach(value, function each(el, key) {
198
+ const result = !(utils.isUndefined(el) || el === null) && visitor.call(
199
+ formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
200
+ );
201
+
202
+ if (result === true) {
203
+ build(el, path ? path.concat(key) : [key]);
204
+ }
205
+ });
206
+
207
+ stack.pop();
208
+ }
209
+
210
+ if (!utils.isObject(obj)) {
211
+ throw new TypeError('data must be an object');
212
+ }
213
+
214
+ build(obj);
215
+
216
+ return formData;
217
+ }
218
+
219
+ export { toFormData as default };
@@ -0,0 +1,19 @@
1
+ import utils from '../utils.esm.js';
2
+ import toFormData from './toFormData.esm.js';
3
+ import platform from '../platform/index.esm.js';
4
+
5
+ function toURLEncodedForm(data, options) {
6
+ return toFormData(data, new platform.classes.URLSearchParams(), {
7
+ visitor: function(value, key, path, helpers) {
8
+ if (platform.isNode && utils.isBuffer(value)) {
9
+ this.append(key, value.toString('base64'));
10
+ return false;
11
+ }
12
+
13
+ return helpers.defaultVisitor.apply(this, arguments);
14
+ },
15
+ ...options
16
+ });
17
+ }
18
+
19
+ export { toURLEncodedForm as default };
@@ -0,0 +1,88 @@
1
+ const streamChunk = function* (chunk, chunkSize) {
2
+ let len = chunk.byteLength;
3
+
4
+ if (len < chunkSize) {
5
+ yield chunk;
6
+ return;
7
+ }
8
+
9
+ let pos = 0;
10
+ let end;
11
+
12
+ while (pos < len) {
13
+ end = pos + chunkSize;
14
+ yield chunk.slice(pos, end);
15
+ pos = end;
16
+ }
17
+ };
18
+
19
+ const readBytes = async function* (iterable, chunkSize) {
20
+ for await (const chunk of readStream(iterable)) {
21
+ yield* streamChunk(chunk, chunkSize);
22
+ }
23
+ };
24
+
25
+ const readStream = async function* (stream) {
26
+ if (stream[Symbol.asyncIterator]) {
27
+ yield* stream;
28
+ return;
29
+ }
30
+
31
+ const reader = stream.getReader();
32
+ try {
33
+ for (;;) {
34
+ const {done, value} = await reader.read();
35
+ if (done) {
36
+ break;
37
+ }
38
+ yield value;
39
+ }
40
+ } finally {
41
+ await reader.cancel();
42
+ }
43
+ };
44
+
45
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
46
+ const iterator = readBytes(stream, chunkSize);
47
+
48
+ let bytes = 0;
49
+ let done;
50
+ let _onFinish = (e) => {
51
+ if (!done) {
52
+ done = true;
53
+ onFinish && onFinish(e);
54
+ }
55
+ };
56
+
57
+ return new ReadableStream({
58
+ async pull(controller) {
59
+ try {
60
+ const {done, value} = await iterator.next();
61
+
62
+ if (done) {
63
+ _onFinish();
64
+ controller.close();
65
+ return;
66
+ }
67
+
68
+ let len = value.byteLength;
69
+ if (onProgress) {
70
+ let loadedBytes = bytes += len;
71
+ onProgress(loadedBytes);
72
+ }
73
+ controller.enqueue(new Uint8Array(value));
74
+ } catch (err) {
75
+ _onFinish(err);
76
+ throw err;
77
+ }
78
+ },
79
+ cancel(reason) {
80
+ _onFinish(reason);
81
+ return iterator.return();
82
+ }
83
+ }, {
84
+ highWaterMark: 2
85
+ })
86
+ };
87
+
88
+ export { readBytes, streamChunk, trackStream };
@@ -0,0 +1,99 @@
1
+ import { VERSION } from '../env/data.esm.js';
2
+ import AxiosError from '../core/AxiosError.esm.js';
3
+
4
+ const validators = {};
5
+
6
+ // eslint-disable-next-line func-names
7
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
8
+ validators[type] = function validator(thing) {
9
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
10
+ };
11
+ });
12
+
13
+ const deprecatedWarnings = {};
14
+
15
+ /**
16
+ * Transitional option validator
17
+ *
18
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
19
+ * @param {string?} version - deprecated version / removed since version
20
+ * @param {string?} message - some message with additional info
21
+ *
22
+ * @returns {function}
23
+ */
24
+ validators.transitional = function transitional(validator, version, message) {
25
+ function formatMessage(opt, desc) {
26
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
27
+ }
28
+
29
+ // eslint-disable-next-line func-names
30
+ return (value, opt, opts) => {
31
+ if (validator === false) {
32
+ throw new AxiosError(
33
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
34
+ AxiosError.ERR_DEPRECATED
35
+ );
36
+ }
37
+
38
+ if (version && !deprecatedWarnings[opt]) {
39
+ deprecatedWarnings[opt] = true;
40
+ // eslint-disable-next-line no-console
41
+ console.warn(
42
+ formatMessage(
43
+ opt,
44
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
45
+ )
46
+ );
47
+ }
48
+
49
+ return validator ? validator(value, opt, opts) : true;
50
+ };
51
+ };
52
+
53
+ validators.spelling = function spelling(correctSpelling) {
54
+ return (value, opt) => {
55
+ // eslint-disable-next-line no-console
56
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
57
+ return true;
58
+ }
59
+ };
60
+
61
+ /**
62
+ * Assert object's properties type
63
+ *
64
+ * @param {object} options
65
+ * @param {object} schema
66
+ * @param {boolean?} allowUnknown
67
+ *
68
+ * @returns {object}
69
+ */
70
+
71
+ function assertOptions(options, schema, allowUnknown) {
72
+ if (typeof options !== 'object') {
73
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
74
+ }
75
+ const keys = Object.keys(options);
76
+ let i = keys.length;
77
+ while (i-- > 0) {
78
+ const opt = keys[i];
79
+ const validator = schema[opt];
80
+ if (validator) {
81
+ const value = options[opt];
82
+ const result = value === undefined || validator(value, opt, options);
83
+ if (result !== true) {
84
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
85
+ }
86
+ continue;
87
+ }
88
+ if (allowUnknown !== true) {
89
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
90
+ }
91
+ }
92
+ }
93
+
94
+ var validator = {
95
+ assertOptions,
96
+ validators
97
+ };
98
+
99
+ export { validator as default };
@@ -0,0 +1,3 @@
1
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
2
+
3
+ export { Blob$1 as default };
@@ -0,0 +1,3 @@
1
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
2
+
3
+ export { FormData$1 as default };
@@ -0,0 +1,5 @@
1
+ import AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.esm.js';
2
+
3
+ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
4
+
5
+ export { URLSearchParams$1 as default };
@@ -0,0 +1,15 @@
1
+ import URLSearchParams from './classes/URLSearchParams.esm.js';
2
+ import FormData from './classes/FormData.esm.js';
3
+ import Blob from './classes/Blob.esm.js';
4
+
5
+ var platform = {
6
+ isBrowser: true,
7
+ classes: {
8
+ URLSearchParams,
9
+ FormData,
10
+ Blob
11
+ },
12
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
13
+ };
14
+
15
+ export { platform as default };
@@ -0,0 +1,45 @@
1
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
2
+
3
+ const _navigator = typeof navigator === 'object' && navigator || undefined;
4
+
5
+ /**
6
+ * Determine if we're running in a standard browser environment
7
+ *
8
+ * This allows axios to run in a web worker, and react-native.
9
+ * Both environments support XMLHttpRequest, but not fully standard globals.
10
+ *
11
+ * web workers:
12
+ * typeof window -> undefined
13
+ * typeof document -> undefined
14
+ *
15
+ * react-native:
16
+ * navigator.product -> 'ReactNative'
17
+ * nativescript
18
+ * navigator.product -> 'NativeScript' or 'NS'
19
+ *
20
+ * @returns {boolean}
21
+ */
22
+ const hasStandardBrowserEnv = hasBrowserEnv &&
23
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
24
+
25
+ /**
26
+ * Determine if we're running in a standard browser webWorker environment
27
+ *
28
+ * Although the `isStandardBrowserEnv` method indicates that
29
+ * `allows axios to run in a web worker`, the WebWorker will still be
30
+ * filtered out due to its judgment standard
31
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
32
+ * This leads to a problem when axios post `FormData` in webWorker
33
+ */
34
+ const hasStandardBrowserWebWorkerEnv = (() => {
35
+ return (
36
+ typeof WorkerGlobalScope !== 'undefined' &&
37
+ // eslint-disable-next-line no-undef
38
+ self instanceof WorkerGlobalScope &&
39
+ typeof self.importScripts === 'function'
40
+ );
41
+ })();
42
+
43
+ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
44
+
45
+ export { hasBrowserEnv, hasStandardBrowserEnv, hasStandardBrowserWebWorkerEnv, _navigator as navigator, origin };
@@ -0,0 +1,9 @@
1
+ import platform$1 from './browser/index.esm.js';
2
+ import * as utils from './common/utils.esm.js';
3
+
4
+ var platform = {
5
+ ...utils,
6
+ ...platform$1
7
+ };
8
+
9
+ export { platform as default };