chuijs 4.0.1 → 4.0.3
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/CHANGELOG.md +113 -0
- package/README.md +43 -632
- package/framework/appLayout/default/chui_app_layout.js +314 -273
- package/framework/appLayout/default/global_style.css +93 -53
- package/framework/components/chui_accordion/accordion.js +29 -26
- package/framework/components/chui_accordion/styles.css +6 -5
- package/framework/components/chui_action_sheet/action_sheet.js +59 -33
- package/framework/components/chui_action_sheet/styles.css +2 -1
- package/framework/components/chui_affix/affix.js +11 -6
- package/framework/components/chui_alert/alert.js +23 -14
- package/framework/components/chui_avatar/avatar.js +23 -22
- package/framework/components/chui_avatar_group/avatar_group.js +21 -19
- package/framework/components/chui_backtop/backtop.js +35 -19
- package/framework/components/chui_badge/badge.js +15 -13
- package/framework/components/chui_breadcrumb/breadcrumb.js +15 -13
- package/framework/components/chui_button/button.js +42 -22
- package/framework/components/chui_button/styles.css +2 -2
- package/framework/components/chui_calendar/calendar.js +12 -10
- package/framework/components/chui_card/card.js +43 -23
- package/framework/components/chui_chat/chat.js +72 -33
- package/framework/components/chui_clipboard_history/clipboard_history.js +30 -21
- package/framework/components/chui_clipboard_history/styles.css +4 -2
- package/framework/components/chui_code/code.js +2 -2
- package/framework/components/chui_code/styles.css +2 -2
- package/framework/components/chui_code_editor/code_editor.js +47 -31
- package/framework/components/chui_code_editor/styles.css +3 -2
- package/framework/components/chui_command_palette/command_palette.js +60 -37
- package/framework/components/chui_console/console.js +5 -5
- package/framework/components/chui_console/styles.css +1 -1
- package/framework/components/chui_content_block/content_block.js +33 -19
- package/framework/components/chui_content_block/styles.css +2 -2
- package/framework/components/chui_context_menu/context_menu.js +9 -4
- package/framework/components/chui_custom_element/custom_element.js +22 -15
- package/framework/components/chui_data_grid/data_grid.js +396 -234
- package/framework/components/chui_data_grid/styles.css +10 -8
- package/framework/components/chui_descriptions/descriptions.js +34 -17
- package/framework/components/chui_details/details.js +32 -26
- package/framework/components/chui_details/styles.css +5 -4
- package/framework/components/chui_diff_viewer/diff_viewer.js +91 -66
- package/framework/components/chui_diff_viewer/styles.css +1 -1
- package/framework/components/chui_divider/divider.js +13 -11
- package/framework/components/chui_drawer/drawer.js +27 -25
- package/framework/components/chui_drop_zone/drop_zone.js +31 -21
- package/framework/components/chui_empty_state/empty_state.js +20 -15
- package/framework/components/chui_fieldset/fieldset.js +37 -20
- package/framework/components/chui_fieldset/styles.css +1 -1
- package/framework/components/chui_file_explorer/file_explorer.js +157 -86
- package/framework/components/chui_file_explorer/styles.css +2 -1
- package/framework/components/chui_form/form.js +31 -19
- package/framework/components/chui_form/styles.css +1 -1
- package/framework/components/chui_gantt/gantt.js +64 -40
- package/framework/components/chui_graphs/graphs.js +301 -200
- package/framework/components/chui_graphs/styles.css +1 -1
- package/framework/components/chui_hero/hero.js +40 -22
- package/framework/components/chui_html_block/html_block.js +6 -6
- package/framework/components/chui_html_block/styles.css +2 -2
- package/framework/components/chui_hx/hx.js +3 -3
- package/framework/components/chui_hx/styles.css +11 -4
- package/framework/components/chui_icons/icons.js +2109 -2109
- package/framework/components/chui_icons/styles.css +2 -2
- package/framework/components/chui_inputs/chui_check_box/check_box.js +31 -19
- package/framework/components/chui_inputs/chui_check_box/styles.css +18 -18
- package/framework/components/chui_inputs/chui_chips/chips.js +50 -40
- package/framework/components/chui_inputs/chui_chips/styles.css +4 -2
- package/framework/components/chui_inputs/chui_color_picker/color_picker.js +36 -24
- package/framework/components/chui_inputs/chui_combo_box/combo_box.js +100 -82
- package/framework/components/chui_inputs/chui_combo_box/styles.css +14 -12
- package/framework/components/chui_inputs/chui_date/date.js +102 -66
- package/framework/components/chui_inputs/chui_date/styles.css +12 -11
- package/framework/components/chui_inputs/chui_date_range/date_range.js +40 -29
- package/framework/components/chui_inputs/chui_datetime/datetime.js +35 -27
- package/framework/components/chui_inputs/chui_email/email.js +43 -31
- package/framework/components/chui_inputs/chui_email/styles.css +5 -5
- package/framework/components/chui_inputs/chui_file/file.js +68 -41
- package/framework/components/chui_inputs/chui_file/styles.css +13 -12
- package/framework/components/chui_inputs/chui_hotkey/hotkey.js +61 -36
- package/framework/components/chui_inputs/chui_masked/masked.js +39 -28
- package/framework/components/chui_inputs/chui_mention/mention.js +77 -30
- package/framework/components/chui_inputs/chui_multi_combo_box/multi_combo_box.js +173 -153
- package/framework/components/chui_inputs/chui_multi_combo_box/styles.css +9 -7
- package/framework/components/chui_inputs/chui_number/number.js +58 -41
- package/framework/components/chui_inputs/chui_number/styles.css +7 -7
- package/framework/components/chui_inputs/chui_otp/otp.js +38 -29
- package/framework/components/chui_inputs/chui_password/password.js +58 -36
- package/framework/components/chui_inputs/chui_password/styles.css +8 -8
- package/framework/components/chui_inputs/chui_radio_button/radio_button.js +37 -25
- package/framework/components/chui_inputs/chui_radio_button/styles.css +20 -20
- package/framework/components/chui_inputs/chui_rating/rating.js +26 -22
- package/framework/components/chui_inputs/chui_select_box/select_box.js +102 -78
- package/framework/components/chui_inputs/chui_select_box/styles.css +11 -11
- package/framework/components/chui_inputs/chui_slider/slider.js +29 -26
- package/framework/components/chui_inputs/chui_slider/styles.css +2 -1
- package/framework/components/chui_inputs/chui_text/styles.css +8 -8
- package/framework/components/chui_inputs/chui_text/text.js +65 -44
- package/framework/components/chui_inputs/chui_text_area/styles.css +6 -6
- package/framework/components/chui_inputs/chui_text_area/text_area.js +51 -28
- package/framework/components/chui_inputs/chui_time/styles.css +5 -3
- package/framework/components/chui_inputs/chui_time/time.js +38 -27
- package/framework/components/chui_inputs/chui_toggle/styles.css +3 -3
- package/framework/components/chui_inputs/chui_toggle/toggle.js +16 -16
- package/framework/components/chui_json_editor/json_editor.js +53 -43
- package/framework/components/chui_json_viewer/json_viewer.js +52 -33
- package/framework/components/chui_json_viewer/styles.css +3 -2
- package/framework/components/chui_kanban/kanban.js +52 -34
- package/framework/components/chui_kbd/kbd.js +12 -10
- package/framework/components/chui_label/label.js +14 -12
- package/framework/components/chui_label/styles.css +2 -2
- package/framework/components/chui_link/link.js +27 -20
- package/framework/components/chui_list/list.js +31 -27
- package/framework/components/chui_list/styles.css +2 -1
- package/framework/components/chui_markdown_editor/markdown_editor.js +60 -44
- package/framework/components/chui_media/audio.js +326 -227
- package/framework/components/chui_media/audio_styles.css +40 -21
- package/framework/components/chui_media/image.js +70 -38
- package/framework/components/chui_media/image_compare.js +52 -21
- package/framework/components/chui_media/image_styles.css +3 -3
- package/framework/components/chui_media/video.js +155 -62
- package/framework/components/chui_media/video_styles.css +33 -16
- package/framework/components/chui_menu_bar/menu_bar.js +26 -24
- package/framework/components/chui_menu_bar/styles.css +4 -2
- package/framework/components/chui_modal/modal.js +44 -43
- package/framework/components/chui_modal/styles.css +3 -2
- package/framework/components/chui_notification/notification.js +50 -34
- package/framework/components/chui_notification/notification_download.js +31 -25
- package/framework/components/chui_notification/notification_download_progress.css +3 -2
- package/framework/components/chui_notification/notification_download_progress.js +47 -41
- package/framework/components/chui_notification/notification_update.js +23 -16
- package/framework/components/chui_notification/status_plate.js +2 -2
- package/framework/components/chui_notification/styles_download.css +1 -1
- package/framework/components/chui_notification/styles_update.css +1 -1
- package/framework/components/chui_org_chart/org_chart.js +74 -35
- package/framework/components/chui_pagination/pagination.js +62 -27
- package/framework/components/chui_paragraph/paragraph.js +2 -2
- package/framework/components/chui_paragraph/styles.css +1 -1
- package/framework/components/chui_popover/popover.js +49 -28
- package/framework/components/chui_popups/popups.js +137 -108
- package/framework/components/chui_popups/styles.css +2 -2
- package/framework/components/chui_print_button/print_button.js +33 -23
- package/framework/components/chui_progress_bar/progress_bar.js +23 -15
- package/framework/components/chui_progress_bar/styles.css +2 -2
- package/framework/components/chui_progress_ring/progress_ring.js +17 -15
- package/framework/components/chui_qrcode/qrcode.js +75 -31
- package/framework/components/chui_query_builder/query_builder.js +216 -123
- package/framework/components/chui_radio_group/radio_group.js +36 -26
- package/framework/components/chui_radio_group/styles.css +1 -1
- package/framework/components/chui_result/result.js +26 -16
- package/framework/components/chui_scheduler/scheduler.js +57 -35
- package/framework/components/chui_scheduler/styles.css +6 -2
- package/framework/components/chui_segmented_control/segmented_control.js +27 -21
- package/framework/components/chui_settings/settings.js +122 -48
- package/framework/components/chui_shortcut_help/shortcut_help.js +55 -32
- package/framework/components/chui_sidebar_nav/sidebar_nav.js +33 -23
- package/framework/components/chui_skeleton/skeleton.js +29 -24
- package/framework/components/chui_slideshow/slideshow.js +60 -41
- package/framework/components/chui_slideshow/styles.css +18 -12
- package/framework/components/chui_spinner/spinner.js +8 -8
- package/framework/components/chui_spinner/styles.css +0 -1
- package/framework/components/chui_split_button/split_button.js +23 -18
- package/framework/components/chui_split_button/styles.css +1 -1
- package/framework/components/chui_splitter/splitter.js +35 -28
- package/framework/components/chui_statistic/statistic.js +65 -38
- package/framework/components/chui_status_bar/status_bar.js +11 -9
- package/framework/components/chui_stepper/stepper.js +27 -22
- package/framework/components/chui_sticky_bar/sticky_bar.js +9 -4
- package/framework/components/chui_sticky_bar/styles.css +3 -1
- package/framework/components/chui_tabs/chui_tabs.js +28 -22
- package/framework/components/chui_tabs/styles.css +3 -3
- package/framework/components/chui_text_editor/styles.css +20 -19
- package/framework/components/chui_text_editor/text_editor.js +85 -61
- package/framework/components/chui_text_editor/text_editor_panel.js +346 -284
- package/framework/components/chui_theme_toggle/theme_toggle.js +27 -22
- package/framework/components/chui_timeline/timeline.js +14 -12
- package/framework/components/chui_toast_queue/toast_queue.js +52 -46
- package/framework/components/chui_toolbar/toolbar.js +20 -13
- package/framework/components/chui_tooltip/tooltip.js +37 -24
- package/framework/components/chui_tour/styles.css +8 -3
- package/framework/components/chui_tour/tour.js +61 -27
- package/framework/components/chui_transfer/styles.css +2 -1
- package/framework/components/chui_transfer/transfer.js +75 -42
- package/framework/components/chui_tree_table/tree_table.js +43 -29
- package/framework/components/chui_tree_view/styles.css +4 -2
- package/framework/components/chui_tree_view/tree_view.js +142 -99
- package/framework/components/chui_watermark/watermark.js +24 -16
- package/framework/components/chui_webview/styles.css +2 -2
- package/framework/components/chui_webview/webview.js +62 -50
- package/framework/components/telegram_bot/chui_telegram_bot.js +71 -64
- package/framework/modules/chui_a11y/chui_a11y.js +77 -46
- package/framework/modules/chui_animations/animations.js +42 -42
- package/framework/modules/chui_animations/styles.css +1 -1
- package/framework/modules/chui_bridge/preload.js +56 -26
- package/framework/modules/chui_functions.js +52 -50
- package/framework/modules/chui_highlight/chui_highlight.js +25 -22
- package/framework/modules/chui_i18n/chui_i18n.js +9 -7
- package/framework/modules/chui_i18n/locales/a11y.js +5 -5
- package/framework/modules/chui_i18n/locales/app_layout.js +5 -5
- package/framework/modules/chui_i18n/locales/calendar.js +3 -3
- package/framework/modules/chui_i18n/locales/common.js +3 -3
- package/framework/modules/chui_i18n/locales/data.js +36 -26
- package/framework/modules/chui_i18n/locales/editors.js +40 -13
- package/framework/modules/chui_i18n/locales/feedback.js +3 -3
- package/framework/modules/chui_i18n/locales/forms.js +8 -8
- package/framework/modules/chui_i18n/locales/graphics.js +8 -8
- package/framework/modules/chui_i18n/locales/media.js +4 -4
- package/framework/modules/chui_i18n/locales/navigation.js +8 -8
- package/framework/modules/chui_i18n/locales/validate.js +3 -3
- package/framework/modules/chui_json/chui_json.js +9 -9
- package/framework/modules/chui_layout/chui_layout.js +12 -10
- package/framework/modules/chui_logger/chui_logger.js +29 -25
- package/framework/modules/chui_page/page.js +33 -27
- package/framework/modules/chui_page/styles.css +3 -26
- package/framework/modules/chui_qr/chui_qr.js +158 -67
- package/framework/modules/chui_scrollbar/chui_scrollbar.js +35 -24
- package/framework/modules/chui_scrollbar/styles.css +3 -1
- package/framework/modules/chui_services/chui_channels.js +76 -11
- package/framework/modules/chui_services/chui_services.js +39 -31
- package/framework/modules/chui_services/desktop.js +149 -30
- package/framework/modules/chui_sortable/chui_sortable.js +17 -12
- package/framework/modules/chui_validate/chui_validate.js +7 -4
- package/framework/tray_bar/chui_menu_items.js +136 -46
- package/index.d.ts +4814 -0
- package/index.js +449 -334
- package/package.json +79 -68
|
@@ -63,7 +63,7 @@ module.exports = {
|
|
|
63
63
|
"feedback.previousSlide": "Предыдущий слайд",
|
|
64
64
|
"feedback.slideshowControls": "Управление слайд-шоу",
|
|
65
65
|
"feedback.autoplayStart": "Запустить автопрокрутку",
|
|
66
|
-
"feedback.autoplayPause": "Пауза автопрокрутки"
|
|
66
|
+
"feedback.autoplayPause": "Пауза автопрокрутки",
|
|
67
67
|
},
|
|
68
68
|
en: {
|
|
69
69
|
"feedback.loading": "Loading",
|
|
@@ -125,6 +125,6 @@ module.exports = {
|
|
|
125
125
|
"feedback.previousSlide": "Previous slide",
|
|
126
126
|
"feedback.slideshowControls": "Slideshow controls",
|
|
127
127
|
"feedback.autoplayStart": "Start autoplay",
|
|
128
|
-
"feedback.autoplayPause": "Pause autoplay"
|
|
129
|
-
}
|
|
128
|
+
"feedback.autoplayPause": "Pause autoplay",
|
|
129
|
+
},
|
|
130
130
|
};
|
|
@@ -70,7 +70,7 @@ module.exports = {
|
|
|
70
70
|
"forms.mentionLabel": "Упоминание",
|
|
71
71
|
"forms.mentionOptions": "Подсказки",
|
|
72
72
|
"forms.mentionHint": "Введите {trigger} — появятся подсказки",
|
|
73
|
-
"forms.mentionInserted": "Добавлено: {value}"
|
|
73
|
+
"forms.mentionInserted": "Добавлено: {value}",
|
|
74
74
|
},
|
|
75
75
|
en: {
|
|
76
76
|
"forms.sliderValue": "Value",
|
|
@@ -114,14 +114,14 @@ module.exports = {
|
|
|
114
114
|
"forms.chipsInputLabel": "Tags field",
|
|
115
115
|
"forms.chipsPlaceholder": "Add a tag",
|
|
116
116
|
"forms.chipsHint": "Enter or comma adds a tag, Backspace on an empty field removes the last one",
|
|
117
|
-
"forms.chipsAdded":
|
|
118
|
-
"forms.chipsRemoved":
|
|
117
|
+
"forms.chipsAdded": 'Tag "{value}" added. Tags total: {count}',
|
|
118
|
+
"forms.chipsRemoved": 'Tag "{value}" removed. Tags total: {count}',
|
|
119
119
|
"forms.chipsCleared": "All tags removed",
|
|
120
|
-
"forms.chipsRemove":
|
|
120
|
+
"forms.chipsRemove": 'Remove "{value}"',
|
|
121
121
|
"forms.chipsLimitPlaceholder": "Limit: {count}",
|
|
122
122
|
"forms.chipsLimitReached": "Limit reached: {count} tags",
|
|
123
|
-
"forms.chipsDuplicate":
|
|
124
|
-
"forms.chipsNotSuggested": "
|
|
123
|
+
"forms.chipsDuplicate": 'Tag "{value}" is already added',
|
|
124
|
+
"forms.chipsNotSuggested": '"{value}" is not among the suggestions',
|
|
125
125
|
"forms.chipsMore": "Tags that did not fit on the line: {count}",
|
|
126
126
|
"forms.multiComboMore": "Selected values that did not fit on the line: {count}",
|
|
127
127
|
|
|
@@ -139,6 +139,6 @@ module.exports = {
|
|
|
139
139
|
"forms.mentionLabel": "Mention",
|
|
140
140
|
"forms.mentionOptions": "Suggestions",
|
|
141
141
|
"forms.mentionHint": "Type {trigger} to see suggestions",
|
|
142
|
-
"forms.mentionInserted": "Added: {value}"
|
|
143
|
-
}
|
|
142
|
+
"forms.mentionInserted": "Added: {value}",
|
|
143
|
+
},
|
|
144
144
|
};
|
|
@@ -68,7 +68,7 @@ module.exports = {
|
|
|
68
68
|
"graphics.qrModeMismatch": "Режим «{mode}» не подходит для этого текста",
|
|
69
69
|
"graphics.qrMode.numeric": "цифры",
|
|
70
70
|
"graphics.qrMode.alphanumeric": "буквы и цифры",
|
|
71
|
-
"graphics.qrMode.byte": "байты"
|
|
71
|
+
"graphics.qrMode.byte": "байты",
|
|
72
72
|
},
|
|
73
73
|
en: {
|
|
74
74
|
"graphics.barChart": "Bar chart",
|
|
@@ -95,13 +95,13 @@ module.exports = {
|
|
|
95
95
|
"graphics.kanbanBoard": "Kanban board",
|
|
96
96
|
"graphics.kanbanColumn": "Column {index}",
|
|
97
97
|
"graphics.kanbanCard": "Card",
|
|
98
|
-
"graphics.quotedName": "
|
|
98
|
+
"graphics.quotedName": '"{name}"',
|
|
99
99
|
"graphics.kanbanTags": "tags: {value}",
|
|
100
100
|
"graphics.kanbanColumnOf": "column: {value}",
|
|
101
101
|
"graphics.kanbanColumnCount": "{title}, cards: {count}",
|
|
102
102
|
"graphics.kanbanColumnCountLimit": "{title}, cards: {count} of {limit}",
|
|
103
103
|
"graphics.kanbanEmpty": "Empty",
|
|
104
|
-
"graphics.kanbanMovedTo":
|
|
104
|
+
"graphics.kanbanMovedTo": 'Card {card} moved to "{column}"',
|
|
105
105
|
"graphics.kanbanMoved": "Card {card} moved",
|
|
106
106
|
"graphics.kanbanMoveRefused": "Card {card} was not moved: the column limit is reached",
|
|
107
107
|
|
|
@@ -109,8 +109,8 @@ module.exports = {
|
|
|
109
109
|
"graphics.clipboardEmpty": "History is empty",
|
|
110
110
|
"graphics.clipboardCopied": "Copied: {value}",
|
|
111
111
|
"graphics.clipboardCleared": "History cleared",
|
|
112
|
-
"graphics.clipboardCopy":
|
|
113
|
-
"graphics.clipboardRemove":
|
|
112
|
+
"graphics.clipboardCopy": 'Copy "{value}"',
|
|
113
|
+
"graphics.clipboardRemove": 'Delete "{value}"',
|
|
114
114
|
|
|
115
115
|
"graphics.settingsTheme": "Theme",
|
|
116
116
|
"graphics.settingsAppearance": "Color theme",
|
|
@@ -132,9 +132,9 @@ module.exports = {
|
|
|
132
132
|
"graphics.qrEmpty": "No value",
|
|
133
133
|
"graphics.qrTooLongChars": "Does not fit: {needed} characters, {capacity} max",
|
|
134
134
|
"graphics.qrTooLongBytes": "Does not fit: {needed} bytes, {capacity} max",
|
|
135
|
-
"graphics.qrModeMismatch":
|
|
135
|
+
"graphics.qrModeMismatch": 'Mode "{mode}" cannot encode this text',
|
|
136
136
|
"graphics.qrMode.numeric": "digits",
|
|
137
137
|
"graphics.qrMode.alphanumeric": "letters and digits",
|
|
138
|
-
"graphics.qrMode.byte": "bytes"
|
|
139
|
-
}
|
|
138
|
+
"graphics.qrMode.byte": "bytes",
|
|
139
|
+
},
|
|
140
140
|
};
|
|
@@ -59,7 +59,7 @@ module.exports = {
|
|
|
59
59
|
"media.imageCompareLabel": "Сравнение до и после",
|
|
60
60
|
"media.imageCompareBefore": "До",
|
|
61
61
|
"media.imageCompareAfter": "После",
|
|
62
|
-
"media.imageCompareValue": "{value} %"
|
|
62
|
+
"media.imageCompareValue": "{value} %",
|
|
63
63
|
},
|
|
64
64
|
en: {
|
|
65
65
|
"media.audioPlayer": "Audio player",
|
|
@@ -77,7 +77,7 @@ module.exports = {
|
|
|
77
77
|
"media.soundOff": "Sound off",
|
|
78
78
|
"media.soundOn": "Sound on",
|
|
79
79
|
"media.noSource": "The track has no source",
|
|
80
|
-
"media.cannotOpen":
|
|
80
|
+
"media.cannotOpen": 'Could not open "{source}"',
|
|
81
81
|
"media.trackStatus": "Track: {title}",
|
|
82
82
|
"media.track": "Track",
|
|
83
83
|
"media.tracks": "Tracks",
|
|
@@ -118,6 +118,6 @@ module.exports = {
|
|
|
118
118
|
"media.imageCompareLabel": "Before and after comparison",
|
|
119
119
|
"media.imageCompareBefore": "Before",
|
|
120
120
|
"media.imageCompareAfter": "After",
|
|
121
|
-
"media.imageCompareValue": "{value} %"
|
|
122
|
-
}
|
|
121
|
+
"media.imageCompareValue": "{value} %",
|
|
122
|
+
},
|
|
123
123
|
};
|
|
@@ -41,7 +41,7 @@ module.exports = {
|
|
|
41
41
|
"navigation.toolbar": "Панель инструментов",
|
|
42
42
|
"navigation.statusBar": "Строка состояния",
|
|
43
43
|
"navigation.moreActions": "Дополнительные действия",
|
|
44
|
-
"navigation.mainAction": "Основное действие"
|
|
44
|
+
"navigation.mainAction": "Основное действие",
|
|
45
45
|
},
|
|
46
46
|
en: {
|
|
47
47
|
"navigation.pagination": "Pagination",
|
|
@@ -56,10 +56,10 @@ module.exports = {
|
|
|
56
56
|
"navigation.breadcrumb": "Breadcrumb",
|
|
57
57
|
|
|
58
58
|
"navigation.tab": "Tab",
|
|
59
|
-
"navigation.closeTab":
|
|
60
|
-
"navigation.tabClosed":
|
|
61
|
-
"navigation.tabClosedOpened":
|
|
62
|
-
"navigation.tabClosedNothing":
|
|
59
|
+
"navigation.closeTab": 'Close tab "{title}"',
|
|
60
|
+
"navigation.tabClosed": 'Tab "{title}" closed',
|
|
61
|
+
"navigation.tabClosedOpened": 'Tab "{title}" closed, "{active}" opened',
|
|
62
|
+
"navigation.tabClosedNothing": 'Tab "{title}" closed, no tabs left',
|
|
63
63
|
|
|
64
64
|
"navigation.stepper": "Steps",
|
|
65
65
|
"navigation.stepOf": "Step {index} of {total}",
|
|
@@ -75,11 +75,11 @@ module.exports = {
|
|
|
75
75
|
"navigation.commandPlaceholder": "Find a command…",
|
|
76
76
|
"navigation.recentGroup": "Recent",
|
|
77
77
|
"navigation.commandsFound": "Commands found: {count}",
|
|
78
|
-
"navigation.commandsFoundFor":
|
|
78
|
+
"navigation.commandsFoundFor": 'Commands found: {count} for "{query}"',
|
|
79
79
|
|
|
80
80
|
"navigation.toolbar": "Toolbar",
|
|
81
81
|
"navigation.statusBar": "Status bar",
|
|
82
82
|
"navigation.moreActions": "More actions",
|
|
83
|
-
"navigation.mainAction": "Main action"
|
|
84
|
-
}
|
|
83
|
+
"navigation.mainAction": "Main action",
|
|
84
|
+
},
|
|
85
85
|
};
|
|
@@ -10,7 +10,7 @@ module.exports = {
|
|
|
10
10
|
"validate.minLength": "Минимум {minLength} символов",
|
|
11
11
|
"validate.maxLength": "Максимум {maxLength} символов",
|
|
12
12
|
"validate.pattern": "Неверный формат",
|
|
13
|
-
"validate.email": "Неверный адрес электронной почты"
|
|
13
|
+
"validate.email": "Неверный адрес электронной почты",
|
|
14
14
|
},
|
|
15
15
|
en: {
|
|
16
16
|
"validate.required": "Required field",
|
|
@@ -19,6 +19,6 @@ module.exports = {
|
|
|
19
19
|
"validate.minLength": "At least {minLength} characters",
|
|
20
20
|
"validate.maxLength": "At most {maxLength} characters",
|
|
21
21
|
"validate.pattern": "Invalid format",
|
|
22
|
-
"validate.email": "Invalid email address"
|
|
23
|
-
}
|
|
22
|
+
"validate.email": "Invalid email address",
|
|
23
|
+
},
|
|
24
24
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Слушателей модуль не заводит, поэтому `destroy()` не нужен.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
const {I18n} = require("../chui_i18n/chui_i18n");
|
|
13
|
+
const { I18n } = require("../chui_i18n/chui_i18n");
|
|
14
14
|
|
|
15
15
|
/** Смещение символа в позицию «строка/столбец» (нумерация с единицы) */
|
|
16
16
|
function placeOf(text = String(), offset = Number()) {
|
|
@@ -20,7 +20,7 @@ function placeOf(text = String(), offset = Number()) {
|
|
|
20
20
|
const line = before.split("\n").length;
|
|
21
21
|
const last_break = before.lastIndexOf("\n");
|
|
22
22
|
const column = limit - last_break;
|
|
23
|
-
return {line: line, column: column, offset: limit};
|
|
23
|
+
return { line: line, column: column, offset: limit };
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/** Место ошибки из текста исключения `JSON.parse`; `undefined`, если движок места не назвал */
|
|
@@ -28,7 +28,7 @@ function errorPlace(message = String(), text = String()) {
|
|
|
28
28
|
const named = /\(line (\d+) column (\d+)\)/.exec(String(message));
|
|
29
29
|
if (named !== null) {
|
|
30
30
|
const offset = offsetOf(text, Number(named[1]), Number(named[2]));
|
|
31
|
-
return {line: Number(named[1]), column: Number(named[2]), offset: offset};
|
|
31
|
+
return { line: Number(named[1]), column: Number(named[2]), offset: offset };
|
|
32
32
|
}
|
|
33
33
|
const positioned = /at position (\d+)/.exec(String(message));
|
|
34
34
|
if (positioned !== null) return placeOf(text, Number(positioned[1]));
|
|
@@ -59,25 +59,25 @@ function cleanMessage(message = String()) {
|
|
|
59
59
|
function parse(text = String()) {
|
|
60
60
|
const value = text === undefined || text === null ? "" : String(text);
|
|
61
61
|
try {
|
|
62
|
-
return {ok: true, value: JSON.parse(value)};
|
|
62
|
+
return { ok: true, value: JSON.parse(value) };
|
|
63
63
|
} catch (error) {
|
|
64
64
|
const message = error instanceof Error ? error.message : String(error);
|
|
65
65
|
const place = errorPlace(message, value);
|
|
66
|
-
const result = {message: cleanMessage(message)};
|
|
66
|
+
const result = { message: cleanMessage(message) };
|
|
67
67
|
if (place !== undefined) {
|
|
68
68
|
result.line = place.line;
|
|
69
69
|
result.column = place.column;
|
|
70
70
|
result.offset = place.offset;
|
|
71
71
|
}
|
|
72
|
-
return {ok: false, error: result};
|
|
72
|
+
return { ok: false, error: result };
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/** Текст ошибки на языке интерфейса: с местом, если оно известно */
|
|
77
77
|
function errorText(error) {
|
|
78
78
|
if (error === undefined || error === null) return "";
|
|
79
|
-
if (error.line === undefined) return I18n.t("json.invalid", {message: error.message});
|
|
80
|
-
return I18n.t("json.invalidAt", {line: error.line, column: error.column, message: error.message});
|
|
79
|
+
if (error.line === undefined) return I18n.t("json.invalid", { message: error.message });
|
|
80
|
+
return I18n.t("json.invalidAt", { line: error.line, column: error.column, message: error.message });
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/** Красивый JSON (`indent` — число пробелов), иначе исходный текст */
|
|
@@ -101,5 +101,5 @@ exports.Json = {
|
|
|
101
101
|
offsetOf: offsetOf,
|
|
102
102
|
errorPlace: errorPlace,
|
|
103
103
|
format: format,
|
|
104
|
-
minify: minify
|
|
104
|
+
minify: minify,
|
|
105
105
|
};
|
|
@@ -21,7 +21,7 @@ const ROLE = {
|
|
|
21
21
|
ROUTE_VIEWS: "route_views",
|
|
22
22
|
NOTIFICATION_PANEL: "notification_panel",
|
|
23
23
|
NOTIFICATION_BOX: "notification_box",
|
|
24
|
-
NOTIFICATION_BOX_MAIN: "notification_box_main"
|
|
24
|
+
NOTIFICATION_BOX_MAIN: "notification_box_main",
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/** Узлы одного layout'а: роль → узел */
|
|
@@ -76,7 +76,7 @@ function unregisterLayout(layout = new LayoutRefs()) {
|
|
|
76
76
|
/** Layout, которому принадлежит узел, иначе — последний созданный */
|
|
77
77
|
function getLayout(scope = undefined) {
|
|
78
78
|
if (scope !== undefined && scope !== null) {
|
|
79
|
-
const owner = layouts.find(layout => layout.owns(scope));
|
|
79
|
+
const owner = layouts.find((layout) => layout.owns(scope));
|
|
80
80
|
if (owner !== undefined) return owner;
|
|
81
81
|
}
|
|
82
82
|
return layouts[layouts.length - 1];
|
|
@@ -92,15 +92,17 @@ function findLayoutNode(role = String(), scope = undefined) {
|
|
|
92
92
|
function requireLayoutNode(role = String(), scope = undefined) {
|
|
93
93
|
const node = findLayoutNode(role, scope);
|
|
94
94
|
if (node === undefined) {
|
|
95
|
-
throw new Error(
|
|
95
|
+
throw new Error(
|
|
96
|
+
`chui_layout: узел «${role}» не найден — layout не создан (new AppLayout()) или часть не зарегистрирована`
|
|
97
|
+
);
|
|
96
98
|
}
|
|
97
99
|
return node;
|
|
98
100
|
}
|
|
99
101
|
|
|
100
|
-
exports.LAYOUT_ROLE = ROLE
|
|
101
|
-
exports.LayoutRefs = LayoutRefs
|
|
102
|
-
exports.registerLayout = registerLayout
|
|
103
|
-
exports.unregisterLayout = unregisterLayout
|
|
104
|
-
exports.getLayout = getLayout
|
|
105
|
-
exports.findLayoutNode = findLayoutNode
|
|
106
|
-
exports.requireLayoutNode = requireLayoutNode
|
|
102
|
+
exports.LAYOUT_ROLE = ROLE;
|
|
103
|
+
exports.LayoutRefs = LayoutRefs;
|
|
104
|
+
exports.registerLayout = registerLayout;
|
|
105
|
+
exports.unregisterLayout = unregisterLayout;
|
|
106
|
+
exports.getLayout = getLayout;
|
|
107
|
+
exports.findLayoutNode = findLayoutNode;
|
|
108
|
+
exports.requireLayoutNode = requireLayoutNode;
|
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
const path = require(
|
|
2
|
-
const {app} = require("electron")
|
|
3
|
-
const fs= require(
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const { app } = require("electron");
|
|
3
|
+
const fs = require("fs");
|
|
4
4
|
|
|
5
5
|
class Logger {
|
|
6
|
-
constructor() {
|
|
6
|
+
constructor() {}
|
|
7
7
|
#generatedMessage(message, type = String()) {
|
|
8
|
-
let date = new Date().toLocaleString()
|
|
9
|
-
if (process && process.type ===
|
|
10
|
-
return `[${date}] [${type}] [render] > ${message}
|
|
8
|
+
let date = new Date().toLocaleString();
|
|
9
|
+
if (process && process.type === "renderer") {
|
|
10
|
+
return `[${date}] [${type}] [render] > ${message}`;
|
|
11
11
|
} else {
|
|
12
|
-
return `[${date}] [${type}] [main] > ${message}
|
|
12
|
+
return `[${date}] [${type}] [main] > ${message}`;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
info(message) {
|
|
16
|
-
const type = "info"
|
|
17
|
-
console.info(this.#generatedMessage(message, type))
|
|
18
|
-
if (process && process.type ===
|
|
19
|
-
require("electron").ipcRenderer.send("SEND_LOG_TEXT", this.#generatedMessage(message, type), type)
|
|
16
|
+
const type = "info";
|
|
17
|
+
console.info(this.#generatedMessage(message, type));
|
|
18
|
+
if (process && process.type === "renderer") {
|
|
19
|
+
require("electron").ipcRenderer.send("SEND_LOG_TEXT", this.#generatedMessage(message, type), type);
|
|
20
20
|
} else {
|
|
21
|
-
this.#writeLog(this.#generatedMessage(message, type))
|
|
21
|
+
this.#writeLog(this.#generatedMessage(message, type));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
error(message) {
|
|
25
|
-
const type = "error"
|
|
26
|
-
console.error(this.#generatedMessage(message, type))
|
|
27
|
-
if (process && process.type ===
|
|
28
|
-
require("electron").ipcRenderer.send("SEND_LOG_TEXT", this.#generatedMessage(message, type), type)
|
|
25
|
+
const type = "error";
|
|
26
|
+
console.error(this.#generatedMessage(message, type));
|
|
27
|
+
if (process && process.type === "renderer") {
|
|
28
|
+
require("electron").ipcRenderer.send("SEND_LOG_TEXT", this.#generatedMessage(message, type), type);
|
|
29
29
|
} else {
|
|
30
|
-
this.#writeLog(this.#generatedMessage(message, type))
|
|
30
|
+
this.#writeLog(this.#generatedMessage(message, type));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
#writeLog(text) {
|
|
34
|
-
let today = new Date().toLocaleDateString().replace("/", ".")
|
|
35
|
-
let log_dir_path = path.join(app.getPath("userData"), "logs")
|
|
36
|
-
let log_file_path = path.join(log_dir_path, `app_${today}.log`)
|
|
34
|
+
let today = new Date().toLocaleDateString().replace("/", ".");
|
|
35
|
+
let log_dir_path = path.join(app.getPath("userData"), "logs");
|
|
36
|
+
let log_file_path = path.join(log_dir_path, `app_${today}.log`);
|
|
37
37
|
|
|
38
38
|
if (!fs.existsSync(log_dir_path)) {
|
|
39
39
|
fs.mkdirSync(log_dir_path, { recursive: true });
|
|
40
40
|
fs.writeFileSync(log_file_path, "", "utf-8");
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
fs.writeFile(log_file_path, `${text}\n`, { flag:
|
|
43
|
+
fs.writeFile(log_file_path, `${text}\n`, { flag: "a+" }, (err) => {
|
|
44
44
|
if (err) console.error(err);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
class Log {
|
|
50
|
-
static info(message) {
|
|
51
|
-
|
|
50
|
+
static info(message) {
|
|
51
|
+
return new Logger().info(message);
|
|
52
|
+
}
|
|
53
|
+
static error(message) {
|
|
54
|
+
return new Logger().error(message);
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
exports.Log = Log
|
|
58
|
+
exports.Log = Log;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
let {Animation} = require(
|
|
2
|
-
const {Route} = require("../../appLayout/default/chui_app_layout");
|
|
3
|
-
const {Button} = require("../../components/chui_button/button");
|
|
4
|
-
const {Icon} = require("../../components/chui_icons/icons");
|
|
5
|
-
|
|
1
|
+
let { Animation } = require("../chui_animations/animations");
|
|
2
|
+
const { Route } = require("../../appLayout/default/chui_app_layout");
|
|
3
|
+
const { Button } = require("../../components/chui_button/button");
|
|
4
|
+
const { Icon } = require("../../components/chui_icons/icons");
|
|
6
5
|
|
|
7
6
|
class Page {
|
|
8
|
-
#page = document.createElement(
|
|
7
|
+
#page = document.createElement("page");
|
|
9
8
|
#title = undefined;
|
|
10
9
|
#icon = undefined;
|
|
11
10
|
#main = false;
|
|
12
11
|
#menu_bar = undefined;
|
|
13
12
|
constructor() {
|
|
14
|
-
require(
|
|
13
|
+
require("../chui_functions").setStyles(__dirname + "/styles.css", "chUiJS_Page");
|
|
15
14
|
}
|
|
16
15
|
setBackButton(options = { title: "", icon: undefined, reverse: false, page: undefined }) {
|
|
17
16
|
let back = new Button({
|
|
18
|
-
title: options.title,
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
title: options.title,
|
|
18
|
+
icon: options.icon,
|
|
19
|
+
reverse: options.reverse,
|
|
20
|
+
clickEvent: () => new Route().go(options.page),
|
|
21
|
+
});
|
|
21
22
|
this.#page.appendChild(back.set());
|
|
22
23
|
}
|
|
23
24
|
setMenuBar(menubar) {
|
|
@@ -27,29 +28,29 @@ class Page {
|
|
|
27
28
|
return this.#menu_bar;
|
|
28
29
|
}
|
|
29
30
|
addRouteEvent(self, event = () => {}) {
|
|
30
|
-
let event_name = "route_event_"+self.constructor.name
|
|
31
|
-
document.addEventListener(event_name, event)
|
|
32
|
-
setTimeout(() => document.removeEventListener(event_name, event), 100)
|
|
31
|
+
let event_name = "route_event_" + self.constructor.name;
|
|
32
|
+
document.addEventListener(event_name, event);
|
|
33
|
+
setTimeout(() => document.removeEventListener(event_name, event), 100);
|
|
33
34
|
}
|
|
34
35
|
add(...components) {
|
|
35
36
|
for (let component of components) {
|
|
36
|
-
new Animation(component.set()).fadeIn()
|
|
37
|
+
new Animation(component.set()).fadeIn();
|
|
37
38
|
this.#page.appendChild(component.set());
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
remove(...components) {
|
|
41
42
|
for (let component of components) {
|
|
42
|
-
new Animation(component.set()).fadeOutAndRemove()
|
|
43
|
+
new Animation(component.set()).fadeOutAndRemove();
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
setFullHeight() {
|
|
46
|
-
this.#page.style.height =
|
|
47
|
+
this.#page.style.height = "-webkit-fill-available";
|
|
47
48
|
}
|
|
48
49
|
setFullWidth() {
|
|
49
|
-
this.#page.style.width =
|
|
50
|
+
this.#page.style.width = "-webkit-fill-available";
|
|
50
51
|
}
|
|
51
52
|
disablePadding() {
|
|
52
|
-
this.#page.style.padding =
|
|
53
|
+
this.#page.style.padding = "0px";
|
|
53
54
|
}
|
|
54
55
|
setIcon(icon) {
|
|
55
56
|
this.#icon = new Icon(icon, "13pt").getHTML();
|
|
@@ -69,19 +70,24 @@ class Page {
|
|
|
69
70
|
getMain() {
|
|
70
71
|
return this.#main;
|
|
71
72
|
}
|
|
72
|
-
getMediaStream(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
getMediaStream(
|
|
74
|
+
options = {
|
|
75
|
+
video: false, // or { width: 1280, height: 720 }
|
|
76
|
+
audio: false,
|
|
77
|
+
}
|
|
78
|
+
) {
|
|
76
79
|
return new Promise((resolve, reject) => {
|
|
77
|
-
navigator.mediaDevices
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
navigator.mediaDevices
|
|
81
|
+
.getUserMedia(options)
|
|
82
|
+
.then((stream) => {
|
|
83
|
+
resolve(stream);
|
|
84
|
+
})
|
|
85
|
+
.catch(reject);
|
|
86
|
+
});
|
|
81
87
|
}
|
|
82
88
|
render() {
|
|
83
89
|
return this.#page;
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
|
|
87
|
-
exports.Page = Page
|
|
93
|
+
exports.Page = Page;
|
|
@@ -9,29 +9,6 @@ page {
|
|
|
9
9
|
align-items: baseline;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
page_title {
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
gap: 10px;
|
|
19
|
-
/* Без собственных отступов: text заголовка стоит по тому же вертикали, что и блоки
|
|
20
|
-
ниже, — иначе он выезжает на 2px вправо и левый край страницы ломается */
|
|
21
|
-
margin: 0 0 calc(10px * var(--density)) 0;
|
|
22
|
-
padding: 0;
|
|
23
|
-
font-size: var(--font_lead_size);
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
color: var(--text_color);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
page_title chui_icon {
|
|
29
|
-
color: var(--link_color);
|
|
30
|
-
/* Кегль значка — как у подписи: при 20px глиф перетягивал строку */
|
|
31
|
-
font-size: var(--font_lead_size);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* Страница без заголовка не держит пустую строку */
|
|
35
|
-
page_title:empty {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
12
|
+
/* Вид заголовка страницы держит шапка (`page_name` в global_style.css): оболочка
|
|
13
|
+
в содержимое ничего не подмешивает (`Route#go`), поэтому страница начинается
|
|
14
|
+
со своих блоков, а видимый заголовок рисует приложение само */
|