optimized-react-component-library-xyz123 0.1.99 → 0.1.100
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +40 -13
- package/dist/index.mjs +30 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -489,6 +489,8 @@ declare const getIdsGroupCheckValidationTypes: (validationType?: string[]) => nu
|
|
|
489
489
|
*/
|
|
490
490
|
declare const useFormStatusModal: (formStatus: string, handleModalOpen: () => void, handleModalClose: () => void, mainSelector?: string) => void;
|
|
491
491
|
|
|
492
|
+
declare const usePTSPageTitle: ({ formStatus, activeStep, applicationContent, thankYouBlock, steps, fallbackTitle, }: any) => any;
|
|
493
|
+
|
|
492
494
|
declare const RenderQuestion: ({ question, isTouched, activatedLanguage, showPreview, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
|
|
493
495
|
|
|
494
496
|
declare const RenderQuestionGroup: ({ questionArray, wrapper, legend, isTouched, activatedLanguage, showPreview, AddQuestionDisplayed, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
|
|
@@ -595,4 +597,4 @@ interface CookieBannerProps {
|
|
|
595
597
|
|
|
596
598
|
declare const CookieBanner: React.FC<CookieBannerProps>;
|
|
597
599
|
|
|
598
|
-
export { AddFiles as AddFilesStandard, CookieBanner, type CookieConsentConfig, CreateApiDataObject, doCategoriesAndQuestionsVisible as DoCategoriesAndQuestionsVisible, EditPreviewLink as EditPreviewLinkStandard, FilesUpload as FilesUploadStandard, Footer as FooterStandard, groupQuestionByStepPreviewPage as GroupQuestionByStepPreviewPage, groupQuestionsByStepCategoryGroup as GroupQuestionsByStepCategoryGroup, Header as HeaderStandard, type IApplicationContent, type IFormState, type ILanguage, type ILanguageSupport, ILanguageSupportinitialState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InfoOnly as InfoOnlyStandard, isDependsOnOtherQuestionTrue as IsDependsOnOtherQuestionTrue, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, questionHasValidationError as QuestionHasValidationError, QuestioninitialState, InputRadio as RadioMultipleStandard, RenderQuestion, RenderQuestionGroup, ServiceHeadlineAndBody as ServiceHeadlineAndBodyStandard, SkipLink as SkipLinkStandard, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextFieldStandard, TextHeadlineAndBody as TextHeadlineAndBodyStandard, validationCheckAllVisibleQuestions as ValidationCheckAllVisibleQuestion, ValidationErrorSummaryList, createCookieConsent, createLanguageSlice, createQuestionsSlice, focusElement, getIdsGroupCheckValidationTypes, isScriptLoaded, makeLanguageSelectors, makeQuestionsSelectors, removeScriptById, toggleScriptByConsent, useFormStatusModal };
|
|
600
|
+
export { AddFiles as AddFilesStandard, CookieBanner, type CookieConsentConfig, CreateApiDataObject, doCategoriesAndQuestionsVisible as DoCategoriesAndQuestionsVisible, EditPreviewLink as EditPreviewLinkStandard, FilesUpload as FilesUploadStandard, Footer as FooterStandard, groupQuestionByStepPreviewPage as GroupQuestionByStepPreviewPage, groupQuestionsByStepCategoryGroup as GroupQuestionsByStepCategoryGroup, Header as HeaderStandard, type IApplicationContent, type IFormState, type ILanguage, type ILanguageSupport, ILanguageSupportinitialState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InfoOnly as InfoOnlyStandard, isDependsOnOtherQuestionTrue as IsDependsOnOtherQuestionTrue, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, questionHasValidationError as QuestionHasValidationError, QuestioninitialState, InputRadio as RadioMultipleStandard, RenderQuestion, RenderQuestionGroup, ServiceHeadlineAndBody as ServiceHeadlineAndBodyStandard, SkipLink as SkipLinkStandard, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextFieldStandard, TextHeadlineAndBody as TextHeadlineAndBodyStandard, validationCheckAllVisibleQuestions as ValidationCheckAllVisibleQuestion, ValidationErrorSummaryList, createCookieConsent, createLanguageSlice, createQuestionsSlice, focusElement, getIdsGroupCheckValidationTypes, isScriptLoaded, makeLanguageSelectors, makeQuestionsSelectors, removeScriptById, toggleScriptByConsent, useFormStatusModal, usePTSPageTitle };
|
package/dist/index.d.ts
CHANGED
|
@@ -489,6 +489,8 @@ declare const getIdsGroupCheckValidationTypes: (validationType?: string[]) => nu
|
|
|
489
489
|
*/
|
|
490
490
|
declare const useFormStatusModal: (formStatus: string, handleModalOpen: () => void, handleModalClose: () => void, mainSelector?: string) => void;
|
|
491
491
|
|
|
492
|
+
declare const usePTSPageTitle: ({ formStatus, activeStep, applicationContent, thankYouBlock, steps, fallbackTitle, }: any) => any;
|
|
493
|
+
|
|
492
494
|
declare const RenderQuestion: ({ question, isTouched, activatedLanguage, showPreview, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
|
|
493
495
|
|
|
494
496
|
declare const RenderQuestionGroup: ({ questionArray, wrapper, legend, isTouched, activatedLanguage, showPreview, AddQuestionDisplayed, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
|
|
@@ -595,4 +597,4 @@ interface CookieBannerProps {
|
|
|
595
597
|
|
|
596
598
|
declare const CookieBanner: React.FC<CookieBannerProps>;
|
|
597
599
|
|
|
598
|
-
export { AddFiles as AddFilesStandard, CookieBanner, type CookieConsentConfig, CreateApiDataObject, doCategoriesAndQuestionsVisible as DoCategoriesAndQuestionsVisible, EditPreviewLink as EditPreviewLinkStandard, FilesUpload as FilesUploadStandard, Footer as FooterStandard, groupQuestionByStepPreviewPage as GroupQuestionByStepPreviewPage, groupQuestionsByStepCategoryGroup as GroupQuestionsByStepCategoryGroup, Header as HeaderStandard, type IApplicationContent, type IFormState, type ILanguage, type ILanguageSupport, ILanguageSupportinitialState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InfoOnly as InfoOnlyStandard, isDependsOnOtherQuestionTrue as IsDependsOnOtherQuestionTrue, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, questionHasValidationError as QuestionHasValidationError, QuestioninitialState, InputRadio as RadioMultipleStandard, RenderQuestion, RenderQuestionGroup, ServiceHeadlineAndBody as ServiceHeadlineAndBodyStandard, SkipLink as SkipLinkStandard, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextFieldStandard, TextHeadlineAndBody as TextHeadlineAndBodyStandard, validationCheckAllVisibleQuestions as ValidationCheckAllVisibleQuestion, ValidationErrorSummaryList, createCookieConsent, createLanguageSlice, createQuestionsSlice, focusElement, getIdsGroupCheckValidationTypes, isScriptLoaded, makeLanguageSelectors, makeQuestionsSelectors, removeScriptById, toggleScriptByConsent, useFormStatusModal };
|
|
600
|
+
export { AddFiles as AddFilesStandard, CookieBanner, type CookieConsentConfig, CreateApiDataObject, doCategoriesAndQuestionsVisible as DoCategoriesAndQuestionsVisible, EditPreviewLink as EditPreviewLinkStandard, FilesUpload as FilesUploadStandard, Footer as FooterStandard, groupQuestionByStepPreviewPage as GroupQuestionByStepPreviewPage, groupQuestionsByStepCategoryGroup as GroupQuestionsByStepCategoryGroup, Header as HeaderStandard, type IApplicationContent, type IFormState, type ILanguage, type ILanguageSupport, ILanguageSupportinitialState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InfoOnly as InfoOnlyStandard, isDependsOnOtherQuestionTrue as IsDependsOnOtherQuestionTrue, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, questionHasValidationError as QuestionHasValidationError, QuestioninitialState, InputRadio as RadioMultipleStandard, RenderQuestion, RenderQuestionGroup, ServiceHeadlineAndBody as ServiceHeadlineAndBodyStandard, SkipLink as SkipLinkStandard, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextFieldStandard, TextHeadlineAndBody as TextHeadlineAndBodyStandard, validationCheckAllVisibleQuestions as ValidationCheckAllVisibleQuestion, ValidationErrorSummaryList, createCookieConsent, createLanguageSlice, createQuestionsSlice, focusElement, getIdsGroupCheckValidationTypes, isScriptLoaded, makeLanguageSelectors, makeQuestionsSelectors, removeScriptById, toggleScriptByConsent, useFormStatusModal, usePTSPageTitle };
|
package/dist/index.js
CHANGED
|
@@ -70,7 +70,8 @@ __export(index_exports, {
|
|
|
70
70
|
makeQuestionsSelectors: () => makeQuestionsSelectors,
|
|
71
71
|
removeScriptById: () => removeScriptById,
|
|
72
72
|
toggleScriptByConsent: () => toggleScriptByConsent,
|
|
73
|
-
useFormStatusModal: () => useFormStatusModal
|
|
73
|
+
useFormStatusModal: () => useFormStatusModal,
|
|
74
|
+
usePTSPageTitle: () => usePTSPageTitle
|
|
74
75
|
});
|
|
75
76
|
module.exports = __toCommonJS(index_exports);
|
|
76
77
|
|
|
@@ -1922,7 +1923,7 @@ var getIdsGroupCheckValidationTypes = (validationType) => {
|
|
|
1922
1923
|
return Array.from(new Set(ids));
|
|
1923
1924
|
};
|
|
1924
1925
|
|
|
1925
|
-
// src/NewHelpMethodsStandard/
|
|
1926
|
+
// src/NewHelpMethodsStandard/useFormStatusModal/useFormStatusModal.ts
|
|
1926
1927
|
var React7 = __toESM(require("react"));
|
|
1927
1928
|
var useFormStatusModal = (formStatus, handleModalOpen, handleModalClose, mainSelector = "#main-content") => {
|
|
1928
1929
|
React7.useEffect(() => {
|
|
@@ -1939,6 +1940,31 @@ var useFormStatusModal = (formStatus, handleModalOpen, handleModalClose, mainSel
|
|
|
1939
1940
|
}, [formStatus, handleModalOpen, handleModalClose, mainSelector]);
|
|
1940
1941
|
};
|
|
1941
1942
|
|
|
1943
|
+
// src/NewHelpMethodsStandard/usePTSPageTitle/usePTSPageTitle.ts
|
|
1944
|
+
var import_react8 = require("react");
|
|
1945
|
+
var usePTSPageTitle = ({
|
|
1946
|
+
formStatus,
|
|
1947
|
+
activeStep,
|
|
1948
|
+
applicationContent,
|
|
1949
|
+
thankYouBlock,
|
|
1950
|
+
steps,
|
|
1951
|
+
fallbackTitle = "PTS e-tj\xE4nst"
|
|
1952
|
+
}) => {
|
|
1953
|
+
const computedTitle = (0, import_react8.useMemo)(() => {
|
|
1954
|
+
var _a, _b, _c, _d;
|
|
1955
|
+
const baseTitle = (_a = applicationContent == null ? void 0 : applicationContent.pageTitle) != null ? _a : "";
|
|
1956
|
+
const thankYouPageTitle = (_b = thankYouBlock == null ? void 0 : thankYouBlock.pageTitle) != null ? _b : "";
|
|
1957
|
+
const stepTitle = (_d = (_c = steps == null ? void 0 : steps[Math.max(0, activeStep - 1)]) == null ? void 0 : _c.pageTitle) != null ? _d : "";
|
|
1958
|
+
if (formStatus === "success" && thankYouPageTitle) return thankYouPageTitle;
|
|
1959
|
+
if (activeStep === 0 && baseTitle) return baseTitle;
|
|
1960
|
+
return stepTitle || baseTitle || fallbackTitle;
|
|
1961
|
+
}, [formStatus, activeStep, applicationContent, thankYouBlock, steps, fallbackTitle]);
|
|
1962
|
+
(0, import_react8.useEffect)(() => {
|
|
1963
|
+
document.title = computedTitle;
|
|
1964
|
+
}, [computedTitle]);
|
|
1965
|
+
return computedTitle;
|
|
1966
|
+
};
|
|
1967
|
+
|
|
1942
1968
|
// src/NewRenderFormComponentStandard/RenderQuestion/RenderQuestion.tsx
|
|
1943
1969
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1944
1970
|
var RenderQuestion = ({
|
|
@@ -1991,7 +2017,7 @@ var RenderQuestion = ({
|
|
|
1991
2017
|
var RenderQuestion_default = RenderQuestion;
|
|
1992
2018
|
|
|
1993
2019
|
// src/NewRenderFormComponentStandard/RenderQuestionGroup/RenderQuestionGroup.tsx
|
|
1994
|
-
var
|
|
2020
|
+
var import_react9 = __toESM(require("react"));
|
|
1995
2021
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1996
2022
|
var RenderQuestionGroup = ({
|
|
1997
2023
|
questionArray,
|
|
@@ -2003,7 +2029,7 @@ var RenderQuestionGroup = ({
|
|
|
2003
2029
|
AddQuestionDisplayed,
|
|
2004
2030
|
hideValidationMessage
|
|
2005
2031
|
}) => {
|
|
2006
|
-
|
|
2032
|
+
import_react9.default.useEffect(() => {
|
|
2007
2033
|
questionArray.forEach((question) => {
|
|
2008
2034
|
if (question.visible && !question.isDisplayed) {
|
|
2009
2035
|
AddQuestionDisplayed(question);
|
|
@@ -2011,7 +2037,7 @@ var RenderQuestionGroup = ({
|
|
|
2011
2037
|
});
|
|
2012
2038
|
}, [questionArray]);
|
|
2013
2039
|
const questions = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: questionArray.map((question, index) => {
|
|
2014
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react9.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2015
2041
|
RenderQuestion_default,
|
|
2016
2042
|
{
|
|
2017
2043
|
question,
|
|
@@ -2054,7 +2080,7 @@ var RenderQuestionGroup = ({
|
|
|
2054
2080
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "pts-root-question-group-div", children: questions });
|
|
2055
2081
|
case "none":
|
|
2056
2082
|
default:
|
|
2057
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react9.default.Fragment, { children: questions });
|
|
2058
2084
|
}
|
|
2059
2085
|
};
|
|
2060
2086
|
var RenderQuestionGroup_default = RenderQuestionGroup;
|
|
@@ -2698,7 +2724,7 @@ var Header = ({
|
|
|
2698
2724
|
var HeaderStandard_default = Header;
|
|
2699
2725
|
|
|
2700
2726
|
// src/NewTextComponentStandard/InfoOnlyStandard/InfoOnlyStandard.tsx
|
|
2701
|
-
var
|
|
2727
|
+
var import_react10 = require("react");
|
|
2702
2728
|
var import_dompurify4 = __toESM(require("dompurify"));
|
|
2703
2729
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2704
2730
|
var cleanText = (text) => import_dompurify4.default.sanitize(text, { ADD_ATTR: ["target", "class"] });
|
|
@@ -2712,7 +2738,7 @@ var InfoOnly = ({
|
|
|
2712
2738
|
tabIndex = -1,
|
|
2713
2739
|
activatedLanguage = "sv"
|
|
2714
2740
|
}) => {
|
|
2715
|
-
(0,
|
|
2741
|
+
(0, import_react10.useEffect)(() => {
|
|
2716
2742
|
handleSeenText(questionObject);
|
|
2717
2743
|
}, []);
|
|
2718
2744
|
const handleSeenText = (questionObject2) => {
|
|
@@ -2771,7 +2797,7 @@ var Modal = ({ showModal: isOpen, activatedLanguage = "" }) => {
|
|
|
2771
2797
|
var ModalStandard_default = Modal;
|
|
2772
2798
|
|
|
2773
2799
|
// src/NewTextComponentStandard/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
|
|
2774
|
-
var
|
|
2800
|
+
var import_react11 = require("react");
|
|
2775
2801
|
var import_dompurify5 = __toESM(require("dompurify"));
|
|
2776
2802
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2777
2803
|
var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
@@ -2780,7 +2806,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
|
2780
2806
|
{
|
|
2781
2807
|
className: "pts-textHeadlineAndBody-container",
|
|
2782
2808
|
children: [
|
|
2783
|
-
data.headline && (0,
|
|
2809
|
+
data.headline && (0, import_react11.createElement)(headlineType, { id: "textHeadlineAndBody-headline" }, data.headline),
|
|
2784
2810
|
data.body && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify5.default.sanitize(data.body) } }),
|
|
2785
2811
|
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2786
2812
|
"a",
|
|
@@ -3016,14 +3042,14 @@ var StepperButtons = ({
|
|
|
3016
3042
|
var StepperButtonsStandard_default = StepperButtons;
|
|
3017
3043
|
|
|
3018
3044
|
// src/NewTextComponentStandard/StepperStandard/StepperStandard.tsx
|
|
3019
|
-
var
|
|
3045
|
+
var import_react12 = __toESM(require("react"));
|
|
3020
3046
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3021
3047
|
var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
|
|
3022
3048
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pts-stepper-container", "aria-hidden": "true", children: arraySteps.map((step, index) => {
|
|
3023
3049
|
const isActive = step.step === activeStep;
|
|
3024
3050
|
const lastElement = arraySteps.length;
|
|
3025
3051
|
const isDone = step.step < activeStep;
|
|
3026
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react12.default.Fragment, { children: [
|
|
3027
3053
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "pts-stepper-step", children: [
|
|
3028
3054
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3029
3055
|
"div",
|
|
@@ -3239,5 +3265,6 @@ var CookieBanner_default = CookieBanner;
|
|
|
3239
3265
|
makeQuestionsSelectors,
|
|
3240
3266
|
removeScriptById,
|
|
3241
3267
|
toggleScriptByConsent,
|
|
3242
|
-
useFormStatusModal
|
|
3268
|
+
useFormStatusModal,
|
|
3269
|
+
usePTSPageTitle
|
|
3243
3270
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1849,7 +1849,7 @@ var getIdsGroupCheckValidationTypes = (validationType) => {
|
|
|
1849
1849
|
return Array.from(new Set(ids));
|
|
1850
1850
|
};
|
|
1851
1851
|
|
|
1852
|
-
// src/NewHelpMethodsStandard/
|
|
1852
|
+
// src/NewHelpMethodsStandard/useFormStatusModal/useFormStatusModal.ts
|
|
1853
1853
|
import * as React7 from "react";
|
|
1854
1854
|
var useFormStatusModal = (formStatus, handleModalOpen, handleModalClose, mainSelector = "#main-content") => {
|
|
1855
1855
|
React7.useEffect(() => {
|
|
@@ -1866,6 +1866,31 @@ var useFormStatusModal = (formStatus, handleModalOpen, handleModalClose, mainSel
|
|
|
1866
1866
|
}, [formStatus, handleModalOpen, handleModalClose, mainSelector]);
|
|
1867
1867
|
};
|
|
1868
1868
|
|
|
1869
|
+
// src/NewHelpMethodsStandard/usePTSPageTitle/usePTSPageTitle.ts
|
|
1870
|
+
import { useMemo, useEffect as useEffect7 } from "react";
|
|
1871
|
+
var usePTSPageTitle = ({
|
|
1872
|
+
formStatus,
|
|
1873
|
+
activeStep,
|
|
1874
|
+
applicationContent,
|
|
1875
|
+
thankYouBlock,
|
|
1876
|
+
steps,
|
|
1877
|
+
fallbackTitle = "PTS e-tj\xE4nst"
|
|
1878
|
+
}) => {
|
|
1879
|
+
const computedTitle = useMemo(() => {
|
|
1880
|
+
var _a, _b, _c, _d;
|
|
1881
|
+
const baseTitle = (_a = applicationContent == null ? void 0 : applicationContent.pageTitle) != null ? _a : "";
|
|
1882
|
+
const thankYouPageTitle = (_b = thankYouBlock == null ? void 0 : thankYouBlock.pageTitle) != null ? _b : "";
|
|
1883
|
+
const stepTitle = (_d = (_c = steps == null ? void 0 : steps[Math.max(0, activeStep - 1)]) == null ? void 0 : _c.pageTitle) != null ? _d : "";
|
|
1884
|
+
if (formStatus === "success" && thankYouPageTitle) return thankYouPageTitle;
|
|
1885
|
+
if (activeStep === 0 && baseTitle) return baseTitle;
|
|
1886
|
+
return stepTitle || baseTitle || fallbackTitle;
|
|
1887
|
+
}, [formStatus, activeStep, applicationContent, thankYouBlock, steps, fallbackTitle]);
|
|
1888
|
+
useEffect7(() => {
|
|
1889
|
+
document.title = computedTitle;
|
|
1890
|
+
}, [computedTitle]);
|
|
1891
|
+
return computedTitle;
|
|
1892
|
+
};
|
|
1893
|
+
|
|
1869
1894
|
// src/NewRenderFormComponentStandard/RenderQuestion/RenderQuestion.tsx
|
|
1870
1895
|
import { Fragment as Fragment12, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1871
1896
|
var RenderQuestion = ({
|
|
@@ -2625,7 +2650,7 @@ var Header = ({
|
|
|
2625
2650
|
var HeaderStandard_default = Header;
|
|
2626
2651
|
|
|
2627
2652
|
// src/NewTextComponentStandard/InfoOnlyStandard/InfoOnlyStandard.tsx
|
|
2628
|
-
import { useEffect as
|
|
2653
|
+
import { useEffect as useEffect8 } from "react";
|
|
2629
2654
|
import DOMPurify4 from "dompurify";
|
|
2630
2655
|
import { Fragment as Fragment14, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2631
2656
|
var cleanText = (text) => DOMPurify4.sanitize(text, { ADD_ATTR: ["target", "class"] });
|
|
@@ -2639,7 +2664,7 @@ var InfoOnly = ({
|
|
|
2639
2664
|
tabIndex = -1,
|
|
2640
2665
|
activatedLanguage = "sv"
|
|
2641
2666
|
}) => {
|
|
2642
|
-
|
|
2667
|
+
useEffect8(() => {
|
|
2643
2668
|
handleSeenText(questionObject);
|
|
2644
2669
|
}, []);
|
|
2645
2670
|
const handleSeenText = (questionObject2) => {
|
|
@@ -3165,5 +3190,6 @@ export {
|
|
|
3165
3190
|
makeQuestionsSelectors,
|
|
3166
3191
|
removeScriptById,
|
|
3167
3192
|
toggleScriptByConsent,
|
|
3168
|
-
useFormStatusModal
|
|
3193
|
+
useFormStatusModal,
|
|
3194
|
+
usePTSPageTitle
|
|
3169
3195
|
};
|
package/package.json
CHANGED