Skip to content

Commit

Permalink
Merge branch 'main' into fix/shell-portal-translations
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy authored Oct 28, 2024
2 parents 063ace4 + eb78d52 commit 17bbe8a
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
<p-dropdown
inputId="columnGroupSelectionDropdown"
*ngIf="(allGroupKeys$ | async)?.length"
(onClear)="clearGroupSelection()"
(onChange)="changeGroupSelection($event)"
[options]="(allGroupKeys$ | async) || []"
[placeholder]="placeholderKey | translate"
[showClear]="selectedGroupKey !== defaultGroupKey"
[(ngModel)]="selectedGroupKey"
[ariaLabel]="'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABEL' | translate"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export class ColumnGroupSelectionComponent implements OnInit {
}
set selectedGroupKey(value: string) {
this.selectedGroupKey$.next(value)
if (this.selectedGroupKey === this.customGroupKey) {
this.componentStateChanged.emit({
activeColumnGroupKey: value,
})
}
}

columns$ = new BehaviorSubject<DataTableColumn[]>([])
Expand Down Expand Up @@ -51,13 +56,19 @@ export class ColumnGroupSelectionComponent implements OnInit {
.filter((value, index, self) => self.indexOf(value) === index && value != null)
)
)
const activeColumns = this.columns.filter((c) =>
c.predefinedGroupKeys?.includes(this.selectedGroupKey$.getValue() ?? this.defaultGroupKey)
)
this.componentStateChanged.emit({
activeColumnGroupKey: this.selectedGroupKey,
displayedColumns: activeColumns,
})
if (this.selectedGroupKey === this.customGroupKey) {
this.componentStateChanged.emit({
activeColumnGroupKey: this.selectedGroupKey,
})
} else {
const activeColumns = this.columns.filter((c) =>
c.predefinedGroupKeys?.includes(this.selectedGroupKey$.getValue() ?? this.defaultGroupKey)
)
this.componentStateChanged.emit({
activeColumnGroupKey: this.selectedGroupKey,
displayedColumns: activeColumns,
})
}
}

changeGroupSelection(event: { value: string }) {
Expand All @@ -71,16 +82,4 @@ export class ColumnGroupSelectionComponent implements OnInit {
displayedColumns: activeColumns,
})
}

clearGroupSelection() {
let activeColumns = this.columns
if (this.defaultGroupKey) {
activeColumns = this.columns.filter((column) => column.predefinedGroupKeys?.includes(this.defaultGroupKey))
}
this.groupSelectionChanged.emit({ activeColumns, groupKey: this.defaultGroupKey })
this.componentStateChanged.emit({
activeColumnGroupKey: this.defaultGroupKey,
displayedColumns: activeColumns,
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class CustomGroupColumnSelectorComponent implements OnInit {
displayedColumns: this._displayedColumns,
})
}
@Input() customGroupKey = ''
@Input() dialogTitle = ''
@Input() dialogTitleKey = ''
@Input() openButtonTitle = ''
Expand Down Expand Up @@ -139,6 +140,7 @@ export class CustomGroupColumnSelectorComponent implements OnInit {
frozen: this.frozenActionColumnModel,
position: this.actionColumnPositionModel,
},
activeColumnGroupKey: this.customGroupKey,
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
*ngIf="layout === 'table'"
[columns]="columns"
[displayedColumns]="(displayedColumns$ | async) ?? []"
[customGroupKey]="customGroupKey"
(columnSelectionChanged)="onColumnSelectionChange($event)"
[frozenActionColumn]="frozenActionColumn"
[actionColumnPosition]="actionColumnPosition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ng-container>
<div>
<button
id="buttonDialogSecondaryButton"
id="{{dialogData.config.secondaryButtonDetails?.id ?? 'buttonDialogSecondaryButton'}}"
pButton
*ngIf="dialogData.config.secondaryButtonIncluded"
[icon]="dialogData.config.secondaryButtonDetails!.icon !== undefined ? dialogData.config.secondaryButtonDetails!.icon : ''"
Expand All @@ -32,7 +32,7 @@
</div>
<div>
<button
id="buttonDialogPrimaryButton"
id="{{dialogData.config.primaryButtonDetails?.id ?? 'buttonDialogPrimaryButton'}}"
pButton
autofocus
[icon]="dialogData.config.primaryButtonDetails!.icon !== undefined ? dialogData.config.primaryButtonDetails!.icon : ''"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { PrimeIcon } from '@onecx/angular-accelerator'
*/
export interface ButtonDialogButtonDetails {
key: string
id?: string
icon?: PrimeIcon
parameters?: Record<string, unknown>
tooltipKey?: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

.p-panel-header-icon {
@include action-icon();
&:focus {
outline: $actionIconFocusOutline;
outline-offset: $actionIconFocusOutlineOffset;
box-shadow: var(--focus-shadow);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@
}
}

.p-monthpicker .p-monthpicker-month:not(.p-disabled):not(.p-highlight):focus {
outline: $calendarFocusOutline;
outline-offset: $calendarFocusOutlineOffset;
box-shadow: none;
}

.p-yearpicker .p-yearpicker-year:not(.p-disabled):not(.p-highlight):focus {
outline: $calendarFocusOutline;
outline-offset: $calendarFocusOutlineOffset;
box-shadow: none;
}

table {
th {
border-bottom: var(--divider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ $actionIconHoverBg: rgba(0, 0, 0, 0.04);
$actionIconHoverBorderColor: transparent;
$actionIconHoverColor: $textSecondaryColor;
$actionIconBorderRadius: 50%;
$actionIconFocusOutline: $focusOutlineCustom;
$actionIconFocusOutlineOffset: 0px;

//input field (e.g. inputtext, spinner, inputmask)
$inputPadding: 1rem 1rem;
Expand Down

0 comments on commit 17bbe8a

Please sign in to comment.