CMS — Master Components
projects/cms/master/Content Catalogue
Paginated, searchable content list with multi-filter support. The main browse hub for all CMS content.
- Filter by Status, Space, and Content Type simultaneously
- Debounced keyword search (300 ms) — switches between
searchContent()andgetContentList() - Grid / List view toggle
- Status badge renderer: Draft · In Review · Approved · Published · Archived
- Client-side pagination (
pageNo,pageSizesignals)
Content Editor
Structured, multi-tab editor for building CMS documents from containers and blocks.
- Tab navigation between document sections
- Container add using
CmsEditorService.addContainer() - Block add within selected container via
addBlock() - Real-time props editing with debounced auto-save (2 s) via
onBlockPropsChange() - Auto-loads document on init; resets state on destroy
Block Library
Discovery panel listing all available block types an author can insert into a document.
- Built-in canonical blocks: RichText, Checklist, Warning, File, Table, Image, Video, QRCode, Decision, Accordion, Banner
- Server-side override — custom block types loaded from
getContainerTypeList() - Live search and category filter via computed signals
Collections
Dynamic content collections — groups of content items resolved at runtime via query rules.
- Create, edit, and save named collections
- Preview resolved items via
db.resolveCollection(collectionId) - Lazy preview load with separate loading state
Campaigns
Campaign management for targeted content delivery — notifications, assignments, and learning paths.
- Campaign types: Notification · Assignment · Learning Path
- Status lifecycle: Draft → Scheduled → Sent → Closed
- Send campaign action with
db.sendCampaign() - Assignment list with per-item status update
Learning Paths
Sequenced content journeys — ordered lists of content items authors build into a learning path.
- Create and manage multiple learning paths
- Add individual content items by content ID
- Reorder items with
moveItem()— updatespositionNoin real time
Content Analytics
Analytics dashboard showing content and channel metrics for a configurable date range.
- Default range: last 30 days (auto-set on init)
- Derived counts: Published / Draft / In Review via computed signals
- Channel stats loaded in parallel with content stats
Content Portal
End-user content portal — browse, view full documents, and play learning paths.
- Three views: Browse → View → Learning
- Space-filtered content listing
- Full document fetch on item open via
getFullDocument() - Back navigation between views
Render Output
Multi-format output generation — renders content through design-system-backed rendering profiles.
- Select rendering profile + design system
- Multi-select content IDs for batch generation
- Output status: Pending → Generating → Done / Failed
- Output history list per run
CMS — Services
CmsEditorService
Central reactive state store for the content editor. Manages document, container, and block selection state entirely with Angular signals.
Signals
currentDocument— full doc tree (containers + blocks)selectedContainerIdx/selectedBlockIdisDirty/isSaving— track auto-save stateselectedContainer/selectedBlock— computed
Auto-Save Pipeline
- Subject<{blockId, propsJson}> piped through
debounceTime(2000) switchMapcancels in-flight saves on rapid edits- Clears
isSavingon completion - Immutable update pattern — spread + map, never mutate
CmsDbService
HTTP data-access service covering all CMS backend API calls. Delegates to GBHttpService.
Content lifecycle
- getContentFullDocument
- getContentList (paged)
- searchContent
- submitForReview
- approveContent
- publishContent
- archiveContent
Document structure
- getContainersByContent
- saveContentContainer
- reorderContainers
- deleteContentContainer
- getBlocksByContainer
- saveContentBlock
- updateBlockProps
- deleteContentBlock
Extended features
- getVersionHistory
- restoreVersion
- getCollectionList / resolveCollection
- saveCampaign / sendCampaign
- getLearningPathList
- generateOutput (profiles)
- saveDesignSystem
OntologyService
Re-pointed from the Inventory module to the CMS Taxonomy endpoints.
- Load URL:
Cms.Taxonomy.Get(wasInventory.materialmaster.GetDataValidation) - Save URL:
Cms.Taxonomy.Save - Delete URL:
Cms.Taxonomy.Delete - Param key:
TaxonomyId(wasMaterialId)
CMS — New API Endpoints
projects/gbhost/public/api/gb5api/cms.tsContent Lifecycle
| Key | Method | Description |
|---|---|---|
| Cms.Content.GetContentFullDocument | GET | Full document tree (containers + blocks) |
| Cms.Content.GetContentList | GET | Paged content list with filters |
| Cms.Content.SearchContent | GET | Keyword search with space/type filters |
| Cms.Content.SubmitForReview | POST | Move content to In-Review status |
| Cms.Content.ApproveContent | POST | Approve reviewed content |
| Cms.Content.PublishContent | POST | Publish to portal |
| Cms.Content.ArchiveContent | POST | Archive published content |
Document Structure (Containers & Blocks)
| Key | Method | Description |
|---|---|---|
| Cms.ContentContainer.GetByContent | GET | All containers for a content item |
| Cms.ContentContainer.Save | POST | Create / update container |
| Cms.ContentContainer.Reorder | POST | Reorder containers by position |
| Cms.ContentContainer.Delete | DELETE | Remove container and its blocks |
| Cms.ContentBlock.GetByContainer | GET | All blocks in a container |
| Cms.ContentBlock.GetFullDocument | GET | Full block tree for document |
| Cms.ContentBlock.Save | POST | Create / update block |
| Cms.ContentBlock.UpdateProps | POST | Partial update of block props JSON |
| Cms.ContentBlock.Delete | DELETE | Remove single block |
Channels, Collections, Campaigns, Learning Paths
| Key | Method | Description |
|---|---|---|
| Cms.Channel.GetChannelList | GET | All channels |
| Cms.Channel.AddChannelContent | POST | Attach content to channel |
| Cms.Collection.ResolveCollection | GET | Resolve collection query → item list |
| Cms.Campaign.SendCampaign | POST | Dispatch campaign to recipients |
| Cms.Campaign.UpdateAssignmentStatus | POST | Update per-user assignment status |
| Cms.LearningPath.SaveLearningPathItem | POST | Add/reorder item in path |
Design System, Rendering, Versioning
| Key | Method | Description |
|---|---|---|
| Cms.DesignSystem.GetSelectList | GET | Design system options for renderer |
| Cms.RenderingProfile.GenerateOutput | POST | Trigger multi-format content render |
| Cms.ContentVersion.GetVersionHistory | GET | Version history for a content item |
| Cms.ContentVersion.RestoreVersion | POST | Restore older version |
| Cms.Taxonomy.Get / Save / Delete | GET / POST / DELETE | CMS taxonomy (ontology) management |
Work Instruction (WI) — Player & Renderer
Model & Enum Changes
The WI data model gains three new content types and a full container hierarchy enabling multi-zone layouts.
ContentType enum — additions
Image = 1
Video = 2
PDF = 3
Checklist = 4
Warning = 5
DecisionBranch = 6
File = 7 ← NEW
QRCode = 8 ← NEW
DataTable = 9 ← NEW
WiContainerType enum — NEW
TwoColumn = 1
Banner = 2
Accordion = 3
Tab = 4
WiStepContainer interface — NEW
containerId: number
containerType: WiContainerType
containerLabel?: string
blocks: WiStepContent[] // blocks nested per container
}
WiStep retains the existing flat contents?: WiStepContent[] field alongside the new containers?: WiStepContainer[]. The renderer auto-wraps flat content into a single container so no existing documents break.3-Layer Renderer Architecture
A clean hierarchical rendering pipeline separating document, container, and block concerns.
containers[]Maps each container to layer 2
WiStepContainerGroups blocks by zone
Applies container CSS layout
WiStepContent@switch on ContentType
Delegates to type component
Container layouts supported by ContentContainerRenderer:
Blocks are sorted by blockInContainerPos within each named zone. Print mode flattens Accordion and Tab zones to block display.
WiContentBannerComponent
Renders a full-width hero / banner block with background image and bottom-aligned caption.
- Input:
block: WiStepContent(signal input) - Background image from
block().mediaUrl - Caption from
block().mediaCaption - Print: removes background, adds border for ink-safe output
WiContentFileComponent
Renders a downloadable file attachment block — linked file with icon.
- Input:
block: WiStepContent(signal input) - Display name:
block().mediaCaptionor filename from URL - Opens in new tab (target=_blank)
- File type icon displayed alongside link
WiContentTableComponent
Renders a structured data table from JSON stored in contentRef.
- Input:
block: WiStepContent(signal input) - JSON format:
{ headers: string[], rows: string[][] } - Computed
tableData()— safe parse with empty-state fallback - Standard thead/tbody HTML table with WI styling
WiPrintComponent
Print-optimized full-document view — renders every section and step of a WI in a single scrollable layout before calling window.print().
- Input:
wiId: number— fetches full detail on init stepsForSection(sectionId)— groups steps by sectionstepContainers(step)— backward-compat wrapper (flat → container)- Uses
ContentDocumentRendererComponentper step - Print-specific SCSS: hides UI chrome, forces page breaks
WiPlayerStep — Updated
Player step component updated to delegate rendering to the new document renderer.
activeContainers()— returnsstep.containersor wrapsstep.contentsinto single container- Added
ContentDocumentRendererComponentto component imports - No breaking change to existing steps
Summary
CMS — Full authoring system
- Browse, search, filter all content (Catalogue)
- Create & edit structured documents (Editor + Block Library)
- Auto-save with debounce via CmsEditorService
- Lifecycle: Draft → Review → Approved → Published → Archived
- Version history & restore
- Channels, Collections, Campaigns, Learning Paths
- Multi-format rendering output
- Analytics dashboard
- End-user Portal (browse + read + learn)
Work Instruction — Rich rendering
- 3 new block types: File attachment, Data table, Banner/hero
- Container model: Single / TwoColumn / Banner / Accordion / Tab layouts
- 3-layer renderer pipeline (Document → Container → Block)
- Zone-aware block grouping within containers
- Full backward compatibility — flat content auto-wrapped
- Print view with section/step grouping and page-break CSS
- All new components use OnPush + signal inputs