@colijnit/corecomponents_v12 12.2.16 → 12.2.17

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.
Files changed (28) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +136 -40
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12.metadata.json +1 -1
  4. package/esm2015/lib/components/form/form.component.js +2 -2
  5. package/esm2015/lib/components/input-radio-button/input-radio-button.component.js +2 -2
  6. package/esm2015/lib/components/list-of-values/list-of-values.component.js +2 -1
  7. package/esm2015/lib/components/loader/loader.component.js +3 -3
  8. package/esm2015/lib/components/simple-grid/base-simple-grid.component.js +8 -1
  9. package/esm2015/lib/components/simple-grid/simple-grid.component.js +49 -31
  10. package/esm2015/lib/components/tile-select/tile-select.component.js +36 -0
  11. package/esm2015/lib/components/tile-select/tile-select.module.js +21 -0
  12. package/esm2015/lib/directives/overlay/overlay.directive.js +8 -2
  13. package/esm2015/public-api.js +3 -1
  14. package/fesm2015/colijnit-corecomponents_v12.js +120 -36
  15. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  16. package/lib/components/loader/style/_layout.scss +22 -4
  17. package/lib/components/loader/style/_material-definition.scss +1 -1
  18. package/lib/components/simple-grid/base-simple-grid.component.d.ts +2 -0
  19. package/lib/components/simple-grid/simple-grid.component.d.ts +4 -2
  20. package/lib/components/tile-select/style/_layout.scss +42 -0
  21. package/lib/components/tile-select/style/_material-definition.scss +18 -0
  22. package/lib/components/tile-select/style/_theme.scss +34 -0
  23. package/lib/components/tile-select/style/material.scss +4 -0
  24. package/lib/components/tile-select/tile-select.component.d.ts +8 -0
  25. package/lib/components/tile-select/tile-select.module.d.ts +2 -0
  26. package/lib/style/_variables.scss +1 -0
  27. package/package.json +1 -1
  28. package/public-api.d.ts +2 -0
@@ -4904,7 +4904,7 @@ class FormComponent {
4904
4904
  }
4905
4905
  FormComponent.decorators = [
4906
4906
  { type: Component, args: [{
4907
- selector: "co-form-test",
4907
+ selector: "co-form",
4908
4908
  template: `
4909
4909
  <ng-content></ng-content>
4910
4910
  `,
@@ -5597,7 +5597,13 @@ class OverlayDirective {
5597
5597
  this._elementRef.nativeElement.style.width = parentRect.width + "px";
5598
5598
  }
5599
5599
  if (this.rightAlign) {
5600
- this._elementRef.nativeElement.style.left = (parentRect.right - elementRect.width) + "px";
5600
+ let left = (parentRect.right - elementRect.width);
5601
+ if (this.keepInView) {
5602
+ const viewToKeepIn = this.view ? this.view : window;
5603
+ const viewLeft = viewToKeepIn.offsetLeft || 0;
5604
+ left = Math.max(left, viewLeft);
5605
+ }
5606
+ this._elementRef.nativeElement.style.left = left + "px";
5601
5607
  }
5602
5608
  else if (this.fullSize) {
5603
5609
  this._elementRef.nativeElement.style.left = "0px";
@@ -7524,7 +7530,7 @@ class InputRadioButtonComponent extends BaseInputComponent {
7524
7530
  event.preventDefault();
7525
7531
  event.stopPropagation();
7526
7532
  if (!this.readonly) {
7527
- this.model = !this.model;
7533
+ this.model = true;
7528
7534
  this.modelChange.next(this.model);
7529
7535
  if (this.control) {
7530
7536
  this.control.markAsDirty({ onlySelf: true });
@@ -9065,6 +9071,7 @@ class BaseSimpleGridComponent {
9065
9071
  this.columns = [];
9066
9072
  this.headerColumns = [];
9067
9073
  this._data = [];
9074
+ this.disabledRows = [];
9068
9075
  this._prepared = false;
9069
9076
  }
9070
9077
  set content(columnComponents) {
@@ -9124,6 +9131,8 @@ class BaseSimpleGridComponent {
9124
9131
  singleColumnIndex(row) {
9125
9132
  return row.singleColumnIndex;
9126
9133
  }
9134
+ prepareDataRow(row, index) {
9135
+ }
9127
9136
  _setColumns(columns) {
9128
9137
  this.columns.push(...columns);
9129
9138
  this.columns.sort((a, b) => a.order < b.order ? -1 : 1);
@@ -9132,6 +9141,7 @@ class BaseSimpleGridComponent {
9132
9141
  if (this._prepared) {
9133
9142
  return;
9134
9143
  }
9144
+ this.disabledRows.length = 0;
9135
9145
  if (this.columns && this.columns.length > 0) {
9136
9146
  this.headerColumns = this.columns.filter(c => !c.singleColumn);
9137
9147
  let singleColumnIndex = -1;
@@ -9151,6 +9161,9 @@ class BaseSimpleGridComponent {
9151
9161
  }
9152
9162
  }
9153
9163
  }
9164
+ for (let i = 0; i < this.data.length; i++) {
9165
+ this.prepareDataRow(this.data[i], i);
9166
+ }
9154
9167
  this._prepared = true;
9155
9168
  }
9156
9169
  this._resizeColumnsToFit();
@@ -9249,13 +9262,30 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
9249
9262
  handleClickOutsideRow() {
9250
9263
  this.validateAndSave();
9251
9264
  }
9252
- isRowDisabled(row) {
9253
- if (this.rowDisabledFn && (typeof this.rowDisabledFn === 'function')) {
9254
- return this.rowDisabledFn.call(this, row);
9255
- }
9256
- else {
9257
- return false;
9258
- }
9265
+ getIsRowDisabled(idx) {
9266
+ return this.disabledRows.indexOf(idx) > -1;
9267
+ }
9268
+ isRowDisabled(row, index) {
9269
+ return __awaiter(this, void 0, void 0, function* () {
9270
+ if (this.rowDisabledFn && (typeof this.rowDisabledFn === 'function')) {
9271
+ const disabled = yield this.rowDisabledFn.call(this, row);
9272
+ const idxRow = this.disabledRows.indexOf(index);
9273
+ if (disabled) {
9274
+ if (idxRow < 0) {
9275
+ this.disabledRows.push(index);
9276
+ }
9277
+ }
9278
+ else {
9279
+ if (idxRow > -1) {
9280
+ this.disabledRows.splice(idxRow, 1);
9281
+ }
9282
+ }
9283
+ return disabled;
9284
+ }
9285
+ else {
9286
+ return false;
9287
+ }
9288
+ });
9259
9289
  }
9260
9290
  isSingleColumn(column) {
9261
9291
  return column.singleColumn;
@@ -9314,10 +9344,6 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
9314
9344
  this.deleteRow.next(this.data[this.selectedRowIndex]);
9315
9345
  }
9316
9346
  handleClickRow(event, index, row) {
9317
- if (this.isRowDisabled(row)) {
9318
- this.selectedRowIndex = -1;
9319
- return;
9320
- }
9321
9347
  setTimeout(() => {
9322
9348
  if (this._doubleClicked) {
9323
9349
  return;
@@ -9336,13 +9362,13 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
9336
9362
  }
9337
9363
  handleDblClickRow(event, index, row) {
9338
9364
  return __awaiter(this, void 0, void 0, function* () {
9339
- if (this.isRowDisabled(row)) {
9365
+ if (yield this.isRowDisabled(row, index)) {
9340
9366
  this.selectedRowIndex = -1;
9341
9367
  return;
9342
9368
  }
9343
9369
  let canEdit = true;
9344
9370
  if (this.canRowBeEdittedFn && typeof this.canRowBeEdittedFn === 'function') {
9345
- canEdit = yield this.canRowBeEdittedFn.call(this);
9371
+ canEdit = yield this.canRowBeEdittedFn.call(this, row);
9346
9372
  }
9347
9373
  if (canEdit) {
9348
9374
  this._doubleClicked = true;
@@ -9367,23 +9393,28 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
9367
9393
  this._detectChanges();
9368
9394
  }
9369
9395
  handleCellClick(event, row, rowIndex, cellIndex) {
9370
- if (this.editOnCellClick) {
9371
- if (this.isRowDisabled(row)) {
9372
- this.selectedRowIndex = -1;
9373
- return;
9396
+ return __awaiter(this, void 0, void 0, function* () {
9397
+ if (this.editOnCellClick) {
9398
+ if (yield this.isRowDisabled(row, rowIndex)) {
9399
+ this.selectedRowIndex = -1;
9400
+ return;
9401
+ }
9402
+ this.selectTheRow(rowIndex, false);
9403
+ if (this.inlineEdit) {
9404
+ this.editRowIndex = rowIndex;
9405
+ this.editCellIndex = cellIndex;
9406
+ this.editing = true;
9407
+ this.editRow(event, false);
9408
+ }
9374
9409
  }
9375
- this.selectTheRow(rowIndex, false);
9376
- if (this.inlineEdit) {
9377
- this.editRowIndex = rowIndex;
9410
+ else {
9378
9411
  this.editCellIndex = cellIndex;
9379
- this.editing = true;
9380
- this.editRow(event, false);
9381
9412
  }
9382
- }
9383
- else {
9384
- this.editCellIndex = cellIndex;
9385
- }
9386
- this._detectChanges();
9413
+ this._detectChanges();
9414
+ });
9415
+ }
9416
+ prepareDataRow(row, index) {
9417
+ this.isRowDisabled(row, index);
9387
9418
  }
9388
9419
  _resetDblClick() {
9389
9420
  setTimeout(() => {
@@ -9572,10 +9603,10 @@ SimpleGridComponent.decorators = [
9572
9603
  [cdkDropListEnterPredicate]="handleCanDragDrop"
9573
9604
  (cdkDropListDropped)="handleDrop($event)">
9574
9605
  <tr class="simple-grid-row" [class.selected]="rowIndex === selectedRowIndex && !editing" observeVisibility
9575
- [class.disabled]="isRowDisabled(row)"
9606
+ [class.disabled]="getIsRowDisabled(rowIndex)"
9576
9607
  [class.editing]="rowIndex === editRowIndex" *ngFor="let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index" cdkDrag
9577
9608
  (click)="handleClickRow($event, rowIndex, row)" (dblclick)="handleDblClickRow($event, rowIndex, row)" (visibilityChange)="rowVisible.next(row)">
9578
- <co-form-test class="simple-grid-row-form">
9609
+ <co-form class="simple-grid-row-form">
9579
9610
  <ng-container *ngIf="isSingleColumnRow(row)">
9580
9611
  <td class="simple-grid-single-column-cell" [attr.colspan]="headerColumns.length">
9581
9612
  <co-simple-grid-cell
@@ -9599,7 +9630,7 @@ SimpleGridComponent.decorators = [
9599
9630
  </td>
9600
9631
  </ng-container>
9601
9632
  </ng-container>
9602
- </co-form-test>
9633
+ </co-form>
9603
9634
  </tr>
9604
9635
  </tbody>
9605
9636
  </table>
@@ -10840,6 +10871,7 @@ class ListOfValuesComponent extends BaseInputComponent {
10840
10871
  }
10841
10872
  this.model = option;
10842
10873
  this.modelChange.emit(this.model);
10874
+ this.detectChanges();
10843
10875
  }
10844
10876
  closePopup() {
10845
10877
  this.keepFocussed = false;
@@ -12428,8 +12460,8 @@ LoaderComponent.decorators = [
12428
12460
  <ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -41.0887 100.8995)" class="circle" cx="101.25" cy="101.25" rx="77.58"
12429
12461
  ry="77.58"/>
12430
12462
  </g>
12431
- <g>
12432
- <circle id="ring" class="ring-color" cx="100" cy="100" r="90" fill="transparent" />
12463
+ <g id="ring" fill="none">
12464
+ <circle id="ring-loader" class="ring-color" cx="100" cy="100" r="90" fill="none" />
12433
12465
  </g>
12434
12466
  <g id="js">
12435
12467
  <path class="main-color" d="M87.93,149.17c-0.12-0.17-0.08-0.4,0.09-0.52l0.61-0.45c2.92-2.14,4.34-4.61,4.34-7.56l0-20.64h2.47
@@ -12503,6 +12535,58 @@ LoaderModule.decorators = [
12503
12535
  },] }
12504
12536
  ];
12505
12537
 
12538
+ class TileSelectComponent {
12539
+ constructor() {
12540
+ this.selected = false;
12541
+ this.readonly = false;
12542
+ this.showRadioButton = true;
12543
+ this.selectedChange = new EventEmitter();
12544
+ }
12545
+ showClass() {
12546
+ return true;
12547
+ }
12548
+ }
12549
+ TileSelectComponent.decorators = [
12550
+ { type: Component, args: [{
12551
+ selector: 'co-tile-select',
12552
+ template: `
12553
+ <div class="co-tile-wrapper" (click)="selectedChange.emit(selected)">
12554
+ <div class="co-tile-select-wrapper" *ngIf="showRadioButton">
12555
+ <co-input-radio-button [model]="selected" [readonly]="selected || readonly" (modelChange)="selectedChange.emit($event)"></co-input-radio-button>
12556
+ </div>
12557
+ <div class="co-tile-content-wrapper">
12558
+ <ng-content></ng-content>
12559
+ </div>
12560
+ </div>
12561
+ `,
12562
+ encapsulation: ViewEncapsulation.None
12563
+ },] }
12564
+ ];
12565
+ TileSelectComponent.propDecorators = {
12566
+ selected: [{ type: HostBinding, args: ['class.selected',] }, { type: Input }],
12567
+ readonly: [{ type: Input }],
12568
+ showRadioButton: [{ type: Input }],
12569
+ selectedChange: [{ type: Output }],
12570
+ showClass: [{ type: HostBinding, args: ['class.co-tile-select',] }]
12571
+ };
12572
+
12573
+ class TileSelectModule {
12574
+ }
12575
+ TileSelectModule.decorators = [
12576
+ { type: NgModule, args: [{
12577
+ imports: [
12578
+ CommonModule,
12579
+ InputRadioButtonModule
12580
+ ],
12581
+ declarations: [
12582
+ TileSelectComponent
12583
+ ],
12584
+ exports: [
12585
+ TileSelectComponent
12586
+ ]
12587
+ },] }
12588
+ ];
12589
+
12506
12590
  class FilterPipe {
12507
12591
  transform(items, field, value) {
12508
12592
  if (!items || !field) {
@@ -13194,5 +13278,5 @@ ColorSequenceService.decorators = [
13194
13278
  * Generated bundle index. Do not edit.
13195
13279
  */
13196
13280
 
13197
- export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, 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, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, ConfirmationDialogComponent as ɵbe, DialogBaseComponent as ɵbf, CoreDynamicComponentService as ɵbg, PrependPipeModule as ɵbh, PrependPipe as ɵbi, CheckmarkOverlayComponent as ɵbj, ScannerService as ɵbk, TooltipModule as ɵbl, TooltipComponent as ɵbm, TooltipDirective as ɵbn, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, CoreLocalizePipe as ɵp, CoreDictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ObserveVisibilityDirective as ɵz };
13281
+ export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, 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, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, ConfirmationDialogComponent as ɵbe, DialogBaseComponent as ɵbf, CoreDynamicComponentService as ɵbg, PrependPipeModule as ɵbh, PrependPipe as ɵbi, CheckmarkOverlayComponent as ɵbj, ScannerService as ɵbk, TooltipModule as ɵbl, TooltipComponent as ɵbm, TooltipDirective as ɵbn, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, CoreLocalizePipe as ɵp, CoreDictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ObserveVisibilityDirective as ɵz };
13198
13282
  //# sourceMappingURL=colijnit-corecomponents_v12.js.map