@usssa/component-library 1.0.0-alpha.81 → 1.0.0-alpha.83

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.81",
3
+ "version": "1.0.0-alpha.83",
4
4
  "description": "A Quasar component library project",
5
5
  "productName": "Quasar component library App",
6
6
  "author": "Troy Moreland <troy.moreland@usssa.com>",
@@ -34,6 +34,7 @@
34
34
  "dependencies": {
35
35
  "@fawmi/vue-google-maps": "^0.9.79",
36
36
  "@quasar/extras": "^1.16.4",
37
+ "algoliasearch": "4",
37
38
  "flag-icons": "^7.2.3",
38
39
  "quasar": "^2.16.0",
39
40
  "vue": "^3.4.18",
@@ -2,6 +2,10 @@
2
2
  import UInputTextStd from './UInputTextStd.vue'
3
3
 
4
4
  const props = defineProps({
5
+ ariaLabel:{
6
+ type: String,
7
+ required: true
8
+ },
5
9
  hintText: {
6
10
  type: String,
7
11
  },
@@ -69,8 +73,8 @@ const props = defineProps({
69
73
  },
70
74
  })
71
75
 
72
- const modelValue = defineModel()
73
76
  const emit = defineEmits(['update-country'])
77
+ const modelValue = defineModel()
74
78
 
75
79
  const selectCountry = (country) => {
76
80
  emit('update-country', country)
@@ -103,7 +107,7 @@ const toLowerCase = (str) => str.toLowerCase()
103
107
  >
104
108
  <template v-slot:prepend>
105
109
  <q-btn-dropdown
106
- v-bind="$attrs"
110
+ :aria-label="ariaLabel"
107
111
  :disable="readonly"
108
112
  :class="`btn-field-${size}`"
109
113
  class="u-phone-dropdown text-body-sm"
@@ -5,10 +5,6 @@ const props = defineProps({
5
5
  data: {
6
6
  type: Array,
7
7
  },
8
- destructive: {
9
- type: Boolean,
10
- default: false,
11
- },
12
8
  iconClass: {
13
9
  type: String,
14
10
  },
@@ -33,7 +29,7 @@ const props = defineProps({
33
29
  :label="item.label"
34
30
  :leftIcon="item.leftIcon"
35
31
  :rightIcon="item.rightIcon"
36
- :destructive="destructive"
32
+ :destructive="item.destructive"
37
33
  :iconClass="iconClass"
38
34
  :hide="item.hide"
39
35
  :disable="item.disable"
@@ -39,7 +39,7 @@ const type = ref(props.destructive ? 'destructive' : 'default')
39
39
  /* Computed variables */
40
40
  const labelColor = computed(() => {
41
41
  if (props.destructive) {
42
- return 'text-red-6'
42
+ return 'text-accent'
43
43
  } else if (props.selected) {
44
44
  return 'text-primary'
45
45
  }
@@ -47,7 +47,7 @@ const labelColor = computed(() => {
47
47
  })
48
48
  const iconColor = computed(() => {
49
49
  if (props.destructive) {
50
- return 'red-6'
50
+ return 'accent'
51
51
  } else if (props.selected) {
52
52
  return 'primary'
53
53
  }
@@ -10,7 +10,7 @@ import UTooltip from './UTooltip.vue'
10
10
  import { parseInitials, categorizeObjects, deepEqual } from '../../utils/data'
11
11
 
12
12
  const props = defineProps({
13
- algoliaConfig: {
13
+ algoliaIndex: {
14
14
  type: Object,
15
15
  },
16
16
  // Label for button to select a record
@@ -99,8 +99,6 @@ const emit = defineEmits([
99
99
 
100
100
  const loading = defineModel('loading')
101
101
 
102
- // const client = algoliasearch(props.algoliaConfig.APP_ID, props.algoliaConfig.SEARCH_KEY)
103
- // const index = client.initIndex(props.algoliaConfig.INDEX)
104
102
 
105
103
  const advancedSearchPendingFilterModel = structuredClone(toRaw(props.model))
106
104
  const advancedSearchSelectedTab = ref(props.advancedSearchSelectedTab ?? null)
@@ -293,7 +291,7 @@ const search = async () => {
293
291
  }
294
292
  }
295
293
 
296
- const res = await index.search(props.searchText, configPayload)
294
+ const res = await props.algoliaIndex.search(props.searchText, configPayload)
297
295
 
298
296
  if (res.hits.length >= 50) {
299
297
  exceedLimit.value = true
@@ -604,6 +604,7 @@ const handleMouseLeave = (type, index) => {
604
604
  disable:
605
605
  typeof action.disable === 'function' &&
606
606
  action.disable(props.row),
607
+ destructive: action.destructive,
607
608
  handler: function () {
608
609
  return action.handler(props.row)
609
610
  },
@@ -75,5 +75,5 @@ export const useNotify = () => {
75
75
  }
76
76
  }
77
77
 
78
- return { notify }
78
+ return notify
79
79
  }