pgo-ui 1.1.37 → 1.1.39

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": "pgo-ui",
3
- "version": "1.1.37",
3
+ "version": "1.1.39",
4
4
  "description": "A Vue 3 component library with PGO design system",
5
5
  "private": false,
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  <!-- Render grouped fields -->
24
24
 
25
25
  <!-- A0111904 -->
26
- {{ valid }}
26
+ <!-- {{ valid }} -->
27
27
  <template v-if="form.groups">
28
28
  <template v-for="(group, id) in form.groups" :key="id">
29
29
  <div v-if="shouldShowGroup(group)" class="mb-4">
@@ -846,9 +846,10 @@
846
846
  }else {
847
847
  submitData.status = 'submitted';
848
848
  }
849
- if (formId.value) {
850
- // submitData.id = formId.value; // Ensure ID is included for updates
851
- }
849
+
850
+ // if (formId.value) {
851
+ // // submitData.id = formId.value; // Ensure ID is included for updates
852
+ // }
852
853
  // const isFullUrl = /^https?:\/\//i.test(props.form?.crudLink)
853
854
  // let url = isFullUrl ? props.form?.crudLink : baseUrl + '/' + props.form?.crudLink
854
855
  let completeUrl = ''
@@ -108,8 +108,8 @@ const setErrors = (backendErrorsObj) => {
108
108
  // Find the field by matching the fieldKey prop
109
109
  for (const [uid, field] of fields.entries()) {
110
110
  if (field?.fieldKey === fieldKey && field?.setBackendError) {
111
- // Also store the uid → fieldKey mapping for cleanup
112
- backendErrors['__uid_' + uid] = fieldKey
111
+ // Store the uid → fieldKey mapping (in the separate map, NOT in backendErrors)
112
+ uidToFieldKey[uid] = fieldKey
113
113
  // Set backend error on the field component
114
114
  field.setBackendError(errorMessages)
115
115
  }
@@ -140,13 +140,12 @@ const report = (uid, valid, fieldErrors, fieldBackendErrors) => {
140
140
 
141
141
  // Clear backend errors for this field if no backend errors remain
142
142
  if (!fieldBackendErrors || fieldBackendErrors.length === 0) {
143
- // Use uid → fieldKey mapping to reliably find and clear the backend error
144
143
  const fieldKey = uidToFieldKey[uid] || field?.fieldKey
145
144
  if (fieldKey) {
146
145
  delete backendErrors[fieldKey]
147
- }
148
- console.log('Cleared backend errors for fieldKey:', fieldBackendErrors)
149
- console.log('Cleared backend errors for fieldKey2:', fieldKey)
146
+ }
147
+ // Also clean up any leftover __uid_ keys
148
+ delete backendErrors['__uid_' + uid]
150
149
  }
151
150
 
152
151
  updateModelValue()
@@ -28,6 +28,7 @@
28
28
  :lang="computedLang"
29
29
  :width="width"
30
30
  :rules="rules"
31
+ :field-key="fieldKey"
31
32
  >
32
33
  <template #control="{ attrs, events }">
33
34
  <input
@@ -100,6 +101,7 @@ const props = defineProps({
100
101
  items: { type: Array, default: () => [] },
101
102
  itemText: { type: String, default: 'text' },
102
103
  itemValue: { type: String, default: 'value' },
104
+ fieldKey: { type: String, default: '' },
103
105
  })
104
106
 
105
107
  // Inject dir from parent Card (if exists)
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-D3B3wyao.js";
2
- export {
3
- f as default
4
- };