@elliemae/ds-indeterminate-progress-indicator 2.0.0-alpha.1 → 2.0.0-alpha.13

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.
@@ -4,6 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
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');
7
13
  var react = require('react');
8
14
  var reactDesc = require('react-desc');
9
15
  var dsClassnames = require('@elliemae/ds-classnames');
@@ -20,27 +26,28 @@ var _div;
20
26
 
21
27
  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; }
22
28
 
23
- 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; }
29
+ 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; }
24
30
  const {
25
31
  cssClassName,
26
32
  classNameBlock,
27
33
  classNameElement
28
34
  } = dsClassnames.convertPropToCssClassName('indeterminate-progress-indicator');
29
35
 
30
- function DSIndeterminateProgressIndicator({
31
- containerProps,
32
- title,
33
- complete,
34
- failed,
35
- processing,
36
- processingComplete,
37
- processingCompleteTitle,
38
- processingFail,
39
- processingFailTitle,
40
- animated,
41
- percent,
42
- lineOnly
43
- }) {
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;
44
51
  const [label, setLabel] = react.useState(title);
45
52
  react.useEffect(() => {
46
53
  if ((processingComplete || processingFail || processing) && (complete || failed)) {
@@ -51,24 +58,20 @@ function DSIndeterminateProgressIndicator({
51
58
  "aria-busy": processing,
52
59
  "aria-label": label,
53
60
  "aria-live": "polite",
54
- className: `${cssClassName} ${!complete && !failed && !processing ? classNameBlock('default') : ''} ${complete ? classNameBlock('complete') : ''} ${// eslint-disable-next-line max-len
55
- failed ? classNameBlock('failed') : ''} ${processing ? classNameBlock('processing') : ''} ${animated && processing ? 'animated' : ''}
56
- ${processingComplete ? classNameBlock('processing-complete') : ''}
57
- ${processingFail ? classNameBlock('processing-fail') : ''}
58
- ${lineOnly ? 'line-only' : null}
59
- `,
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 "),
60
63
  role: "alert"
61
64
  }, containerProps), {}, {
62
- children: [!lineOnly ? /*#__PURE__*/_jsx__default['default'](DSTruncatedTooltipText__default['default'], {
65
+ children: [!lineOnly ? /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
63
66
  className: classNameBlock('tooltip-text'),
64
- containerComponent: _div || (_div = /*#__PURE__*/_jsx__default['default']("div", {})),
67
+ containerComponent: _div || (_div = /*#__PURE__*/_jsx__default["default"]("div", {})),
65
68
  value: label
66
- }) : null, /*#__PURE__*/_jsx__default['default']("div", {
67
- className: `${classNameElement('bar')}`
68
- }, void 0, /*#__PURE__*/_jsx__default['default']("div", {
69
- className: `${classNameElement('bar-indicator')}`,
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')),
70
73
  style: {
71
- width: `${!complete && !failed && !animated && processing ? percent : 100}%`
74
+ width: "".concat(!complete && !failed && !animated && processing ? percent : 100, "%")
72
75
  }
73
76
  }))]
74
77
  }));
@@ -107,4 +110,4 @@ IndeterminateProgressIndicatorWithSchema.propTypes = indeterminateProgressIndica
107
110
 
108
111
  exports.DSIndeterminateProgressIndicator = DSIndeterminateProgressIndicator;
109
112
  exports.IndeterminateProgressIndicatorWithSchema = IndeterminateProgressIndicatorWithSchema;
110
- exports['default'] = DSIndeterminateProgressIndicator;
113
+ exports["default"] = DSIndeterminateProgressIndicator;
package/cjs/index.js CHANGED
@@ -8,4 +8,4 @@ var DSIndeterminateProgressIndicator = require('./DSIndeterminateProgressIndicat
8
8
 
9
9
  exports.DSIndeterminateProgressIndicator = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
10
10
  exports.IndeterminateProgressIndicatorWithSchema = DSIndeterminateProgressIndicator.IndeterminateProgressIndicatorWithSchema;
11
- exports.default = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
11
+ exports["default"] = DSIndeterminateProgressIndicator.DSIndeterminateProgressIndicator;
@@ -1,5 +1,11 @@
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';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
8
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
9
  import { useState, useEffect } from 'react';
4
10
  import { PropTypes, describe } from 'react-desc';
5
11
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
@@ -17,20 +23,21 @@ const {
17
23
  classNameElement
18
24
  } = convertPropToCssClassName('indeterminate-progress-indicator');
19
25
 
20
- function DSIndeterminateProgressIndicator({
21
- containerProps,
22
- title,
23
- complete,
24
- failed,
25
- processing,
26
- processingComplete,
27
- processingCompleteTitle,
28
- processingFail,
29
- processingFailTitle,
30
- animated,
31
- percent,
32
- lineOnly
33
- }) {
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;
34
41
  const [label, setLabel] = useState(title);
35
42
  useEffect(() => {
36
43
  if ((processingComplete || processingFail || processing) && (complete || failed)) {
@@ -41,12 +48,8 @@ function DSIndeterminateProgressIndicator({
41
48
  "aria-busy": processing,
42
49
  "aria-label": label,
43
50
  "aria-live": "polite",
44
- className: `${cssClassName} ${!complete && !failed && !processing ? classNameBlock('default') : ''} ${complete ? classNameBlock('complete') : ''} ${// eslint-disable-next-line max-len
45
- failed ? classNameBlock('failed') : ''} ${processing ? classNameBlock('processing') : ''} ${animated && processing ? 'animated' : ''}
46
- ${processingComplete ? classNameBlock('processing-complete') : ''}
47
- ${processingFail ? classNameBlock('processing-fail') : ''}
48
- ${lineOnly ? 'line-only' : null}
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 "),
50
53
  role: "alert"
51
54
  }, containerProps), {}, {
52
55
  children: [!lineOnly ? /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
@@ -54,11 +57,11 @@ function DSIndeterminateProgressIndicator({
54
57
  containerComponent: _div || (_div = /*#__PURE__*/_jsx("div", {})),
55
58
  value: label
56
59
  }) : null, /*#__PURE__*/_jsx("div", {
57
- className: `${classNameElement('bar')}`
60
+ className: "".concat(classNameElement('bar'))
58
61
  }, void 0, /*#__PURE__*/_jsx("div", {
59
- className: `${classNameElement('bar-indicator')}`,
62
+ className: "".concat(classNameElement('bar-indicator')),
60
63
  style: {
61
- width: `${!complete && !failed && !animated && processing ? percent : 100}%`
64
+ width: "".concat(!complete && !failed && !animated && processing ? percent : 100, "%")
62
65
  }
63
66
  }))]
64
67
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-indeterminate-progress-indicator",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.13",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Indeterminate Progress Indicator",
6
6
  "module": "./esm/index.js",
@@ -36,9 +36,9 @@
36
36
  "build": "node ../../scripts/build/build.js"
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-classnames": "2.0.0-alpha.1",
40
- "@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.1",
41
- "react-desc": "^4.1.3"
39
+ "@elliemae/ds-classnames": "2.0.0-alpha.13",
40
+ "@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.13",
41
+ "react-desc": "~4.1.3"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "^17.0.2",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  declare function DSIndeterminateProgressIndicator({ containerProps, title, complete, failed, processing, processingComplete, processingCompleteTitle, processingFail, processingFailTitle, animated, percent, lineOnly, }: {
3
4
  containerProps: any;
@@ -29,20 +30,76 @@ declare namespace DSIndeterminateProgressIndicator {
29
30
  lineOnly: boolean;
30
31
  };
31
32
  var propTypes: {
33
+ containerProps: {
34
+ defaultValue<T = unknown>(arg: T): {
35
+ deprecated: import("react-desc").PropTypesDescValidator;
36
+ };
37
+ isRequired: import("react-desc").PropTypesDescValidator;
38
+ };
39
+ title: {
40
+ defaultValue<T = unknown>(arg: T): {
41
+ deprecated: import("react-desc").PropTypesDescValidator;
42
+ };
43
+ isRequired: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ processingCompleteTitle: {
46
+ defaultValue<T = unknown>(arg: T): {
47
+ deprecated: import("react-desc").PropTypesDescValidator;
48
+ };
49
+ isRequired: import("react-desc").PropTypesDescValidator;
50
+ };
51
+ processingFailTitle: {
52
+ defaultValue<T = unknown>(arg: T): {
53
+ deprecated: import("react-desc").PropTypesDescValidator;
54
+ };
55
+ isRequired: import("react-desc").PropTypesDescValidator;
56
+ };
57
+ complete: {
58
+ deprecated: import("react-desc").PropTypesDescValidator;
59
+ };
60
+ failed: {
61
+ deprecated: import("react-desc").PropTypesDescValidator;
62
+ };
63
+ processing: {
64
+ deprecated: import("react-desc").PropTypesDescValidator;
65
+ };
66
+ processingComplete: {
67
+ deprecated: import("react-desc").PropTypesDescValidator;
68
+ };
69
+ processingFail: {
70
+ deprecated: import("react-desc").PropTypesDescValidator;
71
+ };
72
+ animated: {
73
+ deprecated: import("react-desc").PropTypesDescValidator;
74
+ };
75
+ percent: {
76
+ deprecated: import("react-desc").PropTypesDescValidator;
77
+ };
78
+ lineOnly: {
79
+ defaultValue<T = unknown>(arg: T): {
80
+ deprecated: import("react-desc").PropTypesDescValidator;
81
+ };
82
+ isRequired: import("react-desc").PropTypesDescValidator;
83
+ };
84
+ };
85
+ }
86
+ declare const IndeterminateProgressIndicatorWithSchema: {
87
+ (props?: {
32
88
  containerProps: any;
33
89
  title: any;
34
- processingCompleteTitle: any;
35
- processingFailTitle: any;
36
90
  complete: any;
37
91
  failed: any;
38
92
  processing: any;
39
93
  processingComplete: any;
94
+ processingCompleteTitle: any;
40
95
  processingFail: any;
96
+ processingFailTitle: any;
41
97
  animated: any;
42
98
  percent: any;
43
99
  lineOnly: any;
44
- };
45
- }
46
- declare const IndeterminateProgressIndicatorWithSchema: any;
100
+ } | undefined): JSX.Element;
101
+ propTypes: unknown;
102
+ toTypescript: () => import("react-desc").TypescriptSchema;
103
+ };
47
104
  export { DSIndeterminateProgressIndicator, IndeterminateProgressIndicatorWithSchema };
48
105
  export default DSIndeterminateProgressIndicator;
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }