@elliemae/ds-progress-indicator 3.1.0-next.0 → 3.1.0-next.11
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.
|
@@ -44,7 +44,7 @@ __export(DSProgressIndicator_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(DSProgressIndicator_exports);
|
|
45
45
|
var React = __toESM(require("react"));
|
|
46
46
|
var import_react = __toESM(require("react"));
|
|
47
|
-
var
|
|
47
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
48
48
|
var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
|
|
49
49
|
var import_ProgressCounter = __toESM(require("./ProgressCounter"));
|
|
50
50
|
var import_ProgressBar = __toESM(require("./ProgressBar"));
|
|
@@ -86,21 +86,21 @@ const DSProgressIndicator = ({
|
|
|
86
86
|
};
|
|
87
87
|
const variants = ["default", "success", "warning", "info", "error"];
|
|
88
88
|
const progressIndicatorProps = {
|
|
89
|
-
containerProps:
|
|
90
|
-
innerRef:
|
|
91
|
-
title:
|
|
92
|
-
variant:
|
|
93
|
-
now:
|
|
94
|
-
min:
|
|
95
|
-
max:
|
|
96
|
-
disabled:
|
|
97
|
-
counterRenderer:
|
|
98
|
-
segments:
|
|
99
|
-
style:
|
|
89
|
+
containerProps: import_ds_utilities.PropTypes.object.description("Set of Properties attached to the main container"),
|
|
90
|
+
innerRef: import_ds_utilities.PropTypes.object.description("ref to the components container"),
|
|
91
|
+
title: import_ds_utilities.PropTypes.string.description("components title"),
|
|
92
|
+
variant: import_ds_utilities.PropTypes.oneOf(variants).description("Progress intent variation"),
|
|
93
|
+
now: import_ds_utilities.PropTypes.number.description("Total current value"),
|
|
94
|
+
min: import_ds_utilities.PropTypes.number.description("min value"),
|
|
95
|
+
max: import_ds_utilities.PropTypes.number.description("max value"),
|
|
96
|
+
disabled: import_ds_utilities.PropTypes.bool.description("Whether the progress indicator disabled or not").defaultValue(false),
|
|
97
|
+
counterRenderer: import_ds_utilities.PropTypes.func.description("Render a custom counter"),
|
|
98
|
+
segments: import_ds_utilities.PropTypes.array.description("An array of multiple progress objects"),
|
|
99
|
+
style: import_ds_utilities.PropTypes.object.description("css inline style")
|
|
100
100
|
};
|
|
101
101
|
DSProgressIndicator.propTypes = progressIndicatorProps;
|
|
102
102
|
DSProgressIndicator.displayName = "DSProgressIndicator";
|
|
103
|
-
const ProgressIndicatorWithSchema = (0,
|
|
103
|
+
const ProgressIndicatorWithSchema = (0, import_ds_utilities.describe)(DSProgressIndicator);
|
|
104
104
|
ProgressIndicatorWithSchema.propTypes = progressIndicatorProps;
|
|
105
105
|
DSProgressIndicator.ProgressBar = import_ProgressBar.default;
|
|
106
106
|
var DSProgressIndicator_default = DSProgressIndicator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSProgressIndicator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\nDSProgressIndicator.displayName = 'DSProgressIndicator';\nconst ProgressIndicatorWithSchema = describe(DSProgressIndicator);\nProgressIndicatorWithSchema.propTypes = progressIndicatorProps;\n\nDSProgressIndicator.ProgressBar = ProgressBar;\n\nexport { DSProgressIndicator, ProgressIndicatorWithSchema };\nexport default DSProgressIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+B;AAC/B,0BAAoC;AACpC,uCAAmC;AACnC,6BAAoB;AACpB,yBAAwB;AACxB,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AAW;AAAA,EAC7C,UAAU,8BAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,KAAK;AAAA,EACrB,iBAAiB,8BAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,8BAAU,MAAM,YACxB,uCACF;AAAA,EACA,OAAO,8BAAU,OAAO,YAAY,kBAAkB;AACxD;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,8BAA8B,kCAAS,mBAAmB;AAChE,4BAA4B,YAAY;AAExC,oBAAoB,cAAc;AAGlC,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import * as React from "react";
|
|
21
21
|
import React2, { useMemo } from "react";
|
|
22
|
-
import { describe, PropTypes } from "
|
|
22
|
+
import { describe, PropTypes } from "@elliemae/ds-utilities";
|
|
23
23
|
import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
|
|
24
24
|
import Counter from "./ProgressCounter";
|
|
25
25
|
import ProgressBar from "./ProgressBar";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSProgressIndicator.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from '
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React, { useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport Counter from './ProgressCounter';\nimport ProgressBar from './ProgressBar';\nimport { Title, Wrapper } from './classedComponents';\n\nconst DSProgressIndicator = ({\n containerProps = {},\n innerRef = () => null,\n title = '',\n counterRenderer = undefined,\n now = undefined,\n min = 0,\n max = undefined,\n disabled = false,\n segments = [],\n style = {},\n}) => {\n const renderProgressBar = useMemo(\n () =>\n segments.length ? (\n <ProgressBar>\n {segments.map(\n (segmentProps, i) =>\n !(segmentProps.now < segmentProps.min) && (\n <ProgressBar.Segment key={i} {...segmentProps} />\n ),\n )}\n </ProgressBar>\n ) : (\n <ProgressBar max={max} min={min} now={now} />\n ),\n [segments, min, max, now],\n );\n\n return (\n <Wrapper\n ref={innerRef}\n aria-disabled={disabled}\n classProps={{ disabled }}\n {...containerProps}\n style={style}\n >\n <DSTruncatedTooltipText containerComponent={Title} value={title} />\n <Counter max={max} min={min} now={now} renderer={counterRenderer} />\n {renderProgressBar}\n </Wrapper>\n );\n};\n\nconst variants = ['default', 'success', 'warning', 'info', 'error'];\n\nconst progressIndicatorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n innerRef: PropTypes.object.description('ref to the components container'),\n title: PropTypes.string.description('components title'),\n variant: PropTypes.oneOf(variants).description('Progress intent variation'),\n now: PropTypes.number.description('Total current value'),\n min: PropTypes.number.description('min value'),\n max: PropTypes.number.description('max value'),\n disabled: PropTypes.bool\n .description('Whether the progress indicator disabled or not')\n .defaultValue(false),\n counterRenderer: PropTypes.func.description('Render a custom counter'),\n segments: PropTypes.array.description(\n 'An array of multiple progress objects',\n ),\n style: PropTypes.object.description('css inline style'),\n};\n\nDSProgressIndicator.propTypes = progressIndicatorProps;\nDSProgressIndicator.displayName = 'DSProgressIndicator';\nconst ProgressIndicatorWithSchema = describe(DSProgressIndicator);\nProgressIndicatorWithSchema.propTypes = progressIndicatorProps;\n\nDSProgressIndicator.ProgressBar = ProgressBar;\n\nexport { DSProgressIndicator, ProgressIndicatorWithSchema };\nexport default DSProgressIndicator;\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;A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AC7C,UAAU,UAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,KAAK;AAAA,EACrB,iBAAiB,UAAU,KAAK,YAAY,yBAAyB;AAAA,EACrE,UAAU,UAAU,MAAM,YACxB,uCACF;AAAA,EACA,OAAO,UAAU,OAAO,YAAY,kBAAkB;AACxD;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,8BAA8B,SAAS,mBAAmB;AAChE,4BAA4B,YAAY;AAExC,oBAAoB,cAAc;AAGlC,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-progress-indicator",
|
|
3
|
-
"version": "3.1.0-next.
|
|
3
|
+
"version": "3.1.0-next.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Progress Indicator",
|
|
6
6
|
"files": [
|
|
@@ -54,18 +54,11 @@
|
|
|
54
54
|
"reportFile": "tests.xml",
|
|
55
55
|
"indent": 4
|
|
56
56
|
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
59
|
-
"test": "node ../../scripts/testing/test.mjs",
|
|
60
|
-
"lint": "node ../../scripts/lint.mjs",
|
|
61
|
-
"dts": "node ../../scripts/dts.mjs",
|
|
62
|
-
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
63
|
-
},
|
|
64
57
|
"dependencies": {
|
|
65
|
-
"@elliemae/ds-classnames": "3.1.0-next.
|
|
66
|
-
"@elliemae/ds-truncated-tooltip-text": "3.1.0-next.
|
|
67
|
-
"
|
|
68
|
-
"
|
|
58
|
+
"@elliemae/ds-classnames": "3.1.0-next.11",
|
|
59
|
+
"@elliemae/ds-truncated-tooltip-text": "3.1.0-next.11",
|
|
60
|
+
"@elliemae/ds-utilities": "3.1.0-next.11",
|
|
61
|
+
"prop-types": "~15.8.1"
|
|
69
62
|
},
|
|
70
63
|
"peerDependencies": {
|
|
71
64
|
"react": "^17.0.2",
|
|
@@ -74,5 +67,13 @@
|
|
|
74
67
|
"publishConfig": {
|
|
75
68
|
"access": "public",
|
|
76
69
|
"typeSafety": false
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
73
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
74
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
75
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
76
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
77
|
+
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
77
78
|
}
|
|
78
|
-
}
|
|
79
|
+
}
|