@vnejs/module.controller.interact 0.2.2 → 0.2.3
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/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/src/index.ts +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ export declare abstract class ModuleControllerInteract<TEvents extends ModuleCon
|
|
|
7
7
|
abstract EVENT_HIDE: string;
|
|
8
8
|
abstract CONTROLS_ZINDEX: number;
|
|
9
9
|
CONTROLS_CHECK_NEXT: boolean;
|
|
10
|
-
get CONTROLS(): {
|
|
11
|
-
abstract_any: () => undefined;
|
|
12
|
-
};
|
|
13
10
|
subscribe: () => void;
|
|
14
11
|
abstract onInteract: () => void | Promise<unknown>;
|
|
15
12
|
onShowControls: () => Promise<import("@vnejs/shared").EmitResults<"vne:controls:push">> | undefined;
|
|
16
13
|
onShowAfter: () => Promise<import("@vnejs/shared").EmitResults<"vne:interact:push">> | undefined;
|
|
17
14
|
onHideBefore: () => Promise<import("@vnejs/shared").EmitResults<"vne:interact:pop">> | undefined;
|
|
18
15
|
onHideControls: () => Promise<import("@vnejs/shared").EmitResults<"vne:controls:pop">> | undefined;
|
|
16
|
+
get CONTROLS(): {
|
|
17
|
+
abstract_any: () => undefined;
|
|
18
|
+
};
|
|
19
19
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { ModuleCore } from "@vnejs/module.core";
|
|
2
2
|
export class ModuleControllerInteract extends ModuleCore {
|
|
3
3
|
CONTROLS_CHECK_NEXT = true;
|
|
4
|
-
get CONTROLS() {
|
|
5
|
-
return {
|
|
6
|
-
[this.CONST.CONTROLS.BUTTONS.ANY]: () => void this.emit(this.EVENTS.INTERACT.EMIT),
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
4
|
subscribe = () => {
|
|
10
5
|
const { SHOW, HIDE } = this.CONST.COMPONENTS.LIFECYCLE_PRIORITY;
|
|
11
6
|
this.on(this.EVENT_SHOW, this.onShowControls, { priority: SHOW.CONTROLS });
|
|
@@ -28,4 +23,9 @@ export class ModuleControllerInteract extends ModuleCore {
|
|
|
28
23
|
this.setDefaultState();
|
|
29
24
|
return this.emit(this.EVENTS.CONTROLS.POP, { key: this.name });
|
|
30
25
|
};
|
|
26
|
+
get CONTROLS() {
|
|
27
|
+
return {
|
|
28
|
+
[this.CONST.CONTROLS.BUTTONS.ANY]: () => void this.emit(this.EVENTS.INTERACT.EMIT),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
31
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -33,12 +33,6 @@ export abstract class ModuleControllerInteract<
|
|
|
33
33
|
abstract CONTROLS_ZINDEX: number;
|
|
34
34
|
CONTROLS_CHECK_NEXT = true;
|
|
35
35
|
|
|
36
|
-
get CONTROLS() {
|
|
37
|
-
return {
|
|
38
|
-
[this.CONST.CONTROLS.BUTTONS.ANY]: () => void this.emit(this.EVENTS.INTERACT.EMIT),
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
36
|
subscribe = () => {
|
|
43
37
|
const { SHOW, HIDE } = this.CONST.COMPONENTS.LIFECYCLE_PRIORITY;
|
|
44
38
|
|
|
@@ -71,4 +65,10 @@ export abstract class ModuleControllerInteract<
|
|
|
71
65
|
|
|
72
66
|
return this.emit(this.EVENTS.CONTROLS.POP, { key: this.name } satisfies ControlsPopPayload);
|
|
73
67
|
};
|
|
68
|
+
|
|
69
|
+
get CONTROLS() {
|
|
70
|
+
return {
|
|
71
|
+
[this.CONST.CONTROLS.BUTTONS.ANY]: () => void this.emit(this.EVENTS.INTERACT.EMIT),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
74
|
}
|