@cloudtower/eagle 0.33.37 → 0.33.39
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/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +20 -3
- package/dist/cjs/core/ImmersiveDialog/index.js +174 -0
- package/dist/cjs/core/ImmersiveDialog/styles.js +31 -0
- package/dist/cjs/core/WizardDialog/index.js +166 -0
- package/dist/cjs/core/WizardDialog/styles.js +9 -0
- package/dist/cjs/index.js +125 -121
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3261 -3114
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +20 -3
- package/dist/esm/core/ImmersiveDialog/index.js +168 -0
- package/dist/esm/core/ImmersiveDialog/styles.js +16 -0
- package/dist/esm/core/WizardDialog/index.js +160 -0
- package/dist/esm/core/WizardDialog/styles.js +5 -0
- package/dist/esm/index.js +5 -3
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +4098 -3927
- package/dist/src/core/ImmersiveDialog/index.d.ts +3 -0
- package/dist/src/core/ImmersiveDialog/styles.d.ts +14 -0
- package/dist/src/core/ImmersiveDialog/type.d.ts +33 -0
- package/dist/src/core/WizardDialog/index.d.ts +3 -0
- package/dist/src/core/WizardDialog/styles.d.ts +3 -0
- package/dist/src/core/WizardDialog/type.d.ts +31 -0
- package/dist/src/core/index.d.ts +5 -3
- package/dist/stories/docs/core/FieldsDateTimeRange.stories.d.ts +1 -0
- package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +93 -0
- package/dist/stories/docs/core/Modal.stories.d.ts +0 -2
- package/dist/stories/docs/core/WizardDialog.stories.d.ts +106 -0
- package/dist/style.css +3261 -3114
- package/package.json +4 -4
|
@@ -9,9 +9,25 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
11
|
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __defProps = Object.defineProperties;
|
|
14
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
12
15
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
13
16
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
17
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
+
var __spreadValues = (a, b) => {
|
|
20
|
+
for (var prop in b || (b = {}))
|
|
21
|
+
if (__hasOwnProp.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
if (__getOwnPropSymbols)
|
|
24
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
+
if (__propIsEnum.call(b, prop))
|
|
26
|
+
__defNormalProp(a, prop, b[prop]);
|
|
27
|
+
}
|
|
28
|
+
return a;
|
|
29
|
+
};
|
|
30
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
15
31
|
var __objRest = (source, exclude) => {
|
|
16
32
|
var target = {};
|
|
17
33
|
for (var prop in source)
|
|
@@ -33,7 +49,9 @@ const FieldsDateTimeRange = (_a) => {
|
|
|
33
49
|
var _a2, _b2;
|
|
34
50
|
return /* @__PURE__ */ React__default.default.createElement("div", { className: "datatime-range" }, /* @__PURE__ */ React__default.default.createElement(
|
|
35
51
|
antd.DatePicker.RangePicker,
|
|
36
|
-
{
|
|
52
|
+
__spreadProps(__spreadValues({
|
|
53
|
+
showTime: true
|
|
54
|
+
}, input), {
|
|
37
55
|
onFocus: () => {
|
|
38
56
|
var _a3;
|
|
39
57
|
return (_a3 = input.onFocus) == null ? void 0 : _a3.call(input);
|
|
@@ -42,12 +60,11 @@ const FieldsDateTimeRange = (_a) => {
|
|
|
42
60
|
var _a3;
|
|
43
61
|
return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
|
|
44
62
|
},
|
|
45
|
-
showTime: true,
|
|
46
63
|
defaultValue: (_a2 = input.value) == null ? void 0 : _a2.map((v) => v && moment__default.default(v)),
|
|
47
64
|
onChange: input.onChange,
|
|
48
65
|
value: (_b2 = input.value) == null ? void 0 : _b2.map((v) => v && moment__default.default(v)),
|
|
49
66
|
format: props.format
|
|
50
|
-
}
|
|
67
|
+
})
|
|
51
68
|
));
|
|
52
69
|
};
|
|
53
70
|
var FieldsDateTimeRange$1 = FieldsDateTimeRange;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var iconsReact = require('@cloudtower/icons-react');
|
|
4
|
+
var core = require('@linaria/core');
|
|
5
|
+
var index$3 = require('../Button/index.js');
|
|
6
|
+
var index = require('../KitStoreProvider/index.js');
|
|
7
|
+
var index$1 = require('../Typo/index.js');
|
|
8
|
+
var index$2 = require('../../coreX/OverflowTooltip/index.js');
|
|
9
|
+
var useParrotTranslation = require('../../hooks/useParrotTranslation.js');
|
|
10
|
+
var antd = require('antd');
|
|
11
|
+
var React = require('react');
|
|
12
|
+
var styles = require('./styles.js');
|
|
13
|
+
|
|
14
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
17
|
+
|
|
18
|
+
var __defProp = Object.defineProperty;
|
|
19
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
20
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
21
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
22
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23
|
+
var __spreadValues = (a, b) => {
|
|
24
|
+
for (var prop in b || (b = {}))
|
|
25
|
+
if (__hasOwnProp.call(b, prop))
|
|
26
|
+
__defNormalProp(a, prop, b[prop]);
|
|
27
|
+
if (__getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
29
|
+
if (__propIsEnum.call(b, prop))
|
|
30
|
+
__defNormalProp(a, prop, b[prop]);
|
|
31
|
+
}
|
|
32
|
+
return a;
|
|
33
|
+
};
|
|
34
|
+
var __objRest = (source, exclude) => {
|
|
35
|
+
var target = {};
|
|
36
|
+
for (var prop in source)
|
|
37
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
38
|
+
target[prop] = source[prop];
|
|
39
|
+
if (source != null && __getOwnPropSymbols)
|
|
40
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
41
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
42
|
+
target[prop] = source[prop];
|
|
43
|
+
}
|
|
44
|
+
return target;
|
|
45
|
+
};
|
|
46
|
+
function ImmersiveDialog(props) {
|
|
47
|
+
const _a = props, {
|
|
48
|
+
className,
|
|
49
|
+
title,
|
|
50
|
+
children,
|
|
51
|
+
footerLeftAction,
|
|
52
|
+
left,
|
|
53
|
+
right,
|
|
54
|
+
closeIcon,
|
|
55
|
+
footer,
|
|
56
|
+
showCancel = true,
|
|
57
|
+
showOk = true,
|
|
58
|
+
okLoading,
|
|
59
|
+
okButtonProps,
|
|
60
|
+
cancelButtonProps,
|
|
61
|
+
okText,
|
|
62
|
+
cancelText,
|
|
63
|
+
error,
|
|
64
|
+
visible = true,
|
|
65
|
+
isContentFull,
|
|
66
|
+
onCancel,
|
|
67
|
+
onOk
|
|
68
|
+
} = _a, restProps = __objRest(_a, [
|
|
69
|
+
"className",
|
|
70
|
+
"title",
|
|
71
|
+
"children",
|
|
72
|
+
"footerLeftAction",
|
|
73
|
+
"left",
|
|
74
|
+
"right",
|
|
75
|
+
"closeIcon",
|
|
76
|
+
"footer",
|
|
77
|
+
"showCancel",
|
|
78
|
+
"showOk",
|
|
79
|
+
"okLoading",
|
|
80
|
+
"okButtonProps",
|
|
81
|
+
"cancelButtonProps",
|
|
82
|
+
"okText",
|
|
83
|
+
"cancelText",
|
|
84
|
+
"error",
|
|
85
|
+
"visible",
|
|
86
|
+
"isContentFull",
|
|
87
|
+
"onCancel",
|
|
88
|
+
"onOk"
|
|
89
|
+
]);
|
|
90
|
+
const { t } = useParrotTranslation();
|
|
91
|
+
const popModal = index.usePopModal();
|
|
92
|
+
const _confirmText = React.useMemo(() => {
|
|
93
|
+
let text = okText || t("common.confirm");
|
|
94
|
+
return text;
|
|
95
|
+
}, [okText, t]);
|
|
96
|
+
const finalFooter = React.useMemo(() => {
|
|
97
|
+
return footer || /* @__PURE__ */ React__default.default.createElement("div", { className: styles.FooterStyle }, /* @__PURE__ */ React__default.default.createElement("div", { className: styles.FooterButtonStyle }, footerLeftAction, error && /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement("span", { className: core.cx(styles.ErrorStyle, index$1.Typo.Label.l2_regular) }, /* @__PURE__ */ React__default.default.createElement(
|
|
98
|
+
iconsReact.ExclamationErrorCircleFill16RedIcon,
|
|
99
|
+
{
|
|
100
|
+
className: styles.ErrorIconStyle
|
|
101
|
+
}
|
|
102
|
+
), /* @__PURE__ */ React__default.default.createElement(
|
|
103
|
+
index$2,
|
|
104
|
+
{
|
|
105
|
+
className: styles.ErrorTextStyle,
|
|
106
|
+
multiLines: 3,
|
|
107
|
+
content: error,
|
|
108
|
+
tooltip: error
|
|
109
|
+
}
|
|
110
|
+
)))), /* @__PURE__ */ React__default.default.createElement("div", { className: styles.FooterButtonRightStyle }, showCancel ? /* @__PURE__ */ React__default.default.createElement(
|
|
111
|
+
index$3,
|
|
112
|
+
__spreadValues({
|
|
113
|
+
type: "quiet",
|
|
114
|
+
className: styles.CancelButtonStyle,
|
|
115
|
+
onMouseDown: (e) => {
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
},
|
|
118
|
+
onClick: (e) => {
|
|
119
|
+
popModal();
|
|
120
|
+
onCancel == null ? void 0 : onCancel(e);
|
|
121
|
+
}
|
|
122
|
+
}, cancelButtonProps),
|
|
123
|
+
cancelText || t("common.cancel")
|
|
124
|
+
) : null, showOk ? /* @__PURE__ */ React__default.default.createElement(
|
|
125
|
+
index$3,
|
|
126
|
+
__spreadValues({
|
|
127
|
+
onClick: (e) => {
|
|
128
|
+
onOk == null ? void 0 : onOk(e);
|
|
129
|
+
},
|
|
130
|
+
type: "primary",
|
|
131
|
+
loading: okLoading
|
|
132
|
+
}, okButtonProps),
|
|
133
|
+
_confirmText
|
|
134
|
+
) : null));
|
|
135
|
+
}, [
|
|
136
|
+
footerLeftAction,
|
|
137
|
+
_confirmText,
|
|
138
|
+
cancelButtonProps,
|
|
139
|
+
cancelText,
|
|
140
|
+
error,
|
|
141
|
+
footer,
|
|
142
|
+
okButtonProps,
|
|
143
|
+
okLoading,
|
|
144
|
+
onCancel,
|
|
145
|
+
onOk,
|
|
146
|
+
popModal,
|
|
147
|
+
showCancel,
|
|
148
|
+
showOk,
|
|
149
|
+
t
|
|
150
|
+
]);
|
|
151
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
152
|
+
antd.Modal,
|
|
153
|
+
__spreadValues({
|
|
154
|
+
width: "calc(100% - 20px)",
|
|
155
|
+
title: /* @__PURE__ */ React__default.default.createElement("span", { className: core.cx(index$1.Typo.Display.d1_bold_title, styles.TitleStyle) }, title),
|
|
156
|
+
className: core.cx(
|
|
157
|
+
styles.ImmersiveDialogStyle,
|
|
158
|
+
isContentFull ? styles.FullContentStyle : styles.MultiAreaStyle,
|
|
159
|
+
className
|
|
160
|
+
),
|
|
161
|
+
closeIcon: closeIcon != null ? closeIcon : /* @__PURE__ */ React__default.default.createElement("span", { className: styles.CloseIconStyle }, /* @__PURE__ */ React__default.default.createElement(iconsReact.XmarkClose24BoldSecondaryIcon, null)),
|
|
162
|
+
footer: finalFooter,
|
|
163
|
+
onCancel: (e) => {
|
|
164
|
+
popModal();
|
|
165
|
+
onCancel == null ? void 0 : onCancel(e);
|
|
166
|
+
},
|
|
167
|
+
visible,
|
|
168
|
+
destroyOnClose: true
|
|
169
|
+
}, restProps),
|
|
170
|
+
/* @__PURE__ */ React__default.default.createElement("div", { className: core.cx(styles.BodyStyle, isContentFull ? "" : styles.MultiAreaBodyStyle) }, isContentFull ? null : /* @__PURE__ */ React__default.default.createElement("div", { className: "left" }, left), /* @__PURE__ */ React__default.default.createElement("div", { className: "middle" }, children), isContentFull ? null : /* @__PURE__ */ React__default.default.createElement("div", { className: "right" }, right))
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
exports.ImmersiveDialog = ImmersiveDialog;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const ImmersiveDialogStyle = "E_icab5o7";
|
|
4
|
+
const MultiAreaStyle = "E_msiso3p";
|
|
5
|
+
const CloseIconStyle = "E_cxvrrew";
|
|
6
|
+
const TitleStyle = "E_tskzd0j";
|
|
7
|
+
const FullContentStyle = "E_f1fbnfp";
|
|
8
|
+
const BodyStyle = "E_b4g2nsx";
|
|
9
|
+
const MultiAreaBodyStyle = "E_myhed70";
|
|
10
|
+
const FooterStyle = "E_fo07jei";
|
|
11
|
+
const FooterButtonStyle = "E_fph3s12";
|
|
12
|
+
const FooterButtonRightStyle = "E_f1f8uj0i";
|
|
13
|
+
const ErrorStyle = "E_ejcjd85";
|
|
14
|
+
const ErrorIconStyle = "E_e1lj3r2s";
|
|
15
|
+
const ErrorTextStyle = "E_eb58k2y";
|
|
16
|
+
const CancelButtonStyle = "E_c1bad0d";
|
|
17
|
+
|
|
18
|
+
exports.BodyStyle = BodyStyle;
|
|
19
|
+
exports.CancelButtonStyle = CancelButtonStyle;
|
|
20
|
+
exports.CloseIconStyle = CloseIconStyle;
|
|
21
|
+
exports.ErrorIconStyle = ErrorIconStyle;
|
|
22
|
+
exports.ErrorStyle = ErrorStyle;
|
|
23
|
+
exports.ErrorTextStyle = ErrorTextStyle;
|
|
24
|
+
exports.FooterButtonRightStyle = FooterButtonRightStyle;
|
|
25
|
+
exports.FooterButtonStyle = FooterButtonStyle;
|
|
26
|
+
exports.FooterStyle = FooterStyle;
|
|
27
|
+
exports.FullContentStyle = FullContentStyle;
|
|
28
|
+
exports.ImmersiveDialogStyle = ImmersiveDialogStyle;
|
|
29
|
+
exports.MultiAreaBodyStyle = MultiAreaBodyStyle;
|
|
30
|
+
exports.MultiAreaStyle = MultiAreaStyle;
|
|
31
|
+
exports.TitleStyle = TitleStyle;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var iconsReact = require('@cloudtower/icons-react');
|
|
4
|
+
var index$1 = require('../Button/index.js');
|
|
5
|
+
var index = require('../ImmersiveDialog/index.js');
|
|
6
|
+
var index$2 = require('../Steps/index.js');
|
|
7
|
+
var useParrotTranslation = require('../../hooks/useParrotTranslation.js');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var styles = require('./styles.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
|
+
|
|
15
|
+
var __defProp = Object.defineProperty;
|
|
16
|
+
var __defProps = Object.defineProperties;
|
|
17
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
18
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
19
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
20
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
21
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22
|
+
var __spreadValues = (a, b) => {
|
|
23
|
+
for (var prop in b || (b = {}))
|
|
24
|
+
if (__hasOwnProp.call(b, prop))
|
|
25
|
+
__defNormalProp(a, prop, b[prop]);
|
|
26
|
+
if (__getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
28
|
+
if (__propIsEnum.call(b, prop))
|
|
29
|
+
__defNormalProp(a, prop, b[prop]);
|
|
30
|
+
}
|
|
31
|
+
return a;
|
|
32
|
+
};
|
|
33
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
34
|
+
var __objRest = (source, exclude) => {
|
|
35
|
+
var target = {};
|
|
36
|
+
for (var prop in source)
|
|
37
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
38
|
+
target[prop] = source[prop];
|
|
39
|
+
if (source != null && __getOwnPropSymbols)
|
|
40
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
41
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
42
|
+
target[prop] = source[prop];
|
|
43
|
+
}
|
|
44
|
+
return target;
|
|
45
|
+
};
|
|
46
|
+
function WizardDialog(props) {
|
|
47
|
+
const _a = props, {
|
|
48
|
+
className,
|
|
49
|
+
steps,
|
|
50
|
+
step,
|
|
51
|
+
children,
|
|
52
|
+
hideSteps,
|
|
53
|
+
destroyOtherStep,
|
|
54
|
+
prevText,
|
|
55
|
+
nextText,
|
|
56
|
+
onPrevStep,
|
|
57
|
+
onNextStep,
|
|
58
|
+
onStepChange,
|
|
59
|
+
left,
|
|
60
|
+
right,
|
|
61
|
+
okText,
|
|
62
|
+
onOk
|
|
63
|
+
} = _a, restProps = __objRest(_a, [
|
|
64
|
+
"className",
|
|
65
|
+
"steps",
|
|
66
|
+
"step",
|
|
67
|
+
"children",
|
|
68
|
+
"hideSteps",
|
|
69
|
+
"destroyOtherStep",
|
|
70
|
+
"prevText",
|
|
71
|
+
"nextText",
|
|
72
|
+
"onPrevStep",
|
|
73
|
+
"onNextStep",
|
|
74
|
+
"onStepChange",
|
|
75
|
+
"left",
|
|
76
|
+
"right",
|
|
77
|
+
"okText",
|
|
78
|
+
"onOk"
|
|
79
|
+
]);
|
|
80
|
+
const { t } = useParrotTranslation();
|
|
81
|
+
const [_step, _setStep] = React.useState(step || 0);
|
|
82
|
+
const stepVal = React.useMemo(() => step != null ? step : _step, [step, _step]);
|
|
83
|
+
const content = React.useMemo(() => {
|
|
84
|
+
var _a2;
|
|
85
|
+
if (destroyOtherStep) {
|
|
86
|
+
return ((_a2 = steps == null ? void 0 : steps[stepVal]) == null ? void 0 : _a2.children) || children;
|
|
87
|
+
}
|
|
88
|
+
return (steps == null ? void 0 : steps.map((s, index) => /* @__PURE__ */ React__default.default.createElement(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
key: s.title,
|
|
92
|
+
className: styles.StepContentStyle,
|
|
93
|
+
style: {
|
|
94
|
+
display: stepVal === index ? "block" : "none"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
s.children
|
|
98
|
+
))) || children;
|
|
99
|
+
}, [children, destroyOtherStep, steps, stepVal]);
|
|
100
|
+
const _confirmText = React.useMemo(() => {
|
|
101
|
+
let text = okText || t("common.confirm");
|
|
102
|
+
if (steps == null ? void 0 : steps.length) {
|
|
103
|
+
text = stepVal < steps.length - 1 ? nextText || t("common.next_step") : text;
|
|
104
|
+
}
|
|
105
|
+
return text;
|
|
106
|
+
}, [okText, t, steps == null ? void 0 : steps.length, stepVal, nextText]);
|
|
107
|
+
React.useEffect(() => {
|
|
108
|
+
if (step) {
|
|
109
|
+
_setStep(step);
|
|
110
|
+
}
|
|
111
|
+
}, [step]);
|
|
112
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
113
|
+
index.ImmersiveDialog,
|
|
114
|
+
__spreadProps(__spreadValues({
|
|
115
|
+
className,
|
|
116
|
+
footerLeftAction: stepVal > 0 ? /* @__PURE__ */ React__default.default.createElement(
|
|
117
|
+
index$1,
|
|
118
|
+
{
|
|
119
|
+
type: "link",
|
|
120
|
+
onClick: () => {
|
|
121
|
+
const newStep = stepVal - 1;
|
|
122
|
+
_setStep(newStep);
|
|
123
|
+
onPrevStep == null ? void 0 : onPrevStep(newStep);
|
|
124
|
+
onStepChange == null ? void 0 : onStepChange(newStep);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
/* @__PURE__ */ React__default.default.createElement(iconsReact.ArrowChevronLeft16BoldBlueIcon, { className: styles.PrevIconStyle }),
|
|
128
|
+
prevText || t("common.prev_step")
|
|
129
|
+
) : null,
|
|
130
|
+
left: left || (steps && steps.length > 0 && !hideSteps ? /* @__PURE__ */ React__default.default.createElement(
|
|
131
|
+
index$2,
|
|
132
|
+
{
|
|
133
|
+
containerClassname: styles.StepStyle,
|
|
134
|
+
current: stepVal,
|
|
135
|
+
onChange: (value) => {
|
|
136
|
+
_setStep(value);
|
|
137
|
+
onStepChange == null ? void 0 : onStepChange(value);
|
|
138
|
+
},
|
|
139
|
+
direction: "vertical",
|
|
140
|
+
stepsConfig: steps.map((s) => ({
|
|
141
|
+
title: s.title
|
|
142
|
+
}))
|
|
143
|
+
}
|
|
144
|
+
) : null),
|
|
145
|
+
right,
|
|
146
|
+
okText: _confirmText,
|
|
147
|
+
onOk: (e) => {
|
|
148
|
+
if (stepVal < ((steps == null ? void 0 : steps.length) || 0) - 1) {
|
|
149
|
+
const newStep = stepVal + 1;
|
|
150
|
+
const prevent = (onNextStep == null ? void 0 : onNextStep(newStep)) === false;
|
|
151
|
+
if (!prevent) {
|
|
152
|
+
_setStep(newStep);
|
|
153
|
+
onStepChange == null ? void 0 : onStepChange(newStep);
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
onOk == null ? void 0 : onOk(e);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, restProps), {
|
|
160
|
+
isContentFull: false
|
|
161
|
+
}),
|
|
162
|
+
content
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
exports.WizardDialog = WizardDialog;
|