@atscript/ui 0.1.163 → 0.1.165
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/client-factory.cjs +27 -0
- package/dist/client-factory.d.cts +58 -0
- package/dist/client-factory.d.mts +58 -0
- package/dist/client-factory.mjs +25 -0
- package/dist/form/apply.cjs +38 -0
- package/dist/form/apply.d.cts +36 -0
- package/dist/form/apply.d.mts +36 -0
- package/dist/form/apply.mjs +38 -0
- package/dist/form/clone.cjs +30 -0
- package/dist/form/clone.d.cts +23 -0
- package/dist/form/clone.d.mts +23 -0
- package/dist/form/clone.mjs +30 -0
- package/dist/form/create-form-def.cjs +462 -0
- package/dist/form/create-form-def.d.cts +67 -0
- package/dist/form/create-form-def.d.mts +67 -0
- package/dist/form/create-form-def.mjs +460 -0
- package/dist/form/decimal-format.cjs +324 -0
- package/dist/form/decimal-format.d.cts +86 -0
- package/dist/form/decimal-format.d.mts +86 -0
- package/dist/form/decimal-format.mjs +315 -0
- package/dist/form/diff.cjs +458 -0
- package/dist/form/diff.d.cts +80 -0
- package/dist/form/diff.d.mts +80 -0
- package/dist/form/diff.mjs +457 -0
- package/dist/form/dirty.cjs +65 -0
- package/dist/form/dirty.d.cts +47 -0
- package/dist/form/dirty.d.mts +47 -0
- package/dist/form/dirty.mjs +64 -0
- package/dist/form/error-utils.cjs +97 -0
- package/dist/form/error-utils.d.cts +58 -0
- package/dist/form/error-utils.d.mts +58 -0
- package/dist/form/error-utils.mjs +92 -0
- package/dist/form/form-actions.cjs +30 -0
- package/dist/form/form-actions.d.cts +17 -0
- package/dist/form/form-actions.d.mts +17 -0
- package/dist/form/form-actions.mjs +30 -0
- package/dist/form/grid.cjs +69 -0
- package/dist/form/grid.d.cts +49 -0
- package/dist/form/grid.d.mts +49 -0
- package/dist/form/grid.mjs +64 -0
- package/dist/form/labels.cjs +13 -0
- package/dist/form/labels.d.cts +11 -0
- package/dist/form/labels.d.mts +11 -0
- package/dist/form/labels.mjs +13 -0
- package/dist/form/measurement.cjs +20 -0
- package/dist/form/measurement.d.cts +29 -0
- package/dist/form/measurement.d.mts +29 -0
- package/dist/form/measurement.mjs +20 -0
- package/dist/form/path-utils.cjs +182 -0
- package/dist/form/path-utils.d.cts +47 -0
- package/dist/form/path-utils.d.mts +47 -0
- package/dist/form/path-utils.mjs +175 -0
- package/dist/form/rebase.cjs +89 -0
- package/dist/form/rebase.d.cts +61 -0
- package/dist/form/rebase.d.mts +61 -0
- package/dist/form/rebase.mjs +89 -0
- package/dist/form/skipped-nav.cjs +100 -0
- package/dist/form/skipped-nav.d.cts +13 -0
- package/dist/form/skipped-nav.d.mts +13 -0
- package/dist/form/skipped-nav.mjs +98 -0
- package/dist/form/types.cjs +40 -0
- package/dist/form/types.d.cts +147 -0
- package/dist/form/types.d.mts +147 -0
- package/dist/form/types.mjs +36 -0
- package/dist/form/union-detect.cjs +46 -0
- package/dist/form/union-detect.d.cts +22 -0
- package/dist/form/union-detect.d.mts +22 -0
- package/dist/form/union-detect.mjs +46 -0
- package/dist/form/validate.cjs +186 -0
- package/dist/form/validate.d.cts +81 -0
- package/dist/form/validate.d.mts +81 -0
- package/dist/form/validate.mjs +182 -0
- package/dist/i18n/ui-texts.cjs +135 -0
- package/dist/i18n/ui-texts.d.cts +81 -0
- package/dist/i18n/ui-texts.d.mts +81 -0
- package/dist/i18n/ui-texts.mjs +132 -0
- package/dist/index.cjs +223 -3360
- package/dist/index.d.cts +39 -1693
- package/dist/index.d.mts +39 -1693
- package/dist/index.mjs +36 -3179
- package/dist/messages.cjs +301 -0
- package/dist/messages.d.cts +302 -0
- package/dist/messages.d.mts +302 -0
- package/dist/messages.mjs +300 -0
- package/dist/nav/model-routes.cjs +59 -0
- package/dist/nav/model-routes.d.cts +33 -0
- package/dist/nav/model-routes.d.mts +33 -0
- package/dist/nav/model-routes.mjs +59 -0
- package/dist/plugin/annotations.cjs +592 -0
- package/dist/plugin/annotations.mjs +592 -0
- package/dist/plugin/primitives.cjs +30 -0
- package/dist/plugin/primitives.mjs +30 -0
- package/dist/plugin/value-help-validation.cjs +429 -0
- package/dist/plugin/value-help-validation.mjs +423 -0
- package/dist/plugin.cjs +4 -1001
- package/dist/plugin.mjs +2 -999
- package/dist/shared/annotation-keys.cjs +189 -0
- package/dist/shared/annotation-keys.d.cts +82 -0
- package/dist/shared/annotation-keys.d.mts +82 -0
- package/dist/shared/annotation-keys.mjs +97 -0
- package/dist/shared/field-resolver.cjs +123 -0
- package/dist/shared/field-resolver.d.cts +77 -0
- package/dist/shared/field-resolver.d.mts +77 -0
- package/dist/shared/field-resolver.mjs +110 -0
- package/dist/shared/meta-cache.cjs +282 -0
- package/dist/shared/meta-cache.d.cts +130 -0
- package/dist/shared/meta-cache.d.mts +130 -0
- package/dist/shared/meta-cache.mjs +275 -0
- package/dist/shared/str.cjs +19 -0
- package/dist/shared/str.d.cts +7 -0
- package/dist/shared/str.d.mts +7 -0
- package/dist/shared/str.mjs +17 -0
- package/dist/table/column-resolver.cjs +17 -0
- package/dist/table/column-resolver.d.cts +11 -0
- package/dist/table/column-resolver.d.mts +11 -0
- package/dist/table/column-resolver.mjs +15 -0
- package/dist/table/create-table-def.cjs +242 -0
- package/dist/table/create-table-def.d.cts +19 -0
- package/dist/table/create-table-def.d.mts +19 -0
- package/dist/table/create-table-def.mjs +242 -0
- package/dist/table/navigate-href.cjs +45 -0
- package/dist/table/navigate-href.d.cts +31 -0
- package/dist/table/navigate-href.d.mts +31 -0
- package/dist/table/navigate-href.mjs +45 -0
- package/dist/table/types.d.cts +290 -0
- package/dist/table/types.d.mts +290 -0
- package/dist/table/value-kind.cjs +20 -0
- package/dist/table/value-kind.d.cts +16 -0
- package/dist/table/value-kind.d.mts +16 -0
- package/dist/table/value-kind.mjs +19 -0
- package/dist/value-help/dict-paths.cjs +17 -0
- package/dist/value-help/dict-paths.d.cts +11 -0
- package/dist/value-help/dict-paths.d.mts +11 -0
- package/dist/value-help/dict-paths.mjs +17 -0
- package/dist/value-help/distinct-client.cjs +51 -0
- package/dist/value-help/distinct-client.d.cts +40 -0
- package/dist/value-help/distinct-client.d.mts +40 -0
- package/dist/value-help/distinct-client.mjs +50 -0
- package/dist/value-help/extract-literals.cjs +115 -0
- package/dist/value-help/extract-literals.d.cts +44 -0
- package/dist/value-help/extract-literals.d.mts +44 -0
- package/dist/value-help/extract-literals.mjs +111 -0
- package/dist/value-help/extract-ref.cjs +100 -0
- package/dist/value-help/extract-ref.d.cts +37 -0
- package/dist/value-help/extract-ref.d.mts +37 -0
- package/dist/value-help/extract-ref.mjs +100 -0
- package/dist/value-help/filter-tree.cjs +45 -0
- package/dist/value-help/filter-tree.mjs +45 -0
- package/dist/value-help/index.d.mts +8 -0
- package/dist/value-help/resolve-options.cjs +68 -0
- package/dist/value-help/resolve-options.d.cts +40 -0
- package/dist/value-help/resolve-options.d.mts +40 -0
- package/dist/value-help/resolve-options.mjs +64 -0
- package/dist/value-help/resolve.cjs +66 -0
- package/dist/value-help/resolve.d.cts +36 -0
- package/dist/value-help/resolve.d.mts +36 -0
- package/dist/value-help/resolve.mjs +65 -0
- package/dist/value-help/types.d.cts +41 -0
- package/dist/value-help/types.d.mts +41 -0
- package/dist/value-help/value-help-client.cjs +136 -0
- package/dist/value-help/value-help-client.d.cts +67 -0
- package/dist/value-help/value-help-client.d.mts +67 -0
- package/dist/value-help/value-help-client.mjs +134 -0
- package/package.json +15 -10
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
//#region src/messages.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The built-in texts of the atscript-ui components, by code: `UI_*` code →
|
|
4
|
+
* English template with `{name}` placeholders. Imports nothing — a server
|
|
5
|
+
* registers it with moost's translation registry:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { registerMessages } from "moost";
|
|
9
|
+
* import { AS_UI_MESSAGES } from "@atscript/ui/messages";
|
|
10
|
+
*
|
|
11
|
+
* registerMessages(AS_UI_MESSAGES);
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* The client renders these texts in English unless the server served a
|
|
15
|
+
* translation for the locale (or your own translator returns one).
|
|
16
|
+
*/
|
|
17
|
+
declare const AS_UI_MESSAGES: Readonly<{
|
|
18
|
+
UI_YES: "Yes";
|
|
19
|
+
UI_NO: "No";
|
|
20
|
+
UI_ITEM: "item";
|
|
21
|
+
UI_CANCEL: "Cancel";
|
|
22
|
+
UI_APPLY: "Apply";
|
|
23
|
+
UI_SAVE: "Save";
|
|
24
|
+
UI_CLOSE: "Close";
|
|
25
|
+
UI_CONFIRM: "Confirm";
|
|
26
|
+
UI_CONFIRMATION: "Confirmation";
|
|
27
|
+
UI_REMOVE: "Remove";
|
|
28
|
+
UI_CLEAR: "Clear";
|
|
29
|
+
UI_CLEAR_ALL: "Clear all";
|
|
30
|
+
UI_CLEAR_SELECTION: "Clear selection";
|
|
31
|
+
UI_SELECT_ALL: "Select all";
|
|
32
|
+
UI_SELECT_PLACEHOLDER: "Select...";
|
|
33
|
+
UI_SEARCH_PLACEHOLDER: "Search...";
|
|
34
|
+
UI_RESET: "Reset";
|
|
35
|
+
UI_RETRY: "Retry";
|
|
36
|
+
UI_ERROR: "Error";
|
|
37
|
+
UI_MORE: "+{count} more";
|
|
38
|
+
UI_INVALID_VALUE: "Invalid value"; /** A `@ui.form.validate` rule returned `false` (no message of its own). */
|
|
39
|
+
UI_VALIDATION_FAILED: "Validation failed";
|
|
40
|
+
UI_FORM_SUBMIT: "Submit";
|
|
41
|
+
UI_FORM_DISMISS: "Dismiss";
|
|
42
|
+
UI_FORM_MODIFIED: "Modified";
|
|
43
|
+
UI_FORM_WRONG_VALUE: "Wrong value";
|
|
44
|
+
UI_FORM_ADD: "Add {item}";
|
|
45
|
+
UI_FORM_ITEMS_COUNT: "{count} items";
|
|
46
|
+
UI_FORM_ERRORS_INSIDE_ONE: "{count} error inside";
|
|
47
|
+
UI_FORM_ERRORS_INSIDE: "{count} errors inside";
|
|
48
|
+
UI_FORM_NOT_SET: "Not set";
|
|
49
|
+
UI_FORM_CLICK_TO_EDIT: "Click to edit";
|
|
50
|
+
UI_FORM_UNSET: "Unset";
|
|
51
|
+
UI_FORM_UNSET_VALUE: "Unset value";
|
|
52
|
+
UI_FORM_UNSET_FIELD: "Unset {field}";
|
|
53
|
+
UI_FORM_CLEAR_FIELD: "Clear {field}";
|
|
54
|
+
UI_FORM_REMOVE_VALUE: "Remove {value}";
|
|
55
|
+
UI_FORM_NO_MATCHES: "No matches";
|
|
56
|
+
UI_FORM_NO_RESULTS: "No results";
|
|
57
|
+
UI_FORM_SWITCH: "Switch";
|
|
58
|
+
UI_FORM_SWITCH_TYPE: "Switch type — current: {type}";
|
|
59
|
+
UI_FORM_DECIMALS_OF: "decimals of {field}";
|
|
60
|
+
UI_FORM_HIDDEN_PLACEHOLDER: "(hidden — enter a value to replace)";
|
|
61
|
+
UI_FORM_TYPE_OBJECT: "Object";
|
|
62
|
+
UI_FORM_TYPE_STRING: "String";
|
|
63
|
+
UI_FORM_TYPE_NUMBER: "Number";
|
|
64
|
+
UI_FORM_TYPE_BOOLEAN: "Boolean";
|
|
65
|
+
UI_FORM_TYPE_ITEM: "Item";
|
|
66
|
+
UI_FORM_TYPE_ARRAY: "Array";
|
|
67
|
+
UI_FORM_TYPE_TUPLE: "Tuple";
|
|
68
|
+
UI_TABLE_VALUE: "Value";
|
|
69
|
+
UI_TABLE_ACTIONS: "Actions";
|
|
70
|
+
UI_TABLE_ROW_ACTIONS: "Row actions";
|
|
71
|
+
UI_TABLE_MORE_ACTIONS: "More actions";
|
|
72
|
+
UI_TABLE_MORE_ACTIONS_RUNNING: "More actions, running";
|
|
73
|
+
UI_TABLE_MORE_FILTERS: "More filters";
|
|
74
|
+
UI_TABLE_SELECT_ALL_ROWS: "Select all rows";
|
|
75
|
+
UI_TABLE_SELECT_ROW: "Select row";
|
|
76
|
+
UI_TABLE_SELECT_ROW_REASON: "Select row, {reason}";
|
|
77
|
+
UI_TABLE_SELECT_ROW_DISABLED: "Select row, not selectable";
|
|
78
|
+
UI_TABLE_SELECTED_PAGE_ONE: "The 1 row on this page is selected.";
|
|
79
|
+
UI_TABLE_SELECTED_PAGE: "All {count} rows on this page are selected.";
|
|
80
|
+
UI_TABLE_SELECTED_LOADED_ONE: "The 1 row loaded is selected.";
|
|
81
|
+
UI_TABLE_SELECTED_LOADED: "All {count} rows loaded are selected.";
|
|
82
|
+
UI_TABLE_SELECTED_MATCHING_ONE: "1 matching row is selected.";
|
|
83
|
+
UI_TABLE_SELECTED_MATCHING: "All {count} matching rows are selected.";
|
|
84
|
+
UI_TABLE_SELECT_ALL_MATCHING: "Select all {count} matching";
|
|
85
|
+
UI_TABLE_LOAD_FAILED: "Failed to load values";
|
|
86
|
+
UI_TABLE_NO_MATCHING: "No matching values";
|
|
87
|
+
UI_TABLE_NO_MATCH_SEARCH: "No entries match {term}. Try a different search.";
|
|
88
|
+
UI_TABLE_NO_MATCH_FILTERS: "No entries match the current filters.";
|
|
89
|
+
UI_TABLE_NO_ENTRIES: "No entries available";
|
|
90
|
+
UI_TABLE_CLEAR_FILTERS: "Clear filters";
|
|
91
|
+
UI_TABLE_RECORDS: "{count} records";
|
|
92
|
+
UI_TABLE_VIEW_ITEMS: "View {count} items";
|
|
93
|
+
UI_TABLE_VIEW_OBJECT: "View object";
|
|
94
|
+
UI_TABLE_ROWS_ONE: "{count} row";
|
|
95
|
+
UI_TABLE_ROWS: "{count} rows";
|
|
96
|
+
UI_TABLE_SORT: "Sort";
|
|
97
|
+
UI_TABLE_ASCENDING: "Ascending";
|
|
98
|
+
UI_TABLE_DESCENDING: "Descending";
|
|
99
|
+
UI_TABLE_FILTER_MENU: "Filter...";
|
|
100
|
+
UI_TABLE_RESET_WIDTH: "Reset width";
|
|
101
|
+
UI_TABLE_HIDE_COLUMN: "Hide column";
|
|
102
|
+
UI_TABLE_SETTINGS: "Table Settings";
|
|
103
|
+
UI_TABLE_SETTINGS_DESCRIPTION: "Choose which columns are visible, which fields appear in the filter bar, and the sort order of the table.";
|
|
104
|
+
UI_TABLE_COLUMNS: "Columns";
|
|
105
|
+
UI_TABLE_FILTERS: "Filters";
|
|
106
|
+
UI_TABLE_SORTERS: "Sorters";
|
|
107
|
+
UI_TABLE_CLIENT_SORTER: "client";
|
|
108
|
+
UI_TABLE_COLUMNS_VISIBLE: "{count} of {total} columns visible";
|
|
109
|
+
UI_TABLE_FILTERS_SHOWN: "{count} of {total} filterable columns shown as filter pills";
|
|
110
|
+
UI_TABLE_SORTERS_ACTIVE: "{count} of {total} sortable columns in effect";
|
|
111
|
+
UI_TABLE_COLUMNS_HINT: "Checked columns are rendered in the table. Drag rows to reorder.";
|
|
112
|
+
UI_TABLE_FILTERS_HINT: "Checked columns appear in the filter bar for quick filtering.";
|
|
113
|
+
UI_TABLE_SORTERS_HINT: "Rows are ordered by these fields, top-to-bottom.";
|
|
114
|
+
UI_TABLE_SORT_PRIORITY: "Sort priority {n}";
|
|
115
|
+
UI_TABLE_SORT_DIRECTION: "Sort direction";
|
|
116
|
+
UI_TABLE_ASC: "↑ Asc";
|
|
117
|
+
UI_TABLE_DESC: "↓ Desc";
|
|
118
|
+
UI_TABLE_LOCKED: "Locked";
|
|
119
|
+
UI_TABLE_NONE: "None";
|
|
120
|
+
UI_TABLE_MOVE_TOP: "Move to top";
|
|
121
|
+
UI_TABLE_MOVE_UP: "Move up";
|
|
122
|
+
UI_TABLE_MOVE_DOWN: "Move down";
|
|
123
|
+
UI_TABLE_MOVE_BOTTOM: "Move to bottom";
|
|
124
|
+
UI_FILTER_TITLE: "Filter";
|
|
125
|
+
UI_FILTER_DESCRIPTION: "Build the filter conditions applied to this column.";
|
|
126
|
+
UI_FILTER_VALUES: "Values";
|
|
127
|
+
UI_FILTER_CONDITIONS: "Conditions";
|
|
128
|
+
UI_FILTER_APPLIED_ONE: "{count} condition applied";
|
|
129
|
+
UI_FILTER_APPLIED: "{count} conditions applied";
|
|
130
|
+
UI_FILTER_SEE_ALL: "See All ({count})";
|
|
131
|
+
UI_FILTER_OPEN_DIALOG: "Open filter dialog (F4)";
|
|
132
|
+
UI_FILTER_DATE_PLACEHOLDER: "YYYY-MM-DD";
|
|
133
|
+
UI_FILTER_VALUE_PLACEHOLDER: "Value...";
|
|
134
|
+
UI_FILTER_FROM: "From";
|
|
135
|
+
UI_FILTER_TO: "To";
|
|
136
|
+
UI_FILTER_PICK_TIME: "Pick a time";
|
|
137
|
+
UI_FILTER_CLEAR_VALUE: "Clear value";
|
|
138
|
+
UI_FILTER_ADD_CONDITION: "+ Add condition";
|
|
139
|
+
UI_FILTER_REMOVE_CONDITION: "Remove condition";
|
|
140
|
+
UI_FILTER_QUICK: "Quick:";
|
|
141
|
+
UI_FILTER_SHOW_FILTERS: "Show filters";
|
|
142
|
+
UI_FILTER_HIDE_FILTERS: "Hide filters";
|
|
143
|
+
UI_FILTER_CUSTOM: "Custom filter";
|
|
144
|
+
UI_FILTER_REMOVE_CUSTOM: "Remove custom filter";
|
|
145
|
+
UI_FILTER_COND_EQ: "equals";
|
|
146
|
+
UI_FILTER_COND_NE: "not equals";
|
|
147
|
+
UI_FILTER_COND_GT: "greater than";
|
|
148
|
+
UI_FILTER_COND_GTE: "greater or equal";
|
|
149
|
+
UI_FILTER_COND_LT: "less than";
|
|
150
|
+
UI_FILTER_COND_LTE: "less or equal";
|
|
151
|
+
UI_FILTER_COND_CONTAINS: "contains";
|
|
152
|
+
UI_FILTER_COND_STARTS: "starts with";
|
|
153
|
+
UI_FILTER_COND_ENDS: "ends with";
|
|
154
|
+
UI_FILTER_COND_BW: "between";
|
|
155
|
+
UI_FILTER_COND_NULL: "is empty";
|
|
156
|
+
UI_FILTER_COND_NOT_NULL: "is not empty";
|
|
157
|
+
UI_FILTER_COND_REGEX: "matches pattern";
|
|
158
|
+
UI_FILTER_DATE_EQ: "on";
|
|
159
|
+
UI_FILTER_DATE_NE: "not on";
|
|
160
|
+
UI_FILTER_DATE_LT: "before";
|
|
161
|
+
UI_FILTER_DATE_LTE: "on or before";
|
|
162
|
+
UI_FILTER_DATE_GT: "after";
|
|
163
|
+
UI_FILTER_DATE_GTE: "on or after";
|
|
164
|
+
UI_FILTER_CHIP: "{field} {condition} {value}";
|
|
165
|
+
UI_FILTER_CHIP_EMPTY: "{field}: empty";
|
|
166
|
+
UI_FILTER_CHIP_NOT_EMPTY: "{field}: not empty";
|
|
167
|
+
UI_FILTER_CHIP_BETWEEN: "{field}: {from} – {to}";
|
|
168
|
+
UI_FILTER_CHIP_COUNT: "{field}: {count} conditions";
|
|
169
|
+
UI_FILTER_CHIP_IN: "{field} is one of {values}";
|
|
170
|
+
UI_FILTER_CHIP_NOT_IN: "{field} is none of {values}";
|
|
171
|
+
UI_FILTER_CHIP_SOME: "{field} has some ({filter})";
|
|
172
|
+
UI_FILTER_CHIP_NONE: "{field} has none ({filter})";
|
|
173
|
+
UI_FILTER_CHIP_ANY: "any";
|
|
174
|
+
UI_FILTER_CHIP_NOT: "not ({filter})";
|
|
175
|
+
UI_FILTER_AND: "and";
|
|
176
|
+
UI_FILTER_OR: "or";
|
|
177
|
+
UI_FILTER_EMPTY: "empty";
|
|
178
|
+
UI_FILTER_NOT_EMPTY: "not empty";
|
|
179
|
+
UI_FILTER_ON_DATE: "on {date}";
|
|
180
|
+
UI_FILTER_IN_MONTH: "in {date}";
|
|
181
|
+
UI_FILTER_NOT_ON_DATE: "not on {date}";
|
|
182
|
+
UI_FILTER_BEFORE_DATE: "before {date}";
|
|
183
|
+
UI_FILTER_ON_OR_BEFORE_DATE: "on or before {date}";
|
|
184
|
+
UI_FILTER_AFTER_DATE: "after {date}";
|
|
185
|
+
UI_FILTER_ON_OR_AFTER_DATE: "on or after {date}";
|
|
186
|
+
UI_FILTER_TODAY: "today";
|
|
187
|
+
UI_FILTER_YESTERDAY: "yesterday";
|
|
188
|
+
UI_FILTER_DAYS_AGO: "{count} days ago";
|
|
189
|
+
UI_FILTER_THIS_WEEK: "this week";
|
|
190
|
+
UI_FILTER_LAST_WEEK: "last week";
|
|
191
|
+
UI_FILTER_WEEKS_AGO: "{count} weeks ago";
|
|
192
|
+
UI_FILTER_THIS_MONTH: "this month";
|
|
193
|
+
UI_FILTER_LAST_MONTH: "last month";
|
|
194
|
+
UI_FILTER_MONTHS_AGO: "{count} months ago";
|
|
195
|
+
UI_FILTER_THIS_YEAR: "this year";
|
|
196
|
+
UI_FILTER_LAST_YEAR: "last year";
|
|
197
|
+
UI_FILTER_YEARS_AGO: "{count} years ago";
|
|
198
|
+
UI_DATE_TODAY: "Today";
|
|
199
|
+
UI_DATE_YESTERDAY: "Yesterday";
|
|
200
|
+
UI_DATE_LAST_7_DAYS: "Last 7 days";
|
|
201
|
+
UI_DATE_LAST_30_DAYS: "Last 30 days";
|
|
202
|
+
UI_DATE_THIS_WEEK: "This week";
|
|
203
|
+
UI_DATE_LAST_WEEK: "Last week";
|
|
204
|
+
UI_DATE_THIS_MONTH: "This month";
|
|
205
|
+
UI_DATE_LAST_MONTH: "Last month";
|
|
206
|
+
UI_DATE_THIS_YEAR: "This year";
|
|
207
|
+
UI_DATES_LAST_7_DAYS: "Last 7 Days";
|
|
208
|
+
UI_DATES_LAST_30_DAYS: "Last 30 Days";
|
|
209
|
+
UI_DATES_MONTH_TO_DATE: "Month to Date";
|
|
210
|
+
UI_DATES_LAST_90_DAYS: "Last 90 Days";
|
|
211
|
+
UI_DATES_LAST_6_MONTHS: "Last 6 Months";
|
|
212
|
+
UI_DATES_LAST_12_MONTHS: "Last 12 Months";
|
|
213
|
+
UI_DATES_YEAR_TO_DATE: "Year to Date";
|
|
214
|
+
UI_ACTION_DELETE: "Delete";
|
|
215
|
+
UI_ACTION_DELETE_ONE: "Delete item $1?";
|
|
216
|
+
UI_ACTION_DELETE_MANY: "Delete $N items?";
|
|
217
|
+
UI_ACTION_PROCEED: "Proceed";
|
|
218
|
+
UI_ACTION_NO_FORM: "Action does not declare an input form.";
|
|
219
|
+
UI_ACTION_PROVIDE_INPUT: "Provide the input for {action}.";
|
|
220
|
+
UI_ACTION_LOADING_FORM: "Loading form…";
|
|
221
|
+
UI_ACTION_MORE_IDS: "{count} more…";
|
|
222
|
+
UI_ACTION_AT_MOST: "At most {rows}";
|
|
223
|
+
UI_ACTION_QUERY_UNSUPPORTED: "Not available for all matching rows — select rows individually";
|
|
224
|
+
UI_ACTION_RUN_ON: "Run “{action}” on {rows}?";
|
|
225
|
+
UI_ACTION_TARGET_CHANGED: "The rows matching the query changed. {question}";
|
|
226
|
+
UI_PRESET_STANDARD: "Standard";
|
|
227
|
+
UI_PRESET_SYSTEM: "System";
|
|
228
|
+
UI_PRESET_MINE: "My presets";
|
|
229
|
+
UI_PRESET_FAVORITES: "Favorites";
|
|
230
|
+
UI_PRESET_SHARED: "Shared by others";
|
|
231
|
+
UI_PRESET_COPY_OF: "Copy of {name}";
|
|
232
|
+
UI_PRESET_SAVE_FAILED: "Could not save the preset.";
|
|
233
|
+
UI_PRESET_CHANGE_FAILED: "The change could not be saved.";
|
|
234
|
+
UI_PRESET_FIELDS_UNAVAILABLE: "Some fields in this preset aren't available to you.";
|
|
235
|
+
UI_PRESET_SAVE_AS: "Save as…";
|
|
236
|
+
UI_PRESET_RESET: "Reset changes";
|
|
237
|
+
UI_PRESET_MANAGE: "Manage presets…";
|
|
238
|
+
UI_PRESET_SAVE_AS_TITLE: "Save as new preset";
|
|
239
|
+
UI_PRESET_NAME: "Name";
|
|
240
|
+
UI_PRESET_SAVE_ASPECTS: "Save:";
|
|
241
|
+
UI_PRESET_RESIDUAL_NOT_SAVED: "Custom filter conditions are not saved with presets.";
|
|
242
|
+
UI_PRESET_MAKE_PUBLIC: "Make public";
|
|
243
|
+
UI_PRESET_ASPECT_COLUMNS: "Displayed Columns";
|
|
244
|
+
UI_PRESET_ASPECT_FILTERS: "Displayed Filters";
|
|
245
|
+
UI_PRESET_ASPECT_FILTER_OPS: "Filter conditions";
|
|
246
|
+
UI_PRESET_ASPECT_SORTERS: "Sorters";
|
|
247
|
+
UI_PRESET_ASPECT_PAGE_SIZE: "Page size";
|
|
248
|
+
UI_PRESET_DIALOG_TITLE: "Presets";
|
|
249
|
+
UI_PRESET_DIALOG_DESCRIPTION: "Rename, share, favorite, pin as default or delete your saved table views.";
|
|
250
|
+
UI_PRESET_SEARCH: "Search by name or owner…";
|
|
251
|
+
UI_PRESET_LEGEND_DEFAULT: "default";
|
|
252
|
+
UI_PRESET_LEGEND_FAVORITE: "favorite";
|
|
253
|
+
UI_PRESET_LEGEND_PUBLIC: "public";
|
|
254
|
+
UI_PRESET_LEGEND_DELETE: "delete";
|
|
255
|
+
UI_PRESET_NO_MATCH: "No presets match \"{query}\".";
|
|
256
|
+
UI_PRESET_OWNER_YOU: "you";
|
|
257
|
+
UI_PRESET_WILL_APPLY: "This preset will be applied";
|
|
258
|
+
UI_PRESET_CLICK_TO_APPLY: "Click to apply this preset on Save";
|
|
259
|
+
UI_PRESET_RENAME_PENDING: "Modified — click to keep editing";
|
|
260
|
+
UI_PRESET_CLICK_TO_RENAME: "Click to rename";
|
|
261
|
+
UI_PRESET_FAVORITED: "Favorited — click to remove";
|
|
262
|
+
UI_PRESET_CLICK_TO_FAVORITE: "Click to add to favorites";
|
|
263
|
+
UI_PRESET_DEFAULT: "Default — click to unpin";
|
|
264
|
+
UI_PRESET_CLICK_TO_PIN: "Click to pin as default";
|
|
265
|
+
UI_PRESET_PUBLIC: "Public — click to make private";
|
|
266
|
+
UI_PRESET_PRIVATE: "Private — click to make public";
|
|
267
|
+
UI_PRESET_SHARED_PUBLIC: "Public preset shared with everyone";
|
|
268
|
+
UI_PRESET_MARKED_DELETE: "Marked for deletion — click to undo";
|
|
269
|
+
UI_PRESET_MARK_DELETE: "Mark for deletion (applied on Save)";
|
|
270
|
+
UI_PRESET_UNSAVED: "unsaved changes";
|
|
271
|
+
UI_PRESET_SAVING: "Saving…";
|
|
272
|
+
UI_PRESET_CHANGES_FAILED: "{count} changes could not be saved.";
|
|
273
|
+
UI_AOOTH_COPY: "Copy";
|
|
274
|
+
UI_AOOTH_COPIED: "Copied";
|
|
275
|
+
UI_AOOTH_COPY_FAILED: "Copy failed — select and copy manually";
|
|
276
|
+
UI_AOOTH_QR_FAILED: "Failed to render QR code.";
|
|
277
|
+
UI_AOOTH_OR: "or";
|
|
278
|
+
UI_WF_STATUS_400: "The request was invalid. Please check your input and try again.";
|
|
279
|
+
UI_WF_STATUS_401: "You need to sign in to continue.";
|
|
280
|
+
UI_WF_STATUS_403: "You don't have permission to do that.";
|
|
281
|
+
UI_WF_STATUS_404: "We couldn't find what you're looking for.";
|
|
282
|
+
UI_WF_STATUS_408: "The request took too long. Please try again.";
|
|
283
|
+
UI_WF_STATUS_409: "There's a conflict with the current state. Please refresh and try again.";
|
|
284
|
+
UI_WF_STATUS_410: "This session has expired. Please start over.";
|
|
285
|
+
UI_WF_STATUS_422: "Some of the information you provided couldn't be processed.";
|
|
286
|
+
UI_WF_STATUS_423: "This account is temporarily locked. Please try again later.";
|
|
287
|
+
UI_WF_STATUS_429: "Too many requests. Please wait a moment and try again.";
|
|
288
|
+
UI_WF_STATUS_500: "Something went wrong on our end. Please try again in a moment.";
|
|
289
|
+
UI_WF_STATUS_502: "We're having trouble reaching the server. Please try again shortly.";
|
|
290
|
+
UI_WF_STATUS_503: "The service is temporarily unavailable. Please try again in a few minutes.";
|
|
291
|
+
UI_WF_STATUS_504: "The server took too long to respond. Please try again.";
|
|
292
|
+
UI_WF_REQUEST_FAILED: "Something went wrong with that request. Please try again.";
|
|
293
|
+
UI_WF_UNEXPECTED_RESPONSE: "Unexpected response from the server.";
|
|
294
|
+
UI_WF_UNEXPECTED_FORMAT: "Unexpected response format";
|
|
295
|
+
UI_WF_NETWORK_ERROR: "Network error";
|
|
296
|
+
UI_WF_REDIRECTING: "Redirecting…";
|
|
297
|
+
UI_WF_CONTINUING_IN: "Continuing in {seconds}…";
|
|
298
|
+
}>;
|
|
299
|
+
/** A code of {@link AS_UI_MESSAGES}. */
|
|
300
|
+
type AsUiMessageCode = keyof typeof AS_UI_MESSAGES;
|
|
301
|
+
//#endregion
|
|
302
|
+
export { AS_UI_MESSAGES, AsUiMessageCode };
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
//#region src/messages.ts
|
|
2
|
+
/**
|
|
3
|
+
* The built-in texts of the atscript-ui components, by code: `UI_*` code →
|
|
4
|
+
* English template with `{name}` placeholders. Imports nothing — a server
|
|
5
|
+
* registers it with moost's translation registry:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { registerMessages } from "moost";
|
|
9
|
+
* import { AS_UI_MESSAGES } from "@atscript/ui/messages";
|
|
10
|
+
*
|
|
11
|
+
* registerMessages(AS_UI_MESSAGES);
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* The client renders these texts in English unless the server served a
|
|
15
|
+
* translation for the locale (or your own translator returns one).
|
|
16
|
+
*/
|
|
17
|
+
const AS_UI_MESSAGES = Object.freeze({
|
|
18
|
+
UI_YES: "Yes",
|
|
19
|
+
UI_NO: "No",
|
|
20
|
+
UI_ITEM: "item",
|
|
21
|
+
UI_CANCEL: "Cancel",
|
|
22
|
+
UI_APPLY: "Apply",
|
|
23
|
+
UI_SAVE: "Save",
|
|
24
|
+
UI_CLOSE: "Close",
|
|
25
|
+
UI_CONFIRM: "Confirm",
|
|
26
|
+
UI_CONFIRMATION: "Confirmation",
|
|
27
|
+
UI_REMOVE: "Remove",
|
|
28
|
+
UI_CLEAR: "Clear",
|
|
29
|
+
UI_CLEAR_ALL: "Clear all",
|
|
30
|
+
UI_CLEAR_SELECTION: "Clear selection",
|
|
31
|
+
UI_SELECT_ALL: "Select all",
|
|
32
|
+
UI_SELECT_PLACEHOLDER: "Select...",
|
|
33
|
+
UI_SEARCH_PLACEHOLDER: "Search...",
|
|
34
|
+
UI_RESET: "Reset",
|
|
35
|
+
UI_RETRY: "Retry",
|
|
36
|
+
UI_ERROR: "Error",
|
|
37
|
+
UI_MORE: "+{count} more",
|
|
38
|
+
UI_INVALID_VALUE: "Invalid value",
|
|
39
|
+
UI_VALIDATION_FAILED: "Validation failed",
|
|
40
|
+
UI_FORM_SUBMIT: "Submit",
|
|
41
|
+
UI_FORM_DISMISS: "Dismiss",
|
|
42
|
+
UI_FORM_MODIFIED: "Modified",
|
|
43
|
+
UI_FORM_WRONG_VALUE: "Wrong value",
|
|
44
|
+
UI_FORM_ADD: "Add {item}",
|
|
45
|
+
UI_FORM_ITEMS_COUNT: "{count} items",
|
|
46
|
+
UI_FORM_ERRORS_INSIDE_ONE: "{count} error inside",
|
|
47
|
+
UI_FORM_ERRORS_INSIDE: "{count} errors inside",
|
|
48
|
+
UI_FORM_NOT_SET: "Not set",
|
|
49
|
+
UI_FORM_CLICK_TO_EDIT: "Click to edit",
|
|
50
|
+
UI_FORM_UNSET: "Unset",
|
|
51
|
+
UI_FORM_UNSET_VALUE: "Unset value",
|
|
52
|
+
UI_FORM_UNSET_FIELD: "Unset {field}",
|
|
53
|
+
UI_FORM_CLEAR_FIELD: "Clear {field}",
|
|
54
|
+
UI_FORM_REMOVE_VALUE: "Remove {value}",
|
|
55
|
+
UI_FORM_NO_MATCHES: "No matches",
|
|
56
|
+
UI_FORM_NO_RESULTS: "No results",
|
|
57
|
+
UI_FORM_SWITCH: "Switch",
|
|
58
|
+
UI_FORM_SWITCH_TYPE: "Switch type — current: {type}",
|
|
59
|
+
UI_FORM_DECIMALS_OF: "decimals of {field}",
|
|
60
|
+
UI_FORM_HIDDEN_PLACEHOLDER: "(hidden — enter a value to replace)",
|
|
61
|
+
UI_FORM_TYPE_OBJECT: "Object",
|
|
62
|
+
UI_FORM_TYPE_STRING: "String",
|
|
63
|
+
UI_FORM_TYPE_NUMBER: "Number",
|
|
64
|
+
UI_FORM_TYPE_BOOLEAN: "Boolean",
|
|
65
|
+
UI_FORM_TYPE_ITEM: "Item",
|
|
66
|
+
UI_FORM_TYPE_ARRAY: "Array",
|
|
67
|
+
UI_FORM_TYPE_TUPLE: "Tuple",
|
|
68
|
+
UI_TABLE_VALUE: "Value",
|
|
69
|
+
UI_TABLE_ACTIONS: "Actions",
|
|
70
|
+
UI_TABLE_ROW_ACTIONS: "Row actions",
|
|
71
|
+
UI_TABLE_MORE_ACTIONS: "More actions",
|
|
72
|
+
UI_TABLE_MORE_ACTIONS_RUNNING: "More actions, running",
|
|
73
|
+
UI_TABLE_MORE_FILTERS: "More filters",
|
|
74
|
+
UI_TABLE_SELECT_ALL_ROWS: "Select all rows",
|
|
75
|
+
UI_TABLE_SELECT_ROW: "Select row",
|
|
76
|
+
UI_TABLE_SELECT_ROW_REASON: "Select row, {reason}",
|
|
77
|
+
UI_TABLE_SELECT_ROW_DISABLED: "Select row, not selectable",
|
|
78
|
+
UI_TABLE_SELECTED_PAGE_ONE: "The 1 row on this page is selected.",
|
|
79
|
+
UI_TABLE_SELECTED_PAGE: "All {count} rows on this page are selected.",
|
|
80
|
+
UI_TABLE_SELECTED_LOADED_ONE: "The 1 row loaded is selected.",
|
|
81
|
+
UI_TABLE_SELECTED_LOADED: "All {count} rows loaded are selected.",
|
|
82
|
+
UI_TABLE_SELECTED_MATCHING_ONE: "1 matching row is selected.",
|
|
83
|
+
UI_TABLE_SELECTED_MATCHING: "All {count} matching rows are selected.",
|
|
84
|
+
UI_TABLE_SELECT_ALL_MATCHING: "Select all {count} matching",
|
|
85
|
+
UI_TABLE_LOAD_FAILED: "Failed to load values",
|
|
86
|
+
UI_TABLE_NO_MATCHING: "No matching values",
|
|
87
|
+
UI_TABLE_NO_MATCH_SEARCH: "No entries match {term}. Try a different search.",
|
|
88
|
+
UI_TABLE_NO_MATCH_FILTERS: "No entries match the current filters.",
|
|
89
|
+
UI_TABLE_NO_ENTRIES: "No entries available",
|
|
90
|
+
UI_TABLE_CLEAR_FILTERS: "Clear filters",
|
|
91
|
+
UI_TABLE_RECORDS: "{count} records",
|
|
92
|
+
UI_TABLE_VIEW_ITEMS: "View {count} items",
|
|
93
|
+
UI_TABLE_VIEW_OBJECT: "View object",
|
|
94
|
+
UI_TABLE_ROWS_ONE: "{count} row",
|
|
95
|
+
UI_TABLE_ROWS: "{count} rows",
|
|
96
|
+
UI_TABLE_SORT: "Sort",
|
|
97
|
+
UI_TABLE_ASCENDING: "Ascending",
|
|
98
|
+
UI_TABLE_DESCENDING: "Descending",
|
|
99
|
+
UI_TABLE_FILTER_MENU: "Filter...",
|
|
100
|
+
UI_TABLE_RESET_WIDTH: "Reset width",
|
|
101
|
+
UI_TABLE_HIDE_COLUMN: "Hide column",
|
|
102
|
+
UI_TABLE_SETTINGS: "Table Settings",
|
|
103
|
+
UI_TABLE_SETTINGS_DESCRIPTION: "Choose which columns are visible, which fields appear in the filter bar, and the sort order of the table.",
|
|
104
|
+
UI_TABLE_COLUMNS: "Columns",
|
|
105
|
+
UI_TABLE_FILTERS: "Filters",
|
|
106
|
+
UI_TABLE_SORTERS: "Sorters",
|
|
107
|
+
UI_TABLE_CLIENT_SORTER: "client",
|
|
108
|
+
UI_TABLE_COLUMNS_VISIBLE: "{count} of {total} columns visible",
|
|
109
|
+
UI_TABLE_FILTERS_SHOWN: "{count} of {total} filterable columns shown as filter pills",
|
|
110
|
+
UI_TABLE_SORTERS_ACTIVE: "{count} of {total} sortable columns in effect",
|
|
111
|
+
UI_TABLE_COLUMNS_HINT: "Checked columns are rendered in the table. Drag rows to reorder.",
|
|
112
|
+
UI_TABLE_FILTERS_HINT: "Checked columns appear in the filter bar for quick filtering.",
|
|
113
|
+
UI_TABLE_SORTERS_HINT: "Rows are ordered by these fields, top-to-bottom.",
|
|
114
|
+
UI_TABLE_SORT_PRIORITY: "Sort priority {n}",
|
|
115
|
+
UI_TABLE_SORT_DIRECTION: "Sort direction",
|
|
116
|
+
UI_TABLE_ASC: "↑ Asc",
|
|
117
|
+
UI_TABLE_DESC: "↓ Desc",
|
|
118
|
+
UI_TABLE_LOCKED: "Locked",
|
|
119
|
+
UI_TABLE_NONE: "None",
|
|
120
|
+
UI_TABLE_MOVE_TOP: "Move to top",
|
|
121
|
+
UI_TABLE_MOVE_UP: "Move up",
|
|
122
|
+
UI_TABLE_MOVE_DOWN: "Move down",
|
|
123
|
+
UI_TABLE_MOVE_BOTTOM: "Move to bottom",
|
|
124
|
+
UI_FILTER_TITLE: "Filter",
|
|
125
|
+
UI_FILTER_DESCRIPTION: "Build the filter conditions applied to this column.",
|
|
126
|
+
UI_FILTER_VALUES: "Values",
|
|
127
|
+
UI_FILTER_CONDITIONS: "Conditions",
|
|
128
|
+
UI_FILTER_APPLIED_ONE: "{count} condition applied",
|
|
129
|
+
UI_FILTER_APPLIED: "{count} conditions applied",
|
|
130
|
+
UI_FILTER_SEE_ALL: "See All ({count})",
|
|
131
|
+
UI_FILTER_OPEN_DIALOG: "Open filter dialog (F4)",
|
|
132
|
+
UI_FILTER_DATE_PLACEHOLDER: "YYYY-MM-DD",
|
|
133
|
+
UI_FILTER_VALUE_PLACEHOLDER: "Value...",
|
|
134
|
+
UI_FILTER_FROM: "From",
|
|
135
|
+
UI_FILTER_TO: "To",
|
|
136
|
+
UI_FILTER_PICK_TIME: "Pick a time",
|
|
137
|
+
UI_FILTER_CLEAR_VALUE: "Clear value",
|
|
138
|
+
UI_FILTER_ADD_CONDITION: "+ Add condition",
|
|
139
|
+
UI_FILTER_REMOVE_CONDITION: "Remove condition",
|
|
140
|
+
UI_FILTER_QUICK: "Quick:",
|
|
141
|
+
UI_FILTER_SHOW_FILTERS: "Show filters",
|
|
142
|
+
UI_FILTER_HIDE_FILTERS: "Hide filters",
|
|
143
|
+
UI_FILTER_CUSTOM: "Custom filter",
|
|
144
|
+
UI_FILTER_REMOVE_CUSTOM: "Remove custom filter",
|
|
145
|
+
UI_FILTER_COND_EQ: "equals",
|
|
146
|
+
UI_FILTER_COND_NE: "not equals",
|
|
147
|
+
UI_FILTER_COND_GT: "greater than",
|
|
148
|
+
UI_FILTER_COND_GTE: "greater or equal",
|
|
149
|
+
UI_FILTER_COND_LT: "less than",
|
|
150
|
+
UI_FILTER_COND_LTE: "less or equal",
|
|
151
|
+
UI_FILTER_COND_CONTAINS: "contains",
|
|
152
|
+
UI_FILTER_COND_STARTS: "starts with",
|
|
153
|
+
UI_FILTER_COND_ENDS: "ends with",
|
|
154
|
+
UI_FILTER_COND_BW: "between",
|
|
155
|
+
UI_FILTER_COND_NULL: "is empty",
|
|
156
|
+
UI_FILTER_COND_NOT_NULL: "is not empty",
|
|
157
|
+
UI_FILTER_COND_REGEX: "matches pattern",
|
|
158
|
+
UI_FILTER_DATE_EQ: "on",
|
|
159
|
+
UI_FILTER_DATE_NE: "not on",
|
|
160
|
+
UI_FILTER_DATE_LT: "before",
|
|
161
|
+
UI_FILTER_DATE_LTE: "on or before",
|
|
162
|
+
UI_FILTER_DATE_GT: "after",
|
|
163
|
+
UI_FILTER_DATE_GTE: "on or after",
|
|
164
|
+
UI_FILTER_CHIP: "{field} {condition} {value}",
|
|
165
|
+
UI_FILTER_CHIP_EMPTY: "{field}: empty",
|
|
166
|
+
UI_FILTER_CHIP_NOT_EMPTY: "{field}: not empty",
|
|
167
|
+
UI_FILTER_CHIP_BETWEEN: "{field}: {from} – {to}",
|
|
168
|
+
UI_FILTER_CHIP_COUNT: "{field}: {count} conditions",
|
|
169
|
+
UI_FILTER_CHIP_IN: "{field} is one of {values}",
|
|
170
|
+
UI_FILTER_CHIP_NOT_IN: "{field} is none of {values}",
|
|
171
|
+
UI_FILTER_CHIP_SOME: "{field} has some ({filter})",
|
|
172
|
+
UI_FILTER_CHIP_NONE: "{field} has none ({filter})",
|
|
173
|
+
UI_FILTER_CHIP_ANY: "any",
|
|
174
|
+
UI_FILTER_CHIP_NOT: "not ({filter})",
|
|
175
|
+
UI_FILTER_AND: "and",
|
|
176
|
+
UI_FILTER_OR: "or",
|
|
177
|
+
UI_FILTER_EMPTY: "empty",
|
|
178
|
+
UI_FILTER_NOT_EMPTY: "not empty",
|
|
179
|
+
UI_FILTER_ON_DATE: "on {date}",
|
|
180
|
+
UI_FILTER_IN_MONTH: "in {date}",
|
|
181
|
+
UI_FILTER_NOT_ON_DATE: "not on {date}",
|
|
182
|
+
UI_FILTER_BEFORE_DATE: "before {date}",
|
|
183
|
+
UI_FILTER_ON_OR_BEFORE_DATE: "on or before {date}",
|
|
184
|
+
UI_FILTER_AFTER_DATE: "after {date}",
|
|
185
|
+
UI_FILTER_ON_OR_AFTER_DATE: "on or after {date}",
|
|
186
|
+
UI_FILTER_TODAY: "today",
|
|
187
|
+
UI_FILTER_YESTERDAY: "yesterday",
|
|
188
|
+
UI_FILTER_DAYS_AGO: "{count} days ago",
|
|
189
|
+
UI_FILTER_THIS_WEEK: "this week",
|
|
190
|
+
UI_FILTER_LAST_WEEK: "last week",
|
|
191
|
+
UI_FILTER_WEEKS_AGO: "{count} weeks ago",
|
|
192
|
+
UI_FILTER_THIS_MONTH: "this month",
|
|
193
|
+
UI_FILTER_LAST_MONTH: "last month",
|
|
194
|
+
UI_FILTER_MONTHS_AGO: "{count} months ago",
|
|
195
|
+
UI_FILTER_THIS_YEAR: "this year",
|
|
196
|
+
UI_FILTER_LAST_YEAR: "last year",
|
|
197
|
+
UI_FILTER_YEARS_AGO: "{count} years ago",
|
|
198
|
+
UI_DATE_TODAY: "Today",
|
|
199
|
+
UI_DATE_YESTERDAY: "Yesterday",
|
|
200
|
+
UI_DATE_LAST_7_DAYS: "Last 7 days",
|
|
201
|
+
UI_DATE_LAST_30_DAYS: "Last 30 days",
|
|
202
|
+
UI_DATE_THIS_WEEK: "This week",
|
|
203
|
+
UI_DATE_LAST_WEEK: "Last week",
|
|
204
|
+
UI_DATE_THIS_MONTH: "This month",
|
|
205
|
+
UI_DATE_LAST_MONTH: "Last month",
|
|
206
|
+
UI_DATE_THIS_YEAR: "This year",
|
|
207
|
+
UI_DATES_LAST_7_DAYS: "Last 7 Days",
|
|
208
|
+
UI_DATES_LAST_30_DAYS: "Last 30 Days",
|
|
209
|
+
UI_DATES_MONTH_TO_DATE: "Month to Date",
|
|
210
|
+
UI_DATES_LAST_90_DAYS: "Last 90 Days",
|
|
211
|
+
UI_DATES_LAST_6_MONTHS: "Last 6 Months",
|
|
212
|
+
UI_DATES_LAST_12_MONTHS: "Last 12 Months",
|
|
213
|
+
UI_DATES_YEAR_TO_DATE: "Year to Date",
|
|
214
|
+
UI_ACTION_DELETE: "Delete",
|
|
215
|
+
UI_ACTION_DELETE_ONE: "Delete item $1?",
|
|
216
|
+
UI_ACTION_DELETE_MANY: "Delete $N items?",
|
|
217
|
+
UI_ACTION_PROCEED: "Proceed",
|
|
218
|
+
UI_ACTION_NO_FORM: "Action does not declare an input form.",
|
|
219
|
+
UI_ACTION_PROVIDE_INPUT: "Provide the input for {action}.",
|
|
220
|
+
UI_ACTION_LOADING_FORM: "Loading form…",
|
|
221
|
+
UI_ACTION_MORE_IDS: "{count} more…",
|
|
222
|
+
UI_ACTION_AT_MOST: "At most {rows}",
|
|
223
|
+
UI_ACTION_QUERY_UNSUPPORTED: "Not available for all matching rows — select rows individually",
|
|
224
|
+
UI_ACTION_RUN_ON: "Run “{action}” on {rows}?",
|
|
225
|
+
UI_ACTION_TARGET_CHANGED: "The rows matching the query changed. {question}",
|
|
226
|
+
UI_PRESET_STANDARD: "Standard",
|
|
227
|
+
UI_PRESET_SYSTEM: "System",
|
|
228
|
+
UI_PRESET_MINE: "My presets",
|
|
229
|
+
UI_PRESET_FAVORITES: "Favorites",
|
|
230
|
+
UI_PRESET_SHARED: "Shared by others",
|
|
231
|
+
UI_PRESET_COPY_OF: "Copy of {name}",
|
|
232
|
+
UI_PRESET_SAVE_FAILED: "Could not save the preset.",
|
|
233
|
+
UI_PRESET_CHANGE_FAILED: "The change could not be saved.",
|
|
234
|
+
UI_PRESET_FIELDS_UNAVAILABLE: "Some fields in this preset aren't available to you.",
|
|
235
|
+
UI_PRESET_SAVE_AS: "Save as…",
|
|
236
|
+
UI_PRESET_RESET: "Reset changes",
|
|
237
|
+
UI_PRESET_MANAGE: "Manage presets…",
|
|
238
|
+
UI_PRESET_SAVE_AS_TITLE: "Save as new preset",
|
|
239
|
+
UI_PRESET_NAME: "Name",
|
|
240
|
+
UI_PRESET_SAVE_ASPECTS: "Save:",
|
|
241
|
+
UI_PRESET_RESIDUAL_NOT_SAVED: "Custom filter conditions are not saved with presets.",
|
|
242
|
+
UI_PRESET_MAKE_PUBLIC: "Make public",
|
|
243
|
+
UI_PRESET_ASPECT_COLUMNS: "Displayed Columns",
|
|
244
|
+
UI_PRESET_ASPECT_FILTERS: "Displayed Filters",
|
|
245
|
+
UI_PRESET_ASPECT_FILTER_OPS: "Filter conditions",
|
|
246
|
+
UI_PRESET_ASPECT_SORTERS: "Sorters",
|
|
247
|
+
UI_PRESET_ASPECT_PAGE_SIZE: "Page size",
|
|
248
|
+
UI_PRESET_DIALOG_TITLE: "Presets",
|
|
249
|
+
UI_PRESET_DIALOG_DESCRIPTION: "Rename, share, favorite, pin as default or delete your saved table views.",
|
|
250
|
+
UI_PRESET_SEARCH: "Search by name or owner…",
|
|
251
|
+
UI_PRESET_LEGEND_DEFAULT: "default",
|
|
252
|
+
UI_PRESET_LEGEND_FAVORITE: "favorite",
|
|
253
|
+
UI_PRESET_LEGEND_PUBLIC: "public",
|
|
254
|
+
UI_PRESET_LEGEND_DELETE: "delete",
|
|
255
|
+
UI_PRESET_NO_MATCH: "No presets match \"{query}\".",
|
|
256
|
+
UI_PRESET_OWNER_YOU: "you",
|
|
257
|
+
UI_PRESET_WILL_APPLY: "This preset will be applied",
|
|
258
|
+
UI_PRESET_CLICK_TO_APPLY: "Click to apply this preset on Save",
|
|
259
|
+
UI_PRESET_RENAME_PENDING: "Modified — click to keep editing",
|
|
260
|
+
UI_PRESET_CLICK_TO_RENAME: "Click to rename",
|
|
261
|
+
UI_PRESET_FAVORITED: "Favorited — click to remove",
|
|
262
|
+
UI_PRESET_CLICK_TO_FAVORITE: "Click to add to favorites",
|
|
263
|
+
UI_PRESET_DEFAULT: "Default — click to unpin",
|
|
264
|
+
UI_PRESET_CLICK_TO_PIN: "Click to pin as default",
|
|
265
|
+
UI_PRESET_PUBLIC: "Public — click to make private",
|
|
266
|
+
UI_PRESET_PRIVATE: "Private — click to make public",
|
|
267
|
+
UI_PRESET_SHARED_PUBLIC: "Public preset shared with everyone",
|
|
268
|
+
UI_PRESET_MARKED_DELETE: "Marked for deletion — click to undo",
|
|
269
|
+
UI_PRESET_MARK_DELETE: "Mark for deletion (applied on Save)",
|
|
270
|
+
UI_PRESET_UNSAVED: "unsaved changes",
|
|
271
|
+
UI_PRESET_SAVING: "Saving…",
|
|
272
|
+
UI_PRESET_CHANGES_FAILED: "{count} changes could not be saved.",
|
|
273
|
+
UI_AOOTH_COPY: "Copy",
|
|
274
|
+
UI_AOOTH_COPIED: "Copied",
|
|
275
|
+
UI_AOOTH_COPY_FAILED: "Copy failed — select and copy manually",
|
|
276
|
+
UI_AOOTH_QR_FAILED: "Failed to render QR code.",
|
|
277
|
+
UI_AOOTH_OR: "or",
|
|
278
|
+
UI_WF_STATUS_400: "The request was invalid. Please check your input and try again.",
|
|
279
|
+
UI_WF_STATUS_401: "You need to sign in to continue.",
|
|
280
|
+
UI_WF_STATUS_403: "You don't have permission to do that.",
|
|
281
|
+
UI_WF_STATUS_404: "We couldn't find what you're looking for.",
|
|
282
|
+
UI_WF_STATUS_408: "The request took too long. Please try again.",
|
|
283
|
+
UI_WF_STATUS_409: "There's a conflict with the current state. Please refresh and try again.",
|
|
284
|
+
UI_WF_STATUS_410: "This session has expired. Please start over.",
|
|
285
|
+
UI_WF_STATUS_422: "Some of the information you provided couldn't be processed.",
|
|
286
|
+
UI_WF_STATUS_423: "This account is temporarily locked. Please try again later.",
|
|
287
|
+
UI_WF_STATUS_429: "Too many requests. Please wait a moment and try again.",
|
|
288
|
+
UI_WF_STATUS_500: "Something went wrong on our end. Please try again in a moment.",
|
|
289
|
+
UI_WF_STATUS_502: "We're having trouble reaching the server. Please try again shortly.",
|
|
290
|
+
UI_WF_STATUS_503: "The service is temporarily unavailable. Please try again in a few minutes.",
|
|
291
|
+
UI_WF_STATUS_504: "The server took too long to respond. Please try again.",
|
|
292
|
+
UI_WF_REQUEST_FAILED: "Something went wrong with that request. Please try again.",
|
|
293
|
+
UI_WF_UNEXPECTED_RESPONSE: "Unexpected response from the server.",
|
|
294
|
+
UI_WF_UNEXPECTED_FORMAT: "Unexpected response format",
|
|
295
|
+
UI_WF_NETWORK_ERROR: "Network error",
|
|
296
|
+
UI_WF_REDIRECTING: "Redirecting…",
|
|
297
|
+
UI_WF_CONTINUING_IN: "Continuing in {seconds}…"
|
|
298
|
+
});
|
|
299
|
+
//#endregion
|
|
300
|
+
export { AS_UI_MESSAGES };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const require_annotation_keys = require("../shared/annotation-keys.cjs");
|
|
2
|
+
const require_field_resolver = require("../shared/field-resolver.cjs");
|
|
3
|
+
const require_str = require("../shared/str.cjs");
|
|
4
|
+
//#region src/nav/model-routes.ts
|
|
5
|
+
/**
|
|
6
|
+
* Derives navigable routes from DB-backed models' metadata.
|
|
7
|
+
*
|
|
8
|
+
* A model is included only when it is a DB entity (`@db.table`, `@db.view`,
|
|
9
|
+
* or `@db.view.for`) AND a path can be derived: `@db.http.path` first, then
|
|
10
|
+
* the string value of `@db.table` / `@db.view`, then the type's own id
|
|
11
|
+
* as-is. Models where none of these yield a non-empty path are omitted.
|
|
12
|
+
*
|
|
13
|
+
* Routes are sorted by `order` ascending (undefined last, ties keep input
|
|
14
|
+
* order). Hidden models are returned with `hidden: true` — filtering and
|
|
15
|
+
* grouping are left to the consumer.
|
|
16
|
+
*/
|
|
17
|
+
function buildModelRoutes(models) {
|
|
18
|
+
const routes = [];
|
|
19
|
+
for (const model of models) {
|
|
20
|
+
const table = require_field_resolver.getFieldMeta(model, require_annotation_keys.DB_TABLE);
|
|
21
|
+
const view = require_field_resolver.getFieldMeta(model, require_annotation_keys.DB_VIEW);
|
|
22
|
+
const isView = view !== void 0 || require_field_resolver.hasFieldMeta(model, "db.view.for");
|
|
23
|
+
if (table === void 0 && !isView) continue;
|
|
24
|
+
const path = resolvePath(model, table, view);
|
|
25
|
+
if (path === void 0) continue;
|
|
26
|
+
const route = {
|
|
27
|
+
model,
|
|
28
|
+
path,
|
|
29
|
+
label: require_field_resolver.getFieldMeta(model, "meta.label") ?? require_str.humanizePath(path.slice(path.lastIndexOf("/") + 1)),
|
|
30
|
+
kind: isView ? "view" : "table"
|
|
31
|
+
};
|
|
32
|
+
const group = require_field_resolver.getFieldMeta(model, require_annotation_keys.UI_NAV_GROUP);
|
|
33
|
+
if (typeof group === "string") route.group = group;
|
|
34
|
+
const order = require_field_resolver.getFieldMeta(model, require_annotation_keys.UI_NAV_ORDER);
|
|
35
|
+
if (typeof order === "number") route.order = order;
|
|
36
|
+
if (require_field_resolver.getFieldMeta(model, "ui.nav.hidden") === true) route.hidden = true;
|
|
37
|
+
routes.push(route);
|
|
38
|
+
}
|
|
39
|
+
routes.sort((a, b) => {
|
|
40
|
+
const ao = a.order ?? Number.POSITIVE_INFINITY;
|
|
41
|
+
const bo = b.order ?? Number.POSITIVE_INFINITY;
|
|
42
|
+
return ao === bo ? 0 : ao - bo;
|
|
43
|
+
});
|
|
44
|
+
return routes;
|
|
45
|
+
}
|
|
46
|
+
/** `db.http.path` > string `db.table`/`db.view` name > type id — mirrors moost-db's controller prefix resolution, so the path matches the HTTP mount of a token-bound controller. */
|
|
47
|
+
function resolvePath(model, table, view) {
|
|
48
|
+
const http = require_field_resolver.getFieldMeta(model, require_annotation_keys.DB_HTTP_PATH);
|
|
49
|
+
let raw;
|
|
50
|
+
if (typeof http === "string") raw = http;
|
|
51
|
+
else if (typeof table === "string") raw = table;
|
|
52
|
+
else if (typeof view === "string") raw = view;
|
|
53
|
+
else if (typeof model.id === "string") raw = model.id;
|
|
54
|
+
if (!raw) return void 0;
|
|
55
|
+
const path = raw.replace(/^\/+|\/+$/g, "");
|
|
56
|
+
return path.length > 0 ? path : void 0;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
exports.buildModelRoutes = buildModelRoutes;
|