viewkitjs 0.35.0 → 0.37.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/CHANGELOG.md +112 -0
- package/MIGRATION.md +7 -0
- package/package.json +1 -1
- package/views/dist/atoms/types.d.ts +32 -4
- package/views/dist/contract.d.ts +32 -9
- package/views/dist/contract.js +35 -1
- package/views/dist/controls/avatar/avatar.d.ts +3 -1
- package/views/dist/controls/avatar/avatar.js +2 -2
- package/views/dist/controls/button/own-look-moved.d.ts +11 -0
- package/views/dist/controls/button/own-look-moved.js +3 -0
- package/views/dist/controls/compound-editor/map-parts-body.js +2 -0
- package/views/dist/controls/compound-editor/name-parts.js +1 -1
- package/views/dist/controls/compound-editor/place-parts.js +1 -1
- package/views/dist/controls/compound-editor/range-parts.js +1 -1
- package/views/dist/controls/compound-editor/words.d.ts +3 -0
- package/views/dist/controls/compound-editor/words.js +2 -0
- package/views/dist/controls/customize/customize.d.ts +10 -3
- package/views/dist/controls/customize/customize.js +147 -63
- package/views/dist/controls/customize/items.d.ts +49 -0
- package/views/dist/controls/customize/items.js +104 -0
- package/views/dist/controls/customize/map-customize-body.js +7 -4
- package/views/dist/controls/customize/words.d.ts +2 -0
- package/views/dist/controls/customize/words.js +1 -0
- package/views/dist/controls/date-editor/date-behaviour.d.ts +80 -0
- package/views/dist/controls/date-editor/date-behaviour.js +187 -0
- package/views/dist/controls/date-editor/date-editor.d.ts +3 -2
- package/views/dist/controls/date-editor/date-editor.js +29 -166
- package/views/dist/controls/field/field.d.ts +3 -2
- package/views/dist/controls/field/field.js +7 -2
- package/views/dist/controls/field/looks.d.ts +1 -1
- package/views/dist/controls/field/looks.js +5 -4
- package/views/dist/controls/field.css +4 -0
- package/views/dist/controls/filter-editor/block.js +5 -2
- package/views/dist/controls/filter-editor/filter-editor.d.ts +14 -1
- package/views/dist/controls/filter-editor/filter-editor.js +21 -13
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +3 -2
- package/views/dist/controls/filter-editor/map-filter-body.js +16 -2
- package/views/dist/controls/filter-editor/map-rules.d.ts +9 -2
- package/views/dist/controls/filter-editor/map-rules.js +18 -13
- package/views/dist/controls/filter-editor/parts.d.ts +2 -0
- package/views/dist/controls/filter-editor/parts.js +13 -12
- package/views/dist/controls/filter-editor/rules.d.ts +4 -4
- package/views/dist/controls/filter-editor/rules.js +6 -3
- package/views/dist/controls/filter-editor/words.d.ts +2 -0
- package/views/dist/controls/filter-editor/words.js +1 -0
- package/views/dist/controls/group-editor/group-editor.d.ts +3 -0
- package/views/dist/controls/group-editor/group-editor.js +21 -15
- package/views/dist/controls/group-editor/map-group-body.js +1 -0
- package/views/dist/controls/index.d.ts +4 -2
- package/views/dist/controls/index.js +3 -1
- package/views/dist/controls/inline-input.css +9 -0
- package/views/dist/controls/internal/kit-words.d.ts +11 -0
- package/views/dist/controls/internal/kit-words.js +7 -0
- package/views/dist/controls/internal/map-panel-controls.d.ts +4 -1
- package/views/dist/controls/internal/map-panel-controls.js +14 -1
- package/views/dist/controls/internal/menu-items.d.ts +9 -0
- package/views/dist/controls/internal/menu-items.js +97 -0
- package/views/dist/controls/internal/panel-controls.js +1 -1
- package/views/dist/controls/internal/phone.d.ts +1 -1
- package/views/dist/controls/internal/phone.js +3 -2
- package/views/dist/controls/list/tokens.d.ts +1 -1
- package/views/dist/controls/list/tokens.js +1 -1
- package/views/dist/controls/list.css +5 -2
- package/views/dist/controls/menu/menu.d.ts +1 -1
- package/views/dist/controls/menu/menu.js +1 -1
- package/views/dist/controls/menu-list/menu-list.js +3 -2
- package/views/dist/controls/menu.css +4 -4
- package/views/dist/controls/number-editor/map-number-body.js +2 -0
- package/views/dist/controls/number-editor/number-editor.js +1 -1
- package/views/dist/controls/number-editor/words.d.ts +3 -0
- package/views/dist/controls/number-editor/words.js +2 -0
- package/views/dist/controls/pane.css +1 -1
- package/views/dist/controls/picker/fields-frame.d.ts +5 -0
- package/views/dist/controls/picker/fields-frame.js +30 -0
- package/views/dist/controls/picker/map-fields-body.js +3 -26
- package/views/dist/controls/picker/map-picker.d.ts +2 -1
- package/views/dist/controls/picker/map-picker.js +4 -2
- package/views/dist/controls/picker/picker.js +9 -2
- package/views/dist/controls/picker/rows.d.ts +3 -1
- package/views/dist/controls/picker.css +7 -3
- package/views/dist/controls/popover/looks.d.ts +1 -1
- package/views/dist/controls/popover/looks.js +5 -0
- package/views/dist/controls/popover/tokens.d.ts +13 -1
- package/views/dist/controls/popover/tokens.js +4 -1
- package/views/dist/controls/popover.css +59 -8
- package/views/dist/controls/select/map-select.d.ts +1 -1
- package/views/dist/controls/select/map-select.js +4 -1
- package/views/dist/controls/select/select.d.ts +2 -0
- package/views/dist/controls/select/select.js +4 -2
- package/views/dist/controls/sheet/bottom-sheet.d.ts +6 -1
- package/views/dist/controls/sheet/bottom-sheet.js +3 -3
- package/views/dist/controls/sort-editor/map-sort-body.js +1 -0
- package/views/dist/controls/sort-editor/sort-editor.d.ts +3 -1
- package/views/dist/controls/sort-editor/sort-editor.js +6 -4
- package/views/dist/controls/sort-editor.css +4 -2
- package/views/dist/controls/tag/tag.js +4 -2
- package/views/dist/controls/text-editor/map-text-body.js +4 -1
- package/views/dist/controls/text-editor/text-editor.js +2 -2
- package/views/dist/controls/text-editor/words.d.ts +3 -0
- package/views/dist/controls/text-editor/words.js +1 -1
- package/views/dist/controls/text-editor.css +6 -0
- package/views/dist/controls/toolbar/toolbar.d.ts +12 -4
- package/views/dist/controls/toolbar/toolbar.js +7 -2
- package/views/dist/controls/toolbar-button/atom-toolbar-button.js +1 -1
- package/views/dist/controls/toolbar.css +5 -0
- package/views/dist/controls/tooltip/tokens.d.ts +1 -1
- package/views/dist/controls/tooltip/tokens.js +1 -1
- package/views/dist/controls/tooltip.css +5 -3
- package/views/dist/controls/values-editor.css +20 -5
- package/views/dist/controls/views-list/map-views-list-body.js +9 -1
- package/views/dist/controls/views-list/rules.d.ts +1 -0
- package/views/dist/controls/views-list/rules.js +2 -2
- package/views/dist/controls/views-list/view-menu.js +2 -2
- package/views/dist/controls/views-list/words.d.ts +4 -0
- package/views/dist/controls/views-list/words.js +2 -1
- package/views/dist/display/entity-chip.d.ts +7 -1
- package/views/dist/display/entity-chip.js +2 -1
- package/views/dist/display/option-badges.d.ts +3 -2
- package/views/dist/display/option-badges.js +2 -2
- package/views/dist/field-row/FieldRow.js +12 -8
- package/views/dist/grid/chrome/GridAddColumn.d.ts +7 -2
- package/views/dist/grid/chrome/GridAddColumn.js +5 -4
- package/views/dist/grid/chrome/GridCellEditors.d.ts +4 -1
- package/views/dist/grid/chrome/GridCellEditors.js +3 -2
- package/views/dist/grid/chrome/GridCellOutline.d.ts +3 -5
- package/views/dist/grid/chrome/GridCellOutline.js +3 -5
- package/views/dist/grid/chrome/GridChipsEditor.js +1 -1
- package/views/dist/grid/chrome/GridDateEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridDateEditor.js +1 -1
- package/views/dist/grid/chrome/GridHeader.js +3 -1
- package/views/dist/grid/chrome/GridLongTextEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridLongTextEditor.js +8 -5
- package/views/dist/grid/chrome/GridNameEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridNameEditor.js +1 -1
- package/views/dist/grid/chrome/GridNumberEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridNumberEditor.js +2 -2
- package/views/dist/grid/chrome/GridPlaceEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridPlaceEditor.js +1 -1
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +2 -2
- package/views/dist/grid/chrome/GridRangeEditor.js +1 -1
- package/views/dist/grid/chrome/GridRelationEditor.js +2 -2
- package/views/dist/grid/chrome/GridRow.js +7 -1
- package/views/dist/grid/chrome/GridRowCells.js +6 -5
- package/views/dist/grid/chrome/GridSelectEditor.js +1 -1
- package/views/dist/grid/chrome/GridTable.d.ts +2 -1
- package/views/dist/grid/chrome/GridTable.js +7 -2
- package/views/dist/grid/chrome/GridTableSurface.js +2 -1
- package/views/dist/grid/chrome/GridTextEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridTextEditor.js +2 -2
- package/views/dist/grid/chrome/GridValueListEditor.d.ts +1 -1
- package/views/dist/grid/chrome/GridValueListEditor.js +1 -1
- package/views/dist/grid/chrome/grid-body-place.d.ts +7 -2
- package/views/dist/grid/chrome/grid-body-place.js +8 -4
- package/views/dist/grid/chrome/grid-cell-classes.js +2 -2
- package/views/dist/grid/chrome/grid-edit-session.d.ts +4 -0
- package/views/dist/grid/chrome/grid-edit-session.js +10 -1
- package/views/dist/grid/chrome/grid-editor-layer.d.ts +10 -0
- package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
- package/views/dist/grid/chrome/grid-fitted-box.d.ts +9 -6
- package/views/dist/grid/chrome/grid-fitted-box.js +15 -7
- package/views/dist/grid/chrome/grid-hover.d.ts +3 -3
- package/views/dist/grid/chrome/grid-hover.js +2 -3
- package/views/dist/grid/chrome/grid-row-props.d.ts +6 -2
- package/views/dist/grid/chrome/grid-styles.d.ts +1 -5
- package/views/dist/grid/chrome/grid-styles.js +0 -1
- package/views/dist/grid/chrome/grid-table-props.d.ts +6 -2
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +0 -1
- package/views/dist/grid/chrome/useGridKeyboard.js +2 -10
- package/views/dist/grid/chrome/useGridScaleStyles.d.ts +9 -1
- package/views/dist/grid/chrome/useGridScaleStyles.js +1 -4
- package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +3 -1
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +24 -1
- package/views/dist/grid/core/useGridEditing.d.ts +3 -0
- package/views/dist/grid/core/useGridEditing.js +2 -0
- package/views/dist/grid/grid-format-props.d.ts +1 -1
- package/views/dist/grid/grid-format-props.js +18 -5
- package/views/dist/grid/grid.css +9 -20
- package/views/dist/grid/useGridTablePrefs.d.ts +1 -1
- package/views/dist/grid/useGridTableSettings.d.ts +1 -1
- package/views/dist/internal/screen-forms.d.ts +11 -0
- package/views/dist/internal/screen-forms.js +31 -0
- package/views/dist/list/list.js +4 -3
- package/views/dist/list/menu.d.ts +5 -4
- package/views/dist/list/parts.d.ts +8 -2
- package/views/dist/list/parts.js +31 -7
- package/views/dist/list/toolbar.js +11 -5
- package/views/dist/looks/index.d.ts +1 -0
- package/views/dist/looks/index.js +1 -0
- package/views/dist/panels/customize-body.d.ts +1 -1
- package/views/dist/panels/customize-body.js +8 -1
- package/views/dist/panels/model.d.ts +5 -0
- package/views/dist/panels/react/customize-body.js +11 -2
- package/views/dist/panels/react/customize.d.ts +3 -0
- package/views/dist/panels/react/filter/FilterFieldList.d.ts +3 -1
- package/views/dist/panels/react/filter/FilterFieldList.js +2 -2
- package/views/dist/panels/react/filter/filter-body.js +3 -1
- package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -1
- package/views/dist/panels/react/filter/filter-part-body.js +2 -2
- package/views/dist/panels/react/popover.d.ts +3 -1
- package/views/dist/panels/react/popover.js +2 -2
- package/views/dist/panels/react/sort/SortEditor.js +3 -1
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +15 -4
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +12 -1
- package/views/dist/panels/react/toolbar/Toolbar.js +5 -1
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +5 -3
- package/views/dist/panels/react/toolbar/ToolbarButton.js +3 -2
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +1 -3
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +4 -1
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +1 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.d.ts +3 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +28 -20
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
- package/views/dist/panels/react/toolbar/context.d.ts +3 -2
- package/views/dist/panels/react/toolbar/editor-menus.d.ts +8 -0
- package/views/dist/panels/react/toolbar/editor-menus.js +3 -0
- package/views/dist/panels/react/views-row/FoldingViewRow.js +26 -11
- package/views/dist/panels/react/views-row/HScrollRow.d.ts +4 -2
- package/views/dist/panels/react/views-row/HScrollRow.js +6 -2
- package/views/dist/panels/react/views-row/ViewAxes.js +6 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +7 -10
- package/views/dist/panels/react/views-row/more-views.d.ts +2 -0
- package/views/dist/panels/react/views-row/more-views.js +3 -0
- package/views/dist/panels/react/views-row/new-view.d.ts +11 -0
- package/views/dist/panels/react/views-row/new-view.js +21 -0
- package/views/dist/panels/react.d.ts +1 -1
- package/views/dist/panels/toolbar/model.d.ts +2 -2
- package/views/dist/provider/components.d.ts +88 -8
- package/views/dist/provider/desktop.d.ts +2 -1
- package/views/dist/provider/desktop.js +5 -2
- package/views/dist/react.d.ts +1 -1
- package/views/dist/styles.css +198 -84
- package/views/dist/styles.unlayered.css +198 -84
- package/views/docs/contract.md +87 -32
- package/views/docs/controls/list.md +2 -0
- package/views/docs/controls/menu.md +2 -0
- package/views/docs/controls/picker.md +2 -0
- package/views/docs/controls/popover.md +7 -0
- package/views/docs/controls/tooltip.md +2 -0
- package/views/docs/guides/atoms.md +11 -10
- package/views/docs/guides/the-grid.md +7 -5
- package/views/docs/guides/the-provider.md +2 -2
- package/views/docs/reference/controls.md +24 -18
- package/views/docs/reference/display.md +1 -1
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +4 -4
- package/views/docs/reference/list.md +30 -11
- package/views/docs/reference/looks.md +4 -1
- package/views/docs/reference/panels-react.md +7 -6
- package/views/docs/reference/panels.md +2 -2
- package/views/docs/reference/react.md +22 -10
- package/views/docs/reference/views.md +2 -2
- package/views/docs/reshaping.md +2 -2
- package/views/skills/views/SKILL.md +1 -1
package/views/dist/contract.js
CHANGED
|
@@ -196,6 +196,19 @@ export const VK_OPTIONAL_LAYOUT = [
|
|
|
196
196
|
"--vk-thick-line",
|
|
197
197
|
"--vk-selected-stroke",
|
|
198
198
|
"--vk-frozen-shadow-width",
|
|
199
|
+
"--vk-panel-w",
|
|
200
|
+
"--vk-panel-max-h",
|
|
201
|
+
"--vk-editor-w",
|
|
202
|
+
"--vk-editor-max-h",
|
|
203
|
+
"--vk-menu-w",
|
|
204
|
+
"--vk-menu-max-h",
|
|
205
|
+
"--vk-list-rows",
|
|
206
|
+
"--vk-popup-open-duration",
|
|
207
|
+
"--vk-popup-close-duration",
|
|
208
|
+
"--vk-popup-open-ease",
|
|
209
|
+
"--vk-popup-close-ease",
|
|
210
|
+
"--vk-popup-nudge",
|
|
211
|
+
"--vk-popup-scale",
|
|
199
212
|
];
|
|
200
213
|
export const VK_INTERNAL = [
|
|
201
214
|
"--vk-drag-shift",
|
|
@@ -205,7 +218,7 @@ export const VK_INTERNAL = [
|
|
|
205
218
|
"--vk-foot-at",
|
|
206
219
|
];
|
|
207
220
|
export const VK_INTERNAL_FAMILIES = ["--vk-col-w-"];
|
|
208
|
-
export const VK_INTERNAL_MARKS = ["vk-fit", "vk-fit-value"];
|
|
221
|
+
export const VK_INTERNAL_MARKS = ["vk-fit", "vk-fit-value", "vk-screen-forms", "vk-twin", "vk-twin-line"];
|
|
209
222
|
export { VK_CONTROL_PRIVATE_FAMILIES, VK_CONTROL_TOKENS, VK_CONTROL_TOKENS_BY_PIECE } from "./controls/tokens.js";
|
|
210
223
|
export { GRID_TOKENS as VK_GRID_TOKENS } from "./grid-tokens.js";
|
|
211
224
|
export const COMPONENT_NAMES = [
|
|
@@ -931,6 +944,9 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
931
944
|
"views.picker.back",
|
|
932
945
|
"views.picker.row-actions",
|
|
933
946
|
"views.picker.you",
|
|
947
|
+
"views.picker.remove",
|
|
948
|
+
"views.picker.show-every",
|
|
949
|
+
"views.picker.show-all",
|
|
934
950
|
"views.editors.links-search",
|
|
935
951
|
"views.editors.links-roles",
|
|
936
952
|
"views.editors.links-add",
|
|
@@ -1005,6 +1021,7 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
1005
1021
|
"views.panels.view-copy-name",
|
|
1006
1022
|
"views.panels.view-delete-stays",
|
|
1007
1023
|
"views.panels.view-delete-goes",
|
|
1024
|
+
"views.panels.view-delete-goes-own",
|
|
1008
1025
|
"views.panels.view-columns",
|
|
1009
1026
|
"views.panels.show-counts",
|
|
1010
1027
|
"views.panels.toolbar-new",
|
|
@@ -1076,6 +1093,7 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
1076
1093
|
"views.panels.view-publish",
|
|
1077
1094
|
"views.panels.view-reset",
|
|
1078
1095
|
"views.panels.view-stale",
|
|
1096
|
+
"views.panels.view-stale-own",
|
|
1079
1097
|
"views.panels.copy-link",
|
|
1080
1098
|
"views.panels.export-csv",
|
|
1081
1099
|
"views.panels.share",
|
|
@@ -1151,6 +1169,7 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
1151
1169
|
"views.panels.filter-choose",
|
|
1152
1170
|
"views.panels.filter-search",
|
|
1153
1171
|
"views.panels.filter-relation-way",
|
|
1172
|
+
"views.panels.filter-relation-rows",
|
|
1154
1173
|
"views.panels.filter-rule-actions",
|
|
1155
1174
|
"views.panels.filter-group-actions",
|
|
1156
1175
|
"views.panels.filter-set-aside-why",
|
|
@@ -1217,6 +1236,7 @@ export const VIEWS_MESSAGE_KEYS = [
|
|
|
1217
1236
|
"views.panels.customize-no-column",
|
|
1218
1237
|
"views.panels.customize-always-shown",
|
|
1219
1238
|
"views.panels.customize-view-name",
|
|
1239
|
+
"views.panels.customize-unavailable",
|
|
1220
1240
|
"views.panels.customize-layout-button",
|
|
1221
1241
|
"views.panels.customize-layout-settings",
|
|
1222
1242
|
"views.panels.customize-share",
|
|
@@ -1867,6 +1887,12 @@ export function resolveViewsMessage(message) {
|
|
|
1867
1887
|
return "Couldn't search.";
|
|
1868
1888
|
case "views.picker.failed-line":
|
|
1869
1889
|
return "Check the connection and try again.";
|
|
1890
|
+
case "views.picker.remove":
|
|
1891
|
+
return "Remove";
|
|
1892
|
+
case "views.picker.show-every":
|
|
1893
|
+
return `Show every ${message.values.label}`;
|
|
1894
|
+
case "views.picker.show-all":
|
|
1895
|
+
return "Show every choice";
|
|
1870
1896
|
case "views.picker.retry":
|
|
1871
1897
|
return "Try again";
|
|
1872
1898
|
case "views.picker.none-typed":
|
|
@@ -2060,6 +2086,8 @@ export function resolveViewsMessage(message) {
|
|
|
2060
2086
|
return `The ${message.values.records} in it stay as they are.`;
|
|
2061
2087
|
case "views.panels.view-delete-goes":
|
|
2062
2088
|
return "The view goes for everyone who uses it.";
|
|
2089
|
+
case "views.panels.view-delete-goes-own":
|
|
2090
|
+
return "The view goes only for you.";
|
|
2063
2091
|
case "views.panels.view-columns":
|
|
2064
2092
|
return `${message.values.layout} columns`;
|
|
2065
2093
|
case "views.panels.show-counts":
|
|
@@ -2201,6 +2229,8 @@ export function resolveViewsMessage(message) {
|
|
|
2201
2229
|
return "Reset";
|
|
2202
2230
|
case "views.panels.view-stale":
|
|
2203
2231
|
return "Everyone's view changed since you started.";
|
|
2232
|
+
case "views.panels.view-stale-own":
|
|
2233
|
+
return "This view changed since you started.";
|
|
2204
2234
|
case "views.panels.copy-link":
|
|
2205
2235
|
return "Copy link to view";
|
|
2206
2236
|
case "views.panels.export-csv":
|
|
@@ -2349,6 +2379,8 @@ export function resolveViewsMessage(message) {
|
|
|
2349
2379
|
return "Choose";
|
|
2350
2380
|
case "views.panels.filter-search":
|
|
2351
2381
|
return "Filter by…";
|
|
2382
|
+
case "views.panels.filter-relation-rows":
|
|
2383
|
+
return "Which related records";
|
|
2352
2384
|
case "views.panels.filter-relation-way":
|
|
2353
2385
|
return `${message.values.quantifier} where`;
|
|
2354
2386
|
case "views.panels.filter-rule-actions":
|
|
@@ -2494,6 +2526,8 @@ export function resolveViewsMessage(message) {
|
|
|
2494
2526
|
return "Always shown";
|
|
2495
2527
|
case "views.panels.customize-view-name":
|
|
2496
2528
|
return "The view's name";
|
|
2529
|
+
case "views.panels.customize-unavailable":
|
|
2530
|
+
return "Not available";
|
|
2497
2531
|
case "views.panels.customize-layout-button":
|
|
2498
2532
|
return `Layout: ${message.values.name}`;
|
|
2499
2533
|
case "views.panels.customize-layout-settings":
|
|
@@ -58,10 +58,12 @@ export interface AvatarStackProps {
|
|
|
58
58
|
onPick?: (person: AvatarStackPerson) => void;
|
|
59
59
|
/** Someone added: "Add someone…" at the end of the list it opens; with addButton, the dashed + after it too. */
|
|
60
60
|
onAdd?: () => void;
|
|
61
|
+
/** The +'s name to a screen reader, in the app's words (VK-997); by default "Add someone". No map draws the stack: hand it. */
|
|
62
|
+
addLabel?: string;
|
|
61
63
|
/** Where adding is the main job: a dashed + after the stack, pressing onAdd; with nobody on it, the + alone. */
|
|
62
64
|
addButton?: boolean;
|
|
63
65
|
}
|
|
64
66
|
/** Several people on one thing: overlapping, each cut out of whatever it stands on, the rest as a count. Its accessible name
|
|
65
67
|
* lists them ("Ioana Vlad, Kwame Asante, Lea Brandt and 3 more"). With onPick the whole stack is one button that opens
|
|
66
68
|
* everyone (after Linear); with addButton a dashed + stands after it (after Asana). */
|
|
67
|
-
export declare function AvatarStack({ people, max, size, className, label, onPick, onAdd, addButton }: AvatarStackProps): import("react/jsx-runtime").JSX.Element | null;
|
|
69
|
+
export declare function AvatarStack({ people, max, size, className, label, onPick, onAdd, addButton, addLabel }: AvatarStackProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -41,13 +41,13 @@ export function Avatar({ name, kind = "person", size = 32, id, tone, colour, src
|
|
|
41
41
|
}
|
|
42
42
|
markAvatar(Avatar);
|
|
43
43
|
const ADD_SIZE = { 20: "20", 24: "2xs", 32: "sm", 40: "md", 64: "lg" };
|
|
44
|
-
export function AvatarStack({ people, max = 3, size = 24, className, label, onPick, onAdd, addButton }) {
|
|
44
|
+
export function AvatarStack({ people, max = 3, size = 24, className, label, onPick, onAdd, addButton, addLabel = "Add someone" }) {
|
|
45
45
|
const screen = React.useContext(PhoneHost), phone = usePhone() || !!screen;
|
|
46
46
|
const shown = people.length > max + 1 ? people.slice(0, max) : people, rest = people.length - shown.length;
|
|
47
47
|
const names = shown.map((p) => p.name), said = rest ? `${names.join(", ")} and ${rest} more` : names.length > 1 ? `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}` : names.join("");
|
|
48
48
|
const faces = _jsxs(_Fragment, { children: [shown.map((p) => _jsx(Avatar, { ...p, size: size }, p.id ?? p.name)), rest > 0 && _jsxs("span", { className: cx("o-avatar o-avatar-more", SIZE[size]), "aria-hidden": "true", children: ["+", rest] })] });
|
|
49
49
|
const add = addButton && onAdd
|
|
50
|
-
? _jsx(Button, { kind: "outline", shape: "round", size: ADD_SIZE[size], className: "o-avatar-add", "data-size": size, "aria-label":
|
|
50
|
+
? _jsx(Button, { kind: "outline", shape: "round", size: ADD_SIZE[size], className: "o-avatar-add", "data-size": size, "aria-label": addLabel, icon: _jsx(Icon, { name: "plus" }), onClick: onAdd })
|
|
51
51
|
: null;
|
|
52
52
|
if (!people.length)
|
|
53
53
|
return add;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { buttonOwnAttrs as ownAttrs, type ButtonOwnLook as OwnLook } from "./own-look.js";
|
|
2
|
+
/** @deprecated Read it from `viewkitjs/views/looks`; this door's copy goes in a later release that breaks something anyway. */
|
|
3
|
+
export declare const buttonOwnAttrs: typeof ownAttrs;
|
|
4
|
+
/** @deprecated Read it from `viewkitjs/views/looks`; this door's copy goes in a later release that breaks something anyway. */
|
|
5
|
+
export declare const buttonOwnOptions: {
|
|
6
|
+
id: keyof OwnLook;
|
|
7
|
+
attr: string;
|
|
8
|
+
values: string[];
|
|
9
|
+
}[];
|
|
10
|
+
/** @deprecated Read it from `viewkitjs/views/looks`; this door's copy goes in a later release that breaks something anyway. */
|
|
11
|
+
export type ButtonOwnLook = OwnLook;
|
|
@@ -47,6 +47,8 @@ export function compoundEditorWordsOf(say) {
|
|
|
47
47
|
own: { line1: say({ key: "views.editors.place-street-number" }), line2: say({ key: "views.editors.place-line2-plain" }), postalCode: say({ key: "views.editors.place-postcode" }), city, region: say({ key: "views.editors.place-region" }) },
|
|
48
48
|
short: { line1: say({ key: "views.editors.place-street-short" }) },
|
|
49
49
|
},
|
|
50
|
+
close: say({ key: "views.panels.close" }),
|
|
51
|
+
save: say({ key: "views.editors.save" }),
|
|
50
52
|
picker: pickerWordsOf(say),
|
|
51
53
|
};
|
|
52
54
|
}
|
|
@@ -80,7 +80,7 @@ export function useNameParts(props, worn, wornAt) {
|
|
|
80
80
|
const body = fields ? (_jsxs("div", { ref: root, className: "o-compound-editor", "data-slot": "vk-parts", "data-kit": "compound-editor", ...kit, "data-parts-form": "phone", ...device, children: [_jsxs(FieldRows, { look: MIHAI_CARD, className: "o-compound-editor-card", "data-slot": "vk-parts-card", children: [_jsx(FieldRow, { label: w.first, className: "o-compound-editor-card-row", "data-slot": "vk-parts-field", "data-key": "given", labelClassName: "o-compound-editor-card-label", children: _jsx(Input, { chrome: "bare", ref: first, className: "o-compound-editor-card-input", "data-slot": "vk-parts-box", "data-key": "given", value: given, autofill: false, enterKeyHint: "next", ...words, onChange: (e) => part("given", e.target.value), onKeyDown: (e) => enter(toLast)(e) }) }), _jsx(FieldRow, { label: w.last, className: "o-compound-editor-card-row", "data-slot": "vk-parts-field", "data-key": "family", labelClassName: "o-compound-editor-card-label", children: _jsx(Input, { chrome: "bare", ref: last, className: "o-compound-editor-card-input", "data-slot": "vk-parts-box", "data-key": "family", value: family, autofill: false, enterKeyHint: "done", ...words, onChange: (e) => part("family", e.target.value), onKeyDown: (e) => enter(keep)(e) }) })] }), shownAs && _jsxs("div", { className: "o-compound-editor-shown", children: [_jsx(FieldRows, { look: MIHAI_CARD, className: "o-compound-editor-card", "data-slot": "vk-parts-card", children: _jsx(FieldRow, { label: w.shownAs, className: "o-compound-editor-card-row", "data-slot": "vk-parts-field", "data-key": "shown", labelClassName: "o-compound-editor-card-label", children: _jsx(Input, { chrome: "bare", className: "o-compound-editor-card-input", "data-slot": "vk-parts-box", "data-key": "shown", value: line ?? joined, placeholder: joined || label, "data-follows": own ? undefined : "", autofill: false, enterKeyHint: "done", ...words, onChange: (e) => typeLine(e.target.value), onKeyDown: (e) => enter(keep)(e) }) }) }), _jsx("p", { className: "o-compound-editor-caption", "data-slot": "vk-parts-note", "data-bad": note ? "" : undefined, role: note ? "alert" : undefined, children: note ?? (own ? w.own : w.follows) })] }), !shownAs && note && _jsx("p", { className: "o-compound-editor-caption", "data-slot": "vk-parts-note", "data-bad": "", role: "alert", children: note })] })) : (_jsxs("div", { ref: root, className: "o-compound-editor", "data-slot": "vk-parts", "data-kit": "compound-editor", ...kit, "data-parts-form": "phone", ...device, children: [_jsxs(PartsRow, { children: [_jsx(QuietField, { label: w.first, form: "phone", "data-slot": "vk-parts-field", "data-key": "given", children: _jsx(Input, { ref: first, size: "lg", "data-slot": "vk-parts-box", "data-key": "given", value: given, autofill: false, enterKeyHint: "next", ...words, onChange: (e) => part("given", e.target.value), onKeyDown: (e) => enter(toLast)(e) }) }), _jsx(QuietField, { label: w.last, form: "phone", "data-slot": "vk-parts-field", "data-key": "family", children: _jsx(Input, { ref: last, size: "lg", "data-slot": "vk-parts-box", "data-key": "family", value: family, autofill: false, enterKeyHint: "done", ...words, onChange: (e) => part("family", e.target.value), onKeyDown: (e) => enter(keep)(e) }) })] }), shownAs && _jsx(QuietField, { label: w.shownAs, form: "phone", "data-slot": "vk-parts-field", "data-key": "shown", children: _jsx(Input, { size: "lg", "data-slot": "vk-parts-box", "data-key": "shown", value: line ?? joined, placeholder: joined || label, "data-follows": own ? undefined : "", autofill: false, enterKeyHint: "done", ...words, onChange: (e) => typeLine(e.target.value), onKeyDown: (e) => enter(keep)(e) }) }), note && _jsx("p", { className: "o-compound-editor-note", "data-slot": "vk-parts-note", "data-bad": "", role: "alert", children: note })] }));
|
|
81
81
|
if (shell)
|
|
82
82
|
return { body, head: {} };
|
|
83
|
-
return { body, head: { left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label":
|
|
83
|
+
return { body, head: { left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label": w.close, icon: glyph(X), onClick: leave }), right: _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": w.save, icon: glyph(TICK), onClick: keep }) } };
|
|
84
84
|
}
|
|
85
85
|
const onKeyDown = (e) => {
|
|
86
86
|
if (midWord(e.nativeEvent))
|
|
@@ -161,7 +161,7 @@ export function usePlaceParts(props, worn, wornAt) {
|
|
|
161
161
|
return { body: shellBody, head: { onBack: back, backSlot: "vk-editor-back", close: false }, title: list === "countries" ? w.country : regionWord };
|
|
162
162
|
if (shell)
|
|
163
163
|
return { body: shellBody, head: {} };
|
|
164
|
-
return { body: shellBody, head: { left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label":
|
|
164
|
+
return { body: shellBody, head: { left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label": w.close, icon: glyph(X), onClick: leave }), right: _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": w.save, icon: glyph(TICK), onClick: keep }) } };
|
|
165
165
|
}
|
|
166
166
|
const inList = (t) => t instanceof Element && !!t.closest(".o-select-list");
|
|
167
167
|
const onBlur = (e) => { if (!shell && !swapping.current)
|
|
@@ -101,7 +101,7 @@ export function useRangeParts(props, worn, wornAt) {
|
|
|
101
101
|
}, children: [fields ? (_jsx(FieldRows, { look: MIHAI_CARD, className: "o-compound-editor-card", "data-slot": "vk-parts-card", children: ENDS.map(([k, name], i) => (_jsx(FieldRow, { label: name, className: "o-compound-editor-card-row", "data-slot": "vk-parts-field", "data-key": k, labelClassName: "o-compound-editor-card-label", children: _jsx(CardEnd, { part: k, limits: limits, words: numberWords, value: now[k], set: set(k), box: i === 0 ? first : undefined, format: format }) }, k))) })) : boxes(false, true), note, clearedNote, bandList] }));
|
|
102
102
|
if (shell)
|
|
103
103
|
return { body, head: {} };
|
|
104
|
-
return { body, head: { left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label":
|
|
104
|
+
return { body, head: { left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label": w.close, icon: glyph(X), onClick: leave }), right: _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": w.save, icon: glyph(TICK), onClick: keep }) } };
|
|
105
105
|
}
|
|
106
106
|
const body = (_jsxs("div", { ref: root, className: "o-compound-editor", "data-slot": "vk-parts", "data-kit": "compound-editor", ...kit, "data-parts-form": "computer", ...device, onKeyDown: onKeyDown, onBlur: shell ? undefined : (e) => blurKeeps(settled, keep)(e), onFocus: () => { settled.current = false; }, children: [fields ? (_jsx("div", { className: "o-compound-editor-pair", "data-slot": "vk-parts-pair", children: ENDS.map(([k, name], i) => (_jsxs(React.Fragment, { children: [i === 1 && _jsx("span", { className: "o-compound-editor-dash", "aria-hidden": "true", children: "\u2013" }), _jsx(Field, { label: name, "data-slot": "vk-parts-field", "data-key": k, children: _jsx(PairField, { part: k, limits: limits, words: numberWords, value: now[k], set: set(k), box: i === 0 ? first : undefined, format: format }) })] }, k))) })) : boxes(worn.arrows === "editing", false), note, clearedNote, bandList] }));
|
|
107
107
|
return { body, head: {} };
|
|
@@ -33,6 +33,9 @@ export interface CompoundEditorWords {
|
|
|
33
33
|
/** A place's boxes while no country names them, in Attio's look and in the country-first one (`own`), and the short ones a
|
|
34
34
|
* phone's row takes there; each part left out says the editor's own English (place.ts). */
|
|
35
35
|
parts?: PlaceWords;
|
|
36
|
+
/** A phone's head where no holder keeps the draft: its ✕ and ✓ (VK-997). */
|
|
37
|
+
close: string;
|
|
38
|
+
save: string;
|
|
36
39
|
/** The words of its lists. */
|
|
37
40
|
picker?: Partial<PickerWords>;
|
|
38
41
|
}
|
|
@@ -20,5 +20,7 @@ export const COMPOUND_EDITOR_WORDS = {
|
|
|
20
20
|
increase: "Increase",
|
|
21
21
|
decrease: "Decrease",
|
|
22
22
|
numberField: "Number field",
|
|
23
|
+
close: "Close",
|
|
24
|
+
save: "Save",
|
|
23
25
|
};
|
|
24
26
|
export const compoundWords = (given) => (given ? { ...COMPOUND_EDITOR_WORDS, ...given } : COMPOUND_EDITOR_WORDS);
|
|
@@ -4,9 +4,12 @@ import { type SheetHeadProps } from "../sheet/bottom-sheet.js";
|
|
|
4
4
|
import { type CustomizeWorn } from "./looks.js";
|
|
5
5
|
import { type CustomizeColumn } from "./rules.js";
|
|
6
6
|
import { type CustomizeWords } from "./words.js";
|
|
7
|
+
import type { ViewsCustomizeItems } from "../../provider/components.js";
|
|
7
8
|
export type { CustomizeColumn } from "./rules.js";
|
|
8
9
|
/** Where it stands: its list, or a section's screen. */
|
|
9
|
-
export type CustomizeScreen = "list" | "layout" | "columns" | "filter" | "sort" | "group"
|
|
10
|
+
export type CustomizeScreen = "list" | "layout" | "columns" | "filter" | "sort" | "group" | `page:${string}`;
|
|
11
|
+
/** Customize's own five pages, each with its own Reset and mark (VK-1034, VK-1048). */
|
|
12
|
+
type CustomizePageKey = "layout" | "columns" | "filter" | "sort" | "group";
|
|
10
13
|
/** The view it sets: its name, its layout's id, its columns in order, Show counts, and a table's Freeze first column and Wrap text. */
|
|
11
14
|
export interface CustomizeView {
|
|
12
15
|
name: string;
|
|
@@ -136,10 +139,14 @@ export interface CustomizeProps {
|
|
|
136
139
|
/** Each page's own Reset, while that page differs from the view as saved (VK-1034): drawn on its screen, in the first
|
|
137
140
|
* page's Reset's word and look and place, never on a level the screen opened in place. Handed (even empty), these
|
|
138
141
|
* alone stand: `columnsReset` is not read. */
|
|
139
|
-
resets?: Partial<Record<
|
|
142
|
+
resets?: Partial<Record<CustomizePageKey, () => void>>;
|
|
140
143
|
/** A section differs from the view as saved (VK-1048): its value in the brand. Absent, Layout and Columns carry no mark;
|
|
141
144
|
* Filter, Sort and Group carry their own section's `inForce`. */
|
|
142
|
-
differs?: Partial<Record<
|
|
145
|
+
differs?: Partial<Record<CustomizePageKey, boolean>>;
|
|
146
|
+
/** Customize's rows as data (VK-1062): handed each page's default rows (its list's, Layout's, Columns'), it hands back the
|
|
147
|
+
* rows drawn. A default key keeps ViewKit's row with the item's words; any other key is the app's row, or on the list a page
|
|
148
|
+
* of its own. Absent, every row as ViewKit draws it. */
|
|
149
|
+
items?: ViewsCustomizeItems;
|
|
143
150
|
/** @deprecated Columns' page Reset where no `resets` is handed at all. To be removed in a later release. */
|
|
144
151
|
columnsReset?: () => void;
|
|
145
152
|
/** A card's field starting a new line, turned on or off (its column's `line`, VK-890). */
|