@webitel/ui-sdk 24.12.29 → 24.12.34

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 (295) hide show
  1. package/CHANGELOG.md +271 -131
  2. package/README.md +6 -0
  3. package/dist/img/sprite/index.js +8 -2
  4. package/dist/img/sprite/tree-collapse.svg +4 -0
  5. package/dist/img/sprite/tree-cross.svg +5 -0
  6. package/dist/img/sprite/tree-line.svg +10 -0
  7. package/dist/ui-sdk.css +1 -1
  8. package/dist/ui-sdk.js +7736 -7442
  9. package/dist/ui-sdk.umd.cjs +17 -17
  10. package/package.json +13 -6
  11. package/src/api/axios/generateInstance.js +6 -2
  12. package/src/api/clients/agents/agentChats.js +18 -19
  13. package/src/api/clients/agents/agents.js +29 -7
  14. package/src/api/clients/buckets/buckets.js +16 -3
  15. package/src/api/clients/calendars/calendars.js +21 -3
  16. package/src/api/clients/catalog/catalog.js +1 -3
  17. package/src/api/clients/chatGateways/chatGateways.js +41 -12
  18. package/src/api/clients/communications/communications.js +25 -6
  19. package/src/api/clients/configurations/configurations.js +13 -3
  20. package/src/api/clients/flows/flow.js +20 -9
  21. package/src/api/clients/gateways/gateways.js +12 -3
  22. package/src/api/clients/lists/blacklists.js +16 -3
  23. package/src/api/clients/media/media.js +16 -3
  24. package/src/api/clients/queues/queues.js +16 -6
  25. package/src/api/clients/roles/roles.js +3 -1
  26. package/src/api/clients/skills/skills.js +16 -3
  27. package/src/api/clients/teams/teams.js +17 -7
  28. package/src/api/clients/users/__tests__/users.spec.js +3 -1
  29. package/src/api/clients/users/users.js +8 -2
  30. package/src/api/clients//321/201ontacts/contactChatMessagesHistory.js +21 -13
  31. package/src/api/clients//321/201ontacts/contacts.js +38 -15
  32. package/src/api/history/transcript/callTranscript.js +10 -2
  33. package/src/api/interceptors/request/updateToken.interceptor.js +2 -1
  34. package/src/api/transformers/applyTransform.js +5 -1
  35. package/src/api/transformers/camelToSnake/camelToSnake.transformer.js +2 -1
  36. package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.js +2 -1
  37. package/src/assets/icons/sprite/index.js +8 -2
  38. package/src/assets/icons/sprite/tree-collapse.svg +4 -0
  39. package/src/assets/icons/sprite/tree-cross.svg +5 -0
  40. package/src/assets/icons/sprite/tree-line.svg +10 -0
  41. package/src/components/index.js +8 -12
  42. package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-1.vue +4 -2
  43. package/src/components/on-demand/wt-navigation-menu/components/_internals/nav-menu-lvl-2.vue +3 -4
  44. package/src/components/on-demand/wt-navigation-menu/components/wt-navigation-menu.vue +6 -6
  45. package/src/components/on-demand/wt-route-transition/wt-route-transition.vue +12 -12
  46. package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +1 -3
  47. package/src/components/on-demand/wt-selection-popup/wt-selection-popup.vue +3 -3
  48. package/src/components/on-demand/wt-start-page/components/start-page-card.vue +4 -2
  49. package/src/components/on-demand/wt-start-page/components/start-page-logo.vue +1 -1
  50. package/src/components/on-demand/wt-start-page/components/wt-start-page.vue +2 -3
  51. package/src/components/on-demand/wt-table-transition/wt-table-transition.vue +7 -7
  52. package/src/components/wt-action-bar/wt-action-bar.vue +16 -12
  53. package/src/components/wt-app-header/__tests__/WtHeaderActions.spec.js +3 -1
  54. package/src/components/wt-app-header/_variables.scss +0 -1
  55. package/src/components/wt-app-header/wt-app-header.vue +4 -4
  56. package/src/components/wt-app-header/wt-app-navigator.vue +6 -7
  57. package/src/components/wt-app-header/wt-header-actions.vue +6 -8
  58. package/src/components/wt-avatar/wt-avatar.vue +4 -3
  59. package/src/components/wt-badge/wt-badge.vue +1 -2
  60. package/src/components/wt-button/wt-button.vue +3 -5
  61. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +6 -2
  62. package/src/components/wt-button-select/wt-button-select.vue +3 -4
  63. package/src/components/wt-checkbox/_variables.scss +1 -2
  64. package/src/components/wt-checkbox/wt-checkbox.vue +1 -2
  65. package/src/components/wt-chip/_variables.scss +0 -1
  66. package/src/components/wt-confirm-dialog/wt-confirm-dialog.vue +15 -5
  67. package/src/components/wt-context-menu/_variables.scss +3 -1
  68. package/src/components/wt-context-menu/wt-context-menu.vue +1 -3
  69. package/src/components/wt-copy-action/wt-copy-action.vue +1 -2
  70. package/src/components/wt-datepicker/_variables.scss +17 -5
  71. package/src/components/wt-datepicker/wt-datepicker.vue +2 -7
  72. package/src/components/wt-divider/_variables.scss +0 -1
  73. package/src/components/wt-divider/wt-divider.vue +5 -3
  74. package/src/components/wt-dual-panel/__tests__/WtDualPanel.js +2 -2
  75. package/src/components/wt-dual-panel/wt-dual-panel.vue +6 -5
  76. package/src/components/wt-dummy/_variables.scss +0 -1
  77. package/src/components/wt-dummy/wt-dummy.vue +1 -1
  78. package/src/components/wt-empty/wt-empty.vue +42 -34
  79. package/src/components/wt-error-page/_variables.scss +0 -1
  80. package/src/components/wt-error-page/wt-error-page.vue +2 -4
  81. package/src/components/wt-expansion-panel/_variables.scss +0 -1
  82. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +3 -8
  83. package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +12 -4
  84. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +8 -7
  85. package/src/components/wt-headline/_variables.scss +0 -1
  86. package/src/components/wt-headline-nav/_variables.scss +0 -1
  87. package/src/components/wt-headline-nav/wt-headline-nav.vue +2 -1
  88. package/src/components/wt-hint/wt-hint.vue +1 -3
  89. package/src/components/wt-icon/_variables.scss +0 -1
  90. package/src/components/wt-icon-action/wt-icon-action.vue +13 -12
  91. package/src/components/wt-icon-btn/_variables.scss +0 -2
  92. package/src/components/wt-icon-btn/wt-icon-btn.vue +4 -6
  93. package/src/components/wt-image/wt-image.vue +14 -13
  94. package/src/components/wt-indicator/wt-indicator.vue +2 -7
  95. package/src/components/wt-input/_variables.scss +1 -2
  96. package/src/components/wt-input/wt-input.vue +13 -10
  97. package/src/components/wt-input-info/_variables.scss +0 -1
  98. package/src/components/wt-intersection-observer/__tests__/WtIntersectionObserver.spec.js +1 -1
  99. package/src/components/wt-intersection-observer/wt-intersection-observer.vue +9 -8
  100. package/src/components/wt-item-link/_variables.scss +0 -1
  101. package/src/components/wt-label/_variables.scss +0 -1
  102. package/src/components/wt-label/wt-label.vue +1 -4
  103. package/src/components/wt-load-bar/_variables.scss +0 -1
  104. package/src/components/wt-load-bar/wt-load-bar.vue +0 -1
  105. package/src/components/wt-loader/_variables.scss +0 -2
  106. package/src/components/wt-loader/wt-loader.vue +1 -3
  107. package/src/components/wt-logo/wt-logo.vue +1 -1
  108. package/src/components/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +9 -3
  109. package/src/components/wt-navigation-bar/_variables.scss +9 -3
  110. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +27 -11
  111. package/src/components/wt-notification/_variables.scss +0 -1
  112. package/src/components/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +1 -1
  113. package/src/components/wt-notifications-bar/_variables.scss +1 -2
  114. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +4 -2
  115. package/src/components/wt-page-header/wt-page-header.vue +3 -2
  116. package/src/components/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +3 -1
  117. package/src/components/wt-page-wrapper/_variables.scss +0 -1
  118. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +0 -2
  119. package/src/components/wt-pagination/_variables.scss +1 -2
  120. package/src/components/wt-pagination/wt-pagination.vue +2 -1
  121. package/src/components/wt-player/_variables.scss +6 -2
  122. package/src/components/wt-player/wt-player.vue +52 -53
  123. package/src/components/wt-popup/_variables.scss +0 -1
  124. package/src/components/wt-popup/wt-popup.vue +2 -8
  125. package/src/components/wt-progress-bar/_variables.scss +0 -1
  126. package/src/components/wt-progress-bar/wt-progress-bar.vue +7 -6
  127. package/src/components/wt-radio/_variables.scss +1 -2
  128. package/src/components/wt-radio/wt-radio.vue +1 -2
  129. package/src/components/wt-rounded-action/_variables.scss +3 -1
  130. package/src/components/wt-search-bar/_variables.scss +4 -2
  131. package/src/components/wt-search-bar/wt-search-bar.vue +10 -4
  132. package/src/components/wt-select/_multiselect.scss +9 -15
  133. package/src/components/wt-select/_variables.scss +3 -2
  134. package/src/components/wt-select/mixins/multiselectMixin.js +2 -1
  135. package/src/components/wt-select/wt-select.vue +25 -26
  136. package/src/components/wt-slider/_variables.scss +0 -1
  137. package/src/components/wt-slider/wt-slider.vue +3 -3
  138. package/src/components/wt-status-select/_variables.scss +8 -4
  139. package/src/components/wt-stepper/_variables.scss +0 -1
  140. package/src/components/wt-stepper/wt-stepper.vue +5 -5
  141. package/src/components/wt-switcher/_variables.scss +0 -1
  142. package/src/components/wt-switcher/wt-switcher.vue +2 -3
  143. package/src/components/wt-table/__tests__/WtTable.spec.js +8 -2
  144. package/src/components/wt-table/_variables.scss +0 -1
  145. package/src/components/wt-table/types/table-header.ts +8 -0
  146. package/src/components/wt-table/wt-table.vue +111 -109
  147. package/src/components/wt-table-actions/_variables.scss +1 -2
  148. package/src/components/wt-table-actions/wt-table-actions.vue +1 -2
  149. package/src/components/wt-table-column-select/wt-table-column-select.vue +11 -8
  150. package/src/components/wt-tabs/_variables.scss +0 -1
  151. package/src/components/wt-tabs/wt-tabs.vue +6 -6
  152. package/src/components/wt-tags-input/__tests__/WtTagsInput.spec.js +6 -6
  153. package/src/components/wt-tags-input/mixin/taggableMixin.js +3 -1
  154. package/src/components/wt-tags-input/wt-tags-input.vue +8 -10
  155. package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +6 -2
  156. package/src/components/wt-textarea/_variables.scss +0 -1
  157. package/src/components/wt-textarea/wt-textarea.vue +6 -7
  158. package/src/components/wt-time-input/wt-time-input.vue +1 -2
  159. package/src/components/wt-timepicker/_variables.scss +1 -2
  160. package/src/components/wt-timepicker/wt-timepicker.vue +10 -8
  161. package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +6 -1
  162. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +1 -3
  163. package/src/components/wt-tooltip/_variables.scss +0 -1
  164. package/src/components/wt-tooltip/wt-tooltip.vue +13 -2
  165. package/src/components/wt-tree-table/_variables.scss +19 -0
  166. package/src/components/wt-tree-table/wt-tree-table.vue +323 -0
  167. package/src/components/wt-tree-table-row/wt-tree-table-row.vue +171 -0
  168. package/src/composables/useAccessControl/useAccessControl.js +12 -4
  169. package/src/composables/useCachedInterval/useCachedInterval.js +6 -2
  170. package/src/composables/useCachedItemInstanceName/useCachedItemInstanceName.js +4 -1
  171. package/src/composables/useCard/useCardComponent.js +10 -9
  172. package/src/composables/useCard/useCardTabs.js +6 -3
  173. package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +20 -10
  174. package/src/composables/useValidate/useValidate.js +1 -1
  175. package/src/composables/useWtTable/useWtTable.ts +25 -0
  176. package/src/css/main.scss +7 -1
  177. package/src/css/pages/table-page.scss +1 -2
  178. package/src/css/styleguide/border-radius/_border-radius.scss +1 -1
  179. package/src/css/styleguide/colors/_deprecated.scss +83 -24
  180. package/src/css/styleguide/colors/_palette.scss +1340 -251
  181. package/src/css/styleguide/colors/reusable/_text-field.scss +6 -2
  182. package/src/css/styleguide/fonts/_fonts.scss +36 -18
  183. package/src/css/styleguide/spacings/_spacings.scss +1 -1
  184. package/src/css/styleguide/transitions/_transitions.scss +1 -1
  185. package/src/css/styleguide/transitions/fade/_fade.scss +5 -4
  186. package/src/css/styleguide/viewport-breakpoints/_viewport-breakpoints.scss +0 -1
  187. package/src/enums/WebitelApplications/WebitelApplications.enum.js +7 -7
  188. package/src/enums/index.js +5 -10
  189. package/src/locale/en/en.js +5 -2
  190. package/src/locale/ru/ru.js +7 -3
  191. package/src/locale/ua/ua.js +7 -3
  192. package/src/mixins/dataFilterMixins/__tests__/apiFilterMixin.spec.js +2 -1
  193. package/src/mixins/dataFilterMixins/apiFilterMixin.js +3 -1
  194. package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +2 -1
  195. package/src/mixins/dataFilterMixins/enumFilterMixin.js +2 -1
  196. package/src/mixins/dataFilterMixins/paginationFilterMixin.js +4 -1
  197. package/src/mixins/dataFilterMixins/sortFilterMixin.js +2 -1
  198. package/src/mixins/validationMixin/useValidation.js +17 -7
  199. package/src/mixins/validationMixin/validationMixin.js +16 -8
  200. package/src/modules/AgentStatusSelect/api/pause-cause.js +4 -1
  201. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +18 -6
  202. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +3 -2
  203. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +5 -2
  204. package/src/modules/Appearance/components/__tests__/wt-dark-mode-switcher.spec.js +6 -2
  205. package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +12 -4
  206. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +18 -5
  207. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +4 -2
  208. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +15 -5
  209. package/src/modules/AuditForm/components/audit-form-question.vue +10 -4
  210. package/src/modules/AuditForm/components/audit-form.vue +24 -7
  211. package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +6 -2
  212. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +5 -5
  213. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +9 -4
  214. package/src/modules/CSVExport/CSVExport.js +5 -2
  215. package/src/modules/CSVExport/XLSExport.js +7 -7
  216. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +4 -1
  217. package/src/modules/CSVExport/mixins/exportCSVMixin.js +3 -1
  218. package/src/modules/CSVExport/mixins/exportXLSMixin.js +3 -1
  219. package/src/modules/CardStoreModule/composables/useCardStore.js +6 -2
  220. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +3 -3
  221. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +6 -3
  222. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -2
  223. package/src/modules/FilesExport/mixins/exportFilesMixin.js +6 -2
  224. package/src/modules/FilesExport/scripts/generateMediaURL.js +2 -1
  225. package/src/modules/Filters/classes/BaseFilterSchema.js +15 -6
  226. package/src/modules/Filters/components/filter-datetime.vue +7 -5
  227. package/src/modules/Filters/components/filter-pagination.vue +7 -5
  228. package/src/modules/Filters/components/filter-search.vue +4 -4
  229. package/src/modules/Filters/components/filter-select.vue +33 -24
  230. package/src/modules/Filters/components/filter-table-fields.vue +1 -3
  231. package/src/modules/Filters/composables/useTableFilters.js +3 -1
  232. package/src/modules/Filters/scripts/getters/localStorageGetter.js +6 -2
  233. package/src/modules/Filters/scripts/getters/queryGetter.js +2 -1
  234. package/src/modules/Filters/scripts/setters/localStorageSetter.js +6 -2
  235. package/src/modules/Filters/scripts/setters/querySetter.js +2 -1
  236. package/src/modules/Filters/scripts/utils/changeRouteQuery.js +2 -1
  237. package/src/modules/Filters/store/FiltersStoreModule.js +3 -3
  238. package/src/modules/Notifications/store/NotificationsStoreModule.js +14 -5
  239. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +10 -3
  240. package/src/modules/ObjectPermissions/_internals/components/permissions-role-row.vue +1 -3
  241. package/src/modules/ObjectPermissions/_internals/components/permissions-role-select.vue +1 -3
  242. package/src/modules/ObjectPermissions/_internals/components/permissions-tab-role-popup.vue +8 -5
  243. package/src/modules/ObjectPermissions/_internals/modules/filters/store/filters.store.js +3 -4
  244. package/src/modules/ObjectPermissions/_internals/store/helpers/createObjectPermissionsStoreModule.js +1 -2
  245. package/src/modules/ObjectPermissions/_internals/store/modules/objectPermissionsStoreModule.js +10 -14
  246. package/src/modules/ObjectPermissions/components/permissions-tab.vue +12 -12
  247. package/src/modules/ObjectPermissions/store/index.js +2 -6
  248. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +3 -1
  249. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +6 -2
  250. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +7 -2
  251. package/src/modules/QueryFilters/components/abstract-api-filter.vue +15 -5
  252. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +15 -5
  253. package/src/modules/QueryFilters/components/filter-datetime.vue +1 -3
  254. package/src/modules/QueryFilters/components/filter-from-to.vue +1 -1
  255. package/src/modules/QueryFilters/components/filter-search.vue +1 -3
  256. package/src/modules/QueryFilters/components/filter-table-fields.vue +1 -3
  257. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +4 -1
  258. package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +9 -3
  259. package/src/modules/QueryFilters/mixins/enumFilterMixin.js +10 -3
  260. package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +4 -2
  261. package/src/modules/QueryFilters/mixins/sortFilterMixin.js +2 -1
  262. package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +2 -1
  263. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +10 -3
  264. package/src/modules/TableComponentModule/composables/useTableEmpty.js +13 -4
  265. package/src/modules/TableStoreModule/composables/useTableStore.js +18 -6
  266. package/src/modules/TableStoreModule/store/TableStoreModule.js +36 -21
  267. package/src/modules/TableStoreModule/store/__tests__/TableStoreModule.spec.js +7 -2
  268. package/src/modules/Userinfo/api/userinfo.js +4 -1
  269. package/src/modules/Userinfo/classes/ApplicationsAccess.js +3 -1
  270. package/src/modules/Userinfo/store/UserinfoStoreModule.js +25 -9
  271. package/src/plugins/breakpoint/breakpoint.plugin.js +2 -1
  272. package/src/scripts/__tests__/caseConverters.spec.js +4 -1
  273. package/src/scripts/__tests__/updateObject.spec.js +6 -2
  274. package/src/scripts/caseConverters.js +37 -29
  275. package/src/scripts/compareSize.ts +9 -6
  276. package/src/scripts/debounce.js +2 -1
  277. package/src/scripts/index.js +2 -8
  278. package/src/scripts/logger.js +4 -4
  279. package/src/scripts/preventHiddenPageCallsDecorator.js +6 -2
  280. package/src/scripts/saveAsJSON.js +3 -1
  281. package/src/scripts/sortQueryAdapters.js +11 -0
  282. package/src/store/BaseStoreModules/ApiStoreModule.js +26 -7
  283. package/src/store/BaseStoreModules/BaseStoreModule.js +2 -1
  284. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +28 -7
  285. package/src/store/helpers/getNamespacedState.js +3 -1
  286. package/src/store/new/modules/apiStoreModule/apiStoreModule.js +19 -14
  287. package/src/store/new/modules/cardStoreModule/useCardStore.js +6 -2
  288. package/src/store/new/modules/tableStoreModule/__tests__/tableStoreModule.spec.js +6 -8
  289. package/src/store/new/modules/tableStoreModule/tableStoreModule.js +31 -28
  290. package/src/store/new/modules/tableStoreModule/useTableStore.js +18 -6
  291. package/src/validators/variableSearchValidator/__tests__/variableSearchValidator.spec.js +2 -1
  292. package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +3 -1
  293. package/src/components/wt-table/_internals/getSortOrder.js +0 -12
  294. /package/dist/img/sprite/{plus.svg → tree-expand.svg} +0 -0
  295. /package/src/assets/icons/sprite/{plus.svg → tree-expand.svg} +0 -0
@@ -15,8 +15,12 @@ export default {
15
15
  computed: {
16
16
  filterSchema() {
17
17
  if (!this.$store)
18
- throw new Error('Vuex is required for default filterSchema baseFilterMixin property');
19
- return getNamespacedState(this.$store.state, this.namespace)[this.filterQuery];
18
+ throw new Error(
19
+ 'Vuex is required for default filterSchema baseFilterMixin property',
20
+ );
21
+ return getNamespacedState(this.$store.state, this.namespace)[
22
+ this.filterQuery
23
+ ];
20
24
  },
21
25
  value() {
22
26
  return this.filterSchema.value;
@@ -29,7 +33,9 @@ export default {
29
33
  },
30
34
  setValue(payload) {
31
35
  if (!this.$store)
32
- throw new Error('Vuex is required for default setValue() baseFilterMixin method');
36
+ throw new Error(
37
+ 'Vuex is required for default setValue() baseFilterMixin method',
38
+ );
33
39
  return this.$store.dispatch(`${this.namespace}/SET_FILTER`, payload);
34
40
  },
35
41
  },
@@ -35,7 +35,9 @@ export default {
35
35
  if (optsHaveLocale) {
36
36
  return this.options.map((opt) => ({
37
37
  ...opt,
38
- name: Array.isArray(opt.locale) ? this.$tc(...opt.locale) : this.$t(opt.locale),
38
+ name: Array.isArray(opt.locale)
39
+ ? this.$tc(...opt.locale)
40
+ : this.$t(opt.locale),
39
41
  }));
40
42
  }
41
43
  return this.options;
@@ -60,7 +62,10 @@ export default {
60
62
  newValue = newValue.concat(
61
63
  value
62
64
  .filter(
63
- (val) => !this.localizedOptions.some((option) => val === option[this.storedProp]),
65
+ (val) =>
66
+ !this.localizedOptions.some(
67
+ (option) => val === option[this.storedProp],
68
+ ),
64
69
  )
65
70
  .map((val) => ({ [this.storedProp]: val, name: val })),
66
71
  );
@@ -69,7 +74,9 @@ export default {
69
74
  /*
70
75
  see comments above
71
76
  */
72
- newValue = this.localizedOptions.find((option) => value === option[this.storedProp]);
77
+ newValue = this.localizedOptions.find(
78
+ (option) => value === option[this.storedProp],
79
+ );
73
80
  if (this.allowCustomValues) {
74
81
  newValue = newValue || { [this.storedProp]: value, name: value };
75
82
  }
@@ -24,13 +24,15 @@ export default {
24
24
 
25
25
  restorePage() {
26
26
  const defaultPage = 1;
27
- const value = +this.getValueFromQuery({ filterQuery: 'page' }) || defaultPage;
27
+ const value =
28
+ +this.getValueFromQuery({ filterQuery: 'page' }) || defaultPage;
28
29
  this.setPage(value);
29
30
  },
30
31
 
31
32
  restoreSize() {
32
33
  const defaultSize = 10;
33
- const value = +this.getValueFromQuery({ filterQuery: 'size' }) || defaultSize;
34
+ const value =
35
+ +this.getValueFromQuery({ filterQuery: 'size' }) || defaultSize;
34
36
  this.setSize(value);
35
37
  },
36
38
 
@@ -18,7 +18,8 @@ const getNextSortOrder = (sort) => {
18
18
  }
19
19
  };
20
20
 
21
- const encodeSortQuery = ({ column, order }) => `${sortToQueryAdapter(order)}${column.field}`;
21
+ const encodeSortQuery = ({ column, order }) =>
22
+ `${sortToQueryAdapter(order)}${column.field}`;
22
23
 
23
24
  const decodeSortQuery = ({ value }) => {
24
25
  const sort = queryToSortAdapter(value.slice(0, 1));
@@ -27,7 +27,8 @@ export default class QueryFiltersStoreModule extends BaseStoreModule {
27
27
  let newValue = value;
28
28
  if (newValue) {
29
29
  if (multiple && !Array.isArray(newValue)) newValue = [newValue];
30
- } else if (newValue === null || newValue === undefined) newValue = defaultValue;
30
+ } else if (newValue === null || newValue === undefined)
31
+ newValue = defaultValue;
31
32
  context.commit('SET_FILTER', { filter, value: newValue });
32
33
  },
33
34
  RESET_FILTERS: (context) => {
@@ -66,7 +66,10 @@ describe('QueryFiltersStoreModule actions', () => {
66
66
  it('SET_FILTER: sets array value filter with null value to defaultValue', () => {
67
67
  const filter = { filter: arrayFilter, value: null };
68
68
  module.actions.SET_FILTER(context, filter);
69
- expect(context.commit).toHaveBeenCalledWith('SET_FILTER', { filter: filter.filter, value: [] });
69
+ expect(context.commit).toHaveBeenCalledWith('SET_FILTER', {
70
+ filter: filter.filter,
71
+ value: [],
72
+ });
70
73
  });
71
74
  it('SET_FILTER: sets "false" value filter', () => {
72
75
  const filter = { filter: valueFilter, value: false };
@@ -86,11 +89,15 @@ describe('QueryFiltersStoreModule mutations', () => {
86
89
  const module = new QueryFiltersStoreModule().getModule();
87
90
  it('correctly mutates state at RESET_FILTERS call', () => {
88
91
  expect(
89
- Object.values(state).every((filter) => filter.value === filter.defaultValue),
92
+ Object.values(state).every(
93
+ (filter) => filter.value === filter.defaultValue,
94
+ ),
90
95
  ).toBeFalsy();
91
96
  module.mutations.RESET_FILTERS(state);
92
97
  expect(
93
- Object.values(state).every((filter) => filter.value === filter.defaultValue),
98
+ Object.values(state).every(
99
+ (filter) => filter.value === filter.defaultValue,
100
+ ),
94
101
  ).toBeTruthy();
95
102
  });
96
103
  });
@@ -8,7 +8,10 @@ import EmptyTableLight from '../_internals/assets/empty-table-light.svg';
8
8
  import EmptyFiltersDark from '../_internals/assets/empty-filters-dark.svg';
9
9
  import EmptyFiltersLight from '../_internals/assets/empty-filters-light.svg';
10
10
 
11
- export const useTableEmpty = ({ dataList, filters, error, isLoading }, overrides = {}) => {
11
+ export const useTableEmpty = (
12
+ { dataList, filters, error, isLoading },
13
+ overrides = {},
14
+ ) => {
12
15
  const store = useStore();
13
16
  const { t } = useI18n();
14
17
 
@@ -98,11 +101,17 @@ export const useTableEmpty = ({ dataList, filters, error, isLoading }, overrides
98
101
  const image = computed(() => {
99
102
  switch (emptyCause.value) {
100
103
  case EmptyCause.ERROR:
101
- return darkMode?.value ? merged.value.image.error.dark : merged.value.image.error.light;
104
+ return darkMode?.value
105
+ ? merged.value.image.error.dark
106
+ : merged.value.image.error.light;
102
107
  case EmptyCause.FILTERS:
103
- return darkMode?.value ? merged.value.image.filters.dark : merged.value.image.filters.light;
108
+ return darkMode?.value
109
+ ? merged.value.image.filters.dark
110
+ : merged.value.image.filters.light;
104
111
  case EmptyCause.EMPTY:
105
- return darkMode?.value ? merged.value.image.empty.dark : merged.value.image.empty.light;
112
+ return darkMode?.value
113
+ ? merged.value.image.empty.dark
114
+ : merged.value.image.empty.light;
106
115
  default:
107
116
  return null;
108
117
  }
@@ -7,17 +7,29 @@ export const useTableStore = (namespace) => {
7
7
 
8
8
  const tableNamespace = `${namespace}/table`;
9
9
 
10
- const dataList = computed(() => getNamespacedState(store.state, tableNamespace).dataList);
10
+ const dataList = computed(
11
+ () => getNamespacedState(store.state, tableNamespace).dataList,
12
+ );
11
13
 
12
- const selected = computed(() => getNamespacedState(store.state, tableNamespace).selected);
14
+ const selected = computed(
15
+ () => getNamespacedState(store.state, tableNamespace).selected,
16
+ );
13
17
 
14
- const isLoading = computed(() => getNamespacedState(store.state, tableNamespace).isLoading);
18
+ const isLoading = computed(
19
+ () => getNamespacedState(store.state, tableNamespace).isLoading,
20
+ );
15
21
 
16
- const headers = computed(() => getNamespacedState(store.state, tableNamespace).headers);
22
+ const headers = computed(
23
+ () => getNamespacedState(store.state, tableNamespace).headers,
24
+ );
17
25
 
18
- const isNext = computed(() => getNamespacedState(store.state, tableNamespace).isNextPage);
26
+ const isNext = computed(
27
+ () => getNamespacedState(store.state, tableNamespace).isNextPage,
28
+ );
19
29
 
20
- const error = computed(() => getNamespacedState(store.state, tableNamespace).errors);
30
+ const error = computed(
31
+ () => getNamespacedState(store.state, tableNamespace).errors,
32
+ );
21
33
 
22
34
  function loadData(payload) {
23
35
  return store.dispatch(`${tableNamespace}/LOAD_DATA_LIST`, payload);
@@ -2,8 +2,7 @@ import {
2
2
  queryToSortAdapter,
3
3
  sortToQueryAdapter,
4
4
  } from '../../../scripts/sortQueryAdapters.js';
5
- import BaseStoreModule
6
- from '../../../store/BaseStoreModules/BaseStoreModule.js';
5
+ import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
7
6
  import FilterEvent from '../../Filters/enums/FilterEvent.enum.js';
8
7
 
9
8
  export default class TableStoreModule extends BaseStoreModule {
@@ -48,7 +47,8 @@ export default class TableStoreModule extends BaseStoreModule {
48
47
 
49
48
  actions = {
50
49
  // FIXME: maybe move to filters module?
51
- SET_FILTER: (context, payload) => context.dispatch('filters/SET_FILTER', payload),
50
+ SET_FILTER: (context, payload) =>
51
+ context.dispatch('filters/SET_FILTER', payload),
52
52
 
53
53
  // FIXME: maybe move to filters module?
54
54
  ON_FILTER_EVENT: async (context, { event, payload }) => {
@@ -67,14 +67,16 @@ export default class TableStoreModule extends BaseStoreModule {
67
67
  // FIXME: maybe move to filters module?
68
68
  HANDLE_FILTERS_RESTORE: async (context, { fields, sort }) => {
69
69
  if (sort) await context.dispatch('HANDLE_SORT_CHANGE', { value: sort });
70
- if (fields?.length) await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
70
+ if (fields?.length)
71
+ await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
71
72
  return context.dispatch('LOAD_DATA_LIST');
72
73
  },
73
74
 
74
75
  // FIXME: maybe move to filters module?
75
76
  HANDLE_FILTER_RESET: async (context, { fields, sort }) => {
76
77
  if (sort) await context.dispatch('HANDLE_SORT_CHANGE', { value: sort });
77
- if (fields?.length) await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
78
+ if (fields?.length)
79
+ await context.dispatch('HANDLE_FIELDS_CHANGE', { value: fields });
78
80
  return context.dispatch('LOAD_DATA_LIST');
79
81
  },
80
82
 
@@ -112,17 +114,19 @@ export default class TableStoreModule extends BaseStoreModule {
112
114
  const nextSort = queryToSortAdapter(value?.slice(0, 1) || '');
113
115
  const field = nextSort ? value.slice(1) : value;
114
116
 
115
- const headers = context.state.headers.map(({ sort: currentSort, ...header }) => {
116
- let sort;
117
+ const headers = context.state.headers.map(
118
+ ({ sort: currentSort, ...header }) => {
119
+ let sort;
117
120
 
118
- if (field) {
119
- sort = field === header.field ? nextSort : currentSort;
120
- } else {
121
- sort = nextSort; // null
122
- }
121
+ if (field) {
122
+ sort = field === header.field ? nextSort : currentSort;
123
+ } else {
124
+ sort = nextSort; // null
125
+ }
123
126
 
124
- return { ...header, sort };
125
- });
127
+ return { ...header, sort };
128
+ },
129
+ );
126
130
 
127
131
  context.commit('SET', { path: 'headers', value: headers });
128
132
  },
@@ -133,10 +137,13 @@ export default class TableStoreModule extends BaseStoreModule {
133
137
 
134
138
  const params = context.getters.GET_LIST_PARAMS(query);
135
139
  try {
136
- const { items = [], next = false } = await context.dispatch('api/GET_LIST', {
137
- context,
138
- params,
139
- });
140
+ const { items = [], next = false } = await context.dispatch(
141
+ 'api/GET_LIST',
142
+ {
143
+ context,
144
+ params,
145
+ },
146
+ );
140
147
 
141
148
  context.commit('SET', { path: 'dataList', value: items });
142
149
  context.commit('SET', { path: 'isNextPage', value: next });
@@ -159,7 +166,10 @@ export default class TableStoreModule extends BaseStoreModule {
159
166
  });
160
167
  },
161
168
 
162
- PATCH_ITEM_PROPERTY: async (context, { item: _item, index, prop, value }) => {
169
+ PATCH_ITEM_PROPERTY: async (
170
+ context,
171
+ { item: _item, index, prop, value },
172
+ ) => {
163
173
  const item = _item || context.state.dataList[index];
164
174
 
165
175
  const { id, etag } = item;
@@ -198,7 +208,10 @@ export default class TableStoreModule extends BaseStoreModule {
198
208
  await context.dispatch('LOAD_DATA_LIST');
199
209
 
200
210
  /* if no items on current page after DELETE, move to prev page [WTEL-3793] */
201
- if (!context.state.dataList.length && context.getters.FILTERS.page > 1) {
211
+ if (
212
+ !context.state.dataList.length &&
213
+ context.getters.FILTERS.page > 1
214
+ ) {
202
215
  await context.dispatch('SET_FILTER', {
203
216
  name: 'page',
204
217
  value: context.getters.FILTERS.page - 1,
@@ -216,7 +229,9 @@ export default class TableStoreModule extends BaseStoreModule {
216
229
  },
217
230
 
218
231
  DELETE_BULK: async (context, deleted) =>
219
- Promise.allSettled(deleted.map((item) => context.dispatch('DELETE_SINGLE', item))),
232
+ Promise.allSettled(
233
+ deleted.map((item) => context.dispatch('DELETE_SINGLE', item)),
234
+ ),
220
235
 
221
236
  SET_SELECTED: (context, selected) => {
222
237
  context.commit('SET', { path: 'selected', value: selected });
@@ -15,7 +15,10 @@ describe('TableStoreModule', () => {
15
15
 
16
16
  const state = { headers };
17
17
 
18
- expect(new TableStoreModule({}).getters.FIELDS(state)).toEqual(['id', 'age']);
18
+ expect(new TableStoreModule({}).getters.FIELDS(state)).toEqual([
19
+ 'id',
20
+ 'age',
21
+ ]);
19
22
  });
20
23
  });
21
24
 
@@ -230,7 +233,9 @@ describe('TableStoreModule integration with FiltersStoreModule', () => {
230
233
  value: ['surname'],
231
234
  });
232
235
 
233
- expect(store.getters['table/filters/GET_FILTER']('fields')).toEqual(['surname']);
236
+ expect(store.getters['table/filters/GET_FILTER']('fields')).toEqual([
237
+ 'surname',
238
+ ]);
234
239
 
235
240
  expect(store.getters['table/FIELDS']).toEqual(['id', 'included']);
236
241
 
@@ -1,4 +1,7 @@
1
- import applyTransform, { notify, snakeToCamel } from '../../../api/transformers/index.js';
1
+ import applyTransform, {
2
+ notify,
3
+ snakeToCamel,
4
+ } from '../../../api/transformers/index.js';
2
5
 
3
6
  const userinfo = (instance) => ({
4
7
  async getSession() {
@@ -220,7 +220,9 @@ export default class ApplicationsAccess {
220
220
  constructor({ access, value } = { value: true }) {
221
221
  /* if access, deeply merge with falsy values schema
222
222
  if no access, "not configured => full permissions" */
223
- this.access = access ? ApplicationsAccess.restore(access) : applicationsAccess(value);
223
+ this.access = access
224
+ ? ApplicationsAccess.restore(access)
225
+ : applicationsAccess(value);
224
226
  }
225
227
 
226
228
  // minify schema for API sending
@@ -29,11 +29,15 @@ export default class UserinfoStoreModule extends BaseStoreModule {
29
29
  getters = {
30
30
  THIS_APP: (state) => state.thisApp,
31
31
  // if no access[app] => accessed by default
32
- CHECK_APP_ACCESS: (state) => (app) => !state.access[app] || state.access[app]?._enabled,
32
+ CHECK_APP_ACCESS: (state) => (app) =>
33
+ !state.access[app] || state.access[app]?._enabled,
33
34
  CHECK_OBJECT_ACCESS:
34
35
  (state, getters) =>
35
36
  ({ name, route }) => {
36
- if (!state.access[getters.THIS_APP] || !state.access[getters.THIS_APP]._enabled)
37
+ if (
38
+ !state.access[getters.THIS_APP] ||
39
+ !state.access[getters.THIS_APP]._enabled
40
+ )
37
41
  return false;
38
42
  if (route) return getters.CHECK_OBJECT_ACCESS_BY_ROUTE(route);
39
43
  return getters.CHECK_OBJECT_ACCESS_BY_NAME(name);
@@ -41,8 +45,8 @@ export default class UserinfoStoreModule extends BaseStoreModule {
41
45
  CHECK_OBJECT_ACCESS_BY_NAME: (state, getters) => (name) =>
42
46
  state.access[getters.THIS_APP][name]?._enabled,
43
47
  CHECK_OBJECT_ACCESS_BY_ROUTE: (state, getters) => (route) => {
44
- const accessKey = Object.keys(state.access[getters.THIS_APP]).find((object) =>
45
- route.name.includes(object),
48
+ const accessKey = Object.keys(state.access[getters.THIS_APP]).find(
49
+ (object) => route.name.includes(object),
46
50
  );
47
51
  return state.access[getters.THIS_APP][accessKey]?._enabled;
48
52
  },
@@ -55,7 +59,9 @@ export default class UserinfoStoreModule extends BaseStoreModule {
55
59
  GET_OBJECT_SCOPE_BY_NAME: (state) => (name) =>
56
60
  Object.values(state.scope).find((object) => name === object.name),
57
61
  GET_OBJECT_SCOPE_BY_ROUTE: (state) => (route) =>
58
- Object.values(state.scope).find((object) => route.name.includes(object.route)),
62
+ Object.values(state.scope).find((object) =>
63
+ route.name.includes(object.route),
64
+ ),
59
65
  HAS_READ_ACCESS: (state, getters) => (checkedObject) => {
60
66
  if (!getters.CHECK_OBJECT_ACCESS(checkedObject)) return false;
61
67
  if (state.permissions[Permissions.READ]) return true;
@@ -131,8 +137,14 @@ export default class UserinfoStoreModule extends BaseStoreModule {
131
137
  try {
132
138
  await context.dispatch('RESET_STATE');
133
139
  const session = { ...defaultSession, ..._session };
134
- const scope = await context.dispatch('CONVERT_USER_SCOPE', session.scope);
135
- const permissions = await context.dispatch('CONVERT_USER_PERMISSIONS', session.permissions);
140
+ const scope = await context.dispatch(
141
+ 'CONVERT_USER_SCOPE',
142
+ session.scope,
143
+ );
144
+ const permissions = await context.dispatch(
145
+ 'CONVERT_USER_PERMISSIONS',
146
+ session.permissions,
147
+ );
136
148
  context.commit('SET_SESSION', { ...session, scope, permissions });
137
149
  await context.dispatch('SET_LOADING', false);
138
150
  } catch (err) {
@@ -140,13 +152,17 @@ export default class UserinfoStoreModule extends BaseStoreModule {
140
152
  }
141
153
  },
142
154
 
143
- LOGOUT: async (context, { authUrl = import.meta.env.VITE_AUTH_URL } = {}) => {
155
+ LOGOUT: async (
156
+ context,
157
+ { authUrl = import.meta.env.VITE_AUTH_URL } = {},
158
+ ) => {
144
159
  if (!authUrl) throw new Error('No authUrl for LOGOUT provided');
145
160
  await userinfo.logout();
146
161
  window.location.href = authUrl;
147
162
  },
148
163
 
149
- SET_APPLICATIONS_ACCESS: (context, access) => context.commit('SET_APPLICATIONS_ACCESS', access),
164
+ SET_APPLICATIONS_ACCESS: (context, access) =>
165
+ context.commit('SET_APPLICATIONS_ACCESS', access),
150
166
 
151
167
  SET_LOADING: (context, isLoading) => {
152
168
  context.commit('SET_LOADING', isLoading);
@@ -37,7 +37,8 @@ const breakpoint = reactive({
37
37
  width: 0,
38
38
  });
39
39
 
40
- const getClientWidth = () => Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
40
+ const getClientWidth = () =>
41
+ Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
41
42
 
42
43
  const getClientHeight = () =>
43
44
  Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
@@ -60,7 +60,10 @@ describe('Case converters', () => {
60
60
 
61
61
  it('Camel-Snake Arrays', () => {
62
62
  const camelArr = ['camelToSnake', { camelToSnake: { camelToSnake: null } }];
63
- const snakeArr = ['camel_to_snake', { camel_to_snake: { camel_to_snake: null } }];
63
+ const snakeArr = [
64
+ 'camel_to_snake',
65
+ { camel_to_snake: { camel_to_snake: null } },
66
+ ];
64
67
  expect(objCamelToSnake(camelArr)).toEqual(snakeArr);
65
68
  expect(objSnakeToCamel(snakeArr)).toEqual(camelArr);
66
69
  });
@@ -9,11 +9,15 @@ describe('updateObject', () => {
9
9
  it('changes shallow value', () => {
10
10
  const original = { jest: 'jest' };
11
11
  const result = { jest: 'huest' };
12
- expect(updateObject({ obj: original, path: 'jest', value: 'huest' })).toEqual(result);
12
+ expect(
13
+ updateObject({ obj: original, path: 'jest', value: 'huest' }),
14
+ ).toEqual(result);
13
15
  });
14
16
  it('changes deep value', () => {
15
17
  const original = { jest: { deep: 'jest' } };
16
18
  const result = { jest: { deep: 'huest' } };
17
- expect(updateObject({ obj: original, path: 'jest.deep', value: 'huest' })).toEqual(result);
19
+ expect(
20
+ updateObject({ obj: original, path: 'jest.deep', value: 'huest' }),
21
+ ).toEqual(result);
18
22
  });
19
23
  });
@@ -1,8 +1,12 @@
1
1
  export const snakeToCamel = (str) =>
2
- str.replace(/([a-z])([_])([a-z])/g, (group, p1, p2, p3) => [p1, p3.toUpperCase()].join(''));
2
+ str.replace(/([a-z])([_])([a-z])/g, (group, p1, p2, p3) =>
3
+ [p1, p3.toUpperCase()].join(''),
4
+ );
3
5
 
4
6
  export const camelToSnake = (str) =>
5
- str.replace(/([a-z])([A-Z])/g, (group, p1, p2) => [p1, '_', p2.toLowerCase()].join(''));
7
+ str.replace(/([a-z])([A-Z])/g, (group, p1, p2) =>
8
+ [p1, '_', p2.toLowerCase()].join(''),
9
+ );
6
10
 
7
11
  export const kebabToCamel = (str) =>
8
12
  str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', ''));
@@ -16,36 +20,40 @@ export const kebabToSnake = (str) =>
16
20
  export const snakeToKebab = (str) =>
17
21
  str.replace(/([-_][a-z])/g, (group) => group.replace('_', '-'));
18
22
 
19
- const convertObject = ({ self, converter }) => (obj, skipKeys) => {
20
- if (!obj) return obj;
21
- const newObj = {};
22
- if (Array.isArray(obj)) {
23
- return obj.map((value) => {
24
- if (typeof value === 'object') {
25
- return self(value, skipKeys);
23
+ const convertObject =
24
+ ({ self, converter }) =>
25
+ (obj, skipKeys) => {
26
+ if (!obj) return obj;
27
+ const newObj = {};
28
+ if (Array.isArray(obj)) {
29
+ return obj.map((value) => {
30
+ if (typeof value === 'object') {
31
+ return self(value, skipKeys);
32
+ }
33
+ if (typeof value === 'string') return converter(value);
34
+ return value; // number
35
+ });
36
+ }
37
+ Object.keys(obj).forEach((oldKey) => {
38
+ if (skipKeys.includes(oldKey)) {
39
+ newObj[oldKey] = obj[oldKey];
40
+ } else {
41
+ const newKey = converter(oldKey);
42
+ let value = obj[oldKey];
43
+ if (
44
+ Array.isArray(value) ||
45
+ (value !== null &&
46
+ value !== undefined &&
47
+ value.constructor === Object)
48
+ ) {
49
+ value = self(value, skipKeys);
50
+ }
51
+ newObj[newKey] = value;
26
52
  }
27
- if (typeof value === 'string') return converter(value);
28
- return value; // number
29
53
  });
30
- }
31
- Object.keys(obj).forEach((oldKey) => {
32
- if (skipKeys.includes(oldKey)) {
33
- newObj[oldKey] = obj[oldKey];
34
- } else {
35
- const newKey = converter(oldKey);
36
- let value = obj[oldKey];
37
- if (
38
- Array.isArray(value) ||
39
- (value !== null && value !== undefined && value.constructor === Object)
40
- ) {
41
- value = self(value, skipKeys);
42
- }
43
- newObj[newKey] = value;
44
- }
45
- });
46
54
 
47
- return newObj;
48
- };
55
+ return newObj;
56
+ };
49
57
 
50
58
  export const objSnakeToCamel = (obj, skipKeys = []) => {
51
59
  return convertObject({
@@ -1,11 +1,11 @@
1
1
  import ComponentSize from '../enums/ComponentSize/ComponentSize.enum.js';
2
2
 
3
3
  export enum eComponentSize {
4
- XS = 'xs',
5
- SM = 'sm',
6
- MD = 'md',
7
- LG = 'lg',
8
- XL = 'xl',
4
+ XS = 'xs',
5
+ SM = 'sm',
6
+ MD = 'md',
7
+ LG = 'lg',
8
+ XL = 'xl',
9
9
  }
10
10
 
11
11
  const numerics = Object.values(ComponentSize).reduce((nums, size, index) => {
@@ -67,6 +67,9 @@ export const greaterThen = (s1, s2) => {
67
67
  * @param s2
68
68
  * @returns {boolean}
69
69
  */
70
- export const greaterOrEqual = (s1: eComponentSize, s2: eComponentSize): boolean => {
70
+ export const greaterOrEqual = (
71
+ s1: eComponentSize,
72
+ s2: eComponentSize,
73
+ ): boolean => {
71
74
  return compareSize(s1, s2) >= 0;
72
75
  };
@@ -1,5 +1,6 @@
1
1
  import lodashDebounce from 'lodash/debounce.js';
2
2
 
3
- const debounce = (fn, options, wait = 1000) => lodashDebounce(fn, wait, options);
3
+ const debounce = (fn, options, wait = 1000) =>
4
+ lodashDebounce(fn, wait, options);
4
5
 
5
6
  export default debounce;
@@ -4,14 +4,10 @@ import eventBus from './eventBus.js';
4
4
  import isEmpty from './isEmpty.js';
5
5
  import prettifyFileSize from './prettifyFileSize.js';
6
6
  import prettifyTime from './prettifyTime.js';
7
- import preventHiddenPageCallsDecorator
8
- from './preventHiddenPageCallsDecorator.js';
7
+ import preventHiddenPageCallsDecorator from './preventHiddenPageCallsDecorator.js';
9
8
  import saveAsJSON from './saveAsJSON.js';
10
9
  import { wtlog } from './logger.js';
11
- import {
12
- sortToQueryAdapter,
13
- queryToSortAdapter,
14
- } from './sortQueryAdapters.js';
10
+ import { sortToQueryAdapter, queryToSortAdapter } from './sortQueryAdapters.js';
15
11
  import updateObject from './updateObject.js';
16
12
  import {
17
13
  compareSize,
@@ -32,12 +28,10 @@ import {
32
28
  objCamelToKebab,
33
29
  } from './caseConverters.js';
34
30
 
35
-
36
31
  export {
37
32
  // sortQueryAdapters.js
38
33
  sortToQueryAdapter,
39
34
  queryToSortAdapter,
40
-
41
35
  updateObject,
42
36
  preventHiddenPageCallsDecorator,
43
37
  saveAsJSON,
@@ -6,8 +6,8 @@ const validateConfig = (config) => {
6
6
 
7
7
  const logger =
8
8
  (globalApp) =>
9
- (type) =>
10
- (...params) => {
9
+ (type) =>
10
+ (...params) => {
11
11
  if (validateConfig(params[0])) {
12
12
  const config = params[0];
13
13
 
@@ -16,9 +16,9 @@ const logger =
16
16
  const path = window?.location?.href || 'non-browser env';
17
17
 
18
18
  return (...msgs) => {
19
- const prependix = `@webitel/${app}:${entity}:${module}:`;
19
+ const prependix = `@webitel/${app}:${entity}:${module}:`;
20
20
 
21
- const appendix = `[${timestamp}][${path}]`;
21
+ const appendix = `[${timestamp}][${path}]`;
22
22
 
23
23
  return console[type](prependix, ...msgs, appendix);
24
24
  };