@it-enterprise/forcebpm-ui-kit 1.0.2-beta.3 → 1.0.2-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { default as FHtmlContent } from './src/FHtmlContent.vue'
2
2
  export { default as FAvatar } from './src/FAvatar.vue'
3
3
  export { default as FConfirmModal } from './src/FConfirmModal.vue'
4
+ export { default as FPreLoader } from './src/FPreLoader.vue'
5
+ export { default as FNoData } from './src/FNoData.vue'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@it-enterprise/forcebpm-ui-kit",
3
- "version": "1.0.2-beta.3",
3
+ "version": "1.0.2-beta.5",
4
4
  "description": "FBPM UI Kit",
5
5
  "author": "it-enterprise",
6
6
  "license": "MIT",
@@ -22,6 +22,14 @@
22
22
  "./FConfirmModal": {
23
23
  "import": "./src/FConfirmModal.vue",
24
24
  "require": "./src/FConfirmModal.vue"
25
+ },
26
+ "./FPreLoader": {
27
+ "import": "./src/FPreLoader.vue",
28
+ "require": "./src/FPreLoader.vue"
29
+ },
30
+ "./FNoData": {
31
+ "import": "./src/FNoData.vue",
32
+ "require": "./src/FNoData.vue"
25
33
  }
26
34
  },
27
35
  "files": [
@@ -1,8 +1,6 @@
1
1
  <script setup>
2
2
  // FConfirmModal
3
3
  import { onBeforeMount, onBeforeUnmount, ref, defineEmits } from 'vue'
4
- import events from '@/plugins/eventBus/events'
5
- import emitter from '@/plugins/eventBus'
6
4
 
7
5
  const show = ref(false)
8
6
  const loading = ref(false)
@@ -38,11 +36,12 @@ const declineHandler = () => {
38
36
  }
39
37
 
40
38
  onBeforeMount(() => {
41
- emitter.on(events.confirmModal, showModal)
39
+ emit('confirmModalMount', showModal)
42
40
  })
43
41
 
44
42
  onBeforeUnmount(() => {
45
- emitter.off(events.confirmModal, showModal)
43
+ emit('confirmModalUnmount', showModal)
44
+ // emitter.off(events.confirmModal, showModal)
46
45
  })
47
46
  </script>
48
47
  <template>
@@ -0,0 +1,60 @@
1
+ <script setup>
2
+ // FNoData
3
+ defineProps({
4
+ text: {
5
+ type: String,
6
+ default: null
7
+ },
8
+ height: {
9
+ type: String,
10
+ default: '100%',
11
+ validator: value => {
12
+ return /^(calc\([^()]+\)|\d+(\.\d+)?(px|em|rem|vh|vw|%)|auto)$/.test(value)
13
+ }
14
+ },
15
+ width: {
16
+ type: String,
17
+ default: 'auto',
18
+ validator: value => {
19
+ return /^(calc\([^()]+\)|\d+(\.\d+)?(px|em|rem|vh|vw|%)|auto)$/.test(value)
20
+ }
21
+ },
22
+ gradient: {
23
+ type: String,
24
+ default: ''
25
+ }
26
+ })
27
+
28
+ </script>
29
+
30
+ <template>
31
+ <div class="f-no-data" :style="`height: ${height}; width: ${width}`">
32
+ <div class="f-no-data-overlay" :style="`background: ${gradient}`">
33
+ <span class="f-no-data-text">{{ text || $t('noData.title') }}</span>
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <style lang="scss" scoped>
39
+ .f-no-data {
40
+ min-height: 150px;
41
+ position: relative;
42
+ .f-no-data-overlay {
43
+ position: absolute;
44
+ display: flex;
45
+ flex-direction: column;
46
+ align-items: center;
47
+ justify-content: center;
48
+ text-align: center;
49
+ height: 100%;
50
+ width: 100%;
51
+ color: rgb(var(--v-theme-primary));
52
+ top: calc(50% - 100% / 2);
53
+ left: calc(50% - 100% / 2);
54
+ font-size: 1em;
55
+ .f-no-data-text {
56
+ width: 250px;
57
+ }
58
+ }
59
+ }
60
+ </style>
@@ -0,0 +1,108 @@
1
+ <script setup>
2
+ // FPreLoader
3
+ const props = defineProps({
4
+ preLoaders: {
5
+ type: Array,
6
+ default: () => []
7
+ }
8
+ })
9
+ </script>
10
+
11
+ <template>
12
+ <v-overlay :model-value="!!props.preLoaders.length" z-index="208" opacity="0.5">
13
+ <div v-if="props.preLoaders.includes('tokenUpdate')" class="text-title">
14
+ {{ $t('updating') }}
15
+ </div>
16
+ <div class="lds-ellipsis">
17
+ <div></div>
18
+ <div></div>
19
+ <div></div>
20
+ <div></div>
21
+ </div>
22
+ </v-overlay>
23
+ </template>
24
+
25
+ <style lang="scss" scoped>
26
+ .v-overlay {
27
+ :deep(.v-overlay__scrim) {
28
+ background: rgb(var(--v-theme-background)) !important;
29
+ }
30
+ }
31
+
32
+ .v-overlay {
33
+ display: flex;
34
+ flex-direction: column;
35
+ align-items: center;
36
+ justify-content: center;
37
+ :deep(.v-overlay__content) {
38
+ display: flex;
39
+ flex-direction: column;
40
+ align-items: center;
41
+ justify-content: center;
42
+ }
43
+ }
44
+
45
+ .lds-ellipsis {
46
+ display: inline-block;
47
+ position: relative;
48
+ width: 80px;
49
+ height: 80px;
50
+ }
51
+
52
+ .lds-ellipsis div {
53
+ position: absolute;
54
+ top: 33px;
55
+ width: 13px;
56
+ height: 13px;
57
+ border-radius: 50%;
58
+ background: rgb(var(--v-theme-primary));
59
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
60
+ }
61
+
62
+ .lds-ellipsis div:nth-child(1) {
63
+ left: 8px;
64
+ animation: lds-ellipsis1 0.6s infinite;
65
+ }
66
+
67
+ .lds-ellipsis div:nth-child(2) {
68
+ left: 8px;
69
+ animation: lds-ellipsis2 0.6s infinite;
70
+ }
71
+
72
+ .lds-ellipsis div:nth-child(3) {
73
+ left: 32px;
74
+ animation: lds-ellipsis2 0.6s infinite;
75
+ }
76
+
77
+ .lds-ellipsis div:nth-child(4) {
78
+ left: 56px;
79
+ animation: lds-ellipsis3 0.6s infinite;
80
+ }
81
+
82
+ @keyframes lds-ellipsis1 {
83
+ 0% {
84
+ transform: scale(0);
85
+ }
86
+ 100% {
87
+ transform: scale(1);
88
+ }
89
+ }
90
+
91
+ @keyframes lds-ellipsis3 {
92
+ 0% {
93
+ transform: scale(1);
94
+ }
95
+ 100% {
96
+ transform: scale(0);
97
+ }
98
+ }
99
+
100
+ @keyframes lds-ellipsis2 {
101
+ 0% {
102
+ transform: translate(0, 0);
103
+ }
104
+ 100% {
105
+ transform: translate(24px, 0);
106
+ }
107
+ }
108
+ </style>