# Cygnus Reach Session UI for Angular

This library provides configurable UI components designed to work with the [Reach Session](https://www.npmjs.com/package/@cygnus-reach/session) web library, allowing for the creation of Reach portals and "zero-install" web apps for use by support agents and technicians alike. This library was built with Angular 18.2.13 and has been tested in Angular 18 and 20.

# Usage

UI components in this library are designed for use with the `SessionService` Angular service provided in this library, which extends the Reach Session library's implementation for optimized use in an Angular context. Theming can be customized using CSS variables and classes described [here](STYLING.md), alongside text and iconography customization.

# Changelog

-   2.0.0
    -   Updated to `rxjs 7.x`
    -   Removed dependencies on `@swimlane/ngx-datatable` and `ngx-toastr`
    -   Widened support for Angular versions to 18-21.
    -   Replaced `lib-` selector prefix with `cyg-rs-` prefix across full library
    -   Revised styling system to fully support runtime editing and light and dark modes. This represents the 2026 Constellation Design System, simplifying the color and typography styling systems, alongside numerous other changes.
    -   Reduced scope of items exposed for public use, hiding a number of low-level internal components, models, and utilities that were not intended for external usage.
    -   Aligned all component inputs with `icons` and `text` model, affecting `SessionHistory`, `SessionResources`, `SessionView`, and `ConnectedMediaEditor`
    -   Introduced new component for session creation and invitation process: `CreateSession`. Also exposed two underlying components for customization, `InvitationGrid` and `InvitationDialog`.
    -   Introduced new output for `SessionResources`, `StreamUnit`, and `ConnectedMediaEditor` to replace internal display of toasts. Now, components wishing to display momentary pop-up notifications in the UI will emit events with `NotificationEvent` payloads.
-   1.5.1 _(Beta releases only)_
    -   Reverted renaming of `EnterSession`, `TextTabs`, and `IconTabs`.
    -   Renamed input interfaces for `SessionView` and `SessionViewHeader` to reflect new component names.
    -   Fixed inconsistent fields in `MediaViewIcons`, removing an unused `delete` field and adding a missing `edit` field. This affects the `MediaView` and `SessionResources` components.
    -   Reverted changes to field names in `EnterSessionText` and `SessionInviteText`, replacing `btnText` with previous context-based names.
    -   Fixed bug in `SessionHistory` that caused errors when `mediaText` input was not provided.
    -   Fixed bug in `SessionInviteUser` that caused phone number formatting to not be shown.
    -   Updated `GenericMatDataTable` styling to better fit into customizable styling.
    -   Reorganized exported text defaults to group them by functional area. Items formerly in `TextDefaults` are now available in:
        -   `ChatTextDefaults`
        -   `DeviceTextDefaults`
        -   `HistoryTextDefaults`
        -   `MediaTextDefaults`
        -   `NoteTextDefaults`
        -   `SessionTextDefaults`
        -   `StreamTextDefaults`
        -   `ConnectedUITextDefaults`
        -   `SharedTextDefaults`
    -   Removed a number of deprecated and unused models and constants:
        -   `Tab` enumeration: `SessionTab` should be used in its place.
        -   `User` class.
        -   Various deprecated internal screen drawing constants:
            -   `DEFAULT_ERASER_WIDTH`
            -   `DEFAULT_ERASER_COLOR`
            -   `DESTINATION_OUT`
            -   `SOURCE_OVER`
-   1.5.0
    -   Updated to Angular 18.2.13.
    -   Renamed various components:
        -   `EnterSession` → `StartSession`
        -   `TextTabs` → `TextTab`
        -   `IconTabs` → `IconTab`
        -   `ArchivedSessionView` → `SessionView`
        -   `ArchivedSessionHeader` → `SessionViewHeader`
    -   Revised `SessionView` component to not include `SessionViewHeader` by default.
    -   Introduced new table component, `GenericMatDataTable`, which now serves as the basis for the `SessionHistoryTable` component.
    -   Introduced new button utility components: `BaseButton`, `ChatInputButton`, `ChatMediaButton`, and `MediaEditorRoundButton`.
    -   Changed button-related field names in `EnterSessionText` and `SessionInviteText` to `btnText`.
-   1.4.4
    -   Re-release to fix configuration error.
-   1.4.3
    -   Revised SMS phone number validation (not published).
-   1.4.2
    -   Updated dependencies.
-   1.4.1
    -   Improved functionality of drag-to-download feature on media cards, providing increased support for images dragged into programs.
    -   Bugfix to `ChatInput`, keeping the submit event from being fired without `canSend` being set.
    -   Fixed bug causing viewing a session within `SessionHistory` to affect recording of history.
-   1.4.0
    -   Revised stream units to use improved start/end share system, ensuring browser permissions are released when not in use.
    -   Added UI for pending stream source state.
    -   Added optional input-configured drag-to-download system for session media (in history or resources), supported by Google Chrome and some other Chromium-based browsers.
-   1.3.1
    -   Request state handling added to stream units.
    -   Welcome text configuration added to stream units.
    -   Bugfixes to icon inheritance in media file display grids and generic dialog close icons.
-   1.3.0
    -   Small fix to `GenericDialog` configuration.
-   1.2.1
    -   Update to session service configuration with regards to session invitations.
-   1.2.0
    -   Initial release.
