@burh/nuxt-core 1.0.390 → 1.0.392

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.
@@ -1,39 +1,39 @@
1
- <template>
2
- <video
3
- frameborder="0"
4
- controls
5
- ref="muxVideo"
6
- />
7
- </template>
8
-
9
- <script>
10
- import Hls from 'hls.js';
11
-
12
- export default {
13
- name: 'mux-video',
14
- props: {
15
- src: {
16
- type: String,
17
- required: true
18
- }
19
- },
20
- methods: {
21
- getMuxVideo() {
22
- const video = this.$refs.muxVideo;
23
-
24
- if (video.canPlayType('application/vnd.apple.mpegurl')) {
25
- video.src = this.src;
26
- } else if (Hls.isSupported()) {
27
- const hls = new Hls();
28
- hls.loadSource(this.src);
29
- hls.attachMedia(video);
30
- } else {
31
- console.error('Esse navegador não suporta o tipo de vídeo');
32
- }
33
- }
34
- },
35
- mounted() {
36
- this.getMuxVideo();
37
- }
38
- };
39
- </script>
1
+ <template>
2
+ <video
3
+ frameborder="0"
4
+ controls
5
+ ref="muxVideo"
6
+ />
7
+ </template>
8
+
9
+ <script>
10
+ import Hls from 'hls.js';
11
+
12
+ export default {
13
+ name: 'mux-video',
14
+ props: {
15
+ src: {
16
+ type: String,
17
+ required: true
18
+ }
19
+ },
20
+ methods: {
21
+ getMuxVideo() {
22
+ const video = this.$refs.muxVideo;
23
+
24
+ if (video.canPlayType('application/vnd.apple.mpegurl')) {
25
+ video.src = this.src;
26
+ } else if (Hls.isSupported()) {
27
+ const hls = new Hls();
28
+ hls.loadSource(this.src);
29
+ hls.attachMedia(video);
30
+ } else {
31
+ console.error('Esse navegador não suporta o tipo de vídeo');
32
+ }
33
+ }
34
+ },
35
+ mounted() {
36
+ this.getMuxVideo();
37
+ }
38
+ };
39
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.390",
3
+ "version": "1.0.392",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {
@@ -1,243 +0,0 @@
1
- <template>
2
- <nuxt-link :to="`/recrutamento/vaga/${job.id}`" class="recruitment__card">
3
- <article>
4
- <header class="recruitment__card__header">
5
- <div class="recruitment__card__header__status">
6
- <job-status-dropdown
7
- :status="job.status"
8
- @select="handleChangeJobStatus"
9
- />
10
- </div>
11
- <div class="recruitment__card__header__actions">
12
- <el-tooltip placement="top" content="Anotações">
13
- <button
14
- class="action__item"
15
- @click.stop.prevent="$emit('notes-click')"
16
- >
17
- <i class="far fa-comment-alt"></i>
18
- </button>
19
- </el-tooltip>
20
-
21
- <el-tooltip placement="top" content="Compartilhar">
22
- <button
23
- class="action__item"
24
- @click.stop.prevent="$emit('share-click')"
25
- >
26
- <i class="fas fa-share-alt"></i>
27
- </button>
28
- </el-tooltip>
29
- </div>
30
- </header>
31
-
32
- <section class="recruitment__card__content">
33
- <span class="recruitment__card__content__date">Publicada {{fromNow(job.published_at)}}</span>
34
- <h2 class="recruitment__card__content__title">
35
- {{ job.title }}
36
- <el-tooltip v-if="job.handicapped" placement="top" content="PCD">
37
- <i class="fas fa-wheelchair pcd"></i>
38
- </el-tooltip>
39
- <el-tooltip v-if="job.is_private" placement="top" content="Privada">
40
- <i v-if="job.is_private" class="fas fa-lock pcd"></i>
41
- </el-tooltip>
42
-
43
- <el-tooltip v-if="job.is_internal" placement="top" content="Interna">
44
- <i v-if="job.is_internal" class="fas fa-building pcd"></i>
45
- </el-tooltip>
46
-
47
- <el-tooltip v-if="job.is_urgency" placement="top" content="Urgente">
48
- <i v-if="job.is_urgency" class="fas fa-clock pcd"></i>
49
- </el-tooltip>
50
- </h2>
51
- <span class="recruitment__card__content__id">{{ job.id }}</span>
52
-
53
- <div class="recruitment__card__info">
54
- <p class="recruitment__card__info__text"><span>{{ job.info.applieds }}</span>Inscritos</p>
55
- <p class="recruitment__card__info__text"><span>{{ job.info.positions }}</span>Posição</p>
56
- <p class="recruitment__card__info__text"><span>{{ job.info.hireds }}</span>Contratados</p>
57
- <p class="recruitment__card__info__text"><span>{{ job.info.reproveds }}</span>Reprovados</p>
58
- </div>
59
- </section>
60
-
61
- <footer class="recruitment__card__footer">
62
- <p class="recruitment__card__footer__title">EQUIPE RESPONSÁVEL</p>
63
- <div class="recruitment__card__footer__images">
64
- <el-tooltip
65
- v-for="user in job.team"
66
- :key="user.id"
67
- placement="top"
68
- :content="user.name"
69
- >
70
- <img
71
- :src="(user.avatar) ? user.avatar : getNameInitials(user.name, user.last_name)"
72
- :alt="user.name"
73
- >
74
- </el-tooltip>
75
- </div>
76
- </footer>
77
- </article>
78
- </nuxt-link>
79
- </template>
80
-
81
- <script>
82
- import moment from 'moment';
83
- import 'moment/locale/pt-br';
84
-
85
- import JobStatusDropdown from '@burh/nuxt-core/components/burh-ds/Dropdown/JobStatusDropdown.vue';
86
-
87
- export default {
88
- name: 'recruitment-card',
89
- components: {
90
- JobStatusDropdown
91
- },
92
- props: {
93
- job: {
94
- type: Object,
95
- default: () => []
96
- }
97
- },
98
- methods: {
99
- getNameInitials(name, last_name) {
100
- const avatarUrl = process.env.routes.avatar;
101
-
102
- let userAvatarName;
103
-
104
- if (name && last_name) {
105
- userAvatarName = `${name.toUpperCase().charAt(0)}${last_name.toUpperCase().charAt(0)}`;
106
- } else if (name && last_name === null) {
107
- userAvatarName = name;
108
- } else {
109
- userAvatarName = 'BURH';
110
- }
111
-
112
- return avatarUrl.replace(':size', '64x64').replace(':initials', userAvatarName);
113
- },
114
- fromNow(date, format = 'YYYYMMDD') {
115
- return moment(date, format).fromNow();
116
- },
117
- handleChangeJobStatus(id) {
118
- this.$emit('select', id);
119
- }
120
- }
121
- };
122
- </script>
123
-
124
- <style lang="scss" scoped>
125
- .recruitment__card {
126
- cursor: pointer;
127
- background: #fff;
128
- box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
129
- padding: 20px;
130
- border-radius: 4px;
131
- border: none;
132
- text-align: initial;
133
- color: #1D364B;
134
- transition: transform 0.25s;
135
- &:focus {
136
- outline: none;
137
- transform: translateY(-5px);
138
- }
139
- &:hover {
140
- transform: translateY(-5px);
141
- }
142
-
143
- &__header {
144
- display: flex;
145
- align-items: center;
146
- justify-content: space-between;
147
- padding: 5px 0;
148
- &__actions {
149
- display: flex;
150
- align-items: center;
151
- .action__item {
152
- cursor: pointer;
153
- width: 42px;
154
- height: 42px;
155
- border-radius: 100px;
156
- transition: background 0.5s;
157
- display: flex;
158
- align-items: center;
159
- justify-content: center;
160
- background: transparent;
161
- border: 0;
162
- position: relative;
163
- &:not(:disabled):hover {
164
- background: rgba(0, 0, 0, 0.08);
165
- }
166
- &:focus {
167
- outline: none;
168
- background: rgba(0, 0, 0, 0.08);
169
- }
170
- &:not(:first-child) {
171
- margin-left: 5px;
172
- }
173
- i {
174
- color: #AEB6BE;
175
- }
176
- }
177
- }
178
- }
179
-
180
- &__content {
181
- &__date {
182
- font-size: 0.875rem;
183
- font-weight: 400;
184
- color: #AEB6BE;
185
- }
186
- &__title {
187
- font-size: 1.275rem;
188
- color: #1D364B;
189
- margin-bottom: 0;
190
- .pcd {
191
- color: #1F8CEB;
192
- margin-left: 5px;
193
- }
194
- }
195
- &__id {
196
- font-size: 0.875rem;
197
- font-weight: 600;
198
- color: #525F7F;
199
- }
200
- }
201
-
202
- &__info {
203
- padding: 20px 0;
204
- &__text {
205
- margin-bottom: 0;
206
- font-size: 1rem;
207
- font-weight: 500;
208
- span {
209
- margin-right: 5px;
210
- color: #1F8CEB;
211
- }
212
- }
213
- }
214
-
215
- &__footer {
216
- border-top: 1px solid #E9E9E9;
217
- padding-top: 10px;
218
- &__title {
219
- color: #525F7F;
220
- font-size: 0.875rem;
221
- font-weight: 600;
222
- margin-bottom: 0;
223
- }
224
- &__images {
225
- display: flex;
226
- align-items: center;
227
- user-select: none;
228
- img {
229
- $size: 32px;
230
- display: block;
231
- width: $size;
232
- height: $size;
233
- object-fit: cover;
234
- border-radius: 100px;
235
- border: 2px solid #fff;
236
- &:not(:first-child) {
237
- margin-left: -10px;
238
- }
239
- }
240
- }
241
- }
242
- }
243
- </style>
@@ -1,153 +0,0 @@
1
- <template>
2
- <div
3
- v-if="selectedOptionId"
4
- v-click-outside="dropDownOutsideClick"
5
- class="job__status"
6
- >
7
- <p class="job__status__title" @click.stop.prevent="toggleDropdown">
8
- <span :class="`color--${options[(selectedOptionId - 1)].color}`"></span>
9
- {{ options[(selectedOptionId - 1)].title }}
10
- <i class="fas fa-caret-down"></i>
11
- </p>
12
- <ul class="job__status__dropdown" :class="{ 'job__status__dropdown--open': isDropdownOpen }">
13
- <li
14
- v-for="item in options"
15
- :key="item.id"
16
- >
17
- <p
18
- class="job__status__title"
19
- v-if="item.id !== selectedOptionId"
20
- @click.stop.prevent="selectOption(item.id)"
21
- >
22
- <span :class="`color--${item.color}`"></span>
23
- {{ item.title }}
24
- </p>
25
- </li>
26
- </ul>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- export default {
32
- name: 'job-status-dropdown',
33
- props: {
34
- status: {
35
- type: Number,
36
- default: 1
37
- }
38
- },
39
- data() {
40
- return {
41
- isDropdownOpen: false,
42
- selectedOptionId: null,
43
- options: [
44
- {
45
- id: 1,
46
- title: 'Aberta',
47
- color: 'green'
48
- },
49
- {
50
- id: 2,
51
- title: 'Em Análise',
52
- color: 'yellow'
53
- },
54
- {
55
- id: 3,
56
- title: 'Pausada',
57
- color: 'pink'
58
- },
59
- {
60
- id: 4,
61
- title: 'Finalizada',
62
- color: 'blue'
63
- }
64
- ]
65
- };
66
- },
67
- mounted() {
68
- this.selectedOptionId = this.status;
69
- },
70
- methods: {
71
- toggleDropdown() {
72
- this.isDropdownOpen = !this.isDropdownOpen;
73
- },
74
- selectOption(id) {
75
- this.selectedOptionId = id;
76
- this.isDropdownOpen = false;
77
- this.$emit('select', id);
78
- },
79
- dropDownOutsideClick() {
80
- this.isDropdownOpen = false;
81
- }
82
- }
83
- };
84
- </script>
85
-
86
- <style lang="scss" scoped>
87
- .job__status {
88
- position: relative;
89
- z-index: 120;
90
- &__dropdown {
91
- position: absolute;
92
- left: -20px;
93
- transform: translateY(-10px);
94
- opacity: 0;
95
- pointer-events: none;
96
- background: #fff;
97
- box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.2);
98
- list-style: none;
99
- border-radius: 4px;
100
- overflow: hidden;
101
- min-width: 220px;
102
- padding: 0!important;
103
- margin: 0!important;
104
- transition: transform 0.3s, opacity 0.3s;
105
- transform-origin: top;
106
- &--open {
107
- transform: translateY(10px);
108
- opacity: 1;
109
- pointer-events: all;
110
- }
111
- li {
112
- display: block;
113
- p {
114
- padding: 15px 20px;
115
- transition: background 0.5s, color 0.5s;
116
- &:hover {
117
- background: #F6F9FC;
118
- color: #1F8CEB;
119
- }
120
- }
121
- }
122
- }
123
- &__title {
124
- cursor: pointer;
125
- display: flex;
126
- align-items: center;
127
- user-select: none;
128
- margin: 0!important;
129
- span {
130
- display: block;
131
- border-radius: 100px;
132
- width: 12px;
133
- height: 12px;
134
- margin-right: 10px;
135
- &.color--green {
136
- background: #3AC089;
137
- }
138
- &.color--yellow {
139
- background: #FFCF02;
140
- }
141
- &.color--pink {
142
- background: #FF539D;
143
- }
144
- &.color--blue {
145
- background: #0C95FC;
146
- }
147
- }
148
- i {
149
- margin-left: 10px;
150
- }
151
- }
152
- }
153
- </style>