@webitel/ui-sdk 25.4.48 → 25.4.50

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 CHANGED
@@ -1,3 +1,40 @@
1
+ ## [v25.4.49] - 2025-04-03
2
+ ### :bug: Bug Fixes
3
+ - [`0de05f6`](https://github.com/webitel/webitel-ui-sdk/commit/0de05f6be3d3c0b4132ec61d193b7fedaac3c056) - ui-datalist/ filter update [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
4
+ - [`255de8e`](https://github.com/webitel/webitel-ui-sdk/commit/255de8ea22aa57e0393b00f3932913aca2b58d50) - ui-datalist/ filter presets previews for api lookups not showing [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
5
+ - [`2756d86`](https://github.com/webitel/webitel-ui-sdk/commit/2756d8672357c584b0c1fe46be73b4471159b4e8) - change version *(commit by [@liza-pohranichna](https://github.com/liza-pohranichna))*
6
+ - [`08d51e2`](https://github.com/webitel/webitel-ui-sdk/commit/08d51e25a98c9bd4773727613a07c0c5927a1d5b) - change service catalogs file name on camelCase, export service catalogs from clients, refactor clients/index.js file with prettier *(commit by [@liza-pohranichna](https://github.com/liza-pohranichna))*
7
+ - [`e078867`](https://github.com/webitel/webitel-ui-sdk/commit/e078867ed7e9fd394ef6fb563324b8c5a281c702) - ui-datalist FiltersManager.ts deleteFilter fn param [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
8
+
9
+ ### :recycle: Refactors
10
+ - [`e7d3173`](https://github.com/webitel/webitel-ui-sdk/commit/e7d31737483defc8a7c500053ea67506137842df) - ui-datalist/ loading filters preview data -> main preview component instead of tooltip-components to avoid api requests spam [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
11
+
12
+
13
+ ## [v25.4.48] - 2025-04-02
14
+ ### :sparkles: New Features
15
+ - [`9225a8f`](https://github.com/webitel/webitel-ui-sdk/commit/9225a8f6f24a3397d5295313b8170b70ad2925c3) - added readme file to @webitel/ui-datalist npm pckg [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
16
+ - [`db1cdf4`](https://github.com/webitel/webitel-ui-sdk/commit/db1cdf49372e8de131d9e0cd5ef567e4faeab092) - @webitel/ui-datalist npm pckg [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
17
+ - [`310e4d6`](https://github.com/webitel/webitel-ui-sdk/commit/310e4d645d26b176121e5063cfe80c2a1d1c0090) - eslint+prettier, + reformatting [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
18
+ - [`53ee405`](https://github.com/webitel/webitel-ui-sdk/commit/53ee40541333e565222a7cd828386b3c3f3a36ad) - eslint+prettier, + reformatting [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
19
+
20
+ ### :bug: Bug Fixes
21
+ - [`02680c3`](https://github.com/webitel/webitel-ui-sdk/commit/02680c3d56ca632e4f492b96950de8800c181606) - webitel-ui entry points update [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
22
+ - [`8446027`](https://github.com/webitel/webitel-ui-sdk/commit/8446027ac981b6ad4ba02b10d62e16bb144e3695) - ui-datalist package @webitel/ui-sdk import fixes from relative paths to package [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
23
+ - [`4d80543`](https://github.com/webitel/webitel-ui-sdk/commit/4d80543cc9b8850460ca8d71e458545eec700b16) - linting scope [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
24
+ - [`50ed7b2`](https://github.com/webitel/webitel-ui-sdk/commit/50ed7b21e6ced1c4c3a82137298e21f1040b1b24) - pre-commit hook upd test commit [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
25
+ - [`5168ceb`](https://github.com/webitel/webitel-ui-sdk/commit/5168ceb270a957c9565f50156517f66b628881d2) - pre-commit hook upd test commit [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
26
+
27
+ ### :recycle: Refactors
28
+ - [`9dbb623`](https://github.com/webitel/webitel-ui-sdk/commit/9dbb62349d1dcebc4fd567c00b92d02d8f0ff0d0) - ran reformat code [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
29
+ - [`56c65f3`](https://github.com/webitel/webitel-ui-sdk/commit/56c65f39f0a38d9160aae99df3bcb100963b4360) - filters panel moved to ui-datalist pckg [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
30
+ - [`ee07c7c`](https://github.com/webitel/webitel-ui-sdk/commit/ee07c7c64d90f5026cf6683e120f79637648b729) - rfactoring filters panel in progress [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
31
+ - [`e0d1370`](https://github.com/webitel/webitel-ui-sdk/commit/e0d1370f1e4ad8d25395fc9b4a1697791e8af063) - moving filters panel to lib in progress [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
32
+ - [`460dc66`](https://github.com/webitel/webitel-ui-sdk/commit/460dc66cb9e412280cb218b6c007499c7ba65a45) - ui-sdk package.json exports, lang=sass removed from ui-datalist [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
33
+ - [`77a9b08`](https://github.com/webitel/webitel-ui-sdk/commit/77a9b087dc998954d513930c8f42c446dd1af502) - ui-sdk package.json exports, lang=sass removed from ui-datalist [WTEL-6522](https://webitel.atlassian.net/browse/WTEL-6522) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
34
+ - [`86e7add`](https://github.com/webitel/webitel-ui-sdk/commit/86e7add3c2c060857b9286ac29b3a71a8c9eac6e) - run project linting + code reformatting [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
35
+ - [`3983732`](https://github.com/webitel/webitel-ui-sdk/commit/39837327e5b07f3ed8aa07a9b062128ff54adee9) - eslint config updates [WTEL-6536](https://webitel.atlassian.net/browse/WTEL-6536) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
36
+
37
+
1
38
  ## [v25.4.47] - 2025-03-26
2
39
 
3
40
  ### :recycle: Refactors
@@ -1768,3 +1805,5 @@
1768
1805
  [v25.4.45]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.44...v25.4.45
1769
1806
  [v25.4.46]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.45...v25.4.46
1770
1807
  [v25.4.47]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.46...v25.4.47
1808
+ [v25.4.48]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.47...v25.4.48
1809
+ [v25.4.49]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.48...v25.4.49
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.4.48",
3
+ "version": "25.4.50",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -5,6 +5,7 @@ import calendars from './calendars/calendars.js';
5
5
  import caseCloseReasonGroups from './caseCloseReasonGroups/caseCloseReasonGroups.js';
6
6
  import caseCloseReasons from './caseCloseReasons/caseCloseReasons.js';
7
7
  import casePriorities from './casePriorities/casePriorities.js';
8
+ import caseServiceCatalogs from './caseServiceCatalogs/serviceCatalogs.js';
8
9
  import caseSources from './caseSources/caseSources.js';
9
10
  import caseStatusConditions from './caseStatusConditions/caseStatusConditions.js';
10
11
  import caseStatuses from './caseStatuses/caseStatuses.js';
@@ -34,6 +35,7 @@ export {
34
35
  caseCloseReasonGroups,
35
36
  caseCloseReasons,
36
37
  casePriorities,
38
+ caseServiceCatalogs,
37
39
  caseSources,
38
40
  caseStatusConditions,
39
41
  caseStatuses,
@@ -32,6 +32,10 @@ const getRoleList = async (params) => {
32
32
 
33
33
  const url = applyTransform(params, [
34
34
  merge(getDefaultGetParams()),
35
+ (params) => {
36
+ params.ids = params.ids || params.id; // accept either ids or id as param
37
+ return params;
38
+ },
35
39
  starToSearch('search'),
36
40
  (params) => ({ ...params, q: params.search }),
37
41
  sanitize(fieldsToSend),
@@ -1,9 +1,11 @@
1
1
  <template>
2
2
  <wt-search-bar
3
3
  :placeholder="t('reusable.search')"
4
- :search-mode="props.searchMode"
5
- :search-mode-options="searchModeOptions"
4
+ :search-mode="currentSearchMode"
5
+ :search-mode-options="props.searchModeOptions"
6
+ :hint="currentSearchMode?.hint"
6
7
  :value="model"
8
+ :v="validationExists && v$"
7
9
  @input="model = $event"
8
10
  @search="handleSearch"
9
11
  @update:search-mode="onSearchModeChange($event.value)"
@@ -18,17 +20,21 @@
18
20
  </template>
19
21
 
20
22
  <script lang="ts" setup>
21
- import { computed } from 'vue';
23
+ import { useVuelidate } from '@vuelidate/core';
24
+ import {computed} from 'vue';
22
25
  import { useI18n } from 'vue-i18n';
23
26
 
24
27
  import WtSearchBar from '../../../../../components/wt-search-bar/wt-search-bar.vue';
28
+ import {FilterSearch} from '../index';
25
29
 
26
30
  type ModelValue = string;
27
31
  const model = defineModel<ModelValue>();
28
32
 
33
+ type SearchModeOptions = FilterSearch[]
34
+
29
35
  const props = defineProps<{
30
36
  searchMode: string;
31
- searchModeOptions: Record<string, string>;
37
+ searchModeOptions: SearchModeOptions;
32
38
  showTextSearchIcon?: boolean;
33
39
  }>();
34
40
 
@@ -39,6 +45,28 @@ const emit = defineEmits<{
39
45
 
40
46
  const { t } = useI18n();
41
47
 
48
+ const currentSearchMode = computed(() =>
49
+ props.searchModeOptions.find(({ value }) => value === props.searchMode),
50
+ );
51
+
52
+ const validationExists = computed(() => props.searchModeOptions.find((el) => el.v))
53
+
54
+ const v$ =
55
+ validationExists.value &&
56
+ useVuelidate(
57
+ computed(() => {
58
+ return {
59
+ model: {
60
+ ...(currentSearchMode.value?.v || {}),
61
+ },
62
+ };
63
+ }),
64
+ { model },
65
+ { $autoDirty: true },
66
+ );
67
+
68
+ if (v$) v$.value.$touch();
69
+
42
70
  const onSearchModeChange = (value: string) => {
43
71
  emit('update:search-mode', value);
44
72
  model.value = '';
@@ -47,15 +75,6 @@ const onSearchModeChange = (value: string) => {
47
75
  const handleSearch = () => {
48
76
  emit('handle-search', model.value);
49
77
  };
50
-
51
- const searchModeOptions = computed(() =>
52
- Object.values(props.searchModeOptions).map((mode) => {
53
- return {
54
- value: mode,
55
- text: t(`filters.search.${mode}`),
56
- };
57
- }),
58
- );
59
78
  </script>
60
79
 
61
80
  <style lang="scss" scoped></style>
@@ -1,4 +1,4 @@
1
- import ServiceCatalogsAPI from '../../../../../../../api/clients/caseServiceCatalogs/service-catalogs.js';
1
+ import ServiceCatalogsAPI from '../../../../../../../api/clients/caseServiceCatalogs/serviceCatalogs.js';
2
2
  import ServicesAPI from '../../../../../../../api/clients/caseServices/services.js';
3
3
 
4
4
  export const searchMethod = ServiceCatalogsAPI.getList;
@@ -8,6 +8,7 @@ import type {
8
8
  FilterValue,
9
9
  IFilter,
10
10
  } from './types/Filter.d.ts';
11
+ import { FilterSearch } from './types/FilterSearch';
11
12
  import type {
12
13
  FiltersManagerConfig,
13
14
  IFiltersManager,
@@ -20,6 +21,7 @@ export type {
20
21
  FilterInitParams,
21
22
  FilterLabel,
22
23
  FilterName,
24
+ FilterSearch,
23
25
  FiltersManagerConfig,
24
26
  FilterValue,
25
27
  IFilter,
@@ -0,0 +1,10 @@
1
+ import { Validation } from '@vuelidate/core';
2
+
3
+ import { FilterLabel, FilterValue } from './Filter';
4
+
5
+ export interface FilterSearch {
6
+ value: FilterValue;
7
+ text: FilterLabel;
8
+ hint?: string | undefined;
9
+ v?: Validation | undefined;
10
+ }