@gitlab/ui 129.1.1 → 129.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "129.1.1",
3
+ "version": "129.2.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -139,10 +139,10 @@
139
139
  "gitlab-api-async-iterator": "^1.3.1",
140
140
  "glob": "11.1.0",
141
141
  "identity-obj-proxy": "^3.0.0",
142
- "jest": "30.2.0",
143
- "jest-circus": "30.2.0",
144
- "jest-environment-jsdom": "30.2.0",
145
- "jest-image-snapshot": "^6.5.1",
142
+ "jest": "30.3.0",
143
+ "jest-circus": "30.3.0",
144
+ "jest-environment-jsdom": "30.3.0",
145
+ "jest-image-snapshot": "^6.5.2",
146
146
  "merge-cobertura": "^1.0.7",
147
147
  "mockdate": "^3.0.5",
148
148
  "module-alias": "^2.3.4",
@@ -160,7 +160,7 @@
160
160
  "rollup-plugin-string": "^3.0.0",
161
161
  "rollup-plugin-svg": "^2.0.0",
162
162
  "rollup-plugin-vue": "^5.1.9",
163
- "sass": "^1.97.3",
163
+ "sass": "^1.98.0",
164
164
  "sass-loader": "^10.5.2",
165
165
  "sass-true": "^9",
166
166
  "start-server-and-test": "^2.1.5",
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { clamp, uniqueId } from 'lodash-es';
2
+ import { clamp, uniqueId, isEqual } from 'lodash-es';
3
3
  import { stopEvent, logWarning } from '../../../../utils/utils';
4
4
  import {
5
5
  GL_DROPDOWN_SHOWN,
@@ -582,7 +582,7 @@ export default {
582
582
  watch: {
583
583
  selected: {
584
584
  immediate: true,
585
- handler(newSelected) {
585
+ handler(newSelected, oldSelected) {
586
586
  if (Array.isArray(newSelected)) {
587
587
  if (process.env.NODE_ENV !== 'production' && !this.multiple && newSelected.length) {
588
588
  throw new Error('To allow multi-selection, please, set "multiple" property to "true"');
@@ -591,6 +591,19 @@ export default {
591
591
  } else {
592
592
  this.selectedValues = [newSelected];
593
593
  }
594
+
595
+ if (
596
+ // Do not emit change event immediately on watcher creation.
597
+ oldSelected !== undefined &&
598
+ !isEqual(newSelected, oldSelected)
599
+ ) {
600
+ /**
601
+ * Emitted when the selected prop value changes
602
+ *
603
+ * @event change
604
+ */
605
+ this.$emit('change');
606
+ }
594
607
  },
595
608
  },
596
609
  items: {
@@ -1,6 +1,7 @@
1
1
  <script>
2
2
  import { BTable } from '../../../vendor/bootstrap-vue/src/components/table/table';
3
3
  import { logWarning, isDev } from '../../../utils/utils';
4
+ import GlLoadingIcon from '../loading_icon/loading_icon.vue';
4
5
  import { tableFullSlots, tableFullProps, glTableLiteWarning } from './constants';
5
6
 
6
7
  const shouldUseFullTable = ({ $attrs, $scopedSlots }) => {
@@ -16,6 +17,7 @@ export default {
16
17
  name: 'GlTable',
17
18
  components: {
18
19
  BTable,
20
+ GlLoadingIcon,
19
21
  },
20
22
  inheritAttrs: false,
21
23
  props: {
@@ -163,6 +165,11 @@ export default {
163
165
  </template>
164
166
  </div>
165
167
  </template>
168
+ <template #table-busy>
169
+ <slot name="table-busy">
170
+ <gl-loading-icon size="lg" />
171
+ </slot>
172
+ </template>
166
173
  <template #empty="scope">
167
174
  <slot name="empty" v-bind="scope">
168
175
  <p class="gl-mb-0 gl-py-2 gl-text-subtle">{{ scope.emptyText }}</p>
@@ -44,7 +44,7 @@ $b-custom-switch-indicator-size-sm: calc(
44
44
  // --- Tables ---
45
45
 
46
46
  // Table busy state
47
- $b-table-busy-opacity: 0.55 !default;
47
+ $b-table-busy-opacity: 1 !default;
48
48
 
49
49
  // Table sorting
50
50
  $b-table-sort-icon-bg-width: 0.65em !default;