Init
#
@furo/furo-framework v2.4.11
import '@furo/framework/src/system.js';
exports Init js
exports Sys js
The init class is used to init your Env, the API services and the API types.
Use the init package in the init phase of your application
example init
#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// -- initialize application env, theme, api
import {Init,Iconset} from "@furo/framework/src/furo.js";
import {Services, Types} from "@furo/specs/build/data_environment.js"
Init.registerApiServices(Services);
Init.registerApiTypes(Types);
//Attention: Styling is defined in main-stage
import {FuroBaseIcons} from "@furo/icon/assets/iconsets/baseIcons";
import {MapsIcons} from "@furo/icon/assets/iconsets/mapsIcons";
import {PlacesIcons} from "@furo/icon/assets/iconsets/placesIcons";
import {CommunicationIcons} from "@furo/icon/assets/iconsets/communicationIcons";
import {NotificationIcons} from "@furo/icon/assets/iconsets/notificationIcons";
import {FuroDocIcons} from "./assets/iconset";
import {AvIcons} from "@furo/icon/assets/iconsets/avIcons";
import {DeviceIcons} from "@furo/icon/assets/iconsets/deviceIcons";
import {EditorIcons} from "@furo/icon/assets/iconsets/editorIcons";
import {SocialIcons} from "@furo/icon/assets/iconsets/socialIcons";
import {HardwareIcons} from "@furo/icon/assets/iconsets/hardwareIcons";
import {ImageIcons} from "@furo/icon/assets/iconsets/imageIcons";
Iconset.registerIconset("furo", FuroDocIcons);
Iconset.registerIconset("default", FuroBaseIcons);
Iconset.registerIconset("av", AvIcons);
Iconset.registerIconset("communication", CommunicationIcons);
Iconset.registerIconset("device", DeviceIcons);
Iconset.registerIconset("editor", EditorIcons);
Iconset.registerIconset("social", SocialIcons);
Iconset.registerIconset("places", PlacesIcons);
Iconset.registerIconset("notification", NotificationIcons);
Iconset.registerIconset("map", MapsIcons);
Iconset.registerIconset("hardware", HardwareIcons);
Iconset.registerIconset("image", ImageIcons);
|
Attributes and Properties
#
Methods
#
registerEnv
#
registerEnv(section *data*
) ⟹ void
registerApiServices
#
registerApiServices(services `` ) ⟹ void
registerApiTypes
#
registerApiTypes(types `` ) ⟹ void
registerCustomValidator
#
registerCustomValidator(typename String
ValidatorClass Class
) ⟹ void
Register a validator for a specific type.
addApiTypeSpec
#
addApiTypeSpec(typename *spec*
) ⟹ void
Add a single type spec to the registry
Attention: If the name already exist, the old entry is overwritten.
addApiServiceSpec
#
addApiServiceSpec(servicename *spec*
) ⟹ void
Add a single service spec to the registry
Attention: If the name already exist, the old entry is overwritten.
applyCustomApiPrefixToServicesAndTypes
#
applyCustomApiPrefixToServicesAndTypes(prefix `` ) ⟹ void
Apply the prefix to all service deeplinks and to all furo.Reference types with defaults
translateStaticTypeMessages
#
translateStaticTypeMessages() ⟹ void
Translates spec content like meta.label, hints