cps-ui-kit 21.6.0 → 21.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "21.6.0",
3
+ "version": "21.8.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.6",
6
6
  "@angular/core": "^21.2.6",
@@ -646,6 +646,7 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
646
646
  recalcVirtualListHeight(): void;
647
647
  isEmptyValue(): boolean;
648
648
  clearInput(): void;
649
+ get isRequired(): boolean;
649
650
  get computedLabel(): string | null;
650
651
  get isSelectAllVisible(): boolean;
651
652
  get optionsAriaSetSize(): number;
@@ -695,6 +696,7 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
695
696
  private _control;
696
697
  private document;
697
698
  private renderer;
699
+ private cdr;
698
700
  /**
699
701
  * Label of the button toggle component.
700
702
  * @group Props
@@ -775,7 +777,7 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
775
777
  valueChanged: EventEmitter<any>;
776
778
  largestButtonWidthRem: number;
777
779
  private _rootFontSizePx;
778
- constructor(_control: NgControl, document: Document, renderer: Renderer2);
780
+ constructor(_control: NgControl, document: Document, renderer: Renderer2, cdr: ChangeDetectorRef);
779
781
  ngOnInit(): void;
780
782
  ngOnChanges(): void;
781
783
  onChange: (event: any) => void;
@@ -788,7 +790,7 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
788
790
  private _updateValue;
789
791
  private _setEqualWidths;
790
792
  private _pxToRem;
791
- static ɵfac: i0.ɵɵFactoryDeclaration<CpsButtonToggleComponent, [{ optional: true; self: true; }, null, null]>;
793
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsButtonToggleComponent, [{ optional: true; self: true; }, null, null, null]>;
792
794
  static ɵcmp: i0.ɵɵComponentDeclaration<CpsButtonToggleComponent, "cps-button-toggle", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "mandatory": { "alias": "mandatory"; "required": false; }; "equalWidths": { "alias": "equalWidths"; "required": false; }; "optionTooltipPosition": { "alias": "optionTooltipPosition"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "_value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
793
795
  }
794
796
 
@@ -1399,21 +1401,25 @@ declare class CpsDividerComponent {
1399
1401
  /**
1400
1402
  * Determines whether the divider is vertically aligned.
1401
1403
  * @group Props
1404
+ * @default false
1402
1405
  */
1403
1406
  vertical: i0.InputSignal<boolean>;
1404
1407
  /**
1405
1408
  * Color of the divider.
1406
1409
  * @group Props
1410
+ * @default line-mid
1407
1411
  */
1408
1412
  color: i0.InputSignal<string>;
1409
1413
  /**
1410
1414
  * Type of the divider.
1411
1415
  * @group Props
1416
+ * @default solid
1412
1417
  */
1413
1418
  type: i0.InputSignal<CpsDividerType>;
1414
1419
  /**
1415
1420
  * Thickness of the divider, a number denoting pixels or a string.
1416
1421
  * @group Props
1422
+ * @default 1px
1417
1423
  */
1418
1424
  thickness: i0.InputSignal<string | number>;
1419
1425
  constructor(document: Document);
@@ -1511,7 +1517,7 @@ declare class CpsExpansionPanelComponent implements OnInit, AfterViewInit {
1511
1517
  * CpsFileUploadComponent is an advanced uploader with dragdrop support.
1512
1518
  * @group Components
1513
1519
  */
1514
- declare class CpsFileUploadComponent implements OnInit, OnChanges {
1520
+ declare class CpsFileUploadComponent implements OnInit, OnChanges, OnDestroy {
1515
1521
  /**
1516
1522
  * Expected extensions of a file to be uploaded. E.g. 'doc or .doc'.
1517
1523
  * @group Props
@@ -1523,15 +1529,20 @@ declare class CpsFileUploadComponent implements OnInit, OnChanges {
1523
1529
  */
1524
1530
  fileDesc: string;
1525
1531
  /**
1526
- * Width of the component, a number denoting pixels or a string.
1532
+ * Aria label for the component, used for accessibility.
1527
1533
  * @group Props
1528
1534
  */
1529
- width: number | string;
1535
+ ariaLabel: string;
1530
1536
  /**
1531
1537
  * Expected file info block, explaining some extra stuff about file.
1532
1538
  * @group Props
1533
1539
  */
1534
1540
  fileInfo: string;
1541
+ /**
1542
+ * Whether the component is disabled.
1543
+ * @group Props
1544
+ */
1545
+ disabled: boolean;
1535
1546
  /**
1536
1547
  * Callback for uploaded file processing.
1537
1548
  * @group Props
@@ -1547,6 +1558,12 @@ declare class CpsFileUploadComponent implements OnInit, OnChanges {
1547
1558
  * @group Props
1548
1559
  */
1549
1560
  fileNameTooltipOffset: number;
1561
+ /**
1562
+ * Width of the component, a number denoting pixels or a string.
1563
+ * @group Props
1564
+ * @default 100%
1565
+ */
1566
+ width: i0.InputSignal<string | number>;
1550
1567
  /**
1551
1568
  * Callback to invoke when file is uploaded.
1552
1569
  * @param {File} File
@@ -1559,6 +1576,24 @@ declare class CpsFileUploadComponent implements OnInit, OnChanges {
1559
1576
  * @group Emits
1560
1577
  */
1561
1578
  fileUploadFailed: EventEmitter<string>;
1579
+ /**
1580
+ * Callback to invoke when file is processed.
1581
+ * @param {File} File
1582
+ * @group Emits
1583
+ */
1584
+ fileProcessed: EventEmitter<File>;
1585
+ /**
1586
+ * Callback to invoke when file processing fails.
1587
+ * @param {string} - file name
1588
+ * @group Emits
1589
+ */
1590
+ fileProcessingFailed: EventEmitter<string>;
1591
+ /**
1592
+ * Callback to invoke when file processing is cancelled.
1593
+ * @param {string} - file name
1594
+ * @group Emits
1595
+ */
1596
+ fileProcessingCancelled: EventEmitter<string>;
1562
1597
  /**
1563
1598
  * Callback to invoke when uploaded file is removed.
1564
1599
  * @param {string} - file name
@@ -1566,20 +1601,36 @@ declare class CpsFileUploadComponent implements OnInit, OnChanges {
1566
1601
  */
1567
1602
  uploadedFileRemoved: EventEmitter<string>;
1568
1603
  fileInput?: ElementRef<HTMLInputElement>;
1604
+ dropzoneButton?: ElementRef<HTMLButtonElement>;
1569
1605
  isDragoverFile: boolean;
1570
1606
  uploadedFile?: File;
1571
1607
  extensionsString: string;
1572
1608
  extensionsStringAsterisks: string;
1573
- cvtWidth: string;
1609
+ cvtWidth: i0.Signal<string>;
1574
1610
  isProcessingFile: boolean;
1611
+ errorMessage: string;
1612
+ private dragCounter;
1613
+ private readonly cancelProcessing$;
1575
1614
  ngOnInit(): void;
1615
+ ngOnDestroy(): void;
1576
1616
  ngOnChanges(changes: SimpleChanges): void;
1617
+ resetState(): void;
1618
+ openFilePicker(): void;
1619
+ onDragEnter(): void;
1620
+ onDragLeave(): void;
1621
+ onDragEnd(): void;
1622
+ onDragOver(event: DragEvent): void;
1623
+ onDrop(event: Event): void;
1577
1624
  updateExtensionsString(): void;
1578
1625
  tryUploadFile(event: Event): void;
1626
+ onRemoveUploadedFile(event: Event): void;
1627
+ onCancelFileProcessing(event: Event): void;
1628
+ cancelFileProcessing(): void;
1579
1629
  removeUploadedFile(): void;
1580
1630
  private _isFileExtensionValid;
1581
1631
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsFileUploadComponent, never>;
1582
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsFileUploadComponent, "cps-file-upload", never, { "extensions": { "alias": "extensions"; "required": false; }; "fileDesc": { "alias": "fileDesc"; "required": false; }; "width": { "alias": "width"; "required": false; }; "fileInfo": { "alias": "fileInfo"; "required": false; }; "fileProcessingCallback": { "alias": "fileProcessingCallback"; "required": false; }; "fileNameTooltipPosition": { "alias": "fileNameTooltipPosition"; "required": false; }; "fileNameTooltipOffset": { "alias": "fileNameTooltipOffset"; "required": false; }; }, { "fileUploaded": "fileUploaded"; "fileUploadFailed": "fileUploadFailed"; "uploadedFileRemoved": "uploadedFileRemoved"; }, never, never, true, never>;
1632
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsFileUploadComponent, "cps-file-upload", never, { "extensions": { "alias": "extensions"; "required": false; }; "fileDesc": { "alias": "fileDesc"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "fileInfo": { "alias": "fileInfo"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "fileProcessingCallback": { "alias": "fileProcessingCallback"; "required": false; }; "fileNameTooltipPosition": { "alias": "fileNameTooltipPosition"; "required": false; }; "fileNameTooltipOffset": { "alias": "fileNameTooltipOffset"; "required": false; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "fileUploaded": "fileUploaded"; "fileUploadFailed": "fileUploadFailed"; "fileProcessed": "fileProcessed"; "fileProcessingFailed": "fileProcessingFailed"; "fileProcessingCancelled": "fileProcessingCancelled"; "uploadedFileRemoved": "uploadedFileRemoved"; }, never, never, true, never>;
1633
+ static ngAcceptInputType_disabled: unknown;
1583
1634
  static ngAcceptInputType_fileNameTooltipOffset: unknown;
1584
1635
  }
1585
1636
 
@@ -1759,42 +1810,51 @@ declare class CpsProgressCircularComponent implements OnInit {
1759
1810
  * CpsProgressLinearComponent is a process status indicator of a rectangular form.
1760
1811
  * @group Components
1761
1812
  */
1762
- declare class CpsProgressLinearComponent implements OnInit {
1763
- private document;
1813
+ declare class CpsProgressLinearComponent {
1764
1814
  /**
1765
1815
  * Width of the progress bar, of type number denoting pixels or string.
1766
1816
  * @group Props
1817
+ * @default 100%
1767
1818
  */
1768
- width: number | string;
1819
+ width: i0.InputSignal<string | number>;
1769
1820
  /**
1770
1821
  * Height of the progress bar, of type number denoting pixels or string.
1771
1822
  * @group Props
1823
+ * @default 0.5rem
1772
1824
  */
1773
- height: number | string;
1825
+ height: i0.InputSignal<string | number>;
1774
1826
  /**
1775
1827
  * Color of the progress bar.
1776
1828
  * @group Props
1829
+ * @default var(--cps-accent-primary)
1777
1830
  */
1778
- color: string;
1831
+ color: i0.InputSignal<string>;
1779
1832
  /**
1780
1833
  * Background color of the progress bar.
1781
1834
  * @group Props
1835
+ * @default white
1782
1836
  */
1783
- bgColor: string;
1837
+ bgColor: i0.InputSignal<string>;
1784
1838
  /**
1785
1839
  * Option to control the opacity of the progress bar.
1786
1840
  * @group Props
1841
+ * @default 1
1787
1842
  */
1788
- opacity: number | string;
1843
+ opacity: i0.InputSignal<string | number>;
1789
1844
  /**
1790
1845
  * Border radius of the progress bar, of type number denoting pixels or string.
1791
1846
  * @group Props
1847
+ * @default 0
1792
1848
  */
1793
- radius: number | string;
1794
- constructor(document: Document);
1795
- ngOnInit(): void;
1849
+ radius: i0.InputSignal<string | number>;
1850
+ private readonly document;
1851
+ cvtWidth: i0.Signal<string>;
1852
+ cvtHeight: i0.Signal<string>;
1853
+ cvtRadius: i0.Signal<string>;
1854
+ cssColor: i0.Signal<string>;
1855
+ cssBgColor: i0.Signal<string>;
1796
1856
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsProgressLinearComponent, never>;
1797
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsProgressLinearComponent, "cps-progress-linear", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "color": { "alias": "color"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "opacity": { "alias": "opacity"; "required": false; }; "radius": { "alias": "radius"; "required": false; }; }, {}, never, never, true, never>;
1857
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsProgressLinearComponent, "cps-progress-linear", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1798
1858
  }
1799
1859
 
1800
1860
  /**
@@ -1804,6 +1864,7 @@ declare class CpsProgressLinearComponent implements OnInit {
1804
1864
  type CpsRadioOption = {
1805
1865
  value: any;
1806
1866
  label?: string;
1867
+ ariaLabel?: string;
1807
1868
  disabled?: boolean;
1808
1869
  tooltip?: string;
1809
1870
  };
@@ -1812,7 +1873,7 @@ declare const CPS_RADIO_GROUP: InjectionToken<CpsRadioGroupComponent>;
1812
1873
  * CpsRadioGroupComponent is a radio buttons group.
1813
1874
  * @group Components
1814
1875
  */
1815
- declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, OnDestroy {
1876
+ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy {
1816
1877
  private _control;
1817
1878
  /**
1818
1879
  * An array of options.
@@ -1824,6 +1885,11 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
1824
1885
  * @group Props
1825
1886
  */
1826
1887
  groupLabel: string;
1888
+ /**
1889
+ * Aria label for the radio group, used for accessibility, it takes precedence over groupLabel.
1890
+ * @group Props
1891
+ */
1892
+ ariaLabel: string;
1827
1893
  /**
1828
1894
  * Determines whether the radio group should be vertical.
1829
1895
  * @group Props
@@ -1893,11 +1959,13 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
1893
1959
  * @group Emits
1894
1960
  */
1895
1961
  focused: EventEmitter<any>;
1962
+ readonly groupName: string;
1896
1963
  private _statusChangesSubscription?;
1897
1964
  private _value;
1898
1965
  error: string;
1899
1966
  constructor(_control: NgControl);
1900
1967
  ngOnInit(): void;
1968
+ ngOnChanges(): void;
1901
1969
  ngOnDestroy(): void;
1902
1970
  onChange: (event: any) => void;
1903
1971
  onTouched: () => void;
@@ -1909,9 +1977,11 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
1909
1977
  setDisabledState(disabled: boolean): void;
1910
1978
  onBlur(): void;
1911
1979
  onFocus(): void;
1980
+ get isRequired(): boolean;
1981
+ get computedLabel(): string | null;
1912
1982
  private _checkErrors;
1913
1983
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsRadioGroupComponent, [{ optional: true; self: true; }]>;
1914
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioGroupComponent, "cps-radio-group", never, { "options": { "alias": "options"; "required": false; }; "groupLabel": { "alias": "groupLabel"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "blurred": "blurred"; "focused": "focused"; }, never, ["*"], true, never>;
1984
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsRadioGroupComponent, "cps-radio-group", never, { "options": { "alias": "options"; "required": false; }; "groupLabel": { "alias": "groupLabel"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; "blurred": "blurred"; "focused": "focused"; }, never, ["*"], true, never>;
1915
1985
  }
1916
1986
 
1917
1987
  /**