@vnejs/compatibility.views.scenario.point_and_click-with-views.scenario.interface 0.2.3 → 0.2.4
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.js
CHANGED
|
@@ -3,7 +3,9 @@ import { regModule } from "@vnejs/shared";
|
|
|
3
3
|
export class CompatibilityViewsScenarioPointAndClickWithViewsScenarioInterface extends ModuleCore {
|
|
4
4
|
name = "compatibility.views.scenario.point_and_click-with-views.scenario.interface";
|
|
5
5
|
subscribe = () => {
|
|
6
|
-
this.on(this.EVENTS.POINT_AND_CLICK_VIEW.
|
|
6
|
+
this.on(this.EVENTS.POINT_AND_CLICK_VIEW.SHOW, () => void this.emit(this.EVENTS.INTERFACE.HIDE), {
|
|
7
|
+
priority: this.CONST.COMPONENTS.LIFECYCLE_PRIORITY.SHOW.BEFORE,
|
|
8
|
+
});
|
|
7
9
|
};
|
|
8
10
|
}
|
|
9
11
|
regModule(CompatibilityViewsScenarioPointAndClickWithViewsScenarioInterface);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -7,7 +7,9 @@ export class CompatibilityViewsScenarioPointAndClickWithViewsScenarioInterface e
|
|
|
7
7
|
name = "compatibility.views.scenario.point_and_click-with-views.scenario.interface";
|
|
8
8
|
|
|
9
9
|
subscribe = () => {
|
|
10
|
-
this.on(this.EVENTS.POINT_AND_CLICK_VIEW.
|
|
10
|
+
this.on(this.EVENTS.POINT_AND_CLICK_VIEW.SHOW, () => void this.emit(this.EVENTS.INTERFACE.HIDE), {
|
|
11
|
+
priority: this.CONST.COMPONENTS.LIFECYCLE_PRIORITY.SHOW.BEFORE,
|
|
12
|
+
});
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
|
|
@@ -8,11 +8,11 @@ import { createCompatibilityTestModule, INTERFACE_EVENTS, PAC_EVENTS, registerCo
|
|
|
8
8
|
describe("CompatibilityViewsScenarioPointAndClickWithViewsScenarioInterface", () => {
|
|
9
9
|
beforeEach(() => registerCompatibilityVne());
|
|
10
10
|
|
|
11
|
-
it("POINT_AND_CLICK_VIEW.
|
|
11
|
+
it("POINT_AND_CLICK_VIEW.SHOW emits INTERFACE.HIDE", async () => {
|
|
12
12
|
const { observer } = createCompatibilityTestModule(CompatibilityViewsScenarioPointAndClickWithViewsScenarioInterface);
|
|
13
13
|
const hide = spyEvent(observer, INTERFACE_EVENTS.HIDE);
|
|
14
14
|
|
|
15
|
-
await observer.emit(PAC_EVENTS.
|
|
15
|
+
await observer.emit(PAC_EVENTS.SHOW);
|
|
16
16
|
|
|
17
17
|
expect(hide).toHaveBeenCalledOnce();
|
|
18
18
|
});
|