@chelone/core 0.9.0 → 0.11.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/block-editor/block-document.d.ts +1 -1
- package/dist/controller/calendar-events.d.ts +6 -4
- package/dist/controller/calendar-events.js +2 -3
- package/dist/controller/client-list-controller.d.ts +3 -3
- package/dist/controller/client-list-controller.js +4 -20
- package/dist/controller/filter-toggle.d.ts +4 -4
- package/dist/controller/filter-toggle.js +0 -7
- package/dist/controller/in-place-editor.d.ts +1 -1
- package/dist/controller/infinite-list-controller.d.ts +1 -1
- package/dist/controller/kanban-board.d.ts +5 -3
- package/dist/controller/list-controller.d.ts +105 -28
- package/dist/controller/list-controller.js +85 -43
- package/dist/controller/list-params.d.ts +16 -13
- package/dist/controller/record-diff.d.ts +4 -3
- package/dist/controller/record-diff.js +2 -1
- package/dist/controller/reference-many-controller.d.ts +9 -7
- package/dist/controller/reference-one-controller.d.ts +8 -6
- package/dist/controller/saved-queries.d.ts +15 -14
- package/dist/controller/saved-queries.js +5 -0
- package/dist/csv/import-controller.d.ts +2 -1
- package/dist/csv/types.d.ts +12 -5
- package/dist/data/cache-ops.d.ts +8 -5
- package/dist/data/remove-empty.d.ts +2 -1
- package/dist/data/remove-empty.js +3 -5
- package/dist/data/types.d.ts +109 -6
- package/dist/data/undoable.d.ts +3 -2
- package/dist/form/choices-controller.d.ts +19 -12
- package/dist/form/choices-controller.js +19 -7
- package/dist/form/filter-form-values.d.ts +4 -3
- package/dist/form/filter-form-values.js +7 -5
- package/dist/i18n/direction.d.ts +18 -0
- package/dist/i18n/direction.js +72 -0
- package/dist/i18n/english-messages.d.ts +145 -150
- package/dist/i18n/english-messages.js +145 -150
- package/dist/index.d.ts +6 -4
- package/dist/index.js +3 -2
- package/dist/realtime/live.d.ts +5 -5
- package/dist/realtime/types.d.ts +6 -6
- package/dist/resource/describe-resource.d.ts +9 -3
- package/dist/resource/registry-store.d.ts +5 -2
- package/dist/resource/source-path.d.ts +23 -0
- package/package.json +1 -1
|
@@ -6,187 +6,182 @@ import { defineMessages } from "./messages.js";
|
|
|
6
6
|
* The English catalog an `<Admin>` with no `i18n` prop reads from, and the base
|
|
7
7
|
* an app extends: spread it, then add or override entries.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* they were ported from
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
9
|
+
* Every key is `chelone.<group>.<leaf>`: the ported shadcn components used to
|
|
10
|
+
* translate the react-admin `ra.*` keys they were ported from, and those keys
|
|
11
|
+
* were moved under `chelone.*` with their group names kept (`page`, `action`,
|
|
12
|
+
* `navigation`). Chelone's i18n never throws on a missing key (it returns the
|
|
13
|
+
* key or a `_` fallback), so a partial catalog shows raw
|
|
14
|
+
* `chelone.page.list`-style keys.
|
|
14
15
|
*
|
|
15
16
|
* Interpolation is single-brace `{name}` (not react-admin's `%{name}`). Plural
|
|
16
17
|
* strings are `{ one, other }` objects keyed by Intl.PluralRules categories
|
|
17
18
|
* (react-admin's `a |||| b` form).
|
|
18
19
|
*
|
|
19
20
|
* `defaultMessages` (the `chelone.*` keys the core controllers emit) and
|
|
20
|
-
* `mapMessages` (the maps add-on's labels) sit underneath
|
|
21
|
+
* `mapMessages` (the maps add-on's labels) sit underneath, and no entry here
|
|
22
|
+
* repeats one of them. Where a moved key landed on a controller key that says
|
|
23
|
+
* something different, the component's own key keeps the group and names the
|
|
24
|
+
* role: `access_denied_detail`, `authentication_error_detail`,
|
|
25
|
+
* `loading_detail` and `http_error_label` sit beside the controller's
|
|
26
|
+
* `access_denied`, `authentication_error`, `loading` and `http_error`.
|
|
21
27
|
*/
|
|
22
28
|
var englishMessages = defineMessages({
|
|
23
29
|
...defaultMessages,
|
|
24
30
|
...mapMessages,
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
31
|
+
"chelone.page.list": "{name}",
|
|
32
|
+
"chelone.page.create": "Create {name}",
|
|
33
|
+
"chelone.page.edit": "{name} {recordRepresentation}",
|
|
34
|
+
"chelone.page.show": "{name} {recordRepresentation}",
|
|
35
|
+
"chelone.page.dashboard": "Dashboard",
|
|
36
|
+
"chelone.page.error": "Something went wrong",
|
|
37
|
+
"chelone.page.not_found": "Not Found",
|
|
38
|
+
"chelone.page.loading": "Loading",
|
|
39
|
+
"chelone.page.empty": "No {name} yet.",
|
|
40
|
+
"chelone.page.access_denied": "Access denied",
|
|
41
|
+
"chelone.page.authentication_error": "Authentication error",
|
|
42
|
+
"chelone.action.add": "Add",
|
|
43
|
+
"chelone.action.add_filter": "Add filter",
|
|
44
|
+
"chelone.action.bulk_actions": {
|
|
39
45
|
one: "1 item selected",
|
|
40
46
|
other: "{count} items selected"
|
|
41
47
|
},
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"ra.theme.dark": "Dark",
|
|
103
|
-
"ra.theme.system": "System",
|
|
104
|
-
"ra.validation.required": "Required",
|
|
105
|
-
"ra.validation.minLength": "Must be {min} characters at least",
|
|
106
|
-
"ra.validation.maxLength": "Must be {max} characters or less",
|
|
107
|
-
"ra.validation.minValue": "Must be at least {min}",
|
|
108
|
-
"ra.validation.maxValue": "Must be {max} or less",
|
|
109
|
-
"ra.validation.number": "Must be a number",
|
|
110
|
-
"ra.validation.email": "Must be a valid email",
|
|
111
|
-
"ra.action.back": "Back",
|
|
112
|
-
"ra.action.bulk_edit_apply": {
|
|
48
|
+
"chelone.action.cancel": "Cancel",
|
|
49
|
+
"chelone.action.clear_input_value": "Clear value",
|
|
50
|
+
"chelone.action.clear_search": "Clear search",
|
|
51
|
+
"chelone.action.close": "Close",
|
|
52
|
+
"chelone.action.close_menu": "Close menu",
|
|
53
|
+
"chelone.action.confirm": "Confirm",
|
|
54
|
+
"chelone.action.create": "Create",
|
|
55
|
+
"chelone.action.delete": "Delete",
|
|
56
|
+
"chelone.action.edit": "Edit",
|
|
57
|
+
"chelone.action.export": "Export",
|
|
58
|
+
"chelone.action.list": "List",
|
|
59
|
+
"chelone.action.open_menu": "Open menu",
|
|
60
|
+
"chelone.action.refresh": "Refresh",
|
|
61
|
+
"chelone.action.remove": "Remove",
|
|
62
|
+
"chelone.action.remove_filter": "Remove this filter",
|
|
63
|
+
"chelone.action.save": "Save",
|
|
64
|
+
"chelone.action.search": "Search",
|
|
65
|
+
"chelone.action.select_all": "Select all",
|
|
66
|
+
"chelone.action.select_row": "Select this row",
|
|
67
|
+
"chelone.action.show": "Show",
|
|
68
|
+
"chelone.action.sort": "Sort",
|
|
69
|
+
"chelone.action.toggle_theme": "Toggle light/dark mode",
|
|
70
|
+
"chelone.action.undo": "Undo",
|
|
71
|
+
"chelone.action.unselect": "Unselect",
|
|
72
|
+
"chelone.action.update": "Update",
|
|
73
|
+
"chelone.boolean.true": "Yes",
|
|
74
|
+
"chelone.boolean.false": "No",
|
|
75
|
+
"chelone.boolean.null": " ",
|
|
76
|
+
"chelone.auth.sign_in": "Sign in",
|
|
77
|
+
"chelone.auth.sign_in_error": "Authentication failed, please retry",
|
|
78
|
+
"chelone.auth.user_menu": "Profile",
|
|
79
|
+
"chelone.auth.username": "Username",
|
|
80
|
+
"chelone.auth.password": "Password",
|
|
81
|
+
"chelone.message.access_denied_detail": "You don't have the right permissions to access this page",
|
|
82
|
+
"chelone.message.auth_error": "An error occurred while validating the authentication token.",
|
|
83
|
+
"chelone.message.authentication_error_detail": "The authentication server returned an error and your credentials could not be checked.",
|
|
84
|
+
"chelone.message.error": "A client error occurred and your request couldn't be completed.",
|
|
85
|
+
"chelone.message.loading_detail": "Please wait",
|
|
86
|
+
"chelone.navigation.next": "Go to next page",
|
|
87
|
+
"chelone.navigation.previous": "Go to previous page",
|
|
88
|
+
"chelone.navigation.first": "Go to first page",
|
|
89
|
+
"chelone.navigation.last": "Go to last page",
|
|
90
|
+
"chelone.navigation.no_results": "No results found",
|
|
91
|
+
"chelone.navigation.no_filtered_results": "No results found with the current filters.",
|
|
92
|
+
"chelone.navigation.page_range_info": "{offsetBegin}-{offsetEnd} of {total}",
|
|
93
|
+
"chelone.navigation.partial_page_range_info": "{offsetBegin}-{offsetEnd} of more than {offsetEnd}",
|
|
94
|
+
"chelone.navigation.page_rows_per_page": "Rows per page:",
|
|
95
|
+
"chelone.navigation.current_page": "Page {page}",
|
|
96
|
+
"chelone.navigation.skip_nav": "Skip to content",
|
|
97
|
+
"chelone.input.file.upload_several": "Drop some files to upload, or click to select one.",
|
|
98
|
+
"chelone.input.file.upload_single": "Drop a file to upload, or click to select it.",
|
|
99
|
+
"chelone.input.image.upload_several": "Drop some pictures to upload, or click to select one.",
|
|
100
|
+
"chelone.input.image.upload_single": "Drop a picture to upload, or click to select it.",
|
|
101
|
+
"chelone.input.password.toggle_visible": "Hide password",
|
|
102
|
+
"chelone.input.password.toggle_hidden": "Show password",
|
|
103
|
+
"chelone.theme.light": "Light",
|
|
104
|
+
"chelone.theme.dark": "Dark",
|
|
105
|
+
"chelone.theme.system": "System",
|
|
106
|
+
"chelone.action.back": "Back",
|
|
107
|
+
"chelone.action.bulk_edit_apply": {
|
|
113
108
|
one: "Apply to 1 record",
|
|
114
109
|
other: "Apply to {count} records"
|
|
115
110
|
},
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
111
|
+
"chelone.action.change_locale": "Change locale",
|
|
112
|
+
"chelone.action.clear_array_input": "Clear the array",
|
|
113
|
+
"chelone.action.clone": "Clone",
|
|
114
|
+
"chelone.action.collapse": "Collapse",
|
|
115
|
+
"chelone.action.expand": "Expand",
|
|
116
|
+
"chelone.action.move_column_down": "Move down",
|
|
117
|
+
"chelone.action.move_column_up": "Move up",
|
|
118
|
+
"chelone.action.move_down": "Move down",
|
|
119
|
+
"chelone.action.move_up": "Move up",
|
|
120
|
+
"chelone.action.reload": "Reload",
|
|
121
|
+
"chelone.action.remove_all_filters": "Remove all filters",
|
|
122
|
+
"chelone.action.reset": "Reset",
|
|
123
|
+
"chelone.action.reset_columns": "Reset",
|
|
124
|
+
"chelone.action.search_columns": "Search columns",
|
|
125
|
+
"chelone.action.select_columns": "Columns",
|
|
126
|
+
"chelone.auth.or": "or",
|
|
127
|
+
"chelone.calendar.agenda": "Agenda",
|
|
128
|
+
"chelone.calendar.month": "Month",
|
|
129
|
+
"chelone.calendar.week": "Week",
|
|
130
|
+
"chelone.calendar.next": "Next",
|
|
131
|
+
"chelone.calendar.previous": "Previous",
|
|
132
|
+
"chelone.calendar.today": "Today",
|
|
133
|
+
"chelone.calendar.view": "View",
|
|
134
|
+
"chelone.calendar.no_events": "No events",
|
|
135
|
+
"chelone.csv_import.back": "Back",
|
|
136
|
+
"chelone.csv_import.close": "Close",
|
|
137
|
+
"chelone.csv_import.complete": "Import complete",
|
|
138
|
+
"chelone.csv_import.counts": "{created} created · {failed} failed · {total} total",
|
|
139
|
+
"chelone.csv_import.download_errors": "Download error report",
|
|
140
|
+
"chelone.csv_import.drop": "Drop a CSV file here, or click to choose one",
|
|
141
|
+
"chelone.csv_import.import": "Import",
|
|
142
|
+
"chelone.csv_import.issues": "Issues",
|
|
143
|
+
"chelone.csv_import.next": "Next",
|
|
144
|
+
"chelone.csv_import.not_utf8": "This file is not UTF-8, so some letters may be wrong. Save it as CSV UTF-8 and try again.",
|
|
145
|
+
"chelone.csv_import.preview_summary": "{valid} valid · {errors} errors · {total} total",
|
|
146
|
+
"chelone.csv_import.required_unmapped": "Required fields are not mapped",
|
|
147
|
+
"chelone.csv_import.rows_parsed": "{count} rows parsed",
|
|
148
|
+
"chelone.csv_import.step.commit": "Importing",
|
|
149
|
+
"chelone.csv_import.step.map": "Map columns",
|
|
150
|
+
"chelone.csv_import.step.preview": "Preview",
|
|
151
|
+
"chelone.csv_import.step.upload": "Upload",
|
|
152
|
+
"chelone.csv_import.unmapped": "Not mapped",
|
|
153
|
+
"chelone.csv_import.wrong_file": "Choose a .csv file",
|
|
154
|
+
"chelone.message.bulk_delete_content": {
|
|
160
155
|
one: "Are you sure you want to delete this item?",
|
|
161
156
|
other: "Are you sure you want to delete these {count} items?"
|
|
162
157
|
},
|
|
163
|
-
"
|
|
158
|
+
"chelone.message.bulk_delete_title": {
|
|
164
159
|
one: "Delete 1 item",
|
|
165
160
|
other: "Delete {count} items"
|
|
166
161
|
},
|
|
167
|
-
"
|
|
162
|
+
"chelone.message.bulk_edit_description": {
|
|
168
163
|
one: "Only the fields you change are applied to the selected record.",
|
|
169
164
|
other: "Only the fields you change are applied to the {count} selected records."
|
|
170
165
|
},
|
|
171
|
-
"
|
|
172
|
-
"
|
|
166
|
+
"chelone.message.bulk_edit_nested_source": "Bulk edit takes flat sources only, but {source} is nested.",
|
|
167
|
+
"chelone.message.bulk_update_content": {
|
|
173
168
|
one: "Are you sure you want to update this item?",
|
|
174
169
|
other: "Are you sure you want to update these {count} items?"
|
|
175
170
|
},
|
|
176
|
-
"
|
|
171
|
+
"chelone.message.bulk_update_title": {
|
|
177
172
|
one: "Update 1 item",
|
|
178
173
|
other: "Update {count} items"
|
|
179
174
|
},
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"
|
|
175
|
+
"chelone.message.clear_array_input": "Are you sure you want to clear the whole array?",
|
|
176
|
+
"chelone.message.delete_content": "Are you sure you want to delete this item?",
|
|
177
|
+
"chelone.message.delete_title": "Delete {name} {recordRepresentation}",
|
|
178
|
+
"chelone.navigation.clear_filters": "Clear filters",
|
|
179
|
+
"chelone.notification.application_update_available": "A new version of the application is available",
|
|
180
|
+
"chelone.notification.http_error_label": "Error",
|
|
181
|
+
"chelone.notification.offline": "You are offline",
|
|
182
|
+
"chelone.saved_queries.new_label": "Save current query",
|
|
183
|
+
"chelone.saved_queries.query_name": "Query name",
|
|
184
|
+
"chelone.saved_queries.remove_label_with_name": "Remove saved query \"{name}\"",
|
|
190
185
|
"chelone.assistant.close": "Close",
|
|
191
186
|
"chelone.assistant.confirm": "Run {name}?",
|
|
192
187
|
"chelone.assistant.error": "Something went wrong.",
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export type { JobActionOptions, JobActions, JobPlan, } from "./controller/job-mo
|
|
|
45
45
|
export { DEFAULT_JOB_TABS, getJobActions, jobStatusSource, planJobCancel, planJobRetry, } from "./controller/job-monitor.js";
|
|
46
46
|
export type { KanbanBucket, KanbanColumnDef, KanbanMove, } from "./controller/kanban-board.js";
|
|
47
47
|
export { buildKanbanBuckets, planKanbanMove, } from "./controller/kanban-board.js";
|
|
48
|
-
export type { ListController, ListControllerContext, ListControllerOptions, ListControllerState, ListParamsPatch, } from "./controller/list-controller.js";
|
|
48
|
+
export type { ListContextSurface, ListController, ListControllerContext, ListControllerOptions, ListControllerState, ListControllerSurface, ListParamsPatch, LooseListParamsPatch, } from "./controller/list-controller.js";
|
|
49
49
|
export { createListController, DEFAULT_DEBOUNCE_MS, DEFAULT_PER_PAGE, listControllerActions, } from "./controller/list-controller.js";
|
|
50
50
|
export type { ListParamsQuery, ListUrlState, } from "./controller/list-params.js";
|
|
51
51
|
export { hasCustomParams, listPatchFromSearch, parseListParams, serializeListParams, serializeListState, } from "./controller/list-params.js";
|
|
@@ -93,7 +93,7 @@ export type { MutationMode, MutationModeOptions, } from "./data/mutation-options
|
|
|
93
93
|
export { createMutationOptions, deleteMutationOptions, updateMutationOptions, } from "./data/mutation-options.js";
|
|
94
94
|
export type { DataContext } from "./data/query-options.js";
|
|
95
95
|
export { getInfiniteListOptions, getListOptions, getManyOptions, getManyReferenceOptions, getOneOptions, } from "./data/query-options.js";
|
|
96
|
-
export type { CreateParams, CreateResult, CursorPagination, DataProvider, DeleteManyParams, DeleteManyResult, DeleteParams, DeleteResult, FilterPayload, GetListParams, GetListResult, GetManyParams, GetManyReferenceParams, GetManyReferenceResult, GetManyResult, GetOneParams, GetOneResult, InfiniteListParams, PageInfo, PagePagination, Pagination, SortPayload, UpdateManyParams, UpdateManyResult, UpdateParams, UpdateResult, } from "./data/types.js";
|
|
96
|
+
export type { CreateParams, CreateResult, CursorPagination, DataProvider, DeleteManyParams, DeleteManyResult, DeleteParams, DeleteResult, DisplayedFilters, FilterPayload, GetListParams, GetListResult, GetManyParams, GetManyReferenceParams, GetManyReferenceResult, GetManyResult, GetOneParams, GetOneResult, InfiniteListParams, LooseDisplayedFilters, LooseFilterPayload, LooseSortPayload, PageInfo, PagePagination, Pagination, SortPayload, UpdateManyParams, UpdateManyResult, UpdateParams, UpdateResult, } from "./data/types.js";
|
|
97
97
|
export type { UndoableCacheOptions, UndoableCallbacks, UndoableDeleteCallbacks, UndoableHandle, UndoableMutationConfig, UndoableSettler, UndoableSnapshot, UndoableUpdateCallbacks, UndoableUpdateManyCallbacks, } from "./data/undoable.js";
|
|
98
98
|
export { commitAllUndoables, hasPendingUndoables, patchedRecord, startUndoableMutation, undoableCallbacks, undoableDeleteOptions, undoableUpdateOptions, } from "./data/undoable.js";
|
|
99
99
|
export type { LifecycleCallbacks, LifecycleHandler, } from "./data/with-lifecycle-callbacks.js";
|
|
@@ -106,7 +106,7 @@ export type { ArrayBinding, ArrayBindingOptions, ArrayBindingUpdateOptions, Arra
|
|
|
106
106
|
export { createArrayBinding } from "./form/array-binding.js";
|
|
107
107
|
export { toIdentifierList } from "./form/choice-ids.js";
|
|
108
108
|
export type { ChoiceLists, ChoiceRecord, ChoicesController, ChoicesControllerContext, ChoicesControllerOptions, ChoicesControllerState, } from "./form/choices-controller.js";
|
|
109
|
-
export { choiceListsOf, createChoicesController, } from "./form/choices-controller.js";
|
|
109
|
+
export { choiceListsOf, createChoicesController, eraseChoicesController, } from "./form/choices-controller.js";
|
|
110
110
|
export { formatDate, formatDateTime, formatTime, isValidDate, isValidDateTime, isValidTime, parseDateTimeToISO, parseTimeToDate, } from "./form/date-format.js";
|
|
111
111
|
export { getDirtyFormValues } from "./form/dirty-values.js";
|
|
112
112
|
export type { ParsedDuration } from "./form/duration.js";
|
|
@@ -166,6 +166,8 @@ export { createOsrmProvider } from "./geo/snap-to-roads.js";
|
|
|
166
166
|
export type { JsonObject, JsonValue } from "./guards.js";
|
|
167
167
|
export { isHeadersInit, isRecord, isThenable } from "./guards.js";
|
|
168
168
|
export { defaultMessages } from "./i18n/default-messages.js";
|
|
169
|
+
export type { TextDirection } from "./i18n/direction.js";
|
|
170
|
+
export { getLocaleDirection } from "./i18n/direction.js";
|
|
169
171
|
export { englishMessages } from "./i18n/english-messages.js";
|
|
170
172
|
export type { AnyCheloneI18n, CheloneI18n } from "./i18n/i18n.js";
|
|
171
173
|
export { createI18n } from "./i18n/i18n.js";
|
|
@@ -229,7 +231,7 @@ export type { RecordOf, RecordResources, ResourceConfig, ResourceMap, } from "./
|
|
|
229
231
|
export { defineResources } from "./resource/registry.js";
|
|
230
232
|
export type { ComputeDefinitionProps, ResourceComponent, ResourceDefinition, ResourceDefinitionMap, ResourceIcon, ResourceRegistry, ResourceRegistryListener, ResourceRepresentation, ResourceSlots, } from "./resource/registry-store.js";
|
|
231
233
|
export { computeDefinition, createResourceRegistry, } from "./resource/registry-store.js";
|
|
232
|
-
export type { AnySourcePath, AnySourcePathOf, FilterSourceKey, RowSourcePath, SourceKey, SourcePath, SourceProp, SourceTransformValue, SourceValue, } from "./resource/source-path.js";
|
|
234
|
+
export type { AnyFilterSourceKey, AnyFilterSourceKeyOf, AnySourcePath, AnySourcePathOf, FilterSourceKey, RecordFilterKey, RowSourcePath, SourceKey, SourcePath, SourceProp, SourceTransformValue, SourceValue, } from "./resource/source-path.js";
|
|
233
235
|
export type { IsSafeImageSrcOptions, RichTextBlockType, RichTextHeadingLevel, RichTextToolbarGroup, RichTextToolbarItem, RichTextToolbarItemId, } from "./rich-text/rich-text.js";
|
|
234
236
|
export { isSafeFileUrl, isSafeImageSrc, isSafeLinkUrl, richTextBlockTypes, richTextSanitizeOptions, richTextStarterKitOptions, richTextToolbarItems, } from "./rich-text/rich-text.js";
|
|
235
237
|
export type { RichTextColor, RichTextColorPalette, RichTextExtraToolbarItem, RichTextExtraToolbarItemId, RichTextImageAction, RichTextImageActionId, RichTextImageRules, RichTextUpload, } from "./rich-text/rich-text-extras.js";
|
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ import { createApplicationUpdateStore } from "./environment/application-update-s
|
|
|
57
57
|
import { createOfflineStore } from "./environment/offline-store.js";
|
|
58
58
|
import { createArrayBinding } from "./form/array-binding.js";
|
|
59
59
|
import { toIdentifierList } from "./form/choice-ids.js";
|
|
60
|
-
import { choiceListsOf, createChoicesController } from "./form/choices-controller.js";
|
|
60
|
+
import { choiceListsOf, createChoicesController, eraseChoicesController } from "./form/choices-controller.js";
|
|
61
61
|
import { formatDate, formatDateTime, formatTime, isValidDate, isValidDateTime, isValidTime, parseDateTimeToISO, parseTimeToDate } from "./form/date-format.js";
|
|
62
62
|
import { getDirtyFormValues } from "./form/dirty-values.js";
|
|
63
63
|
import { compactDuration, parseIsoDuration, relativeDuration } from "./form/duration.js";
|
|
@@ -94,6 +94,7 @@ import { featuresToShape, heldFeatures, shapeToFeatures } from "./geo/shape-valu
|
|
|
94
94
|
import { createOsrmProvider } from "./geo/snap-to-roads.js";
|
|
95
95
|
import { isHeadersInit, isRecord, isThenable } from "./guards.js";
|
|
96
96
|
import { defaultMessages } from "./i18n/default-messages.js";
|
|
97
|
+
import { getLocaleDirection } from "./i18n/direction.js";
|
|
97
98
|
import { englishMessages } from "./i18n/english-messages.js";
|
|
98
99
|
import { createI18n } from "./i18n/i18n.js";
|
|
99
100
|
import { humanize, humanizeField, pluralize } from "./i18n/inflection.js";
|
|
@@ -143,4 +144,4 @@ import { shallowEqual } from "./store/shallow-equal.js";
|
|
|
143
144
|
import { createStore } from "./store/store.js";
|
|
144
145
|
import { DEFAULT_EXPORT_MAX_RESULTS, DEFAULT_THEME_STORAGE_KEY, DEVTOOLS_MAX_VALUE_LENGTH, MOBILE_BREAKPOINT, SEARCH_THRESHOLD, TITLE_PORTAL_ID, UNDO_AUTO_HIDE_MS } from "./ui-defaults.js";
|
|
145
146
|
import { revalidateLogic } from "@tanstack/form-core";
|
|
146
|
-
export { COPIED_MS, DEFAULT_CHART_COLORS, DEFAULT_DEBOUNCE_MS, DEFAULT_EXPORT_MAX_RESULTS, DEFAULT_FIT_PADDING, DEFAULT_JOB_TABS, DEFAULT_LOGIN_PATH, DEFAULT_MAP_HEIGHT, DEFAULT_MAP_ZOOM, DEFAULT_MAX_FIT_ZOOM, DEFAULT_PER_PAGE, DEFAULT_PIN_COLOR, DEFAULT_RECENTS_LIMIT, DEFAULT_REFERENCE_PER_PAGE, DEFAULT_SEARCH_DEBOUNCE_MS, DEFAULT_SHAPE_STYLE, DEFAULT_THEME_STORAGE_KEY, DEVTOOLS_MAX_VALUE_LENGTH, ERROR_SEVERITY, GAP_PREFIX, HANDLE_ID, HttpError, INSPECTOR_KEY_STEP, INSPECTOR_OPEN_LABEL, LATITUDE_LIMIT, LONGITUDE_LIMIT, LockConflictError, MARKERS_SETTLE_MS, MAX_IMAGE_BYTES, MOBILE_BREAKPOINT, MODEL_PREFIX, MONACO_DIAGNOSTICS_DELAY_MS, MONACO_MIN_HEIGHT, NEXT_PATHNAME_KEY, OSM_PRESETS, OWN_KEY_PREFIX, OverpassError, OverpassRateLimitError, OverpassTimeoutError, PANEL_WIDTH, PIN_NS, PREVIEW_ROWS, REMEASURE_MS, REPLACEMENT_CHAR, SEARCH_THRESHOLD, TITLE_PORTAL_ID, UNDO_AUTO_HIDE_MS, ValidationError, addEventsForMutations, aggregateChartData, announceLock, applyCsvMapping, areaInTypeOf, arrangeColumns, asFeatureCollection, aspectLockedBBox, assertRealtimeDataProvider, authStateQueryOptions, bboxToPolygon, broadcastChannelTransport, buildApprovalUpdate, buildKanbanBuckets, buildOverpassQuery, buildPivotTable, buildRecordTree, buildRejectionUpdate, calendarDayKey, calendarDaySlot, calendarDays, calendarEventsInHour, calendarEventsOnDay, calendarLabels, calendarRange, calendarRangeFilter, canAccessQueryOptions, canAccessWithPermissions, canUseCachedPage, chartBlockSpec, chartColor, checkError, checkRichTextImageFile, choiceIdOf, choiceListsOf, choices, clampInspectorPosition, clampRichTextImageWidth, clearUnread, columnLabelMatches, combineDataProviders, commitAllUndoables, compactDuration, composeSource, composeValidators, computeDefinition, configurableInputColumns, copyRichTextImage, countVertices, createApplicationUpdateStore, createArrayBinding, createArraySourceScope, createAssistantSession, createBlockRegistry, createChoicesController, createClientListController, createCommandRegistry, createCreateController, createCreateFormController, createCsvImportController, createDataProviderLog, createDeleteController, createEditController, createEditFormController, createFieldBinding, createFormController, createFormGroups, createFormHandle, createI18n, createInfiniteListController, createInspector, createListController, createLocaleSourceScope, createLockSession, createMicroStore, createMissingKeyStore, createMutationOptions, createNominatimProvider, createNotificationStore, createOfflineStore, createOsrmProvider, createOverpassProvider, createPath, createPresenceSession, createRealtimeStatusStore, createReferenceManyController, createReferenceOneController, createResourceRegistry, createRowSourceScope, createSavedQueriesController, createShowController, createStore, createTopicHub, createTourController, createTranslatableController, csvErrorRows, csvSchemaFields, dataBlockNames, dataTableColumnKeys, deepEqual, defaultConfigurableInputsStoreKey, defaultDataTableStoreKey, defaultExporter, defaultFormat, defaultMessages, defaultParse, defaultRichTextImageRules, defineMessages, defineResources, definedParams, deleteMutationOptions, describeBlockAttrs, describeResource, detectJsonShape, diffRecords, downloadCSV, downloadRichTextImage, echoAssistantTransport, editorStyles, email, emptyBlockDocument, endColorOnEnter, englishMessages, errorMessageOf, expandTileUrl, extractEventValue, extractValidSavedQueries, fakeDataProvider, featuresToShape, fetchUtils, fileEntryImage, fileEntryKey, fileEntryPreview, filterFormReflectShape, findPresetForTags, firstFieldError, formatDataBlockValue, formatDate, formatDateTime, formatDiffValue, formatJsonValue, formatPivotValue, formatRelativeTime, formatTime, fromEditorFeatures, fromJsonText, geoAreaM2, geoBounds, geocodeQueryOptions, getAllowedTransitions, getApprovalState, getAtPath, getBlockDefaultAttrs, getDataTableColumnId, getDirtyFormValues, getFilterFormValues, getInfiniteListOptions, getJobActions, getListOptions, getLockOptions, getLocksOptions, getManyAggregateOptions, getManyOptions, getManyReferenceOptions, getMetricDelta, getOneOptions, getPermissionCell, getPresenceInitials, getPrevNextParams, getRecordForLocale, getRecordFromLocation, getVisibleCommands, groupCalendarAgenda, groupCommands, hasChartValues, hasCustomParams, hasPendingUndoables, hasSelfIntersection, hasTransportMembers, heldFeatures, httpAssistantTransport, humanize, humanizeField, identifiersOf, identityQueryOptions, inMemoryLockProvider, infiniteListKey, inspectorPositionKey, isBlockDoc, isEmpty, isEmptyBlockDocument, isFilterBranch, isFilterSelected, isGeoArea, isGeoBBox, isGeoFeature, isGeoFeatureCollection, isGeoGeometry, isGeoJsonValue, isHeadersInit, isIdentifier, isIdentifierArray, isLngLatBox, isLooseRecord, isOverpassAnswer, isPermissionRowGranted, isRealtimeDataProvider, isRecord, isRequired, isResourceHandle, isResourceRecord, isRichTextImageConfigSource, isSafeFileUrl, isSafeImageSrc, isSafeLinkUrl, isSavedQueryActive, isThenable, isTransformedFile, isTypingTarget, isValidDate, isValidDateTime, isValidTime, jobStatusSource, joinBasename, latLngToLngLat, latitude, listControllerActions, listKey, listPatchFromSearch, lngLatToLatLng, localStorageAdapter, lockKey, lockResourceTopic, lockTopic, locksKey, longitude, manyKey, manyReferenceKey, mapMessages, matchBlocks, matchCsvHeaders, matchPath, matchesHotkey, maxLength, maxValue, maxVertices, memoryStoreAdapter, memoryTransport, mergeFilterValues, minAreaM2, minLength, minValue, minVertices, moveCalendarEvent, moveColumn, moveColumnTo, nextInPlaceEditorState, noSelfIntersection, noop, normalizeFormError, normalizeRichTextUpload, number, omitCalendarRangeFilter, onboardingTourKey, oneKey, overpassQueryOptions, parseCalendarDate, parseCsvWith, parseDateTimeToISO, parseIsoDuration, parseListParams, parseLocation, parseTimeToDate, patchedRecord, permissionsQueryOptions, pickDataBlockFields, pickTranslateParamValues, placeTourCard, placedFeatures, planInPlaceSave, planJobCancel, planJobRetry, planKanbanMove, pluralize, polygonToBBox, prepareRichTextImages, presenceTopic, rasterTileStyle, readDataBlockValue, realtimeDataProvider, recentsKey, recordListBlockSpec, recordTopic, recordsToCSV, reduceGroupState, referenceRecordBlockSpec, regex, relativeDuration, rememberRecent, removeDoubleSlashes, removeRecordsFromCache, required, resolveChoiceValue, resolveLockIdentity, resolveNotificationKey, resolvePrevNext, resolveRichTextImageConfig, resourceKey, resourceTopic, revalidateLogic, reverseGeocodeQueryOptions, richTextBlockTypes, richTextCodeBlockOptions, richTextColors, richTextExtraToolbarItems, richTextImageActions, richTextImageAttributes, richTextImageFileName, richTextImageUploadState, richTextSanitizeOptions, richTextStarterKitOptions, richTextStyledSanitizeOptions, richTextToolbarItems, rootSourceScope, runCsvImport, sanitizeRichTextImageElement, sanitizeRichTextStyle, savedQueriesKey, serializeListParams, serializeListState, setFormValues, setPermissionRow, setRichTextImageUploading, shallowEqual, shapeLayerSpecs, shapeToFeatures, shiftCalendarAnchor, shouldHandleHotkey, sseTransport, staleCalendarRangeKeys, startUndoableMutation, storeRichTextImageFile, stripJsonComments, subscribeLiveLock, subscribeLiveLocks, subscribeLiveRecord, subscribeLiveRecords, subscribeLiveResource, subscribeUnreadCount, tagToFilter, textOf, toBooleanValue, toCalendarEvents, toCartesianRows, toChoiceValue, toChoiceValues, toCoordinate, toCurrencyComposite, toCurrencyValue, toDateInputValue, toDonutSlices, toEditorFeatures, toEmbedSrc, toFileEntries, toFileInputValue, toFileSelection, toFormContextHandle, toIdentifierList, toJsonText, toLocationState, toNullableBooleanValue, toNumberValue, toPresenceUser, toResourceFormHandle, toTextList, toTextValue, toTimelineEntries, toWebhookValue, toggleFilterValue, toggleHiddenColumn, togglePermission, tourSpotlightPath, undoableCallbacks, undoableDeleteOptions, undoableUpdateOptions, unknownBlockType, unreadKey, unwrapUnknownBlocks, updateMutationOptions, updateRecordsInCache, validateCsvRows, webSocketTransport, withLifecycleCallbacks, wrapLongitude, wrapUnknownBlocks };
|
|
147
|
+
export { COPIED_MS, DEFAULT_CHART_COLORS, DEFAULT_DEBOUNCE_MS, DEFAULT_EXPORT_MAX_RESULTS, DEFAULT_FIT_PADDING, DEFAULT_JOB_TABS, DEFAULT_LOGIN_PATH, DEFAULT_MAP_HEIGHT, DEFAULT_MAP_ZOOM, DEFAULT_MAX_FIT_ZOOM, DEFAULT_PER_PAGE, DEFAULT_PIN_COLOR, DEFAULT_RECENTS_LIMIT, DEFAULT_REFERENCE_PER_PAGE, DEFAULT_SEARCH_DEBOUNCE_MS, DEFAULT_SHAPE_STYLE, DEFAULT_THEME_STORAGE_KEY, DEVTOOLS_MAX_VALUE_LENGTH, ERROR_SEVERITY, GAP_PREFIX, HANDLE_ID, HttpError, INSPECTOR_KEY_STEP, INSPECTOR_OPEN_LABEL, LATITUDE_LIMIT, LONGITUDE_LIMIT, LockConflictError, MARKERS_SETTLE_MS, MAX_IMAGE_BYTES, MOBILE_BREAKPOINT, MODEL_PREFIX, MONACO_DIAGNOSTICS_DELAY_MS, MONACO_MIN_HEIGHT, NEXT_PATHNAME_KEY, OSM_PRESETS, OWN_KEY_PREFIX, OverpassError, OverpassRateLimitError, OverpassTimeoutError, PANEL_WIDTH, PIN_NS, PREVIEW_ROWS, REMEASURE_MS, REPLACEMENT_CHAR, SEARCH_THRESHOLD, TITLE_PORTAL_ID, UNDO_AUTO_HIDE_MS, ValidationError, addEventsForMutations, aggregateChartData, announceLock, applyCsvMapping, areaInTypeOf, arrangeColumns, asFeatureCollection, aspectLockedBBox, assertRealtimeDataProvider, authStateQueryOptions, bboxToPolygon, broadcastChannelTransport, buildApprovalUpdate, buildKanbanBuckets, buildOverpassQuery, buildPivotTable, buildRecordTree, buildRejectionUpdate, calendarDayKey, calendarDaySlot, calendarDays, calendarEventsInHour, calendarEventsOnDay, calendarLabels, calendarRange, calendarRangeFilter, canAccessQueryOptions, canAccessWithPermissions, canUseCachedPage, chartBlockSpec, chartColor, checkError, checkRichTextImageFile, choiceIdOf, choiceListsOf, choices, clampInspectorPosition, clampRichTextImageWidth, clearUnread, columnLabelMatches, combineDataProviders, commitAllUndoables, compactDuration, composeSource, composeValidators, computeDefinition, configurableInputColumns, copyRichTextImage, countVertices, createApplicationUpdateStore, createArrayBinding, createArraySourceScope, createAssistantSession, createBlockRegistry, createChoicesController, createClientListController, createCommandRegistry, createCreateController, createCreateFormController, createCsvImportController, createDataProviderLog, createDeleteController, createEditController, createEditFormController, createFieldBinding, createFormController, createFormGroups, createFormHandle, createI18n, createInfiniteListController, createInspector, createListController, createLocaleSourceScope, createLockSession, createMicroStore, createMissingKeyStore, createMutationOptions, createNominatimProvider, createNotificationStore, createOfflineStore, createOsrmProvider, createOverpassProvider, createPath, createPresenceSession, createRealtimeStatusStore, createReferenceManyController, createReferenceOneController, createResourceRegistry, createRowSourceScope, createSavedQueriesController, createShowController, createStore, createTopicHub, createTourController, createTranslatableController, csvErrorRows, csvSchemaFields, dataBlockNames, dataTableColumnKeys, deepEqual, defaultConfigurableInputsStoreKey, defaultDataTableStoreKey, defaultExporter, defaultFormat, defaultMessages, defaultParse, defaultRichTextImageRules, defineMessages, defineResources, definedParams, deleteMutationOptions, describeBlockAttrs, describeResource, detectJsonShape, diffRecords, downloadCSV, downloadRichTextImage, echoAssistantTransport, editorStyles, email, emptyBlockDocument, endColorOnEnter, englishMessages, eraseChoicesController, errorMessageOf, expandTileUrl, extractEventValue, extractValidSavedQueries, fakeDataProvider, featuresToShape, fetchUtils, fileEntryImage, fileEntryKey, fileEntryPreview, filterFormReflectShape, findPresetForTags, firstFieldError, formatDataBlockValue, formatDate, formatDateTime, formatDiffValue, formatJsonValue, formatPivotValue, formatRelativeTime, formatTime, fromEditorFeatures, fromJsonText, geoAreaM2, geoBounds, geocodeQueryOptions, getAllowedTransitions, getApprovalState, getAtPath, getBlockDefaultAttrs, getDataTableColumnId, getDirtyFormValues, getFilterFormValues, getInfiniteListOptions, getJobActions, getListOptions, getLocaleDirection, getLockOptions, getLocksOptions, getManyAggregateOptions, getManyOptions, getManyReferenceOptions, getMetricDelta, getOneOptions, getPermissionCell, getPresenceInitials, getPrevNextParams, getRecordForLocale, getRecordFromLocation, getVisibleCommands, groupCalendarAgenda, groupCommands, hasChartValues, hasCustomParams, hasPendingUndoables, hasSelfIntersection, hasTransportMembers, heldFeatures, httpAssistantTransport, humanize, humanizeField, identifiersOf, identityQueryOptions, inMemoryLockProvider, infiniteListKey, inspectorPositionKey, isBlockDoc, isEmpty, isEmptyBlockDocument, isFilterBranch, isFilterSelected, isGeoArea, isGeoBBox, isGeoFeature, isGeoFeatureCollection, isGeoGeometry, isGeoJsonValue, isHeadersInit, isIdentifier, isIdentifierArray, isLngLatBox, isLooseRecord, isOverpassAnswer, isPermissionRowGranted, isRealtimeDataProvider, isRecord, isRequired, isResourceHandle, isResourceRecord, isRichTextImageConfigSource, isSafeFileUrl, isSafeImageSrc, isSafeLinkUrl, isSavedQueryActive, isThenable, isTransformedFile, isTypingTarget, isValidDate, isValidDateTime, isValidTime, jobStatusSource, joinBasename, latLngToLngLat, latitude, listControllerActions, listKey, listPatchFromSearch, lngLatToLatLng, localStorageAdapter, lockKey, lockResourceTopic, lockTopic, locksKey, longitude, manyKey, manyReferenceKey, mapMessages, matchBlocks, matchCsvHeaders, matchPath, matchesHotkey, maxLength, maxValue, maxVertices, memoryStoreAdapter, memoryTransport, mergeFilterValues, minAreaM2, minLength, minValue, minVertices, moveCalendarEvent, moveColumn, moveColumnTo, nextInPlaceEditorState, noSelfIntersection, noop, normalizeFormError, normalizeRichTextUpload, number, omitCalendarRangeFilter, onboardingTourKey, oneKey, overpassQueryOptions, parseCalendarDate, parseCsvWith, parseDateTimeToISO, parseIsoDuration, parseListParams, parseLocation, parseTimeToDate, patchedRecord, permissionsQueryOptions, pickDataBlockFields, pickTranslateParamValues, placeTourCard, placedFeatures, planInPlaceSave, planJobCancel, planJobRetry, planKanbanMove, pluralize, polygonToBBox, prepareRichTextImages, presenceTopic, rasterTileStyle, readDataBlockValue, realtimeDataProvider, recentsKey, recordListBlockSpec, recordTopic, recordsToCSV, reduceGroupState, referenceRecordBlockSpec, regex, relativeDuration, rememberRecent, removeDoubleSlashes, removeRecordsFromCache, required, resolveChoiceValue, resolveLockIdentity, resolveNotificationKey, resolvePrevNext, resolveRichTextImageConfig, resourceKey, resourceTopic, revalidateLogic, reverseGeocodeQueryOptions, richTextBlockTypes, richTextCodeBlockOptions, richTextColors, richTextExtraToolbarItems, richTextImageActions, richTextImageAttributes, richTextImageFileName, richTextImageUploadState, richTextSanitizeOptions, richTextStarterKitOptions, richTextStyledSanitizeOptions, richTextToolbarItems, rootSourceScope, runCsvImport, sanitizeRichTextImageElement, sanitizeRichTextStyle, savedQueriesKey, serializeListParams, serializeListState, setFormValues, setPermissionRow, setRichTextImageUploading, shallowEqual, shapeLayerSpecs, shapeToFeatures, shiftCalendarAnchor, shouldHandleHotkey, sseTransport, staleCalendarRangeKeys, startUndoableMutation, storeRichTextImageFile, stripJsonComments, subscribeLiveLock, subscribeLiveLocks, subscribeLiveRecord, subscribeLiveRecords, subscribeLiveResource, subscribeUnreadCount, tagToFilter, textOf, toBooleanValue, toCalendarEvents, toCartesianRows, toChoiceValue, toChoiceValues, toCoordinate, toCurrencyComposite, toCurrencyValue, toDateInputValue, toDonutSlices, toEditorFeatures, toEmbedSrc, toFileEntries, toFileInputValue, toFileSelection, toFormContextHandle, toIdentifierList, toJsonText, toLocationState, toNullableBooleanValue, toNumberValue, toPresenceUser, toResourceFormHandle, toTextList, toTextValue, toTimelineEntries, toWebhookValue, toggleFilterValue, toggleHiddenColumn, togglePermission, tourSpotlightPath, undoableCallbacks, undoableDeleteOptions, undoableUpdateOptions, unknownBlockType, unreadKey, unwrapUnknownBlocks, updateMutationOptions, updateRecordsInCache, validateCsvRows, webSocketTransport, withLifecycleCallbacks, wrapLongitude, wrapUnknownBlocks };
|
package/dist/realtime/live.d.ts
CHANGED
|
@@ -12,12 +12,12 @@ export interface LiveOptions {
|
|
|
12
12
|
paused?: () => boolean;
|
|
13
13
|
}
|
|
14
14
|
/** Refetches the resource's lists, shows and edits when anything in it changes or the connection comes back. */
|
|
15
|
-
export declare function subscribeLiveResource<TResources extends ResourceMap>(ctx: DataContext<TResources>, resource:
|
|
15
|
+
export declare function subscribeLiveResource<TResources extends ResourceMap, TName extends keyof TResources & string>(ctx: DataContext<TResources>, resource: TName, options?: LiveOptions): LiveSubscription;
|
|
16
16
|
/** Like `subscribeLiveResource`, for the events of one record. */
|
|
17
|
-
export declare function subscribeLiveRecord<TResources extends ResourceMap>(ctx: DataContext<TResources>, resource:
|
|
17
|
+
export declare function subscribeLiveRecord<TResources extends ResourceMap, TName extends keyof TResources & string>(ctx: DataContext<TResources>, resource: TName, id: Identifier, options?: LiveOptions): LiveSubscription;
|
|
18
18
|
/** Like `subscribeLiveRecord`, for several records: one invalidation however many of them change. */
|
|
19
|
-
export declare function subscribeLiveRecords<TResources extends ResourceMap>(ctx: DataContext<TResources>, resource:
|
|
19
|
+
export declare function subscribeLiveRecords<TResources extends ResourceMap, TName extends keyof TResources & string>(ctx: DataContext<TResources>, resource: TName, ids: Identifier[], options?: LiveOptions): LiveSubscription;
|
|
20
20
|
/** Refetches one record's lock when it is taken or released. */
|
|
21
|
-
export declare function subscribeLiveLock<TResources extends ResourceMap>(ctx: DataContext<TResources>, resource:
|
|
21
|
+
export declare function subscribeLiveLock<TResources extends ResourceMap, TName extends keyof TResources & string>(ctx: DataContext<TResources>, resource: TName, id: Identifier): LiveSubscription;
|
|
22
22
|
/** Refetches the resource's lock list when any lock is taken or released. */
|
|
23
|
-
export declare function subscribeLiveLocks<TResources extends ResourceMap>(ctx: DataContext<TResources>, resource:
|
|
23
|
+
export declare function subscribeLiveLocks<TResources extends ResourceMap, TName extends keyof TResources & string>(ctx: DataContext<TResources>, resource: TName): LiveSubscription;
|
package/dist/realtime/types.d.ts
CHANGED
|
@@ -62,13 +62,13 @@ export interface RealtimeTransport {
|
|
|
62
62
|
getStatus?(): RealtimeConnectionStatus;
|
|
63
63
|
onError?(callback: (error: RealtimeTransportError) => void): Unsubscribe;
|
|
64
64
|
}
|
|
65
|
-
export interface LockProvider {
|
|
66
|
-
lock(resource:
|
|
67
|
-
unlock(resource:
|
|
68
|
-
getLock(resource:
|
|
69
|
-
getLocks(resource:
|
|
65
|
+
export interface LockProvider<TResources extends ResourceMap = ResourceMap> {
|
|
66
|
+
lock<TName extends keyof TResources & string>(resource: TName, params: LockParams): Promise<Lock>;
|
|
67
|
+
unlock<TName extends keyof TResources & string>(resource: TName, params: UnlockParams): Promise<Lock>;
|
|
68
|
+
getLock<TName extends keyof TResources & string>(resource: TName, params: GetLockParams): Promise<Lock | null>;
|
|
69
|
+
getLocks<TName extends keyof TResources & string>(resource: TName, params?: GetLocksParams): Promise<Lock[]>;
|
|
70
70
|
}
|
|
71
|
-
export interface RealtimeDataProvider<TResources extends ResourceMap = ResourceMap> extends DataProvider<TResources>, LockProvider {
|
|
71
|
+
export interface RealtimeDataProvider<TResources extends ResourceMap = ResourceMap> extends DataProvider<TResources>, LockProvider<TResources> {
|
|
72
72
|
subscribe<P = unknown>(topic: string, callback: SubscriptionCallback<P>): Unsubscribe;
|
|
73
73
|
publish<P = unknown>(topic: string, event: Omit<RealtimeEvent<P>, "topic">): Promise<void>;
|
|
74
74
|
onReconnect?: RealtimeTransport["onReconnect"];
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { ResourceConfig } from "./registry.js";
|
|
2
|
+
import type { AnySourcePath } from "./source-path.js";
|
|
2
3
|
/** The field components both adapters export. Each adapter keeps one exhaustive map over this. */
|
|
3
4
|
export type FieldComponentName = "TextField" | "EmailField" | "UrlField" | "NumberField" | "BooleanField" | "DateField" | "SelectField" | "TextArrayField" | "ReferenceField" | "ReferenceArrayField";
|
|
4
5
|
/** The input components both adapters export. */
|
|
5
6
|
export type InputComponentName = "TextInput" | "NumberInput" | "BooleanInput" | "DateInput" | "DateTimeInput" | "SelectInput" | "TextArrayInput" | "ReferenceInput" | "ReferenceArrayInput";
|
|
6
7
|
export type FieldKind = "text" | "email" | "url" | "number" | "boolean" | "date" | "dateTime" | "select" | "textArray" | "reference" | "referenceArray" | "unsupported";
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* `TSource` is the registry-wide {@link AnySourcePath} by default, so a guesser
|
|
10
|
+
* hands `source` to a `source` prop whether or not the app registered resources.
|
|
11
|
+
* A block's attrs are not resource paths and name `FieldDescriptor<string>`.
|
|
12
|
+
*/
|
|
13
|
+
export interface FieldDescriptor<TSource extends string = AnySourcePath> {
|
|
14
|
+
source: TSource;
|
|
9
15
|
kind: FieldKind;
|
|
10
16
|
/** True for the `id` field. */
|
|
11
17
|
primary: boolean;
|
|
@@ -29,7 +35,7 @@ export interface ResourceDescriptor {
|
|
|
29
35
|
fields: FieldDescriptor[];
|
|
30
36
|
}
|
|
31
37
|
/** For core's block editor helpers; not exported from the package index. */
|
|
32
|
-
export declare function describeField(source:
|
|
38
|
+
export declare function describeField<TSource extends string>(source: TSource, schema: unknown, references: ResourceConfig["references"]): FieldDescriptor<TSource>;
|
|
33
39
|
/**
|
|
34
40
|
* Turns a resource's registered Zod schema (Zod 3 or Zod 4) into one descriptor per field, in
|
|
35
41
|
* schema key order. Returns `undefined` when there is no schema to read or it
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* a plain keyed store with a whole-map snapshot, mirroring the store /
|
|
11
11
|
* MicroStore notification pattern.
|
|
12
12
|
*/
|
|
13
|
+
import type { RegisteredResourceName } from "./register.js";
|
|
13
14
|
/**
|
|
14
15
|
* The augmentation point for the types a resource definition carries that
|
|
15
16
|
* depend on the UI framework. An adapter names them once, as `Register` does
|
|
@@ -50,7 +51,8 @@ export type ResourceComponent = ResourceSlots extends {
|
|
|
50
51
|
* extension bag (D9: the shadcn menu reads `options.group`).
|
|
51
52
|
*/
|
|
52
53
|
export interface ResourceDefinition {
|
|
53
|
-
name
|
|
54
|
+
/** A registered resource name once `Register` is augmented, else any string. */
|
|
55
|
+
name: RegisteredResourceName;
|
|
54
56
|
hasList: boolean;
|
|
55
57
|
hasCreate: boolean;
|
|
56
58
|
hasEdit: boolean;
|
|
@@ -89,7 +91,8 @@ export interface ResourceRegistry {
|
|
|
89
91
|
}
|
|
90
92
|
/** Framework-neutral props `computeDefinition` derives a definition from. */
|
|
91
93
|
export interface ComputeDefinitionProps {
|
|
92
|
-
name
|
|
94
|
+
/** A registered resource name once `Register` is augmented, else any string. */
|
|
95
|
+
name: RegisteredResourceName;
|
|
93
96
|
/** A list component; presence sets `hasList`. */
|
|
94
97
|
list?: ResourceComponent;
|
|
95
98
|
create?: ResourceComponent;
|
|
@@ -110,6 +110,17 @@ export type RowSourcePath<TRecord> = unknown extends TRecord ? string : string e
|
|
|
110
110
|
* `` `${startSource}_gte` ``) and a filter input's `source` is named with.
|
|
111
111
|
*/
|
|
112
112
|
export type FilterSourceKey<TRecord> = "q" | `${SourcePath<TRecord>}_${string}`;
|
|
113
|
+
/**
|
|
114
|
+
* The filter keys one record accepts: the free-text `q`, its source paths, and
|
|
115
|
+
* those paths with an operator suffix.
|
|
116
|
+
*
|
|
117
|
+
* Plain paths are load-bearing, not a looseness: a filter form writes the key
|
|
118
|
+
* its input's `source` names (`<TextInput source="title">` pushes
|
|
119
|
+
* `{ title: "x" }`), and only `calendarRangeFilter` and the like write a
|
|
120
|
+
* suffix. `string` when the record names no paths of its own — a loose record,
|
|
121
|
+
* a resource with no schema, a record with an open key set.
|
|
122
|
+
*/
|
|
123
|
+
export type RecordFilterKey<TRecord> = string extends keyof TRecord ? string : SourcePath<TRecord> | FilterSourceKey<TRecord>;
|
|
113
124
|
/** The source props one record accepts: its paths, its row paths, its filter keys. */
|
|
114
125
|
type _RecordSourcePath<TRecord> = SourcePath<TRecord> | RowSourcePath<TRecord> | FilterSourceKey<TRecord>;
|
|
115
126
|
/**
|
|
@@ -124,6 +135,18 @@ export type AnySourcePathOf<TResources extends ResourceMap> = string extends key
|
|
|
124
135
|
}[keyof TResources & string];
|
|
125
136
|
/** {@link AnySourcePathOf} over the app's registered resources. */
|
|
126
137
|
export type AnySourcePath = AnySourcePathOf<RegisteredResources>;
|
|
138
|
+
/**
|
|
139
|
+
* The union of every registered resource's filter keys.
|
|
140
|
+
*
|
|
141
|
+
* `string` when the name set is `string` (nothing registered) and `string` when
|
|
142
|
+
* any resource has no schema, as {@link AnySourcePathOf} does: an app that
|
|
143
|
+
* registers some resources but filters one without a schema stays string-keyed.
|
|
144
|
+
*/
|
|
145
|
+
export type AnyFilterSourceKeyOf<TResources extends ResourceMap> = string extends keyof TResources ? string : {
|
|
146
|
+
[TName in keyof TResources & string]: RecordFilterKey<RecordOf<TResources, TName>>;
|
|
147
|
+
}[keyof TResources & string];
|
|
148
|
+
/** {@link AnyFilterSourceKeyOf} over the app's registered resources. */
|
|
149
|
+
export type AnyFilterSourceKey = AnyFilterSourceKeyOf<RegisteredResources>;
|
|
127
150
|
/**
|
|
128
151
|
* The type a `source` prop takes.
|
|
129
152
|
*
|