optimized-react-component-library-xyz123 2.5.11 → 2.5.13
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.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +12 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2411,6 +2411,13 @@ var createFormSlice = (initialState, options) => {
|
|
|
2411
2411
|
answer: action.payload.answer
|
|
2412
2412
|
}));
|
|
2413
2413
|
},
|
|
2414
|
+
/** Tar bort alla svar (answer) i global state. Används när man startar om formuläret. */
|
|
2415
|
+
removeAllAnswers: (state) => {
|
|
2416
|
+
state.questions = state.questions.map((qObject) => ({
|
|
2417
|
+
...qObject,
|
|
2418
|
+
answer: ""
|
|
2419
|
+
}));
|
|
2420
|
+
},
|
|
2414
2421
|
/** Uppdaterar filer (files) för en specifik fråga i global state */
|
|
2415
2422
|
addFiles: (state, action) => {
|
|
2416
2423
|
state.questions = mapQuestionById(state.questions, action.payload.id, (q) => ({
|
|
@@ -4109,7 +4116,7 @@ var StepperButtons = ({
|
|
|
4109
4116
|
steps,
|
|
4110
4117
|
activeStep
|
|
4111
4118
|
}) => {
|
|
4112
|
-
const totalSteps = steps ? steps.length :
|
|
4119
|
+
const totalSteps = steps ? steps.length : 0;
|
|
4113
4120
|
return /* @__PURE__ */ jsxs31("div", { className: "pts-stepperButtons-container", children: [
|
|
4114
4121
|
activeStep !== 0 && /* @__PURE__ */ jsx39(
|
|
4115
4122
|
"button",
|
|
@@ -4185,22 +4192,14 @@ var StepperButtonsNoApi = ({
|
|
|
4185
4192
|
globalLanguageState,
|
|
4186
4193
|
changeStepHandler,
|
|
4187
4194
|
nextStepButtonHandler,
|
|
4188
|
-
onSubmitHandler,
|
|
4195
|
+
//onSubmitHandler,
|
|
4189
4196
|
steps,
|
|
4190
4197
|
activeStep,
|
|
4191
4198
|
appUsesResetButton = true
|
|
4192
4199
|
}) => {
|
|
4193
|
-
const totalSteps = steps ? steps.length :
|
|
4200
|
+
const totalSteps = steps ? steps.length : 0;
|
|
4194
4201
|
return /* @__PURE__ */ jsxs33("div", { className: "pts-stepperButtons-container", children: [
|
|
4195
|
-
activeStep === 0 && /* @__PURE__ */ jsx41(Fragment20, { children: /* @__PURE__ */ jsx41(
|
|
4196
|
-
"button",
|
|
4197
|
-
{
|
|
4198
|
-
type: "button",
|
|
4199
|
-
className: "pts-forwardButton",
|
|
4200
|
-
onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
|
|
4201
|
-
children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : ""
|
|
4202
|
-
}
|
|
4203
|
-
) }),
|
|
4202
|
+
activeStep === 0 && /* @__PURE__ */ jsx41(Fragment20, { children: /* @__PURE__ */ jsx41("button", { type: "button", className: "pts-forwardButton", onClick: nextStepButtonHandler, children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : "" }) }),
|
|
4204
4203
|
activeStep !== 0 && activeStep !== totalSteps && /* @__PURE__ */ jsxs33(Fragment20, { children: [
|
|
4205
4204
|
/* @__PURE__ */ jsx41(
|
|
4206
4205
|
"button",
|
|
@@ -4211,15 +4210,7 @@ var StepperButtonsNoApi = ({
|
|
|
4211
4210
|
children: globalLanguageState ? globalLanguageState.backButton : "<<"
|
|
4212
4211
|
}
|
|
4213
4212
|
),
|
|
4214
|
-
/* @__PURE__ */ jsx41(
|
|
4215
|
-
"button",
|
|
4216
|
-
{
|
|
4217
|
-
type: "button",
|
|
4218
|
-
className: "pts-forwardButton",
|
|
4219
|
-
onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
|
|
4220
|
-
children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : ""
|
|
4221
|
-
}
|
|
4222
|
-
)
|
|
4213
|
+
/* @__PURE__ */ jsx41("button", { type: "button", className: "pts-forwardButton", onClick: nextStepButtonHandler, children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : "" })
|
|
4223
4214
|
] }),
|
|
4224
4215
|
appUsesResetButton && activeStep === totalSteps && /* @__PURE__ */ jsx41("button", { onClick: () => changeStepHandler(0), className: "pts-backButton", type: "button", children: globalLanguageState && globalLanguageState.restartButton ? globalLanguageState.restartButton : "Starta om" })
|
|
4225
4216
|
] });
|