newspack-components 3.0.0-alpha.2 → 3.0.0-alpha.4
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/babel.config.cjs.js +26 -0
- package/babel.config.js +1 -0
- package/copy-styles.js +10 -2
- package/dist/cjs/button/index.js +56 -0
- package/dist/cjs/grid/index.js +37 -0
- package/dist/cjs/hooks/index.js +25 -0
- package/dist/cjs/hooks/usePrompt.js +49 -0
- package/dist/cjs/text-control/index.js +64 -0
- package/dist/esm/accordion/index.js +42 -0
- package/dist/esm/accordion/style.scss +31 -0
- package/dist/esm/action-card/index.js +218 -0
- package/dist/esm/action-card/style.scss +483 -0
- package/dist/esm/autocomplete-tokenfield/index.js +261 -0
- package/dist/esm/autocomplete-tokenfield/style.scss +49 -0
- package/dist/esm/autocomplete-with-suggestions/index.js +274 -0
- package/dist/esm/autocomplete-with-suggestions/style.scss +163 -0
- package/dist/esm/button/index.js +48 -0
- package/dist/esm/button/style.scss +11 -0
- package/dist/esm/button-card/index.js +64 -0
- package/dist/esm/button-card/style.scss +180 -0
- package/dist/esm/card/index.js +43 -0
- package/dist/esm/card/style.scss +168 -0
- package/dist/esm/category-autocomplete/index.js +183 -0
- package/dist/esm/category-autocomplete/style.scss +34 -0
- package/dist/esm/color-picker/index.js +59 -0
- package/dist/esm/color-picker/style.scss +37 -0
- package/dist/esm/consts.js +1 -0
- package/dist/esm/custom-select-control/index.js +37 -0
- package/dist/esm/custom-select-control/style.scss +93 -0
- package/dist/esm/date-range-picker/index.js +31 -0
- package/dist/esm/date-range-picker/style.scss +148 -0
- package/dist/esm/footer/index.js +99 -0
- package/dist/esm/footer/style.scss +82 -0
- package/dist/esm/form-token-field/index.js +49 -0
- package/dist/esm/form-token-field/style.scss +37 -0
- package/dist/esm/global-notices/index.js +30 -0
- package/dist/esm/grid/index.js +29 -0
- package/dist/esm/grid/style.scss +166 -0
- package/dist/esm/handoff/index.js +175 -0
- package/dist/esm/handoff-message/index.js +47 -0
- package/dist/esm/hooks/index.js +17 -0
- package/dist/esm/hooks/useObjectState.js +30 -0
- package/dist/esm/hooks/useObjectState.test.js +82 -0
- package/dist/esm/hooks/useOnClickOutside.js +31 -0
- package/dist/esm/hooks/usePrompt.js +40 -0
- package/dist/esm/image-upload/index.js +140 -0
- package/dist/esm/image-upload/index.test.js +34 -0
- package/dist/esm/image-upload/style.scss +103 -0
- package/dist/esm/index.js +47 -0
- package/dist/esm/info-button/index.js +42 -0
- package/dist/esm/info-button/style.scss +18 -0
- package/dist/esm/modal/index.js +39 -0
- package/dist/esm/modal/style.scss +56 -0
- package/dist/esm/newspack-icon/index.js +50 -0
- package/dist/esm/newspack-icon/style.scss +26 -0
- package/dist/esm/newspack-logo/index.js +46 -0
- package/dist/esm/newspack-logo/style.scss +30 -0
- package/dist/esm/notice/index.js +65 -0
- package/dist/esm/notice/style.scss +111 -0
- package/dist/esm/patrons-logo/index.js +70 -0
- package/dist/esm/plugin-installer/index.js +289 -0
- package/dist/esm/plugin-installer/style.scss +72 -0
- package/dist/esm/plugin-settings/SettingsSection.js +133 -0
- package/dist/esm/plugin-settings/index.js +220 -0
- package/dist/esm/plugin-settings/style.scss +7 -0
- package/dist/esm/plugin-toggle/index.js +216 -0
- package/dist/esm/plugin-toggle/style.scss +20 -0
- package/dist/esm/popover/index.js +41 -0
- package/dist/esm/popover/style.scss +161 -0
- package/dist/esm/position-control/index.js +106 -0
- package/dist/esm/position-control/style.scss +66 -0
- package/dist/esm/progress-bar/index.js +68 -0
- package/dist/esm/progress-bar/index.test.js +108 -0
- package/dist/esm/progress-bar/style.scss +42 -0
- package/dist/esm/proxied-imports/router.js +8 -0
- package/dist/esm/radio-control/index.js +37 -0
- package/dist/esm/radio-control/style.scss +92 -0
- package/dist/esm/section-header/index.js +67 -0
- package/dist/esm/section-header/style.scss +45 -0
- package/dist/esm/select-control/ButtonGroupControl.js +53 -0
- package/dist/esm/select-control/GroupedSelectControl.js +78 -0
- package/dist/esm/select-control/index.js +51 -0
- package/dist/esm/select-control/style.scss +108 -0
- package/dist/esm/settings/MinMaxSetting.js +53 -0
- package/dist/esm/settings/SettingsCard.js +38 -0
- package/dist/esm/settings/SettingsSection.js +26 -0
- package/dist/esm/settings/index.js +9 -0
- package/dist/esm/settings/style.scss +119 -0
- package/dist/esm/sortable-newsletter-list-control/index.js +127 -0
- package/dist/esm/sortable-newsletter-list-control/style.scss +45 -0
- package/dist/esm/steps-list/index.js +43 -0
- package/dist/esm/steps-list/style.scss +11 -0
- package/dist/esm/steps-list-item/index.js +47 -0
- package/dist/esm/steps-list-item/style.scss +47 -0
- package/dist/esm/style-card/index.js +74 -0
- package/dist/esm/style-card/style.scss +94 -0
- package/dist/esm/style.scss +55 -0
- package/dist/esm/tabbed-navigation/index.js +53 -0
- package/dist/esm/tabbed-navigation/style.scss +86 -0
- package/dist/esm/text-control/index.js +56 -0
- package/dist/esm/text-control/style.scss +32 -0
- package/dist/esm/utils/index.js +29 -0
- package/dist/esm/waiting/index.js +44 -0
- package/dist/esm/waiting/style.scss +27 -0
- package/dist/esm/web-preview/index.js +183 -0
- package/dist/esm/web-preview/style.scss +155 -0
- package/dist/esm/with-wizard/index.js +320 -0
- package/dist/esm/with-wizard/style.scss +282 -0
- package/dist/esm/with-wizard-screen/index.js +109 -0
- package/dist/esm/with-wizard-screen/style.scss +160 -0
- package/dist/esm/wizard/components/WizardError.js +66 -0
- package/dist/esm/wizard/index.js +119 -0
- package/dist/esm/wizard/store/index.js +155 -0
- package/dist/esm/wizard/store/utils.js +14 -0
- package/package.json +8 -4
- package/dist/button/index.js +0 -51
- package/dist/button/index.tsx +0 -48
- package/dist/grid/index.js +0 -44
- package/dist/grid/index.tsx +0 -34
- package/dist/hooks/index.js +0 -29
- package/dist/hooks/index.ts +0 -15
- package/dist/hooks/usePrompt.js +0 -47
- package/dist/hooks/usePrompt.ts +0 -46
- package/dist/plugin-toggle/README.md +0 -53
- package/dist/text-control/index.js +0 -76
- package/dist/text-control/index.tsx +0 -71
- /package/dist/{accordion → cjs/accordion}/index.js +0 -0
- /package/dist/{accordion → cjs/accordion}/style.scss +0 -0
- /package/dist/{action-card → cjs/action-card}/index.js +0 -0
- /package/dist/{action-card → cjs/action-card}/style.scss +0 -0
- /package/dist/{autocomplete-tokenfield → cjs/autocomplete-tokenfield}/index.js +0 -0
- /package/dist/{autocomplete-tokenfield → cjs/autocomplete-tokenfield}/style.scss +0 -0
- /package/dist/{autocomplete-with-suggestions → cjs/autocomplete-with-suggestions}/index.js +0 -0
- /package/dist/{autocomplete-with-suggestions → cjs/autocomplete-with-suggestions}/style.scss +0 -0
- /package/dist/{button → cjs/button}/style.scss +0 -0
- /package/dist/{button-card → cjs/button-card}/index.js +0 -0
- /package/dist/{button-card → cjs/button-card}/style.scss +0 -0
- /package/dist/{card → cjs/card}/index.js +0 -0
- /package/dist/{card → cjs/card}/style.scss +0 -0
- /package/dist/{category-autocomplete → cjs/category-autocomplete}/index.js +0 -0
- /package/dist/{category-autocomplete → cjs/category-autocomplete}/style.scss +0 -0
- /package/dist/{color-picker → cjs/color-picker}/index.js +0 -0
- /package/dist/{color-picker → cjs/color-picker}/style.scss +0 -0
- /package/dist/{consts.js → cjs/consts.js} +0 -0
- /package/dist/{custom-select-control → cjs/custom-select-control}/index.js +0 -0
- /package/dist/{custom-select-control → cjs/custom-select-control}/style.scss +0 -0
- /package/dist/{date-range-picker → cjs/date-range-picker}/index.js +0 -0
- /package/dist/{date-range-picker → cjs/date-range-picker}/style.scss +0 -0
- /package/dist/{footer → cjs/footer}/index.js +0 -0
- /package/dist/{footer → cjs/footer}/style.scss +0 -0
- /package/dist/{form-token-field → cjs/form-token-field}/index.js +0 -0
- /package/dist/{form-token-field → cjs/form-token-field}/style.scss +0 -0
- /package/dist/{global-notices → cjs/global-notices}/index.js +0 -0
- /package/dist/{grid → cjs/grid}/style.scss +0 -0
- /package/dist/{handoff → cjs/handoff}/index.js +0 -0
- /package/dist/{handoff-message → cjs/handoff-message}/index.js +0 -0
- /package/dist/{hooks → cjs/hooks}/useObjectState.js +0 -0
- /package/dist/{hooks → cjs/hooks}/useObjectState.test.js +0 -0
- /package/dist/{hooks → cjs/hooks}/useOnClickOutside.js +0 -0
- /package/dist/{image-upload → cjs/image-upload}/index.js +0 -0
- /package/dist/{image-upload → cjs/image-upload}/index.test.js +0 -0
- /package/dist/{image-upload → cjs/image-upload}/style.scss +0 -0
- /package/dist/{index.js → cjs/index.js} +0 -0
- /package/dist/{info-button → cjs/info-button}/index.js +0 -0
- /package/dist/{info-button → cjs/info-button}/style.scss +0 -0
- /package/dist/{modal → cjs/modal}/index.js +0 -0
- /package/dist/{modal → cjs/modal}/style.scss +0 -0
- /package/dist/{newspack-icon → cjs/newspack-icon}/index.js +0 -0
- /package/dist/{newspack-icon → cjs/newspack-icon}/style.scss +0 -0
- /package/dist/{newspack-logo → cjs/newspack-logo}/index.js +0 -0
- /package/dist/{newspack-logo → cjs/newspack-logo}/style.scss +0 -0
- /package/dist/{notice → cjs/notice}/index.js +0 -0
- /package/dist/{notice → cjs/notice}/style.scss +0 -0
- /package/dist/{patrons-logo → cjs/patrons-logo}/index.js +0 -0
- /package/dist/{plugin-installer → cjs/plugin-installer}/index.js +0 -0
- /package/dist/{plugin-installer → cjs/plugin-installer}/style.scss +0 -0
- /package/dist/{plugin-settings → cjs/plugin-settings}/SettingsSection.js +0 -0
- /package/dist/{plugin-settings → cjs/plugin-settings}/index.js +0 -0
- /package/dist/{plugin-settings → cjs/plugin-settings}/style.scss +0 -0
- /package/dist/{plugin-toggle → cjs/plugin-toggle}/index.js +0 -0
- /package/dist/{plugin-toggle → cjs/plugin-toggle}/style.scss +0 -0
- /package/dist/{popover → cjs/popover}/index.js +0 -0
- /package/dist/{popover → cjs/popover}/style.scss +0 -0
- /package/dist/{position-control → cjs/position-control}/index.js +0 -0
- /package/dist/{position-control → cjs/position-control}/style.scss +0 -0
- /package/dist/{progress-bar → cjs/progress-bar}/index.js +0 -0
- /package/dist/{progress-bar → cjs/progress-bar}/index.test.js +0 -0
- /package/dist/{progress-bar → cjs/progress-bar}/style.scss +0 -0
- /package/dist/{proxied-imports → cjs/proxied-imports}/router.js +0 -0
- /package/dist/{radio-control → cjs/radio-control}/index.js +0 -0
- /package/dist/{radio-control → cjs/radio-control}/style.scss +0 -0
- /package/dist/{section-header → cjs/section-header}/index.js +0 -0
- /package/dist/{section-header → cjs/section-header}/style.scss +0 -0
- /package/dist/{select-control → cjs/select-control}/ButtonGroupControl.js +0 -0
- /package/dist/{select-control → cjs/select-control}/GroupedSelectControl.js +0 -0
- /package/dist/{select-control → cjs/select-control}/index.js +0 -0
- /package/dist/{select-control → cjs/select-control}/style.scss +0 -0
- /package/dist/{settings → cjs/settings}/MinMaxSetting.js +0 -0
- /package/dist/{settings → cjs/settings}/SettingsCard.js +0 -0
- /package/dist/{settings → cjs/settings}/SettingsSection.js +0 -0
- /package/dist/{settings → cjs/settings}/index.js +0 -0
- /package/dist/{settings → cjs/settings}/style.scss +0 -0
- /package/dist/{sortable-newsletter-list-control → cjs/sortable-newsletter-list-control}/index.js +0 -0
- /package/dist/{sortable-newsletter-list-control → cjs/sortable-newsletter-list-control}/style.scss +0 -0
- /package/dist/{steps-list → cjs/steps-list}/index.js +0 -0
- /package/dist/{steps-list → cjs/steps-list}/style.scss +0 -0
- /package/dist/{steps-list-item → cjs/steps-list-item}/index.js +0 -0
- /package/dist/{steps-list-item → cjs/steps-list-item}/style.scss +0 -0
- /package/dist/{style-card → cjs/style-card}/index.js +0 -0
- /package/dist/{style-card → cjs/style-card}/style.scss +0 -0
- /package/dist/{style.scss → cjs/style.scss} +0 -0
- /package/dist/{tabbed-navigation → cjs/tabbed-navigation}/index.js +0 -0
- /package/dist/{tabbed-navigation → cjs/tabbed-navigation}/style.scss +0 -0
- /package/dist/{text-control → cjs/text-control}/style.scss +0 -0
- /package/dist/{utils → cjs/utils}/index.js +0 -0
- /package/dist/{waiting → cjs/waiting}/index.js +0 -0
- /package/dist/{waiting → cjs/waiting}/style.scss +0 -0
- /package/dist/{web-preview → cjs/web-preview}/index.js +0 -0
- /package/dist/{web-preview → cjs/web-preview}/style.scss +0 -0
- /package/dist/{with-wizard → cjs/with-wizard}/index.js +0 -0
- /package/dist/{with-wizard → cjs/with-wizard}/style.scss +0 -0
- /package/dist/{with-wizard-screen → cjs/with-wizard-screen}/index.js +0 -0
- /package/dist/{with-wizard-screen → cjs/with-wizard-screen}/style.scss +0 -0
- /package/dist/{wizard → cjs/wizard}/components/WizardError.js +0 -0
- /package/dist/{wizard → cjs/wizard}/index.js +0 -0
- /package/dist/{wizard → cjs/wizard}/store/index.js +0 -0
- /package/dist/{wizard → cjs/wizard}/store/utils.js +0 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies.
|
|
3
|
+
*/
|
|
4
|
+
import { Component, createRef, Fragment } from '@wordpress/element';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
import apiFetch from '@wordpress/api-fetch';
|
|
7
|
+
import { home } from '@wordpress/icons';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies.
|
|
11
|
+
*/
|
|
12
|
+
import { Button, Card, Modal, NewspackIcon, Notice, PluginInstaller } from '../';
|
|
13
|
+
import Router from '../proxied-imports/router';
|
|
14
|
+
import Footer from '../footer';
|
|
15
|
+
import './style.scss';
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
const {
|
|
18
|
+
Redirect,
|
|
19
|
+
Route
|
|
20
|
+
} = Router;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Higher-Order Component to provide plugin management and error handling to Newspack Wizards.
|
|
24
|
+
*/
|
|
25
|
+
export default function withWizard(WrappedComponent, requiredPlugins) {
|
|
26
|
+
return class WrappedWithWizard extends Component {
|
|
27
|
+
constructor(props) {
|
|
28
|
+
super(props);
|
|
29
|
+
this.state = {
|
|
30
|
+
complete: null,
|
|
31
|
+
error: null,
|
|
32
|
+
loading: requiredPlugins && requiredPlugins.length > 0 ? 1 : 0,
|
|
33
|
+
quietLoading: false
|
|
34
|
+
};
|
|
35
|
+
this.wrappedComponentRef = createRef();
|
|
36
|
+
}
|
|
37
|
+
componentDidMount = () => {
|
|
38
|
+
// If there are no requiredPlugins, fire onWizardReady as soon as component mounts.
|
|
39
|
+
if (!requiredPlugins) {
|
|
40
|
+
const instance = this.wrappedComponentRef.current;
|
|
41
|
+
// eslint-disable-next-line no-unused-expressions
|
|
42
|
+
instance && instance.onWizardReady && instance.onWizardReady();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Set the error. Called by Wizards when an error occurs.
|
|
48
|
+
*
|
|
49
|
+
* @return {Promise} Resolved after state update
|
|
50
|
+
*/
|
|
51
|
+
setError = error => {
|
|
52
|
+
return new Promise(resolve => {
|
|
53
|
+
this.setState({
|
|
54
|
+
error: error || null
|
|
55
|
+
}, () => resolve());
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Render any errors that need rendering.
|
|
61
|
+
*
|
|
62
|
+
* @return {Component} Error UI
|
|
63
|
+
*/
|
|
64
|
+
getError = () => {
|
|
65
|
+
const {
|
|
66
|
+
error
|
|
67
|
+
} = this.state;
|
|
68
|
+
if (!error) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const parsedError = this.parseError(error);
|
|
72
|
+
const {
|
|
73
|
+
level
|
|
74
|
+
} = parsedError;
|
|
75
|
+
if ('fatal' === level) {
|
|
76
|
+
return this.getFatalError(parsedError);
|
|
77
|
+
}
|
|
78
|
+
return this.getErrorNotice(parsedError);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Get a notice-level error.
|
|
83
|
+
*
|
|
84
|
+
* @param {Error} error object already parsed by parseError
|
|
85
|
+
* @return {Component} Error notice
|
|
86
|
+
*/
|
|
87
|
+
getErrorNotice = error => {
|
|
88
|
+
const {
|
|
89
|
+
message
|
|
90
|
+
} = error;
|
|
91
|
+
return /*#__PURE__*/_jsx(Notice, {
|
|
92
|
+
isError: true,
|
|
93
|
+
className: "newspack-wizard__above-header",
|
|
94
|
+
noticeText: message,
|
|
95
|
+
rawHTML: true
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Get a fatal-level error.
|
|
101
|
+
*
|
|
102
|
+
* @param {Error} error object already parsed by parseError
|
|
103
|
+
* @return {Component} React object
|
|
104
|
+
*/
|
|
105
|
+
getFatalError = error => {
|
|
106
|
+
const fallbackURL = this.getFallbackURL();
|
|
107
|
+
if (!fallbackURL) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const {
|
|
111
|
+
message
|
|
112
|
+
} = error;
|
|
113
|
+
return /*#__PURE__*/_jsxs(Modal, {
|
|
114
|
+
title: __('Unrecoverable error'),
|
|
115
|
+
onRequestClose: () => window.location = fallbackURL,
|
|
116
|
+
children: [/*#__PURE__*/_jsx(Notice, {
|
|
117
|
+
noticeText: message,
|
|
118
|
+
isError: true,
|
|
119
|
+
rawHTML: true
|
|
120
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
121
|
+
buttonsCard: true,
|
|
122
|
+
noBorder: true,
|
|
123
|
+
className: "justify-end",
|
|
124
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
125
|
+
isPrimary: true,
|
|
126
|
+
href: fallbackURL,
|
|
127
|
+
children: __('Return to Dashboard', 'newspack-plugin')
|
|
128
|
+
})
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Get all the relevant info out of a raw API error response.
|
|
135
|
+
*
|
|
136
|
+
* @param {Object} error error object
|
|
137
|
+
* @return {Object} Error object with relevant fields and defaults
|
|
138
|
+
*/
|
|
139
|
+
parseError = error => {
|
|
140
|
+
const {
|
|
141
|
+
data,
|
|
142
|
+
message,
|
|
143
|
+
code
|
|
144
|
+
} = error;
|
|
145
|
+
let level = 'fatal';
|
|
146
|
+
if (!!data && 'level' in data) {
|
|
147
|
+
level = data.level;
|
|
148
|
+
} else if ('rest_invalid_param' === code) {
|
|
149
|
+
level = 'notice';
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
message,
|
|
153
|
+
level
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Called when plugin installation is complete. Updates state and calls onWizardReady on the wrapped component.
|
|
159
|
+
*/
|
|
160
|
+
pluginInstallationStatus = ({
|
|
161
|
+
complete
|
|
162
|
+
}) => {
|
|
163
|
+
if (this.state.loading) {
|
|
164
|
+
this.doneLoading();
|
|
165
|
+
}
|
|
166
|
+
const instance = this.wrappedComponentRef.current;
|
|
167
|
+
this.setState({
|
|
168
|
+
complete
|
|
169
|
+
}, () => {
|
|
170
|
+
// eslint-disable-next-line no-unused-expressions
|
|
171
|
+
complete && instance && instance.onWizardReady && instance.onWizardReady();
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Begin loading.
|
|
177
|
+
*/
|
|
178
|
+
startLoading = quiet => {
|
|
179
|
+
if (quiet) {
|
|
180
|
+
this.setState(state => ({
|
|
181
|
+
quietLoading: state.quietLoading + 1
|
|
182
|
+
}));
|
|
183
|
+
} else {
|
|
184
|
+
this.setState(state => ({
|
|
185
|
+
loading: state.loading + 1
|
|
186
|
+
}));
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* End loading.
|
|
192
|
+
*/
|
|
193
|
+
doneLoading = quiet => {
|
|
194
|
+
if (quiet) {
|
|
195
|
+
this.setState(state => ({
|
|
196
|
+
quietLoading: state.quietLoading - 1
|
|
197
|
+
}));
|
|
198
|
+
} else {
|
|
199
|
+
this.setState(state => ({
|
|
200
|
+
loading: state.loading - 1
|
|
201
|
+
}));
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Replacement for core apiFetch that automatically manages wizard loading UI.
|
|
207
|
+
*/
|
|
208
|
+
wizardApiFetch = args => {
|
|
209
|
+
const {
|
|
210
|
+
quiet
|
|
211
|
+
} = args;
|
|
212
|
+
this.startLoading(quiet);
|
|
213
|
+
return new Promise((resolve, reject) => {
|
|
214
|
+
apiFetch(args).then(response => {
|
|
215
|
+
this.doneLoading(quiet);
|
|
216
|
+
resolve(response);
|
|
217
|
+
}).catch(error => {
|
|
218
|
+
this.doneLoading(quiet);
|
|
219
|
+
reject(error);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Render a Route that checks for plugin installation requirements, and redirects to '/' when all are done.
|
|
226
|
+
*
|
|
227
|
+
* @return {void}
|
|
228
|
+
*/
|
|
229
|
+
pluginRequirements = () => {
|
|
230
|
+
const {
|
|
231
|
+
complete
|
|
232
|
+
} = this.state;
|
|
233
|
+
/* After all plugins are loaded, redirect to / (this could be configurable) */
|
|
234
|
+
if (complete) {
|
|
235
|
+
return /*#__PURE__*/_jsx(Redirect, {
|
|
236
|
+
from: "/plugin-requirements",
|
|
237
|
+
to: "/"
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
return /*#__PURE__*/_jsx(Route, {
|
|
241
|
+
path: "/",
|
|
242
|
+
render: () => /*#__PURE__*/_jsxs(Fragment, {
|
|
243
|
+
children: [complete !== null && /*#__PURE__*/_jsx("div", {
|
|
244
|
+
className: "newspack-wizard__header",
|
|
245
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
246
|
+
className: "newspack-wizard__header__inner",
|
|
247
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
248
|
+
className: "newspack-wizard__title",
|
|
249
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
250
|
+
isLink: true,
|
|
251
|
+
href: newspack_urls.dashboard,
|
|
252
|
+
label: __('Return to Dashboard', 'newspack-plugin'),
|
|
253
|
+
showTooltip: true,
|
|
254
|
+
icon: home,
|
|
255
|
+
iconSize: 36,
|
|
256
|
+
children: /*#__PURE__*/_jsx(NewspackIcon, {
|
|
257
|
+
size: 36
|
|
258
|
+
})
|
|
259
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
260
|
+
children: /*#__PURE__*/_jsx("h2", {
|
|
261
|
+
children: requiredPlugins.length > 1 ? __('Required plugins', 'newspack-plugin') : __('Required plugin', 'newspack-plugin')
|
|
262
|
+
})
|
|
263
|
+
})]
|
|
264
|
+
})
|
|
265
|
+
})
|
|
266
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
267
|
+
className: "newspack-wizard newspack-wizard__content",
|
|
268
|
+
children: /*#__PURE__*/_jsx(PluginInstaller, {
|
|
269
|
+
plugins: requiredPlugins,
|
|
270
|
+
onStatus: status => this.pluginInstallationStatus(status)
|
|
271
|
+
})
|
|
272
|
+
})]
|
|
273
|
+
})
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
getFallbackURL = () => {
|
|
277
|
+
if (typeof newspack_urls !== 'undefined') {
|
|
278
|
+
return newspack_urls.dashboard;
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Render.
|
|
284
|
+
*/
|
|
285
|
+
render() {
|
|
286
|
+
const {
|
|
287
|
+
simpleFooter
|
|
288
|
+
} = this.props;
|
|
289
|
+
const {
|
|
290
|
+
loading,
|
|
291
|
+
quietLoading,
|
|
292
|
+
error
|
|
293
|
+
} = this.state;
|
|
294
|
+
const loadingClasses = [loading ? 'newspack-wizard__is-loading' : 'newspack-wizard__is-loaded'];
|
|
295
|
+
if (quietLoading) {
|
|
296
|
+
loadingClasses.push('newspack-wizard__is-loading-quiet');
|
|
297
|
+
}
|
|
298
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
299
|
+
children: [this.getError(), /*#__PURE__*/_jsx("div", {
|
|
300
|
+
className: loadingClasses.join(' '),
|
|
301
|
+
children: /*#__PURE__*/_jsx(WrappedComponent, {
|
|
302
|
+
pluginRequirements: requiredPlugins && this.pluginRequirements(),
|
|
303
|
+
clearError: this.clearError,
|
|
304
|
+
getError: this.getError,
|
|
305
|
+
errorData: error,
|
|
306
|
+
setError: this.setError,
|
|
307
|
+
isLoading: loading,
|
|
308
|
+
startLoading: this.startLoading,
|
|
309
|
+
doneLoading: this.doneLoading,
|
|
310
|
+
wizardApiFetch: this.wizardApiFetch,
|
|
311
|
+
ref: this.wrappedComponentRef,
|
|
312
|
+
...this.props
|
|
313
|
+
})
|
|
314
|
+
}), !loading && /*#__PURE__*/_jsx(Footer, {
|
|
315
|
+
simple: simpleFooter
|
|
316
|
+
})]
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* With Wizard
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@use "~@wordpress/base-styles/colors" as wp-colors;
|
|
6
|
+
@use "../../../shared/scss/colors";
|
|
7
|
+
|
|
8
|
+
// Reset Padding of the Admin Page
|
|
9
|
+
|
|
10
|
+
.toplevel_page_newspack:not(.menu-top),
|
|
11
|
+
body[class*="newspack_page_newspack-"],
|
|
12
|
+
body[class*="admin_page_newspack-"] {
|
|
13
|
+
background: white;
|
|
14
|
+
|
|
15
|
+
#wpcontent {
|
|
16
|
+
padding-left: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
#wpbody-content {
|
|
20
|
+
padding-bottom: 220px;
|
|
21
|
+
min-height: 100vh;
|
|
22
|
+
|
|
23
|
+
@media screen and ( min-width: 783px ) {
|
|
24
|
+
padding-bottom: 202px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media screen and ( min-width: 1128px ) {
|
|
28
|
+
padding-bottom: 168px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
svg {
|
|
34
|
+
&.newspack--error {
|
|
35
|
+
fill: wp-colors.$alert-red;
|
|
36
|
+
transform: rotate(180deg);
|
|
37
|
+
}
|
|
38
|
+
&.newspack--success {
|
|
39
|
+
fill: wp-colors.$alert-green;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Blue Screen
|
|
44
|
+
|
|
45
|
+
.newspack-wizard__blue {
|
|
46
|
+
#wpwrap {
|
|
47
|
+
background: colors.$primary-500;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.newspack-footer {
|
|
51
|
+
background: colors.$primary-500;
|
|
52
|
+
border-color: colors.$primary-500;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
|
|
55
|
+
&__logo {
|
|
56
|
+
background: inherit;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#wpfooter {
|
|
61
|
+
color: white;
|
|
62
|
+
|
|
63
|
+
a {
|
|
64
|
+
color: inherit;
|
|
65
|
+
|
|
66
|
+
&:active,
|
|
67
|
+
&:focus,
|
|
68
|
+
&:hover {
|
|
69
|
+
opacity: 0.75;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Loading
|
|
76
|
+
|
|
77
|
+
.newspack-wizard__is-loading {
|
|
78
|
+
background: white;
|
|
79
|
+
cursor: wait;
|
|
80
|
+
inset: 0;
|
|
81
|
+
position: absolute;
|
|
82
|
+
|
|
83
|
+
> * {
|
|
84
|
+
display: none !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&::before,
|
|
88
|
+
&::after {
|
|
89
|
+
animation: loading 2s ease-in-out infinite;
|
|
90
|
+
content: "";
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&::before {
|
|
95
|
+
background: colors.$primary-500;
|
|
96
|
+
box-shadow:
|
|
97
|
+
24px 0 0 white,
|
|
98
|
+
69px 0 0 -15px wp-colors.$gray-900,
|
|
99
|
+
99px 0 0 -15px wp-colors.$gray-900,
|
|
100
|
+
129px 0 0 -15px wp-colors.$gray-900,
|
|
101
|
+
159px 0 0 -15px wp-colors.$gray-900,
|
|
102
|
+
189px 0 0 -15px wp-colors.$gray-900;
|
|
103
|
+
height: 60px;
|
|
104
|
+
width: 60px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::after {
|
|
108
|
+
background: wp-colors.$gray-900;
|
|
109
|
+
box-shadow:
|
|
110
|
+
inset -40vw 0 0 0 white,
|
|
111
|
+
0 64px 0 0 wp-colors.$gray-700,
|
|
112
|
+
40vw 96px 0 0 white,
|
|
113
|
+
0 96px 0 0 wp-colors.$gray-700;
|
|
114
|
+
height: 24px;
|
|
115
|
+
margin: 68px auto 0;
|
|
116
|
+
max-width: 1040px;
|
|
117
|
+
width: calc(100% - ( 32px * 2 ));
|
|
118
|
+
|
|
119
|
+
@media screen and ( min-width: 744px ) {
|
|
120
|
+
box-shadow:
|
|
121
|
+
inset -400px 0 0 0 white,
|
|
122
|
+
0 64px 0 0 wp-colors.$gray-700,
|
|
123
|
+
200px 96px 0 0 white,
|
|
124
|
+
0 96px 0 0 wp-colors.$gray-700;
|
|
125
|
+
width: calc(100% - ( 64px * 2 ));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media screen and ( min-width: 1224px ) {
|
|
129
|
+
box-shadow:
|
|
130
|
+
inset -600px 0 0 0 white,
|
|
131
|
+
0 64px 0 0 wp-colors.$gray-700,
|
|
132
|
+
512px 96px 0 0 white,
|
|
133
|
+
0 96px 0 0 wp-colors.$gray-700;
|
|
134
|
+
width: calc(100% - ( 64px * 2 ));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Blue Screen
|
|
139
|
+
.newspack-wizard__blue & {
|
|
140
|
+
background: colors.$primary-500;
|
|
141
|
+
|
|
142
|
+
&::before {
|
|
143
|
+
animation: loading-quiet 1.25s ease-in-out infinite;
|
|
144
|
+
background: white;
|
|
145
|
+
border-radius: 0;
|
|
146
|
+
box-shadow: 0;
|
|
147
|
+
height: 8px;
|
|
148
|
+
left: 0;
|
|
149
|
+
margin: 0;
|
|
150
|
+
position: absolute;
|
|
151
|
+
right: 100%;
|
|
152
|
+
top: 0;
|
|
153
|
+
width: auto;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&::after {
|
|
157
|
+
display: none;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Quiet
|
|
162
|
+
&-quiet {
|
|
163
|
+
position: relative;
|
|
164
|
+
|
|
165
|
+
&::before,
|
|
166
|
+
&::after {
|
|
167
|
+
content: "";
|
|
168
|
+
cursor: wait;
|
|
169
|
+
display: block;
|
|
170
|
+
left: 0;
|
|
171
|
+
position: fixed;
|
|
172
|
+
top: 46px;
|
|
173
|
+
|
|
174
|
+
@media screen and ( min-width: 783px ) {
|
|
175
|
+
top: 32px;
|
|
176
|
+
margin-left: 160px;
|
|
177
|
+
|
|
178
|
+
body.auto-fold & {
|
|
179
|
+
margin-left: 36px;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media screen and ( min-width: 961px ) {
|
|
184
|
+
body.auto-fold & {
|
|
185
|
+
margin-left: 160px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
body.folded & {
|
|
189
|
+
margin-left: 36px;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&::before {
|
|
195
|
+
animation: loading-quiet 1.25s ease-in-out infinite;
|
|
196
|
+
background: colors.$primary-500;
|
|
197
|
+
height: 8px;
|
|
198
|
+
right: 100%;
|
|
199
|
+
z-index: 9999;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&::after {
|
|
203
|
+
background: rgba(white, 0.7);
|
|
204
|
+
bottom: 0;
|
|
205
|
+
right: 0;
|
|
206
|
+
z-index: 9998;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.newspack-wizard-section__is-loading {
|
|
212
|
+
background: white;
|
|
213
|
+
cursor: wait;
|
|
214
|
+
min-height: 150px;
|
|
215
|
+
|
|
216
|
+
> * {
|
|
217
|
+
display: none !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&::after {
|
|
221
|
+
animation: loading 2s ease-in-out infinite;
|
|
222
|
+
content: "";
|
|
223
|
+
display: block;
|
|
224
|
+
background: wp-colors.$gray-900;
|
|
225
|
+
box-shadow:
|
|
226
|
+
inset -40vw 0 0 0 white,
|
|
227
|
+
0 64px 0 0 wp-colors.$gray-700,
|
|
228
|
+
40vw 96px 0 0 white,
|
|
229
|
+
0 96px 0 0 wp-colors.$gray-700;
|
|
230
|
+
height: 24px;
|
|
231
|
+
margin: 0 auto;
|
|
232
|
+
max-width: 1040px;
|
|
233
|
+
width: 100%;
|
|
234
|
+
|
|
235
|
+
@media screen and ( min-width: 744px ) {
|
|
236
|
+
box-shadow:
|
|
237
|
+
inset -400px 0 0 0 white,
|
|
238
|
+
0 64px 0 0 wp-colors.$gray-700,
|
|
239
|
+
200px 96px 0 0 white,
|
|
240
|
+
0 96px 0 0 wp-colors.$gray-700;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@media screen and ( min-width: 1224px ) {
|
|
244
|
+
box-shadow:
|
|
245
|
+
inset -600px 0 0 0 white,
|
|
246
|
+
0 64px 0 0 wp-colors.$gray-700,
|
|
247
|
+
520px 96px 0 0 white,
|
|
248
|
+
0 96px 0 0 wp-colors.$gray-700;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@keyframes loading {
|
|
254
|
+
0% {
|
|
255
|
+
opacity: 1;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
50% {
|
|
259
|
+
opacity: 0.1;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
100% {
|
|
263
|
+
opacity: 1;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@keyframes loading-quiet {
|
|
268
|
+
0% {
|
|
269
|
+
left: 0;
|
|
270
|
+
right: 100%;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
50% {
|
|
274
|
+
left: 0;
|
|
275
|
+
right: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
100% {
|
|
279
|
+
left: 100%;
|
|
280
|
+
right: 0;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies.
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { category } from '@wordpress/icons';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { Button, Handoff, NewspackIcon, Notice, HandoffMessage, TabbedNavigation } from '../';
|
|
11
|
+
import { buttonProps } from '../../../shared/js/';
|
|
12
|
+
import './style.scss';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* External dependencies
|
|
16
|
+
*/
|
|
17
|
+
import classnames from 'classnames';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Higher-Order Component to provide plugin management and error handling to Newspack Wizards.
|
|
21
|
+
*/
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
|
+
export default function withWizardScreen(WrappedComponent, {
|
|
24
|
+
hidePrimaryButton
|
|
25
|
+
} = {}) {
|
|
26
|
+
const WrappedWithWizardScreen = props => {
|
|
27
|
+
const {
|
|
28
|
+
className,
|
|
29
|
+
buttonText,
|
|
30
|
+
buttonAction,
|
|
31
|
+
buttonDisabled,
|
|
32
|
+
headerText,
|
|
33
|
+
subHeaderText,
|
|
34
|
+
tabbedNavigation,
|
|
35
|
+
secondaryButtonText,
|
|
36
|
+
secondaryButtonAction,
|
|
37
|
+
renderAboveContent,
|
|
38
|
+
disableUpcomingInTabbedNavigation
|
|
39
|
+
} = props;
|
|
40
|
+
const retrievedButtonProps = buttonProps(buttonAction);
|
|
41
|
+
const retrievedSecondaryButtonProps = buttonProps(secondaryButtonAction);
|
|
42
|
+
const SecondaryCTAComponent = retrievedSecondaryButtonProps.plugin ? Handoff : Button;
|
|
43
|
+
const shouldRenderPrimaryButton = buttonText && buttonAction;
|
|
44
|
+
const shouldRenderSecondaryButton = secondaryButtonText && secondaryButtonAction;
|
|
45
|
+
const renderPrimaryButton = (overridingProps = {}) => retrievedButtonProps.plugin ? /*#__PURE__*/_jsx(Handoff, {
|
|
46
|
+
isPrimary: true,
|
|
47
|
+
...retrievedButtonProps,
|
|
48
|
+
...overridingProps,
|
|
49
|
+
children: buttonText
|
|
50
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
51
|
+
isPrimary: !buttonDisabled,
|
|
52
|
+
isSecondary: !!buttonDisabled,
|
|
53
|
+
disabled: buttonDisabled
|
|
54
|
+
// Allow overridingProps to set children.
|
|
55
|
+
// eslint-disable-next-line react/no-children-prop
|
|
56
|
+
,
|
|
57
|
+
children: buttonText,
|
|
58
|
+
...retrievedButtonProps,
|
|
59
|
+
...overridingProps
|
|
60
|
+
});
|
|
61
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
62
|
+
children: [newspack_aux_data.is_debug_mode && /*#__PURE__*/_jsx(Notice, {
|
|
63
|
+
debugMode: true
|
|
64
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
65
|
+
className: "newspack-wizard__header",
|
|
66
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
67
|
+
className: "newspack-wizard__header__inner",
|
|
68
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
69
|
+
className: "newspack-wizard__title",
|
|
70
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
71
|
+
isLink: true,
|
|
72
|
+
href: newspack_urls.dashboard,
|
|
73
|
+
label: __('Return to Dashboard', 'newspack-plugin'),
|
|
74
|
+
showTooltip: true,
|
|
75
|
+
icon: category,
|
|
76
|
+
iconSize: 36,
|
|
77
|
+
children: /*#__PURE__*/_jsx(NewspackIcon, {
|
|
78
|
+
size: 36
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
81
|
+
children: [headerText && /*#__PURE__*/_jsx("h2", {
|
|
82
|
+
children: headerText
|
|
83
|
+
}), subHeaderText && /*#__PURE__*/_jsx("span", {
|
|
84
|
+
children: subHeaderText
|
|
85
|
+
})]
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
}), tabbedNavigation && /*#__PURE__*/_jsx(TabbedNavigation, {
|
|
90
|
+
disableUpcoming: disableUpcomingInTabbedNavigation,
|
|
91
|
+
items: tabbedNavigation.filter(item => !item.isHiddenInNav)
|
|
92
|
+
}), /*#__PURE__*/_jsx(HandoffMessage, {}), /*#__PURE__*/_jsxs("div", {
|
|
93
|
+
className: classnames('newspack-wizard newspack-wizard__content', className),
|
|
94
|
+
children: [typeof renderAboveContent === 'function' ? renderAboveContent() : null, /*#__PURE__*/_jsx(WrappedComponent, {
|
|
95
|
+
...props,
|
|
96
|
+
renderPrimaryButton: renderPrimaryButton
|
|
97
|
+
}), (shouldRenderPrimaryButton || shouldRenderSecondaryButton) && /*#__PURE__*/_jsxs("div", {
|
|
98
|
+
className: "newspack-buttons-card",
|
|
99
|
+
children: [shouldRenderPrimaryButton && !hidePrimaryButton && renderPrimaryButton(), shouldRenderSecondaryButton && /*#__PURE__*/_jsx(SecondaryCTAComponent, {
|
|
100
|
+
isSecondary: true,
|
|
101
|
+
...retrievedSecondaryButtonProps,
|
|
102
|
+
children: secondaryButtonText
|
|
103
|
+
})]
|
|
104
|
+
})]
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
return WrappedWithWizardScreen;
|
|
109
|
+
}
|