@yuneta/gobj-ui 7.26.27 → 7.26.29
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/README.md +590 -25
- package/dist/gobj-ui.cjs.js +1080 -229
- package/dist/gobj-ui.es.js +1081 -230
- package/package.json +4 -2
- package/scripts/validate-locales.mjs +2656 -315
- package/src/c_g6_nodes_tree.js +1086 -253
- package/src/c_yui_form.js +16 -4
- package/src/c_yui_fsm_graph.js +5 -0
- package/src/c_yui_gclass.js +11 -0
- package/src/c_yui_gobj_tree_js.js +18 -1
- package/src/c_yui_json_graph.js +5 -0
- package/src/c_yui_nav.js +21 -16
- package/src/c_yui_pager.js +1 -1
- package/src/c_yui_period.js +10 -3
- package/src/c_yui_schema_editor.js +34 -18
- package/src/c_yui_shell.js +11 -10
- package/src/c_yui_treedb_graph.js +17 -9
- package/src/c_yui_treedb_schema.js +5 -0
- package/src/c_yui_treedb_topic_with_form.js +9 -9
- package/src/c_yui_treedb_topics.js +13 -13
- package/src/c_yui_window.js +2 -2
- package/src/c_yui_window_manager.js +5 -2
- package/src/c_yui_wizard.js +8 -1
- package/src/form_json_field.js +7 -0
- package/src/g6_canvas_tab_order.js +84 -0
- package/src/g6_canvas_tab_order.wiring.test.js +232 -0
- package/src/g6_nodes_tree_controls.test.js +547 -0
- package/src/g6_nodes_tree_focus.wiring.test.js +1360 -0
- package/src/g6_nodes_tree_i18n_keys.test.js +241 -5
- package/src/i18n_key_functions.js +235 -0
- package/src/i18n_key_functions.test.js +1525 -0
- package/src/lib_graph.js +38 -1
- package/src/nav_backbar_name.wiring.test.js +82 -0
- package/src/schema_flags.js +47 -0
- package/src/schema_import.js +7 -0
- package/src/shell_modals.js +20 -16
- package/src/shell_route_map.js +13 -3
- package/src/wizard_helpers.js +8 -0
- package/src/yui_dev.js +16 -3
- package/src/yui_dev_controls.test.js +174 -0
- package/src/yui_gclass_view.js +1 -1
- package/src/yui_graph_camera.js +1 -1
- package/src/yui_install.js +10 -8
- package/src/yui_table_select.js +2 -2
- package/src/yui_time.js +17 -2
package/src/yui_time.js
CHANGED
|
@@ -90,6 +90,21 @@ const YUI_ROLLING = {
|
|
|
90
90
|
"30d": {id: "30d", secs: 30 * 24 * 3600, label: "last 30 days"}
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
/* The keys that reach t() as data, where no scan of the source reads
|
|
94
|
+
* them: the id of every granularity of YUI_PERIODS (period_name), the
|
|
95
|
+
* label of every window of YUI_ROLLING (C_YUI_PERIOD), and the bucket
|
|
96
|
+
* labels period_label() picks by variable. Published for a consumer's
|
|
97
|
+
* validate-locales, which asks the app's locales for every key of an
|
|
98
|
+
* exported `*_I18N_KEYS` array -- the whole catalog, because which of
|
|
99
|
+
* it a period control offers is the HOST's data. A period or a window
|
|
100
|
+
* added to the catalog adds its key here (a test checks it). */
|
|
101
|
+
export const YUI_TIME_I18N_KEYS = [
|
|
102
|
+
"minute", "5min", "15min", "hour", "day", "week", "fortnight",
|
|
103
|
+
"month", "bimester", "quarter", "semester", "year", "decade",
|
|
104
|
+
"last hour", "last 6h", "last 24h", "last 7 days", "last 30 days",
|
|
105
|
+
"quarter {{n}} {{y}}", "semester {{n}} {{y}}"
|
|
106
|
+
];
|
|
107
|
+
|
|
93
108
|
|
|
94
109
|
/***************************
|
|
95
110
|
* Locale / i18n
|
|
@@ -531,7 +546,7 @@ function period_name(period, t)
|
|
|
531
546
|
if(!spec) {
|
|
532
547
|
return tr(t, String((period && period.id) || period || ""));
|
|
533
548
|
}
|
|
534
|
-
return tr(t, spec.id);
|
|
549
|
+
return tr(t, /* i18n: YUI_TIME_I18N_KEYS */ spec.id);
|
|
535
550
|
}
|
|
536
551
|
|
|
537
552
|
/***************************************************************
|
|
@@ -610,7 +625,7 @@ function period_label(period, anchor_ms, t, locale)
|
|
|
610
625
|
|
|
611
626
|
if(spec.unit === "month" && (spec.count === 3 || spec.count === 6)) {
|
|
612
627
|
let n = Math.floor(start.getMonth() / spec.count) + 1;
|
|
613
|
-
|
|
628
|
+
const key = (spec.count === 3) ? "quarter {{n}} {{y}}" : "semester {{n}} {{y}}";
|
|
614
629
|
return tr(t, key, {n: n, y: start.getFullYear()});
|
|
615
630
|
}
|
|
616
631
|
|