matcha-components 20.24.0 → 20.31.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/index.d.ts CHANGED
@@ -865,16 +865,26 @@ declare class MatchaTabItemComponent {
865
865
  static ɵcmp: i0.ɵɵComponentDeclaration<MatchaTabItemComponent, "matcha-tab", never, { "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, {}, never, ["*"], false, never>;
866
866
  }
867
867
 
868
- declare class MatchaTabsComponent implements AfterContentInit {
868
+ interface TabChangeEvent {
869
+ index: number;
870
+ tab?: MatchaTabItemComponent;
871
+ }
872
+ declare class MatchaTabsComponent implements AfterContentInit, OnChanges {
869
873
  tabs: QueryList<MatchaTabItemComponent>;
870
- activeTabIndex: number;
874
+ selectedIndex: number;
875
+ selectedIndexChange: EventEmitter<number>;
876
+ selectedTabChange: EventEmitter<TabChangeEvent>;
877
+ get activeTabIndex(): number;
878
+ set activeTabIndex(value: number);
871
879
  tabSelected: EventEmitter<number>;
880
+ ngOnChanges(changes: SimpleChanges): void;
872
881
  ngAfterContentInit(): void;
882
+ private handleTabsChange;
873
883
  selectTab(tab: MatchaTabItemComponent): void;
874
884
  selectTabByIndex(index: number): void;
875
885
  handleKeyboardEvent(event: KeyboardEvent): void;
876
886
  static ɵfac: i0.ɵɵFactoryDeclaration<MatchaTabsComponent, never>;
877
- static ɵcmp: i0.ɵɵComponentDeclaration<MatchaTabsComponent, "matcha-tabs", never, { "activeTabIndex": { "alias": "activeTabIndex"; "required": false; }; }, { "tabSelected": "tabSelected"; }, ["tabs"], ["*"], false, never>;
887
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatchaTabsComponent, "matcha-tabs", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "activeTabIndex": { "alias": "activeTabIndex"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "selectedTabChange": "selectedTabChange"; "tabSelected": "tabSelected"; }, ["tabs"], ["*"], false, never>;
878
888
  }
879
889
 
880
890
  declare class MatchaDateRangeComponent implements AfterContentInit, OnDestroy {
@@ -1438,6 +1448,111 @@ declare class CopyButtonComponent {
1438
1448
  static ɵcmp: i0.ɵɵComponentDeclaration<CopyButtonComponent, "matcha-copy-button", never, { "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "position": { "alias": "position"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, { "copied": "copied"; }, never, never, false, never>;
1439
1449
  }
1440
1450
 
1451
+ interface SliderOptions {
1452
+ floor?: number;
1453
+ ceil?: number;
1454
+ step?: number;
1455
+ disabled?: boolean;
1456
+ range?: boolean;
1457
+ pushRange?: boolean;
1458
+ noSwitching?: boolean;
1459
+ minRange?: number;
1460
+ maxRange?: number;
1461
+ animate?: boolean;
1462
+ draggableRange?: boolean;
1463
+ draggableRangeOnly?: boolean;
1464
+ showSelectionBar?: boolean;
1465
+ showSelectionBarEnd?: boolean;
1466
+ showSelectionBarFromValue?: number;
1467
+ showSelectionBarToValue?: number;
1468
+ selectionBarGradient?: {
1469
+ from: string;
1470
+ to: string;
1471
+ };
1472
+ getPointerColor?: (value: number) => string;
1473
+ getSelectionBarColor?: (value: number) => string;
1474
+ hidePointerLabels?: boolean;
1475
+ hideLimitLabels?: boolean;
1476
+ keyboardSupport?: boolean;
1477
+ scale?: number;
1478
+ enforceRange?: boolean;
1479
+ enforceStep?: boolean;
1480
+ noCommaStyle?: boolean;
1481
+ bindIndexForPushRange?: boolean;
1482
+ combineLabels?: boolean;
1483
+ format?: (value: number) => string;
1484
+ combinePossible?: boolean;
1485
+ includeTicksScale?: boolean;
1486
+ logScale?: boolean;
1487
+ customValueToPosition?: (val: number, minVal: number, maxVal: number) => number;
1488
+ customPositionToValue?: (percent: number, minVal: number, maxVal: number) => number;
1489
+ translate?: (value: number, sliderId: string, label: string) => string;
1490
+ }
1491
+ declare class MatchaSliderComponent implements ControlValueAccessor, OnInit, OnDestroy {
1492
+ private cdr;
1493
+ value: number;
1494
+ highValue: number;
1495
+ options: SliderOptions;
1496
+ color: string;
1497
+ disabled: boolean | string;
1498
+ valueChange: EventEmitter<number>;
1499
+ highValueChange: EventEmitter<number>;
1500
+ userChange: EventEmitter<number>;
1501
+ userChangeEnd: EventEmitter<number>;
1502
+ sliderElement?: ElementRef;
1503
+ private destroy$;
1504
+ private isDragging;
1505
+ private draggingPointer;
1506
+ private lastUpdateTime;
1507
+ private animationFrameId;
1508
+ private readonly defaultOptions;
1509
+ private onChange;
1510
+ private onTouched;
1511
+ private boundOnMouseMove;
1512
+ private boundOnMouseUp;
1513
+ constructor(cdr: ChangeDetectorRef);
1514
+ get mergedOptions(): SliderOptions;
1515
+ get isRange(): boolean;
1516
+ get percentage(): number;
1517
+ get highPercentage(): number;
1518
+ get selectionBarStyle(): any;
1519
+ get isAtMaxValue(): boolean;
1520
+ get isDisabled(): boolean;
1521
+ ngOnInit(): void;
1522
+ ngOnDestroy(): void;
1523
+ private initializeValues;
1524
+ private valueToPercentage;
1525
+ private percentageToValue;
1526
+ private snapToStep;
1527
+ onPointerMouseDown(event: MouseEvent, isHighValue?: boolean): void;
1528
+ onTrackMouseDown(event: MouseEvent): void;
1529
+ private addEventListeners;
1530
+ private cleanupEventListeners;
1531
+ private onMouseMove;
1532
+ private updateSliderPosition;
1533
+ private onMouseUp;
1534
+ onPointerClick(event: MouseEvent, isHighValue?: boolean): void;
1535
+ onTrackClick(event: MouseEvent): void;
1536
+ private calculateValueFromPosition;
1537
+ private handleRangeTrackClick;
1538
+ private addVisualFeedback;
1539
+ private removeVisualFeedback;
1540
+ private cancelAnimationFrame;
1541
+ private updateSingleValue;
1542
+ private updateRangeValues;
1543
+ private updateLowValue;
1544
+ private updateHighValue;
1545
+ onKeyDown(event: KeyboardEvent): void;
1546
+ writeValue(value: any): void;
1547
+ registerOnChange(fn: any): void;
1548
+ registerOnTouched(fn: any): void;
1549
+ setDisabledState(isDisabled: boolean): void;
1550
+ getPointerStyle(isHighValue?: boolean): any;
1551
+ formatValue(value: number): string;
1552
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatchaSliderComponent, never>;
1553
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatchaSliderComponent, "matcha-slider", never, { "value": { "alias": "value"; "required": false; }; "highValue": { "alias": "highValue"; "required": false; }; "options": { "alias": "options"; "required": false; }; "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; "highValueChange": "highValueChange"; "userChange": "userChange"; "userChangeEnd": "userChangeEnd"; }, never, never, false, never>;
1554
+ }
1555
+
1441
1556
  declare class MatchaTooltipDirective {
1442
1557
  private el;
1443
1558
  private renderer;
@@ -1752,17 +1867,9 @@ declare class MatchaSlideToggleModule {
1752
1867
  static ɵinj: i0.ɵɵInjectorDeclaration<MatchaSlideToggleModule>;
1753
1868
  }
1754
1869
 
1755
- declare class MatchaSliderDirective {
1756
- private _elementRef;
1757
- private _renderer;
1758
- constructor(_elementRef: ElementRef, _renderer: Renderer2);
1759
- static ɵfac: i0.ɵɵFactoryDeclaration<MatchaSliderDirective, never>;
1760
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatchaSliderDirective, "[matchaSlider]", never, {}, {}, never, never, false, never>;
1761
- }
1762
-
1763
1870
  declare class MatchaSliderModule {
1764
1871
  static ɵfac: i0.ɵɵFactoryDeclaration<MatchaSliderModule, never>;
1765
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaSliderModule, [typeof MatchaSliderDirective], [typeof i2.CommonModule], [typeof MatchaSliderDirective]>;
1872
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaSliderModule, [typeof MatchaSliderComponent], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof MatchaSliderComponent]>;
1766
1873
  static ɵinj: i0.ɵɵInjectorDeclaration<MatchaSliderModule>;
1767
1874
  }
1768
1875
 
@@ -1844,7 +1951,7 @@ declare class MatchaTableModule {
1844
1951
 
1845
1952
  declare class MatchaTabsModule {
1846
1953
  static ɵfac: i0.ɵɵFactoryDeclaration<MatchaTabsModule, never>;
1847
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaTabsModule, [typeof MatchaTabsComponent, typeof MatchaTabItemComponent], [typeof i2.CommonModule, typeof MatchaTooltipModule, typeof MatchaIconModule], [typeof MatchaTabsComponent, typeof MatchaTabItemComponent]>;
1954
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatchaTabsModule, [typeof MatchaTabsComponent, typeof MatchaTabItemComponent], [typeof i2.CommonModule, typeof MatchaIconModule], [typeof MatchaTabsComponent, typeof MatchaTabItemComponent]>;
1848
1955
  static ɵinj: i0.ɵɵInjectorDeclaration<MatchaTabsModule>;
1849
1956
  }
1850
1957
 
@@ -2034,5 +2141,5 @@ declare class StepContentDirective {
2034
2141
  static ɵdir: i0.ɵɵDirectiveDeclaration<StepContentDirective, "[step]", never, { "step": { "alias": "step"; "required": false; }; }, {}, never, never, true, never>;
2035
2142
  }
2036
2143
 
2037
- export { CopyButtonComponent, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBadgeDirective, MatchaBadgeModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaComponentsModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputDirective, MatchaInputModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableDirective, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective };
2038
- export type { BreakpointState, DrawerItem, DrawerMode, DrawerPosition, DrawerSection, ILevelClasses, MatchaDropListConnectedToEvent, MatchaDropListDroppedEvent, MatchaOptionParent, ModalComponent, PageEvent, PanelPlacement, PanelPosition };
2144
+ export { CopyButtonComponent, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBadgeDirective, MatchaBadgeModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaComponentsModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputDirective, MatchaInputModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableDirective, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective };
2145
+ export type { BreakpointState, DrawerItem, DrawerMode, DrawerPosition, DrawerSection, ILevelClasses, MatchaDropListConnectedToEvent, MatchaDropListDroppedEvent, MatchaOptionParent, ModalComponent, PageEvent, PanelPlacement, PanelPosition, SliderOptions, TabChangeEvent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matcha-components",
3
- "version": "20.24.0",
3
+ "version": "20.31.0",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"