@vnejs/plugins.views.scenario.interface 0.1.35 → 0.2.0

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.
@@ -59,9 +59,12 @@ export class InterfaceController extends ModuleController {
59
59
  await this.updateStateAndView({ isVisible }, isForce, !isForce);
60
60
  };
61
61
  onStateChanged = async () => {
62
- const { view = "", isShow = false, isVisible = false } = this.globalState.interface;
63
62
  this.isStateChangeInProcess = true;
64
- await this.updateStateAndViewForce({ view, isShow, isVisible });
63
+ await Promise.all([
64
+ this.emit(this.EVENTS.INTERFACE.SHOW_CHANGED, { isForce: true }),
65
+ this.emit(this.EVENTS.INTERFACE.VIEW_CHANGED, { isForce: true }),
66
+ this.emit(this.EVENTS.INTERFACE.VISIBLE_CHANGED, { isForce: true }),
67
+ ]);
65
68
  this.isStateChangeInProcess = false;
66
69
  };
67
70
  getDefaultState = () => ({
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Backdrop, PositionBox, useMemo } from "@vnejs/uis.react";
3
3
  export const InterfaceBackdrop = ({ view = "", transition = 0, PARAMS }) => {
4
4
  const propsByView = useMemo(() => PARAMS.INTERFACE.VIEW_PROPS[view]?.backdrop || {}, [view, PARAMS.INTERFACE.VIEW_PROPS]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.views.scenario.interface",
3
- "version": "0.1.35",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,33 +30,33 @@
30
30
  "author": "",
31
31
  "license": "ISC",
32
32
  "dependencies": {
33
- "@vnejs/contracts.views.scenario.interface": "~0.1.0"
33
+ "@vnejs/contracts.views.scenario.interface": "~0.2.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@vnejs/helpers": "~0.1.0",
37
- "@vnejs/module.core": "~0.1.0",
38
- "@vnejs/module.components": "~0.1.0",
39
- "@vnejs/contracts.text": "~0.1.0",
40
- "@vnejs/contracts.text.meet": "~0.1.0",
41
- "@vnejs/contracts.text.wall": "~0.1.0",
42
- "@vnejs/shared": "~0.1.0",
43
- "@vnejs/uis.react": "~0.1.0",
44
- "@vnejs/uis.utils": "~0.1.0"
36
+ "@vnejs/helpers": "~0.2.0",
37
+ "@vnejs/module.core": "~0.2.0",
38
+ "@vnejs/module.components": "~0.2.0",
39
+ "@vnejs/contracts.text": "~0.2.0",
40
+ "@vnejs/contracts.text.meet": "~0.2.0",
41
+ "@vnejs/contracts.text.wall": "~0.2.0",
42
+ "@vnejs/shared": "~0.2.0",
43
+ "@vnejs/uis.react": "~0.2.0",
44
+ "@vnejs/uis.utils": "~0.2.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vnejs/configs.ts-common": "~0.1.0",
48
- "@vnejs/configs.vitest": "~0.1.0",
49
- "@vnejs/test-utils": "~0.1.0",
50
- "@vnejs/contracts.text": "~0.1.0",
51
- "@vnejs/sources-set": "~0.1.0",
52
- "@vnejs/helpers": "~0.1.0",
53
- "@vnejs/module.core": "~0.1.0",
54
- "@vnejs/module.components": "~0.1.0",
55
- "@vnejs/contracts.text.meet": "~0.1.0",
56
- "@vnejs/contracts.text.wall": "~0.1.0",
57
- "@vnejs/shared": "~0.1.0",
58
- "@vnejs/uis.react": "~0.1.0",
59
- "@vnejs/uis.utils": "~0.1.0",
60
- "@vnejs/contracts.views.scenario.interface": "~0.1.0"
47
+ "@vnejs/configs.ts-common": "~0.2.0",
48
+ "@vnejs/configs.vitest": "~0.2.0",
49
+ "@vnejs/test-utils": "~0.2.0",
50
+ "@vnejs/contracts.text": "~0.2.0",
51
+ "@vnejs/sources-set": "~0.2.0",
52
+ "@vnejs/helpers": "~0.2.0",
53
+ "@vnejs/module.core": "~0.2.0",
54
+ "@vnejs/module.components": "~0.2.0",
55
+ "@vnejs/contracts.text.meet": "~0.2.0",
56
+ "@vnejs/contracts.text.wall": "~0.2.0",
57
+ "@vnejs/shared": "~0.2.0",
58
+ "@vnejs/uis.react": "~0.2.0",
59
+ "@vnejs/uis.utils": "~0.2.0",
60
+ "@vnejs/contracts.views.scenario.interface": "~0.2.0"
61
61
  }
62
62
  }
@@ -86,10 +86,12 @@ export class InterfaceController extends ModuleController<
86
86
  };
87
87
 
88
88
  onStateChanged = async () => {
89
- const { view = "", isShow = false, isVisible = false } = this.globalState.interface;
90
-
91
89
  this.isStateChangeInProcess = true;
92
- await this.updateStateAndViewForce({ view, isShow, isVisible });
90
+ await Promise.all([
91
+ this.emit(this.EVENTS.INTERFACE.SHOW_CHANGED, { isForce: true }),
92
+ this.emit(this.EVENTS.INTERFACE.VIEW_CHANGED, { isForce: true }),
93
+ this.emit(this.EVENTS.INTERFACE.VISIBLE_CHANGED, { isForce: true }),
94
+ ]);
93
95
  this.isStateChangeInProcess = false;
94
96
  };
95
97