@gitlab/ui 123.12.0 → 124.0.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/dist/components/base/alert/alert.js +8 -2
- package/dist/components/base/form/form_fields/form_fields.js +20 -5
- package/dist/components/base/form/form_fields/form_fields_loop.js +75 -0
- package/dist/components/base/pagination/pagination.js +3 -8
- package/package.json +1 -1
- package/src/components/base/alert/alert.vue +10 -2
- package/src/components/base/form/form_fields/form_fields.vue +20 -5
- package/src/components/base/form/form_fields/form_fields_loop.vue +44 -0
- package/src/components/base/pagination/pagination.vue +0 -8
|
@@ -87,7 +87,13 @@ var script = {
|
|
|
87
87
|
required: false,
|
|
88
88
|
default: false
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Set the aria-live attribute on the alert.
|
|
92
|
+
*
|
|
93
|
+
* Only set to 'assertive' if alert requires immediate user action.
|
|
94
|
+
* Otherwise, rely on the default value.
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
91
97
|
politeness: {
|
|
92
98
|
type: String,
|
|
93
99
|
required: false,
|
|
@@ -193,7 +199,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
193
199
|
{ 'gl-alert-not-dismissible': !_vm.dismissible },
|
|
194
200
|
{ 'gl-alert-no-icon': !_vm.showIcon },
|
|
195
201
|
{ 'gl-alert-has-title': !!_vm.title },
|
|
196
|
-
_vm.variantClass ]},[(_vm.showIcon)?_c('div',{staticClass:"gl-alert-icon-container"},[_c('gl-icon',{staticClass:"gl-alert-icon",attrs:{"name":_vm.iconName}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content"
|
|
202
|
+
_vm.variantClass ],attrs:{"role":_vm.role,"aria-live":_vm.politeness}},[(_vm.showIcon)?_c('div',{staticClass:"gl-alert-icon-container"},[_c('gl-icon',{staticClass:"gl-alert-icon",attrs:{"name":_vm.iconName}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content"},[(_vm.title)?_c('h2',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",function(){return _vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])})})],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
|
|
197
203
|
var __vue_staticRenderFns__ = [];
|
|
198
204
|
|
|
199
205
|
/* style */
|
|
@@ -5,6 +5,7 @@ import GlFormGroup from '../form_group/form_group';
|
|
|
5
5
|
import GlFormInput from '../form_input/form_input';
|
|
6
6
|
import { setObjectProperty } from '../../../../utils/set_utils';
|
|
7
7
|
import GlFormFieldValidator from './form_field_validator';
|
|
8
|
+
import GlFormFieldsLoop from './form_fields_loop';
|
|
8
9
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
9
10
|
|
|
10
11
|
var script = {
|
|
@@ -12,7 +13,8 @@ var script = {
|
|
|
12
13
|
components: {
|
|
13
14
|
GlFormGroup,
|
|
14
15
|
GlFormInput,
|
|
15
|
-
GlFormFieldValidator
|
|
16
|
+
GlFormFieldValidator,
|
|
17
|
+
GlFormFieldsLoop
|
|
16
18
|
},
|
|
17
19
|
model: {
|
|
18
20
|
prop: 'values',
|
|
@@ -66,7 +68,8 @@ var script = {
|
|
|
66
68
|
data() {
|
|
67
69
|
return {
|
|
68
70
|
fieldDirtyStatuses: {},
|
|
69
|
-
fieldValidations: {}
|
|
71
|
+
fieldValidations: {},
|
|
72
|
+
fieldIds: {}
|
|
70
73
|
};
|
|
71
74
|
},
|
|
72
75
|
computed: {
|
|
@@ -95,7 +98,7 @@ var script = {
|
|
|
95
98
|
},
|
|
96
99
|
fieldsToRender() {
|
|
97
100
|
return mapValues(this.fields, (field, fieldName) => {
|
|
98
|
-
const id =
|
|
101
|
+
const id = this.memoizeAndReturnFieldId(field, fieldName);
|
|
99
102
|
const inputSlotName = `input(${fieldName})`;
|
|
100
103
|
const groupPassthroughSlotName = `group(${fieldName})-`;
|
|
101
104
|
const afterSlotName = `after(${fieldName})`;
|
|
@@ -160,6 +163,15 @@ var script = {
|
|
|
160
163
|
}
|
|
161
164
|
return val;
|
|
162
165
|
},
|
|
166
|
+
memoizeAndReturnFieldId(field, fieldName) {
|
|
167
|
+
const memoizedId = this.fieldIds[fieldName];
|
|
168
|
+
if (memoizedId) {
|
|
169
|
+
return memoizedId;
|
|
170
|
+
}
|
|
171
|
+
const id = field.id || uniqueId('gl-form-field-');
|
|
172
|
+
this.fieldIds[fieldName] = id;
|
|
173
|
+
return id;
|
|
174
|
+
},
|
|
163
175
|
onFieldValidationUpdate(fieldName, invalidFeedback) {
|
|
164
176
|
this.fieldValidations = setObjectProperty(this.fieldValidations, fieldName, invalidFeedback);
|
|
165
177
|
this.$emit('field-validation', {
|
|
@@ -206,10 +218,13 @@ var script = {
|
|
|
206
218
|
const __vue_script__ = script;
|
|
207
219
|
|
|
208
220
|
/* template */
|
|
209
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('
|
|
221
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-form-fields-loop',{attrs:{"fields":_vm.fieldsToRender},scopedSlots:_vm._u([{key:"default",fn:function(ref){
|
|
222
|
+
var field = ref.field;
|
|
223
|
+
var fieldName = ref.fieldName;
|
|
224
|
+
return [_c('gl-form-group',_vm._b({key:field.id,attrs:{"label":field.label,"label-for":field.id,"invalid-feedback":_vm.fieldValidationProps[fieldName].invalidFeedback,"state":_vm.fieldValidationProps[fieldName].state},scopedSlots:_vm._u([_vm._l((field.groupPassthroughSlots),function(ref){
|
|
210
225
|
var slotName = ref.slotName;
|
|
211
226
|
var childSlotName = ref.childSlotName;
|
|
212
|
-
return {key:childSlotName,fn:function(){return [_vm._t(slotName)]},proxy:true}})],null,true)},'gl-form-group',field.groupAttrs,false),[_c('gl-form-field-validator',{attrs:{"value":_vm.fieldValues[fieldName],"validators":field.validators,"should-validate":_vm.fieldDirtyStatuses[fieldName]},on:{"update":function($event){return _vm.onFieldValidationUpdate(fieldName, $event)}}}),_vm._v(" "),_vm._v(" "),_vm._t(field.inputSlot.slotName,function(){return [_c('gl-form-input',_vm._b({attrs:{"id":field.id,"value":_vm.fieldValues[fieldName],"state":_vm.fieldValidationProps[fieldName].state},on:{"input":function($event){return _vm.onFieldInput(fieldName, $event)},"blur":function($event){return _vm.onFieldBlur(fieldName)}}},'gl-form-input',field.inputAttrs,false))]},null,field.inputSlot.attrs)],2),_vm._v(" "),_vm._t(field.afterSlotName)]}
|
|
227
|
+
return {key:childSlotName,fn:function(){return [_vm._t(slotName)]},proxy:true}})],null,true)},'gl-form-group',field.groupAttrs,false),[_c('gl-form-field-validator',{attrs:{"value":_vm.fieldValues[fieldName],"validators":field.validators,"should-validate":_vm.fieldDirtyStatuses[fieldName]},on:{"update":function($event){return _vm.onFieldValidationUpdate(fieldName, $event)}}}),_vm._v(" "),_vm._v(" "),_vm._t(field.inputSlot.slotName,function(){return [_c('gl-form-input',_vm._b({attrs:{"id":field.id,"value":_vm.fieldValues[fieldName],"state":_vm.fieldValidationProps[fieldName].state},on:{"input":function($event){return _vm.onFieldInput(fieldName, $event)},"blur":function($event){return _vm.onFieldBlur(fieldName)}}},'gl-form-input',field.inputAttrs,false))]},null,field.inputSlot.attrs)],2),_vm._v(" "),_vm._t(field.afterSlotName)]}}],null,true)})};
|
|
213
228
|
var __vue_staticRenderFns__ = [];
|
|
214
229
|
|
|
215
230
|
/* style */
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
3
|
+
|
|
4
|
+
var script = {
|
|
5
|
+
name: 'GlFormFieldsLoop',
|
|
6
|
+
props: {
|
|
7
|
+
fields: {
|
|
8
|
+
type: Object,
|
|
9
|
+
required: true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
render(createElement) {
|
|
13
|
+
const {
|
|
14
|
+
Fragment
|
|
15
|
+
} = Vue;
|
|
16
|
+
|
|
17
|
+
// Vue 3, key goes on `Fragment` (<template> element)
|
|
18
|
+
if (Fragment) {
|
|
19
|
+
return createElement('div', Object.entries(this.fields).map(_ref => {
|
|
20
|
+
let [fieldName, field] = _ref;
|
|
21
|
+
return createElement(Fragment, {
|
|
22
|
+
key: field.id
|
|
23
|
+
}, this.$scopedSlots.default({
|
|
24
|
+
fieldName,
|
|
25
|
+
field
|
|
26
|
+
}));
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Vue 2, key goes on element (rendered via default slot)
|
|
31
|
+
return createElement('div', Object.entries(this.fields).map(_ref2 => {
|
|
32
|
+
let [fieldName, field] = _ref2;
|
|
33
|
+
return this.$scopedSlots.default({
|
|
34
|
+
fieldName,
|
|
35
|
+
field
|
|
36
|
+
});
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/* script */
|
|
42
|
+
const __vue_script__ = script;
|
|
43
|
+
|
|
44
|
+
/* template */
|
|
45
|
+
|
|
46
|
+
/* style */
|
|
47
|
+
const __vue_inject_styles__ = undefined;
|
|
48
|
+
/* scoped */
|
|
49
|
+
const __vue_scope_id__ = undefined;
|
|
50
|
+
/* module identifier */
|
|
51
|
+
const __vue_module_identifier__ = undefined;
|
|
52
|
+
/* functional template */
|
|
53
|
+
const __vue_is_functional_template__ = undefined;
|
|
54
|
+
/* style inject */
|
|
55
|
+
|
|
56
|
+
/* style inject SSR */
|
|
57
|
+
|
|
58
|
+
/* style inject shadow dom */
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
const __vue_component__ = /*#__PURE__*/__vue_normalize__(
|
|
63
|
+
{},
|
|
64
|
+
__vue_inject_styles__,
|
|
65
|
+
__vue_script__,
|
|
66
|
+
__vue_scope_id__,
|
|
67
|
+
__vue_is_functional_template__,
|
|
68
|
+
__vue_module_identifier__,
|
|
69
|
+
false,
|
|
70
|
+
undefined,
|
|
71
|
+
undefined,
|
|
72
|
+
undefined
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
export { __vue_component__ as default };
|
|
@@ -167,11 +167,6 @@ var script = {
|
|
|
167
167
|
required: false,
|
|
168
168
|
default: alignOptions.left,
|
|
169
169
|
validator: value => Object.keys(alignOptions).includes(value)
|
|
170
|
-
},
|
|
171
|
-
disabled: {
|
|
172
|
-
type: Boolean,
|
|
173
|
-
required: false,
|
|
174
|
-
default: false
|
|
175
170
|
}
|
|
176
171
|
},
|
|
177
172
|
data() {
|
|
@@ -290,7 +285,7 @@ var script = {
|
|
|
290
285
|
this.breakpoint = GlBreakpointInstance.getBreakpointSize();
|
|
291
286
|
},
|
|
292
287
|
pageIsDisabled(page) {
|
|
293
|
-
return
|
|
288
|
+
return page < 1 || this.isCompactPagination && page > this.value && !this.nextPage || !this.isCompactPagination && page > this.totalPages;
|
|
294
289
|
},
|
|
295
290
|
getPageItem(page) {
|
|
296
291
|
let label = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
@@ -377,13 +372,13 @@ const __vue_script__ = script;
|
|
|
377
372
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isVisible)?_c('nav',{staticClass:"gl-pagination",attrs:{"aria-label":_vm.labelNav}},[_c('ul',{class:_vm.wrapperClasses},[_c('li',{class:{
|
|
378
373
|
disabled: _vm.prevPageIsDisabled,
|
|
379
374
|
'gl-flex-auto': _vm.isFillAlign,
|
|
380
|
-
},attrs:{"aria-
|
|
375
|
+
},attrs:{"aria-hidden":_vm.prevPageIsDisabled,"data-testid":"gl-pagination-li"}},[_c(_vm.prevPageIsDisabled ? 'span' : 'a',{tag:"component",staticClass:"gl-pagination-item",attrs:{"data-testid":"gl-pagination-prev","aria-label":_vm.prevPageAriaLabel,"href":_vm.prevPageHref},on:{"click":function($event){!_vm.prevPageIsDisabled ? _vm.handlePrevious($event, _vm.value - 1) : null;}}},[_vm._t("previous",function(){return [_c('gl-icon',{attrs:{"name":"chevron-left"}}),_vm._v(" "),_c('span',{staticClass:"gl-hidden @sm:gl-block"},[_vm._v(_vm._s(_vm.prevText))])]},null,{ page: _vm.value - 1, disabled: _vm.prevPageIsDisabled })],2)],1),_vm._v(" "),_vm._l((_vm.visibleItems),function(item){return _c('li',{key:item.key,class:{
|
|
381
376
|
disabled: item.disabled,
|
|
382
377
|
'gl-flex-auto': _vm.isFillAlign,
|
|
383
378
|
},attrs:{"data-testid":"gl-pagination-li"}},[_c(item.component,_vm._g(_vm._b({tag:"component",staticClass:"gl-pagination-item",attrs:{"data-testid":"gl-pagination-item","size":"md","aria-disabled":item.disabled}},'component',item.attrs,false),item.listeners),[_vm._t(item.slot,function(){return [_vm._v(_vm._s(item.content))]},null,item.slotData)],2)],1)}),_vm._v(" "),_c('li',{class:{
|
|
384
379
|
disabled: _vm.nextPageIsDisabled,
|
|
385
380
|
'gl-flex-auto': _vm.isFillAlign,
|
|
386
|
-
},attrs:{"aria-
|
|
381
|
+
},attrs:{"aria-hidden":_vm.nextPageIsDisabled,"data-testid":"gl-pagination-li"}},[_c(_vm.nextPageIsDisabled ? 'span' : 'a',{tag:"component",staticClass:"gl-pagination-item",attrs:{"data-testid":"gl-pagination-next","aria-label":_vm.nextPageAriaLabel,"href":_vm.nextPageHref},on:{"click":function($event){!_vm.nextPageIsDisabled ? _vm.handleNext($event, _vm.value + 1) : null;}}},[_vm._t("next",function(){return [_c('span',{staticClass:"gl-hidden @sm:gl-block"},[_vm._v(_vm._s(_vm.nextText))]),_vm._v(" "),_c('gl-icon',{attrs:{"name":"chevron-right"}})]},null,{ page: _vm.value + 1, disabled: _vm.nextPageIsDisabled })],2)],1)],2)]):_vm._e()};
|
|
387
382
|
var __vue_staticRenderFns__ = [];
|
|
388
383
|
|
|
389
384
|
/* style */
|
package/package.json
CHANGED
|
@@ -90,7 +90,13 @@ export default {
|
|
|
90
90
|
required: false,
|
|
91
91
|
default: false,
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Set the aria-live attribute on the alert.
|
|
95
|
+
*
|
|
96
|
+
* Only set to 'assertive' if alert requires immediate user action.
|
|
97
|
+
* Otherwise, rely on the default value.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
94
100
|
politeness: {
|
|
95
101
|
type: String,
|
|
96
102
|
required: false,
|
|
@@ -196,6 +202,8 @@ export default {
|
|
|
196
202
|
|
|
197
203
|
<template>
|
|
198
204
|
<div
|
|
205
|
+
:role="role"
|
|
206
|
+
:aria-live="politeness"
|
|
199
207
|
:class="[
|
|
200
208
|
'gl-alert',
|
|
201
209
|
{ 'gl-alert-sticky': sticky },
|
|
@@ -208,7 +216,7 @@ export default {
|
|
|
208
216
|
<div v-if="showIcon" class="gl-alert-icon-container">
|
|
209
217
|
<gl-icon :name="iconName" class="gl-alert-icon" />
|
|
210
218
|
</div>
|
|
211
|
-
<div class="gl-alert-content"
|
|
219
|
+
<div class="gl-alert-content">
|
|
212
220
|
<h2 v-if="title" class="gl-alert-title">{{ title }}</h2>
|
|
213
221
|
|
|
214
222
|
<div class="gl-alert-body">
|
|
@@ -6,6 +6,7 @@ import GlFormGroup from '../form_group/form_group.vue';
|
|
|
6
6
|
import GlFormInput from '../form_input/form_input.vue';
|
|
7
7
|
import { setObjectProperty } from '../../../../utils/set_utils';
|
|
8
8
|
import GlFormFieldValidator from './form_field_validator.vue';
|
|
9
|
+
import GlFormFieldsLoop from './form_fields_loop.vue';
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
12
|
name: 'GlFormFields',
|
|
@@ -13,6 +14,7 @@ export default {
|
|
|
13
14
|
GlFormGroup,
|
|
14
15
|
GlFormInput,
|
|
15
16
|
GlFormFieldValidator,
|
|
17
|
+
GlFormFieldsLoop,
|
|
16
18
|
},
|
|
17
19
|
model: {
|
|
18
20
|
prop: 'values',
|
|
@@ -67,6 +69,7 @@ export default {
|
|
|
67
69
|
return {
|
|
68
70
|
fieldDirtyStatuses: {},
|
|
69
71
|
fieldValidations: {},
|
|
72
|
+
fieldIds: {},
|
|
70
73
|
};
|
|
71
74
|
},
|
|
72
75
|
computed: {
|
|
@@ -98,7 +101,7 @@ export default {
|
|
|
98
101
|
},
|
|
99
102
|
fieldsToRender() {
|
|
100
103
|
return mapValues(this.fields, (field, fieldName) => {
|
|
101
|
-
const id =
|
|
104
|
+
const id = this.memoizeAndReturnFieldId(field, fieldName);
|
|
102
105
|
|
|
103
106
|
const inputSlotName = `input(${fieldName})`;
|
|
104
107
|
const groupPassthroughSlotName = `group(${fieldName})-`;
|
|
@@ -173,6 +176,18 @@ export default {
|
|
|
173
176
|
|
|
174
177
|
return val;
|
|
175
178
|
},
|
|
179
|
+
memoizeAndReturnFieldId(field, fieldName) {
|
|
180
|
+
const memoizedId = this.fieldIds[fieldName];
|
|
181
|
+
|
|
182
|
+
if (memoizedId) {
|
|
183
|
+
return memoizedId;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const id = field.id || uniqueId('gl-form-field-');
|
|
187
|
+
this.fieldIds[fieldName] = id;
|
|
188
|
+
|
|
189
|
+
return id;
|
|
190
|
+
},
|
|
176
191
|
onFieldValidationUpdate(fieldName, invalidFeedback) {
|
|
177
192
|
this.fieldValidations = setObjectProperty(this.fieldValidations, fieldName, invalidFeedback);
|
|
178
193
|
|
|
@@ -220,11 +235,11 @@ export default {
|
|
|
220
235
|
</script>
|
|
221
236
|
|
|
222
237
|
<template>
|
|
223
|
-
<
|
|
224
|
-
<template
|
|
225
|
-
<!-- eslint-disable-next-line vue/valid-v-for -->
|
|
238
|
+
<gl-form-fields-loop :fields="fieldsToRender">
|
|
239
|
+
<template #default="{ field, fieldName }">
|
|
226
240
|
<gl-form-group
|
|
227
241
|
v-bind="field.groupAttrs"
|
|
242
|
+
:key="field.id"
|
|
228
243
|
:label="field.label"
|
|
229
244
|
:label-for="field.id"
|
|
230
245
|
:invalid-feedback="fieldValidationProps[fieldName].invalidFeedback"
|
|
@@ -259,5 +274,5 @@ export default {
|
|
|
259
274
|
<!-- @slot Can be used to add content the form group of a field. The name of the slot is `after(<fieldName>)`.-->
|
|
260
275
|
<slot :name="field.afterSlotName"></slot>
|
|
261
276
|
</template>
|
|
262
|
-
</
|
|
277
|
+
</gl-form-fields-loop>
|
|
263
278
|
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Vue from 'vue';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'GlFormFieldsLoop',
|
|
6
|
+
props: {
|
|
7
|
+
fields: {
|
|
8
|
+
type: Object,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
render(createElement) {
|
|
13
|
+
const { Fragment } = Vue;
|
|
14
|
+
|
|
15
|
+
// Vue 3, key goes on `Fragment` (<template> element)
|
|
16
|
+
if (Fragment) {
|
|
17
|
+
return createElement(
|
|
18
|
+
'div',
|
|
19
|
+
Object.entries(this.fields).map(([fieldName, field]) =>
|
|
20
|
+
createElement(
|
|
21
|
+
Fragment,
|
|
22
|
+
{ key: field.id },
|
|
23
|
+
this.$scopedSlots.default({
|
|
24
|
+
fieldName,
|
|
25
|
+
field,
|
|
26
|
+
}),
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Vue 2, key goes on element (rendered via default slot)
|
|
33
|
+
return createElement(
|
|
34
|
+
'div',
|
|
35
|
+
Object.entries(this.fields).map(([fieldName, field]) =>
|
|
36
|
+
this.$scopedSlots.default({
|
|
37
|
+
fieldName,
|
|
38
|
+
field,
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
@@ -168,11 +168,6 @@ export default {
|
|
|
168
168
|
default: alignOptions.left,
|
|
169
169
|
validator: (value) => Object.keys(alignOptions).includes(value),
|
|
170
170
|
},
|
|
171
|
-
disabled: {
|
|
172
|
-
type: Boolean,
|
|
173
|
-
required: false,
|
|
174
|
-
default: false,
|
|
175
|
-
},
|
|
176
171
|
},
|
|
177
172
|
data() {
|
|
178
173
|
return {
|
|
@@ -312,7 +307,6 @@ export default {
|
|
|
312
307
|
},
|
|
313
308
|
pageIsDisabled(page) {
|
|
314
309
|
return (
|
|
315
|
-
this.disabled ||
|
|
316
310
|
page < 1 ||
|
|
317
311
|
(this.isCompactPagination && page > this.value && !this.nextPage) ||
|
|
318
312
|
(!this.isCompactPagination && page > this.totalPages)
|
|
@@ -399,7 +393,6 @@ export default {
|
|
|
399
393
|
<nav v-if="isVisible" class="gl-pagination" :aria-label="labelNav">
|
|
400
394
|
<ul :class="wrapperClasses">
|
|
401
395
|
<li
|
|
402
|
-
:aria-disabled="prevPageIsDisabled"
|
|
403
396
|
:aria-hidden="prevPageIsDisabled"
|
|
404
397
|
:class="{
|
|
405
398
|
disabled: prevPageIsDisabled,
|
|
@@ -465,7 +458,6 @@ export default {
|
|
|
465
458
|
</li>
|
|
466
459
|
|
|
467
460
|
<li
|
|
468
|
-
:aria-disabled="nextPageIsDisabled"
|
|
469
461
|
:aria-hidden="nextPageIsDisabled"
|
|
470
462
|
:class="{
|
|
471
463
|
disabled: nextPageIsDisabled,
|