Browse Source

Angular 20 migration

pull/14914/head
Igor Kulikov 9 months ago
parent
commit
adf31b0320
  1. 73
      ui-ngx/package.json
  2. 20
      ui-ngx/patches/@angular+build+20.3.15.patch
  3. 66
      ui-ngx/patches/@angular+common+18.2.13.patch
  4. 97
      ui-ngx/patches/@angular+compiler+18.2.13.patch
  5. 20
      ui-ngx/patches/@angular+core+18.2.13.patch
  6. 20
      ui-ngx/patches/@angular+core+20.3.16.patch
  7. 61
      ui-ngx/patches/@angular+material+18.2.14.patch
  8. 34
      ui-ngx/patches/@mat-datetimepicker+core+14.0.0.patch
  9. 17
      ui-ngx/patches/@mat-datetimepicker+core+16.0.1.patch
  10. 4
      ui-ngx/patches/angular-gridster2+20.2.4.patch
  11. 27
      ui-ngx/patches/jquery.terminal+2.44.1.patch
  12. 2
      ui-ngx/src/app/app.component.ts
  13. 8
      ui-ngx/src/app/core/translate/missing-translate-handler.ts
  14. 6
      ui-ngx/src/app/core/translate/translate-default-loader.ts
  15. 10
      ui-ngx/src/app/core/translate/translate-default-parser.ts
  16. 2235
      ui-ngx/yarn.lock

73
ui-ngx/package.json

@ -34,26 +34,26 @@
"@ngrx/effects": "^20.1.0",
"@ngrx/store": "^20.1.0",
"@ngrx/store-devtools": "^20.1.0",
"@ngx-translate/core": "^15.0.0",
"@svgdotjs/svg.filter.js": "^3.0.8",
"@svgdotjs/svg.js": "^3.2.4",
"@ngx-translate/core": "^17.0.0",
"@svgdotjs/svg.filter.js": "^3.0.9",
"@svgdotjs/svg.js": "^3.2.5",
"@svgdotjs/svg.panzoom.js": "^2.1.2",
"@tinymce/tinymce-angular": "^8.0.1",
"ace-builds": "1.36.5",
"ace-diff": "^3.0.3",
"ace-builds": "1.43.6",
"ace-diff": "^3.3.0",
"angular-gridster2": "~20.2.4",
"angular2-hotkeys": "^16.0.1",
"canvas-gauges": "^2.1.7",
"core-js": "^3.39.0",
"dayjs": "1.11.13",
"core-js": "^3.48.0",
"dayjs": "1.11.19",
"echarts": "https://github.com/thingsboard/echarts/archive/5.5.1-TB.tar.gz",
"flot": "https://github.com/thingsboard/flot.git#0.9-work",
"flot.curvedlines": "https://github.com/MichaelZinsmaier/CurvedLines.git#master",
"font-awesome": "^4.7.0",
"html2canvas": "^1.4.1",
"jquery": "^3.7.1",
"jquery.terminal": "^2.44.1",
"js-beautify": "1.15.1",
"jquery.terminal": "^2.45.2",
"js-beautify": "1.15.4",
"json-schema-defaults": "^0.4.0",
"jstree": "^3.3.17",
"jstree-bootstrap-theme": "^1.0.1",
@ -63,32 +63,32 @@
"leaflet-providers": "2.0.0",
"leaflet.gridlayer.googlemutant": "0.15.0",
"leaflet.markercluster": "1.5.3",
"libphonenumber-js": "^1.11.15",
"maplibre-gl": "^5.2.0",
"marked": "~15.0.12",
"libphonenumber-js": "^1.12.35",
"maplibre-gl": "^5.16.0",
"marked": "~16.4.2",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"moment-timezone": "^0.6.0",
"ngx-clipboard": "^16.0.0",
"ngx-daterangepicker-material": "^6.0.4",
"ngx-drag-drop": "^20.0.1",
"ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/3.0.0",
"ngx-hm-carousel": "^19.0.0",
"ngx-markdown": "^20.1.0",
"ngx-sharebuttons": "^15.0.6",
"ngx-translate-messageformat-compiler": "^7.0.0",
"ngx-sharebuttons": "^17.0.0",
"ngx-translate-messageformat-compiler": "^7.2.0",
"objectpath": "^2.0.0",
"qrcode": "^1.5.4",
"raphael": "^2.3.0",
"rxjs": "~7.8.1",
"rxjs": "~7.8.2",
"schema-inspector": "^2.1.0",
"screenfull": "^6.0.2",
"sorted-btree": "^1.8.1",
"split.js": "^1.6.5",
"systemjs": "6.15.1",
"tinycolor2": "^1.6.0",
"tinymce": "~6.8.5",
"tinymce": "~6.8.6",
"tooltipster": "^4.2.8",
"tslib": "^2.7.0",
"tslib": "^2.8.1",
"typeface-roboto": "^1.1.13",
"zone.js": "~0.15.1"
},
@ -105,45 +105,38 @@
"@types/canvas-gauges": "^2.1.8",
"@types/flot": "^0.0.36",
"@types/flowjs": "^2.13.14",
"@types/jquery": "^3.5.32",
"@types/jquery": "^3.5.33",
"@types/js-beautify": "^1.14.3",
"@types/leaflet": "1.9.14",
"@types/leaflet": "1.9.20",
"@types/leaflet-polylinedecorator": "1.6.4",
"@types/leaflet-providers": "1.2.4",
"@types/leaflet.gridlayer.googlemutant": "0.4.9",
"@types/leaflet.markercluster": "1.5.5",
"@types/lodash": "^4.17.13",
"@types/node": "~20.17.8",
"@types/lodash": "^4.17.22",
"@types/node": "~22.18.13",
"@types/raphael": "^2.3.9",
"@types/systemjs": "6.15.1",
"@types/systemjs": "6.15.3",
"@types/tinycolor2": "^1.4.6",
"@types/tooltipster": "^0.0.35",
"angular-eslint": "~18.4.3",
"autoprefixer": "^10.4.20",
"angular-eslint": "~20.7.0",
"autoprefixer": "^10.4.23",
"directory-tree": "^3.5.2",
"eslint": "~9.17.0",
"eslint": "~9.39.2",
"eslint-plugin-import": "latest",
"eslint-plugin-jsdoc": "^50.6.0",
"eslint-plugin-jsdoc": "^62.4.0",
"eslint-plugin-prefer-arrow": "latest",
"eslint-plugin-tailwindcss": "^3.17.5",
"eslint-plugin-tailwindcss": "^3.18.2",
"ngrx-store-freeze": "^0.2.4",
"patch-package": "^8.0.0",
"postcss": "^8.4.49",
"patch-package": "^8.0.1",
"postcss": "^8.5.6",
"postinstall-prepare": "^2.0.0",
"tailwindcss": "^3.4.15",
"tailwindcss": "^4.1.18",
"ts-node": "^10.9.2",
"typescript": "~5.9.3",
"typescript-eslint": "^8.53.1"
},
"resolutions": {
"ace-builds": "1.36.5",
"tinymce": "6.8.5",
"rollup": "4.22.4",
"@babel/core": "7.25.2",
"esbuild": "0.23.0",
"jquery.terminal/coveralls-next/form-data": "4.0.4",
"node-forge": "1.3.3",
"glob": "10.5.0",
"path-to-regexp": "0.1.12"
"ace-builds": "1.43.6",
"tinymce": "6.8.6"
}
}

20
ui-ngx/patches/@angular+build+18.2.12.patch → ui-ngx/patches/@angular+build+20.3.15.patch

@ -1,30 +1,30 @@
diff --git a/node_modules/@angular/build/src/tools/angular/compilation/angular-compilation.js b/node_modules/@angular/build/src/tools/angular/compilation/angular-compilation.js
index 625c621..4fc8bd8 100755
index 53168ea..f07c80a 100755
--- a/node_modules/@angular/build/src/tools/angular/compilation/angular-compilation.js
+++ b/node_modules/@angular/build/src/tools/angular/compilation/angular-compilation.js
@@ -68,8 +68,6 @@ class AngularCompilation {
@@ -78,8 +78,6 @@ class AngularCompilation {
allowEmptyCodegenFiles: false,
annotationsAs: 'decorators',
enableResourceInlining: false,
- supportTestBed: false,
- supportJitMode: false,
}));
}
async diagnoseFiles(modes = DiagnosticModes.All) {
// Disable removing of comments as TS is quite aggressive with these and can
// remove important annotations, such as /* @__PURE__ */ and comments like /* vite-ignore */.
removeComments: false,
diff --git a/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js b/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js
index b03875c..8c48101 100755
index ee68408..4144f20 100755
--- a/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js
+++ b/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js
@@ -79,7 +79,7 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
@@ -90,7 +90,7 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
sourcemap: !!pluginOptions.sourcemap,
thirdPartySourcemaps: pluginOptions.thirdPartySourcemaps,
advancedOptimizations: pluginOptions.advancedOptimizations,
- jit: pluginOptions.jit,
+ jit: true, // pluginOptions.jit,
- jit: pluginOptions.jit || pluginOptions.includeTestMetadata,
+ jit: true, //pluginOptions.jit || pluginOptions.includeTestMetadata,
}, environment_options_1.maxWorkers, cacheStore?.createCache('jstransformer'));
// Setup defines based on the values used by the Angular compiler-cli
build.initialOptions.define ??= {};
@@ -385,12 +385,14 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
@@ -448,12 +448,14 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
async function hasSideEffects(path) {
if (!pluginOptions.advancedOptimizations) {
return undefined;

66
ui-ngx/patches/@angular+common+18.2.13.patch

@ -1,66 +0,0 @@
diff --git a/node_modules/@angular/common/esm2022/http/src/xsrf.mjs b/node_modules/@angular/common/esm2022/http/src/xsrf.mjs
index da69c17..d17f6ad 100755
--- a/node_modules/@angular/common/esm2022/http/src/xsrf.mjs
+++ b/node_modules/@angular/common/esm2022/http/src/xsrf.mjs
@@ -19,6 +19,10 @@ export const XSRF_HEADER_NAME = new InjectionToken(ngDevMode ? 'XSRF_HEADER_NAME
providedIn: 'root',
factory: () => XSRF_DEFAULT_HEADER_NAME,
});
+/**
+ * Regex to match absolute URLs, including protocol-relative URLs.
+ */
+const ABSOLUTE_URL_REGEX = /^(?:https?:)?\/\//i;
/**
* Retrieves the current XSRF token to use with the next outgoing request.
*
@@ -69,7 +73,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
args: [XSRF_COOKIE_NAME]
}] }] });
export function xsrfInterceptorFn(req, next) {
- const lcUrl = req.url.toLowerCase();
// Skip both non-mutating requests and absolute URLs.
// Non-mutating requests don't require a token, and absolute URLs require special handling
// anyway as the cookie set
@@ -77,8 +80,7 @@ export function xsrfInterceptorFn(req, next) {
if (!inject(XSRF_ENABLED) ||
req.method === 'GET' ||
req.method === 'HEAD' ||
- lcUrl.startsWith('http://') ||
- lcUrl.startsWith('https://')) {
+ ABSOLUTE_URL_REGEX.test(req.url)) {
return next(req);
}
const token = inject(HttpXsrfTokenExtractor).getToken();
diff --git a/node_modules/@angular/common/fesm2022/http.mjs b/node_modules/@angular/common/fesm2022/http.mjs
index 1655480..d1dbb38 100755
--- a/node_modules/@angular/common/fesm2022/http.mjs
+++ b/node_modules/@angular/common/fesm2022/http.mjs
@@ -2352,6 +2352,10 @@ const XSRF_HEADER_NAME = new InjectionToken(ngDevMode ? 'XSRF_HEADER_NAME' : '',
providedIn: 'root',
factory: () => XSRF_DEFAULT_HEADER_NAME,
});
+/**
+ * Regex to match absolute URLs, including protocol-relative URLs.
+ */
+const ABSOLUTE_URL_REGEX = /^(?:https?:)?\/\//i;
/**
* Retrieves the current XSRF token to use with the next outgoing request.
*
@@ -2402,7 +2406,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
args: [XSRF_COOKIE_NAME]
}] }] });
function xsrfInterceptorFn(req, next) {
- const lcUrl = req.url.toLowerCase();
// Skip both non-mutating requests and absolute URLs.
// Non-mutating requests don't require a token, and absolute URLs require special handling
// anyway as the cookie set
@@ -2410,8 +2413,7 @@ function xsrfInterceptorFn(req, next) {
if (!inject(XSRF_ENABLED) ||
req.method === 'GET' ||
req.method === 'HEAD' ||
- lcUrl.startsWith('http://') ||
- lcUrl.startsWith('https://')) {
+ ABSOLUTE_URL_REGEX.test(req.url)) {
return next(req);
}
const token = inject(HttpXsrfTokenExtractor).getToken();

97
ui-ngx/patches/@angular+compiler+18.2.13.patch

@ -1,97 +0,0 @@
diff --git a/node_modules/@angular/compiler/fesm2022/compiler.mjs b/node_modules/@angular/compiler/fesm2022/compiler.mjs
index a00b189..58896de 100755
--- a/node_modules/@angular/compiler/fesm2022/compiler.mjs
+++ b/node_modules/@angular/compiler/fesm2022/compiler.mjs
@@ -18631,6 +18631,7 @@ function SECURITY_SCHEMA() {
'area|ping',
'audio|src',
'a|href',
+ 'a|xlink:href',
'a|ping',
'blockquote|cite',
'body|background',
@@ -18644,6 +18645,75 @@ function SECURITY_SCHEMA() {
'track|src',
'video|poster',
'video|src',
+
+ // MathML namespace
+ // https://crsrc.org/c/third_party/blink/renderer/core/sanitizer/sanitizer.cc;l=753-768;drc=b3eb16372dcd3317d65e9e0265015e322494edcd;bpv=1;bpt=1
+ 'annotation|href',
+ 'annotation|xlink:href',
+ 'annotation-xml|href',
+ 'annotation-xml|xlink:href',
+ 'maction|href',
+ 'maction|xlink:href',
+ 'malignmark|href',
+ 'malignmark|xlink:href',
+ 'math|href',
+ 'math|xlink:href',
+ 'mroot|href',
+ 'mroot|xlink:href',
+ 'msqrt|href',
+ 'msqrt|xlink:href',
+ 'merror|href',
+ 'merror|xlink:href',
+ 'mfrac|href',
+ 'mfrac|xlink:href',
+ 'mglyph|href',
+ 'mglyph|xlink:href',
+ 'msub|href',
+ 'msub|xlink:href',
+ 'msup|href',
+ 'msup|xlink:href',
+ 'msubsup|href',
+ 'msubsup|xlink:href',
+ 'mmultiscripts|href',
+ 'mmultiscripts|xlink:href',
+ 'mprescripts|href',
+ 'mprescripts|xlink:href',
+ 'mi|href',
+ 'mi|xlink:href',
+ 'mn|href',
+ 'mn|xlink:href',
+ 'mo|href',
+ 'mo|xlink:href',
+ 'mpadded|href',
+ 'mpadded|xlink:href',
+ 'mphantom|href',
+ 'mphantom|xlink:href',
+ 'mrow|href',
+ 'mrow|xlink:href',
+ 'ms|href',
+ 'ms|xlink:href',
+ 'mspace|href',
+ 'mspace|xlink:href',
+ 'mstyle|href',
+ 'mstyle|xlink:href',
+ 'mtable|href',
+ 'mtable|xlink:href',
+ 'mtd|href',
+ 'mtd|xlink:href',
+ 'mtr|href',
+ 'mtr|xlink:href',
+ 'mtext|href',
+ 'mtext|xlink:href',
+ 'mover|href',
+ 'mover|xlink:href',
+ 'munder|href',
+ 'munder|xlink:href',
+ 'munderover|href',
+ 'munderover|xlink:href',
+ 'semantics|href',
+ 'semantics|xlink:href',
+ 'none|href',
+ 'none|xlink:href',
]);
registerContext(SecurityContext.RESOURCE_URL, [
'applet|code',
@@ -18659,6 +18729,8 @@ function SECURITY_SCHEMA() {
'object|codebase',
'object|data',
'script|src',
+ 'script|href',
+ 'script|xlink:href',
]);
}
return _SECURITY_SCHEMA;

20
ui-ngx/patches/@angular+core+18.2.13.patch

@ -1,20 +0,0 @@
diff --git a/node_modules/@angular/core/fesm2022/core.mjs b/node_modules/@angular/core/fesm2022/core.mjs
index 7d9d345..b4d21c6 100755
--- a/node_modules/@angular/core/fesm2022/core.mjs
+++ b/node_modules/@angular/core/fesm2022/core.mjs
@@ -12859,13 +12859,13 @@ function findDirectiveDefMatches(tView, tNode) {
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
matches || (matches = []);
if (isComponentDef(def)) {
- if (ngDevMode) {
+ // if (ngDevMode) {
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
`Please use a different tag to activate the ${stringify(def.type)} component.`);
if (isComponentHost(tNode)) {
throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);
}
- }
+ // }
// Components are inserted at the front of the matches array so that their lifecycle
// hooks run before any directive lifecycle hooks. This appears to be for ViewEngine
// compatibility. This logic doesn't make sense with host directives, because it

20
ui-ngx/patches/@angular+core+20.3.16.patch

@ -0,0 +1,20 @@
diff --git a/node_modules/@angular/core/fesm2022/debug_node.mjs b/node_modules/@angular/core/fesm2022/debug_node.mjs
index cdeef4b..2c8101f 100755
--- a/node_modules/@angular/core/fesm2022/debug_node.mjs
+++ b/node_modules/@angular/core/fesm2022/debug_node.mjs
@@ -9421,13 +9421,13 @@ function findDirectiveDefMatches(tView, tNode) {
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
matches ??= [];
if (isComponentDef(def)) {
- if (ngDevMode) {
+ //if (ngDevMode) {
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
`Please use a different tag to activate the ${stringify(def.type)} component.`);
if (matches.length && isComponentDef(matches[0])) {
throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);
}
- }
+ //}
matches.unshift(def);
}
else {

61
ui-ngx/patches/@angular+material+18.2.14.patch

@ -1,61 +0,0 @@
diff --git a/node_modules/@angular/material/autocomplete/index.d.ts b/node_modules/@angular/material/autocomplete/index.d.ts
index 1ebc198..f572ea2 100755
--- a/node_modules/@angular/material/autocomplete/index.d.ts
+++ b/node_modules/@angular/material/autocomplete/index.d.ts
@@ -220,6 +220,10 @@ export declare interface MatAutocompleteDefaultOptions {
requireSelection?: boolean;
/** Class or list of classes to be applied to the autocomplete's overlay panel. */
overlayPanelClass?: string | string[];
+
+ backdropClass?: string;
+
+ hasBackdrop?: boolean;
/** Wheter icon indicators should be hidden for single-selection. */
hideSingleSelectionIndicator?: boolean;
}
diff --git a/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs b/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs
index 193f5e4..833446a 100755
--- a/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs
+++ b/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs
@@ -670,6 +670,8 @@ export class MatAutocompleteTrigger {
scrollStrategy: this._scrollStrategy(),
width: this._getPanelWidth(),
direction: this._dir ?? undefined,
+ hasBackdrop: this._defaults?.hasBackdrop,
+ backdropClass: this._defaults?.backdropClass,
panelClass: this._defaults?.overlayPanelClass,
});
}
diff --git a/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs b/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs
index 3d919a4..5fd6b4d 100755
--- a/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs
+++ b/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs
@@ -41,6 +41,7 @@ export function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
autoSelectActiveOption: false,
hideSingleSelectionIndicator: false,
requireSelection: false,
+ hasBackdrop: false,
};
}
/** Autocomplete component. */
diff --git a/node_modules/@angular/material/fesm2022/autocomplete.mjs b/node_modules/@angular/material/fesm2022/autocomplete.mjs
index e3d0253..36cd6d7 100755
--- a/node_modules/@angular/material/fesm2022/autocomplete.mjs
+++ b/node_modules/@angular/material/fesm2022/autocomplete.mjs
@@ -65,6 +65,7 @@ function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
autoSelectActiveOption: false,
hideSingleSelectionIndicator: false,
requireSelection: false,
+ hasBackdrop: false,
};
}
/** Autocomplete component. */
@@ -926,6 +927,8 @@ class MatAutocompleteTrigger {
scrollStrategy: this._scrollStrategy(),
width: this._getPanelWidth(),
direction: this._dir ?? undefined,
+ hasBackdrop: this._defaults?.hasBackdrop,
+ backdropClass: this._defaults?.backdropClass,
panelClass: this._defaults?.overlayPanelClass,
});
}

34
ui-ngx/patches/@mat-datetimepicker+core+14.0.0.patch

@ -1,34 +0,0 @@
diff --git a/node_modules/@mat-datetimepicker/core/esm2022/datetimepicker/clock.mjs b/node_modules/@mat-datetimepicker/core/esm2022/datetimepicker/clock.mjs
index 7ecfae7..08363d3 100644
--- a/node_modules/@mat-datetimepicker/core/esm2022/datetimepicker/clock.mjs
+++ b/node_modules/@mat-datetimepicker/core/esm2022/datetimepicker/clock.mjs
@@ -259,9 +259,9 @@ export class MatDatetimepickerClockComponent {
value = 0;
}
// Don't close the minutes view if an invalid minute is clicked.
- if (!this._minutes.find((m) => m?.['value'] === value)?.['enabled']) {
- return;
- }
+ // if (!this._minutes.find((m) => m?.['value'] === value)?.['enabled']) {
+ // return;
+ // }
date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), value);
}
this._timeChanged = true;
diff --git a/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs b/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs
index 00f4a52..df688e3 100644
--- a/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs
+++ b/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs
@@ -946,9 +946,9 @@ class MatDatetimepickerClockComponent {
value = 0;
}
// Don't close the minutes view if an invalid minute is clicked.
- if (!this._minutes.find((m) => m?.['value'] === value)?.['enabled']) {
- return;
- }
+ // if (!this._minutes.find((m) => m?.['value'] === value)?.['enabled']) {
+ // return;
+ // }
date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), value);
}
this._timeChanged = true;

17
ui-ngx/patches/@mat-datetimepicker+core+16.0.1.patch

@ -0,0 +1,17 @@
diff --git a/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs b/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs
index 83a6413..70d9c3e 100644
--- a/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs
+++ b/node_modules/@mat-datetimepicker/core/fesm2022/mat-datetimepicker-core.mjs
@@ -935,9 +935,9 @@ class MatDatetimepickerClockComponent {
value = 0;
}
// Don't close the minutes view if an invalid minute is clicked.
- if (!this._minutes.find((m) => m?.['value'] === value)?.['enabled']) {
- return;
- }
+ // if (!this._minutes.find((m) => m?.['value'] === value)?.['enabled']) {
+ // return;
+ // }
date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), value);
}
this._timeChanged = true;

4
ui-ngx/patches/angular-gridster2+18.0.1.patch → ui-ngx/patches/angular-gridster2+20.2.4.patch

@ -1,8 +1,8 @@
diff --git a/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs b/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
index 0dcd873..e99b602 100644
index 9fbf502..ee1b125 100644
--- a/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
+++ b/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
@@ -666,8 +666,8 @@ class GridsterRenderer {
@@ -777,8 +777,8 @@ class GridsterRenderer {
renderer.setStyle(el, DirTypes.LTR ? 'margin-right' : 'margin-left', '');
}
else {

27
ui-ngx/patches/jquery.terminal+2.44.1.patch

File diff suppressed because one or more lines are too long

2
ui-ngx/src/app/app.component.ts

@ -88,7 +88,7 @@ export class AppComponent {
if (!env.production) {
console.log(`Default Lang: ${env.defaultLang}`);
}
this.translate.setDefaultLang(env.defaultLang);
this.translate.setFallbackLang(env.defaultLang);
}
setupAuth() {

8
ui-ngx/src/app/core/translate/missing-translate-handler.ts

@ -14,11 +14,12 @@
/// limitations under the License.
///
import { MissingTranslationHandler, MissingTranslationHandlerParams } from '@ngx-translate/core';
import { MissingTranslationHandler, MissingTranslationHandlerParams, StrictTranslation } from '@ngx-translate/core';
import { customTranslationsPrefix } from '@app/shared/models/constants';
import { Observable } from 'rxjs';
export class TbMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
handle(params: MissingTranslationHandlerParams): StrictTranslation | Observable<StrictTranslation> {
if (params.key && !params.key.startsWith(customTranslationsPrefix)) {
console.warn('Translation for \'' + params.key + '\' doesn\'t exist');
let translations: any;
@ -32,7 +33,8 @@ export class TbMissingTranslationHandler implements MissingTranslationHandler {
}
translations = newTranslations;
}
params.translateService.setTranslation(params.translateService.currentLang, translations, true);
params.translateService.setTranslation(params.translateService.getCurrentLang(), translations, true);
}
return undefined;
}
}

6
ui-ngx/src/app/core/translate/translate-default-loader.ts

@ -14,7 +14,7 @@
/// limitations under the License.
///
import { TranslateLoader } from '@ngx-translate/core';
import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@ -26,7 +26,7 @@ export class TranslateDefaultLoader implements TranslateLoader {
}
getTranslation(lang: string): Observable<object> {
return this.http.get(`/assets/locale/locale.constant-${lang}.json`);
getTranslation(lang: string): Observable<TranslationObject> {
return this.http.get<TranslationObject>(`/assets/locale/locale.constant-${lang}.json`);
}
}

10
ui-ngx/src/app/core/translate/translate-default-parser.ts

@ -15,15 +15,14 @@
///
import { Injectable } from '@angular/core';
import { TranslateParser } from '@ngx-translate/core';
import { InterpolateFunction, InterpolationParameters, TranslateParser } from '@ngx-translate/core';
import { isDefinedAndNotNull } from '@core/utils';
@Injectable({ providedIn: 'root' })
export class TranslateDefaultParser extends TranslateParser {
templateMatcher: RegExp = /{{\s?([^{}\s]*)\s?}}/g;
// eslint-disable-next-line @typescript-eslint/ban-types
public interpolate(expr: string | Function, params?: any): string {
public interpolate(expr: string | InterpolateFunction, params?: InterpolationParameters): string {
let result: string;
if (typeof expr === 'string') {
@ -58,12 +57,11 @@ export class TranslateDefaultParser extends TranslateParser {
return target;
}
// eslint-disable-next-line @typescript-eslint/ban-types
private interpolateFunction(fn: Function, params?: any) {
private interpolateFunction(fn: InterpolateFunction, params?: InterpolationParameters) {
return fn(params);
}
private interpolateString(expr: string, params?: any) {
private interpolateString(expr: string, params?: InterpolationParameters) {
if (!params) {
return expr;
}

2235
ui-ngx/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save