@gitlab/ui 49.9.0 → 49.10.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/CHANGELOG.md +19 -0
- package/dist/components/base/daterange_picker/daterange_picker.js +11 -1
- package/dist/components/base/form/form_checkbox/form_checkbox_group.js +1 -1
- package/dist/components/base/form/form_radio_group/form_radio_group.js +1 -1
- package/dist/components/base/pagination/pagination.js +3 -3
- package/dist/components/base/popover/popover.js +1 -6
- package/dist/components/charts/area/area.js +1 -1
- package/dist/components/charts/chart/chart.js +1 -1
- package/dist/components/charts/column/column.js +1 -1
- package/dist/components/charts/discrete_scatter/discrete_scatter.js +1 -1
- package/dist/components/charts/line/line.js +1 -1
- package/dist/components/charts/sparkline/sparkline.js +1 -1
- package/dist/components/charts/stacked_column/stacked_column.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/dist/utils/breakpoints.js +2 -3
- package/dist/utils/charts/config.js +8 -9
- package/dist/utils/charts/theme.js +1 -2
- package/dist/utils.js +1 -1
- package/package.json +5 -4
- package/src/components/base/daterange_picker/daterange_picker.scss +0 -7
- package/src/components/base/daterange_picker/daterange_picker.spec.js +12 -2
- package/src/components/base/daterange_picker/daterange_picker.vue +23 -12
- package/src/components/base/form/form_checkbox/form_checkbox_group.vue +1 -1
- package/src/components/base/form/form_radio_group/form_radio_group.vue +1 -1
- package/src/components/base/pagination/pagination.vue +3 -3
- package/src/components/base/popover/popover.vue +0 -6
- package/src/components/base/tabs/tabs/tabs.spec.js +1 -2
- package/src/components/charts/area/area.vue +2 -1
- package/src/components/charts/chart/chart.spec.js +1 -1
- package/src/components/charts/chart/chart.vue +1 -1
- package/src/components/charts/column/column.vue +2 -1
- package/src/components/charts/discrete_scatter/discrete_scatter.vue +2 -1
- package/src/components/charts/line/line.vue +2 -1
- package/src/components/charts/sparkline/sparkline.vue +2 -1
- package/src/components/charts/stacked_column/stacked_column.vue +2 -1
- package/src/scss/utilities.scss +22 -0
- package/src/scss/utility-mixins/flex.scss +6 -0
- package/src/scss/utility-mixins/spacing.scss +6 -0
- package/src/utils/breakpoints.js +1 -3
- package/src/utils/breakpoints.spec.js +4 -4
- package/src/utils/charts/config.js +8 -8
- package/src/utils/charts/config.spec.js +2 -2
- package/src/utils/charts/theme.js +1 -3
- package/src/utils.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [49.10.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v49.9.1...v49.10.0) (2022-11-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlDaterangePicker:** improve layout ([8014cc8](https://gitlab.com/gitlab-org/gitlab-ui/commit/8014cc8950ffd3dbf5db4ec1554e75c5ccc6a38c))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Reverts
|
|
10
|
+
|
|
11
|
+
* fix(deps): upgrade bootstrap-vue to v2.23.1 ([02bdbcd](https://gitlab.com/gitlab-org/gitlab-ui/commit/02bdbcd66040c7ad7739d6cfedd253d0104cf7f2))
|
|
12
|
+
|
|
13
|
+
## [49.9.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v49.9.0...v49.9.1) (2022-11-15)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **deps:** update dependency dompurify to ^2.4.1 ([1dfdf40](https://gitlab.com/gitlab-org/gitlab-ui/commit/1dfdf407820dcc42c313c6c6b95cff0be7221080))
|
|
19
|
+
|
|
1
20
|
# [49.9.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v49.8.0...v49.9.0) (2022-11-14)
|
|
2
21
|
|
|
3
22
|
|
|
@@ -4,6 +4,7 @@ import GlDatepicker from '../datepicker/datepicker';
|
|
|
4
4
|
import GlIcon from '../icon/icon';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
7
|
+
const CONTAINER_CLASSES = ['gl-display-flex', 'gl-align-items-baseline', 'gl-flex-wrap', 'gl-sm-flex-wrap-nowrap', 'gl-sm-gap-3'];
|
|
7
8
|
var script = {
|
|
8
9
|
components: {
|
|
9
10
|
GlDatepicker,
|
|
@@ -162,6 +163,15 @@ var script = {
|
|
|
162
163
|
}
|
|
163
164
|
const numberOfDays = getDayDifference(this.startDate, this.endDate);
|
|
164
165
|
return this.sameDaySelection ? numberOfDays + 1 : numberOfDays;
|
|
166
|
+
},
|
|
167
|
+
startContainerClasses() {
|
|
168
|
+
return [this.startPickerClass, ...CONTAINER_CLASSES];
|
|
169
|
+
},
|
|
170
|
+
endContainerClasses() {
|
|
171
|
+
return [this.endPickerClass, ...CONTAINER_CLASSES];
|
|
172
|
+
},
|
|
173
|
+
showIndicator() {
|
|
174
|
+
return Boolean(this.$scopedSlots.default || this.tooltip);
|
|
165
175
|
}
|
|
166
176
|
},
|
|
167
177
|
watch: {
|
|
@@ -237,7 +247,7 @@ var script = {
|
|
|
237
247
|
const __vue_script__ = script;
|
|
238
248
|
|
|
239
249
|
/* template */
|
|
240
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-daterange-picker"},[_c('div',{class:_vm.
|
|
250
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-daterange-picker gl-gap-5 gl-display-flex"},[_c('div',{class:_vm.startContainerClasses,attrs:{"data-testid":"daterange-picker-start-container"}},[_c('label',{class:_vm.labelClass},[_vm._v(_vm._s(_vm.fromLabel))]),_vm._v(" "),_c('gl-datepicker',{attrs:{"min-date":_vm.defaultMinDate,"max-date":_vm.fromCalendarMaxDate,"start-range":_vm.defaultMinDate,"end-range":_vm.fromCalendarMaxDate,"theme":_vm.theme,"i18n":_vm.i18n,"target":_vm.startPickerTarget,"container":_vm.startPickerContainer},on:{"input":_vm.onStartDateSelected,"open":_vm.onStartPickerOpen,"close":_vm.onStartPickerClose},model:{value:(_vm.startDate),callback:function ($$v) {_vm.startDate=$$v;},expression:"startDate"}})],1),_vm._v(" "),_c('div',{class:_vm.endContainerClasses,attrs:{"data-testid":"daterange-picker-end-container"}},[_c('label',{class:_vm.labelClass},[_vm._v(_vm._s(_vm.toLabel))]),_vm._v(" "),_c('gl-datepicker',{key:_vm.numericStartTime,attrs:{"min-date":_vm.toCalendarMinDate,"max-date":_vm.toCalendarMaxDate,"start-range":_vm.toCalendarMinDate,"end-range":_vm.toCalendarMaxDate,"theme":_vm.theme,"i18n":_vm.i18n,"target":_vm.endPickerTarget,"container":_vm.endPickerContainer,"start-opened":_vm.openToCalendar,"default-date":_vm.toCalendarDefaultDate},on:{"input":_vm.onEndDateSelected,"open":_vm.onEndPickerOpen,"close":_vm.onEndPickerClose},model:{value:(_vm.endDate),callback:function ($$v) {_vm.endDate=$$v;},expression:"endDate"}})],1),_vm._v(" "),(_vm.showIndicator)?_c('div',{staticClass:"gl-display-flex gl-flex-direction-row gl-align-items-center gl-text-gray-500 gl-gap-3",class:_vm.dateRangeIndicatorClass,attrs:{"data-testid":"daterange-picker-indicator"}},[_vm._t("default",null,null,{ daysSelected: _vm.numberOfDays }),_vm._v(" "),(_vm.tooltip)?_c('gl-icon',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"name":"information-o","title":_vm.tooltip,"size":16}}):_vm._e()],2):_vm._e()])};
|
|
241
251
|
var __vue_staticRenderFns__ = [];
|
|
242
252
|
|
|
243
253
|
/* style */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BFormCheckboxGroup } from 'bootstrap-vue/esm/index.js';
|
|
2
|
-
import
|
|
2
|
+
import formOptionsMixin from 'bootstrap-vue/esm/mixins/form-options';
|
|
3
3
|
import { SafeHtmlDirective } from '../../../../directives/safe_html/safe_html';
|
|
4
4
|
import GlFormCheckbox from './form_checkbox';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BFormRadioGroup } from 'bootstrap-vue/esm/index.js';
|
|
2
|
-
import
|
|
2
|
+
import formOptionsMixin from 'bootstrap-vue/esm/mixins/form-options';
|
|
3
3
|
import { SafeHtmlDirective } from '../../../../directives/safe_html/safe_html';
|
|
4
4
|
import GlFormRadio from '../form_radio/form_radio';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import debounce from 'lodash/debounce';
|
|
2
2
|
import isFunction from 'lodash/isFunction';
|
|
3
3
|
import range from 'lodash/range';
|
|
4
|
-
import
|
|
4
|
+
import { breakpoints, GlBreakpointInstance } from '../../../utils/breakpoints';
|
|
5
5
|
import { alignOptions, resizeDebounceTime } from '../../../utils/constants';
|
|
6
6
|
import GlIcon from '../icon/icon';
|
|
7
7
|
import GlLink from '../link/link';
|
|
@@ -165,7 +165,7 @@ var script = {
|
|
|
165
165
|
},
|
|
166
166
|
data() {
|
|
167
167
|
return {
|
|
168
|
-
breakpoint:
|
|
168
|
+
breakpoint: GlBreakpointInstance.getBreakpointSize(),
|
|
169
169
|
// If total pages count is below or equal to minTotalPagesToCollapse, collapsing is disabled
|
|
170
170
|
minTotalPagesToCollapse: 4
|
|
171
171
|
};
|
|
@@ -268,7 +268,7 @@ var script = {
|
|
|
268
268
|
},
|
|
269
269
|
methods: {
|
|
270
270
|
setBreakpoint() {
|
|
271
|
-
this.breakpoint =
|
|
271
|
+
this.breakpoint = GlBreakpointInstance.getBreakpointSize();
|
|
272
272
|
},
|
|
273
273
|
pageIsDisabled(page) {
|
|
274
274
|
return this.disabled || page < 1 || this.isCompactPagination && page > this.value && !this.nextPage || !this.isCompactPagination && page > this.totalPages;
|
|
@@ -43,11 +43,6 @@ var script = {
|
|
|
43
43
|
type: String,
|
|
44
44
|
required: false,
|
|
45
45
|
default: popoverPlacements.top
|
|
46
|
-
},
|
|
47
|
-
boundaryPadding: {
|
|
48
|
-
type: [Number, String],
|
|
49
|
-
required: false,
|
|
50
|
-
default: 5
|
|
51
46
|
}
|
|
52
47
|
},
|
|
53
48
|
computed: {
|
|
@@ -74,7 +69,7 @@ var script = {
|
|
|
74
69
|
const __vue_script__ = script;
|
|
75
70
|
|
|
76
71
|
/* template */
|
|
77
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-popover',_vm._g(_vm._b({ref:_vm.$options.popoverRefName,attrs:{"custom-class":_vm.customClass,"triggers":_vm.triggers,"title":_vm.title,"placement":_vm.placement
|
|
72
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-popover',_vm._g(_vm._b({ref:_vm.$options.popoverRefName,attrs:{"custom-class":_vm.customClass,"triggers":_vm.triggers,"title":_vm.title,"placement":_vm.placement},scopedSlots:_vm._u([(_vm.shouldShowTitle)?{key:"title",fn:function(){return [_vm._t("title",function(){return [_vm._v("\n "+_vm._s(_vm.title)+"\n ")]}),_vm._v(" "),(_vm.showCloseButton)?_c('close-button',{staticClass:"gl-float-right gl-mt-n2 gl-mr-n3",attrs:{"data-testid":"close-button"},on:{"click":_vm.close}}):_vm._e()]},proxy:true}:null],null,true)},'b-popover',_vm.$attrs,false),_vm.$listeners),[_vm._v(" "),_vm._t("default")],2)};
|
|
78
73
|
var __vue_staticRenderFns__ = [];
|
|
79
74
|
|
|
80
75
|
/* style */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { defaultAreaOpacity, lineStyle, getThresholdConfig, generateAnnotationSeries, defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions, mergeAnnotationAxisToOptions, grid, getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, DATA_TOOLTIP_LEFT_OFFSET, ANNOTATION_TOOLTIP_TOP_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { seriesHasAnnotations, isDataPointAnnotation } from '../../../utils/charts/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as echarts from 'echarts';
|
|
2
2
|
import { validRenderers, defaultWidth, defaultHeight } from '../../../utils/charts/config';
|
|
3
|
-
import
|
|
3
|
+
import { themeName, createTheme } from '../../../utils/charts/theme';
|
|
4
4
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, gridWithSecondaryYAxis, grid, dataZoomAdjustments, mergeSeriesToOptions, getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
3
3
|
import { CHART_TYPE_LINE, TOOLTIP_LEFT_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { columnOptions } from '../../../utils/constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import defaultChartOptions,
|
|
2
|
+
import { defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
3
3
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
4
4
|
import { debounceByAnimationFrame } from '../../../utils/utils';
|
|
5
5
|
import { ToolboxMixin } from '../../mixins/toolbox_mixin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { symbolSize, lineStyle, getThresholdConfig, generateAnnotationSeries, defaultChartOptions, dataZoomAdjustments, mergeSeriesToOptions, mergeAnnotationAxisToOptions, grid, getDefaultTooltipContent } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, DATA_TOOLTIP_LEFT_OFFSET, ANNOTATION_TOOLTIP_TOP_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { seriesHasAnnotations, isDataPointAnnotation } from '../../../utils/charts/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
2
|
import { GlResizeObserverDirective } from '../../../directives/resize_observer/resize_observer';
|
|
3
|
-
import defaultChartOptions,
|
|
3
|
+
import { defaultChartOptions, mergeSeriesToOptions, symbolSize } from '../../../utils/charts/config';
|
|
4
4
|
import Chart from '../chart/chart';
|
|
5
5
|
import ChartTooltip from '../tooltip/tooltip';
|
|
6
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import merge from 'lodash/merge';
|
|
2
|
-
import
|
|
2
|
+
import { yAxis, generateBarSeries, generateLineSeries, defaultChartOptions, gridWithSecondaryYAxis, grid, dataZoomAdjustments, mergeSeriesToOptions } from '../../../utils/charts/config';
|
|
3
3
|
import { LEGEND_AVERAGE_TEXT, LEGEND_MAX_TEXT, LEGEND_MIN_TEXT, LEGEND_CURRENT_TEXT, LEGEND_LAYOUT_INLINE, LEGEND_LAYOUT_TABLE, CHART_TYPE_LINE, ANNOTATION_TOOLTIP_TOP_OFFSET } from '../../../utils/charts/constants';
|
|
4
4
|
import { colorFromDefaultPalette } from '../../../utils/charts/theme';
|
|
5
5
|
import { columnOptions } from '../../../utils/constants';
|