@colijnit/corecomponents_v12 262.1.0 → 262.1.2
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/fesm2022/colijnit-corecomponents_v12.mjs +33 -5
- package/fesm2022/colijnit-corecomponents_v12.mjs.map +1 -1
- package/index.d.ts +11 -2
- package/lib/components/simple-grid/style/_layout.scss +0 -2
- package/lib/components/simple-grid/style/_material-definition.scss +0 -2
- package/package.json +1 -1
|
@@ -7823,6 +7823,9 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
7823
7823
|
event.preventDefault();
|
|
7824
7824
|
}
|
|
7825
7825
|
}
|
|
7826
|
+
if (this.type === 'number' && this.model?.length === this.maxLength && /^\d$/.test(key)) {
|
|
7827
|
+
event.preventDefault();
|
|
7828
|
+
}
|
|
7826
7829
|
}
|
|
7827
7830
|
convertWeekToDate(weekStr) {
|
|
7828
7831
|
const match = weekStr.match(/^w0*(\d{1,2})$/i);
|
|
@@ -11831,6 +11834,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11831
11834
|
args: ['document:mouseup', ['$event']]
|
|
11832
11835
|
}] } });
|
|
11833
11836
|
|
|
11837
|
+
var ScrollDirection;
|
|
11838
|
+
(function (ScrollDirection) {
|
|
11839
|
+
ScrollDirection["top"] = "top";
|
|
11840
|
+
ScrollDirection["bottom"] = "bottom";
|
|
11841
|
+
})(ScrollDirection || (ScrollDirection = {}));
|
|
11842
|
+
|
|
11834
11843
|
class ObserveVisibilityDirective {
|
|
11835
11844
|
_element;
|
|
11836
11845
|
threshold = 0;
|
|
@@ -12404,6 +12413,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12404
12413
|
changeDetection;
|
|
12405
12414
|
_formMaster;
|
|
12406
12415
|
defaultTextAlign = ColumnAlign.Left;
|
|
12416
|
+
scrollDirections = ScrollDirection;
|
|
12407
12417
|
set headerCells(cells) {
|
|
12408
12418
|
const headerElements = cells.toArray();
|
|
12409
12419
|
for (let i = 0; i < headerElements.length; i++) {
|
|
@@ -12422,6 +12432,8 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12422
12432
|
showColumnSort = false;
|
|
12423
12433
|
showRowButtons = false;
|
|
12424
12434
|
resetPageOnDataChange = true;
|
|
12435
|
+
scrollOnRowAction = true;
|
|
12436
|
+
scrollDirection = ScrollDirection.top;
|
|
12425
12437
|
/**
|
|
12426
12438
|
* Promise function, if provided should return boolean
|
|
12427
12439
|
*/
|
|
@@ -12572,7 +12584,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12572
12584
|
if (this.currentPage !== 1) {
|
|
12573
12585
|
this.currentPage = 1;
|
|
12574
12586
|
this.selectedRowIndex = -1;
|
|
12575
|
-
|
|
12587
|
+
this._scrollAfterRowAction();
|
|
12576
12588
|
}
|
|
12577
12589
|
this._detectChanges();
|
|
12578
12590
|
}
|
|
@@ -12585,7 +12597,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12585
12597
|
if (this.currentPage !== 1) {
|
|
12586
12598
|
this.currentPage = 1;
|
|
12587
12599
|
this.selectedRowIndex = -1;
|
|
12588
|
-
|
|
12600
|
+
this._scrollAfterRowAction();
|
|
12589
12601
|
}
|
|
12590
12602
|
this._detectChanges();
|
|
12591
12603
|
}
|
|
@@ -12929,7 +12941,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12929
12941
|
if (this._newRow) {
|
|
12930
12942
|
this.saveRow.next(this._newRowReference);
|
|
12931
12943
|
this._newRowReference = null; // clear
|
|
12932
|
-
|
|
12944
|
+
this._scrollAfterRowAction();
|
|
12933
12945
|
}
|
|
12934
12946
|
else {
|
|
12935
12947
|
let index = -1; // existing row
|
|
@@ -12960,8 +12972,20 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12960
12972
|
this.editing = false;
|
|
12961
12973
|
this.rowToEdit = undefined;
|
|
12962
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
|
+
}
|
|
12963
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 });
|
|
12964
|
-
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: `
|
|
12965
12989
|
@if (showToolbar) {
|
|
12966
12990
|
<co-grid-toolbar
|
|
12967
12991
|
[class.right]="rightToolbar"
|
|
@@ -13401,6 +13425,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
13401
13425
|
type: Input
|
|
13402
13426
|
}], resetPageOnDataChange: [{
|
|
13403
13427
|
type: Input
|
|
13428
|
+
}], scrollOnRowAction: [{
|
|
13429
|
+
type: Input
|
|
13430
|
+
}], scrollDirection: [{
|
|
13431
|
+
type: Input
|
|
13404
13432
|
}], canRowBeEdittedFn: [{
|
|
13405
13433
|
type: Input
|
|
13406
13434
|
}], showClass: [{
|
|
@@ -20883,5 +20911,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
20883
20911
|
* Generated bundle index. Do not edit.
|
|
20884
20912
|
*/
|
|
20885
20913
|
|
|
20886
|
-
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 };
|
|
20887
20915
|
//# sourceMappingURL=colijnit-corecomponents_v12.mjs.map
|