@formicoidea/labre-core 0.47.1 → 0.49.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/_pkgs/affine-block-data-view/configs/slash-menu.js +3 -1
- package/dist/_pkgs/affine-block-data-view/view.d.ts +17 -1
- package/dist/_pkgs/affine-block-data-view/view.js +21 -2
- package/dist/_pkgs/affine-block-database/commands.d.ts +2 -2
- package/dist/_pkgs/affine-block-database/commands.js +3 -3
- package/dist/_pkgs/affine-block-database/components/values-banner.d.ts +28 -0
- package/dist/_pkgs/affine-block-database/components/values-banner.js +199 -0
- package/dist/_pkgs/affine-block-database/configs/slash-menu.d.ts +6 -1
- package/dist/_pkgs/affine-block-database/configs/slash-menu.js +57 -70
- package/dist/_pkgs/affine-block-database/data-source.d.ts +9 -5
- package/dist/_pkgs/affine-block-database/data-source.js +11 -7
- package/dist/_pkgs/affine-block-database/database-block-styles.d.ts +2 -0
- package/dist/_pkgs/affine-block-database/database-block-styles.js +15 -0
- package/dist/_pkgs/affine-block-database/database-block.d.ts +23 -0
- package/dist/_pkgs/affine-block-database/database-block.js +141 -19
- package/dist/_pkgs/affine-block-database/effects.js +2 -0
- package/dist/_pkgs/affine-block-database/external-data-source.d.ts +69 -2
- package/dist/_pkgs/affine-block-database/external-data-source.js +88 -16
- package/dist/_pkgs/affine-block-database/index.d.ts +2 -0
- package/dist/_pkgs/affine-block-database/index.js +2 -0
- package/dist/_pkgs/affine-block-database/linked-view.d.ts +38 -0
- package/dist/_pkgs/affine-block-database/linked-view.js +109 -0
- package/dist/_pkgs/affine-block-database/properties/index.d.ts +2 -0
- package/dist/_pkgs/affine-block-database/properties/index.js +2 -0
- package/dist/_pkgs/affine-block-database/properties/text/hosted.d.ts +15 -0
- package/dist/_pkgs/affine-block-database/properties/text/hosted.js +24 -0
- package/dist/_pkgs/affine-block-database/properties/title/hosted.d.ts +16 -0
- package/dist/_pkgs/affine-block-database/properties/title/hosted.js +42 -0
- package/dist/_pkgs/affine-block-database/service/index.d.ts +3 -0
- package/dist/_pkgs/affine-block-database/service/index.js +3 -0
- package/dist/_pkgs/affine-block-database/service/new-row-menu.d.ts +49 -0
- package/dist/_pkgs/affine-block-database/service/new-row-menu.js +21 -0
- package/dist/_pkgs/affine-block-database/service/open-row.d.ts +77 -0
- package/dist/_pkgs/affine-block-database/service/open-row.js +62 -0
- package/dist/_pkgs/affine-block-database/service/properties-panel.d.ts +23 -0
- package/dist/_pkgs/affine-block-database/service/properties-panel.js +33 -0
- package/dist/_pkgs/affine-block-database/translations.d.ts +10 -0
- package/dist/_pkgs/affine-block-database/translations.js +35 -0
- package/dist/_pkgs/affine-block-database/view-creation.d.ts +10 -0
- package/dist/_pkgs/affine-block-database/view-creation.js +14 -0
- package/dist/_pkgs/affine-block-database/view.d.ts +31 -1
- package/dist/_pkgs/affine-block-database/view.js +48 -4
- package/dist/_pkgs/affine-block-database/views/index.d.ts +30 -3
- package/dist/_pkgs/affine-block-database/views/index.js +44 -3
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/new-doc.d.ts +25 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/new-doc.js +71 -0
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/slash-menu.js +3 -11
- package/dist/_pkgs/affine-components/date-picker/date-picker.d.ts +20 -0
- package/dist/_pkgs/affine-components/date-picker/date-picker.js +60 -26
- package/dist/_pkgs/affine-components/date-picker/style.js +1 -0
- package/dist/_pkgs/affine-components/translations.d.ts +4 -0
- package/dist/_pkgs/affine-components/translations.js +26 -0
- package/dist/_pkgs/affine-fragment-doc-title/doc-title.d.ts +18 -0
- package/dist/_pkgs/affine-fragment-doc-title/doc-title.js +41 -2
- package/dist/_pkgs/affine-fragment-doc-title/index.d.ts +1 -1
- package/dist/_pkgs/affine-fragment-doc-title/index.js +1 -1
- package/dist/_pkgs/affine-fragment-doc-title/title-band/band-cell.d.ts +30 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/band-cell.js +137 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/format.d.ts +7 -19
- package/dist/_pkgs/affine-fragment-doc-title/title-band/format.js +0 -38
- package/dist/_pkgs/affine-fragment-doc-title/title-band/show-here.d.ts +19 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/show-here.js +61 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.d.ts +33 -18
- package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.js +263 -205
- package/dist/_pkgs/affine-fragment-doc-title/translations.d.ts +7 -4
- package/dist/_pkgs/affine-fragment-doc-title/translations.js +12 -9
- package/dist/_pkgs/affine-model/blocks/database/types.d.ts +16 -0
- package/dist/_pkgs/affine-model/blocks/database/types.js +5 -1
- package/dist/_pkgs/affine-shared/services/data-source-picker-service.d.ts +139 -0
- package/dist/_pkgs/affine-shared/services/data-source-picker-service.js +22 -0
- package/dist/_pkgs/affine-shared/services/index.d.ts +1 -0
- package/dist/_pkgs/affine-shared/services/index.js +1 -0
- package/dist/_pkgs/affine-shared/services/linked-doc-creation-service.d.ts +15 -6
- package/dist/_pkgs/affine-shared/services/telemetry-service/database.d.ts +59 -0
- package/dist/_pkgs/affine-shared/services/title-band-service.d.ts +34 -7
- package/dist/_pkgs/affine-shared/utils/model/doc.d.ts +10 -2
- package/dist/_pkgs/affine-shared/utils/model/doc.js +17 -7
- package/dist/_pkgs/data-view/core/component/cell-status/cell-status-css.d.ts +2 -0
- package/dist/_pkgs/data-view/core/component/cell-status/cell-status-css.js +16 -0
- package/dist/_pkgs/data-view/core/component/cell-status/cell-status.d.ts +10 -0
- package/dist/_pkgs/data-view/core/component/cell-status/cell-status.js +23 -0
- package/dist/_pkgs/data-view/core/component/index.d.ts +1 -0
- package/dist/_pkgs/data-view/core/component/index.js +1 -0
- package/dist/_pkgs/data-view/core/component/overflow/fit.d.ts +26 -0
- package/dist/_pkgs/data-view/core/component/overflow/fit.js +48 -0
- package/dist/_pkgs/data-view/core/component/overflow/overflow.d.ts +26 -3
- package/dist/_pkgs/data-view/core/component/overflow/overflow.js +84 -31
- package/dist/_pkgs/data-view/core/component/tags/colors.d.ts +7 -0
- package/dist/_pkgs/data-view/core/component/tags/colors.js +22 -10
- package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.d.ts +25 -2
- package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.js +81 -32
- package/dist/_pkgs/data-view/core/data-source/base.d.ts +5 -1
- package/dist/_pkgs/data-view/core/data-source/base.js +7 -1
- package/dist/_pkgs/data-view/core/data-source/hydration.d.ts +44 -0
- package/dist/_pkgs/data-view/core/data-source/hydration.js +31 -0
- package/dist/_pkgs/data-view/core/data-source/index.d.ts +1 -0
- package/dist/_pkgs/data-view/core/data-source/index.js +1 -0
- package/dist/_pkgs/data-view/core/data-view.d.ts +22 -2
- package/dist/_pkgs/data-view/core/data-view.js +14 -0
- package/dist/_pkgs/data-view/core/effect.js +4 -0
- package/dist/_pkgs/data-view/core/group-by/collapsed-state.d.ts +3 -0
- package/dist/_pkgs/data-view/core/group-by/collapsed-state.js +59 -0
- package/dist/_pkgs/data-view/core/group-by/group-properties.d.ts +21 -0
- package/dist/_pkgs/data-view/core/group-by/group-properties.js +38 -0
- package/dist/_pkgs/data-view/core/group-by/group-title.js +4 -0
- package/dist/_pkgs/data-view/core/group-by/group-visibility.d.ts +40 -0
- package/dist/_pkgs/data-view/core/group-by/group-visibility.js +291 -0
- package/dist/_pkgs/data-view/core/group-by/setting.d.ts +11 -3
- package/dist/_pkgs/data-view/core/group-by/setting.js +81 -8
- package/dist/_pkgs/data-view/core/group-by/trait.d.ts +22 -0
- package/dist/_pkgs/data-view/core/group-by/trait.js +62 -1
- package/dist/_pkgs/data-view/core/index.d.ts +3 -0
- package/dist/_pkgs/data-view/core/index.js +3 -0
- package/dist/_pkgs/data-view/core/property/base-cell.d.ts +15 -1
- package/dist/_pkgs/data-view/core/property/base-cell.js +28 -3
- package/dist/_pkgs/data-view/core/property/index.d.ts +1 -0
- package/dist/_pkgs/data-view/core/property/index.js +1 -0
- package/dist/_pkgs/data-view/core/property/standalone-cell.d.ts +109 -0
- package/dist/_pkgs/data-view/core/property/standalone-cell.js +324 -0
- package/dist/_pkgs/data-view/core/telemetry.d.ts +16 -0
- package/dist/_pkgs/data-view/core/telemetry.js +22 -0
- package/dist/_pkgs/data-view/core/utils/new-tab-click.d.ts +2 -0
- package/dist/_pkgs/data-view/core/utils/new-tab-click.js +4 -0
- package/dist/_pkgs/data-view/core/utils/wording.d.ts +11 -0
- package/dist/_pkgs/data-view/core/utils/wording.js +9 -0
- package/dist/_pkgs/data-view/core/view/data-view.d.ts +7 -0
- package/dist/_pkgs/data-view/core/view/default-name.d.ts +10 -0
- package/dist/_pkgs/data-view/core/view/default-name.js +14 -0
- package/dist/_pkgs/data-view/core/view/index.d.ts +2 -0
- package/dist/_pkgs/data-view/core/view/index.js +2 -0
- package/dist/_pkgs/data-view/core/view/open-in.d.ts +27 -0
- package/dist/_pkgs/data-view/core/view/open-in.js +39 -0
- package/dist/_pkgs/data-view/core/view-manager/cell.d.ts +5 -0
- package/dist/_pkgs/data-view/core/view-manager/cell.js +11 -0
- package/dist/_pkgs/data-view/core/view-manager/index.d.ts +3 -0
- package/dist/_pkgs/data-view/core/view-manager/index.js +3 -0
- package/dist/_pkgs/data-view/core/view-manager/new-row-menu-opener.d.ts +18 -0
- package/dist/_pkgs/data-view/core/view-manager/new-row-menu-opener.js +2 -0
- package/dist/_pkgs/data-view/core/view-manager/properties-panel-opener.d.ts +8 -0
- package/dist/_pkgs/data-view/core/view-manager/properties-panel-opener.js +9 -0
- package/dist/_pkgs/data-view/core/view-manager/property.d.ts +14 -0
- package/dist/_pkgs/data-view/core/view-manager/single-view.d.ts +28 -1
- package/dist/_pkgs/data-view/core/view-manager/single-view.js +45 -1
- package/dist/_pkgs/data-view/core/view-manager/view-creation.d.ts +49 -0
- package/dist/_pkgs/data-view/core/view-manager/view-creation.js +40 -0
- package/dist/_pkgs/data-view/core/view-manager/view-manager.d.ts +6 -2
- package/dist/_pkgs/data-view/core/view-manager/view-manager.js +2 -2
- package/dist/_pkgs/data-view/property-presets/date/cell-renderer.d.ts +2 -0
- package/dist/_pkgs/data-view/property-presets/date/cell-renderer.js +11 -2
- package/dist/_pkgs/data-view/property-presets/multi-select/cell-renderer.js +3 -1
- package/dist/_pkgs/data-view/property-presets/select/cell-renderer.js +3 -1
- package/dist/_pkgs/data-view/property-presets/text/cell-renderer.js +3 -1
- package/dist/_pkgs/data-view/translations.d.ts +55 -0
- package/dist/_pkgs/data-view/translations.js +181 -0
- package/dist/_pkgs/data-view/view-presets/calendar/define.js +3 -1
- package/dist/_pkgs/data-view/view-presets/convert.js +2 -0
- package/dist/_pkgs/data-view/view-presets/effect.js +4 -0
- package/dist/_pkgs/data-view/view-presets/flat/flat-converts.d.ts +2 -0
- package/dist/_pkgs/data-view/view-presets/flat/flat-converts.js +35 -0
- package/dist/_pkgs/data-view/view-presets/flat/flat-view-manager.d.ts +79 -0
- package/dist/_pkgs/data-view/view-presets/flat/flat-view-manager.js +194 -0
- package/dist/_pkgs/data-view/view-presets/flat/flat-view-ui.d.ts +56 -0
- package/dist/_pkgs/data-view/view-presets/flat/flat-view-ui.js +266 -0
- package/dist/_pkgs/data-view/view-presets/gallery/define.d.ts +14 -0
- package/dist/_pkgs/data-view/view-presets/gallery/define.js +15 -0
- package/dist/_pkgs/data-view/view-presets/gallery/effect.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/gallery/effect.js +4 -0
- package/dist/_pkgs/data-view/view-presets/gallery/gallery-view.d.ts +27 -0
- package/dist/_pkgs/data-view/view-presets/gallery/gallery-view.js +179 -0
- package/dist/_pkgs/data-view/view-presets/gallery/index.d.ts +2 -0
- package/dist/_pkgs/data-view/view-presets/gallery/index.js +2 -0
- package/dist/_pkgs/data-view/view-presets/gallery/renderer.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/gallery/renderer.js +11 -0
- package/dist/_pkgs/data-view/view-presets/index.d.ts +5 -0
- package/dist/_pkgs/data-view/view-presets/index.js +7 -0
- package/dist/_pkgs/data-view/view-presets/kanban/define.js +3 -1
- package/dist/_pkgs/data-view/view-presets/kanban/kanban-view-manager.js +5 -53
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/card.js +8 -1
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/cell.js +6 -1
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/group.d.ts +4 -2
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/group.js +52 -6
- package/dist/_pkgs/data-view/view-presets/kanban/mobile/kanban-view-ui-logic.js +5 -1
- package/dist/_pkgs/data-view/view-presets/kanban/pc/card.js +2 -0
- package/dist/_pkgs/data-view/view-presets/kanban/pc/cell.js +4 -0
- package/dist/_pkgs/data-view/view-presets/kanban/pc/group.d.ts +4 -2
- package/dist/_pkgs/data-view/view-presets/kanban/pc/group.js +51 -6
- package/dist/_pkgs/data-view/view-presets/kanban/pc/kanban-view-ui-logic.js +5 -1
- package/dist/_pkgs/data-view/view-presets/list/define.d.ts +14 -0
- package/dist/_pkgs/data-view/view-presets/list/define.js +15 -0
- package/dist/_pkgs/data-view/view-presets/list/effect.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/list/effect.js +4 -0
- package/dist/_pkgs/data-view/view-presets/list/index.d.ts +2 -0
- package/dist/_pkgs/data-view/view-presets/list/index.js +2 -0
- package/dist/_pkgs/data-view/view-presets/list/list-view.d.ts +24 -0
- package/dist/_pkgs/data-view/view-presets/list/list-view.js +194 -0
- package/dist/_pkgs/data-view/view-presets/list/renderer.d.ts +1 -0
- package/dist/_pkgs/data-view/view-presets/list/renderer.js +11 -0
- package/dist/_pkgs/data-view/view-presets/table/collapsed-state.d.ts +3 -14
- package/dist/_pkgs/data-view/view-presets/table/collapsed-state.js +6 -30
- package/dist/_pkgs/data-view/view-presets/table/consts.d.ts +2 -0
- package/dist/_pkgs/data-view/view-presets/table/consts.js +2 -0
- package/dist/_pkgs/data-view/view-presets/table/define.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/mobile/cell.js +4 -1
- package/dist/_pkgs/data-view/view-presets/table/mobile/column-header.js +2 -2
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.d.ts +3 -1
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +20 -5
- package/dist/_pkgs/data-view/view-presets/table/mobile/row.js +10 -2
- package/dist/_pkgs/data-view/view-presets/table/mobile/table-view-ui-logic.js +4 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/cell.js +4 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/controller/hotkeys.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/group.d.ts +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/group.js +20 -5
- package/dist/_pkgs/data-view/view-presets/table/pc/menu.d.ts +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/menu.js +2 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/row/row.js +3 -2
- package/dist/_pkgs/data-view/view-presets/table/pc/table-view-ui-logic.js +4 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/hotkeys.js +1 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/stats/column-stats-column.js +5 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +22 -19
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/cell.js +4 -1
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/table-view-ui-logic.js +7 -2
- package/dist/_pkgs/data-view/view-presets/table/stats/column-stats-column.js +5 -1
- package/dist/_pkgs/data-view/view-presets/table/table-view-manager.js +5 -53
- package/dist/_pkgs/data-view/widget-presets/tools/presets/table-add-row/add-row.d.ts +1 -0
- package/dist/_pkgs/data-view/widget-presets/tools/presets/table-add-row/add-row.js +60 -2
- package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-options.d.ts +18 -1
- package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-options.js +121 -124
- package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-settings.d.ts +43 -0
- package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-settings.js +187 -0
- package/dist/_pkgs/data-view/widget-presets/views-bar/views-view.d.ts +36 -3
- package/dist/_pkgs/data-view/widget-presets/views-bar/views-view.js +187 -59
- package/dist/extensions/view.d.ts +2 -2
- package/dist/extensions/view.js +10 -3
- package/dist/flags.d.ts +8 -4
- package/dist/flags.js +8 -4
- package/dist/frameworks.d.ts +27 -0
- package/dist/frameworks.js +28 -0
- package/dist/translations.js +13 -1
- package/package.json +5 -1
|
@@ -32,21 +32,21 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import { menu, popMenu, popupTargetFromElement, } from '../../affine-components/context-menu/index.js';
|
|
36
|
-
import { DatePicker } from '../../affine-components/date-picker/index.js';
|
|
37
35
|
import { RefNodeSlotsProvider } from '../../affine-inline-reference/index.js';
|
|
38
|
-
import { DOC_UNTITLED, formatLocale, PropertiesPanelProvider, TitleBandProvider, translateKey, } from '../../affine-shared/services/index.js';
|
|
36
|
+
import { DOC_UNTITLED, FeatureFlagService, formatLocale, PropertiesPanelProvider, TitleBandProvider, translateKey, } from '../../affine-shared/services/index.js';
|
|
39
37
|
import { stopPropagation } from '../../affine-shared/utils/index.js';
|
|
38
|
+
import { createStandaloneCell, StandaloneCellMetaProvider, } from '../../data-view/index.js';
|
|
40
39
|
import { SignalWatcher, WithDisposable } from '../../global/lit/index.js';
|
|
41
40
|
import { ShadowlessElement } from '../../std/index.js';
|
|
42
|
-
import {
|
|
41
|
+
import { LinkedPageIcon, PlusIcon, SidebarIcon, ToggleDownIcon, ToggleRightIcon, } from '@blocksuite/icons/lit';
|
|
43
42
|
import { computed, signal } from '@preact/signals-core';
|
|
44
43
|
import { css, html, nothing } from 'lit';
|
|
45
44
|
import { property } from 'lit/decorators.js';
|
|
46
45
|
import { repeat } from 'lit/directives/repeat.js';
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
46
|
+
import { TITLE_BAND_ADD, TITLE_BAND_COLLAPSE, TITLE_BAND_EMPTY, TITLE_BAND_EXPAND, TITLE_BAND_LABEL, TITLE_BAND_LOADING, TITLE_BAND_NOT_SHOWN, TITLE_BAND_OPEN_PANEL, TITLE_BAND_SHOW_HERE, } from '../translations.js';
|
|
47
|
+
import { bandCellData, bandCellMeta, bandCellValue, bandOptionsWritable, bandWriteValue, isBandReadonlyType, sameBandValue, } from './band-cell.js';
|
|
48
|
+
import { formatPropertyValue, isPropertyValueEmpty } from './format.js';
|
|
49
|
+
import { showPageHere } from './show-here.js';
|
|
50
50
|
export const LABRE_TITLE_BAND = 'labre-title-band';
|
|
51
51
|
const NO_PAGES = [];
|
|
52
52
|
/**
|
|
@@ -61,12 +61,19 @@ const NO_PAGES = [];
|
|
|
61
61
|
*
|
|
62
62
|
* Fed by `TitleBandProvider` alone (§9d): no provider, nothing at all. The
|
|
63
63
|
* chips are the sheet's visible properties in the host's order, an empty one
|
|
64
|
-
* included (REQ-PR-1)
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
64
|
+
* included (REQ-PR-1). Each value is drawn and edited by the cell the inline
|
|
65
|
+
* table mounts for its data-view type (`<dv-standalone-cell>`, ADR 0035
|
|
66
|
+
* §11 amended 2026-10-13): the checkbox, the tag menu of a select, the date
|
|
67
|
+
* picker, the number, text and link inputs, with the table's own styles. The
|
|
68
|
+
* value the cell commits goes back through `set`, the chip shows pending
|
|
69
|
+
* until the host settles it, and a type with no cell keeps a plain-text
|
|
70
|
+
* reading that opens the properties panel. The band never applies a value, and writes to
|
|
71
|
+
* the document only the card "Show here" inserts. The "+" is drawn when the
|
|
72
|
+
* host passes `add`; the panel button when a `PropertiesPanelProvider` is
|
|
73
|
+
* registered. The "Not shown on this page" row is drawn in both views
|
|
74
|
+
* from the host's `notShown$` (ADR 0035 §9d, amended 2026-10-13): each page
|
|
75
|
+
* opens through the linked-document path, and "Show here" inserts a card of
|
|
76
|
+
* it into this document; the host then drops the page from its list.
|
|
70
77
|
*/
|
|
71
78
|
let TitleBand = (() => {
|
|
72
79
|
let _classSuper = SignalWatcher(WithDisposable(ShadowlessElement));
|
|
@@ -154,7 +161,7 @@ let TitleBand = (() => {
|
|
|
154
161
|
background-color: transparent;
|
|
155
162
|
}
|
|
156
163
|
|
|
157
|
-
.labre-title-band svg {
|
|
164
|
+
.labre-title-band button > svg {
|
|
158
165
|
flex: none;
|
|
159
166
|
width: 16px;
|
|
160
167
|
height: 16px;
|
|
@@ -165,36 +172,57 @@ let TitleBand = (() => {
|
|
|
165
172
|
padding: 0 6px !important;
|
|
166
173
|
}
|
|
167
174
|
|
|
175
|
+
.labre-title-band-chip {
|
|
176
|
+
display: inline-flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 6px;
|
|
179
|
+
min-height: 28px;
|
|
180
|
+
max-width: 100%;
|
|
181
|
+
padding: 0 8px;
|
|
182
|
+
border-radius: 6px;
|
|
183
|
+
transition: background-color 150ms;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.labre-title-band-chip[data-clickable='true'] {
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.labre-title-band-chip[data-clickable='true']:hover {
|
|
191
|
+
background-color: var(--affine-hover-color);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.labre-title-band-chip[aria-busy='true'] {
|
|
195
|
+
cursor: progress;
|
|
196
|
+
opacity: 0.6;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.labre-title-band-chip:focus-visible,
|
|
200
|
+
.labre-title-band-chip dv-standalone-cell:focus-visible {
|
|
201
|
+
outline: 2px solid var(--affine-primary-color);
|
|
202
|
+
outline-offset: 1px;
|
|
203
|
+
border-radius: 4px;
|
|
204
|
+
}
|
|
205
|
+
|
|
168
206
|
.labre-title-band-chip-name {
|
|
169
207
|
color: var(--affine-text-secondary-color);
|
|
170
208
|
white-space: nowrap;
|
|
171
209
|
}
|
|
172
210
|
|
|
211
|
+
/* Room only: what is inside is the cell's own drawing. */
|
|
173
212
|
.labre-title-band-chip-value {
|
|
174
|
-
|
|
175
|
-
align-items: center;
|
|
176
|
-
gap: 4px;
|
|
213
|
+
max-width: 240px;
|
|
177
214
|
overflow: hidden;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.labre-title-band-chip-text {
|
|
178
218
|
text-overflow: ellipsis;
|
|
179
219
|
white-space: nowrap;
|
|
180
|
-
max-width: 240px;
|
|
181
220
|
}
|
|
182
221
|
|
|
183
|
-
.labre-title-band-chip[data-empty='true']
|
|
222
|
+
.labre-title-band-chip-text[data-empty='true'] {
|
|
184
223
|
color: var(--affine-placeholder-color);
|
|
185
224
|
}
|
|
186
225
|
|
|
187
|
-
.labre-title-band-tag {
|
|
188
|
-
display: inline-block;
|
|
189
|
-
padding: 0 6px;
|
|
190
|
-
border-radius: 4px;
|
|
191
|
-
max-width: 160px;
|
|
192
|
-
overflow: hidden;
|
|
193
|
-
text-overflow: ellipsis;
|
|
194
|
-
white-space: nowrap;
|
|
195
|
-
background-color: var(--affine-tag-white);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
226
|
.labre-title-band-skeleton {
|
|
199
227
|
display: inline-block;
|
|
200
228
|
width: 96px;
|
|
@@ -208,39 +236,34 @@ let TitleBand = (() => {
|
|
|
208
236
|
padding-right: 4px;
|
|
209
237
|
}
|
|
210
238
|
|
|
239
|
+
/* Layout only: the buttons are the band's own, no drawing of their own. */
|
|
240
|
+
.labre-title-band-not-shown-item {
|
|
241
|
+
display: inline-flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
max-width: 100%;
|
|
244
|
+
}
|
|
245
|
+
|
|
211
246
|
@media (prefers-reduced-motion: reduce) {
|
|
212
|
-
.labre-title-band button
|
|
247
|
+
.labre-title-band button,
|
|
248
|
+
.labre-title-band-chip {
|
|
213
249
|
transition: none;
|
|
214
250
|
}
|
|
215
251
|
}
|
|
216
252
|
|
|
217
253
|
/* A 44px target under a coarse pointer, without changing the drawing. */
|
|
218
254
|
@media (pointer: coarse) {
|
|
219
|
-
.labre-title-band button
|
|
255
|
+
.labre-title-band button,
|
|
256
|
+
.labre-title-band-chip {
|
|
220
257
|
position: relative;
|
|
221
258
|
}
|
|
222
|
-
.labre-title-band button::after
|
|
259
|
+
.labre-title-band button::after,
|
|
260
|
+
.labre-title-band-chip::after {
|
|
223
261
|
content: '';
|
|
224
262
|
position: absolute;
|
|
225
263
|
inset: -8px 0;
|
|
226
264
|
}
|
|
227
265
|
}
|
|
228
266
|
`; }
|
|
229
|
-
_pop(target, title, items) {
|
|
230
|
-
this._menu?.close();
|
|
231
|
-
const handler = popMenu(popupTargetFromElement(target), {
|
|
232
|
-
options: {
|
|
233
|
-
title: { text: title },
|
|
234
|
-
items,
|
|
235
|
-
onClose: () => {
|
|
236
|
-
if (this._menu === handler)
|
|
237
|
-
this._menu = null;
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
});
|
|
241
|
-
this._menu = handler;
|
|
242
|
-
return handler;
|
|
243
|
-
}
|
|
244
267
|
/** Read inside `render` it subscribes, through `SignalWatcher`. */
|
|
245
268
|
get _readonly() {
|
|
246
269
|
return this.std?.store.readonly$.value ?? true;
|
|
@@ -264,7 +287,8 @@ let TitleBand = (() => {
|
|
|
264
287
|
docId,
|
|
265
288
|
sheet$: service.sheet$(docId),
|
|
266
289
|
collapsed$: service.collapsed$?.(docId) ?? null,
|
|
267
|
-
notShown$:
|
|
290
|
+
notShown$: service.notShown$?.(docId) ?? null,
|
|
291
|
+
cells: new Map(),
|
|
268
292
|
};
|
|
269
293
|
this._sources = sources;
|
|
270
294
|
return sources;
|
|
@@ -305,125 +329,149 @@ let TitleBand = (() => {
|
|
|
305
329
|
console.error('[title-band] set was refused', error);
|
|
306
330
|
});
|
|
307
331
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
332
|
+
/**
|
|
333
|
+
* A definition a select's tag menu commits (a created or renamed option):
|
|
334
|
+
* handed to the host's `setData`, never applied here.
|
|
335
|
+
*/
|
|
336
|
+
_writeData(property, data) {
|
|
337
|
+
const service = this._sources?.service;
|
|
338
|
+
if (!service?.setData || this._isReadonlyChip(property))
|
|
339
|
+
return;
|
|
340
|
+
if (property.dataWritable !== true)
|
|
341
|
+
return;
|
|
342
|
+
let written;
|
|
343
|
+
try {
|
|
344
|
+
written = service.setData(this.docId, property.id, {
|
|
345
|
+
...property.data,
|
|
346
|
+
options: data.options,
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
catch (error) {
|
|
350
|
+
console.error('[title-band] setData threw', error);
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
Promise.resolve(written).catch((error) => {
|
|
354
|
+
console.error('[title-band] setData was refused', error);
|
|
319
355
|
});
|
|
320
356
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
select: () => {
|
|
327
|
-
if (tag.id !== prop.value)
|
|
328
|
-
this._write(prop, tag.id);
|
|
329
|
-
},
|
|
330
|
-
}));
|
|
331
|
-
if (prop.value != null)
|
|
332
|
-
items.push(this._clearItem(prop));
|
|
333
|
-
this._pop(target, prop.name, items);
|
|
334
|
-
}
|
|
335
|
-
_popMultiSelect(target, prop) {
|
|
336
|
-
// A draft, because the host's answer arrives later through `sheet$`: two
|
|
337
|
-
// ticks in one open menu must not both start from the stale value.
|
|
338
|
-
const draft$ = signal(Array.isArray(prop.value)
|
|
339
|
-
? prop.value.filter((id) => typeof id === 'string')
|
|
340
|
-
: []);
|
|
341
|
-
const items = chipOptions(prop).map(tag => menu.checkbox({
|
|
342
|
-
name: tag.label,
|
|
343
|
-
label: () => this._tagLabel(tag),
|
|
344
|
-
checked: computed(() => draft$.value.includes(tag.id)),
|
|
345
|
-
select: checked => {
|
|
346
|
-
const next = checked
|
|
347
|
-
? draft$.peek().filter(id => id !== tag.id)
|
|
348
|
-
: [...draft$.peek(), tag.id];
|
|
349
|
-
draft$.value = next;
|
|
350
|
-
this._write(prop, next);
|
|
351
|
-
return !checked;
|
|
352
|
-
},
|
|
353
|
-
}));
|
|
354
|
-
this._pop(target, prop.name, items);
|
|
357
|
+
/** A value a cell commits: unchanged, nothing is written. */
|
|
358
|
+
_commit(prop, cellType, value) {
|
|
359
|
+
if (sameBandValue(cellType, prop.value, value))
|
|
360
|
+
return;
|
|
361
|
+
this._write(prop, bandWriteValue(value));
|
|
355
362
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
picker.padding = 0;
|
|
360
|
-
picker.value = typeof prop.value === 'number' ? prop.value : Date.now();
|
|
361
|
-
picker.onChange = (date) => {
|
|
362
|
-
if (date.getTime() !== prop.value)
|
|
363
|
-
this._write(prop, date.getTime());
|
|
364
|
-
close();
|
|
365
|
-
};
|
|
366
|
-
picker.onClear = () => {
|
|
367
|
-
this._write(prop, null);
|
|
368
|
-
close();
|
|
369
|
-
};
|
|
370
|
-
picker.onEscape = () => close();
|
|
371
|
-
const items = [() => html `${picker}`];
|
|
372
|
-
const handler = this._pop(target, prop.name, items);
|
|
373
|
-
close = () => handler.close();
|
|
363
|
+
/** Neither the property nor the document can be written, or the type. */
|
|
364
|
+
_isReadonlyChip(prop) {
|
|
365
|
+
return (!prop || prop.readonly || this._readonly || isBandReadonlyType(prop.type));
|
|
374
366
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
367
|
+
/**
|
|
368
|
+
* The cell that draws `prop`, built once per property and type: its value,
|
|
369
|
+
* name and config are read from the sheet, so a new sheet updates the cell
|
|
370
|
+
* in place and an editor open in it stays open.
|
|
371
|
+
*/
|
|
372
|
+
_cellFor(sources, prop) {
|
|
373
|
+
const std = this.std;
|
|
374
|
+
if (!std)
|
|
375
|
+
return null;
|
|
376
|
+
const meta = bandCellMeta(prop.type, cellType => std.getOptional(StandaloneCellMetaProvider(cellType)));
|
|
377
|
+
if (!meta)
|
|
378
|
+
return null;
|
|
379
|
+
const cellType = meta.type;
|
|
380
|
+
const optionsWritable = bandOptionsWritable(cellType, prop, !!sources.service.setData) &&
|
|
381
|
+
!this._isReadonlyChip(prop);
|
|
382
|
+
const cached = sources.cells.get(prop.id);
|
|
383
|
+
if (cached?.type === prop.type &&
|
|
384
|
+
cached.optionsWritable === optionsWritable)
|
|
385
|
+
return cached.cell;
|
|
386
|
+
const { id, type } = prop;
|
|
387
|
+
const current$ = computed(() => {
|
|
388
|
+
const state = sources.sheet$.value;
|
|
389
|
+
if (state.status !== 'ready')
|
|
390
|
+
return undefined;
|
|
391
|
+
return state.properties.find(p => p.id === id && p.type === type);
|
|
392
|
+
});
|
|
393
|
+
const cell = createStandaloneCell(meta, {
|
|
394
|
+
propertyId: id,
|
|
395
|
+
name$: computed(() => current$.value?.name ?? ''),
|
|
396
|
+
data$: computed(() => {
|
|
397
|
+
const current = current$.value;
|
|
398
|
+
return current ? bandCellData(cellType, current) : {};
|
|
392
399
|
}),
|
|
393
|
-
|
|
400
|
+
value$: computed(() => bandCellValue(cellType, current$.value?.value)),
|
|
401
|
+
readonly$: computed(() => this._isReadonlyChip(current$.value)),
|
|
402
|
+
valueSet: value => {
|
|
403
|
+
const current = current$.peek();
|
|
404
|
+
if (current)
|
|
405
|
+
this._commit(current, cellType, value);
|
|
406
|
+
},
|
|
407
|
+
featureFlags$: this._featureFlags$,
|
|
408
|
+
serviceGet: key => std.getOptional(key),
|
|
409
|
+
// A chip creates and renames options only, never deletes, recolours
|
|
410
|
+
// or reorders one (product owner, 2026-10-14).
|
|
411
|
+
...(optionsWritable
|
|
412
|
+
? {
|
|
413
|
+
dataSet: (data) => {
|
|
414
|
+
const current = current$.peek();
|
|
415
|
+
if (current)
|
|
416
|
+
this._writeData(current, data);
|
|
417
|
+
},
|
|
418
|
+
optionEdits: 'create-rename',
|
|
419
|
+
}
|
|
420
|
+
: {}),
|
|
421
|
+
});
|
|
422
|
+
sources.cells.set(id, { type, optionsWritable, cell });
|
|
423
|
+
return cell;
|
|
394
424
|
}
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
case 'text':
|
|
403
|
-
return view.text;
|
|
404
|
-
default:
|
|
405
|
-
return this._t(TITLE_BAND_EMPTY);
|
|
406
|
-
}
|
|
425
|
+
_renderFallback(prop) {
|
|
426
|
+
const text = formatPropertyValue(prop, this._locale);
|
|
427
|
+
return html `<span
|
|
428
|
+
class="labre-title-band-chip-value labre-title-band-chip-text"
|
|
429
|
+
data-empty=${text ? 'false' : 'true'}
|
|
430
|
+
>${text || this._t(TITLE_BAND_EMPTY)}</span
|
|
431
|
+
>`;
|
|
407
432
|
}
|
|
408
|
-
_renderChip(prop, hasPanel) {
|
|
433
|
+
_renderChip(sources, prop, hasPanel) {
|
|
409
434
|
const pending = this._pending$.value.has(prop.id);
|
|
410
|
-
const
|
|
435
|
+
const cell = this._cellFor(sources, prop);
|
|
436
|
+
const editable = !!cell && !this._isReadonlyChip(prop);
|
|
411
437
|
const clickable = editable || hasPanel;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
438
|
+
// Without a cell the chip itself is what a keyboard reaches.
|
|
439
|
+
const focusable = !cell && hasPanel;
|
|
440
|
+
return html `<div
|
|
441
|
+
class="labre-title-band-chip"
|
|
415
442
|
data-testid="title-band-chip"
|
|
416
443
|
data-property-id=${prop.id}
|
|
417
|
-
data-empty=${
|
|
444
|
+
data-empty=${isPropertyValueEmpty(prop) ? 'true' : 'false'}
|
|
445
|
+
data-clickable=${clickable ? 'true' : 'false'}
|
|
418
446
|
aria-busy=${pending ? 'true' : 'false'}
|
|
419
|
-
|
|
420
|
-
|
|
447
|
+
role=${focusable ? 'button' : nothing}
|
|
448
|
+
tabindex=${focusable ? '0' : nothing}
|
|
449
|
+
@click=${(event) => {
|
|
450
|
+
if (clickable)
|
|
451
|
+
this._onChip(event, editable);
|
|
452
|
+
}}
|
|
453
|
+
@keydown=${(event) => {
|
|
454
|
+
if (!focusable || event.target !== event.currentTarget)
|
|
455
|
+
return;
|
|
456
|
+
if (event.key !== 'Enter' && event.key !== ' ')
|
|
457
|
+
return;
|
|
458
|
+
event.preventDefault();
|
|
459
|
+
this._onChip(event, false);
|
|
460
|
+
}}
|
|
421
461
|
>
|
|
422
462
|
<span class="labre-title-band-chip-name">${prop.name}</span>
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
463
|
+
${cell
|
|
464
|
+
? html `<dv-standalone-cell
|
|
465
|
+
class="labre-title-band-chip-value"
|
|
466
|
+
data-testid="title-band-cell"
|
|
467
|
+
role=${editable ? 'button' : nothing}
|
|
468
|
+
aria-label=${prop.name}
|
|
469
|
+
.cell=${cell}
|
|
470
|
+
.readonly=${!editable}
|
|
471
|
+
.placeholder=${this._t(TITLE_BAND_EMPTY)}
|
|
472
|
+
></dv-standalone-cell>`
|
|
473
|
+
: this._renderFallback(prop)}
|
|
474
|
+
</div>`;
|
|
427
475
|
}
|
|
428
476
|
_renderTools(sources, hasPanel) {
|
|
429
477
|
const canAdd = !!sources.service.add && !this._readonly;
|
|
@@ -519,7 +567,7 @@ let TitleBand = (() => {
|
|
|
519
567
|
${ToggleDownIcon()}
|
|
520
568
|
</button>`
|
|
521
569
|
: nothing}
|
|
522
|
-
${repeat(properties, prop => prop.id, prop => this._renderChip(prop, hasPanel))}
|
|
570
|
+
${repeat(properties, prop => prop.id, prop => this._renderChip(sources, prop, hasPanel))}
|
|
523
571
|
${this._renderTools(sources, hasPanel)}
|
|
524
572
|
</div>`;
|
|
525
573
|
}
|
|
@@ -530,32 +578,55 @@ let TitleBand = (() => {
|
|
|
530
578
|
// A link that opens nothing is a lie: no linked-document path, no row.
|
|
531
579
|
if (!std || !slots || pages.length === 0)
|
|
532
580
|
return nothing;
|
|
581
|
+
const label = this._t(TITLE_BAND_NOT_SHOWN);
|
|
582
|
+
const showHere = this._readonly ? null : this._t(TITLE_BAND_SHOW_HERE);
|
|
533
583
|
return html `<div
|
|
534
584
|
class="labre-title-band-row"
|
|
585
|
+
role="group"
|
|
586
|
+
aria-label=${label}
|
|
535
587
|
data-testid="title-band-not-shown"
|
|
536
588
|
>
|
|
537
|
-
<span class="labre-title-band-not-shown-label"
|
|
538
|
-
>${
|
|
589
|
+
<span class="labre-title-band-not-shown-label" aria-hidden="true"
|
|
590
|
+
>${label}</span
|
|
539
591
|
>
|
|
540
|
-
${repeat(pages, page => page.docId, page =>
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
event,
|
|
549
|
-
});
|
|
550
|
-
}}
|
|
592
|
+
${repeat(pages, page => page.docId, page => {
|
|
593
|
+
const title = page.title.trim() === '' ? this._t(DOC_UNTITLED) : page.title;
|
|
594
|
+
// A group named after the page, so a screen reader hears which
|
|
595
|
+
// page each "Show here" belongs to without a second wording.
|
|
596
|
+
return html `<span
|
|
597
|
+
class="labre-title-band-not-shown-item"
|
|
598
|
+
role="group"
|
|
599
|
+
aria-label=${title}
|
|
551
600
|
>
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
601
|
+
<button
|
|
602
|
+
data-testid="title-band-not-shown-page"
|
|
603
|
+
data-doc-id=${page.docId}
|
|
604
|
+
@click=${(event) => {
|
|
605
|
+
event.stopPropagation();
|
|
606
|
+
slots.docLinkClicked.next({
|
|
607
|
+
pageId: page.docId,
|
|
608
|
+
host: std.host,
|
|
609
|
+
event,
|
|
610
|
+
});
|
|
611
|
+
}}
|
|
557
612
|
>
|
|
558
|
-
|
|
613
|
+
${LinkedPageIcon()}
|
|
614
|
+
<span class="labre-title-band-chip-value">${title}</span>
|
|
615
|
+
</button>
|
|
616
|
+
${showHere
|
|
617
|
+
? html `<button
|
|
618
|
+
data-testid="title-band-show-here"
|
|
619
|
+
data-doc-id=${page.docId}
|
|
620
|
+
@click=${(event) => {
|
|
621
|
+
event.stopPropagation();
|
|
622
|
+
showPageHere(std, this.surface, page.docId);
|
|
623
|
+
}}
|
|
624
|
+
>
|
|
625
|
+
${showHere}
|
|
626
|
+
</button>`
|
|
627
|
+
: nothing}
|
|
628
|
+
</span>`;
|
|
629
|
+
})}
|
|
559
630
|
</div>`;
|
|
560
631
|
}
|
|
561
632
|
connectedCallback() {
|
|
@@ -565,7 +636,6 @@ let TitleBand = (() => {
|
|
|
565
636
|
// split the title) nor the canvas's (a press would start a drag).
|
|
566
637
|
this._disposables.addFromEvent(this, 'keydown', stopPropagation);
|
|
567
638
|
this._disposables.addFromEvent(this, 'pointerdown', stopPropagation);
|
|
568
|
-
this._disposables.add(() => this._menu?.close());
|
|
569
639
|
}
|
|
570
640
|
render() {
|
|
571
641
|
const std = this.std;
|
|
@@ -576,7 +646,7 @@ let TitleBand = (() => {
|
|
|
576
646
|
return nothing;
|
|
577
647
|
const sources = this._getSources(service);
|
|
578
648
|
const sheet = this._renderSheet(sources);
|
|
579
|
-
const notShown = this.
|
|
649
|
+
const notShown = this._renderNotShown(sources);
|
|
580
650
|
if (sheet === nothing && notShown === nothing)
|
|
581
651
|
return nothing;
|
|
582
652
|
return html `<div
|
|
@@ -594,44 +664,23 @@ let TitleBand = (() => {
|
|
|
594
664
|
get docId() { return this.#docId_accessor_storage; }
|
|
595
665
|
set docId(value) { this.#docId_accessor_storage = value; }
|
|
596
666
|
#surface_accessor_storage;
|
|
597
|
-
/** Where the band is drawn
|
|
667
|
+
/** Where the band is drawn: where "Show here" puts the card. */
|
|
598
668
|
get surface() { return this.#surface_accessor_storage; }
|
|
599
669
|
set surface(value) { this.#surface_accessor_storage = value; }
|
|
600
670
|
constructor() {
|
|
601
671
|
super(...arguments);
|
|
602
672
|
this._sources = null;
|
|
603
|
-
/** The editor menu open now, put away with the band. */
|
|
604
|
-
this._menu = null;
|
|
605
673
|
/** Collapse state when the host does not remember one. */
|
|
606
674
|
this._localCollapsed$ = signal(false);
|
|
607
675
|
/** Property ids whose `set` has not settled yet. */
|
|
608
676
|
this._pending$ = signal(new Set());
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
case 'select':
|
|
617
|
-
this._popSelect(target, prop);
|
|
618
|
-
return;
|
|
619
|
-
case 'multi-select':
|
|
620
|
-
this._popMultiSelect(target, prop);
|
|
621
|
-
return;
|
|
622
|
-
case 'date':
|
|
623
|
-
this._popDate(target, prop);
|
|
624
|
-
return;
|
|
625
|
-
case 'number':
|
|
626
|
-
this._popInput(target, prop, 'number');
|
|
627
|
-
return;
|
|
628
|
-
case 'text':
|
|
629
|
-
this._popInput(target, prop, 'text');
|
|
630
|
-
return;
|
|
631
|
-
default:
|
|
632
|
-
this._openPanel();
|
|
633
|
-
}
|
|
634
|
-
};
|
|
677
|
+
/** The table's own flags, so a number reads as it does in a cell. */
|
|
678
|
+
this._featureFlags$ = computed(() => ({
|
|
679
|
+
enable_number_formatting: this.std
|
|
680
|
+
?.getOptional(FeatureFlagService)
|
|
681
|
+
?.getFlag('enable_database_number_formatting') ?? false,
|
|
682
|
+
enable_table_virtual_scroll: false,
|
|
683
|
+
}));
|
|
635
684
|
this._openPanel = () => {
|
|
636
685
|
if (!this.std)
|
|
637
686
|
return;
|
|
@@ -639,6 +688,15 @@ let TitleBand = (() => {
|
|
|
639
688
|
.getOptional(PropertiesPanelProvider)
|
|
640
689
|
?.open({ scope: 'page', docId: this.docId });
|
|
641
690
|
};
|
|
691
|
+
this._onChip = (event, editable) => {
|
|
692
|
+
event.stopPropagation();
|
|
693
|
+
const chip = event.currentTarget;
|
|
694
|
+
if (editable) {
|
|
695
|
+
chip.querySelector('dv-standalone-cell')?.edit();
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
this._openPanel();
|
|
699
|
+
};
|
|
642
700
|
this.#std_accessor_storage = __runInitializers(this, _std_initializers, null);
|
|
643
701
|
this.#docId_accessor_storage = (__runInitializers(this, _std_extraInitializers), __runInitializers(this, _docId_initializers, ''));
|
|
644
702
|
this.#surface_accessor_storage = (__runInitializers(this, _docId_extraInitializers), __runInitializers(this, _surface_initializers, 'page'));
|
|
@@ -23,12 +23,15 @@ export declare const TITLE_BAND_COLLAPSE: ChromeWording;
|
|
|
23
23
|
export declare const TITLE_BAND_EXPAND: ChromeWording;
|
|
24
24
|
/** The accessible name of the skeleton drawn while the sheet loads. */
|
|
25
25
|
export declare const TITLE_BAND_LOADING: ChromeWording;
|
|
26
|
-
/** Clears a select or a date from its editor. */
|
|
27
|
-
export declare const TITLE_BAND_CLEAR: ChromeWording;
|
|
28
26
|
/**
|
|
29
|
-
* The
|
|
30
|
-
*
|
|
27
|
+
* The row of child pages the document holds but does not display, under the
|
|
28
|
+
* title and in the note header (ADR 0035 §9d and its 2026-10-13 amendment).
|
|
31
29
|
*/
|
|
32
30
|
export declare const TITLE_BAND_NOT_SHOWN: ChromeWording;
|
|
31
|
+
/**
|
|
32
|
+
* The button beside each page of that row: inserts a card of the page here
|
|
33
|
+
* (labre ADR-0045 §7).
|
|
34
|
+
*/
|
|
35
|
+
export declare const TITLE_BAND_SHOW_HERE: ChromeWording;
|
|
33
36
|
/** Every wording this package declares, in the order it renders them. */
|
|
34
37
|
export declare const DOC_TITLE_WORDINGS: readonly ChromeWording[];
|