@itrocks/framework 0.0.2 → 0.0.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/cjs/access.js +1 -1
- package/cjs/config.js +14 -11
- package/cjs/framework.js +5 -1
- package/cjs/menu.d.ts +1 -0
- package/cjs/menu.js +11 -0
- package/fr-FR.csv +2 -2
- package/package.json +2 -2
package/cjs/access.js
CHANGED
package/cjs/config.js
CHANGED
|
@@ -3,22 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.mergeConfig = mergeConfig;
|
|
4
4
|
const app_dir_1 = require("@itrocks/app-dir");
|
|
5
5
|
const node_fs_1 = require("node:fs");
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Object.entries(appConfig).forEach(([key, value]) => {
|
|
11
|
-
if (config[key]) {
|
|
12
|
-
if (!Array.isArray(config[key]))
|
|
6
|
+
function mergeConfigObject(config, mergeConfig) {
|
|
7
|
+
Object.entries(mergeConfig).forEach(([key, value]) => {
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
if (!Array.isArray(config[key])) {
|
|
13
10
|
config[key] = [config[key]];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
}
|
|
12
|
+
config[key].push(...value);
|
|
13
|
+
}
|
|
14
|
+
if (config[key]) {
|
|
15
|
+
mergeConfigObject(config[key], value);
|
|
18
16
|
}
|
|
19
17
|
else {
|
|
20
18
|
config[key] = value;
|
|
21
19
|
}
|
|
22
20
|
});
|
|
23
21
|
}
|
|
22
|
+
function mergeConfig(config, appConfigFile) {
|
|
23
|
+
if (!(0, node_fs_1.existsSync)(app_dir_1.appDir + appConfigFile))
|
|
24
|
+
return;
|
|
25
|
+
mergeConfigObject(config, Object.values(require(app_dir_1.appDir + appConfigFile))[0]);
|
|
26
|
+
}
|
|
24
27
|
//# sourceMappingURL=config.js.map
|
package/cjs/framework.js
CHANGED
|
@@ -25,6 +25,7 @@ const core_transformers_2 = require("@itrocks/core-transformers");
|
|
|
25
25
|
const fastify_1 = require("@itrocks/fastify");
|
|
26
26
|
const fastify_file_session_store_1 = require("@itrocks/fastify-file-session-store");
|
|
27
27
|
const lazy_loading_2 = require("@itrocks/lazy-loading");
|
|
28
|
+
const menu_1 = require("@itrocks/menu");
|
|
28
29
|
const mysql_1 = require("@itrocks/mysql");
|
|
29
30
|
const password_1 = require("@itrocks/password");
|
|
30
31
|
const transformers_1 = require("@itrocks/password/transformers");
|
|
@@ -49,7 +50,9 @@ const data_source_1 = require("../../../../local/data-source");
|
|
|
49
50
|
const secret_1 = require("../../../../local/secret");
|
|
50
51
|
const session_1 = require("../../../../local/session");
|
|
51
52
|
const access_1 = require("./access");
|
|
53
|
+
const menu_2 = require("./menu");
|
|
52
54
|
const template_2 = require("./template");
|
|
55
|
+
const menu = new menu_1.Menu(menu_2.menuConfig);
|
|
53
56
|
let routes;
|
|
54
57
|
template_1.frontScripts.push('/node_modules/@itrocks/air-datepicker/air-datepicker.js', '/node_modules/@itrocks/asset-loader/asset-loader.js', '/node_modules/@itrocks/asset-loader/load-css.js', '/node_modules/@itrocks/asset-loader/load-script.js', '/node_modules/@itrocks/auto-focus/auto-focus.js', '/node_modules/@itrocks/auto-redirect/auto-redirect.js', '/node_modules/@itrocks/auto-redirect/build.js', '/node_modules/@itrocks/autocompleter/autocompleter.js', '/node_modules/@itrocks/breadcrumb/breadcrumb.js', '/node_modules/@itrocks/build/build.js', '/node_modules/@itrocks/collapse/collapse.js', '/node_modules/@itrocks/contained-auto-width/contained-auto-width.js', '/node_modules/@itrocks/form-fetch/form-fetch.js', '/node_modules/@itrocks/modal/modal.js', '/node_modules/@itrocks/notifications/notifications.js', '/node_modules/@itrocks/plugin/plugin.js', '/node_modules/@itrocks/real-viewport-height/real-viewport-height.js', '/node_modules/@itrocks/sorted-array/sorted-array.js', '/node_modules/@itrocks/table/freeze.js', '/node_modules/@itrocks/table/freeze/inherit-background.js', '/node_modules/@itrocks/table/freeze/inherit-border.js', '/node_modules/@itrocks/table/table.js', '/node_modules/@itrocks/xtarget/begin-end.js', '/node_modules/@itrocks/xtarget/build.js', '/node_modules/@itrocks/xtarget/composite.js', '/node_modules/@itrocks/xtarget/default-target.js', '/node_modules/@itrocks/xtarget/head.js', '/node_modules/@itrocks/xtarget/headers-size.js', '/node_modules/@itrocks/xtarget/history.js', '/node_modules/@itrocks/xtarget/main-target.js', '/node_modules/@itrocks/xtarget/modifier.js', '/node_modules/@itrocks/xtarget/xtarget.js', '/node_modules/air-datepicker/air-datepicker.js', '/node_modules/air-datepicker/locale/en.js', '/node_modules/air-datepicker/locale/fr.js', '/node_modules/autocompleter/autocomplete.es.js');
|
|
55
58
|
function bindDependencies() {
|
|
@@ -99,6 +102,7 @@ function bindDependencies() {
|
|
|
99
102
|
const containerData = {
|
|
100
103
|
action: request.action,
|
|
101
104
|
actions: this.actions,
|
|
105
|
+
menu,
|
|
102
106
|
request,
|
|
103
107
|
session: request.request.session
|
|
104
108
|
};
|
|
@@ -112,7 +116,7 @@ function buildWorkflow() {
|
|
|
112
116
|
(0, action_3.setActionTemplates)({ need: 'object', template: __dirname + '/../../action/cjs/selectionAction.html' }, { template: __dirname + '/../../action/cjs/action.html' });
|
|
113
117
|
(0, action_1.setAction)('edit', 'delete');
|
|
114
118
|
(0, action_1.setAction)('login', 'forgot-password');
|
|
115
|
-
(0, action_1.setAction)('login', '
|
|
119
|
+
(0, action_1.setAction)('login', 'sign-up');
|
|
116
120
|
(0, action_1.setAction)('list', 'new');
|
|
117
121
|
(0, action_1.setAction)('list', 'delete', { need: 'object' });
|
|
118
122
|
(0, action_1.setAction)('output', 'edit');
|
package/cjs/menu.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const menuConfig: Record<string, Record<string, string>>;
|
package/cjs/menu.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.menuConfig = void 0;
|
|
4
|
+
const config_1 = require("./config");
|
|
5
|
+
exports.menuConfig = {
|
|
6
|
+
'Administration': {
|
|
7
|
+
'/user/list': 'Users'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
(0, config_1.mergeConfig)(exports.menuConfig, '/app/config/menu.js');
|
|
11
|
+
//# sourceMappingURL=menu.js.map
|
package/fr-FR.csv
CHANGED
|
@@ -52,8 +52,8 @@ please enter your new password;veuillez entrer votre nouveau mot de passe
|
|
|
52
52
|
please try again later or contact our support team if the issue persists;veuillez réessayer ultérieurement ou contacter notre équipe de support si le problème persiste
|
|
53
53
|
please wait for an administrator to activate it;veuillez attendre qu'un administrateur l'active
|
|
54
54
|
print;imprimer
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
sign up;s'enregistrer
|
|
56
|
+
sign-up error;erreur à l'enregistrement
|
|
57
57
|
reset;réinitialiser
|
|
58
58
|
save;enregistrer
|
|
59
59
|
save $1;enregistrer $1
|
package/package.json
CHANGED
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@itrocks/property-view": "latest",
|
|
46
46
|
"@itrocks/real-viewport-height": "latest",
|
|
47
47
|
"@itrocks/reflect": "latest",
|
|
48
|
-
"@itrocks/register": "latest",
|
|
49
48
|
"@itrocks/rename": "latest",
|
|
50
49
|
"@itrocks/request-response": "latest",
|
|
51
50
|
"@itrocks/save": "latest",
|
|
51
|
+
"@itrocks/sign-up": "latest",
|
|
52
52
|
"@itrocks/sql-functions": "latest",
|
|
53
53
|
"@itrocks/summary": "latest",
|
|
54
54
|
"@itrocks/table": "latest",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"build:front": "tsc -p src/front/tsconfig.json && sed -i 's#../../##g' app.js app.d.ts"
|
|
99
99
|
},
|
|
100
100
|
"types": "./cjs/framework.d.ts",
|
|
101
|
-
"version": "0.0.
|
|
101
|
+
"version": "0.0.4"
|
|
102
102
|
}
|