chuijs 4.0.3 → 4.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/CHANGELOG.md +536 -0
- package/framework/appLayout/default/chui_app_layout.js +361 -303
- package/framework/appLayout/default/global_style.css +243 -89
- package/framework/appLayout/default/main_theme_style.css +188 -101
- package/framework/components/chui_accordion/accordion.js +17 -17
- package/framework/components/chui_accordion/styles.css +7 -7
- package/framework/components/chui_action_sheet/action_sheet.js +35 -32
- package/framework/components/chui_action_sheet/styles.css +10 -4
- package/framework/components/chui_actions_bar/actions_bar.js +338 -0
- package/framework/components/chui_actions_bar/styles.css +139 -0
- package/framework/components/chui_affix/affix.js +4 -4
- package/framework/components/chui_affix/styles.css +5 -0
- package/framework/components/chui_alert/alert.js +11 -5
- package/framework/components/chui_alert/styles.css +7 -0
- package/framework/components/chui_avatar/avatar.js +13 -13
- package/framework/components/chui_avatar/styles.css +1 -1
- package/framework/components/chui_avatar_group/avatar_group.js +4 -4
- package/framework/components/chui_avatar_group/styles.css +1 -1
- package/framework/components/chui_backtop/backtop.js +25 -2
- package/framework/components/chui_backtop/styles.css +21 -0
- package/framework/components/chui_badge/badge.js +15 -15
- package/framework/components/chui_badge/styles.css +6 -6
- package/framework/components/chui_banner/banner.js +222 -0
- package/framework/components/chui_banner/styles.css +170 -0
- package/framework/components/chui_breadcrumb/styles.css +1 -1
- package/framework/components/chui_button/button.js +24 -28
- package/framework/components/chui_button/styles.css +5 -5
- package/framework/components/chui_calendar/calendar.js +6 -6
- package/framework/components/chui_card/card.js +14 -14
- package/framework/components/chui_card_scroll/card_scroll.js +169 -0
- package/framework/components/chui_card_scroll/styles.css +86 -0
- package/framework/components/chui_chat/chat.js +73 -51
- package/framework/components/chui_chat/styles.css +18 -7
- package/framework/components/chui_clipboard_history/clipboard_history.js +25 -20
- package/framework/components/chui_clipboard_history/styles.css +10 -8
- package/framework/components/chui_code/code.js +8 -8
- package/framework/components/chui_code/styles.css +2 -2
- package/framework/components/chui_code_editor/code_editor.js +26 -26
- package/framework/components/chui_code_editor/styles.css +3 -3
- package/framework/components/chui_command_palette/command_palette.js +29 -29
- package/framework/components/chui_command_palette/styles.css +5 -5
- package/framework/components/chui_console/console.js +9 -9
- package/framework/components/chui_console/styles.css +5 -2
- package/framework/components/chui_content_block/content_block.js +2 -2
- package/framework/components/chui_context_menu/context_menu.js +162 -54
- package/framework/components/chui_context_menu/styles.css +82 -8
- package/framework/components/chui_custom_element/custom_element.js +11 -11
- package/framework/components/chui_data_grid/data_grid.js +268 -268
- package/framework/components/chui_data_grid/styles.css +14 -14
- package/framework/components/chui_descriptions/styles.css +1 -1
- package/framework/components/chui_details/details.js +12 -12
- package/framework/components/chui_details/styles.css +7 -7
- package/framework/components/chui_diff_viewer/diff_viewer.js +88 -88
- package/framework/components/chui_diff_viewer/styles.css +9 -9
- package/framework/components/chui_divider/divider.js +6 -6
- package/framework/components/chui_divider/styles.css +2 -2
- package/framework/components/chui_drawer/drawer.js +37 -14
- package/framework/components/chui_drawer/styles.css +18 -4
- package/framework/components/chui_drop_zone/drop_zone.js +6 -6
- package/framework/components/chui_drop_zone/styles.css +10 -6
- package/framework/components/chui_fieldset/fieldset.js +6 -6
- package/framework/components/chui_fieldset/styles.css +5 -5
- package/framework/components/chui_file_explorer/file_explorer.js +115 -115
- package/framework/components/chui_file_explorer/styles.css +6 -6
- package/framework/components/chui_form/form.js +11 -11
- package/framework/components/chui_gantt/gantt.js +41 -41
- package/framework/components/chui_gantt/styles.css +5 -5
- package/framework/components/chui_graphs/graphs.js +82 -46
- package/framework/components/chui_graphs/styles.css +26 -5
- package/framework/components/chui_hero/hero.js +63 -20
- package/framework/components/chui_hero/styles.css +176 -7
- package/framework/components/chui_html_block/html_block.js +5 -5
- package/framework/components/chui_html_block/styles.css +1 -1
- package/framework/components/chui_hx/styles.css +2 -2
- package/framework/components/chui_icons/icons.js +7 -7
- package/framework/components/chui_icons/styles.css +2 -1
- package/framework/components/chui_inputs/chui_check_box/styles.css +12 -3
- package/framework/components/chui_inputs/chui_chips/chips.js +92 -31
- package/framework/components/chui_inputs/chui_chips/styles.css +28 -5
- package/framework/components/chui_inputs/chui_color_picker/color_picker.js +20 -15
- package/framework/components/chui_inputs/chui_color_picker/styles.css +7 -7
- package/framework/components/chui_inputs/chui_combo_box/combo_box.js +58 -58
- package/framework/components/chui_inputs/chui_combo_box/styles.css +9 -9
- package/framework/components/chui_inputs/chui_date/date.js +93 -95
- package/framework/components/chui_inputs/chui_date/styles.css +8 -8
- package/framework/components/chui_inputs/chui_date_range/date_range.js +22 -22
- package/framework/components/chui_inputs/chui_date_range/styles.css +3 -3
- package/framework/components/chui_inputs/chui_datetime/datetime.js +12 -12
- package/framework/components/chui_inputs/chui_datetime/styles.css +3 -3
- package/framework/components/chui_inputs/chui_email/email.js +10 -10
- package/framework/components/chui_inputs/chui_email/styles.css +6 -6
- package/framework/components/chui_inputs/chui_file/file.js +8 -8
- package/framework/components/chui_inputs/chui_file/styles.css +12 -9
- package/framework/components/chui_inputs/chui_hotkey/hotkey.js +39 -39
- package/framework/components/chui_inputs/chui_hotkey/styles.css +6 -6
- package/framework/components/chui_inputs/chui_masked/masked.js +44 -44
- package/framework/components/chui_inputs/chui_masked/styles.css +5 -5
- package/framework/components/chui_inputs/chui_mention/mention.js +13 -13
- package/framework/components/chui_inputs/chui_mention/styles.css +14 -8
- package/framework/components/chui_inputs/chui_multi_combo_box/multi_combo_box.js +147 -137
- package/framework/components/chui_inputs/chui_multi_combo_box/styles.css +14 -8
- package/framework/components/chui_inputs/chui_number/number.js +42 -45
- package/framework/components/chui_inputs/chui_number/styles.css +6 -6
- package/framework/components/chui_inputs/chui_otp/otp.js +32 -32
- package/framework/components/chui_inputs/chui_otp/styles.css +5 -5
- package/framework/components/chui_inputs/chui_password/password.js +30 -36
- package/framework/components/chui_inputs/chui_password/styles.css +7 -7
- package/framework/components/chui_inputs/chui_radio_button/styles.css +2 -2
- package/framework/components/chui_inputs/chui_rating/rating.js +28 -28
- package/framework/components/chui_inputs/chui_rating/styles.css +3 -3
- package/framework/components/chui_inputs/chui_select_box/select_box.js +54 -54
- package/framework/components/chui_inputs/chui_select_box/styles.css +10 -10
- package/framework/components/chui_inputs/chui_slider/slider.js +14 -14
- package/framework/components/chui_inputs/chui_slider/styles.css +5 -4
- package/framework/components/chui_inputs/chui_text/styles.css +7 -7
- package/framework/components/chui_inputs/chui_text/text.js +13 -17
- package/framework/components/chui_inputs/chui_text_area/styles.css +8 -8
- package/framework/components/chui_inputs/chui_text_area/text_area.js +23 -23
- package/framework/components/chui_inputs/chui_time/styles.css +13 -17
- package/framework/components/chui_inputs/chui_time/time.js +35 -24
- package/framework/components/chui_inputs/chui_toggle/styles.css +10 -3
- package/framework/components/chui_inputs/chui_toggle/toggle.js +16 -16
- package/framework/components/chui_json_editor/json_editor.js +87 -87
- package/framework/components/chui_json_editor/styles.css +5 -5
- package/framework/components/chui_json_viewer/json_viewer.js +80 -80
- package/framework/components/chui_json_viewer/styles.css +6 -6
- package/framework/components/chui_kanban/kanban.js +27 -27
- package/framework/components/chui_kanban/styles.css +8 -4
- package/framework/components/chui_kbd/styles.css +1 -1
- package/framework/components/chui_label/label.js +17 -17
- package/framework/components/chui_label/styles.css +1 -1
- package/framework/components/chui_link/link.js +9 -9
- package/framework/components/chui_link/styles.css +11 -4
- package/framework/components/chui_list/list.js +11 -11
- package/framework/components/chui_list/styles.css +2 -2
- package/framework/components/chui_markdown_editor/markdown_editor.js +66 -66
- package/framework/components/chui_markdown_editor/styles.css +5 -5
- package/framework/components/chui_media/audio.js +240 -246
- package/framework/components/chui_media/audio_styles.css +41 -23
- package/framework/components/chui_media/image.js +49 -46
- package/framework/components/chui_media/image_compare.js +35 -35
- package/framework/components/chui_media/image_compare_styles.css +5 -5
- package/framework/components/chui_media/image_styles.css +1 -1
- package/framework/components/chui_media/video.js +148 -148
- package/framework/components/chui_media/video_styles.css +27 -11
- package/framework/components/chui_menu_bar/menu_bar.js +54 -54
- package/framework/components/chui_menu_bar/styles.css +10 -10
- package/framework/components/chui_message_bar/message_bar.js +551 -0
- package/framework/components/chui_message_bar/styles.css +248 -0
- package/framework/components/chui_modal/modal.js +37 -13
- package/framework/components/chui_notification/notification.js +76 -54
- package/framework/components/chui_notification/notification_download.js +26 -81
- package/framework/components/chui_notification/notification_download_card.js +115 -0
- package/framework/components/chui_notification/notification_download_progress.css +2 -2
- package/framework/components/chui_notification/notification_download_progress.js +70 -108
- package/framework/components/chui_notification/notification_update.js +31 -31
- package/framework/components/chui_notification/status_plate.css +3 -3
- package/framework/components/chui_notification/styles.css +6 -1
- package/framework/components/chui_notification/styles_download.css +1 -1
- package/framework/components/chui_notification/styles_update.css +2 -2
- package/framework/components/chui_org_chart/org_chart.js +29 -29
- package/framework/components/chui_org_chart/styles.css +2 -2
- package/framework/components/chui_pagination/pagination.js +3 -3
- package/framework/components/chui_pagination/styles.css +1 -1
- package/framework/components/chui_paragraph/styles.css +2 -2
- package/framework/components/chui_popover/popover.js +29 -23
- package/framework/components/chui_popover/styles.css +1 -1
- package/framework/components/chui_popups/popups.js +124 -124
- package/framework/components/chui_popups/styles.css +5 -5
- package/framework/components/chui_print_button/print_button.js +15 -10
- package/framework/components/chui_progress_bar/progress_bar.js +34 -12
- package/framework/components/chui_progress_bar/styles.css +4 -4
- package/framework/components/chui_progress_ring/progress_ring.js +15 -15
- package/framework/components/chui_progress_ring/styles.css +1 -1
- package/framework/components/chui_qrcode/qrcode.js +12 -12
- package/framework/components/chui_query_builder/query_builder.js +46 -46
- package/framework/components/chui_query_builder/styles.css +4 -4
- package/framework/components/chui_radio_group/styles.css +1 -1
- package/framework/components/chui_result/result.js +15 -15
- package/framework/components/chui_result/styles.css +3 -3
- package/framework/components/chui_scheduler/scheduler.js +74 -74
- package/framework/components/chui_scheduler/styles.css +5 -5
- package/framework/components/chui_screen_spinner/screen_spinner.js +167 -0
- package/framework/components/chui_screen_spinner/styles.css +49 -0
- package/framework/components/chui_segmented_control/segmented_control.js +63 -6
- package/framework/components/chui_segmented_control/styles.css +32 -6
- package/framework/components/chui_settings/settings.js +45 -46
- package/framework/components/chui_settings/styles.css +4 -4
- package/framework/components/chui_shortcut_help/shortcut_help.js +32 -34
- package/framework/components/chui_sidebar_nav/sidebar_nav.js +98 -29
- package/framework/components/chui_sidebar_nav/styles.css +9 -3
- package/framework/components/chui_slideshow/slideshow.js +85 -85
- package/framework/components/chui_slideshow/styles.css +6 -6
- package/framework/components/chui_spinner/spinner.js +10 -10
- package/framework/components/chui_split_button/split_button.js +30 -12
- package/framework/components/chui_split_button/styles.css +21 -5
- package/framework/components/chui_splitter/splitter.js +11 -11
- package/framework/components/chui_splitter/styles.css +2 -2
- package/framework/components/chui_statistic/statistic.js +47 -47
- package/framework/components/chui_status_bar/styles.css +2 -2
- package/framework/components/chui_stepper/stepper.js +202 -31
- package/framework/components/chui_stepper/styles.css +79 -14
- package/framework/components/chui_sticky_bar/sticky_bar.js +44 -13
- package/framework/components/chui_sticky_bar/styles.css +10 -8
- package/framework/components/chui_tabs/chui_tabs.js +74 -26
- package/framework/components/chui_tabs/styles.css +40 -12
- package/framework/components/chui_text_editor/styles.css +7 -7
- package/framework/components/chui_text_editor/text_editor.js +56 -56
- package/framework/components/chui_text_editor/text_editor_panel.js +173 -174
- package/framework/components/chui_theme_toggle/theme_toggle.js +21 -5
- package/framework/components/chui_timeline/styles.css +3 -1
- package/framework/components/chui_toast_queue/styles.css +11 -11
- package/framework/components/chui_toast_queue/toast_queue.js +30 -27
- package/framework/components/chui_toolbar/styles.css +2 -2
- package/framework/components/chui_tooltip/styles.css +2 -2
- package/framework/components/chui_tooltip/tooltip.js +3 -3
- package/framework/components/chui_tour/styles.css +8 -8
- package/framework/components/chui_tour/tour.js +72 -72
- package/framework/components/chui_transfer/styles.css +6 -6
- package/framework/components/chui_transfer/transfer.js +93 -106
- package/framework/components/chui_tree_table/styles.css +4 -4
- package/framework/components/chui_tree_table/tree_table.js +45 -45
- package/framework/components/chui_tree_view/styles.css +10 -8
- package/framework/components/chui_tree_view/tree_view.js +185 -183
- package/framework/components/chui_user_bar/styles.css +145 -0
- package/framework/components/chui_user_bar/user_bar.js +402 -0
- package/framework/components/chui_user_list_bar/styles.css +173 -0
- package/framework/components/chui_user_list_bar/user_list_bar.js +485 -0
- package/framework/components/chui_watermark/watermark.js +17 -17
- package/framework/components/chui_webview/webview.js +9 -9
- package/framework/components/chui_write_bar/styles.css +172 -0
- package/framework/components/chui_write_bar/write_bar.js +320 -0
- package/framework/main_window.js +1234 -0
- package/framework/modules/chui_a11y/chui_a11y.js +78 -79
- package/framework/modules/chui_animations/animations.js +77 -15
- package/framework/modules/chui_animations/motion.js +120 -0
- package/framework/modules/chui_animations/styles.css +36 -3
- package/framework/modules/chui_functions.js +31 -27
- package/framework/modules/chui_highlight/styles.css +13 -10
- package/framework/modules/chui_i18n/chui_i18n.js +3 -3
- package/framework/modules/chui_i18n/locales/feedback.js +62 -0
- package/framework/modules/chui_i18n/locales/navigation.js +4 -0
- package/framework/modules/chui_json/chui_json.js +2 -2
- package/framework/modules/chui_logger/chui_logger.js +23 -8
- package/framework/modules/chui_page/page.js +10 -10
- package/framework/modules/chui_palette/palette.js +61 -0
- package/framework/modules/chui_qr/chui_qr.js +23 -23
- package/framework/modules/chui_scrollbar/chui_scrollbar.js +45 -45
- package/framework/modules/chui_scrollbar/styles.css +3 -3
- package/framework/modules/chui_services/chui_services.js +8 -8
- package/framework/modules/chui_services/desktop.js +77 -71
- package/framework/modules/chui_sortable/chui_sortable.js +17 -17
- package/framework/modules/chui_validate/chui_validate.js +3 -3
- package/framework/tray_bar/chui_menu_items.js +2 -2
- package/index.d.ts +266 -34
- package/index.js +20 -1168
- package/package.json +6 -4
- package/framework/components/telegram_bot/chui_telegram_bot.js +0 -191
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
|
-
const
|
|
2
|
+
const nodePath = require("path");
|
|
3
3
|
const { setStyles, formatBytes, optionOr } = require("../../modules/chui_functions");
|
|
4
4
|
const { Icon, Icons } = require("../chui_icons/icons");
|
|
5
5
|
const { Breadcrumb } = require("../chui_breadcrumb/breadcrumb");
|
|
@@ -73,12 +73,12 @@ class FileExplorer {
|
|
|
73
73
|
#up = document.createElement("button");
|
|
74
74
|
#refresh = document.createElement("button");
|
|
75
75
|
#search = document.createElement("input");
|
|
76
|
-
#
|
|
77
|
-
#
|
|
76
|
+
#searchBox = document.createElement("file_explorer_search_box");
|
|
77
|
+
#searchClear = document.createElement("button");
|
|
78
78
|
#hidden = document.createElement("button");
|
|
79
|
-
#
|
|
79
|
+
#pathBar = undefined;
|
|
80
80
|
#grid = document.createElement("file_explorer_grid");
|
|
81
|
-
#
|
|
81
|
+
#headRow = document.createElement("file_explorer_head_row");
|
|
82
82
|
#body = document.createElement("file_explorer_body");
|
|
83
83
|
#empty = document.createElement("file_explorer_empty");
|
|
84
84
|
#error = document.createElement("file_explorer_error");
|
|
@@ -86,30 +86,30 @@ class FileExplorer {
|
|
|
86
86
|
#id = undefined;
|
|
87
87
|
#provider = undefined;
|
|
88
88
|
#path = "";
|
|
89
|
-
#
|
|
89
|
+
#rootPath = undefined;
|
|
90
90
|
#history = [];
|
|
91
|
-
#
|
|
91
|
+
#historyIndex = -1;
|
|
92
92
|
#entries = [];
|
|
93
93
|
#selected = new Set();
|
|
94
94
|
#anchor = undefined;
|
|
95
95
|
#filter = "";
|
|
96
96
|
#sort = { key: SORT.NAME, direction: DIRECTION.ASC };
|
|
97
|
-
#
|
|
97
|
+
#showHidden = false;
|
|
98
98
|
#loading = false;
|
|
99
|
-
#
|
|
100
|
-
#
|
|
99
|
+
#loadToken = 0;
|
|
100
|
+
#errorObject = undefined;
|
|
101
101
|
#selectable = true;
|
|
102
|
-
#
|
|
103
|
-
#
|
|
102
|
+
#showSize = true;
|
|
103
|
+
#showModified = true;
|
|
104
104
|
#height = "300px";
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
#
|
|
105
|
+
#titleText = undefined;
|
|
106
|
+
#labelText = undefined;
|
|
107
|
+
#emptyText = undefined;
|
|
108
|
+
#activePath = undefined;
|
|
109
|
+
#focusPath = undefined;
|
|
110
110
|
#listeners = [];
|
|
111
|
-
#
|
|
112
|
-
#
|
|
111
|
+
#onOpen = undefined;
|
|
112
|
+
#onSelect = undefined;
|
|
113
113
|
#roving = undefined;
|
|
114
114
|
|
|
115
115
|
constructor(
|
|
@@ -139,17 +139,17 @@ class FileExplorer {
|
|
|
139
139
|
this.#id = options.id === undefined ? `chui_file_explorer_${FileExplorer.#counter}` : options.id;
|
|
140
140
|
this.#root.id = this.#id;
|
|
141
141
|
this.#root.setAttribute("role", "group");
|
|
142
|
-
this.#
|
|
142
|
+
this.#labelText = options.label;
|
|
143
143
|
this.#provider = typeof options.provider === "function" ? options.provider : FileExplorer.localProvider();
|
|
144
|
-
this.#
|
|
144
|
+
this.#rootPath = options.root === undefined ? undefined : String(options.root);
|
|
145
145
|
this.#selectable = options.selectable !== false;
|
|
146
|
-
this.#
|
|
147
|
-
this.#
|
|
148
|
-
this.#
|
|
149
|
-
this.#
|
|
150
|
-
this.#
|
|
151
|
-
if (options.emptyText !== undefined) this.#
|
|
152
|
-
else this.#
|
|
146
|
+
this.#showSize = options.showSize !== false;
|
|
147
|
+
this.#showModified = options.showModified !== false;
|
|
148
|
+
this.#showHidden = options.showHidden === true;
|
|
149
|
+
this.#onOpen = options.onOpen;
|
|
150
|
+
this.#onSelect = options.onSelect;
|
|
151
|
+
if (options.emptyText !== undefined) this.#emptyText = String(options.emptyText);
|
|
152
|
+
else this.#emptyText = I18n.t("fileExplorer.empty");
|
|
153
153
|
if (options.filter !== undefined) this.#filter = String(options.filter);
|
|
154
154
|
this.#title.className = "file_explorer_title";
|
|
155
155
|
this.#title.id = `${this.#id}_title`;
|
|
@@ -159,8 +159,8 @@ class FileExplorer {
|
|
|
159
159
|
this.#actions.className = "file_explorer_actions";
|
|
160
160
|
this.#grid.className = "file_explorer_grid";
|
|
161
161
|
this.#grid.setAttribute("role", "grid");
|
|
162
|
-
this.#
|
|
163
|
-
this.#
|
|
162
|
+
this.#headRow.className = "file_explorer_head_row";
|
|
163
|
+
this.#headRow.setAttribute("role", "row");
|
|
164
164
|
this.#body.className = "file_explorer_body";
|
|
165
165
|
this.#body.setAttribute("role", "rowgroup");
|
|
166
166
|
this.#empty.className = "file_explorer_empty";
|
|
@@ -171,12 +171,12 @@ class FileExplorer {
|
|
|
171
171
|
this.#status.setAttribute("role", "status");
|
|
172
172
|
this.#status.setAttribute("aria-live", "polite");
|
|
173
173
|
this.#buildHead();
|
|
174
|
-
this.#
|
|
175
|
-
this.#
|
|
174
|
+
this.#pathBar = new Breadcrumb({ label: I18n.t("fileExplorer.path") });
|
|
175
|
+
this.#pathBar.set().classList.add("file_explorer_path");
|
|
176
176
|
this.#root.appendChild(this.#title);
|
|
177
177
|
this.#root.appendChild(this.#head);
|
|
178
|
-
this.#root.appendChild(this.#
|
|
179
|
-
this.#grid.appendChild(this.#
|
|
178
|
+
this.#root.appendChild(this.#pathBar.set());
|
|
179
|
+
this.#grid.appendChild(this.#headRow);
|
|
180
180
|
this.#grid.appendChild(this.#body);
|
|
181
181
|
this.#root.appendChild(this.#grid);
|
|
182
182
|
this.#root.appendChild(this.#empty);
|
|
@@ -191,9 +191,9 @@ class FileExplorer {
|
|
|
191
191
|
this.refreshSearch();
|
|
192
192
|
// Сортировка применяется только теперь: `setSort()` перерисовывает список, а строку пути
|
|
193
193
|
// и прочие узлы разметки он застал бы ещё не созданными
|
|
194
|
-
const
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
194
|
+
const sortKey = optionOr(options.sort === undefined ? undefined : options.sort.key, undefined);
|
|
195
|
+
const sortDirection = optionOr(options.sort === undefined ? undefined : options.sort.direction, undefined);
|
|
196
|
+
if (sortKey !== undefined || sortDirection !== undefined) this.setSort(sortKey, sortDirection);
|
|
197
197
|
this.#grid.addEventListener("keydown", this.#onKeyDown);
|
|
198
198
|
this.#grid.addEventListener("click", this.#onClick);
|
|
199
199
|
this.#grid.addEventListener("dblclick", this.#onDoubleClick);
|
|
@@ -208,7 +208,7 @@ class FileExplorer {
|
|
|
208
208
|
return (path) => {
|
|
209
209
|
const list = fs.readdirSync(String(path), { withFileTypes: true });
|
|
210
210
|
return list.map((entry) => {
|
|
211
|
-
const full =
|
|
211
|
+
const full = nodePath.join(String(path), entry.name);
|
|
212
212
|
let size;
|
|
213
213
|
let modified;
|
|
214
214
|
try {
|
|
@@ -238,11 +238,11 @@ class FileExplorer {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
getTitle() {
|
|
241
|
-
return this.#
|
|
241
|
+
return this.#titleText;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
getLabel() {
|
|
245
|
-
return this.#
|
|
245
|
+
return this.#labelText;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
/** Текущая папка */
|
|
@@ -252,7 +252,7 @@ class FileExplorer {
|
|
|
252
252
|
|
|
253
253
|
/** Корень навигации (`undefined` — подниматься можно до корня пути) */
|
|
254
254
|
getRoot() {
|
|
255
|
-
return this.#
|
|
255
|
+
return this.#rootPath;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
/** Все загруженные записи текущей папки (со скрытыми), в исходном порядке провайдера */
|
|
@@ -288,7 +288,7 @@ class FileExplorer {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
isShowHidden() {
|
|
291
|
-
return this.#
|
|
291
|
+
return this.#showHidden;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
isSelectable() {
|
|
@@ -304,33 +304,33 @@ class FileExplorer {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
getEmptyText() {
|
|
307
|
-
return this.#
|
|
307
|
+
return this.#emptyText;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
/** Текст ошибки чтения (пустая строка, если папка прочитана) */
|
|
311
311
|
getErrorText() {
|
|
312
|
-
if (this.#
|
|
313
|
-
const message = this.#
|
|
312
|
+
if (this.#errorObject === undefined) return "";
|
|
313
|
+
const message = this.#errorObject instanceof Error ? this.#errorObject.message : String(this.#errorObject);
|
|
314
314
|
return I18n.t("fileExplorer.readFailed", { message: message });
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
/** История переходов и место в ней — для кнопок «назад/вперёд» */
|
|
318
318
|
getHistory() {
|
|
319
|
-
return { paths: [...this.#history], index: this.#
|
|
319
|
+
return { paths: [...this.#history], index: this.#historyIndex };
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
canGoBack() {
|
|
323
|
-
return this.#
|
|
323
|
+
return this.#historyIndex > 0;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
canGoForward() {
|
|
327
|
-
return this.#
|
|
327
|
+
return this.#historyIndex >= 0 && this.#historyIndex < this.#history.length - 1;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
/** Выше корня (или выше самого верхнего уровня пути) подняться нельзя */
|
|
331
331
|
canGoUp() {
|
|
332
332
|
if (this.#path === "") return false;
|
|
333
|
-
if (this.#
|
|
333
|
+
if (this.#rootPath !== undefined && this.#path === this.#rootPath.replace(/[\\/]+$/, "")) return false;
|
|
334
334
|
return FileExplorer.#parentOf(this.#path) !== undefined;
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -344,7 +344,7 @@ class FileExplorer {
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
setTitle(text = undefined) {
|
|
347
|
-
this.#
|
|
347
|
+
this.#titleText = text;
|
|
348
348
|
if (text === undefined || text === "") {
|
|
349
349
|
this.#title.hidden = true;
|
|
350
350
|
this.#title.innerText = "";
|
|
@@ -358,7 +358,7 @@ class FileExplorer {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
setLabel(text = undefined) {
|
|
361
|
-
this.#
|
|
361
|
+
this.#labelText = text;
|
|
362
362
|
this.#syncLabel();
|
|
363
363
|
return this;
|
|
364
364
|
}
|
|
@@ -370,7 +370,7 @@ class FileExplorer {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
setEmptyText(text = String()) {
|
|
373
|
-
this.#
|
|
373
|
+
this.#emptyText = text === undefined ? "" : String(text);
|
|
374
374
|
this.#render();
|
|
375
375
|
return this;
|
|
376
376
|
}
|
|
@@ -402,16 +402,16 @@ class FileExplorer {
|
|
|
402
402
|
if (column !== undefined && Object.values(SORT).includes(column)) this.#sort.key = column;
|
|
403
403
|
if (order !== undefined && Object.values(DIRECTION).includes(order)) this.#sort.direction = order;
|
|
404
404
|
// До конца сборки разметки перерисовывать нечего (вызов из конструктора)
|
|
405
|
-
if (this.#
|
|
405
|
+
if (this.#pathBar !== undefined) this.#render();
|
|
406
406
|
return this;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
setShowHidden(shown = Boolean()) {
|
|
410
|
-
this.#
|
|
411
|
-
this.#hidden.setAttribute("aria-pressed", this.#
|
|
410
|
+
this.#showHidden = shown === true;
|
|
411
|
+
this.#hidden.setAttribute("aria-pressed", this.#showHidden ? "true" : "false");
|
|
412
412
|
this.#hidden.setAttribute(
|
|
413
413
|
"aria-label",
|
|
414
|
-
this.#
|
|
414
|
+
this.#showHidden ? I18n.t("fileExplorer.hideHidden") : I18n.t("fileExplorer.showHidden")
|
|
415
415
|
);
|
|
416
416
|
this.#render();
|
|
417
417
|
this.#announceState();
|
|
@@ -439,7 +439,7 @@ class FileExplorer {
|
|
|
439
439
|
if (entry === undefined || entry === null) return this;
|
|
440
440
|
if (entry.type === TYPE.FOLDER) return this.go(entry.path);
|
|
441
441
|
this.#announce(I18n.t("fileExplorer.openedFile", { name: entry.name }));
|
|
442
|
-
if (this.#
|
|
442
|
+
if (this.#onOpen !== undefined) this.#onOpen(Object.assign({}, entry), this);
|
|
443
443
|
return this;
|
|
444
444
|
}
|
|
445
445
|
|
|
@@ -452,8 +452,8 @@ class FileExplorer {
|
|
|
452
452
|
/** Загрузка папки: промис разрешается, когда данные пришли (устаревший ответ отбрасывается) */
|
|
453
453
|
async load(path = String(), options = { history: true, keepSelection: false }) {
|
|
454
454
|
const target = path === undefined || path === null || path === "" ? this.#path : String(path);
|
|
455
|
-
const token = this.#
|
|
456
|
-
this.#
|
|
455
|
+
const token = this.#loadToken + 1;
|
|
456
|
+
this.#loadToken = token;
|
|
457
457
|
this.#loading = true;
|
|
458
458
|
this.#grid.setAttribute("aria-busy", "true");
|
|
459
459
|
this.#status.innerText = I18n.t("fileExplorer.loading", { target: target });
|
|
@@ -461,10 +461,10 @@ class FileExplorer {
|
|
|
461
461
|
try {
|
|
462
462
|
list = await Promise.resolve(this.#provider(target));
|
|
463
463
|
} catch (error) {
|
|
464
|
-
if (token !== this.#
|
|
464
|
+
if (token !== this.#loadToken) return this;
|
|
465
465
|
this.#loading = false;
|
|
466
466
|
this.#entries = [];
|
|
467
|
-
this.#
|
|
467
|
+
this.#errorObject = error;
|
|
468
468
|
this.#path = target;
|
|
469
469
|
this.#render();
|
|
470
470
|
this.#announce(
|
|
@@ -472,15 +472,15 @@ class FileExplorer {
|
|
|
472
472
|
);
|
|
473
473
|
return this;
|
|
474
474
|
}
|
|
475
|
-
if (token !== this.#
|
|
475
|
+
if (token !== this.#loadToken) return this;
|
|
476
476
|
this.#entries = FileExplorer.#normalize(list, target);
|
|
477
|
-
this.#
|
|
477
|
+
this.#errorObject = undefined;
|
|
478
478
|
this.#loading = false;
|
|
479
479
|
this.#path = target;
|
|
480
480
|
if (options.keepSelection !== true) this.#selected.clear();
|
|
481
481
|
if (options.history !== false) {
|
|
482
|
-
this.#history = this.#history.slice(0, this.#
|
|
483
|
-
this.#
|
|
482
|
+
this.#history = this.#history.slice(0, this.#historyIndex + 1).concat([target]);
|
|
483
|
+
this.#historyIndex = this.#history.length - 1;
|
|
484
484
|
}
|
|
485
485
|
this.#render();
|
|
486
486
|
this.#announceState();
|
|
@@ -489,14 +489,14 @@ class FileExplorer {
|
|
|
489
489
|
|
|
490
490
|
back() {
|
|
491
491
|
if (!this.canGoBack()) return this;
|
|
492
|
-
this.#
|
|
493
|
-
return this.load(this.#history[this.#
|
|
492
|
+
this.#historyIndex -= 1;
|
|
493
|
+
return this.load(this.#history[this.#historyIndex], { history: false });
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
forward() {
|
|
497
497
|
if (!this.canGoForward()) return this;
|
|
498
|
-
this.#
|
|
499
|
-
return this.load(this.#history[this.#
|
|
498
|
+
this.#historyIndex += 1;
|
|
499
|
+
return this.load(this.#history[this.#historyIndex], { history: false });
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
/** На уровень выше; выше корня не поднимаемся */
|
|
@@ -621,7 +621,7 @@ class FileExplorer {
|
|
|
621
621
|
const filter = this.#filter.trim().toLowerCase();
|
|
622
622
|
const list = this.#entries.filter(
|
|
623
623
|
(entry) =>
|
|
624
|
-
(this.#
|
|
624
|
+
(this.#showHidden || entry.hidden !== true) &&
|
|
625
625
|
(filter === "" || entry.name.toLowerCase().includes(filter))
|
|
626
626
|
);
|
|
627
627
|
return list.sort((a, b) => this.#compare(a, b));
|
|
@@ -652,35 +652,35 @@ class FileExplorer {
|
|
|
652
652
|
this.#search.addEventListener("input", () => this.setFilter(this.#search.value));
|
|
653
653
|
// Кнопка очистки — своя: у `input[type=search]` системная кнопка очистки скрыта,
|
|
654
654
|
// чтобы поле выглядело как остальные (см. стили)
|
|
655
|
-
this.#
|
|
656
|
-
this.#
|
|
657
|
-
this.#
|
|
658
|
-
this.#
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
this.#
|
|
662
|
-
this.#
|
|
655
|
+
this.#searchBox.className = "file_explorer_search_box";
|
|
656
|
+
this.#searchClear.type = "button";
|
|
657
|
+
this.#searchClear.className = "file_explorer_search_clear";
|
|
658
|
+
this.#searchClear.setAttribute("aria-label", I18n.t("fileExplorer.clearSearch"));
|
|
659
|
+
const clearGlyph = new Icon(Icons.NAVIGATION.CLOSE, "16px").set();
|
|
660
|
+
clearGlyph.setAttribute("aria-hidden", "true");
|
|
661
|
+
this.#searchClear.appendChild(clearGlyph);
|
|
662
|
+
this.#searchClear.addEventListener("click", () => {
|
|
663
663
|
this.setFilter("");
|
|
664
664
|
this.#search.focus();
|
|
665
665
|
});
|
|
666
|
-
this.#
|
|
667
|
-
this.#
|
|
668
|
-
this.#head.appendChild(this.#
|
|
666
|
+
this.#searchBox.appendChild(this.#search);
|
|
667
|
+
this.#searchBox.appendChild(this.#searchClear);
|
|
668
|
+
this.#head.appendChild(this.#searchBox);
|
|
669
669
|
this.#syncClear();
|
|
670
670
|
this.#hidden.className = "file_explorer_hidden";
|
|
671
671
|
this.#hidden.type = "button";
|
|
672
|
-
this.#hidden.setAttribute("aria-pressed", this.#
|
|
672
|
+
this.#hidden.setAttribute("aria-pressed", this.#showHidden ? "true" : "false");
|
|
673
673
|
this.#hidden.setAttribute(
|
|
674
674
|
"aria-label",
|
|
675
|
-
this.#
|
|
675
|
+
this.#showHidden ? I18n.t("fileExplorer.hideHidden") : I18n.t("fileExplorer.showHidden")
|
|
676
676
|
);
|
|
677
677
|
const glyph = new Icon(
|
|
678
|
-
this.#
|
|
678
|
+
this.#showHidden ? Icons.ACTIONS.VISIBILITY : Icons.ACTIONS.VISIBILITY_OFF,
|
|
679
679
|
"18px"
|
|
680
680
|
).set();
|
|
681
681
|
glyph.setAttribute("aria-hidden", "true");
|
|
682
682
|
this.#hidden.appendChild(glyph);
|
|
683
|
-
this.#hidden.addEventListener("click", () => this.setShowHidden(!this.#
|
|
683
|
+
this.#hidden.addEventListener("click", () => this.setShowHidden(!this.#showHidden));
|
|
684
684
|
this.#head.appendChild(this.#hidden);
|
|
685
685
|
// У панели одна остановка обхода: по кнопкам ходят стрелки/Home/End
|
|
686
686
|
this.#roving = new RovingKeyboard(this.#actions, { itemSelector: "button" });
|
|
@@ -775,8 +775,8 @@ class FileExplorer {
|
|
|
775
775
|
row.classList.toggle("file_explorer_row_selected", this.#selected.has(entry.path));
|
|
776
776
|
row.classList.toggle("file_explorer_row_folder", entry.type === TYPE.FOLDER);
|
|
777
777
|
row.appendChild(this.#cell(entry, SORT.NAME));
|
|
778
|
-
if (this.#
|
|
779
|
-
if (this.#
|
|
778
|
+
if (this.#showSize) row.appendChild(this.#cell(entry, SORT.SIZE));
|
|
779
|
+
if (this.#showModified) row.appendChild(this.#cell(entry, SORT.MODIFIED));
|
|
780
780
|
return row;
|
|
781
781
|
}
|
|
782
782
|
|
|
@@ -788,25 +788,25 @@ class FileExplorer {
|
|
|
788
788
|
active === null || active === undefined || !this.#grid.contains(active)
|
|
789
789
|
? null
|
|
790
790
|
: active.closest("file_explorer_row");
|
|
791
|
-
if (focused !== null) this.#
|
|
792
|
-
this.#
|
|
791
|
+
if (focused !== null) this.#focusPath = focused.dataset.path;
|
|
792
|
+
this.#headRow.innerHTML = "";
|
|
793
793
|
this.#body.innerHTML = "";
|
|
794
|
-
this.#
|
|
795
|
-
if (this.#
|
|
796
|
-
if (this.#
|
|
797
|
-
this.#
|
|
794
|
+
this.#headRow.appendChild(this.#sortButton(SORT.NAME, I18n.t("fileExplorer.columnName")));
|
|
795
|
+
if (this.#showSize) this.#headRow.appendChild(this.#sortButton(SORT.SIZE, I18n.t("fileExplorer.columnSize")));
|
|
796
|
+
if (this.#showModified)
|
|
797
|
+
this.#headRow.appendChild(this.#sortButton(SORT.MODIFIED, I18n.t("fileExplorer.columnModified")));
|
|
798
798
|
// Ширины колонок задаёт компонент: сетка шапки и сетка строк обязаны совпасть,
|
|
799
799
|
// а какие колонки показаны, знает только он
|
|
800
800
|
const columns = ["minmax(0, 1fr)"];
|
|
801
|
-
if (this.#
|
|
802
|
-
if (this.#
|
|
801
|
+
if (this.#showSize) columns.push("110px");
|
|
802
|
+
if (this.#showModified) columns.push("160px");
|
|
803
803
|
this.#grid.style.setProperty("--file_explorer_columns", columns.join(" "));
|
|
804
804
|
const visible = this.#visibleEntries();
|
|
805
805
|
for (const entry of visible) this.#body.appendChild(this.#rowNode(entry));
|
|
806
806
|
this.#grid.hidden = visible.length === 0;
|
|
807
|
-
this.#empty.hidden = visible.length > 0 || this.#
|
|
808
|
-
this.#empty.innerText = this.isFiltered() ? I18n.t("common.nothingFound") : this.#
|
|
809
|
-
this.#error.hidden = this.#
|
|
807
|
+
this.#empty.hidden = visible.length > 0 || this.#errorObject !== undefined;
|
|
808
|
+
this.#empty.innerText = this.isFiltered() ? I18n.t("common.nothingFound") : this.#emptyText;
|
|
809
|
+
this.#error.hidden = this.#errorObject === undefined;
|
|
810
810
|
this.#error.innerText = this.getErrorText();
|
|
811
811
|
this.#grid.setAttribute(
|
|
812
812
|
"aria-label",
|
|
@@ -828,7 +828,7 @@ class FileExplorer {
|
|
|
828
828
|
|
|
829
829
|
#renderPath() {
|
|
830
830
|
const items = this.#pathItems();
|
|
831
|
-
this.#
|
|
831
|
+
this.#pathBar.setItems(
|
|
832
832
|
items.map((item, index) =>
|
|
833
833
|
index === items.length - 1
|
|
834
834
|
? { title: item.title }
|
|
@@ -842,7 +842,7 @@ class FileExplorer {
|
|
|
842
842
|
#pathItems() {
|
|
843
843
|
const full = String(this.#path);
|
|
844
844
|
if (full === "") return [{ title: I18n.t("fileExplorer.noFolder"), path: "" }];
|
|
845
|
-
const root = this.#
|
|
845
|
+
const root = this.#rootPath === undefined ? undefined : String(this.#rootPath).replace(/[\\/]+$/, "");
|
|
846
846
|
const items = [];
|
|
847
847
|
if (full.startsWith("/")) items.push({ title: "/", path: "/" });
|
|
848
848
|
else if (/^[A-Za-z]:/.test(full)) items.push({ title: `${full.slice(0, 2)}/`, path: `${full.slice(0, 2)}/` });
|
|
@@ -875,14 +875,14 @@ class FileExplorer {
|
|
|
875
875
|
const list = [...this.#body.querySelectorAll("file_explorer_row")];
|
|
876
876
|
if (list.length === 0) return;
|
|
877
877
|
const stop =
|
|
878
|
-
list.find((row) => row.dataset.path === this.#
|
|
879
|
-
list.find((row) => row.dataset.path === this.#
|
|
878
|
+
list.find((row) => row.dataset.path === this.#activePath) ??
|
|
879
|
+
list.find((row) => row.dataset.path === this.#focusPath) ??
|
|
880
880
|
list[0];
|
|
881
|
-
this.#
|
|
881
|
+
this.#activePath = stop.dataset.path;
|
|
882
882
|
for (const row of list) row.setAttribute("tabindex", row === stop ? "0" : "-1");
|
|
883
883
|
// Фокус возвращаем только если он был в сетке: иначе перерисовка его бы украла
|
|
884
|
-
if (this.#
|
|
885
|
-
this.#
|
|
884
|
+
if (this.#focusPath !== undefined && stop.dataset.path === this.#focusPath) {
|
|
885
|
+
this.#focusPath = undefined;
|
|
886
886
|
stop.focus();
|
|
887
887
|
}
|
|
888
888
|
return this;
|
|
@@ -890,7 +890,7 @@ class FileExplorer {
|
|
|
890
890
|
|
|
891
891
|
#focusRow(row = undefined) {
|
|
892
892
|
if (row === undefined || row === null) return this;
|
|
893
|
-
this.#
|
|
893
|
+
this.#activePath = row.dataset.path;
|
|
894
894
|
for (const other of this.#body.querySelectorAll("file_explorer_row")) {
|
|
895
895
|
other.setAttribute("tabindex", other === row ? "0" : "-1");
|
|
896
896
|
}
|
|
@@ -960,18 +960,18 @@ class FileExplorer {
|
|
|
960
960
|
: I18n.t("fileExplorer.selectedCount", { count: entries.length })
|
|
961
961
|
);
|
|
962
962
|
for (const listener of [...this.#listeners]) listener(entries, this);
|
|
963
|
-
if (this.#
|
|
963
|
+
if (this.#onSelect !== undefined) this.#onSelect(entries, this);
|
|
964
964
|
return this;
|
|
965
965
|
}
|
|
966
966
|
|
|
967
967
|
/** Что видно сейчас: количество, пустота, поиск и ошибка чтения */
|
|
968
968
|
#announceState() {
|
|
969
|
-
if (this.#
|
|
969
|
+
if (this.#errorObject !== undefined) {
|
|
970
970
|
this.#status.innerText = this.getErrorText();
|
|
971
971
|
return this;
|
|
972
972
|
}
|
|
973
973
|
const visible = this.#visibleEntries().length;
|
|
974
|
-
const total = this.#entries.filter((entry) => this.#
|
|
974
|
+
const total = this.#entries.filter((entry) => this.#showHidden || entry.hidden !== true).length;
|
|
975
975
|
if (this.isFiltered()) {
|
|
976
976
|
this.#status.innerText =
|
|
977
977
|
visible === 0
|
|
@@ -980,7 +980,7 @@ class FileExplorer {
|
|
|
980
980
|
return this;
|
|
981
981
|
}
|
|
982
982
|
this.#status.innerText =
|
|
983
|
-
visible === 0 ? this.#
|
|
983
|
+
visible === 0 ? this.#emptyText : I18n.t("fileExplorer.entriesCount", { count: visible });
|
|
984
984
|
return this;
|
|
985
985
|
}
|
|
986
986
|
|
|
@@ -993,12 +993,12 @@ class FileExplorer {
|
|
|
993
993
|
|
|
994
994
|
/** Кнопка очистки видна, только когда есть что очищать */
|
|
995
995
|
#syncClear() {
|
|
996
|
-
this.#
|
|
996
|
+
this.#searchClear.hidden = this.#filter === "";
|
|
997
997
|
return this;
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
1000
|
#syncLabel() {
|
|
1001
|
-
if (this.#
|
|
1001
|
+
if (this.#titleText !== undefined && this.#titleText !== "") {
|
|
1002
1002
|
this.#root.setAttribute("aria-labelledby", this.#title.id);
|
|
1003
1003
|
this.#root.removeAttribute("aria-label");
|
|
1004
1004
|
} else {
|
|
@@ -1009,8 +1009,8 @@ class FileExplorer {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
1011
|
#accessibleName() {
|
|
1012
|
-
if (this.#
|
|
1013
|
-
if (this.#
|
|
1012
|
+
if (this.#titleText !== undefined && this.#titleText !== "") return this.#titleText;
|
|
1013
|
+
if (this.#labelText !== undefined && this.#labelText !== "") return this.#labelText;
|
|
1014
1014
|
return I18n.t("fileExplorer.title");
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
@@ -1024,7 +1024,7 @@ class FileExplorer {
|
|
|
1024
1024
|
// иначе ближайшая перерисовка вернула бы фокус не туда, где он был
|
|
1025
1025
|
const row = event.target instanceof Element ? event.target.closest("file_explorer_row") : null;
|
|
1026
1026
|
if (row === null || row.dataset.path === undefined) return;
|
|
1027
|
-
this.#
|
|
1027
|
+
this.#activePath = row.dataset.path;
|
|
1028
1028
|
};
|
|
1029
1029
|
|
|
1030
1030
|
#onClick = (event) => {
|
|
@@ -7,14 +7,14 @@ chui_file_explorer {
|
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
width: -webkit-fill-available;
|
|
9
9
|
max-width: 100%;
|
|
10
|
-
margin: var(--
|
|
10
|
+
margin: var(--block_margin);
|
|
11
11
|
color: var(--text_color);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.file_explorer_title {
|
|
15
15
|
display: block;
|
|
16
16
|
width: max-content;
|
|
17
|
-
margin: var(--
|
|
17
|
+
margin: var(--block_margin);
|
|
18
18
|
color: var(--text_color);
|
|
19
19
|
font-size: var(--font_labels_size);
|
|
20
20
|
font-weight: 500;
|
|
@@ -57,7 +57,7 @@ chui_file_explorer {
|
|
|
57
57
|
margin: 0;
|
|
58
58
|
padding: 0;
|
|
59
59
|
border: none;
|
|
60
|
-
border-radius: var(--
|
|
60
|
+
border-radius: var(--radius_sm);
|
|
61
61
|
background: transparent;
|
|
62
62
|
color: var(--text_color);
|
|
63
63
|
cursor: pointer;
|
|
@@ -111,7 +111,7 @@ chui_file_explorer {
|
|
|
111
111
|
padding-block: 0 0;
|
|
112
112
|
padding-inline: 12px 40px;
|
|
113
113
|
border: 1px solid var(--border_color);
|
|
114
|
-
border-radius: var(--
|
|
114
|
+
border-radius: var(--radius_sm);
|
|
115
115
|
background: var(--element_background);
|
|
116
116
|
color: var(--text_color);
|
|
117
117
|
font-family: inherit;
|
|
@@ -184,7 +184,7 @@ chui_file_explorer {
|
|
|
184
184
|
max-width: 100%;
|
|
185
185
|
overflow: hidden;
|
|
186
186
|
border: 1px solid var(--border_color);
|
|
187
|
-
border-radius: var(--
|
|
187
|
+
border-radius: var(--radius_sm);
|
|
188
188
|
background: var(--element_background);
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -362,7 +362,7 @@ file_explorer_name {
|
|
|
362
362
|
.file_explorer_error {
|
|
363
363
|
padding: 10px 12px;
|
|
364
364
|
border: 1px solid var(--badge_error_text);
|
|
365
|
-
border-radius: var(--
|
|
365
|
+
border-radius: var(--radius_sm);
|
|
366
366
|
color: var(--badge_error_text);
|
|
367
367
|
font-size: var(--font_labels_size);
|
|
368
368
|
}
|