@webitel/ui-sdk 0.1.11 → 0.1.112

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 (254) hide show
  1. package/README.md +29 -29
  2. package/dist/img/plyr.svg +70 -0
  3. package/dist/img/svg-sprites/attach.svg +4 -0
  4. package/dist/img/svg-sprites/index.js +1 -0
  5. package/dist/img/svg-sprites/wt-icon.svg +880 -0
  6. package/dist/ui-sdk.common.js +8287 -4335
  7. package/dist/ui-sdk.common.js.map +1 -1
  8. package/dist/ui-sdk.css +1 -1
  9. package/dist/ui-sdk.umd.js +8287 -4335
  10. package/dist/ui-sdk.umd.js.map +1 -1
  11. package/dist/ui-sdk.umd.min.js +3 -1
  12. package/dist/ui-sdk.umd.min.js.map +1 -1
  13. package/package.json +62 -41
  14. package/src/components/atoms/wt-badge/__tests__/WtBadge.spec.js +19 -0
  15. package/src/components/atoms/wt-badge/wt-badge.vue +23 -0
  16. package/src/components/atoms/wt-button/__tests__/WtButton.spec.js +29 -0
  17. package/src/components/atoms/wt-button/wt-button.vue +212 -0
  18. package/src/components/atoms/wt-divider/__tests__/WtDivider.spec.js +9 -0
  19. package/src/components/atoms/wt-divider/wt-divider.vue +25 -0
  20. package/src/components/atoms/wt-icon/__tests__/WtIcon.spec.js +24 -0
  21. package/src/components/atoms/wt-icon/wt-icon.vue +138 -0
  22. package/src/components/atoms/wt-indicator/__tests__/WtIndicator.spec.js +29 -0
  23. package/src/components/atoms/wt-indicator/wt-indicator.vue +81 -0
  24. package/src/components/atoms/wt-input-info/__tests__/WtInputInfo.spec.js +9 -0
  25. package/src/components/atoms/wt-input-info/wt-input-info.vue +35 -0
  26. package/src/components/atoms/wt-loader/__tests__/WtLoader.spec.js +9 -0
  27. package/src/components/atoms/wt-loader/_internals/wt-loader--md.vue +83 -0
  28. package/src/components/atoms/wt-loader/_internals/wt-loader--sm.vue +189 -0
  29. package/src/components/atoms/wt-loader/wt-loader.vue +34 -0
  30. package/src/components/atoms/wt-rounded-action/__tests__/WtRoundedAction.spec.js +20 -0
  31. package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +227 -0
  32. package/src/components/atoms/wt-tooltip/__tests__/WtTooltip.spec.js +29 -0
  33. package/src/components/atoms/wt-tooltip/wt-tooltip.vue +54 -0
  34. package/src/components/index.js +98 -0
  35. package/src/components/molecules/wt-checkbox/__tests__/WtCheckbox.spec.js +41 -0
  36. package/src/components/molecules/wt-checkbox/wt-checkbox.vue +175 -0
  37. package/src/components/molecules/wt-datepicker/__tests__/WtDatepicker.spec.js +28 -0
  38. package/src/components/molecules/wt-datepicker/wt-datepicker.vue +209 -0
  39. package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +67 -0
  40. package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +314 -0
  41. package/src/components/molecules/wt-icon-btn/__tests__/WtIconBtn.spec.js +31 -0
  42. package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +113 -0
  43. package/src/components/molecules/wt-input/__tests__/WtInput.spec.js +25 -0
  44. package/src/components/molecules/wt-input/wt-input.vue +316 -0
  45. package/src/components/molecules/wt-label/__tests__/WtLabel.spec.js +9 -0
  46. package/src/components/molecules/wt-label/wt-label.vue +87 -0
  47. package/src/components/molecules/wt-notification/__tests__/WtNotification.spec.js +21 -0
  48. package/src/components/molecules/wt-notification/wt-notification.vue +74 -0
  49. package/src/components/molecules/wt-popup/__tests__/WtPopup.spec.js +47 -0
  50. package/src/components/molecules/wt-popup/wt-popup.vue +130 -0
  51. package/src/components/molecules/wt-progress-bar/__tests__/WtProgressBar.spec.js +17 -0
  52. package/src/components/molecules/wt-progress-bar/wt-progress-bar.vue +80 -0
  53. package/src/components/molecules/wt-radio/__tests__/WtRadio.spec.js +42 -0
  54. package/src/components/molecules/wt-radio/wt-radio.vue +168 -0
  55. package/src/components/molecules/wt-search-bar/__tests__/WtSearchBar.spec.js +36 -0
  56. package/src/components/molecules/wt-search-bar/wt-search-bar.vue +203 -0
  57. package/src/components/molecules/wt-select/__tests__/WtSelect.spec.js +53 -0
  58. package/src/components/molecules/wt-select/wt-select.vue +492 -0
  59. package/src/components/molecules/wt-slider/__tests__/WtSlider.spec.js +9 -0
  60. package/src/components/molecules/wt-slider/wt-slider.vue +175 -0
  61. package/src/components/molecules/wt-switcher/__tests__/WtSwitcher.spec.js +31 -0
  62. package/src/components/molecules/wt-switcher/wt-switcher.vue +177 -0
  63. package/src/components/molecules/wt-tabs/__tests__/WtTabs.spec.js +36 -0
  64. package/src/components/molecules/wt-tabs/wt-tabs.vue +127 -0
  65. package/src/components/molecules/wt-tags-input/__tests__/WtTagsInput.spec.js +45 -0
  66. package/src/components/molecules/wt-tags-input/wt-tags-input.vue +295 -0
  67. package/src/components/molecules/wt-textarea/__tests__/WtTextarea.spec.js +46 -0
  68. package/src/components/molecules/wt-textarea/wt-textarea.vue +185 -0
  69. package/src/components/molecules/wt-time-input/__tests__/WtTimeInput.spec.js +25 -0
  70. package/src/components/molecules/wt-time-input/wt-time-input.vue +192 -0
  71. package/src/components/molecules/wt-timepicker/__tests__/WtTimepicker.spec.js +60 -0
  72. package/src/components/molecules/wt-timepicker/wt-timepicker.vue +176 -0
  73. package/src/components/organisms/wt-app-header/__tests__/WtAppHeader.spec.js +19 -0
  74. package/src/components/organisms/wt-app-header/__tests__/WtAppNavigator.spec.js +23 -0
  75. package/src/components/organisms/wt-app-header/__tests__/WtHeaderActions.spec.js +21 -0
  76. package/src/components/organisms/wt-app-header/wt-app-header.vue +23 -0
  77. package/src/components/organisms/wt-app-header/wt-app-navigator.vue +245 -0
  78. package/src/components/organisms/wt-app-header/wt-header-actions.vue +177 -0
  79. package/src/components/organisms/wt-error-page/__tests__/wt-error-page.spec.js +17 -0
  80. package/src/components/organisms/wt-error-page/wt-error-page.vue +104 -0
  81. package/src/components/organisms/wt-filters-panel-wrapper/__tests__/wt-filters-panel-wrapper.spec.js +24 -0
  82. package/src/components/organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +146 -0
  83. package/src/components/organisms/wt-headline/__tests__/WtHeadline.spec.js +47 -0
  84. package/src/components/organisms/wt-headline/wt-headline.vue +46 -0
  85. package/src/components/organisms/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +64 -0
  86. package/src/components/organisms/wt-navigation-bar/wt-navigation-bar.vue +249 -0
  87. package/src/components/organisms/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +50 -0
  88. package/src/components/organisms/wt-notifications-bar/wt-notifications-bar.vue +71 -0
  89. package/src/components/organisms/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +33 -0
  90. package/src/components/organisms/wt-page-wrapper/wt-page-wrapper.vue +60 -0
  91. package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +38 -0
  92. package/src/components/organisms/wt-pagination/wt-pagination.vue +134 -0
  93. package/src/components/organisms/wt-player/__tests__/WtPlayer.spec.js +9 -0
  94. package/src/components/organisms/wt-player/wt-player.vue +116 -0
  95. package/src/components/organisms/wt-status-select/__tests__/WtStatusSelect.spec.js +25 -0
  96. package/src/components/organisms/wt-status-select/_internals/StatusOptions.lookup.js +24 -0
  97. package/src/components/organisms/wt-status-select/wt-status-select.vue +110 -0
  98. package/src/components/organisms/wt-table/__tests__/WtTable.spec.js +133 -0
  99. package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +9 -0
  100. package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +9 -0
  101. package/src/components/organisms/wt-table/_internals/getSortOrder.js +12 -0
  102. package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +18 -0
  103. package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +19 -0
  104. package/src/components/organisms/wt-table/wt-table.vue +241 -0
  105. package/src/components/organisms/wt-table-actions/__tests__/WtTableActions.spec.js +9 -0
  106. package/src/components/organisms/wt-table-actions/wt-table-actions.vue +90 -0
  107. package/src/components/organisms/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +31 -0
  108. package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +113 -0
  109. package/src/components/transitions/__tests__/ExpandTransition.spec.js +9 -0
  110. package/src/components/transitions/expand-transition.vue +70 -0
  111. package/src/css/colors/_colors.scss +151 -67
  112. package/src/css/components/_components.scss +38 -25
  113. package/src/css/components/atoms/wt-badge/_variables.scss +6 -5
  114. package/src/css/components/atoms/wt-badge/wt-badge.scss +36 -8
  115. package/src/css/components/atoms/wt-button/_variables.scss +46 -46
  116. package/src/css/components/atoms/wt-divider/_variables.scss +4 -4
  117. package/src/css/components/atoms/wt-icon/_variables.scss +7 -28
  118. package/src/css/components/atoms/wt-indicator/_variables.scss +18 -0
  119. package/src/css/components/atoms/wt-input-info/_variables.scss +6 -5
  120. package/src/css/components/atoms/wt-label/_variables.scss +4 -4
  121. package/src/css/components/atoms/wt-loader/_variables.scss +7 -7
  122. package/src/css/components/atoms/wt-rounded-action/_variables.scss +30 -0
  123. package/src/css/components/atoms/wt-tooltip/_variables.scss +9 -9
  124. package/src/css/components/molecules/wt-checkbox/_variables.scss +3 -3
  125. package/src/css/components/molecules/wt-datepicker/_variables.scss +19 -19
  126. package/src/css/components/molecules/wt-datepicker/datepicker-calendar.scss +100 -100
  127. package/src/css/components/molecules/wt-datetimepicker/_variables.scss +11 -11
  128. package/src/css/components/molecules/wt-icon-btn/_variables.scss +2 -2
  129. package/src/css/components/molecules/wt-input/_variables.scss +5 -5
  130. package/src/css/components/molecules/wt-notification/_variables.scss +9 -9
  131. package/src/css/components/molecules/wt-popup/_variables.scss +11 -10
  132. package/src/css/components/molecules/wt-progress-bar/_variables.scss +11 -0
  133. package/src/css/components/molecules/wt-radio/_variables.scss +6 -6
  134. package/src/css/components/molecules/wt-search-bar/_variables.scss +3 -3
  135. package/src/css/components/molecules/wt-select/_variables.scss +24 -22
  136. package/src/css/components/molecules/wt-slider/_variables.scss +15 -0
  137. package/src/css/components/molecules/wt-switcher/_variables.scss +17 -14
  138. package/src/css/components/molecules/wt-tabs/_variables.scss +13 -13
  139. package/src/css/components/molecules/wt-tags-input/_variables.scss +25 -0
  140. package/src/css/components/molecules/wt-textarea/_variables.scss +4 -4
  141. package/src/css/components/molecules/wt-timepicker/_variables.scss +4 -3
  142. package/src/css/components/organisms/wt-app-header/_variables.scss +20 -0
  143. package/src/css/components/organisms/wt-headline/_variables.scss +7 -0
  144. package/src/css/components/organisms/wt-navigation-bar/_variables.scss +14 -0
  145. package/src/css/components/organisms/wt-notifications-bar/_variables.scss +7 -0
  146. package/src/css/components/organisms/wt-page-wrapper/_variables.scss +5 -0
  147. package/src/css/components/organisms/wt-pagination/_variables.scss +6 -6
  148. package/src/css/components/organisms/wt-status-select/_variables.scss +6 -0
  149. package/src/css/components/organisms/wt-table/_variables.scss +16 -0
  150. package/src/css/components/organisms/wt-table-actions/_variables.scss +4 -0
  151. package/src/css/display-helpers/_display-helpers.scss +21 -0
  152. package/src/css/fonts/_fonts.scss +9 -0
  153. package/src/css/main.scss +68 -65
  154. package/src/css/shadows/_shadows.scss +7 -0
  155. package/src/css/sizes/_sizes.scss +2 -0
  156. package/src/css/sizes/_spacing.scss +17 -0
  157. package/src/css/sizes/_viewport-breakpoints.scss +20 -0
  158. package/src/css/styleguide/{styleguide.scss → _styleguide.scss} +4 -3
  159. package/src/css/styleguide/scroll.scss +43 -40
  160. package/src/css/transitions/_transitions.scss +1 -0
  161. package/src/css/transitions/fade/_fade.scss +8 -0
  162. package/src/css/typography/_typography.scss +72 -72
  163. package/src/enums/AgentStatus/AgentStatus.enum.js +6 -0
  164. package/src/enums/WebitelApplications/AdminSections.enum.js +41 -0
  165. package/src/enums/WebitelApplications/SupervisorSections.enum.js +7 -0
  166. package/src/enums/WebitelApplications/WebitelApplications.enum.js +10 -0
  167. package/src/locale/en/en.js +135 -0
  168. package/src/locale/i18n.js +2 -0
  169. package/src/locale/ru/ru.js +135 -2
  170. package/src/locale/ua/ua.js +160 -0
  171. package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +57 -0
  172. package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +66 -0
  173. package/src/mixins/dataFilterMixins/__tests__/paginationFilterMixin.spec.js +93 -0
  174. package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +60 -0
  175. package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +48 -0
  176. package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +37 -0
  177. package/src/mixins/dataFilterMixins/apiFilterMixin.js +23 -0
  178. package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +29 -0
  179. package/src/mixins/dataFilterMixins/enumFilterMixin.js +30 -0
  180. package/src/mixins/dataFilterMixins/paginationFilterMixin.js +79 -0
  181. package/src/mixins/dataFilterMixins/sortFilterMixin.js +75 -0
  182. package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +47 -0
  183. package/src/mixins/validationMixin/validationMixin.js +40 -0
  184. package/src/modules/CSVExport/CSVExport.js +88 -0
  185. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +63 -0
  186. package/src/modules/CSVExport/mixins/exportCSVMixin.js +46 -0
  187. package/src/modules/FilesExport/FilesExport.js +110 -0
  188. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +66 -0
  189. package/src/modules/FilesExport/mixins/exportFilesMixin.js +46 -0
  190. package/src/modules/FilesExport/scripts/generateMediaURL.js +7 -0
  191. package/src/modules/QueryFilters/api/__tests__/defaults.spec.js +18 -0
  192. package/src/modules/QueryFilters/api/defaults.js +16 -0
  193. package/src/modules/QueryFilters/classes/ApiFilterSchema.js +32 -0
  194. package/src/modules/QueryFilters/classes/BaseFilterSchema.js +6 -0
  195. package/src/modules/QueryFilters/classes/EnumFilterSchema.js +23 -0
  196. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +25 -0
  197. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +54 -0
  198. package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +40 -0
  199. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +49 -0
  200. package/src/modules/QueryFilters/components/abstract-api-filter.vue +42 -0
  201. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +32 -0
  202. package/src/modules/QueryFilters/components/filter-search.vue +33 -0
  203. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +48 -0
  204. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +54 -0
  205. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +74 -0
  206. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +58 -0
  207. package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +48 -0
  208. package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +39 -0
  209. package/src/modules/QueryFilters/mixins/apiFilterMixin.js +36 -0
  210. package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +34 -0
  211. package/src/modules/QueryFilters/mixins/enumFilterMixin.js +36 -0
  212. package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +66 -0
  213. package/src/modules/QueryFilters/mixins/sortFilterMixin.js +56 -0
  214. package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +50 -0
  215. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +83 -0
  216. package/src/modules/QueryFilters/store/queryFilters.js +6 -0
  217. package/src/modules/Userinfo/api/BaseAPIService.js +7 -0
  218. package/src/modules/Userinfo/api/auth.js +29 -0
  219. package/src/modules/Userinfo/api/userinfo.js +32 -0
  220. package/src/modules/Userinfo/classes/ApplicationsAccess.js +170 -0
  221. package/src/modules/Userinfo/components/__tests__/auth.spec.js +57 -0
  222. package/src/modules/Userinfo/components/the-auth.vue +75 -0
  223. package/src/modules/Userinfo/store/UserinfoStoreModule.js +112 -0
  224. package/src/scripts/__tests__/caseConverters.spec.js +65 -0
  225. package/src/scripts/__tests__/convertDuration.spec.js +21 -0
  226. package/src/scripts/__tests__/debounce.spec.js +15 -0
  227. package/src/scripts/__tests__/editProxy.spec.js +9 -0
  228. package/src/scripts/__tests__/isEmpty.spec.js +16 -0
  229. package/src/scripts/__tests__/prettifyFileSize.spec.js +18 -0
  230. package/src/scripts/__tests__/prettifyTime.spec.js +18 -0
  231. package/src/scripts/__tests__/preventHiddenPageCallsDecorator.spec.js +16 -0
  232. package/src/scripts/__tests__/sortQueryAdapters.spec.js +12 -0
  233. package/src/scripts/caseConverters.js +78 -0
  234. package/src/scripts/convertDuration.js +15 -0
  235. package/src/scripts/editProxy.js +9 -0
  236. package/src/scripts/eventBus.js +4 -0
  237. package/src/scripts/isEmpty.js +9 -0
  238. package/src/scripts/prettifyFileSize.js +11 -0
  239. package/src/scripts/prettifyTime.js +9 -0
  240. package/src/scripts/preventHiddenPageCallsDecorator.js +6 -0
  241. package/src/scripts/sortQueryAdapters.js +21 -0
  242. package/src/store/BaseStoreModules/BaseStoreModule.js +49 -0
  243. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +104 -0
  244. package/src/store/helpers/__tests__/getNamespacedState.spec.js +11 -0
  245. package/src/store/helpers/getNamespacedState.js +5 -0
  246. package/dist/img/arrow-down--active--md.7b60f2fb6090366652124f77c543a516.svg +0 -3
  247. package/dist/img/arrow-down--disabled--md.f58424cd673258365e78863edd1e92cc.svg +0 -3
  248. package/dist/img/arrow-down--md.1843b60e1c244e066a650e8d19ea83c9.svg +0 -3
  249. package/dist/img/calendar--active--md.7fd3d949ec7234a4940ea452d95b4165.svg +0 -6
  250. package/dist/img/calendar--disabled--md.8e7a1e18f93ae8af270060400e6f881c.svg +0 -3
  251. package/dist/img/calendar--md.9c265581c3a405ff0f0e46e8092f36b8.svg +0 -6
  252. package/src/css/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  253. package/src/css/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
  254. package/src/css/fonts.scss +0 -9
package/package.json CHANGED
@@ -1,41 +1,62 @@
1
- {
2
- "name": "@webitel/ui-sdk",
3
- "version": "0.1.11",
4
- "private": false,
5
- "main": "./dist/@webitel/ui-sdk.common.js",
6
- "files": [
7
- "dist/*",
8
- "src/locale/*",
9
- "src/css/*",
10
- "src/scripts/*"
11
- ],
12
- "scripts": {
13
- "serve": "vue-cli-service serve",
14
- "build": "vue-cli-service build",
15
- "build-lib": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
16
- "test:unit": "vue-cli-service test:unit",
17
- "lint": "vue-cli-service lint --fix"
18
- },
19
- "dependencies": {
20
- "core-js": "^3.6.5",
21
- "vue": "^2.6.11",
22
- "vue-i18n": "^8.18.2",
23
- "vue-multiselect": "^2.1.6",
24
- "vuejs-datepicker": "^1.6.2"
25
- },
26
- "devDependencies": {
27
- "@vue/cli-plugin-babel": "~4.4.0",
28
- "@vue/cli-plugin-eslint": "~4.4.0",
29
- "@vue/cli-plugin-unit-jest": "~4.4.0",
30
- "@vue/cli-service": "~4.4.0",
31
- "@vue/eslint-config-airbnb": "^5.0.2",
32
- "@vue/test-utils": "^1.0.3",
33
- "babel-eslint": "^10.1.0",
34
- "eslint": "^6.7.2",
35
- "eslint-plugin-import": "^2.20.2",
36
- "eslint-plugin-vue": "^6.2.2",
37
- "node-sass": "^4.12.0",
38
- "sass-loader": "^8.0.2",
39
- "vue-template-compiler": "^2.6.11"
40
- }
41
- }
1
+ {
2
+ "name": "@webitel/ui-sdk",
3
+ "version": "0.1.112",
4
+ "private": false,
5
+ "scripts": {
6
+ "serve-lib": "vue-cli-service serve",
7
+ "build": "vue-cli-service build",
8
+ "test:unit": "vue-cli-service test:unit",
9
+ "lint": "vue-cli-service lint --fix",
10
+ "build-lib": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
11
+ "build-publish-lib": "npm run test:unit && npm run build-lib && npm publish --access public"
12
+ },
13
+ "main": "./dist/@webitel/ui-sdk.common.js",
14
+ "files": [
15
+ "dist/*",
16
+ "src/locale/*",
17
+ "src/css/*",
18
+ "src/components/*",
19
+ "src/enums/*",
20
+ "src/mixins/*",
21
+ "src/scripts/*",
22
+ "src/modules/*",
23
+ "src/store/*"
24
+ ],
25
+ "dependencies": {
26
+ "@johmun/vue-tags-input": "^2.1.0",
27
+ "bamboo-jest-reporter": "^1.0.3",
28
+ "core-js": "^3.6.5",
29
+ "csv-stringify": "^5.5.1",
30
+ "deep-copy": "^1.4.2",
31
+ "deep-equal": "^2.0.3",
32
+ "file-saver": "^2.0.2",
33
+ "jszip": "^3.5.0",
34
+ "jszip-utils": "^0.1.0",
35
+ "plyr": "3.6.2",
36
+ "sass": "^1.34.0",
37
+ "svg-sprite-loader": "^5.0.0",
38
+ "vue": "^2.6.11",
39
+ "vue-i18n": "^8.18.2",
40
+ "vue-multiselect": "^2.1.6",
41
+ "vue-router": "^3.2.0",
42
+ "vuejs-datepicker": "^1.6.2"
43
+ },
44
+ "devDependencies": {
45
+ "@testing-library/jest-dom": "^5.11.4",
46
+ "@vue/cli-plugin-babel": "~4.4.0",
47
+ "@vue/cli-plugin-eslint": "~4.4.0",
48
+ "@vue/cli-plugin-router": "^4.5.4",
49
+ "@vue/cli-plugin-unit-jest": "~4.4.0",
50
+ "@vue/cli-service": "~4.4.0",
51
+ "@vue/eslint-config-airbnb": "^5.0.2",
52
+ "@vue/test-utils": "^1.0.3",
53
+ "babel-eslint": "^10.1.0",
54
+ "eslint": "^6.7.2",
55
+ "eslint-plugin-import": "^2.20.2",
56
+ "eslint-plugin-vue": "^6.2.2",
57
+ "sass-loader": "^10.2.0",
58
+ "svg-url-loader": "^6.0.0",
59
+ "vue-template-compiler": "^2.6.11",
60
+ "vuex": "^3.6.2"
61
+ }
62
+ }
@@ -0,0 +1,19 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtBadge from '../wt-badge.vue';
3
+
4
+ describe('WtBadge', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtBadge);
7
+ expect(wrapper.classes('wt-badge')).toBe(true);
8
+ });
9
+
10
+ it('renders a badge content via default slot', () => {
11
+ const content = 'badge content';
12
+ const wrapper = shallowMount(WtBadge, {
13
+ slots: {
14
+ default: content,
15
+ },
16
+ });
17
+ expect(wrapper.find('.wt-badge').text()).toBe(content);
18
+ });
19
+ });
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <span class="wt-badge" :class="`wt-badge--${color}-color`">
3
+ <slot></slot>
4
+ </span>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'wt-badge',
10
+ props: {
11
+ color: {
12
+ type: String,
13
+ default: 'main',
14
+ options: ['main', 'outline', 'accent', 'secondary', 'success', 'danger', 'transfer'],
15
+ notes: '"main" and "outline" are badge-specific colors',
16
+ },
17
+ },
18
+ };
19
+ </script>
20
+
21
+ <style lang="scss" scoped>
22
+ @import '../../../css/components/atoms/wt-badge/wt-badge';
23
+ </style>
@@ -0,0 +1,29 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtButton from '../wt-button.vue';
3
+ import WtLoader from '../../wt-loader/wt-loader.vue';
4
+
5
+ describe('WtButton', () => {
6
+ it('renders a component', () => {
7
+ const wrapper = shallowMount(WtButton);
8
+ expect(wrapper.classes('wt-button')).toBe(true);
9
+ });
10
+
11
+ it('renders a button content via default slot', () => {
12
+ const content = 'button content';
13
+ const wrapper = shallowMount(WtButton, {
14
+ slots: {
15
+ default: content,
16
+ },
17
+ });
18
+ expect(wrapper.find('.wt-button').text()).toBe(content);
19
+ });
20
+
21
+ it('renders button spinner', () => {
22
+ const wrapper = shallowMount(WtButton, {
23
+ propsData: {
24
+ loading: true,
25
+ },
26
+ });
27
+ expect(wrapper.findComponent(WtLoader).exists()).toBe(true);
28
+ });
29
+ });
@@ -0,0 +1,212 @@
1
+ <template>
2
+ <button
3
+ class="wt-button"
4
+ :class="[
5
+ colorClass,
6
+ {
7
+ 'wt-button--outline': outline,
8
+ 'wt-button--wide': wide,
9
+ 'wt-button--large': large,
10
+ 'wt-button--disabled': disabled,
11
+ }
12
+ ]"
13
+ type="button"
14
+ :disabled="disabled"
15
+ @click="$emit('click', $event)"
16
+ >
17
+ <wt-loader v-if="loading" size="sm" :color="loaderColor"/>
18
+ <slot v-else></slot>
19
+ </button>
20
+ </template>
21
+
22
+ <script>
23
+
24
+ export default {
25
+ name: 'wt-button',
26
+ props: {
27
+ color: {
28
+ type: String,
29
+ default: '',
30
+ },
31
+ disabled: {
32
+ type: Boolean,
33
+ default: false,
34
+ },
35
+ large: {
36
+ type: Boolean,
37
+ default: false,
38
+ },
39
+ outline: {
40
+ type: Boolean,
41
+ default: false,
42
+ },
43
+ wide: {
44
+ type: Boolean,
45
+ default: false,
46
+ },
47
+ loading: {
48
+ type: Boolean,
49
+ default: false,
50
+ },
51
+ },
52
+ computed: {
53
+ colorClass() {
54
+ if (!this.disabled) return `${this.color}`;
55
+ return '';
56
+ },
57
+ loaderColor() {
58
+ if (['success', 'transfer', 'danger'].includes(this.color)) return 'main';
59
+ return 'contrast';
60
+ },
61
+ },
62
+ };
63
+ </script>
64
+
65
+ <style lang="scss" scoped>
66
+ .wt-button {
67
+ @extend %typo-btn;
68
+ position: relative;
69
+ display: inline-block;
70
+ padding: var(--btn-padding);
71
+ border: var(--btn-border);
72
+ color: var(--btn-dark-font-color);
73
+ background: var(--btn-primary-color);
74
+ border-color: var(--btn-primary-color);
75
+ border-radius: var(--border-radius);
76
+ transition: var(--transition);
77
+ cursor: pointer;
78
+
79
+ &--wide {
80
+ width: 100%;
81
+ }
82
+
83
+ &--large {
84
+ @extend %typo-btn-lg;
85
+ padding: var(--btn-lg-padding); // 16px 30px - border
86
+ }
87
+
88
+ &--disabled {
89
+ color: var(--disabled-color);
90
+ background: var(--btn-disabled-bg-color);
91
+ border-color: var(--disabled-color);
92
+ cursor: auto;
93
+ pointer-events: none;
94
+ }
95
+
96
+ &:hover,
97
+ &:active {
98
+ background: var(--btn-primary--hover-color);
99
+ border-color: var(--btn-primary--hover-color);
100
+ }
101
+
102
+ &:not(&--outline) {
103
+ &.secondary {
104
+ color: var(--btn-secondary-color);
105
+ border-color: var(--btn-secondary-color);
106
+ background: var(--btn-secondary-bg-color);
107
+
108
+ &:hover,
109
+ &:active {
110
+ color: var(--btn-secondary--hover-color);
111
+ border-color: var(--btn-secondary--hover-color);
112
+ background: var(--btn-secondary-bg-color);
113
+ }
114
+ }
115
+
116
+ &.success {
117
+ color: var(--btn-light-font-color);
118
+ background: var(--btn-true-color);
119
+ border-color: var(--btn-true-color);
120
+
121
+ &:hover,
122
+ &:active {
123
+ background: var(--btn-true--hover-color);
124
+ border-color: var(--btn-true--hover-color);
125
+ }
126
+ }
127
+
128
+ &.transfer {
129
+ color: var(--btn-light-font-color);
130
+ background: var(--btn-transfer-color);
131
+ border-color: var(--btn-transfer-color);
132
+
133
+ &:hover,
134
+ &:active {
135
+ background: var(--btn-transfer--hover-color);
136
+ border-color: var(--btn-transfer--hover-color);
137
+ }
138
+ }
139
+
140
+ &.danger {
141
+ color: var(--btn-light-font-color);
142
+ background: var(--btn-false-color);
143
+ border-color: var(--btn-false-color);
144
+
145
+ &:hover,
146
+ &:active {
147
+ background: var(--btn-false--hover-color);
148
+ border-color: var(--btn-false--hover-color);
149
+ }
150
+ }
151
+ }
152
+
153
+ &--outline {
154
+ &:not(.wt-button--disabled) {
155
+ color: var(--btn-primary-color);
156
+ border-color: var(--btn-primary-color);
157
+ background: transparent;
158
+ }
159
+
160
+ &:hover,
161
+ &:active {
162
+ color: var(--btn-primary--hover-color);
163
+ border-color: var(--btn-primary--hover-color);
164
+ background: transparent;
165
+ }
166
+
167
+ &.secondary {
168
+ color: var(--btn-secondary-color);
169
+ border-color: var(--btn-secondary-color);
170
+
171
+ &:hover,
172
+ &:active {
173
+ color: var(--btn-secondary--hover-color);
174
+ border-color: var(--btn-secondary--hover-color);
175
+ }
176
+ }
177
+
178
+ &.success {
179
+ color: var(--btn-true-color);
180
+ border-color: var(--btn-true-color);
181
+
182
+ &:hover,
183
+ &:active {
184
+ color: var(--btn-true--hover-color);
185
+ border-color: var(--btn-true--hover-color);
186
+ }
187
+ }
188
+
189
+ &.transfer {
190
+ color: var(--btn-transfer-color);
191
+ border-color: var(--btn-transfer-color);
192
+
193
+ &:hover,
194
+ &:active {
195
+ color: var(--btn-transfer--hover-color);
196
+ border-color: var(--btn-transfer--hover-color);
197
+ }
198
+ }
199
+
200
+ &.danger {
201
+ color: var(--btn-false-color);
202
+ border-color: var(--btn-false-color);
203
+
204
+ &:hover,
205
+ &:active {
206
+ color: var(--btn-false--hover-color);
207
+ border-color: var(--btn-false--hover-color);
208
+ }
209
+ }
210
+ }
211
+ }
212
+ </style>
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtDivider from '../wt-divider.vue';
3
+
4
+ describe('WtDivider', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtDivider);
7
+ expect(wrapper.classes('wt-divider')).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <hr class="wt-divider">
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'wt-divider',
8
+ };
9
+ </script>
10
+
11
+ <style lang="scss" scoped>
12
+ .wt-divider {
13
+ display: block;
14
+ box-sizing: border-box;
15
+ width: 100%;
16
+ max-width: 100%;
17
+ height: 0;
18
+ max-height: 0;
19
+ padding: 0;
20
+ margin: 0;
21
+ border: var(--divider-border);
22
+ border-color: var(--divider-border-color);
23
+ border-top-width: thin;
24
+ }
25
+ </style>
@@ -0,0 +1,24 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtIcon from '../wt-icon.vue';
3
+
4
+ describe('WtIcon', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtIcon, {
7
+ propsData: {
8
+ icon: 'icon-name',
9
+ },
10
+ });
11
+ expect(wrapper.classes('wt-icon')).toBe(true);
12
+ });
13
+ it('correctly computes icon name', () => {
14
+ const iconName = '#_icon-jest-bucket--sm';
15
+ const wrapper = shallowMount(WtIcon, {
16
+ propsData: {
17
+ icon: 'bucket',
18
+ size: 'sm',
19
+ iconPrefix: 'jest',
20
+ },
21
+ });
22
+ expect(wrapper.vm.iconName).toBe(iconName);
23
+ });
24
+ });
@@ -0,0 +1,138 @@
1
+ <!-- eslint-disable -->
2
+ <template>
3
+ <i
4
+ class="wt-icon"
5
+ :class="[
6
+ `wt-icon--size-${size}`,
7
+ `wt-icon--color-${color}`,
8
+ { 'wt-icon--disabled': disabled }
9
+ ]"
10
+ >
11
+ <svg
12
+ class="wt-icon__icon"
13
+ >
14
+ <use
15
+ :xlink:href="iconName"
16
+ ></use>
17
+ </svg>
18
+ </i>
19
+ </template>
20
+
21
+ <script>
22
+ export default {
23
+ name: 'wt-icon',
24
+ props: {
25
+ icon: {
26
+ type: String,
27
+ required: true,
28
+ },
29
+ size: {
30
+ type: String,
31
+ default: 'md',
32
+ },
33
+ color: {
34
+ type: String,
35
+ default: 'default',
36
+ options: ['default', 'contrast', 'active', 'disabled', 'success', 'danger', 'transfer', 'hold'],
37
+ },
38
+ iconPrefix: {
39
+ type: String,
40
+ default: '',
41
+ },
42
+ disabled: {
43
+ type: Boolean,
44
+ default: false,
45
+ },
46
+ },
47
+ computed: {
48
+ iconName() {
49
+ let name = '#_icon';
50
+ if (this.iconPrefix) name += `-${this.iconPrefix}`;
51
+ return `${name}-${this.icon}--${this.size}`;
52
+ },
53
+ },
54
+ };
55
+ </script>
56
+
57
+ <style lang="scss" scoped>
58
+ .wt-icon {
59
+ display: inline-flex;
60
+ justify-content: center;
61
+ align-items: center;
62
+ transition: var(--transition);
63
+ }
64
+
65
+ /*svg instead of .icon to override styles by .icon-icon-name-size without any other seelectors*/
66
+ svg {
67
+ display: flex;
68
+ width: var(--icon-md-size);
69
+ height: var(--icon-md-size);
70
+ stroke-width: 0;
71
+ fill: var(--icon-color);
72
+ transition: var(--transition);
73
+ }
74
+
75
+ .wt-icon--color {
76
+ &-default .wt-icon__icon {
77
+ fill: var(--icon-color);
78
+ }
79
+
80
+ &-accent .wt-icon__icon {
81
+ fill: var(--icon-color-accent);
82
+ }
83
+
84
+ &-contrast .wt-icon__icon {
85
+ fill: var(--icon-color-contrast);
86
+ }
87
+
88
+ &-active .wt-icon__icon {
89
+ fill: var(--icon-color-active);
90
+ }
91
+
92
+ &-success .wt-icon__icon {
93
+ fill: var(--icon-color-success);
94
+ }
95
+
96
+ &-danger .wt-icon__icon {
97
+ fill: var(--icon-color-danger);
98
+ }
99
+
100
+ &-transfer .wt-icon__icon {
101
+ fill: var(--icon-color-transfer);
102
+ }
103
+
104
+ &-hold .wt-icon__icon {
105
+ fill: var(--icon-color-hold);
106
+ }
107
+
108
+ &-disabled .wt-icon__icon {
109
+ fill: var(--icon-color-disabled);
110
+ }
111
+ }
112
+
113
+ .wt-icon.wt-icon--disabled .wt-icon__icon {
114
+ fill: var(--icon-color-disabled);
115
+ }
116
+
117
+ .wt-icon--size {
118
+ &-xl .wt-icon__icon {
119
+ width: var(--icon-xl-size);
120
+ height: var(--icon-xl-size);
121
+ }
122
+
123
+ &-lg .wt-icon__icon {
124
+ width: var(--icon-lg-size);
125
+ height: var(--icon-lg-size);
126
+ }
127
+
128
+ &-md .wt-icon__icon {
129
+ width: var(--icon-md-size);
130
+ height: var(--icon-md-size);
131
+ }
132
+
133
+ &-sm .wt-icon__icon {
134
+ width: var(--icon-sm-size);
135
+ height: var(--icon-sm-size);
136
+ }
137
+ }
138
+ </style>
@@ -0,0 +1,29 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtIndicator from '../wt-indicator.vue';
3
+
4
+ describe('WtIndicator', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtIndicator);
7
+ expect(wrapper.classes('wt-indicator')).toBe(true);
8
+ });
9
+
10
+ it('renders a component text, if passed', () => {
11
+ const content = 'Hello there!';
12
+ const wrapper = shallowMount(WtIndicator, {
13
+ propsData: {
14
+ text: content,
15
+ },
16
+ });
17
+ expect(wrapper.find('.wt-indicator__text').text()).toEqual(content);
18
+ });
19
+
20
+ it('changed indicator color, if prop is passed', () => {
21
+ const wrapper = shallowMount(WtIndicator, {
22
+ propsData: {
23
+ color: 'primary',
24
+ },
25
+ });
26
+ expect(wrapper.find('.wt-indicator__indicator').classes())
27
+ .toContain('wt-indicator__indicator--primary');
28
+ });
29
+ });