@unson/brainbase-mcp 0.50.14 → 0.50.18
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/meeting-minutes.d.ts +7 -0
- package/dist/meeting-minutes.js +10 -3
- package/package.json +2 -2
- package/ui/brainbase-tokens.css +1 -0
- package/ui/meeting-minutes-page.css +149 -0
- package/ui/meeting-minutes-page.js +276 -0
- package/ui/meeting-minutes.css +2 -0
- package/ui/meeting-minutes.js +231 -29
- package/ui/workspace-kit.css +95 -2
- package/ui/workspace-kit.js +215 -28
- package/ui/world/world-placement.js +61 -0
package/ui/meeting-minutes.js
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
import * as workspaceKit from './workspace-kit.js?capability=search-band-v1';
|
|
17
17
|
const { workspaceActionIcon, workspaceSearchBand, workspaceCompactToolbar, workspaceCombobox, workspaceDetailDrawer } = workspaceKit;
|
|
18
18
|
|
|
19
|
+
import { createMinutesPage, minutesListState, minutesDateCell, minutesConfirmation } from './meeting-minutes-page.js';
|
|
20
|
+
|
|
19
21
|
export const MEETING_MINUTES_UI_CONTRACT_VERSION = 'brainbase.meeting-minutes-ui.v1';
|
|
20
22
|
|
|
21
23
|
const WEEKDAYS = ['日', '月', '火', '水', '木', '金', '土'];
|
|
@@ -681,6 +683,9 @@ export function createMeetingMinutesUI({
|
|
|
681
683
|
rail = null,
|
|
682
684
|
detailPresentation = 'inline',
|
|
683
685
|
toolbarPresentation = 'expanded',
|
|
686
|
+
pagePresentation,
|
|
687
|
+
participantIdentities,
|
|
688
|
+
meetingProject,
|
|
684
689
|
page = null,
|
|
685
690
|
document: explicitDocument,
|
|
686
691
|
fetcher,
|
|
@@ -739,13 +744,22 @@ export function createMeetingMinutesUI({
|
|
|
739
744
|
let railProjectSlot = null;
|
|
740
745
|
let railProjectMeeting = null;
|
|
741
746
|
|
|
742
|
-
const
|
|
747
|
+
const tablePage = pagePresentation === 'table';
|
|
748
|
+
let pageUI = null;
|
|
749
|
+
let draft = null;
|
|
750
|
+
let pendingLeave = null;
|
|
751
|
+
let selectedDocumentId = null;
|
|
752
|
+
let versionBox = null;
|
|
753
|
+
const detailNotice = makeElement(doc,'span',{className:'mp-saved',attrs:{role:'status'}});
|
|
754
|
+
const detailTools = makeElement(doc, 'div', { className: 'mp-detail-tools' });
|
|
755
|
+
const searchBand = !tablePage && toolbarPresentation === 'search-band';
|
|
743
756
|
if (searchBand && typeof workspaceSearchBand !== 'function') {
|
|
744
757
|
throw new Error('検索帯の共通部品を読み込めませんでした。ページを再読み込みしてください。');
|
|
745
758
|
}
|
|
746
759
|
const compact = searchBand || toolbarPresentation === 'compact';
|
|
747
760
|
const screen = makeElement(doc, 'div', { className: `bb-minutes-screen${compact ? ' bb-minutes-compact bb-ws-neutral-controls' : ''}`, attrs: { 'data-contract-version': MEETING_MINUTES_UI_CONTRACT_VERSION } });
|
|
748
761
|
if (searchBand) screen.classList.add('bb-minutes-search-band');
|
|
762
|
+
if (tablePage) screen.classList.add('bb-minutes-table');
|
|
749
763
|
const heading = makeElement(doc, 'header', { className: 'bb-minutes-heading bb-ws-page-head' });
|
|
750
764
|
heading.append(
|
|
751
765
|
makeElement(doc, 'div', { className: 'bb-minutes-eyebrow', textContent: page?.source ?? '正本の議事録' }),
|
|
@@ -764,8 +778,14 @@ export function createMeetingMinutesUI({
|
|
|
764
778
|
});
|
|
765
779
|
const detailPane = makeElement(doc, 'section', { className: 'bb-minutes-detail-pane', attrs: { 'aria-label': '議事録詳細' } });
|
|
766
780
|
let createProjectBox = null;
|
|
767
|
-
|
|
768
|
-
const
|
|
781
|
+
let createParticipantBox = null;
|
|
782
|
+
const cleanupCreateProject = () => { createProjectBox?.destroy(); createProjectBox = null; createParticipantBox?.destroy(); createParticipantBox = null; };
|
|
783
|
+
const detailDrawer = tablePage ? workspaceKit.workspaceInputFrame(doc, {
|
|
784
|
+
title: '議事録の詳細', showTitle: false, tools: [detailTools],
|
|
785
|
+
beforeClose: () => requestLeave(() => detailDrawer.close()),
|
|
786
|
+
onClose: () => { cleanupCreateProject(); detailRequestGeneration += 1; draft = null; state.editingMinutesId = null; detailTools.replaceChildren(); },
|
|
787
|
+
opener: () => listPane.querySelector('.mp-row[aria-expanded="true"]') ?? listPane,
|
|
788
|
+
}) : detailPresentation === 'drawer' ? workspaceDetailDrawer(doc, {
|
|
769
789
|
title: '議事録の詳細', onClose: cleanupCreateProject, opener: () => detailPane.querySelector('.bb-minutes-create-form') ? toolbar.querySelector('.bb-minutes-button.is-primary') : listPane.querySelector('.bb-minutes-meeting-item.is-selected') ?? listPane,
|
|
770
790
|
}) : null;
|
|
771
791
|
if (detailDrawer) {
|
|
@@ -774,9 +794,14 @@ export function createMeetingMinutesUI({
|
|
|
774
794
|
columns.append(listPane);
|
|
775
795
|
const scope = makeElement(doc, 'div', { className: 'bb-minutes-screen bb-minutes-drawer-content' });
|
|
776
796
|
if (compact) scope.classList.add('bb-ws-neutral-controls');
|
|
777
|
-
scope.append(detailPane);
|
|
797
|
+
scope.append(detailPane);
|
|
798
|
+
if (tablePage) {
|
|
799
|
+
scope.classList.add('mp-drawer-content');
|
|
800
|
+
detailDrawer.fields.classList.add('mp-detail-fields');
|
|
801
|
+
detailDrawer.fields.append(scope);
|
|
802
|
+
} else detailDrawer.setContent(scope);
|
|
778
803
|
} else columns.append(listPane, detailPane);
|
|
779
|
-
if (compact) screen.append(heading, toolbar, status, columns);
|
|
804
|
+
if (compact || tablePage) screen.append(heading, toolbar, status, columns);
|
|
780
805
|
else screen.append(heading, status, toolbar, columns);
|
|
781
806
|
root.replaceChildren(screen);
|
|
782
807
|
|
|
@@ -812,12 +837,68 @@ export function createMeetingMinutesUI({
|
|
|
812
837
|
const keywordField = filterField('キーワード', keyword, 'is-keyword');
|
|
813
838
|
const sortField = filterField('並べ替え', sortBox.root);
|
|
814
839
|
let compactToolbar = null;
|
|
815
|
-
if (compact) {
|
|
840
|
+
if (compact && !tablePage) {
|
|
816
841
|
const filters = makeElement(doc, 'div', { className: 'bb-minutes-compact-filters' });
|
|
817
842
|
filters.append(hostSlot, filterField('期間', period, 'is-period'), participantField, statusField);
|
|
818
843
|
compactToolbar = searchBand ? workspaceSearchBand(doc, { root: toolbar, query: keyword, filters, sort: sortBox, reset, onResetSort: () => { state.sort = SORTS[0].value; renderList(); } }) : workspaceCompactToolbar(doc, { root: toolbar, query: keyword, filters, sort: sortBox, reset });
|
|
819
|
-
} else toolbar.append(keywordField, hostSlot, filterField('期間', period, 'is-period'), participantField, statusField, sortField, reset);
|
|
844
|
+
} else if (!tablePage) toolbar.append(keywordField, hostSlot, filterField('期間', period, 'is-period'), participantField, statusField, sortField, reset);
|
|
820
845
|
const hostBoxes = new Map();
|
|
846
|
+
if (tablePage) {
|
|
847
|
+
pageUI = createMinutesPage({ doc, state, screen, toolbar, listPane, keyword, clock,
|
|
848
|
+
hostFilters: currentHostFilters,
|
|
849
|
+
principalIds: () => typeof participantIdentities === 'function' ? participantIdentities() : [typeof currentPrincipalId === 'function' ? currentPrincipalId() : currentPrincipalId],
|
|
850
|
+
projectContext: meeting => {
|
|
851
|
+
if (typeof meetingProject === 'function') return meetingProject(meeting);
|
|
852
|
+
const label = meetingLabelText(meetingLabel, meeting).replace(/^プロジェクト:\s*/u, '');
|
|
853
|
+
return { label };
|
|
854
|
+
},
|
|
855
|
+
sortMeetings, matchesFilters, listState: minutesListState, versionNumber: listedVersionNumber,
|
|
856
|
+
onRender: renderList, onCreate: () => runLeave(renderCreateForm), canCreate,
|
|
857
|
+
appendCreateUnavailable, onOpen: id => runLeave(() => loadDetail(id)),
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
function requestLeave(action) {
|
|
862
|
+
if (tablePage && draft?.saving) return false;
|
|
863
|
+
if (!tablePage || !draft || draft.body === draft.original) return true;
|
|
864
|
+
pendingLeave = action;
|
|
865
|
+
let notice = detailDrawer.dialog.querySelector('.mp-unsaved');
|
|
866
|
+
if (!notice) {
|
|
867
|
+
notice = makeElement(doc, 'div', { className: 'mp-unsaved', attrs: { role: 'alert' } });
|
|
868
|
+
notice.append(makeElement(doc, 'p', { textContent: '保存していない変更があります。' }));
|
|
869
|
+
notice.append(button(doc, '編集を続ける', () => { pendingLeave = null; notice.remove(); detailDrawer.dialog.setAttribute('closedby','any'); detailPane.querySelector('textarea')?.focus(); }));
|
|
870
|
+
notice.append(button(doc, '変更を破棄', () => {
|
|
871
|
+
const next = pendingLeave; pendingLeave = null; draft = null; state.editingMinutesId = null; notice.remove(); detailDrawer.dialog.setAttribute('closedby','any'); next?.();
|
|
872
|
+
}));
|
|
873
|
+
detailDrawer.footer.prepend(notice);
|
|
874
|
+
}
|
|
875
|
+
detailDrawer.dialog.setAttribute('closedby','none');
|
|
876
|
+
notice.querySelector('button')?.focus();
|
|
877
|
+
return false;
|
|
878
|
+
}
|
|
879
|
+
function runLeave(action) { if (requestLeave(action)) action(); }
|
|
880
|
+
function decorateDetailTools(documentRecord, selected, versions, detail) {
|
|
881
|
+
detailTools.replaceChildren(detailNotice);
|
|
882
|
+
const native = selected && typeof selected.body === 'string' && !isRecord(selected.source_ref);
|
|
883
|
+
const latest = documentRecord.current_version_id === selected?.version_id;
|
|
884
|
+
if (!native || !latest || documentRecord.withdrawal || !canEdit()) return;
|
|
885
|
+
const editing = state.editingMinutesId === documentRecord.minutes_id;
|
|
886
|
+
const toggle = workspaceKit.workspaceButton(doc, {
|
|
887
|
+
attrs: { 'aria-label': editing ? '編集をやめる' : '本文を編集する', title: editing ? '編集をやめる' : '本文を編集する' },
|
|
888
|
+
onClick: () => {
|
|
889
|
+
const act = () => {
|
|
890
|
+
state.editingMinutesId = editing ? null : documentRecord.minutes_id;
|
|
891
|
+
draft = editing ? null : { original: selected.body, body: selected.body };
|
|
892
|
+
rerender(detail, documentRecord, selected);
|
|
893
|
+
};
|
|
894
|
+
if (editing) runLeave(act); else act();
|
|
895
|
+
},
|
|
896
|
+
});
|
|
897
|
+
if (editing) toggle.classList.add('is-editing');
|
|
898
|
+
toggle.append(workspaceKit.workspaceActionIcon(doc, editing ? 'undo' : 'edit'));
|
|
899
|
+
detailTools.append(toggle);
|
|
900
|
+
}
|
|
901
|
+
|
|
821
902
|
|
|
822
903
|
function currentHostFilters() {
|
|
823
904
|
let filters = hostFilters;
|
|
@@ -925,7 +1006,14 @@ export function createMeetingMinutesUI({
|
|
|
925
1006
|
function setStatus(message, kind = '') {
|
|
926
1007
|
status.textContent = message;
|
|
927
1008
|
status.className = `bb-minutes-status${kind ? ` is-${kind}` : ''}`;
|
|
928
|
-
|
|
1009
|
+
if (tablePage && detailDrawer.dialog.open) {
|
|
1010
|
+
detailNotice.textContent = kind === 'success' ? '保存しました' : '';
|
|
1011
|
+
if (kind === 'error' && !state.detailError) {
|
|
1012
|
+
detailPane.querySelector('.mp-save-error')?.remove();
|
|
1013
|
+
detailPane.prepend(makeElement(doc,'p',{className:'mp-save-error bb-minutes-warning',textContent:message,attrs:{role:'alert'}}));
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
status.hidden = (compact || tablePage) && kind !== 'error' && (/^(?:(?:\d+件の会議|会議詳細)を読み込みました。|まだ議事録はありません。)$/.test(message) || (Boolean(detailDrawer) && message === '会議詳細を読み込んでいます。'));
|
|
929
1017
|
}
|
|
930
1018
|
|
|
931
1019
|
async function call(path, init = {}) {
|
|
@@ -1174,7 +1262,7 @@ export function createMeetingMinutesUI({
|
|
|
1174
1262
|
return;
|
|
1175
1263
|
}
|
|
1176
1264
|
const row = makeElement(doc, 'div', { className: 'bb-minutes-participants-row' });
|
|
1177
|
-
row.append(makeElement(doc, 'span', { className: 'bb-minutes-connection-label', textContent: '参加者' }));
|
|
1265
|
+
if (!tablePage) row.append(makeElement(doc, 'span', { className: 'bb-minutes-connection-label', textContent: '参加者' }));
|
|
1178
1266
|
if (!value) {
|
|
1179
1267
|
row.append(makeElement(doc, 'p', { className: 'bb-minutes-connection-note', textContent: '読み込んでいます' }));
|
|
1180
1268
|
slot.replaceChildren(row);
|
|
@@ -1469,7 +1557,14 @@ export function createMeetingMinutesUI({
|
|
|
1469
1557
|
}
|
|
1470
1558
|
|
|
1471
1559
|
function renderList() {
|
|
1560
|
+
pageUI?.capture();
|
|
1472
1561
|
clear(listPane);
|
|
1562
|
+
if (tablePage) {
|
|
1563
|
+
const meetings = state.meetings.filter(entry => isRecord(entry?.meeting) && typeof entry.meeting.meeting_id === 'string');
|
|
1564
|
+
pageUI?.render(meetings);
|
|
1565
|
+
if (state.listError) appendLoadError(listPane, `会議一覧を読み込めませんでした。理由: ${state.listError}`, () => loadMeetings({ restoreFocus: true }));
|
|
1566
|
+
appendMore(listPane); return;
|
|
1567
|
+
}
|
|
1473
1568
|
const head = makeElement(doc, 'div', { className: 'bb-minutes-pane-head' });
|
|
1474
1569
|
const meetings = state.meetings.filter((entry) => isRecord(entry?.meeting) && typeof entry.meeting.meeting_id === 'string');
|
|
1475
1570
|
renderToolbar(meetings);
|
|
@@ -1596,7 +1691,8 @@ export function createMeetingMinutesUI({
|
|
|
1596
1691
|
const withdrawal = isRecord(documentRecord.withdrawal) ? documentRecord.withdrawal : null;
|
|
1597
1692
|
const native = isRecord(selected) && typeof selected.body === 'string' && !isRecord(selected.source_ref);
|
|
1598
1693
|
const editing = state.editingMinutesId === documentRecord.minutes_id && native && !viewingOld && !withdrawal && canEdit();
|
|
1599
|
-
const section = makeElement(doc, 'section', { className: 'bb-minutes-document' });
|
|
1694
|
+
const section = makeElement(doc, 'section', { className: tablePage ? 'mp-detail-section' : 'bb-minutes-document' });
|
|
1695
|
+
if (tablePage) decorateDetailTools(documentRecord, selected, versions, detail);
|
|
1600
1696
|
if (withdrawal) {
|
|
1601
1697
|
const when = formatStamp(withdrawal.withdrawn_at);
|
|
1602
1698
|
const who = text(withdrawal.actor_id);
|
|
@@ -1625,11 +1721,13 @@ export function createMeetingMinutesUI({
|
|
|
1625
1721
|
return;
|
|
1626
1722
|
}
|
|
1627
1723
|
confirm.disabled = true;
|
|
1724
|
+
const generation = detailRequestGeneration;
|
|
1628
1725
|
try {
|
|
1629
1726
|
await mutate(`/${encodeURIComponent(detail.meeting.meeting_id)}/minutes/${encodeURIComponent(documentRecord.minutes_id)}/confirm`, {
|
|
1630
1727
|
version_id: selected.version_id,
|
|
1631
1728
|
expected_revision: documentRecord.revision,
|
|
1632
1729
|
});
|
|
1730
|
+
if (tablePage && (disposed || generation !== detailRequestGeneration)) return;
|
|
1633
1731
|
await loadDetail(detail.meeting.meeting_id);
|
|
1634
1732
|
if (!state.detailError) setStatus(`${selectedLabel}を確認済みにしました。`, 'success');
|
|
1635
1733
|
} catch (error) {
|
|
@@ -1639,7 +1737,7 @@ export function createMeetingMinutesUI({
|
|
|
1639
1737
|
}, { className: 'bb-minutes-button is-primary' });
|
|
1640
1738
|
actions.append(confirm);
|
|
1641
1739
|
}
|
|
1642
|
-
if (native && !viewingOld && canEdit()) {
|
|
1740
|
+
if (!tablePage && native && !viewingOld && canEdit()) {
|
|
1643
1741
|
actions.append(button(doc, '編集', () => {
|
|
1644
1742
|
state.editingMinutesId = documentRecord.minutes_id;
|
|
1645
1743
|
state.withdrawingMinutesId = null;
|
|
@@ -1654,7 +1752,8 @@ export function createMeetingMinutesUI({
|
|
|
1654
1752
|
}, { className: 'bb-minutes-button is-quiet' }));
|
|
1655
1753
|
}
|
|
1656
1754
|
}
|
|
1657
|
-
|
|
1755
|
+
if (tablePage) { detailDrawer.footer.replaceChildren(...actions.children); }
|
|
1756
|
+
else section.append(actions);
|
|
1658
1757
|
if (!withdrawal && canEdit() && !mayWithdraw(documentRecord)) {
|
|
1659
1758
|
section.append(makeElement(doc, 'p', { className: 'bb-minutes-withdraw-guard', textContent: '取り下げられるのは、この議事録を作った人だけです。' }));
|
|
1660
1759
|
}
|
|
@@ -1680,7 +1779,17 @@ export function createMeetingMinutesUI({
|
|
|
1680
1779
|
textContent: [`${selectedLabel}${latestMark}`, historyStamp(selected, clock()), creatorFact(selected)].join('・'),
|
|
1681
1780
|
}));
|
|
1682
1781
|
section.append(meta);
|
|
1683
|
-
if (versions.length >= 2) {
|
|
1782
|
+
if (tablePage && versions.length >= 2) {
|
|
1783
|
+
versionBox?.destroy();
|
|
1784
|
+
versionBox = workspaceCombobox(doc, {
|
|
1785
|
+
label: '版', appearance: 'compact', searchable: false, showHints: false, showCount: false,
|
|
1786
|
+
value: selected?.version_id,
|
|
1787
|
+
options: [...versions].reverse().map(v => ({ value: v.version_id, label: `${versionLabel(versions,v)}${v.version_id===latest?.version_id?'(最新)':''}` })),
|
|
1788
|
+
onChange: value => runLeave(() => { state.editingMinutesId=null; draft=null; rerender(detail,documentRecord,versions.find(v=>v.version_id===value)); }),
|
|
1789
|
+
});
|
|
1790
|
+
meta.prepend(versionBox.root); meta.classList.add('mp-version-line');
|
|
1791
|
+
}
|
|
1792
|
+
if (!tablePage && versions.length >= 2) {
|
|
1684
1793
|
const history = makeElement(doc, 'div', { className: 'bb-minutes-version-history is-collapsed', attrs: { 'aria-label': '版の履歴' } });
|
|
1685
1794
|
const historyButton = button(doc, `版の履歴(${versions.length}件)`, () => {
|
|
1686
1795
|
const collapsed = history.className.includes('is-collapsed');
|
|
@@ -1743,8 +1852,14 @@ export function createMeetingMinutesUI({
|
|
|
1743
1852
|
function renderEditForm(detail, documentRecord, selected, versions) {
|
|
1744
1853
|
const form = makeElement(doc, 'form', { className: 'bb-minutes-edit-form' });
|
|
1745
1854
|
const field = labelInput(doc, '本文', { type: 'textarea', name: 'body', value: selected.body });
|
|
1746
|
-
field.input.value = selected.body;
|
|
1747
|
-
field.input.rows = 16;
|
|
1855
|
+
field.input.value = draft?.body ?? selected.body;
|
|
1856
|
+
field.input.rows = tablePage ? 10 : 16;
|
|
1857
|
+
if (tablePage) {
|
|
1858
|
+
field.input.className = 'mp-edit-body';
|
|
1859
|
+
field.wrapper.querySelector('.bb-minutes-label')?.classList.add('bb-ws-visually-hidden');
|
|
1860
|
+
field.input.addEventListener('input', () => { draft = { original: selected.body, body: field.input.value }; });
|
|
1861
|
+
}
|
|
1862
|
+
if (tablePage) form.classList.add('mp-edit-form');
|
|
1748
1863
|
form.append(
|
|
1749
1864
|
field.wrapper,
|
|
1750
1865
|
makeElement(doc, 'p', { className: 'bb-minutes-edit-note', textContent: `保存すると第${versions.length + 1}版になります。前の版は残ります。` }),
|
|
@@ -1756,8 +1871,9 @@ export function createMeetingMinutesUI({
|
|
|
1756
1871
|
rerender(detail, documentRecord, selected);
|
|
1757
1872
|
});
|
|
1758
1873
|
const row = makeElement(doc, 'div', { className: 'bb-minutes-actions' });
|
|
1759
|
-
|
|
1760
|
-
|
|
1874
|
+
if (tablePage) {
|
|
1875
|
+
form.id = 'bb-minutes-edit-body'; save.setAttribute('form',form.id); detailDrawer.footer.replaceChildren(save);
|
|
1876
|
+
} else { row.append(save, cancel); form.append(row); }
|
|
1761
1877
|
form.addEventListener('submit', async (event) => {
|
|
1762
1878
|
event.preventDefault();
|
|
1763
1879
|
if (!canEdit()) {
|
|
@@ -1766,16 +1882,26 @@ export function createMeetingMinutesUI({
|
|
|
1766
1882
|
return;
|
|
1767
1883
|
}
|
|
1768
1884
|
save.disabled = true;
|
|
1885
|
+
if (tablePage) {
|
|
1886
|
+
draft.saving=true; field.input.readOnly=true;
|
|
1887
|
+
detailTools.querySelector('button')?.setAttribute('disabled','');
|
|
1888
|
+
versionBox?.update({disabled:true}); save.textContent='保存しています。';
|
|
1889
|
+
}
|
|
1890
|
+
const generation = detailRequestGeneration;
|
|
1769
1891
|
try {
|
|
1770
1892
|
await mutate(`/${encodeURIComponent(detail.meeting.meeting_id)}/minutes/${encodeURIComponent(documentRecord.minutes_id)}`, {
|
|
1771
1893
|
body: field.input.value,
|
|
1772
1894
|
expected_revision: documentRecord.revision,
|
|
1773
1895
|
});
|
|
1896
|
+
if (tablePage && (disposed || generation !== detailRequestGeneration)) return;
|
|
1774
1897
|
state.editingMinutesId = null;
|
|
1898
|
+
const savedDraft = draft; draft = null;
|
|
1775
1899
|
await loadDetail(detail.meeting.meeting_id);
|
|
1776
1900
|
if (!state.detailError) setStatus(`第${versions.length + 1}版として保存しました。確認待ちです。`, 'success');
|
|
1901
|
+
else if (tablePage && savedDraft) { savedDraft.saving=false; draft=savedDraft; state.editingMinutesId=documentRecord.minutes_id; rerender(detail,documentRecord,selected); }
|
|
1777
1902
|
} catch (error) {
|
|
1778
1903
|
save.disabled = false;
|
|
1904
|
+
if (tablePage) { draft.saving=false; field.input.readOnly=false; detailTools.querySelector('button')?.removeAttribute('disabled'); versionBox?.update({disabled:false}); save.textContent='新しい版として保存'; }
|
|
1779
1905
|
setStatus(error instanceof Error ? error.message : '新しい版を保存できませんでした。', 'error');
|
|
1780
1906
|
}
|
|
1781
1907
|
});
|
|
@@ -1802,12 +1928,15 @@ export function createMeetingMinutesUI({
|
|
|
1802
1928
|
return;
|
|
1803
1929
|
}
|
|
1804
1930
|
confirm.disabled = true;
|
|
1931
|
+
const generation = detailRequestGeneration;
|
|
1805
1932
|
try {
|
|
1806
1933
|
await mutate(`/${encodeURIComponent(detail.meeting.meeting_id)}/minutes/${encodeURIComponent(documentRecord.minutes_id)}/withdraw`, {
|
|
1807
1934
|
expected_revision: documentRecord.revision,
|
|
1808
1935
|
});
|
|
1936
|
+
if (tablePage && (disposed || generation !== detailRequestGeneration)) return;
|
|
1809
1937
|
state.withdrawingMinutesId = null;
|
|
1810
1938
|
await loadMeetings();
|
|
1939
|
+
if (tablePage && (disposed || !detailDrawer.dialog.open)) return;
|
|
1811
1940
|
await loadDetail(detail.meeting.meeting_id);
|
|
1812
1941
|
if (!state.detailError) setStatus('議事録を取り下げました。', 'success');
|
|
1813
1942
|
} catch (error) {
|
|
@@ -1829,6 +1958,8 @@ export function createMeetingMinutesUI({
|
|
|
1829
1958
|
|
|
1830
1959
|
function renderDetail(detail, documentRecord = null, selectedVersion = null) {
|
|
1831
1960
|
detailDrawer?.setTitle?.('議事録の詳細');
|
|
1961
|
+
versionBox?.destroy(); versionBox = null;
|
|
1962
|
+
if (tablePage) { detailDrawer.dialog.classList.add('has-tools'); detailDrawer.top.replaceChildren(); detailDrawer.footer.replaceChildren(); detailTools.replaceChildren(); }
|
|
1832
1963
|
clear(detailPane);
|
|
1833
1964
|
connectionsSlot = null;
|
|
1834
1965
|
participantsSlot = null;
|
|
@@ -1863,15 +1994,34 @@ export function createMeetingMinutesUI({
|
|
|
1863
1994
|
className: 'bb-minutes-item-meta',
|
|
1864
1995
|
textContent: participants ? `${when} / ${participants}` : when,
|
|
1865
1996
|
}));
|
|
1866
|
-
|
|
1867
|
-
|
|
1997
|
+
if (tablePage) {
|
|
1998
|
+
const context = pageUI.project(meeting);
|
|
1999
|
+
const card = makeElement(doc, 'div', { className: 'mp-detail-card' });
|
|
2000
|
+
card.style.setProperty('--mp-project-stripe', context.stripe);
|
|
2001
|
+
card.append(makeElement(doc, 'h2', { textContent: text(meeting.title, '無題の会議') }));
|
|
2002
|
+
const meta = makeElement(doc, 'div', { className: 'mp-card-meta' });
|
|
2003
|
+
meta.append(minutesConfirmation(doc, minutesListState(detail)), context.root); card.append(meta);
|
|
2004
|
+
detailDrawer.top.replaceChildren(card);
|
|
2005
|
+
const facts = makeElement(doc, 'div', { className: 'mp-facts' });
|
|
2006
|
+
facts.append(workspaceKit.workspaceFormRow(doc, { label: '日時', control: makeElement(doc, 'span', { textContent: when }), appearance: 'quiet' }));
|
|
2007
|
+
const people = makeElement(doc, 'div', { className: 'mp-participant-choices' });
|
|
2008
|
+
for (const name of meeting.participant_ids ?? []) people.append(makeElement(doc, 'span', { textContent: name }));
|
|
2009
|
+
if (!people.children.length) people.textContent = '記録がありません';
|
|
2010
|
+
facts.append(workspaceKit.workspaceFormRow(doc, { label: '参加した人', control: people, appearance: 'quiet' }));
|
|
2011
|
+
if (hasParticipants()) { participantsSlot=people; participantsSlot.classList.add('mp-participants-control'); }
|
|
2012
|
+
const currentDocument = (detail.minutes ?? []).find(d => d.minutes_id === selectedDocumentId) ?? detail.minutes?.[0];
|
|
2013
|
+
const currentVersion = detail.versions.find(v => v.version_id === currentDocument?.current_version_id);
|
|
2014
|
+
facts.append(workspaceKit.workspaceFormRow(doc, { label: '確認', control: makeElement(doc, 'span', { textContent: currentVersion?.confirmation ? confirmationDetail(currentVersion.confirmation) : 'まだだれも確認していません' }), appearance: 'quiet' }));
|
|
2015
|
+
detailPane.append(facts);
|
|
2016
|
+
} else detailPane.append(header);
|
|
2017
|
+
if (!tablePage) participantsSlot = null;
|
|
1868
2018
|
if (hasParticipants()) {
|
|
1869
|
-
participantsSlot = makeElement(doc, 'section', {
|
|
2019
|
+
if (!tablePage) participantsSlot = makeElement(doc, 'section', {
|
|
1870
2020
|
className: 'bb-minutes-participants',
|
|
1871
2021
|
attrs: { 'aria-label': '参加者' },
|
|
1872
2022
|
});
|
|
1873
2023
|
fillParticipants(participantsSlot, meeting);
|
|
1874
|
-
detailPane.append(participantsSlot);
|
|
2024
|
+
if (!tablePage) detailPane.append(participantsSlot);
|
|
1875
2025
|
}
|
|
1876
2026
|
if (hasConnections()) {
|
|
1877
2027
|
connectionsSlot = makeElement(doc, 'section', {
|
|
@@ -1879,7 +2029,7 @@ export function createMeetingMinutesUI({
|
|
|
1879
2029
|
attrs: { 'aria-label': 'この会議から' },
|
|
1880
2030
|
});
|
|
1881
2031
|
fillConnections(connectionsSlot, currentConnections(meeting));
|
|
1882
|
-
detailPane.append(connectionsSlot);
|
|
2032
|
+
if (!tablePage) detailPane.append(connectionsSlot);
|
|
1883
2033
|
}
|
|
1884
2034
|
const documents = Array.isArray(detail.minutes) ? detail.minutes : [];
|
|
1885
2035
|
const noticeState = { placed: false };
|
|
@@ -1888,7 +2038,14 @@ export function createMeetingMinutesUI({
|
|
|
1888
2038
|
appendReadOnlyNotice(detailPane, null);
|
|
1889
2039
|
noticeState.placed = true;
|
|
1890
2040
|
}
|
|
2041
|
+
if (tablePage && documents.length > 1) {
|
|
2042
|
+
const active = documentRecord?.minutes_id ?? selectedDocumentId ?? documents[0].minutes_id;
|
|
2043
|
+
const controls = workspaceKit.workspacePills(doc, { label: '議事録', items: documents.map(d => ({ value: d.minutes_id, label: d.title || '議事録' })), value: active,
|
|
2044
|
+
onChange: value => runLeave(() => { selectedDocumentId=value; state.editingMinutesId=null; draft=null; rerender(detail,documents.find(d=>d.minutes_id===value),null); }),
|
|
2045
|
+
}); controls.classList.add('mp-document-tabs'); detailPane.append(controls);
|
|
2046
|
+
}
|
|
1891
2047
|
for (const documentRecordValue of documents) {
|
|
2048
|
+
if (tablePage && documentRecordValue.minutes_id !== (documentRecord?.minutes_id ?? selectedDocumentId ?? documents[0]?.minutes_id)) continue;
|
|
1892
2049
|
detailPane.append(renderVersion(
|
|
1893
2050
|
detail,
|
|
1894
2051
|
documentRecordValue,
|
|
@@ -1896,6 +2053,7 @@ export function createMeetingMinutesUI({
|
|
|
1896
2053
|
noticeState,
|
|
1897
2054
|
));
|
|
1898
2055
|
}
|
|
2056
|
+
if (tablePage && connectionsSlot) { connectionsSlot.classList.add('mp-detail-section'); detailPane.append(connectionsSlot); }
|
|
1899
2057
|
}
|
|
1900
2058
|
|
|
1901
2059
|
function renderCreateUnavailable() {
|
|
@@ -1907,6 +2065,7 @@ export function createMeetingMinutesUI({
|
|
|
1907
2065
|
|
|
1908
2066
|
function renderCreateForm() {
|
|
1909
2067
|
detailDrawer?.setTitle?.('会議を作成');
|
|
2068
|
+
if (tablePage) { detailDrawer.dialog.classList.remove('has-tools'); detailTools.replaceChildren(); detailDrawer.top.replaceChildren(makeElement(doc, 'h2', { textContent: '会議を作成' })); detailDrawer.footer.replaceChildren(); }
|
|
1910
2069
|
detailRequestGeneration += 1;
|
|
1911
2070
|
detailDrawer?.open();
|
|
1912
2071
|
clear(detailPane);
|
|
@@ -1917,13 +2076,17 @@ export function createMeetingMinutesUI({
|
|
|
1917
2076
|
const form = makeElement(doc, 'form', { className: 'bb-minutes-create-form' });
|
|
1918
2077
|
form.append(makeElement(doc, 'h2', { textContent: '会議を作成' }));
|
|
1919
2078
|
const projectOptions = typeof createProjectOptions === 'function' ? createProjectOptions() : null;
|
|
1920
|
-
const
|
|
2079
|
+
const ownIds = typeof participantIdentities === 'function' ? participantIdentities() : [typeof currentPrincipalId === 'function' ? currentPrincipalId() : currentPrincipalId];
|
|
2080
|
+
const myProject = tablePage ? state.meetings.filter(e => (e.meeting?.participant_ids ?? []).some(id => ownIds.includes(id))).flatMap(e => e.meeting.project_codes ?? []).find(code => projectOptions?.some(o => o.value === code)) : '';
|
|
2081
|
+
const initialProject = (typeof createProjectValue === 'function' ? createProjectValue() : '') || myProject || '';
|
|
2082
|
+
let selectedParticipants = [];
|
|
2083
|
+
|
|
1921
2084
|
let projectCode = Array.isArray(projectOptions) && projectOptions.some(option => option.value === initialProject) ? initialProject : '';
|
|
1922
2085
|
const projectError = makeElement(doc, 'p', { className: 'bb-minutes-warning', attrs: { role: 'alert' } }); projectError.hidden = true;
|
|
1923
2086
|
if (Array.isArray(projectOptions)) {
|
|
1924
2087
|
createProjectBox = workspaceCombobox(doc, { label: 'プロジェクト', options: [{ value: '', label: 'プロジェクトを選択' }, ...projectOptions], value: projectCode,
|
|
1925
2088
|
showCount: false, searchable: true, onChange: value => { projectCode = value; projectError.hidden = true; } });
|
|
1926
|
-
form.append(filterField('プロジェクト', createProjectBox.root), projectError);
|
|
2089
|
+
if (!tablePage) form.append(filterField('プロジェクト', createProjectBox.root), projectError);
|
|
1927
2090
|
}
|
|
1928
2091
|
const title = labelInput(doc, '会議名', { name: 'title', placeholder: '例: 週次定例' });
|
|
1929
2092
|
const date = labelInput(doc, '日時(任意)', { type: 'datetime-local', name: 'scheduled_at' });
|
|
@@ -1931,9 +2094,32 @@ export function createMeetingMinutesUI({
|
|
|
1931
2094
|
const minutesTitle = labelInput(doc, '最初の議事録名', { name: 'minutes_title', value: '議事録' });
|
|
1932
2095
|
const body = labelInput(doc, '本文(任意)', { type: 'textarea', name: 'initial_body', placeholder: '会議の本文を入力' });
|
|
1933
2096
|
body.input.rows = 8;
|
|
1934
|
-
const save = makeElement(doc, 'button', { className: 'bb-minutes-button is-primary', textContent: '会議を保存', type: 'submit' });
|
|
2097
|
+
const save = makeElement(doc, 'button', { className: 'bb-minutes-button is-primary', textContent: tablePage ? '会議を作成' : '会議を保存', type: 'submit' });
|
|
1935
2098
|
title.input.required = true;
|
|
1936
|
-
|
|
2099
|
+
if (tablePage) {
|
|
2100
|
+
form.className = 'mp-new-form';
|
|
2101
|
+
form.style.padding = '6px 28px 24px';
|
|
2102
|
+
const field = (label, control, required=false, top=false) => workspaceKit.workspaceFormRow(doc,{label,control,required,top,appearance:'quiet'});
|
|
2103
|
+
form.append(field('会議の名前',title.input,true));
|
|
2104
|
+
if (createProjectBox) form.append(field('プロジェクト',createProjectBox.root,true),projectError);
|
|
2105
|
+
createParticipantBox = workspaceCombobox(doc,{label:'人を足す',appearance:'compact',multiple:true,values:[],options:[...new Set(state.meetings.flatMap(e=>e.meeting?.participant_ids??[]))].map(value=>({value,label:value})),showHints:false,showCount:false,searchable:false,onChange:values=>{selectedParticipants=values;paintChosen();}});
|
|
2106
|
+
const chosen = makeElement(doc,'div',{className:'mp-chosen-people'});
|
|
2107
|
+
const paintChosen = () => {
|
|
2108
|
+
chosen.replaceChildren(workspaceKit.workspaceConditionChips(doc,{items:selectedParticipants.map(value=>({label:value,onRemove:()=>{selectedParticipants=selectedParticipants.filter(id=>id!==value);createParticipantBox.update({values:selectedParticipants});paintChosen();}}))}));
|
|
2109
|
+
};
|
|
2110
|
+
const people = makeElement(doc,'div',{className:'mp-participant-choices'});people.append(chosen,createParticipantBox.root);
|
|
2111
|
+
form.append(field('参加した人',people),field('ほかの人',participants.input),field('日時',date.input),field('議事録の名前',minutesTitle.input),field('本文',body.input,false,true));
|
|
2112
|
+
const preview = makeElement(doc,'div',{className:'mp-create-preview'}); detailDrawer.top.append(preview);
|
|
2113
|
+
const sync = () => {
|
|
2114
|
+
const titleValue=title.input.value.trim();
|
|
2115
|
+
preview.replaceChildren(pageUI.row({meeting:{title:titleValue||'会議の名前',scheduled_at:date.input.value,project_codes:projectCode?[projectCode]:[],participant_ids:[]},minutes:[{minutes_id:'preview-new',current_version_id:'preview-new'}],current_version_states:[{minutes_id:'preview-new',version_id:'preview-new',status:'pending'}]},{preview:true}));
|
|
2116
|
+
save.disabled=!titleValue || (Array.isArray(projectOptions)&&!projectOptions.some(o=>o.value===projectCode));
|
|
2117
|
+
};
|
|
2118
|
+
form.addEventListener('input',sync);form.addEventListener('click',()=>{Promise.resolve().then(sync);});
|
|
2119
|
+
const hint=makeElement(doc,'span',{className:'mp-hint',textContent:'※の2つを入れると作成できます'});
|
|
2120
|
+
form.id='bb-minutes-create-body'; save.setAttribute('form',form.id); detailDrawer.footer.replaceChildren(hint,save);sync();
|
|
2121
|
+
detailDrawer.fields.classList.add('mp-create-fields');
|
|
2122
|
+
} else form.append(title.wrapper, date.wrapper, participants.wrapper, minutesTitle.wrapper, body.wrapper, save);
|
|
1937
2123
|
form.addEventListener('submit', async (event) => {
|
|
1938
2124
|
event.preventDefault();
|
|
1939
2125
|
if (!canCreate()) {
|
|
@@ -1952,7 +2138,7 @@ export function createMeetingMinutesUI({
|
|
|
1952
2138
|
const payload = {
|
|
1953
2139
|
title: title.input.value,
|
|
1954
2140
|
...(scheduledAt ? { scheduled_at: scheduledAt } : {}),
|
|
1955
|
-
participant_ids: participants.input.value.split(
|
|
2141
|
+
participant_ids: [...new Set([...selectedParticipants, ...participants.input.value.split(/[、,]/u).map((value) => value.trim()).filter(Boolean)])],
|
|
1956
2142
|
...(minutesTitle.input.value.trim() ? { minutes_title: minutesTitle.input.value } : {}),
|
|
1957
2143
|
initial_body: body.input.value,
|
|
1958
2144
|
};
|
|
@@ -1961,7 +2147,8 @@ export function createMeetingMinutesUI({
|
|
|
1961
2147
|
setStatus('会議を保存しました。', 'success');
|
|
1962
2148
|
await loadMeetings();
|
|
1963
2149
|
if (typeof id === 'string') {
|
|
1964
|
-
if (
|
|
2150
|
+
if (tablePage) { detailDrawer.close(); pageUI.highlightCreated(id); }
|
|
2151
|
+
else if (typeof shouldOpenCreatedMeeting !== 'function' || shouldOpenCreatedMeeting(created, projectCode) !== false) await loadDetail(id);
|
|
1965
2152
|
else { detailDrawer?.close(); renderDetail(null); if (!state.listError) setStatus('会議を保存しました。', 'success'); }
|
|
1966
2153
|
}
|
|
1967
2154
|
} catch (error) {
|
|
@@ -2048,6 +2235,8 @@ export function createMeetingMinutesUI({
|
|
|
2048
2235
|
|
|
2049
2236
|
async function loadDetail(meetingId) {
|
|
2050
2237
|
if (disposed) return null;
|
|
2238
|
+
if (tablePage && draft && draft.body !== draft.original) { runLeave(() => loadDetail(meetingId)); return null; }
|
|
2239
|
+
selectedDocumentId = null;
|
|
2051
2240
|
cleanupCreateProject();
|
|
2052
2241
|
detailDrawer?.open();
|
|
2053
2242
|
const requestGeneration = ++detailRequestGeneration;
|
|
@@ -2066,6 +2255,17 @@ export function createMeetingMinutesUI({
|
|
|
2066
2255
|
if (!isCurrentRequest()) return state.detail;
|
|
2067
2256
|
if (!isRecord(detail) || !isRecord(detail.meeting) || !Array.isArray(detail.minutes) || !Array.isArray(detail.versions)) throw new Error('会議詳細の形式を確認できません。');
|
|
2068
2257
|
state.detail = detail;
|
|
2258
|
+
if (tablePage) {
|
|
2259
|
+
const index = state.meetings.findIndex(e => e.meeting?.meeting_id === meetingId);
|
|
2260
|
+
if (index >= 0) state.meetings[index] = {
|
|
2261
|
+
...state.meetings[index], meeting: detail.meeting, minutes: detail.minutes.filter(d => !d.withdrawal),
|
|
2262
|
+
current_version_states: detail.minutes.filter(d => !d.withdrawal).map(d => {
|
|
2263
|
+
const version = detail.versions.find(v => v.version_id === d.current_version_id);
|
|
2264
|
+
return { minutes_id: d.minutes_id, version_id: d.current_version_id, status: !version ? 'unknown' : isRecord(version.confirmation) ? 'confirmed' : version.confirmation == null ? 'pending' : 'unknown' };
|
|
2265
|
+
}),
|
|
2266
|
+
};
|
|
2267
|
+
renderList();
|
|
2268
|
+
}
|
|
2069
2269
|
state.detailError = null;
|
|
2070
2270
|
if (hasConnections()) state.connections = { meetingId, rows: null };
|
|
2071
2271
|
if (hasParticipants() && state.participants?.meetingId !== meetingId) state.participants = null;
|
|
@@ -2086,16 +2286,18 @@ export function createMeetingMinutesUI({
|
|
|
2086
2286
|
return state.detail;
|
|
2087
2287
|
}
|
|
2088
2288
|
|
|
2089
|
-
renderToolbar([]);
|
|
2289
|
+
if (!tablePage) renderToolbar([]);
|
|
2090
2290
|
renderDetail(null);
|
|
2091
2291
|
void loadMeetings();
|
|
2092
2292
|
return {
|
|
2093
2293
|
contractVersion: MEETING_MINUTES_UI_CONTRACT_VERSION,
|
|
2094
2294
|
refresh: loadMeetings,
|
|
2095
2295
|
openMeeting: loadDetail,
|
|
2296
|
+
requestLeave: action => requestLeave(action),
|
|
2096
2297
|
destroy() {
|
|
2097
2298
|
disposed = true; listRequestGeneration += 1; detailRequestGeneration += 1;
|
|
2098
2299
|
cleanupCreateProject();
|
|
2300
|
+
pageUI?.destroy(); versionBox?.destroy();
|
|
2099
2301
|
detailDrawer?.dispose();
|
|
2100
2302
|
compactToolbar?.destroy();
|
|
2101
2303
|
participantBox.destroy(); statusBox.destroy(); sortBox.destroy();
|
package/ui/workspace-kit.css
CHANGED
|
@@ -1152,8 +1152,8 @@
|
|
|
1152
1152
|
.bb-ws-input-frame .bb-ws-detail-closebar > .bb-ws-button { width:30px; height:30px; min-height:0; padding:0; border:0; border-radius:6px; background:none; font-size:0; color:var(--bb-color-muted); }
|
|
1153
1153
|
.bb-ws-input-frame .bb-ws-detail-closebar > .bb-ws-button::before { content:'×'; font-size:22px; }
|
|
1154
1154
|
.bb-ws-input-frame .bb-ws-detail-closebar > .bb-ws-button:hover { background:var(--bb-color-canvas); }
|
|
1155
|
-
.bb-ws-topbar-tools .bb-ws-filter-anchor > .bb-ws-button { width:32px; height:32px; min-height:0; padding:0; border:0; border-radius:7px; background:none; }
|
|
1156
|
-
.bb-ws-topbar-tools .bb-ws-filter-anchor > .bb-ws-button::after { display:none; }
|
|
1155
|
+
.bb-ws-topbar-tools > .bb-ws-filter-anchor > .bb-ws-button { width:32px; height:32px; min-height:0; padding:0; border:0; border-radius:7px; background:none; }
|
|
1156
|
+
.bb-ws-topbar-tools > .bb-ws-filter-anchor > .bb-ws-button::after { display:none; }
|
|
1157
1157
|
.bb-ws-input-fields .bb-ws-combobox--compact .bb-ws-combobox-trigger { height:32px; border-radius:7px; }
|
|
1158
1158
|
.bb-ws-input-fields .bb-ws-combobox--compact .bb-ws-combobox-popup { min-width:200px; }
|
|
1159
1159
|
.bb-ws-input-fields .bb-ws-combobox--compact .bb-ws-combobox-option { min-height:34px; }
|
|
@@ -1184,3 +1184,96 @@
|
|
|
1184
1184
|
.bb-ws-combobox-mark { display:grid; place-items:center; width:14px; height:14px; color:var(--bb-color-action); }
|
|
1185
1185
|
.bb-ws-combobox-mark .bb-ws-action-icon { width:14px; height:14px; stroke-width:2.4; visibility:hidden; }
|
|
1186
1186
|
.bb-ws-combobox-option[aria-selected="true"] .bb-ws-combobox-mark .bb-ws-action-icon { visibility:visible; }
|
|
1187
|
+
|
|
1188
|
+
.bb-ws-form-row.is-quiet:focus-within { box-shadow:inset 0 -1px 0 var(--bb-color-line-soft); }
|
|
1189
|
+
|
|
1190
|
+
/* Header view controls use the same compact appearance as their standalone versions. */
|
|
1191
|
+
.bb-ws-topbar.has-tabs .bb-ws-topbar-tools > .bb-ws-button { border:0; }
|
|
1192
|
+
.bb-ws-topbar-tools > .bb-ws-filter-anchor > .bb-ws-button { background:var(--bb-color-paper); color:var(--bb-color-slate); box-shadow:inset 0 0 0 1px var(--bb-color-border); }
|
|
1193
|
+
.bb-ws-tabs--header > :is([role="tab"],a,button) { display:block; line-height:1.6; }
|
|
1194
|
+
.bb-ws-tabs--header .bb-ws-tab-count { line-height:1.6; }
|
|
1195
|
+
@media(max-width:1200px) {
|
|
1196
|
+
.bb-ws-topbar.bb-ws-topbar--wrap { flex-wrap:wrap; height:auto; min-height:52px; padding-bottom:8px; }
|
|
1197
|
+
.bb-ws-topbar--wrap .bb-ws-topbar-tabs { flex-basis:100%; height:52px; }
|
|
1198
|
+
.bb-ws-topbar--wrap .bb-ws-search-control { flex:1; min-width:72px; }
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.bb-ws-tabs--header .bb-ws-tab-count { font-feature-settings:normal; font-variant-numeric:normal; }
|
|
1202
|
+
|
|
1203
|
+
.bb-ws-input-frame { font:13px/1.6 var(--bb-font-sans); }
|
|
1204
|
+
|
|
1205
|
+
/* Opt-in anchored surfaces; existing dialogs and filters keep their defaults. */
|
|
1206
|
+
.bb-ws-anchored-popover { position:fixed; z-index:70; box-sizing:border-box; width:var(--bb-anchored-width,276px); max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; padding:14px 8px 8px; border:0; border-radius:14px; background:var(--bb-color-paper); color:var(--bb-color-ink); box-shadow:var(--bb-shadow-control-panel); font:inherit; text-align:left; transform-origin:50% 40px; animation:bb-ws-anchored-in 160ms cubic-bezier(.2,.8,.2,1); }
|
|
1207
|
+
.bb-ws-anchored-popover[hidden] { display:none; }
|
|
1208
|
+
.bb-ws-anchored-popover--muted { padding:0 0 16px; background:var(--bb-segmented-surface); }
|
|
1209
|
+
.bb-ws-anchored-popover:focus-visible { outline:2px solid var(--bb-color-focus); outline-offset:2px; }
|
|
1210
|
+
@keyframes bb-ws-anchored-in { from { transform:scale(.94); opacity:0; } to { transform:none; opacity:1; } }
|
|
1211
|
+
|
|
1212
|
+
.bb-ws-dialog.bb-ws-dialog--compact { width:min(440px,calc(100vw - 32px)); padding:20px 20px 18px; border:0; border-radius:16px; background:var(--bb-color-paper); box-shadow:var(--bb-shadow-compact-dialog); animation:bb-ws-compact-dialog-in 200ms cubic-bezier(.2,.8,.2,1); }
|
|
1213
|
+
.bb-ws-dialog--compact::backdrop { background:color-mix(in srgb,var(--bb-color-ink) 18%,transparent); }
|
|
1214
|
+
.bb-ws-dialog--compact .bb-ws-dialog-head { align-items:center; gap:0; margin-bottom:4px; padding:0; border:0; }
|
|
1215
|
+
.bb-ws-dialog--compact .bb-ws-dialog-head h2 { flex:1; font-size:16px; font-weight:600; line-height:1.6; }
|
|
1216
|
+
.bb-ws-dialog--compact .bb-ws-dialog-head > .bb-ws-button { display:grid; place-items:center; width:28px; min-height:28px; height:28px; margin-right:-6px; padding:0; border:0; border-radius:6px; background:transparent; color:var(--bb-color-muted); font-size:20px; }
|
|
1217
|
+
.bb-ws-dialog--compact .bb-ws-dialog-head > .bb-ws-button:hover { background:var(--bb-color-canvas); color:var(--bb-color-ink); }
|
|
1218
|
+
.bb-ws-dialog--compact .bb-ws-dialog-body { padding:0; }
|
|
1219
|
+
.bb-ws-dialog-tools { display:flex; align-items:center; }
|
|
1220
|
+
.bb-ws-help--bottom-end .bb-ws-help-button { width:28px; height:28px; border:0; border-radius:6px; background:transparent; color:var(--bb-color-muted); font:600 16px var(--bb-font-sans); }
|
|
1221
|
+
.bb-ws-help--bottom-end .bb-ws-help-button:hover { background:var(--bb-color-canvas); }
|
|
1222
|
+
.bb-ws-help--bottom-end .bb-ws-help-bubble { top:34px; bottom:auto; left:auto; right:-28px; width:min(300px,calc(100vw - 48px)); padding:12px 14px; border:0; border-radius:12px; background:var(--bb-color-paper); box-shadow:var(--bb-shadow-control-panel); font-size:13px; transform:translateY(-4px); }
|
|
1223
|
+
.bb-ws-help--bottom-end:not(.is-dismissed):is(:hover,:focus-within,.is-open) .bb-ws-help-bubble { transform:none; }
|
|
1224
|
+
.bb-ws-help--bottom-end .bb-ws-help-bubble::after { top:-10px; }
|
|
1225
|
+
|
|
1226
|
+
/* Stable boxed trigger: hover and expanded change only the surface. */
|
|
1227
|
+
.bb-ws-combobox--compact.bb-ws-combobox--stable-box .bb-ws-combobox-trigger { border:0; border-radius:7px; background:var(--bb-color-paper); box-shadow:inset 0 0 0 1px var(--bb-color-border); }
|
|
1228
|
+
.bb-ws-combobox--compact.bb-ws-combobox--stable-box .bb-ws-combobox-trigger:is(:hover,[aria-expanded="true"]) { background:var(--bb-color-canvas); box-shadow:inset 0 0 0 1px var(--bb-color-border); color:var(--bb-color-ink); }
|
|
1229
|
+
.bb-ws-combobox--compact.bb-ws-combobox--stable-box.is-active .bb-ws-combobox-trigger { background:var(--bb-color-accent-soft); box-shadow:none; color:var(--bb-color-action); font-weight:600; }
|
|
1230
|
+
.bb-ws-combobox--compact.bb-ws-combobox--stable-box .bb-ws-combobox-trigger:focus-visible { outline:2px solid var(--bb-color-focus); outline-offset:2px; }
|
|
1231
|
+
.bb-ws-combobox--compact.bb-ws-combobox--tall .bb-ws-combobox-trigger { height:32px; min-height:32px; padding:0 10px; }
|
|
1232
|
+
.bb-ws-combobox--compact .bb-ws-combobox-popup { width:var(--bb-combobox-popup-width,max-content); }
|
|
1233
|
+
.bb-ws-combobox--compact.bb-ws-combobox--match-width .bb-ws-combobox-popup { box-sizing:border-box; width:100%; min-width:0; }
|
|
1234
|
+
.bb-ws-combobox--match-width .bb-ws-combobox-option { padding-inline:6px; gap:5px; }
|
|
1235
|
+
|
|
1236
|
+
.bb-ws-selection-row { --bb-selection-color:var(--bb-color-action); display:flex; align-items:center; gap:8px; width:100%; min-height:34px; border-radius:8px; }
|
|
1237
|
+
.bb-ws-selection-row:not(.is-disabled):hover { background:var(--bb-color-canvas); }
|
|
1238
|
+
.bb-ws-selection-row .bb-ws-selection-control { display:flex; flex:1; align-items:center; justify-content:flex-start; gap:10px; width:auto; min-width:0; height:34px; min-height:34px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:var(--bb-color-ink); box-shadow:none; font:400 13px/1.6 var(--bb-font-sans); text-align:left; }
|
|
1239
|
+
.bb-ws-selection-row .bb-ws-selection-control:not(:disabled):hover { background:transparent; border:0; box-shadow:none; }
|
|
1240
|
+
.bb-ws-selection-check { display:grid; place-items:center; flex:none; width:16px; height:16px; border-radius:4px; box-shadow:inset 0 0 0 1.5px var(--bb-selection-color); color:transparent; transition:background 120ms; }
|
|
1241
|
+
.bb-ws-selection-check .bb-ws-action-icon { width:11px; height:11px; stroke-width:3; }
|
|
1242
|
+
.bb-ws-selection-control[aria-checked="true"] .bb-ws-selection-check { background:var(--bb-selection-color); color:var(--bb-color-action-text); }
|
|
1243
|
+
.bb-ws-selection-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
1244
|
+
.bb-ws-selection-trailing { display:inline-flex; align-items:center; flex:none; gap:8px; padding-right:10px; font-size:11px; color:var(--bb-color-muted); }
|
|
1245
|
+
.bb-ws-selection-row.is-disabled .bb-ws-selection-control { color:var(--bb-color-placeholder); opacity:1; cursor:default; }
|
|
1246
|
+
.bb-ws-selection-row.is-disabled .bb-ws-selection-check { box-shadow:inset 0 0 0 1.5px var(--bb-color-border); }
|
|
1247
|
+
.bb-ws-selection-control:focus-visible { outline:2px solid var(--bb-color-focus); outline-offset:2px; }
|
|
1248
|
+
.bb-ws-switch.bb-ws-button { display:flex; align-items:center; justify-content:flex-start; gap:10px; width:100%; min-height:18px; padding:0; border:0; border-radius:0; background:transparent; color:var(--bb-color-ink); box-shadow:none; font:400 13px/1.6 var(--bb-font-sans); text-align:left; }
|
|
1249
|
+
.bb-ws-switch.bb-ws-button:not(:disabled):hover { background:transparent; border:0; box-shadow:none; }
|
|
1250
|
+
.bb-ws-switch-track { position:relative; flex:none; width:30px; height:18px; border-radius:var(--bb-radius-pill); background:var(--bb-color-placeholder); transition:background 160ms; }
|
|
1251
|
+
.bb-ws-switch-track::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:var(--bb-color-paper); transition:transform 160ms cubic-bezier(.3,1.4,.5,1); }
|
|
1252
|
+
.bb-ws-switch[aria-checked="true"] .bb-ws-switch-track { background:var(--bb-color-action); }
|
|
1253
|
+
.bb-ws-switch[aria-checked="true"] .bb-ws-switch-track::after { transform:translateX(12px); }
|
|
1254
|
+
.bb-ws-switch.bb-ws-button:focus-visible { outline:2px solid var(--bb-color-focus); outline-offset:3px; }
|
|
1255
|
+
@media(prefers-reduced-motion:reduce) {
|
|
1256
|
+
.bb-ws-anchored-popover { animation:none; }
|
|
1257
|
+
.bb-ws-selection-check, .bb-ws-switch-track, .bb-ws-switch-track::after { transition:none; }
|
|
1258
|
+
}
|
|
1259
|
+
.bb-ws-help--bottom-end .bb-ws-help-bubble > dl { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:8px 12px; margin:0; }
|
|
1260
|
+
.bb-ws-help--bottom-end .bb-ws-help-bubble dt { color:var(--bb-color-ink); font-weight:600; white-space:nowrap; }
|
|
1261
|
+
.bb-ws-help--bottom-end .bb-ws-help-bubble dd { margin:0; color:var(--bb-color-slate); }
|
|
1262
|
+
|
|
1263
|
+
@keyframes bb-ws-compact-dialog-in { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:none; } }
|
|
1264
|
+
@media(prefers-reduced-motion:reduce) { .bb-ws-dialog.bb-ws-dialog--compact { animation:none; } }
|
|
1265
|
+
|
|
1266
|
+
/* Explicit small widths opt out of the legacy 150px minimum. Match-width still wins. */
|
|
1267
|
+
.bb-ws-combobox--compact.bb-ws-combobox--fixed-width .bb-ws-combobox-popup { box-sizing:border-box; min-width:0; }
|
|
1268
|
+
.bb-ws-dialog--compact .bb-ws-actions > .bb-ws-button { min-height:34px; height:34px; padding:0 14px; border-radius:7px; font-size:13px; }
|
|
1269
|
+
|
|
1270
|
+
.bb-ws-anchored-popover--flush { padding:0; }
|
|
1271
|
+
|
|
1272
|
+
/* Explicit icon control keeps the same square and inset edge inside a topbar. */
|
|
1273
|
+
.bb-ws-button.is-icon,
|
|
1274
|
+
.bb-ws-topbar.has-tabs .bb-ws-topbar-tools > .bb-ws-button.is-icon { display:grid; place-items:center; flex:none; box-sizing:border-box; width:32px; min-width:32px; height:32px; min-height:32px; padding:0; gap:0; border:0; border-radius:7px; background:var(--bb-color-paper); box-shadow:inset 0 0 0 1px var(--bb-color-border); color:var(--bb-color-slate); font:inherit; }
|
|
1275
|
+
.bb-ws-button.is-icon:not(:disabled):is(:hover,[aria-expanded="true"]),
|
|
1276
|
+
.bb-ws-topbar.has-tabs .bb-ws-topbar-tools > .bb-ws-button.is-icon:not(:disabled):is(:hover,[aria-expanded="true"]) { background:var(--bb-color-canvas); color:var(--bb-color-ink); border:0; box-shadow:inset 0 0 0 1px var(--bb-color-border); }
|
|
1277
|
+
.bb-ws-button.is-icon .bb-ws-action-icon,
|
|
1278
|
+
.bb-ws-topbar.has-tabs .bb-ws-topbar-tools > .bb-ws-button.is-icon .bb-ws-action-icon { width:16px; height:16px; }
|
|
1279
|
+
.bb-ws-button.is-icon:focus-visible { outline:2px solid var(--bb-color-focus); outline-offset:2px; }
|