@colijnit/corecomponents_v12 261.20.0 → 261.20.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.
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Input, Injectable, HostBinding, ViewEncapsulation, Component, Directive, ElementRef, Pipe, EventEmitter, Output, ViewChildren, ViewContainerRef, HostListener, ViewChild, Optional, NgModule, SkipSelf, InjectionToken, Inject, forwardRef, ChangeDetectionStrategy, ContentChildren, NO_ERRORS_SCHEMA, Injector, ContentChild } from '@angular/core';
3
+ import { Input, Injectable, HostBinding, ViewEncapsulation, Component, Directive, ElementRef, Pipe, EventEmitter, Output, ViewChildren, ViewContainerRef, HostListener, ViewChild, Optional, NgModule, SkipSelf, InjectionToken, Inject, forwardRef, ChangeDetectionStrategy, ContentChildren, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
4
4
  import * as i5 from '@angular/forms';
5
5
  import { NgModel, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
6
  import * as i1 from '@angular/platform-browser';
@@ -8816,7 +8816,7 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
8816
8816
  }
8817
8817
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DoubleCalendarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8818
8818
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: DoubleCalendarComponent, isStandalone: false, selector: "co-double-calendar", inputs: { selectedDates: "selectedDates", ownParentForOverlay: "ownParentForOverlay" }, outputs: { datesSelected: "datesSelected", secondDateSelected: "secondDateSelected", clickedOutside: "clickedOutside" }, host: { properties: { "class.co-double-calendar": "this.showClass" } }, usesInheritance: true, ngImport: i0, template: `
8819
- <div class="dual-calendar-wrapper" [overlay]="ownParentForOverlay" (clickOutside)="clickedOutside.next()">
8819
+ <div class="dual-calendar-wrapper" [keepInView]="true" [overlay]="ownParentForOverlay" (clickOutside)="clickedOutside.next()">
8820
8820
  <calendar-template
8821
8821
  [selectedDate]="selectedFirstDate"
8822
8822
  [secondSelectedDate]="selectedSecondDate"
@@ -8846,7 +8846,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
8846
8846
  args: [{
8847
8847
  selector: "co-double-calendar",
8848
8848
  template: `
8849
- <div class="dual-calendar-wrapper" [overlay]="ownParentForOverlay" (clickOutside)="clickedOutside.next()">
8849
+ <div class="dual-calendar-wrapper" [keepInView]="true" [overlay]="ownParentForOverlay" (clickOutside)="clickedOutside.next()">
8850
8850
  <calendar-template
8851
8851
  [selectedDate]="selectedFirstDate"
8852
8852
  [secondSelectedDate]="selectedSecondDate"
@@ -8959,7 +8959,7 @@ class InputDateRangePickerComponent extends BaseInputDatePickerDirective {
8959
8959
  datesSelected: (event) => this.handleDatesSelected(event),
8960
8960
  secondDateSelected: () => this.handleSecondDateSelected(),
8961
8961
  clickedOutside: () => this.toggleCalendar()
8962
- });
8962
+ }, this.elementRef);
8963
8963
  }
8964
8964
  else {
8965
8965
  this.overlayService.removeComponent(this._doubleCalendarComponentRef);
@@ -11460,6 +11460,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
11460
11460
  }]
11461
11461
  }] });
11462
11462
 
11463
+ class SimpleGridColumnTemplateDirective {
11464
+ template;
11465
+ type;
11466
+ constructor(template) {
11467
+ this.template = template;
11468
+ }
11469
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridColumnTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
11470
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: SimpleGridColumnTemplateDirective, isStandalone: false, selector: "[templateType]", inputs: { type: ["templateType", "type"] }, ngImport: i0 });
11471
+ }
11472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridColumnTemplateDirective, decorators: [{
11473
+ type: Directive,
11474
+ args: [{
11475
+ selector: '[templateType]',
11476
+ standalone: false
11477
+ }]
11478
+ }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { type: [{
11479
+ type: Input,
11480
+ args: ['templateType']
11481
+ }] } });
11482
+
11483
+ var SimpleGridColumnTemplateType;
11484
+ (function (SimpleGridColumnTemplateType) {
11485
+ SimpleGridColumnTemplateType["Header"] = "header";
11486
+ SimpleGridColumnTemplateType["Content"] = "content";
11487
+ SimpleGridColumnTemplateType["Edit"] = "edit";
11488
+ })(SimpleGridColumnTemplateType || (SimpleGridColumnTemplateType = {}));
11489
+
11463
11490
  var ColumnAlign;
11464
11491
  (function (ColumnAlign) {
11465
11492
  ColumnAlign["Left"] = "left-align";
@@ -11469,27 +11496,17 @@ var ColumnAlign;
11469
11496
  class SimpleGridColumnDirective {
11470
11497
  elementRef;
11471
11498
  static _MinManualResizeWidthPx = 50;
11472
- set headerTemplate(template) {
11473
- if (template) {
11474
- this._headerTemplate = template;
11499
+ set templates(templates) {
11500
+ if (templates && templates.length) {
11501
+ this._templates = templates.toArray();
11475
11502
  }
11476
11503
  }
11477
11504
  get headerTemplate() {
11478
11505
  return this._headerTemplate;
11479
11506
  }
11480
- set template(template) {
11481
- if (template) {
11482
- this._template = template;
11483
- }
11484
- }
11485
11507
  get template() {
11486
11508
  return this._template;
11487
11509
  }
11488
- set editTemplate(template) {
11489
- if (template) {
11490
- this._editTemplate = template;
11491
- }
11492
- }
11493
11510
  get editTemplate() {
11494
11511
  return this._editTemplate;
11495
11512
  }
@@ -11526,6 +11543,7 @@ class SimpleGridColumnDirective {
11526
11543
  originalWidth;
11527
11544
  widthPercentage;
11528
11545
  _width;
11546
+ _templates = [];
11529
11547
  constructor(elementRef) {
11530
11548
  this.elementRef = elementRef;
11531
11549
  }
@@ -11537,6 +11555,21 @@ class SimpleGridColumnDirective {
11537
11555
  this._template = undefined;
11538
11556
  this._editTemplate = undefined;
11539
11557
  }
11558
+ ngAfterContentInit() {
11559
+ for (const t of this._templates) {
11560
+ switch (t.type) {
11561
+ case SimpleGridColumnTemplateType.Header:
11562
+ this._headerTemplate = t.template;
11563
+ break;
11564
+ case SimpleGridColumnTemplateType.Content:
11565
+ this._template = t.template;
11566
+ break;
11567
+ case SimpleGridColumnTemplateType.Edit:
11568
+ this._editTemplate = t.template;
11569
+ break;
11570
+ }
11571
+ }
11572
+ }
11540
11573
  getFieldValue(value) {
11541
11574
  if (this.collection && this.displayField) {
11542
11575
  const result = this.collection.find(c => c[this.codeField] === value);
@@ -11557,7 +11590,7 @@ class SimpleGridColumnDirective {
11557
11590
  }
11558
11591
  }
11559
11592
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridColumnDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
11560
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: SimpleGridColumnDirective, isStandalone: false, selector: "co-simple-grid-column", inputs: { headerText: "headerText", field: "field", codeField: "codeField", displayField: "displayField", textAlign: "textAlign", format: "format", resizable: "resizable", required: "required", autoFit: "autoFit", isSelected: "isSelected", width: "width", readonly: "readonly", collection: "collection", order: "order", singleColumn: "singleColumn" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["headerTemplate"], descendants: true }, { propertyName: "template", first: true, predicate: ["template"], descendants: true }, { propertyName: "editTemplate", first: true, predicate: ["editTemplate"], descendants: true }], ngImport: i0 });
11593
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: SimpleGridColumnDirective, isStandalone: false, selector: "co-simple-grid-column", inputs: { headerText: "headerText", field: "field", codeField: "codeField", displayField: "displayField", textAlign: "textAlign", format: "format", resizable: "resizable", required: "required", autoFit: "autoFit", isSelected: "isSelected", width: "width", readonly: "readonly", collection: "collection", order: "order", singleColumn: "singleColumn" }, queries: [{ propertyName: "templates", predicate: SimpleGridColumnTemplateDirective }], ngImport: i0 });
11561
11594
  }
11562
11595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridColumnDirective, decorators: [{
11563
11596
  type: Directive,
@@ -11565,15 +11598,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
11565
11598
  selector: "co-simple-grid-column",
11566
11599
  standalone: false
11567
11600
  }]
11568
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { headerTemplate: [{
11569
- type: ContentChild,
11570
- args: ['headerTemplate']
11571
- }], template: [{
11572
- type: ContentChild,
11573
- args: ['template']
11574
- }], editTemplate: [{
11575
- type: ContentChild,
11576
- args: ['editTemplate']
11601
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { templates: [{
11602
+ type: ContentChildren,
11603
+ args: [SimpleGridColumnTemplateDirective]
11577
11604
  }], headerText: [{
11578
11605
  type: Input
11579
11606
  }], field: [{
@@ -12907,6 +12934,12 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12907
12934
  }
12908
12935
  else {
12909
12936
  let index = -1; // existing row
12937
+ if (this.rowsPerPage) {
12938
+ index = (this.currentPage - 1) * this.rowsPerPage + this.editRowIndex;
12939
+ }
12940
+ else {
12941
+ index = this.editRowIndex;
12942
+ }
12910
12943
  if (index >= 0 && index < this.data.length) {
12911
12944
  this.saveRow.next(this.data[index]);
12912
12945
  }
@@ -12944,7 +12977,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
12944
12977
  (deleteClick)="removeSelectedRow()">
12945
12978
  </co-grid-toolbar>
12946
12979
  }
12947
-
12980
+
12948
12981
  <table
12949
12982
  id="simple-grid-table"
12950
12983
  class="simple-grid-table"
@@ -13016,7 +13049,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
13016
13049
  </th>
13017
13050
  }
13018
13051
  </tr>
13019
-
13052
+
13020
13053
  @if (showGridSettings) {
13021
13054
  <div class="grid-settings">
13022
13055
  <co-button
@@ -13150,7 +13183,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13150
13183
  (deleteClick)="removeSelectedRow()">
13151
13184
  </co-grid-toolbar>
13152
13185
  }
13153
-
13186
+
13154
13187
  <table
13155
13188
  id="simple-grid-table"
13156
13189
  class="simple-grid-table"
@@ -13222,7 +13255,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13222
13255
  </th>
13223
13256
  }
13224
13257
  </tr>
13225
-
13258
+
13226
13259
  @if (showGridSettings) {
13227
13260
  <div class="grid-settings">
13228
13261
  <co-button
@@ -13694,7 +13727,8 @@ class SimpleGridModule {
13694
13727
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13695
13728
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridModule, declarations: [SimpleGridComponent,
13696
13729
  SimpleGridCellComponent,
13697
- SimpleGridColumnDirective], imports: [CommonModule,
13730
+ SimpleGridColumnDirective,
13731
+ SimpleGridColumnTemplateDirective], imports: [CommonModule,
13698
13732
  DragDropModule$1,
13699
13733
  GridToolbarModule,
13700
13734
  InputTextModule,
@@ -13707,7 +13741,8 @@ class SimpleGridModule {
13707
13741
  CoreComponentsTranslationModule,
13708
13742
  IconModule], exports: [SimpleGridComponent,
13709
13743
  SimpleGridCellComponent,
13710
- SimpleGridColumnDirective] });
13744
+ SimpleGridColumnDirective,
13745
+ SimpleGridColumnTemplateDirective] });
13711
13746
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridModule, imports: [CommonModule,
13712
13747
  DragDropModule$1,
13713
13748
  GridToolbarModule,
@@ -13741,12 +13776,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13741
13776
  declarations: [
13742
13777
  SimpleGridComponent,
13743
13778
  SimpleGridCellComponent,
13744
- SimpleGridColumnDirective
13779
+ SimpleGridColumnDirective,
13780
+ SimpleGridColumnTemplateDirective
13745
13781
  ],
13746
13782
  exports: [
13747
13783
  SimpleGridComponent,
13748
13784
  SimpleGridCellComponent,
13749
- SimpleGridColumnDirective
13785
+ SimpleGridColumnDirective,
13786
+ SimpleGridColumnTemplateDirective
13750
13787
  ]
13751
13788
  }]
13752
13789
  }] });
@@ -20498,5 +20535,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
20498
20535
  * Generated bundle index. Do not edit.
20499
20536
  */
20500
20537
 
20501
- 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, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirective, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog };
20538
+ 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 };
20502
20539
  //# sourceMappingURL=colijnit-corecomponents_v12.mjs.map