@tager/admin-blog 0.3.40 → 0.3.41
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/index.esm.js +18 -1
- package/dist/index.umd.js +18 -1
- package/dist/typings/model.d.ts +1 -0
- package/dist/views/Categories/CategoryForm/CategoryForm.vue.d.ts +2 -0
- package/package.json +1 -1
- package/src/typings/model.ts +1 -0
- package/src/views/Categories/CategoryForm/CategoryForm.helpers.ts +3 -1
- package/src/views/Categories/CategoryForm/CategoryForm.vue +7 -0
package/dist/index.esm.js
CHANGED
|
@@ -4603,6 +4603,7 @@ function convertCategoryToFormValues(category, languageOptionList, t) {
|
|
|
4603
4603
|
name: '',
|
|
4604
4604
|
parent: { value: null, label: t('blog:noParent') },
|
|
4605
4605
|
urlAlias: '',
|
|
4606
|
+
isDefault: false,
|
|
4606
4607
|
pageTitle: '',
|
|
4607
4608
|
pageDescription: '',
|
|
4608
4609
|
pageKeywords: '',
|
|
@@ -4613,6 +4614,7 @@ function convertCategoryToFormValues(category, languageOptionList, t) {
|
|
|
4613
4614
|
}
|
|
4614
4615
|
return {
|
|
4615
4616
|
language: currentLangOption !== null && currentLangOption !== void 0 ? currentLangOption : null,
|
|
4617
|
+
isDefault: category.isDefault,
|
|
4616
4618
|
name: category.name,
|
|
4617
4619
|
parent: category.parent
|
|
4618
4620
|
? { value: category.parent.id, label: category.parent.name }
|
|
@@ -4635,7 +4637,7 @@ function convertCategoryFormValuesToPayload(values) {
|
|
|
4635
4637
|
name: values.name,
|
|
4636
4638
|
parent: values.parent.value,
|
|
4637
4639
|
urlAlias: values.urlAlias,
|
|
4638
|
-
isDefault:
|
|
4640
|
+
isDefault: values.isDefault,
|
|
4639
4641
|
pageTitle: values.pageTitle,
|
|
4640
4642
|
pageDescription: values.pageDescription,
|
|
4641
4643
|
openGraphImage: (_d = (_c = values.openGraphImage) === null || _c === void 0 ? void 0 : _c.file.id) !== null && _d !== void 0 ? _d : null,
|
|
@@ -4920,6 +4922,21 @@ var __vue_render__$3 = function () {
|
|
|
4920
4922
|
})
|
|
4921
4923
|
: _vm._e(),
|
|
4922
4924
|
_vm._v(" "),
|
|
4925
|
+
_c("form-field-checkbox", {
|
|
4926
|
+
attrs: {
|
|
4927
|
+
name: "isDefault",
|
|
4928
|
+
label: _vm.$t("blog:defaultCategory"),
|
|
4929
|
+
error: _vm.errors.isDefault,
|
|
4930
|
+
},
|
|
4931
|
+
model: {
|
|
4932
|
+
value: _vm.values.isDefault,
|
|
4933
|
+
callback: function ($$v) {
|
|
4934
|
+
_vm.$set(_vm.values, "isDefault", $$v);
|
|
4935
|
+
},
|
|
4936
|
+
expression: "values.isDefault",
|
|
4937
|
+
},
|
|
4938
|
+
}),
|
|
4939
|
+
_vm._v(" "),
|
|
4923
4940
|
_c("form-field", {
|
|
4924
4941
|
attrs: {
|
|
4925
4942
|
name: "name",
|
package/dist/index.umd.js
CHANGED
|
@@ -4603,6 +4603,7 @@
|
|
|
4603
4603
|
name: '',
|
|
4604
4604
|
parent: { value: null, label: t('blog:noParent') },
|
|
4605
4605
|
urlAlias: '',
|
|
4606
|
+
isDefault: false,
|
|
4606
4607
|
pageTitle: '',
|
|
4607
4608
|
pageDescription: '',
|
|
4608
4609
|
pageKeywords: '',
|
|
@@ -4613,6 +4614,7 @@
|
|
|
4613
4614
|
}
|
|
4614
4615
|
return {
|
|
4615
4616
|
language: currentLangOption !== null && currentLangOption !== void 0 ? currentLangOption : null,
|
|
4617
|
+
isDefault: category.isDefault,
|
|
4616
4618
|
name: category.name,
|
|
4617
4619
|
parent: category.parent
|
|
4618
4620
|
? { value: category.parent.id, label: category.parent.name }
|
|
@@ -4635,7 +4637,7 @@
|
|
|
4635
4637
|
name: values.name,
|
|
4636
4638
|
parent: values.parent.value,
|
|
4637
4639
|
urlAlias: values.urlAlias,
|
|
4638
|
-
isDefault:
|
|
4640
|
+
isDefault: values.isDefault,
|
|
4639
4641
|
pageTitle: values.pageTitle,
|
|
4640
4642
|
pageDescription: values.pageDescription,
|
|
4641
4643
|
openGraphImage: (_d = (_c = values.openGraphImage) === null || _c === void 0 ? void 0 : _c.file.id) !== null && _d !== void 0 ? _d : null,
|
|
@@ -4920,6 +4922,21 @@
|
|
|
4920
4922
|
})
|
|
4921
4923
|
: _vm._e(),
|
|
4922
4924
|
_vm._v(" "),
|
|
4925
|
+
_c("form-field-checkbox", {
|
|
4926
|
+
attrs: {
|
|
4927
|
+
name: "isDefault",
|
|
4928
|
+
label: _vm.$t("blog:defaultCategory"),
|
|
4929
|
+
error: _vm.errors.isDefault,
|
|
4930
|
+
},
|
|
4931
|
+
model: {
|
|
4932
|
+
value: _vm.values.isDefault,
|
|
4933
|
+
callback: function ($$v) {
|
|
4934
|
+
_vm.$set(_vm.values, "isDefault", $$v);
|
|
4935
|
+
},
|
|
4936
|
+
expression: "values.isDefault",
|
|
4937
|
+
},
|
|
4938
|
+
}),
|
|
4939
|
+
_vm._v(" "),
|
|
4923
4940
|
_c("form-field", {
|
|
4924
4941
|
attrs: {
|
|
4925
4942
|
name: "name",
|
package/dist/typings/model.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
16
16
|
disabled?: boolean | undefined;
|
|
17
17
|
};
|
|
18
18
|
urlAlias: string;
|
|
19
|
+
isDefault: boolean;
|
|
19
20
|
pageTitle: Nullable<string>;
|
|
20
21
|
pageDescription: Nullable<string>;
|
|
21
22
|
pageKeywords: Nullable<string>;
|
|
@@ -72,6 +73,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
72
73
|
disabled?: boolean | undefined;
|
|
73
74
|
};
|
|
74
75
|
urlAlias: string;
|
|
76
|
+
isDefault: boolean;
|
|
75
77
|
pageTitle: Nullable<string>;
|
|
76
78
|
pageDescription: Nullable<string>;
|
|
77
79
|
pageKeywords: Nullable<string>;
|
package/package.json
CHANGED
package/src/typings/model.ts
CHANGED
|
@@ -25,6 +25,7 @@ export function convertCategoryToFormValues(
|
|
|
25
25
|
name: '',
|
|
26
26
|
parent: { value: null, label: t('blog:noParent') },
|
|
27
27
|
urlAlias: '',
|
|
28
|
+
isDefault: false,
|
|
28
29
|
|
|
29
30
|
pageTitle: '',
|
|
30
31
|
pageDescription: '',
|
|
@@ -37,6 +38,7 @@ export function convertCategoryToFormValues(
|
|
|
37
38
|
|
|
38
39
|
return {
|
|
39
40
|
language: currentLangOption ?? null,
|
|
41
|
+
isDefault: category.isDefault,
|
|
40
42
|
name: category.name,
|
|
41
43
|
parent: category.parent
|
|
42
44
|
? { value: category.parent.id, label: category.parent.name }
|
|
@@ -62,7 +64,7 @@ export function convertCategoryFormValuesToPayload(
|
|
|
62
64
|
name: values.name,
|
|
63
65
|
parent: values.parent.value,
|
|
64
66
|
urlAlias: values.urlAlias,
|
|
65
|
-
isDefault:
|
|
67
|
+
isDefault: values.isDefault,
|
|
66
68
|
|
|
67
69
|
pageTitle: values.pageTitle,
|
|
68
70
|
pageDescription: values.pageDescription,
|