-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce in-devtools state changes and other improvements
- Loading branch information
wszerad
committed
Feb 2, 2021
1 parent
232a891
commit c022027
Showing
11 changed files
with
126 additions
and
74 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "widok", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Vue3 simple store", | ||
"author": "[email protected]", | ||
"license": "MIT", | ||
|
@@ -36,7 +36,7 @@ | |
"build": "vite build && tsc" | ||
}, | ||
"dependencies": { | ||
"@vue/devtools-api": "^6.0.0-beta.3" | ||
"@vue/devtools-api": "^6.0.0-beta.6" | ||
}, | ||
"peerDependencies": { | ||
"vue": "^3.0.0", | ||
|
@@ -46,7 +46,7 @@ | |
"typescript": "^4.1.3", | ||
"@types/node": "^14.14.10", | ||
"eslint": "^7.14.0", | ||
"vite": "^2.0.0-beta.59", | ||
"vite": "^2.0.0-beta.61", | ||
"vue": "^3.0.5", | ||
"@vitejs/plugin-vue": "^1.1.3", | ||
"@vue/compiler-sfc": "^3.0.5", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import { StoreEvent } from './StoreEvent'; | ||
|
||
export class ActionEvent<T = any> { | ||
constructor( | ||
public name: string, | ||
public payload: T, | ||
public type = 'Action', | ||
) {} | ||
export class ActionEvent<T = any> extends StoreEvent<T> { | ||
finished = false; | ||
type = 'Action' | ||
|
||
end() { | ||
this.finished = true; | ||
return this; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import { StoreEvent } from './StoreEvent'; | ||
|
||
export class PatchEvent<T = any> { | ||
constructor( | ||
public name: string, | ||
public payload: T, | ||
public type = 'Patch', | ||
) {} | ||
export class PatchEvent<T = any> extends StoreEvent<T> { | ||
type = 'Patch'; | ||
} |
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import { StoreEvent } from './StoreEvent'; | ||
|
||
export class SetEvent<T = any> { | ||
constructor( | ||
public name: string, | ||
public payload: T, | ||
public type = 'Set', | ||
) {} | ||
export class SetEvent<T = any> extends StoreEvent<T> { | ||
type = 'Set'; | ||
} |
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,11 @@ | ||
let uuid = 0; | ||
|
||
export abstract class StoreEvent<T = any> { | ||
constructor( | ||
public name: string, | ||
public payload: T, | ||
public uid: number = uuid++ | ||
) {} | ||
|
||
abstract type: string; | ||
} |
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