@effindomv2/create-fui-as-app 0.1.3 → 0.1.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/build/templates/hello/asconfig.json +24 -0
- package/build/templates/hello/harness.ts +9 -0
- package/build/templates/hello/index.html +98 -0
- package/build/templates/hello/package.json +32 -0
- package/build/templates/hello/scripts/prepare-runtime.ts +18 -0
- package/build/templates/hello/scripts/smoke.ts +15 -0
- package/build/templates/hello/src/App.ts +7 -0
- package/build/templates/hello/src/HelloWorld.ts +105 -0
- package/build/templates/hello/src/fui/Fui.ts +1 -0
- package/build/templates/hello/src/fui/FuiBrowser.ts +1 -0
- package/build/templates/hello/src/fui/FuiExports.ts +1 -0
- package/build/templates/hello/src/fui/FuiPrimitives.ts +1 -0
- package/build/templates/hello/src/host/generated/HostEvents.ts +20 -0
- package/build/templates/hello/src/host/generated/HostServices.ts +8 -0
- package/build/templates/hello/src/host/host-events.ts +22 -0
- package/build/templates/hello/src/host/host-services.ts +18 -0
- package/build/templates/hello/tsconfig.json +9 -0
- package/build/templates/mvc/asconfig.json +24 -0
- package/build/templates/mvc/harness.ts +40 -0
- package/build/templates/mvc/index.html +11 -0
- package/build/templates/mvc/package.json +34 -0
- package/build/templates/mvc/route-shell.html +56 -0
- package/build/templates/mvc/scripts/prepare-runtime.ts +22 -0
- package/build/templates/mvc/scripts/smoke.ts +18 -0
- package/build/templates/mvc/src/fui/Fui.ts +1 -0
- package/build/templates/mvc/src/fui/FuiBrowser.ts +1 -0
- package/build/templates/mvc/src/fui/FuiExports.ts +1 -0
- package/build/templates/mvc/src/fui/FuiPrimitives.ts +1 -0
- package/build/templates/mvc/src/host/generated/HostEvents.ts +20 -0
- package/build/templates/mvc/src/host/generated/HostServices.ts +8 -0
- package/build/templates/mvc/src/host/host-events.ts +22 -0
- package/build/templates/mvc/src/host/host-services.ts +17 -0
- package/build/templates/mvc/src/routes/mvc/pages/home/HomeController.ts +55 -0
- package/build/templates/mvc/src/routes/mvc/pages/home/HomeModel.ts +8 -0
- package/build/templates/mvc/src/routes/mvc/pages/home/HomeView.ts +76 -0
- package/build/templates/mvc/src/routes/mvc/pages/settings/SettingsController.ts +27 -0
- package/build/templates/mvc/src/routes/mvc/pages/settings/SettingsModel.ts +6 -0
- package/build/templates/mvc/src/routes/mvc/pages/settings/SettingsView.ts +61 -0
- package/build/templates/mvc/src/routes/mvc/shared/design-system/MvcNavPill.ts +42 -0
- package/build/templates/mvc/src/routes/mvc/shared/design-system/MvcPrimaryButton.ts +19 -0
- package/build/templates/mvc/src/routes/mvc/shared/routes.ts +22 -0
- package/build/templates/mvc/src/routes/mvc_home.ts +20 -0
- package/build/templates/mvc/src/routes/mvc_settings.ts +20 -0
- package/build/templates/mvc/tsconfig.json +9 -0
- package/dist/scripts/sync-templates.d.ts +1 -0
- package/dist/scripts/sync-templates.js +297 -0
- package/dist/src/scaffold.d.ts +2 -0
- package/dist/src/scaffold.js +50 -5
- package/dist/src/templates.d.ts +2 -1
- package/dist/src/templates.js +39 -228
- package/dist/src/versions.d.ts +1 -1
- package/dist/src/versions.js +1 -1
- package/dist/tests/scaffold.test.js +32 -0
- package/package.json +6 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Generated from the scaffold host-services definition.
|
|
2
|
+
|
|
3
|
+
@external("fui_host_service", "appClockNowUnixSeconds")
|
|
4
|
+
declare function __host_appClockNowUnixSeconds(): i32;
|
|
5
|
+
|
|
6
|
+
export function appClockNowUnixSeconds(): i32 {
|
|
7
|
+
return __host_appClockNowUnixSeconds();
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineHostEvents, hostEvent } from "../fui/FuiBrowser";
|
|
2
|
+
|
|
3
|
+
function nowUnixSeconds(): number {
|
|
4
|
+
return Math.floor(Date.now() / 1000);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const appHostEvents = defineHostEvents({
|
|
8
|
+
// Example host event for scaffolded apps:
|
|
9
|
+
// push a timer tick from browser host into AssemblyScript.
|
|
10
|
+
appClock: {
|
|
11
|
+
tick: hostEvent({
|
|
12
|
+
args: ["i32"],
|
|
13
|
+
subscribe: (emit) => {
|
|
14
|
+
emit(nowUnixSeconds());
|
|
15
|
+
const timer = setInterval(() => {
|
|
16
|
+
emit(nowUnixSeconds());
|
|
17
|
+
}, 1000);
|
|
18
|
+
return () => clearInterval(timer);
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineHostServices, hostService } from "../fui/FuiBrowser";
|
|
2
|
+
|
|
3
|
+
function nowUnixSeconds(): number {
|
|
4
|
+
return Math.floor(Date.now() / 1000);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const appHostServices = defineHostServices({
|
|
8
|
+
// Example host service for scaffolded apps:
|
|
9
|
+
// fetch a scalar value on demand from the browser host.
|
|
10
|
+
appClock: {
|
|
11
|
+
nowUnixSeconds: hostService({
|
|
12
|
+
args: [],
|
|
13
|
+
returns: "i32",
|
|
14
|
+
implementation: (): number => nowUnixSeconds(),
|
|
15
|
+
}),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Application, Node } from "../../../../fui/Fui";
|
|
2
|
+
import { Callback1 } from "../../../../fui/FuiPrimitives";
|
|
3
|
+
import { onAppClockTick } from "../../../../host/generated/HostEvents";
|
|
4
|
+
import { appClockNowUnixSeconds } from "../../../../host/generated/HostServices";
|
|
5
|
+
import { HomeModel } from "./HomeModel";
|
|
6
|
+
import { HomeView } from "./HomeView";
|
|
7
|
+
|
|
8
|
+
class ClockTickHandler extends Callback1<i32> {
|
|
9
|
+
private readonly controller: HomeController;
|
|
10
|
+
|
|
11
|
+
constructor(controller: HomeController) {
|
|
12
|
+
super();
|
|
13
|
+
this.controller = controller;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
invoke(value: i32): void {
|
|
17
|
+
this.controller.model.hostEventSeconds = value;
|
|
18
|
+
this.controller.view.setHostEventSeconds(value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class HomeController {
|
|
23
|
+
readonly model: HomeModel = new HomeModel();
|
|
24
|
+
readonly view: HomeView = new HomeView(this.model);
|
|
25
|
+
private readonly clockTickHandler: ClockTickHandler = new ClockTickHandler(this);
|
|
26
|
+
|
|
27
|
+
constructor() {
|
|
28
|
+
this.view.actionButton.onClickWith(this, (controller) => {
|
|
29
|
+
controller.model.actionCount += 1;
|
|
30
|
+
controller.view.setActionCount(controller.model.actionCount);
|
|
31
|
+
controller.refreshHostServiceTime();
|
|
32
|
+
});
|
|
33
|
+
onAppClockTick(this.clockTickHandler);
|
|
34
|
+
this.refreshHostServiceTime();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private refreshHostServiceTime(): void {
|
|
38
|
+
const seconds = appClockNowUnixSeconds();
|
|
39
|
+
this.model.hostServiceSeconds = seconds;
|
|
40
|
+
this.view.setHostServiceSeconds(seconds);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
getRoot(): Node {
|
|
44
|
+
return this.view.getRoot();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
mount(): void {
|
|
48
|
+
Application.mount(this.view.getRoot());
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
dispose(): void {
|
|
52
|
+
onAppClockTick(null);
|
|
53
|
+
Application.unmount();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export class HomeModel {
|
|
2
|
+
actionCount: i32 = 0;
|
|
3
|
+
hostServiceSeconds: i32 = 0;
|
|
4
|
+
hostEventSeconds: i32 = 0;
|
|
5
|
+
readonly title: string = "Home page";
|
|
6
|
+
readonly subtitle: string = "Page-level MVC sample. Use the header pills to navigate.";
|
|
7
|
+
readonly actionLabel: string = "Increment home counter";
|
|
8
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Column, FlexBox, JustifyContent, Row, SelectionArea, Text, Unit, rgb } from "../../../../fui/Fui";
|
|
2
|
+
import { MvcNavPill } from "../../shared/design-system/MvcNavPill";
|
|
3
|
+
import { MvcPrimaryButton } from "../../shared/design-system/MvcPrimaryButton";
|
|
4
|
+
import { mvcHomeRoute, mvcSettingsRoute } from "../../shared/routes";
|
|
5
|
+
import { HomeModel } from "./HomeModel";
|
|
6
|
+
|
|
7
|
+
function navSpacer(): FlexBox {
|
|
8
|
+
return new FlexBox().width(10.0, Unit.Pixel).height(1.0, Unit.Pixel);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class HomeView {
|
|
12
|
+
readonly actionButton: MvcPrimaryButton;
|
|
13
|
+
private readonly statusText: Text;
|
|
14
|
+
private readonly hostServiceText: Text;
|
|
15
|
+
private readonly hostEventText: Text;
|
|
16
|
+
private readonly root!: SelectionArea;
|
|
17
|
+
|
|
18
|
+
constructor(model: HomeModel) {
|
|
19
|
+
const homePill = new MvcNavPill(mvcHomeRoute(), "Home").active(true);
|
|
20
|
+
const settingsPill = new MvcNavPill(mvcSettingsRoute(), "Settings").active(false);
|
|
21
|
+
|
|
22
|
+
const navBar = Row()
|
|
23
|
+
.width(100.0, Unit.Percent)
|
|
24
|
+
.justifyContent(JustifyContent.End)
|
|
25
|
+
.child(homePill)
|
|
26
|
+
.child(navSpacer())
|
|
27
|
+
.child(settingsPill);
|
|
28
|
+
|
|
29
|
+
const title = new Text(model.title).fontSize(34.0).textColor(rgb(241, 245, 249)) as Text;
|
|
30
|
+
const subtitle = new Text(model.subtitle).fontSize(16.0).textColor(rgb(148, 163, 184)) as Text;
|
|
31
|
+
this.statusText = new Text("Home counter: 0").fontSize(18.0).textColor(rgb(147, 197, 253)) as Text;
|
|
32
|
+
this.hostServiceText = new Text("Host service time: -").fontSize(15.0).textColor(rgb(191, 219, 254)) as Text;
|
|
33
|
+
this.hostEventText = new Text("Host event tick: -").fontSize(15.0).textColor(rgb(134, 239, 172)) as Text;
|
|
34
|
+
this.actionButton = new MvcPrimaryButton(model.actionLabel);
|
|
35
|
+
|
|
36
|
+
const content = Column(
|
|
37
|
+
navBar,
|
|
38
|
+
new FlexBox().height(24.0, Unit.Pixel),
|
|
39
|
+
title,
|
|
40
|
+
new FlexBox().height(12.0, Unit.Pixel),
|
|
41
|
+
subtitle,
|
|
42
|
+
new FlexBox().height(20.0, Unit.Pixel),
|
|
43
|
+
this.statusText,
|
|
44
|
+
new FlexBox().height(10.0, Unit.Pixel),
|
|
45
|
+
this.hostServiceText,
|
|
46
|
+
this.hostEventText,
|
|
47
|
+
new FlexBox().height(16.0, Unit.Pixel),
|
|
48
|
+
this.actionButton,
|
|
49
|
+
)
|
|
50
|
+
.width(100.0, Unit.Percent)
|
|
51
|
+
.height(100.0, Unit.Percent)
|
|
52
|
+
.padding(24.0, 24.0, 24.0, 24.0);
|
|
53
|
+
|
|
54
|
+
this.root = new SelectionArea()
|
|
55
|
+
.fillWidth()
|
|
56
|
+
.fillHeight()
|
|
57
|
+
.bgColor(rgb(2, 6, 23))
|
|
58
|
+
.child(content) as SelectionArea;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
getRoot(): SelectionArea {
|
|
62
|
+
return this.root;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
setActionCount(count: i32): void {
|
|
66
|
+
this.statusText.text("Home counter: " + count.toString());
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
setHostServiceSeconds(value: i32): void {
|
|
70
|
+
this.hostServiceText.text("Host service time: " + value.toString());
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
setHostEventSeconds(value: i32): void {
|
|
74
|
+
this.hostEventText.text("Host event tick: " + value.toString());
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Application, Node } from "../../../../fui/Fui";
|
|
2
|
+
import { SettingsModel } from "./SettingsModel";
|
|
3
|
+
import { SettingsView } from "./SettingsView";
|
|
4
|
+
|
|
5
|
+
export class SettingsController {
|
|
6
|
+
readonly model: SettingsModel = new SettingsModel();
|
|
7
|
+
readonly view: SettingsView = new SettingsView(this.model);
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
this.view.actionButton.onClickWith(this, (controller) => {
|
|
11
|
+
controller.model.saveCount += 1;
|
|
12
|
+
controller.view.setSaveCount(controller.model.saveCount);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
getRoot(): Node {
|
|
17
|
+
return this.view.getRoot();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
mount(): void {
|
|
21
|
+
Application.mount(this.view.getRoot());
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
dispose(): void {
|
|
25
|
+
Application.unmount();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Column, FlexBox, JustifyContent, Row, SelectionArea, Text, Unit, rgb } from "../../../../fui/Fui";
|
|
2
|
+
import { MvcNavPill } from "../../shared/design-system/MvcNavPill";
|
|
3
|
+
import { MvcPrimaryButton } from "../../shared/design-system/MvcPrimaryButton";
|
|
4
|
+
import { mvcHomeRoute, mvcSettingsRoute } from "../../shared/routes";
|
|
5
|
+
import { SettingsModel } from "./SettingsModel";
|
|
6
|
+
|
|
7
|
+
function navSpacer(): FlexBox {
|
|
8
|
+
return new FlexBox().width(10.0, Unit.Pixel).height(1.0, Unit.Pixel);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class SettingsView {
|
|
12
|
+
readonly actionButton: MvcPrimaryButton;
|
|
13
|
+
private readonly statusText: Text;
|
|
14
|
+
private readonly root!: SelectionArea;
|
|
15
|
+
|
|
16
|
+
constructor(model: SettingsModel) {
|
|
17
|
+
const homePill = new MvcNavPill(mvcHomeRoute(), "Home").active(false);
|
|
18
|
+
const settingsPill = new MvcNavPill(mvcSettingsRoute(), "Settings").active(true);
|
|
19
|
+
|
|
20
|
+
const navBar = Row()
|
|
21
|
+
.width(100.0, Unit.Percent)
|
|
22
|
+
.justifyContent(JustifyContent.End)
|
|
23
|
+
.child(homePill)
|
|
24
|
+
.child(navSpacer())
|
|
25
|
+
.child(settingsPill);
|
|
26
|
+
|
|
27
|
+
const title = new Text(model.title).fontSize(34.0).textColor(rgb(241, 245, 249)) as Text;
|
|
28
|
+
const subtitle = new Text(model.subtitle).fontSize(16.0).textColor(rgb(148, 163, 184)) as Text;
|
|
29
|
+
this.statusText = new Text("Settings saved: 0").fontSize(18.0).textColor(rgb(134, 239, 172)) as Text;
|
|
30
|
+
this.actionButton = new MvcPrimaryButton(model.actionLabel);
|
|
31
|
+
|
|
32
|
+
const content = Column(
|
|
33
|
+
navBar,
|
|
34
|
+
new FlexBox().height(24.0, Unit.Pixel),
|
|
35
|
+
title,
|
|
36
|
+
new FlexBox().height(12.0, Unit.Pixel),
|
|
37
|
+
subtitle,
|
|
38
|
+
new FlexBox().height(20.0, Unit.Pixel),
|
|
39
|
+
this.statusText,
|
|
40
|
+
new FlexBox().height(16.0, Unit.Pixel),
|
|
41
|
+
this.actionButton,
|
|
42
|
+
)
|
|
43
|
+
.width(100.0, Unit.Percent)
|
|
44
|
+
.height(100.0, Unit.Percent)
|
|
45
|
+
.padding(24.0, 24.0, 24.0, 24.0);
|
|
46
|
+
|
|
47
|
+
this.root = new SelectionArea()
|
|
48
|
+
.fillWidth()
|
|
49
|
+
.fillHeight()
|
|
50
|
+
.bgColor(rgb(2, 6, 23))
|
|
51
|
+
.child(content) as SelectionArea;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
getRoot(): SelectionArea {
|
|
55
|
+
return this.root;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
setSaveCount(count: i32): void {
|
|
59
|
+
this.statusText.text("Settings saved: " + count.toString());
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { NavLink, Text, rgb } from "../../../../fui/Fui";
|
|
2
|
+
|
|
3
|
+
const PILL_RADIUS: f32 = 999.0;
|
|
4
|
+
const PILL_PADDING_X: f32 = 16.0;
|
|
5
|
+
const PILL_PADDING_Y: f32 = 8.0;
|
|
6
|
+
const PILL_INACTIVE_BG: u32 = rgb(33, 45, 67);
|
|
7
|
+
const PILL_ACTIVE_BG: u32 = rgb(34, 197, 94);
|
|
8
|
+
const PILL_INACTIVE_TEXT: u32 = rgb(226, 232, 240);
|
|
9
|
+
const PILL_ACTIVE_TEXT: u32 = rgb(12, 16, 24);
|
|
10
|
+
|
|
11
|
+
export class MvcNavPill extends NavLink {
|
|
12
|
+
private readonly labelNode: Text;
|
|
13
|
+
private activeValue: bool = false;
|
|
14
|
+
|
|
15
|
+
constructor(href: string, label: string) {
|
|
16
|
+
super(href, label, false);
|
|
17
|
+
this.labelNode = new Text(label)
|
|
18
|
+
.fontSize(14.0)
|
|
19
|
+
.selectable(false) as Text;
|
|
20
|
+
this
|
|
21
|
+
.cornerRadius(PILL_RADIUS)
|
|
22
|
+
.padding(PILL_PADDING_X, PILL_PADDING_Y, PILL_PADDING_X, PILL_PADDING_Y)
|
|
23
|
+
.child(this.labelNode);
|
|
24
|
+
this.applyVisualState();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
active(flag: bool = true): this {
|
|
28
|
+
this.activeValue = flag;
|
|
29
|
+
this.applyVisualState();
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private applyVisualState(): void {
|
|
34
|
+
if (this.activeValue) {
|
|
35
|
+
this.bgColor(PILL_ACTIVE_BG);
|
|
36
|
+
this.labelNode.textColor(PILL_ACTIVE_TEXT);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.bgColor(PILL_INACTIVE_BG);
|
|
40
|
+
this.labelNode.textColor(PILL_INACTIVE_TEXT);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button, rgb } from "../../../../fui/Fui";
|
|
2
|
+
|
|
3
|
+
const BUTTON_RADIUS: f32 = 12.0;
|
|
4
|
+
const BUTTON_PADDING_X: f32 = 18.0;
|
|
5
|
+
const BUTTON_PADDING_Y: f32 = 10.0;
|
|
6
|
+
const BUTTON_BG: u32 = rgb(59, 130, 246);
|
|
7
|
+
const BUTTON_TEXT: u32 = rgb(241, 245, 249);
|
|
8
|
+
|
|
9
|
+
export class MvcPrimaryButton extends Button {
|
|
10
|
+
constructor(label: string) {
|
|
11
|
+
super(label);
|
|
12
|
+
this
|
|
13
|
+
.cornerRadius(BUTTON_RADIUS)
|
|
14
|
+
.padding(BUTTON_PADDING_X, BUTTON_PADDING_Y, BUTTON_PADDING_X, BUTTON_PADDING_Y)
|
|
15
|
+
.bgColor(BUTTON_BG)
|
|
16
|
+
.textColor(BUTTON_TEXT)
|
|
17
|
+
.fontSize(14.0);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { currentRoute } from "../../../fui/Fui";
|
|
2
|
+
|
|
3
|
+
const SOURCE_DEMO_BASE: string = "/v2/fui-as/demo-mvc";
|
|
4
|
+
const SOURCE_HOME_ROUTE: string = "/v2/fui-as/demo-mvc/mvc-home/";
|
|
5
|
+
const SOURCE_SETTINGS_ROUTE: string = "/v2/fui-as/demo-mvc/mvc-settings/";
|
|
6
|
+
const PUBLISHED_HOME_ROUTE: string = "/mvc-home/";
|
|
7
|
+
const PUBLISHED_SETTINGS_ROUTE: string = "/mvc-settings/";
|
|
8
|
+
|
|
9
|
+
function isSourceDemoRoute(route: string): bool {
|
|
10
|
+
if (route.length == 0) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return route.startsWith(SOURCE_DEMO_BASE);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function mvcHomeRoute(): string {
|
|
17
|
+
return isSourceDemoRoute(currentRoute.value) ? SOURCE_HOME_ROUTE : PUBLISHED_HOME_ROUTE;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function mvcSettingsRoute(): string {
|
|
21
|
+
return isSourceDemoRoute(currentRoute.value) ? SOURCE_SETTINGS_ROUTE : PUBLISHED_SETTINGS_ROUTE;
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "../fui/FuiExports";
|
|
2
|
+
export * from "../host/generated/HostEvents";
|
|
3
|
+
|
|
4
|
+
import { Node, createManagedApplication } from "../fui/Fui";
|
|
5
|
+
import { HomeController } from "./mvc/pages/home/HomeController";
|
|
6
|
+
|
|
7
|
+
const app = createManagedApplication<HomeController>(
|
|
8
|
+
() => new HomeController(),
|
|
9
|
+
(controller): Node => controller.getRoot(),
|
|
10
|
+
(controller): void => controller.mount(),
|
|
11
|
+
(controller): void => controller.dispose(),
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
export function __runApp(): void {
|
|
15
|
+
app.run();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function __disposeApp(): void {
|
|
19
|
+
app.dispose();
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "../fui/FuiExports";
|
|
2
|
+
export * from "../host/generated/HostEvents";
|
|
3
|
+
|
|
4
|
+
import { Node, createManagedApplication } from "../fui/Fui";
|
|
5
|
+
import { SettingsController } from "./mvc/pages/settings/SettingsController";
|
|
6
|
+
|
|
7
|
+
const app = createManagedApplication<SettingsController>(
|
|
8
|
+
() => new SettingsController(),
|
|
9
|
+
(controller): Node => controller.getRoot(),
|
|
10
|
+
(controller): void => controller.mount(),
|
|
11
|
+
(controller): void => controller.dispose(),
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
export function __runApp(): void {
|
|
15
|
+
app.run();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function __disposeApp(): void {
|
|
19
|
+
app.dispose();
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|