@burh/nuxt-core 1.0.237 → 1.0.239

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.
@@ -159,6 +159,9 @@ export default {
159
159
  </script>
160
160
 
161
161
  <style lang="scss" scoped>
162
+ .pagination{
163
+ margin-bottom: 0rem !important;
164
+ }
162
165
  @media (min-height: 667.59px) {
163
166
  .card-footer-bottom {
164
167
  bottom: 5px;
@@ -12,14 +12,9 @@
12
12
  </div>
13
13
  </div>
14
14
 
15
- <h5 class="mb-0 text-wrap" :class="{ 'mt-5': !userData.urlAvatar }">
16
- {{ userData.name }} {{ userData.last_name }}
17
- </h5>
15
+ <h5 class="mb-0 text-wrap" :class="{ 'mt-5': !userData.urlAvatar }" v-html="highlightText(search, `${userData.name} ${userData.last_name}`)"></h5>
18
16
 
19
- <p class="user-info" v-if="userData.user_experience.length > 0">
20
- {{ userData.user_experience[0].job_title }} em
21
- {{ userData.user_experience[0].company }}
22
- </p>
17
+ <p class="user-info" v-if="userData.user_experience.length > 0" v-html="highlightText(search, `${userData.user_experience[0].job_title} em ${userData.user_experience[0].company}`)"></p>
23
18
 
24
19
  <span v-if="userData.user_address">
25
20
  <i class="fas fa-map-marker-alt"></i>
@@ -41,9 +36,8 @@
41
36
  v-for="(skill, index) in userData.user_skill"
42
37
  :key="`skill-${index}`"
43
38
  class="ml-1 mt-1 mb-0 text-capitalize"
44
- >
45
- {{ skill.skill_word }}
46
- </p>
39
+ v-html="highlightText(search, skill.skill_word)"
40
+ ></p>
47
41
  </div>
48
42
 
49
43
  <div
@@ -57,9 +51,8 @@
57
51
  class="mb-1 text-capitalize"
58
52
  v-for="(lan, index) in userData.user_language"
59
53
  :key="index"
60
- >
61
- {{ lan.language[0].name }} {{ languageLevel(lan.level) }}
62
- </p>
54
+ v-html="highlightText(search, `${lan.language[0].name} ${languageLevel(lan.level)}`)"
55
+ ></p>
63
56
  </div>
64
57
 
65
58
  <div
@@ -73,9 +66,8 @@
73
66
  v-for="(des, index) in userData.user_desired_job"
74
67
  :key="`skill-${index}`"
75
68
  class="ml-1 mt-1 mb-0 text-capitalize"
76
- >
77
- {{ des.occupation }}
78
- </p>
69
+ v-html="highlightText(search, des.occupation)"
70
+ ></p>
79
71
  </div>
80
72
 
81
73
  <div
@@ -198,9 +190,19 @@ export default {
198
190
  },
199
191
  props: {
200
192
  userData: Object,
201
- baseUrl: String
193
+ baseUrl: String,
194
+ search: {
195
+ type: String,
196
+ default: ''
197
+ }
202
198
  },
203
199
  methods: {
200
+ highlightText(search, text) {
201
+ if (search.length < 2) return text;
202
+
203
+ const regex = new RegExp(search.toLowerCase(), 'gmi');
204
+ return String(text || '').replace(regex, `<span class="search-highlight">${search}</span>`);
205
+ },
204
206
  getTime(
205
207
  { start_year = null, end_year = null, start_month, end_month },
206
208
  textHappening = 'Cursando'
@@ -303,6 +305,11 @@ export default {
303
305
  <style lang="scss" scoped>
304
306
  @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
305
307
 
308
+ /deep/ .search-highlight {
309
+ background: rgb(255, 252, 61);
310
+ color: #000;
311
+ }
312
+
306
313
  .qr-id {
307
314
  color: #32325d !important;
308
315
  }
@@ -23,9 +23,13 @@
23
23
  userData.user_complementary_information.about
24
24
  ) && 'readmore'
25
25
  "
26
- >
27
- {{ userData.user_complementary_information.about }}
28
- </p>
26
+ v-html="
27
+ highlightText(
28
+ search,
29
+ userData.user_complementary_information.about
30
+ )
31
+ "
32
+ ></p>
29
33
  <a
30
34
  href="#"
31
35
  aria-label="expandir conteudo"
@@ -57,7 +61,10 @@
57
61
  v-for="(edu, index) in userData.user_education"
58
62
  :key="index"
59
63
  >
60
- <p class="sub-title">{{ edu.formation }}</p>
64
+ <p
65
+ class="sub-title"
66
+ v-html="highlightText(search, edu.formation)"
67
+ ></p>
61
68
  <p class="info-text">{{ edu.institution }}</p>
62
69
  <span class="info-text">
63
70
  {{ edu.start_month }}/{{ edu.start_year }} -
@@ -69,9 +76,15 @@
69
76
  : ''
70
77
  }} </span
71
78
  ><br />
72
- <span class="info-text">{{
73
- edu.formation_level_id | formationLevel
74
- }}</span>
79
+ <span
80
+ class="info-text"
81
+ v-html="
82
+ highlightText(
83
+ search,
84
+ edu.formation_level_id | formationLevel
85
+ )
86
+ "
87
+ ></span>
75
88
  </div>
76
89
 
77
90
  <!-- EXPERIÊNCIAS -->
@@ -90,8 +103,16 @@
90
103
  v-for="(exp, index) in userData.user_experience"
91
104
  :key="`experience-${index}`"
92
105
  >
93
- <p class="sub-title">{{ exp.job_title }}</p>
94
- <p class="info-text">{{ exp.company }}, {{ exp.location }}</p>
106
+ <p
107
+ class="sub-title"
108
+ v-html="highlightText(search, exp.job_title)"
109
+ ></p>
110
+ <p
111
+ class="info-text"
112
+ v-html="
113
+ highlightText(search, `${exp.company}, ${exp.location}`)
114
+ "
115
+ ></p>
95
116
  <span class="info-text">
96
117
  {{ exp.start_month }}/{{ exp.start_year }} -
97
118
  {{ treatEndDate(exp.end_month, exp.end_year) }}
@@ -102,9 +123,8 @@
102
123
  :id="`USER_EXPERIENCE-${index}`"
103
124
  class="description mt-4 mb-0"
104
125
  :class="!wordIsLesserThan(exp.description) && 'readmore'"
105
- >
106
- {{ exp.description }}
107
- </p>
126
+ v-html="highlightText(search, exp.description)"
127
+ ></p>
108
128
 
109
129
  <a
110
130
  href="#"
@@ -130,8 +150,22 @@
130
150
  v-for="(cou, index) in userData.user_course"
131
151
  :key="`course-${index}`"
132
152
  >
133
- <p class="sub-title">{{ cou.institution }}</p>
134
- <p class="info-text mb-3">
153
+ <p
154
+ class="sub-title"
155
+ v-html="highlightText(search, cou.institution)"
156
+ ></p>
157
+ <p
158
+ class="info-text mb-3"
159
+ v-html="
160
+ highlightText(
161
+ search,
162
+ `${cou.name} - ${cou.end_year || ''} ${getTime(
163
+ false,
164
+ cou
165
+ )}`
166
+ )
167
+ "
168
+ >
135
169
  {{ cou.name }} - {{ cou.end_year }}
136
170
  {{ getTime(false, cou) }}
137
171
  </p>
@@ -143,29 +177,33 @@
143
177
  import getPrefixes from '~/util/getPrefixes.js';
144
178
 
145
179
  export default {
146
- name: 'user-cv-middle',
147
- props: {
148
- userData: Object,
149
- tools: {
150
- type: Array,
151
- default: () => []
152
- }
153
- },
154
- filters: {
155
- formationLevel(id) {
156
- const typeFormation = {
157
- 1: 'Ensino Médio',
158
- 2: 'Ensino Técnico',
159
- 3: 'Graduação',
160
- 4: 'Pós-Graduação',
161
- 5: 'Mestrado',
162
- 6: 'Doutorado'
163
- };
164
-
165
- return typeFormation[id] || '-';
166
- }
167
- },
168
- mounted() {
180
+ name: 'user-cv-middle',
181
+ props: {
182
+ userData: Object,
183
+ tools: {
184
+ type: Array,
185
+ default: () => []
186
+ },
187
+ search: {
188
+ type: String,
189
+ default: ''
190
+ }
191
+ },
192
+ filters: {
193
+ formationLevel(id) {
194
+ const typeFormation = {
195
+ 1: 'Ensino Médio',
196
+ 2: 'Ensino Técnico',
197
+ 3: 'Graduação',
198
+ 4: 'Pós-Graduação',
199
+ 5: 'Mestrado',
200
+ 6: 'Doutorado'
201
+ };
202
+
203
+ return typeFormation[id] || '-';
204
+ }
205
+ },
206
+ mounted() {
169
207
  this.userData.user_experience = this.filterByDate(
170
208
  this.userData.user_experience,
171
209
  'old'
@@ -175,54 +213,61 @@ export default {
175
213
  'old'
176
214
  );
177
215
  this.userData.user_course = this.filterByDate(
178
- this.userData.user_course,
216
+ this.userData.user_course,
179
217
  'old'
180
-
181
- );
182
- },
183
- watch: {
184
- userData() {
185
- this.userData.user_experience = this.filterByDate(
186
- this.userData.user_experience,
218
+ );
219
+ },
220
+ watch: {
221
+ userData() {
222
+ this.userData.user_experience = this.filterByDate(
223
+ this.userData.user_experience,
187
224
  'old'
188
- );
225
+ );
189
226
  this.userData.user_education = this.filterByDate(
190
227
  this.userData.user_education,
191
228
  'old'
192
229
  );
193
- this.userData.user_course = this.filterByDate(
194
- this.userData.user_course,
230
+ this.userData.user_course = this.filterByDate(
231
+ this.userData.user_course,
195
232
  'old'
196
-
197
- );
198
- }
199
- },
200
- methods: {
201
- filterByDate(data, by = 'new') {
202
- let sortedArray = data.sort((a, b) => {
203
- a = [
204
- a.start_month,
205
- a.start_year,
206
- a.end_month || 12,
207
- a.end_year || 9999
208
- ];
209
-
210
- b = [
211
- b.start_month,
212
- b.start_year,
213
- b.end_month || 12,
214
- b.end_year || 9999
215
- ];
216
-
217
- // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
218
- // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
219
-
220
- let byStart;
221
- let byEnd;
222
-
223
- switch (by) {
224
- case 'old':
225
- byStart =
233
+ );
234
+ }
235
+ },
236
+ methods: {
237
+ highlightText(search, text) {
238
+ if (search.length < 2) return text;
239
+
240
+ const regex = new RegExp(search.toLowerCase(), 'gmi');
241
+ return String(text || '').replace(
242
+ regex,
243
+ `<span class="search-highlight">${search}</span>`
244
+ );
245
+ },
246
+ filterByDate(data, by = 'new') {
247
+ let sortedArray = data.sort((a, b) => {
248
+ a = [
249
+ a.start_month,
250
+ a.start_year,
251
+ a.end_month || 12,
252
+ a.end_year || 9999
253
+ ];
254
+
255
+ b = [
256
+ b.start_month,
257
+ b.start_year,
258
+ b.end_month || 12,
259
+ b.end_year || 9999
260
+ ];
261
+
262
+ // Primeiro filtro -> chaves: 0 e 1 -> Filtro por data de inicio
263
+ // Segundo filtro -> chaves: 2 e 3 -> Filtro por data de termino (subir não concluídos para primeiros)
264
+
265
+ let byStart;
266
+ let byEnd;
267
+
268
+ switch (by) {
269
+ case 'old':
270
+ byStart =
226
271
  new Date(a[1], a[0], 1).getTime() -
227
272
  new Date(b[1], b[0], 1).getTime();
228
273
  byEnd =
@@ -343,6 +388,12 @@ export default {
343
388
 
344
389
  <style lang="scss" scoped>
345
390
  @import '@burh/nuxt-core/assets/sass/burh-ds/variables/_colors.scss';
391
+
392
+ /deep/ .search-highlight {
393
+ background: rgb(255, 252, 61);
394
+ color: #000;
395
+ }
396
+
346
397
  .content-middle {
347
398
  width: 50%;
348
399
  border-right: 1px solid #ececec5c;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.237",
3
+ "version": "1.0.239",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {