@mozaic-ds/vue 0.32.0 → 0.32.2

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": "@mozaic-ds/vue",
3
- "version": "0.32.0",
3
+ "version": "0.32.2",
4
4
  "description": "Vue.js implementation of Mozaic Design System",
5
5
  "author": "Adeo - Mozaic Design System",
6
6
  "scripts": {
@@ -194,8 +194,8 @@ export default {
194
194
  },
195
195
  setStyles() {
196
196
  return {
197
- '--tag-width': this.tagWidth,
198
- '--max-width': this.maxWidth,
197
+ '--autocomplete-tag-width': this.tagWidth,
198
+ '--autocomplete-width': this.maxWidth,
199
199
  };
200
200
  },
201
201
  },
@@ -349,32 +349,4 @@ export default {
349
349
  <style lang="scss">
350
350
  @import 'settings-tools/all-settings';
351
351
  @import 'components/c.autocomplete';
352
-
353
- .mc-autocomplete {
354
- max-width: var(--max-width);
355
-
356
- &__tag {
357
- position: absolute;
358
- top: 0;
359
- transform: translateY(50%);
360
- }
361
-
362
- &__loader {
363
- position: absolute;
364
- right: $mu075;
365
- top: $mu075;
366
- z-index: 10;
367
- }
368
-
369
- &__trigger {
370
- width: 100%;
371
- }
372
- }
373
-
374
- .mc-autocomplete--multi .mc-autocomplete__trigger {
375
- overflow: hidden;
376
- padding-left: calc(2.9375rem + var(--tag-width));
377
- text-overflow: ellipsis;
378
- white-space: nowrap;
379
- }
380
352
  </style>
@@ -394,7 +394,7 @@ export default {
394
394
  source: {
395
395
  immediate: true,
396
396
  async handler(newValue, oldValue) {
397
- if (deepEqual(newValue, oldValue)) {
397
+ if (deepEqual(newValue, oldValue) && !(newValue instanceof Function)) {
398
398
  return;
399
399
  }
400
400
 
@@ -467,7 +467,7 @@ export default {
467
467
  mounted() {
468
468
  this.load();
469
469
  this.created = true;
470
- this.bodyStyleAttr = this.$refs.datatable.attributes.style.value;
470
+ this.bodyStyleAttr = this.$refs?.datatable?.attributes?.style?.value;
471
471
  },
472
472
 
473
473
  methods: {
@@ -139,8 +139,4 @@ export default {
139
139
  @import 'settings-tools/all-settings';
140
140
  @import 'components/c.checkbox';
141
141
  @import 'components/c.listbox';
142
-
143
- .mc-listbox__empty {
144
- margin-top: 0;
145
- }
146
142
  </style>
@@ -100,6 +100,8 @@ export default {
100
100
 
101
101
  <style lang="scss">
102
102
  @import 'settings-tools/all-settings';
103
+ @import 'components/c.checkbox';
104
+ @import 'components/c.radio';
103
105
  @import 'components/c.option-card';
104
106
 
105
107
  /* stylelint-disable */
@@ -107,10 +107,6 @@ export default {
107
107
  });
108
108
  }
109
109
 
110
- if (this.currentPage > this.length) {
111
- this.changePage(this.length);
112
- }
113
-
114
110
  return pageOptions;
115
111
  },
116
112
  },
@@ -136,7 +132,7 @@ export default {
136
132
  },
137
133
  changePage(newPage) {
138
134
  this.$emit('on-update-page', newPage);
139
- this.$emit('update:value',newPage);
135
+ this.$emit('update:value', newPage);
140
136
  },
141
137
  previousPage(newPage) {
142
138
  if (this.hasPreviousPageListener()) {
@@ -7,7 +7,7 @@
7
7
  :value="getSelectValue"
8
8
  :disabled="disabled"
9
9
  @change="onChange($event.target.value)"
10
- v-on="inputListeners"
10
+ v-on="$listeners"
11
11
  >
12
12
  <option v-if="placeholder" value="" disabled="disabled">
13
13
  -- {{ placeholder }} --
@@ -102,15 +102,6 @@ export default {
102
102
 
103
103
  return classes;
104
104
  },
105
- inputListeners: function () {
106
- // see => https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components
107
- var vm = this;
108
- return Object.assign({}, this.$listeners, {
109
- change: function (event) {
110
- vm.$emit('change', event.target.value);
111
- },
112
- });
113
- },
114
105
  },
115
106
 
116
107
  mounted() {
@@ -146,7 +146,12 @@ export default {
146
146
  const isActive = this.tabs.some((tab) =>
147
147
  Object.prototype.hasOwnProperty.call(tab, 'active')
148
148
  );
149
- if (!isActive) {
149
+
150
+ const isRouterLink = this.tabs.some((tab) =>
151
+ Object.prototype.hasOwnProperty.call(tab, 'router')
152
+ );
153
+
154
+ if (!isActive && !isRouterLink) {
150
155
  const firstTab = this.tablist.querySelector('.mc-tabs__element');
151
156
  this.manageTabs(firstTab);
152
157
  }