[ci:force] - fixed build

This commit is contained in:
VitoAlbano
2025-05-18 00:15:11 +01:00
parent debf41e762
commit 8bea97dab5
19 changed files with 125 additions and 94 deletions

View File

@@ -16,17 +16,20 @@
*/
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { NodesApiService } from '../../common/services/nodes-api.service';
import { DownloadZipService } from './services/download-zip.service';
import { ContentService } from '../../common/services/content.service';
import { FileDownloadStatus } from '@alfresco/js-api';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { TranslateModule } from '@ngx-translate/core';
@Component({
selector: 'adf-download-zip-dialog',
templateUrl: './download-zip.dialog.html',
styleUrls: ['./download-zip.dialog.scss'],
host: { class: 'adf-download-zip-dialog' },
imports: [MatProgressBarModule, MatDialogModule, TranslateModule],
encapsulation: ViewEncapsulation.None
})
export class DownloadZipDialogComponent implements OnInit {

View File

@@ -1,4 +1,5 @@
@charset "UTF-8";
@use 'sass:map';
/* stylelint-disable */
// Non-overlapping Material Design breakpoints
@@ -61,18 +62,18 @@ $overlapping-lt: (
// }
@mixin layout-bp($bp) {
@if map-has-key($breakpoints, $bp) {
$min: map-get(map-get($breakpoints, $bp), begin);
$max: map-get(map-get($breakpoints, $bp), end);
$min: map.get(map.get($breakpoints, $bp), begin);
$max: map.get(map.get($breakpoints, $bp), end);
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if map-has-key($overlapping-gt, $bp) {
$min: map-get($overlapping-gt, $bp);
$min: map.get($overlapping-gt, $bp);
@media (min-width: $min) {
@content;
}
} @else if map-has-key($overlapping-lt, $bp) {
$max: map-get($overlapping-lt, $bp);
$max: map.get($overlapping-lt, $bp);
@media (max-width: $max) {
@content;
}

View File

@@ -48,7 +48,7 @@ export class InheritPermissionDirective {
onInheritPermissionClicked() {
this.nodeService.getNode(this.nodeId).subscribe((node: Node) => {
if (this.contentService.hasAllowableOperations(node, AllowableOperationsEnum.UPDATEPERMISSIONS)) {
const nodeBody = { permissions: { isInheritanceEnabled: !node?.permissions?.isInheritanceEnabled ?? false } };
const nodeBody = { permissions: { isInheritanceEnabled: !node?.permissions?.isInheritanceEnabled } };
this.nodeService.updateNode(this.nodeId, nodeBody, { include: ['permissions'] }).subscribe(
(nodeUpdated: Node) => {
this.updated.emit(nodeUpdated);

View File

@@ -1,4 +1,5 @@
@charset "UTF-8";
@use 'sass:map';
/* stylelint-disable */
// Non-overlapping Material Design breakpoints
@@ -60,19 +61,19 @@ $overlapping-lt: (
// background-color: red;
// }
@mixin layout-bp($bp) {
@if map-has-key($breakpoints, $bp) {
$min: map-get(map-get($breakpoints, $bp), begin);
$max: map-get(map-get($breakpoints, $bp), end);
@if map.has-key($breakpoints, $bp) {
$min: map.get(map.get($breakpoints, $bp), begin);
$max: map.get(map.get($breakpoints, $bp), end);
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if map-has-key($overlapping-gt, $bp) {
$min: map-get($overlapping-gt, $bp);
} @else if map.has-key($overlapping-gt, $bp) {
$min: map.get($overlapping-gt, $bp);
@media (min-width: $min) {
@content;
}
} @else if map-has-key($overlapping-lt, $bp) {
$max: map-get($overlapping-lt, $bp);
} @else if map.has-key($overlapping-lt, $bp) {
$max: map.get($overlapping-lt, $bp);
@media (max-width: $max) {
@content;
}

View File

@@ -15,9 +15,12 @@
* limitations under the License.
*/
import { CommonModule } from '@angular/common';
import { Component, Inject, SecurityContext, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatButtonModule } from '@angular/material/button';
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import { DomSanitizer } from '@angular/platform-browser';
import { TranslateModule } from '@ngx-translate/core';
export interface ConfirmDialogComponentProps {
title?: string;
@@ -33,6 +36,7 @@ export interface ConfirmDialogComponentProps {
templateUrl: './confirm.dialog.html',
styleUrls: ['./confirm.dialog.scss'],
host: { class: 'adf-confirm-dialog' },
imports: [TranslateModule, MatDialogModule, MatButtonModule, CommonModule],
encapsulation: ViewEncapsulation.None
})
export class ConfirmDialogComponent {

View File

@@ -16,14 +16,17 @@
*/
import { Component, OnInit, OnChanges, Input } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
import { EditJsonDialogComponent, EditJsonDialogSettings } from './edit-json.dialog';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { TranslateModule } from '@ngx-translate/core';
@Component({
selector: 'adf-edit-json-dialog-storybook',
template: `<button mat-raised-button (click)="openDialog()">
Open dialog
</button>`
imports: [CommonModule, FormsModule, MatDialogModule, MatButtonModule, TranslateModule],
template: `<button mat-raised-button (click)="openDialog()">Open dialog</button>`
})
export class EditJsonDialogStorybookComponent implements OnInit, OnChanges {
@Input()

View File

@@ -15,8 +15,11 @@
* limitations under the License.
*/
import { CommonModule } from '@angular/common';
import { Component, Inject, OnInit, Input, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { FormsModule } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
import { TranslateModule } from '@ngx-translate/core';
export interface EditJsonDialogSettings {
title?: string;
@@ -27,6 +30,7 @@ export interface EditJsonDialogSettings {
@Component({
templateUrl: './edit-json.dialog.html',
styleUrls: ['./edit-json.dialog.scss'],
imports: [CommonModule, FormsModule, TranslateModule, MatDialogModule],
encapsulation: ViewEncapsulation.None,
host: { class: 'adf-edit-json-dialog' }
})

View File

@@ -52,14 +52,14 @@
display: grid;
&-column-view {
@include flex.layout-bp(lt-md) {
display: flow;
}
display: flex;
margin-right: -1%;
width: 100%;
@include flex.layout-bp(lt-md) {
display: flow;
}
&-item {
width: 100%;
flex-grow: 1;

View File

@@ -18,9 +18,12 @@
import { Component, Inject } from '@angular/core';
import { MAT_SNACK_BAR_DATA, MatSnackBarRef } from '@angular/material/snack-bar';
import { SnackBarData } from './snack-bar-data';
import { MatIcon } from '@angular/material/icon';
import { TranslateModule } from '@ngx-translate/core';
@Component({
selector: 'adf-snackbar-content',
imports: [MatIcon, TranslateModule],
templateUrl: './snackbar-content.component.html',
styleUrls: ['./snackbar-content.component.scss'],
host: {

View File

@@ -1,4 +1,5 @@
@charset "UTF-8";
@use 'sass:map';
/* stylelint-disable */
// Non-overlapping Material Design breakpoints
@@ -23,7 +24,7 @@ $breakpoints: (
xl: (
begin: 1920px,
end: 4999.99px
),
)
) !default;
// Overlapping breakpoints that are greater than defined
@@ -33,7 +34,7 @@ $overlapping-gt: (
gt-xs: 600px,
gt-sm: 960px,
gt-md: 1280px,
gt-lg: 1920px,
gt-lg: 1920px
) !default;
// Overlapping breakpoints that are less than defined
@@ -43,10 +44,9 @@ $overlapping-lt: (
lt-sm: 599.9px,
lt-md: 959.9px,
lt-lg: 1279.9px,
lt-xl: 1919.9px,
lt-xl: 1919.9px
) !default;
// Media Query Mixin, takes a breakpoint and returns a wrapping
// media query statement
// e.g.
@@ -61,18 +61,22 @@ $overlapping-lt: (
// background-color: red;
// }
@mixin layout-bp($bp) {
@if map-has-key($breakpoints, $bp) {
$min: map-get(map-get($breakpoints, $bp), begin);
$max: map-get(map-get($breakpoints, $bp), end);
@media (min-width: $min) and (max-width: $max) { @content; }
}
@else if map-has-key($overlapping-gt, $bp) {
$min: map-get($overlapping-gt, $bp);
@media (min-width: $min) { @content; }
}
@else if map-has-key($overlapping-lt, $bp) {
$max: map-get($overlapping-lt, $bp);
@media (max-width: $max) { @content; }
@if map.has-key($breakpoints, $bp) {
$min: map.get(map.get($breakpoints, $bp), begin);
$max: map.get(map.get($breakpoints, $bp), end);
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if map.has-key($overlapping-gt, $bp) {
$min: map.get($overlapping-gt, $bp);
@media (min-width: $min) {
@content;
}
} @else if map.has-key($overlapping-lt, $bp) {
$max: map.get($overlapping-lt, $bp);
@media (max-width: $max) {
@content;
}
}
}
/* stylelint-enable */

View File

@@ -16,12 +16,12 @@
}
@mixin adf-core-theme($theme, $custom-css-variables: $adf-custom-theme-sizes) {
$foreground: map-get($theme, foreground);
$background: map-get($theme, background);
$warn: map-get($theme, warn);
$accent: map-get($theme, accent);
$primary: map-get($theme, primary);
$typography: map-get($theme, typography);
$foreground: map.get($theme, foreground);
$background: map.get($theme, background);
$warn: map.get($theme, warn);
$accent: map.get($theme, accent);
$primary: map.get($theme, primary);
$typography: map.get($theme, typography);
// map SCSS variables to expose as CSS variables
$defaults: (
@@ -82,16 +82,16 @@
--theme-button-font-size: mat.m2-font-size($typography, button),
--theme-headline-font-size: mat.m2-font-size($typography, headline-5),
--theme-headline-line-height: mat.m2-line-height($typography, headline-5),
--theme-adf-icon-1-font-size: map-get($custom-css-variables, 'theme-adf-icon-1-font-size'),
--theme-adf-picture-1-font-size: map-get($custom-css-variables, 'theme-adf-picture-1-font-size'),
--theme-adf-task-footer-font-size: map-get($custom-css-variables, 'theme-adf-task-footer-font-size'),
--theme-adf-task-title-font-size: map-get($custom-css-variables, 'theme-adf-task-title-font-size'),
--theme-adf-icon-1-font-size: map.get($custom-css-variables, 'theme-adf-icon-1-font-size'),
--theme-adf-picture-1-font-size: map.get($custom-css-variables, 'theme-adf-picture-1-font-size'),
--theme-adf-task-footer-font-size: map.get($custom-css-variables, 'theme-adf-task-footer-font-size'),
--theme-adf-task-title-font-size: map.get($custom-css-variables, 'theme-adf-task-title-font-size'),
// specific colors
--adf-theme-mat-grey-color-a200: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 'A200'),
--adf-theme-mat-grey-color-a400: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 'A400'),
--adf-theme-mat-grey-color-50: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 50),
// spacing
--adf-theme-spacing: map-get($custom-css-variables, 'theme-adf-spacing'),
--adf-theme-spacing: map.get($custom-css-variables, 'theme-adf-spacing'),
// components
--adf-metadata-property-panel-border-color: rgba(0, 0, 0, 0.12),
--adf-metadata-buttons-background-color: rgba(33, 33, 33, 0.05),

View File

@@ -29,18 +29,22 @@
}
@mixin flex-column {
display: flex;
flex-direction: column;
flex: 1;
height: 100%;
overflow: hidden;
min-height: 0;
& {
display: flex;
flex-direction: column;
flex: 1;
height: 100%;
overflow: hidden;
min-height: 0;
}
}
@mixin flex-row {
display: flex;
flex-direction: row;
flex: 1;
height: 100%;
overflow: hidden;
& {
display: flex;
flex-direction: row;
flex: 1;
height: 100%;
overflow: hidden;
}
}

View File

@@ -94,9 +94,10 @@ describe('DynamicExtensionComponent', () => {
});
it('should assign menuItem from dynamically generated component in ngAfterViewInit', () => {
getInnerElement().componentInstance.menuItem = new MatMenuItem(null, null, null, null, null);
const mockMenuItem = {} as MatMenuItem;
getInnerElement().componentInstance.menuItem = mockMenuItem;
component.ngAfterViewInit();
expect(component.menuItem).toBeInstanceOf(MatMenuItem);
expect(component.menuItem).toBe(mockMenuItem);
});
});

View File

@@ -1,3 +1,4 @@
@use 'sass:map';
/* stylelint-disable scss/no-global-function-names */
@mixin adf-line-clamp($line-height: 1.25, $lines: 3) {
position: relative;
@@ -79,12 +80,12 @@ adf-cloud-app-details {
&-card {
@for $i from 1 through 10 {
&.theme-#{$i} {
$tile-theme: map-get($tile-themes, theme-#{$i});
$tile-theme: map.get($tile-themes, theme-#{$i});
background-color: map-get($tile-theme, bg);
background-color: map.get($tile-theme, bg);
.adf-app-listgrid-item-card-logo-icon {
color: map-get($tile-theme, color);
color: map.get($tile-theme, color);
}
}
}

View File

@@ -1,4 +1,5 @@
@charset "UTF-8";
@use 'sass:map';
/* stylelint-disable */
// Non-overlapping Material Design breakpoints
@@ -60,19 +61,19 @@ $overlapping-lt: (
// background-color: red;
// }
@mixin layout-bp($bp) {
@if map-has-key($breakpoints, $bp) {
$min: map-get(map-get($breakpoints, $bp), begin);
$max: map-get(map-get($breakpoints, $bp), end);
@if map.has-key($breakpoints, $bp) {
$min: map.get(map.get($breakpoints, $bp), begin);
$max: map.get(map.get($breakpoints, $bp), end);
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if map-has-key($overlapping-gt, $bp) {
$min: map-get($overlapping-gt, $bp);
} @else if map.has-key($overlapping-gt, $bp) {
$min: map.get($overlapping-gt, $bp);
@media (min-width: $min) {
@content;
}
} @else if map-has-key($overlapping-lt, $bp) {
$max: map-get($overlapping-lt, $bp);
} @else if map.has-key($overlapping-lt, $bp) {
$max: map.get($overlapping-lt, $bp);
@media (max-width: $max) {
@content;
}

View File

@@ -1,5 +1,5 @@
/* stylelint-disable no-descending-specificity */
@import '../../../../../../core/src/lib/styles/mixins';
@use '../../../../../../core/src/lib/styles/mixins' as mixins;
$dynamic-table-font-size: var(--theme-body-1-font-size) !default;
$dynamic-table-header-font-size: var(--theme-caption-font-size) !default;
@@ -43,7 +43,7 @@ dynamic-table-widget .adf-label {
position: relative;
height: $dynamic-table-row-height;
@include material-animation-default(0.28s);
@include mixins.material-animation-default(0.28s);
transition-property: background-color;
@@ -65,7 +65,7 @@ dynamic-table-widget .adf-label {
td,
th {
padding: 0 $dynamic-table-column-padding 12px $dynamic-table-column-padding;
padding: 0 $dynamic-table-column-padding 12px;
text-align: center;
&:first-of-type {
@@ -87,13 +87,13 @@ dynamic-table-widget .adf-label {
padding-top: $dynamic-table-cell-top;
box-sizing: border-box;
@include adf-no-select;
@include mixins.adf-no-select;
cursor: default;
}
th {
@include adf-no-select;
@include mixins.adf-no-select;
cursor: pointer;
position: relative;
@@ -109,7 +109,7 @@ dynamic-table-widget .adf-label {
box-sizing: border-box;
&.adf-sortable {
@include adf-no-select;
@include mixins.adf-no-select;
&:hover {
cursor: pointer;
@@ -121,7 +121,7 @@ dynamic-table-widget .adf-label {
color: var(--adf-theme-foreground-text-color);
&::before {
@include typo-icon;
@include mixins.typo-icon;
font-size: $dynamic-table-header-sort-icon-size;
content: '\e5d8';

View File

@@ -1,4 +1,5 @@
@charset "UTF-8";
@use 'sass:map';
/* stylelint-disable */
// Non-overlapping Material Design breakpoints
@@ -60,19 +61,19 @@ $overlapping-lt: (
// background-color: red;
// }
@mixin layout-bp($bp) {
@if map-has-key($breakpoints, $bp) {
$min: map-get(map-get($breakpoints, $bp), begin);
$max: map-get(map-get($breakpoints, $bp), end);
@if map.has-key($breakpoints, $bp) {
$min: map.get(map.get($breakpoints, $bp), begin);
$max: map.get(map.get($breakpoints, $bp), end);
@media (min-width: $min) and (max-width: $max) {
@content;
}
} @else if map-has-key($overlapping-gt, $bp) {
$min: map-get($overlapping-gt, $bp);
} @else if map.has-key($overlapping-gt, $bp) {
$min: map.get($overlapping-gt, $bp);
@media (min-width: $min) {
@content;
}
} @else if map-has-key($overlapping-lt, $bp) {
$max: map-get($overlapping-lt, $bp);
} @else if map.has-key($overlapping-lt, $bp) {
$max: map.get($overlapping-lt, $bp);
@media (max-width: $max) {
@content;
}

12
package-lock.json generated
View File

@@ -23,7 +23,7 @@
"@apollo/client": "3.13.1",
"@cspell/eslint-plugin": "8.16.1",
"@mat-datetimepicker/core": "15.0.2",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/core": "16.0.4",
"@nx/webpack": "20.8.1",
"angular-oauth2-oidc": "17.0.2",
"angular-oauth2-oidc-jwks": "^17.0.2",
@@ -8009,16 +8009,16 @@
}
},
"node_modules/@ngx-translate/core": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-14.0.0.tgz",
"integrity": "sha512-UevdwNCXMRCdJv//0kC8h2eSfmi02r29xeE8E9gJ1Al4D4jEJ7eiLPdjslTMc21oJNGguqqWeEVjf64SFtvw2w==",
"version": "16.0.4",
"resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-16.0.4.tgz",
"integrity": "sha512-s8llTL2SJvROhqttxvEs7Cg+6qSf4kvZPFYO+cTOY1d8DWTjlutRkWAleZcPPoeX927Dm7ALfL07G7oYDJ7z6w==",
"license": "MIT",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/core": ">=13.0.0",
"rxjs": "^6.5.3 || ^7.4.0"
"@angular/common": ">=16",
"@angular/core": ">=16"
}
},
"node_modules/@noble/hashes": {

View File

@@ -43,7 +43,7 @@
"@apollo/client": "3.13.1",
"@cspell/eslint-plugin": "8.16.1",
"@mat-datetimepicker/core": "15.0.2",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/core": "16.0.4",
"@nx/webpack": "20.8.1",
"angular-oauth2-oidc": "17.0.2",
"angular-oauth2-oidc-jwks": "^17.0.2",