grantthomas-nuxt 1.0.26 → 1.0.27
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
|
@@ -6,12 +6,12 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
6
6
|
});
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
8
|
hideActionsOnSave: {
|
|
9
|
-
type: BooleanConstructor;
|
|
9
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
10
10
|
required: false;
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
13
|
closeOnSave: {
|
|
14
|
-
type: BooleanConstructor;
|
|
14
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
15
15
|
required: false;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
@@ -130,12 +130,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
130
130
|
};
|
|
131
131
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
132
132
|
hideActionsOnSave: {
|
|
133
|
-
type: BooleanConstructor;
|
|
133
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
134
134
|
required: false;
|
|
135
135
|
default: boolean;
|
|
136
136
|
};
|
|
137
137
|
closeOnSave: {
|
|
138
|
-
type: BooleanConstructor;
|
|
138
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
139
139
|
required: false;
|
|
140
140
|
default: boolean;
|
|
141
141
|
};
|
|
@@ -263,8 +263,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
263
263
|
deleteTitle: string;
|
|
264
264
|
allowCreate: boolean;
|
|
265
265
|
hideFilters: boolean;
|
|
266
|
-
hideActionsOnSave: boolean;
|
|
267
|
-
closeOnSave: boolean;
|
|
266
|
+
hideActionsOnSave: boolean | Function;
|
|
267
|
+
closeOnSave: boolean | Function;
|
|
268
268
|
fullScreenDialog: boolean;
|
|
269
269
|
contentClasses: string;
|
|
270
270
|
showPerPageSelector: boolean;
|
|
@@ -12,17 +12,16 @@ import CrudErrorDisplay from "./CrudErrorDisplay.vue";
|
|
|
12
12
|
const { parseQuery, stringifyQuery, cloneDeep } = useCrudConverters();
|
|
13
13
|
const props = defineProps({
|
|
14
14
|
hideActionsOnSave: {
|
|
15
|
-
type: Boolean,
|
|
15
|
+
type: [Boolean, Function],
|
|
16
16
|
required: false,
|
|
17
17
|
default: false
|
|
18
18
|
},
|
|
19
19
|
closeOnSave: {
|
|
20
|
-
type: Boolean,
|
|
20
|
+
type: [Boolean, Function],
|
|
21
21
|
required: false,
|
|
22
22
|
default: true
|
|
23
23
|
},
|
|
24
24
|
fullScreenDialog: {
|
|
25
|
-
type: Boolean,
|
|
26
25
|
type: Boolean,
|
|
27
26
|
required: false,
|
|
28
27
|
default: false
|
|
@@ -325,10 +324,12 @@ const saveAction = async () => {
|
|
|
325
324
|
const savedPath = props.path;
|
|
326
325
|
const savedAction = action.value;
|
|
327
326
|
const savedItem = item.value;
|
|
328
|
-
|
|
327
|
+
const shouldClose = typeof props.closeOnSave === "function" ? props.closeOnSave(savedItem) : props.closeOnSave;
|
|
328
|
+
if (shouldClose) {
|
|
329
329
|
dialogOpen.value = false;
|
|
330
330
|
}
|
|
331
|
-
|
|
331
|
+
const shouldHideActions = typeof props.hideActionsOnSave === "function" ? props.hideActionsOnSave(savedItem) : props.hideActionsOnSave;
|
|
332
|
+
if (shouldHideActions) {
|
|
332
333
|
hideActions.value = true;
|
|
333
334
|
}
|
|
334
335
|
await getItems(Number.parseInt(page.value) ?? null, null, filterValues.value);
|
|
@@ -6,12 +6,12 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
6
6
|
});
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
8
|
hideActionsOnSave: {
|
|
9
|
-
type: BooleanConstructor;
|
|
9
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
10
10
|
required: false;
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
13
|
closeOnSave: {
|
|
14
|
-
type: BooleanConstructor;
|
|
14
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
15
15
|
required: false;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
@@ -130,12 +130,12 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
130
130
|
};
|
|
131
131
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
132
132
|
hideActionsOnSave: {
|
|
133
|
-
type: BooleanConstructor;
|
|
133
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
134
134
|
required: false;
|
|
135
135
|
default: boolean;
|
|
136
136
|
};
|
|
137
137
|
closeOnSave: {
|
|
138
|
-
type: BooleanConstructor;
|
|
138
|
+
type: (BooleanConstructor | FunctionConstructor)[];
|
|
139
139
|
required: false;
|
|
140
140
|
default: boolean;
|
|
141
141
|
};
|
|
@@ -263,8 +263,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
263
263
|
deleteTitle: string;
|
|
264
264
|
allowCreate: boolean;
|
|
265
265
|
hideFilters: boolean;
|
|
266
|
-
hideActionsOnSave: boolean;
|
|
267
|
-
closeOnSave: boolean;
|
|
266
|
+
hideActionsOnSave: boolean | Function;
|
|
267
|
+
closeOnSave: boolean | Function;
|
|
268
268
|
fullScreenDialog: boolean;
|
|
269
269
|
contentClasses: string;
|
|
270
270
|
showPerPageSelector: boolean;
|