@webitel/ui-datalist 1.0.1 → 1.0.3

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.
Files changed (113) hide show
  1. package/package.json +5 -10
  2. package/src/filter-presets/api/PresetQuery.api.ts +7 -8
  3. package/src/filter-presets/components/_shared/input-fields/preset-description-field.vue +2 -3
  4. package/src/filter-presets/components/_shared/input-fields/preset-name-field.vue +2 -3
  5. package/src/filter-presets/components/_shared/preset-filters-preview.vue +2 -2
  6. package/src/filter-presets/components/apply-preset/apply-preset-action.vue +10 -10
  7. package/src/filter-presets/components/apply-preset/preset-preview.vue +6 -6
  8. package/src/filter-presets/components/save-preset/overwrite-preset-popup.vue +1 -1
  9. package/src/filter-presets/components/save-preset/save-preset-action.vue +4 -4
  10. package/src/filter-presets/components/save-preset/save-preset-popup.vue +1 -1
  11. package/src/filters/classes/FiltersManager.ts +2 -1
  12. package/src/filters/components/config/dynamic-filter-config-form-label.vue +2 -3
  13. package/src/filters/components/config/dynamic-filter-config-form.vue +33 -13
  14. package/src/filters/components/config/dynamic-filter-config-view.vue +4 -4
  15. package/src/filters/components/dynamic-filter-add-action.vue +26 -4
  16. package/src/filters/components/dynamic-filter-panel-wrapper.vue +1 -1
  17. package/src/filters/components/dynamic-filter-search.vue +2 -3
  18. package/src/filters/components/filter-options/_shared/has-options/has-option-filter-value-field.vue +2 -2
  19. package/src/filters/components/filter-options/actual-reaction-time/actual-reaction-time-filter-value-field.vue +1 -1
  20. package/src/filters/components/filter-options/actual-resolution-time/actual-resolution-time-filter-value-field.vue +1 -1
  21. package/src/filters/components/filter-options/agent/agent-filter-value-field.vue +2 -2
  22. package/src/filters/components/filter-options/agent/agent-filter-value-preview.vue +1 -1
  23. package/src/filters/components/filter-options/agent/config.js +1 -1
  24. package/src/filters/components/filter-options/amd-result/amd-result-filter-value-field.vue +2 -2
  25. package/src/filters/components/filter-options/amd-result/amd-result-filter-value-preview.vue +1 -1
  26. package/src/filters/components/filter-options/assignee/assignee-filter-value-field.vue +2 -3
  27. package/src/filters/components/filter-options/assignee/assignee-filter-value-preview.vue +1 -1
  28. package/src/filters/components/filter-options/assignee/config.js +1 -1
  29. package/src/filters/components/filter-options/author/author-filter-value-field.vue +2 -2
  30. package/src/filters/components/filter-options/author/author-filter-value-preview.vue +1 -1
  31. package/src/filters/components/filter-options/author/config.js +1 -1
  32. package/src/filters/components/filter-options/cause/cause-filter-value-field.vue +2 -2
  33. package/src/filters/components/filter-options/cause/cause-filter-value-preview.vue +1 -1
  34. package/src/filters/components/filter-options/close-reason-groups-case/close-reason-groups-case-filter-value-field.vue +3 -3
  35. package/src/filters/components/filter-options/close-reason-groups-case/close-reason-groups-case-filter-value-preview.vue +1 -1
  36. package/src/filters/components/filter-options/close-reason-groups-case/config.js +2 -2
  37. package/src/filters/components/filter-options/contact/config.js +1 -1
  38. package/src/filters/components/filter-options/contact/contact-filter-value-field.vue +2 -2
  39. package/src/filters/components/filter-options/contact/contact-filter-value-preview.vue +1 -1
  40. package/src/filters/components/filter-options/contact-group/config.js +1 -1
  41. package/src/filters/components/filter-options/contact-group/contact-group-filter-value-field.vue +3 -3
  42. package/src/filters/components/filter-options/contact-group/contact-group-filter-value-preview.vue +1 -1
  43. package/src/filters/components/filter-options/created-at-from/created-at-from-filter-value-field.vue +1 -1
  44. package/src/filters/components/filter-options/created-at-from/created-at-from-filter-value-preview.vue +1 -1
  45. package/src/filters/components/filter-options/created-at-to/created-at-to-filter-value-field.vue +1 -1
  46. package/src/filters/components/filter-options/created-at-to/created-at-to-filter-value-preview.vue +1 -1
  47. package/src/filters/components/filter-options/direction/direction-filter-value-field.vue +2 -2
  48. package/src/filters/components/filter-options/direction/direction-filter-value-preview.vue +2 -2
  49. package/src/filters/components/filter-options/gateway/config.js +1 -1
  50. package/src/filters/components/filter-options/gateway/gateway-filter-value-field.vue +2 -2
  51. package/src/filters/components/filter-options/gateway/gateway-filter-value-preview.vue +1 -1
  52. package/src/filters/components/filter-options/grantee/config.js +1 -1
  53. package/src/filters/components/filter-options/grantee/grantee-filter-value-field.vue +2 -2
  54. package/src/filters/components/filter-options/grantee/grantee-filter-value-preview.vue +1 -1
  55. package/src/filters/components/filter-options/has-attachment/has-attachment-filter-value-field.vue +1 -1
  56. package/src/filters/components/filter-options/has-attachment/has-attachment-filter-value-preview.vue +1 -1
  57. package/src/filters/components/filter-options/has-file/has-file-filter-value-field.vue +1 -1
  58. package/src/filters/components/filter-options/has-file/has-file-filter-value-preview.vue +1 -1
  59. package/src/filters/components/filter-options/has-rating/has-rating-filter-value-field.vue +1 -1
  60. package/src/filters/components/filter-options/has-rating/has-rating-filter-value-preview.vue +1 -1
  61. package/src/filters/components/filter-options/has-transcription/has-transcription-filter-value-field.vue +1 -1
  62. package/src/filters/components/filter-options/has-transcription/has-transcription-filter-value-preview.vue +1 -1
  63. package/src/filters/components/filter-options/impacted/config.js +1 -1
  64. package/src/filters/components/filter-options/impacted/impacted-filter-value-field.vue +2 -2
  65. package/src/filters/components/filter-options/impacted/impacted-filter-value-preview.vue +1 -1
  66. package/src/filters/components/filter-options/priority-case/config.js +1 -1
  67. package/src/filters/components/filter-options/priority-case/priority-case-filter-value-field.vue +2 -2
  68. package/src/filters/components/filter-options/priority-case/priority-case-filter-value-preview.vue +1 -1
  69. package/src/filters/components/filter-options/queue/config.js +1 -1
  70. package/src/filters/components/filter-options/queue/queue-filter-value-field.vue +2 -2
  71. package/src/filters/components/filter-options/queue/queue-filter-value-preview.vue +1 -1
  72. package/src/filters/components/filter-options/rated-by/config.js +1 -1
  73. package/src/filters/components/filter-options/rated-by/rated-by-filter-value-field.vue +2 -2
  74. package/src/filters/components/filter-options/rated-by/rated-by-filter-value-preview.vue +1 -1
  75. package/src/filters/components/filter-options/rating/rating-from-to-filter-value-field.vue +1 -2
  76. package/src/filters/components/filter-options/reaction-time/reaction-time-filter-value-field.vue +1 -1
  77. package/src/filters/components/filter-options/reporter/config.js +1 -1
  78. package/src/filters/components/filter-options/reporter/reporter-filter-value-field.vue +2 -2
  79. package/src/filters/components/filter-options/reporter/reporter-filter-value-preview.vue +1 -1
  80. package/src/filters/components/filter-options/resolution-time/resolution-time-filter-value-field.vue +1 -1
  81. package/src/filters/components/filter-options/score/score-from-to-filter-value-field.vue +1 -1
  82. package/src/filters/components/filter-options/service-case/config.js +2 -2
  83. package/src/filters/components/filter-options/service-case/service-case-filter-value-field.vue +1 -1
  84. package/src/filters/components/filter-options/service-case/service-case-filter-value-preview.vue +1 -1
  85. package/src/filters/components/filter-options/sla/config.js +1 -1
  86. package/src/filters/components/filter-options/sla/sla-filter-value-field.vue +2 -2
  87. package/src/filters/components/filter-options/sla/sla-filter-value-preview.vue +1 -1
  88. package/src/filters/components/filter-options/sla-condition/config.js +2 -2
  89. package/src/filters/components/filter-options/sla-condition/sla-condition-filter-value-field.vue +2 -2
  90. package/src/filters/components/filter-options/sla-condition/sla-condition-filter-value-preview.vue +1 -1
  91. package/src/filters/components/filter-options/source-case/config.js +1 -1
  92. package/src/filters/components/filter-options/source-case/source-case-filter-value-field.vue +2 -2
  93. package/src/filters/components/filter-options/source-case/source-case-filter-value-preview.vue +1 -1
  94. package/src/filters/components/filter-options/status-case/config.js +2 -2
  95. package/src/filters/components/filter-options/status-case/status-case-filter-value-field.vue +2 -2
  96. package/src/filters/components/filter-options/status-case/status-case-filter-value-preview.vue +1 -1
  97. package/src/filters/components/filter-options/tag/tag-filter-value-field.vue +2 -2
  98. package/src/filters/components/filter-options/tag/tag-filter-value-preview.vue +1 -1
  99. package/src/filters/components/filter-options/talk-duration/talk-duration-filter-value-field.vue +1 -1
  100. package/src/filters/components/filter-options/team/config.js +1 -1
  101. package/src/filters/components/filter-options/team/team-filter-value-field.vue +2 -2
  102. package/src/filters/components/filter-options/team/team-filter-value-preview.vue +1 -1
  103. package/src/filters/components/filter-options/total-duration/total-duration-filter-value-field.vue +1 -1
  104. package/src/filters/components/filter-options/user/config.js +1 -1
  105. package/src/filters/components/filter-options/user/user-filter-value-field.vue +2 -2
  106. package/src/filters/components/filter-options/user/user-filter-value-preview.vue +1 -1
  107. package/src/filters/components/filter-options/variable/variable-filter-value-field.vue +2 -3
  108. package/src/filters/components/preview/dynamic-filter-preview.vue +25 -7
  109. package/src/filters/components/table-filters-panel.vue +137 -67
  110. package/src/filters/index.ts +10 -1
  111. package/src/filters/types/Filter.d.ts +5 -0
  112. package/src/headers/createTableHeadersStore.ts +3 -3
  113. package/src/types/tableStore.types.ts +1 -1
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@webitel/ui-datalist",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Toolkit for building data lists in webitel ui system",
5
5
  "scripts": {
6
6
  "lint:fix": "eslint --fix ./src && prettier --write --check ./src",
7
7
  "lint:fix-staged": "npx lint-staged",
8
8
  "lint:package": "publint",
9
9
  "utils:i": "npm i",
10
+ "utils:link": "npm link",
10
11
  "utils:publish": "npm publish --access public"
11
12
  },
12
13
  "type": "module",
@@ -16,15 +17,9 @@
16
17
  "../../"
17
18
  ],
18
19
  "exports": {
19
- ".": {
20
- "import": "./src/index.ts"
21
- },
22
- "./filters": {
23
- "import": "./src/filters/index.ts"
24
- },
25
- "./presets": {
26
- "import": "./src/filter-presets/index.ts"
27
- }
20
+ ".": "./src/index.ts",
21
+ "./filters": "./src/filters/index.ts",
22
+ "./presets": "./src/filter-presets/index.ts"
28
23
  },
29
24
  "files": [
30
25
  "src/*",
@@ -1,15 +1,9 @@
1
- import {
2
- EngineCreatePresetQueryRequest,
3
- EnginePresetQuery,
4
- PresetQueryServiceApiFactory,
5
- } from 'webitel-sdk';
6
-
7
1
  import {
8
2
  getDefaultGetListResponse,
9
3
  getDefaultGetParams,
10
4
  getDefaultInstance,
11
5
  getDefaultOpenAPIConfig,
12
- } from '../../../../../api/defaults/index';
6
+ } from '@webitel/ui-sdk/api/defaults/index';
13
7
  import applyTransform, {
14
8
  camelToSnake,
15
9
  merge,
@@ -17,7 +11,12 @@ import applyTransform, {
17
11
  skipIf,
18
12
  snakeToCamel,
19
13
  starToSearch,
20
- } from '../../../../../api/transformers/index';
14
+ } from '@webitel/ui-sdk/api/transformers/index';
15
+ import {
16
+ EngineCreatePresetQueryRequest,
17
+ EnginePresetQuery,
18
+ PresetQueryServiceApiFactory,
19
+ } from 'webitel-sdk';
21
20
 
22
21
  const instance = getDefaultInstance();
23
22
  const configuration = getDefaultOpenAPIConfig();
@@ -17,10 +17,9 @@
17
17
  </template>
18
18
 
19
19
  <script setup lang="ts">
20
+ import { WtLabel, WtTextarea } from '@webitel/ui-sdk/components';
20
21
  import { useI18n } from 'vue-i18n';
21
22
 
22
- import { WtLabel,WtTextarea } from '../../../../../../../components/index';
23
-
24
23
  const model = defineModel<string>();
25
24
 
26
25
  const props = defineProps<{
@@ -30,4 +29,4 @@ const props = defineProps<{
30
29
  const { t } = useI18n();
31
30
  </script>
32
31
 
33
- <style scoped lang="scss"></style>
32
+ <style scoped></style>
@@ -9,10 +9,9 @@
9
9
 
10
10
  <script setup lang="ts">
11
11
  import { Validation } from '@vuelidate/core';
12
+ import { WtInput } from '@webitel/ui-sdk/components';
12
13
  import { useI18n } from 'vue-i18n';
13
14
 
14
- import { WtInput } from '../../../../../../../components/index';
15
-
16
15
  type ModelValue = string;
17
16
 
18
17
  const model = defineModel<ModelValue>();
@@ -26,4 +25,4 @@ const props = defineProps<Props>();
26
25
  const { t } = useI18n();
27
26
  </script>
28
27
 
29
- <style scoped lang="scss"></style>
28
+ <style scoped></style>
@@ -25,9 +25,9 @@
25
25
  </template>
26
26
 
27
27
  <script setup lang="ts">
28
+ import { WtLabel } from '@webitel/ui-sdk/components';
28
29
  import { useI18n } from 'vue-i18n';
29
30
 
30
- import { WtLabel } from '../../../../../../components/index';
31
31
  import type { IFilter } from '../../../filters';
32
32
  import DynamicFilterPanelWrapper from '../../../filters/components/dynamic-filter-panel-wrapper.vue';
33
33
  import { FilterOptionToPreviewComponentMap } from '../../../filters/components/filter-options';
@@ -42,4 +42,4 @@ const props = defineProps<Props>();
42
42
  const { t } = useI18n();
43
43
  </script>
44
44
 
45
- <style scoped lang="scss"></style>
45
+ <style scoped></style>
@@ -68,20 +68,20 @@
68
68
  </template>
69
69
 
70
70
  <script lang="ts" setup>
71
- import { type StoreDefinition, storeToRefs } from 'pinia';
72
- import { computed, inject, onUnmounted,ref, watch } from 'vue';
73
- import { useI18n } from 'vue-i18n';
74
- import { EnginePresetQuery } from 'webitel-sdk';
75
-
76
71
  import {
77
72
  WtButton,
78
73
  WtEmpty,
79
74
  WtIconAction,
80
75
  WtPopup,
81
76
  WtSearchBar,
82
- } from '../../../../../../components/index';
83
- import { IconAction } from '../../../../../../enums';
84
- import { useTableEmpty } from '../../../../../TableComponentModule/composables/useTableEmpty';
77
+ } from '@webitel/ui-sdk/components';
78
+ import { IconAction } from '@webitel/ui-sdk/enums';
79
+ import { useTableEmpty } from '@webitel/ui-sdk/modules/TableComponentModule/composables/useTableEmpty';
80
+ import { type Store, storeToRefs } from 'pinia';
81
+ import { computed, inject, ref, watch } from 'vue';
82
+ import { useI18n } from 'vue-i18n';
83
+ import { EnginePresetQuery } from 'webitel-sdk';
84
+
85
85
  import PresetQueryAPI from '../../api/PresetQuery.api.ts';
86
86
  import PresetPreview from './preset-preview.vue';
87
87
 
@@ -90,7 +90,7 @@ const props = defineProps<{
90
90
  * presets "section" namespace
91
91
  */
92
92
  namespace: string;
93
- usePresetsStore: StoreDefinition;
93
+ usePresetsStore: Store;
94
94
  }>();
95
95
 
96
96
  const emit = defineEmits<{
@@ -104,7 +104,7 @@ const { t } = useI18n();
104
104
  const showPresetsList = ref(false);
105
105
 
106
106
  const presetsStore = props.usePresetsStore();
107
- const { dataList, error, isLoading, filtersManager, page } =
107
+ const { dataList, error, isLoading, filtersManager } =
108
108
  storeToRefs(presetsStore);
109
109
 
110
110
  const { loadDataList, initialize, updateSize, deleteEls } = presetsStore;
@@ -76,16 +76,16 @@
76
76
  <script lang="ts" setup>
77
77
  import { useVuelidate } from '@vuelidate/core';
78
78
  import { required } from '@vuelidate/validators';
79
- import { AxiosError } from 'axios';
80
- import { computed, ref } from 'vue';
81
- import { EnginePresetQuery } from 'webitel-sdk';
82
-
83
79
  import {
84
80
  WtExpansionPanel,
85
81
  WtIconAction,
86
82
  WtRadio,
87
- } from '../../../../../../components/index';
88
- import { createFiltersManager } from '../../../filters/index';
83
+ } from '@webitel/ui-sdk/components';
84
+ import { AxiosError } from 'axios';
85
+ import { computed, ref } from 'vue';
86
+ import { EnginePresetQuery } from 'webitel-sdk';
87
+
88
+ import { createFiltersManager } from '../../../filters';
89
89
  import PresetDescriptionField from '../_shared/input-fields/preset-description-field.vue';
90
90
  import PresetNameField from '../_shared/input-fields/preset-name-field.vue';
91
91
  import PresetFiltersPreview from '../_shared/preset-filters-preview.vue';
@@ -34,10 +34,10 @@
34
34
  </template>
35
35
 
36
36
  <script setup lang="ts">
37
+ import { WtPopup } from '@webitel/ui-sdk/components';
37
38
  import { ref } from 'vue';
38
39
  import { useI18n } from 'vue-i18n';
39
40
 
40
- import { WtPopup } from '../../../../../../components/index';
41
41
  import { SubmitConfig } from './save-preset-popup.vue';
42
42
 
43
43
  const emit = defineEmits<{
@@ -30,13 +30,13 @@
30
30
  </template>
31
31
 
32
32
  <script lang="ts" setup>
33
+ import { WtIconAction } from '@webitel/ui-sdk/components';
34
+ import { IconAction } from '@webitel/ui-sdk/enums';
33
35
  import { computed, inject, type Ref, ref } from 'vue';
34
36
  import { useI18n } from 'vue-i18n';
35
37
  import { EnginePresetQuery } from 'webitel-sdk';
36
38
 
37
- import { WtIconAction } from '../../../../../../components/index';
38
- import { IconAction } from '../../../../../../enums';
39
- import { IFiltersManager } from '../../../filters/index';
39
+ import { IFiltersManager } from '../../../filters';
40
40
  import {
41
41
  addPreset,
42
42
  getPresetList,
@@ -136,4 +136,4 @@ const handlePresetOverwriteConfirmation = async ({
136
136
  };
137
137
  </script>
138
138
 
139
- <style lang="scss" scoped></style>
139
+ <style scoped></style>
@@ -48,11 +48,11 @@
48
48
  <script setup lang="ts">
49
49
  import { useVuelidate } from '@vuelidate/core';
50
50
  import { required } from '@vuelidate/validators';
51
+ import { WtPopup } from '@webitel/ui-sdk/components';
51
52
  import { computed, reactive, ref } from 'vue';
52
53
  import { useI18n } from 'vue-i18n';
53
54
  import { EnginePresetQuery } from 'webitel-sdk';
54
55
 
55
- import { WtPopup } from '../../../../../../components/index';
56
56
  import type { IFiltersManager } from '../../../index';
57
57
  import PresetDescriptionField from '../_shared/input-fields/preset-description-field.vue';
58
58
  import PresetNameField from '../_shared/input-fields/preset-name-field.vue';
@@ -1,4 +1,5 @@
1
- import { isEmpty } from '../../../../../scripts';
1
+ import { isEmpty } from '@webitel/ui-sdk/scripts';
2
+
2
3
  import {
3
4
  filterLabelToSnapshotKey,
4
5
  filterNameFromSnapshotKey,
@@ -10,11 +10,10 @@
10
10
  <script setup lang="ts">
11
11
  import { useVuelidate } from '@vuelidate/core';
12
12
  import { maxLength } from '@vuelidate/validators';
13
+ import { WtInput } from '@webitel/ui-sdk/components';
13
14
  import { computed, watch } from 'vue';
14
15
  import { useI18n } from 'vue-i18n';
15
16
 
16
- import WtInput from '../../../../../../components/wt-input/wt-input.vue';
17
-
18
17
  const MAX_STRING_LENGTH = 50;
19
18
 
20
19
  const model = defineModel<string>();
@@ -47,4 +46,4 @@ watch(
47
46
  );
48
47
  </script>
49
48
 
50
- <style scoped lang="scss"></style>
49
+ <style scoped></style>
@@ -16,11 +16,20 @@
16
16
  v-bind="{
17
17
  filterName,
18
18
  filterValue,
19
- inputLabel: t('webitelUI.filters.filterValue'),
20
- onValueChange: (v) => (filterValue = v),
21
- onValueInvalidChange: (v) => (invalid = v),
19
+ inputLabel: valueInputLabelText,
20
+ onValueChange,
21
+ onValueInvalidChange,
22
22
  }"
23
- />
23
+ >
24
+ <component
25
+ :is="FilterOptionToValueComponentMap[filterName]"
26
+ :key="filterName"
27
+ :model-value="filterValue"
28
+ :label="valueInputLabelText"
29
+ @update:model-value="onValueChange"
30
+ @update:invalid="onValueInvalidChange"
31
+ />
32
+ </slot>
24
33
 
25
34
  <dynamic-filter-config-form-label
26
35
  :value="filterLabel"
@@ -49,20 +58,19 @@
49
58
  </template>
50
59
 
51
60
  <script lang="ts" setup>
61
+ import { WtButton, WtSelect } from '@webitel/ui-sdk/components';
52
62
  import deepcopy from 'deep-copy';
53
- import { ref, watch } from 'vue';
63
+ import { computed, ref, watch } from 'vue';
54
64
  import { useI18n } from 'vue-i18n';
55
65
 
56
- import WtButton from '../../../../../../components/wt-button/wt-button.vue';
57
- import WtSelect from '../../../../../../components/wt-select/wt-select.vue';
58
- import type { FilterInitParams, FilterName, IFilter } from '../../types/Filter';
66
+ import type {
67
+ FilterInitParams,
68
+ FilterNameSelectRepresentation,
69
+ IFilter,
70
+ } from '../../types/Filter';
71
+ import { FilterOptionToValueComponentMap } from '../filter-options';
59
72
  import DynamicFilterConfigFormLabel from './dynamic-filter-config-form-label.vue';
60
73
 
61
- interface FilterNameSelectRepresentation {
62
- name: string;
63
- value: FilterName;
64
- }
65
-
66
74
  interface AddModeProps {
67
75
  options: Array<FilterNameSelectRepresentation>;
68
76
  }
@@ -90,6 +98,18 @@ const editMode = !!props.filter;
90
98
 
91
99
  const invalid = ref(false);
92
100
 
101
+ const onValueChange = (v) => {
102
+ filterValue.value = v;
103
+ };
104
+
105
+ const onValueInvalidChange = (v) => {
106
+ invalid.value = v;
107
+ };
108
+
109
+ const valueInputLabelText = computed(() => {
110
+ return t('webitelUI.filters.filterValue');
111
+ });
112
+
93
113
  const onLabelValueUpdate = (val: string) => {
94
114
  filterLabel.value = val;
95
115
  };
@@ -8,13 +8,13 @@
8
8
  <template #activator="slotScope">
9
9
  <slot
10
10
  name="activator"
11
- v-bind="slotScope"
11
+ v-bind="{ tooltipSlotScope: slotScope }"
12
12
  />
13
13
  </template>
14
14
  <template #default="slotScope">
15
15
  <slot
16
16
  name="content"
17
- v-bind="slotScope"
17
+ v-bind="{ tooltipSlotScope: slotScope }"
18
18
  />
19
19
  </template>
20
20
  </wt-tooltip>
@@ -27,7 +27,7 @@
27
27
  * and their styling
28
28
  */
29
29
 
30
- import WtTooltip from '../../../../../../components/wt-tooltip/wt-tooltip.vue';
30
+ import { WtTooltip } from '@webitel/ui-sdk/components';
31
31
 
32
32
  interface Props {
33
33
  disabled?: boolean;
@@ -37,4 +37,4 @@ interface Props {
37
37
  const props = defineProps<Props>();
38
38
  </script>
39
39
 
40
- <style lang="scss" scoped></style>
40
+ <style scoped></style>
@@ -12,30 +12,52 @@
12
12
  </div>
13
13
  </template>
14
14
 
15
- <template #content="slotScope">
15
+ <template #content="{ tooltipSlotScope }">
16
16
  <slot
17
17
  name="form"
18
- v-bind="slotScope"
18
+ v-bind="{ tooltipSlotScope }"
19
19
  >
20
- filter form should be here
20
+ <dynamic-filter-config-form
21
+ :options="props.filterOptions"
22
+ @cancel="() => tooltipSlotScope.hide()"
23
+ @submit="
24
+ (payload) =>
25
+ submitFilterChange(payload, { hide: tooltipSlotScope.hide })
26
+ "
27
+ />
21
28
  </slot>
22
29
  </template>
23
30
  </dynamic-filter-config-view>
24
31
  </template>
25
32
 
26
33
  <script lang="ts" setup>
34
+ import { WtIconAction } from '@webitel/ui-sdk/components';
27
35
  import { useI18n } from 'vue-i18n';
28
36
 
29
- import WtIconAction from '../../../../../components/wt-icon-action/wt-icon-action.vue';
37
+ import type {
38
+ FilterInitParams,
39
+ FilterNameSelectRepresentation,
40
+ } from '../types/Filter';
41
+ import DynamicFilterConfigForm from './config/dynamic-filter-config-form.vue';
30
42
  import DynamicFilterConfigView from './config/dynamic-filter-config-view.vue';
31
43
 
32
44
  interface Props {
45
+ filterOptions: FilterNameSelectRepresentation[];
33
46
  showLabel?: boolean;
34
47
  }
35
48
 
36
49
  const props = defineProps<Props>();
37
50
 
38
51
  const { t } = useI18n();
52
+
53
+ const emit = defineEmits<{
54
+ 'add:filter': [FilterInitParams];
55
+ }>();
56
+
57
+ const submitFilterChange = (payload: FilterInitParams, { hide }) => {
58
+ emit('add:filter', payload);
59
+ hide();
60
+ };
39
61
  </script>
40
62
 
41
63
  <style lang="scss" scoped>
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
 
16
16
  <script setup lang="ts">
17
- import { ComponentSize } from '../../../../../enums';
17
+ import { ComponentSize } from '@webitel/ui-sdk/enums';
18
18
 
19
19
  const props = withDefaults(
20
20
  defineProps<{
@@ -18,11 +18,10 @@
18
18
  </template>
19
19
 
20
20
  <script lang="ts" setup>
21
+ import { WtSearchBar } from '@webitel/ui-sdk/components';
21
22
  import { computed } from 'vue';
22
23
  import { useI18n } from 'vue-i18n';
23
24
 
24
- import WtSearchBar from '../../../../../components/wt-search-bar/wt-search-bar.vue';
25
-
26
25
  type ModelValue = string;
27
26
  const model = defineModel<ModelValue>();
28
27
 
@@ -58,4 +57,4 @@ const searchModeOptions = computed(() =>
58
57
  );
59
58
  </script>
60
59
 
61
- <style lang="scss" scoped></style>
60
+ <style scoped></style>
@@ -13,10 +13,10 @@
13
13
  </template>
14
14
 
15
15
  <script lang="ts" setup>
16
+ import { WtSelect } from '@webitel/ui-sdk/components';
16
17
  import { computed, useAttrs } from 'vue';
17
18
  import { useI18n } from 'vue-i18n';
18
19
 
19
- import WtSelect from '../../../../../../../../components/wt-select/wt-select.vue';
20
20
  import { BooleanOptions } from '../../../../enums/boolean-options';
21
21
 
22
22
  const model = defineModel<boolean | null>();
@@ -35,4 +35,4 @@ const strModel = computed({
35
35
  });
36
36
  </script>
37
37
 
38
- <style lang="scss" scoped></style>
38
+ <style scoped></style>
@@ -15,4 +15,4 @@ type ModelValue = {
15
15
  const model = defineModel<ModelValue>();
16
16
  </script>
17
17
 
18
- <style lang="scss" scoped></style>
18
+ <style scoped></style>
@@ -15,4 +15,4 @@ type ModelValue = {
15
15
  const model = defineModel<ModelValue>();
16
16
  </script>
17
17
 
18
- <style lang="scss" scoped></style>
18
+ <style scoped></style>
@@ -14,10 +14,10 @@
14
14
  <script lang="ts" setup>
15
15
  import { useVuelidate } from '@vuelidate/core';
16
16
  import { required } from '@vuelidate/validators';
17
+ import { WtSelect } from '@webitel/ui-sdk/components';
17
18
  import { computed, watch } from 'vue';
18
19
  import { useI18n } from 'vue-i18n';
19
20
 
20
- import WtSelect from '../../../../../../../components/wt-select/wt-select.vue';
21
21
  import { searchMethod } from './config.js';
22
22
 
23
23
  type ModelValue = number[];
@@ -55,4 +55,4 @@ const handleInput = (value: ModelValue) => {
55
55
  };
56
56
  </script>
57
57
 
58
- <style lang="scss" scoped></style>
58
+ <style scoped></style>
@@ -28,4 +28,4 @@ const getLocalValue = async () => {
28
28
  getLocalValue();
29
29
  </script>
30
30
 
31
- <style lang="scss" scoped></style>
31
+ <style scoped></style>
@@ -1,4 +1,4 @@
1
- import AgentsAPI from '../../../../../../../api/clients/agents/agents.js';
1
+ import AgentsAPI from '@webitel/ui-sdk/api/clients/agents/agents';
2
2
 
3
3
  export const searchMethod = AgentsAPI.getLookup;
4
4
  export const localePath = '';
@@ -15,10 +15,10 @@
15
15
  <script lang="ts" setup>
16
16
  import { useVuelidate } from '@vuelidate/core';
17
17
  import { required } from '@vuelidate/validators';
18
+ import { WtSelect } from '@webitel/ui-sdk/components';
18
19
  import { computed, watch } from 'vue';
19
20
  import { useI18n } from 'vue-i18n';
20
21
 
21
- import WtSelect from '../../../../../../../components/wt-select/wt-select.vue';
22
22
  import { AmdResultOptions } from '../../../enums/amd-result-options';
23
23
 
24
24
  const model = defineModel<string>();
@@ -49,4 +49,4 @@ watch(
49
49
  );
50
50
  </script>
51
51
 
52
- <style lang="scss" scoped></style>
52
+ <style scoped></style>
@@ -15,4 +15,4 @@ const props = defineProps<{
15
15
  }>();
16
16
  </script>
17
17
 
18
- <style lang="scss" scoped></style>
18
+ <style scoped></style>
@@ -21,11 +21,10 @@
21
21
  <script lang="ts" setup>
22
22
  import { useVuelidate } from '@vuelidate/core';
23
23
  import { requiredIf } from '@vuelidate/validators';
24
+ import { WtCheckbox, WtSelect } from '@webitel/ui-sdk/components';
24
25
  import { computed, onMounted, watch } from 'vue';
25
26
  import { useI18n } from 'vue-i18n';
26
27
 
27
- import WtCheckbox from '../../../../../../../components/wt-checkbox/wt-checkbox.vue';
28
- import WtSelect from '../../../../../../../components/wt-select/wt-select.vue';
29
28
  import { searchMethod } from './config.js';
30
29
 
31
30
  type ModelValue = {
@@ -71,4 +70,4 @@ watch(
71
70
  );
72
71
  </script>
73
72
 
74
- <style lang="scss" scoped></style>
73
+ <style scoped></style>
@@ -33,4 +33,4 @@ const getLocalValue = async () => {
33
33
  getLocalValue();
34
34
  </script>
35
35
 
36
- <style lang="scss" scoped></style>
36
+ <style scoped></style>
@@ -1,4 +1,4 @@
1
- import ContactsAPI from '../../../../../../../api/clients/сontacts/contacts.js';
1
+ import ContactsAPI from '@webitel/ui-sdk/api/clients/сontacts/contacts';
2
2
 
3
3
  export const searchMethod = ContactsAPI.getLookup;
4
4
  export const localePath = '';
@@ -14,10 +14,10 @@
14
14
  <script lang="ts" setup>
15
15
  import { useVuelidate } from '@vuelidate/core';
16
16
  import { required } from '@vuelidate/validators';
17
+ import { WtSelect } from '@webitel/ui-sdk/components';
17
18
  import { computed, watch } from 'vue';
18
19
  import { useI18n } from 'vue-i18n';
19
20
 
20
- import WtSelect from '../../../../../../../components/wt-select/wt-select.vue';
21
21
  import { searchMethod } from './config.js';
22
22
 
23
23
  type ModelValue = number[];
@@ -53,4 +53,4 @@ const handleInput = (value: ModelValue) => {
53
53
  };
54
54
  </script>
55
55
 
56
- <style lang="scss" scoped></style>
56
+ <style scoped></style>
@@ -28,4 +28,4 @@ const getLocalValue = async () => {
28
28
  getLocalValue();
29
29
  </script>
30
30
 
31
- <style lang="scss" scoped></style>
31
+ <style scoped></style>
@@ -1,4 +1,4 @@
1
- import UsersAPI from '../../../../../../../api/clients/users/users.js';
1
+ import UsersAPI from '@webitel/ui-sdk/api/clients/users/users';
2
2
 
3
3
  export const searchMethod = UsersAPI.getLookup;
4
4
  export const localePath = '';
@@ -15,10 +15,10 @@
15
15
  <script lang="ts" setup>
16
16
  import { useVuelidate } from '@vuelidate/core';
17
17
  import { required } from '@vuelidate/validators';
18
+ import { WtSelect } from '@webitel/ui-sdk/components';
18
19
  import { computed, watch } from 'vue';
19
20
  import { useI18n } from 'vue-i18n';
20
21
 
21
- import WtSelect from '../../../../../../../components/wt-select/wt-select.vue';
22
22
  import { HangupCauseOptions } from '../../../enums/hangup-cause-options';
23
23
 
24
24
  const model = defineModel<string>();
@@ -49,4 +49,4 @@ watch(
49
49
  );
50
50
  </script>
51
51
 
52
- <style lang="scss" scoped></style>
52
+ <style scoped></style>
@@ -15,4 +15,4 @@ const props = defineProps<{
15
15
  }>();
16
16
  </script>
17
17
 
18
- <style lang="scss" scoped></style>
18
+ <style scoped></style>