fhdp-fh-starter 4.10.401 → 4.10.901
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/FhApplication.ts +367 -367
- package/Module.ts +4 -4
- package/README.md +67 -67
- package/cached-package.json +1 -1
- package/dist/FhApplication.d.ts +126 -126
- package/dist/FhApplication.js +287 -287
- package/dist/FhApplication.js.map +1 -1
- package/dist/Module.d.ts +2 -2
- package/dist/Module.js +5 -5
- package/package.json +22 -13
- package/postpublish.js +15 -15
- package/prepublish.js +15 -15
- package/tsconfig.json +18 -18
package/Module.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {FhApplication} from './FhApplication';
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
FhApplication
|
|
1
|
+
import {FhApplication} from './FhApplication';
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
FhApplication
|
|
5
5
|
}
|
package/README.md
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
# QuickStart!
|
|
2
|
-
|
|
3
|
-
## Example use:
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
const fhInstance = FhApplication.getInstance({
|
|
7
|
-
registerStandardModules: true,
|
|
8
|
-
registerChartsControls: true,
|
|
9
|
-
registerFhDPControls: true,
|
|
10
|
-
extensionsConfig: {
|
|
11
|
-
extendFHML: true
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
fhInstance.init();
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Example use in portlet:
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
const localPumaWsURL = 'ws://localhost:8090/socketForms';
|
|
22
|
-
const fhInstance = FhApplication.getInstance({
|
|
23
|
-
registerStandardModules: true,
|
|
24
|
-
registerChartsControls: true,
|
|
25
|
-
registerFhDPControls: true,
|
|
26
|
-
extensionsConfig: {
|
|
27
|
-
extendFHML: true
|
|
28
|
-
},
|
|
29
|
-
liferay: {
|
|
30
|
-
enabled: true,
|
|
31
|
-
fhBaseUrl,
|
|
32
|
-
fhContextPath,
|
|
33
|
-
localPumaWsURL,
|
|
34
|
-
Liferay
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
fhInstance.init();
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Values `fhBaseUrl`, `fhContextPath` and `Liferay` should be provided from template jsp file, and defined at the top as:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
declare const Liferay: any;
|
|
45
|
-
declare const fhBaseUrl: string;
|
|
46
|
-
declare const fhContextPath: string;
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Additional info
|
|
50
|
-
|
|
51
|
-
1. Type `extensionsConfig` is provided by library `fhdp-extenders`.
|
|
52
|
-
2. This package contains the latest versions of fh components, fhdp-components and fdhp-extenders, if you're including this package you don't have need to including them.
|
|
53
|
-
|
|
54
|
-
## Versions table:
|
|
55
|
-
|
|
56
|
-
| fhdp-fh-starter version | lib name | included version |
|
|
57
|
-
|:------------------------:|:------------------|:----------------:|
|
|
58
|
-
| v.18.0.0 - v.18.0.11 | fh-basic-controls | 4.6.25-test2 |
|
|
59
|
-
| | fh-charts-controls| 4.6.25 |
|
|
60
|
-
| | fh-designer | 4.6.25 |
|
|
61
|
-
| | fh-forms-handler | 4.6.25 |
|
|
62
|
-
| | fh-maps-controls | 4.6.25 |
|
|
63
|
-
| | fh-printer-agent | 4.6.25 |
|
|
64
|
-
| | fh-sensors | 4.6.25 |
|
|
65
|
-
| | fhdp-controls | 18.1.3 |
|
|
66
|
-
| | fhdp-extenders | 18.0.4 |
|
|
67
|
-
|--------------------------|-------------------|------------------|
|
|
1
|
+
# QuickStart!
|
|
2
|
+
|
|
3
|
+
## Example use:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
const fhInstance = FhApplication.getInstance({
|
|
7
|
+
registerStandardModules: true,
|
|
8
|
+
registerChartsControls: true,
|
|
9
|
+
registerFhDPControls: true,
|
|
10
|
+
extensionsConfig: {
|
|
11
|
+
extendFHML: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
fhInstance.init();
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Example use in portlet:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
const localPumaWsURL = 'ws://localhost:8090/socketForms';
|
|
22
|
+
const fhInstance = FhApplication.getInstance({
|
|
23
|
+
registerStandardModules: true,
|
|
24
|
+
registerChartsControls: true,
|
|
25
|
+
registerFhDPControls: true,
|
|
26
|
+
extensionsConfig: {
|
|
27
|
+
extendFHML: true
|
|
28
|
+
},
|
|
29
|
+
liferay: {
|
|
30
|
+
enabled: true,
|
|
31
|
+
fhBaseUrl,
|
|
32
|
+
fhContextPath,
|
|
33
|
+
localPumaWsURL,
|
|
34
|
+
Liferay
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
fhInstance.init();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Values `fhBaseUrl`, `fhContextPath` and `Liferay` should be provided from template jsp file, and defined at the top as:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
declare const Liferay: any;
|
|
45
|
+
declare const fhBaseUrl: string;
|
|
46
|
+
declare const fhContextPath: string;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Additional info
|
|
50
|
+
|
|
51
|
+
1. Type `extensionsConfig` is provided by library `fhdp-extenders`.
|
|
52
|
+
2. This package contains the latest versions of fh components, fhdp-components and fdhp-extenders, if you're including this package you don't have need to including them.
|
|
53
|
+
|
|
54
|
+
## Versions table:
|
|
55
|
+
|
|
56
|
+
| fhdp-fh-starter version | lib name | included version |
|
|
57
|
+
|:------------------------:|:------------------|:----------------:|
|
|
58
|
+
| v.18.0.0 - v.18.0.11 | fh-basic-controls | 4.6.25-test2 |
|
|
59
|
+
| | fh-charts-controls| 4.6.25 |
|
|
60
|
+
| | fh-designer | 4.6.25 |
|
|
61
|
+
| | fh-forms-handler | 4.6.25 |
|
|
62
|
+
| | fh-maps-controls | 4.6.25 |
|
|
63
|
+
| | fh-printer-agent | 4.6.25 |
|
|
64
|
+
| | fh-sensors | 4.6.25 |
|
|
65
|
+
| | fhdp-controls | 18.1.3 |
|
|
66
|
+
| | fhdp-extenders | 18.0.4 |
|
|
67
|
+
|--------------------------|-------------------|------------------|
|
package/cached-package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"fhdp-fh-starter","version":"4.10.
|
|
1
|
+
{"name":"fhdp-fh-starter","version":"4.10.901","author":"AssecoPL","contributors":[{"name":"Jacek Borowiec","email":"jacek.borowiec@asseco.pl"},{"name":"Paweł Domański","email":"pawel.domanski@asseco.pl"}],"license":"Apache License 2.0","description":"Configurable starter for asseco/fh","main":"dist/Module.js","types":"dist/Module.d.ts","scripts":{"prepublishOnly":"node prepublish","postpublish":"node postpublish","build":"tsc","docgen":"npx typedoc ./FhApplication.ts","prepare":"yarn build","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"@types/bootstrap":"4.3.1","@types/jquery":"3.3.31","@types/node":"14.14.36","@types/jqueryui":"1.12.10","typedoc":"0.24.7","typescript":"5.0.4"},"dependencies":{"fh-basic-controls":"4.10.901","fh-charts-controls":"4.10.901","fh-forms-handler":"4.10.901","fhdp-controls":"4.10.901","fhdp-extenders":"4.10.901"}}
|
package/dist/FhApplication.d.ts
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import "reflect-metadata";
|
|
2
|
-
import { Connector, FhModule } from "fh-forms-handler";
|
|
3
|
-
import { DynamicRelocatorExclusionRule, DynamicRelocatorExtensionRule } from 'fhdp-extenders';
|
|
4
|
-
export interface LiferayConfig {
|
|
5
|
-
/** Defines if liferay is enabled or not */
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
/** Local websocket addres For debug */
|
|
8
|
-
localPumaWsURL: string;
|
|
9
|
-
/** Remote websocket address */
|
|
10
|
-
fhBaseUrl: string;
|
|
11
|
-
/** Remote context path */
|
|
12
|
-
fhContextPath: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ExtenderConfig {
|
|
15
|
-
extendFHML?: boolean;
|
|
16
|
-
mobileMaxWidth?: number;
|
|
17
|
-
enableMobileNavbar?: boolean;
|
|
18
|
-
enableErrorBelowField?: boolean;
|
|
19
|
-
enableDynamicFooterPosition?: boolean;
|
|
20
|
-
enableCurrentMenuElementHighlight?: boolean;
|
|
21
|
-
currentMenuElementHighlighBottomBorderStyle?: string;
|
|
22
|
-
enableFHMLinTooltips?: boolean;
|
|
23
|
-
enableSessionCounterRules?: boolean;
|
|
24
|
-
enableCookieAlert?: boolean;
|
|
25
|
-
additionalRules?: Array<DynamicRelocatorExclusionRule | DynamicRelocatorExtensionRule>;
|
|
26
|
-
}
|
|
27
|
-
export interface FhApplicationConfig {
|
|
28
|
-
/** Defines registration of standard modules (FormsHandler and BasicControls) */
|
|
29
|
-
registerStandardModules?: boolean;
|
|
30
|
-
/** Defines registration of Charts module */
|
|
31
|
-
registerChartsControls?: boolean;
|
|
32
|
-
/** Defines registration of FHDP controls module*/
|
|
33
|
-
registerFHDPControls?: boolean;
|
|
34
|
-
/** Defines registration of additional modules*/
|
|
35
|
-
additionalModules?: ({
|
|
36
|
-
new (): FhModule;
|
|
37
|
-
})[];
|
|
38
|
-
/** Defines translations for connection lost message Default contains messages for polish and english languages */
|
|
39
|
-
connectionLostTranslations?: {
|
|
40
|
-
[key: string]: string;
|
|
41
|
-
};
|
|
42
|
-
/** Defines config for liferay If empty it will act as normal application */
|
|
43
|
-
liferay?: LiferayConfig;
|
|
44
|
-
/** Defines config for FHDPExtender If empty it will act as normal fh app without extensions */
|
|
45
|
-
extensionsConfig?: ExtenderConfig;
|
|
46
|
-
}
|
|
47
|
-
declare class FhApplication {
|
|
48
|
-
/** Instance of FhApplication */
|
|
49
|
-
private static __instance;
|
|
50
|
-
/** Current config */
|
|
51
|
-
private __config;
|
|
52
|
-
/** Instance of Liferay config */
|
|
53
|
-
private __liferay?;
|
|
54
|
-
/** Instance of connector */
|
|
55
|
-
private __connector?;
|
|
56
|
-
/**
|
|
57
|
-
* Private and used internally
|
|
58
|
-
* @param config main configuration
|
|
59
|
-
*/
|
|
60
|
-
private constructor();
|
|
61
|
-
/**
|
|
62
|
-
* At first use must be called with `config` param, to properly init instance
|
|
63
|
-
* Later uses can be without param, and it will return same instance as one inited at begin
|
|
64
|
-
* @param config main configuration
|
|
65
|
-
*/
|
|
66
|
-
static getInstance(config?: FhApplicationConfig): FhApplication;
|
|
67
|
-
/**
|
|
68
|
-
* Getter for connection lost translations
|
|
69
|
-
*/
|
|
70
|
-
private get currentConnectionLostTranslation();
|
|
71
|
-
private isJSON;
|
|
72
|
-
/**
|
|
73
|
-
* Getter for connector;
|
|
74
|
-
* @returns Connector
|
|
75
|
-
*/
|
|
76
|
-
getConnector(): Connector;
|
|
77
|
-
/**
|
|
78
|
-
* Registers new module Its alternative function to config node `additionalModules`
|
|
79
|
-
* @param module an module that will be registered in fh app
|
|
80
|
-
*/
|
|
81
|
-
registerModule(module: {
|
|
82
|
-
new (): FhModule;
|
|
83
|
-
}): void;
|
|
84
|
-
/**
|
|
85
|
-
* Registers callback for backend calls
|
|
86
|
-
* @param name callback name (key)
|
|
87
|
-
* @param callback actual callback function
|
|
88
|
-
*/
|
|
89
|
-
registerCallback(name: string, callback: (...args: any[]) => void): Error;
|
|
90
|
-
/**
|
|
91
|
-
* Function for initialise extenders
|
|
92
|
-
*/
|
|
93
|
-
private initExtenders;
|
|
94
|
-
/**
|
|
95
|
-
* Adds translation string
|
|
96
|
-
*/
|
|
97
|
-
addTranslation(lang: any, key: any, translation: any): void;
|
|
98
|
-
/**
|
|
99
|
-
* get translation string
|
|
100
|
-
*/
|
|
101
|
-
translate(key: any, args: any): string;
|
|
102
|
-
/**
|
|
103
|
-
* Initialise translations for connection lost
|
|
104
|
-
*/
|
|
105
|
-
private initConnectionLostTranslations;
|
|
106
|
-
/**
|
|
107
|
-
* Main init function
|
|
108
|
-
* @param context app context for sockets Default 'socketForms'
|
|
109
|
-
*/
|
|
110
|
-
init(context?: string): void;
|
|
111
|
-
/**
|
|
112
|
-
* Edits classlist of element provided by id
|
|
113
|
-
* @param id Id of DOM element
|
|
114
|
-
* @param remove class name that should be removed from element
|
|
115
|
-
* @param add class name that should be added in element
|
|
116
|
-
*/
|
|
117
|
-
createCallbackById(id: string, remove?: string, add?: string): void;
|
|
118
|
-
/**
|
|
119
|
-
* Edits classlist of element wrapper provided by id
|
|
120
|
-
* @param id Id of DOM element
|
|
121
|
-
* @param remove class name that should be removed from element wrapper
|
|
122
|
-
* @param add class name that should be added in element wrapper
|
|
123
|
-
*/
|
|
124
|
-
createCallbackByWrapper(id: string, remove?: string, add?: string): void;
|
|
125
|
-
}
|
|
126
|
-
export { FhApplication };
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { Connector, FhModule } from "fh-forms-handler";
|
|
3
|
+
import { DynamicRelocatorExclusionRule, DynamicRelocatorExtensionRule } from 'fhdp-extenders';
|
|
4
|
+
export interface LiferayConfig {
|
|
5
|
+
/** Defines if liferay is enabled or not */
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
/** Local websocket addres For debug */
|
|
8
|
+
localPumaWsURL: string;
|
|
9
|
+
/** Remote websocket address */
|
|
10
|
+
fhBaseUrl: string;
|
|
11
|
+
/** Remote context path */
|
|
12
|
+
fhContextPath: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ExtenderConfig {
|
|
15
|
+
extendFHML?: boolean;
|
|
16
|
+
mobileMaxWidth?: number;
|
|
17
|
+
enableMobileNavbar?: boolean;
|
|
18
|
+
enableErrorBelowField?: boolean;
|
|
19
|
+
enableDynamicFooterPosition?: boolean;
|
|
20
|
+
enableCurrentMenuElementHighlight?: boolean;
|
|
21
|
+
currentMenuElementHighlighBottomBorderStyle?: string;
|
|
22
|
+
enableFHMLinTooltips?: boolean;
|
|
23
|
+
enableSessionCounterRules?: boolean;
|
|
24
|
+
enableCookieAlert?: boolean;
|
|
25
|
+
additionalRules?: Array<DynamicRelocatorExclusionRule | DynamicRelocatorExtensionRule>;
|
|
26
|
+
}
|
|
27
|
+
export interface FhApplicationConfig {
|
|
28
|
+
/** Defines registration of standard modules (FormsHandler and BasicControls) */
|
|
29
|
+
registerStandardModules?: boolean;
|
|
30
|
+
/** Defines registration of Charts module */
|
|
31
|
+
registerChartsControls?: boolean;
|
|
32
|
+
/** Defines registration of FHDP controls module*/
|
|
33
|
+
registerFHDPControls?: boolean;
|
|
34
|
+
/** Defines registration of additional modules*/
|
|
35
|
+
additionalModules?: ({
|
|
36
|
+
new (): FhModule;
|
|
37
|
+
})[];
|
|
38
|
+
/** Defines translations for connection lost message Default contains messages for polish and english languages */
|
|
39
|
+
connectionLostTranslations?: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
/** Defines config for liferay If empty it will act as normal application */
|
|
43
|
+
liferay?: LiferayConfig;
|
|
44
|
+
/** Defines config for FHDPExtender If empty it will act as normal fh app without extensions */
|
|
45
|
+
extensionsConfig?: ExtenderConfig;
|
|
46
|
+
}
|
|
47
|
+
declare class FhApplication {
|
|
48
|
+
/** Instance of FhApplication */
|
|
49
|
+
private static __instance;
|
|
50
|
+
/** Current config */
|
|
51
|
+
private __config;
|
|
52
|
+
/** Instance of Liferay config */
|
|
53
|
+
private __liferay?;
|
|
54
|
+
/** Instance of connector */
|
|
55
|
+
private __connector?;
|
|
56
|
+
/**
|
|
57
|
+
* Private and used internally
|
|
58
|
+
* @param config main configuration
|
|
59
|
+
*/
|
|
60
|
+
private constructor();
|
|
61
|
+
/**
|
|
62
|
+
* At first use must be called with `config` param, to properly init instance
|
|
63
|
+
* Later uses can be without param, and it will return same instance as one inited at begin
|
|
64
|
+
* @param config main configuration
|
|
65
|
+
*/
|
|
66
|
+
static getInstance(config?: FhApplicationConfig): FhApplication;
|
|
67
|
+
/**
|
|
68
|
+
* Getter for connection lost translations
|
|
69
|
+
*/
|
|
70
|
+
private get currentConnectionLostTranslation();
|
|
71
|
+
private isJSON;
|
|
72
|
+
/**
|
|
73
|
+
* Getter for connector;
|
|
74
|
+
* @returns Connector
|
|
75
|
+
*/
|
|
76
|
+
getConnector(): Connector;
|
|
77
|
+
/**
|
|
78
|
+
* Registers new module Its alternative function to config node `additionalModules`
|
|
79
|
+
* @param module an module that will be registered in fh app
|
|
80
|
+
*/
|
|
81
|
+
registerModule(module: {
|
|
82
|
+
new (): FhModule;
|
|
83
|
+
}): void;
|
|
84
|
+
/**
|
|
85
|
+
* Registers callback for backend calls
|
|
86
|
+
* @param name callback name (key)
|
|
87
|
+
* @param callback actual callback function
|
|
88
|
+
*/
|
|
89
|
+
registerCallback(name: string, callback: (...args: any[]) => void): Error;
|
|
90
|
+
/**
|
|
91
|
+
* Function for initialise extenders
|
|
92
|
+
*/
|
|
93
|
+
private initExtenders;
|
|
94
|
+
/**
|
|
95
|
+
* Adds translation string
|
|
96
|
+
*/
|
|
97
|
+
addTranslation(lang: any, key: any, translation: any): void;
|
|
98
|
+
/**
|
|
99
|
+
* get translation string
|
|
100
|
+
*/
|
|
101
|
+
translate(key: any, args: any): string;
|
|
102
|
+
/**
|
|
103
|
+
* Initialise translations for connection lost
|
|
104
|
+
*/
|
|
105
|
+
private initConnectionLostTranslations;
|
|
106
|
+
/**
|
|
107
|
+
* Main init function
|
|
108
|
+
* @param context app context for sockets Default 'socketForms'
|
|
109
|
+
*/
|
|
110
|
+
init(context?: string): void;
|
|
111
|
+
/**
|
|
112
|
+
* Edits classlist of element provided by id
|
|
113
|
+
* @param id Id of DOM element
|
|
114
|
+
* @param remove class name that should be removed from element
|
|
115
|
+
* @param add class name that should be added in element
|
|
116
|
+
*/
|
|
117
|
+
createCallbackById(id: string, remove?: string, add?: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* Edits classlist of element wrapper provided by id
|
|
120
|
+
* @param id Id of DOM element
|
|
121
|
+
* @param remove class name that should be removed from element wrapper
|
|
122
|
+
* @param add class name that should be added in element wrapper
|
|
123
|
+
*/
|
|
124
|
+
createCallbackByWrapper(id: string, remove?: string, add?: string): void;
|
|
125
|
+
}
|
|
126
|
+
export { FhApplication };
|