@elliemae/ds-indeterminate-progress-indicator 2.2.0-alpha.4 → 3.0.0-next.2
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/DSIndeterminateProgressIndicator.js +91 -95
- package/cjs/index.js +11 -36
- package/esm/DSIndeterminateProgressIndicator.js +76 -63
- package/esm/index.js +1 -7
- package/package.json +3 -3
- package/cjs/DSIndeterminateProgressIndicator.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/esm/DSIndeterminateProgressIndicator.js.map +0 -7
- package/esm/index.js.map +0 -7
@@ -1,117 +1,113 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
var
|
6
|
-
var
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
};
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
var
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
}) {
|
54
|
-
const [label, setLabel] = (0, import_react.useState)(title);
|
55
|
-
(0, import_react.useEffect)(() => {
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
6
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
8
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
10
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
11
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
12
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
13
|
+
var react = require('react');
|
14
|
+
var reactDesc = require('react-desc');
|
15
|
+
var dsClassnames = require('@elliemae/ds-classnames');
|
16
|
+
var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
17
|
+
var jsxRuntime = require('react/jsx-runtime');
|
18
|
+
|
19
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
20
|
+
|
21
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
22
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
23
|
+
var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
|
24
|
+
|
25
|
+
var _div;
|
26
|
+
|
27
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
28
|
+
|
29
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
30
|
+
const {
|
31
|
+
cssClassName,
|
32
|
+
classNameBlock,
|
33
|
+
classNameElement
|
34
|
+
} = dsClassnames.convertPropToCssClassName('indeterminate-progress-indicator');
|
35
|
+
|
36
|
+
function DSIndeterminateProgressIndicator(_ref) {
|
37
|
+
let {
|
38
|
+
containerProps,
|
39
|
+
title,
|
40
|
+
complete,
|
41
|
+
failed,
|
42
|
+
processing,
|
43
|
+
processingComplete,
|
44
|
+
processingCompleteTitle,
|
45
|
+
processingFail,
|
46
|
+
processingFailTitle,
|
47
|
+
animated,
|
48
|
+
percent,
|
49
|
+
lineOnly
|
50
|
+
} = _ref;
|
51
|
+
const [label, setLabel] = react.useState(title);
|
52
|
+
react.useEffect(() => {
|
56
53
|
if ((processingComplete || processingFail || processing) && (complete || failed)) {
|
57
54
|
setLabel(complete ? processingCompleteTitle : processingFailTitle);
|
58
55
|
}
|
59
56
|
}, [failed, complete, processingComplete, processingFail, processing]);
|
60
|
-
return
|
57
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
61
58
|
"aria-busy": processing,
|
62
59
|
"aria-label": label,
|
63
60
|
"aria-live": "polite",
|
64
|
-
className:
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
}
|
82
|
-
})));
|
61
|
+
className: "".concat(cssClassName, " ").concat(!complete && !failed && !processing ? classNameBlock('default') : '', " ").concat(complete ? classNameBlock('complete') : '', " ").concat( // eslint-disable-next-line max-len
|
62
|
+
failed ? classNameBlock('failed') : '', " ").concat(processing ? classNameBlock('processing') : '', " ").concat(animated && processing ? 'animated' : '', " \n ").concat(processingComplete ? classNameBlock('processing-complete') : '', " \n ").concat(processingFail ? classNameBlock('processing-fail') : '', " \n ").concat(lineOnly ? 'line-only' : null, "\n "),
|
63
|
+
role: "alert"
|
64
|
+
}, containerProps), {}, {
|
65
|
+
children: [!lineOnly ? /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
66
|
+
className: classNameBlock('tooltip-text'),
|
67
|
+
containerComponent: _div || (_div = /*#__PURE__*/_jsx__default["default"]("div", {})),
|
68
|
+
value: label
|
69
|
+
}) : null, /*#__PURE__*/_jsx__default["default"]("div", {
|
70
|
+
className: "".concat(classNameElement('bar'))
|
71
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("div", {
|
72
|
+
className: "".concat(classNameElement('bar-indicator')),
|
73
|
+
style: {
|
74
|
+
width: "".concat(!complete && !failed && !animated && processing ? percent : 100, "%")
|
75
|
+
}
|
76
|
+
}))]
|
77
|
+
}));
|
83
78
|
}
|
79
|
+
|
84
80
|
DSIndeterminateProgressIndicator.defaultProps = {
|
85
81
|
containerProps: {},
|
86
|
-
title:
|
82
|
+
title: '',
|
87
83
|
complete: false,
|
88
84
|
failed: false,
|
89
85
|
processing: false,
|
90
86
|
processingComplete: false,
|
91
|
-
processingCompleteTitle:
|
87
|
+
processingCompleteTitle: 'Complete',
|
92
88
|
processingFail: false,
|
93
|
-
processingFailTitle:
|
89
|
+
processingFailTitle: 'Fail',
|
94
90
|
animated: true,
|
95
91
|
percent: 50,
|
96
92
|
lineOnly: false
|
97
93
|
};
|
98
94
|
const indeterminateProgressIndicatorProps = {
|
99
|
-
containerProps:
|
100
|
-
title:
|
101
|
-
processingCompleteTitle:
|
102
|
-
processingFailTitle:
|
103
|
-
complete:
|
104
|
-
failed:
|
105
|
-
processing:
|
106
|
-
processingComplete:
|
107
|
-
processingFail:
|
108
|
-
animated:
|
109
|
-
percent:
|
110
|
-
lineOnly:
|
95
|
+
containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
|
96
|
+
title: reactDesc.PropTypes.string.description('component s label'),
|
97
|
+
processingCompleteTitle: reactDesc.PropTypes.string.description('label to display when the process is completed'),
|
98
|
+
processingFailTitle: reactDesc.PropTypes.string.description('label to display when the process has failed'),
|
99
|
+
complete: reactDesc.PropTypes.bool.description('Sets the process state to completed').defaultValue(false),
|
100
|
+
failed: reactDesc.PropTypes.bool.description('Sets the process state to failed').defaultValue(false),
|
101
|
+
processing: reactDesc.PropTypes.bool.description('Sets the process state to processing').defaultValue(false),
|
102
|
+
processingComplete: reactDesc.PropTypes.bool.description('Sets the process state to processing and then completed').defaultValue(false),
|
103
|
+
processingFail: reactDesc.PropTypes.bool.description('Sets the process state to processing and then failed').defaultValue(false),
|
104
|
+
animated: reactDesc.PropTypes.bool.description('animate or not').defaultValue(true),
|
105
|
+
percent: reactDesc.PropTypes.number.description('completion percentage').defaultValue(50),
|
106
|
+
lineOnly: reactDesc.PropTypes.bool.description('hide the label from rendering')
|
111
107
|
};
|
112
|
-
|
113
|
-
const IndeterminateProgressIndicatorWithSchema = (0, import_react_desc.describe)(DSIndeterminateProgressIndicator);
|
108
|
+
const IndeterminateProgressIndicatorWithSchema = reactDesc.describe(DSIndeterminateProgressIndicator);
|
114
109
|
IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;
|
115
|
-
|
116
|
-
|
117
|
-
|
110
|
+
|
111
|
+
exports.DSIndeterminateProgressIndicator = DSIndeterminateProgressIndicator;
|
112
|
+
exports.IndeterminateProgressIndicatorWithSchema = IndeterminateProgressIndicatorWithSchema;
|
113
|
+
exports["default"] = DSIndeterminateProgressIndicator;
|
package/cjs/index.js
CHANGED
@@ -1,36 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
var
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
17
|
-
}
|
18
|
-
return target;
|
19
|
-
};
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
22
|
-
};
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
24
|
-
return (module2, temp) => {
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
26
|
-
};
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
28
|
-
var src_exports = {};
|
29
|
-
__export(src_exports, {
|
30
|
-
default: () => import_DSIndeterminateProgressIndicator.default
|
31
|
-
});
|
32
|
-
var React = __toESM(require("react"));
|
33
|
-
__reExport(src_exports, require("./DSIndeterminateProgressIndicator"));
|
34
|
-
var import_DSIndeterminateProgressIndicator = require("./DSIndeterminateProgressIndicator");
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
36
|
-
//# sourceMappingURL=index.js.map
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var DSIndeterminateProgressIndicator = require('./DSIndeterminateProgressIndicator.js');
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
exports.DSIndeterminateProgressIndicator = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
|
10
|
+
exports.IndeterminateProgressIndicatorWithSchema = DSIndeterminateProgressIndicator.IndeterminateProgressIndicatorWithSchema;
|
11
|
+
exports["default"] = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
|
@@ -1,88 +1,101 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
7
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
9
|
+
import { useState, useEffect } from 'react';
|
10
|
+
import { PropTypes, describe } from 'react-desc';
|
11
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
12
|
+
import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
|
13
|
+
import { jsxs } from 'react/jsx-runtime';
|
14
|
+
|
15
|
+
var _div;
|
16
|
+
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
18
|
+
|
19
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
20
|
+
const {
|
21
|
+
cssClassName,
|
22
|
+
classNameBlock,
|
23
|
+
classNameElement
|
24
|
+
} = convertPropToCssClassName('indeterminate-progress-indicator');
|
25
|
+
|
26
|
+
function DSIndeterminateProgressIndicator(_ref) {
|
27
|
+
let {
|
28
|
+
containerProps,
|
29
|
+
title,
|
30
|
+
complete,
|
31
|
+
failed,
|
32
|
+
processing,
|
33
|
+
processingComplete,
|
34
|
+
processingCompleteTitle,
|
35
|
+
processingFail,
|
36
|
+
processingFailTitle,
|
37
|
+
animated,
|
38
|
+
percent,
|
39
|
+
lineOnly
|
40
|
+
} = _ref;
|
21
41
|
const [label, setLabel] = useState(title);
|
22
42
|
useEffect(() => {
|
23
43
|
if ((processingComplete || processingFail || processing) && (complete || failed)) {
|
24
44
|
setLabel(complete ? processingCompleteTitle : processingFailTitle);
|
25
45
|
}
|
26
46
|
}, [failed, complete, processingComplete, processingFail, processing]);
|
27
|
-
return
|
47
|
+
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
28
48
|
"aria-busy": processing,
|
29
49
|
"aria-label": label,
|
30
50
|
"aria-live": "polite",
|
31
|
-
className:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
}
|
49
|
-
})));
|
51
|
+
className: "".concat(cssClassName, " ").concat(!complete && !failed && !processing ? classNameBlock('default') : '', " ").concat(complete ? classNameBlock('complete') : '', " ").concat( // eslint-disable-next-line max-len
|
52
|
+
failed ? classNameBlock('failed') : '', " ").concat(processing ? classNameBlock('processing') : '', " ").concat(animated && processing ? 'animated' : '', " \n ").concat(processingComplete ? classNameBlock('processing-complete') : '', " \n ").concat(processingFail ? classNameBlock('processing-fail') : '', " \n ").concat(lineOnly ? 'line-only' : null, "\n "),
|
53
|
+
role: "alert"
|
54
|
+
}, containerProps), {}, {
|
55
|
+
children: [!lineOnly ? /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
|
56
|
+
className: classNameBlock('tooltip-text'),
|
57
|
+
containerComponent: _div || (_div = /*#__PURE__*/_jsx("div", {})),
|
58
|
+
value: label
|
59
|
+
}) : null, /*#__PURE__*/_jsx("div", {
|
60
|
+
className: "".concat(classNameElement('bar'))
|
61
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
62
|
+
className: "".concat(classNameElement('bar-indicator')),
|
63
|
+
style: {
|
64
|
+
width: "".concat(!complete && !failed && !animated && processing ? percent : 100, "%")
|
65
|
+
}
|
66
|
+
}))]
|
67
|
+
}));
|
50
68
|
}
|
69
|
+
|
51
70
|
DSIndeterminateProgressIndicator.defaultProps = {
|
52
71
|
containerProps: {},
|
53
|
-
title:
|
72
|
+
title: '',
|
54
73
|
complete: false,
|
55
74
|
failed: false,
|
56
75
|
processing: false,
|
57
76
|
processingComplete: false,
|
58
|
-
processingCompleteTitle:
|
77
|
+
processingCompleteTitle: 'Complete',
|
59
78
|
processingFail: false,
|
60
|
-
processingFailTitle:
|
79
|
+
processingFailTitle: 'Fail',
|
61
80
|
animated: true,
|
62
81
|
percent: 50,
|
63
82
|
lineOnly: false
|
64
83
|
};
|
65
84
|
const indeterminateProgressIndicatorProps = {
|
66
|
-
containerProps: PropTypes.object.description(
|
67
|
-
title: PropTypes.string.description(
|
68
|
-
processingCompleteTitle: PropTypes.string.description(
|
69
|
-
processingFailTitle: PropTypes.string.description(
|
70
|
-
complete: PropTypes.bool.description(
|
71
|
-
failed: PropTypes.bool.description(
|
72
|
-
processing: PropTypes.bool.description(
|
73
|
-
processingComplete: PropTypes.bool.description(
|
74
|
-
processingFail: PropTypes.bool.description(
|
75
|
-
animated: PropTypes.bool.description(
|
76
|
-
percent: PropTypes.number.description(
|
77
|
-
lineOnly: PropTypes.bool.description(
|
85
|
+
containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
|
86
|
+
title: PropTypes.string.description('component s label'),
|
87
|
+
processingCompleteTitle: PropTypes.string.description('label to display when the process is completed'),
|
88
|
+
processingFailTitle: PropTypes.string.description('label to display when the process has failed'),
|
89
|
+
complete: PropTypes.bool.description('Sets the process state to completed').defaultValue(false),
|
90
|
+
failed: PropTypes.bool.description('Sets the process state to failed').defaultValue(false),
|
91
|
+
processing: PropTypes.bool.description('Sets the process state to processing').defaultValue(false),
|
92
|
+
processingComplete: PropTypes.bool.description('Sets the process state to processing and then completed').defaultValue(false),
|
93
|
+
processingFail: PropTypes.bool.description('Sets the process state to processing and then failed').defaultValue(false),
|
94
|
+
animated: PropTypes.bool.description('animate or not').defaultValue(true),
|
95
|
+
percent: PropTypes.number.description('completion percentage').defaultValue(50),
|
96
|
+
lineOnly: PropTypes.bool.description('hide the label from rendering')
|
78
97
|
};
|
79
|
-
DSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;
|
80
98
|
const IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);
|
81
99
|
IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;
|
82
|
-
|
83
|
-
export {
|
84
|
-
DSIndeterminateProgressIndicator,
|
85
|
-
IndeterminateProgressIndicatorWithSchema,
|
86
|
-
DSIndeterminateProgressIndicator_default as default
|
87
|
-
};
|
88
|
-
//# sourceMappingURL=DSIndeterminateProgressIndicator.js.map
|
100
|
+
|
101
|
+
export { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema, DSIndeterminateProgressIndicator as default };
|
package/esm/index.js
CHANGED
@@ -1,7 +1 @@
|
|
1
|
-
|
2
|
-
export * from "./DSIndeterminateProgressIndicator";
|
3
|
-
import { default as default2 } from "./DSIndeterminateProgressIndicator";
|
4
|
-
export {
|
5
|
-
default2 as default
|
6
|
-
};
|
7
|
-
//# sourceMappingURL=index.js.map
|
1
|
+
export { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema, DSIndeterminateProgressIndicator as default } from './DSIndeterminateProgressIndicator.js';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@elliemae/ds-indeterminate-progress-indicator",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.0-next.2",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
|
6
6
|
"module": "./esm/index.js",
|
@@ -36,8 +36,8 @@
|
|
36
36
|
"build": "node ../../scripts/build/build.js"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@elliemae/ds-classnames": "
|
40
|
-
"@elliemae/ds-truncated-tooltip-text": "
|
39
|
+
"@elliemae/ds-classnames": "3.0.0-next.2",
|
40
|
+
"@elliemae/ds-truncated-tooltip-text": "3.0.0-next.2",
|
41
41
|
"react-desc": "~4.1.3"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../../src/DSIndeterminateProgressIndicator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable react/require-default-props */\nimport React, { useEffect, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'indeterminate-progress-indicator',\n);\n\nfunction DSIndeterminateProgressIndicator({\n containerProps,\n title,\n complete,\n failed,\n processing,\n processingComplete,\n processingCompleteTitle,\n processingFail,\n processingFailTitle,\n animated,\n percent,\n lineOnly,\n}) {\n const [label, setLabel] = useState(title);\n useEffect(() => {\n if ((processingComplete || processingFail || processing) && (complete || failed)) {\n setLabel(complete ? processingCompleteTitle : processingFailTitle);\n }\n }, [failed, complete, processingComplete, processingFail, processing]);\n return (\n <div\n aria-busy={processing}\n aria-label={label}\n aria-live=\"polite\"\n className={`${cssClassName} ${!complete && !failed && !processing ? classNameBlock('default') : ''} ${\n complete ? classNameBlock('complete') : ''\n } ${\n // eslint-disable-next-line max-len\n failed ? classNameBlock('failed') : ''\n } ${processing ? classNameBlock('processing') : ''} ${animated && processing ? 'animated' : ''} \n ${processingComplete ? classNameBlock('processing-complete') : ''} \n ${processingFail ? classNameBlock('processing-fail') : ''} \n ${lineOnly ? 'line-only' : null}\n `}\n role=\"alert\"\n {...containerProps}\n >\n {!lineOnly ? (\n <DSTruncatedTooltipText className={classNameBlock('tooltip-text')} containerComponent={<div />} value={label} />\n ) : null}\n <div className={`${classNameElement('bar')}`}>\n <div\n className={`${classNameElement('bar-indicator')}`}\n style={{\n width: `${!complete && !failed && !animated && processing ? percent : 100}%`,\n }}\n />\n </div>\n </div>\n );\n}\n\nDSIndeterminateProgressIndicator.defaultProps = {\n containerProps: {},\n title: '',\n complete: false,\n failed: false,\n processing: false,\n processingComplete: false,\n processingCompleteTitle: 'Complete',\n processingFail: false,\n processingFailTitle: 'Fail',\n animated: true,\n percent: 50,\n lineOnly: false,\n};\n\nconst indeterminateProgressIndicatorProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n title: PropTypes.string.description('component s label'),\n processingCompleteTitle: PropTypes.string.description('label to display when the process is completed'),\n processingFailTitle: PropTypes.string.description('label to display when the process has failed'),\n complete: PropTypes.bool.description('Sets the process state to completed').defaultValue(false),\n failed: PropTypes.bool.description('Sets the process state to failed').defaultValue(false),\n processing: PropTypes.bool.description('Sets the process state to processing').defaultValue(false),\n processingComplete: PropTypes.bool\n .description('Sets the process state to processing and then completed')\n .defaultValue(false),\n processingFail: PropTypes.bool\n .description('Sets the process state to processing and then failed')\n .defaultValue(false),\n animated: PropTypes.bool.description('animate or not').defaultValue(true),\n percent: PropTypes.number.description('completion percentage').defaultValue(50),\n lineOnly: PropTypes.bool.description('hide the label from rendering'),\n};\n\nDSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;\n\nconst IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);\n\nIndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;\n\nexport { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };\nexport default DSIndeterminateProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAA2C;AAC3C,wBAAoC;AACpC,2BAA0C;AAC1C,uCAAmC;AAEnC,MAAM,EAAE,cAAc,gBAAgB,qBAAqB,oDACzD;AAGF,0CAA0C;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GACC;AACD,QAAM,CAAC,OAAO,YAAY,2BAAS;AACnC,8BAAU,MAAM;AACd,QAAK,uBAAsB,kBAAkB,eAAgB,aAAY,SAAS;AAChF,eAAS,WAAW,0BAA0B;AAAA;AAAA,KAE/C,CAAC,QAAQ,UAAU,oBAAoB,gBAAgB;AAC1D,SACE,mDAAC,OAAD;AAAA,IACE,aAAW;AAAA,IACX,cAAY;AAAA,IACZ,aAAU;AAAA,IACV,WAAW,GAAG,gBAAgB,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,eAAe,aAAa,MAC9F,WAAW,eAAe,cAAc,OAGxC,SAAS,eAAe,YAAY,MAClC,aAAa,eAAe,gBAAgB,MAAM,YAAY,aAAa,aAAa;AAAA,WACvF,qBAAqB,eAAe,yBAAyB;AAAA,WAC7D,iBAAiB,eAAe,qBAAqB;AAAA,WACrD,WAAW,cAAc;AAAA;AAAA,IAE9B,MAAK;AAAA,OACD;AAAA,KAEH,CAAC,WACA,mDAAC,0CAAD;AAAA,IAAwB,WAAW,eAAe;AAAA,IAAiB,oBAAoB,mDAAC,OAAD;AAAA,IAAS,OAAO;AAAA,OACrG,MACJ,mDAAC,OAAD;AAAA,IAAK,WAAW,GAAG,iBAAiB;AAAA,KAClC,mDAAC,OAAD;AAAA,IACE,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
4
|
-
"sourcesContent": ["export * from './DSIndeterminateProgressIndicator';\nexport { default } from './DSIndeterminateProgressIndicator';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,8CAAwB;",
|
6
|
-
"names": []
|
7
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSIndeterminateProgressIndicator.tsx"],
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable react/require-default-props */\nimport React, { useEffect, useState } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\n\nconst { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'indeterminate-progress-indicator',\n);\n\nfunction DSIndeterminateProgressIndicator({\n containerProps,\n title,\n complete,\n failed,\n processing,\n processingComplete,\n processingCompleteTitle,\n processingFail,\n processingFailTitle,\n animated,\n percent,\n lineOnly,\n}) {\n const [label, setLabel] = useState(title);\n useEffect(() => {\n if ((processingComplete || processingFail || processing) && (complete || failed)) {\n setLabel(complete ? processingCompleteTitle : processingFailTitle);\n }\n }, [failed, complete, processingComplete, processingFail, processing]);\n return (\n <div\n aria-busy={processing}\n aria-label={label}\n aria-live=\"polite\"\n className={`${cssClassName} ${!complete && !failed && !processing ? classNameBlock('default') : ''} ${\n complete ? classNameBlock('complete') : ''\n } ${\n // eslint-disable-next-line max-len\n failed ? classNameBlock('failed') : ''\n } ${processing ? classNameBlock('processing') : ''} ${animated && processing ? 'animated' : ''} \n ${processingComplete ? classNameBlock('processing-complete') : ''} \n ${processingFail ? classNameBlock('processing-fail') : ''} \n ${lineOnly ? 'line-only' : null}\n `}\n role=\"alert\"\n {...containerProps}\n >\n {!lineOnly ? (\n <DSTruncatedTooltipText className={classNameBlock('tooltip-text')} containerComponent={<div />} value={label} />\n ) : null}\n <div className={`${classNameElement('bar')}`}>\n <div\n className={`${classNameElement('bar-indicator')}`}\n style={{\n width: `${!complete && !failed && !animated && processing ? percent : 100}%`,\n }}\n />\n </div>\n </div>\n );\n}\n\nDSIndeterminateProgressIndicator.defaultProps = {\n containerProps: {},\n title: '',\n complete: false,\n failed: false,\n processing: false,\n processingComplete: false,\n processingCompleteTitle: 'Complete',\n processingFail: false,\n processingFailTitle: 'Fail',\n animated: true,\n percent: 50,\n lineOnly: false,\n};\n\nconst indeterminateProgressIndicatorProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n title: PropTypes.string.description('component s label'),\n processingCompleteTitle: PropTypes.string.description('label to display when the process is completed'),\n processingFailTitle: PropTypes.string.description('label to display when the process has failed'),\n complete: PropTypes.bool.description('Sets the process state to completed').defaultValue(false),\n failed: PropTypes.bool.description('Sets the process state to failed').defaultValue(false),\n processing: PropTypes.bool.description('Sets the process state to processing').defaultValue(false),\n processingComplete: PropTypes.bool\n .description('Sets the process state to processing and then completed')\n .defaultValue(false),\n processingFail: PropTypes.bool\n .description('Sets the process state to processing and then failed')\n .defaultValue(false),\n animated: PropTypes.bool.description('animate or not').defaultValue(true),\n percent: PropTypes.number.description('completion percentage').defaultValue(50),\n lineOnly: PropTypes.bool.description('hide the label from rendering'),\n};\n\nDSIndeterminateProgressIndicator.propTypes = indeterminateProgressIndicatorProps;\n\nconst IndeterminateProgressIndicatorWithSchema = describe(DSIndeterminateProgressIndicator);\n\nIndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndicatorProps;\n\nexport { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };\nexport default DSIndeterminateProgressIndicator;\n"],
|
5
|
-
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AAE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A,EACZ,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA;AAGZ,MAAM,sCAAsC;AAAA,EAC1C,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAC7C,OAAO,UAAU,OAAO,YAAY;AAAA,EACpC,yBAAyB,UAAU,OAAO,YAAY;AAAA,EACtD,qBAAqB,UAAU,OAAO,YAAY;AAAA,EAClD,UAAU,UAAU,KAAK,YAAY,uCAAuC,aAAa;AAAA,EACzF,QAAQ,UAAU,KAAK,YAAY,oCAAoC,aAAa;AAAA,EACpF,YAAY,UAAU,KAAK,YAAY,wCAAwC,aAAa;AAAA,EAC5F,oBAAoB,UAAU,KAC3B,YAAY,2DACZ,aAAa;AAAA,EAChB,gBAAgB,UAAU,KACvB,YAAY,wDACZ,aAAa;AAAA,EAChB,UAAU,UAAU,KAAK,YAAY,kBAAkB,aAAa;AAAA,EACpE,SAAS,UAAU,OAAO,YAAY,yBAAyB,aAAa;AAAA,EAC5E,UAAU,UAAU,KAAK,YAAY;AAAA;AAGvC,iCAAiC,YAAY;AAE7C,MAAM,2CAA2C,SAAS;AAE1D,yCAAyC,YAAY;AAGrD,IAAO,2CAAQ;",
|
6
|
-
"names": []
|
7
|
-
}
|
package/esm/index.js.map
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSIndeterminateProgressIndicator';\nexport { default } from './DSIndeterminateProgressIndicator';\n"],
|
5
|
-
"mappings": "AAAA;ACAA;AACA;",
|
6
|
-
"names": []
|
7
|
-
}
|