@mouseless/baked 1.6.2 → 1.7.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
@@ -5,6 +5,7 @@ interface ModuleOptions {
5
5
  apiBaseURL: String;
6
6
  components?: Components;
7
7
  composables: Composables;
8
+ plugins?: Plugins;
8
9
  primevue: PrimeVueOptions;
9
10
  i18n: NuxtI18nOptions;
10
11
  }
@@ -23,6 +24,13 @@ interface Composables {
23
24
  useDataFetcher: UseDataFetcherOptions;
24
25
  useFormat?: UseFormatOptions;
25
26
  }
27
+ interface Plugins {
28
+ cacheApplication?: CacheOptions;
29
+ cacheUser?: CacheOptions;
30
+ }
31
+ interface CacheOptions {
32
+ expirationInMinutes: any;
33
+ }
26
34
  interface UseDataFetcherOptions {
27
35
  retry?: RetryOptions | Boolean;
28
36
  }
@@ -42,4 +50,4 @@ interface ScreenOptions {
42
50
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
43
51
 
44
52
  export { _default as default };
45
- export type { Components, Composables, ModuleOptions, PageOptions, PrimeVueOptions, RetryOptions, ScreenOptions, UseBreakpointsOptions, UseDataFetcherOptions, UseFormatOptions };
53
+ export type { CacheOptions, Components, Composables, ModuleOptions, PageOptions, Plugins, PrimeVueOptions, RetryOptions, ScreenOptions, UseBreakpointsOptions, UseDataFetcherOptions, UseFormatOptions };
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
3
  "configKey": "baked",
4
- "version": "1.6.2",
4
+ "version": "1.7.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -99,7 +99,7 @@
99
99
  :data="row.$getRow()"
100
100
  data-key="row"
101
101
  >
102
- <div class="flex">
102
+ <div class="flex text-nowrap">
103
103
  <Bake
104
104
  :name="`rows/${index}/actions`"
105
105
  :descriptor="actions.component"
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  <div
33
33
  v-if="action"
34
- class="b-message-action px-2"
34
+ class="b-message-action p-2"
35
35
  >
36
36
  <Bake
37
37
  name="action"
@@ -31,6 +31,7 @@
31
31
  <Inputs
32
32
  v-if="inputs"
33
33
  :inputs
34
+ form-mode
34
35
  input-class="w-full"
35
36
  @ready="onReady"
36
37
  @changed="onChanged"
@@ -1,4 +1,4 @@
1
- import { watch } from "vue";
1
+ import { watch, unref } from "vue";
2
2
  import { useConstraintEvaluator, useContext } from "#imports";
3
3
 
4
4
  export default function() {
@@ -74,13 +74,22 @@ function On({ evaluate, eventId, events }) {
74
74
 
75
75
  function When({ contextData, evaluate }) {
76
76
  function bind({ trigger, react }) {
77
- watch(() => contextData[trigger.key ?? "page"][trigger.when], async value => {
77
+ watch(() => access(contextData[trigger.key ?? "page"], trigger.when), async value => {
78
78
  react(false);
79
79
  react(await evaluate(trigger.constraint, value));
80
80
  }, { immediate: true });
81
81
 
82
82
  return [];
83
83
  }
84
+ function access(data, propChain) {
85
+ data = unref(data);
86
+ for(const prop of propChain.split(".")) {
87
+ data = data?.[prop];
88
+ data = unref(data);
89
+ }
90
+
91
+ return data;
92
+ }
84
93
 
85
94
  return {
86
95
  bind
@@ -5,8 +5,8 @@ export default defineNuxtPlugin({
5
5
  name: "cache-application",
6
6
  enforce: "pre",
7
7
  setup(nuxtApp) {
8
- const { public: { cacheApplication } } = useRuntimeConfig();
9
- const { expirationInMinutes } = cacheApplication;
8
+ const { public: { plugins: { cacheApplication = { } } = { } } } = useRuntimeConfig();
9
+ const { expirationInMinutes = 60 } = cacheApplication;
10
10
  const cache = useCache("cache:application", { expirationInMinutes });
11
11
  const { $fetchInterceptors } = nuxtApp;
12
12
 
@@ -5,8 +5,8 @@ export default defineNuxtPlugin({
5
5
  name: "cache-user",
6
6
  enforce: "pre",
7
7
  setup(nuxtApp) {
8
- const { public: { cacheUser } } = useRuntimeConfig();
9
- const { expirationInMinutes } = cacheUser;
8
+ const { public: { plugins: { cacheUser = { } } = { } } } = useRuntimeConfig();
9
+ const { expirationInMinutes = 60 } = cacheUser;
10
10
  const cache = useCache("cache:user", { expirationInMinutes });
11
11
  const { $fetchInterceptors } = nuxtApp;
12
12
 
package/dist/types.d.mts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { default } from './module.mjs'
2
2
 
3
- export { type Components, type Composables, type ModuleOptions, type PageOptions, type PrimeVueOptions, type RetryOptions, type ScreenOptions, type UseBreakpointsOptions, type UseDataFetcherOptions, type UseFormatOptions } from './module.mjs'
3
+ export { type CacheOptions, type Components, type Composables, type ModuleOptions, type PageOptions, type Plugins, type PrimeVueOptions, type RetryOptions, type ScreenOptions, type UseBreakpointsOptions, type UseDataFetcherOptions, type UseFormatOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "Baked is an opinionated framework for .NET and Vue. This is the UI package of Baked project.",
5
5
  "keywords": [
6
6
  "baked",
@@ -47,7 +47,7 @@
47
47
  "@nuxtjs/tailwindcss": "6.14.0",
48
48
  "@primeuix/themes": "2.0.3",
49
49
  "async-mutex": "0.5.0",
50
- "playwright": "^1.60.0",
50
+ "playwright": "1.60.0",
51
51
  "primeicons": "7.0.0",
52
52
  "primevue": "4.5.5"
53
53
  },
@@ -56,20 +56,20 @@
56
56
  "@nuxt/module-builder": "1.0.2",
57
57
  "@nuxt/test-utils": "4.0.3",
58
58
  "@playwright/test": "1.60.0",
59
- "@types/node": "25.9.1",
59
+ "@types/node": "25.9.3",
60
60
  "changelogen": "0.6.2",
61
- "nuxt": "4.4.6",
62
- "sass": "1.100.0",
61
+ "nuxt": "4.4.8",
62
+ "sass": "1.101.0",
63
63
  "typescript": "6.0.3",
64
- "vitest": "4.1.7",
65
- "vue-tsc": "3.3.2"
64
+ "vitest": "4.1.8",
65
+ "vue-tsc": "3.3.4"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@oxc-parser/binding-darwin-arm64": "0.133.0",
69
- "@oxc-parser/binding-linux-arm64-gnu": "0.133.0",
70
- "@oxc-parser/binding-linux-arm64-musl": "0.133.0",
71
- "@oxc-parser/binding-linux-x64-gnu": "0.133.0",
72
- "@oxc-parser/binding-linux-x64-musl": "0.133.0",
73
- "@oxc-parser/binding-win32-x64-msvc": "0.133.0"
68
+ "@oxc-parser/binding-darwin-arm64": "0.135.0",
69
+ "@oxc-parser/binding-linux-arm64-gnu": "0.135.0",
70
+ "@oxc-parser/binding-linux-arm64-musl": "0.135.0",
71
+ "@oxc-parser/binding-linux-x64-gnu": "0.135.0",
72
+ "@oxc-parser/binding-linux-x64-musl": "0.135.0",
73
+ "@oxc-parser/binding-win32-x64-msvc": "0.135.0"
74
74
  }
75
- }
75
+ }