@vnejs/module.controller.tabs 0.2.3 → 0.2.5

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
@@ -7,11 +7,11 @@ export declare abstract class ModuleControllerTabs<TEvents extends ModuleControl
7
7
  abstract EVENT_HIDE: string;
8
8
  abstract EVENT_TAB_SET: string;
9
9
  abstract CONTROLS_ZINDEX: number;
10
- TABS: Record<string, unknown>;
11
- controls: {
10
+ CONTROLS: {
12
11
  abstract_tab_prev: () => undefined;
13
12
  abstract_tab_next: () => undefined;
14
13
  };
14
+ TABS: Record<string, unknown>;
15
15
  subscribe: () => void;
16
16
  getDefaultState: () => TState;
17
17
  getTabKeys: () => string[];
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { ModuleCore } from "@vnejs/module.core";
2
2
  export class ModuleControllerTabs extends ModuleCore {
3
- TABS = {};
4
- controls = {
3
+ CONTROLS = {
5
4
  [this.CONST.CONTROLS.BUTTONS.TAB_PREV]: () => void this.onPrevTab(),
6
5
  [this.CONST.CONTROLS.BUTTONS.TAB_NEXT]: () => void this.onNextTab(),
7
6
  };
7
+ TABS = {};
8
8
  subscribe = () => {
9
9
  this.on(this.EVENT_SHOW, this.onShow);
10
10
  this.on(this.EVENT_HIDE, this.onHide);
@@ -16,7 +16,7 @@ export class ModuleControllerTabs extends ModuleCore {
16
16
  this.updateState({ currentTab: tab ?? this.getTabKeys()[0] });
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.tabs",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -33,13 +33,14 @@ export abstract class ModuleControllerTabs<
33
33
  abstract EVENT_TAB_SET: string;
34
34
 
35
35
  abstract CONTROLS_ZINDEX: number;
36
- TABS: Record<string, unknown> = {};
37
36
 
38
- controls = {
37
+ CONTROLS = {
39
38
  [this.CONST.CONTROLS.BUTTONS.TAB_PREV]: () => void this.onPrevTab(),
40
39
  [this.CONST.CONTROLS.BUTTONS.TAB_NEXT]: () => void this.onNextTab(),
41
40
  };
42
41
 
42
+ TABS: Record<string, unknown> = {};
43
+
43
44
  subscribe = () => {
44
45
  this.on(this.EVENT_SHOW, this.onShow);
45
46
  this.on(this.EVENT_HIDE, this.onHide);
@@ -55,7 +56,7 @@ export abstract class ModuleControllerTabs<
55
56
 
56
57
  return this.emit(this.EVENTS.CONTROLS.PUSH, {
57
58
  key: this.name,
58
- controls: this.controls,
59
+ controls: this.CONTROLS,
59
60
  index: this.CONTROLS_ZINDEX + 1,
60
61
  checkNext: true,
61
62
  } 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 ModuleControllerTabsEvents = ModuleCoreEvents & Record<ControlsPluginName, ControlsSubscribeEvents>;
9
5