@webitel/ui-sdk 26.6.79 → 26.6.80

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.
@@ -1,4 +1,4 @@
1
- import "./components-DstokV1l.js";
1
+ import "./components-B78RTsRa.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as t } from "./enums-De8CDKZ1.js";
4
4
  import { t as n } from "./wt-button-dC4nOW56.js";
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-DstokV1l.js";
1
+ import { C as e, i as t } from "./components-B78RTsRa.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { t as r } from "./displayText-CtaxzaBz.js";
4
4
  import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { l as t } from "./enums-De8CDKZ1.js";
3
3
  import { t as n } from "./useExpansion-DVdIpoOn.js";
4
- import "./composables-Drtez3Bp.js";
4
+ import "./composables-BtjgpN_Q.js";
5
5
  import { t as r } from "./wt-expand-transition-C2p9bR4j.js";
6
6
  import { createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, normalizeClass as l, normalizeProps as u, openBlock as d, renderSlot as f, resolveComponent as p, toRef as m, unref as h, vShow as g, withCtx as _, withDirectives as v, withKeys as y } from "vue";
7
7
  //#region src/components/wt-expansion-card/wt-expansion-card.vue?vue&type=script&setup=true&lang.ts
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { t } from "./vue-i18n-Db_oYfO8.js";
3
- import { a as n, o as r } from "./composables-Drtez3Bp.js";
3
+ import { a as n, o as r } from "./composables-BtjgpN_Q.js";
4
4
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderSlot as x, resolveComponent as S, toDisplayString as C, unref as w, useAttrs as T, useModel as E, vShow as D, watch as O, withCtx as k, withDirectives as A } from "vue";
5
5
  //#region src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js
6
6
  var j = () => {
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t } from "./clients-CIZxqjbV.js";
2
- import { n } from "./components-DstokV1l.js";
2
+ import { n } from "./components-B78RTsRa.js";
3
3
  import { t as r } from "./vue-i18n-Db_oYfO8.js";
4
4
  import { createBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
5
5
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { t } from "./vue-i18n-Db_oYfO8.js";
3
3
  import { n, t as r } from "./sortQueryAdapters-CyYXvnDN.js";
4
- import { t as i } from "./composables-Drtez3Bp.js";
4
+ import { t as i } from "./composables-BtjgpN_Q.js";
5
5
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, nextTick as h, normalizeStyle as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDirective as w, toDisplayString as T, useSlots as E, useTemplateRef as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
6
6
  //#region src/components/wt-table/wt-table.vue?vue&type=script&setup=true&lang.ts
7
7
  var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-table__td__actions" }, N = 10, P = /*#__PURE__*/ e(/* @__PURE__ */ m({
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./clients-CIZxqjbV.js";
2
- import { a as t, o as n, r, s as i } from "./components-DstokV1l.js";
2
+ import { a as t, o as n, r, s as i } from "./components-B78RTsRa.js";
3
3
  import { t as a } from "./enums-De8CDKZ1.js";
4
4
  import { t as o } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
@@ -1,4 +1,4 @@
1
- import { w as e } from "./components-DstokV1l.js";
1
+ import { w as e } from "./components-B78RTsRa.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-De8CDKZ1.js";
4
4
  import "./wt-button-dC4nOW56.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.6.79",
3
+ "version": "26.6.80",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -80,8 +80,10 @@ export const useSelect = ({
80
80
  emit,
81
81
  });
82
82
 
83
- onMounted(() => {
84
- fetchSelectedByIds();
83
+ onMounted(async () => {
84
+ await fetchSelectedByIds();
85
+ if (!searchMethod.value) return;
86
+ fetchOptions();
85
87
  });
86
88
 
87
89
  const clearValue = () => {
@@ -191,10 +191,17 @@ export const useSelectOptions = ({
191
191
  (s) => !isOptionSelected(s, filteredOptions.value, dataKey.value),
192
192
  );
193
193
  if (missingSelected.length) {
194
+ // resolve primitives to full objects from cache so PrimeVue can checkmark them
195
+ const resolved = missingSelected.map(
196
+ (s) =>
197
+ (selectedOptionsCache.value as Record<string, unknown>[]).find(
198
+ (o) => o[dataKey.value] === s,
199
+ ) ?? s,
200
+ );
194
201
  filteredOptions.value = sortOptions(
195
202
  dedupeByKey(
196
203
  [
197
- ...filterBySearch(missingSelected, filterText.value),
204
+ ...filterBySearch(resolved, filterText.value),
198
205
  ...filteredOptions.value,
199
206
  ],
200
207
  dataKey.value,
@@ -206,12 +213,6 @@ export const useSelectOptions = ({
206
213
  watch(
207
214
  () => selected.value,
208
215
  (newVal, oldVal) => {
209
- if (oldVal && searchMethod.value) {
210
- const oldAsArray = toArray(oldVal);
211
- filteredOptions.value = filteredOptions.value.filter(
212
- (option) => !isOptionSelected(option, oldAsArray, dataKey.value),
213
- );
214
- }
215
216
  updateSelectedOptionsCache();
216
217
  addSelectedValueToList(newVal);
217
218
  },
@@ -259,10 +259,6 @@ const hasLabel = computed(() => {
259
259
  const requiredLabel = computed(() => {
260
260
  return props.required ? `${props.label}*` : props.label;
261
261
  });
262
-
263
- onMounted(() => {
264
- if (props.searchMethod) fetchOptions();
265
- });
266
262
  </script>
267
263
 
268
264
  <style scoped>
@@ -230,10 +230,6 @@ const hasLabel = computed(() => {
230
230
  const requiredLabel = computed(() => {
231
231
  return props.required ? `${props.label}*` : props.label;
232
232
  });
233
-
234
- onMounted(() => {
235
- if (props.searchMethod) fetchOptions();
236
- });
237
233
  </script>
238
234
 
239
235
  <style scoped>