optimized-react-component-library-xyz123 2.6.1 → 2.7.1
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 +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +66 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2250,7 +2250,8 @@ var createGlobalLanguageSlice = (initialConfig, options) => {
|
|
|
2250
2250
|
languageSupportLoaded: true,
|
|
2251
2251
|
backButton: initialLang.backButton,
|
|
2252
2252
|
forwardButton: initialLang.forwardButton,
|
|
2253
|
-
sendButton: initialLang.sendButton
|
|
2253
|
+
sendButton: initialLang.sendButton,
|
|
2254
|
+
restartButton: initialLang.restartButton
|
|
2254
2255
|
};
|
|
2255
2256
|
const slice = createSlice({
|
|
2256
2257
|
name,
|
|
@@ -2265,6 +2266,7 @@ var createGlobalLanguageSlice = (initialConfig, options) => {
|
|
|
2265
2266
|
state.backButton = lang.backButton;
|
|
2266
2267
|
state.forwardButton = lang.forwardButton;
|
|
2267
2268
|
state.sendButton = lang.sendButton;
|
|
2269
|
+
state.restartButton = lang.restartButton;
|
|
2268
2270
|
},
|
|
2269
2271
|
setGlobalLangauage: (state, action) => {
|
|
2270
2272
|
state.languageSupport = action.payload.languageSupport;
|
|
@@ -2273,6 +2275,7 @@ var createGlobalLanguageSlice = (initialConfig, options) => {
|
|
|
2273
2275
|
state.backButton = lang.backButton;
|
|
2274
2276
|
state.forwardButton = lang.forwardButton;
|
|
2275
2277
|
state.sendButton = lang.sendButton;
|
|
2278
|
+
state.restartButton = lang.restartButton;
|
|
2276
2279
|
state.languageSupportLoaded = true;
|
|
2277
2280
|
}
|
|
2278
2281
|
}
|
|
@@ -2295,7 +2298,8 @@ var makeglobalLanguageSelectors = (selectSlice) => {
|
|
|
2295
2298
|
...applicationContent,
|
|
2296
2299
|
backButton: match.backButton,
|
|
2297
2300
|
forwardButton: match.forwardButton,
|
|
2298
|
-
sendButton: match.sendButton
|
|
2301
|
+
sendButton: match.sendButton,
|
|
2302
|
+
restartButton: match.restartButton
|
|
2299
2303
|
};
|
|
2300
2304
|
}
|
|
2301
2305
|
);
|
|
@@ -4110,8 +4114,55 @@ var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
|
|
|
4110
4114
|
};
|
|
4111
4115
|
var StepperStandard_default = Stepper;
|
|
4112
4116
|
|
|
4113
|
-
// src/components/
|
|
4117
|
+
// src/components/stepper/StepperButtonsNoApiStandard/StepperButtonsNoApiStandard.tsx
|
|
4114
4118
|
import { Fragment as Fragment19, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4119
|
+
var StepperButtonsNoApi = ({
|
|
4120
|
+
globalLanguageState,
|
|
4121
|
+
changeStepHandler,
|
|
4122
|
+
nextStepButtonHandler,
|
|
4123
|
+
onSubmitHandler,
|
|
4124
|
+
steps,
|
|
4125
|
+
activeStep,
|
|
4126
|
+
appUsesResetButton = true
|
|
4127
|
+
}) => {
|
|
4128
|
+
const totalSteps = steps ? steps.length : "";
|
|
4129
|
+
return /* @__PURE__ */ jsxs31("div", { className: "pts-stepperButtons-container", children: [
|
|
4130
|
+
activeStep === 0 && /* @__PURE__ */ jsx39(Fragment19, { children: /* @__PURE__ */ jsx39(
|
|
4131
|
+
"button",
|
|
4132
|
+
{
|
|
4133
|
+
type: "button",
|
|
4134
|
+
className: "pts-forwardButton",
|
|
4135
|
+
onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
|
|
4136
|
+
children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : ""
|
|
4137
|
+
}
|
|
4138
|
+
) }),
|
|
4139
|
+
activeStep !== 0 && activeStep !== totalSteps && /* @__PURE__ */ jsxs31(Fragment19, { children: [
|
|
4140
|
+
/* @__PURE__ */ jsx39(
|
|
4141
|
+
"button",
|
|
4142
|
+
{
|
|
4143
|
+
onClick: () => changeStepHandler(activeStep - 1),
|
|
4144
|
+
className: "pts-backButton",
|
|
4145
|
+
type: "button",
|
|
4146
|
+
children: globalLanguageState ? globalLanguageState.backButton : "<<"
|
|
4147
|
+
}
|
|
4148
|
+
),
|
|
4149
|
+
/* @__PURE__ */ jsx39(
|
|
4150
|
+
"button",
|
|
4151
|
+
{
|
|
4152
|
+
type: "button",
|
|
4153
|
+
className: "pts-forwardButton",
|
|
4154
|
+
onClick: activeStep !== totalSteps ? nextStepButtonHandler : onSubmitHandler,
|
|
4155
|
+
children: activeStep !== totalSteps && globalLanguageState ? globalLanguageState.forwardButton : ""
|
|
4156
|
+
}
|
|
4157
|
+
)
|
|
4158
|
+
] }),
|
|
4159
|
+
appUsesResetButton && activeStep === totalSteps && /* @__PURE__ */ jsx39("button", { onClick: () => changeStepHandler(0), className: "pts-backButton", type: "button", children: globalLanguageState && globalLanguageState.restartButton ? globalLanguageState.restartButton : "Starta om" })
|
|
4160
|
+
] });
|
|
4161
|
+
};
|
|
4162
|
+
var StepperButtonsNoApiStandard_default = StepperButtonsNoApi;
|
|
4163
|
+
|
|
4164
|
+
// src/components/validation-and-status/ValidationErrorSummaryList/ValidationErrorSummaryList.tsx
|
|
4165
|
+
import { Fragment as Fragment20, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4115
4166
|
var ValidationErrorSummaryList = ({
|
|
4116
4167
|
validationErrorsList,
|
|
4117
4168
|
questions,
|
|
@@ -4148,7 +4199,7 @@ var ValidationErrorSummaryList = ({
|
|
|
4148
4199
|
}, 300);
|
|
4149
4200
|
}
|
|
4150
4201
|
}
|
|
4151
|
-
if (!validationErrorsList.length) return /* @__PURE__ */
|
|
4202
|
+
if (!validationErrorsList.length) return /* @__PURE__ */ jsx40(Fragment20, {});
|
|
4152
4203
|
const filteredIds = filterIdsByGroupCheck(validationErrorsList, questions);
|
|
4153
4204
|
const count = filteredIds.length;
|
|
4154
4205
|
const title = summaryText.replace("{count}", count.toString()).replace(
|
|
@@ -4160,11 +4211,11 @@ var ValidationErrorSummaryList = ({
|
|
|
4160
4211
|
const found = questions.find((item) => item.id === id);
|
|
4161
4212
|
return (_a = found == null ? void 0 : found.validationSummaryLabel) != null ? _a : found == null ? void 0 : found.questionLabel;
|
|
4162
4213
|
}
|
|
4163
|
-
return /* @__PURE__ */
|
|
4164
|
-
/* @__PURE__ */
|
|
4165
|
-
/* @__PURE__ */
|
|
4166
|
-
/* @__PURE__ */
|
|
4167
|
-
/* @__PURE__ */
|
|
4214
|
+
return /* @__PURE__ */ jsxs32("div", { className: `pts-errorSummary-container pts-root-error ${validationErrorsList.length === 0 ? "cleanPadding" : ""}`, children: [
|
|
4215
|
+
/* @__PURE__ */ jsx40("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
|
|
4216
|
+
/* @__PURE__ */ jsxs32("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
|
|
4217
|
+
/* @__PURE__ */ jsx40("h2", { id: "errorSummary-headline", children: title }),
|
|
4218
|
+
/* @__PURE__ */ jsx40("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ jsx40("li", { children: /* @__PURE__ */ jsx40(
|
|
4168
4219
|
"a",
|
|
4169
4220
|
{
|
|
4170
4221
|
href: "#",
|
|
@@ -4182,11 +4233,11 @@ var ValidationErrorSummaryList = ({
|
|
|
4182
4233
|
var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
|
|
4183
4234
|
|
|
4184
4235
|
// src/components/validation-and-status/FormStatusMessagesScreenReader/FormStatusMessagesScreenReader.tsx
|
|
4185
|
-
import { Fragment as
|
|
4236
|
+
import { Fragment as Fragment21, jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4186
4237
|
var FormStatusMessagesScreenReader = ({ formStatus, activatedLanguage = "sv" }) => {
|
|
4187
|
-
return /* @__PURE__ */
|
|
4188
|
-
/* @__PURE__ */
|
|
4189
|
-
/* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsxs33(Fragment21, { children: [
|
|
4239
|
+
/* @__PURE__ */ jsx41("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ jsx41("span", { className: "pts-root-mandatoryAsterisk", children: activatedLanguage === "en" ? "Something went wrong, please try again later or contact us!" : "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
|
|
4240
|
+
/* @__PURE__ */ jsx41("div", { "aria-live": "polite", className: "visually-hidden", children: formStatus === "loading" ? activatedLanguage === "en" ? "Your case is being registered. Please do not refresh or close the page." : "Ditt \xE4rende registreras. Uppdatera eller st\xE4ng inte sidan." : "" })
|
|
4190
4241
|
] });
|
|
4191
4242
|
};
|
|
4192
4243
|
var FormStatusMessagesScreenReader_default = FormStatusMessagesScreenReader;
|
|
@@ -4215,6 +4266,7 @@ export {
|
|
|
4215
4266
|
SingleCheckboxStandard_default as SingleCheckboxStandard,
|
|
4216
4267
|
SkipLinkStandard_default as SkipLinkStandard,
|
|
4217
4268
|
StartApplicationButton_default as StartApplicationButton,
|
|
4269
|
+
StepperButtonsNoApiStandard_default as StepperButtonsNoApiStandard,
|
|
4218
4270
|
StepperButtonsStandard_default as StepperButtonsStandard,
|
|
4219
4271
|
StepperStandard_default as StepperStandard,
|
|
4220
4272
|
TextAreaStandard_default as TextAreaStandard,
|