@winchsa/ui 0.1.54 → 0.1.58

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.
@@ -17,6 +17,7 @@ type __VLS_Props = {
17
17
  error?: boolean;
18
18
  modelValue?: unknown;
19
19
  itemLabel?: string;
20
+ descriptionKey?: string;
20
21
  groupValues?: string;
21
22
  groupLabel?: string;
22
23
  trackBy?: string;
@@ -83,6 +84,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
83
84
  clearable: boolean;
84
85
  hideSelected: boolean;
85
86
  querySearchParam: string;
87
+ descriptionKey: string;
86
88
  trackBy: string;
87
89
  deselectLabel: string;
88
90
  selectLabel: string;
@@ -26,6 +26,7 @@ const props = defineProps({
26
26
  error: { type: Boolean, required: false },
27
27
  modelValue: { type: null, required: false },
28
28
  itemLabel: { type: String, required: false },
29
+ descriptionKey: { type: String, required: false, default: "description" },
29
30
  groupValues: { type: String, required: false },
30
31
  groupLabel: { type: String, required: false },
31
32
  trackBy: { type: String, required: false, default: "id" },
@@ -305,7 +306,7 @@ defineExpose({
305
306
  <p class="ma-0 app-font-size-13">
306
307
  {{ option.name }}
307
308
  </p>
308
- <span v-if="option?.description" class="text-gray-600 app-font-size-13">({{ option?.description }})</span>
309
+ <span v-if="option?.[descriptionKey]" class="text-gray-600 app-font-size-13">{{ option?.[descriptionKey] }}</span>
309
310
  </div>
310
311
  </template>
311
312
 
@@ -422,7 +423,7 @@ defineExpose({
422
423
  <p class="ma-0 app-font-size-13">
423
424
  {{ option.name }}
424
425
  </p>
425
- <span v-if="option?.description" class="text-gray-600 app-font-size-13">({{ option?.description }})</span>
426
+ <span v-if="option?.[descriptionKey]" class="text-gray-600 app-font-size-13">{{ option?.[descriptionKey] }}</span>
426
427
  </div>
427
428
  </template>
428
429
 
@@ -17,6 +17,7 @@ type __VLS_Props = {
17
17
  error?: boolean;
18
18
  modelValue?: unknown;
19
19
  itemLabel?: string;
20
+ descriptionKey?: string;
20
21
  groupValues?: string;
21
22
  groupLabel?: string;
22
23
  trackBy?: string;
@@ -83,6 +84,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
83
84
  clearable: boolean;
84
85
  hideSelected: boolean;
85
86
  querySearchParam: string;
87
+ descriptionKey: string;
86
88
  trackBy: string;
87
89
  deselectLabel: string;
88
90
  selectLabel: string;
@@ -178,6 +178,7 @@ const placeholder = (header) => {
178
178
  :group-label="header.groupLabel || 'name'"
179
179
  :group-values="header.groupValues || 'children'"
180
180
  :item-label="header.itemLabel || 'name'"
181
+ :description-key="header.descriptionKey || 'description'"
181
182
  :track-by="header.trackBy || 'id'"
182
183
  :multiple="header.multiple"
183
184
  :disabled="isDisabled"
@@ -160,6 +160,7 @@ watch(
160
160
  :url="form.urlSearch"
161
161
  :label="form.label"
162
162
  :item-label="form.itemLabel || 'name'"
163
+ :description-key="form.descriptionKey || 'description'"
163
164
  :track-by="form.trackBy || 'id'"
164
165
  :track-by-value="form.trackByValue"
165
166
  :params="form.params"
package/dist/types.d.ts CHANGED
@@ -71,6 +71,7 @@ export type FormFilter = {
71
71
  hasLang?: boolean
72
72
  options?: OptionItem[]
73
73
  itemLabel?: string
74
+ descriptionKey?: string
74
75
  urlSearch?: string
75
76
  multiple?: boolean
76
77
  trackBy?: string
@@ -142,6 +143,7 @@ export type EditableDataTableItem = {
142
143
  searchInternally?: boolean
143
144
  trackBy?: string
144
145
  itemLabel?: string
146
+ descriptionKey?: string
145
147
  multiple?: boolean
146
148
  groupLabel?: string
147
149
  groupValues?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winchsa/ui",
3
- "version": "0.1.54",
3
+ "version": "0.1.58",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {