@gitlab/ui 115.6.0 → 115.7.0
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/bin/migrate_custom_utils_to_tw.bundled.mjs +2642 -2171
- package/dist/components/base/alert/alert.js +1 -0
- package/dist/components/base/avatar/avatar.js +1 -0
- package/dist/components/base/badge/badge.js +1 -0
- package/dist/components/base/breadcrumb/breadcrumb.js +2 -1
- package/dist/components/base/button/button.js +1 -0
- package/dist/components/base/datepicker/datepicker.js +1 -0
- package/dist/components/base/drawer/drawer.js +1 -0
- package/dist/components/base/dropdown/dropdown.js +1 -0
- package/dist/components/base/icon/icon.js +1 -0
- package/dist/components/base/label/label.js +1 -0
- package/dist/components/base/link/link.js +1 -0
- package/dist/components/base/modal/modal.js +1 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown.js +1 -0
- package/dist/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.js +1 -1
- package/dist/components/base/new_dropdowns/disclosure/mock_data.js +8 -0
- package/dist/components/base/new_dropdowns/listbox/listbox.js +1 -0
- package/dist/components/base/pagination/pagination.js +1 -0
- package/dist/components/base/path/path.js +1 -0
- package/dist/components/base/popover/popover.js +1 -0
- package/dist/components/base/table/table.js +1 -0
- package/dist/components/base/tabs/tab/tab.js +1 -0
- package/dist/components/base/tabs/tabs/tabs.js +1 -0
- package/dist/components/base/toggle/toggle.js +1 -0
- package/dist/components/base/token/token.js +1 -0
- package/dist/components/base/tooltip/tooltip.js +1 -0
- package/dist/components/charts/area/area.js +1 -0
- package/dist/components/charts/bar/bar.js +1 -0
- package/dist/components/charts/chart/chart.js +1 -0
- package/dist/components/charts/column/column.js +1 -0
- package/dist/components/charts/gauge/gauge.js +1 -0
- package/dist/components/charts/heatmap/heatmap.js +1 -0
- package/dist/components/charts/legend/legend.js +1 -0
- package/dist/components/charts/line/line.js +1 -0
- package/dist/components/charts/shared/tooltip/tooltip.js +1 -0
- package/dist/components/charts/sparkline/sparkline.js +1 -0
- package/dist/components/dashboards/dashboard_layout/dashboard_layout.js +0 -3
- package/dist/components/dashboards/dashboard_panel/dashboard_panel.js +2 -2
- package/dist/components/utilities/intersperse/intersperse.js +1 -0
- package/dist/components/utilities/sprintf/sprintf.js +1 -0
- package/dist/components/utilities/truncate/truncate.js +1 -0
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/dist/utils/use_mock_intersection_observer.js +1 -0
- package/dist/vendor/bootstrap-vue/src/bv-config.js +2 -0
- package/dist/vendor/bootstrap-vue/src/components/modal/helpers/modal-manager.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/popover/helpers/bv-popover.js +5 -0
- package/dist/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.js +1 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-popper.js +6 -0
- package/dist/vendor/bootstrap-vue/src/components/tooltip/helpers/bv-tooltip.js +4 -0
- package/dist/vendor/bootstrap-vue/src/components/transition/bv-transition.js +5 -0
- package/dist/vendor/bootstrap-vue/src/directives/visible/visible.js +32 -0
- package/dist/vendor/bootstrap-vue/src/mixins/has-listener.js +3 -0
- package/dist/vendor/bootstrap-vue/src/mixins/id.js +2 -0
- package/package.json +14 -14
- package/src/components/base/breadcrumb/breadcrumb.vue +1 -1
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.md +5 -3
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue +1 -1
- package/src/components/base/new_dropdowns/disclosure/mock_data.js +4 -0
- package/src/components/dashboards/dashboard_layout/dashboard_layout.md +145 -3
- package/src/components/dashboards/dashboard_layout/dashboard_layout.vue +0 -3
- package/src/components/dashboards/dashboard_panel/dashboard_panel.vue +33 -18
|
@@ -21,6 +21,10 @@ import { listenOnRootMixin } from '../../../mixins/listen-on-root';
|
|
|
21
21
|
import { BVTooltipTemplate } from './bv-tooltip-template';
|
|
22
22
|
|
|
23
23
|
// Tooltip "Class" (Built as a renderless Vue instance)
|
|
24
|
+
//
|
|
25
|
+
// Handles trigger events, etc.
|
|
26
|
+
// Instantiates template on demand
|
|
27
|
+
|
|
24
28
|
|
|
25
29
|
// --- Constants ---
|
|
26
30
|
|
|
@@ -5,6 +5,11 @@ import { isPlainObject } from '../../utils/inspect';
|
|
|
5
5
|
import { makeProp } from '../../utils/props';
|
|
6
6
|
|
|
7
7
|
// Generic Bootstrap v4 fade (no-fade) transition component
|
|
8
|
+
//
|
|
9
|
+
// Assumes that `show` class is not required when
|
|
10
|
+
// the transition has finished the enter transition
|
|
11
|
+
// (show and fade classes are only applied during transition)
|
|
12
|
+
|
|
8
13
|
|
|
9
14
|
// --- Constants ---
|
|
10
15
|
|
|
@@ -6,6 +6,38 @@ import { keys, clone } from '../../utils/object';
|
|
|
6
6
|
import { nextTick } from '../../vue';
|
|
7
7
|
|
|
8
8
|
// v-b-visible
|
|
9
|
+
// Private visibility check directive
|
|
10
|
+
// Based on IntersectionObserver
|
|
11
|
+
//
|
|
12
|
+
// Usage:
|
|
13
|
+
// v-b-visibility.<margin>.<once>="<callback>"
|
|
14
|
+
//
|
|
15
|
+
// Value:
|
|
16
|
+
// <callback>: method to be called when visibility state changes, receives one arg:
|
|
17
|
+
// true: element is visible
|
|
18
|
+
// false: element is not visible
|
|
19
|
+
// null: IntersectionObserver not supported
|
|
20
|
+
//
|
|
21
|
+
// Modifiers:
|
|
22
|
+
// <margin>: a positive decimal value of pixels away from viewport edge
|
|
23
|
+
// before being considered "visible". default is 0
|
|
24
|
+
// <once>: keyword 'once', meaning when the element becomes visible and
|
|
25
|
+
// callback is called observation/notification will stop.
|
|
26
|
+
//
|
|
27
|
+
// When used in a render function:
|
|
28
|
+
// export default {
|
|
29
|
+
// directives: { 'b-visible': VBVisible },
|
|
30
|
+
// render(h) {
|
|
31
|
+
// h(
|
|
32
|
+
// 'div',
|
|
33
|
+
// {
|
|
34
|
+
// directives: [
|
|
35
|
+
// { name: 'b-visible', value=this.callback, modifiers: { '123':true, 'once':true } }
|
|
36
|
+
// ]
|
|
37
|
+
// }
|
|
38
|
+
// )
|
|
39
|
+
// }
|
|
40
|
+
|
|
9
41
|
const OBSERVER_PROP_NAME = '__bv__visibility_observer';
|
|
10
42
|
class VisibilityObserver {
|
|
11
43
|
constructor(el, options) {
|
|
@@ -2,6 +2,9 @@ import { extend, isVue3 } from '../vue';
|
|
|
2
2
|
import { isUndefined, isArray } from '../utils/inspect';
|
|
3
3
|
|
|
4
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
|
|
5
8
|
|
|
6
9
|
// @vue/component
|
|
7
10
|
const hasListenerMixin = extend({
|
|
@@ -3,6 +3,8 @@ import { PROP_TYPE_STRING } from '../constants/props';
|
|
|
3
3
|
import { makeProp } from '../utils/props';
|
|
4
4
|
|
|
5
5
|
// SSR safe client-side ID attribute generation
|
|
6
|
+
// ID's can only be generated client-side, after mount
|
|
7
|
+
// `this._uid` is not synched between server and client
|
|
6
8
|
|
|
7
9
|
// --- Props ---
|
|
8
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "115.
|
|
3
|
+
"version": "115.7.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"iframe-resizer": "^4.4.5",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
76
|
"popper.js": "^1.16.1",
|
|
77
|
-
"portal-vue": "
|
|
77
|
+
"portal-vue": "2.1.7",
|
|
78
78
|
"vue-functional-data-merge": "^3.1.0",
|
|
79
79
|
"vue-runtime-helpers": "^1.1.2"
|
|
80
80
|
},
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"@babel/preset-react": "^7.27.1",
|
|
103
103
|
"@cypress/grep": "^4.1.0",
|
|
104
104
|
"@gitlab/fonts": "^1.3.0",
|
|
105
|
-
"@gitlab/svgs": "3.
|
|
105
|
+
"@gitlab/svgs": "3.141.0",
|
|
106
106
|
"@jest/test-sequencer": "30.0.4",
|
|
107
|
-
"@rollup/plugin-commonjs": "^
|
|
108
|
-
"@rollup/plugin-node-resolve": "^
|
|
109
|
-
"@rollup/plugin-replace": "^
|
|
107
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
108
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
109
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
110
110
|
"@storybook/addon-a11y": "^7.6.20",
|
|
111
111
|
"@storybook/addon-docs": "^7.6.20",
|
|
112
112
|
"@storybook/addon-essentials": "^7.6.20",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"autoprefixer": "10.4.21",
|
|
135
135
|
"axe-playwright": "^2.1.0",
|
|
136
136
|
"babel-loader": "^9.2.1",
|
|
137
|
-
"cypress": "14.5.
|
|
137
|
+
"cypress": "14.5.2",
|
|
138
138
|
"cypress-real-events": "^1.14.0",
|
|
139
139
|
"dompurify": "^3.1.2",
|
|
140
140
|
"emoji-regex": "^10.4.0",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"postcss-scss": "4.0.9",
|
|
161
161
|
"react": "18.3.1",
|
|
162
162
|
"react-dom": "18.3.1",
|
|
163
|
-
"rollup": "^
|
|
163
|
+
"rollup": "^3.29.5",
|
|
164
164
|
"rollup-plugin-babel": "^4.4.0",
|
|
165
165
|
"rollup-plugin-postcss": "4.0.2",
|
|
166
166
|
"rollup-plugin-string": "^3.0.0",
|
|
@@ -168,22 +168,22 @@
|
|
|
168
168
|
"rollup-plugin-vue": "^5.1.9",
|
|
169
169
|
"sass": "^1.89.2",
|
|
170
170
|
"sass-loader": "^10.5.2",
|
|
171
|
-
"sass-true": "^
|
|
172
|
-
"start-server-and-test": "^
|
|
171
|
+
"sass-true": "^9",
|
|
172
|
+
"start-server-and-test": "^2.0.12",
|
|
173
173
|
"storybook": "^7.6.20",
|
|
174
174
|
"storybook-dark-mode": "4.0.2",
|
|
175
175
|
"style-dictionary": "^5.0.1",
|
|
176
|
-
"style-loader": "
|
|
176
|
+
"style-loader": "^4",
|
|
177
177
|
"tailwind-config-viewer": "2.0.4",
|
|
178
178
|
"tailwindcss": "3.4.17",
|
|
179
179
|
"vue": "2.7.16",
|
|
180
180
|
"vue-docgen-loader": "1.5.1",
|
|
181
181
|
"vue-loader": "^15.11.1",
|
|
182
182
|
"vue-loader-vue3": "npm:vue-loader@17.4.2",
|
|
183
|
-
"vue-router": "^3.5
|
|
183
|
+
"vue-router": "^3.6.5",
|
|
184
184
|
"vue-template-compiler": "2.7.16",
|
|
185
185
|
"vue-test-utils-compat": "^0.0.15",
|
|
186
|
-
"webpack": "^5.
|
|
187
|
-
"yargs": "^
|
|
186
|
+
"webpack": "^5.100.1",
|
|
187
|
+
"yargs": "^18.0.0"
|
|
188
188
|
}
|
|
189
189
|
}
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
147
147
|
this.resetItems();
|
|
148
148
|
|
|
149
149
|
const containerWidth = this.$el.clientWidth;
|
|
150
|
-
const buttonWidth = 40; // px
|
|
150
|
+
const buttonWidth = this.size === 'sm' ? 40 : 48; // px
|
|
151
151
|
|
|
152
152
|
if (this.totalBreadcrumbsWidth > containerWidth) {
|
|
153
153
|
// Not all breadcrumb items fit. Start moving items over to the dropdown.
|
|
@@ -67,7 +67,7 @@ It's possible to close the disclosure dropdown programmatically by calling the `
|
|
|
67
67
|
`close` methods on the disclosure dropdown via a template ref. For example:
|
|
68
68
|
|
|
69
69
|
```js
|
|
70
|
-
this.$refs.disclosureDropdown.closeAndFocus()
|
|
70
|
+
this.$refs.disclosureDropdown.closeAndFocus();
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
The `closeAndFocus` method is preferred in most cases, especially when triggering it from some action
|
|
@@ -79,7 +79,8 @@ some other element. For example, closing the disclosure dropdown to focus a newl
|
|
|
79
79
|
## Setting disclosure dropdown items
|
|
80
80
|
|
|
81
81
|
Use the `items` prop to provide actions/links to the disclosure dropdown. Each
|
|
82
|
-
item can be either an item or a group. For `Item`s, provide an `href` or `to` string
|
|
82
|
+
item can be either an item or a group. For `Item`s, provide an `href` or `to` string or
|
|
83
|
+
[`to` location descriptor object](https://v3.router.vuejs.org/api/#to) to
|
|
83
84
|
make them render as links. Otherwise, they will be buttons. Provide an `action`
|
|
84
85
|
function to items to be called when they are pressed, or, listen for the
|
|
85
86
|
`action` event on the top-level component. Both will receive the given item as
|
|
@@ -96,7 +97,8 @@ type Item = {
|
|
|
96
97
|
// href link
|
|
97
98
|
href?: string;
|
|
98
99
|
// or, a Vue router link with `to`
|
|
99
|
-
|
|
100
|
+
// See https://github.com/vuejs/vue-router/blob/v3.6.5/types/router.d.ts#L400-L408 for Location definition
|
|
101
|
+
to?: string | Location;
|
|
100
102
|
// Item action
|
|
101
103
|
action?: (item: Item) => void;
|
|
102
104
|
// Set of extra attributes applied directly to the element
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
},
|
|
34
34
|
computed: {
|
|
35
35
|
isLink() {
|
|
36
|
-
return typeof this.item?.href === 'string' || typeof this.item?.to
|
|
36
|
+
return typeof this.item?.href === 'string' || typeof this.item?.to !== 'undefined';
|
|
37
37
|
},
|
|
38
38
|
isCustomContent() {
|
|
39
39
|
return Boolean(this.$scopedSlots.default);
|
|
@@ -1,3 +1,145 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
## Dashboard layout
|
|
2
|
+
|
|
3
|
+
The `GlDashboardLayout` component provides an easy way to render grid-based dashboards
|
|
4
|
+
using a configuration as outlined by our [Pajamas guidelines](#pajamas-guidelines).
|
|
5
|
+
For more in-depth details on the dashboard layout framework, see the
|
|
6
|
+
[architecture design document](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/dashboard_layout_framework/).
|
|
7
|
+
|
|
8
|
+
### When to use
|
|
9
|
+
|
|
10
|
+
This component should be used when:
|
|
11
|
+
|
|
12
|
+
- You want an easy way to create a dashboard interface.
|
|
13
|
+
- You want your dashboard to align with our [Pajamas guidelines](#pajamas-guidelines).
|
|
14
|
+
- You want to benefit from features such as customizable layouts with resizable, draggable elements.
|
|
15
|
+
|
|
16
|
+
### Current limitations
|
|
17
|
+
|
|
18
|
+
The `GlDashboardLayout` component is limited to rendering dashboards. As defined
|
|
19
|
+
in our architecture design document it does not provide:
|
|
20
|
+
|
|
21
|
+
- Data exploration outside defined panel visualizations.
|
|
22
|
+
- User-driven customization outside of editing panel position and size.
|
|
23
|
+
- Navigation placement for dashboards.
|
|
24
|
+
|
|
25
|
+
## The component
|
|
26
|
+
|
|
27
|
+
The component expects a dashboard configuration object as input and renders a dashboard
|
|
28
|
+
layout with title, description, actions, and panels.
|
|
29
|
+
|
|
30
|
+
### Grid layout
|
|
31
|
+
|
|
32
|
+
Panels within the dashboard layout are rendered in a cross-browser 12-column grid
|
|
33
|
+
system with an unlimited number of rows. The grid is responsive and collapses down to a
|
|
34
|
+
single column at the [medium breakpoint](https://design.gitlab.com/product-foundations/layout/#breakpoints).
|
|
35
|
+
|
|
36
|
+
### Dashboard panels
|
|
37
|
+
|
|
38
|
+
The dashboard layout is not opinionated about the panel component used. You are free to choose
|
|
39
|
+
whichever panel component best suits your needs. However, to ensure consistency with
|
|
40
|
+
our design patterns, it's strongly recommended that you use `GlDashboardPanel`.
|
|
41
|
+
|
|
42
|
+
### Filters
|
|
43
|
+
|
|
44
|
+
The component provides a `#filters` slot to render your filters in the dashboard layout.
|
|
45
|
+
The component does not manage or sync filters and leaves it up to the consumer to manage this state.
|
|
46
|
+
|
|
47
|
+
We expect dashboards using the framework to implement two types of filters:
|
|
48
|
+
|
|
49
|
+
- Dashboard filters: Applied to every panel and visualization in the dashboard.
|
|
50
|
+
- Panel filters: Applied per panel to refine results available within the dashboard context.
|
|
51
|
+
|
|
52
|
+
### Basic implementation
|
|
53
|
+
|
|
54
|
+
A basic implementation of a static dashboard using the `#panel` slot to render existing
|
|
55
|
+
visualizations wrapped in `GlDashboardPanel`.
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<script>
|
|
59
|
+
import { GlDashboardLayout, GlDashboardPanel } from '@gitlab/ui';
|
|
60
|
+
|
|
61
|
+
// Your i18n library
|
|
62
|
+
import { __ } from '~/locale';
|
|
63
|
+
|
|
64
|
+
// Your visualizations
|
|
65
|
+
import UsersVisualization from './my_users_visualization.vue';
|
|
66
|
+
import EventsVisualization from './my_events_visualization.vue';
|
|
67
|
+
|
|
68
|
+
export default {
|
|
69
|
+
components: {
|
|
70
|
+
GlDashboardLayout,
|
|
71
|
+
GlDashboardPanel,
|
|
72
|
+
UsersVisualization,
|
|
73
|
+
EventsVisualization,
|
|
74
|
+
},
|
|
75
|
+
data() {
|
|
76
|
+
return {
|
|
77
|
+
dashboard: {
|
|
78
|
+
title: __('My dashboard title'),
|
|
79
|
+
description: __('The dashboard description to render'),
|
|
80
|
+
panels: [
|
|
81
|
+
{
|
|
82
|
+
// Each panel ID must be unique within the context of this dashboard obj
|
|
83
|
+
id: 'active-users-panel',
|
|
84
|
+
dashboardPanelProps: {
|
|
85
|
+
title: __('Active users over time'),
|
|
86
|
+
// Any additional GlDashboardPanel props go here
|
|
87
|
+
},
|
|
88
|
+
component: UsersVisualization,
|
|
89
|
+
componentProps: {
|
|
90
|
+
apiPath: '/example-users-api',
|
|
91
|
+
// Any props you want to pass to your component
|
|
92
|
+
},
|
|
93
|
+
gridAttributes: {
|
|
94
|
+
width: 6,
|
|
95
|
+
height: 4,
|
|
96
|
+
yPos: 0,
|
|
97
|
+
xPos: 0,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
// Each panel ID must be unique within the context of this dashboard obj
|
|
102
|
+
id: 'events-over-time-panel',
|
|
103
|
+
dashboardPanelProps: {
|
|
104
|
+
title: __('Events over time'),
|
|
105
|
+
// Any additional GlDashboardPanel props go here
|
|
106
|
+
},
|
|
107
|
+
component: EventsVisualization,
|
|
108
|
+
componentProps: {
|
|
109
|
+
apiPath: '/example-events-api',
|
|
110
|
+
// Any props you want to pass to your component
|
|
111
|
+
},
|
|
112
|
+
gridAttributes: {
|
|
113
|
+
width: 6,
|
|
114
|
+
height: 4,
|
|
115
|
+
yPos: 0,
|
|
116
|
+
xPos: 6,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<template>
|
|
127
|
+
<gl-dashboard-layout :config="dashboard">
|
|
128
|
+
<template #panel="{ panel }">
|
|
129
|
+
<gl-dashboard-panel v-bind="panel.dashboardPanelProps">
|
|
130
|
+
<template #body>
|
|
131
|
+
<component
|
|
132
|
+
:is="panel.component"
|
|
133
|
+
class="gl-h-full gl-overflow-hidden"
|
|
134
|
+
v-bind="panel.componentProps"
|
|
135
|
+
/>
|
|
136
|
+
</template>
|
|
137
|
+
</gl-dashboard-panel>
|
|
138
|
+
</template>
|
|
139
|
+
</gl-dashboard-layout>
|
|
140
|
+
</template>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Pajamas guidelines
|
|
144
|
+
|
|
145
|
+
- [Pajamas dashboards pattern](https://design.gitlab.com/patterns/dashboards)
|
|
@@ -4,9 +4,6 @@ import { dashboardConfigValidator } from './validators';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `DashboardLayout` component provides an easy way to render dashboards using a configuration, aligning with our [Pajamas guidelines](https://design.gitlab.com/patterns/dashboards).
|
|
7
|
-
*
|
|
8
|
-
* Please refer to the [documentation](https://docs.gitlab.com/development/fe_guide/dashboard_layout_framework) for more information.
|
|
9
|
-
*
|
|
10
7
|
*/
|
|
11
8
|
export default {
|
|
12
9
|
name: 'GlDashboardLayout',
|
|
@@ -178,25 +178,40 @@ export default {
|
|
|
178
178
|
</template>
|
|
179
179
|
</div>
|
|
180
180
|
|
|
181
|
-
<
|
|
182
|
-
v-if="shouldShowActions"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
:toggle-text="actionsToggleText"
|
|
186
|
-
text-sr-only
|
|
187
|
-
no-caret
|
|
188
|
-
placement="bottom-end"
|
|
189
|
-
fluid-width
|
|
190
|
-
toggle-class="gl-ml-1"
|
|
191
|
-
category="tertiary"
|
|
192
|
-
positioning-strategy="fixed"
|
|
193
|
-
@shown="$emit('dropdownOpen')"
|
|
194
|
-
@hidden="$emit('dropdownClosed')"
|
|
181
|
+
<div
|
|
182
|
+
v-if="shouldShowActions || $scopedSlots.filters"
|
|
183
|
+
data-testid="panel-actions-filters-container"
|
|
184
|
+
class="gl-flex gl-flex-col gl-items-end gl-gap-2"
|
|
195
185
|
>
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
186
|
+
<gl-disclosure-dropdown
|
|
187
|
+
v-if="shouldShowActions"
|
|
188
|
+
:items="actions"
|
|
189
|
+
icon="ellipsis_v"
|
|
190
|
+
:toggle-text="actionsToggleText"
|
|
191
|
+
text-sr-only
|
|
192
|
+
no-caret
|
|
193
|
+
placement="bottom-end"
|
|
194
|
+
fluid-width
|
|
195
|
+
toggle-class="gl-ml-1"
|
|
196
|
+
category="tertiary"
|
|
197
|
+
positioning-strategy="fixed"
|
|
198
|
+
@shown="$emit('dropdownOpen')"
|
|
199
|
+
@hidden="$emit('dropdownClosed')"
|
|
200
|
+
>
|
|
201
|
+
<template #list-item="{ item }">
|
|
202
|
+
<span> <gl-icon :name="item.icon" /> {{ item.text }}</span>
|
|
203
|
+
</template>
|
|
204
|
+
</gl-disclosure-dropdown>
|
|
205
|
+
|
|
206
|
+
<div
|
|
207
|
+
v-if="$scopedSlots.filters"
|
|
208
|
+
class="gl-flex gl-items-center gl-justify-end gl-pb-2"
|
|
209
|
+
data-testid="panel-filters-container"
|
|
210
|
+
>
|
|
211
|
+
<!-- @slot The filter section to add additional UI elements for filtering, grouping, etc. -->
|
|
212
|
+
<slot name="filters"></slot>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
200
215
|
</div>
|
|
201
216
|
<div :class="bodyClasses">
|
|
202
217
|
<template v-if="loading">
|