@elliemae/ds-loading-indicator 1.60.0 → 2.0.0-alpha.12
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/cjs/DSLoadingIndicator.js +36 -31
- package/cjs/index.js +1 -9
- package/esm/DSLoadingIndicator.js +33 -28
- package/esm/index.js +0 -8
- package/package.json +32 -11
- package/types/DSLoadingIndicator.d.ts +65 -0
- package/types/index.d.ts +2 -0
- package/DSLoadingIndicator/package.json +0 -10
- package/cjs/DSLoadingIndicator.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/esm/DSLoadingIndicator.js.map +0 -1
- package/esm/index.js.map +0 -1
|
@@ -2,58 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _jsx2 = require('@babel/runtime/helpers/jsx');
|
|
11
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
12
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
-
|
|
13
|
+
require('react');
|
|
8
14
|
var reactDesc = require('react-desc');
|
|
9
15
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
10
16
|
var DSSpinner = require('@elliemae/ds-spinner');
|
|
11
17
|
var DSOverlay = require('@elliemae/ds-overlay');
|
|
18
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
19
|
|
|
13
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
21
|
|
|
15
|
-
var
|
|
22
|
+
var _jsx2__default = /*#__PURE__*/_interopDefaultLegacy(_jsx2);
|
|
23
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
16
24
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
17
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
25
|
var DSSpinner__default = /*#__PURE__*/_interopDefaultLegacy(DSSpinner);
|
|
19
26
|
var DSOverlay__default = /*#__PURE__*/_interopDefaultLegacy(DSOverlay);
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
var blockName = 'loading-indicator';
|
|
23
|
-
var Container = dsClassnames.aggregatedClasses('div')(blockName);
|
|
28
|
+
const _excluded = ["innerRef", "size", "loading", "message", "hasBackdrop", "onClickOutside", "spinner"];
|
|
24
29
|
|
|
25
|
-
var
|
|
26
|
-
var innerRef = _ref.innerRef,
|
|
27
|
-
_ref$size = _ref.size,
|
|
28
|
-
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
29
|
-
_ref$loading = _ref.loading,
|
|
30
|
-
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
31
|
-
_ref$message = _ref.message,
|
|
32
|
-
message = _ref$message === void 0 ? null : _ref$message,
|
|
33
|
-
_ref$hasBackdrop = _ref.hasBackdrop,
|
|
34
|
-
hasBackdrop = _ref$hasBackdrop === void 0 ? true : _ref$hasBackdrop,
|
|
35
|
-
_ref$onClickOutside = _ref.onClickOutside,
|
|
36
|
-
onClickOutside = _ref$onClickOutside === void 0 ? function () {
|
|
37
|
-
return null;
|
|
38
|
-
} : _ref$onClickOutside,
|
|
39
|
-
spinner = _ref.spinner,
|
|
40
|
-
rest = _objectWithoutProperties__default['default'](_ref, _excluded);
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
41
31
|
|
|
42
|
-
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
+
const blockName = 'loading-indicator';
|
|
34
|
+
const Container = dsClassnames.aggregatedClasses('div')(blockName);
|
|
35
|
+
|
|
36
|
+
const DSLoadingIndicator = _ref => {
|
|
37
|
+
let {
|
|
38
|
+
innerRef,
|
|
39
|
+
size = 'l',
|
|
40
|
+
loading = false,
|
|
41
|
+
message = null,
|
|
42
|
+
hasBackdrop = true,
|
|
43
|
+
onClickOutside = () => null,
|
|
44
|
+
spinner
|
|
45
|
+
} = _ref,
|
|
46
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
47
|
+
|
|
48
|
+
const spinnerComponent = spinner || /*#__PURE__*/jsxRuntime.jsx(DSSpinner__default["default"], _objectSpread({
|
|
43
49
|
innerRef: innerRef,
|
|
44
50
|
message: message,
|
|
45
51
|
size: size
|
|
46
52
|
}, rest));
|
|
47
|
-
|
|
53
|
+
|
|
54
|
+
return /*#__PURE__*/_jsx2__default["default"](DSOverlay__default["default"], {
|
|
48
55
|
backDropZIndex: 200 // https://jira.elliemae.io/browse/PUI-1712
|
|
49
56
|
,
|
|
50
57
|
hasBackdrop: hasBackdrop,
|
|
51
58
|
isOpen: loading,
|
|
52
59
|
onClickOutside: onClickOutside
|
|
53
|
-
}, /*#__PURE__*/
|
|
60
|
+
}, void 0, /*#__PURE__*/_jsx2__default["default"](Container, {}, void 0, spinnerComponent));
|
|
54
61
|
};
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
const loadingIndicatorProps = {
|
|
57
64
|
innerRef: reactDesc.PropTypes.func.description('Get spinner reference'),
|
|
58
65
|
size: reactDesc.PropTypes.oneOf(['s', 'm', 'l']).description('Size of the spinner').defaultValue('l'),
|
|
59
66
|
loading: reactDesc.PropTypes.bool.description('Whether to show the spinner or not').defaultValue(false),
|
|
@@ -62,11 +69,9 @@ var loadingIndicatorProps = {
|
|
|
62
69
|
onClickOutside: reactDesc.PropTypes.func.description('Handler when a user clicks the outside the spinner'),
|
|
63
70
|
spinner: reactDesc.PropTypes.element.description('Render a custom spinner (JSX)')
|
|
64
71
|
};
|
|
65
|
-
|
|
66
|
-
var LoadingIndicatorWithSchema = reactDesc.describe(DSLoadingIndicator);
|
|
72
|
+
const LoadingIndicatorWithSchema = reactDesc.describe(DSLoadingIndicator);
|
|
67
73
|
LoadingIndicatorWithSchema.propTypes = loadingIndicatorProps;
|
|
68
74
|
|
|
69
75
|
exports.DSLoadingIndicator = DSLoadingIndicator;
|
|
70
76
|
exports.LoadingIndicatorWithSchema = LoadingIndicatorWithSchema;
|
|
71
|
-
exports[
|
|
72
|
-
//# sourceMappingURL=DSLoadingIndicator.js.map
|
|
77
|
+
exports["default"] = DSLoadingIndicator;
|
package/cjs/index.js
CHANGED
|
@@ -3,17 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var DSLoadingIndicator = require('./DSLoadingIndicator.js');
|
|
6
|
-
require('@babel/runtime/helpers/extends');
|
|
7
|
-
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
-
require('react');
|
|
9
|
-
require('react-desc');
|
|
10
|
-
require('@elliemae/ds-classnames');
|
|
11
|
-
require('@elliemae/ds-spinner');
|
|
12
|
-
require('@elliemae/ds-overlay');
|
|
13
6
|
|
|
14
7
|
|
|
15
8
|
|
|
16
9
|
exports.DSLoadingIndicator = DSLoadingIndicator.DSLoadingIndicator;
|
|
17
10
|
exports.LoadingIndicatorWithSchema = DSLoadingIndicator.LoadingIndicatorWithSchema;
|
|
18
|
-
exports
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
11
|
+
exports["default"] = DSLoadingIndicator.DSLoadingIndicator;
|
|
@@ -1,47 +1,54 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx2 from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
|
-
import
|
|
9
|
+
import 'react';
|
|
4
10
|
import { PropTypes, describe } from 'react-desc';
|
|
5
11
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
6
12
|
import DSSpinner from '@elliemae/ds-spinner';
|
|
7
13
|
import DSOverlay from '@elliemae/ds-overlay';
|
|
14
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
spinner = _ref.spinner,
|
|
16
|
+
const _excluded = ["innerRef", "size", "loading", "message", "hasBackdrop", "onClickOutside", "spinner"];
|
|
17
|
+
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
+
const blockName = 'loading-indicator';
|
|
22
|
+
const Container = aggregatedClasses('div')(blockName);
|
|
23
|
+
|
|
24
|
+
const DSLoadingIndicator = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
innerRef,
|
|
27
|
+
size = 'l',
|
|
28
|
+
loading = false,
|
|
29
|
+
message = null,
|
|
30
|
+
hasBackdrop = true,
|
|
31
|
+
onClickOutside = () => null,
|
|
32
|
+
spinner
|
|
33
|
+
} = _ref,
|
|
28
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
const spinnerComponent = spinner || /*#__PURE__*/jsx(DSSpinner, _objectSpread({
|
|
31
37
|
innerRef: innerRef,
|
|
32
38
|
message: message,
|
|
33
39
|
size: size
|
|
34
40
|
}, rest));
|
|
35
|
-
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/_jsx2(DSOverlay, {
|
|
36
43
|
backDropZIndex: 200 // https://jira.elliemae.io/browse/PUI-1712
|
|
37
44
|
,
|
|
38
45
|
hasBackdrop: hasBackdrop,
|
|
39
46
|
isOpen: loading,
|
|
40
47
|
onClickOutside: onClickOutside
|
|
41
|
-
}, /*#__PURE__*/
|
|
48
|
+
}, void 0, /*#__PURE__*/_jsx2(Container, {}, void 0, spinnerComponent));
|
|
42
49
|
};
|
|
43
50
|
|
|
44
|
-
|
|
51
|
+
const loadingIndicatorProps = {
|
|
45
52
|
innerRef: PropTypes.func.description('Get spinner reference'),
|
|
46
53
|
size: PropTypes.oneOf(['s', 'm', 'l']).description('Size of the spinner').defaultValue('l'),
|
|
47
54
|
loading: PropTypes.bool.description('Whether to show the spinner or not').defaultValue(false),
|
|
@@ -50,9 +57,7 @@ var loadingIndicatorProps = {
|
|
|
50
57
|
onClickOutside: PropTypes.func.description('Handler when a user clicks the outside the spinner'),
|
|
51
58
|
spinner: PropTypes.element.description('Render a custom spinner (JSX)')
|
|
52
59
|
};
|
|
53
|
-
|
|
54
|
-
var LoadingIndicatorWithSchema = describe(DSLoadingIndicator);
|
|
60
|
+
const LoadingIndicatorWithSchema = describe(DSLoadingIndicator);
|
|
55
61
|
LoadingIndicatorWithSchema.propTypes = loadingIndicatorProps;
|
|
56
62
|
|
|
57
63
|
export { DSLoadingIndicator, LoadingIndicatorWithSchema, DSLoadingIndicator as default };
|
|
58
|
-
//# sourceMappingURL=DSLoadingIndicator.js.map
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
1
|
export { DSLoadingIndicator, LoadingIndicatorWithSchema, DSLoadingIndicator as default } from './DSLoadingIndicator.js';
|
|
2
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
3
|
-
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-desc';
|
|
6
|
-
import '@elliemae/ds-classnames';
|
|
7
|
-
import '@elliemae/ds-spinner';
|
|
8
|
-
import '@elliemae/ds-overlay';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-loading-indicator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"module": "esm/index.js",
|
|
7
|
-
"main": "cjs/index.js",
|
|
5
|
+
"description": "ICE MT - Dimsum - Loading Indicator",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./DSLoadingIndicator": {
|
|
15
|
+
"import": "./esm/DSLoadingIndicator.js",
|
|
16
|
+
"require": "./cjs/DSLoadingIndicator.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
8
19
|
"sideEffects": [
|
|
9
20
|
"*.css",
|
|
10
21
|
"*.scss"
|
|
11
22
|
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"npm": ">=7",
|
|
29
|
+
"node": ">=14"
|
|
30
|
+
},
|
|
31
|
+
"author": "ICE MT",
|
|
12
32
|
"scripts": {
|
|
13
33
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
34
|
"prebuild": "exit 0",
|
|
@@ -16,17 +36,18 @@
|
|
|
16
36
|
"build": "node ../../scripts/build/build.js"
|
|
17
37
|
},
|
|
18
38
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-classnames": "
|
|
20
|
-
"@elliemae/ds-overlay": "
|
|
21
|
-
"@elliemae/ds-spinner": "
|
|
22
|
-
"react-desc": "
|
|
39
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.12",
|
|
40
|
+
"@elliemae/ds-overlay": "2.0.0-alpha.12",
|
|
41
|
+
"@elliemae/ds-spinner": "2.0.0-alpha.12",
|
|
42
|
+
"react-desc": "~4.1.3"
|
|
23
43
|
},
|
|
24
44
|
"peerDependencies": {
|
|
25
|
-
"react": "^17.0.
|
|
26
|
-
"react-dom": "^17.0.
|
|
45
|
+
"react": "^17.0.2",
|
|
46
|
+
"react-dom": "^17.0.2"
|
|
27
47
|
},
|
|
28
48
|
"publishConfig": {
|
|
29
49
|
"access": "public",
|
|
30
|
-
"directory": "dist"
|
|
50
|
+
"directory": "dist",
|
|
51
|
+
"generateSubmodules": true
|
|
31
52
|
}
|
|
32
53
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const DSLoadingIndicator: {
|
|
4
|
+
({ innerRef, size, loading, message, hasBackdrop, onClickOutside, spinner, ...rest }: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
innerRef: any;
|
|
7
|
+
size?: string | undefined;
|
|
8
|
+
loading?: boolean | undefined;
|
|
9
|
+
message?: null | undefined;
|
|
10
|
+
hasBackdrop?: boolean | undefined;
|
|
11
|
+
onClickOutside?: (() => null) | undefined;
|
|
12
|
+
spinner: any;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
propTypes: {
|
|
15
|
+
innerRef: {
|
|
16
|
+
defaultValue<T = unknown>(arg: T): {
|
|
17
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
18
|
+
};
|
|
19
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
+
};
|
|
24
|
+
loading: {
|
|
25
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
+
};
|
|
27
|
+
message: {
|
|
28
|
+
defaultValue<T = unknown>(arg: T): {
|
|
29
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
30
|
+
};
|
|
31
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
32
|
+
};
|
|
33
|
+
hasBackdrop: {
|
|
34
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
+
};
|
|
36
|
+
onClickOutside: {
|
|
37
|
+
defaultValue<T = unknown>(arg: T): {
|
|
38
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
39
|
+
};
|
|
40
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
41
|
+
};
|
|
42
|
+
spinner: {
|
|
43
|
+
defaultValue<T = unknown>(arg: T): {
|
|
44
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
};
|
|
46
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
declare const LoadingIndicatorWithSchema: {
|
|
51
|
+
(props?: {
|
|
52
|
+
[x: string]: any;
|
|
53
|
+
innerRef: any;
|
|
54
|
+
size?: string | undefined;
|
|
55
|
+
loading?: boolean | undefined;
|
|
56
|
+
message?: null | undefined;
|
|
57
|
+
hasBackdrop?: boolean | undefined;
|
|
58
|
+
onClickOutside?: (() => null) | undefined;
|
|
59
|
+
spinner: any;
|
|
60
|
+
} | undefined): JSX.Element;
|
|
61
|
+
propTypes: unknown;
|
|
62
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
63
|
+
};
|
|
64
|
+
export { DSLoadingIndicator, LoadingIndicatorWithSchema };
|
|
65
|
+
export default DSLoadingIndicator;
|
package/types/index.d.ts
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSLoadingIndicator.js","sources":["../../src/DSLoadingIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSSpinner from '@elliemae/ds-spinner';\nimport DSOverlay from '@elliemae/ds-overlay';\n\nconst blockName = 'loading-indicator';\n\nconst Container = aggregatedClasses('div')(blockName);\n\nconst DSLoadingIndicator = ({\n innerRef,\n size = 'l',\n loading = false,\n message = null,\n hasBackdrop = true,\n onClickOutside = () => null,\n spinner,\n ...rest\n}) => {\n const spinnerComponent = spinner || (\n <DSSpinner innerRef={innerRef} message={message} size={size} {...rest} />\n );\n return (\n <DSOverlay\n backDropZIndex={200} // https://jira.elliemae.io/browse/PUI-1712\n hasBackdrop={hasBackdrop}\n isOpen={loading}\n onClickOutside={onClickOutside}\n >\n <Container>{spinnerComponent}</Container>\n </DSOverlay>\n );\n};\n\nconst loadingIndicatorProps = {\n innerRef: PropTypes.func.description('Get spinner reference'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Size of the spinner')\n .defaultValue('l'),\n loading: PropTypes.bool\n .description('Whether to show the spinner or not')\n .defaultValue(false),\n message: PropTypes.string.description('Message below the spinner'),\n hasBackdrop: PropTypes.bool\n .description('Show a backdrop besides the spinner')\n .defaultValue(true),\n onClickOutside: PropTypes.func.description(\n 'Handler when a user clicks the outside the spinner',\n ),\n spinner: PropTypes.element.description('Render a custom spinner (JSX)'),\n};\n\nDSLoadingIndicator.propTypes = loadingIndicatorProps;\n\nconst LoadingIndicatorWithSchema = describe(DSLoadingIndicator);\nLoadingIndicatorWithSchema.propTypes = loadingIndicatorProps;\n\nexport { DSLoadingIndicator, LoadingIndicatorWithSchema };\nexport default DSLoadingIndicator;\n"],"names":["blockName","Container","aggregatedClasses","DSLoadingIndicator","innerRef","size","loading","message","hasBackdrop","onClickOutside","spinner","rest","spinnerComponent","React","DSSpinner","DSOverlay","loadingIndicatorProps","PropTypes","func","description","oneOf","defaultValue","bool","string","element","propTypes","LoadingIndicatorWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,mBAAlB;AAEA,IAAMC,SAAS,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,CAAlB;;IAEMG,kBAAkB,GAAG,SAArBA,kBAAqB,OASrB;AAAA,MARJC,QAQI,QARJA,QAQI;AAAA,uBAPJC,IAOI;AAAA,MAPJA,IAOI,0BAPG,GAOH;AAAA,0BANJC,OAMI;AAAA,MANJA,OAMI,6BANM,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AeC,WAAf,CACd,oDADc,CAZY;AAe5BT,EAAAA,OAAO,EAAEO,mBAAS,CAACO,OAAV,CAAkBL,WAAlB,CAA8B,+BAA9B;AAfmB,CAA9B;AAkBAhB,kBAAkB,CAACsB,SAAnB,GAA+BT,qBAA/B;IAEMU,0BAA0B,GAAGC,kBAAQ,CAACxB,kBAAD;AAC3CuB,0BAA0B,CAACD,SAA3B,GAAuCT,qBAAvC;;;;;;"}
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSLoadingIndicator.js","sources":["../../src/DSLoadingIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSSpinner from '@elliemae/ds-spinner';\nimport DSOverlay from '@elliemae/ds-overlay';\n\nconst blockName = 'loading-indicator';\n\nconst Container = aggregatedClasses('div')(blockName);\n\nconst DSLoadingIndicator = ({\n innerRef,\n size = 'l',\n loading = false,\n message = null,\n hasBackdrop = true,\n onClickOutside = () => null,\n spinner,\n ...rest\n}) => {\n const spinnerComponent = spinner || (\n <DSSpinner innerRef={innerRef} message={message} size={size} {...rest} />\n );\n return (\n <DSOverlay\n backDropZIndex={200} // https://jira.elliemae.io/browse/PUI-1712\n hasBackdrop={hasBackdrop}\n isOpen={loading}\n onClickOutside={onClickOutside}\n >\n <Container>{spinnerComponent}</Container>\n </DSOverlay>\n );\n};\n\nconst loadingIndicatorProps = {\n innerRef: PropTypes.func.description('Get spinner reference'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Size of the spinner')\n .defaultValue('l'),\n loading: PropTypes.bool\n .description('Whether to show the spinner or not')\n .defaultValue(false),\n message: PropTypes.string.description('Message below the spinner'),\n hasBackdrop: PropTypes.bool\n .description('Show a backdrop besides the spinner')\n .defaultValue(true),\n onClickOutside: PropTypes.func.description(\n 'Handler when a user clicks the outside the spinner',\n ),\n spinner: PropTypes.element.description('Render a custom spinner (JSX)'),\n};\n\nDSLoadingIndicator.propTypes = loadingIndicatorProps;\n\nconst LoadingIndicatorWithSchema = describe(DSLoadingIndicator);\nLoadingIndicatorWithSchema.propTypes = loadingIndicatorProps;\n\nexport { DSLoadingIndicator, LoadingIndicatorWithSchema };\nexport default DSLoadingIndicator;\n"],"names":["blockName","Container","aggregatedClasses","DSLoadingIndicator","innerRef","size","loading","message","hasBackdrop","onClickOutside","spinner","rest","spinnerComponent","loadingIndicatorProps","PropTypes","func","description","oneOf","defaultValue","bool","string","element","propTypes","LoadingIndicatorWithSchema","describe"],"mappings":";;;;;;;;;AAMA,IAAMA,SAAS,GAAG,mBAAlB;AAEA,IAAMC,SAAS,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,CAAlB;;IAEMG,kBAAkB,GAAG,SAArBA,kBAAqB,OASrB;AAAA,MARJC,QAQI,QARJA,QAQI;AAAA,uBAPJC,IAOI;AAAA,MAPJA,IAOI,0BAPG,GAOH;AAAA,0BANJC,OAMI;AAAA,MANJA,OAMI,6BANM,KAMN;AAAA,0BALJC,OAKI;AAAA,MALJA,OAKI,6BALM,IAKN;AAAA,8BAJJC,WAII;AAAA,MAJJA,WAII,iCAJU,IAIV;AAAA,iCAHJC,cAGI;AAAA,MAHJA,cAGI,oCAHa;AAAA,WAAM,IAAN;AAAA,GAGb;AAAA,MAFJC,OAEI,QAFJA,OAEI;AAAA,MADDC,IACC;;AACJ,MAAMC,gBAAgB,GAAGF,OAAO,iBAC9B,oBAAC,SAAD;AAAW,IAAA,QAAQ,EAAEN,QAArB;AAA+B,IAAA,OAAO,EAAEG,OAAxC;AAAiD,IAAA,IAAI,EAAEF;AAAvD,KAAiEM,IAAjE,EADF;AAGA,sBACE,oBAAC,SAAD;AACE,IAAA,cAAc,EAAE,GAD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