atom-nuxt 1.4.14 → 1.4.15

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomengine/atom-nuxt",
3
3
  "configKey": "atomNuxt",
4
- "version": "1.4.14",
4
+ "version": "1.4.15",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
@@ -124,11 +124,17 @@ const props = defineProps({
124
124
  type: [String, Number],
125
125
  required: false,
126
126
  default: null
127
+ },
128
+ onFormErrorsText: {
129
+ type: String,
130
+ required: false,
131
+ default: "Please correct the errors and try again."
127
132
  }
128
133
  });
129
134
  const item = defineModel();
130
135
  const dialogOpen = defineModel("dialog");
131
136
  const hasItem = computed(() => item.value && Object.keys(item.value).length > 0);
137
+ const hasFormErrors = computed(() => props.formErrors && Object.keys(props.formErrors).length > 0);
132
138
  const buttonTitle = computed(() => {
133
139
  return props.btnText ? props.btnText : props.action === "create" ? props.createTitle : props.action === "update" ? props.updateTitle : props.action === "delete" ? props.deleteTitle : props.action === "view" ? props.viewTitle : "";
134
140
  });
@@ -231,11 +237,14 @@ const dialogTransition = computed(() => {
231
237
  </suspense>
232
238
  </div>
233
239
  </div>
234
- <v-card-actions v-if="!hideActions && action !== 'view'" :class="['pa-0 border-t pa-4 elevation-5', effectiveDialogStyle === 'leaf' ? 'flex-shrink-0' : '']">
235
- <div class="flex-fill">
240
+ <v-card-actions v-if="!hideActions && action !== 'view'" :class="['pa-0 border-t pa-4 elevation-5 d-flex align-center', effectiveDialogStyle === 'leaf' ? 'flex-shrink-0' : '']">
241
+ <div class="flex-fill d-flex align-center">
236
242
  <slot name="beforeActions" :item="item" :action="action" :errors="formErrors" :pending="itemPending" :formPending="formPending">
237
243
 
238
244
  </slot>
245
+ <div v-if="hasFormErrors && onFormErrorsText" class="text-error font-weight-bold">
246
+ {{ onFormErrorsText }}
247
+ </div>
239
248
  </div>
240
249
  <v-btn
241
250
  size="large"
@@ -26,6 +26,7 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
26
26
  updateDialogSize: string | number;
27
27
  deleteDialogSize: string | number;
28
28
  viewDialogSize: string | number;
29
+ onFormErrorsText: string;
29
30
  btnText?: string | undefined;
30
31
  $props: any;
31
32
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -176,6 +176,11 @@ const props = defineProps({
176
176
  type: [String, Number],
177
177
  required: false,
178
178
  default: null
179
+ },
180
+ onFormErrorsText: {
181
+ type: String,
182
+ required: false,
183
+ default: "Please correct the errors and try again."
179
184
  }
180
185
  });
181
186
  const {
@@ -598,6 +603,7 @@ const exportAction = async () => {
598
603
  :update-dialog-size="updateDialogSize"
599
604
  :delete-dialog-size="deleteDialogSize"
600
605
  :view-dialog-size="viewDialogSize"
606
+ :on-form-errors-text="onFormErrorsText"
601
607
  >
602
608
  <slot
603
609
  name="form" :action="action"
@@ -20,6 +20,7 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
20
20
  updateDialogSize: string | number;
21
21
  deleteDialogSize: string | number;
22
22
  viewDialogSize: string | number;
23
+ onFormErrorsText: string;
23
24
  allowCreate: boolean;
24
25
  hideFilters: boolean;
25
26
  filtersTitle: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom-nuxt",
3
- "version": "1.4.14",
3
+ "version": "1.4.15",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "atomengine/atom-nuxt",
6
6
  "license": "MIT",