@itrocks/framework 0.0.37 → 0.0.39
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/dependencies.js +16 -1
- package/package.json +2 -1
package/cjs/dependencies.js
CHANGED
|
@@ -20,6 +20,8 @@ const menu_1 = require("@itrocks/menu");
|
|
|
20
20
|
const mysql_1 = require("@itrocks/mysql");
|
|
21
21
|
const password_1 = require("@itrocks/password");
|
|
22
22
|
const transformers_1 = require("@itrocks/password/transformers");
|
|
23
|
+
const property_translate_1 = require("@itrocks/property-translate");
|
|
24
|
+
const transformers_2 = require("@itrocks/property-translate/transformers");
|
|
23
25
|
const property_view_1 = require("@itrocks/property-view");
|
|
24
26
|
const property_view_2 = require("@itrocks/property-view");
|
|
25
27
|
const rename_1 = require("@itrocks/rename");
|
|
@@ -31,6 +33,7 @@ const sql_functions_1 = require("@itrocks/sql-functions");
|
|
|
31
33
|
const storage_1 = require("@itrocks/storage");
|
|
32
34
|
const store_1 = require("@itrocks/store");
|
|
33
35
|
const store_2 = require("@itrocks/store");
|
|
36
|
+
const template_1 = require("@itrocks/template");
|
|
34
37
|
const template_insight_1 = require("@itrocks/template-insight");
|
|
35
38
|
const transformer_1 = require("@itrocks/transformer");
|
|
36
39
|
const transformer_2 = require("@itrocks/transformer");
|
|
@@ -39,8 +42,11 @@ const translate_1 = require("@itrocks/translate");
|
|
|
39
42
|
const date_fns_1 = require("date-fns");
|
|
40
43
|
const node_path_1 = require("node:path");
|
|
41
44
|
const menu = new menu_1.Menu(config_1.config.menu);
|
|
45
|
+
async function propertyOutput(object, property) {
|
|
46
|
+
return (0, transformer_1.applyTransformer)(await object[property], object, property, transformer_2.HTML, transformer_3.OUTPUT);
|
|
47
|
+
}
|
|
42
48
|
function bind() {
|
|
43
|
-
(0, class_view_1.classViewDependsOn)({ requiredOf: required_1.requiredOf, tr: translate_1.tr });
|
|
49
|
+
(0, class_view_1.classViewDependsOn)({ propertyOutput, requiredOf: required_1.requiredOf, tr: translate_1.tr });
|
|
44
50
|
(0, storage_1.createDataSource)(config_1.config.dataSource);
|
|
45
51
|
(0, collection_1.initCollection)();
|
|
46
52
|
(0, core_transformers_1.initCoreTransformers)({
|
|
@@ -50,6 +56,7 @@ function bind() {
|
|
|
50
56
|
formatDate: date => (0, date_fns_1.format)(date, (0, translate_1.tr)('dd/MM/yyyy', { ucFirst: false })),
|
|
51
57
|
ignoreTransformedValue: transformer_2.IGNORE,
|
|
52
58
|
parseDate: date => (0, date_fns_1.parse)(date, (0, translate_1.tr)('dd/MM/yyyy', { ucFirst: false }), new Date),
|
|
59
|
+
propertyOutput,
|
|
53
60
|
representativeValueOf: class_view_2.representativeValueOf,
|
|
54
61
|
routeOf: route_2.routeOf,
|
|
55
62
|
tr: translate_1.tr
|
|
@@ -86,6 +93,14 @@ function bind() {
|
|
|
86
93
|
setTransformers: core_transformers_2.initStoreTransformers,
|
|
87
94
|
toStoreName: rename_1.toColumn
|
|
88
95
|
});
|
|
96
|
+
(0, property_translate_1.propertyTranslateDependsOn)({
|
|
97
|
+
setTransformers: transformers_2.setPropertyTranslateTransformers
|
|
98
|
+
});
|
|
99
|
+
(0, template_1.templateDependsOn)({
|
|
100
|
+
toString: async (data) => (((typeof data)[0] === 'o') && (data.toString === Object.prototype.toString))
|
|
101
|
+
? (await require('@itrocks/class-view').representativeValueOf(data))
|
|
102
|
+
: '' + data
|
|
103
|
+
});
|
|
89
104
|
(0, translate_1.trInit)('fr-FR');
|
|
90
105
|
(0, translate_1.trLoad)((0, node_path_1.join)(__dirname, '..', 'fr-FR.csv')).catch();
|
|
91
106
|
(0, translate_1.trLoad)((0, node_path_1.join)(app_dir_1.appDir, 'app', 'fr-FR.csv')).catch();
|
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@itrocks/notifications": "latest",
|
|
43
43
|
"@itrocks/password": "latest",
|
|
44
44
|
"@itrocks/print": "latest",
|
|
45
|
+
"@itrocks/property-translate": "latest",
|
|
45
46
|
"@itrocks/property-type": "latest",
|
|
46
47
|
"@itrocks/property-view": "latest",
|
|
47
48
|
"@itrocks/real-viewport-height": "latest",
|
|
@@ -99,5 +100,5 @@
|
|
|
99
100
|
"build:front": "tsc -p src/front/tsconfig.json && sed -i 's#../../##g' *.js *.d.ts"
|
|
100
101
|
},
|
|
101
102
|
"types": "./cjs/framework.d.ts",
|
|
102
|
-
"version": "0.0.
|
|
103
|
+
"version": "0.0.39"
|
|
103
104
|
}
|