@webitel/ui-sdk 3.1.91 → 3.1.93

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": "@webitel/ui-sdk",
3
- "version": "3.1.91",
3
+ "version": "3.1.93",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -18,19 +18,29 @@
18
18
  {{ $t('webitelUI.tableColumnSelect.title') }}
19
19
  </template>
20
20
  <template v-slot:main>
21
- <ul class="wt-table-column-select__popup__list">
22
- <li
23
- v-for="(col, key) of changeableDraft"
24
- :key="key"
25
- class="wt-table-column-select__popup__item"
26
- @click.capture.prevent="col.show = !col.show"
21
+ <div class="wt-table-column-select__popup-list-wrap">
22
+ <ul
23
+ class="wt-table-column-select__popup-list"
24
+ :class="{
25
+ 'wt-table-column-select__popup-list--md':
26
+ changeableDraft.length > 20 && changeableDraft.length <= 30,
27
+ 'wt-table-column-select__popup-list--lg':
28
+ changeableDraft.length > 30
29
+ }"
27
30
  >
28
- <wt-checkbox
29
- v-model="col.show"
30
- :label="shownColLabel(col)"
31
- ></wt-checkbox>
32
- </li>
33
- </ul>
31
+ <li
32
+ v-for="(column, key) of changeableDraft"
33
+ :key="key"
34
+ class="wt-table-column-select__popup-item"
35
+ @click.capture.prevent="column.show = !column.show"
36
+ >
37
+ <wt-checkbox
38
+ v-model="column.show"
39
+ :label="shownColLabel(column)"
40
+ ></wt-checkbox>
41
+ </li>
42
+ </ul>
43
+ </div>
34
44
  </template>
35
45
  <template v-slot:actions>
36
46
  <wt-button
@@ -84,7 +94,10 @@ export default {
84
94
  },
85
95
  computed: {
86
96
  changeableDraft() {
87
- return this.draft.filter((header) => !this.staticHeaders.includes(header.value));
97
+ return this.draft.filter((header) => !this.staticHeaders.includes(header.value)).sort((a, b) => {
98
+ return a.text.localeCompare(b.text);
99
+ // sorting headers for alphabet just in popup
100
+ });
88
101
  },
89
102
  },
90
103
  methods: {
@@ -112,18 +125,53 @@ export default {
112
125
  </script>
113
126
 
114
127
  <style lang="scss" scoped>
128
+ $list-height: 400px;
129
+ $list-width-sm: calc(500px - var(--spacing-xl)); // all popup width - (paddings + overflow-padding)
130
+ $list-width-md: calc(800px - var(--spacing-xl)); // all popup width - (paddings + overflow-padding)
131
+
115
132
  .wt-table-column-select {
116
- line-height: 0; // prevent 24x28 icon heght :/
133
+ line-height: 0; // prevent 24x28 icon height :/
117
134
  }
135
+ .wt-table-column-select {
136
+ &__heading {
137
+ text-align: center;
138
+ }
118
139
 
119
- .wt-table-column-select__popup__list {
120
- @extend %wt-scrollbar;
121
- overflow: auto;
122
- width: 550px; // fixme popup fixed sizes
123
- max-height: 35vh; // fixme popup fixed sizes
124
- }
140
+ &__popup-list-wrap {
141
+ max-height: $list-height;
142
+ }
143
+
144
+ &__popup-list {
145
+ @extend %wt-scrollbar;
146
+ max-height: $list-height;
147
+ width: $list-width-sm;
148
+ display: flex;
149
+ flex-direction: column;
150
+ flex-wrap: wrap;
151
+ overflow-x: hidden;
125
152
 
126
- .wt-table-column-select__popup__item {
127
- margin-bottom: var(--spacing-xs);
153
+ // for 20-30 items
154
+ &--md {
155
+ width: $list-width-md;
156
+ }
157
+
158
+ // for 30+ items
159
+ &--lg {
160
+ width: $list-width-md;
161
+ max-height: none;
162
+ display: block;
163
+ column-count: 3;
164
+ overflow-y: auto;
165
+ }
166
+ }
167
+
168
+ &__popup-item {
169
+ display: flex;
170
+ align-items: center;
171
+ margin-right: var(--spacing-sm);
172
+ margin-bottom: var(--spacing-sm);
173
+ }
128
174
  }
175
+
129
176
  </style>
177
+
@@ -0,0 +1,5 @@
1
+ const CrmSections = Object.freeze({
2
+ CONTACTS: 'contacts',
3
+ });
4
+
5
+ export default CrmSections;
@@ -5,6 +5,7 @@ const WebitelApplications = Object.freeze({
5
5
  HISTORY: 'history',
6
6
  AUDIT: 'audit',
7
7
  ANALYTICS: 'grafana',
8
+ CRM: 'crm',
8
9
  });
9
10
 
10
11
  export default WebitelApplications;
@@ -9,6 +9,7 @@ import { QueueType } from 'webitel-sdk/esm2015/enums';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
12
+ import CrmSections from '../../enums/WebitelApplications/CrmSections.enum';
12
13
  import SupervisorSections
13
14
  from '../../enums/WebitelApplications/SupervisorSections.enum';
14
15
  import WebitelApplications
@@ -166,6 +167,12 @@ export default {
166
167
  [AuditorSections.SCORECARDS]: 'Scorecards',
167
168
  },
168
169
  },
170
+ [WebitelApplications.CRM]: {
171
+ name: 'CRM',
172
+ sections: {
173
+ [CrmSections.CONTACTS]: 'Contacts',
174
+ },
175
+ },
169
176
  [WebitelApplications.HISTORY]: { name: 'Call History' },
170
177
  [WebitelApplications.ANALYTICS]: { name: 'Data Visualisation Tool' },
171
178
  [WebitelApplications.SUPERVISOR]: {
@@ -9,6 +9,7 @@ import { QueueType } from 'webitel-sdk/esm2015/enums';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
12
+ import CrmSections from '../../enums/WebitelApplications/CrmSections.enum';
12
13
  import SupervisorSections
13
14
  from '../../enums/WebitelApplications/SupervisorSections.enum';
14
15
  import WebitelApplications
@@ -165,6 +166,12 @@ export default {
165
166
  [AuditorSections.SCORECARDS]: 'Анкеты',
166
167
  },
167
168
  },
169
+ [WebitelApplications.CRM]: {
170
+ name: 'CRM',
171
+ sections: {
172
+ [CrmSections.CONTACTS]: 'Контакты',
173
+ },
174
+ },
168
175
  [WebitelApplications.HISTORY]: { name: 'Call History' },
169
176
  [WebitelApplications.ANALYTICS]: { name: 'Data Visualisation Tool' },
170
177
  [WebitelApplications.SUPERVISOR]: {
@@ -9,6 +9,7 @@ import { QueueType } from 'webitel-sdk/esm2015/enums';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
12
+ import CrmSections from '../../enums/WebitelApplications/CrmSections.enum';
12
13
  import SupervisorSections
13
14
  from '../../enums/WebitelApplications/SupervisorSections.enum';
14
15
  import WebitelApplications
@@ -165,6 +166,12 @@ export default {
165
166
  [AuditorSections.SCORECARDS]: 'Анкети',
166
167
  },
167
168
  },
169
+ [WebitelApplications.CRM]: {
170
+ name: 'CRM',
171
+ sections: {
172
+ [CrmSections.CONTACTS]: 'Контакти',
173
+ },
174
+ },
168
175
  [WebitelApplications.HISTORY]: { name: 'Call History' },
169
176
  [WebitelApplications.ANALYTICS]: { name: 'Data Visualisation Tool' },
170
177
  [WebitelApplications.SUPERVISOR]: {
@@ -1,5 +1,6 @@
1
1
  import deepmerge from 'deepmerge';
2
2
  import deepCopy from 'deep-copy';
3
+ import CrmSections from '../../../enums/WebitelApplications/CrmSections.enum';
3
4
  import WebitelApplications from '../../../enums/WebitelApplications/WebitelApplications.enum';
4
5
  import SupervisorSections from '../../../enums/WebitelApplications/SupervisorSections.enum';
5
6
  import AdminSections from '../../../enums/WebitelApplications/AdminSections.enum';
@@ -159,6 +160,14 @@ const applicationsAccess = (value = true) => ({
159
160
  _locale: `WebitelApplications.${WebitelApplications.AUDIT}.sections.${AuditorSections.SCORECARDS}`,
160
161
  },
161
162
  },
163
+ [WebitelApplications.CRM]: {
164
+ _enabled: value,
165
+ _locale: `WebitelApplications.${WebitelApplications.CRM}.name`,
166
+ [CrmSections.CONTACTS]: {
167
+ _enabled: value,
168
+ _locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSections.CONTACTS}`,
169
+ },
170
+ },
162
171
  });
163
172
 
164
173
  /**