fhdp-fh-starter 4.10.301 → 4.10.801

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.
@@ -1 +1 @@
1
- {"name":"fhdp-fh-starter","version":"4.10.301","author":{"name":"Jakub Kosecki","email":"j.kosecki@doittechnology.pl"},"description":"Configurable starter for asseco/fh","main":"dist/Module.js","types":"dist/Module.d.ts","scripts":{"prepublish":"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","typedoc":"^0.20.20","typescript":"3.9"},"dependencies":{"fh-basic-controls":"4.10.301","fh-charts-controls":"4.10.301","fh-forms-handler":"4.10.301","fhdp-controls":"4.10.301","fhdp-extenders":"4.10.301"}}
1
+ {"name":"fhdp-fh-starter","version":"4.10.801","author":{"name":"Jakub Kosecki","email":"j.kosecki@doittechnology.pl"},"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.801","fh-charts-controls":"4.10.801","fh-forms-handler":"4.10.801","fhdp-controls":"4.10.801","fhdp-extenders":"4.10.801"}}
@@ -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 };
@@ -1,288 +1,288 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.FhApplication = void 0;
15
- require("reflect-metadata");
16
- var fh_forms_handler_1 = require("fh-forms-handler");
17
- var fh_basic_controls_1 = require("fh-basic-controls");
18
- var fh_charts_controls_1 = require("fh-charts-controls");
19
- var fhdp_controls_1 = require("fhdp-controls");
20
- var fhdp_extenders_1 = require("fhdp-extenders");
21
- var FhApplication = /** @class */ (function () {
22
- /**
23
- * Private and used internally
24
- * @param config main configuration
25
- */
26
- function FhApplication(config) {
27
- var _this = this;
28
- this.__config = config;
29
- if (config.registerStandardModules) {
30
- this.registerModule(fh_forms_handler_1.FormsHandler);
31
- this.registerModule(fh_basic_controls_1.BasicControls);
32
- }
33
- if (config.registerChartsControls) {
34
- this.registerModule(fh_charts_controls_1.ChartsControls);
35
- }
36
- if (config.registerFHDPControls) {
37
- this.registerModule(fhdp_controls_1.FhDPControls);
38
- }
39
- if (config.additionalModules) {
40
- config.additionalModules.forEach(function (mod) {
41
- _this.registerModule(mod);
42
- });
43
- }
44
- if (config.liferay && config.liferay.enabled) {
45
- this.__liferay = config.liferay;
46
- }
47
- }
48
- /**
49
- * At first use must be called with `config` param, to properly init instance
50
- * Later uses can be without param, and it will return same instance as one inited at begin
51
- * @param config main configuration
52
- */
53
- FhApplication.getInstance = function (config) {
54
- if (!FhApplication.__instance && config) {
55
- FhApplication.__instance = new FhApplication(config);
56
- }
57
- else if (!FhApplication.__instance && !config) {
58
- console.error('Init instance first with config');
59
- }
60
- return FhApplication.__instance;
61
- };
62
- Object.defineProperty(FhApplication.prototype, "currentConnectionLostTranslation", {
63
- /**
64
- * Getter for connection lost translations
65
- */
66
- get: function () {
67
- var i18n = fh_forms_handler_1.FhContainer.get('I18n');
68
- return i18n.translateString('connectionLostRetry', undefined, i18n.selectedLanguage);
69
- },
70
- enumerable: false,
71
- configurable: true
72
- });
73
- FhApplication.prototype.isJSON = function (data) {
74
- try {
75
- return JSON.parse(data);
76
- }
77
- catch (e) {
78
- return false;
79
- }
80
- };
81
- /**
82
- * Getter for connector;
83
- * @returns Connector
84
- */
85
- FhApplication.prototype.getConnector = function () {
86
- return this.__connector;
87
- };
88
- /**
89
- * Registers new module Its alternative function to config node `additionalModules`
90
- * @param module an module that will be registered in fh app
91
- */
92
- FhApplication.prototype.registerModule = function (module) {
93
- new module().init();
94
- };
95
- /**
96
- * Registers callback for backend calls
97
- * @param name callback name (key)
98
- * @param callback actual callback function
99
- */
100
- FhApplication.prototype.registerCallback = function (name, callback) {
101
- var customActions = fh_forms_handler_1.FhContainer.get('CustomActions');
102
- if (customActions == null) {
103
- return new Error('CustomActions is not registered.');
104
- }
105
- customActions.callbacks[name] = callback;
106
- };
107
- /**
108
- * Function for initialise extenders
109
- */
110
- FhApplication.prototype.initExtenders = function () {
111
- var i18n = fh_forms_handler_1.FhContainer.get('I18n');
112
- new fhdp_extenders_1.FHDPExtender(__assign({ i18n: i18n }, this.__config.extensionsConfig));
113
- };
114
- /**
115
- * Adds translation string
116
- */
117
- FhApplication.prototype.addTranslation = function (lang, key, translation) {
118
- var _a;
119
- var i18n = fh_forms_handler_1.FhContainer.get('I18n');
120
- i18n.registerStrings(lang, (_a = {},
121
- _a[key] = translation,
122
- _a), true);
123
- };
124
- /**
125
- * get translation string
126
- */
127
- FhApplication.prototype.translate = function (key, args) {
128
- var i18n = fh_forms_handler_1.FhContainer.get('I18n');
129
- return i18n.translateString(key, args, i18n.selectedLanguage);
130
- };
131
- /**
132
- * Initialise translations for connection lost
133
- */
134
- FhApplication.prototype.initConnectionLostTranslations = function () {
135
- var _this = this;
136
- var i18n = fh_forms_handler_1.FhContainer.get('I18n');
137
- i18n.registerStrings('pl', {
138
- connectionLostRetry: 'Połączenie z serwerem zostało przerwane. Ponawiam próbę połączenia...'
139
- }, true);
140
- i18n.registerStrings('en', {
141
- connectionLostRetry: 'Connection with server is broken. Trying to reconnect...'
142
- }, true);
143
- if (this.__config.connectionLostTranslations) {
144
- Object.keys(this.__config.connectionLostTranslations).forEach(function (iso) {
145
- i18n.registerStrings(iso, {
146
- connectionLostRetry: _this.__config.connectionLostTranslations[iso]
147
- }, true);
148
- });
149
- }
150
- };
151
- /**
152
- * Main init function
153
- * @param context app context for sockets Default 'socketForms'
154
- */
155
- FhApplication.prototype.init = function (context) {
156
- var _this = this;
157
- if (context === void 0) { context = 'socketForms'; }
158
- var util = fh_forms_handler_1.FhContainer.get('Util');
159
- var i18n = fh_forms_handler_1.FhContainer.get('I18n');
160
- if (this.__config.extensionsConfig) {
161
- this.initExtenders();
162
- }
163
- this.initConnectionLostTranslations();
164
- var contextPath;
165
- if (this.__liferay) {
166
- if (this.__liferay.fhBaseUrl != null) {
167
- contextPath = "" + this.__liferay.fhBaseUrl.replace('http:/', 'ws:/').replace('https:/', 'wss:/') + this.__liferay.fhContextPath + "/socketForms";
168
- }
169
- else {
170
- contextPath = this.__liferay.localPumaWsURL;
171
- }
172
- }
173
- else {
174
- contextPath = util.getPath(context);
175
- }
176
- this.__connector = fh_forms_handler_1.FhContainer.get("Connector")(contextPath, function () {
177
- fh_forms_handler_1.FhContainer.get('ApplicationLock')
178
- .createInfoDialog(_this.currentConnectionLostTranslation);
179
- }, function () {
180
- fh_forms_handler_1.FhContainer.get('ApplicationLock')
181
- .closeInfoDialog();
182
- });
183
- if (this.__liferay && window.Liferay) {
184
- this.__connector.incomingMessageCallback = function (data) {
185
- var isJSON = function (data) {
186
- try {
187
- return JSON.parse(data);
188
- }
189
- catch (e) {
190
- return false;
191
- }
192
- };
193
- var json = isJSON(data);
194
- console.log('incomingMessageCallback');
195
- if (window.Liferay.Session && (!json || json.eventType !== 'onTimer')) {
196
- window.Liferay.Session.extend();
197
- }
198
- };
199
- this.__connector.outcomingMessageCallback = function (data) {
200
- var isJSON = function (data) {
201
- try {
202
- return JSON.parse(data);
203
- }
204
- catch (e) {
205
- return false;
206
- }
207
- };
208
- var json = isJSON(data);
209
- console.log('outcomingMessageCallback');
210
- if (window.Liferay.Session && (!json || json.eventType !== 'onTimer')) {
211
- window.Liferay.Session.extend();
212
- }
213
- // after init discard any query parameters from url to prevent repeated actions (e.g. redirect from external page with action in parameter)
214
- if (json && json.command == 'Init') {
215
- history.replaceState(history.state, document.title, location.origin + location.pathname);
216
- if (parent) {
217
- parent.history.replaceState(parent.history.state, parent.document.title, parent.location.origin + parent.location.pathname);
218
- }
219
- }
220
- };
221
- }
222
- fh_forms_handler_1.FhContainer.rebind("Connector").toConstantValue(this.__connector);
223
- fh_forms_handler_1.FhContainer.get('SocketHandler').addConnector(this.__connector);
224
- try {
225
- var cookie = fhdp_extenders_1.getCookie();
226
- if (cookie && cookie['GUEST_LANGUAGE_ID']) {
227
- i18n.selectLanguage(cookie['GUEST_LANGUAGE_ID']);
228
- console.log("LANGUAGE SELECTED ON START(GUEST_LANGUAGE_ID): ", cookie['GUEST_LANGUAGE_ID']);
229
- }
230
- else if (cookie && cookie['USERLANG']) {
231
- i18n.selectLanguage(cookie['USERLANG']);
232
- console.log("LANGUAGE SELECTED ON START: ", cookie['USERLANG']);
233
- }
234
- }
235
- catch (e) {
236
- console.warn(e);
237
- }
238
- if (this.__liferay) {
239
- fh_forms_handler_1.FhContainer.get('FH').initExternal(this.__liferay.localPumaWsURL);
240
- }
241
- else {
242
- fh_forms_handler_1.FhContainer.get('FH').init();
243
- }
244
- this.registerCallback('callUcAction', function (actionName) {
245
- fh_forms_handler_1.FhContainer.get('ServiceManagerUtil').callAction('callUcAction', actionName);
246
- });
247
- };
248
- /**
249
- * Edits classlist of element provided by id
250
- * @param id Id of DOM element
251
- * @param remove class name that should be removed from element
252
- * @param add class name that should be added in element
253
- */
254
- FhApplication.prototype.createCallbackById = function (id, remove, add) {
255
- var element = document.getElementById(id);
256
- if (!!element) {
257
- if (!!remove) {
258
- element.classList.remove(remove);
259
- }
260
- if (!!add) {
261
- element.classList.add(add);
262
- }
263
- }
264
- };
265
- /**
266
- * Edits classlist of element wrapper provided by id
267
- * @param id Id of DOM element
268
- * @param remove class name that should be removed from element wrapper
269
- * @param add class name that should be added in element wrapper
270
- */
271
- FhApplication.prototype.createCallbackByWrapper = function (id, remove, add) {
272
- var element = document.getElementById(id);
273
- if (!!element) {
274
- var wrapper = element.parentNode;
275
- if (!!wrapper) {
276
- if (!!remove) {
277
- wrapper.classList.remove(remove);
278
- }
279
- if (!!add) {
280
- wrapper.classList.add(add);
281
- }
282
- }
283
- }
284
- };
285
- return FhApplication;
286
- }());
287
- exports.FhApplication = FhApplication;
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.FhApplication = void 0;
15
+ require("reflect-metadata");
16
+ var fh_forms_handler_1 = require("fh-forms-handler");
17
+ var fh_basic_controls_1 = require("fh-basic-controls");
18
+ var fh_charts_controls_1 = require("fh-charts-controls");
19
+ var fhdp_controls_1 = require("fhdp-controls");
20
+ var fhdp_extenders_1 = require("fhdp-extenders");
21
+ var FhApplication = /** @class */ (function () {
22
+ /**
23
+ * Private and used internally
24
+ * @param config main configuration
25
+ */
26
+ function FhApplication(config) {
27
+ var _this = this;
28
+ this.__config = config;
29
+ if (config.registerStandardModules) {
30
+ this.registerModule(fh_forms_handler_1.FormsHandler);
31
+ this.registerModule(fh_basic_controls_1.BasicControls);
32
+ }
33
+ if (config.registerChartsControls) {
34
+ this.registerModule(fh_charts_controls_1.ChartsControls);
35
+ }
36
+ if (config.registerFHDPControls) {
37
+ this.registerModule(fhdp_controls_1.FhDPControls);
38
+ }
39
+ if (config.additionalModules) {
40
+ config.additionalModules.forEach(function (mod) {
41
+ _this.registerModule(mod);
42
+ });
43
+ }
44
+ if (config.liferay && config.liferay.enabled) {
45
+ this.__liferay = config.liferay;
46
+ }
47
+ }
48
+ /**
49
+ * At first use must be called with `config` param, to properly init instance
50
+ * Later uses can be without param, and it will return same instance as one inited at begin
51
+ * @param config main configuration
52
+ */
53
+ FhApplication.getInstance = function (config) {
54
+ if (!FhApplication.__instance && config) {
55
+ FhApplication.__instance = new FhApplication(config);
56
+ }
57
+ else if (!FhApplication.__instance && !config) {
58
+ console.error('Init instance first with config');
59
+ }
60
+ return FhApplication.__instance;
61
+ };
62
+ Object.defineProperty(FhApplication.prototype, "currentConnectionLostTranslation", {
63
+ /**
64
+ * Getter for connection lost translations
65
+ */
66
+ get: function () {
67
+ var i18n = fh_forms_handler_1.FhContainer.get('I18n');
68
+ return i18n.translateString('connectionLostRetry', undefined, i18n.selectedLanguage);
69
+ },
70
+ enumerable: false,
71
+ configurable: true
72
+ });
73
+ FhApplication.prototype.isJSON = function (data) {
74
+ try {
75
+ return JSON.parse(data);
76
+ }
77
+ catch (e) {
78
+ return false;
79
+ }
80
+ };
81
+ /**
82
+ * Getter for connector;
83
+ * @returns Connector
84
+ */
85
+ FhApplication.prototype.getConnector = function () {
86
+ return this.__connector;
87
+ };
88
+ /**
89
+ * Registers new module Its alternative function to config node `additionalModules`
90
+ * @param module an module that will be registered in fh app
91
+ */
92
+ FhApplication.prototype.registerModule = function (module) {
93
+ new module().init();
94
+ };
95
+ /**
96
+ * Registers callback for backend calls
97
+ * @param name callback name (key)
98
+ * @param callback actual callback function
99
+ */
100
+ FhApplication.prototype.registerCallback = function (name, callback) {
101
+ var customActions = fh_forms_handler_1.FhContainer.get('CustomActions');
102
+ if (customActions == null) {
103
+ return new Error('CustomActions is not registered.');
104
+ }
105
+ customActions.callbacks[name] = callback;
106
+ };
107
+ /**
108
+ * Function for initialise extenders
109
+ */
110
+ FhApplication.prototype.initExtenders = function () {
111
+ var i18n = fh_forms_handler_1.FhContainer.get('I18n');
112
+ new fhdp_extenders_1.FHDPExtender(__assign({ i18n: i18n }, this.__config.extensionsConfig));
113
+ };
114
+ /**
115
+ * Adds translation string
116
+ */
117
+ FhApplication.prototype.addTranslation = function (lang, key, translation) {
118
+ var _a;
119
+ var i18n = fh_forms_handler_1.FhContainer.get('I18n');
120
+ i18n.registerStrings(lang, (_a = {},
121
+ _a[key] = translation,
122
+ _a), true);
123
+ };
124
+ /**
125
+ * get translation string
126
+ */
127
+ FhApplication.prototype.translate = function (key, args) {
128
+ var i18n = fh_forms_handler_1.FhContainer.get('I18n');
129
+ return i18n.translateString(key, args, i18n.selectedLanguage);
130
+ };
131
+ /**
132
+ * Initialise translations for connection lost
133
+ */
134
+ FhApplication.prototype.initConnectionLostTranslations = function () {
135
+ var _this = this;
136
+ var i18n = fh_forms_handler_1.FhContainer.get('I18n');
137
+ i18n.registerStrings('pl', {
138
+ connectionLostRetry: 'Połączenie z serwerem zostało przerwane. Ponawiam próbę połączenia...'
139
+ }, true);
140
+ i18n.registerStrings('en', {
141
+ connectionLostRetry: 'Connection with server is broken. Trying to reconnect...'
142
+ }, true);
143
+ if (this.__config.connectionLostTranslations) {
144
+ Object.keys(this.__config.connectionLostTranslations).forEach(function (iso) {
145
+ i18n.registerStrings(iso, {
146
+ connectionLostRetry: _this.__config.connectionLostTranslations[iso]
147
+ }, true);
148
+ });
149
+ }
150
+ };
151
+ /**
152
+ * Main init function
153
+ * @param context app context for sockets Default 'socketForms'
154
+ */
155
+ FhApplication.prototype.init = function (context) {
156
+ var _this = this;
157
+ if (context === void 0) { context = 'socketForms'; }
158
+ var util = fh_forms_handler_1.FhContainer.get('Util');
159
+ var i18n = fh_forms_handler_1.FhContainer.get('I18n');
160
+ if (this.__config.extensionsConfig) {
161
+ this.initExtenders();
162
+ }
163
+ this.initConnectionLostTranslations();
164
+ var contextPath;
165
+ if (this.__liferay) {
166
+ if (this.__liferay.fhBaseUrl != null) {
167
+ contextPath = "".concat(this.__liferay.fhBaseUrl.replace('http:/', 'ws:/').replace('https:/', 'wss:/')).concat(this.__liferay.fhContextPath, "/socketForms");
168
+ }
169
+ else {
170
+ contextPath = this.__liferay.localPumaWsURL;
171
+ }
172
+ }
173
+ else {
174
+ contextPath = util.getPath(context);
175
+ }
176
+ this.__connector = fh_forms_handler_1.FhContainer.get("Connector")(contextPath, function () {
177
+ fh_forms_handler_1.FhContainer.get('ApplicationLock')
178
+ .createInfoDialog(_this.currentConnectionLostTranslation);
179
+ }, function () {
180
+ fh_forms_handler_1.FhContainer.get('ApplicationLock')
181
+ .closeInfoDialog();
182
+ });
183
+ if (this.__liferay && window.Liferay) {
184
+ this.__connector.incomingMessageCallback = function (data) {
185
+ var isJSON = function (data) {
186
+ try {
187
+ return JSON.parse(data);
188
+ }
189
+ catch (e) {
190
+ return false;
191
+ }
192
+ };
193
+ var json = isJSON(data);
194
+ console.log('incomingMessageCallback');
195
+ if (window.Liferay.Session && (!json || json.eventType !== 'onTimer')) {
196
+ window.Liferay.Session.extend();
197
+ }
198
+ };
199
+ this.__connector.outcomingMessageCallback = function (data) {
200
+ var isJSON = function (data) {
201
+ try {
202
+ return JSON.parse(data);
203
+ }
204
+ catch (e) {
205
+ return false;
206
+ }
207
+ };
208
+ var json = isJSON(data);
209
+ console.log('outcomingMessageCallback');
210
+ if (window.Liferay.Session && (!json || json.eventType !== 'onTimer')) {
211
+ window.Liferay.Session.extend();
212
+ }
213
+ // after init discard any query parameters from url to prevent repeated actions (e.g. redirect from external page with action in parameter)
214
+ if (json && json.command == 'Init') {
215
+ history.replaceState(history.state, document.title, location.origin + location.pathname);
216
+ if (parent) {
217
+ parent.history.replaceState(parent.history.state, parent.document.title, parent.location.origin + parent.location.pathname);
218
+ }
219
+ }
220
+ };
221
+ }
222
+ fh_forms_handler_1.FhContainer.rebind("Connector").toConstantValue(this.__connector);
223
+ fh_forms_handler_1.FhContainer.get('SocketHandler').addConnector(this.__connector);
224
+ try {
225
+ var cookie = (0, fhdp_extenders_1.getCookie)();
226
+ if (cookie && cookie['GUEST_LANGUAGE_ID']) {
227
+ i18n.selectLanguage(cookie['GUEST_LANGUAGE_ID']);
228
+ console.log("LANGUAGE SELECTED ON START(GUEST_LANGUAGE_ID): ", cookie['GUEST_LANGUAGE_ID']);
229
+ }
230
+ else if (cookie && cookie['USERLANG']) {
231
+ i18n.selectLanguage(cookie['USERLANG']);
232
+ console.log("LANGUAGE SELECTED ON START: ", cookie['USERLANG']);
233
+ }
234
+ }
235
+ catch (e) {
236
+ console.warn(e);
237
+ }
238
+ if (this.__liferay) {
239
+ fh_forms_handler_1.FhContainer.get('FH').initExternal(this.__liferay.localPumaWsURL);
240
+ }
241
+ else {
242
+ fh_forms_handler_1.FhContainer.get('FH').init();
243
+ }
244
+ this.registerCallback('callUcAction', function (actionName) {
245
+ fh_forms_handler_1.FhContainer.get('ServiceManagerUtil').callAction('callUcAction', actionName);
246
+ });
247
+ };
248
+ /**
249
+ * Edits classlist of element provided by id
250
+ * @param id Id of DOM element
251
+ * @param remove class name that should be removed from element
252
+ * @param add class name that should be added in element
253
+ */
254
+ FhApplication.prototype.createCallbackById = function (id, remove, add) {
255
+ var element = document.getElementById(id);
256
+ if (!!element) {
257
+ if (!!remove) {
258
+ element.classList.remove(remove);
259
+ }
260
+ if (!!add) {
261
+ element.classList.add(add);
262
+ }
263
+ }
264
+ };
265
+ /**
266
+ * Edits classlist of element wrapper provided by id
267
+ * @param id Id of DOM element
268
+ * @param remove class name that should be removed from element wrapper
269
+ * @param add class name that should be added in element wrapper
270
+ */
271
+ FhApplication.prototype.createCallbackByWrapper = function (id, remove, add) {
272
+ var element = document.getElementById(id);
273
+ if (!!element) {
274
+ var wrapper = element.parentNode;
275
+ if (!!wrapper) {
276
+ if (!!remove) {
277
+ wrapper.classList.remove(remove);
278
+ }
279
+ if (!!add) {
280
+ wrapper.classList.add(add);
281
+ }
282
+ }
283
+ }
284
+ };
285
+ return FhApplication;
286
+ }());
287
+ exports.FhApplication = FhApplication;
288
288
  //# sourceMappingURL=FhApplication.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FhApplication.js","sourceRoot":"","sources":["../FhApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,4BAA0B;AAC1B,qDAY0B;AAC1B,uDAAgD;AAChD,yDAAkD;AAClD,+CAA2C;AAC3C,iDAAqH;AA8CrH;IAaI;;;OAGG;IACH,uBAAoB,MAA2B;QAA/C,iBAsBC;QArBG,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;QACvB,IAAI,MAAM,CAAC,uBAAuB,EAAE;YAChC,IAAI,CAAC,c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CAAC,CAAC,MAAM,EAAE;oBACT,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBACpC;gBACD,IAAG,CAAC,CAAC,GAAG,EAAE;oBACN,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;iBAC9B;aACJ;SACJ;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AA7SD,IA6SC;AAEO,sCAAa"}
package/dist/Module.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { FhApplication } from './FhApplication';
2
- export { FhApplication };
1
+ import { FhApplication } from './FhApplication';
2
+ export { FhApplication };
package/dist/Module.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FhApplication = void 0;
4
- var FhApplication_1 = require("./FhApplication");
5
- Object.defineProperty(exports, "FhApplication", { enumerable: true, get: function () { return FhApplication_1.FhApplication; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FhApplication = void 0;
4
+ var FhApplication_1 = require("./FhApplication");
5
+ Object.defineProperty(exports, "FhApplication", { enumerable: true, get: function () { return FhApplication_1.FhApplication; } });
6
6
  //# sourceMappingURL=Module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fhdp-fh-starter",
3
- "version": "4.10.301",
3
+ "version": "4.10.801",
4
4
  "author": {
5
5
  "name": "Jakub Kosecki",
6
6
  "email": "j.kosecki@doittechnology.pl"
@@ -9,7 +9,7 @@
9
9
  "main": "dist/Module.js",
10
10
  "types": "dist/Module.d.ts",
11
11
  "scripts": {
12
- "prepublish": "node prepublish",
12
+ "prepublishOnly": "node prepublish",
13
13
  "postpublish": "node postpublish",
14
14
  "build": "tsc",
15
15
  "docgen": "npx typedoc ./FhApplication.ts",
@@ -20,14 +20,15 @@
20
20
  "@types/bootstrap": "4.3.1",
21
21
  "@types/jquery": "3.3.31",
22
22
  "@types/node": "14.14.36",
23
- "typedoc": "^0.20.20",
24
- "typescript": "3.9"
23
+ "@types/jqueryui": "1.12.10",
24
+ "typedoc": "0.24.7",
25
+ "typescript": "5.0.4"
25
26
  },
26
27
  "dependencies": {
27
- "fh-basic-controls": "4.10.301",
28
- "fh-charts-controls": "4.10.301",
29
- "fh-forms-handler": "4.10.301",
30
- "fhdp-controls": "4.10.301",
31
- "fhdp-extenders": "4.10.301"
28
+ "fh-basic-controls": "4.10.801",
29
+ "fh-charts-controls": "4.10.801",
30
+ "fh-forms-handler": "4.10.801",
31
+ "fhdp-controls": "4.10.801",
32
+ "fhdp-extenders": "4.10.801"
32
33
  }
33
34
  }