@antelopejs/dms-database 0.1.0 → 0.1.1

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.
@@ -58,20 +58,33 @@ function save() {
58
58
  @update:open="emit('update:open', $event)"
59
59
  >
60
60
  <template #body>
61
- <div class="flex h-full flex-col gap-3">
62
- <textarea
63
- v-model="draft"
64
- :aria-label="t('dms_database.data.json.title', { column })"
65
- :readonly="readOnly"
66
- class="border-default bg-default focus:border-primary min-h-96 flex-1 resize-none rounded-md border p-3 font-mono text-xs outline-none"
67
- spellcheck="false"
68
- />
69
- <UAlert
70
- v-if="!readOnly && parseError"
71
- color="error"
72
- icon="i-ph-warning"
73
- :description="parseError"
74
- />
61
+ <!-- A DMS form of one field: the column as its label, the JSON in the
62
+ DMS code input, the parse error in DMS error style, the required legend. -->
63
+ <div class="grid gap-2">
64
+ <DmsFieldRow
65
+ layout="form"
66
+ :inset="false"
67
+ spacing="row"
68
+ :label="column"
69
+ label-for="dms-database-json-cell"
70
+ :description="t('dms_database.data.json.help')"
71
+ required
72
+ >
73
+ <UFormField name="json" :error="(!readOnly && parseError) || false">
74
+ <DmsInputCode
75
+ id="dms-database-json-cell"
76
+ v-model="draft"
77
+ language="json"
78
+ :min-lines="12"
79
+ :max-lines="30"
80
+ :disabled="readOnly"
81
+ />
82
+ <template #error="{ error }">
83
+ <DmsFormErrorText :error />
84
+ </template>
85
+ </UFormField>
86
+ </DmsFieldRow>
87
+ <DmsFormRequiredLegend v-if="!readOnly" class="pb-2" />
75
88
  </div>
76
89
  </template>
77
90
  <template #footer>
@@ -247,7 +247,8 @@
247
247
  "title": "Edit {column}",
248
248
  "invalid": "Invalid JSON",
249
249
  "not_structured": "The value must be a JSON object, an array or null.",
250
- "apply": "Apply"
250
+ "apply": "Apply",
251
+ "help": "An object or a list. Type null to empty the cell."
251
252
  }
252
253
  },
253
254
  "diagram": {
@@ -247,7 +247,8 @@
247
247
  "title": "Modifier {column}",
248
248
  "invalid": "JSON invalide",
249
249
  "not_structured": "La valeur doit être un objet JSON, un tableau ou null.",
250
- "apply": "Appliquer"
250
+ "apply": "Appliquer",
251
+ "help": "Un objet ou une liste. Tapez null pour vider la cellule."
251
252
  }
252
253
  },
253
254
  "diagram": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-database",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",