# EcabsComponents

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.

## Code scaffolding

Run `ng generate component component-name --project ecabs-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ecabs-components`.
> Note: Don't forget to add `--project ecabs-components` or else it will be added to the default project in your `angular.json` file.

## Build

Run `ng build ecabs-components` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build ecabs-components`, go to the dist folder `cd dist/ecabs-components` and run `npm publish`.

## Running unit tests

Run `ng test ecabs-components` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

## Version History

- **v1.1.93** — Teach a `mat-chip` to wear `ecabs-badge`'s appearance, so a status an operator can change looks like one they cannot.
  - `ecabsBadge` puts the appearance on any host with the same inputs, and `ecabs-badge` uses it internally. Static labels stay `<ecabs-badge>`.
  - A `matMenuTriggerFor` on the badge makes it keyboard-reachable by itself; a static badge drops the ripple and hover layer. `interactive` and `disableRipple` override either.
  - The caret goes in `matChipTrailingIcon` and widens `--badge-max-width` itself, so a menu badge truncates level with a read-only one. Its tooltip needs `ecabsTooltipIfTruncated` and a `matTooltip`.
  - Bind the menu with `[matMenuTriggerFor]="ref.menu"` against `<ecabs-action-menu #ref [showTrigger]="false">`; pair with `action-menu-panel--compact`.
- **v1.1.92** — Add `ecabs-action-menu`, the overflow menu that hangs off a table row, moved out of Panels so the component and the styles that shape it live in one place.
  - Bring your own trigger with an `ng-template ecabsActionMenuTrigger`, or fall back to the built-in three-dot button; `xPosition` picks the side the panel opens on.
  - A projected trigger takes focus and opens on Enter or Space, since the usual one is a label or a badge rather than a button; `triggerFocusable` turns that off when the projected control already handles it.
  - Item icons are optional and vendor-neutral (`icon` plus `iconWeight`, resolved through Phosphor), matching `ecabs-badge`.
  - Panel width is adjustable: `menuClass` takes any class, `action-menu-panel--compact` ships for triggers shorter than a three-dot button, and `--action-menu-min-width` sets it outright.
  - Item styles in `scss/modules/_menu.scss`, with the Material counters in `material/overrides/_menu.scss`.
  - Not to be confused with `ecabs-menu-items`, which renders the sidebar's navigation tree: that is a list of places to go, this is a list of things to do.
- **v1.1.91** — Add `ecabs-badge`, a static status/label badge with semantic variants (`default`/`success`/`warning`/`danger`/`info`).
  - Size scale (`small`/`medium`/`large`) and an optional border, on by default.
  - Three icon tiers: a vendor-neutral `icon` with `iconWeight` (resolved through Phosphor, `bold` by default), a `materialIcon` ligature fallback, and an `ecabsBadgeIcon` projection slot for any other icon set.
  - Labels stay within their container and ellipsise, with the full text shown in a tooltip only when it is actually clipped.
  - Move `PhosphorIconWeight` out of the select models into `icon.consts`, and extract `buildPhosphorSvgIcon` so the icon-set format lives in one place.
  - Add `STATUS_BADGE_VARIANTS` / `resolveStatusBadgeVariant` and the `statusBadgeVariant` pipe, so every app maps a platform status to a badge variant from one place instead of interpolating the status into `class` and relying on the global status styles.
  - Replaces `scss/modules/_statuses.scss` and the status-class section of `material/overrides/_chip.scss`. Both stay for now and retire once every app has migrated.
- **v1.1.90** — Fix `ecabs-select` height issue.
- **v1.1.89** — Fix inflated `ecabs-select` height: nudge the select item icon with a `transform` translate instead of padding so the vertical adjustment no longer adds to the control height.
- **v1.1.88** — Fix `ecabs-validations-messages` freezing a validation message at the first value it rendered; `[token]` placeholders are now interpolated per render instead of overwriting the message template, so a control with a dynamic `max`/`min`/`maxlength` reads the current value.
- **v1.1.87** — Render select item icons through a shared `ecabs-select-icon` component, vertically align the icon with the label, and add spacing between the icon and the selected value's text.
- **v1.1.86** — Add optional Phosphor icon support to select items in `ecabs-select` and `ecabs-select-v2` via `phosphorIcon` (and optional `phosphorWeight`) on `SelectOption`, rendered through `ngx-phosphor-icons`.
- **v1.1.85** — `EcabsButtonsV2`: add `loadingStyle` input (`spinner-only` | `spinner-label`).
  - `EcabsLoadingSpinner`: replace the thick, fixed-color spinner with a thin tapered ring. Color is now themable via `--ecabs-spinner-color`, defaulting to a soft grey (`--color-gray-400`) so standalone spinners read well; inside a button it adopts the button's text color (e.g. white on a primary button).
- **v1.1.84** — Add `name` to the Places field mask in both `ecabs-place-autocomplete` and `ecabs-place-autocomplete-v2` so consumers can fall back to it.
- **v1.1.83** — Support locality-based fallback resolution for history suggestions without `place_id`.
- **v1.1.82** — Disable browser autocomplete on place autocomplete input.
- **v1.1.81** — Implement optional `autoResize` for `EcabsInput`.
- **v1.1.80** - Filter waypoint-history suggestions without a `place_id`; they cannot be selected or booked.
- **v1.1.79** — Fix leading minus of ecabsDigitsOnly input with allowHyphen.
- **v1.1.78** — Add `compareFn` input bound to `[compareWith]` on `mat-chip-listbox` to programmatically set and correctly match values with different object identities.
- **v1.1.77** — Notify change detection on `writeValue` and `setDisabledState` so the UI reflects programmatic form updates, via `markForCheck`.
- **v1.1.76** — Merge waypoint history with Google predictions (history first, clock-iconed).
  - Server-side history filtering on type; instant history on focus.
- **v1.1.75** — Update table border color to use `--color-gray-200` in `bordered` style.
- **v1.1.74** — Optimize `dateRangeValidator` logic to streamline error handling and remove redundant optional input properties `dateFromOptional` and `dateToOptional`.
- **v1.1.73** — Include `place_id` in Google Place API result fields.
  - Add `debounceTime` input for customizable debounce delays
- **v1.1.72** — Add external filtering support (`useExternalFilter`) to `EcabsChipAutocomplete`.
- **v1.1.71** — Add label truncation with tooltip to `EcabsChipAutocomplete` to ensure consistent chip sizing and label overflow handling.
- **v1.1.70** — Improve `EcabsCheckboxV2` with new `checked` input and dynamic label styles.
  - Update border color for `EcabsPhone` and `EcabsTextarea`.
- **v1.1.69** — Use `--color-gray-300` instead of `--color-gray-100` for `form-input--suffix`.
- **v1.1.68** — Add `isVisible` callback for `SidebarMenuItem` to support dynamic visibility based on context.
- **v1.1.67** — Add support for optional "to" (end date) for `EcabsDateRangePickerV2Component`.
  - Add allow cross-midnight time ranges for `EcabsTimeRangeInputV2Component`.
- **v1.1.66** — Suppress emission of an empty query on refocusing after selection of option from `EcabsChipAutocomplete`.
- **v1.1.65** — `EcabsInputRange`: Remove padding and background styling.
- **v1.1.64** — Refactor `EcabsChipAutocomplete` logic, improve component styles/disabled states, and update button styles.
- **v1.1.63** — Add `EcabsSegmentComponent`.
  - Update `EcabsSelectV2` to be more robust when handling multiple selections.
- **v1.1.62** — Add `EcabsTimeRangeInputV2Component`.,
- **v1.1.61** — Added support for 12-hour time input for `maskito` library.
  - **Affected components**: `EcabsDateTimePicker`, `EcabsTimepicker`, `EcabsDateTimeRangePicker`.
- **v1.1.60** — Migrate input mask library from `vanilla-text-mask` to `maskito`.
  - **Affected components**: `EcabsDateTimePicker`, `EcabsTimepicker`, `EcabsDateTimeRangePicker`.
- **v1.1.59** — `EcabsCheckboxV2Component`: Implement version 2 of `EcabsCheckboxComponent`.
- **v1.1.58** — Add `EcabsInputRangeComponent` with support for minimum and maximum values.
- **v1.1.57** — Implement `EcabsChipGroup`and `EcabsAutocompleteChipGroup` components with demo.
- **v1.1.56** — Implement `EcabsDateRangePickerComponentV2`.
- **v1.1.55** — `EcabsButtonsV2Component`: Added version 2 of `EcabsButtonsComponent` with support for small, medium, and large sizes.
- **v1.1.54** — Implement `EcabsButtonToggleComponent` with support for small, medium, and large sizes.
- **v1.1.53** — Introduce new gray color palette and update references and apply styling improvements.
- **v1.1.52** — Update styling overrides for Material nav-style tabs, including active state.
- **v1.1.51** — Implement option of displaying dynamic content for `EcabsTableComponent` when empty.
- **v1.1.50** — Add `Documentation` for `EcabsTableModule`.
- **v1.1.49** — Add support for `splitButtonsWidth` in `EcabsDialogConfirmComponent` and update button styling.`.
- **v1.1.48** — Implement `EcabsPlaceAutocompleteV2Component` to support waypoints history, query change handling, and dropdown suggestions display.
- **v1.1.47** — Add `Title` and `dynamic` content support to `EcabsEmptyPlaceholderComponent`.
- **v1.1.46** — Add `ViewChild` reference for `MatRadioGroup` and update event type in `EcabsRadioButtonListComponent`.
- **v1.1.45** — Added default validation of date range
- **v1.1.44** — Fixed issue Apply button is still active when only the DateFrom is selected
- **v1.1.43** — Added disabling of Apply button for date range picker
- **v1.1.42** — Apply `width` and `height` properties directly to root `MatDialog` of `EcabsDialogConfirmComponent`.
- **v1.1.41** — Added EcabsDialogConfirmationDeletionComponent.
- **v1.1.40** — `EcabsDateTimePicker`: Added support for preserving and returning `receivedValue` when there is no change in the input.
- **v1.1.39** — Added date adapter to public api.
- **v1.1.38** — Use native `matDatepickerToggleIcon` in `EcabsDateTimePicker`.
- **v1.1.35** — Add `waypointType` input to `EcabsAutoComplete`.
  - Add `nativeElement` handles to custom inputs.
- **v1.1.34** — Emit `selectionChange` event when selecting item from `EcabsSelectV2`.
  - Add collapse styling for `EcabsLogo`.
- **v1.1.33** — Return falsey value when no input is available in `DateTime` selector through keyboard action deletion.
- **v1.1.32** — Return falsey value when no input is available in `DateTime` selector.
- **v1.1.31** — Prevent hover state persistence on disabled buttons.
- **v1.1.30** — Added blur event handling and support for special keys in `EcabsTimePickerComponent`.
- **v1.1.29** — Added handling manual updates data of date range picker.
- **v1.1.28** — Fixed issue related to the prev version.
- **v1.1.27** — Added results for the dialog message.
- **v1.1.26** — Implement dynamic titles for `EcabsDialogComponent`.
- **v1.1.25** — Fixed date range picker when choose one date only.
- **v1.1.24** — Fixed date range picker when reset value.
- **v1.1.23** — Update styling for map markers.
- **v1.1.22** — Added statuses for mat-chips.
  - Added badges for menu items.
- **v1.1.21** — Improve style for hovered disabled calendar date.
- **v1.1.20** — Improve the appearance for the scrollbar.
- **v1.1.19** — Increase delay for phone control and to config.
- **v1.1.18** — Adjust position of `sticky` header on `MatTable`.
- **v1.1.17** — Fix peerDependency on `libphonenumber-js`.
- **v1.1.16** — Implemented custom phone number control.
- **v1.1.15** — Cleanup `EcabsComponentsService` and provide default config via `config` property.
- **v1.1.14** — Update styles for disabled indeterminate checkboxes.
- **v1.1.13** — Fix `overflow-y` issue on `MatCardContent`.
- **v1.1.12** — Extend @Input properties of `EcabsSelectV2` from `@ng-select` lib.
- **v1.1.10** — Added color styles for prompt title message.
- **v1.1.9** — Fixed i18n issue.
- **v1.1.8** — Add directive show-on-truncated to directives.
- **v1.1.7** — Add a message for alphanumeric-only validation.
- **v1.1.6** — accumulate all directives
- **v1.1.5** — added slider
- **v1.1.4** — Fixed blur issue for input.
- **v1.1.3** — Upgrade `MatLegacyCard` to `MDC`.
- **v1.1.2** — Introduce new select component (`EcabsSelectV2`) to deprecate `EcabsSelect`.
- **v1.1.1** — Hide `Timepicker` options on input blur.
- **v1.1.0** — Upgrade `MatLegacyMenu` to `MDC`.
- **v1.0.99** — Add `mini` and `maxi` directive and validators to `EcabsInput`.
- **v1.0.98** — Upgrade `MatLegacyAutocomplete` to `MDC`.
- **v1.0.97** — Correct misaligned icon and text on `EcabsNotes`.
- **v1.0.96** — Add missing styles for nested columns on `Table`.
- **v1.0.95** — Upgrade `MatLegacyTooltip` to `MDC`.
- **v1.0.94** — Upgrade `MatLegacyTabs` to `MDC`.
- **v1.0.93** — Update progress colors for percentage.
- **v1.0.92** — Add default buttons for Confirm and Cancel buttons on dialog.
- **v1.0.91** — Upgrade `MatLegacyCheckbox` and `MatSlideToggle` to `MDC`.
- **v1.0.90** — Upgrade `MatLegacyPaginator` to `MDC`.
  - Add `EcabsPaginatorDirective`.
  - Rename `AppHint` to `EcabsHint`.
  - Apply `ngx-toaster` overrides.
- **v1.0.89** — Upgrade `MatLegacyTable` and `MatLegacyProgress` to `MDC`.
- **v1.0.88** — Roll back 1.0.87
- **v1.0.87** — Apply min/max Date logic for date picker
- **v1.0.85** — Improve styling for `EcabsTable` row colors.
- **v1.0.84** — Emit `falsey` result when Close button is clicked on `EcabsDialogConfirm` and `EcabsDialogMessage`.
- **v1.0.83** — Fix buttons height.
- **v1.0.82** — Improve the appearance of disabled inputs.
  - Fix placeholder text of `EcabsSelect`.
- **v1.0.81** — Fix font size of `EcabsSelect`.
- **v1.0.80** — Allow custom button options for `Confirm` and `Cancel` buttons on `EcabsDialog`.
- **v1.0.79** — feat (CU-11266): Update `MatDialog` to `MDC`.
  - Fix button height issue on anchor tags marked as `mat-button`.
  - Update default font family.
  - Rename `NoteComponent` to `EcabsNoteComponent`.
  - Add `expired` style for `EcabsChip`.
- **v1.0.78** — Upgrade `MatSelect` to `MDC`.
- **v1.0.77** — Upgrade `MatChips` to `MDC`.
- **v1.0.76** — Upgrade `EcabsInput` module to `MDC` styling.
- **v1.0.75** — Upgrade `EcabsButtons` module to `MDC` styling.
- **v1.0.18** — Fixed width of date time picker
- **v1.0.13** — Fixed emitEvent behaviour of checkbox
