-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(queries-preview): create
queriesPreview
module (#670)
- Loading branch information
1 parent
0b04253
commit 317d961
Showing
13 changed files
with
136 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/x-components/src/x-modules/queries-preview/events.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* Dictionary of the events of QueriesPreview XModule, where each key is the event name, and the | ||
* value is the event payload type or `void` if it has no payload. | ||
* | ||
* @public | ||
*/ | ||
export interface QueriesPreviewXEvents {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './events.types'; | ||
export * from './store'; | ||
export * from './x-module'; | ||
export * from './wiring'; |
9 changes: 9 additions & 0 deletions
9
packages/x-components/src/x-modules/queries-preview/store/emitters.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { createStoreEmitters } from '../../../store'; | ||
import { queriesPreviewXStoreModule } from './module'; | ||
|
||
/** | ||
* {@link StoreEmitters} For the queries-preview module. | ||
* | ||
* @internal | ||
*/ | ||
export const queriesPreviewEmitters = createStoreEmitters(queriesPreviewXStoreModule, {}); |
3 changes: 3 additions & 0 deletions
3
packages/x-components/src/x-modules/queries-preview/store/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './emitters'; | ||
export * from './module'; | ||
export * from './types'; |
13 changes: 13 additions & 0 deletions
13
packages/x-components/src/x-modules/queries-preview/store/module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { QueriesPreviewXStoreModule } from './types'; | ||
|
||
/** | ||
* {@link XStoreModule} For the queries-preview module. | ||
* | ||
* @internal | ||
*/ | ||
export const queriesPreviewXStoreModule: QueriesPreviewXStoreModule = { | ||
state: () => ({}), | ||
getters: {}, | ||
mutations: {}, | ||
actions: {} | ||
}; |
53 changes: 53 additions & 0 deletions
53
packages/x-components/src/x-modules/queries-preview/store/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { XActionContext, XStoreModule } from '../../../store/index'; | ||
|
||
/** | ||
* QueriesPreview store state. | ||
* | ||
* @public | ||
*/ | ||
export interface QueriesPreviewState {} | ||
|
||
/** | ||
* QueriesPreview store getters. | ||
* | ||
* @public | ||
*/ | ||
export interface QueriesPreviewGetters {} | ||
|
||
/** | ||
* QueriesPreview store mutations. | ||
* | ||
* @public | ||
*/ | ||
export interface QueriesPreviewMutations {} | ||
|
||
/** | ||
* QueriesPreview store actions. | ||
* | ||
* @public | ||
*/ | ||
export interface QueriesPreviewActions {} | ||
|
||
/** | ||
* QueriesPreview type safe store module. | ||
* | ||
* @public | ||
*/ | ||
export type QueriesPreviewXStoreModule = XStoreModule< | ||
QueriesPreviewState, | ||
QueriesPreviewGetters, | ||
QueriesPreviewMutations, | ||
QueriesPreviewActions | ||
>; | ||
|
||
/** | ||
* Alias type for actions context of the {@link QueriesPreviewXStoreModule}. | ||
* | ||
* @public | ||
*/ | ||
export type QueriesPreviewActionContext = XActionContext< | ||
QueriesPreviewState, | ||
QueriesPreviewGetters, | ||
QueriesPreviewMutations, | ||
QueriesPreviewActions | ||
>; |
8 changes: 8 additions & 0 deletions
8
packages/x-components/src/x-modules/queries-preview/wiring.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { createWiring } from '../../wiring/wiring.utils'; | ||
|
||
/** | ||
* Wiring configuration for the {@link QueriesPreviewXModule | queriesPreview module}. | ||
* | ||
* @internal | ||
*/ | ||
export const queriesPreviewWiring = createWiring({}); |
25 changes: 25 additions & 0 deletions
25
packages/x-components/src/x-modules/queries-preview/x-module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { XModule } from '../x-modules.types'; | ||
import { queriesPreviewEmitters } from './store/emitters'; | ||
import { queriesPreviewXStoreModule } from './store/module'; | ||
import { QueriesPreviewXStoreModule } from './store/types'; | ||
import { queriesPreviewWiring } from './wiring'; | ||
|
||
/** | ||
* QueriesPreview {@link XModule} alias. | ||
* | ||
* @public | ||
*/ | ||
export type QueriesPreviewXModule = XModule<QueriesPreviewXStoreModule>; | ||
|
||
/** | ||
* QueriesPreview {@link XModule} implementation. This module is auto-registered as soon as you | ||
* import any component from the `queries-preview` entry point. | ||
* | ||
* @public | ||
*/ | ||
export const queriesPreviewXModule: QueriesPreviewXModule = { | ||
name: 'queriesPreview', | ||
storeModule: queriesPreviewXStoreModule, | ||
storeEmitters: queriesPreviewEmitters, | ||
wiring: queriesPreviewWiring | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters