@colijnit/corecomponents_v12 261.20.9 → 261.20.10

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.
@@ -11834,6 +11834,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
11834
11834
  args: ['document:mouseup', ['$event']]
11835
11835
  }] } });
11836
11836
 
11837
+ var ScrollDirection;
11838
+ (function (ScrollDirection) {
11839
+ ScrollDirection["top"] = "top";
11840
+ ScrollDirection["bottom"] = "bottom";
11841
+ })(ScrollDirection || (ScrollDirection = {}));
11842
+
11837
11843
  class ObserveVisibilityDirective {
11838
11844
  _element;
11839
11845
  threshold = 0;
@@ -12407,6 +12413,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12407
12413
  changeDetection;
12408
12414
  _formMaster;
12409
12415
  defaultTextAlign = ColumnAlign.Left;
12416
+ scrollDirections = ScrollDirection;
12410
12417
  set headerCells(cells) {
12411
12418
  const headerElements = cells.toArray();
12412
12419
  for (let i = 0; i < headerElements.length; i++) {
@@ -12425,6 +12432,8 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12425
12432
  showColumnSort = false;
12426
12433
  showRowButtons = false;
12427
12434
  resetPageOnDataChange = true;
12435
+ scrollOnRowAction = true;
12436
+ scrollDirection = ScrollDirection.top;
12428
12437
  /**
12429
12438
  * Promise function, if provided should return boolean
12430
12439
  */
@@ -12575,7 +12584,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12575
12584
  if (this.currentPage !== 1) {
12576
12585
  this.currentPage = 1;
12577
12586
  this.selectedRowIndex = -1;
12578
- window.scrollTo({ top: 0, behavior: 'smooth' });
12587
+ this._scrollAfterRowAction();
12579
12588
  }
12580
12589
  this._detectChanges();
12581
12590
  }
@@ -12588,7 +12597,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12588
12597
  if (this.currentPage !== 1) {
12589
12598
  this.currentPage = 1;
12590
12599
  this.selectedRowIndex = -1;
12591
- window.scrollTo({ top: 0, behavior: 'smooth' });
12600
+ this._scrollAfterRowAction();
12592
12601
  }
12593
12602
  this._detectChanges();
12594
12603
  }
@@ -12932,7 +12941,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12932
12941
  if (this._newRow) {
12933
12942
  this.saveRow.next(this._newRowReference);
12934
12943
  this._newRowReference = null; // clear
12935
- window.scrollTo({ top: 0, behavior: 'smooth' });
12944
+ this._scrollAfterRowAction();
12936
12945
  }
12937
12946
  else {
12938
12947
  let index = -1; // existing row
@@ -12963,8 +12972,20 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12963
12972
  this.editing = false;
12964
12973
  this.rowToEdit = undefined;
12965
12974
  }
12975
+ _scrollAfterRowAction() {
12976
+ if (!this.scrollOnRowAction) {
12977
+ return;
12978
+ }
12979
+ const top = this.scrollDirection === ScrollDirection.top
12980
+ ? 0
12981
+ : document.documentElement.scrollHeight;
12982
+ window.scrollTo({
12983
+ top: top,
12984
+ behavior: "smooth"
12985
+ });
12986
+ }
12966
12987
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridComponent, deps: [{ token: IconCacheService }, { token: i0.ChangeDetectorRef }, { token: FormMasterService }], target: i0.ɵɵFactoryTarget.Component });
12967
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridComponent, isStandalone: false, selector: "co-simple-grid", inputs: { showAdd: "showAdd", showDelete: "showDelete", deselectAllowed: "deselectAllowed", editOnCellClick: "editOnCellClick", rightToolbar: "rightToolbar", showGridSettings: "showGridSettings", rowsPerPage: "rowsPerPage", rowDisabledFn: "rowDisabledFn", showColumnSort: "showColumnSort", showRowButtons: "showRowButtons", resetPageOnDataChange: "resetPageOnDataChange", canRowBeEdittedFn: "canRowBeEdittedFn" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.co-simple-grid": "this.showClass" } }, providers: [FormMasterService], viewQueries: [{ propertyName: "headerCells", predicate: ["headerCell"], descendants: true }, { propertyName: "rowElements", predicate: ["rowElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
12988
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridComponent, isStandalone: false, selector: "co-simple-grid", inputs: { showAdd: "showAdd", showDelete: "showDelete", deselectAllowed: "deselectAllowed", editOnCellClick: "editOnCellClick", rightToolbar: "rightToolbar", showGridSettings: "showGridSettings", rowsPerPage: "rowsPerPage", rowDisabledFn: "rowDisabledFn", showColumnSort: "showColumnSort", showRowButtons: "showRowButtons", resetPageOnDataChange: "resetPageOnDataChange", scrollOnRowAction: "scrollOnRowAction", scrollDirection: "scrollDirection", canRowBeEdittedFn: "canRowBeEdittedFn" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.co-simple-grid": "this.showClass" } }, providers: [FormMasterService], viewQueries: [{ propertyName: "headerCells", predicate: ["headerCell"], descendants: true }, { propertyName: "rowElements", predicate: ["rowElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
12968
12989
  @if (showToolbar) {
12969
12990
  <co-grid-toolbar
12970
12991
  [class.right]="rightToolbar"
@@ -13404,6 +13425,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13404
13425
  type: Input
13405
13426
  }], resetPageOnDataChange: [{
13406
13427
  type: Input
13428
+ }], scrollOnRowAction: [{
13429
+ type: Input
13430
+ }], scrollDirection: [{
13431
+ type: Input
13407
13432
  }], canRowBeEdittedFn: [{
13408
13433
  type: Input
13409
13434
  }], showClass: [{
@@ -20886,5 +20911,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
20886
20911
  * Generated bundle index. Do not edit.
20887
20912
  */
20888
20913
 
20889
- export { AlignWithDirective, AlignWithModule, AppendPipe, AppendPipeModule, ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CalendarTemplateComponent, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayComponent, CheckmarkOverlayModule, ClickOutsideDirective, ClickoutsideModule, CoCurrencyPipe, CoCurrencyPipeModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, CoreLocalizePipe, DoubleCalendarComponent, DoubleCalendarModule, DragDropContainer, DragDropContainerComponent, DragDropManagerService, DragDropModule, DraggableDirective, ElementPosition, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, HourSchedulingExpandableTemplateModule, HourSchedulingTestObjectComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, InputTimeComponent, InputTimeModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityDirective, ObserveVisibilityModule, OrientationOfDirection, OverlayDirective, OverlayModule, OverlayParentDirective, OverlayService, PaginatePipe, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PrependPipe, PrependPipeModule, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, ScrollContainerComponent, ScrollContainerModule, SimpleGridCellComponent, SimpleGridColumnDirective, SimpleGridColumnTemplateDirective, SimpleGridColumnTemplateType, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirective, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog };
20914
+ export { AlignWithDirective, AlignWithModule, AppendPipe, AppendPipeModule, ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CalendarTemplateComponent, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayComponent, CheckmarkOverlayModule, ClickOutsideDirective, ClickoutsideModule, CoCurrencyPipe, CoCurrencyPipeModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, CoreLocalizePipe, DoubleCalendarComponent, DoubleCalendarModule, DragDropContainer, DragDropContainerComponent, DragDropManagerService, DragDropModule, DraggableDirective, ElementPosition, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, HourSchedulingExpandableTemplateModule, HourSchedulingTestObjectComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, InputTimeComponent, InputTimeModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityDirective, ObserveVisibilityModule, OrientationOfDirection, OverlayDirective, OverlayModule, OverlayParentDirective, OverlayService, PaginatePipe, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PrependPipe, PrependPipeModule, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, ScrollContainerComponent, ScrollContainerModule, ScrollDirection, SimpleGridCellComponent, SimpleGridColumnDirective, SimpleGridColumnTemplateDirective, SimpleGridColumnTemplateType, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirective, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog };
20890
20915
  //# sourceMappingURL=colijnit-corecomponents_v12.mjs.map