@gitlab/ui 131.2.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 +11 -11
- package/src/components/base/form/form_checkbox/form_checkbox.vue +1 -2
- package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
- package/src/components/base/form/form_radio/form_radio.vue +1 -1
- package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
- package/src/components/base/table/table.scss +8 -0
- package/src/components/utilities/truncate/truncate.scss +3 -1
- package/src/scss/mixins.scss +3 -1
- package/src/utils/equality_utils.js +82 -0
- package/src/vendor/bootstrap-vue/src/components/button/button-close.js +20 -5
- package/src/vendor/bootstrap-vue/src/components/button/button.js +36 -8
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.js +12 -4
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +16 -5
- package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +99 -24
- package/src/vendor/bootstrap-vue/src/components/form/form-text.js +20 -5
- package/src/vendor/bootstrap-vue/src/components/form/form.js +20 -5
- package/src/vendor/bootstrap-vue/src/components/layout/form-row.js +5 -2
- package/src/vendor/bootstrap-vue/src/components/table/tbody.js +10 -3
- package/src/vendor/bootstrap-vue/src/components/table/td.js +28 -7
- package/src/vendor/bootstrap-vue/src/components/table/tfoot.js +5 -2
- package/src/vendor/bootstrap-vue/src/components/table/thead.js +5 -2
- package/src/vendor/bootstrap-vue/src/components/table/tr.js +5 -2
- package/src/vendor/bootstrap-vue/src/components/tabs/tab.js +51 -12
- 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 -343
- 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/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 -66
- package/dist/vendor/bootstrap-vue/src/components/button/button.js +0 -176
- 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 -89
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.js +0 -49
- package/dist/vendor/bootstrap-vue/src/components/dropdown/dropdown.js +0 -195
- 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 -40
- 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 -41
- 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 -31
- 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 -109
- package/dist/vendor/bootstrap-vue/src/components/table/td.js +0 -183
- package/dist/vendor/bootstrap-vue/src/components/table/tfoot.js +0 -93
- package/dist/vendor/bootstrap-vue/src/components/table/th.js +0 -26
- package/dist/vendor/bootstrap-vue/src/components/table/thead.js +0 -96
- package/dist/vendor/bootstrap-vue/src/components/table/tr.js +0 -118
- package/dist/vendor/bootstrap-vue/src/components/tabs/index.js +0 -2
- package/dist/vendor/bootstrap-vue/src/components/tabs/tab.js +0 -199
- 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,121 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { arrayIncludes } from '../utils/array';
|
|
3
|
-
import { keys } from '../utils/object';
|
|
4
|
-
import { getEventRoot } from '../utils/get-event-root';
|
|
5
|
-
|
|
6
|
-
// --- Constants ---
|
|
7
|
-
|
|
8
|
-
const PROP = '$_rootListeners';
|
|
9
|
-
|
|
10
|
-
// --- Mixin ---
|
|
11
|
-
|
|
12
|
-
// @vue/component
|
|
13
|
-
const listenOnRootMixin = extend({
|
|
14
|
-
computed: {
|
|
15
|
-
bvEventRoot() {
|
|
16
|
-
return getEventRoot(this);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
created() {
|
|
20
|
-
// Define non-reactive property
|
|
21
|
-
// Object of arrays, keyed by event name,
|
|
22
|
-
// where value is an array of callbacks
|
|
23
|
-
this[PROP] = {};
|
|
24
|
-
},
|
|
25
|
-
beforeDestroy() {
|
|
26
|
-
// Unregister all registered listeners
|
|
27
|
-
keys(this[PROP] || {}).forEach(event => {
|
|
28
|
-
this[PROP][event].forEach(callback => {
|
|
29
|
-
this.listenOffRoot(event, callback);
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
this[PROP] = null;
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
registerRootListener(event, callback) {
|
|
36
|
-
if (this[PROP]) {
|
|
37
|
-
this[PROP][event] = this[PROP][event] || [];
|
|
38
|
-
if (!arrayIncludes(this[PROP][event], callback)) {
|
|
39
|
-
this[PROP][event].push(callback);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
unregisterRootListener(event, callback) {
|
|
44
|
-
if (this[PROP] && this[PROP][event]) {
|
|
45
|
-
this[PROP][event] = this[PROP][event].filter(cb => cb !== callback);
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
/**
|
|
49
|
-
* Safely register event listeners on the root Vue node
|
|
50
|
-
* While Vue automatically removes listeners for individual components,
|
|
51
|
-
* when a component registers a listener on `$root` and is destroyed,
|
|
52
|
-
* this orphans a callback because the node is gone, but the `$root`
|
|
53
|
-
* does not clear the callback
|
|
54
|
-
*
|
|
55
|
-
* When registering a `$root` listener, it also registers the listener
|
|
56
|
-
* to be removed in the component's `beforeDestroy()` hook
|
|
57
|
-
*
|
|
58
|
-
* @param {string} event
|
|
59
|
-
* @param {function} callback
|
|
60
|
-
*/
|
|
61
|
-
listenOnRoot(event, callback) {
|
|
62
|
-
if (this.bvEventRoot) {
|
|
63
|
-
this.bvEventRoot.$on(event, callback);
|
|
64
|
-
this.registerRootListener(event, callback);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* Safely register a `$once()` event listener on the root Vue node
|
|
69
|
-
* While Vue automatically removes listeners for individual components,
|
|
70
|
-
* when a component registers a listener on `$root` and is destroyed,
|
|
71
|
-
* this orphans a callback because the node is gone, but the `$root`
|
|
72
|
-
* does not clear the callback
|
|
73
|
-
*
|
|
74
|
-
* When registering a `$root` listener, it also registers the listener
|
|
75
|
-
* to be removed in the component's `beforeDestroy()` hook
|
|
76
|
-
*
|
|
77
|
-
* @param {string} event
|
|
78
|
-
* @param {function} callback
|
|
79
|
-
*/
|
|
80
|
-
listenOnRootOnce(event, callback) {
|
|
81
|
-
var _this = this;
|
|
82
|
-
if (this.bvEventRoot) {
|
|
83
|
-
const _callback = function () {
|
|
84
|
-
_this.unregisterRootListener(_callback);
|
|
85
|
-
// eslint-disable-next-line node/no-callback-literal
|
|
86
|
-
callback(...arguments);
|
|
87
|
-
};
|
|
88
|
-
this.bvEventRoot.$once(event, _callback);
|
|
89
|
-
this.registerRootListener(event, _callback);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
/**
|
|
93
|
-
* Safely unregister event listeners from the root Vue node
|
|
94
|
-
*
|
|
95
|
-
* @param {string} event
|
|
96
|
-
* @param {function} callback
|
|
97
|
-
*/
|
|
98
|
-
listenOffRoot(event, callback) {
|
|
99
|
-
this.unregisterRootListener(event, callback);
|
|
100
|
-
if (this.bvEventRoot) {
|
|
101
|
-
this.bvEventRoot.$off(event, callback);
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Convenience method for calling `vm.$emit()` on `$root`
|
|
106
|
-
*
|
|
107
|
-
* @param {string} event
|
|
108
|
-
* @param {*} args
|
|
109
|
-
*/
|
|
110
|
-
emitOnRoot(event) {
|
|
111
|
-
if (this.bvEventRoot) {
|
|
112
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
113
|
-
args[_key - 1] = arguments[_key];
|
|
114
|
-
}
|
|
115
|
-
this.bvEventRoot.$emit(event, ...args);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
export { listenOnRootMixin };
|
|
@@ -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 = '$_windowListeners';
|
|
11
|
-
|
|
12
|
-
// --- Mixin ---
|
|
13
|
-
|
|
14
|
-
// @vue/component
|
|
15
|
-
const listenOnWindowMixin = 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.listenOffWindow(event, callback);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
this[PROP] = null;
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
registerWindowListener(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
|
-
unregisterWindowListener(event, callback) {
|
|
41
|
-
if (this[PROP] && this[PROP][event]) {
|
|
42
|
-
this[PROP][event] = this[PROP][event].filter(cb => cb !== callback);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
listenWindow(on, event, callback) {
|
|
46
|
-
on ? this.listenOnWindow(event, callback) : this.listenOffWindow(event, callback);
|
|
47
|
-
},
|
|
48
|
-
listenOnWindow(event, callback) {
|
|
49
|
-
if (IS_BROWSER) {
|
|
50
|
-
eventOn(window, event, callback, EVENT_OPTIONS_NO_CAPTURE);
|
|
51
|
-
this.registerWindowListener(event, callback);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
listenOffWindow(event, callback) {
|
|
55
|
-
if (IS_BROWSER) {
|
|
56
|
-
eventOff(window, event, callback, EVENT_OPTIONS_NO_CAPTURE);
|
|
57
|
-
}
|
|
58
|
-
this.unregisterWindowListener(event, callback);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export { listenOnWindowMixin };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { isVue3 } from '../vue';
|
|
2
|
-
import { getInternalPropName, makePropCacheMixin } from '../utils/cache';
|
|
3
|
-
|
|
4
|
-
const internalPropName = getInternalPropName('bvListeners');
|
|
5
|
-
const listenersMixin = makePropCacheMixin('$listeners', 'bvListeners').extend({
|
|
6
|
-
created() {
|
|
7
|
-
if (!isVue3(this)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
this[internalPropName] = {
|
|
11
|
-
// bug: this.$listeners is non-reactive in Vue.js 3 compat
|
|
12
|
-
...this.$listeners
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
beforeUpdate() {
|
|
16
|
-
if (!isVue3(this)) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
this[internalPropName] = {
|
|
20
|
-
...this.$listeners
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export { listenersMixin };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { SLOT_NAME_DEFAULT } from '../constants/slots';
|
|
3
|
-
import { hasNormalizedSlot, normalizeSlot } from '../utils/normalize-slot';
|
|
4
|
-
import { concat } from '../utils/array';
|
|
5
|
-
|
|
6
|
-
// @vue/component
|
|
7
|
-
const normalizeSlotMixin = extend({
|
|
8
|
-
methods: {
|
|
9
|
-
// Returns `true` if the either a `$scopedSlot` or `$slot` exists with the specified name
|
|
10
|
-
// `name` can be a string name or an array of names
|
|
11
|
-
hasNormalizedSlot() {
|
|
12
|
-
let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SLOT_NAME_DEFAULT;
|
|
13
|
-
let scopedSlots = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.$scopedSlots;
|
|
14
|
-
let slots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.$slots;
|
|
15
|
-
return hasNormalizedSlot(name, scopedSlots, slots);
|
|
16
|
-
},
|
|
17
|
-
// Returns an array of rendered VNodes if slot found, otherwise `undefined`
|
|
18
|
-
// `name` can be a string name or an array of names
|
|
19
|
-
normalizeSlot() {
|
|
20
|
-
let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SLOT_NAME_DEFAULT;
|
|
21
|
-
let scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
22
|
-
let scopedSlots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.$scopedSlots;
|
|
23
|
-
let slots = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.$slots;
|
|
24
|
-
const vNodes = normalizeSlot(name, scope, scopedSlots, slots);
|
|
25
|
-
return vNodes ? concat(vNodes) : vNodes;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export { normalizeSlotMixin };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
import { useParentMixin } from './use-parent';
|
|
3
|
-
import { getScopeId } from '../utils/get-scope-id';
|
|
4
|
-
|
|
5
|
-
// @vue/component
|
|
6
|
-
const scopedStyleMixin = extend({
|
|
7
|
-
mixins: [useParentMixin],
|
|
8
|
-
computed: {
|
|
9
|
-
scopedStyleAttrs() {
|
|
10
|
-
const scopeId = getScopeId(this.bvParent);
|
|
11
|
-
return scopeId ? {
|
|
12
|
-
[scopeId]: ''
|
|
13
|
-
} : {};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export { scopedStyleMixin };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { extend } from '../vue';
|
|
2
|
-
|
|
3
|
-
// --- Mixin ---
|
|
4
|
-
|
|
5
|
-
// @vue/component
|
|
6
|
-
const useParentMixin = extend({
|
|
7
|
-
computed: {
|
|
8
|
-
bvParent() {
|
|
9
|
-
return this.$parent || this.$root === this && this.$options.bvParent;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export { useParentMixin };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { isFunction } from './inspect';
|
|
2
|
-
|
|
3
|
-
// --- Static ---
|
|
4
|
-
|
|
5
|
-
const from = function () {
|
|
6
|
-
return Array.from(...arguments);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
// --- Instance ---
|
|
10
|
-
|
|
11
|
-
const arrayIncludes = (array, value) => array.indexOf(value) !== -1;
|
|
12
|
-
const concat = function () {
|
|
13
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14
|
-
args[_key] = arguments[_key];
|
|
15
|
-
}
|
|
16
|
-
return Array.prototype.concat.apply([], args);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// --- Utilities ---
|
|
20
|
-
|
|
21
|
-
const createArray = (length, fillFn) => {
|
|
22
|
-
const mapFn = isFunction(fillFn) ? fillFn : () => fillFn;
|
|
23
|
-
return Array.apply(null, {
|
|
24
|
-
length
|
|
25
|
-
}).map(mapFn);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { arrayIncludes, concat, createArray, from };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { assign, defineProperties, readonlyDescriptor, defineProperty } from './object';
|
|
2
|
-
|
|
3
|
-
class BvEvent {
|
|
4
|
-
constructor(type) {
|
|
5
|
-
let eventInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6
|
-
// Start by emulating native Event constructor
|
|
7
|
-
if (!type) {
|
|
8
|
-
/* istanbul ignore next */
|
|
9
|
-
throw new TypeError(`Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.`);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Merge defaults first, the eventInit, and the type last
|
|
13
|
-
// so it can't be overwritten
|
|
14
|
-
assign(this, BvEvent.Defaults, this.constructor.Defaults, eventInit, {
|
|
15
|
-
type
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// Freeze some props as readonly, but leave them enumerable
|
|
19
|
-
defineProperties(this, {
|
|
20
|
-
type: readonlyDescriptor(),
|
|
21
|
-
cancelable: readonlyDescriptor(),
|
|
22
|
-
nativeEvent: readonlyDescriptor(),
|
|
23
|
-
target: readonlyDescriptor(),
|
|
24
|
-
relatedTarget: readonlyDescriptor(),
|
|
25
|
-
vueTarget: readonlyDescriptor(),
|
|
26
|
-
componentId: readonlyDescriptor()
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// Create a private variable using closure scoping
|
|
30
|
-
let defaultPrevented = false;
|
|
31
|
-
// Recreate preventDefault method. One way setter
|
|
32
|
-
this.preventDefault = function preventDefault() {
|
|
33
|
-
if (this.cancelable) {
|
|
34
|
-
defaultPrevented = true;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// Create `defaultPrevented` publicly accessible prop that
|
|
39
|
-
// can only be altered by the preventDefault method
|
|
40
|
-
defineProperty(this, 'defaultPrevented', {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
get() {
|
|
43
|
-
return defaultPrevented;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
static get Defaults() {
|
|
48
|
-
return {
|
|
49
|
-
type: '',
|
|
50
|
-
cancelable: true,
|
|
51
|
-
nativeEvent: null,
|
|
52
|
-
target: null,
|
|
53
|
-
relatedTarget: null,
|
|
54
|
-
vueTarget: null,
|
|
55
|
-
componentId: null
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { BvEvent };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { extend, isVue3 } from '../vue';
|
|
2
|
-
import { cloneDeep } from './clone-deep';
|
|
3
|
-
import { looseEqual } from './loose-equal';
|
|
4
|
-
import { hasOwnProperty, keys } from './object';
|
|
5
|
-
|
|
6
|
-
const isEmpty = value => !value || keys(value).length === 0;
|
|
7
|
-
const makePropWatcher = propName => ({
|
|
8
|
-
handler(newValue, oldValue) {
|
|
9
|
-
if (looseEqual(newValue, oldValue)) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (isEmpty(newValue) || isEmpty(oldValue)) {
|
|
13
|
-
this[propName] = cloneDeep(newValue);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
for (const key in oldValue) {
|
|
17
|
-
if (!hasOwnProperty(newValue, key)) {
|
|
18
|
-
this.$delete(this.$data[propName], key);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
for (const key in newValue) {
|
|
22
|
-
this.$set(this.$data[propName], key, newValue[key]);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
const getInternalPropName = proxyPropName => `bv_internal__${proxyPropName}`;
|
|
27
|
-
const makePropCacheMixin = (propName, proxyPropName) => {
|
|
28
|
-
const internalPropName = getInternalPropName(proxyPropName);
|
|
29
|
-
return extend({
|
|
30
|
-
data() {
|
|
31
|
-
return {
|
|
32
|
-
[internalPropName]: isVue3(this) ? null : cloneDeep(this[propName] || {})
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
computed: {
|
|
36
|
-
[proxyPropName]() {
|
|
37
|
-
if (internalPropName in this && this[internalPropName]) {
|
|
38
|
-
return this[internalPropName];
|
|
39
|
-
}
|
|
40
|
-
const result = {
|
|
41
|
-
...this[propName]
|
|
42
|
-
};
|
|
43
|
-
Object.keys(result).forEach(key => {
|
|
44
|
-
if (result[key] === undefined) {
|
|
45
|
-
delete result[key];
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
return result;
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
created() {
|
|
52
|
-
if (!isVue3(this)) {
|
|
53
|
-
// Work around unwanted re-renders: https://github.com/vuejs/vue/issues/10115
|
|
54
|
-
this.$watch(propName, makePropWatcher(internalPropName).handler);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { getInternalPropName, makePropCacheMixin, makePropWatcher };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { isArray, isPlainObject } from './inspect';
|
|
2
|
-
import { keys } from './object';
|
|
3
|
-
|
|
4
|
-
const cloneDeep = function (obj) {
|
|
5
|
-
let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : obj;
|
|
6
|
-
if (isArray(obj)) {
|
|
7
|
-
return obj.reduce((result, val) => [...result, cloneDeep(val, val)], []);
|
|
8
|
-
}
|
|
9
|
-
if (isPlainObject(obj)) {
|
|
10
|
-
return keys(obj).reduce((result, key) => ({
|
|
11
|
-
...result,
|
|
12
|
-
[key]: cloneDeep(obj[key], obj[key])
|
|
13
|
-
}), {});
|
|
14
|
-
}
|
|
15
|
-
return defaultValue;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { cloneDeep };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { NAME } from '../constants/config';
|
|
2
|
-
import { cloneDeep } from './clone-deep';
|
|
3
|
-
import { getRaw } from './get';
|
|
4
|
-
import { isPlainObject, isArray, isString, isUndefined } from './inspect';
|
|
5
|
-
import { getOwnPropertyNames } from './object';
|
|
6
|
-
import { warn } from './warn';
|
|
7
|
-
|
|
8
|
-
// Config manager class
|
|
9
|
-
class BvConfig {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.$_config = {};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Method to merge in user config parameters
|
|
15
|
-
setConfig() {
|
|
16
|
-
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
17
|
-
/* istanbul ignore next */
|
|
18
|
-
if (!isPlainObject(config)) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const configKeys = getOwnPropertyNames(config);
|
|
22
|
-
configKeys.forEach(key => {
|
|
23
|
-
/* istanbul ignore next */
|
|
24
|
-
const subConfig = config[key];
|
|
25
|
-
if (key === 'breakpoints') {
|
|
26
|
-
/* istanbul ignore if */
|
|
27
|
-
if (!isArray(subConfig) || subConfig.length < 2 || subConfig.some(b => !isString(b) || b.length === 0)) {
|
|
28
|
-
warn('"breakpoints" must be an array of at least 2 breakpoint names', NAME);
|
|
29
|
-
} else {
|
|
30
|
-
this.$_config[key] = cloneDeep(subConfig);
|
|
31
|
-
}
|
|
32
|
-
} else if (isPlainObject(subConfig)) {
|
|
33
|
-
// Component prop defaults
|
|
34
|
-
this.$_config[key] = getOwnPropertyNames(subConfig).reduce((config, prop) => {
|
|
35
|
-
if (!isUndefined(subConfig[prop])) {
|
|
36
|
-
config[prop] = cloneDeep(subConfig[prop]);
|
|
37
|
-
}
|
|
38
|
-
return config;
|
|
39
|
-
}, this.$_config[key] || {});
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Clear the config
|
|
45
|
-
resetConfig() {
|
|
46
|
-
this.$_config = {};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Returns a deep copy of the user config
|
|
50
|
-
getConfig() {
|
|
51
|
-
return cloneDeep(this.$_config);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Returns a deep copy of the config value
|
|
55
|
-
getConfigValue(key) {
|
|
56
|
-
let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
57
|
-
return cloneDeep(getRaw(this.$_config, key, defaultValue));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Module-level singleton instance
|
|
62
|
-
let bvConfig = null;
|
|
63
|
-
|
|
64
|
-
// Get or create the config instance
|
|
65
|
-
const getConfigInstance = () => {
|
|
66
|
-
if (!bvConfig) {
|
|
67
|
-
bvConfig = new BvConfig();
|
|
68
|
-
}
|
|
69
|
-
return bvConfig;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// Method for applying a global config
|
|
73
|
-
const setConfig = function () {
|
|
74
|
-
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
75
|
-
getConfigInstance().setConfig(config);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// Method for resetting the user config
|
|
79
|
-
// Exported for testing purposes only
|
|
80
|
-
const resetConfig = () => {
|
|
81
|
-
if (bvConfig) {
|
|
82
|
-
bvConfig.resetConfig();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export { getConfigInstance, resetConfig, setConfig };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_BREAKPOINT } from '../constants/config';
|
|
2
|
-
import { cloneDeep } from './clone-deep';
|
|
3
|
-
import { getConfigInstance } from './config-set';
|
|
4
|
-
import { memoize } from './memoize';
|
|
5
|
-
|
|
6
|
-
// --- Getter methods ---
|
|
7
|
-
// All methods return a deep clone (immutable) copy of the config value,
|
|
8
|
-
// to prevent mutation of the user config object
|
|
9
|
-
|
|
10
|
-
// Get the current config
|
|
11
|
-
const getConfig = () => {
|
|
12
|
-
return getConfigInstance().getConfig();
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// Method to grab a config value based on a dotted/array notation key
|
|
16
|
-
const getConfigValue = function (key) {
|
|
17
|
-
let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
18
|
-
return getConfigInstance().getConfigValue(key, defaultValue);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Method to grab a config value for a particular component
|
|
22
|
-
const getComponentConfig = function (key) {
|
|
23
|
-
let propKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
24
|
-
let defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
25
|
-
// Return the particular config value for key if specified,
|
|
26
|
-
// otherwise we return the full config (or an empty object if not found)
|
|
27
|
-
return propKey ? getConfigValue(`${key}.${propKey}`, defaultValue) : getConfigValue(key, {});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// Get all breakpoint names
|
|
31
|
-
const getBreakpoints = () => getConfigValue('breakpoints', DEFAULT_BREAKPOINT);
|
|
32
|
-
|
|
33
|
-
// Private method for caching breakpoint names
|
|
34
|
-
const _getBreakpointsCached = memoize(() => getBreakpoints());
|
|
35
|
-
|
|
36
|
-
// Get all breakpoint names (cached)
|
|
37
|
-
const getBreakpointsCached = () => cloneDeep(_getBreakpointsCached());
|
|
38
|
-
|
|
39
|
-
// Get breakpoints with the smallest breakpoint set as ''
|
|
40
|
-
// Useful for components that create breakpoint specific props
|
|
41
|
-
const getBreakpointsUp = () => {
|
|
42
|
-
const breakpoints = getBreakpoints();
|
|
43
|
-
breakpoints[0] = '';
|
|
44
|
-
return breakpoints;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// Get breakpoints with the smallest breakpoint set as '' (cached)
|
|
48
|
-
// Useful for components that create breakpoint specific props
|
|
49
|
-
const getBreakpointsUpCached = memoize(() => {
|
|
50
|
-
const breakpoints = getBreakpointsCached();
|
|
51
|
-
breakpoints[0] = '';
|
|
52
|
-
return breakpoints;
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// Get breakpoints with the largest breakpoint set as ''
|
|
56
|
-
const getBreakpointsDown = () => {
|
|
57
|
-
const breakpoints = getBreakpoints();
|
|
58
|
-
breakpoints[breakpoints.length - 1] = '';
|
|
59
|
-
return breakpoints;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Get breakpoints with the largest breakpoint set as '' (cached)
|
|
63
|
-
// Useful for components that create breakpoint specific props
|
|
64
|
-
/* istanbul ignore next: we don't use this method anywhere, yet */
|
|
65
|
-
const getBreakpointsDownCached = () => {
|
|
66
|
-
const breakpoints = getBreakpointsCached();
|
|
67
|
-
breakpoints[breakpoints.length - 1] = '';
|
|
68
|
-
return breakpoints;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export { getBreakpoints, getBreakpointsCached, getBreakpointsDown, getBreakpointsDownCached, getBreakpointsUp, getBreakpointsUpCached, getComponentConfig, getConfig, getConfigValue };
|