@elliemae/ds-wizard 3.2.1-rc.4 → 3.2.1-rc.7

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.
@@ -3,34 +3,8 @@ var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
6
  var __getProtoOf = Object.getPrototypeOf;
8
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __objRest = (source, exclude) => {
23
- var target = {};
24
- for (var prop in source)
25
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
- target[prop] = source[prop];
27
- if (source != null && __getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(source)) {
29
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
- target[prop] = source[prop];
31
- }
32
- return target;
33
- };
34
8
  var __export = (target, all) => {
35
9
  for (var name in all)
36
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -58,19 +32,22 @@ var import_ds_classnames = require("@elliemae/ds-classnames");
58
32
  var import_WizardStep = __toESM(require("./WizardStep"));
59
33
  var import_blockNames = require("./blockNames");
60
34
  const StepsWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(import_blockNames.indicatorBlockName);
61
- function WizardSteps(_a) {
62
- var _b = _a, { current = 0, steps, children } = _b, otherProps = __objRest(_b, ["current", "steps", "children"]);
35
+ function WizardSteps({ current = 0, steps, children, ...otherProps }) {
63
36
  const items = (0, import_react.useMemo)(() => {
64
37
  const mergeStepProps = (step, index) => ({
65
38
  index,
66
39
  active: current === index,
67
40
  completed: index < current
68
41
  });
69
- return steps ? steps.map((step, index) => /* @__PURE__ */ import_react.default.createElement(import_WizardStep.default, __spreadValues(__spreadValues({
70
- key: index
71
- }, step), mergeStepProps(step, index)))) : import_react.default.Children.map(children, (item, index) => (0, import_react.cloneElement)(item, mergeStepProps(item, index)));
42
+ return steps ? steps.map((step, index) => /* @__PURE__ */ import_react.default.createElement(import_WizardStep.default, {
43
+ key: index,
44
+ ...step,
45
+ ...mergeStepProps(step, index)
46
+ })) : import_react.default.Children.map(children, (item, index) => (0, import_react.cloneElement)(item, mergeStepProps(item, index)));
72
47
  }, [current, children]);
73
- return /* @__PURE__ */ import_react.default.createElement(StepsWrapper, __spreadValues({}, otherProps), items);
48
+ return /* @__PURE__ */ import_react.default.createElement(StepsWrapper, {
49
+ ...otherProps
50
+ }, items);
74
51
  }
75
52
  WizardSteps.Item = import_WizardStep.default;
76
53
  const wizzardProps = {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/WizardSteps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\nimport React, { cloneElement, useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport WizardStep from './WizardStep';\nimport { indicatorBlockName } from './blockNames';\n\nconst StepsWrapper = aggregatedClasses('div')(indicatorBlockName);\n\nfunction WizardSteps({ current = 0, steps, children, ...otherProps }) {\n const items = useMemo(() => {\n const mergeStepProps = (step, index) => ({\n index,\n active: current === index,\n completed: index < current,\n });\n\n return steps\n ? steps.map((step, index) => (\n <WizardStep key={index} {...step} {...mergeStepProps(step, index)} />\n ))\n : React.Children.map(children, (item, index) =>\n cloneElement(item, mergeStepProps(item, index)),\n );\n }, [current, children]);\n\n return <StepsWrapper {...otherProps}>{items}</StepsWrapper>;\n}\n\nWizardSteps.Item = WizardStep;\n\nconst wizzardProps = {\n current: PropTypes.number\n .description('Current active state index')\n .defaultValue(0),\n steps: PropTypes.arrayOf(PropTypes.shape({}))\n .description('Array of steps objects')\n .defaultValue([]).isRequired,\n children: PropTypes.arrayOf(PropTypes.instanceOf(WizardStep)).description(\n 'List of WizardStep components',\n ),\n};\n\nWizardSteps.propTypes = wizzardProps;\nWizardSteps.displayName = 'WizardSteps';\nconst WizzardWithSchema = describe(WizardSteps);\nWizzardWithSchema.propTypes = wizzardProps;\n\nexport { WizzardWithSchema };\nexport default WizardSteps;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA6C;AAC7C,0BAAoC;AACpC,2BAAkC;AAClC,wBAAuB;AACvB,wBAAmC;AAEnC,MAAM,eAAe,4CAAkB,KAAK,EAAE,oCAAkB;AAEhE,qBAAqB,IAAiD;AAAjD,eAAE,YAAU,GAAG,OAAO,aAAtB,IAAmC,uBAAnC,IAAmC,CAAjC,WAAa,SAAO;AACzC,QAAM,QAAQ,0BAAQ,MAAM;AAC1B,UAAM,iBAAiB,CAAC,MAAM,UAAW;AAAA,MACvC;AAAA,MACA,QAAQ,YAAY;AAAA,MACpB,WAAW,QAAQ;AAAA,IACrB;AAEA,WAAO,QACH,MAAM,IAAI,CAAC,MAAM,UACf,mDAAC;AAAA,MAAW,KAAK;AAAA,OAAW,OAAU,eAAe,MAAM,KAAK,EAAG,CACpE,IACD,qBAAM,SAAS,IAAI,UAAU,CAAC,MAAM,UAClC,+BAAa,MAAM,eAAe,MAA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AAAA,IAAc,GAAG;AAAA,KAAa,KAAM;AAC9C;AAEA,YAAY,OAAO;AAEnB,MAAM,eAAe;AAAA,EACnB,SAAS,8BAAU,OAChB,YAAY,4BAA4B,EACxC,aAAa,CAAC;AAAA,EACjB,OAAO,8BAAU,QAAQ,8BAAU,MAAM,CAAC,CAAC,CAAC,EACzC,YAAY,wBAAwB,EACpC,aAAa,CAAC,CAAC,EAAE;AAAA,EACpB,UAAU,8BAAU,QAAQ,8BAAU,WAAW,yBAAU,CAAC,EAAE,YAC5D,+BACF;AACF;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,oBAAoB,kCAAS,WAAW;AAC9C,kBAAkB,YAAY;AAG9B,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,32 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
- var __objRest = (source, exclude) => {
19
- var target = {};
20
- for (var prop in source)
21
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
22
- target[prop] = source[prop];
23
- if (source != null && __getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(source)) {
25
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
26
- target[prop] = source[prop];
27
- }
28
- return target;
29
- };
30
2
  import * as React from "react";
31
3
  import React2, { cloneElement, useMemo } from "react";
32
4
  import { describe, PropTypes } from "@elliemae/ds-utilities";
@@ -34,19 +6,22 @@ import { aggregatedClasses } from "@elliemae/ds-classnames";
34
6
  import WizardStep from "./WizardStep";
35
7
  import { indicatorBlockName } from "./blockNames";
36
8
  const StepsWrapper = aggregatedClasses("div")(indicatorBlockName);
37
- function WizardSteps(_a) {
38
- var _b = _a, { current = 0, steps, children } = _b, otherProps = __objRest(_b, ["current", "steps", "children"]);
9
+ function WizardSteps({ current = 0, steps, children, ...otherProps }) {
39
10
  const items = useMemo(() => {
40
11
  const mergeStepProps = (step, index) => ({
41
12
  index,
42
13
  active: current === index,
43
14
  completed: index < current
44
15
  });
45
- return steps ? steps.map((step, index) => /* @__PURE__ */ React2.createElement(WizardStep, __spreadValues(__spreadValues({
46
- key: index
47
- }, step), mergeStepProps(step, index)))) : React2.Children.map(children, (item, index) => cloneElement(item, mergeStepProps(item, index)));
16
+ return steps ? steps.map((step, index) => /* @__PURE__ */ React2.createElement(WizardStep, {
17
+ key: index,
18
+ ...step,
19
+ ...mergeStepProps(step, index)
20
+ })) : React2.Children.map(children, (item, index) => cloneElement(item, mergeStepProps(item, index)));
48
21
  }, [current, children]);
49
- return /* @__PURE__ */ React2.createElement(StepsWrapper, __spreadValues({}, otherProps), items);
22
+ return /* @__PURE__ */ React2.createElement(StepsWrapper, {
23
+ ...otherProps
24
+ }, items);
50
25
  }
51
26
  WizardSteps.Item = WizardStep;
52
27
  const wizzardProps = {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/WizardSteps.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable react/no-array-index-key */\nimport React, { cloneElement, useMemo } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport WizardStep from './WizardStep';\nimport { indicatorBlockName } from './blockNames';\n\nconst StepsWrapper = aggregatedClasses('div')(indicatorBlockName);\n\nfunction WizardSteps({ current = 0, steps, children, ...otherProps }) {\n const items = useMemo(() => {\n const mergeStepProps = (step, index) => ({\n index,\n active: current === index,\n completed: index < current,\n });\n\n return steps\n ? steps.map((step, index) => (\n <WizardStep key={index} {...step} {...mergeStepProps(step, index)} />\n ))\n : React.Children.map(children, (item, index) =>\n cloneElement(item, mergeStepProps(item, index)),\n );\n }, [current, children]);\n\n return <StepsWrapper {...otherProps}>{items}</StepsWrapper>;\n}\n\nWizardSteps.Item = WizardStep;\n\nconst wizzardProps = {\n current: PropTypes.number\n .description('Current active state index')\n .defaultValue(0),\n steps: PropTypes.arrayOf(PropTypes.shape({}))\n .description('Array of steps objects')\n .defaultValue([]).isRequired,\n children: PropTypes.arrayOf(PropTypes.instanceOf(WizardStep)).description(\n 'List of WizardStep components',\n ),\n};\n\nWizardSteps.propTypes = wizzardProps;\nWizardSteps.displayName = 'WizardSteps';\nconst WizzardWithSchema = describe(WizardSteps);\nWizzardWithSchema.propTypes = wizzardProps;\n\nexport { WizzardWithSchema };\nexport default WizardSteps;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AACA;AACA;AACA;AAEA,MAAM,eAAe,kBAAkB,KAAK,EAAE,kBAAkB;AAEhE,qBAAqB,IAAiD;AAAjD,eAAE,YAAU,GAAG,OAAO,aAAtB,IAAmC,uBAAnC,IAAmC,CAAjC,WAAa,SAAO;AACzC,QAAM,QAAQ,QAAQ,MAAM;AAC1B,UAAM,iBAAiB,CAAC,MAAM,UAAW;AAAA,MACvC;AAAA,MACA,QAAQ,YAAY;AAAA,MACpB,WAAW,QAAQ;AAAA,IACrB;AAEA,WAAO,QACH,MAAM,IAAI,CAAC,MAAM,UACf,qCAAC;AAAA,MAAW,KAAK;AAAA,OAAW,OAAU,eAAe,MAAM,KAAK,EAAG,CACpE,IACD,OAAM,SAAS,IAAI,UAAU,CA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SAAS,UAAU,OAChB,YAAY,4BAA4B,EACxC,aAAa,CAAC;AAAA,EACjB,OAAO,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC,CAAC,EACzC,YAAY,wBAAwB,EACpC,aAAa,CAAC,CAAC,EAAE;AAAA,EACpB,UAAU,UAAU,QAAQ,UAAU,WAAW,UAAU,CAAC,EAAE,YAC5D,+BACF;AACF;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,oBAAoB,SAAS,WAAW;AAC9C,kBAAkB,YAAY;AAG9B,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-wizard",
3
- "version": "3.2.1-rc.4",
3
+ "version": "3.2.1-rc.7",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Wizard",
6
6
  "files": [
@@ -55,9 +55,9 @@
55
55
  "indent": 4
56
56
  },
57
57
  "dependencies": {
58
- "@elliemae/ds-classnames": "3.2.1-rc.4",
59
- "@elliemae/ds-icons": "3.2.1-rc.4",
60
- "@elliemae/ds-utilities": "3.2.1-rc.4"
58
+ "@elliemae/ds-classnames": "3.2.1-rc.7",
59
+ "@elliemae/ds-icons": "3.2.1-rc.7",
60
+ "@elliemae/ds-utilities": "3.2.1-rc.7"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "lodash": "^4.17.21",