# Current implementation identity (Package 1.0.158)

Runtime: `BoneCalendar 1.0.52`. HTML Functional Class: `bf-calendar` / `BoneCalendarFunctionalClass 1.0.16`. The minimal `bf-calendar` markup is a direct runtime contract and must mount without manual `BoneCalendar.create()` or sample variables. Historical version notes later in this document do not override this identity.

# Bone Flow #024 Calendar Specification v1.0

## Component

```text
ID      : 024
Name    : Calendar
Layer   : Phase 3 / Primitive UI
Version : Runtime 1.0.52 / Package 1.0.158 Candidate
Status  : Development
```

## Formal responsibility

Calendar is a reusable date-selection UI.

```text
Calendar
  ├─ Month title
  ├─ Previous / Next month
  ├─ Weekday header
  ├─ Date cells
  ├─ Selected date
  ├─ Today
  ├─ min / max / step date selectability (month navigation remains available)
  ├─ Theme
  ├─ Week start (sunday default / monday / auto compatibility) independent from display locale
  ├─ Sunday red / Saturday blue (Theme-linked)
  ├─ Parent absorption / parent style sync
  ├─ Standalone size / 9-way position
  ├─ Annotation IN
  │   ├─ holiday / customHoliday / anniversary -> icon + tooltip
  │   └─ task -> date tooltip + optional href
  ├─ showTasks -> task tooltip + task dot visibility
  └─ Selection result
```


## Locale / Redmine language integration

```text
Priority
1. Explicit Calendar locale (data-locale / option)
2. Page <html lang> (Redmine language)
3. navigator.language
4. Intl resolved locale
5. en-US fallback
```

`data-locale="auto"` and null use the page/environment chain. `ja` / `en` and other valid BCP 47 language tags are explicit overrides.

The #024 `minimal.html` QA page exposes visible language controls:
- Redmine / Page: 日本語 / English (updates `<html lang>`)
- Calendar: Auto (Redmine) / 日本語 / English
- When Calendar is Auto, changing Redmine / Page language rerenders the Calendar immediately.

## Responsibility boundary

```text
024 Calendar
  returns selected YYYY-MM-DD
  does not commit
  does not update Bone.value
  does not deliver OUT
```

DatePicker / DateBox / DateTimeBox own the later commit/OUT decision.

## Date format

```text
YYYY-MM-DD
```

Gregorian calendar, year 0001-9999.

## Selectability

1. invalid calendar dates are rejected
2. date < min is disabled
3. date > max is disabled
4. step = any bypasses step restriction
5. integer step N means N-day intervals
6. step base is min when min exists, otherwise 1970-01-01
7. min / max / step do not disable Previous / Next month navigation

## Theme

```text
default
dark
light
neon
```

No CDN dependency.

Theme変更時、日曜色と土曜色もTheme用の値へ自動更新する。

## Week start

```text
auto    : explicit ja / ja-* locale -> monday; explicit non-ja locale -> sunday; runtime timezone is fallback only when locale is not explicit
monday  : 月曜日開始
sunday  : 日曜日開始
```

## Icon

```text
fontawesome : built-in SVG equivalent
emoji       : Unicode emoji
```

## Reuse plan

```text
025 DatePicker -> 024 Calendar
030 DateBox    -> 025 DatePicker -> 024 Calendar
032 DateTimeBox -> 025 DatePicker + 026 TimePicker -> 024 Calendar
```


## Common UI layout behavior

```text
inheritParent = false
  width / height / position (9-way)

inheritParent = true
  parent width  = 100%
  parent height = 100%
  parent size adhesion / radius sync; Theme colors remain authoritative
```

## Runtime QA harness

The test page includes the formal connection-image diagnostics, Smoke Test / Validation Report, Runtime Console and Completion UI. The connection images use actual #002 BoneJoint evaluation/drawing. WAIT/BLOCK are N/A because #024 has no OUT responsibility.

## Annotation contract

```text
annotations[YYYY-MM-DD].items[]
  kind  : holiday | customHoliday | anniversary | task
  label : 1..240 chars
  icon  : holiday/customHoliday/anniversary only; false disables icon
  href  : task only; optional; relative URL or http/https
```

Annotation is display-only. It must not alter Calendar value, selection rules, commit, Bone.value, or OUT.

`showTasks` defaults to `true`. When `false`, `task` items and the task dot below the date are hidden; holiday/customHoliday/anniversary remain visible.

## Holiday CSV conversion boundary

CSV conversion belongs to the test/conversion UI, not the #024 runtime component. The test page accepts the manual Japanese government holiday CSV, filters rows by an operator-selected start year (default 2026), and converts its date/name columns into `calendar.annotations`. The bundled sample uses the confirmed 2026 and 2027 rows from the supplied CSV.

## v1.0.7 consumer UI integration

The Calendar runtime responsibility is unchanged from v1.0.6. The test/property consumer uses #040 ColorPicker v1.0.18 only for the existing parent-preview background and parent-preview text color controls. Both callers are solid-only and return `#RRGGBB` to the parent-preview shell. `inheritParent` controls layout adhesion only; Theme-owned background/text/border and Sunday/Saturday/selected/holiday colors remain Theme responsibility and are not overridden by parent-preview colors.

The test page also exposes a visible **Class list / Public API** generated from the actual `BoneCalendar` public object. #024 remains a Factory API / HTMLElement instance model; no new class or constructor is invented.


## v1.0.9 Guide UI requirement

The test UI shall expose `ガイドを開く / Open Guide` from `Class リスト / Public API`. The guide shall be based on the real `BoneCalendar` Public Object / Factory API and shall not invent a wrapper class. Every public function exposed by the runtime shall provide an individual guide with when-to-use guidance, arguments, usage steps, sample code, operation details, return value, role, and the #024 responsibility boundary.


## v1.0.11 #022 Property control requirement

The test/property UI shall expose the Calendar date-cell mouse-over border effect as a visible #022 Property group. Required controls are:

```text
enabled
effect      : normal | neon | spin | cross | blink
color       : #RRGGBB via #040 ColorPicker Caller, solid-only
direction   : clockwise | counterclockwise
speed       : slow | normal | fast
spinWidth   : 1..24 px
spinGlow    : 0..40 px
trigger     : mouseover (fixed by #024 consumer)
```

When disabled, #024 shall detach #022 from Calendar date cells. When enabled, the consumer shall attach the selected #022 options to each rendered date cell and re-attach after Calendar re-render/month change. This is test/consumer integration; it does not add new Calendar runtime options or change Calendar selection responsibility.


## v1.0.11 #020 guide structure alignment

- `Class リスト / Public API` セクション内に単一の `ガイドを開く` 入口を置く。
- ガイドUIは #020 Label v1.0.62 と同じ構造原則を採用する。
  - 左ナビ: Class / Public API / 使用方法 / 操作説明
  - 1つの統合ガイド内で切り替える。
- Class / Public APIは `BoneCalendar` Public Object / Factory APIの実体だけを表示し、存在しないWrapper Classを作らない。
- 使用方法はPublic APIごとに `いつ使うのか / 引数 / 使用手順 / サンプルコード` を表示する。
- 操作説明はPublic APIごとに `動作 / 戻り値 / 役割 / 責務境界` を表示する。
- #024 Calendarはcommit / OUT / Deliveryを所有しない。


## v1.0.12 Runtime QA correction

The test/consumer UI shall retain the #040 ColorPicker caller helper path that existed in v1.0.11. The #020-style guide rebuild must not remove these helpers. Parent background/text callers and the #022 Effect-color caller must attach before Preview/Runtime QA, and their RETURN path must update the existing hidden #RRGGBB values without adding a native color input. No Calendar runtime API or responsibility changes are introduced.

## v1.0.15 Consumer Native ColorPicker validation scope

`Consumer Native ColorPicker path absent` means the #024 Consumer-owned Property UI shall not expose `input[type="color"]`. The validation must not inspect or reject #040 ColorPicker's internal/body-owned DOM. The #024 Consumer contract is:

- Parent background source: hidden #RRGGBB value + Consumer button trigger.
- Parent text source: hidden #RRGGBB value + Consumer button trigger.
- #022 Effect color source: hidden #RRGGBB value + Consumer button trigger.
- Color selection is delegated to #040 through its public Caller API.

No #040 internal implementation requirement is added by #024.


## Runtime-owned Property Schema (v1.0.15)

`BoneCalendar.getPropertySchema()` / `getPropertyDefaults()` / `getPropertyDefinition(key)` are the formal property source. The UI must not maintain a competing schema.

## HTML Functional Class (v1.0.15)

Historical v1.0.15 identity note: `bf-calendar` / `BoneCalendarHTMLClass 1.0.7` / `BoneCalendar 1.0.16`. Current identity is defined at the top of this specification.

## Current dependency contract

- #022 BoneHoverBorderEffect 1.0.12: normal / neon / spin / blink / dash / corner / chase / double / wave (`cross` removed); lineWidth is formal.
- #040 BoneColorPicker 1.0.18.
- #118 BoneTransition 1.0.3 + bf-transition Bridge 1.0.4 is required by #040.
- DOC-0024 / TOC-0024 are the formal Guide route.


## v1.0.17 #024 Task / Selected-Day Extension

- Package: 1.0.17 Candidate; BoneCalendar Runtime version remains 1.0.15 for #054 Weekly v1.0.41 exact-version compatibility.
- Runtime-owned Properties: `calendarIconSizePx` (8..24, default 14), `calendarTaskIcon` (default 📑), `calendarTaskIconPosition` (`right` default / `center` / `left`), `selectedDayVisible` (default false; #024 test page explicitly enables it).
- Calendar task-present icon is rendered below the date number.
- Common icon size applies to 🎌 holiday / 🏖️ customHoliday / ⭐ anniversary / 📑 task indicator.
- Selected-day panel displays `📑 タスク`, `🎌 祝日`, `🏖️ カスタム休日`, `⭐ 記念日` in Japanese with emoji. `content` is visible; `memo` is a hover/focus tooltip.
- New #024 Task Editor writes `start`, `end`, `typeId`, `content`, `memo`, `showInRemarks`; start/end/typeId are required by the editor and end must be later than start.
- For backward compatibility with #054 Weekly v1.0.41, an incoming legacy `{kind:"task",label:"..."}` annotation remains valid as display-only (`timelineReady:false`). When any timeline field is supplied, start/end/typeId become an all-or-nothing validated contract.
- #048 Table and #054 Display Timeline files are not overwritten by this package.


## v1.0.18 Task Data CRUD correction
- #024 test/reference page now exposes task data as a visible table.
- Each task shows date, start, end, typeId, name, content, memo, and remarks flag.
- Edit loads the exact row back into the editor; Update can also move the task to another date.
- Delete removes only the selected task and preserves non-task annotations on the same date.
- Optional selected-date-only filter is available; default view shows all task data.
- BoneCalendar Runtime stays 1.0.15; #048 Table and #054 Display Timeline are not packaged or overwritten.


## v1.0.19 Installer MANIFEST repair

- v1.0.18 generated MANIFEST lines as `<sha256>  <path>` while the #017-standard installer parser requires `<sha256> *<path>`.
- v1.0.19 restores the exact #017 canonical star-prefixed MANIFEST path format and adds a regression check using the installer regex.
- Runtime remains BoneCalendar 1.0.16. #048 Table and #054 Display Timeline files remain outside this package ownership.


## v1.0.21 Task Type / Task external-data and modal management

- Task Type master and Task records are Runtime-owned external-data inputs, designed so the storage adapter can later be replaced by DB/API integration.
- Task Type master uses stable `id`; Task records use `typeId` reference and `taskId / date / start / end / typeId / label / content / memo / showInRemarks`.
- Public APIs: `setTaskTypes/getTaskTypes`, `setTasks/getTasks`, `setTaskData/getTaskData`, `validateTaskTypes/validateTasks`, `openTaskTypeManager/openTaskManager`.
- HTML Functional Class accepts `data-task-types` and `data-tasks` JSON arrays plus `data-show-task-type-manager-button` / `data-show-task-manager-button`.
- Calendar bottom owns `タスク区分` and `タスク` buttons; each button visibility is a Runtime Property.
- Both management screens default to modal CRUD. The old inline task-management panels are removed.
- Task Type data/UI does not contain `カレンダーへアイコン表示`; Calendar task-presence indicator is a separate Calendar appearance setting.
- Timeline-ready Task tooltip is exactly `開始時間~終了時間 タスク名`.
- Runtime stays `BoneCalendar 1.0.16`; #048/#054 files are not overwritten.


## v1.0.22 Runtime Schema compact JSON display
- Runtime Schema table balance adjusted with fixed column proportions.
- Array/Object default values (including taskTypes) are shown as a compact expandable summary instead of one long inline JSON string.
- Expanded values use pretty-printed JSON code in a bounded scroll area so the schema does not consume excessive width or height.


## v1.0.34 Event management
- Calendar footer adds an 「イベント」 management button.
- Event manager opens as a modal by default and supports add/edit/delete.
- Event fields: date, event kind (customHoliday / anniversary), emoji, event name.
- Runtime-owned Properties: showEventManagerButton / events.
- External-data APIs: setEvents / getEvents / validateEvents / openEventManager.
- Event data uses eventId/date/kind/emoji/label so later DB/API adapters can replace the storage layer.
- Event date is date-only (`YYYY-MM-DD`). The Event manager does not use a datetime control. The `📅` button opens a normal #024 Calendar instance and the selected day is written back to the event date field.
- 🏖️ customHoliday / ⭐ anniversary sample data is managed through events rather than hard-coded Annotation samples.


## v1.0.34 Event date Calendar display
- The Event manager date selector remains the normal #024 Calendar opened by the 📅 button.
- The Calendar selector now expands inside the Event manager layout instead of creating an internal modal-panel scroll area.
- The Event manager panel itself does not use an internal scrollbar for the expanded Calendar on normal desktop viewports.

## v1.0.34 Annotation manager button

`showAnnotationManagerButton` is a formal Runtime Property (boolean, default `true`). When enabled, the Calendar footer shows the `🎌` button. The button opens the built-in `Annotation IN / 祝日CSV変換` modal. The modal supports start-year filtering, holiday CSV conversion, Annotation JSON apply/readback, and JSON save. The manager updates the same Calendar `annotations` option and emits `bone-calendar:annotations-change`.


## v1.0.34 Annotation manager layout
- Annotation manager actions MUST wrap inside the manager panel and MUST NOT force horizontal panel overflow.
- The manager note exposes the official Cabinet Office 「国民の祝日」 page as a normal external link (target=_blank, rel=noopener noreferrer).


## v1.0.34 DOC-0024 guide update
- DOC-0024 JA/EN content is package-owned for this reopened #024 update.
- HTML Functional Class sections now document Task Type / Task / Event / Holiday contracts, usage, external data injection, manager APIs, and samples.
- Installer copies DOC-0024 content and merges DOC-0024 / TOC-0024 registry entries, then verifies the installed route.


## v1.0.37 Theme / Selected-Day correction

- `inheritParent=true` keeps 100% parent layout adhesion but no longer overrides Calendar Theme colors with the parent background/text/border.
- `theme=light` therefore remains visibly Light even while parent adhesion is ON.
- `.bone-calendar__selected-day` no longer uses an internal scrollbar (`max-height:none; overflow:visible`).
- `selectedDayVisible` remains the Runtime-owned visibility Property; the standalone Sample exposes it as an immediate checkbox.
- Runtime version stays `BoneCalendar 1.0.16` to preserve the frozen #054 Weekly v1.0.41 exact-version contract.

## v1.0.41 Calendar Preview / Standalone parity correction
- Calendar Preview の選択日タスク主表示を `開始時間~終了時間 タスク名` とする。例: `10:00~11:00 定例会議`。
- 選択日パネルは内部スクロールを持たず、単体表示では configured height を最小高さとして必要分だけ縦方向へ展開する。
- Standalone Sample の Task Type / Task / Event / Annotation データは `/test/bone-calendar.html` と同一契約・同一基準データを使用する。
- Standalone 配布物は `bf-calendar.html` / `bf-calendar.css` / `bf-calendar.js` の3ファイルだけで動作することをブラウザSmoke対象とする。


## v1.0.45 Manager addendum

Task Type remains the visual master. `backgroundColor`, `textColor`, icon and optional effect values belong to Task Type; Tasks reference the master with `typeId`.

Task core and #054 display integration are separate. Formal #024 Tasks never receive `display054` or flat #054 display fields. The optional #054 box writes only to a separate taskId-keyed display store. Month/week task browsing has explicit keys rather than silently forcing Calendar's current view/selected date.

Formal #054 common integration object is `display054Settings` with `startTime`, `endTime`, `timelineStepMinutes`, `timelineSnapMinutes`, `timelineShowGrid`, and `timeBarHeightPx`.


## v1.0.50 ColorPicker Transition addendum

Task Type visual master data does not own #022-style Effect properties. Background/text color selection is delegated to #040 ColorPicker. Its Overlay OPEN/CLOSE Transition type is passed through the formal #040 Caller option `transition`; direction is forwarded as the formal #118 property `direction`. The obsolete guessed keys `transitionEffect` / `transitionDirection` are prohibited. This Caller-display configuration is not serialized as Task Type master data. Native `input[type=color]` fallback and Consumer-owned open handlers are prohibited.


## v1.0.50 boot contract correction

The test-page fresh-asset/boot/report guards are aligned with BoneCalendar Runtime 1.0.19. This fixes a page bootstrap failure and does not change Calendar runtime responsibility.


## v1.0.51 Task Type ColorPicker integration

Task Type color controls use formal #040 callers. The #040 body-owned overlay must be visible above the Calendar manager modal; native color inputs and Consumer-owned palettes remain prohibited.



## v1.0.55 Runtime QA repair addendum

- The runtime test page must not re-evaluate `bone-calendar.js` or `bone-calendar-html-class.js` after they are already loaded. Re-evaluation creates a second runtime registry and can double-mount a direct `bf-calendar` host.
- Fresh-asset verification uses no-store fetch and source/version checks only.
- Direct HTML contract remains: one `.bf-calendar` host produces exactly one BoneCalendar runtime child without manual `BoneCalendar.create()`.
- Selected-day task kind text is `emoji + Japanese kind label`; task content and memo behavior remain unchanged.
- Runtime QA tests must derive API inventory from the current runtime and use dedicated fixtures for legacy Annotation-only task links.

## v1.0.52 Installer contract addendum

Installation checks are based on integrity, required files, JavaScript syntax, public API capability, DOC Registry/TOC identity, non-empty JA/EN content, and installed payload verification. Display strings, dynamic manager IDs, Runtime implementation tokens, dependency patch-version source strings, and Sample prose are not installer contracts. The formal #118 dependency file is `bone-transition-functional-class.js`.

#054 per-task display values are held outside the formal #024 Task object and are related only by `taskId`; `getTasks()` does not emit `display054`, `displayType`, or comment offset/width fields.


## v1.0.55 correction addendum

- The Minimal page must load the full formal #001/#002 prerequisite helper chain before #020/#022/#118/#040/#024 so the Task Type ColorPicker is a real #040 Caller, not a page that only renders Calendar.
- Calendar destruction owns cleanup of its #040 Task Type Caller controllers because their overlays are body-owned.
- Runtime QA must scope main-grid and main-weekday assertions to the Calendar's direct grid/header so the nested Event date-picker does not contaminate counts.


## v1.0.55 Minimal guide addendum

- The existing three-attribute `bf-calendar` live sample remains in `minimal.html`.
- A guide is added below the live sample; it is not a replacement page.
- The guide contains Japanese and English views and covers install, initial `data-*` registration, Task Type / Task / Event Functional Class CRUD, #040 ColorPicker usage, and major HTML properties.
- The standalone distribution remains exactly one `bf-calendar.js` plus one `bf-calendar.css`; the guide does not add another JavaScript or stylesheet reference.
- Installer and Node regression verify the guide by stable structural markers.


## v1.0.86 Minimal screen / Calendar guide correction

- `minimal.html` は最小画面契約専用であり、ガイド本文、追加パネル、追加サンプルセクションを埋め込まない。
- 最小画面は1 CSS / 1 JS / 3つの `data-*` 属性を持つ `bf-calendar` hostだけで成立する。
- ガイドはCalendar内部UIの「ガイド」ボタンから開くCalendar-owned modalとし、standalone bundle内のRuntime/CSSで完結する。
- ガイドはJA/EN、設置、Functional Class/data-* CRUD、#040/#118 ColorPicker連携、主要Propertyを説明する。


## v1.0.58 blank-screen correction

- v1.0.58 is rejected: `create()` referenced `skipManagers` before its `const` declaration, causing a browser `ReferenceError` and leaving `minimal.html` blank.
- v1.0.58 / BoneCalendar 1.0.36 moves the declaration before first use and adds a regression test for declaration order.
- `minimal.html` remains one `bf-calendar.js` + one `bf-calendar.css` with the three-attribute `bf-calendar` host.

## v1.0.86 test-page layout isolation correction

- The #024 test page was inheriting generic `.bf-header` / `.bf-page` layout rules from dependency CSS, collapsing the title into a one-character-wide column.
- v1.0.86 scopes the test-page shell to `main[data-ui-id="UI-024"]` and explicitly resets header/page display while preserving the #017-style structure.
- BoneCalendar Runtime remains 1.0.34.

- Package 1.0.86 / Runtime 1.0.34: selected-day Task cards resolve `Task.typeId -> Task Type.id` and apply the Task Type `backgroundColor/backgroundOpacity` and `textColor/textOpacity`; the Task Type icon is also used in the selected-day row.


## v1.0.86 Minimal ZIP contract
- `BoneFlow_024_bf-calendar_Sample_v1.0.135.zip` is generated from the same formal `minimal.html` shown at `/boneflow/sample/024/calendar/minimal.html`.
- The ZIP contains `minimal.html`, `bf-calendar.js`, and `bf-calendar.css`; it does not substitute `bf-calendar.html` for the Minimal page.
- This keeps the browser Minimal sample and downloadable Minimal sample on one HTML contract.

## v1.0.86 Minimal offline guide contract
- The Minimal screen stays minimal and continues to expose the Calendar-owned Guide button after mount.
- The downloadable Minimal ZIP contains `minimal.html`, `bf-calendar.js`, `bf-calendar.css`, plus offline detailed guide sources under `docs/`: `024-Calendar.md`, `DOC-0024-ja.md`, and `DOC-0024-en.md`.

## v1.0.114 共通設定表示・ガイド表示・#118 Transition
- `data-show-settings-manager-button="true|false"`: 「共通設定を表示」を制御します。
- `data-show-guide-manager-button="true|false"`: 「ガイドを表示」を制御します。
- `data-picker-transition-effect` / `data-picker-transition-direction` / `data-picker-transition-speed` / `data-picker-respect-reduced-motion`: #040 ColorPicker Overlay の正式 #118 Transition を設定します。共通設定で変更した場合、既存 #040 Caller を再接続し、次回 OPEN/CLOSE から実 #118 ENTER/EXIT を使用します。
- Smoke / Validation は表示文言だけでなく、ColorPicker panel の `bf-transition` mount、#118 instance、ENTER/EXIT state を実確認します。#118 が動作しない場合は ALL PASS にしません。

## v1.0.121 選択日表示形式 / 可変高さ
- `selectionLayout` を正式Propertyとして追加する。値は `accordion` / `below-calendar`、default は `accordion`。
- `accordion` は従来どおりCalendar横のSelection領域にアコーディオン表示する。
- `below-calendar` は選択日要素そのものを Calendar本体（`.bone-calendar__calendar-main`）の直後へ独立した兄弟要素として移動し、内容量に応じて下方向へ自然に伸ばす。内部縦スクロールバーで内容を押し込まない。`accordion` へ戻すと同じ要素を再読込なしで Calendar本体内へ戻す。
- 「📖 Calendar 共通設定」に「選択日を表示」チェックと「選択日表示形式」を置き、表示 / 非表示と accordion / below-calendar を再読込なしで即時切替する。
- HTML Functional Class は `data-selection-layout="accordion|below-calendar"` を同じPropertyへ接続する。
- Task / Task Type / Event の一覧は固定 `max-height` を持たず、右側フォームの高さへstretchさせない。親Gridを `align-items:start` / `grid-auto-rows:max-content`、一覧自身を内容高さとして、項目末尾下に巨大な空白領域を残さない。Selectionも `max-height:none; overflow:visible` を維持する。
- 親コンテナが固定高さでも、`below-calendar` では横並びSelection領域へ押し込まず、Calendar下の独立枠として表示する。
- タスク区分ColorPickerの #118 Transition設定元は引き続きCalendar共通設定のみ。#040内部DOM/CSSをConsumer側から操作しない。
- Smoke / Validation は共通設定の即時切替、HTML class初期反映、可変高さ、#040 OPEN/CLOSE、実 #118 ENTER/EXIT を検証する。


### v1.0.121 USER localhost修正
- 既存Property「選択日を表示」は、タスク区分/タスク/イベント等の表示設定と同じProperty領域に保持する。Calendar共通設定へ重複追加しない。
- `selectionLayout=below-calendar` は Accordion 要素自体を移動せず、Calendar本体下に専用の独立リスト要素を生成/配置し、そのリストは固定高さ・内部縦スクロールを持たず内容量に応じて伸びる。
- Task Type / Task / Event の一覧項目は、Redmine互換用の汎用 `button height:24px` の影響を受けず、折り返した全テキストを項目枠内に収める。各一覧も項目内容の合計高さに追従する。

### v1.0.121 選択日表示コントロール
- 既存Property `selectedDayVisible`（「選択日を表示」）を維持し、Calendar共通設定の表示/非表示欄からも同じPropertyをON/OFFできる。新しい重複Propertyは作らない。
- `selectionLayout` は別設定で、`accordion`（デフォルト）/ `below-calendar`（Calendar本体の下に独立した可変高さリスト）を切り替える。
- v1.0.118で修正済みのTask Type / Task / Event一覧項目レイアウトは変更しない。


### v1.0.121 選択日表示修正
- Calendar共通設定の「選択日 / 表示設定」に「選択日を表示」と「選択日表示形式」を同じ場所で表示する。
- `selectionLayout=accordion` は従来のCalendar内アコーディオン（既定）。
- `selectionLayout=below-calendar` は固定 `.bone-calendar` の**外側**、直後の兄弟要素 `.bone-calendar__selected-day-below` に選択日リストを表示する。
- 下部リストは固定高さ・内部縦スクロールを持たず、内容量に応じて下方向へ自然に伸びる。
- `accordion ⇄ below-calendar` は再読込なしで即時切替する。

## Package 1.0.133 task visual / selected-day external list correction
- Work tasks use the selected `workTypeId` visual before the parent `work` Task Type visual.
- Standard Task Type / Work Type background opacity is 60%.
- Task Manager updates Task Name to the selected Work Type label when Work Type changes.
- Legacy standard Work Type labels can repair stale/missing `workTypeId` during normalization.
- `below-calendar` remains outside the Calendar root and the immediate host is made natural-flow/non-clipping only while the external list is visible.

## Package 1.0.133 fixed-frame below-calendar correction
- `below-calendar` is mounted outside the Calendar host, immediately after that host in its parent.
- The Calendar host may remain fixed-height and clipped; Runtime must not rewrite its height/max-height/overflow/alignment.
- The separate selected-day element grows naturally according to its own content.

## Package 1.0.134 actual Calendar anchor correction

- `below-calendar` は固定Hostの下端ではなく、実際の `.bone-calendar` の描画矩形を基準に直下表示します。
- 外部Selectionは `document.body` へ別DOMとしてPortalし、固定Hostの `height` / `max-height` / `overflow` は変更しません。
- Runtime: `BoneCalendar 1.0.38`。
- v1.0.133 の「固定Hostの後ろへ配置」は不採用です。



Package 1.0.135 task-bulk selected-day refresh isolation
- Runtime: BoneCalendar 1.0.38.
- #024 Task bulk replace / add-update / delete / clear updates data without refreshing the selected-day presentation during the bulk action.
- A pending selected-day refresh is applied once when Task Manager closes.
- below-calendar actual-Calendar anchoring from Package 1.0.134 is unchanged.
- Work Type color/name/60% opacity behavior is unchanged.
- USER localhost verification is required before Completed/Frozen.


Package 1.0.136 below-calendar manager isolation
- Runtime: BoneCalendar 1.0.39.
- below-calendar remains a separate body portal anchored to the actual Calendar bottom; fixed host height/overflow are not modified.
- While any #024 manager dialog is open, external selected-day portals are temporarily suppressed so they cannot float above the modal.
- Task-bulk pending selected-day refresh is flushed before the Task Manager portal is restored.
- ResizeObserver repositions the external block when the actual Calendar box changes size.
- USER localhost confirmation is required before Completed / Frozen.

Package 1.0.137 manager list visual-color synchronization
- Runtime: BoneCalendar 1.0.40.
- Task Type manager list rows use each Task Type background/text color and configured opacity.
- Task manager Task Type / Work Type select options and selected value use configured visual colors.
- Task list rows use effective Work Type visual for work tasks and Task Type visual otherwise.
Package 1.0.139 Smoke QA portal contract alignment
- Runtime remains BoneCalendar 1.0.40.
- S53/S54/S55 now validate the current below-calendar body Portal contract instead of the retired sibling placement.
- No Calendar Runtime behavior change in this package.


## #024 Calendar タスクグループ (Package 1.0.153)

タスクグループは **#024 BoneCalendar Runtime 内の正式データ** (`taskGroups`) です。別のRuntime、独立したTaskGroup JS/CSS、独自Timelineを使いません。`taskGroups` はテンプレートであり、適用時に限って既存の `tasks` に変換します。

デフォルト例 `regular-work / 通常勤務`: `weekdays:[1,2,3,4,5]` (月～金)、`items` は 勤務 `09:00`–`18:00` (`typeId:work, workTypeId:normal`) と休憩時間 `12:00`–`13:00` (`typeId:break`) の2件。`weekdays` は日曜0～土曜6。

API: `getTaskGroups`, `setTaskGroups`, `getTaskGroup`, `addTaskGroup`, `updateTaskGroup`, `removeTaskGroup`, `validateTaskGroups`, `applyTaskGroup`, `openTaskGroupManager`。Functional Class: `data-task-groups` / `data-show-task-group-manager-button`、`BoneCalendarFunctionalClass.getTaskGroups/setTaskGroups/applyTaskGroup` など。

`applyTaskGroup(calendar, 'regular-work', {date:'2026-09-14', scope:'week'})` は該当週の適用曜日へタスク登録します。`scope:'day'` では指定日のみ。IDは `tg-{groupId}-{YYYYMMDD}-{itemNo}` で同一グループの再適用は追加重複しません。既存のその他タスクを削除しません。

Calendar下部のタスクグループチップを、**正式な** `BoneDisplayTimeline` Runtime の `.bone-display-timeline` へドラッグすると、同じ `applyTaskGroup` を通って週のタスクを登録し、正式 `BoneDisplayTimeline.setItems` でドロップ先の日付分をタイムバーに反映します。タイムバー範囲外の時刻は事前にエラーにし、Calendarのタスクも変更しません。Timeline側は #054 Runtime をインストールしておく必要があります。#054のRuntimeや内部DOMは変更しません。CalendarとTimelineは同一ページ内が前提です。`data-date` / `data-timeline-date` / `data-calendar-date` の日付があるドロップ先はそれを優先し、ない場合はCalendar選択日を使用します。マルチTimelineの自動一斉再描画は行わず、該当日の別タイムバーは既存Consumerが `bone-calendar:tasks-change` を受けて同期します。

HTML属性のタスクグループデータ例:

```html
<div class="bf-calendar" data-value="2026-09-14" data-task-groups='[{"id":"regular-work","label":"通常勤務","weekdays":[1,2,3,4,5],"items":[{"label":"勤務","start":"09:00","end":"18:00","typeId":"work","workTypeId":"normal"},{"label":"休憩時間","start":"12:00","end":"13:00","typeId":"break"}]}]'></div>
```

注意: 対象のタスク区分 (`work` と `break` 等) が存在すること。初期デフォルトタスク区分を変更したとき `break` が存在しない場合、初期通常勤務テンプレートは自動追加されません。ユーザーが明示した `taskGroups` は必ず検証します。

Package 1.0.153 / Runtime 1.0.50: Installer gracefully skips unrecognized #000 dependency tree and cumulative DOM, keeps #000 unchanged when incompatible, preserves all existing group CRUD; selected group highlighted. USER localhost not yet reverified.


#024 v1.0.153 — Calendar本体のタスクグループ統合 (2026-10-19)
- 追加先: bf-calendar の Calendar本体。専用タスクグループRuntime/独自カレンダー/独自JSONは追加しない。
- 選択日と同じ details/summary アコーディオンを実装。初期状態は開き、グループ数、名称、曜日、勤務・休憩の時間帯を表示。
- 通常カレンダーのグループ管理ボタンはアコーディオン内へ移動し、重複しない。
- グループ操作とグループ内タスク操作を分離。タスク行左端のチェックで選択し、編集・削除を行う。グループ更新で確定。
- タイムバーの横・縦切替は Calendar から正式 #054 BoneDisplayTimeline.setOptions({orientation}) に委譲。#054 Runtime が存在しない画面では切替できたと装わず案内を表示。
- 正式 sample/024/calendar/minimal.html も bf-calendar HTML Class経由で表示する。従来の外部#054週報サンプルは改変しない。
- Chromium direct-HTML-Class/Runtime/CSS browser test: 0 JS errors、accordion開閉/checkbox/グループ追加更新削除 PASS。
- Node regression: 23 files / 273 PASS lines; JS syntax 26 files PASS。
- MANIFEST/SHA256: ZIP作成前後照合。Windows Installer・ユーザーlocalhostは未実施。

## Package 1.0.157 / Runtime 1.0.51 — vertical payroll rows + foreground managers

#024 vertical week/month view retains each 168px date column, adds four labelled rows (開始時間 / 終了時間 / 休憩時間 / 勤務時間) above the formal #054 track, with fixed 112px sticky label column, and uses #048 cell renderers without altering #048/#054. Only the actual #054 row keeps the 672px vertical time axis. Drag target dataset belongs to that timebar row. #024 manager overlays move to document.body when opened, restoring the original Calendar parent when closed, so task/Task Type management stays in front of the timeline. Runtime and standalone must be tested on user Windows localhost.

## 1.0.158 / Runtime 1.0.52 — Work-type totals and #054 refresh

#024 owns the week/month report work-type breakdown under a native expandable section: for all currently configured workTypes, display per-type distinct days, registered scheduled time, gross hours, break overlap and net actual hours. The actual-labor types are normal, holiday-work, substitute-work. Leave, compensatory leave, substitute holiday, special leave and absence are counted as subtype days and registered time but never as actual worked hours. Start/end/label/type edits through #024 manager or public API must refresh formal #048 Table and #054 bars and recalculate weekly/monthly totals immediately. Date/times are measured from #024 task records only; no parallel store or changes to frozen #054/#048. Date range is 7 days for week or actual days for month. Windows installer not executed in development container.

## v1.0.162 / BoneCalendar 1.0.55 — #054 reverse sync and scheduled-workday hours

Official #054 edit event `bone-display-timeline:change` (drag, resize-start, resize-end, api-move, api-resize) on each #048 renderer cell is committed through `BoneCalendar.updateTask()` by exact taskId and cell date, triggering the existing #024 tasks-change auto-save. Renderer `setItems` events are ignored to avoid loops. A public `standardWorkdayMinutes` option (default 480 minutes, range 60–1440, 15 minute step) controls leave/absence day equivalents in work-type totals; actual work types continue counting distinct attendance dates. Six hours of paid leave at 480 minutes/day = 0.75日. The setting is editable via #024 common settings or the formal report toolbar, and is automatically stored under Calendar Standard's `calendarSettings` by the existing DB adapter. No #048/#054/#125 changes.
