@usssa/component-library 1.0.0-alpha.39 → 1.0.0-alpha.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usssa/component-library",
3
- "version": "1.0.0-alpha.39",
3
+ "version": "1.0.0-alpha.40",
4
4
  "description": "A Quasar component library project",
5
5
  "productName": "Quasar component library App",
6
6
  "author": "Troy Moreland <troy.moreland@usssa.com>",
@@ -80,7 +80,7 @@ const isFullWidth = computed(() => {
80
80
  left
81
81
  :class="leftIcon"
82
82
  class="q-mr-xs"
83
- size="1.25rem"
83
+ size="1rem"
84
84
  />
85
85
 
86
86
  <div class="text-center text-caption-md button-label">
@@ -91,7 +91,7 @@ const isFullWidth = computed(() => {
91
91
  right
92
92
  :class="rightIcon"
93
93
  class="q-ml-xs"
94
- size="1.25rem"
94
+ size="1rem"
95
95
  />
96
96
  </div>
97
97
  </slot>
@@ -231,7 +231,6 @@ const toLowerCase = (str) => str.toLowerCase()
231
231
  .phone-input
232
232
  .q-field__inner
233
233
  border-radius: $xs
234
- background: $neutral-1
235
234
  &.q-field--borderless
236
235
  .q-field__control
237
236
  padding: 0 $xs 0 0
@@ -0,0 +1,262 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import UInputPhoneStd from './UInputPhoneStd.vue'
4
+ import UInputTextStd from './UInputTextStd.vue'
5
+ import UMultiSelectStd from './UMultiSelectStd.vue'
6
+ import USelectStd from './USelectStd.vue'
7
+
8
+ const props = defineProps({
9
+ title: {
10
+ type: String,
11
+ default: 'Advanced search',
12
+ },
13
+ size: {
14
+ type: String,
15
+ default: 'md',
16
+ validator: (val) => ['sm', 'md'].includes(val),
17
+ },
18
+ searchType: {
19
+ type: String,
20
+ },
21
+ fields: {
22
+ type: Array,
23
+ },
24
+ showCustomMenu: {
25
+ type: Boolean,
26
+ default: false,
27
+ },
28
+ menuClass: {
29
+ type: String,
30
+ },
31
+ labelIcon: {
32
+ type: String,
33
+ default: 'fa-kit-duotone fa-filter-search',
34
+ },
35
+ model: {
36
+ type: Object,
37
+ },
38
+ })
39
+ const emit = defineEmits(['updateModelVal', 'updateCountry'])
40
+
41
+ const menuSize = computed(() => {
42
+ if (props.size === 'md') {
43
+ return '24.1875rem'
44
+ } else if (props.size === 'sm') {
45
+ return '23.5625rem'
46
+ } else {
47
+ return props.size
48
+ }
49
+ })
50
+
51
+ const updateModelVal = (event, index) => {
52
+ emit('updateModelVal', event, index)
53
+ }
54
+
55
+ const updateCountry = (val, label) => {
56
+ emit('updateCountry', val, label)
57
+ }
58
+
59
+ const titleToCamelCase = (str) => {
60
+ return str
61
+ .split(' ')
62
+ .map((word, index) => {
63
+ if (index === 0) {
64
+ return word.toLowerCase()
65
+ } else {
66
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
67
+ }
68
+ })
69
+ .join('')
70
+ }
71
+
72
+ const getKeyValueByTitle = (label) => {
73
+ const model = props.model
74
+ const camelCaseKey = titleToCamelCase(label)
75
+ if (camelCaseKey in model) {
76
+ return model[camelCaseKey]
77
+ } else {
78
+ return ''
79
+ }
80
+ }
81
+ </script>
82
+
83
+ <template>
84
+ <div>
85
+ <q-expansion-item
86
+ v-bind="$attrs"
87
+ class="overflow-hidden u-expansion"
88
+ header-class="bg-neutral-2"
89
+ dense-toggle
90
+ :style="`width: ${menuSize}`"
91
+ >
92
+ <template #header>
93
+ <div class="row items-center full-width">
94
+ <q-icon :class="labelIcon" size="1rem" color="neutral-9" />
95
+ <span class="q-ml-xs text-caption-sm text-neutral-13">
96
+ {{ title }}
97
+ </span>
98
+ </div>
99
+ </template>
100
+
101
+ <!-- Using slot for custom menu -->
102
+ <template v-if="showCustomMenu">
103
+ <slot name="custom-menu" />
104
+ </template>
105
+
106
+ <section class="bg-neutral-2 q-px-ba" v-else>
107
+ <div class="row items-container">
108
+ <div
109
+ v-for="(item, index) in fields && fields.length ? fields : []"
110
+ :key="index"
111
+ :class="`${
112
+ size === 'sm'
113
+ ? 'full-width'
114
+ : `col-${item?.col || 12} ${
115
+ item?.col !== 12 ? 'half-width' : ''
116
+ }`
117
+ }`"
118
+ >
119
+ <UInputTextStd
120
+ v-if="item.inputType === 'Text'"
121
+ v-bind="item.props"
122
+ :aria-label="item.label"
123
+ :hintText="item.hintText"
124
+ :label="item.label"
125
+ :modelValue="getKeyValueByTitle(item.label)"
126
+ @update:modelValue="
127
+ updateModelVal($event, titleToCamelCase(item.label))
128
+ "
129
+ />
130
+ <USelectStd
131
+ v-if="item.inputType === 'Select'"
132
+ v-bind="item.props"
133
+ :aria-label="item.label"
134
+ hintIcon=""
135
+ :hintText="item.hintText"
136
+ :label="item.label"
137
+ :modelValue="getKeyValueByTitle(item.label)"
138
+ :options="item.options"
139
+ @update:modelValue="
140
+ updateModelVal($event, titleToCamelCase(item.label))
141
+ "
142
+ />
143
+ <UMultiSelectStd
144
+ v-if="item.inputType === 'Multiselect'"
145
+ v-bind="item.props"
146
+ :aria-label="item.label"
147
+ :hintText="item.hintText"
148
+ :label="item.label"
149
+ :modelValue="getKeyValueByTitle(item.label)"
150
+ :options="item.options"
151
+ @update:modelValue="
152
+ updateModelVal($event, titleToCamelCase(item.label))
153
+ "
154
+ />
155
+ <UInputPhoneStd
156
+ v-if="item.inputType === 'Phone'"
157
+ v-bind="item.props"
158
+ :aria-label="item.label"
159
+ hintIcon=""
160
+ :hintText="item.hintText"
161
+ :label="item.label"
162
+ :modelValue="getKeyValueByTitle(item.label)"
163
+ :options="item.options"
164
+ placeholder=""
165
+ :selected-country="model.selectedCountry"
166
+ :validationRules="[]"
167
+ @update-country="
168
+ updateCountry($event, titleToCamelCase(item.label))
169
+ "
170
+ @update:modelValue="
171
+ updateModelVal($event, titleToCamelCase(item.label))
172
+ "
173
+ />
174
+ <UInputTextStd
175
+ v-if="item.inputType === 'Date'"
176
+ v-bind="item.props"
177
+ :aria-label="item.label"
178
+ :hintText="item.hintText"
179
+ :label="item.label"
180
+ :modelValue="getKeyValueByTitle(item.label)"
181
+ outlined
182
+ parentClass="col"
183
+ @update:modelValue="
184
+ updateModelVal($event, titleToCamelCase(item.label))
185
+ "
186
+ >
187
+ <template v-slot:append>
188
+ <q-icon
189
+ class="fa-kit-duotone fa-calendar-range cursor-pointer"
190
+ aria-label="Birthday calendar"
191
+ color="neutral-9"
192
+ size="1rem"
193
+ tabindex="0"
194
+ >
195
+ <q-popup-proxy
196
+ cover
197
+ transition-show="scale"
198
+ transition-hide="scale"
199
+ >
200
+ <q-date
201
+ v-model="item.value"
202
+ v-bind="item.dateProps"
203
+ mask="MM/DD/YYYY"
204
+ @update:modelValue="
205
+ updateModelVal($event, titleToCamelCase(item.label))
206
+ "
207
+ >
208
+ <div class="row items-center justify-end">
209
+ <q-btn
210
+ v-close-popup
211
+ color="primary"
212
+ flat
213
+ label="Close"
214
+ />
215
+ </div>
216
+ </q-date>
217
+ </q-popup-proxy>
218
+ </q-icon>
219
+ </template>
220
+ </UInputTextStd>
221
+ </div>
222
+ </div>
223
+
224
+ <!-- Action Buttons -->
225
+
226
+ <div class="action-wrapper">
227
+ <q-card-actions align="left" class="full-width">
228
+ <slot name="action_left_button"></slot>
229
+ </q-card-actions>
230
+ <q-card-actions align="right" class="full-width">
231
+ <slot name="action_right_button"></slot>
232
+ </q-card-actions>
233
+ </div>
234
+ </section>
235
+ </q-expansion-item>
236
+ </div>
237
+ </template>
238
+
239
+ <style lang="sass">
240
+ .u-expansion
241
+ border-radius: $xs
242
+ justify-content: space-between
243
+ align-items: center
244
+ align-self: stretch
245
+ .q-item
246
+ padding: $xs $xs $xs $ba
247
+ .q-item__section--side
248
+ padding-right: 0px
249
+ color: $neutral-9
250
+ .action-wrapper
251
+ display: flex
252
+ justify-content: space-between
253
+ gap: $xs
254
+ .q-card__actions
255
+ padding: 0px
256
+ margin: $ba 0px $ba 0px
257
+ .items-container
258
+ gap: $ba $xs
259
+ .half-width
260
+ flex: 1 1 calc(50% - 44px)
261
+ box-sizing: border-box
262
+ </style>
@@ -138,7 +138,7 @@ const model = computed({
138
138
  </template>
139
139
 
140
140
  <template v-if="hintText" v-slot:hint>
141
- <div class="row no-wrap items-center">
141
+ <div class="row no-wrap items-center text-neutral-9">
142
142
  <q-icon :class="hintIcon" size="1rem" v-if="hintIcon" />
143
143
 
144
144
  <div class="q-mx-xxs text-body-xs">
@@ -27,7 +27,7 @@ import UDrawer from './core/UDrawer.vue'
27
27
  import UMenuDropdown from './core/UMenuDropdown.vue'
28
28
  import UMenuButtonStd from './core/UMenuButtonStd.vue'
29
29
  import UBreadCrumbs from './core/UBreadCrumbs.vue'
30
-
30
+ import UMenuDropdownAdvancedSearch from './core/UMenuDropdownAdvancedSearch.vue'
31
31
  import { useNotify } from '../composables/useNotify.js'
32
32
  import { useOverlayLoader } from '../composables/useOverlayLoader.js'
33
33
 
@@ -62,4 +62,5 @@ export {
62
62
  UTabsStd,
63
63
  UToggleStd,
64
64
  UTooltip,
65
+ UMenuDropdownAdvancedSearch,
65
66
  }
@@ -10,6 +10,10 @@ const components = [
10
10
  title: 'Address Lookup',
11
11
  path: '/address-lookup',
12
12
  },
13
+ {
14
+ title: 'Advanced Search',
15
+ path: '/advanced-search',
16
+ },
13
17
  {
14
18
  title: 'Avatar',
15
19
  path: '/avatar',
@@ -126,6 +130,10 @@ const components = [
126
130
  title: 'Inner Loader',
127
131
  path: '/inner-loader',
128
132
  },
133
+ {
134
+ title: 'Typeahead Dropdown Search',
135
+ path: '/typeahead-advance-search',
136
+ },
129
137
  {
130
138
  title: 'Overlay Loader',
131
139
  path: '/overlay-loader',
@@ -0,0 +1,512 @@
1
+ <script setup>
2
+ import { computed, ref, toRaw, watch } from 'vue'
3
+ import ComponentBase from './ComponentBase.vue'
4
+ import { UMenuDropdownAdvancedSearch, UBtnStd } from 'src/components'
5
+
6
+ defineOptions({
7
+ name: 'AdvancedSearch',
8
+ })
9
+
10
+ const typeOptions = ['People', 'Team', 'Event', 'Venue', 'Default']
11
+ const sizeOptions = ['md', 'sm']
12
+
13
+ const type = ref('People')
14
+ const size = ref('md')
15
+ const people_fields = ref([
16
+ {
17
+ label: 'First Name',
18
+ inputType: 'Text',
19
+ hintText: 'Legal first name',
20
+ col: 6,
21
+ value: '',
22
+ },
23
+ {
24
+ label: 'Middle Name',
25
+ inputType: 'Text',
26
+ hintText: 'Middle initial or name',
27
+ col: 6,
28
+ value: '',
29
+ },
30
+ {
31
+ label: 'Last Name',
32
+ inputType: 'Text',
33
+ hintText: 'Legal last name',
34
+ col: 6,
35
+ value: '',
36
+ },
37
+
38
+ {
39
+ label: 'Suffix',
40
+ inputType: 'Select',
41
+ value: '',
42
+ hintText: 'Jr., Sr., II, III',
43
+ col: 6,
44
+ options: [
45
+ {
46
+ label: 'Jr.',
47
+ value: 'Jr.',
48
+ },
49
+ {
50
+ label: 'Sr.',
51
+ value: 'Sr.',
52
+ },
53
+ {
54
+ label: 'II',
55
+ value: 'II',
56
+ },
57
+ {
58
+ label: 'III',
59
+ value: 'III',
60
+ },
61
+ ],
62
+ },
63
+ {
64
+ label: 'Email Address',
65
+ inputType: 'Text',
66
+ value: '',
67
+ hintText: 'Enter valid email address',
68
+ col: 12,
69
+ },
70
+ {
71
+ label: 'Phone Number',
72
+ inputType: 'Phone',
73
+ value: '',
74
+ hintText: 'Include area code in phone number',
75
+ col: 12,
76
+ options: [
77
+ { name: 'United States', code: '+1', flag: 'us' },
78
+ { name: 'Canada', code: '+1', flag: 'ca' },
79
+ { name: 'Mexico', code: '+52', flag: 'mx' },
80
+ ],
81
+ selectedCountry: {
82
+ name: 'United States',
83
+ code: '+1',
84
+ flag: 'us',
85
+ },
86
+ },
87
+ ])
88
+ const people_fields_obj = ref({
89
+ firstName: '',
90
+ middleName: '',
91
+ lastName: '',
92
+ suffix: '',
93
+ emailAddress: '',
94
+ phoneNumber: '',
95
+ selectedCountry: {
96
+ name: 'United States',
97
+ code: '+1',
98
+ flag: 'us',
99
+ },
100
+ })
101
+ const event_fields_obj = ref({
102
+ eventName: '',
103
+ sport: '',
104
+ city: '',
105
+ state: '',
106
+ startDate: '',
107
+ endDate: '',
108
+ })
109
+ const default_fields_obj = ref({
110
+ firstName: '',
111
+ lastName: '',
112
+ teamName: '',
113
+ eventName: '',
114
+ venueName: '',
115
+ })
116
+ const team_fields_obj = ref({
117
+ teamName: '',
118
+ sport: '',
119
+ class: '',
120
+ city: '',
121
+ state: '',
122
+ })
123
+ const venue_fields_obj = ref({
124
+ venueName: '',
125
+ venueAddress: '',
126
+ country: '',
127
+ state: '',
128
+ postalCode: '',
129
+ sport: '',
130
+ })
131
+ const default_fields = ref([
132
+ {
133
+ label: 'First Name',
134
+ inputType: 'Text',
135
+ hintText: 'Legal first name',
136
+ },
137
+ {
138
+ label: 'Last Name',
139
+ inputType: 'Text',
140
+ hintText: 'Legal last name',
141
+ },
142
+ {
143
+ label: 'Team Name',
144
+ inputType: 'Text',
145
+ col: 12,
146
+ hintText: 'Full or short team name',
147
+ },
148
+ {
149
+ label: 'Event Name',
150
+ inputType: 'Text',
151
+ col: 12,
152
+ hintText: 'Full or partial event name',
153
+ },
154
+ {
155
+ label: 'Venue Name',
156
+ inputType: 'Text',
157
+ col: 12,
158
+ hintText: 'Full or partial venue name',
159
+ },
160
+ ])
161
+ const event_fields = ref([
162
+ {
163
+ label: 'Event Name',
164
+ inputType: 'Text',
165
+ col: 12,
166
+ hintText: 'Full event name',
167
+ },
168
+ {
169
+ label: 'Sport',
170
+ inputType: 'Select',
171
+ col: 12,
172
+ hintText: "Select the event's sport",
173
+ options: [
174
+ {
175
+ label: 'Basketball',
176
+ value: 'Basketball',
177
+ },
178
+ {
179
+ label: 'Badminton',
180
+ value: 'Badminton',
181
+ },
182
+ {
183
+ label: 'Football',
184
+ value: 'Football',
185
+ },
186
+ ],
187
+ },
188
+ {
189
+ label: 'City',
190
+ inputType: 'Text',
191
+ hintText: "Select the event's city",
192
+ },
193
+ {
194
+ label: 'State',
195
+ inputType: 'Select',
196
+ hintText: "Select the event's state",
197
+ options: [
198
+ {
199
+ label: 'Spain',
200
+ value: 'Spain',
201
+ },
202
+ {
203
+ label: 'Netherlands',
204
+ value: 'Netherlands',
205
+ },
206
+ {
207
+ label: 'Canada',
208
+ value: 'Canada',
209
+ },
210
+ ],
211
+ },
212
+ {
213
+ label: 'Start Date',
214
+ inputType: 'Date',
215
+ hintText: "Select event's start date",
216
+ },
217
+ {
218
+ label: 'End Date',
219
+ inputType: 'Date',
220
+ hintText: "Select event's end date",
221
+ },
222
+ ])
223
+ const team_fields = ref([
224
+ {
225
+ label: 'Team Name',
226
+ inputType: 'Text',
227
+ col: 12,
228
+ hintText: 'Full team name',
229
+ },
230
+ {
231
+ label: 'Sport',
232
+ inputType: 'Select',
233
+ col: 12,
234
+ hintText: "Select team's sport",
235
+ options: [
236
+ {
237
+ label: 'Basketball',
238
+ value: 'Basketball',
239
+ },
240
+ {
241
+ label: 'Badminton',
242
+ value: 'Badminton',
243
+ },
244
+ {
245
+ label: 'Football',
246
+ value: 'Football',
247
+ },
248
+ ],
249
+ },
250
+ {
251
+ label: 'Class',
252
+ inputType: 'Select',
253
+ col: 12,
254
+ hintText: "Select team's class",
255
+ options: [
256
+ {
257
+ label: 'Baseball Mens',
258
+ value: 'Baseball Mens',
259
+ },
260
+ {
261
+ label: 'Division 1',
262
+ value: 'Division 1',
263
+ },
264
+ {
265
+ label: 'Division 2',
266
+ value: 'Division 2',
267
+ },
268
+ ],
269
+ },
270
+ {
271
+ label: 'City',
272
+ inputType: 'Text',
273
+ hintText: "Enter team's city",
274
+ },
275
+ {
276
+ label: 'State',
277
+ inputType: 'Select',
278
+ hintText: "Select team's state",
279
+ options: [
280
+ {
281
+ label: 'Spain',
282
+ value: 'Spain',
283
+ },
284
+ {
285
+ label: 'Netherlands',
286
+ value: 'Netherlands',
287
+ },
288
+ {
289
+ label: 'Canada',
290
+ value: 'Canada',
291
+ },
292
+ ],
293
+ },
294
+ ])
295
+ const venue_fields = ref([
296
+ {
297
+ label: 'Venue Name',
298
+ inputType: 'Text',
299
+ col: 12,
300
+ hintText: 'Enter the name of a venue',
301
+ },
302
+ {
303
+ label: 'Venue Address',
304
+ inputType: 'Text',
305
+ col: 12,
306
+ hintText: 'Street address of the venue',
307
+ },
308
+ {
309
+ label: 'Country',
310
+ inputType: 'Select',
311
+ col: 6,
312
+ hintText: 'Country of venue',
313
+ options: [
314
+ { label: 'United States', value: 'United States' },
315
+ { label: 'Canada', value: 'Canada' },
316
+ { label: 'Mexico', value: 'Mexico' },
317
+ ],
318
+ },
319
+ {
320
+ label: 'City',
321
+ inputType: 'Text',
322
+ col: 6,
323
+ hintText: 'City of venue',
324
+ },
325
+ {
326
+ label: 'State',
327
+ inputType: 'Select',
328
+ options: [
329
+ {
330
+ label: 'Spain',
331
+ value: 'Spain',
332
+ },
333
+ {
334
+ label: 'Netherlands',
335
+ value: 'Netherlands',
336
+ },
337
+ {
338
+ label: 'Canada',
339
+ value: 'Canada',
340
+ },
341
+ ],
342
+ hintText: 'State of venue',
343
+ },
344
+ {
345
+ label: 'Postal Code',
346
+ inputType: 'Text',
347
+ hintText: 'Postal/Zip Code of venue',
348
+ },
349
+ {
350
+ label: 'Sport(s)',
351
+ inputType: 'Select',
352
+ hintText: 'Select venue sports',
353
+ options: [
354
+ {
355
+ label: 'Basketball',
356
+ value: 'Basketball',
357
+ },
358
+ {
359
+ label: 'Badminton',
360
+ value: 'Badminton',
361
+ },
362
+ {
363
+ label: 'Football',
364
+ value: 'Football',
365
+ },
366
+ ],
367
+ },
368
+ ])
369
+ const fieldObj = ref(people_fields_obj.value)
370
+ const model = ref(structuredClone(toRaw(fieldObj.value)))
371
+ const originalModel = ref(structuredClone(toRaw(fieldObj.value)))
372
+
373
+ const search_fields = computed(() => {
374
+ if (type.value === 'People') {
375
+ return people_fields.value
376
+ } else if (type.value === 'Team') {
377
+ return team_fields.value
378
+ } else if (type.value === 'Event') {
379
+ return event_fields.value
380
+ } else if (type.value === 'Venue') {
381
+ return venue_fields.value
382
+ } else if (type.value === 'Default') {
383
+ return default_fields.value
384
+ }
385
+ return []
386
+ })
387
+
388
+ const selectCountry = (value, label) => {
389
+ model.value.selectedCountry = value
390
+ }
391
+
392
+ const clearFields = () => {
393
+ model.value = structuredClone(toRaw(fieldObj.value))
394
+ originalModel.value = structuredClone(toRaw(fieldObj.value))
395
+ }
396
+
397
+ const updateModelVal = (event, label) => {
398
+ model.value[label] = event
399
+ }
400
+
401
+ const onApply = () => {
402
+ console.log('model values ->', model.value)
403
+ }
404
+
405
+ const assignDefault = () => {
406
+ model.value = structuredClone(toRaw(fieldObj.value))
407
+ originalModel.value = structuredClone(toRaw(fieldObj.value))
408
+ }
409
+
410
+ watch(
411
+ () => type.value,
412
+ (newVal) => {
413
+ if (newVal === 'People') {
414
+ fieldObj.value = people_fields_obj.value
415
+ assignDefault()
416
+ } else if (newVal === 'Team') {
417
+ fieldObj.value = team_fields_obj.value
418
+ assignDefault()
419
+ } else if (newVal === 'Event') {
420
+ fieldObj.value = event_fields_obj.value
421
+ assignDefault()
422
+ } else if (newVal === 'Venue') {
423
+ fieldObj.value = venue_fields_obj.value
424
+ assignDefault()
425
+ } else if (newVal === 'Default') {
426
+ fieldObj.value = default_fields_obj.value
427
+ assignDefault()
428
+ }
429
+ }
430
+ )
431
+
432
+ const htmlContent = `<UMenuDropdownAdvancedSearch
433
+ :model="model"
434
+ :searchType="type"
435
+ :size="size"
436
+ :fields="search_fields"
437
+ title="Advanced search"
438
+ labelIcon="fa-kit-duotone fa-filter-search"
439
+ :showCustomMenu="false"
440
+ @updateCountry="selectCountry"
441
+ @updateModelVal="updateModelVal"
442
+ >
443
+ <template #action_left_button>
444
+ <UBtnStd
445
+ label="Clear All Fields"
446
+ flat
447
+ color="primary"
448
+ leftIcon="fa-kit fa-rotate-left"
449
+ @onClick="clearFields"
450
+ />
451
+ </template>
452
+ <template #action_right_button>
453
+ <UBtnStd
454
+ label="Apply"
455
+ color="primary"
456
+ :full-width="true"
457
+ @onClick="onApply"
458
+ />
459
+ </template>
460
+ </UMenuDropdownAdvancedSearch>`
461
+ </script>
462
+
463
+ <template>
464
+ <q-page class="flex flex-center">
465
+ <ComponentBase
466
+ figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=8092-103302&node-type=instance&m=dev"
467
+ >
468
+ <template v-slot:component>
469
+ <div>
470
+ <UMenuDropdownAdvancedSearch
471
+ :model="model"
472
+ :searchType="type"
473
+ :size="size"
474
+ :fields="search_fields"
475
+ title="Advanced Search"
476
+ labelIcon="fa-kit-duotone fa-filter-search"
477
+ :showCustomMenu="false"
478
+ @updateCountry="selectCountry"
479
+ @updateModelVal="updateModelVal"
480
+ >
481
+ <template #action_left_button>
482
+ <UBtnStd
483
+ label="Clear All Fields"
484
+ flat
485
+ color="primary"
486
+ leftIcon="fa-kit fa-rotate-left"
487
+ @onClick="clearFields"
488
+ />
489
+ </template>
490
+ <template #action_right_button>
491
+ <UBtnStd
492
+ label="Apply"
493
+ color="primary"
494
+ :full-width="true"
495
+ @onClick="onApply"
496
+ />
497
+ </template>
498
+ </UMenuDropdownAdvancedSearch>
499
+ </div>
500
+ </template>
501
+
502
+ <template v-slot:properties>
503
+ <q-select v-model="type" :options="typeOptions" label="Search Type" />
504
+ <q-select v-model="size" :options="sizeOptions" label="Size" />
505
+ </template>
506
+
507
+ <template v-slot:code>
508
+ <pre><code>{{ htmlContent }}</code></pre>
509
+ </template>
510
+ </ComponentBase>
511
+ </q-page>
512
+ </template>
@@ -11,6 +11,10 @@ const routes = [
11
11
  path: 'address-lookup',
12
12
  component: () => import('pages/InputAddressLookup.vue'),
13
13
  },
14
+ {
15
+ path: 'advanced-search',
16
+ component: () => import('src/pages/AdvancedSearch.vue'),
17
+ },
14
18
  {
15
19
  path: 'avatar',
16
20
  component: () => import('pages/Avatar.vue'),