@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 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: false,
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: false,
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",
@@ -84,6 +84,7 @@ export interface CategoryFormValues {
84
84
  name: string;
85
85
  parent: OptionType<Nullable<number>>;
86
86
  urlAlias: string;
87
+ isDefault: boolean;
87
88
  pageTitle: Nullable<string>;
88
89
  pageDescription: Nullable<string>;
89
90
  pageKeywords: Nullable<string>;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tager/admin-blog",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
@@ -98,6 +98,7 @@ export interface CategoryFormValues {
98
98
  name: string;
99
99
  parent: OptionType<Nullable<number>>;
100
100
  urlAlias: string;
101
+ isDefault: boolean;
101
102
 
102
103
  pageTitle: Nullable<string>;
103
104
  pageDescription: Nullable<string>;
@@ -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: false,
67
+ isDefault: values.isDefault,
66
68
 
67
69
  pageTitle: values.pageTitle,
68
70
  pageDescription: values.pageDescription,
@@ -62,6 +62,13 @@
62
62
  :error="errors.language"
63
63
  />
64
64
 
65
+ <form-field-checkbox
66
+ v-model="values.isDefault"
67
+ name="isDefault"
68
+ :label="$t('blog:defaultCategory')"
69
+ :error="errors.isDefault"
70
+ />
71
+
65
72
  <form-field
66
73
  v-model="values.name"
67
74
  name="name"