@vnejs/module.controller.arrows.horizontal 0.2.1 → 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 CHANGED
@@ -8,12 +8,12 @@ export declare abstract class ModuleControllerArrowsHorizontal<TEvents extends M
8
8
  abstract EVENT_STATE_UPDATE: string;
9
9
  abstract EVENT_UPDATE_FAST: string;
10
10
  abstract CONTROLS_ZINDEX: number;
11
- currentItem: number | null;
12
- maxCurrentItem: number;
13
- controls: {
11
+ CONTROLS: {
14
12
  abstract_arrow_left: () => undefined;
15
13
  abstract_arrow_right: () => undefined;
16
14
  };
15
+ currentItem: number | null;
16
+ maxCurrentItem: number;
17
17
  subscribe: () => void;
18
18
  getDefaultState: () => TState;
19
19
  abstract getMaxCurrentItem: () => number | Promise<number>;
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { ModuleCore } from "@vnejs/module.core";
2
2
  export class ModuleControllerArrowsHorizontal extends ModuleCore {
3
- currentItem = null;
4
- maxCurrentItem = 0;
5
- controls = {
3
+ CONTROLS = {
6
4
  [this.CONST.CONTROLS.BUTTONS.ARROW_LEFT]: () => void this.decCurrentItem(),
7
5
  [this.CONST.CONTROLS.BUTTONS.ARROW_RIGHT]: () => void this.incCurrentItem(),
8
6
  };
7
+ currentItem = null;
8
+ maxCurrentItem = 0;
9
9
  subscribe = () => {
10
10
  this.on(this.EVENT_SHOW, this.onShow);
11
11
  this.on(this.EVENT_HIDE, this.onHide);
@@ -16,7 +16,7 @@ export class ModuleControllerArrowsHorizontal extends ModuleCore {
16
16
  this.currentItem = null;
17
17
  return this.emit(this.EVENTS.CONTROLS.PUSH, {
18
18
  key: this.name,
19
- controls: this.controls,
19
+ controls: this.CONTROLS,
20
20
  index: this.CONTROLS_ZINDEX + 1,
21
21
  checkNext: true,
22
22
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/module.controller.arrows.horizontal",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -33,14 +33,14 @@ export abstract class ModuleControllerArrowsHorizontal<
33
33
 
34
34
  abstract CONTROLS_ZINDEX: number;
35
35
 
36
- currentItem: number | null = null;
37
- maxCurrentItem = 0;
38
-
39
- controls = {
36
+ CONTROLS = {
40
37
  [this.CONST.CONTROLS.BUTTONS.ARROW_LEFT]: () => void this.decCurrentItem(),
41
38
  [this.CONST.CONTROLS.BUTTONS.ARROW_RIGHT]: () => void this.incCurrentItem(),
42
39
  };
43
40
 
41
+ currentItem: number | null = null;
42
+ maxCurrentItem = 0;
43
+
44
44
  subscribe = () => {
45
45
  this.on(this.EVENT_SHOW, this.onShow);
46
46
  this.on(this.EVENT_HIDE, this.onHide);
@@ -57,7 +57,7 @@ export abstract class ModuleControllerArrowsHorizontal<
57
57
 
58
58
  return this.emit(this.EVENTS.CONTROLS.PUSH, {
59
59
  key: this.name,
60
- controls: this.controls,
60
+ controls: this.CONTROLS,
61
61
  index: this.CONTROLS_ZINDEX + 1,
62
62
  checkNext: true,
63
63
  } satisfies ControlsPushPayload);
package/src/types.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  import type { ModuleCoreConstants, ModuleCoreEvents, ModuleCoreParams, ModuleCoreSettings } from "@vnejs/module.core";
2
- import type {
3
- Constants as ControlsConstants,
4
- PluginName as ControlsPluginName,
5
- SubscribeEvents as ControlsSubscribeEvents,
6
- } from "@vnejs/contracts.controls";
2
+ import type { Constants as ControlsConstants, PluginName as ControlsPluginName, SubscribeEvents as ControlsSubscribeEvents } from "@vnejs/contracts.controls";
7
3
 
8
4
  export type ModuleControllerArrowsHorizontalEvents = ModuleCoreEvents & Record<ControlsPluginName, ControlsSubscribeEvents>;
9
5