@gitlab/ui 131.3.0 → 131.3.1
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/package.json +4 -4
- package/src/components/utilities/truncate/truncate.scss +3 -1
- package/src/scss/mixins.scss +3 -1
- package/tailwind.defaults.js +10 -1
- package/dist/charts.js +0 -13
- package/dist/components/base/accordion/accordion.js +0 -69
- package/dist/components/base/accordion/accordion_item.js +0 -160
- package/dist/components/base/accordion/constants.js +0 -3
- package/dist/components/base/alert/alert.js +0 -263
- package/dist/components/base/animated_icon/animated_chevron_down_up_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_lg_down_up_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_lg_right_down_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_chevron_right_down_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_duo_chat_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_loader_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_notifications_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_sidebar_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_smile_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_sort_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_star_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_todo_icon.js +0 -45
- package/dist/components/base/animated_icon/animated_upload_icon.js +0 -45
- package/dist/components/base/animated_icon/base_animated_icon.js +0 -77
- package/dist/components/base/attribute_list/attribute_list.js +0 -100
- package/dist/components/base/avatar/avatar.js +0 -175
- package/dist/components/base/avatar/utils.js +0 -17
- package/dist/components/base/avatar_labeled/avatar_labeled.js +0 -198
- package/dist/components/base/avatar_link/avatar_link.js +0 -47
- package/dist/components/base/avatars_inline/avatars_inline.js +0 -139
- package/dist/components/base/badge/badge.js +0 -197
- package/dist/components/base/banner/banner.js +0 -149
- package/dist/components/base/breadcrumb/breadcrumb.js +0 -282
- package/dist/components/base/breadcrumb/breadcrumb_item.js +0 -96
- package/dist/components/base/broadcast_message/broadcast_message.js +0 -113
- package/dist/components/base/broadcast_message/constants.js +0 -5
- package/dist/components/base/button/button.js +0 -419
- package/dist/components/base/button_group/button_group.js +0 -53
- package/dist/components/base/card/card.js +0 -69
- package/dist/components/base/collapse/collapse.js +0 -163
- package/dist/components/base/color_mode_toggle/color_mode_toggle.js +0 -92
- package/dist/components/base/datepicker/datepicker.js +0 -475
- package/dist/components/base/daterange_picker/daterange_picker.js +0 -394
- package/dist/components/base/drawer/drawer.js +0 -156
- package/dist/components/base/dropdown/dropdown.js +0 -330
- package/dist/components/base/dropdown/dropdown_divider.js +0 -48
- package/dist/components/base/dropdown/dropdown_form.js +0 -48
- package/dist/components/base/dropdown/dropdown_item.js +0 -175
- package/dist/components/base/dropdown/dropdown_section_header.js +0 -48
- package/dist/components/base/dropdown/dropdown_text.js +0 -48
- package/dist/components/base/filtered_search/common_story_options.js +0 -14
- package/dist/components/base/filtered_search/filtered_search.js +0 -428
- package/dist/components/base/filtered_search/filtered_search_suggestion.js +0 -95
- package/dist/components/base/filtered_search/filtered_search_suggestion_list.js +0 -139
- package/dist/components/base/filtered_search/filtered_search_term.js +0 -217
- package/dist/components/base/filtered_search/filtered_search_token.js +0 -383
- package/dist/components/base/filtered_search/filtered_search_token_segment.js +0 -444
- package/dist/components/base/filtered_search/filtered_search_utils.js +0 -241
- package/dist/components/base/form/form.js +0 -43
- package/dist/components/base/form/form_character_count/form_character_count.js +0 -107
- package/dist/components/base/form/form_checkbox/form_checkbox.js +0 -342
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +0 -186
- package/dist/components/base/form/form_combobox/constants.js +0 -55
- package/dist/components/base/form/form_combobox/form_combobox.js +0 -239
- package/dist/components/base/form/form_date/form_date.js +0 -143
- package/dist/components/base/form/form_fields/form_field_validator.js +0 -93
- package/dist/components/base/form/form_fields/form_fields.js +0 -289
- package/dist/components/base/form/form_fields/form_fields_loop.js +0 -75
- package/dist/components/base/form/form_fields/mappers.js +0 -13
- package/dist/components/base/form/form_fields/validators.js +0 -48
- package/dist/components/base/form/form_group/form_group.js +0 -119
- package/dist/components/base/form/form_input/form_input.js +0 -695
- package/dist/components/base/form/form_input_group/form_input_group.js +0 -120
- package/dist/components/base/form/form_input_group/form_input_group_mixin.js +0 -41
- package/dist/components/base/form/form_radio/form_radio.js +0 -259
- package/dist/components/base/form/form_radio_group/form_radio_group.js +0 -187
- package/dist/components/base/form/form_select/constants.js +0 -12
- package/dist/components/base/form/form_select/form_select.js +0 -96
- package/dist/components/base/form/form_textarea/form_textarea.js +0 -166
- package/dist/components/base/form/input_group_text/input_group_text.js +0 -43
- package/dist/components/base/icon/icon.js +0 -113
- package/dist/components/base/illustration/illustration.js +0 -80
- package/dist/components/base/infinite_scroll/infinite_scroll.js +0 -196
- package/dist/components/base/keyset_pagination/keyset_pagination.js +0 -152
- package/dist/components/base/label/label.js +0 -174
- package/dist/components/base/link/link.js +0 -332
- package/dist/components/base/loading_icon/loading_icon.js +0 -120
- package/dist/components/base/markdown/markdown.js +0 -50
- package/dist/components/base/modal/modal.js +0 -259
- package/dist/components/base/new_dropdowns/base_dropdown/base_dropdown.js +0 -716
- package/dist/components/base/new_dropdowns/base_dropdown/constants.js +0 -5
- package/dist/components/base/new_dropdowns/base_dropdown/dropdown_container.js +0 -32
- package/dist/components/base/new_dropdowns/constants.js +0 -24
- package/dist/components/base/new_dropdowns/disclosure/constants.js +0 -8
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +0 -400
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_group.js +0 -112
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +0 -196
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +0 -168
- package/dist/components/base/new_dropdowns/disclosure/utils.js +0 -84
- package/dist/components/base/new_dropdowns/listbox/listbox.js +0 -997
- package/dist/components/base/new_dropdowns/listbox/listbox_group.js +0 -58
- package/dist/components/base/new_dropdowns/listbox/listbox_item.js +0 -112
- package/dist/components/base/new_dropdowns/listbox/listbox_search_input.js +0 -94
- package/dist/components/base/new_dropdowns/listbox/mock_data.js +0 -131
- package/dist/components/base/new_dropdowns/listbox/utils.js +0 -33
- package/dist/components/base/pagination/pagination.js +0 -397
- package/dist/components/base/path/data.js +0 -34
- package/dist/components/base/path/path.js +0 -177
- package/dist/components/base/popover/popover.js +0 -142
- package/dist/components/base/progress_bar/progress_bar.js +0 -117
- package/dist/components/base/search_box_by_click/search_box_by_click.js +0 -245
- package/dist/components/base/search_box_by_type/search_box_by_type.js +0 -187
- package/dist/components/base/segmented_control/segmented_control.js +0 -73
- package/dist/components/base/skeleton_loader/skeleton_loader.js +0 -232
- package/dist/components/base/sorting/sorting.js +0 -180
- package/dist/components/base/table/constants.js +0 -5
- package/dist/components/base/table/table.js +0 -187
- package/dist/components/base/table_lite/table_lite.js +0 -80
- package/dist/components/base/tabs/constants.js +0 -3
- package/dist/components/base/tabs/tab/tab.js +0 -113
- package/dist/components/base/tabs/tabs/scrollable_tabs.js +0 -162
- package/dist/components/base/tabs/tabs/tabs.js +0 -223
- package/dist/components/base/toast/index.js +0 -66
- package/dist/components/base/toast/toast.js +0 -125
- package/dist/components/base/toast/toaster.js +0 -87
- package/dist/components/base/toggle/toggle.js +0 -178
- package/dist/components/base/token/token.js +0 -97
- package/dist/components/base/token_selector/helpers.js +0 -5
- package/dist/components/base/token_selector/token_container.js +0 -160
- package/dist/components/base/token_selector/token_selector.js +0 -454
- package/dist/components/base/token_selector/token_selector_dropdown.js +0 -223
- package/dist/components/base/tooltip/tooltip.js +0 -54
- package/dist/components/charts/area/area.js +0 -329
- package/dist/components/charts/bar/bar.js +0 -207
- package/dist/components/charts/chart/chart.js +0 -215
- package/dist/components/charts/column/column.js +0 -221
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +0 -199
- package/dist/components/charts/gauge/gauge.js +0 -205
- package/dist/components/charts/heatmap/heatmap.js +0 -299
- package/dist/components/charts/heatmap/index.js +0 -2
- package/dist/components/charts/legend/legend.js +0 -245
- package/dist/components/charts/line/line.js +0 -340
- package/dist/components/charts/series_label/series_label.js +0 -101
- package/dist/components/charts/shared/tooltip/tooltip.js +0 -369
- package/dist/components/charts/shared/tooltip/tooltip_default_format/tooltip_default_format.js +0 -53
- package/dist/components/charts/single_stat/single_stat.js +0 -164
- package/dist/components/charts/sparkline/sparkline.js +0 -299
- package/dist/components/charts/stacked_column/stacked_column.js +0 -380
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -125
- package/dist/components/dashboards/dashboard_layout/grid_layout/grid_layout.js +0 -326
- package/dist/components/dashboards/dashboard_layout/validators.js +0 -14
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +0 -236
- package/dist/components/dashboards/mock_data.js +0 -49
- package/dist/components/experimental/experiment_badge/constants.js +0 -4
- package/dist/components/experimental/experiment_badge/experiment_badge.js +0 -102
- package/dist/components/extended/multi_step_form_template/multi_step_form_template.js +0 -87
- package/dist/components/index.js +0 -107
- package/dist/components/mixins/button_mixin.js +0 -11
- package/dist/components/mixins/safe_link_mixin.js +0 -30
- package/dist/components/mixins/tooltip_mixin.js +0 -21
- package/dist/components/regions/dashboard_skeleton/dashboard_skeleton.js +0 -53
- package/dist/components/regions/empty_state/empty_state.js +0 -181
- package/dist/components/shared_components/clear_icon_button/clear_icon_button.js +0 -64
- package/dist/components/shared_components/clipboard_button/clipboard_button.js +0 -100
- package/dist/components/shared_components/close_button/close_button.js +0 -55
- package/dist/components/utilities/animated_number/animated_number.js +0 -131
- package/dist/components/utilities/friendly_wrap/friendly_wrap.js +0 -75
- package/dist/components/utilities/intersection_observer/intersection_observer.js +0 -88
- package/dist/components/utilities/intersperse/intersperse.js +0 -104
- package/dist/components/utilities/sprintf/sprintf.js +0 -171
- package/dist/components/utilities/truncate/constants.js +0 -8
- package/dist/components/utilities/truncate/truncate.js +0 -154
- package/dist/components/utilities/truncate_text/constants.js +0 -7
- package/dist/components/utilities/truncate_text/truncate_text.js +0 -146
- package/dist/config.js +0 -53
- package/dist/directives/hover_load/hover_load.js +0 -45
- package/dist/directives/index.js +0 -8
- package/dist/directives/modal.js +0 -1
- package/dist/directives/outside/outside.js +0 -149
- package/dist/directives/resize_observer/resize_observer.js +0 -58
- package/dist/directives/safe_html/constants.js +0 -6
- package/dist/directives/safe_html/safe_html.js +0 -39
- package/dist/directives/safe_link/mock_data.js +0 -10
- package/dist/directives/safe_link/safe_link.js +0 -67
- package/dist/directives/tooltip/container.js +0 -7
- package/dist/directives/tooltip/tooltip.js +0 -18
- package/dist/index.css +0 -7
- package/dist/index.css.map +0 -1
- package/dist/index.js +0 -2
- package/dist/tailwind.css +0 -2
- package/dist/tailwind.css.map +0 -1
- package/dist/tokens/build/js/tokens.dark.js +0 -1410
- package/dist/tokens/build/js/tokens.js +0 -1410
- package/dist/tokens/common_story_options.js +0 -29
- package/dist/tokens/tokens_story.js +0 -76
- package/dist/utils/breakpoints.js +0 -20
- package/dist/utils/charts/config.js +0 -616
- package/dist/utils/charts/constants.js +0 -69
- package/dist/utils/charts/mock_data.js +0 -191
- package/dist/utils/charts/story_config.js +0 -24
- package/dist/utils/charts/theme.js +0 -200
- package/dist/utils/charts/utils.js +0 -54
- package/dist/utils/constants.js +0 -333
- package/dist/utils/data_utils.js +0 -19
- package/dist/utils/datetime_utility.js +0 -61
- package/dist/utils/equality_utils.js +0 -84
- package/dist/utils/i18n.js +0 -65
- package/dist/utils/is_slot_empty.js +0 -34
- package/dist/utils/number_utils.js +0 -132
- package/dist/utils/play_utils.js +0 -11
- package/dist/utils/set_utils.js +0 -25
- package/dist/utils/stories_constants.js +0 -29
- package/dist/utils/stories_utils.js +0 -62
- package/dist/utils/story_decorators/container.js +0 -19
- package/dist/utils/string_utils.js +0 -69
- package/dist/utils/svgs/svg_paths.js +0 -7
- package/dist/utils/test_utils.js +0 -33
- package/dist/utils/use_fake_date.js +0 -29
- package/dist/utils/use_mock_intersection_observer.js +0 -105
- package/dist/utils/utils.js +0 -205
- package/dist/utils.js +0 -5
- package/dist/vendor/bootstrap-vue/src/bv-config.js +0 -8
- package/dist/vendor/bootstrap-vue/src/components/button/button-close.js +0 -81
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -204
- package/dist/vendor/bootstrap-vue/src/components/button/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.js +0 -75
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.js +0 -52
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.js +0 -85
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +0 -97
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -60
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -271
- package/dist/vendor/bootstrap-vue/src/components/dropdown/index.js +0 -8
- package/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js +0 -53
- package/dist/vendor/bootstrap-vue/src/components/form/form-text.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js +0 -53
- package/dist/vendor/bootstrap-vue/src/components/form/form.js +0 -56
- package/dist/vendor/bootstrap-vue/src/components/form/index.js +0 -4
- package/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js +0 -348
- package/dist/vendor/bootstrap-vue/src/components/form-group/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.js +0 -54
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select-option.js +0 -41
- package/dist/vendor/bootstrap-vue/src/components/form-select/form-select.js +0 -143
- package/dist/vendor/bootstrap-vue/src/components/form-select/helpers/mixin-options.js +0 -56
- package/dist/vendor/bootstrap-vue/src/components/form-select/index.js +0 -3
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.js +0 -217
- package/dist/vendor/bootstrap-vue/src/components/form-textarea/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/layout/col.js +0 -156
- package/dist/vendor/bootstrap-vue/src/components/layout/form-row.js +0 -34
- package/dist/vendor/bootstrap-vue/src/components/layout/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/link/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/link/link.js +0 -283
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.js +0 -21
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +0 -212
- package/dist/vendor/bootstrap-vue/src/components/modal/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/modal/modal.js +0 -887
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover-template.js +0 -55
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +0 -31
- package/dist/vendor/bootstrap-vue/src/components/popover/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/popover/popover.js +0 -49
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/constants.js +0 -22
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.js +0 -64
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/filter-event.js +0 -40
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-bottom-row.js +0 -43
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-busy.js +0 -83
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-caption.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-colgroup.js +0 -32
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-empty.js +0 -82
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-filtering.js +0 -274
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-items.js +0 -154
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-pagination.js +0 -44
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-provider.js +0 -191
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-selectable.js +0 -213
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-sorting.js +0 -275
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-stacked.js +0 -39
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-table-renderer.js +0 -186
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody-row.js +0 -338
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tbody.js +0 -243
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-tfoot.js +0 -50
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-thead.js +0 -218
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/mixin-top-row.js +0 -42
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.js +0 -86
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/sanitize-row.js +0 -32
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/stringify-record-values.js +0 -11
- package/dist/vendor/bootstrap-vue/src/components/table/helpers/text-selection-active.js +0 -14
- package/dist/vendor/bootstrap-vue/src/components/table/index.js +0 -9
- package/dist/vendor/bootstrap-vue/src/components/table/table-lite.js +0 -51
- package/dist/vendor/bootstrap-vue/src/components/table/table-simple.js +0 -44
- package/dist/vendor/bootstrap-vue/src/components/table/table.js +0 -67
- package/dist/vendor/bootstrap-vue/src/components/table/tbody.js +0 -116
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -204
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -96
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -99
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -121
- package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -238
- package/dist/vendor/bootstrap-vue/src/components/tabs/tabs.js +0 -601
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +0 -251
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip-template.js +0 -118
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +0 -932
- package/dist/vendor/bootstrap-vue/src/components/tooltip/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/components/tooltip/tooltip.js +0 -269
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +0 -103
- package/dist/vendor/bootstrap-vue/src/components/transporter/transporter.js +0 -205
- package/dist/vendor/bootstrap-vue/src/constants/components.js +0 -55
- package/dist/vendor/bootstrap-vue/src/constants/config.js +0 -11
- package/dist/vendor/bootstrap-vue/src/constants/env.js +0 -36
- package/dist/vendor/bootstrap-vue/src/constants/events.js +0 -56
- package/dist/vendor/bootstrap-vue/src/constants/key-codes.js +0 -11
- package/dist/vendor/bootstrap-vue/src/constants/popper.js +0 -10
- package/dist/vendor/bootstrap-vue/src/constants/props.js +0 -24
- package/dist/vendor/bootstrap-vue/src/constants/regex.js +0 -35
- package/dist/vendor/bootstrap-vue/src/constants/safe-types.js +0 -15
- package/dist/vendor/bootstrap-vue/src/constants/slots.js +0 -36
- package/dist/vendor/bootstrap-vue/src/directives/modal/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/modal/modal.js +0 -112
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/tooltip/tooltip.js +0 -265
- package/dist/vendor/bootstrap-vue/src/directives/visible/index.js +0 -1
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +0 -187
- package/dist/vendor/bootstrap-vue/src/mixins/attrs.js +0 -5
- package/dist/vendor/bootstrap-vue/src/mixins/click-out.js +0 -54
- package/dist/vendor/bootstrap-vue/src/mixins/dropdown.js +0 -470
- package/dist/vendor/bootstrap-vue/src/mixins/focus-in.js +0 -46
- package/dist/vendor/bootstrap-vue/src/mixins/form-control.js +0 -73
- package/dist/vendor/bootstrap-vue/src/mixins/form-custom.js +0 -26
- package/dist/vendor/bootstrap-vue/src/mixins/form-options.js +0 -91
- package/dist/vendor/bootstrap-vue/src/mixins/form-selection.js +0 -62
- package/dist/vendor/bootstrap-vue/src/mixins/form-size.js +0 -26
- package/dist/vendor/bootstrap-vue/src/mixins/form-state.js +0 -50
- package/dist/vendor/bootstrap-vue/src/mixins/form-text.js +0 -293
- package/dist/vendor/bootstrap-vue/src/mixins/form-validity.js +0 -50
- package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +0 -29
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +0 -57
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-document.js +0 -63
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-root.js +0 -121
- package/dist/vendor/bootstrap-vue/src/mixins/listen-on-window.js +0 -63
- package/dist/vendor/bootstrap-vue/src/mixins/listeners.js +0 -25
- package/dist/vendor/bootstrap-vue/src/mixins/model.js +0 -10
- package/dist/vendor/bootstrap-vue/src/mixins/normalize-slot.js +0 -30
- package/dist/vendor/bootstrap-vue/src/mixins/scoped-style.js +0 -18
- package/dist/vendor/bootstrap-vue/src/mixins/use-parent.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/array.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/bv-event.class.js +0 -60
- package/dist/vendor/bootstrap-vue/src/utils/cache.js +0 -60
- package/dist/vendor/bootstrap-vue/src/utils/clone-deep.js +0 -18
- package/dist/vendor/bootstrap-vue/src/utils/config-set.js +0 -86
- package/dist/vendor/bootstrap-vue/src/utils/config.js +0 -71
- package/dist/vendor/bootstrap-vue/src/utils/create-new-child-component.js +0 -133
- package/dist/vendor/bootstrap-vue/src/utils/css-escape.js +0 -70
- package/dist/vendor/bootstrap-vue/src/utils/dom.js +0 -298
- package/dist/vendor/bootstrap-vue/src/utils/element-to-vue-instance-registry.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/env.js +0 -16
- package/dist/vendor/bootstrap-vue/src/utils/events.js +0 -78
- package/dist/vendor/bootstrap-vue/src/utils/get-event-root.js +0 -5
- package/dist/vendor/bootstrap-vue/src/utils/get-instance-from-directive.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/get-scope-id.js +0 -9
- package/dist/vendor/bootstrap-vue/src/utils/get.js +0 -63
- package/dist/vendor/bootstrap-vue/src/utils/html.js +0 -16
- package/dist/vendor/bootstrap-vue/src/utils/identity.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/inspect.js +0 -35
- package/dist/vendor/bootstrap-vue/src/utils/locale.js +0 -19
- package/dist/vendor/bootstrap-vue/src/utils/loose-equal.js +0 -59
- package/dist/vendor/bootstrap-vue/src/utils/loose-index-of.js +0 -13
- package/dist/vendor/bootstrap-vue/src/utils/math.js +0 -9
- package/dist/vendor/bootstrap-vue/src/utils/memoize.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/model.js +0 -33
- package/dist/vendor/bootstrap-vue/src/utils/noop.js +0 -3
- package/dist/vendor/bootstrap-vue/src/utils/normalize-slot.js +0 -51
- package/dist/vendor/bootstrap-vue/src/utils/number.js +0 -23
- package/dist/vendor/bootstrap-vue/src/utils/object.js +0 -72
- package/dist/vendor/bootstrap-vue/src/utils/observe-dom.js +0 -76
- package/dist/vendor/bootstrap-vue/src/utils/on-instance-destroy.js +0 -22
- package/dist/vendor/bootstrap-vue/src/utils/plugins.js +0 -124
- package/dist/vendor/bootstrap-vue/src/utils/props.js +0 -67
- package/dist/vendor/bootstrap-vue/src/utils/router.js +0 -150
- package/dist/vendor/bootstrap-vue/src/utils/safe-vue-instance.js +0 -14
- package/dist/vendor/bootstrap-vue/src/utils/stable-sort.js +0 -28
- package/dist/vendor/bootstrap-vue/src/utils/string.js +0 -47
- package/dist/vendor/bootstrap-vue/src/utils/stringify-object-values.js +0 -31
- package/dist/vendor/bootstrap-vue/src/utils/warn.js +0 -45
- package/dist/vendor/bootstrap-vue/src/vue.js +0 -55
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
|
|
3
|
-
// @vue/component
|
|
4
|
-
const formSelectionMixin = extend({
|
|
5
|
-
computed: {
|
|
6
|
-
selectionStart: {
|
|
7
|
-
// Expose selectionStart for formatters, etc
|
|
8
|
-
cache: false,
|
|
9
|
-
/* istanbul ignore next */
|
|
10
|
-
get() {
|
|
11
|
-
return this.$refs.input.selectionStart;
|
|
12
|
-
},
|
|
13
|
-
/* istanbul ignore next */
|
|
14
|
-
set(val) {
|
|
15
|
-
this.$refs.input.selectionStart = val;
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
selectionEnd: {
|
|
19
|
-
// Expose selectionEnd for formatters, etc
|
|
20
|
-
cache: false,
|
|
21
|
-
/* istanbul ignore next */
|
|
22
|
-
get() {
|
|
23
|
-
return this.$refs.input.selectionEnd;
|
|
24
|
-
},
|
|
25
|
-
/* istanbul ignore next */
|
|
26
|
-
set(val) {
|
|
27
|
-
this.$refs.input.selectionEnd = val;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
selectionDirection: {
|
|
31
|
-
// Expose selectionDirection for formatters, etc
|
|
32
|
-
cache: false,
|
|
33
|
-
/* istanbul ignore next */
|
|
34
|
-
get() {
|
|
35
|
-
return this.$refs.input.selectionDirection;
|
|
36
|
-
},
|
|
37
|
-
/* istanbul ignore next */
|
|
38
|
-
set(val) {
|
|
39
|
-
this.$refs.input.selectionDirection = val;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
methods: {
|
|
44
|
-
/* istanbul ignore next */
|
|
45
|
-
select() {
|
|
46
|
-
// For external handler that may want a select() method
|
|
47
|
-
this.$refs.input.select(...arguments);
|
|
48
|
-
},
|
|
49
|
-
/* istanbul ignore next */
|
|
50
|
-
setSelectionRange() {
|
|
51
|
-
// For external handler that may want a setSelectionRange(a,b,c) method
|
|
52
|
-
this.$refs.input.setSelectionRange(...arguments);
|
|
53
|
-
},
|
|
54
|
-
/* istanbul ignore next */
|
|
55
|
-
setRangeText() {
|
|
56
|
-
// For external handler that may want a setRangeText(a,b,c) method
|
|
57
|
-
this.$refs.input.setRangeText(...arguments);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export { formSelectionMixin };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { PROP_TYPE_STRING } from '../constants/props';
|
|
3
|
-
|
|
4
|
-
// --- Props ---
|
|
5
|
-
|
|
6
|
-
const props = {
|
|
7
|
-
size: {
|
|
8
|
-
type: PROP_TYPE_STRING,
|
|
9
|
-
required: false,
|
|
10
|
-
default: undefined
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// --- Mixin ---
|
|
15
|
-
|
|
16
|
-
// @vue/component
|
|
17
|
-
const formSizeMixin = extend({
|
|
18
|
-
props,
|
|
19
|
-
computed: {
|
|
20
|
-
sizeFormClass() {
|
|
21
|
-
return [this.size ? `form-control-${this.size}` : null];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { formSizeMixin, props };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { PROP_TYPE_BOOLEAN } from '../constants/props';
|
|
3
|
-
import { isBoolean } from '../utils/inspect';
|
|
4
|
-
import { safeVueInstance } from '../utils/safe-vue-instance';
|
|
5
|
-
|
|
6
|
-
/* Form control contextual state class computation
|
|
7
|
-
*
|
|
8
|
-
* Returned class is either 'is-valid' or 'is-invalid' based on the 'state' prop
|
|
9
|
-
* state can be one of five values:
|
|
10
|
-
* - true for is-valid
|
|
11
|
-
* - false for is-invalid
|
|
12
|
-
* - null for no contextual state
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
// --- Props ---
|
|
16
|
-
|
|
17
|
-
const props = {
|
|
18
|
-
// Tri-state prop: true, false, null (or undefined)
|
|
19
|
-
state: {
|
|
20
|
-
type: PROP_TYPE_BOOLEAN,
|
|
21
|
-
required: false,
|
|
22
|
-
default: null
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// --- Mixin ---
|
|
27
|
-
|
|
28
|
-
// @vue/component
|
|
29
|
-
const formStateMixin = extend({
|
|
30
|
-
props,
|
|
31
|
-
computed: {
|
|
32
|
-
computedState() {
|
|
33
|
-
// If not a boolean, ensure that value is null
|
|
34
|
-
return isBoolean(this.state) ? this.state : null;
|
|
35
|
-
},
|
|
36
|
-
stateClass() {
|
|
37
|
-
const state = this.computedState;
|
|
38
|
-
return state === true ? 'is-valid' : state === false ? 'is-invalid' : null;
|
|
39
|
-
},
|
|
40
|
-
computedAriaInvalid() {
|
|
41
|
-
const ariaInvalid = safeVueInstance(this).ariaInvalid;
|
|
42
|
-
if (ariaInvalid === true || ariaInvalid === 'true' || ariaInvalid === '') {
|
|
43
|
-
return 'true';
|
|
44
|
-
}
|
|
45
|
-
return this.computedState === false ? 'true' : ariaInvalid;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export { formStateMixin, props };
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { EVENT_NAME_UPDATE, EVENT_NAME_INPUT, EVENT_NAME_CHANGE, EVENT_NAME_BLUR } from '../constants/events';
|
|
3
|
-
import { PROP_TYPE_NUMBER_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING, PROP_TYPE_NUMBER, PROP_TYPE_FUNCTION } from '../constants/props';
|
|
4
|
-
import { attemptFocus, attemptBlur } from '../utils/dom';
|
|
5
|
-
import { stopEvent } from '../utils/events';
|
|
6
|
-
import { mathMax } from '../utils/math';
|
|
7
|
-
import { makeModelMixin } from '../utils/model';
|
|
8
|
-
import { toInteger, toFloat } from '../utils/number';
|
|
9
|
-
import { sortKeys } from '../utils/object';
|
|
10
|
-
import { isFunction } from '../utils/inspect';
|
|
11
|
-
import { toString } from '../utils/string';
|
|
12
|
-
|
|
13
|
-
// --- Constants ---
|
|
14
|
-
|
|
15
|
-
const {
|
|
16
|
-
mixin: modelMixin,
|
|
17
|
-
props: modelProps,
|
|
18
|
-
prop: MODEL_PROP_NAME,
|
|
19
|
-
event: MODEL_EVENT_NAME
|
|
20
|
-
} = makeModelMixin('value', {
|
|
21
|
-
type: PROP_TYPE_NUMBER_STRING,
|
|
22
|
-
defaultValue: '',
|
|
23
|
-
event: EVENT_NAME_UPDATE
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// --- Props ---
|
|
27
|
-
|
|
28
|
-
const props = sortKeys({
|
|
29
|
-
...modelProps,
|
|
30
|
-
ariaInvalid: {
|
|
31
|
-
type: [PROP_TYPE_BOOLEAN, PROP_TYPE_STRING],
|
|
32
|
-
required: false,
|
|
33
|
-
default: false
|
|
34
|
-
},
|
|
35
|
-
autocomplete: {
|
|
36
|
-
type: PROP_TYPE_STRING,
|
|
37
|
-
required: false,
|
|
38
|
-
default: undefined
|
|
39
|
-
},
|
|
40
|
-
// Debounce timeout (in ms). Not applicable with `lazy` prop
|
|
41
|
-
debounce: {
|
|
42
|
-
type: [PROP_TYPE_NUMBER, PROP_TYPE_STRING],
|
|
43
|
-
required: false,
|
|
44
|
-
default: 0
|
|
45
|
-
},
|
|
46
|
-
formatter: {
|
|
47
|
-
type: PROP_TYPE_FUNCTION,
|
|
48
|
-
required: false,
|
|
49
|
-
default: undefined
|
|
50
|
-
},
|
|
51
|
-
// Only update the `v-model` on blur/change events
|
|
52
|
-
lazy: {
|
|
53
|
-
type: PROP_TYPE_BOOLEAN,
|
|
54
|
-
required: false,
|
|
55
|
-
default: false
|
|
56
|
-
},
|
|
57
|
-
lazyFormatter: {
|
|
58
|
-
type: PROP_TYPE_BOOLEAN,
|
|
59
|
-
required: false,
|
|
60
|
-
default: false
|
|
61
|
-
},
|
|
62
|
-
number: {
|
|
63
|
-
type: PROP_TYPE_BOOLEAN,
|
|
64
|
-
required: false,
|
|
65
|
-
default: false
|
|
66
|
-
},
|
|
67
|
-
placeholder: {
|
|
68
|
-
type: PROP_TYPE_STRING,
|
|
69
|
-
required: false,
|
|
70
|
-
default: undefined
|
|
71
|
-
},
|
|
72
|
-
plaintext: {
|
|
73
|
-
type: PROP_TYPE_BOOLEAN,
|
|
74
|
-
required: false,
|
|
75
|
-
default: false
|
|
76
|
-
},
|
|
77
|
-
readonly: {
|
|
78
|
-
type: PROP_TYPE_BOOLEAN,
|
|
79
|
-
required: false,
|
|
80
|
-
default: false
|
|
81
|
-
},
|
|
82
|
-
trim: {
|
|
83
|
-
type: PROP_TYPE_BOOLEAN,
|
|
84
|
-
required: false,
|
|
85
|
-
default: false
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// --- Mixin ---
|
|
90
|
-
|
|
91
|
-
// @vue/component
|
|
92
|
-
const formTextMixin = extend({
|
|
93
|
-
mixins: [modelMixin],
|
|
94
|
-
props,
|
|
95
|
-
data() {
|
|
96
|
-
const value = this[MODEL_PROP_NAME];
|
|
97
|
-
return {
|
|
98
|
-
localValue: toString(value),
|
|
99
|
-
vModelValue: this.modifyValue(value)
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
computed: {
|
|
103
|
-
computedClass() {
|
|
104
|
-
const {
|
|
105
|
-
plaintext,
|
|
106
|
-
type
|
|
107
|
-
} = this;
|
|
108
|
-
const isRange = type === 'range';
|
|
109
|
-
const isColor = type === 'color';
|
|
110
|
-
return [{
|
|
111
|
-
// Range input needs class `custom-range`
|
|
112
|
-
'custom-range': isRange,
|
|
113
|
-
// `plaintext` not supported by `type="range"` or `type="color"`
|
|
114
|
-
'form-control-plaintext': plaintext && !isRange && !isColor,
|
|
115
|
-
// `form-control` not used by `type="range"` or `plaintext`
|
|
116
|
-
// Always used by `type="color"`
|
|
117
|
-
'form-control': isColor || !plaintext && !isRange
|
|
118
|
-
}, this.sizeFormClass, this.stateClass];
|
|
119
|
-
},
|
|
120
|
-
computedDebounce() {
|
|
121
|
-
// Ensure we have a positive number equal to or greater than 0
|
|
122
|
-
return mathMax(toInteger(this.debounce, 0), 0);
|
|
123
|
-
},
|
|
124
|
-
hasFormatter() {
|
|
125
|
-
// `formatter` is an optional Function prop with no default
|
|
126
|
-
return isFunction(this.formatter);
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
watch: {
|
|
130
|
-
[MODEL_PROP_NAME](newValue) {
|
|
131
|
-
const stringifyValue = toString(newValue);
|
|
132
|
-
const modifiedValue = this.modifyValue(newValue);
|
|
133
|
-
if (stringifyValue !== this.localValue || modifiedValue !== this.vModelValue) {
|
|
134
|
-
// Clear any pending debounce timeout, as we are overwriting the user input
|
|
135
|
-
this.clearDebounce();
|
|
136
|
-
// Update the local values
|
|
137
|
-
this.localValue = stringifyValue;
|
|
138
|
-
this.vModelValue = modifiedValue;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
created() {
|
|
143
|
-
// Create private non-reactive props
|
|
144
|
-
this.$_inputDebounceTimer = null;
|
|
145
|
-
},
|
|
146
|
-
beforeDestroy() {
|
|
147
|
-
this.clearDebounce();
|
|
148
|
-
},
|
|
149
|
-
methods: {
|
|
150
|
-
clearDebounce() {
|
|
151
|
-
clearTimeout(this.$_inputDebounceTimer);
|
|
152
|
-
this.$_inputDebounceTimer = null;
|
|
153
|
-
},
|
|
154
|
-
formatValue(value, event) {
|
|
155
|
-
let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
156
|
-
value = toString(value);
|
|
157
|
-
if (this.hasFormatter && (!this.lazyFormatter || force)) {
|
|
158
|
-
value = this.formatter(value, event);
|
|
159
|
-
}
|
|
160
|
-
return value;
|
|
161
|
-
},
|
|
162
|
-
modifyValue(value) {
|
|
163
|
-
value = toString(value);
|
|
164
|
-
// Emulate `.trim` modifier behaviour
|
|
165
|
-
if (this.trim) {
|
|
166
|
-
value = value.trim();
|
|
167
|
-
}
|
|
168
|
-
// Emulate `.number` modifier behaviour
|
|
169
|
-
if (this.number) {
|
|
170
|
-
value = toFloat(value, value);
|
|
171
|
-
}
|
|
172
|
-
return value;
|
|
173
|
-
},
|
|
174
|
-
updateValue(value) {
|
|
175
|
-
let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
176
|
-
const {
|
|
177
|
-
lazy
|
|
178
|
-
} = this;
|
|
179
|
-
if (lazy && !force) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
// Make sure to always clear the debounce when `updateValue()`
|
|
183
|
-
// is called, even when the v-model hasn't changed
|
|
184
|
-
this.clearDebounce();
|
|
185
|
-
// Define the shared update logic in a method to be able to use
|
|
186
|
-
// it for immediate and debounced value changes
|
|
187
|
-
const doUpdate = () => {
|
|
188
|
-
value = this.modifyValue(value);
|
|
189
|
-
if (value !== this.vModelValue) {
|
|
190
|
-
this.vModelValue = value;
|
|
191
|
-
this.$emit(MODEL_EVENT_NAME, value);
|
|
192
|
-
} else if (this.hasFormatter) {
|
|
193
|
-
// When the `vModelValue` hasn't changed but the actual input value
|
|
194
|
-
// is out of sync, make sure to change it to the given one
|
|
195
|
-
// Usually caused by browser autocomplete and how it triggers the
|
|
196
|
-
// change or input event, or depending on the formatter function
|
|
197
|
-
// https://github.com/bootstrap-vue/bootstrap-vue/issues/2657
|
|
198
|
-
// https://github.com/bootstrap-vue/bootstrap-vue/issues/3498
|
|
199
|
-
/* istanbul ignore next: hard to test */
|
|
200
|
-
const $input = this.$refs.input;
|
|
201
|
-
/* istanbul ignore if: hard to test out of sync value */
|
|
202
|
-
if ($input && value !== $input.value) {
|
|
203
|
-
$input.value = value;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
// Only debounce the value update when a value greater than `0`
|
|
208
|
-
// is set and we are not in lazy mode or this is a forced update
|
|
209
|
-
const debounce = this.computedDebounce;
|
|
210
|
-
if (debounce > 0 && !lazy && !force) {
|
|
211
|
-
this.$_inputDebounceTimer = setTimeout(doUpdate, debounce);
|
|
212
|
-
} else {
|
|
213
|
-
// Immediately update the v-model
|
|
214
|
-
doUpdate();
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
onInput(event) {
|
|
218
|
-
// `event.target.composing` is set by Vue
|
|
219
|
-
// https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/directives/model.js
|
|
220
|
-
// TODO: Is this needed now with the latest Vue?
|
|
221
|
-
/* istanbul ignore if: hard to test composition events */
|
|
222
|
-
if (event.target.composing) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
const {
|
|
226
|
-
value
|
|
227
|
-
} = event.target;
|
|
228
|
-
const formattedValue = this.formatValue(value, event);
|
|
229
|
-
// Exit when the `formatter` function strictly returned `false`
|
|
230
|
-
// or prevented the input event
|
|
231
|
-
/* istanbul ignore next */
|
|
232
|
-
if (formattedValue === false || event.defaultPrevented) {
|
|
233
|
-
stopEvent(event, {
|
|
234
|
-
propagation: false
|
|
235
|
-
});
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
this.localValue = formattedValue;
|
|
239
|
-
this.updateValue(formattedValue);
|
|
240
|
-
this.$emit(EVENT_NAME_INPUT, formattedValue);
|
|
241
|
-
},
|
|
242
|
-
onChange(event) {
|
|
243
|
-
const {
|
|
244
|
-
value
|
|
245
|
-
} = event.target;
|
|
246
|
-
const formattedValue = this.formatValue(value, event);
|
|
247
|
-
// Exit when the `formatter` function strictly returned `false`
|
|
248
|
-
// or prevented the input event
|
|
249
|
-
/* istanbul ignore next */
|
|
250
|
-
if (formattedValue === false || event.defaultPrevented) {
|
|
251
|
-
stopEvent(event, {
|
|
252
|
-
propagation: false
|
|
253
|
-
});
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
this.localValue = formattedValue;
|
|
257
|
-
this.updateValue(formattedValue, true);
|
|
258
|
-
this.$emit(EVENT_NAME_CHANGE, formattedValue);
|
|
259
|
-
},
|
|
260
|
-
onBlur(event) {
|
|
261
|
-
// Apply the `localValue` on blur to prevent cursor jumps
|
|
262
|
-
// on mobile browsers (e.g. caused by autocomplete)
|
|
263
|
-
const {
|
|
264
|
-
value
|
|
265
|
-
} = event.target;
|
|
266
|
-
const formattedValue = this.formatValue(value, event, true);
|
|
267
|
-
if (formattedValue !== false) {
|
|
268
|
-
// We need to use the modified value here to apply the
|
|
269
|
-
// `.trim` and `.number` modifiers properly
|
|
270
|
-
this.localValue = toString(this.modifyValue(formattedValue));
|
|
271
|
-
// We pass the formatted value here since the `updateValue` method
|
|
272
|
-
// handles the modifiers itself
|
|
273
|
-
this.updateValue(formattedValue, true);
|
|
274
|
-
}
|
|
275
|
-
// Emit native blur event
|
|
276
|
-
this.$emit(EVENT_NAME_BLUR, event);
|
|
277
|
-
},
|
|
278
|
-
focus() {
|
|
279
|
-
// For external handler that may want a focus method
|
|
280
|
-
if (!this.disabled) {
|
|
281
|
-
attemptFocus(this.$el);
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
blur() {
|
|
285
|
-
// For external handler that may want a blur method
|
|
286
|
-
if (!this.disabled) {
|
|
287
|
-
attemptBlur(this.$el);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
export { MODEL_EVENT_NAME, MODEL_PROP_NAME, formTextMixin, props };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
|
|
3
|
-
// @vue/component
|
|
4
|
-
const formValidityMixin = extend({
|
|
5
|
-
computed: {
|
|
6
|
-
validity: {
|
|
7
|
-
// Expose validity property
|
|
8
|
-
cache: false,
|
|
9
|
-
/* istanbul ignore next */
|
|
10
|
-
get() {
|
|
11
|
-
return this.$refs.input.validity;
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
validationMessage: {
|
|
15
|
-
// Expose validationMessage property
|
|
16
|
-
cache: false,
|
|
17
|
-
/* istanbul ignore next */
|
|
18
|
-
get() {
|
|
19
|
-
return this.$refs.input.validationMessage;
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
willValidate: {
|
|
23
|
-
// Expose willValidate property
|
|
24
|
-
cache: false,
|
|
25
|
-
/* istanbul ignore next */
|
|
26
|
-
get() {
|
|
27
|
-
return this.$refs.input.willValidate;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
/* istanbul ignore next */
|
|
33
|
-
setCustomValidity() {
|
|
34
|
-
// For external handler that may want a setCustomValidity(...) method
|
|
35
|
-
return this.$refs.input.setCustomValidity(...arguments);
|
|
36
|
-
},
|
|
37
|
-
/* istanbul ignore next */
|
|
38
|
-
checkValidity() {
|
|
39
|
-
// For external handler that may want a checkValidity(...) method
|
|
40
|
-
return this.$refs.input.checkValidity(...arguments);
|
|
41
|
-
},
|
|
42
|
-
/* istanbul ignore next */
|
|
43
|
-
reportValidity() {
|
|
44
|
-
// For external handler that may want a reportValidity(...) method
|
|
45
|
-
return this.$refs.input.reportValidity(...arguments);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export { formValidityMixin };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { extend, isVue3 } from '../vue';
|
|
2
|
-
import { isUndefined, isArray } from '../utils/inspect';
|
|
3
|
-
|
|
4
|
-
// Mixin to determine if an event listener has been registered
|
|
5
|
-
// either via `v-on:name` (in the parent) or programmatically
|
|
6
|
-
// via `vm.$on('name', ...)`
|
|
7
|
-
// See: https://github.com/vuejs/vue/issues/10825
|
|
8
|
-
|
|
9
|
-
// @vue/component
|
|
10
|
-
const hasListenerMixin = extend({
|
|
11
|
-
methods: {
|
|
12
|
-
hasListener(name) {
|
|
13
|
-
if (isVue3(this)) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
// Only includes listeners registered via `v-on:name`
|
|
17
|
-
const $listeners = this.$listeners || {};
|
|
18
|
-
// Includes `v-on:name` and `this.$on('name')` registered listeners
|
|
19
|
-
// Note this property is not part of the public Vue API, but it is
|
|
20
|
-
// the only way to determine if a listener was added via `vm.$on`
|
|
21
|
-
const $events = this._events || {};
|
|
22
|
-
// Registered listeners in `this._events` are always an array,
|
|
23
|
-
// but might be zero length
|
|
24
|
-
return !isUndefined($listeners[name]) || isArray($events[name]) && $events[name].length > 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export { hasListenerMixin };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { extend, COMPONENT_UID_KEY } from '../vue';
|
|
2
|
-
import { PROP_TYPE_STRING } from '../constants/props';
|
|
3
|
-
|
|
4
|
-
// SSR safe client-side ID attribute generation
|
|
5
|
-
// ID's can only be generated client-side, after mount
|
|
6
|
-
// `this._uid` is not synched between server and client
|
|
7
|
-
|
|
8
|
-
// --- Props ---
|
|
9
|
-
|
|
10
|
-
const props = {
|
|
11
|
-
id: {
|
|
12
|
-
type: PROP_TYPE_STRING,
|
|
13
|
-
required: false,
|
|
14
|
-
default: undefined
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// --- Mixin ---
|
|
19
|
-
|
|
20
|
-
// @vue/component
|
|
21
|
-
const idMixin = extend({
|
|
22
|
-
props,
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
localId_: null
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
computed: {
|
|
29
|
-
safeId() {
|
|
30
|
-
// Computed property that returns a dynamic function for creating the ID
|
|
31
|
-
// Reacts to changes in both `.id` and `.localId_` and regenerates a new function
|
|
32
|
-
const id = this.id || this.localId_;
|
|
33
|
-
|
|
34
|
-
// We return a function that accepts an optional suffix string
|
|
35
|
-
// So this computed prop looks and works like a method
|
|
36
|
-
// but benefits from Vue's computed prop caching
|
|
37
|
-
const fn = suffix => {
|
|
38
|
-
if (!id) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
suffix = String(suffix || '').replace(/\s+/g, '_');
|
|
42
|
-
return suffix ? id + '_' + suffix : id;
|
|
43
|
-
};
|
|
44
|
-
return fn;
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
mounted() {
|
|
48
|
-
// `mounted()` only occurs client-side
|
|
49
|
-
this.$nextTick(() => {
|
|
50
|
-
// Update DOM with auto-generated ID after mount
|
|
51
|
-
// to prevent SSR hydration errors
|
|
52
|
-
this.localId_ = `__BVID__${this[COMPONENT_UID_KEY]}`;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
export { idMixin, props };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { IS_BROWSER } from '../constants/env';
|
|
3
|
-
import { EVENT_OPTIONS_NO_CAPTURE } from '../constants/events';
|
|
4
|
-
import { arrayIncludes } from '../utils/array';
|
|
5
|
-
import { eventOn, eventOff } from '../utils/events';
|
|
6
|
-
import { keys } from '../utils/object';
|
|
7
|
-
|
|
8
|
-
// --- Constants ---
|
|
9
|
-
|
|
10
|
-
const PROP = '$_documentListeners';
|
|
11
|
-
|
|
12
|
-
// --- Mixin ---
|
|
13
|
-
|
|
14
|
-
// @vue/component
|
|
15
|
-
const listenOnDocumentMixin = extend({
|
|
16
|
-
created() {
|
|
17
|
-
// Define non-reactive property
|
|
18
|
-
// Object of arrays, keyed by event name,
|
|
19
|
-
// where value is an array of callbacks
|
|
20
|
-
this[PROP] = {};
|
|
21
|
-
},
|
|
22
|
-
beforeDestroy() {
|
|
23
|
-
// Unregister all registered listeners
|
|
24
|
-
keys(this[PROP] || {}).forEach(event => {
|
|
25
|
-
this[PROP][event].forEach(callback => {
|
|
26
|
-
this.listenOffDocument(event, callback);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
this[PROP] = null;
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
registerDocumentListener(event, callback) {
|
|
33
|
-
if (this[PROP]) {
|
|
34
|
-
this[PROP][event] = this[PROP][event] || [];
|
|
35
|
-
if (!arrayIncludes(this[PROP][event], callback)) {
|
|
36
|
-
this[PROP][event].push(callback);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
unregisterDocumentListener(event, callback) {
|
|
41
|
-
if (this[PROP] && this[PROP][event]) {
|
|
42
|
-
this[PROP][event] = this[PROP][event].filter(cb => cb !== callback);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
listenDocument(on, event, callback) {
|
|
46
|
-
on ? this.listenOnDocument(event, callback) : this.listenOffDocument(event, callback);
|
|
47
|
-
},
|
|
48
|
-
listenOnDocument(event, callback) {
|
|
49
|
-
if (IS_BROWSER) {
|
|
50
|
-
eventOn(document, event, callback, EVENT_OPTIONS_NO_CAPTURE);
|
|
51
|
-
this.registerDocumentListener(event, callback);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
listenOffDocument(event, callback) {
|
|
55
|
-
if (IS_BROWSER) {
|
|
56
|
-
eventOff(document, event, callback, EVENT_OPTIONS_NO_CAPTURE);
|
|
57
|
-
}
|
|
58
|
-
this.unregisterDocumentListener(event, callback);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export { listenOnDocumentMixin };
|