@stack-spot/portal-components 0.0.17 → 1.0.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/components/BannerWarning.d.ts +6 -0
- package/dist/components/BannerWarning.d.ts.map +1 -1
- package/dist/components/BannerWarning.js +6 -0
- package/dist/components/BannerWarning.js.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +11 -2
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +7 -5
- package/dist/components/Breadcrumb/index.js.map +1 -1
- package/dist/components/ChatBot.d.ts +7 -0
- package/dist/components/ChatBot.d.ts.map +1 -1
- package/dist/components/ChatBot.js +13 -6
- package/dist/components/ChatBot.js.map +1 -1
- package/dist/components/ErrorFeedback.d.ts +23 -0
- package/dist/components/ErrorFeedback.d.ts.map +1 -0
- package/dist/components/ErrorFeedback.js +73 -0
- package/dist/components/ErrorFeedback.js.map +1 -0
- package/dist/components/SelectionList.d.ts +123 -0
- package/dist/components/SelectionList.d.ts.map +1 -0
- package/dist/components/SelectionList.js +149 -0
- package/dist/components/SelectionList.js.map +1 -0
- package/dist/components/{src/components/tour → Tour}/StepContainer.d.ts +16 -0
- package/dist/components/Tour/StepContainer.d.ts.map +1 -0
- package/dist/components/{tour → Tour}/StepContainer.js +4 -0
- package/dist/components/Tour/StepContainer.js.map +1 -0
- package/dist/components/Tour/StepNavigation.d.ts +29 -0
- package/dist/components/Tour/StepNavigation.d.ts.map +1 -0
- package/dist/components/{tour → Tour}/StepNavigation.js +4 -0
- package/dist/components/Tour/StepNavigation.js.map +1 -0
- package/dist/components/Tour/StepTitle.d.ts +17 -0
- package/dist/components/Tour/StepTitle.d.ts.map +1 -0
- package/dist/components/{tour → Tour}/StepTitle.js +4 -0
- package/dist/components/Tour/StepTitle.js.map +1 -0
- package/dist/components/{src/components/tour → Tour}/context.d.ts +11 -0
- package/dist/components/Tour/context.d.ts.map +1 -0
- package/dist/components/{src/components/tour → Tour}/context.js +11 -0
- package/dist/components/Tour/context.js.map +1 -0
- package/dist/components/{tour → Tour}/index.d.ts +1 -1
- package/dist/components/Tour/index.d.ts.map +1 -0
- package/dist/components/{src/components/tour → Tour}/index.js +1 -1
- package/dist/components/Tour/index.js.map +1 -0
- package/dist/components/Tour/utils.d.ts +50 -0
- package/dist/components/Tour/utils.d.ts.map +1 -0
- package/dist/components/Tour/utils.js +54 -0
- package/dist/components/Tour/utils.js.map +1 -0
- package/dist/context/anchor.d.ts +28 -0
- package/dist/context/anchor.d.ts.map +1 -0
- package/dist/context/anchor.js +23 -0
- package/dist/context/anchor.js.map +1 -0
- package/dist/hooks/keyboard.d.ts +33 -0
- package/dist/hooks/keyboard.d.ts.map +1 -0
- package/dist/hooks/keyboard.js +59 -0
- package/dist/hooks/keyboard.js.map +1 -0
- package/dist/hooks/service-now.d.ts +30 -1
- package/dist/hooks/service-now.d.ts.map +1 -1
- package/dist/hooks/service-now.js +54 -15
- package/dist/hooks/service-now.js.map +1 -1
- package/dist/hooks/text.d.ts +10 -0
- package/dist/hooks/text.d.ts.map +1 -0
- package/dist/hooks/text.js +24 -0
- package/dist/hooks/text.js.map +1 -0
- package/dist/hooks/title.d.ts +13 -0
- package/dist/hooks/title.d.ts.map +1 -1
- package/dist/hooks/title.js +13 -0
- package/dist/hooks/title.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/svg/AI.d.ts +9 -0
- package/dist/svg/AI.d.ts.map +1 -0
- package/dist/svg/AI.js +12 -0
- package/dist/svg/AI.js.map +1 -0
- package/dist/svg/EDP.d.ts +9 -0
- package/dist/svg/EDP.d.ts.map +1 -0
- package/dist/svg/EDP.js +8 -0
- package/dist/svg/EDP.js.map +1 -0
- package/dist/{components/MiniLogo.d.ts → svg/Forbidden.d.ts} +2 -2
- package/dist/svg/Forbidden.d.ts.map +1 -0
- package/dist/svg/Forbidden.js +4 -0
- package/dist/svg/Forbidden.js.map +1 -0
- package/dist/svg/HUB.d.ts +9 -0
- package/dist/svg/HUB.d.ts.map +1 -0
- package/dist/svg/HUB.js +8 -0
- package/dist/svg/HUB.js.map +1 -0
- package/dist/svg/Logo.d.ts +5 -0
- package/dist/svg/Logo.d.ts.map +1 -0
- package/dist/svg/Logo.js +7 -0
- package/dist/svg/Logo.js.map +1 -0
- package/dist/{MiniLogo.d.ts → svg/MiniLogo.d.ts} +3 -0
- package/dist/svg/MiniLogo.d.ts.map +1 -0
- package/dist/{MiniLogo.js → svg/MiniLogo.js} +3 -0
- package/dist/svg/MiniLogo.js.map +1 -0
- package/dist/{components/src/components/MiniLogo.d.ts → svg/NotFound.d.ts} +2 -2
- package/dist/svg/NotFound.d.ts.map +1 -0
- package/dist/svg/NotFound.js +4 -0
- package/dist/svg/NotFound.js.map +1 -0
- package/dist/svg/ServerError.d.ts +6 -0
- package/dist/svg/ServerError.d.ts.map +1 -0
- package/dist/svg/ServerError.js +4 -0
- package/dist/svg/ServerError.js.map +1 -0
- package/dist/svg/Unauthenticated.d.ts +6 -0
- package/dist/svg/Unauthenticated.d.ts.map +1 -0
- package/dist/svg/Unauthenticated.js +4 -0
- package/dist/svg/Unauthenticated.js.map +1 -0
- package/dist/svg/index.d.ts +10 -0
- package/dist/svg/index.d.ts.map +1 -0
- package/dist/svg/index.js +10 -0
- package/dist/svg/index.js.map +1 -0
- package/dist/utils/accessibility.d.ts +73 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/dist/utils/accessibility.js +131 -0
- package/dist/utils/accessibility.js.map +1 -0
- package/dist/utils/cookie.d.ts +33 -0
- package/dist/utils/cookie.d.ts.map +1 -0
- package/dist/utils/cookie.js +62 -0
- package/dist/utils/cookie.js.map +1 -0
- package/package.json +24 -14
- package/readme.md +58 -13
- package/src/components/BannerWarning.tsx +6 -0
- package/src/components/Breadcrumb/index.tsx +20 -5
- package/src/components/ChatBot.tsx +15 -7
- package/src/components/ErrorFeedback.tsx +135 -0
- package/src/components/SelectionList.tsx +361 -0
- package/src/components/{tour → Tour}/StepContainer.tsx +16 -0
- package/src/components/{tour → Tour}/StepNavigation.tsx +26 -2
- package/src/components/{tour → Tour}/StepTitle.tsx +11 -1
- package/src/components/{tour → Tour}/context.tsx +11 -0
- package/src/components/{tour → Tour}/index.ts +1 -1
- package/src/components/Tour/utils.tsx +93 -0
- package/src/context/anchor.tsx +37 -0
- package/src/hooks/keyboard.tsx +80 -0
- package/src/hooks/service-now.tsx +60 -16
- package/src/hooks/text.tsx +30 -0
- package/src/hooks/title.tsx +13 -0
- package/src/index.ts +4 -3
- package/src/svg/AI.tsx +41 -0
- package/src/svg/EDP.tsx +39 -0
- package/src/svg/Forbidden.tsx +22 -0
- package/src/svg/HUB.tsx +39 -0
- package/src/svg/Logo.tsx +38 -0
- package/src/{components → svg}/MiniLogo.tsx +3 -0
- package/src/svg/NotFound.tsx +16 -0
- package/src/svg/ServerError.tsx +33 -0
- package/src/svg/Unauthenticated.tsx +16 -0
- package/src/svg/index.ts +9 -0
- package/src/utils/accessibility.ts +141 -0
- package/src/utils/cookie.ts +63 -0
- package/dist/BannerWarning.d.ts +0 -4
- package/dist/BannerWarning.d.ts.map +0 -1
- package/dist/BannerWarning.js +0 -6
- package/dist/BannerWarning.js.map +0 -1
- package/dist/Login.d.ts +0 -25
- package/dist/Login.d.ts.map +0 -1
- package/dist/Login.js +0 -104
- package/dist/Login.js.map +0 -1
- package/dist/MiniLogo.d.ts.map +0 -1
- package/dist/MiniLogo.js.map +0 -1
- package/dist/components/Login.d.ts +0 -26
- package/dist/components/Login.d.ts.map +0 -1
- package/dist/components/Login.js +0 -100
- package/dist/components/Login.js.map +0 -1
- package/dist/components/MiniLogo.d.ts.map +0 -1
- package/dist/components/MiniLogo.js +0 -4
- package/dist/components/MiniLogo.js.map +0 -1
- package/dist/components/src/components/BannerWarning.d.ts +0 -4
- package/dist/components/src/components/BannerWarning.d.ts.map +0 -1
- package/dist/components/src/components/BannerWarning.js +0 -6
- package/dist/components/src/components/BannerWarning.js.map +0 -1
- package/dist/components/src/components/Breadcrumb/index.d.ts +0 -42
- package/dist/components/src/components/Breadcrumb/index.d.ts.map +0 -1
- package/dist/components/src/components/Breadcrumb/index.js +0 -27
- package/dist/components/src/components/Breadcrumb/index.js.map +0 -1
- package/dist/components/src/components/Breadcrumb/styled.d.ts +0 -3
- package/dist/components/src/components/Breadcrumb/styled.d.ts.map +0 -1
- package/dist/components/src/components/Breadcrumb/styled.js +0 -36
- package/dist/components/src/components/Breadcrumb/styled.js.map +0 -1
- package/dist/components/src/components/ChatBot.d.ts +0 -2
- package/dist/components/src/components/ChatBot.d.ts.map +0 -1
- package/dist/components/src/components/ChatBot.js +0 -61
- package/dist/components/src/components/ChatBot.js.map +0 -1
- package/dist/components/src/components/Login.d.ts +0 -26
- package/dist/components/src/components/Login.d.ts.map +0 -1
- package/dist/components/src/components/Login.js +0 -100
- package/dist/components/src/components/Login.js.map +0 -1
- package/dist/components/src/components/MiniLogo.d.ts.map +0 -1
- package/dist/components/src/components/MiniLogo.js +0 -4
- package/dist/components/src/components/MiniLogo.js.map +0 -1
- package/dist/components/src/components/tour/StepContainer.d.ts.map +0 -1
- package/dist/components/src/components/tour/StepContainer.js +0 -48
- package/dist/components/src/components/tour/StepContainer.js.map +0 -1
- package/dist/components/src/components/tour/StepNavigation.d.ts +0 -13
- package/dist/components/src/components/tour/StepNavigation.d.ts.map +0 -1
- package/dist/components/src/components/tour/StepNavigation.js +0 -20
- package/dist/components/src/components/tour/StepNavigation.js.map +0 -1
- package/dist/components/src/components/tour/StepTitle.d.ts +0 -7
- package/dist/components/src/components/tour/StepTitle.d.ts.map +0 -1
- package/dist/components/src/components/tour/StepTitle.js +0 -5
- package/dist/components/src/components/tour/StepTitle.js.map +0 -1
- package/dist/components/src/components/tour/context.d.ts.map +0 -1
- package/dist/components/src/components/tour/context.js.map +0 -1
- package/dist/components/src/components/tour/index.d.ts +0 -4
- package/dist/components/src/components/tour/index.d.ts.map +0 -1
- package/dist/components/src/components/tour/index.js.map +0 -1
- package/dist/components/src/components/tour/utils.d.ts +0 -13
- package/dist/components/src/components/tour/utils.d.ts.map +0 -1
- package/dist/components/src/components/tour/utils.js +0 -43
- package/dist/components/src/components/tour/utils.js.map +0 -1
- package/dist/components/src/hooks/service-now.d.ts +0 -24
- package/dist/components/src/hooks/service-now.d.ts.map +0 -1
- package/dist/components/src/hooks/service-now.js +0 -161
- package/dist/components/src/hooks/service-now.js.map +0 -1
- package/dist/components/src/hooks/title.d.ts +0 -3
- package/dist/components/src/hooks/title.d.ts.map +0 -1
- package/dist/components/src/hooks/title.js +0 -13
- package/dist/components/src/hooks/title.js.map +0 -1
- package/dist/components/src/hooks/use-effect-once.d.ts +0 -12
- package/dist/components/src/hooks/use-effect-once.d.ts.map +0 -1
- package/dist/components/src/hooks/use-effect-once.js +0 -40
- package/dist/components/src/hooks/use-effect-once.js.map +0 -1
- package/dist/components/src/index.d.ts +0 -9
- package/dist/components/src/index.d.ts.map +0 -1
- package/dist/components/src/index.js +0 -9
- package/dist/components/src/index.js.map +0 -1
- package/dist/components/tour/StepContainer.d.ts +0 -13
- package/dist/components/tour/StepContainer.d.ts.map +0 -1
- package/dist/components/tour/StepContainer.js.map +0 -1
- package/dist/components/tour/StepNavigation.d.ts +0 -13
- package/dist/components/tour/StepNavigation.d.ts.map +0 -1
- package/dist/components/tour/StepNavigation.js.map +0 -1
- package/dist/components/tour/StepTitle.d.ts +0 -7
- package/dist/components/tour/StepTitle.d.ts.map +0 -1
- package/dist/components/tour/StepTitle.js.map +0 -1
- package/dist/components/tour/context.d.ts +0 -17
- package/dist/components/tour/context.d.ts.map +0 -1
- package/dist/components/tour/context.js +0 -48
- package/dist/components/tour/context.js.map +0 -1
- package/dist/components/tour/index.d.ts.map +0 -1
- package/dist/components/tour/index.js +0 -4
- package/dist/components/tour/index.js.map +0 -1
- package/dist/components/tour/utils.d.ts +0 -13
- package/dist/components/tour/utils.d.ts.map +0 -1
- package/dist/components/tour/utils.js +0 -43
- package/dist/components/tour/utils.js.map +0 -1
- package/dist/layout/src/components/tour/PortalSwitcherStep.d.ts +0 -2
- package/dist/layout/src/components/tour/PortalSwitcherStep.d.ts.map +0 -1
- package/dist/layout/src/components/tour/PortalSwitcherStep.js +0 -30
- package/dist/layout/src/components/tour/PortalSwitcherStep.js.map +0 -1
- package/src/components/Login.tsx +0 -157
- package/src/components/tour/utils.tsx +0 -65
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useState } from 'react';
|
|
3
|
-
import Tour from 'reactour';
|
|
4
|
-
import { finishTourStep } from './utils.js';
|
|
5
|
-
export const defaultTourConfig = Object.freeze({
|
|
6
|
-
steps: [],
|
|
7
|
-
isOpen: true,
|
|
8
|
-
onRequestClose: () => '',
|
|
9
|
-
showButtons: false,
|
|
10
|
-
showNavigation: false,
|
|
11
|
-
showNavigationNumber: false,
|
|
12
|
-
showNumber: false,
|
|
13
|
-
showCloseButton: false,
|
|
14
|
-
disableFocusLock: true,
|
|
15
|
-
});
|
|
16
|
-
const TourContext = createContext({
|
|
17
|
-
tourConfig: defaultTourConfig,
|
|
18
|
-
currentStep: 0,
|
|
19
|
-
});
|
|
20
|
-
export const TourProvider = ({ config, children }) => {
|
|
21
|
-
const [currentStep, setCurrentStep] = useState(0);
|
|
22
|
-
const tourConfig = {
|
|
23
|
-
...config,
|
|
24
|
-
goToStep: currentStep,
|
|
25
|
-
update: `${currentStep}`,
|
|
26
|
-
nextStep: () => setCurrentStep(currentStep + 1),
|
|
27
|
-
prevStep: () => setCurrentStep(currentStep - 1),
|
|
28
|
-
isOpen: !!config.steps.length && (currentStep < config.steps.length),
|
|
29
|
-
};
|
|
30
|
-
return _jsxs(TourContext.Provider, { value: {
|
|
31
|
-
currentStep,
|
|
32
|
-
tourConfig,
|
|
33
|
-
}, children: [_jsx(Tour, { ...tourConfig }), children] });
|
|
34
|
-
};
|
|
35
|
-
export const useTour = () => {
|
|
36
|
-
const { currentStep, tourConfig: { nextStep, prevStep, steps } } = useContext(TourContext);
|
|
37
|
-
return {
|
|
38
|
-
currentStep,
|
|
39
|
-
nextStep,
|
|
40
|
-
prevStep,
|
|
41
|
-
steps,
|
|
42
|
-
finishStep: (stepKey) => {
|
|
43
|
-
finishTourStep(stepKey);
|
|
44
|
-
nextStep?.();
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/components/tour/context.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,IAAuB,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,MAAM,CAAC,MAAM,iBAAiB,GAAe,MAAM,CAAC,MAAM,CAAC;IACzD,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,IAAI;IACZ,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE;IACxB,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,KAAK;IACrB,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE,KAAK;IACjB,eAAe,EAAE,KAAK;IACtB,gBAAgB,EAAE,IAAI;CACvB,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,aAAa,CAAkD;IACjF,UAAU,EAAE,iBAAiB;IAC7B,WAAW,EAAE,CAAC;CACf,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAA+C,EAAE,EAAE;IAChG,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAA;IACzD,MAAM,UAAU,GAAe;QAC7B,GAAG,MAAM;QACT,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,GAAG,WAAW,EAAE;QACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,WAAW,GAAG,CAAC,CAAC;QAC/C,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,WAAW,GAAG,CAAC,CAAC;QAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;KACrE,CAAA;IAED,OAAO,MAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE;YAClC,WAAW;YACX,UAAU;SACX,aACC,KAAC,IAAI,OAAK,UAAU,GAAI,EACvB,QAAQ,IACY,CAAA;AACzB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAC1F,OAAO;QACL,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,KAAK;QACL,UAAU,EAAE,CAAC,OAAe,EAAE,EAAE;YAC9B,cAAc,CAAC,OAAO,CAAC,CAAA;YACvB,QAAQ,EAAE,EAAE,CAAA;QACd,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAE,YAAY,IAAI,QAAQ,EAAE,CAAA;AACnC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,YAAY,EAAE,CAAA;CAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tour/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ReactourStep } from 'reactour';
|
|
3
|
-
import { NavigationProps } from './StepNavigation.js';
|
|
4
|
-
export declare const finishTourStep: (key: string) => void;
|
|
5
|
-
export declare const isNewTourStep: (step: ReactourStep) => boolean;
|
|
6
|
-
export declare const hasFinishedTourStep: (key: string) => boolean;
|
|
7
|
-
export declare const tourStepBuilder: ({ selector, position, title, content, style, customNavigation, ...rest }: ReactourStep & {
|
|
8
|
-
title: string;
|
|
9
|
-
selector: string;
|
|
10
|
-
content: ReactNode;
|
|
11
|
-
customNavigation?: NavigationProps | undefined;
|
|
12
|
-
}) => ReactourStep;
|
|
13
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/tour/utils.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAyBlD,eAAO,MAAM,cAAc,QAAS,MAAM,SAIzC,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,YAAY,YAA6C,CAAA;AAC7F,eAAO,MAAM,mBAAmB,QAAS,MAAM,YAAkC,CAAA;AAEjF,eAAO,MAAM,eAAe;WAQD,MAAM;cAAY,MAAM;aAAW,SAAS;;MAAyC,YAkB9G,CAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { theme } from '@stack-spot/portal-theme';
|
|
3
|
-
import { StepContainer } from './StepContainer.js';
|
|
4
|
-
const TOUR_COOKIE = 'guided-tour-global';
|
|
5
|
-
const DOMAIN_REGEX = new RegExp(/(\.*(prd|stg|dev)*.stackspot.com)|localhost/);
|
|
6
|
-
const portalUrl = new URL(location.href);
|
|
7
|
-
const cookieDomain = DOMAIN_REGEX.exec(portalUrl.host)?.[0];
|
|
8
|
-
const defaultCookieAttributes = `domain=${cookieDomain}; SameSite=Strict;`;
|
|
9
|
-
const getCookies = () => document.cookie.split('; ').reduce((prev, current) => {
|
|
10
|
-
const [name, ...value] = current.split('=');
|
|
11
|
-
prev[name] = value.join('=');
|
|
12
|
-
return prev;
|
|
13
|
-
}, {});
|
|
14
|
-
const setCookie = (key, value) => {
|
|
15
|
-
document.cookie = `${key}=${value}; ${defaultCookieAttributes}`;
|
|
16
|
-
};
|
|
17
|
-
const getCookie = (key) => getCookies()[key];
|
|
18
|
-
const getTourCookie = () => {
|
|
19
|
-
const currentTourObject = getCookie(TOUR_COOKIE);
|
|
20
|
-
return currentTourObject ? currentTourObject.split(',') : [];
|
|
21
|
-
};
|
|
22
|
-
export const finishTourStep = (key) => {
|
|
23
|
-
const tourObject = getTourCookie();
|
|
24
|
-
if (!tourObject.includes(key))
|
|
25
|
-
tourObject.push(key);
|
|
26
|
-
setCookie(TOUR_COOKIE, tourObject.toString());
|
|
27
|
-
};
|
|
28
|
-
export const isNewTourStep = (step) => !hasFinishedTourStep(`${step.selector}`);
|
|
29
|
-
export const hasFinishedTourStep = (key) => getTourCookie().includes(key);
|
|
30
|
-
export const tourStepBuilder = ({ selector, position, title, content, style, customNavigation, ...rest }) => ({
|
|
31
|
-
selector,
|
|
32
|
-
content: (_jsx(StepContainer, { stepKey: selector, position: position, title: title, customNavigation: customNavigation, children: content })),
|
|
33
|
-
position,
|
|
34
|
-
style: {
|
|
35
|
-
backgroundColor: theme.color.inverse[500],
|
|
36
|
-
width: '256px',
|
|
37
|
-
padding: 0,
|
|
38
|
-
top: ['right', 'left'].includes(position) ? '-3px' : '0',
|
|
39
|
-
...(style || {}),
|
|
40
|
-
},
|
|
41
|
-
...(rest || {}),
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/tour/utils.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcherStep.d.ts","sourceRoot":"","sources":["../../../../../../layout/src/components/tour/PortalSwitcherStep.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,WAgBjC,CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
//@ts-nocheck
|
|
3
|
-
import { Box, Image, Text } from '@citric/core';
|
|
4
|
-
import { tourStepBuilder } from '@stack-spot/portal-components';
|
|
5
|
-
import { useTranslate } from '@stack-spot/portal-translate';
|
|
6
|
-
export const usePortalSwitcherStep = () => {
|
|
7
|
-
const t = useTranslate(translations);
|
|
8
|
-
return tourStepBuilder({
|
|
9
|
-
selector: '.portal-switcher',
|
|
10
|
-
title: t.title,
|
|
11
|
-
content: _jsxs(_Fragment, { children: [_jsx(Image, { src: "https://marketing.stackspot.com/switch-v2.gif", alt: t.imageAlt }), _jsx(Box, { px: 5, py: 3, children: _jsx(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: t.description }) })] }),
|
|
12
|
-
position: 'right',
|
|
13
|
-
style: {
|
|
14
|
-
width: '300px',
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
const translations = {
|
|
19
|
-
en: {
|
|
20
|
-
title: 'Expand Your Horizons with Stackspot',
|
|
21
|
-
description: 'Easily switch between EDP and AI to enhance your projects. Access a wide range of resources with just one click and take your projects to a new level of efficiency. Start your journey now!',
|
|
22
|
-
imageAlt: 'GIF describing how to use product switcher and navigate between AI and EDP portals',
|
|
23
|
-
},
|
|
24
|
-
pt: {
|
|
25
|
-
title: 'Expanda Seus Horizontes com Stackspot',
|
|
26
|
-
description: 'Troque facilmente entre EDP e AI para aprimorar seus projetos. Acesse uma ampla gama de recursos com apenas um clique e leve seus projetos para um novo nível de eficiência. Comece sua jornada agora!',
|
|
27
|
-
imageAlt: 'GIF mostrando como usar o alternador de produtos e navegar entre os portais AI e EDP',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=PortalSwitcherStep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcherStep.js","sourceRoot":"","sources":["../../../../../../layout/src/components/tour/PortalSwitcherStep.tsx"],"names":[],"mappings":";AAAA,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;IACpC,OAAO,eAAe,CAAC;QACrB,QAAQ,EAAE,kBAAkB;QAC5B,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,OAAO,EAAE,8BACP,KAAC,KAAK,IAAC,GAAG,EAAC,+CAA+C,EAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,GAAI,EAC9E,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,WAAW,EAAC,sBAAsB,YAAE,CAAC,CAAC,WAAW,GAAQ,GACnF,IACL;QACH,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE;YACL,KAAK,EAAE,OAAO;SACf;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAKD,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE;QACF,KAAK,EAAE,qCAAqC;QAC5C,WAAW,EAAE,8LAA8L;QAC3M,QAAQ,EAAE,oFAAoF;KAC/F;IACD,EAAE,EAAE;QACF,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,wMAAwM;QACrN,QAAQ,EAAE,sFAAsF;KACjG;CACF,CAAA"}
|
package/src/components/Login.tsx
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { Button, IconBox, Input, Text } from '@citric/core'
|
|
3
|
-
import { Github } from '@citric/icons'
|
|
4
|
-
import { LoadingCircular } from '@citric/ui'
|
|
5
|
-
import { theme } from '@stack-spot/portal-theme'
|
|
6
|
-
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
7
|
-
import { useState } from 'react'
|
|
8
|
-
import { styled } from 'styled-components'
|
|
9
|
-
import { BannerWarning } from './BannerWarning'
|
|
10
|
-
import { MiniLogo } from './MiniLogo'
|
|
11
|
-
|
|
12
|
-
type LoginType = 'sso' | 'idp'
|
|
13
|
-
|
|
14
|
-
interface BaseData {
|
|
15
|
-
type: LoginType,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface SSOData extends BaseData {
|
|
19
|
-
type: 'sso',
|
|
20
|
-
email: string,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface IDPData extends BaseData {
|
|
24
|
-
type: 'idp',
|
|
25
|
-
provider: 'external-idp:github',
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type LoginData = SSOData | IDPData
|
|
29
|
-
|
|
30
|
-
interface Props {
|
|
31
|
-
initialValue?: string,
|
|
32
|
-
onSubmit: (data: LoginData) => Promise<void>,
|
|
33
|
-
welcomeText?: string,
|
|
34
|
-
removeLoadingOnSuccess?: boolean,
|
|
35
|
-
className?: string,
|
|
36
|
-
style?: React.CSSProperties,
|
|
37
|
-
bannerData?: React.ReactNode,
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const LoginBox = styled.form`
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
gap: 24px;
|
|
45
|
-
|
|
46
|
-
header {
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
align-items: center;
|
|
50
|
-
gap: 24px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.title {
|
|
54
|
-
font-size: 1rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.separator {
|
|
58
|
-
padding: 0 8px;
|
|
59
|
-
background-color: ${theme.color.light['400']};
|
|
60
|
-
color: ${theme.color.light['700']};
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: row;
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
gap: 20px;
|
|
66
|
-
margin: 0;
|
|
67
|
-
|
|
68
|
-
&:before, &:after {
|
|
69
|
-
content: '';
|
|
70
|
-
height: 1px;
|
|
71
|
-
flex: 1;
|
|
72
|
-
background-color: ${theme.color.light['600']};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.error {
|
|
77
|
-
color: ${theme.color.danger['500']};
|
|
78
|
-
line-height: 1.5rem;
|
|
79
|
-
}
|
|
80
|
-
`
|
|
81
|
-
|
|
82
|
-
export const Login = ({ onSubmit, initialValue = '', welcomeText, removeLoadingOnSuccess, className, style, bannerData }: Props) => {
|
|
83
|
-
const t = useTranslate(dictionary)
|
|
84
|
-
const searchParams = new URLSearchParams(location.search)
|
|
85
|
-
const [error, setError] = useState(searchParams.get('error_description') || searchParams.get('error') || '')
|
|
86
|
-
const [loading, setLoading] = useState(false)
|
|
87
|
-
const [email, setEmail] = useState(initialValue)
|
|
88
|
-
const disabled = !email.match(/\w+@\w+/)
|
|
89
|
-
|
|
90
|
-
async function login(type: LoginType) {
|
|
91
|
-
setError('')
|
|
92
|
-
setLoading(true)
|
|
93
|
-
try {
|
|
94
|
-
const data: LoginData = type === 'sso' ? { type: 'sso', email } : { type: 'idp', provider: 'external-idp:github' }
|
|
95
|
-
await onSubmit(data)
|
|
96
|
-
if (removeLoadingOnSuccess) setLoading(false)
|
|
97
|
-
} catch (error: any) {
|
|
98
|
-
setLoading(false)
|
|
99
|
-
setError(error.message || error.toString())
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function submitForm(e: React.FormEvent<HTMLFormElement>) {
|
|
104
|
-
e.preventDefault()
|
|
105
|
-
if (disabled) return
|
|
106
|
-
login('sso')
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return (
|
|
110
|
-
<>
|
|
111
|
-
<LoginBox onSubmit={submitForm} className={className} style={style}>
|
|
112
|
-
<header>
|
|
113
|
-
<MiniLogo />
|
|
114
|
-
<Text className="title">{welcomeText || t.welcome}</Text>
|
|
115
|
-
</header>
|
|
116
|
-
<Input name="email" value={email} onChange={e => setEmail(e.target.value)} placeholder={t.placeholder} />
|
|
117
|
-
<Button colorScheme="primary" disabled={disabled || loading}>
|
|
118
|
-
{loading ? <LoadingCircular /> : <Text>{t.continue}</Text>}
|
|
119
|
-
</Button>
|
|
120
|
-
<p className="separator">{t.or}</p>
|
|
121
|
-
<Button colorScheme="light" type="button" onClick={() => login('idp')} disabled={loading}>
|
|
122
|
-
{loading ? <LoadingCircular /> : (
|
|
123
|
-
<>
|
|
124
|
-
<IconBox>
|
|
125
|
-
<Github />
|
|
126
|
-
</IconBox>
|
|
127
|
-
<Text>{t.loginWithGithub}</Text>
|
|
128
|
-
</>
|
|
129
|
-
)}
|
|
130
|
-
</Button>
|
|
131
|
-
{error && <Text className="error">{t.error}: {error}</Text>}
|
|
132
|
-
</LoginBox>
|
|
133
|
-
{bannerData ? <BannerWarning>
|
|
134
|
-
{bannerData}
|
|
135
|
-
</BannerWarning> : null}
|
|
136
|
-
</>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const dictionary = {
|
|
141
|
-
en: {
|
|
142
|
-
welcome: 'Welcome to StackSpot',
|
|
143
|
-
placeholder: 'your@email.com',
|
|
144
|
-
continue: 'Continue',
|
|
145
|
-
or: 'or',
|
|
146
|
-
loginWithGithub: 'Login with Github',
|
|
147
|
-
error: 'Error while attempting to login',
|
|
148
|
-
},
|
|
149
|
-
pt: {
|
|
150
|
-
welcome: 'Bem vindo à StackSpot',
|
|
151
|
-
placeholder: 'nome@email.com',
|
|
152
|
-
continue: 'Continuar',
|
|
153
|
-
or: 'ou',
|
|
154
|
-
loginWithGithub: 'Logar com o GitHub',
|
|
155
|
-
error: 'Erro ao fazer login',
|
|
156
|
-
},
|
|
157
|
-
} satisfies Dictionary
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { theme } from '@stack-spot/portal-theme'
|
|
2
|
-
import { ReactNode } from 'react'
|
|
3
|
-
import { ReactourStep } from 'reactour'
|
|
4
|
-
import { PointingArrowPosition, StepContainer } from './StepContainer'
|
|
5
|
-
import { NavigationProps } from './StepNavigation'
|
|
6
|
-
|
|
7
|
-
const TOUR_COOKIE = 'guided-tour-global'
|
|
8
|
-
const DOMAIN_REGEX = new RegExp(/(\.*(prd|stg|dev)*.stackspot.com)|localhost/)
|
|
9
|
-
const portalUrl = new URL(location.href)
|
|
10
|
-
const cookieDomain = DOMAIN_REGEX.exec(portalUrl.host)?.[0]
|
|
11
|
-
const defaultCookieAttributes = `domain=${cookieDomain}; SameSite=Strict;`
|
|
12
|
-
|
|
13
|
-
const getCookies = (): Record<string, string> => document.cookie.split('; ').reduce((prev, current) => {
|
|
14
|
-
const [name, ...value] = current.split('=')
|
|
15
|
-
prev[name] = value.join('=')
|
|
16
|
-
return prev
|
|
17
|
-
}, {} as Record<string, string>)
|
|
18
|
-
|
|
19
|
-
const setCookie = (key: string, value: string) => {
|
|
20
|
-
document.cookie = `${key}=${value}; ${defaultCookieAttributes}`
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const getCookie = (key: string) => getCookies()[key]
|
|
24
|
-
|
|
25
|
-
const getTourCookie = () => {
|
|
26
|
-
const currentTourObject = getCookie(TOUR_COOKIE)
|
|
27
|
-
return currentTourObject ? currentTourObject.split(',') : []
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const finishTourStep = (key: string) => {
|
|
31
|
-
const tourObject: string[] = getTourCookie()
|
|
32
|
-
if (!tourObject.includes(key)) tourObject.push(key)
|
|
33
|
-
setCookie(TOUR_COOKIE, tourObject.toString())
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const isNewTourStep = (step: ReactourStep) => !hasFinishedTourStep(`${step.selector}`)
|
|
37
|
-
export const hasFinishedTourStep = (key: string) => getTourCookie().includes(key)
|
|
38
|
-
|
|
39
|
-
export const tourStepBuilder = ({
|
|
40
|
-
selector,
|
|
41
|
-
position,
|
|
42
|
-
title,
|
|
43
|
-
content,
|
|
44
|
-
style,
|
|
45
|
-
customNavigation,
|
|
46
|
-
...rest
|
|
47
|
-
}: ReactourStep & { title: string, selector: string, content: ReactNode, customNavigation?: NavigationProps }): ReactourStep => ({
|
|
48
|
-
selector,
|
|
49
|
-
content: (<StepContainer
|
|
50
|
-
stepKey={selector}
|
|
51
|
-
position={position as PointingArrowPosition}
|
|
52
|
-
title={title}
|
|
53
|
-
customNavigation={customNavigation}>
|
|
54
|
-
{content}
|
|
55
|
-
</StepContainer>),
|
|
56
|
-
position,
|
|
57
|
-
style: {
|
|
58
|
-
backgroundColor: theme.color.inverse[500],
|
|
59
|
-
width: '256px',
|
|
60
|
-
padding: 0,
|
|
61
|
-
top: ['right', 'left'].includes(position as PointingArrowPosition) ? '-3px' : '0',
|
|
62
|
-
...(style || {}),
|
|
63
|
-
},
|
|
64
|
-
...(rest || {}),
|
|
65
|
-
})
|