@chelone/vue 0.3.0 → 0.5.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/choices/use-choices.d.ts +11 -10
- package/dist/choices/use-choices.js +5 -4
- package/dist/components/admin/auth/auth-error.vue.d.ts +1 -1
- package/dist/components/admin/buttons/save-button.vue.d.ts +1 -1
- package/dist/components/admin/buttons/update-button.vue.d.ts +3 -3
- package/dist/components/admin/feedback/linear-progress.vue.d.ts +1 -1
- package/dist/components/admin/fields/api-key-field.vue.d.ts +27 -9
- package/dist/components/admin/fields/api-key-field.vue.js +3 -1
- package/dist/components/admin/fields/array-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/badge-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/boolean-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/chip-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/color-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/cron-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/currency-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/date-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/duration-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/email-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/file-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/function-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/image-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/json-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/number-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/phone-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/rating-field.vue.d.ts +22 -7
- package/dist/components/admin/fields/rating-field.vue.js +3 -1
- package/dist/components/admin/fields/record-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/reference-array-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/reference-field.vue.d.ts +2 -1
- package/dist/components/admin/fields/reference-many-count.vue.d.ts +2 -2
- package/dist/components/admin/fields/reference-many-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/reference-one-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/select-field.vue.d.ts +18 -7
- package/dist/components/admin/fields/select-field.vue.js +1 -1
- package/dist/components/admin/fields/subscription-plan-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/text-array-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/text-field.vue.d.ts +2 -8
- package/dist/components/admin/fields/url-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/usage-meter-field.vue.d.ts +22 -7
- package/dist/components/admin/fields/usage-meter-field.vue.js +3 -1
- package/dist/components/admin/fields/webhook-endpoint-field.vue.d.ts +2 -2
- package/dist/components/admin/fields/wrapper-field.vue.d.ts +3 -3
- package/dist/components/admin/fields/wrapper-field.vue.js +6 -0
- package/dist/components/admin/inputs/api-key-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/array-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/autocomplete-array-input.vue.d.ts +14 -6
- package/dist/components/admin/inputs/autocomplete-array-input.vue.js +2 -3
- package/dist/components/admin/inputs/autocomplete-input.vue.d.ts +14 -6
- package/dist/components/admin/inputs/autocomplete-input.vue.js +2 -3
- package/dist/components/admin/inputs/boolean-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/checkbox-group-input.vue.d.ts +14 -7
- package/dist/components/admin/inputs/checkbox-group-input.vue.js +2 -2
- package/dist/components/admin/inputs/choice-input-props.d.ts +6 -6
- package/dist/components/admin/inputs/color-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/cron-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/currency-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/datagrid-input.vue.d.ts +20 -5
- package/dist/components/admin/inputs/datagrid-input.vue.js +7 -3
- package/dist/components/admin/inputs/date-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/date-time-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/duration-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/file-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/nullable-boolean-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/number-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/password-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/phone-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/radio-button-group-input.vue.d.ts +14 -7
- package/dist/components/admin/inputs/radio-button-group-input.vue.js +2 -2
- package/dist/components/admin/inputs/rating-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/reference-array-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/reference-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/resettable-text-input.vue.d.ts +2 -1
- package/dist/components/admin/inputs/search-input.vue.d.ts +3 -3
- package/dist/components/admin/inputs/select-array-input.vue.d.ts +14 -5
- package/dist/components/admin/inputs/select-array-input.vue.js +1 -1
- package/dist/components/admin/inputs/select-input.vue.d.ts +14 -7
- package/dist/components/admin/inputs/select-input.vue.js +1 -1
- package/dist/components/admin/inputs/subscription-plan-picker.vue.d.ts +2 -2
- package/dist/components/admin/inputs/text-array-input.vue.d.ts +2 -2
- package/dist/components/admin/inputs/text-input.vue.d.ts +2 -1
- package/dist/components/admin/inputs/time-input.vue.d.ts +2 -1
- package/dist/components/admin/inputs/use-choice-input.d.ts +12 -19
- package/dist/components/admin/inputs/use-choice-input.js +4 -1
- package/dist/components/admin/inputs/webhook-endpoint-input.vue.d.ts +2 -2
- package/dist/components/admin/list/calendar-list.vue.d.ts +8 -8
- package/dist/components/admin/list/filter-live-search.vue.d.ts +1 -1
- package/dist/components/admin/list/kanban-board.vue.d.ts +41 -0
- package/dist/components/admin/list/kanban-board.vue.js +275 -0
- package/dist/components/admin/list/kanban-board2.vue.js +4 -0
- package/dist/components/admin/list/list-icons.d.ts +2 -0
- package/dist/components/admin/list/list-icons.js +7 -0
- package/dist/components/admin/list/tree-list.vue.d.ts +6 -5
- package/dist/components/admin/view/labeled.vue.d.ts +6 -5
- package/dist/components/admin/view/labeled.vue.js +4 -1
- package/dist/components/admin/view/tabbed-show-layout-tab.vue.d.ts +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/maps/geo-json-field.vue.d.ts +2 -1
- package/dist/components/maps/lat-lng-field.vue.d.ts +3 -3
- package/dist/components/maps/lat-lng-input.vue.d.ts +4 -4
- package/dist/components/maps-draw/shape-input.vue.d.ts +4 -4
- package/dist/components/maps-draw/simplify-input.vue.d.ts +2 -2
- package/dist/components/maps-osm/geocoding-input.vue.d.ts +6 -6
- package/dist/components/maps-osm/map-with-search.vue.d.ts +4 -4
- package/dist/components/maps-osm/osm-feature-operator.vue.d.ts +3 -3
- package/dist/components/maps-osm/reverse-geocode-field.vue.d.ts +3 -3
- package/dist/components/mdx-editor/mdx-field.vue.d.ts +2 -2
- package/dist/components/mdx-editor/mdx-input.vue.d.ts +2 -2
- package/dist/components/monaco/monaco-json-field.vue.d.ts +2 -2
- package/dist/components/monaco/monaco-json-input.vue.d.ts +2 -2
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.vue.d.ts +1 -1
- package/dist/components/ui/command/command-dialog.vue.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.vue.js +9 -3
- package/dist/components/ui/input.vue.d.ts +2 -2
- package/dist/components/ui/sidebar/sidebar-menu-button.vue.d.ts +1 -1
- package/dist/components/ui/textarea.vue.d.ts +2 -2
- package/dist/create-resource-components.d.ts +867 -0
- package/dist/create-resource-components.js +171 -0
- package/dist/data/create-chelone-hooks.d.ts +8 -8
- package/dist/data/mutations.d.ts +8 -8
- package/dist/form/use-input.d.ts +9 -7
- package/dist/form/use-input.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +248 -243
- package/dist/record/use-field-value.d.ts +16 -6
- package/package.json +4 -4
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import _sfc_main$13 from "./components/admin/fields/api-key-field.vue.js";
|
|
3
|
+
import _sfc_main$12 from "./components/admin/fields/array-field.vue.js";
|
|
4
|
+
import _sfc_main$11 from "./components/admin/fields/badge-field.vue.js";
|
|
5
|
+
import _sfc_main$10 from "./components/admin/fields/boolean-field.vue.js";
|
|
6
|
+
import _sfc_main$$ from "./components/admin/fields/chip-field.vue.js";
|
|
7
|
+
import _sfc_main$_ from "./components/admin/fields/color-field.vue.js";
|
|
8
|
+
import _sfc_main$Z from "./components/admin/fields/cron-field.vue.js";
|
|
9
|
+
import _sfc_main$Y from "./components/admin/fields/currency-field.vue.js";
|
|
10
|
+
import _sfc_main$X from "./components/admin/fields/date-field.vue.js";
|
|
11
|
+
import _sfc_main$W from "./components/admin/fields/duration-field.vue.js";
|
|
12
|
+
import _sfc_main$V from "./components/admin/fields/email-field.vue.js";
|
|
13
|
+
import _sfc_main$U from "./components/admin/fields/file-field.vue.js";
|
|
14
|
+
import _sfc_main$T from "./components/admin/fields/function-field.vue.js";
|
|
15
|
+
import _sfc_main$S from "./components/admin/fields/image-field.vue.js";
|
|
16
|
+
import _sfc_main$R from "./components/admin/fields/json-field.vue.js";
|
|
17
|
+
import _sfc_main$Q from "./components/admin/fields/number-field.vue.js";
|
|
18
|
+
import _sfc_main$P from "./components/admin/fields/phone-field.vue.js";
|
|
19
|
+
import _sfc_main$O from "./components/admin/fields/rating-field.vue.js";
|
|
20
|
+
import _sfc_main$N from "./components/admin/fields/record-field.vue.js";
|
|
21
|
+
import _sfc_main$M from "./components/admin/fields/reference-array-field.vue.js";
|
|
22
|
+
import _sfc_main$L from "./components/admin/fields/reference-field.vue.js";
|
|
23
|
+
import _sfc_main$K from "./components/admin/fields/reference-many-count.vue.js";
|
|
24
|
+
import _sfc_main$J from "./components/admin/fields/reference-many-field.vue.js";
|
|
25
|
+
import _sfc_main$I from "./components/admin/fields/reference-one-field.vue.js";
|
|
26
|
+
import _sfc_main$H from "./components/admin/fields/select-field.vue.js";
|
|
27
|
+
import _sfc_main$G from "./components/admin/fields/subscription-plan-field.vue.js";
|
|
28
|
+
import _sfc_main$F from "./components/admin/fields/text-array-field.vue.js";
|
|
29
|
+
import _sfc_main$E from "./components/admin/fields/text-field.vue.js";
|
|
30
|
+
import _sfc_main$D from "./components/admin/fields/url-field.vue.js";
|
|
31
|
+
import _sfc_main$C from "./components/admin/fields/usage-meter-field.vue.js";
|
|
32
|
+
import _sfc_main$B from "./components/admin/fields/webhook-endpoint-field.vue.js";
|
|
33
|
+
import _sfc_main$A from "./components/admin/fields/wrapper-field.vue.js";
|
|
34
|
+
import _sfc_main$z from "./components/admin/inputs/api-key-input.vue.js";
|
|
35
|
+
import _sfc_main$y from "./components/admin/inputs/array-input.vue.js";
|
|
36
|
+
import _sfc_main$x from "./components/admin/inputs/array-input-row.vue.js";
|
|
37
|
+
import _sfc_main$w from "./components/admin/inputs/autocomplete-array-input.vue.js";
|
|
38
|
+
import _sfc_main$v from "./components/admin/inputs/autocomplete-input.vue.js";
|
|
39
|
+
import _sfc_main$u from "./components/admin/inputs/boolean-input.vue.js";
|
|
40
|
+
import _sfc_main$t from "./components/admin/inputs/checkbox-group-input.vue.js";
|
|
41
|
+
import _sfc_main$s from "./components/admin/inputs/color-input.vue.js";
|
|
42
|
+
import _sfc_main$r from "./components/admin/inputs/cron-input.vue.js";
|
|
43
|
+
import _sfc_main$q from "./components/admin/inputs/currency-input.vue.js";
|
|
44
|
+
import _sfc_main$p from "./components/admin/inputs/datagrid-input.vue.js";
|
|
45
|
+
import _sfc_main$o from "./components/admin/inputs/date-input.vue.js";
|
|
46
|
+
import _sfc_main$n from "./components/admin/inputs/date-time-input.vue.js";
|
|
47
|
+
import _sfc_main$m from "./components/admin/inputs/duration-input.vue.js";
|
|
48
|
+
import _sfc_main$l from "./components/admin/inputs/file-input.vue.js";
|
|
49
|
+
import _sfc_main$k from "./components/admin/inputs/file-input-preview.vue.js";
|
|
50
|
+
import _sfc_main$j from "./components/admin/inputs/image-input.vue.js";
|
|
51
|
+
import _sfc_main$i from "./components/admin/inputs/image-input-thumbnail.vue.js";
|
|
52
|
+
import _sfc_main$h from "./components/admin/inputs/loading-input.vue.js";
|
|
53
|
+
import _sfc_main$g from "./components/admin/inputs/nullable-boolean-input.vue.js";
|
|
54
|
+
import _sfc_main$f from "./components/admin/inputs/number-input.vue.js";
|
|
55
|
+
import _sfc_main$e from "./components/admin/inputs/password-input.vue.js";
|
|
56
|
+
import _sfc_main$d from "./components/admin/inputs/phone-input.vue.js";
|
|
57
|
+
import _sfc_main$c from "./components/admin/inputs/radio-button-group-input.vue.js";
|
|
58
|
+
import _sfc_main$b from "./components/admin/inputs/rating-input.vue.js";
|
|
59
|
+
import _sfc_main$a from "./components/admin/inputs/reference-array-input.vue.js";
|
|
60
|
+
import _sfc_main$9 from "./components/admin/inputs/reference-input.vue.js";
|
|
61
|
+
import _sfc_main$8 from "./components/admin/inputs/resettable-text-input.vue.js";
|
|
62
|
+
import _sfc_main$7 from "./components/admin/inputs/search-input.vue.js";
|
|
63
|
+
import _sfc_main$6 from "./components/admin/inputs/select-array-input.vue.js";
|
|
64
|
+
import _sfc_main$5 from "./components/admin/inputs/select-input.vue.js";
|
|
65
|
+
import _sfc_main$4 from "./components/admin/inputs/subscription-plan-picker.vue.js";
|
|
66
|
+
import _sfc_main$3 from "./components/admin/inputs/text-array-input.vue.js";
|
|
67
|
+
import _sfc_main$2 from "./components/admin/inputs/text-input.vue.js";
|
|
68
|
+
import _sfc_main$1 from "./components/admin/inputs/time-input.vue.js";
|
|
69
|
+
import _sfc_main from "./components/admin/inputs/webhook-endpoint-input.vue.js";
|
|
70
|
+
import _sfc_main$16 from "./components/admin/view/create.vue.js";
|
|
71
|
+
import _sfc_main$17 from "./components/admin/view/edit.vue.js";
|
|
72
|
+
import _sfc_main$14 from "./components/admin/view/list.vue.js";
|
|
73
|
+
import _sfc_main$15 from "./components/admin/view/show.vue.js";
|
|
74
|
+
const sourceMembers = {
|
|
75
|
+
ApiKeyField: _sfc_main$13,
|
|
76
|
+
ArrayField: _sfc_main$12,
|
|
77
|
+
BadgeField: _sfc_main$11,
|
|
78
|
+
BooleanField: _sfc_main$10,
|
|
79
|
+
ChipField: _sfc_main$$,
|
|
80
|
+
ColorField: _sfc_main$_,
|
|
81
|
+
CronField: _sfc_main$Z,
|
|
82
|
+
CurrencyField: _sfc_main$Y,
|
|
83
|
+
DateField: _sfc_main$X,
|
|
84
|
+
DurationField: _sfc_main$W,
|
|
85
|
+
EmailField: _sfc_main$V,
|
|
86
|
+
FileField: _sfc_main$U,
|
|
87
|
+
FunctionField: _sfc_main$T,
|
|
88
|
+
ImageField: _sfc_main$S,
|
|
89
|
+
JsonField: _sfc_main$R,
|
|
90
|
+
NumberField: _sfc_main$Q,
|
|
91
|
+
PhoneField: _sfc_main$P,
|
|
92
|
+
RatingField: _sfc_main$O,
|
|
93
|
+
RecordField: _sfc_main$N,
|
|
94
|
+
ReferenceArrayField: _sfc_main$M,
|
|
95
|
+
ReferenceField: _sfc_main$L,
|
|
96
|
+
ReferenceManyCount: _sfc_main$K,
|
|
97
|
+
ReferenceManyField: _sfc_main$J,
|
|
98
|
+
ReferenceOneField: _sfc_main$I,
|
|
99
|
+
SelectField: _sfc_main$H,
|
|
100
|
+
SubscriptionPlanField: _sfc_main$G,
|
|
101
|
+
TextArrayField: _sfc_main$F,
|
|
102
|
+
TextField: _sfc_main$E,
|
|
103
|
+
UrlField: _sfc_main$D,
|
|
104
|
+
UsageMeterField: _sfc_main$C,
|
|
105
|
+
WebhookEndpointField: _sfc_main$B,
|
|
106
|
+
WrapperField: _sfc_main$A,
|
|
107
|
+
ApiKeyInput: _sfc_main$z,
|
|
108
|
+
ArrayInput: _sfc_main$y,
|
|
109
|
+
ArrayInputRow: _sfc_main$x,
|
|
110
|
+
AutocompleteArrayInput: _sfc_main$w,
|
|
111
|
+
AutocompleteInput: _sfc_main$v,
|
|
112
|
+
BooleanInput: _sfc_main$u,
|
|
113
|
+
CheckboxGroupInput: _sfc_main$t,
|
|
114
|
+
ColorInput: _sfc_main$s,
|
|
115
|
+
CronInput: _sfc_main$r,
|
|
116
|
+
CurrencyInput: _sfc_main$q,
|
|
117
|
+
DatagridInput: _sfc_main$p,
|
|
118
|
+
DateInput: _sfc_main$o,
|
|
119
|
+
DateTimeInput: _sfc_main$n,
|
|
120
|
+
DurationInput: _sfc_main$m,
|
|
121
|
+
FileInput: _sfc_main$l,
|
|
122
|
+
FileInputPreview: _sfc_main$k,
|
|
123
|
+
ImageInput: _sfc_main$j,
|
|
124
|
+
ImageInputThumbnail: _sfc_main$i,
|
|
125
|
+
LoadingInput: _sfc_main$h,
|
|
126
|
+
NullableBooleanInput: _sfc_main$g,
|
|
127
|
+
NumberInput: _sfc_main$f,
|
|
128
|
+
PasswordInput: _sfc_main$e,
|
|
129
|
+
PhoneInput: _sfc_main$d,
|
|
130
|
+
RadioButtonGroupInput: _sfc_main$c,
|
|
131
|
+
RatingInput: _sfc_main$b,
|
|
132
|
+
ReferenceArrayInput: _sfc_main$a,
|
|
133
|
+
ReferenceInput: _sfc_main$9,
|
|
134
|
+
ResettableTextInput: _sfc_main$8,
|
|
135
|
+
SearchInput: _sfc_main$7,
|
|
136
|
+
SelectArrayInput: _sfc_main$6,
|
|
137
|
+
SelectInput: _sfc_main$5,
|
|
138
|
+
SubscriptionPlanPicker: _sfc_main$4,
|
|
139
|
+
TextArrayInput: _sfc_main$3,
|
|
140
|
+
TextInput: _sfc_main$2,
|
|
141
|
+
TimeInput: _sfc_main$1,
|
|
142
|
+
WebhookEndpointInput: _sfc_main
|
|
143
|
+
};
|
|
144
|
+
function bindResource(view, resource, displayName) {
|
|
145
|
+
return defineComponent({
|
|
146
|
+
name: displayName,
|
|
147
|
+
inheritAttrs: false,
|
|
148
|
+
setup(_, { attrs, slots }) {
|
|
149
|
+
return () => h(view, { ...attrs, resource }, slots);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
function build(name) {
|
|
154
|
+
return {
|
|
155
|
+
...sourceMembers,
|
|
156
|
+
Edit: bindResource(_sfc_main$17, name, "ResourceEdit"),
|
|
157
|
+
Create: bindResource(_sfc_main$16, name, "ResourceCreate"),
|
|
158
|
+
Show: bindResource(_sfc_main$15, name, "ResourceShow"),
|
|
159
|
+
List: bindResource(_sfc_main$14, name, "ResourceList")
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function createResourceComponentsOf(name) {
|
|
163
|
+
return build(name);
|
|
164
|
+
}
|
|
165
|
+
function createResourceComponents(name) {
|
|
166
|
+
return createResourceComponentsOf(name);
|
|
167
|
+
}
|
|
168
|
+
export {
|
|
169
|
+
createResourceComponents,
|
|
170
|
+
createResourceComponentsOf
|
|
171
|
+
};
|
|
@@ -206,8 +206,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
206
206
|
mutate: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>, callbacks?: import("@chelone/core").UndoableUpdateManyCallbacks<import("@chelone/core").RecordOf<TResources, TName>> | undefined) => void;
|
|
207
207
|
mutateAsync: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>) => Promise<void>;
|
|
208
208
|
data: import("vue").Ref<undefined, undefined>;
|
|
209
|
-
error: import("vue").Ref<null, null>;
|
|
210
209
|
status: import("vue").Ref<"idle", "idle">;
|
|
210
|
+
error: import("vue").Ref<null, null>;
|
|
211
211
|
isError: import("vue").Ref<false, false>;
|
|
212
212
|
isPending: import("vue").Ref<false, false>;
|
|
213
213
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -223,8 +223,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
223
223
|
mutate: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>, callbacks?: import("@chelone/core").UndoableUpdateManyCallbacks<import("@chelone/core").RecordOf<TResources, TName>> | undefined) => void;
|
|
224
224
|
mutateAsync: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>) => Promise<void>;
|
|
225
225
|
data: import("vue").Ref<undefined, undefined>;
|
|
226
|
-
error: import("vue").Ref<null, null>;
|
|
227
226
|
status: import("vue").Ref<"pending", "pending">;
|
|
227
|
+
error: import("vue").Ref<null, null>;
|
|
228
228
|
isError: import("vue").Ref<false, false>;
|
|
229
229
|
isPending: import("vue").Ref<true, true>;
|
|
230
230
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -240,8 +240,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
240
240
|
mutate: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>, callbacks?: import("@chelone/core").UndoableUpdateManyCallbacks<import("@chelone/core").RecordOf<TResources, TName>> | undefined) => void;
|
|
241
241
|
mutateAsync: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>) => Promise<void>;
|
|
242
242
|
data: import("vue").Ref<undefined, undefined>;
|
|
243
|
-
error: import("vue").Ref<Error, Error>;
|
|
244
243
|
status: import("vue").Ref<"error", "error">;
|
|
244
|
+
error: import("vue").Ref<Error, Error>;
|
|
245
245
|
isError: import("vue").Ref<true, true>;
|
|
246
246
|
isPending: import("vue").Ref<false, false>;
|
|
247
247
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -257,8 +257,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
257
257
|
mutate: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>, callbacks?: import("@chelone/core").UndoableUpdateManyCallbacks<import("@chelone/core").RecordOf<TResources, TName>> | undefined) => void;
|
|
258
258
|
mutateAsync: (params: import("@chelone/core").UpdateManyParams<import("@chelone/core").RecordOf<TResources, TName>>) => Promise<void>;
|
|
259
259
|
data: import("vue").Ref<import("@chelone/core").Identifier[], import("@chelone/core").Identifier[]>;
|
|
260
|
-
error: import("vue").Ref<null, null>;
|
|
261
260
|
status: import("vue").Ref<"success", "success">;
|
|
261
|
+
error: import("vue").Ref<null, null>;
|
|
262
262
|
isError: import("vue").Ref<false, false>;
|
|
263
263
|
isPending: import("vue").Ref<false, false>;
|
|
264
264
|
isSuccess: import("vue").Ref<true, true>;
|
|
@@ -435,8 +435,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
435
435
|
mutate: (params: import("@chelone/core").DeleteManyParams, callbacks?: import("@chelone/core").UndoableCallbacks<import("@chelone/core").Identifier[], import("@chelone/core").DeleteManyParams>) => void;
|
|
436
436
|
mutateAsync: (params: import("@chelone/core").DeleteManyParams) => Promise<void>;
|
|
437
437
|
data: import("vue").Ref<undefined, undefined>;
|
|
438
|
-
error: import("vue").Ref<null, null>;
|
|
439
438
|
status: import("vue").Ref<"idle", "idle">;
|
|
439
|
+
error: import("vue").Ref<null, null>;
|
|
440
440
|
isError: import("vue").Ref<false, false>;
|
|
441
441
|
isPending: import("vue").Ref<false, false>;
|
|
442
442
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -452,8 +452,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
452
452
|
mutate: (params: import("@chelone/core").DeleteManyParams, callbacks?: import("@chelone/core").UndoableCallbacks<import("@chelone/core").Identifier[], import("@chelone/core").DeleteManyParams>) => void;
|
|
453
453
|
mutateAsync: (params: import("@chelone/core").DeleteManyParams) => Promise<void>;
|
|
454
454
|
data: import("vue").Ref<undefined, undefined>;
|
|
455
|
-
error: import("vue").Ref<null, null>;
|
|
456
455
|
status: import("vue").Ref<"pending", "pending">;
|
|
456
|
+
error: import("vue").Ref<null, null>;
|
|
457
457
|
isError: import("vue").Ref<false, false>;
|
|
458
458
|
isPending: import("vue").Ref<true, true>;
|
|
459
459
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -469,8 +469,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
469
469
|
mutate: (params: import("@chelone/core").DeleteManyParams, callbacks?: import("@chelone/core").UndoableCallbacks<import("@chelone/core").Identifier[], import("@chelone/core").DeleteManyParams>) => void;
|
|
470
470
|
mutateAsync: (params: import("@chelone/core").DeleteManyParams) => Promise<void>;
|
|
471
471
|
data: import("vue").Ref<undefined, undefined>;
|
|
472
|
-
error: import("vue").Ref<Error, Error>;
|
|
473
472
|
status: import("vue").Ref<"error", "error">;
|
|
473
|
+
error: import("vue").Ref<Error, Error>;
|
|
474
474
|
isError: import("vue").Ref<true, true>;
|
|
475
475
|
isPending: import("vue").Ref<false, false>;
|
|
476
476
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -486,8 +486,8 @@ export declare function createCheloneHooks<TResources extends ResourceMap>(): {
|
|
|
486
486
|
mutate: (params: import("@chelone/core").DeleteManyParams, callbacks?: import("@chelone/core").UndoableCallbacks<import("@chelone/core").Identifier[], import("@chelone/core").DeleteManyParams>) => void;
|
|
487
487
|
mutateAsync: (params: import("@chelone/core").DeleteManyParams) => Promise<void>;
|
|
488
488
|
data: import("vue").Ref<import("@chelone/core").Identifier[], import("@chelone/core").Identifier[]>;
|
|
489
|
-
error: import("vue").Ref<null, null>;
|
|
490
489
|
status: import("vue").Ref<"success", "success">;
|
|
490
|
+
error: import("vue").Ref<null, null>;
|
|
491
491
|
isError: import("vue").Ref<false, false>;
|
|
492
492
|
isPending: import("vue").Ref<false, false>;
|
|
493
493
|
isSuccess: import("vue").Ref<true, true>;
|
package/dist/data/mutations.d.ts
CHANGED
|
@@ -380,8 +380,8 @@ export declare function useDeleteMany<TResources extends ResourceMap = ResourceM
|
|
|
380
380
|
mutate: (params: DeleteManyParams, callbacks?: UndoableCallbacks<Identifier[], DeleteManyParams>) => void;
|
|
381
381
|
mutateAsync: (params: DeleteManyParams) => Promise<void>;
|
|
382
382
|
data: import("vue").Ref<undefined, undefined>;
|
|
383
|
-
error: import("vue").Ref<null, null>;
|
|
384
383
|
status: import("vue").Ref<"idle", "idle">;
|
|
384
|
+
error: import("vue").Ref<null, null>;
|
|
385
385
|
isError: import("vue").Ref<false, false>;
|
|
386
386
|
isPending: import("vue").Ref<false, false>;
|
|
387
387
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -397,8 +397,8 @@ export declare function useDeleteMany<TResources extends ResourceMap = ResourceM
|
|
|
397
397
|
mutate: (params: DeleteManyParams, callbacks?: UndoableCallbacks<Identifier[], DeleteManyParams>) => void;
|
|
398
398
|
mutateAsync: (params: DeleteManyParams) => Promise<void>;
|
|
399
399
|
data: import("vue").Ref<undefined, undefined>;
|
|
400
|
-
error: import("vue").Ref<null, null>;
|
|
401
400
|
status: import("vue").Ref<"pending", "pending">;
|
|
401
|
+
error: import("vue").Ref<null, null>;
|
|
402
402
|
isError: import("vue").Ref<false, false>;
|
|
403
403
|
isPending: import("vue").Ref<true, true>;
|
|
404
404
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -414,8 +414,8 @@ export declare function useDeleteMany<TResources extends ResourceMap = ResourceM
|
|
|
414
414
|
mutate: (params: DeleteManyParams, callbacks?: UndoableCallbacks<Identifier[], DeleteManyParams>) => void;
|
|
415
415
|
mutateAsync: (params: DeleteManyParams) => Promise<void>;
|
|
416
416
|
data: import("vue").Ref<undefined, undefined>;
|
|
417
|
-
error: import("vue").Ref<Error, Error>;
|
|
418
417
|
status: import("vue").Ref<"error", "error">;
|
|
418
|
+
error: import("vue").Ref<Error, Error>;
|
|
419
419
|
isError: import("vue").Ref<true, true>;
|
|
420
420
|
isPending: import("vue").Ref<false, false>;
|
|
421
421
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -431,8 +431,8 @@ export declare function useDeleteMany<TResources extends ResourceMap = ResourceM
|
|
|
431
431
|
mutate: (params: DeleteManyParams, callbacks?: UndoableCallbacks<Identifier[], DeleteManyParams>) => void;
|
|
432
432
|
mutateAsync: (params: DeleteManyParams) => Promise<void>;
|
|
433
433
|
data: import("vue").Ref<Identifier[], Identifier[]>;
|
|
434
|
-
error: import("vue").Ref<null, null>;
|
|
435
434
|
status: import("vue").Ref<"success", "success">;
|
|
435
|
+
error: import("vue").Ref<null, null>;
|
|
436
436
|
isError: import("vue").Ref<false, false>;
|
|
437
437
|
isPending: import("vue").Ref<false, false>;
|
|
438
438
|
isSuccess: import("vue").Ref<true, true>;
|
|
@@ -473,8 +473,8 @@ export declare function useUpdateMany<TResources extends ResourceMap = ResourceM
|
|
|
473
473
|
mutate: (params: UpdateManyParams<RecordOf<TResources, TName>>, callbacks?: UndoableUpdateManyCallbacks<RecordOf<TResources, TName>>) => void;
|
|
474
474
|
mutateAsync: (params: UpdateManyParams<RecordOf<TResources, TName>>) => Promise<void>;
|
|
475
475
|
data: import("vue").Ref<undefined, undefined>;
|
|
476
|
-
error: import("vue").Ref<null, null>;
|
|
477
476
|
status: import("vue").Ref<"idle", "idle">;
|
|
477
|
+
error: import("vue").Ref<null, null>;
|
|
478
478
|
isError: import("vue").Ref<false, false>;
|
|
479
479
|
isPending: import("vue").Ref<false, false>;
|
|
480
480
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -490,8 +490,8 @@ export declare function useUpdateMany<TResources extends ResourceMap = ResourceM
|
|
|
490
490
|
mutate: (params: UpdateManyParams<RecordOf<TResources, TName>>, callbacks?: UndoableUpdateManyCallbacks<RecordOf<TResources, TName>>) => void;
|
|
491
491
|
mutateAsync: (params: UpdateManyParams<RecordOf<TResources, TName>>) => Promise<void>;
|
|
492
492
|
data: import("vue").Ref<undefined, undefined>;
|
|
493
|
-
error: import("vue").Ref<null, null>;
|
|
494
493
|
status: import("vue").Ref<"pending", "pending">;
|
|
494
|
+
error: import("vue").Ref<null, null>;
|
|
495
495
|
isError: import("vue").Ref<false, false>;
|
|
496
496
|
isPending: import("vue").Ref<true, true>;
|
|
497
497
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -507,8 +507,8 @@ export declare function useUpdateMany<TResources extends ResourceMap = ResourceM
|
|
|
507
507
|
mutate: (params: UpdateManyParams<RecordOf<TResources, TName>>, callbacks?: UndoableUpdateManyCallbacks<RecordOf<TResources, TName>>) => void;
|
|
508
508
|
mutateAsync: (params: UpdateManyParams<RecordOf<TResources, TName>>) => Promise<void>;
|
|
509
509
|
data: import("vue").Ref<undefined, undefined>;
|
|
510
|
-
error: import("vue").Ref<Error, Error>;
|
|
511
510
|
status: import("vue").Ref<"error", "error">;
|
|
511
|
+
error: import("vue").Ref<Error, Error>;
|
|
512
512
|
isError: import("vue").Ref<true, true>;
|
|
513
513
|
isPending: import("vue").Ref<false, false>;
|
|
514
514
|
isSuccess: import("vue").Ref<false, false>;
|
|
@@ -524,8 +524,8 @@ export declare function useUpdateMany<TResources extends ResourceMap = ResourceM
|
|
|
524
524
|
mutate: (params: UpdateManyParams<RecordOf<TResources, TName>>, callbacks?: UndoableUpdateManyCallbacks<RecordOf<TResources, TName>>) => void;
|
|
525
525
|
mutateAsync: (params: UpdateManyParams<RecordOf<TResources, TName>>) => Promise<void>;
|
|
526
526
|
data: import("vue").Ref<Identifier[], Identifier[]>;
|
|
527
|
-
error: import("vue").Ref<null, null>;
|
|
528
527
|
status: import("vue").Ref<"success", "success">;
|
|
528
|
+
error: import("vue").Ref<null, null>;
|
|
529
529
|
isError: import("vue").Ref<false, false>;
|
|
530
530
|
isPending: import("vue").Ref<false, false>;
|
|
531
531
|
isSuccess: import("vue").Ref<true, true>;
|
package/dist/form/use-input.d.ts
CHANGED
|
@@ -17,22 +17,23 @@
|
|
|
17
17
|
* server field errors (mapped onto the form's `onSubmit` channel) both surface
|
|
18
18
|
* here once the field is registered.
|
|
19
19
|
*/
|
|
20
|
-
import type { SourcePath, TranslatableMessage, Validator } from "@chelone/core";
|
|
20
|
+
import type { SourcePath, SourceValue, TranslatableMessage, Validator } from "@chelone/core";
|
|
21
21
|
import { type ComputedRef } from "vue";
|
|
22
|
-
export interface UseInputOptions<TRecord = unknown> {
|
|
22
|
+
export interface UseInputOptions<TRecord = unknown, TPath extends SourcePath<TRecord> = SourcePath<TRecord>> {
|
|
23
23
|
/** The field path RELATIVE to the ambient source scope (iterator rows compose it). */
|
|
24
|
-
source:
|
|
24
|
+
source: TPath;
|
|
25
25
|
/**
|
|
26
26
|
* Input-level default (ra precedence): seeds ONLY into a hole (an untouched
|
|
27
27
|
* field whose form value is `undefined`); an existing record value wins.
|
|
28
|
+
* Typed as the value at `source` (`unknown` without a record).
|
|
28
29
|
*/
|
|
29
|
-
defaultValue?:
|
|
30
|
+
defaultValue?: NoInfer<SourceValue<TRecord, TPath>>;
|
|
30
31
|
/** ra-contract validators — composed, first error wins. */
|
|
31
32
|
validate?: Validator | readonly Validator[];
|
|
32
33
|
/** Read transform (raw form value → input value). Default `defaultFormat`. */
|
|
33
|
-
format?: (value:
|
|
34
|
+
format?: (value: NoInfer<SourceValue<TRecord, TPath>>) => unknown;
|
|
34
35
|
/** Write transform (input value → stored value). Default `defaultParse`. */
|
|
35
|
-
parse?: (input: unknown) =>
|
|
36
|
+
parse?: (input: unknown) => NoInfer<SourceValue<TRecord, TPath>>;
|
|
36
37
|
/** Forces the required marker; ORed with `required()` detection on `validate`. */
|
|
37
38
|
isRequired?: boolean;
|
|
38
39
|
/** Explicit element id; a `useId` value is generated otherwise. */
|
|
@@ -57,5 +58,6 @@ export interface UseInputReturn {
|
|
|
57
58
|
/** Whether a required validator is present (or `isRequired` was forced). */
|
|
58
59
|
isRequired: boolean;
|
|
59
60
|
}
|
|
60
|
-
export declare function useInput
|
|
61
|
+
export declare function useInput(options: UseInputOptions): UseInputReturn;
|
|
62
|
+
export declare function useInput<TRecord, TPath extends SourcePath<TRecord> = SourcePath<TRecord>>(options: UseInputOptions<TRecord, TPath>): UseInputReturn;
|
|
61
63
|
export declare function useInput(options: UseInputOptions): UseInputReturn;
|
package/dist/form/use-input.js
CHANGED
|
@@ -14,7 +14,8 @@ function extractEventValue(input) {
|
|
|
14
14
|
}
|
|
15
15
|
return input;
|
|
16
16
|
}
|
|
17
|
-
function useInput(
|
|
17
|
+
function useInput(typedOptions) {
|
|
18
|
+
const options = typedOptions;
|
|
18
19
|
const { form } = useCheloneFormContext();
|
|
19
20
|
const scope = useSourceScope();
|
|
20
21
|
const source = scope.getSource(options.source);
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export type { CheloneContextValue } from "./context.js";
|
|
|
29
29
|
export { CheloneContextKey, provideCheloneContext, useCheloneAuthProvider, useCheloneContext, useCheloneI18n, useCheloneNotifications, useCheloneStore, useDataProvider, } from "./context.js";
|
|
30
30
|
export type { UseCreateControllerOptions, UseCreateControllerReturn, UseDeleteControllerOptions, UseDeleteControllerReturn, UseEditControllerOptions, UseEditControllerReturn, UseInfiniteListControllerOptions, UseInfiniteListControllerReturn, UseListControllerOptions, UseListControllerReturn, UsePrevNextControllerOptions, UsePrevNextControllerReturn, UseReferenceManyFieldControllerOptions, UseReferenceManyFieldControllerReturn, UseReferenceOneFieldControllerOptions, UseReferenceOneFieldControllerReturn, UseShowControllerOptions, UseShowControllerReturn, } from "./controllers/index.js";
|
|
31
31
|
export { toControllerContext, useCreateController, useDeleteController, useEditController, useInfiniteListController, useListController, usePrevNextController, useReferenceManyFieldController, useReferenceOneFieldController, useShowController, } from "./controllers/index.js";
|
|
32
|
+
export type { ResourceComponents } from "./create-resource-components.js";
|
|
33
|
+
export { createResourceComponents, createResourceComponentsOf, } from "./create-resource-components.js";
|
|
32
34
|
export { createCheloneHooks } from "./data/create-chelone-hooks.js";
|
|
33
35
|
export { useInfiniteGetList } from "./data/infinite-queries.js";
|
|
34
36
|
export { useCreate, useDelete, useDeleteMany, useUpdate, useUpdateMany, } from "./data/mutations.js";
|