Download wp-calypso/packages/data-stores/src/onboard/index.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.7 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/onboard/index.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/data-stores/src/onboard/index.ts
-
curl -L -o index.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/onboard/index.ts
1.7 kB
| import { registerStore } from '@wordpress/data'; | |
| import { controls } from '@wordpress/data-controls'; | |
| import { registerPlugins } from '../plugins'; | |
| import * as actions from './actions'; | |
| import { STORE_KEY } from './constants'; | |
| import reducer, { State } from './reducer'; | |
| import * as selectors from './selectors'; | |
| import type { SelectFromMap, DispatchFromMap } from '../mapped-types'; | |
| export type { State }; | |
| export type OnboardSelect = SelectFromMap< typeof selectors >; | |
| export type OnboardActions = DispatchFromMap< typeof actions >; | |
| export { SiteGoal, SiteIntent } from './constants'; | |
| export * as utils from './utils'; | |
| export * from './types'; | |
| let isRegistered = false; | |
| /** | |
| * Onboard store depends on site-store. You should register the site before using this store. | |
| */ | |
| export function register(): typeof STORE_KEY { | |
| if ( isRegistered ) { | |
| return STORE_KEY; | |
| } | |
| registerPlugins(); | |
| registerStore( STORE_KEY, { | |
| actions, | |
| controls, | |
| reducer, | |
| selectors, | |
| persist: [ | |
| 'domainTransferNames', | |
| 'shouldImportDomainTransferDnsRecords', | |
| 'domain', | |
| 'domainSearch', | |
| 'domainForm', | |
| 'goals', | |
| 'hasUsedDomainsStep', | |
| 'hasUsedPlansStep', | |
| 'intent', | |
| 'paidSubscribers', | |
| 'lastLocation', | |
| 'planProductId', | |
| 'randomizedDesigns', | |
| 'selectedDesign', | |
| 'selectedStyleVariation', | |
| 'selectedGlobalStyles', | |
| 'selectedFeatures', | |
| 'selectedSite', | |
| 'readymadeTemplate', | |
| 'siteTitle', | |
| 'siteDescription', | |
| 'siteLogo', | |
| 'siteAccentColor', | |
| 'storeType', | |
| 'ecommerceFlowRecurType', | |
| 'couponCode', | |
| 'storageAddonSlug', | |
| 'domainCartItem', | |
| 'planCartItem', | |
| 'productCartItems', | |
| 'partnerBundle', | |
| ], | |
| } ); | |
| isRegistered = true; | |
| return STORE_KEY; | |
| } | |