@automattic/onboarding 1.0.0 → 1.0.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/.storybook/index.scss +16 -0
- package/.storybook/main.ts +15 -0
- package/.storybook/preview.ts +5 -0
- package/CHANGELOG.md +5 -0
- package/dist/cjs/action-buttons/index.js +1 -13
- package/dist/cjs/action-buttons/index.js.map +1 -1
- package/dist/cjs/action-buttons/style.scss +4 -40
- package/dist/cjs/cart/create-cart-manager-client.js +3 -3
- package/dist/cjs/cart/create-cart-manager-client.js.map +1 -1
- package/dist/cjs/cart/index.js +45 -67
- package/dist/cjs/cart/index.js.map +1 -1
- package/dist/cjs/confetti/index.js +1 -1
- package/dist/cjs/confetti/index.js.map +1 -1
- package/dist/cjs/flow-progress/use-flow-progress.js +0 -57
- package/dist/cjs/flow-progress/use-flow-progress.js.map +1 -1
- package/dist/cjs/hooks/use-persisted-state.js +61 -0
- package/dist/cjs/hooks/use-persisted-state.js.map +1 -0
- package/dist/cjs/hooray/index.js +1 -1
- package/dist/cjs/index.js +11 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mshots-image/index.js +34 -15
- package/dist/cjs/mshots-image/index.js.map +1 -1
- package/dist/cjs/mshots-image/style.scss +1 -0
- package/dist/cjs/navigator/hooks/index.js +2 -1
- package/dist/cjs/navigator/hooks/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-buttons/index.js +2 -2
- package/dist/cjs/navigator/navigator-buttons/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-header/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-screens/hooks/index.js +3 -2
- package/dist/cjs/navigator/navigator-screens/hooks/index.js.map +1 -1
- package/dist/cjs/navigator/navigator-screens/hooks/use-navigator-screens.js +1 -1
- package/dist/cjs/navigator/navigator-screens/hooks/use-navigator-screens.js.map +1 -1
- package/dist/cjs/navigator/navigator-screens/navigator-screens.js +7 -2
- package/dist/cjs/navigator/navigator-screens/navigator-screens.js.map +1 -1
- package/dist/cjs/select-card-checkbox/index.js +4 -3
- package/dist/cjs/select-card-checkbox/index.js.map +1 -1
- package/dist/cjs/select-card-checkbox/style.scss +11 -14
- package/dist/cjs/select-card-checkbox-v2/index.js +15 -0
- package/dist/cjs/select-card-checkbox-v2/index.js.map +1 -0
- package/dist/cjs/select-card-checkbox-v2/style.scss +25 -0
- package/dist/cjs/select-items/index.js +2 -1
- package/dist/cjs/select-items/index.js.map +1 -1
- package/dist/cjs/select-items/style.scss +2 -1
- package/dist/cjs/setup-tailored-site-after-creation.js +9 -37
- package/dist/cjs/setup-tailored-site-after-creation.js.map +1 -1
- package/dist/cjs/step-container/index.js +10 -12
- package/dist/cjs/step-container/index.js.map +1 -1
- package/dist/cjs/step-container/style.scss +35 -77
- package/dist/cjs/step-container-v2/components/ContentRow/ContentRow.js +14 -0
- package/dist/cjs/step-container-v2/components/ContentRow/ContentRow.js.map +1 -0
- package/dist/cjs/step-container-v2/components/ContentRow/style.scss +26 -0
- package/dist/cjs/step-container-v2/components/ContentWrapper/ContentWrapper.js +19 -0
- package/dist/cjs/step-container-v2/components/ContentWrapper/ContentWrapper.js.map +1 -0
- package/dist/cjs/step-container-v2/components/ContentWrapper/style.scss +70 -0
- package/dist/cjs/step-container-v2/components/Heading/Heading.js +17 -0
- package/dist/cjs/step-container-v2/components/Heading/Heading.js.map +1 -0
- package/dist/cjs/step-container-v2/components/Heading/style.scss +47 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/StepContainerV2.js +36 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/StepContainerV2.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/context.js +13 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/context.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StepContainerV2/style.scss +21 -0
- package/dist/cjs/step-container-v2/components/StepCounter/StepCounter.js +17 -0
- package/dist/cjs/step-container-v2/components/StepCounter/StepCounter.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StepCounter/style.scss +4 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBar.js +17 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBar.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js +31 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js.map +1 -0
- package/dist/cjs/step-container-v2/components/StickyBottomBar/style.scss +56 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBar.js +55 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBar.js.map +1 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBarRenderer.js +32 -0
- package/dist/cjs/step-container-v2/components/TopBar/TopBarRenderer.js.map +1 -0
- package/dist/cjs/step-container-v2/components/TopBar/style.scss +75 -0
- package/dist/cjs/step-container-v2/components/buttons/BackButton/BackButton.js +29 -0
- package/dist/cjs/step-container-v2/components/buttons/BackButton/BackButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/BackButton/style.scss +16 -0
- package/dist/cjs/step-container-v2/components/buttons/LinkButton/LinkButton.js +18 -0
- package/dist/cjs/step-container-v2/components/buttons/LinkButton/LinkButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
- package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js +18 -0
- package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
- package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js +18 -0
- package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js.map +1 -0
- package/dist/cjs/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
- package/dist/cjs/step-container-v2/components/buttons/SkipButton/SkipButton.js +28 -0
- package/dist/cjs/step-container-v2/components/buttons/SkipButton/SkipButton.js.map +1 -0
- package/dist/cjs/step-container-v2/contexts/StepContainerV2Context.js +17 -0
- package/dist/cjs/step-container-v2/contexts/StepContainerV2Context.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js +18 -0
- package/dist/cjs/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/normalizeButtonProps.js +13 -0
- package/dist/cjs/step-container-v2/helpers/normalizeButtonProps.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/wireframe-placeholder.js +18 -0
- package/dist/cjs/step-container-v2/helpers/wireframe-placeholder.js.map +1 -0
- package/dist/cjs/step-container-v2/helpers/withStepContainerV2ContextDecorator.js +15 -0
- package/dist/cjs/step-container-v2/helpers/withStepContainerV2ContextDecorator.js.map +1 -0
- package/dist/cjs/step-container-v2/index.js +41 -0
- package/dist/cjs/step-container-v2/index.js.map +1 -0
- package/dist/cjs/step-container-v2/types.js +3 -0
- package/dist/cjs/step-container-v2/types.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js +26 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js +52 -0
- package/dist/cjs/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js +26 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js +25 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.js +30 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.stories.js +29 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/Loading.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/Loading/style.scss +22 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js +17 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js +17 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js +38 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js +28 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.js +17 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.js.map +1 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.stories.js +41 -0
- package/dist/cjs/step-container-v2/wireframes/WideLayout/WideLayout.stories.js.map +1 -0
- package/dist/cjs/step-navigation-link/index.js +2 -2
- package/dist/cjs/step-navigation-link/index.js.map +1 -1
- package/dist/cjs/step-navigation-link/style.scss +5 -3
- package/dist/cjs/titles/styles.scss +2 -2
- package/dist/cjs/upload-and-set-site-logo.js +4 -5
- package/dist/cjs/upload-and-set-site-logo.js.map +1 -1
- package/dist/cjs/utils/contrastChecker.js +1 -22
- package/dist/cjs/utils/contrastChecker.js.map +1 -1
- package/dist/cjs/utils/flows.js +73 -117
- package/dist/cjs/utils/flows.js.map +1 -1
- package/dist/cjs/utils/is-domain.js +1 -2
- package/dist/cjs/utils/is-domain.js.map +1 -1
- package/dist/cjs/utils/use-data-loss-warning.js +1 -2
- package/dist/cjs/utils/use-data-loss-warning.js.map +1 -1
- package/dist/cjs/wpcom-request.js +24 -0
- package/dist/cjs/wpcom-request.js.map +1 -0
- package/dist/esm/action-buttons/index.js +1 -11
- package/dist/esm/action-buttons/index.js.map +1 -1
- package/dist/esm/action-buttons/style.scss +4 -40
- package/dist/esm/cart/create-cart-manager-client.js +1 -1
- package/dist/esm/cart/create-cart-manager-client.js.map +1 -1
- package/dist/esm/cart/index.js +40 -61
- package/dist/esm/cart/index.js.map +1 -1
- package/dist/esm/confetti/index.js +1 -1
- package/dist/esm/confetti/index.js.map +1 -1
- package/dist/esm/flow-progress/use-flow-progress.js +1 -58
- package/dist/esm/flow-progress/use-flow-progress.js.map +1 -1
- package/dist/esm/hooks/use-persisted-state.js +57 -0
- package/dist/esm/hooks/use-persisted-state.js.map +1 -0
- package/dist/esm/hooray/index.js +1 -1
- package/dist/esm/index.js +6 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/mshots-image/index.js +33 -13
- package/dist/esm/mshots-image/index.js.map +1 -1
- package/dist/esm/mshots-image/style.scss +1 -0
- package/dist/esm/navigator/navigator-buttons/index.js.map +1 -1
- package/dist/esm/navigator/navigator-header/index.js.map +1 -1
- package/dist/esm/navigator/navigator-screens/hooks/use-navigator-screens.js +1 -1
- package/dist/esm/navigator/navigator-screens/hooks/use-navigator-screens.js.map +1 -1
- package/dist/esm/navigator/navigator-screens/navigator-screens.js +8 -3
- package/dist/esm/navigator/navigator-screens/navigator-screens.js.map +1 -1
- package/dist/esm/select-card-checkbox/index.js +4 -3
- package/dist/esm/select-card-checkbox/index.js.map +1 -1
- package/dist/esm/select-card-checkbox/style.scss +11 -14
- package/dist/esm/select-card-checkbox-v2/index.js +12 -0
- package/dist/esm/select-card-checkbox-v2/index.js.map +1 -0
- package/dist/esm/select-card-checkbox-v2/style.scss +25 -0
- package/dist/esm/select-items/index.js +3 -2
- package/dist/esm/select-items/index.js.map +1 -1
- package/dist/esm/select-items/style.scss +2 -1
- package/dist/esm/setup-tailored-site-after-creation.js +9 -37
- package/dist/esm/setup-tailored-site-after-creation.js.map +1 -1
- package/dist/esm/step-container/index.js +11 -13
- package/dist/esm/step-container/index.js.map +1 -1
- package/dist/esm/step-container/style.scss +35 -77
- package/dist/esm/step-container-v2/components/ContentRow/ContentRow.js +9 -0
- package/dist/esm/step-container-v2/components/ContentRow/ContentRow.js.map +1 -0
- package/dist/esm/step-container-v2/components/ContentRow/style.scss +26 -0
- package/dist/esm/step-container-v2/components/ContentWrapper/ContentWrapper.js +14 -0
- package/dist/esm/step-container-v2/components/ContentWrapper/ContentWrapper.js.map +1 -0
- package/dist/esm/step-container-v2/components/ContentWrapper/style.scss +70 -0
- package/dist/esm/step-container-v2/components/Heading/Heading.js +12 -0
- package/dist/esm/step-container-v2/components/Heading/Heading.js.map +1 -0
- package/dist/esm/step-container-v2/components/Heading/style.scss +47 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/StepContainerV2.js +32 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/StepContainerV2.js.map +1 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/context.js +10 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/context.js.map +1 -0
- package/dist/esm/step-container-v2/components/StepContainerV2/style.scss +21 -0
- package/dist/esm/step-container-v2/components/StepCounter/StepCounter.js +13 -0
- package/dist/esm/step-container-v2/components/StepCounter/StepCounter.js.map +1 -0
- package/dist/esm/step-container-v2/components/StepCounter/style.scss +4 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBar.js +12 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBar.js.map +1 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js +27 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.js.map +1 -0
- package/dist/esm/step-container-v2/components/StickyBottomBar/style.scss +56 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBar.js +49 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBar.js.map +1 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBarRenderer.js +27 -0
- package/dist/esm/step-container-v2/components/TopBar/TopBarRenderer.js.map +1 -0
- package/dist/esm/step-container-v2/components/TopBar/style.scss +75 -0
- package/dist/esm/step-container-v2/components/buttons/BackButton/BackButton.js +25 -0
- package/dist/esm/step-container-v2/components/buttons/BackButton/BackButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/BackButton/style.scss +16 -0
- package/dist/esm/step-container-v2/components/buttons/LinkButton/LinkButton.js +14 -0
- package/dist/esm/step-container-v2/components/buttons/LinkButton/LinkButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
- package/dist/esm/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js +14 -0
- package/dist/esm/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
- package/dist/esm/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js +14 -0
- package/dist/esm/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.js.map +1 -0
- package/dist/esm/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
- package/dist/esm/step-container-v2/components/buttons/SkipButton/SkipButton.js +24 -0
- package/dist/esm/step-container-v2/components/buttons/SkipButton/SkipButton.js.map +1 -0
- package/dist/esm/step-container-v2/contexts/StepContainerV2Context.js +13 -0
- package/dist/esm/step-container-v2/contexts/StepContainerV2Context.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js +14 -0
- package/dist/esm/step-container-v2/helpers/decorateButtonWithTracksEventRecording.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/normalizeButtonProps.js +8 -0
- package/dist/esm/step-container-v2/helpers/normalizeButtonProps.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/wireframe-placeholder.js +15 -0
- package/dist/esm/step-container-v2/helpers/wireframe-placeholder.js.map +1 -0
- package/dist/esm/step-container-v2/helpers/withStepContainerV2ContextDecorator.js +11 -0
- package/dist/esm/step-container-v2/helpers/withStepContainerV2ContextDecorator.js.map +1 -0
- package/dist/esm/step-container-v2/index.js +22 -0
- package/dist/esm/step-container-v2/index.js.map +1 -0
- package/dist/esm/step-container-v2/types.js +2 -0
- package/dist/esm/step-container-v2/types.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js +22 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js +45 -0
- package/dist/esm/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js +23 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js +21 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.js +26 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.stories.js +22 -0
- package/dist/esm/step-container-v2/wireframes/Loading/Loading.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/Loading/style.scss +22 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js +12 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js +13 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js +33 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js +22 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.js +13 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.js.map +1 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.stories.js +36 -0
- package/dist/esm/step-container-v2/wireframes/WideLayout/WideLayout.stories.js.map +1 -0
- package/dist/esm/step-navigation-link/index.js +2 -2
- package/dist/esm/step-navigation-link/index.js.map +1 -1
- package/dist/esm/step-navigation-link/style.scss +5 -3
- package/dist/esm/titles/styles.scss +2 -2
- package/dist/esm/upload-and-set-site-logo.js +1 -1
- package/dist/esm/upload-and-set-site-logo.js.map +1 -1
- package/dist/esm/utils/contrastChecker.js +0 -20
- package/dist/esm/utils/contrastChecker.js.map +1 -1
- package/dist/esm/utils/flows.js +57 -96
- package/dist/esm/utils/flows.js.map +1 -1
- package/dist/esm/wpcom-request.js +18 -0
- package/dist/esm/wpcom-request.js.map +1 -0
- package/dist/styles/mixins.scss +4 -4
- package/dist/styles/variables.scss +2 -2
- package/dist/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/action-buttons/index.d.ts +0 -4
- package/dist/types/action-buttons/index.d.ts.map +1 -1
- package/dist/types/cart/index.d.ts +7 -4
- package/dist/types/cart/index.d.ts.map +1 -1
- package/dist/types/flow-progress/use-flow-progress.d.ts.map +1 -1
- package/dist/types/hooks/use-persisted-state.d.ts +26 -0
- package/dist/types/hooks/use-persisted-state.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/intent-screen/index.d.ts.map +1 -1
- package/dist/types/mshots-image/index.d.ts +2 -1
- package/dist/types/mshots-image/index.d.ts.map +1 -1
- package/dist/types/navigator/hooks/use-navigator-listener.d.ts.map +1 -1
- package/dist/types/navigator/navigator-buttons/index.d.ts +1 -1
- package/dist/types/navigator/navigator-buttons/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-header/index.d.ts +1 -1
- package/dist/types/navigator/navigator-header/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-item-group/index.d.ts +0 -1
- package/dist/types/navigator/navigator-item-group/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-listener/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screen/index.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/hooks/use-navigator-buttons.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/hooks/use-navigator-screens.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/navigator-screens.d.ts +4 -2
- package/dist/types/navigator/navigator-screens/navigator-screens.d.ts.map +1 -1
- package/dist/types/navigator/navigator-screens/types.d.ts +1 -1
- package/dist/types/navigator/navigator-screens/types.d.ts.map +1 -1
- package/dist/types/progress/index.d.ts.map +1 -1
- package/dist/types/select-card-checkbox/index.d.ts +3 -1
- package/dist/types/select-card-checkbox/index.d.ts.map +1 -1
- package/dist/types/select-card-checkbox-v2/index.d.ts +12 -0
- package/dist/types/select-card-checkbox-v2/index.d.ts.map +1 -0
- package/dist/types/select-items/index.d.ts +1 -1
- package/dist/types/select-items/index.d.ts.map +1 -1
- package/dist/types/setup-tailored-site-after-creation.d.ts +1 -1
- package/dist/types/setup-tailored-site-after-creation.d.ts.map +1 -1
- package/dist/types/step-container/index.d.ts +3 -4
- package/dist/types/step-container/index.d.ts.map +1 -1
- package/dist/types/step-container-v2/components/ContentRow/ContentRow.d.ts +9 -0
- package/dist/types/step-container-v2/components/ContentRow/ContentRow.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/ContentWrapper/ContentWrapper.d.ts +15 -0
- package/dist/types/step-container-v2/components/ContentWrapper/ContentWrapper.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/Heading/Heading.d.ts +11 -0
- package/dist/types/step-container-v2/components/Heading/Heading.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StepContainerV2/StepContainerV2.d.ts +7 -0
- package/dist/types/step-container-v2/components/StepContainerV2/StepContainerV2.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StepContainerV2/context.d.ts +12 -0
- package/dist/types/step-container-v2/components/StepContainerV2/context.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StepCounter/StepCounter.d.ts +7 -0
- package/dist/types/step-container-v2/components/StepCounter/StepCounter.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBar.d.ts +14 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBar.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.d.ts +5 -0
- package/dist/types/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/TopBar/TopBar.d.ts +25 -0
- package/dist/types/step-container-v2/components/TopBar/TopBar.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/TopBar/TopBarRenderer.d.ts +6 -0
- package/dist/types/step-container-v2/components/TopBar/TopBarRenderer.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/BackButton/BackButton.d.ts +6 -0
- package/dist/types/step-container-v2/components/buttons/BackButton/BackButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/LinkButton/LinkButton.d.ts +4 -0
- package/dist/types/step-container-v2/components/buttons/LinkButton/LinkButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.d.ts +4 -0
- package/dist/types/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.d.ts +4 -0
- package/dist/types/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/components/buttons/SkipButton/SkipButton.d.ts +9 -0
- package/dist/types/step-container-v2/components/buttons/SkipButton/SkipButton.d.ts.map +1 -0
- package/dist/types/step-container-v2/contexts/StepContainerV2Context.d.ts +10 -0
- package/dist/types/step-container-v2/contexts/StepContainerV2Context.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/decorateButtonWithTracksEventRecording.d.ts +8 -0
- package/dist/types/step-container-v2/helpers/decorateButtonWithTracksEventRecording.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/normalizeButtonProps.d.ts +5 -0
- package/dist/types/step-container-v2/helpers/normalizeButtonProps.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/wireframe-placeholder.d.ts +7 -0
- package/dist/types/step-container-v2/helpers/wireframe-placeholder.d.ts.map +1 -0
- package/dist/types/step-container-v2/helpers/withStepContainerV2ContextDecorator.d.ts +2 -0
- package/dist/types/step-container-v2/helpers/withStepContainerV2ContextDecorator.d.ts.map +1 -0
- package/dist/types/step-container-v2/index.d.ts +22 -0
- package/dist/types/step-container-v2/index.d.ts.map +1 -0
- package/dist/types/step-container-v2/types.d.ts +4 -0
- package/dist/types/step-container-v2/types.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.d.ts +16 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.d.ts +9 -0
- package/dist/types/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.d.ts +18 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.d.ts +6 -0
- package/dist/types/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.d.ts +12 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.stories.d.ts +9 -0
- package/dist/types/step-container-v2/wireframes/Loading/Loading.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.d.ts +10 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.d.ts +6 -0
- package/dist/types/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.d.ts +20 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.d.ts +8 -0
- package/dist/types/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.d.ts +13 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.d.ts.map +1 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.stories.d.ts +9 -0
- package/dist/types/step-container-v2/wireframes/WideLayout/WideLayout.stories.d.ts.map +1 -0
- package/dist/types/step-navigation-link/index.d.ts +1 -1
- package/dist/types/step-navigation-link/index.d.ts.map +1 -1
- package/dist/types/upload-and-set-site-logo.d.ts +1 -1
- package/dist/types/upload-and-set-site-logo.d.ts.map +1 -1
- package/dist/types/utils/contrastChecker.d.ts +0 -10
- package/dist/types/utils/contrastChecker.d.ts.map +1 -1
- package/dist/types/utils/domain-suggester.d.ts.map +1 -1
- package/dist/types/utils/flows.d.ts +37 -46
- package/dist/types/utils/flows.d.ts.map +1 -1
- package/dist/types/wpcom-request.d.ts +7 -0
- package/dist/types/wpcom-request.d.ts.map +1 -0
- package/jest.config.js +0 -1
- package/package.json +44 -23
- package/src/action-buttons/index.tsx +0 -40
- package/src/action-buttons/style.scss +4 -40
- package/src/cart/create-cart-manager-client.ts +1 -1
- package/src/cart/index.tsx +60 -103
- package/src/cart/test/index.ts +14 -14
- package/src/confetti/index.tsx +1 -1
- package/src/flow-progress/use-flow-progress.ts +1 -66
- package/src/hooks/test/index.ts +54 -0
- package/src/hooks/use-persisted-state.ts +85 -0
- package/src/hooray/index.tsx +1 -1
- package/src/index.ts +7 -12
- package/src/intent-screen/test/index.tsx +10 -7
- package/src/mshots-image/index.tsx +52 -21
- package/src/mshots-image/style.scss +1 -0
- package/src/navigator/navigator-buttons/index.tsx +1 -0
- package/src/navigator/navigator-header/index.tsx +1 -0
- package/src/navigator/navigator-screens/hooks/use-navigator-screens.tsx +5 -1
- package/src/navigator/navigator-screens/navigator-screens.tsx +17 -0
- package/src/navigator/navigator-screens/types.ts +1 -0
- package/src/select-card-checkbox/index.tsx +10 -4
- package/src/select-card-checkbox/style.scss +11 -14
- package/src/select-card-checkbox-v2/index.tsx +51 -0
- package/src/select-card-checkbox-v2/style.scss +25 -0
- package/src/select-card-checkbox-v2/test/index.test.tsx +49 -0
- package/src/select-items/index.tsx +10 -4
- package/src/select-items/style.scss +2 -1
- package/src/setup-tailored-site-after-creation.ts +16 -60
- package/src/step-container/index.tsx +21 -42
- package/src/step-container/style.scss +35 -77
- package/src/step-container-v2/README.md +235 -0
- package/src/step-container-v2/components/ContentRow/ContentRow.tsx +27 -0
- package/src/step-container-v2/components/ContentRow/style.scss +26 -0
- package/src/step-container-v2/components/ContentWrapper/ContentWrapper.tsx +41 -0
- package/src/step-container-v2/components/ContentWrapper/style.scss +70 -0
- package/src/step-container-v2/components/Heading/Heading.tsx +31 -0
- package/src/step-container-v2/components/Heading/style.scss +47 -0
- package/src/step-container-v2/components/StepContainerV2/StepContainerV2.tsx +55 -0
- package/src/step-container-v2/components/StepContainerV2/context.ts +25 -0
- package/src/step-container-v2/components/StepContainerV2/style.scss +21 -0
- package/src/step-container-v2/components/StepCounter/StepCounter.tsx +32 -0
- package/src/step-container-v2/components/StepCounter/style.scss +4 -0
- package/src/step-container-v2/components/StickyBottomBar/StickyBottomBar.tsx +46 -0
- package/src/step-container-v2/components/StickyBottomBar/StickyBottomBarRenderer.tsx +41 -0
- package/src/step-container-v2/components/StickyBottomBar/style.scss +56 -0
- package/src/step-container-v2/components/TopBar/TopBar.tsx +116 -0
- package/src/step-container-v2/components/TopBar/TopBarRenderer.tsx +43 -0
- package/src/step-container-v2/components/TopBar/style.scss +75 -0
- package/src/step-container-v2/components/buttons/BackButton/BackButton.tsx +32 -0
- package/src/step-container-v2/components/buttons/BackButton/style.scss +16 -0
- package/src/step-container-v2/components/buttons/LinkButton/LinkButton.tsx +17 -0
- package/src/step-container-v2/components/buttons/LinkButton/style.scss +6 -0
- package/src/step-container-v2/components/buttons/PrimaryButton/PrimaryButton.tsx +17 -0
- package/src/step-container-v2/components/buttons/PrimaryButton/style.scss +6 -0
- package/src/step-container-v2/components/buttons/SecondaryButton/SecondaryButton.tsx +17 -0
- package/src/step-container-v2/components/buttons/SecondaryButton/style.scss +6 -0
- package/src/step-container-v2/components/buttons/SkipButton/SkipButton.tsx +30 -0
- package/src/step-container-v2/contexts/StepContainerV2Context.ts +23 -0
- package/src/step-container-v2/helpers/decorateButtonWithTracksEventRecording.ts +28 -0
- package/src/step-container-v2/helpers/normalizeButtonProps.ts +14 -0
- package/src/step-container-v2/helpers/wireframe-placeholder.tsx +28 -0
- package/src/step-container-v2/helpers/withStepContainerV2ContextDecorator.tsx +16 -0
- package/src/step-container-v2/index.tsx +24 -0
- package/src/step-container-v2/types.ts +4 -0
- package/src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.stories.tsx +122 -0
- package/src/step-container-v2/wireframes/CenteredColumnLayout/CenteredColumnLayout.tsx +66 -0
- package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.stories.tsx +51 -0
- package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/FixedColumnOnTheLeftLayout.tsx +69 -0
- package/src/step-container-v2/wireframes/FixedColumnOnTheLeftLayout/style.scss +14 -0
- package/src/step-container-v2/wireframes/Loading/Loading.stories.tsx +27 -0
- package/src/step-container-v2/wireframes/Loading/Loading.tsx +52 -0
- package/src/step-container-v2/wireframes/Loading/style.scss +22 -0
- package/src/step-container-v2/wireframes/Loading/test/Loading.test.tsx +42 -0
- package/src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.stories.tsx +21 -0
- package/src/step-container-v2/wireframes/PlaygroundLayout/PlaygroundLayout.tsx +31 -0
- package/src/step-container-v2/wireframes/PlaygroundLayout/style.scss +5 -0
- package/src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.stories.tsx +93 -0
- package/src/step-container-v2/wireframes/TwoColumnLayout/TwoColumnLayout.tsx +93 -0
- package/src/step-container-v2/wireframes/TwoColumnLayout/style.scss +15 -0
- package/src/step-container-v2/wireframes/WideLayout/WideLayout.stories.tsx +83 -0
- package/src/step-container-v2/wireframes/WideLayout/WideLayout.tsx +44 -0
- package/src/step-navigation-link/index.tsx +3 -0
- package/src/step-navigation-link/style.scss +5 -3
- package/src/style-imports.d.ts +3 -0
- package/src/titles/styles.scss +2 -2
- package/src/upload-and-set-site-logo.ts +1 -1
- package/src/utils/contrastChecker.ts +0 -35
- package/src/utils/flows.ts +67 -123
- package/src/wpcom-request.ts +26 -0
- package/styles/mixins.scss +4 -4
- package/styles/variables.scss +2 -2
- package/tsconfig.json +1 -0
- package/dist/cjs/feature-icon/index.js +0 -19
- package/dist/cjs/feature-icon/index.js.map +0 -1
- package/dist/cjs/flow-progress/index.js +0 -14
- package/dist/cjs/flow-progress/index.js.map +0 -1
- package/dist/cjs/flow-progress/style.scss +0 -5
- package/dist/cjs/notice/index.js +0 -12
- package/dist/cjs/notice/index.js.map +0 -1
- package/dist/cjs/notice/style.scss +0 -19
- package/dist/cjs/select-card-radio/index.js +0 -21
- package/dist/cjs/select-card-radio/index.js.map +0 -1
- package/dist/cjs/select-card-radio/style.scss +0 -44
- package/dist/cjs/sensei-logo/index.js +0 -8
- package/dist/cjs/sensei-logo/index.js.map +0 -1
- package/dist/cjs/videopress-logo/index.js +0 -8
- package/dist/cjs/videopress-logo/index.js.map +0 -1
- package/dist/esm/feature-icon/index.js +0 -16
- package/dist/esm/feature-icon/index.js.map +0 -1
- package/dist/esm/flow-progress/index.js +0 -12
- package/dist/esm/flow-progress/index.js.map +0 -1
- package/dist/esm/flow-progress/style.scss +0 -5
- package/dist/esm/notice/index.js +0 -9
- package/dist/esm/notice/index.js.map +0 -1
- package/dist/esm/notice/style.scss +0 -19
- package/dist/esm/select-card-radio/index.js +0 -15
- package/dist/esm/select-card-radio/index.js.map +0 -1
- package/dist/esm/select-card-radio/style.scss +0 -44
- package/dist/esm/sensei-logo/index.js +0 -6
- package/dist/esm/sensei-logo/index.js.map +0 -1
- package/dist/esm/videopress-logo/index.js +0 -6
- package/dist/esm/videopress-logo/index.js.map +0 -1
- package/dist/types/feature-icon/index.d.ts +0 -9
- package/dist/types/feature-icon/index.d.ts.map +0 -1
- package/dist/types/flow-progress/index.d.ts +0 -9
- package/dist/types/flow-progress/index.d.ts.map +0 -1
- package/dist/types/notice/index.d.ts +0 -7
- package/dist/types/notice/index.d.ts.map +0 -1
- package/dist/types/select-card-radio/index.d.ts +0 -22
- package/dist/types/select-card-radio/index.d.ts.map +0 -1
- package/dist/types/sensei-logo/index.d.ts +0 -8
- package/dist/types/sensei-logo/index.d.ts.map +0 -1
- package/dist/types/videopress-logo/index.d.ts +0 -8
- package/dist/types/videopress-logo/index.d.ts.map +0 -1
- package/src/feature-icon/index.tsx +0 -102
- package/src/flow-progress/index.tsx +0 -22
- package/src/flow-progress/style.scss +0 -5
- package/src/notice/index.tsx +0 -16
- package/src/notice/style.scss +0 -19
- package/src/select-card-radio/index.tsx +0 -64
- package/src/select-card-radio/style.scss +0 -44
- package/src/select-card-radio/test/index.tsx +0 -50
- package/src/sensei-logo/index.tsx +0 -30
- package/src/videopress-logo/index.tsx +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-cart-manager-client.js","sourceRoot":"","sources":["../../../src/cart/create-cart-manager-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"create-cart-manager-client.js","sourceRoot":"","sources":["../../../src/cart/create-cart-manager-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAQ5C,MAAM,YAAY,GAAG,CAAE,OAAgB,EAAG,EAAE;IAC3C,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACJ,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACR,iDAAiD;IAClD,CAAC;IACD,OAAO,YAAY,CAAyC;QAC3D,IAAI,EAAE,qBAAsB,OAAQ,WAAY,MAAM,IAAI,SAAU,EAAE;QACtE,MAAM,EAAE,KAAK;QACb,UAAU,EAAE,KAAK;KACjB,CAAE,CAAC;AACL,CAAC,CAAC;AACF,MAAM,YAAY,GAAG,CAAE,OAAgB,EAAE,QAAqB,EAAG,EAAE,CAClE,YAAY,CAAyC;IACpD,IAAI,EAAE,qBAAsB,OAAQ,EAAE;IACtC,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,QAAQ;CACd,CAAE,CAAC;AAEL,eAAe,+BAA+B,CAAE;IAC/C,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,YAAY;CACrB,CAAE,CAAC"}
|
package/dist/esm/cart/index.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import config from '@automattic/calypso-config';
|
|
2
2
|
import { getUrlParts } from '@automattic/calypso-url';
|
|
3
|
+
import { getTld, isFreeSubdomainQuery } from '@automattic/domain-search';
|
|
3
4
|
import { guessTimezone, getLanguage } from '@automattic/i18n-utils';
|
|
4
5
|
import debugFactory from 'debug';
|
|
5
6
|
import { getLocaleSlug } from 'i18n-calypso';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import { isEmpty } from 'lodash';
|
|
8
|
+
import { setupSiteAfterCreation, isTailoredSignupFlow, HUNDRED_YEAR_PLAN_FLOW, isAnyHostingFlow, AI_SITE_BUILDER_FLOW, } from '../';
|
|
9
|
+
import wpcomRequest from '../wpcom-request';
|
|
9
10
|
import cartManagerClient from './create-cart-manager-client';
|
|
10
11
|
const debug = debugFactory('calypso:signup:step-actions');
|
|
11
|
-
const getBlogNameGenerationParams = ({ siteUrl, siteTitle, flowToCheck, username,
|
|
12
|
+
const getBlogNameGenerationParams = ({ siteUrl, siteTitle, flowToCheck, username, }) => {
|
|
12
13
|
if (siteUrl) {
|
|
13
|
-
const
|
|
14
|
-
if (isMigrationFlow(flowToCheck)) {
|
|
15
|
-
return {
|
|
16
|
-
blog_name,
|
|
17
|
-
find_available_url: true,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
14
|
+
const blogName = siteUrl.replace('.wordpress.com', '');
|
|
20
15
|
return {
|
|
21
|
-
blog_name,
|
|
22
|
-
|
|
16
|
+
blog_name: blogName,
|
|
17
|
+
// Free subdomains (.wordpress.com and .blog) should use the exact URL.
|
|
18
|
+
// Only paid domains need find_available_url to generate a fallback free subdomain.
|
|
19
|
+
find_available_url: !isFreeSubdomainQuery(siteUrl) && !!getTld(blogName),
|
|
23
20
|
};
|
|
24
21
|
}
|
|
25
22
|
if (siteTitle) {
|
|
@@ -40,7 +37,7 @@ const getBlogNameGenerationParams = ({ siteUrl, siteTitle, flowToCheck, username
|
|
|
40
37
|
};
|
|
41
38
|
};
|
|
42
39
|
export const getNewSiteParams = (params) => {
|
|
43
|
-
const { flowToCheck, themeSlugWithRepo, siteTitle, siteAccentColor, useThemeHeadstart = false, siteVisibility, sourceSlug, } = params;
|
|
40
|
+
const { flowToCheck, themeSlugWithRepo, siteTitle, siteAccentColor, useThemeHeadstart = false, siteVisibility, sourceSlug, siteIntent, partnerBundle, } = params;
|
|
44
41
|
// We will use the default annotation instead of theme annotation as fallback,
|
|
45
42
|
// when segment and vertical values are not sent. Check pbAok1-p2#comment-834.
|
|
46
43
|
const newSiteParams = {
|
|
@@ -61,17 +58,17 @@ export const getNewSiteParams = (params) => {
|
|
|
61
58
|
...(sourceSlug && { site_source_slug: sourceSlug }),
|
|
62
59
|
...(siteAccentColor && { site_accent_color: siteAccentColor }),
|
|
63
60
|
...(themeSlugWithRepo && { theme: themeSlugWithRepo }),
|
|
61
|
+
...(siteIntent && { site_intent: siteIntent }),
|
|
62
|
+
...(partnerBundle && { site_partner_bundle: partnerBundle }),
|
|
64
63
|
},
|
|
65
64
|
validate: false,
|
|
66
65
|
};
|
|
67
66
|
return newSiteParams;
|
|
68
67
|
};
|
|
69
|
-
export const
|
|
70
|
-
const siteUrl = domainItem?.domain_name;
|
|
71
|
-
const isFreeThemePreselected = startsWith(themeSlugWithRepo, 'pub');
|
|
68
|
+
export const createSite = async (flowName, themeSlugWithRepo, siteVisibility, siteTitle, siteAccentColor, useThemeHeadstart, username, partnerBundle, storedSiteUrl, domainItem, sourceSlug, siteIntent, siteGoals, gardenName, gardenPartnerName, specId, ref) => {
|
|
69
|
+
const siteUrl = storedSiteUrl || domainItem?.domain_name;
|
|
72
70
|
const newSiteParams = getNewSiteParams({
|
|
73
71
|
flowToCheck: flowName,
|
|
74
|
-
isPurchasingDomainItem,
|
|
75
72
|
themeSlugWithRepo,
|
|
76
73
|
siteUrl,
|
|
77
74
|
siteTitle,
|
|
@@ -80,6 +77,8 @@ export const createSiteWithCart = async (flowName, userIsLoggedIn, isPurchasingD
|
|
|
80
77
|
siteVisibility,
|
|
81
78
|
username,
|
|
82
79
|
sourceSlug,
|
|
80
|
+
siteIntent,
|
|
81
|
+
partnerBundle,
|
|
83
82
|
});
|
|
84
83
|
// if ( isEmpty( bearerToken ) && 'onboarding-registrationless' === flowToCheck ) {
|
|
85
84
|
// saveToLocalStorageAndProceed( state, domainItem, themeItem, newSiteParams, callback );
|
|
@@ -89,6 +88,8 @@ export const createSiteWithCart = async (flowName, userIsLoggedIn, isPurchasingD
|
|
|
89
88
|
const hasSegmentationSurvey = newSiteParams['options']['site_creation_flow'] === 'entrepreneur';
|
|
90
89
|
const segmentationSurveyAnswersAnonId = localStorage.getItem('ss-anon-id');
|
|
91
90
|
localStorage.removeItem('ss-anon-id');
|
|
91
|
+
// This is the parameter that will contain the internal referral, e.g. a landing page.
|
|
92
|
+
const refParam = new URLSearchParams(document.location.search).get('ref');
|
|
92
93
|
const siteCreationResponse = await wpcomRequest({
|
|
93
94
|
path: '/sites/new',
|
|
94
95
|
apiVersion: '1.1',
|
|
@@ -99,12 +100,28 @@ export const createSiteWithCart = async (flowName, userIsLoggedIn, isPurchasingD
|
|
|
99
100
|
lang_id: getLanguage(locale)?.value,
|
|
100
101
|
client_id: config('wpcom_signup_id'),
|
|
101
102
|
client_secret: config('wpcom_signup_key'),
|
|
103
|
+
...(gardenName &&
|
|
104
|
+
gardenPartnerName && {
|
|
105
|
+
garden_name: gardenName,
|
|
106
|
+
garden_partner_name: gardenPartnerName,
|
|
107
|
+
}),
|
|
108
|
+
...(specId && {
|
|
109
|
+
spec_id: specId,
|
|
110
|
+
}),
|
|
102
111
|
options: {
|
|
103
112
|
...newSiteParams.options,
|
|
104
113
|
has_segmentation_survey: hasSegmentationSurvey,
|
|
105
114
|
...(hasSegmentationSurvey && segmentationSurveyAnswersAnonId
|
|
106
115
|
? { segmentation_survey_answers_anon_id: segmentationSurveyAnswersAnonId }
|
|
107
116
|
: {}),
|
|
117
|
+
...(siteGoals && { site_goals: siteGoals }),
|
|
118
|
+
...((ref ?? refParam) && { ref: ref ?? refParam }),
|
|
119
|
+
// Trigger backend build for ai-site-builder flow with commerce garden and spec_id
|
|
120
|
+
...(flowName === AI_SITE_BUILDER_FLOW &&
|
|
121
|
+
gardenName === 'commerce' &&
|
|
122
|
+
specId && {
|
|
123
|
+
trigger_backend_build: false,
|
|
124
|
+
}),
|
|
108
125
|
},
|
|
109
126
|
},
|
|
110
127
|
});
|
|
@@ -112,6 +129,11 @@ export const createSiteWithCart = async (flowName, userIsLoggedIn, isPurchasingD
|
|
|
112
129
|
// TODO ebuccelli: Manage siteCreationResponse.errors
|
|
113
130
|
return;
|
|
114
131
|
}
|
|
132
|
+
// TODO - This is a temporary fix to ensure garden site URLs use HTTPS.
|
|
133
|
+
// Ensure garden site URLs use HTTPS
|
|
134
|
+
if (gardenName && siteCreationResponse?.blog_details?.url) {
|
|
135
|
+
siteCreationResponse.blog_details.url = siteCreationResponse.blog_details.url.replace('http://', 'https://');
|
|
136
|
+
}
|
|
115
137
|
const parsedBlogURL = getUrlParts(siteCreationResponse?.blog_details.url);
|
|
116
138
|
const siteSlug = parsedBlogURL.hostname;
|
|
117
139
|
const siteId = siteCreationResponse?.blog_details.blogid;
|
|
@@ -123,7 +145,6 @@ export const createSiteWithCart = async (flowName, userIsLoggedIn, isPurchasingD
|
|
|
123
145
|
if (isTailoredSignupFlow(flowName) || HUNDRED_YEAR_PLAN_FLOW === flowName) {
|
|
124
146
|
await setupSiteAfterCreation({ siteId, flowName });
|
|
125
147
|
}
|
|
126
|
-
await processItemCart(siteSlug, isFreeThemePreselected, themeSlugWithRepo, flowName, userIsLoggedIn, domainCartItem);
|
|
127
148
|
return providedDependencies;
|
|
128
149
|
};
|
|
129
150
|
function prepareItemForAddingToCart(item, lastKnownFlow) {
|
|
@@ -136,14 +157,6 @@ function prepareItemForAddingToCart(item, lastKnownFlow) {
|
|
|
136
157
|
},
|
|
137
158
|
};
|
|
138
159
|
}
|
|
139
|
-
export async function addPlanToCart(siteSlug, flowName, userIsLoggedIn, themeSlugWithRepo, cartItem) {
|
|
140
|
-
if (isEmpty(cartItem)) {
|
|
141
|
-
// the user selected the free plan
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
const isFreeThemePreselected = startsWith(themeSlugWithRepo, 'pub');
|
|
145
|
-
await processItemCart(siteSlug, isFreeThemePreselected, themeSlugWithRepo, flowName, userIsLoggedIn, cartItem);
|
|
146
|
-
}
|
|
147
160
|
export async function replaceProductsInCart(siteSlug, cartItems) {
|
|
148
161
|
const cartKey = await cartManagerClient.getCartKeyForSiteSlug(siteSlug);
|
|
149
162
|
try {
|
|
@@ -156,27 +169,6 @@ export async function replaceProductsInCart(siteSlug, cartItems) {
|
|
|
156
169
|
debug('product replace request had an error', error);
|
|
157
170
|
}
|
|
158
171
|
}
|
|
159
|
-
const addToCartAndProceed = async (newCartItem, siteSlug, flowName) => {
|
|
160
|
-
const cartItem = prepareItemForAddingToCart(newCartItem, flowName);
|
|
161
|
-
if (cartItem) {
|
|
162
|
-
debug('adding products to cart', cartItem);
|
|
163
|
-
const cartKey = await cartManagerClient.getCartKeyForSiteSlug(siteSlug);
|
|
164
|
-
try {
|
|
165
|
-
const updatedCart = await cartManagerClient
|
|
166
|
-
.forCartKey(cartKey)
|
|
167
|
-
.actions.addProductsToCart([cartItem]);
|
|
168
|
-
debug('product add request complete', updatedCart);
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
debug('product add request had an error', error);
|
|
172
|
-
//TODO Manage error
|
|
173
|
-
// reduxStore.dispatch( errorNotice( error.message ) );
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
debug('no cart items to add');
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
172
|
export async function addProductsToCart(siteSlug, flowName, cartItems) {
|
|
181
173
|
if (Array.isArray(cartItems)) {
|
|
182
174
|
const cartItemsToAdd = cartItems.map((cartItem) => prepareItemForAddingToCart(cartItem, flowName));
|
|
@@ -213,17 +205,4 @@ export async function setThemeOnSite(siteSlug, themeSlugWithRepo, themeStyleVari
|
|
|
213
205
|
//TODO: Manage error
|
|
214
206
|
}
|
|
215
207
|
}
|
|
216
|
-
async function processItemCart(siteSlug, isFreeThemePreselected, themeSlugWithRepo, lastKnownFlow, userIsLoggedIn, newCartItem) {
|
|
217
|
-
if (!userIsLoggedIn && isFreeThemePreselected) {
|
|
218
|
-
await setThemeOnSite(siteSlug, themeSlugWithRepo);
|
|
219
|
-
newCartItem && (await addToCartAndProceed(newCartItem, siteSlug, lastKnownFlow));
|
|
220
|
-
}
|
|
221
|
-
else if (userIsLoggedIn && isFreeThemePreselected) {
|
|
222
|
-
await setThemeOnSite(siteSlug, themeSlugWithRepo);
|
|
223
|
-
newCartItem && (await addToCartAndProceed(newCartItem, siteSlug, lastKnownFlow));
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
newCartItem && (await addToCartAndProceed(newCartItem, siteSlug, lastKnownFlow));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
208
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cart/index.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cart/index.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,YAAY,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EACN,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,GACpB,MAAM,KAAK,CAAC;AACb,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAI7D,MAAM,KAAK,GAAG,YAAY,CAAE,6BAA6B,CAAE,CAAC;AAuC5D,MAAM,2BAA2B,GAAG,CAAE,EACrC,OAAO,EACP,SAAS,EACT,WAAW,EACX,QAAQ,GACU,EAAG,EAAE;IACvB,IAAK,OAAO,EAAG,CAAC;QACf,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAE,gBAAgB,EAAE,EAAE,CAAE,CAAC;QA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S,cAAc;YACxC,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,KAAK;YACjB,IAAI,EAAE;gBACL,KAAK;gBACL,GAAG,CAAE,mBAAmB,IAAI,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAE;aAC3E;SACD,CAAE,CAAC;IACL,CAAC;IAAC,OAAQ,KAAK,EAAG,CAAC;QAClB,oBAAoB;IACrB,CAAC;AACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable wpcalypso/jsx-classname-namespace */
|
|
3
3
|
import { SVG, Rect, Circle } from '@wordpress/components';
|
|
4
|
-
const Index = ({ className }) => (_jsxs(SVG, { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 356 136", role: "presentation", className: className, children: [_jsx(Rect, { x: "314.913", y: "59.963", width: "7", height: "22", rx: "3.5", transform: "rotate(-50 314.913 59.963)", fill: "#984A9C" }), _jsx(Rect, { y: "121.876", width: "5.091", height: "16", rx: "2.545", transform: "rotate(-50 0 121.876)", fill: "#64CA43" }), _jsx(Rect, { x: "21.447", y: "85.104", width: "7", height: "22", rx: "3.5", transform: "rotate(-120 21.447 85.104)", fill: "#37E788" }), _jsx(Rect, { x: "75", y: "61.64", width: "4", height: "12.571", rx: "2", transform: "rotate(130 75 61.64)", fill: "#FF2D55" }), _jsx(Rect, { x: "247.461", y: "63.86", width: "4.773", height: "15", rx: "2.386", transform: "rotate(118 247.461 63.86)", fill: "#E7C037" }), _jsx(Rect, { x: "97", y: "2.529", width: "4.773", height: "15", rx: "2.386", transform: "rotate(-32 97 2.53)", fill: "
|
|
4
|
+
const Index = ({ className }) => (_jsxs(SVG, { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 356 136", role: "presentation", className: className, children: [_jsx(Rect, { x: "314.913", y: "59.963", width: "7", height: "22", rx: "3.5", transform: "rotate(-50 314.913 59.963)", fill: "#984A9C" }), _jsx(Rect, { y: "121.876", width: "5.091", height: "16", rx: "2.545", transform: "rotate(-50 0 121.876)", fill: "#64CA43" }), _jsx(Rect, { x: "21.447", y: "85.104", width: "7", height: "22", rx: "3.5", transform: "rotate(-120 21.447 85.104)", fill: "#37E788" }), _jsx(Rect, { x: "75", y: "61.64", width: "4", height: "12.571", rx: "2", transform: "rotate(130 75 61.64)", fill: "#FF2D55" }), _jsx(Rect, { x: "247.461", y: "63.86", width: "4.773", height: "15", rx: "2.386", transform: "rotate(118 247.461 63.86)", fill: "#E7C037" }), _jsx(Rect, { x: "97", y: "2.529", width: "4.773", height: "15", rx: "2.386", transform: "rotate(-32 97 2.53)", fill: "var(--studio-blue-50)" }), _jsx(Rect, { x: "323.638", y: "110.513", width: "5.091", height: "16", rx: "2.545", transform: "rotate(40 323.638 110.513)", fill: "#3361CC" }), _jsx(Rect, { x: "160.138", y: "27", width: "7", height: "22", rx: "3.5", transform: "rotate(40 160.138 27)", fill: "#FF8085" }), _jsx(Circle, { cx: "40.5", cy: "101.095", r: "4.5", fill: "#F0B849" }), _jsx(Circle, { cx: "20.928", cy: "47.751", r: "3", fill: "#BF5AF2" }), _jsx(Circle, { cx: "341", cy: "134", r: "2", fill: "#F0C930" }), _jsx(Circle, { cx: "131", cy: "83", r: "2", fill: "#3361CC" }), _jsx(Circle, { cx: "214.5", cy: "13.5", r: "2.5", fill: "#37E688" }), _jsx(Circle, { cx: "352.763", cy: "98.263", r: "3", fill: "#009E73" }), _jsx(Circle, { cx: "285.181", cy: "60.541", r: "3", fill: "#FF3B30" })] }));
|
|
5
5
|
export default Index;
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/confetti/index.tsx"],"names":[],"mappings":";AAAA,sDAAsD;AAEtD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG1D,M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EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,GAAG,EACtD,KAAC,MAAM,IAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,SAAS,GAAG,EACxD,KAAC,MAAM,IAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,QAAQ,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,SAAS,GAAG,IACnD,CACN,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { COPY_SITE_FLOW } from '../utils/flows';
|
|
2
2
|
const flows = {
|
|
3
3
|
newsletter: {
|
|
4
4
|
intro: 0,
|
|
@@ -10,63 +10,6 @@ const flows = {
|
|
|
10
10
|
subscribers: 4,
|
|
11
11
|
launchpad: 5,
|
|
12
12
|
},
|
|
13
|
-
[LINK_IN_BIO_FLOW]: {
|
|
14
|
-
intro: 0,
|
|
15
|
-
user: 0,
|
|
16
|
-
patterns: 1,
|
|
17
|
-
linkInBioSetup: 2,
|
|
18
|
-
domains: 3,
|
|
19
|
-
plans: 4,
|
|
20
|
-
launchpad: 5,
|
|
21
|
-
},
|
|
22
|
-
[LINK_IN_BIO_TLD_FLOW]: {
|
|
23
|
-
domains: 0,
|
|
24
|
-
user: 1,
|
|
25
|
-
patterns: 2,
|
|
26
|
-
linkInBioSetup: 3,
|
|
27
|
-
plans: 4,
|
|
28
|
-
launchpad: 5,
|
|
29
|
-
},
|
|
30
|
-
[FREE_FLOW]: {
|
|
31
|
-
user: 0,
|
|
32
|
-
freeSetup: 0,
|
|
33
|
-
designSetup: 1,
|
|
34
|
-
launchpad: 2,
|
|
35
|
-
},
|
|
36
|
-
videopress: {
|
|
37
|
-
intro: 0,
|
|
38
|
-
videomakerSetup: 1,
|
|
39
|
-
user: 2,
|
|
40
|
-
options: 3,
|
|
41
|
-
chooseADomain: 4,
|
|
42
|
-
processing: 5,
|
|
43
|
-
launchpad: 6,
|
|
44
|
-
},
|
|
45
|
-
[VIDEOPRESS_TV_FLOW]: {
|
|
46
|
-
intro: 0,
|
|
47
|
-
processing: 1,
|
|
48
|
-
},
|
|
49
|
-
[VIDEOPRESS_TV_PURCHASE_FLOW]: {
|
|
50
|
-
processing: 0,
|
|
51
|
-
},
|
|
52
|
-
sensei: {
|
|
53
|
-
senseiSetup: 1,
|
|
54
|
-
senseiDomain: 2,
|
|
55
|
-
senseiPlan: 3,
|
|
56
|
-
senseiPurpose: 4,
|
|
57
|
-
senseiLaunch: 5,
|
|
58
|
-
},
|
|
59
|
-
[ECOMMERCE_FLOW]: {
|
|
60
|
-
intro: 0,
|
|
61
|
-
storeProfiler: 1,
|
|
62
|
-
designCarousel: 2,
|
|
63
|
-
domains: 3,
|
|
64
|
-
createSite: 4,
|
|
65
|
-
processing: 4,
|
|
66
|
-
waitForAtomic: 4,
|
|
67
|
-
checkPlan: 4,
|
|
68
|
-
storeAddress: 5,
|
|
69
|
-
},
|
|
70
13
|
[COPY_SITE_FLOW]: {
|
|
71
14
|
domains: 0,
|
|
72
15
|
'create-site': 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-flow-progress.js","sourceRoot":"","sources":["../../../src/flow-progress/use-flow-progress.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-flow-progress.js","sourceRoot":"","sources":["../../../src/flow-progress/use-flow-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAShD,MAAM,KAAK,GAAmD;IAC7D,UAAU,EAAE;QACX,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;QACV,kBAAkB,EAAE,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,CAAC;KACZ;IACD,CAAE,cAAc,CAAE,EAAE;QACnB,OAAO,EAAE,CAAC;QACV,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,CAAC;QACnB,iBAAiB,EAAE,CAAC;KACpB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,KAAmB,EAAE,EAAG,EAAE;IAC3F,IAAK,CAAE,QAAQ,IAAI,CAAE,QAAQ,EAAG,CAAC;QAChC,OAAO;IACR,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAE,WAAW,IAAI,QAAQ,CAAE,CAAC;IAE9C,OAAO,CACN,IAAI,IAAI;QACP,QAAQ,EAAE,IAAI,CAAE,QAAQ,CAAE;QAC1B,KAAK,EAAE,IAAI,CAAC,GAAG,CAAE,GAAG,MAAM,CAAC,MAAM,CAAE,IAAI,CAAE,CAAE;KAC3C,CACD,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
import { useMatch } from 'react-router';
|
|
3
|
+
const TWENTY_MINUTES = 20 * 60 * 1000;
|
|
4
|
+
const VERSION = 1;
|
|
5
|
+
const KEY = '@automattic/persisted-state';
|
|
6
|
+
function setPersistedState(key, state, storage) {
|
|
7
|
+
storage.setItem(key, JSON.stringify(state));
|
|
8
|
+
storage.setItem(key + 'time', Date.now().toString());
|
|
9
|
+
}
|
|
10
|
+
function getPersistedState(key, storage, TTL) {
|
|
11
|
+
const state = storage.getItem(key);
|
|
12
|
+
if (state) {
|
|
13
|
+
const time = parseInt(storage.getItem(key + 'time') || '0');
|
|
14
|
+
if (Date.now() - time > TTL) {
|
|
15
|
+
storage.removeItem(key);
|
|
16
|
+
storage.removeItem(key + 'time');
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return JSON.parse(state);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function getPersistedStateKey(flow, step, lang, cacheKey) {
|
|
24
|
+
return [VERSION, KEY, flow, step, lang, cacheKey].filter(Boolean).join('-');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Clears all persisted state created by useStepPersistedState
|
|
28
|
+
* @param flow The desired flow to clear
|
|
29
|
+
* @param storage The storage to clear (defaults to localStorage)
|
|
30
|
+
*/
|
|
31
|
+
export function clearStepPersistedState(flow, storage = localStorage) {
|
|
32
|
+
const keys = Object.keys(storage);
|
|
33
|
+
const persistedKeys = keys.filter((key) => key.startsWith(getPersistedStateKey(flow)));
|
|
34
|
+
persistedKeys.forEach((key) => {
|
|
35
|
+
storage.removeItem(key);
|
|
36
|
+
storage.removeItem(key + 'time');
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A hook similar to useState, but persists the state. Uses `flow`, `step` and `lang`, and the passed key in the tree as keys.
|
|
41
|
+
* @param cacheKey the cache key. It will be concatenated with the flow, step and lang.
|
|
42
|
+
* @param defaultValue the initial value of the state.
|
|
43
|
+
* @param options the options for the hook.
|
|
44
|
+
* @returns a tuple with the state and a function to update it.
|
|
45
|
+
*/
|
|
46
|
+
export function useStepPersistedState(cacheKey, defaultValue, options = { storage: localStorage, TTL: TWENTY_MINUTES }) {
|
|
47
|
+
const match = useMatch('/:flow/:step?/:lang?');
|
|
48
|
+
const { flow = 'flow', step = 'step', lang = 'lang' } = match?.params || {};
|
|
49
|
+
const key = [VERSION, KEY, flow, step, lang, cacheKey].join('-');
|
|
50
|
+
const [state, _setState] = useState(getPersistedState(key, options.storage, options.TTL) || defaultValue);
|
|
51
|
+
const setState = useCallback((newState) => {
|
|
52
|
+
_setState(newState);
|
|
53
|
+
setPersistedState(key, newState, options.storage);
|
|
54
|
+
}, [_setState, key, options.storage]);
|
|
55
|
+
return [state, setState];
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=use-persisted-state.js.map
|
|
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AAO,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAE,IAAI,YAAY,CACtE,CAAC;IAEF,MAAM,QAAQ,GAAG,WAAW,CAC3B,CAAE,QAAW,EAAG,EAAE;QACjB,SAAS,CAAE,QAAQ,CAAE,CAAC;QACtB,iBAAiB,CAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAE,CAAC;IACrD,CAAC,EACD,CAAE,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,CAAE,CACnC,CAAC;IAEF,OAAO,CAAE,KAAK,EAAE,QAAQ,CAAE,CAAC;AAC5B,CAAC"}
|
package/dist/esm/hooray/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|
|
3
3
|
import Confetti from '../confetti';
|
|
4
4
|
import './style.scss';
|
|
5
5
|
const Hooray = ({ className, animate = false, children, ...additionalProps }) => {
|
|
6
|
-
return (_jsxs("div", { className: clsx(
|
|
6
|
+
return (_jsxs("div", { className: clsx('onboarding-hooray', { 'onboarding-hooray__animate': animate }, className), ...additionalProps, children: [_jsx(Confetti, {}), children] }));
|
|
7
7
|
};
|
|
8
8
|
export default Hooray;
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export { Title, SubTitle } from './titles';
|
|
2
2
|
export { useFlowProgress } from './flow-progress/use-flow-progress';
|
|
3
|
-
export { default as ActionButtons, BackButton, NextButton
|
|
4
|
-
export {
|
|
3
|
+
export { default as ActionButtons, BackButton, NextButton } from './action-buttons';
|
|
4
|
+
export { createSite, getNewSiteParams, addProductsToCart, replaceProductsInCart, setThemeOnSite, } from './cart';
|
|
5
5
|
export { setupSiteAfterCreation, base64ImageToBlob } from './setup-tailored-site-after-creation';
|
|
6
6
|
export { uploadAndSetSiteLogo } from './upload-and-set-site-logo';
|
|
7
|
-
export { default as FeatureIcon } from './feature-icon';
|
|
8
7
|
export { default as Progress } from './progress';
|
|
9
8
|
export { default as Hooray } from './hooray';
|
|
10
9
|
export { default as Confetti } from './confetti';
|
|
@@ -12,11 +11,13 @@ export { default as IntentScreen } from './intent-screen';
|
|
|
12
11
|
export { default as SelectItems } from './select-items';
|
|
13
12
|
export { default as SelectItemsAlt } from './select-items-alt';
|
|
14
13
|
export { default as StepContainer } from './step-container';
|
|
14
|
+
export * as Step from './step-container-v2';
|
|
15
15
|
export { default as StepNavigationLink } from './step-navigation-link';
|
|
16
16
|
export { default as MShotsImage } from './mshots-image';
|
|
17
|
+
export { useStepPersistedState, clearStepPersistedState } from './hooks/use-persisted-state';
|
|
17
18
|
export * from './navigator';
|
|
18
|
-
export { default as Notice } from './notice';
|
|
19
19
|
export { default as SelectCardCheckbox } from './select-card-checkbox';
|
|
20
|
+
export { default as SelectCardCheckboxV2 } from './select-card-checkbox-v2';
|
|
20
21
|
export * from './utils';
|
|
21
|
-
export
|
|
22
|
+
export { setRequester } from './wpcom-request';
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EACN,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,GACd,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC5E,cAAc,SAAS,CAAC;AAIxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -99,7 +99,7 @@ const useMshotsImg = (src, options, imgRef) => {
|
|
|
99
99
|
return loadedImg;
|
|
100
100
|
};
|
|
101
101
|
// Temporary for A/B test.
|
|
102
|
-
const useMshotsImgTreatment = (src, options) => {
|
|
102
|
+
const useMshotsImgTreatment = (src, options, shouldShowImage) => {
|
|
103
103
|
const [loadedImg, setLoadedImg] = useState();
|
|
104
104
|
const [count, setCount] = useState(0);
|
|
105
105
|
const previousSrc = useRef(src);
|
|
@@ -114,6 +114,9 @@ const useMshotsImgTreatment = (src, options) => {
|
|
|
114
114
|
// to browser caching. Getting this wrong looks like the url resolving
|
|
115
115
|
// before the image is ready.
|
|
116
116
|
useEffect(() => {
|
|
117
|
+
if (!shouldShowImage) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
117
120
|
// If there's been a "props" change we need to reset everything:
|
|
118
121
|
if (options !== previousOptions.current ||
|
|
119
122
|
(src !== previousSrc.current && imgRef.current)) {
|
|
@@ -167,10 +170,10 @@ const useMshotsImgTreatment = (src, options) => {
|
|
|
167
170
|
}
|
|
168
171
|
clearTimeout(timeoutIdRef.current);
|
|
169
172
|
};
|
|
170
|
-
}, [src, count, options]);
|
|
173
|
+
}, [src, count, options, shouldShowImage]);
|
|
171
174
|
return loadedImg;
|
|
172
175
|
};
|
|
173
|
-
const MShotsImageControl = ({ url, 'aria-labelledby': labelledby, alt, options, scrollable = false, }) => {
|
|
176
|
+
const MShotsImageControl = ({ url, 'aria-labelledby': labelledby, alt, options, scrollable = false, loading = 'lazy', }) => {
|
|
174
177
|
const imgRef = useRef(null);
|
|
175
178
|
const currentlyLoadedUrl = useMshotsImg(url, options, imgRef);
|
|
176
179
|
const src = imgRef.current?.src || '';
|
|
@@ -186,17 +189,34 @@ const MShotsImageControl = ({ url, 'aria-labelledby': labelledby, alt, options,
|
|
|
186
189
|
...(scrollable ? scrollableStyles : {}),
|
|
187
190
|
};
|
|
188
191
|
const className = clsx('mshots-image__container', scrollable && 'hover-scroll', visible ? 'mshots-image-visible' : 'mshots-image__loader');
|
|
189
|
-
|
|
190
|
-
return scrollable ? (_jsx("div", { className: className, style: style, "aria-labelledby": labelledby, children: _jsx("img", { ref: imgRef, className: "mshots-dummy-image", "aria-hidden": "true", alt: "" }) })) : (_jsx("img", { ref: imgRef, className, style, src, alt, "aria-labelledby": labelledby, alt: alt }));
|
|
191
|
-
} // else, prettier doesn't like having an else after a return
|
|
192
|
-
return scrollable ? (_jsx("div", { className: className, style: style, "aria-labelledby": labelledby, children: _jsx("img", { ref: imgRef, loading: "lazy", className: "mshots-dummy-image", "aria-hidden": "true", alt: "" }) })) : (_jsx("img", { loading: "lazy", ref: imgRef, className, style, src, alt, "aria-labelledby": labelledby, alt: alt }));
|
|
192
|
+
return scrollable ? (_jsx("div", { className: className, style: style, "aria-labelledby": labelledby, children: _jsx("img", { ref: imgRef, loading: loading, className: "mshots-dummy-image", "aria-hidden": "true", alt: "" }) })) : (_jsx("img", { loading: loading, ref: imgRef, className, style, src, alt, "aria-labelledby": labelledby }));
|
|
193
193
|
};
|
|
194
194
|
// Temporary for A/B test.
|
|
195
|
-
const MShotsImageTreatment = ({ url, 'aria-labelledby': labelledby, alt, options, scrollable = false, }) => {
|
|
196
|
-
const
|
|
195
|
+
const MShotsImageTreatment = ({ url, 'aria-labelledby': labelledby, alt, options, scrollable = false, loading = 'lazy', }) => {
|
|
196
|
+
const [shouldShowImage, setShouldShowImage] = useState(loading === 'eager');
|
|
197
|
+
const divRef = useRef(null);
|
|
198
|
+
const imgRef = useRef(null);
|
|
199
|
+
const maybeImage = useMshotsImgTreatment(url, options, shouldShowImage);
|
|
197
200
|
const src = maybeImage?.src || '';
|
|
198
201
|
const visible = !!src;
|
|
199
202
|
const backgroundImage = maybeImage?.src && `url( ${maybeImage?.src} )`;
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
if (loading === 'lazy' && !shouldShowImage) {
|
|
205
|
+
const observer = new IntersectionObserver((entries) => {
|
|
206
|
+
if (entries[0]?.isIntersecting) {
|
|
207
|
+
setShouldShowImage(true);
|
|
208
|
+
observer.disconnect();
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
const elementToObserve = scrollable || !visible ? divRef.current : imgRef.current;
|
|
212
|
+
if (elementToObserve) {
|
|
213
|
+
observer.observe(elementToObserve);
|
|
214
|
+
}
|
|
215
|
+
return () => {
|
|
216
|
+
observer.disconnect();
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
}, [loading, shouldShowImage, scrollable, visible]);
|
|
200
220
|
const animationScrollSpeedInPixelsPerSecond = 400;
|
|
201
221
|
const animationDuration = (maybeImage?.naturalHeight || 600) / animationScrollSpeedInPixelsPerSecond;
|
|
202
222
|
const scrollableStyles = {
|
|
@@ -210,7 +230,7 @@ const MShotsImageTreatment = ({ url, 'aria-labelledby': labelledby, alt, options
|
|
|
210
230
|
// The "! visible" here is only to dodge a particularly specific css
|
|
211
231
|
// rule effecting the placeholder while loading static images:
|
|
212
232
|
// '.design-picker .design-picker__image-frame img { ..., height: auto }'
|
|
213
|
-
return scrollable || !visible ? (_jsx("div", { className: className, style: style, "aria-labelledby": labelledby })) : (_jsx("img", { className, style, src, alt, "aria-labelledby": labelledby
|
|
233
|
+
return scrollable || !visible ? (_jsx("div", { ref: divRef, className: className, style: style, "aria-labelledby": labelledby })) : (_jsx("img", { ref: imgRef, className, style, src, alt, loading, "aria-labelledby": labelledby }));
|
|
214
234
|
};
|
|
215
235
|
// For hover-scroll, we use a div with a background image (rather than an img element)
|
|
216
236
|
// in order to use transitions between `top` and `bottom` on the
|
|
@@ -218,12 +238,12 @@ const MShotsImageTreatment = ({ url, 'aria-labelledby': labelledby, alt, options
|
|
|
218
238
|
// The "normal" top & bottom properties are problematic individually because we
|
|
219
239
|
// don't know how big the images will be, and using both gets the
|
|
220
240
|
// right positions but with no transition (as they're different properties).
|
|
221
|
-
const MShotsImage = ({ url, 'aria-labelledby': labelledby, alt, options, scrollable = false, }) => {
|
|
241
|
+
const MShotsImage = ({ url, 'aria-labelledby': labelledby, alt, options, scrollable = false, loading = 'lazy', }) => {
|
|
222
242
|
// Return MShotsImageControl or MShotsImageTreatment depending on options.oldHighResImageLoading
|
|
223
243
|
if (options?.oldHighResImageLoading) {
|
|
224
|
-
return (_jsx(MShotsImageTreatment, { url: url, "aria-labelledby": labelledby, alt: alt, options: options, scrollable: scrollable }));
|
|
244
|
+
return (_jsx(MShotsImageTreatment, { url: url, "aria-labelledby": labelledby, alt: alt, options: options, scrollable: scrollable, loading: loading }));
|
|
225
245
|
}
|
|
226
|
-
return (_jsx(MShotsImageControl, { url: url, "aria-labelledby": labelledby, alt: alt, options: options, scrollable: scrollable }));
|
|
246
|
+
return (_jsx(MShotsImageControl, { url: url, "aria-labelledby": labelledby, alt: alt, options: options, scrollable: scrollable, loading: loading }));
|
|
227
247
|
};
|
|
228
248
|
export default MShotsImage;
|
|
229
249
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mshots-image/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mshots-image/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,YAAY,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,cAAc,CAAC;AAqBtB,MAAM,KAAK,GAAG,YAAY,CAAE,4BAA4B,CAAE,CAAC;AAE3D,MAAM,UAAU,SAAS,CAAE,SAAiB,EAAE,OAAsB,EAAE,KAAK,GAAG,CAAC;IAC9E,MAAM,SAAS,GAAG,8BAA8B,CAAC;IACjD,MAAM,aAAa,GAAG,YAAY,CAA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