@live-change/frontend-auto-form 0.8.145 → 0.8.147

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.
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
 
47
47
  </div>
48
- <auto-input :modelValue="value" :definition="definition.of"
48
+ <auto-input :modelValue="value" :definition="definition.of || definition.items"
49
49
  @update:modelValue="value => updateItem(index, value)"
50
50
  :rootValue="props.rootValue" :propName="props.propName + '.' + index"
51
51
  :i18n="i18n" />
@@ -106,7 +106,7 @@
106
106
 
107
107
  function insertItem(index) {
108
108
  const data = modelValue.value || []
109
- const item = defaultData(definition.value.of)
109
+ const item = defaultData(definition.value.of || definition.value.items)
110
110
  data.splice(index ?? data.length, 0, item) /// TODO: default value
111
111
  emit('update:modelValue', data)
112
112
  toast.add({ severity: 'info', summary: 'Item added', life: 1500 })
@@ -40,7 +40,7 @@ inputs.select = input(() => import('primevue/dropdown'), {
40
40
  const { definition, i18n, t, te } = config
41
41
  // console.log("SELECT", config)
42
42
  return {
43
- options: definition.options,
43
+ options: definition.options ?? definition.enum,
44
44
  optionLabel: option => {
45
45
  const i18nId = (definition.i18n ?? i18n + ':options') + '.' + option
46
46
  if(te(i18nId)) return t(i18nId)
@@ -54,7 +54,7 @@ inputs.multiselect = input(() => import('primevue/multiselect'), {
54
54
  attributes: (config) => {
55
55
  const { definition, i18n, t, te } = config
56
56
  return {
57
- options: definition.of.options ?? definition.options,
57
+ options: definition.of.options ?? definition.of.enum ?? definition.options ?? definition.enum,
58
58
  optionLabel: option => {
59
59
  const i18nId = (definition.i18n ?? i18n + ':options') + '.' + option
60
60
  if(te(i18nId)) return t(i18nId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-auto-form",
3
- "version": "0.8.145",
3
+ "version": "0.8.147",
4
4
  "scripts": {
5
5
  "memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -22,16 +22,16 @@
22
22
  "type": "module",
23
23
  "dependencies": {
24
24
  "@fortawesome/fontawesome-free": "^6.5.2",
25
- "@live-change/cli": "^0.8.145",
26
- "@live-change/dao": "^0.8.145",
27
- "@live-change/dao-vue3": "^0.8.145",
28
- "@live-change/dao-websocket": "^0.8.145",
29
- "@live-change/framework": "^0.8.145",
30
- "@live-change/image-frontend": "^0.8.145",
31
- "@live-change/image-service": "^0.8.145",
32
- "@live-change/session-service": "^0.8.145",
33
- "@live-change/vue3-components": "^0.8.145",
34
- "@live-change/vue3-ssr": "^0.8.145",
25
+ "@live-change/cli": "^0.8.147",
26
+ "@live-change/dao": "^0.8.147",
27
+ "@live-change/dao-vue3": "^0.8.147",
28
+ "@live-change/dao-websocket": "^0.8.147",
29
+ "@live-change/framework": "^0.8.147",
30
+ "@live-change/image-frontend": "^0.8.147",
31
+ "@live-change/image-service": "^0.8.147",
32
+ "@live-change/session-service": "^0.8.147",
33
+ "@live-change/vue3-components": "^0.8.147",
34
+ "@live-change/vue3-ssr": "^0.8.147",
35
35
  "@vueuse/core": "^10.11.0",
36
36
  "codeceptjs-assert": "^0.0.5",
37
37
  "compression": "^1.7.4",
@@ -52,7 +52,7 @@
52
52
  "vue3-scroll-border": "0.1.6"
53
53
  },
54
54
  "devDependencies": {
55
- "@live-change/codeceptjs-helper": "^0.8.145",
55
+ "@live-change/codeceptjs-helper": "^0.8.147",
56
56
  "codeceptjs": "^3.6.5",
57
57
  "generate-password": "1.7.1",
58
58
  "playwright": "^1.41.2",
@@ -63,5 +63,5 @@
63
63
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
64
64
  "license": "ISC",
65
65
  "description": "",
66
- "gitHead": "fadc33dc99f47714c3d40f2ce1b5cdf3f050a70a"
66
+ "gitHead": "2bfde1b464cba759052a10453b004be386922177"
67
67
  }