@mcurros2/microm 1.1.62-0 → 1.1.64-0

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/index.js CHANGED
@@ -48003,59 +48003,78 @@ function $611d924da195f578$export$166f000a4c5cc84a(props) {
48003
48003
  onCompleted,
48004
48004
  steps.length
48005
48005
  ]);
48006
- return (0, $b4te3$reactjsxruntime.jsxs)((0, $bHLhd.EntityForm), Object.assign({}, rest, {
48006
+ const buttons = (0, $b4te3$react.useMemo)(()=>!(hideNextAndBackWhenCompleted && activeStep === steps.length) && (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Group), {
48007
+ position: activeStep > 0 ? "apart" : "right",
48008
+ style: {
48009
+ flex: "auto"
48010
+ },
48011
+ children: [
48012
+ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Button), {
48013
+ loading: stepValidating,
48014
+ variant: "default",
48015
+ type: "button",
48016
+ onClick: prevStep,
48017
+ display: activeStep > 0 ? "inline-block" : "none",
48018
+ children: prevStepLabel
48019
+ }, "stepper-back"),
48020
+ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Button), {
48021
+ type: "submit",
48022
+ loading: status === null || status === void 0 ? void 0 : status.loading,
48023
+ leftIcon: (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$tablericonsreact.IconCircleCheck), {
48024
+ size: "1.125rem"
48025
+ }),
48026
+ onClick: ()=>$611d924da195f578$var$__awaiter(this, void 0, void 0, function*() {
48027
+ console.log("stepperForm: submit clicked");
48028
+ //await formAPI.handleSubmit()
48029
+ }),
48030
+ display: formMode !== "view" && activeStep === steps.length - 1 ? "inline-block" : "none",
48031
+ children: activeStepItem.nextStepLabel || nextStepLabel
48032
+ }, "stepper-submit"),
48033
+ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Button), {
48034
+ loading: stepValidating,
48035
+ onClick: nextStep,
48036
+ type: "button",
48037
+ display: activeStep < steps.length - 1 ? "inline-block" : "none",
48038
+ children: (stepValid[activeStep] ? activeStepItem.nextStepValidLabel : activeStepItem.nextStepLabel) || nextStepLabel
48039
+ }, "stepper-next")
48040
+ ]
48041
+ }), [
48042
+ activeStep,
48043
+ activeStepItem.nextStepLabel,
48044
+ activeStepItem.nextStepValidLabel,
48045
+ formMode,
48046
+ hideNextAndBackWhenCompleted,
48047
+ nextStep,
48048
+ nextStepLabel,
48049
+ prevStep,
48050
+ prevStepLabel,
48051
+ status === null || status === void 0 ? void 0 : status.loading,
48052
+ stepValid,
48053
+ stepValidating,
48054
+ steps.length
48055
+ ]);
48056
+ return (0, $b4te3$reactjsxruntime.jsx)((0, $bHLhd.EntityForm), Object.assign({}, rest, {
48057
+ buttons: buttons,
48007
48058
  formAPI: formAPI,
48008
48059
  showCancel: false,
48009
48060
  showOK: false,
48010
48061
  OKText: OKText,
48011
- children: [
48012
- (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Stepper), Object.assign({
48013
- active: activeStep,
48014
- onStepClick: handleStepClick
48015
- }, stepperProps, {
48016
- children: [
48017
- steps.map((step)=>(0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Stepper).Step, {
48018
- label: step.label,
48019
- description: step.description,
48020
- icon: step.icon,
48021
- children: step.content
48022
- }, step.name)),
48023
- completedContent && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Stepper).Completed, {
48024
- children: completedContent
48025
- })
48026
- ]
48027
- })),
48028
- !(hideNextAndBackWhenCompleted && activeStep === steps.length) && (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Group), {
48029
- position: activeStep > 0 ? "apart" : "right",
48030
- mt: "xl",
48031
- children: [
48032
- activeStep > 0 && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Button), {
48033
- loading: stepValidating,
48034
- variant: "default",
48035
- type: "button",
48036
- onClick: prevStep,
48037
- children: prevStepLabel
48038
- }, "stepper-back"),
48039
- formMode !== "view" && activeStep === steps.length - 1 ? (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Button), {
48040
- type: "submit",
48041
- loading: status === null || status === void 0 ? void 0 : status.loading,
48042
- leftIcon: (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$tablericonsreact.IconCircleCheck), {
48043
- size: "1.125rem"
48044
- }),
48045
- onClick: ()=>$611d924da195f578$var$__awaiter(this, void 0, void 0, function*() {
48046
- console.log("stepperForm: submit clicked");
48047
- //await formAPI.handleSubmit()
48048
- }),
48049
- children: activeStepItem.nextStepLabel || nextStepLabel
48050
- }, "stepper-submit") : (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Button), {
48051
- loading: stepValidating,
48052
- onClick: nextStep,
48053
- type: "button",
48054
- children: (stepValid[activeStep] ? activeStepItem.nextStepValidLabel : activeStepItem.nextStepLabel) || nextStepLabel
48055
- }, "stepper-next")
48056
- ]
48057
- })
48058
- ]
48062
+ children: (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Stepper), Object.assign({
48063
+ active: activeStep,
48064
+ onStepClick: handleStepClick
48065
+ }, stepperProps, {
48066
+ children: [
48067
+ steps.map((step)=>(0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Stepper).Step, {
48068
+ label: step.label,
48069
+ description: step.description,
48070
+ icon: step.icon,
48071
+ children: step.content
48072
+ }, step.name)),
48073
+ completedContent && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Stepper).Completed, {
48074
+ children: completedContent
48075
+ })
48076
+ ]
48077
+ }))
48059
48078
  }));
48060
48079
  }
48061
48080