Ga naar hoofdinhoud

CnWeekStripWidget

The current week as day columns, with the dated items listed under each day. Use it for deadlines, appointments or anything else somebody should see coming. Registered under the week-strip type and configured by CnWeekStripWidgetForm.

  • Five working days by default. Set days: 7 to add the weekend.
  • Today's column is highlighted and carries a "today" badge.
  • An item that is late gets a marked edge and the word "Late".
  • A day without items shows emptyText.
  • On a narrow screen the strip scrolls sideways. The scroll area takes keyboard focus. Under the board look (.cn-look-board) the days wrap into rows of days at least 120px wide instead, and do not scroll.

Items come from an OpenRegister source or from static items. A source costs one request for the whole week.

Manifest​

{
"widgetKey": "week-strip",
"slot": "body",
"gridX": 0, "gridY": 0, "gridWidth": 8, "gridHeight": 3,
"props": {
"content": {
"source": { "register": "dossiq", "schema": "case", "filter": { "assignee": "@me" } },
"dateField": "deadline",
"titleField": "title",
"metaFields": ["identifier", "caseType"],
"itemRoute": "CaseDetail",
"emptyText": "No deadlines"
}
}
}

With static items:

{
"widgetKey": "week-strip",
"props": {
"content": {
"days": 7,
"items": [
{ "title": "Council meeting", "meta": "Town hall", "date": "2026-10-07", "route": "Meetings" },
{ "title": "Budget deadline", "date": "2026-10-09", "href": "https://example.org/budget", "late": true }
]
}
}
}

Content shape​

KeyTypeDefaultDescription
days5 | 75Working days, or the whole week. The week starts on Monday.
source{ register, schema, filter?, limit?, extend? }noneThe OpenRegister source. filter takes the shared @-token grammar (@me, @today). limit caps the request (default 100). extend lists relations to inline (["caseType"]), so a meta field can read caseType.title.
dateFieldstringnoneThe field the items are bucketed by. Required with a source.
titleFieldstringthe object's display nameThe field shown as the item title.
metaFieldsArray<string | string[]>[]Fields shown under the title, joined with a middle dot. An entry that is a list shows the first of its fields that is filled: ["identifier", ["caseType.shortName", "caseType.title"]] reads "2026-4837 · Woo".
itemRoutestringnoneRoute name an item links to. The record id goes in params.id.
lateWhen{ op, value }{ "op": "lt", "value": 0 }Rule on the number of days until the date. The default marks dates before today. { "op": "lte", "value": 0 } also marks today.
lateFieldstringnoneA boolean field that marks a record late, whatever its date.
itemsArray<{ title, meta?, date, route?, href?, late? }>[]Static items, used when there is no source.
emptyTextstring"Nothing planned"Text of a day without items.
weekOffsetnumber0Whole weeks from the current one (1 is next week).
maxPerDaynumbernoneThe most items a day shows. The rest sit behind "+N more". Without it a day shows all its items and grows with them.
moreRoutestring | objectnoneWhere "+N more" leads: a route name or a route object (the full list). Without it "+N more" is a button that opens the day in place, and "Show less" closes it.
moreLabelstring"+N more"Text of the control, with {count} for the number hidden. Goes through the host's translate.
langstringthe page's languageThe language of the item texts, a tag such as nl. Long words hyphenate by its rules: "Parkeer-vergunningen" instead of a break mid-syllable.

Props​

PropTypeDefaultDescription
contentobject{}The configuration blob described above.
translatefunctionnullTranslate function for emptyText and static item texts. Falls back to the injected cnTranslate.
nowDatenullThe moment the strip treats as now. Leave empty for the current time.

Accessibility​

  • The days are an ordered list. Today's column has aria-current="date".
  • Each item with a route is a link, reachable with Tab.
  • A late item says "Late" in text. The coloured edge only adds emphasis.
  • The scroll area is a labelled region with tabindex="0", so the arrow keys scroll it. Under the board look the days wrap and there is nothing to scroll.

content.inset​

inset: true draws the strip inside the board's inset (16px above, 24px at the sides, 22px below; theme hook --cn-widget-board-inset) instead of from card edge to card edge. Off by default.