@hywax/cms-console 1.2.0 → 1.3.0

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.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { CMSRuntimeOptions } from '@hywax/cms-core';
2
+ import { CMSCoreOptions } from '@hywax/cms-core';
3
3
  export * from '../dist/runtime/types/index.js';
4
4
 
5
- interface CMSConsoleOptions extends CMSRuntimeOptions {
5
+ interface CMSConsoleOptions extends Pick<CMSCoreOptions, 'componentsPrefix'> {
6
6
  }
7
7
 
8
8
  declare const _default: _nuxt_schema.NuxtModule<CMSConsoleOptions, CMSConsoleOptions, false>;
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hywax/cms-console",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "configKey": "cmsConsole",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -5,7 +5,7 @@ import { defu } from 'defu';
5
5
  import { kebabCase } from 'scule';
6
6
 
7
7
  const name = "@hywax/cms-console";
8
- const version = "1.2.0";
8
+ const version = "1.3.0";
9
9
 
10
10
  function createContext(options, nuxt) {
11
11
  const { resolve } = createResolver(import.meta.url);
@@ -36,6 +36,14 @@
36
36
  </template>
37
37
  </UPopover>
38
38
 
39
+ <UButton
40
+ color="neutral"
41
+ size="sm"
42
+ variant="ghost"
43
+ :icon="appConfig.ui.icons.refresh"
44
+ @click="resetState()"
45
+ />
46
+
39
47
  <ButtonDeleteConfirm
40
48
  color="error"
41
49
  size="sm"
@@ -130,6 +138,20 @@ const { open, execute: uploadExecute, status: uploadStatus, reset: resetUpload,
130
138
  accept: "image/*"
131
139
  });
132
140
  const { execute: deleteExecute, onDeleted } = useUploraDelete();
141
+ function syncState() {
142
+ modelValue.value = {
143
+ ...modelValue.value,
144
+ alt: state.alt
145
+ };
146
+ }
147
+ function resetState() {
148
+ modelValue.value = {
149
+ image: "",
150
+ alt: ""
151
+ };
152
+ emitFormChange();
153
+ emitFormInput();
154
+ }
133
155
  onUploaded((file) => {
134
156
  modelValue.value = {
135
157
  ...modelValue.value,
@@ -142,20 +164,9 @@ onUploaded((file) => {
142
164
  });
143
165
  onDeleted(() => {
144
166
  resetUpload();
145
- modelValue.value = {
146
- image: "",
147
- alt: ""
148
- };
167
+ resetState();
149
168
  emit("delete");
150
- emitFormChange();
151
- emitFormInput();
152
169
  });
153
- function syncState() {
154
- modelValue.value = {
155
- ...modelValue.value,
156
- alt: state.alt
157
- };
158
- }
159
170
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.cms?.inputUploraImage || {} })({
160
171
  disabled: disabled.value,
161
172
  uploaded: modelValue.value.image !== ""
@@ -53,7 +53,7 @@
53
53
  <UButton
54
54
  color="neutral"
55
55
  label="Сбросить"
56
- variant="outline"
56
+ variant="ghost"
57
57
  @click="reset"
58
58
  />
59
59
 
@@ -72,7 +72,7 @@
72
72
  import { UCheckbox, UForm, UInput, USelect, USwitch } from "#components";
73
73
  import { useAppConfig } from "#imports";
74
74
  import { useCloned } from "@vueuse/core";
75
- import copy from "fast-copy";
75
+ import { copy } from "fast-copy";
76
76
  import { deepEqual } from "fast-equals";
77
77
  import { computed, h, nextTick, ref, toValue, unref, useId, useTemplateRef, watch } from "vue";
78
78
  import CDatePicker from "./DatePicker.vue";
@@ -129,8 +129,7 @@
129
129
  <script>
130
130
  import theme from "#build/cms-console/table-panel";
131
131
  import { UButton, UCheckbox, UDropdownMenu, UTable } from "#components";
132
- import { useAppConfig } from "#imports";
133
- import { useOverlay } from "@nuxt/ui/composables/useOverlay";
132
+ import { useAppConfig, useOverlay } from "#imports";
134
133
  import { getGroupedRowModel } from "@tanstack/vue-table";
135
134
  import { reactivePick } from "@vueuse/core";
136
135
  import { defu } from "defu";
@@ -206,7 +205,7 @@ function createActionCell(action) {
206
205
  onClick: () => modalConfirm.open(defu(action.delete, {
207
206
  title: "\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435",
208
207
  message: "\u0412\u044B \u0434\u0435\u0438\u0306\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442?",
209
- confirmButton: { color: "error", label: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C" }
208
+ color: "error"
210
209
  }))
211
210
  };
212
211
  }
@@ -1,4 +1,4 @@
1
- import copy from "fast-copy";
1
+ import { copy } from "fast-copy";
2
2
  import { computed, ref, toValue, watch } from "vue";
3
3
  import { useQueryState } from "../composables/useQueryState.js";
4
4
  export function useTableFilters(initialFilters, options) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hywax/cms-console",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "description": "Hywax CMS. ⚠️ This package is intended for internal use only.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -56,12 +56,12 @@
56
56
  "@unovis/ts": "^1.6.2",
57
57
  "@unovis/vue": "^1.6.2",
58
58
  "defu": "^6.1.4",
59
- "fast-copy": "^3.0.2",
59
+ "fast-copy": "^4.0.2",
60
60
  "fast-equals": "^5.4.0",
61
61
  "pathe": "^2.0.3",
62
62
  "scule": "^1.3.0",
63
63
  "sortablejs": "^1.15.6",
64
- "@hywax/cms-core": "1.4.0"
64
+ "@hywax/cms-core": "1.5.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@nuxt/devtools": "^3.1.1",