@vc-shell/framework 1.0.289 → 1.0.291

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 (178) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/core/composables/index.ts +1 -0
  3. package/core/composables/useTheme/index.ts +60 -0
  4. package/core/directives/loading/styles.css +6 -1
  5. package/dist/core/composables/index.d.ts +1 -0
  6. package/dist/core/composables/index.d.ts.map +1 -1
  7. package/dist/core/composables/useTheme/index.d.ts +11 -0
  8. package/dist/core/composables/useTheme/index.d.ts.map +1 -0
  9. package/dist/framework.js +27889 -27362
  10. package/dist/index.css +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/locales/en.json +6 -0
  13. package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts +56 -0
  14. package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts.map +1 -0
  15. package/dist/shared/components/app-bar-button/index.d.ts +2 -0
  16. package/dist/shared/components/app-bar-button/index.d.ts.map +1 -0
  17. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
  18. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  19. package/dist/shared/components/index.d.ts +3 -0
  20. package/dist/shared/components/index.d.ts.map +1 -1
  21. package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
  22. package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -1
  23. package/dist/shared/components/notification-template/notification-template.vue.d.ts.map +1 -1
  24. package/dist/shared/components/sidebar/index.d.ts +2 -0
  25. package/dist/shared/components/sidebar/index.d.ts.map +1 -0
  26. package/dist/shared/components/sidebar/sidebar.vue.d.ts +49 -0
  27. package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -0
  28. package/dist/shared/components/theme-selector/index.d.ts +2 -0
  29. package/dist/shared/components/theme-selector/index.d.ts.map +1 -0
  30. package/dist/shared/components/theme-selector/theme-selector.vue.d.ts +3 -0
  31. package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -0
  32. package/dist/shared/components/user-dropdown-button/index.d.ts +6 -0
  33. package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -1
  34. package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +1 -0
  35. package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
  36. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  37. package/dist/shared/modules/dynamic/types/index.d.ts +3 -0
  38. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  39. package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts +16 -3
  40. package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
  41. package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts +7 -7
  42. package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts.map +1 -1
  43. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +24 -3
  44. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
  45. package/dist/shared/pages/InvitePage/components/invite/index.d.ts +24 -1
  46. package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -1
  47. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +24 -3
  48. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
  49. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +24 -1
  50. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -1
  51. package/dist/tailwind.config.d.ts +42 -15
  52. package/dist/tailwind.config.d.ts.map +1 -1
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
  55. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
  56. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
  57. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
  58. package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
  59. package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
  60. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  61. package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
  62. package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -1
  63. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  64. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  65. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  66. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
  67. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
  68. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
  69. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +26 -0
  70. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
  71. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +26 -0
  72. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  73. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
  74. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
  75. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
  76. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  77. package/dist/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue.d.ts.map +1 -1
  78. package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts +1 -0
  79. package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -1
  80. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  81. package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
  82. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +1 -0
  83. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
  84. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
  85. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +15 -0
  86. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
  87. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +3 -0
  88. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  89. package/package.json +4 -4
  90. package/shared/components/app-bar-button/app-bar-button.vue +169 -0
  91. package/shared/components/app-bar-button/index.ts +1 -0
  92. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +138 -38
  93. package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +10 -1
  94. package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +55 -30
  95. package/shared/components/change-password/change-password.vue +7 -1
  96. package/shared/components/common/popup/vc-popup-error.vue +1 -1
  97. package/shared/components/common/popup/vc-popup-warning.vue +1 -1
  98. package/shared/components/index.ts +3 -0
  99. package/shared/components/language-selector/language-selector.vue +55 -39
  100. package/shared/components/notification-dropdown/_internal/notification/notification.vue +7 -1
  101. package/shared/components/notification-dropdown/notification-dropdown.vue +96 -83
  102. package/shared/components/notification-template/notification-template.vue +66 -22
  103. package/shared/components/notifications/styles/index.scss +1 -0
  104. package/shared/components/sidebar/index.ts +1 -0
  105. package/shared/components/sidebar/sidebar.vue +96 -0
  106. package/shared/components/theme-selector/index.ts +1 -0
  107. package/shared/components/theme-selector/theme-selector.vue +95 -0
  108. package/shared/components/user-dropdown-button/user-dropdown-button.vue +155 -86
  109. package/shared/modules/assets/components/assets-details/assets-details.vue +9 -2
  110. package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +16 -6
  111. package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +1 -1
  112. package/shared/modules/dynamic/helpers/nodeBuilder.ts +1 -1
  113. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +6 -2
  114. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +16 -2
  115. package/shared/modules/dynamic/types/index.ts +3 -0
  116. package/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue +14 -9
  117. package/shared/pages/InvitePage/components/invite/Invite.vue +59 -15
  118. package/shared/pages/LoginPage/components/login/Login.vue +78 -22
  119. package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +67 -15
  120. package/tailwind.config.ts +281 -15
  121. package/ui/components/atoms/vc-badge/vc-badge.vue +38 -23
  122. package/ui/components/atoms/vc-button/vc-button.vue +37 -34
  123. package/ui/components/atoms/vc-card/vc-card.vue +17 -11
  124. package/ui/components/atoms/vc-col/vc-col.vue +4 -6
  125. package/ui/components/atoms/vc-container/vc-container.vue +26 -8
  126. package/ui/components/atoms/vc-hint/vc-hint.vue +8 -2
  127. package/ui/components/atoms/vc-icon/vc-icon.vue +3 -3
  128. package/ui/components/atoms/vc-image/vc-image.vue +33 -9
  129. package/ui/components/atoms/vc-label/vc-label.vue +38 -9
  130. package/ui/components/atoms/vc-link/vc-link.vue +15 -8
  131. package/ui/components/atoms/vc-loading/vc-loading.vue +37 -8
  132. package/ui/components/atoms/vc-progress/vc-progress.vue +29 -21
  133. package/ui/components/atoms/vc-row/vc-row.vue +4 -2
  134. package/ui/components/atoms/vc-status/vc-status.vue +29 -20
  135. package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +20 -3
  136. package/ui/components/atoms/vc-switch/vc-switch.vue +41 -17
  137. package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +35 -9
  138. package/ui/components/atoms/vc-video/vc-video.vue +28 -6
  139. package/ui/components/atoms/vc-widget/vc-widget.vue +59 -28
  140. package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +29 -27
  141. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +34 -11
  142. package/ui/components/molecules/vc-checkbox/vc-checkbox.vue +43 -21
  143. package/ui/components/molecules/vc-editor/vc-editor.vue +70 -32
  144. package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +32 -16
  145. package/ui/components/molecules/vc-field/vc-field.vue +36 -13
  146. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +75 -25
  147. package/ui/components/molecules/vc-input/vc-input.vue +279 -218
  148. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +24 -2
  149. package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +102 -64
  150. package/ui/components/molecules/vc-notification/vc-notification.vue +40 -15
  151. package/ui/components/molecules/vc-pagination/vc-pagination.vue +19 -15
  152. package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +18 -23
  153. package/ui/components/molecules/vc-rating/vc-rating.vue +9 -5
  154. package/ui/components/molecules/vc-select/vc-select.vue +211 -65
  155. package/ui/components/molecules/vc-slider/vc-slider.vue +32 -13
  156. package/ui/components/molecules/vc-textarea/vc-textarea.vue +17 -12
  157. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +68 -14
  158. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +112 -122
  159. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +213 -96
  160. package/ui/components/organisms/vc-app/vc-app.vue +41 -15
  161. package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +78 -30
  162. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +81 -59
  163. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +27 -13
  164. package/ui/components/organisms/vc-blade/vc-blade.vue +177 -46
  165. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +40 -11
  166. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +52 -18
  167. package/ui/components/organisms/vc-gallery/vc-gallery.vue +38 -6
  168. package/ui/components/organisms/vc-login-form/vc-login-form.vue +40 -14
  169. package/ui/components/organisms/vc-popup/vc-popup.vue +186 -44
  170. package/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue +25 -6
  171. package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue +48 -12
  172. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +130 -60
  173. package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +55 -7
  174. package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +17 -5
  175. package/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue +38 -6
  176. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +111 -62
  177. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +139 -46
  178. package/ui/components/organisms/vc-table/vc-table.vue +370 -128
@@ -38,15 +38,15 @@
38
38
  <template v-if="!readonly">
39
39
  <VcIcon
40
40
  icon="fas fa-cloud-upload-alt"
41
- class="tw-text-[100px] tw-text-[#41afe6]"
41
+ class="tw-text-[100px] tw-text-[color:var(--assets-manager-empty-icon-color)]"
42
42
  ></VcIcon>
43
- <div class="tw-m-4 tw-text-xl tw-font-medium tw-text-center">
43
+ <div class="tw-m-4 tw-text-l tw-font-medium tw-text-center">
44
44
  {{ t("ASSETS_MANAGER.EMPTY.UPLOAD_ASSETS") }}
45
45
  </div>
46
46
  <VcButton @click="toggleUploader">{{ t("ASSETS_MANAGER.EMPTY.UPLOAD") }}</VcButton>
47
47
  </template>
48
48
  <template v-else>
49
- <div class="tw-m-4 tw-text-xl tw-font-medium tw-text-center">
49
+ <div class="tw-m-4 tw-text-l tw-font-medium tw-text-center">
50
50
  {{ t("ASSETS_MANAGER.EMPTY.NO_ASSETS") }}
51
51
  </div>
52
52
  </template>
@@ -75,7 +75,7 @@
75
75
  <template v-else>
76
76
  <VcIcon
77
77
  :icon="getFileThumbnail(item.name ?? '')"
78
- class="tw-text-[#a9bfd2] tw-text-[38px]"
78
+ class="tw-text-[color:var(--assets-manager-thumbnail-color)] tw-text-[38px]"
79
79
  ></VcIcon>
80
80
  </template>
81
81
  </div>
@@ -90,7 +90,9 @@
90
90
 
91
91
  <!-- Mobile -->
92
92
  <template #mobile-item="{ item }">
93
- <div class="tw-border-b tw-border-solid tw-border-b-[#e3e7ec] tw-p-3 tw-flex tw-flex-nowrap">
93
+ <div
94
+ class="tw-border-b tw-border-solid tw-border-b-[--assets-manager-mobile-border] tw-p-3 tw-flex tw-flex-nowrap"
95
+ >
94
96
  <template v-if="isImage(item.name ?? '')">
95
97
  <VcImage
96
98
  :bordered="true"
@@ -104,7 +106,7 @@
104
106
  <div class="tw-w-12 tw-flex tw-items-center tw-justify-center">
105
107
  <VcIcon
106
108
  :icon="getFileThumbnail(item.name ?? '')"
107
- class="tw-text-[#a9bfd2] tw-w-12 tw-text-[48px]"
109
+ class="tw-text-[color:var(--assets-manager-thumbnail-color)] tw-w-12 tw-text-[48px]"
108
110
  ></VcIcon>
109
111
  </div>
110
112
  </template>
@@ -404,3 +406,11 @@ defineExpose({
404
406
  title: t("ASSETS_MANAGER.TITLE"),
405
407
  });
406
408
  </script>
409
+
410
+ <style lang="scss">
411
+ :root {
412
+ --assets-manager-empty-icon-color: var(--primary-400);
413
+ --assets-manager-thumbnail-color: var(--secondary-500);
414
+ --assets-manager-mobile-border: var(--info-100);
415
+ }
416
+ </style>
@@ -349,7 +349,7 @@ export default <Query>(args: {
349
349
  title
350
350
  ? h(
351
351
  "div",
352
- { class: "tw-mb-4 tw-text-[#a1c0d4] tw-font-bold tw-text-[17px]" },
352
+ { class: "tw-mb-4 tw-text-[color:var(--secondary-500)] tw-font-bold tw-text-[17px]" },
353
353
  unref(computed(() => t(title))),
354
354
  )
355
355
  : undefined,
@@ -147,7 +147,7 @@ function nodeBuilder<
147
147
  "data-test-id": controlSchema.id,
148
148
  classNames:
149
149
  "horizontalSeparator" in controlSchema && controlSchema.horizontalSeparator
150
- ? "tw-border-b tw-border-solid tw-border-b-[#e5e5e5] tw-mb-[5px] tw-pb-[21px]"
150
+ ? "tw-border-b tw-border-solid tw-border-b-[var(--base-border-color, var(--neutrals-200))] tw-mb-[5px] tw-pb-[21px]"
151
151
  : "",
152
152
  });
153
153
 
@@ -382,6 +382,10 @@ defineExpose({
382
382
  </script>
383
383
 
384
384
  <style lang="scss">
385
+ :root {
386
+ --dynamic-form-decline-color: var(--danger-500);
387
+ --dynamic-form-mobile-border: var(--primary-100);
388
+ }
385
389
  .item-details {
386
390
  &__inner {
387
391
  @apply tw-overflow-hidden tw-min-h-full tw-flex tw-grow tw-basis-0;
@@ -392,7 +396,7 @@ defineExpose({
392
396
  }
393
397
 
394
398
  &__decline-icon {
395
- @apply tw-text-[#ff4a4a] tw-mr-3;
399
+ @apply tw-text-[color:var(--dynamic-form-decline-color)] tw-mr-3;
396
400
  }
397
401
 
398
402
  .vc-app_mobile &__inner {
@@ -400,7 +404,7 @@ defineExpose({
400
404
  }
401
405
 
402
406
  .vc-app_mobile &__content {
403
- @apply tw-border-r-0 tw-border-b tw-border-solid tw-border-b-[#eaedf3] tw-overflow-visible;
407
+ @apply tw-border-r-0 tw-border-b tw-border-solid tw-border-b-[--dynamic-form-mobile-border] tw-overflow-visible;
404
408
  }
405
409
  }
406
410
  </style>
@@ -26,7 +26,7 @@
26
26
  </template>
27
27
  <template v-else>
28
28
  <div
29
- v-if="!isWidgetView && scope?.breadcrumbs"
29
+ v-if="!isWidgetView && toValue(scope?.breadcrumbs)?.length"
30
30
  :class="[
31
31
  {
32
32
  '-tw-mb-4': typeof tableData?.header === 'undefined' || tableData.header,
@@ -46,9 +46,10 @@
46
46
  :expanded="expanded"
47
47
  :total-label="$t(`${localizationPrefix}.PAGES.LIST.TABLE.TOTALS`)"
48
48
  :active-filter-count="activeFilterCount"
49
+ :disable-filter="filterDisable"
49
50
  >
50
51
  <template
51
- v-if="isFilterVisible"
52
+ v-if="isFilterVisible && bladeOptions.tableData?.filter"
52
53
  #filters="{ closePanel }"
53
54
  >
54
55
  <filterComponent :close="closePanel" />
@@ -302,6 +303,19 @@ sort.value = query.value.sort ?? "createdDate:DESC";
302
303
 
303
304
  const unreffedScope = reactiveComputed(() => toValue(scope) ?? {});
304
305
 
306
+ const filterDisable = computed(() => {
307
+ if (tableData?.value?.filter?.disabled?.method) {
308
+ const disableFilterMethod = toValue(unreffedScope)?.[tableData?.value?.filter?.disabled.method];
309
+
310
+ if (disableFilterMethod && typeof disableFilterMethod === "function") {
311
+ return disableFilterMethod();
312
+ } else {
313
+ return toValue(disableFilterMethod);
314
+ }
315
+ }
316
+ return false;
317
+ });
318
+
305
319
  const { tableTemplates } = useTableTemplates(tableData);
306
320
 
307
321
  const calculateColumns = (columns: ListContentSchema["columns"]) => {
@@ -1103,6 +1103,9 @@ export type ControlSchema =
1103
1103
  | RadioButtonSchema;
1104
1104
 
1105
1105
  export interface FilterBase {
1106
+ disabled?: {
1107
+ method: string;
1108
+ };
1106
1109
  columns: {
1107
1110
  /**
1108
1111
  * @deprecated use 'label' in 'controls' instead
@@ -1,31 +1,36 @@
1
1
  <template>
2
2
  <div
3
- class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center"
3
+ class="vc-change-password"
4
4
  :style="backgroundImageHandler"
5
5
  >
6
- <ChangePassComponent :forced="forced"> </ChangePassComponent>
6
+ <ChangePassComponent :forced="forced" />
7
7
  </div>
8
8
  </template>
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import { computed } from "vue";
12
12
  import { useRouter } from "vue-router";
13
+ import { ChangePassword as ChangePassComponent } from "../../../../components/change-password";
13
14
 
14
15
  const router = useRouter();
15
16
 
16
17
  const forced = router.currentRoute.value.meta?.forced as boolean | undefined;
17
- const bgimage = router.currentRoute.value.meta?.bgimage;
18
-
19
- import { ChangePassword as ChangePassComponent } from "../../../../components/change-password";
20
18
 
21
19
  export interface Props {
22
- background?: string;
23
- userName?: string;
20
+ background: string;
24
21
  }
25
22
 
26
- const props = defineProps<Props>();
23
+ const props = withDefaults(defineProps<Props>(), {
24
+ background: "/assets/background.jpg",
25
+ });
27
26
 
28
27
  const backgroundImageHandler = computed(() => {
29
- return `background: url(${bgimage}) center / cover no-repeat`;
28
+ return `background: url(${props.background}) center / cover no-repeat`;
30
29
  });
31
30
  </script>
31
+
32
+ <style lang="scss">
33
+ .vc-change-password {
34
+ @apply tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center;
35
+ }
36
+ </style>
@@ -1,23 +1,24 @@
1
1
  <template>
2
- <div class="vc-app tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-m-0 vc-theme_light">
2
+ <div class="vc-invite-page">
3
3
  <VcLoading
4
4
  v-if="loading"
5
5
  active
6
6
  ></VcLoading>
7
7
 
8
8
  <VcLoginForm
9
- logo="/assets/logo-white.svg"
10
- background="/assets/background.jpg"
9
+ :logo="customization.logo"
10
+ :background="background"
11
11
  :title="t('INVITATION.TITLE')"
12
12
  >
13
13
  <VcForm>
14
14
  <VcInput
15
- class="tw-mb-4 tw-mt-1"
15
+ class="vc-invite-page__input"
16
16
  :label="t('INVITATION.FIELDS.EMAIL.LABEL')"
17
17
  :model-value="userName"
18
18
  name="username"
19
19
  disabled
20
20
  ></VcInput>
21
+
21
22
  <Field
22
23
  v-slot="{ field, errorMessage, handleChange, errors }"
23
24
  :label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
@@ -29,7 +30,7 @@
29
30
  v-bind="field"
30
31
  ref="passwordField"
31
32
  v-model="form.password"
32
- class="tw-mb-4 tw-mt-1"
33
+ class="vc-invite-page__input"
33
34
  :label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
34
35
  :placeholder="t('INVITATION.FIELDS.PASSWORD.PLACEHOLDER')"
35
36
  type="password"
@@ -45,6 +46,7 @@
45
46
  "
46
47
  ></VcInput>
47
48
  </Field>
49
+
48
50
  <Field
49
51
  v-slot="{ field, errorMessage, handleChange, errors }"
50
52
  :label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
@@ -56,7 +58,7 @@
56
58
  v-bind="field"
57
59
  ref="confirmPasswordField"
58
60
  v-model="form.confirmPassword"
59
- class="tw-mb-4"
61
+ class="vc-invite-page__input--small"
60
62
  :label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
61
63
  :placeholder="t('INVITATION.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
62
64
  :disabled="!form.tokenIsValid"
@@ -73,10 +75,11 @@
73
75
  @keyup.enter="acceptInvitation"
74
76
  ></VcInput>
75
77
  </Field>
76
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
78
+
79
+ <div class="vc-invite-page__button-container">
77
80
  <span
78
81
  v-if="$isDesktop.value"
79
- class="tw-grow tw-basis-0"
82
+ class="vc-invite-page__spacer"
80
83
  ></span>
81
84
  <vc-button
82
85
  :disabled="loading || !form.isValid || !form.tokenIsValid"
@@ -89,7 +92,7 @@
89
92
  <VcHint
90
93
  v-for="error in form.errors"
91
94
  :key="error"
92
- class="tw-mt-3"
95
+ class="vc-invite-page__hint"
93
96
  style="color: #f14e4e"
94
97
  >
95
98
  <!-- TODO: stylizing-->
@@ -104,22 +107,31 @@
104
107
  import { reactive, onMounted, computed } from "vue";
105
108
  import { useRouter } from "vue-router";
106
109
  import { useIsFormValid, Field, useIsFormDirty, useForm } from "vee-validate";
107
- import { useUser } from "./../../../../../core/composables";
110
+ import { useUser, useSettings } from "./../../../../../core/composables";
108
111
  import { useI18n } from "vue-i18n";
109
112
 
110
113
  useForm({ validateOnMount: false });
111
114
 
112
- const props = defineProps<{
113
- userId: string;
114
- userName: string;
115
- token: string;
116
- }>();
115
+ const props = withDefaults(
116
+ defineProps<{
117
+ userId: string;
118
+ userName: string;
119
+ token: string;
120
+ logo: string;
121
+ background: string;
122
+ }>(),
123
+ {
124
+ background: "/assets/background.jpg",
125
+ logo: "/assets/logo-white.svg",
126
+ },
127
+ );
117
128
 
118
129
  const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUser();
119
130
  const router = useRouter();
120
131
  const { t } = useI18n({ useScope: "global" });
121
132
  const isFormValid = useIsFormValid();
122
133
  const isDirty = useIsFormDirty();
134
+ const { uiSettings, loading: customizationLoading } = useSettings();
123
135
  const form = reactive<{
124
136
  isValid: boolean;
125
137
  tokenIsValid: boolean;
@@ -169,4 +181,36 @@ const acceptInvitation = async () => {
169
181
  form.errors = result.errors as string[];
170
182
  }
171
183
  };
184
+
185
+ const customization = computed(() => {
186
+ return {
187
+ logo: !customizationLoading.value ? uiSettings.value?.logo || props.logo : "",
188
+ };
189
+ });
172
190
  </script>
191
+
192
+ <style lang="scss">
193
+ .vc-invite-page {
194
+ @apply tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-m-0;
195
+ }
196
+
197
+ .vc-invite-page__input {
198
+ @apply tw-mb-4 tw-mt-1;
199
+ }
200
+
201
+ .vc-invite-page__input--small {
202
+ @apply tw-mb-4;
203
+ }
204
+
205
+ .vc-invite-page__button-container {
206
+ @apply tw-flex tw-justify-center tw-items-center tw-pt-2;
207
+ }
208
+
209
+ .vc-invite-page__spacer {
210
+ @apply tw-grow tw-basis-0;
211
+ }
212
+
213
+ .vc-invite-page__hint {
214
+ @apply tw-mt-3;
215
+ }
216
+ </style>
@@ -3,6 +3,7 @@
3
3
  :logo="customization.logo"
4
4
  :background="background"
5
5
  :title="title"
6
+ class="vc-login-page"
6
7
  >
7
8
  <template v-if="isLogin">
8
9
  <VcForm @submit.prevent="login">
@@ -16,7 +17,7 @@
16
17
  <VcInput
17
18
  ref="loginField"
18
19
  v-model="form.username"
19
- class="tw-mb-4 tw-mt-1"
20
+ class="vc-login-page__input"
20
21
  :label="t('LOGIN.FIELDS.LOGIN.LABEL')"
21
22
  :placeholder="t('LOGIN.FIELDS.LOGIN.PLACEHOLDER')"
22
23
  required
@@ -35,7 +36,7 @@
35
36
  <VcInput
36
37
  ref="passwordField"
37
38
  v-model="form.password"
38
- class="tw-mb-4"
39
+ class="vc-login-page__input--small"
39
40
  :label="t('LOGIN.FIELDS.PASSWORD.LABEL')"
40
41
  :placeholder="t('LOGIN.FIELDS.PASSWORD.PLACEHOLDER')"
41
42
  type="password"
@@ -49,7 +50,7 @@
49
50
 
50
51
  <div
51
52
  v-if="!!forgotPassword"
52
- class="tw-flex tw-justify-end tw-items-center tw-pt-2"
53
+ class="vc-login-page__forgot-password-container"
53
54
  >
54
55
  <VcButton
55
56
  text
@@ -59,10 +60,10 @@
59
60
  {{ t("LOGIN.FORGOT_PASSWORD_BUTTON") }}
60
61
  </VcButton>
61
62
  </div>
62
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
63
+ <div class="vc-login-page__button-container">
63
64
  <vc-button
64
65
  :disabled="loading || !isValid"
65
- class="tw-w-28"
66
+ class="vc-login-page__submit-button"
66
67
  @click="login"
67
68
  >
68
69
  {{ t("LOGIN.BUTTON") }}
@@ -71,28 +72,27 @@
71
72
  </VcForm>
72
73
  <div
73
74
  v-if="loginProviders && loginProviders.length"
74
- class="tw-mt-4"
75
+ class="vc-login-page__separator"
75
76
  >
76
- <div
77
- class="tw-flex tw-items-center tw-text-center tw-uppercase tw-text-[color:var(--separator-text)] before:tw-content-[''] before:tw-flex-1 before:tw-border-b before:tw-border-b-[color:var(--separator)] before:tw-mr-2 after:tw-content-[''] after:tw-flex-1 after:tw-border-b after:tw-border-b-[color:var(--separator)] after:tw-ml-2"
78
- >
77
+ <div class="vc-login-page__separator-line">
79
78
  <!-- TODO add to localization -->
80
79
  OR
81
80
  </div>
82
- <div class="tw-flex tw-justify-center tw-mt-4 tw-flex-wrap tw-gap-2">
81
+ <div class="vc-login-page__external-buttons">
83
82
  <VcButton
84
83
  v-for="external in loginProviders"
85
84
  :key="external.authenticationType"
86
85
  outline
87
86
  @click="externalSignOn(external.authenticationType ?? '')"
88
- ><div class="tw-flex tw-flex-row tw-items-center">
87
+ >
88
+ <div class="vc-login-page__external-button-content">
89
89
  <img
90
90
  :src="externalAuthIcon(external.authenticationType ?? '')"
91
91
  :alt="external.authenticationType"
92
- class="tw-h-5 tw-mr-2"
92
+ class="vc-login-page__external-icon"
93
93
  />{{ external.displayName }}
94
- </div></VcButton
95
- >
94
+ </div>
95
+ </VcButton>
96
96
  </div>
97
97
  </div>
98
98
  </template>
@@ -110,7 +110,7 @@
110
110
  v-bind="field"
111
111
  ref="forgotPasswordField"
112
112
  v-model="forgotPasswordForm.loginOrEmail"
113
- class="tw-mb-4 tw-mt-1"
113
+ class="vc-login-page__input"
114
114
  :label="t('LOGIN.FIELDS.FORGOT_PASSWORD.LABEL')"
115
115
  :placeholder="t('LOGIN.FIELDS.FORGOT_PASSWORD.PLACEHOLDER')"
116
116
  :hint="t('LOGIN.RESET_EMAIL_TEXT')"
@@ -120,7 +120,7 @@
120
120
  @update:model-value="handleChange"
121
121
  ></VcInput>
122
122
  </Field>
123
- <div class="tw-flex tw-justify-between tw-items-center tw-pt-2">
123
+ <div class="vc-login-page__forgot-form-buttons">
124
124
  <vc-button
125
125
  text
126
126
  type="button"
@@ -140,10 +140,10 @@
140
140
 
141
141
  <template v-if="requestPassResult.succeeded && forgotPasswordRequestSent">
142
142
  <div>{{ t("LOGIN.RESET_EMAIL_SENT") }}</div>
143
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
143
+ <div class="vc-login-page__button-container">
144
144
  <span
145
145
  v-if="$isDesktop.value"
146
- class="tw-grow tw-basis-0"
146
+ class="vc-login-page__spacer"
147
147
  ></span>
148
148
  <vc-button
149
149
  :disabled="loading"
@@ -157,7 +157,7 @@
157
157
 
158
158
  <VcHint
159
159
  v-if="!signInResult.succeeded"
160
- class="tw-mt-3"
160
+ class="vc-login-page__error-hint"
161
161
  style="color: #f14e4e"
162
162
  >
163
163
  <!-- TODO: stylizing-->
@@ -165,7 +165,7 @@
165
165
  </VcHint>
166
166
  <VcHint
167
167
  v-if="!requestPassResult.succeeded"
168
- class="tw-mt-3"
168
+ class="vc-login-page__error-hint"
169
169
  style="color: #f14e4e"
170
170
  >
171
171
  <!-- TODO: stylizing-->
@@ -173,6 +173,7 @@
173
173
  </VcHint>
174
174
  </VcLoginForm>
175
175
  </template>
176
+
176
177
  <!-- eslint-disable @typescript-eslint/no-explicit-any -->
177
178
  <script lang="ts" setup>
178
179
  import { ref, reactive, computed, onMounted, Ref } from "vue";
@@ -313,7 +314,62 @@ console.debug("Init login-page");
313
314
 
314
315
  <style lang="scss">
315
316
  :root {
316
- --separator: #d3dbe9;
317
- --separator-text: #83a3be;
317
+ --login-separator: var(--secondary-200);
318
+ --login-separator-text: var(--primary-300);
319
+ --login-error: var(--base-error-color, var(--danger-500));
320
+ }
321
+
322
+ .vc-login-page {
323
+ &__input {
324
+ @apply tw-mb-4 tw-mt-1;
325
+ }
326
+
327
+ &__input--small {
328
+ @apply tw-mb-4;
329
+ }
330
+
331
+ &__forgot-password-container {
332
+ @apply tw-flex tw-justify-end tw-items-center tw-pt-2;
333
+ }
334
+
335
+ &__button-container {
336
+ @apply tw-flex tw-justify-center tw-items-center tw-pt-2;
337
+ }
338
+
339
+ &__submit-button {
340
+ @apply tw-w-28;
341
+ }
342
+
343
+ &__separator {
344
+ @apply tw-mt-4;
345
+ }
346
+
347
+ &__separator-line {
348
+ @apply tw-flex tw-items-center tw-text-center tw-uppercase tw-text-[color:var(--login-separator-text)] before:tw-content-[''] before:tw-flex-1 before:tw-border-b before:tw-border-b-[color:var(--login-separator)] before:tw-mr-2 after:tw-content-[''] after:tw-flex-1 after:tw-border-b after:tw-border-b-[color:var(--login-separator)] after:tw-ml-2;
349
+ }
350
+
351
+ &__external-buttons {
352
+ @apply tw-flex tw-justify-center tw-mt-4 tw-flex-wrap tw-gap-2;
353
+ }
354
+
355
+ &__external-button-content {
356
+ @apply tw-flex tw-flex-row tw-items-center;
357
+ }
358
+
359
+ &__external-icon {
360
+ @apply tw-h-5 tw-mr-2;
361
+ }
362
+
363
+ &__error-hint {
364
+ @apply tw-mt-3 tw-text-[color:var(--login-error)];
365
+ }
366
+
367
+ &__forgot-form-buttons {
368
+ @apply tw-flex tw-justify-between tw-items-center tw-pt-2;
369
+ }
370
+
371
+ &__spacer {
372
+ @apply tw-grow tw-basis-0;
373
+ }
318
374
  }
319
375
  </style>