@majoo-ui/react 1.61.12-rc.7 → 1.61.12-rc.9
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/index.esm.js +26 -17
- package/index.umd.js +29 -22
- package/package.json +20 -20
package/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
12
12
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
13
13
|
import { Transition } from 'react-transition-group';
|
|
14
14
|
import { Portal } from '@majoo-ui/helpers';
|
|
15
|
-
import
|
|
15
|
+
import axios from 'axios';
|
|
16
16
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
17
17
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
18
18
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -7260,23 +7260,32 @@ function upload({
|
|
|
7260
7260
|
} else {
|
|
7261
7261
|
formdata.append(reqKey, file);
|
|
7262
7262
|
}
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
return a[b];
|
|
7278
|
-
}));
|
|
7263
|
+
axios({
|
|
7264
|
+
method: 'post',
|
|
7265
|
+
url: url,
|
|
7266
|
+
data: formdata,
|
|
7267
|
+
headers: {
|
|
7268
|
+
[tokenKey]: token,
|
|
7269
|
+
'Content-Type': 'multipart/form-data'
|
|
7270
|
+
},
|
|
7271
|
+
onUploadProgress: progressEvent => {
|
|
7272
|
+
if (progressEvent.total) {
|
|
7273
|
+
const percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total);
|
|
7274
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(progressEvent);
|
|
7275
|
+
progress === null || progress === void 0 ? void 0 : progress(percentCompleted);
|
|
7276
|
+
}
|
|
7279
7277
|
}
|
|
7278
|
+
}).then(response => {
|
|
7279
|
+
var _a, _b;
|
|
7280
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response.data);
|
|
7281
|
+
resolve((_b = (_a = [response.data]) === null || _a === void 0 ? void 0 : _a.concat(resKey === null || resKey === void 0 ? void 0 : resKey.split('.'))) === null || _b === void 0 ? void 0 : _b.reduce(function (a, b) {
|
|
7282
|
+
return a[b];
|
|
7283
|
+
}));
|
|
7284
|
+
}).catch(error => {
|
|
7285
|
+
var _a;
|
|
7286
|
+
const errorMessage = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || error.message;
|
|
7287
|
+
onError === null || onError === void 0 ? void 0 : onError(error, errorMessage);
|
|
7288
|
+
reject(error.message);
|
|
7280
7289
|
});
|
|
7281
7290
|
});
|
|
7282
7291
|
return promise;
|
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@stitches/react'), require('@majoo-ui/core'), require('react-i18next'), require('moment'), require('@majoo-ui/icons'), require('react/jsx-runtime'), require('@radix-ui/react-avatar'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-progress'), require('react-transition-group'), require('@majoo-ui/helpers'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', '@stitches/react', '@majoo-ui/core', 'react-i18next', 'moment', '@majoo-ui/icons', 'react/jsx-runtime', '@radix-ui/react-avatar', '@radix-ui/react-tooltip', '@radix-ui/react-progress', 'react-transition-group', '@majoo-ui/helpers', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.PropTypes, global.react, global.core, global.reactI18next, global.moment, global.icons, global.jsxRuntime, global.AvatarPrimitive, global.TooltipPrimitive, global.ProgressPrimitive, global.reactTransitionGroup, global.helpers, global.
|
|
5
|
-
})(this, (function (exports, React, PropTypes, react, core, reactI18next, moment, icons, jsxRuntime, AvatarPrimitive, TooltipPrimitive, ProgressPrimitive, reactTransitionGroup, helpers,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@stitches/react'), require('@majoo-ui/core'), require('react-i18next'), require('moment'), require('@majoo-ui/icons'), require('react/jsx-runtime'), require('@radix-ui/react-avatar'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-progress'), require('react-transition-group'), require('@majoo-ui/helpers'), require('axios'), require('@radix-ui/react-label'), require('@radix-ui/react-checkbox'), require('@radix-ui/react-radio-group'), require('react-hook-form'), require('@radix-ui/react-switch'), require('react-dom/server'), require('downshift'), require('react-infinite-scroller'), require('lodash.debounce'), require('@floating-ui/react'), require('otp-input-react'), require('@radix-ui/react-dialog'), require('@radix-ui/react-toggle-group'), require('dayzed'), require('@radix-ui/react-separator'), require('react-table'), require('@radix-ui/react-slider'), require('@radix-ui/react-tabs'), require('@radix-ui/react-accordion'), require('react-sortable-hoc'), require('react-dom'), require('@radix-ui/react-alert-dialog'), require('@radix-ui/react-dropdown-menu'), require('@radix-ui/react-aspect-ratio'), require('react-color/lib/components/common'), require('react-color/lib/helpers/color'), require('react-step-wizard'), require('@monsonjeremy/react-leaflet'), require('leaflet/dist/leaflet.css'), require('leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css'), require('leaflet-defaulticon-compatibility'), require('recharts'), require('draft-js'), require('react-draft-wysiwyg'), require('react-contextmenu'), require('react-loading-skeleton'), require('react-loading-skeleton/dist/skeleton.css'), require('react-virtual'), require('react-ui-scrollspy'), require('react-image-crop'), require('browser-image-compression'), require('react-table-sticky'), require('react-signature-pad-wrapper')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', '@stitches/react', '@majoo-ui/core', 'react-i18next', 'moment', '@majoo-ui/icons', 'react/jsx-runtime', '@radix-ui/react-avatar', '@radix-ui/react-tooltip', '@radix-ui/react-progress', 'react-transition-group', '@majoo-ui/helpers', 'axios', '@radix-ui/react-label', '@radix-ui/react-checkbox', '@radix-ui/react-radio-group', 'react-hook-form', '@radix-ui/react-switch', 'react-dom/server', 'downshift', 'react-infinite-scroller', 'lodash.debounce', '@floating-ui/react', 'otp-input-react', '@radix-ui/react-dialog', '@radix-ui/react-toggle-group', 'dayzed', '@radix-ui/react-separator', 'react-table', '@radix-ui/react-slider', '@radix-ui/react-tabs', '@radix-ui/react-accordion', 'react-sortable-hoc', 'react-dom', '@radix-ui/react-alert-dialog', '@radix-ui/react-dropdown-menu', '@radix-ui/react-aspect-ratio', 'react-color/lib/components/common', 'react-color/lib/helpers/color', 'react-step-wizard', '@monsonjeremy/react-leaflet', 'leaflet/dist/leaflet.css', 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css', 'leaflet-defaulticon-compatibility', 'recharts', 'draft-js', 'react-draft-wysiwyg', 'react-contextmenu', 'react-loading-skeleton', 'react-loading-skeleton/dist/skeleton.css', 'react-virtual', 'react-ui-scrollspy', 'react-image-crop', 'browser-image-compression', 'react-table-sticky', 'react-signature-pad-wrapper'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.PropTypes, global.react, global.core, global.reactI18next, global.moment, global.icons, global.jsxRuntime, global.AvatarPrimitive, global.TooltipPrimitive, global.ProgressPrimitive, global.reactTransitionGroup, global.helpers, global.axios, global.LabelPrimitive, global.CheckboxPrimitive, global.RadioGroupPrimitive, global.reactHookForm, global.SwitchPrimitive, global.server, global.Downshift, global.InfiniteScroll, global.debounce, global.react$1, global.OTPInput, global.DialogPrimitive, global.ToggleGroupPrimitive, global.dayzed, global.SeparatorPrimitive, global.reactTable, global.SliderPrimitive, global.TabsPrimitive, global.AccordionPrimitive, global.reactSortableHoc, global.ReactDOM, global.ADialog, global.DropdownMenuPrimitive, global.AspectRatioPrimitive, global.common, global.color, global.StepWizard$1, global.reactLeaflet, null, null, null, global.recharts, global.draftJs, global.reactDraftWysiwyg, global.reactContextmenu, global.ReactSkeleton, null, global.reactVirtual, global.ScrollSpy, global.ReactCrop, global.imageCompressionComponent, global.reactTableSticky, global.SignaturePad));
|
|
5
|
+
})(this, (function (exports, React, PropTypes, react, core, reactI18next, moment, icons, jsxRuntime, AvatarPrimitive, TooltipPrimitive, ProgressPrimitive, reactTransitionGroup, helpers, axios, LabelPrimitive, CheckboxPrimitive, RadioGroupPrimitive, reactHookForm, SwitchPrimitive, server, Downshift, InfiniteScroll, debounce, react$1, OTPInput, DialogPrimitive, ToggleGroupPrimitive, dayzed, SeparatorPrimitive, reactTable, SliderPrimitive, TabsPrimitive, AccordionPrimitive, reactSortableHoc, ReactDOM, ADialog, DropdownMenuPrimitive, AspectRatioPrimitive, common, color, StepWizard$1, reactLeaflet, leaflet_css, leafletDefaulticonCompatibility_css, leafletDefaulticonCompatibility, recharts, draftJs, reactDraftWysiwyg, reactContextmenu, ReactSkeleton, skeleton_css, reactVirtual, ScrollSpy, ReactCrop, imageCompressionComponent, reactTableSticky, SignaturePad) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
32
32
|
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
33
33
|
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
34
|
-
var
|
|
34
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
35
35
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
36
36
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
37
37
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
@@ -7326,31 +7326,38 @@
|
|
|
7326
7326
|
onProgress = _a.onProgress;
|
|
7327
7327
|
var promise = new Promise(function (resolve, reject) {
|
|
7328
7328
|
var _a;
|
|
7329
|
+
var _b;
|
|
7329
7330
|
var formdata = new FormData();
|
|
7330
7331
|
if (customBody) {
|
|
7331
|
-
for (var i = 0; i < ((
|
|
7332
|
+
for (var i = 0; i < ((_b = Object.keys(customBody)) === null || _b === void 0 ? void 0 : _b.length); i++) {
|
|
7332
7333
|
formdata.append(Object.keys(customBody)[i], customBody[Object.keys(customBody)[i]]);
|
|
7333
7334
|
}
|
|
7334
7335
|
} else {
|
|
7335
7336
|
formdata.append(reqKey, file);
|
|
7336
7337
|
}
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
var response = JSON.parse(res === null || res === void 0 ? void 0 : res.text);
|
|
7349
|
-
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response);
|
|
7350
|
-
resolve((_b = (_a = [response]) === null || _a === void 0 ? void 0 : _a.concat(resKey === null || resKey === void 0 ? void 0 : resKey.split('.'))) === null || _b === void 0 ? void 0 : _b.reduce(function (a, b) {
|
|
7351
|
-
return a[b];
|
|
7352
|
-
}));
|
|
7338
|
+
axios__default["default"]({
|
|
7339
|
+
method: 'post',
|
|
7340
|
+
url: url,
|
|
7341
|
+
data: formdata,
|
|
7342
|
+
headers: (_a = {}, _a[tokenKey] = token, _a['Content-Type'] = 'multipart/form-data', _a),
|
|
7343
|
+
onUploadProgress: function (progressEvent) {
|
|
7344
|
+
if (progressEvent.total) {
|
|
7345
|
+
var percentCompleted = Math.round(progressEvent.loaded * 100 / progressEvent.total);
|
|
7346
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(progressEvent);
|
|
7347
|
+
progress === null || progress === void 0 ? void 0 : progress(percentCompleted);
|
|
7348
|
+
}
|
|
7353
7349
|
}
|
|
7350
|
+
}).then(function (response) {
|
|
7351
|
+
var _a, _b;
|
|
7352
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response.data);
|
|
7353
|
+
resolve((_b = (_a = [response.data]) === null || _a === void 0 ? void 0 : _a.concat(resKey === null || resKey === void 0 ? void 0 : resKey.split('.'))) === null || _b === void 0 ? void 0 : _b.reduce(function (a, b) {
|
|
7354
|
+
return a[b];
|
|
7355
|
+
}));
|
|
7356
|
+
}).catch(function (error) {
|
|
7357
|
+
var _a;
|
|
7358
|
+
var errorMessage = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || error.message;
|
|
7359
|
+
onError === null || onError === void 0 ? void 0 : onError(error, errorMessage);
|
|
7360
|
+
reject(error.message);
|
|
7354
7361
|
});
|
|
7355
7362
|
});
|
|
7356
7363
|
return promise;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@majoo-ui/react",
|
|
3
|
-
"version": "1.61.12-rc.
|
|
3
|
+
"version": "1.61.12-rc.9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "17.0.2",
|
|
6
6
|
"react-dom": "17.0.2",
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
"@majoo-ui/helpers": "1.30.6",
|
|
15
15
|
"@majoo-ui/icons": "1.38.38",
|
|
16
16
|
"@monsonjeremy/react-leaflet": "^3.2.2",
|
|
17
|
-
"@radix-ui/react-accordion": "
|
|
18
|
-
"@radix-ui/react-alert-dialog": "
|
|
19
|
-
"@radix-ui/react-aspect-ratio": "
|
|
20
|
-
"@radix-ui/react-avatar": "
|
|
21
|
-
"@radix-ui/react-checkbox": "
|
|
22
|
-
"@radix-ui/react-dialog": "
|
|
17
|
+
"@radix-ui/react-accordion": "1.0.0",
|
|
18
|
+
"@radix-ui/react-alert-dialog": "1.0.3",
|
|
19
|
+
"@radix-ui/react-aspect-ratio": "1.0.0",
|
|
20
|
+
"@radix-ui/react-avatar": "1.0.0",
|
|
21
|
+
"@radix-ui/react-checkbox": "1.0.0",
|
|
22
|
+
"@radix-ui/react-dialog": "1.0.0",
|
|
23
23
|
"@radix-ui/react-dismissable-layer": "1.0.3",
|
|
24
|
-
"@radix-ui/react-dropdown-menu": "
|
|
25
|
-
"@radix-ui/react-label": "
|
|
26
|
-
"@radix-ui/react-popover": "
|
|
27
|
-
"@radix-ui/react-portal": "
|
|
28
|
-
"@radix-ui/react-progress": "
|
|
29
|
-
"@radix-ui/react-radio-group": "
|
|
30
|
-
"@radix-ui/react-separator": "
|
|
31
|
-
"@radix-ui/react-slider": "
|
|
32
|
-
"@radix-ui/react-switch": "
|
|
33
|
-
"@radix-ui/react-tabs": "
|
|
34
|
-
"@radix-ui/react-toggle-group": "
|
|
35
|
-
"@radix-ui/react-tooltip": "
|
|
24
|
+
"@radix-ui/react-dropdown-menu": "1.0.0",
|
|
25
|
+
"@radix-ui/react-label": "1.0.0",
|
|
26
|
+
"@radix-ui/react-popover": "1.0.0",
|
|
27
|
+
"@radix-ui/react-portal": "1.0.0",
|
|
28
|
+
"@radix-ui/react-progress": "1.0.0",
|
|
29
|
+
"@radix-ui/react-radio-group": "1.0.0",
|
|
30
|
+
"@radix-ui/react-separator": "1.0.0",
|
|
31
|
+
"@radix-ui/react-slider": "1.0.0",
|
|
32
|
+
"@radix-ui/react-switch": "1.0.0",
|
|
33
|
+
"@radix-ui/react-tabs": "1.0.0",
|
|
34
|
+
"@radix-ui/react-toggle-group": "1.0.0",
|
|
35
|
+
"@radix-ui/react-tooltip": "1.0.0",
|
|
36
36
|
"@radix-ui/react-visually-hidden": "1.0.0",
|
|
37
37
|
"@react-google-maps/api": "^2.12.1",
|
|
38
38
|
"@stitches/react": "^1.2.8",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"react-ui-scrollspy": "2.0.0",
|
|
68
68
|
"react-virtual": "^2.10.4",
|
|
69
69
|
"recharts": "^2.1.9",
|
|
70
|
-
"
|
|
70
|
+
"axios": "1.6.0",
|
|
71
71
|
"yup": "^0.32.11"
|
|
72
72
|
},
|
|
73
73
|
"overrides": {
|