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