@escalated-dev/escalated 0.11.7 → 0.11.8

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Escalated Dev
3
+ Copyright (c) 2026 Escalated.dev
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -23,8 +23,10 @@
23
23
  <div align="center">
24
24
 
25
25
  [![Tests](https://github.com/escalated-dev/escalated/actions/workflows/run-tests.yml/badge.svg)](https://github.com/escalated-dev/escalated/actions/workflows/run-tests.yml)[![npm](https://img.shields.io/npm/v/@escalated-dev/escalated)](https://www.npmjs.com/package/@escalated-dev/escalated)
26
+ [![npm downloads](https://img.shields.io/npm/dm/@escalated-dev/escalated)](https://www.npmjs.com/package/@escalated-dev/escalated)
26
27
  [![Vue 3](https://img.shields.io/badge/vue-3.x-4FC08D?logo=vue.js&logoColor=white)](https://vuejs.org/)
27
28
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
29
+ [![Views](https://hits.sh/github.com/escalated-dev/escalated.svg?style=flat&label=views&color=007ec6)](https://hits.sh/github.com/escalated-dev/escalated/)
28
30
 
29
31
  </div>
30
32
 
@@ -385,4 +387,4 @@ This is the shared frontend for the Escalated support ticket system. Host framew
385
387
 
386
388
  ## License
387
389
 
388
- MIT
390
+ MIT - Copyright (c) Escalated.dev. See [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escalated-dev/escalated",
3
- "version": "0.11.7",
3
+ "version": "0.11.8",
4
4
  "description": "Vue 3 + Inertia.js UI components for Escalated — the embeddable support ticket system",
5
5
  "author": "Escalated Dev <hello@escalated.dev>",
6
6
  "license": "MIT",
package/pages.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "Generated by scripts/generate-page-manifest.js from src/pages. Every name here resolves to a component; a name a backend renders that is not here is a blank screen. `props` is what each component reads -- a backend sending something else renders the screen with no content in it.",
3
- "version": "0.11.7",
3
+ "version": "0.11.8",
4
4
  "pages": [
5
5
  "Escalated/Admin/ApiTokens/Index",
6
6
  "Escalated/Admin/AuditLog/Index",
@@ -12,20 +12,27 @@ const fields = computed(() => props.object.fields_schema || []);
12
12
  const editingId = ref(null);
13
13
  const showAddForm = ref(false);
14
14
 
15
+ // The record's field values travel as `data`, which is what every backend
16
+ // validates. They cannot live under that name on the form itself: `data()` is
17
+ // one of useForm's own methods, Inertia refuses the field (and logs an error),
18
+ // and assigning to it replaced the method the form submits with. They are kept
19
+ // as `values` and renamed on the way out.
20
+ const toRecordBody = (form) => ({ data: form.values });
21
+
15
22
  const newRecordForm = useForm({
16
- data: {},
17
- });
23
+ values: {},
24
+ }).transform(toRecordBody);
18
25
 
19
26
  const editForm = useForm({
20
- data: {},
21
- });
27
+ values: {},
28
+ }).transform(toRecordBody);
22
29
 
23
30
  function startAdd() {
24
31
  const data = {};
25
32
  fields.value.forEach((f) => {
26
33
  data[f.name] = '';
27
34
  });
28
- newRecordForm.data = data;
35
+ newRecordForm.values = data;
29
36
  showAddForm.value = true;
30
37
  }
31
38
 
@@ -41,7 +48,7 @@ function addRecord() {
41
48
 
42
49
  function startEdit(record) {
43
50
  editingId.value = record.id;
44
- editForm.data = { ...(record.data || {}) };
51
+ editForm.values = { ...(record.data || {}) };
45
52
  }
46
53
 
47
54
  function saveEdit(record) {
@@ -96,7 +103,7 @@ function deleteRecord(record) {
96
103
  </label>
97
104
  <select
98
105
  v-if="field.type === 'select'"
99
- v-model="newRecordForm.data[field.name]"
106
+ v-model="newRecordForm.values[field.name]"
100
107
  class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
101
108
  >
102
109
  <option value="">Select...</option>
@@ -104,19 +111,19 @@ function deleteRecord(record) {
104
111
  </select>
105
112
  <input
106
113
  v-else-if="field.type === 'date'"
107
- v-model="newRecordForm.data[field.name]"
114
+ v-model="newRecordForm.values[field.name]"
108
115
  type="date"
109
116
  class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
110
117
  />
111
118
  <input
112
119
  v-else-if="field.type === 'number'"
113
- v-model="newRecordForm.data[field.name]"
120
+ v-model="newRecordForm.values[field.name]"
114
121
  type="number"
115
122
  class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
116
123
  />
117
124
  <input
118
125
  v-else
119
- v-model="newRecordForm.data[field.name]"
126
+ v-model="newRecordForm.values[field.name]"
120
127
  type="text"
121
128
  class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
122
129
  />
@@ -171,7 +178,7 @@ function deleteRecord(record) {
171
178
  <!-- Edit mode -->
172
179
  <template v-if="editingId === record.id">
173
180
  <input
174
- v-model="editForm.data[field.name]"
181
+ v-model="editForm.values[field.name]"
175
182
  :type="field.type === 'number' ? 'number' : field.type === 'date' ? 'date' : 'text'"
176
183
  class="w-full rounded border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] px-2 py-1 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none"
177
184
  />