chuijs 4.0.2 → 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 +597 -0
- package/README.md +43 -644
- package/framework/appLayout/default/chui_app_layout.js +602 -496
- package/framework/appLayout/default/global_style.css +288 -97
- package/framework/appLayout/default/main_theme_style.css +188 -101
- package/framework/components/chui_accordion/accordion.js +38 -35
- package/framework/components/chui_accordion/styles.css +13 -12
- package/framework/components/chui_action_sheet/action_sheet.js +93 -64
- package/framework/components/chui_action_sheet/styles.css +12 -5
- 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 +16 -11
- package/framework/components/chui_affix/styles.css +5 -0
- package/framework/components/chui_alert/alert.js +34 -19
- package/framework/components/chui_alert/styles.css +7 -0
- package/framework/components/chui_avatar/avatar.js +36 -35
- package/framework/components/chui_avatar/styles.css +1 -1
- package/framework/components/chui_avatar_group/avatar_group.js +25 -23
- package/framework/components/chui_avatar_group/styles.css +1 -1
- package/framework/components/chui_backtop/backtop.js +60 -21
- package/framework/components/chui_backtop/styles.css +21 -0
- package/framework/components/chui_badge/badge.js +30 -28
- 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/breadcrumb.js +15 -13
- package/framework/components/chui_breadcrumb/styles.css +1 -1
- package/framework/components/chui_button/button.js +52 -36
- package/framework/components/chui_button/styles.css +7 -7
- package/framework/components/chui_calendar/calendar.js +18 -16
- package/framework/components/chui_card/card.js +52 -32
- 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 +140 -79
- package/framework/components/chui_chat/styles.css +18 -7
- package/framework/components/chui_clipboard_history/clipboard_history.js +53 -39
- package/framework/components/chui_clipboard_history/styles.css +13 -9
- package/framework/components/chui_code/code.js +10 -10
- package/framework/components/chui_code/styles.css +4 -4
- package/framework/components/chui_code_editor/code_editor.js +73 -57
- package/framework/components/chui_code_editor/styles.css +6 -5
- package/framework/components/chui_command_palette/command_palette.js +87 -64
- package/framework/components/chui_command_palette/styles.css +5 -5
- package/framework/components/chui_console/console.js +13 -13
- package/framework/components/chui_console/styles.css +6 -3
- package/framework/components/chui_content_block/content_block.js +35 -21
- package/framework/components/chui_content_block/styles.css +2 -2
- package/framework/components/chui_context_menu/context_menu.js +171 -58
- package/framework/components/chui_context_menu/styles.css +82 -8
- package/framework/components/chui_custom_element/custom_element.js +25 -18
- package/framework/components/chui_data_grid/data_grid.js +633 -471
- package/framework/components/chui_data_grid/styles.css +24 -22
- package/framework/components/chui_descriptions/descriptions.js +34 -17
- package/framework/components/chui_descriptions/styles.css +1 -1
- package/framework/components/chui_details/details.js +42 -36
- package/framework/components/chui_details/styles.css +12 -11
- package/framework/components/chui_diff_viewer/diff_viewer.js +172 -147
- package/framework/components/chui_diff_viewer/styles.css +10 -10
- package/framework/components/chui_divider/divider.js +19 -17
- package/framework/components/chui_divider/styles.css +2 -2
- package/framework/components/chui_drawer/drawer.js +63 -38
- package/framework/components/chui_drawer/styles.css +18 -4
- package/framework/components/chui_drop_zone/drop_zone.js +37 -27
- package/framework/components/chui_drop_zone/styles.css +10 -6
- package/framework/components/chui_empty_state/empty_state.js +20 -15
- package/framework/components/chui_fieldset/fieldset.js +40 -23
- package/framework/components/chui_fieldset/styles.css +6 -6
- package/framework/components/chui_file_explorer/file_explorer.js +260 -189
- package/framework/components/chui_file_explorer/styles.css +8 -7
- package/framework/components/chui_form/form.js +40 -28
- package/framework/components/chui_form/styles.css +1 -1
- package/framework/components/chui_gantt/gantt.js +102 -78
- package/framework/components/chui_gantt/styles.css +5 -5
- package/framework/components/chui_graphs/graphs.js +376 -239
- package/framework/components/chui_graphs/styles.css +27 -6
- package/framework/components/chui_hero/hero.js +98 -37
- package/framework/components/chui_hero/styles.css +176 -7
- package/framework/components/chui_html_block/html_block.js +8 -8
- package/framework/components/chui_html_block/styles.css +3 -3
- package/framework/components/chui_hx/hx.js +3 -3
- package/framework/components/chui_hx/styles.css +13 -6
- package/framework/components/chui_icons/icons.js +2115 -2115
- package/framework/components/chui_icons/styles.css +4 -3
- package/framework/components/chui_inputs/chui_check_box/check_box.js +31 -19
- package/framework/components/chui_inputs/chui_check_box/styles.css +30 -21
- package/framework/components/chui_inputs/chui_chips/chips.js +141 -70
- package/framework/components/chui_inputs/chui_chips/styles.css +32 -7
- package/framework/components/chui_inputs/chui_color_picker/color_picker.js +55 -38
- package/framework/components/chui_inputs/chui_color_picker/styles.css +7 -7
- package/framework/components/chui_inputs/chui_combo_box/combo_box.js +127 -109
- package/framework/components/chui_inputs/chui_combo_box/styles.css +23 -21
- package/framework/components/chui_inputs/chui_date/date.js +161 -127
- package/framework/components/chui_inputs/chui_date/styles.css +20 -19
- package/framework/components/chui_inputs/chui_date_range/date_range.js +61 -50
- package/framework/components/chui_inputs/chui_date_range/styles.css +3 -3
- package/framework/components/chui_inputs/chui_datetime/datetime.js +47 -39
- package/framework/components/chui_inputs/chui_datetime/styles.css +3 -3
- package/framework/components/chui_inputs/chui_email/email.js +48 -36
- package/framework/components/chui_inputs/chui_email/styles.css +11 -11
- package/framework/components/chui_inputs/chui_file/file.js +71 -44
- package/framework/components/chui_inputs/chui_file/styles.css +23 -19
- package/framework/components/chui_inputs/chui_hotkey/hotkey.js +101 -76
- package/framework/components/chui_inputs/chui_hotkey/styles.css +6 -6
- package/framework/components/chui_inputs/chui_masked/masked.js +83 -72
- package/framework/components/chui_inputs/chui_masked/styles.css +5 -5
- package/framework/components/chui_inputs/chui_mention/mention.js +87 -40
- package/framework/components/chui_inputs/chui_mention/styles.css +14 -8
- package/framework/components/chui_inputs/chui_multi_combo_box/multi_combo_box.js +242 -212
- package/framework/components/chui_inputs/chui_multi_combo_box/styles.css +23 -15
- package/framework/components/chui_inputs/chui_number/number.js +84 -70
- package/framework/components/chui_inputs/chui_number/styles.css +13 -13
- package/framework/components/chui_inputs/chui_otp/otp.js +71 -62
- package/framework/components/chui_inputs/chui_otp/styles.css +5 -5
- package/framework/components/chui_inputs/chui_password/password.js +72 -56
- package/framework/components/chui_inputs/chui_password/styles.css +15 -15
- package/framework/components/chui_inputs/chui_radio_button/radio_button.js +37 -25
- package/framework/components/chui_inputs/chui_radio_button/styles.css +22 -22
- package/framework/components/chui_inputs/chui_rating/rating.js +54 -50
- package/framework/components/chui_inputs/chui_rating/styles.css +3 -3
- package/framework/components/chui_inputs/chui_select_box/select_box.js +132 -108
- package/framework/components/chui_inputs/chui_select_box/styles.css +21 -21
- package/framework/components/chui_inputs/chui_slider/slider.js +41 -38
- package/framework/components/chui_inputs/chui_slider/styles.css +7 -5
- package/framework/components/chui_inputs/chui_text/styles.css +14 -14
- package/framework/components/chui_inputs/chui_text/text.js +69 -52
- package/framework/components/chui_inputs/chui_text_area/styles.css +14 -14
- package/framework/components/chui_inputs/chui_text_area/text_area.js +59 -36
- package/framework/components/chui_inputs/chui_time/styles.css +18 -20
- package/framework/components/chui_inputs/chui_time/time.js +71 -49
- package/framework/components/chui_inputs/chui_toggle/styles.css +13 -6
- package/framework/components/chui_inputs/chui_toggle/toggle.js +27 -27
- package/framework/components/chui_json_editor/json_editor.js +137 -127
- package/framework/components/chui_json_editor/styles.css +5 -5
- package/framework/components/chui_json_viewer/json_viewer.js +133 -114
- package/framework/components/chui_json_viewer/styles.css +9 -8
- package/framework/components/chui_kanban/kanban.js +78 -60
- package/framework/components/chui_kanban/styles.css +8 -4
- package/framework/components/chui_kbd/kbd.js +12 -10
- package/framework/components/chui_kbd/styles.css +1 -1
- package/framework/components/chui_label/label.js +31 -29
- package/framework/components/chui_label/styles.css +3 -3
- package/framework/components/chui_link/link.js +36 -29
- package/framework/components/chui_link/styles.css +11 -4
- package/framework/components/chui_list/list.js +42 -38
- package/framework/components/chui_list/styles.css +4 -3
- package/framework/components/chui_markdown_editor/markdown_editor.js +125 -109
- package/framework/components/chui_markdown_editor/styles.css +5 -5
- package/framework/components/chui_media/audio.js +457 -364
- package/framework/components/chui_media/audio_styles.css +74 -37
- package/framework/components/chui_media/image.js +99 -64
- package/framework/components/chui_media/image_compare.js +86 -55
- package/framework/components/chui_media/image_compare_styles.css +5 -5
- package/framework/components/chui_media/image_styles.css +4 -4
- package/framework/components/chui_media/video.js +264 -171
- package/framework/components/chui_media/video_styles.css +57 -24
- package/framework/components/chui_menu_bar/menu_bar.js +67 -65
- package/framework/components/chui_menu_bar/styles.css +14 -12
- 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 +81 -56
- package/framework/components/chui_modal/styles.css +3 -2
- package/framework/components/chui_notification/notification.js +107 -69
- package/framework/components/chui_notification/notification_download.js +28 -77
- package/framework/components/chui_notification/notification_download_card.js +115 -0
- package/framework/components/chui_notification/notification_download_progress.css +5 -4
- package/framework/components/chui_notification/notification_download_progress.js +73 -105
- package/framework/components/chui_notification/notification_update.js +44 -37
- package/framework/components/chui_notification/status_plate.css +3 -3
- package/framework/components/chui_notification/status_plate.js +2 -2
- package/framework/components/chui_notification/styles.css +6 -1
- package/framework/components/chui_notification/styles_download.css +2 -2
- package/framework/components/chui_notification/styles_update.css +3 -3
- package/framework/components/chui_org_chart/org_chart.js +101 -62
- package/framework/components/chui_org_chart/styles.css +2 -2
- package/framework/components/chui_pagination/pagination.js +65 -30
- package/framework/components/chui_pagination/styles.css +1 -1
- package/framework/components/chui_paragraph/paragraph.js +2 -2
- package/framework/components/chui_paragraph/styles.css +3 -3
- package/framework/components/chui_popover/popover.js +77 -50
- package/framework/components/chui_popover/styles.css +1 -1
- package/framework/components/chui_popups/popups.js +210 -181
- package/framework/components/chui_popups/styles.css +7 -7
- package/framework/components/chui_print_button/print_button.js +48 -33
- package/framework/components/chui_progress_bar/progress_bar.js +49 -19
- package/framework/components/chui_progress_bar/styles.css +6 -6
- package/framework/components/chui_progress_ring/progress_ring.js +32 -30
- package/framework/components/chui_progress_ring/styles.css +1 -1
- package/framework/components/chui_qrcode/qrcode.js +85 -41
- package/framework/components/chui_query_builder/query_builder.js +263 -170
- package/framework/components/chui_query_builder/styles.css +4 -4
- package/framework/components/chui_radio_group/radio_group.js +36 -26
- package/framework/components/chui_radio_group/styles.css +2 -2
- package/framework/components/chui_result/result.js +41 -31
- package/framework/components/chui_result/styles.css +3 -3
- package/framework/components/chui_scheduler/scheduler.js +126 -104
- package/framework/components/chui_scheduler/styles.css +11 -7
- 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 +90 -27
- package/framework/components/chui_segmented_control/styles.css +32 -6
- package/framework/components/chui_settings/settings.js +160 -87
- package/framework/components/chui_settings/styles.css +4 -4
- package/framework/components/chui_shortcut_help/shortcut_help.js +82 -61
- package/framework/components/chui_sidebar_nav/sidebar_nav.js +132 -53
- package/framework/components/chui_sidebar_nav/styles.css +9 -3
- package/framework/components/chui_skeleton/skeleton.js +29 -24
- package/framework/components/chui_slideshow/slideshow.js +122 -103
- package/framework/components/chui_slideshow/styles.css +22 -16
- package/framework/components/chui_spinner/spinner.js +17 -17
- package/framework/components/chui_spinner/styles.css +0 -1
- package/framework/components/chui_split_button/split_button.js +53 -30
- package/framework/components/chui_split_button/styles.css +22 -6
- package/framework/components/chui_splitter/splitter.js +46 -39
- package/framework/components/chui_splitter/styles.css +2 -2
- package/framework/components/chui_statistic/statistic.js +111 -84
- package/framework/components/chui_status_bar/status_bar.js +11 -9
- package/framework/components/chui_status_bar/styles.css +2 -2
- package/framework/components/chui_stepper/stepper.js +230 -54
- package/framework/components/chui_stepper/styles.css +79 -14
- package/framework/components/chui_sticky_bar/sticky_bar.js +53 -17
- package/framework/components/chui_sticky_bar/styles.css +11 -7
- package/framework/components/chui_tabs/chui_tabs.js +100 -46
- package/framework/components/chui_tabs/styles.css +43 -15
- package/framework/components/chui_text_editor/styles.css +24 -23
- package/framework/components/chui_text_editor/text_editor.js +103 -79
- package/framework/components/chui_text_editor/text_editor_panel.js +428 -367
- package/framework/components/chui_theme_toggle/theme_toggle.js +46 -25
- package/framework/components/chui_timeline/styles.css +3 -1
- package/framework/components/chui_timeline/timeline.js +14 -12
- package/framework/components/chui_toast_queue/styles.css +11 -11
- package/framework/components/chui_toast_queue/toast_queue.js +82 -73
- package/framework/components/chui_toolbar/styles.css +2 -2
- package/framework/components/chui_toolbar/toolbar.js +20 -13
- package/framework/components/chui_tooltip/styles.css +2 -2
- package/framework/components/chui_tooltip/tooltip.js +40 -27
- package/framework/components/chui_tour/styles.css +12 -7
- package/framework/components/chui_tour/tour.js +132 -98
- package/framework/components/chui_transfer/styles.css +8 -7
- package/framework/components/chui_transfer/transfer.js +143 -123
- package/framework/components/chui_tree_table/styles.css +4 -4
- package/framework/components/chui_tree_table/tree_table.js +88 -74
- package/framework/components/chui_tree_view/styles.css +14 -10
- package/framework/components/chui_tree_view/tree_view.js +298 -253
- 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 +41 -33
- package/framework/components/chui_webview/styles.css +2 -2
- package/framework/components/chui_webview/webview.js +64 -52
- 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 +153 -123
- package/framework/modules/chui_animations/animations.js +105 -43
- package/framework/modules/chui_animations/motion.js +120 -0
- package/framework/modules/chui_animations/styles.css +37 -4
- package/framework/modules/chui_bridge/preload.js +36 -25
- package/framework/modules/chui_functions.js +69 -63
- package/framework/modules/chui_highlight/chui_highlight.js +25 -22
- package/framework/modules/chui_highlight/styles.css +13 -10
- package/framework/modules/chui_i18n/chui_i18n.js +12 -10
- 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 +65 -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 +12 -8
- package/framework/modules/chui_i18n/locales/validate.js +3 -3
- package/framework/modules/chui_json/chui_json.js +11 -11
- package/framework/modules/chui_layout/chui_layout.js +12 -10
- package/framework/modules/chui_logger/chui_logger.js +47 -28
- package/framework/modules/chui_page/page.js +39 -33
- package/framework/modules/chui_palette/palette.js +61 -0
- package/framework/modules/chui_qr/chui_qr.js +179 -88
- package/framework/modules/chui_scrollbar/chui_scrollbar.js +79 -68
- package/framework/modules/chui_scrollbar/styles.css +4 -2
- package/framework/modules/chui_services/chui_channels.js +27 -13
- package/framework/modules/chui_services/chui_services.js +47 -39
- package/framework/modules/chui_services/desktop.js +108 -101
- package/framework/modules/chui_sortable/chui_sortable.js +33 -28
- package/framework/modules/chui_validate/chui_validate.js +10 -7
- package/framework/tray_bar/chui_menu_items.js +136 -46
- package/index.d.ts +5046 -0
- package/index.js +199 -1254
- package/package.json +81 -68
- package/framework/components/telegram_bot/chui_telegram_bot.js +0 -184
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const {setStyles} = require("../../modules/chui_functions");
|
|
2
|
-
const {Validate} = require("../../modules/chui_validate/chui_validate");
|
|
3
|
-
const {Json} = require("../../modules/chui_json/chui_json");
|
|
4
|
-
const {RovingKeyboard} = require("../../modules/chui_a11y/chui_a11y");
|
|
5
|
-
const {CodeEditor} = require("../chui_code_editor/code_editor");
|
|
6
|
-
const {JsonViewer} = require("../chui_json_viewer/json_viewer");
|
|
7
|
-
const {I18n} = require("../../modules/chui_i18n/chui_i18n");
|
|
1
|
+
const { setStyles } = require("../../modules/chui_functions");
|
|
2
|
+
const { Validate } = require("../../modules/chui_validate/chui_validate");
|
|
3
|
+
const { Json } = require("../../modules/chui_json/chui_json");
|
|
4
|
+
const { RovingKeyboard } = require("../../modules/chui_a11y/chui_a11y");
|
|
5
|
+
const { CodeEditor } = require("../chui_code_editor/code_editor");
|
|
6
|
+
const { JsonViewer } = require("../chui_json_viewer/json_viewer");
|
|
7
|
+
const { I18n } = require("../../modules/chui_i18n/chui_i18n");
|
|
8
8
|
|
|
9
9
|
/** Кнопки панели: ключ подписи, ключ подсказки и действие */
|
|
10
10
|
const ACTIONS = [
|
|
11
|
-
{id: "format", labelKey: "jsonEditor.format", hintKey: "jsonEditor.formatHint"},
|
|
12
|
-
{id: "minify", labelKey: "jsonEditor.minify", hintKey: "jsonEditor.minifyHint"},
|
|
13
|
-
{id: "check", labelKey: "jsonEditor.check", hintKey: "jsonEditor.checkHint"}
|
|
11
|
+
{ id: "format", labelKey: "jsonEditor.format", hintKey: "jsonEditor.formatHint" },
|
|
12
|
+
{ id: "minify", labelKey: "jsonEditor.minify", hintKey: "jsonEditor.minifyHint" },
|
|
13
|
+
{ id: "check", labelKey: "jsonEditor.check", hintKey: "jsonEditor.checkHint" },
|
|
14
14
|
];
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -54,64 +54,66 @@ class JsonEditor {
|
|
|
54
54
|
#panes = document.createElement("json_editor_panes");
|
|
55
55
|
#editor = undefined;
|
|
56
56
|
#viewer = undefined;
|
|
57
|
-
#
|
|
57
|
+
#treeButton = undefined;
|
|
58
58
|
#actions = new Map();
|
|
59
59
|
#state = document.createElement("json_editor_state");
|
|
60
|
-
#
|
|
60
|
+
#parseLine = document.createElement("json_editor_parse");
|
|
61
61
|
#count = document.createElement("json_editor_count");
|
|
62
62
|
#hint = document.createElement("json_editor_hint");
|
|
63
63
|
#status = document.createElement("json_editor_status");
|
|
64
64
|
#error = document.createElement("chui_error_message");
|
|
65
65
|
#id = undefined;
|
|
66
66
|
#name = undefined;
|
|
67
|
-
#
|
|
68
|
-
#
|
|
67
|
+
#titleText = undefined;
|
|
68
|
+
#labelText = undefined;
|
|
69
69
|
#indent = 4;
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
70
|
+
#previewEnabled = false;
|
|
71
|
+
#previewOn = false;
|
|
72
|
+
#maxLength = undefined;
|
|
73
73
|
#width = undefined;
|
|
74
74
|
#height = "260px";
|
|
75
75
|
#disabled = false;
|
|
76
|
-
#
|
|
77
|
-
#
|
|
76
|
+
#readOnly = false;
|
|
77
|
+
#toolbarShown = true;
|
|
78
78
|
#parsed = undefined;
|
|
79
|
-
#
|
|
79
|
+
#errorObject = undefined;
|
|
80
80
|
#listeners = [];
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
|
|
84
|
-
constructor(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
81
|
+
#onChange = undefined;
|
|
82
|
+
#notifyPaused = false;
|
|
83
|
+
|
|
84
|
+
constructor(
|
|
85
|
+
options = {
|
|
86
|
+
id: String(),
|
|
87
|
+
name: String(),
|
|
88
|
+
title: String(),
|
|
89
|
+
label: String(),
|
|
90
|
+
hint: String(),
|
|
91
|
+
value: String(),
|
|
92
|
+
data: undefined,
|
|
93
|
+
height: String(),
|
|
94
|
+
width: String(),
|
|
95
|
+
indent: Number(),
|
|
96
|
+
toolbar: Boolean(),
|
|
97
|
+
preview: Boolean(),
|
|
98
|
+
maxLength: Number(),
|
|
99
|
+
disabled: Boolean(),
|
|
100
|
+
readOnly: Boolean(),
|
|
101
|
+
required: Boolean(),
|
|
102
|
+
messages: Object(),
|
|
103
|
+
changeListener: undefined,
|
|
104
|
+
onChange: undefined,
|
|
105
|
+
}
|
|
106
|
+
) {
|
|
105
107
|
setStyles(__dirname + "/styles.css", "chUiJS_JsonEditor");
|
|
106
108
|
JsonEditor.#counter += 1;
|
|
107
109
|
this.#id = options.id === undefined ? `chui_json_editor_${JsonEditor.#counter}` : options.id;
|
|
108
110
|
this.#name = options.name;
|
|
109
|
-
this.#
|
|
110
|
-
this.#
|
|
111
|
+
this.#labelText = options.label;
|
|
112
|
+
this.#onChange = options.onChange;
|
|
111
113
|
this.#indent = options.indent === undefined ? 4 : Number(options.indent);
|
|
112
|
-
this.#
|
|
113
|
-
this.#
|
|
114
|
-
this.#
|
|
114
|
+
this.#previewEnabled = options.preview === true;
|
|
115
|
+
this.#toolbarShown = options.toolbar !== false;
|
|
116
|
+
this.#maxLength = options.maxLength === undefined ? undefined : Number(options.maxLength);
|
|
115
117
|
this.#root.id = this.#id;
|
|
116
118
|
this.#label.className = "json_editor_label";
|
|
117
119
|
this.#label.hidden = true;
|
|
@@ -120,7 +122,7 @@ class JsonEditor {
|
|
|
120
122
|
this.#toolbar.setAttribute("aria-label", I18n.t("jsonEditor.actions"));
|
|
121
123
|
this.#panes.className = "json_editor_panes";
|
|
122
124
|
this.#state.className = "json_editor_state";
|
|
123
|
-
this.#
|
|
125
|
+
this.#parseLine.className = "json_editor_parse";
|
|
124
126
|
this.#count.className = "json_editor_count";
|
|
125
127
|
this.#count.setAttribute("aria-hidden", "true");
|
|
126
128
|
this.#hint.className = "json_editor_hint";
|
|
@@ -136,28 +138,28 @@ class JsonEditor {
|
|
|
136
138
|
this.#root.appendChild(this.#toolbar);
|
|
137
139
|
this.#root.appendChild(this.#panes);
|
|
138
140
|
// Состояние разбора и счётчик знаков — одна строка под полем
|
|
139
|
-
this.#state.appendChild(this.#
|
|
141
|
+
this.#state.appendChild(this.#parseLine);
|
|
140
142
|
this.#state.appendChild(this.#count);
|
|
141
143
|
this.#root.appendChild(this.#state);
|
|
142
144
|
this.#root.appendChild(this.#hint);
|
|
143
145
|
this.#root.appendChild(this.#status);
|
|
144
146
|
if (options.title !== undefined) this.setTitle(options.title);
|
|
145
|
-
this.setLabel(this.#
|
|
147
|
+
this.setLabel(this.#labelText === undefined ? I18n.t("jsonEditor.text") : this.#labelText);
|
|
146
148
|
if (options.hint !== undefined) this.setHint(options.hint);
|
|
147
149
|
if (options.width !== undefined) this.setWidth(options.width);
|
|
148
150
|
this.setHeight(options.height === undefined ? this.#height : options.height);
|
|
149
151
|
if (options.data !== undefined) this.setData(options.data);
|
|
150
152
|
else this.setValue(options.value === undefined ? "" : options.value);
|
|
151
153
|
Validate.installField(this, options, this.#root, this.#error, () => this.getValue(), this.#panes);
|
|
152
|
-
const
|
|
154
|
+
const baseValidate = this.validate;
|
|
153
155
|
// Разбор JSON — обязательное правило поля: неразобранный текст не проходит проверку,
|
|
154
156
|
// даже если своих правил у поля нет. Правило называется `json`, чтобы по имени было
|
|
155
157
|
// видно причину, а правила формы и своё правило из опций при этом сохраняются
|
|
156
158
|
// (своё правило из опций тоже приходит сюда как `validate` — и тоже зовётся `json`)
|
|
157
159
|
this.validate = () => {
|
|
158
|
-
const result =
|
|
160
|
+
const result = baseValidate();
|
|
159
161
|
if (result.valid === false) {
|
|
160
|
-
if (result.rule === "validate") return {valid: false, rule: "json", message: result.message};
|
|
162
|
+
if (result.rule === "validate") return { valid: false, rule: "json", message: result.message };
|
|
161
163
|
return result;
|
|
162
164
|
}
|
|
163
165
|
const text = this.getValue();
|
|
@@ -165,11 +167,11 @@ class JsonEditor {
|
|
|
165
167
|
if (text.trim() === "") return result;
|
|
166
168
|
const state = Json.parse(text);
|
|
167
169
|
if (state.ok) return result;
|
|
168
|
-
return {valid: false, rule: "json", message: Json.errorText(state.error)};
|
|
170
|
+
return { valid: false, rule: "json", message: Json.errorText(state.error) };
|
|
169
171
|
};
|
|
170
172
|
this.setReadOnly(options.readOnly === true);
|
|
171
173
|
this.setDisabled(options.disabled === true);
|
|
172
|
-
this.setToolbar(this.#
|
|
174
|
+
this.setToolbar(this.#toolbarShown);
|
|
173
175
|
if (options.changeListener !== undefined) this.addChangeListener(options.changeListener);
|
|
174
176
|
}
|
|
175
177
|
|
|
@@ -183,11 +185,11 @@ class JsonEditor {
|
|
|
183
185
|
}
|
|
184
186
|
|
|
185
187
|
getTitle() {
|
|
186
|
-
return this.#
|
|
188
|
+
return this.#titleText;
|
|
187
189
|
}
|
|
188
190
|
|
|
189
191
|
getLabel() {
|
|
190
|
-
return this.#
|
|
192
|
+
return this.#labelText;
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
/** Текст JSON как есть */
|
|
@@ -203,13 +205,13 @@ class JsonEditor {
|
|
|
203
205
|
|
|
204
206
|
/** Место ошибки разбора: `{line, column, offset}` или `undefined` (у ошибки может не быть места) */
|
|
205
207
|
getErrorPlace() {
|
|
206
|
-
if (this.#
|
|
207
|
-
return {line: this.#
|
|
208
|
+
if (this.#errorObject === undefined || this.#errorObject.offset === undefined) return undefined;
|
|
209
|
+
return { line: this.#errorObject.line, column: this.#errorObject.column, offset: this.#errorObject.offset };
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
/** Текст ошибки разбора словами (пустая строка, если разбор прошёл) */
|
|
211
213
|
getErrorText() {
|
|
212
|
-
return Json.errorText(this.#
|
|
214
|
+
return Json.errorText(this.#errorObject);
|
|
213
215
|
}
|
|
214
216
|
|
|
215
217
|
isValid() {
|
|
@@ -217,15 +219,15 @@ class JsonEditor {
|
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
isPreview() {
|
|
220
|
-
return this.#
|
|
222
|
+
return this.#previewOn;
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
isPreviewEnabled() {
|
|
224
|
-
return this.#
|
|
226
|
+
return this.#previewEnabled;
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
getMaxLength() {
|
|
228
|
-
return this.#
|
|
230
|
+
return this.#maxLength;
|
|
229
231
|
}
|
|
230
232
|
|
|
231
233
|
getHeight() {
|
|
@@ -241,7 +243,7 @@ class JsonEditor {
|
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
isReadOnly() {
|
|
244
|
-
return this.#
|
|
246
|
+
return this.#readOnly;
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
getDisabled() {
|
|
@@ -277,7 +279,7 @@ class JsonEditor {
|
|
|
277
279
|
}
|
|
278
280
|
|
|
279
281
|
setTitle(text = undefined) {
|
|
280
|
-
this.#
|
|
282
|
+
this.#titleText = text;
|
|
281
283
|
if (text === undefined || text === "") {
|
|
282
284
|
this.#label.innerText = "";
|
|
283
285
|
this.#label.hidden = true;
|
|
@@ -292,7 +294,7 @@ class JsonEditor {
|
|
|
292
294
|
|
|
293
295
|
/** Имя поля, когда подписи в разметке нет */
|
|
294
296
|
setLabel(text = undefined) {
|
|
295
|
-
this.#
|
|
297
|
+
this.#labelText = text;
|
|
296
298
|
this.#syncLabel();
|
|
297
299
|
return this;
|
|
298
300
|
}
|
|
@@ -314,10 +316,10 @@ class JsonEditor {
|
|
|
314
316
|
setValue(value = String(), silent = false) {
|
|
315
317
|
const text = value === undefined || value === null ? "" : String(value);
|
|
316
318
|
// В тихом режиме (так зовёт Form.setValues) слишком длинный текст не подставляем
|
|
317
|
-
if (silent === true && this.#
|
|
318
|
-
this.#
|
|
319
|
+
if (silent === true && this.#maxLength !== undefined && text.length > this.#maxLength) return this;
|
|
320
|
+
this.#notifyPaused = true;
|
|
319
321
|
this.#editor.setValue(text);
|
|
320
|
-
this.#
|
|
322
|
+
this.#notifyPaused = false;
|
|
321
323
|
this.#refresh();
|
|
322
324
|
return this;
|
|
323
325
|
}
|
|
@@ -329,9 +331,9 @@ class JsonEditor {
|
|
|
329
331
|
|
|
330
332
|
/** Очистка для форм */
|
|
331
333
|
clear() {
|
|
332
|
-
this.#
|
|
334
|
+
this.#notifyPaused = true;
|
|
333
335
|
this.#editor.setValue("");
|
|
334
|
-
this.#
|
|
336
|
+
this.#notifyPaused = false;
|
|
335
337
|
this.#refresh();
|
|
336
338
|
return this;
|
|
337
339
|
}
|
|
@@ -363,27 +365,32 @@ class JsonEditor {
|
|
|
363
365
|
|
|
364
366
|
/** Предпросмотр деревом (`JsonViewer`) вместо поля */
|
|
365
367
|
setPreview(on = Boolean()) {
|
|
366
|
-
if (!this.#
|
|
367
|
-
this.#
|
|
368
|
-
if (this.#
|
|
369
|
-
this.#editor.set().hidden = this.#
|
|
370
|
-
if (this.#viewer !== undefined) this.#viewer.set().hidden = !this.#
|
|
371
|
-
if (this.#
|
|
372
|
-
this.#
|
|
373
|
-
this.#
|
|
374
|
-
|
|
368
|
+
if (!this.#previewEnabled) return this;
|
|
369
|
+
this.#previewOn = on === true;
|
|
370
|
+
if (this.#previewOn) this.#buildViewer();
|
|
371
|
+
this.#editor.set().hidden = this.#previewOn;
|
|
372
|
+
if (this.#viewer !== undefined) this.#viewer.set().hidden = !this.#previewOn;
|
|
373
|
+
if (this.#treeButton !== undefined) {
|
|
374
|
+
this.#treeButton.setAttribute("aria-pressed", this.#previewOn ? "true" : "false");
|
|
375
|
+
this.#treeButton.setAttribute(
|
|
376
|
+
"aria-label",
|
|
377
|
+
this.#previewOn ? I18n.t("jsonEditor.showText") : I18n.t("jsonEditor.showTree")
|
|
378
|
+
);
|
|
379
|
+
this.#treeButton.innerText = this.#previewOn
|
|
380
|
+
? I18n.t("jsonEditor.textShort")
|
|
381
|
+
: I18n.t("jsonEditor.treeShort");
|
|
375
382
|
}
|
|
376
383
|
return this;
|
|
377
384
|
}
|
|
378
385
|
|
|
379
386
|
togglePreview() {
|
|
380
|
-
return this.setPreview(!this.#
|
|
387
|
+
return this.setPreview(!this.#previewOn);
|
|
381
388
|
}
|
|
382
389
|
|
|
383
390
|
/** Панель действий: `false` её убирает, поле остаётся полем */
|
|
384
391
|
setToolbar(shown = Boolean()) {
|
|
385
|
-
this.#
|
|
386
|
-
this.#toolbar.hidden = !this.#
|
|
392
|
+
this.#toolbarShown = shown !== false;
|
|
393
|
+
this.#toolbar.hidden = !this.#toolbarShown;
|
|
387
394
|
return this;
|
|
388
395
|
}
|
|
389
396
|
|
|
@@ -406,10 +413,10 @@ class JsonEditor {
|
|
|
406
413
|
return this;
|
|
407
414
|
}
|
|
408
415
|
|
|
409
|
-
setReadOnly(
|
|
410
|
-
this.#
|
|
411
|
-
this.#root.classList.toggle("json_editor_readonly", this.#
|
|
412
|
-
this.#editor.setReadOnly(this.#
|
|
416
|
+
setReadOnly(readOnly = Boolean()) {
|
|
417
|
+
this.#readOnly = readOnly === true;
|
|
418
|
+
this.#root.classList.toggle("json_editor_readonly", this.#readOnly);
|
|
419
|
+
this.#editor.setReadOnly(this.#readOnly);
|
|
413
420
|
this.#actionState();
|
|
414
421
|
return this;
|
|
415
422
|
}
|
|
@@ -432,7 +439,7 @@ class JsonEditor {
|
|
|
432
439
|
/** Фокус в поле (из предпросмотра поле возвращается) */
|
|
433
440
|
focus() {
|
|
434
441
|
if (this.#disabled) return this;
|
|
435
|
-
if (this.#
|
|
442
|
+
if (this.#previewOn) this.setPreview(false);
|
|
436
443
|
this.#editor.focus();
|
|
437
444
|
return this;
|
|
438
445
|
}
|
|
@@ -450,7 +457,7 @@ class JsonEditor {
|
|
|
450
457
|
value: "",
|
|
451
458
|
height: this.#height,
|
|
452
459
|
lineNumbers: true,
|
|
453
|
-
onChange: () => this.#onInput()
|
|
460
|
+
onChange: () => this.#onInput(),
|
|
454
461
|
});
|
|
455
462
|
this.#editor.setLabel(this.#accessibleName());
|
|
456
463
|
const area = this.#editor.getTextArea();
|
|
@@ -473,20 +480,20 @@ class JsonEditor {
|
|
|
473
480
|
this.#actions.set(action.id, button);
|
|
474
481
|
this.#toolbar.appendChild(button);
|
|
475
482
|
}
|
|
476
|
-
if (this.#
|
|
477
|
-
this.#
|
|
478
|
-
this.#
|
|
479
|
-
this.#
|
|
480
|
-
this.#
|
|
481
|
-
this.#
|
|
483
|
+
if (this.#previewEnabled) {
|
|
484
|
+
this.#treeButton = document.createElement("button");
|
|
485
|
+
this.#treeButton.type = "button";
|
|
486
|
+
this.#treeButton.className = "json_editor_action json_editor_tree";
|
|
487
|
+
this.#treeButton.setAttribute("aria-pressed", "false");
|
|
488
|
+
this.#treeButton.setAttribute("aria-label", I18n.t("jsonEditor.showTree"));
|
|
482
489
|
// `aria-controls` появится в `#buildViewer()`: до первого показа дерева узла
|
|
483
490
|
// нет, а ссылка на несуществующий id — висячая
|
|
484
|
-
this.#
|
|
485
|
-
this.#
|
|
486
|
-
this.#toolbar.appendChild(this.#
|
|
491
|
+
this.#treeButton.innerText = I18n.t("jsonEditor.treeShort");
|
|
492
|
+
this.#treeButton.addEventListener("click", () => this.togglePreview());
|
|
493
|
+
this.#toolbar.appendChild(this.#treeButton);
|
|
487
494
|
}
|
|
488
495
|
// Панель — одна остановка обхода: по кнопкам ходят стрелки/Home/End
|
|
489
|
-
new RovingKeyboard(this.#toolbar, {itemSelector: "button"});
|
|
496
|
+
new RovingKeyboard(this.#toolbar, { itemSelector: "button" });
|
|
490
497
|
return this;
|
|
491
498
|
}
|
|
492
499
|
|
|
@@ -498,18 +505,18 @@ class JsonEditor {
|
|
|
498
505
|
}
|
|
499
506
|
this.#viewer = new JsonViewer({
|
|
500
507
|
id: `${this.#id}_tree`,
|
|
501
|
-
label: I18n.t("jsonEditor.treeLabel", {name: this.#accessibleName()}),
|
|
508
|
+
label: I18n.t("jsonEditor.treeLabel", { name: this.#accessibleName() }),
|
|
502
509
|
value: this.getParsed(),
|
|
503
|
-
emptyText: I18n.t("jsonEditor.unparsed")
|
|
510
|
+
emptyText: I18n.t("jsonEditor.unparsed"),
|
|
504
511
|
});
|
|
505
512
|
this.#viewer.set().hidden = true;
|
|
506
513
|
this.#panes.appendChild(this.#viewer.set());
|
|
507
|
-
this.#
|
|
514
|
+
this.#treeButton.setAttribute("aria-controls", this.#viewer.getId());
|
|
508
515
|
return this;
|
|
509
516
|
}
|
|
510
517
|
|
|
511
518
|
#runAction(id = String()) {
|
|
512
|
-
if (this.#disabled || this.#
|
|
519
|
+
if (this.#disabled || this.#readOnly) return this;
|
|
513
520
|
if (id === "format") this.format();
|
|
514
521
|
else if (id === "minify") this.minify();
|
|
515
522
|
else if (id === "check") this.check();
|
|
@@ -541,17 +548,17 @@ class JsonEditor {
|
|
|
541
548
|
}
|
|
542
549
|
|
|
543
550
|
#refuseAction(error = Object()) {
|
|
544
|
-
this.#
|
|
545
|
-
this.#
|
|
546
|
-
this.#
|
|
551
|
+
this.#errorObject = error;
|
|
552
|
+
this.#parseLine.classList.add("json_editor_parse_error");
|
|
553
|
+
this.#parseLine.innerText = Json.errorText(error);
|
|
547
554
|
this.#announce(Json.errorText(error));
|
|
548
555
|
return this;
|
|
549
556
|
}
|
|
550
557
|
|
|
551
558
|
#actionState() {
|
|
552
|
-
const off = this.#disabled || this.#
|
|
559
|
+
const off = this.#disabled || this.#readOnly;
|
|
553
560
|
for (const button of this.#actions.values()) button.disabled = off;
|
|
554
|
-
if (this.#
|
|
561
|
+
if (this.#treeButton !== undefined) this.#treeButton.disabled = this.#disabled;
|
|
555
562
|
return this;
|
|
556
563
|
}
|
|
557
564
|
|
|
@@ -576,25 +583,26 @@ class JsonEditor {
|
|
|
576
583
|
area.id = `${this.#id}_input`;
|
|
577
584
|
// Подпись — настоящий <label>: связь с полем держим всегда, а видимость — по подписи
|
|
578
585
|
this.#label.setAttribute("for", area.id);
|
|
579
|
-
if (this.#
|
|
586
|
+
if (this.#titleText !== undefined && this.#titleText !== "") area.removeAttribute("aria-label");
|
|
580
587
|
else area.setAttribute("aria-label", this.#accessibleName());
|
|
581
588
|
this.#syncDescribedBy();
|
|
582
|
-
if (this.#viewer !== undefined)
|
|
589
|
+
if (this.#viewer !== undefined)
|
|
590
|
+
this.#viewer.setLabel(I18n.t("jsonEditor.treeLabel", { name: this.#accessibleName() }));
|
|
583
591
|
return this;
|
|
584
592
|
}
|
|
585
593
|
|
|
586
594
|
#accessibleName() {
|
|
587
|
-
if (this.#
|
|
588
|
-
if (this.#
|
|
595
|
+
if (this.#titleText !== undefined && this.#titleText !== "") return this.#titleText;
|
|
596
|
+
if (this.#labelText !== undefined && this.#labelText !== "") return this.#labelText;
|
|
589
597
|
return I18n.t("jsonEditor.text");
|
|
590
598
|
}
|
|
591
599
|
|
|
592
600
|
#syncCount() {
|
|
593
|
-
const
|
|
594
|
-
this.#count.hidden = !
|
|
595
|
-
if (!
|
|
596
|
-
this.#count.innerText = `${this.getValue().length} / ${this.#
|
|
597
|
-
this.#count.classList.toggle("json_editor_count_over", this.getValue().length > this.#
|
|
601
|
+
const hasLimit = this.#maxLength !== undefined;
|
|
602
|
+
this.#count.hidden = !hasLimit;
|
|
603
|
+
if (!hasLimit) return this;
|
|
604
|
+
this.#count.innerText = `${this.getValue().length} / ${this.#maxLength}`;
|
|
605
|
+
this.#count.classList.toggle("json_editor_count_over", this.getValue().length > this.#maxLength);
|
|
598
606
|
return this;
|
|
599
607
|
}
|
|
600
608
|
|
|
@@ -609,13 +617,15 @@ class JsonEditor {
|
|
|
609
617
|
const state = Json.parse(text);
|
|
610
618
|
// Пустое поле — не ошибка разбора (так же считает и `validate` ниже): `JSON.parse("")`
|
|
611
619
|
// бросает исключение, но показывать его как ошибку нельзя — поле просто пустое
|
|
612
|
-
this.#
|
|
620
|
+
this.#errorObject = state.ok || blank ? undefined : state.error;
|
|
613
621
|
this.#parsed = state.ok ? state.value : undefined;
|
|
614
|
-
this.#
|
|
615
|
-
this.#
|
|
616
|
-
this.#
|
|
622
|
+
this.#parseLine.classList.toggle("json_editor_parse_error", !state.ok && blank === false);
|
|
623
|
+
this.#parseLine.classList.toggle("json_editor_parse_ok", state.ok && blank === false);
|
|
624
|
+
this.#parseLine.innerText = blank
|
|
617
625
|
? I18n.t("jsonEditor.empty")
|
|
618
|
-
: state.ok
|
|
626
|
+
: state.ok
|
|
627
|
+
? I18n.t("jsonEditor.correct")
|
|
628
|
+
: Json.errorText(state.error);
|
|
619
629
|
this.#syncCount();
|
|
620
630
|
if (this.#viewer !== undefined && this.#viewer.set().hidden === false) this.#viewer.setValue(this.#parsed);
|
|
621
631
|
return this;
|
|
@@ -629,15 +639,15 @@ class JsonEditor {
|
|
|
629
639
|
#notify() {
|
|
630
640
|
const value = this.getValue();
|
|
631
641
|
for (const listener of [...this.#listeners]) listener(value, this);
|
|
632
|
-
if (this.#
|
|
642
|
+
if (this.#onChange !== undefined) this.#onChange(value, this);
|
|
633
643
|
return this;
|
|
634
644
|
}
|
|
635
645
|
|
|
636
646
|
#onInput = () => {
|
|
637
647
|
this.#refresh();
|
|
638
|
-
if (this.#
|
|
648
|
+
if (this.#notifyPaused) return;
|
|
639
649
|
this.#notify();
|
|
640
650
|
};
|
|
641
651
|
}
|
|
642
652
|
|
|
643
|
-
exports.JsonEditor = JsonEditor
|
|
653
|
+
exports.JsonEditor = JsonEditor;
|
|
@@ -8,14 +8,14 @@ chui_json_editor {
|
|
|
8
8
|
width: -webkit-fill-available;
|
|
9
9
|
max-width: 100%;
|
|
10
10
|
height: max-content;
|
|
11
|
-
margin: var(--
|
|
11
|
+
margin: var(--block_margin);
|
|
12
12
|
color: var(--text_color);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.json_editor_label {
|
|
16
16
|
display: block;
|
|
17
17
|
width: max-content;
|
|
18
|
-
margin: var(--
|
|
18
|
+
margin: var(--block_margin);
|
|
19
19
|
color: var(--text_color);
|
|
20
20
|
font-size: var(--font_labels_size);
|
|
21
21
|
font-weight: 500;
|
|
@@ -34,7 +34,7 @@ chui_json_editor {
|
|
|
34
34
|
padding: 4px;
|
|
35
35
|
border: 1px solid var(--border_color);
|
|
36
36
|
border-bottom: none;
|
|
37
|
-
border-radius: var(--
|
|
37
|
+
border-radius: var(--radius_sm) var(--radius_sm) 0 0;
|
|
38
38
|
background: var(--element_background_2);
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ chui_json_editor {
|
|
|
44
44
|
|
|
45
45
|
/* Скрытая панель не оставляет углов: поле занимает всю рамку само */
|
|
46
46
|
.json_editor_toolbar[hidden] + .json_editor_panes {
|
|
47
|
-
border-radius: var(--
|
|
47
|
+
border-radius: var(--radius_sm);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.json_editor_action {
|
|
@@ -91,7 +91,7 @@ chui_json_editor {
|
|
|
91
91
|
box-sizing: border-box;
|
|
92
92
|
overflow: hidden;
|
|
93
93
|
border: 1px solid var(--border_color);
|
|
94
|
-
border-radius: 0 0 var(--
|
|
94
|
+
border-radius: 0 0 var(--radius_sm) var(--radius_sm);
|
|
95
95
|
background: var(--element_background);
|
|
96
96
|
}
|
|
97
97
|
|