@mouseless/baked 1.6.2 → 1.6.3

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
3
  "configKey": "baked",
4
- "version": "1.6.2",
4
+ "version": "1.6.3",
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
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",