Browse Source

Merge pull request #14935 from thingsboard/feature/lts-4.2-angular-20

Angular 20 migration (CE LTS 4.2)
pull/14994/head
Igor Kulikov 8 months ago
committed by GitHub
parent
commit
1b899d2d86
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 17
      ui-ngx/.browserslistrc
  2. 31
      ui-ngx/angular.json
  3. 4
      ui-ngx/eslint.config.mjs
  4. 139
      ui-ngx/package.json
  5. 31
      ui-ngx/patches/@angular+build+20.3.15.patch
  6. 66
      ui-ngx/patches/@angular+common+18.2.13.patch
  7. 97
      ui-ngx/patches/@angular+compiler+18.2.13.patch
  8. 20
      ui-ngx/patches/@angular+core+18.2.13.patch
  9. 20
      ui-ngx/patches/@angular+core+20.3.16.patch
  10. 61
      ui-ngx/patches/@angular+material+18.2.14.patch
  11. 34
      ui-ngx/patches/@mat-datetimepicker+core+14.0.0.patch
  12. 17
      ui-ngx/patches/@mat-datetimepicker+core+16.0.1.patch
  13. 4
      ui-ngx/patches/angular-gridster2+20.2.4.patch
  14. 15
      ui-ngx/patches/echarts+5.5.1-TB.patch
  15. 27
      ui-ngx/patches/jquery.terminal+2.44.1.patch
  16. 9
      ui-ngx/src/app/app.component.ts
  17. 24
      ui-ngx/src/app/core/services/resources.service.ts
  18. 4
      ui-ngx/src/app/core/services/utils.service.ts
  19. 4
      ui-ngx/src/app/core/settings/settings.effects.ts
  20. 8
      ui-ngx/src/app/core/translate/missing-translate-handler.ts
  21. 6
      ui-ngx/src/app/core/translate/translate-default-loader.ts
  22. 10
      ui-ngx/src/app/core/translate/translate-default-parser.ts
  23. 56
      ui-ngx/src/app/modules/common/modules-map.ts
  24. 7
      ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.ts
  25. 7
      ui-ngx/src/app/modules/home/components/ai-model/check-connectivity-dialog.component.ts
  26. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-panel.component.ts
  27. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-select-panel.component.ts
  28. 21
      ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-select.component.ts
  29. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.ts
  30. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.ts
  31. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-comment.component.ts
  32. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts
  33. 21
      ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.ts
  34. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-table-header.component.ts
  35. 7
      ui-ngx/src/app/modules/home/components/alarm/alarm-table.component.ts
  36. 17
      ui-ngx/src/app/modules/home/components/alias/aliases-entity-autocomplete.component.ts
  37. 7
      ui-ngx/src/app/modules/home/components/alias/aliases-entity-select-panel.component.ts
  38. 7
      ui-ngx/src/app/modules/home/components/alias/aliases-entity-select.component.ts
  39. 9
      ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.ts
  40. 9
      ui-ngx/src/app/modules/home/components/alias/entity-aliases-dialog.component.ts
  41. 9
      ui-ngx/src/app/modules/home/components/attribute/add-attribute-dialog.component.ts
  42. 9
      ui-ngx/src/app/modules/home/components/attribute/add-widget-to-dashboard-dialog.component.ts
  43. 9
      ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts
  44. 7
      ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts
  45. 9
      ui-ngx/src/app/modules/home/components/attribute/edit-attribute-value-panel.component.ts
  46. 7
      ui-ngx/src/app/modules/home/components/audit-log/audit-log-details-dialog.component.ts
  47. 7
      ui-ngx/src/app/modules/home/components/audit-log/audit-log-table.component.ts
  48. 11
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table.component.ts
  49. 35
      ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.ts
  50. 7
      ui-ngx/src/app/modules/home/components/calculated-fields/components/debug-dialog/calculated-field-debug-dialog.component.ts
  51. 9
      ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.ts
  52. 7
      ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.ts
  53. 31
      ui-ngx/src/app/modules/home/components/calculated-fields/components/test-arguments/calculated-field-test-arguments.component.ts
  54. 9
      ui-ngx/src/app/modules/home/components/calculated-fields/components/test-dialog/calculated-field-script-test-dialog.component.ts
  55. 11
      ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.ts
  56. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-image-dialog.component.ts
  57. 20
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
  58. 3
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts
  59. 9
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.ts
  60. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-state.component.ts
  61. 9
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.ts
  62. 9
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-widget-select.component.ts
  63. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/edit-widget.component.ts
  64. 4
      ui-ngx/src/app/modules/home/components/dashboard-page/layout/add-new-breakpoint-dialog.component.html
  65. 5
      ui-ngx/src/app/modules/home/components/dashboard-page/layout/add-new-breakpoint-dialog.component.ts
  66. 10
      ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.ts
  67. 9
      ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts
  68. 9
      ui-ngx/src/app/modules/home/components/dashboard-page/layout/move-widgets-dialog.component.ts
  69. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/layout/select-dashboard-breakpoint.component.ts
  70. 9
      ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts
  71. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/states/default-state-controller.component.ts
  72. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/states/entity-state-controller.component.ts
  73. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts
  74. 5
      ui-ngx/src/app/modules/home/components/dashboard-page/states/states-component.directive.ts
  75. 7
      ui-ngx/src/app/modules/home/components/dashboard-page/widget-types-panel.component.ts
  76. 7
      ui-ngx/src/app/modules/home/components/dashboard-view/dashboard-view.component.ts
  77. 12
      ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.ts
  78. 7
      ui-ngx/src/app/modules/home/components/dashboard/select-target-layout-dialog.component.ts
  79. 9
      ui-ngx/src/app/modules/home/components/dashboard/select-target-state-dialog.component.ts
  80. 7
      ui-ngx/src/app/modules/home/components/details-panel.component.ts
  81. 7
      ui-ngx/src/app/modules/home/components/device/copy-device-credentials.component.ts
  82. 31
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m-server.component.ts
  83. 31
      ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.ts
  84. 30
      ui-ngx/src/app/modules/home/components/device/device-credentials-mqtt-basic.component.ts
  85. 30
      ui-ngx/src/app/modules/home/components/device/device-credentials.component.ts
  86. 21
      ui-ngx/src/app/modules/home/components/device/device-info-filter.component.ts
  87. 7
      ui-ngx/src/app/modules/home/components/edge/edge-downlink-table-header.component.ts
  88. 7
      ui-ngx/src/app/modules/home/components/edge/edge-downlink-table.component.ts
  89. 9
      ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.ts
  90. 33
      ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.ts
  91. 17
      ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-panel.component.ts
  92. 9
      ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
  93. 7
      ui-ngx/src/app/modules/home/components/entity/entity-chips.component.ts
  94. 9
      ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts
  95. 9
      ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts
  96. 21
      ui-ngx/src/app/modules/home/components/entity/entity-filter-view.component.ts
  97. 21
      ui-ngx/src/app/modules/home/components/entity/entity-filter.component.ts
  98. 7
      ui-ngx/src/app/modules/home/components/event/event-content-dialog.component.ts
  99. 7
      ui-ngx/src/app/modules/home/components/event/event-filter-panel.component.ts
  100. 7
      ui-ngx/src/app/modules/home/components/event/event-table-header.component.ts

17
ui-ngx/.browserslistrc

@ -2,18 +2,17 @@
# For additional information regarding the format and rule options, please see: # For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries # https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see: # For Angular's browser support policy, please see:
# https://angular.dev/reference/versions#browser-support # https://angular.dev/reference/versions#browser-support
# You can see what browsers were selected by your queries by running: # You can see what browsers were selected by your queries by running:
# npx browserslist # npx browserslist
>0.5% Chrome >= 107
not dead ChromeAndroid >= 107
last 2 Chrome versions Edge >= 107
last 1 Firefox version Firefox >= 104
last 2 Edge major versions FirefoxAndroid >= 104
last 2 Safari major versions Safari >= 16
last 2 iOS major versions iOS >= 16
last 2 Android major versions
Firefox ESR Firefox ESR

31
ui-ngx/angular.json

@ -114,7 +114,10 @@
"stylePreprocessorOptions": { "stylePreprocessorOptions": {
"includePaths": [ "includePaths": [
"src/scss" "src/scss"
] ],
"sass": {
"silenceDeprecations": ["mixed-decls", "color-functions", "global-builtin", "import"]
}
}, },
"scripts": [ "scripts": [
"node_modules/tinycolor2/dist/tinycolor-min.js", "node_modules/tinycolor2/dist/tinycolor-min.js",
@ -217,5 +220,31 @@
"schematicCollections": [ "schematicCollections": [
"@angular-eslint/schematics" "@angular-eslint/schematics"
] ]
},
"schematics": {
"@schematics/angular:component": {
"type": "component"
},
"@schematics/angular:directive": {
"type": "directive"
},
"@schematics/angular:service": {
"type": "service"
},
"@schematics/angular:guard": {
"typeSeparator": "."
},
"@schematics/angular:interceptor": {
"typeSeparator": "."
},
"@schematics/angular:module": {
"typeSeparator": "."
},
"@schematics/angular:pipe": {
"typeSeparator": "."
},
"@schematics/angular:resolver": {
"typeSeparator": "."
}
} }
} }

4
ui-ngx/eslint.config.mjs

@ -64,7 +64,9 @@ export default tsEslint.config(
"@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/ban-ts-comment": "off",
"no-case-declarations": "off", "no-case-declarations": "off",
"no-prototype-builtins": "off", "no-prototype-builtins": "off",
"@typescript-eslint/consistent-type-definitions": "off" "@typescript-eslint/consistent-type-definitions": "off",
"@angular-eslint/prefer-standalone": "off",
"@angular-eslint/prefer-inject": "off"
}, },
}, },
{ {

139
ui-ngx/package.json

@ -13,47 +13,47 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "18.2.13", "@angular/animations": "20.3.16",
"@angular/cdk": "18.2.14", "@angular/cdk": "20.2.14",
"@angular/common": "18.2.13", "@angular/common": "20.3.16",
"@angular/compiler": "18.2.13", "@angular/compiler": "20.3.16",
"@angular/core": "18.2.13", "@angular/core": "20.3.16",
"@angular/forms": "18.2.13", "@angular/forms": "20.3.16",
"@angular/material": "18.2.14", "@angular/material": "20.2.14",
"@angular/platform-browser": "18.2.13", "@angular/platform-browser": "20.3.16",
"@angular/platform-browser-dynamic": "18.2.13", "@angular/platform-browser-dynamic": "20.3.16",
"@angular/router": "18.2.13", "@angular/router": "20.3.16",
"@auth0/angular-jwt": "^5.2.0", "@auth0/angular-jwt": "^5.2.0",
"@flowjs/flow.js": "^2.14.1", "@flowjs/flow.js": "^2.14.1",
"@flowjs/ngx-flow": "18.0.1", "@flowjs/ngx-flow": "20.0.2",
"@geoman-io/leaflet-geoman-free": "2.18.3", "@geoman-io/leaflet-geoman-free": "2.18.3",
"@iplab/ngx-color-picker": "^18.0.1", "@iplab/ngx-color-picker": "^20.0.0",
"@mat-datetimepicker/core": "~14.0.0", "@mat-datetimepicker/core": "~16.0.1",
"@mdi/svg": "^7.4.47", "@mdi/svg": "^7.4.47",
"@messageformat/core": "^3.4.0", "@messageformat/core": "^3.4.0",
"@ngrx/effects": "^18.1.1", "@ngrx/effects": "^20.1.0",
"@ngrx/store": "^18.1.1", "@ngrx/store": "^20.1.0",
"@ngrx/store-devtools": "^18.1.1", "@ngrx/store-devtools": "^20.1.0",
"@ngx-translate/core": "^15.0.0", "@ngx-translate/core": "^17.0.0",
"@svgdotjs/svg.filter.js": "^3.0.8", "@svgdotjs/svg.filter.js": "^3.0.9",
"@svgdotjs/svg.js": "^3.2.4", "@svgdotjs/svg.js": "3.2.4",
"@svgdotjs/svg.panzoom.js": "^2.1.2", "@svgdotjs/svg.panzoom.js": "^2.1.2",
"@tinymce/tinymce-angular": "^8.0.1", "@tinymce/tinymce-angular": "^8.0.1",
"ace-builds": "1.36.5", "ace-builds": "1.43.6",
"ace-diff": "^3.0.3", "ace-diff": "^3.3.0",
"angular-gridster2": "~18.0.1", "angular-gridster2": "~20.2.4",
"angular2-hotkeys": "^16.0.1", "angular2-hotkeys": "^16.0.1",
"canvas-gauges": "^2.1.7", "canvas-gauges": "^2.1.7",
"core-js": "^3.39.0", "core-js": "^3.48.0",
"dayjs": "1.11.13", "dayjs": "1.11.19",
"echarts": "https://github.com/thingsboard/echarts/archive/5.5.1-TB.tar.gz", "echarts": "https://github.com/thingsboard/echarts/archive/5.5.1-TB.tar.gz",
"flot": "https://github.com/thingsboard/flot.git#0.9-work", "flot": "https://github.com/thingsboard/flot.git#0.9-work",
"flot.curvedlines": "https://github.com/MichaelZinsmaier/CurvedLines.git#master", "flot.curvedlines": "https://github.com/MichaelZinsmaier/CurvedLines.git#master",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"jquery": "^3.7.1", "jquery": "^3.7.1",
"jquery.terminal": "^2.44.1", "jquery.terminal": "^2.45.2",
"js-beautify": "1.15.1", "js-beautify": "1.15.4",
"json-schema-defaults": "^0.4.0", "json-schema-defaults": "^0.4.0",
"jstree": "^3.3.17", "jstree": "^3.3.17",
"jstree-bootstrap-theme": "^1.0.1", "jstree-bootstrap-theme": "^1.0.1",
@ -63,87 +63,82 @@
"leaflet-providers": "2.0.0", "leaflet-providers": "2.0.0",
"leaflet.gridlayer.googlemutant": "0.15.0", "leaflet.gridlayer.googlemutant": "0.15.0",
"leaflet.markercluster": "1.5.3", "leaflet.markercluster": "1.5.3",
"libphonenumber-js": "^1.11.15", "libphonenumber-js": "^1.12.35",
"maplibre-gl": "^5.2.0", "maplibre-gl": "5.2.0",
"marked": "~12.0.2", "marked": "~16.4.2",
"moment": "^2.30.1", "moment": "^2.30.1",
"moment-timezone": "^0.5.45", "moment-timezone": "^0.6.0",
"ngx-clipboard": "^16.0.0", "ngx-clipboard": "^16.0.0",
"ngx-daterangepicker-material": "^6.0.4", "ngx-daterangepicker-material": "^6.0.4",
"ngx-drag-drop": "^18.0.2", "ngx-drag-drop": "^20.0.1",
"ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/3.0.0", "ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/3.0.0",
"ngx-hm-carousel": "^18.0.0", "ngx-hm-carousel": "^19.0.0",
"ngx-markdown": "^18.1.0", "ngx-markdown": "^20.1.0",
"ngx-sharebuttons": "^15.0.6", "ngx-sharebuttons": "^17.0.0",
"ngx-translate-messageformat-compiler": "^7.0.0", "ngx-translate-messageformat-compiler": "^7.2.0",
"objectpath": "^2.0.0", "objectpath": "^2.0.0",
"qrcode": "^1.5.4", "qrcode": "^1.5.4",
"raphael": "^2.3.0", "raphael": "^2.3.0",
"rxjs": "~7.8.1", "rxjs": "~7.8.2",
"schema-inspector": "^2.1.0", "schema-inspector": "^2.1.0",
"screenfull": "^6.0.2", "screenfull": "^6.0.2",
"sorted-btree": "^1.8.1", "sorted-btree": "^1.8.1",
"split.js": "^1.6.5", "split.js": "^1.6.5",
"systemjs": "6.15.1", "systemjs": "6.15.1",
"tinycolor2": "^1.6.0", "tinycolor2": "^1.6.0",
"tinymce": "~6.8.5", "tinymce": "~6.8.6",
"tooltipster": "^4.2.8", "tooltipster": "^4.2.8",
"tslib": "^2.7.0", "tslib": "^2.8.1",
"typeface-roboto": "^1.1.13", "typeface-roboto": "^1.1.13",
"zone.js": "~0.14.10" "zone.js": "~0.15.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-builders/custom-esbuild": "18.0.0", "@angular-builders/custom-esbuild": "20.0.0",
"@angular-devkit/build-angular": "18.2.12", "@angular-devkit/build-angular": "20.3.15",
"@angular-devkit/core": "18.2.12", "@angular-devkit/core": "20.3.15",
"@angular-devkit/schematics": "18.2.12", "@angular-devkit/schematics": "20.3.15",
"@angular/build": "18.2.12", "@angular/build": "20.3.15",
"@angular/cli": "18.2.12", "@angular/cli": "20.3.15",
"@angular/compiler-cli": "18.2.13", "@angular/compiler-cli": "20.3.16",
"@angular/language-service": "18.2.13", "@angular/language-service": "20.3.16",
"@types/ace-diff": "^2.1.4", "@types/ace-diff": "^2.1.4",
"@types/canvas-gauges": "^2.1.8", "@types/canvas-gauges": "^2.1.8",
"@types/flot": "^0.0.36", "@types/flot": "^0.0.36",
"@types/flowjs": "^2.13.14", "@types/flowjs": "^2.13.14",
"@types/jquery": "^3.5.32", "@types/jquery": "^3.5.33",
"@types/js-beautify": "^1.14.3", "@types/js-beautify": "^1.14.3",
"@types/leaflet": "1.9.14", "@types/leaflet": "1.9.14",
"@types/leaflet-polylinedecorator": "1.6.4", "@types/leaflet-polylinedecorator": "1.6.4",
"@types/leaflet-providers": "1.2.4", "@types/leaflet-providers": "1.2.4",
"@types/leaflet.gridlayer.googlemutant": "0.4.9", "@types/leaflet.gridlayer.googlemutant": "0.4.9",
"@types/leaflet.markercluster": "1.5.5", "@types/leaflet.markercluster": "1.5.5",
"@types/lodash": "^4.17.13", "@types/lodash": "^4.17.22",
"@types/node": "~20.17.8", "@types/node": "~22.18.13",
"@types/raphael": "^2.3.9", "@types/raphael": "^2.3.9",
"@types/systemjs": "6.15.1", "@types/systemjs": "6.15.3",
"@types/tinycolor2": "^1.4.6", "@types/tinycolor2": "^1.4.6",
"@types/tooltipster": "^0.0.35", "@types/tooltipster": "^0.0.35",
"angular-eslint": "~18.4.3", "angular-eslint": "~20.7.0",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.23",
"directory-tree": "^3.5.2", "directory-tree": "^3.5.2",
"eslint": "~9.17.0", "eslint": "~9.39.2",
"eslint-plugin-import": "latest", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsdoc": "^50.6.0", "eslint-plugin-jsdoc": "^62.4.1",
"eslint-plugin-prefer-arrow": "latest", "eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-tailwindcss": "^3.17.5", "eslint-plugin-tailwindcss": "^3.18.2",
"ngrx-store-freeze": "^0.2.4", "ngrx-store-freeze": "^0.2.4",
"patch-package": "^8.0.0", "patch-package": "^8.0.1",
"postcss": "^8.4.49", "postcss": "^8.5.6",
"postinstall-prepare": "^2.0.0", "postinstall-prepare": "^2.0.0",
"tailwindcss": "^3.4.15", "tailwindcss": "^3.4.19",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "~5.5.4", "typescript": "~5.9.3",
"typescript-eslint": "^8.18.1" "typescript-eslint": "^8.54.0"
}, },
"resolutions": { "resolutions": {
"ace-builds": "1.36.5", "ace-builds": "1.43.6",
"tinymce": "6.8.5", "tinymce": "6.8.6",
"rollup": "4.22.4", "@babel/core": "7.28.3",
"@babel/core": "7.25.2", "esbuild": "0.25.9"
"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"
} }
} }

31
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 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 --- a/node_modules/@angular/build/src/tools/angular/compilation/angular-compilation.js
+++ b/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, allowEmptyCodegenFiles: false,
annotationsAs: 'decorators', annotationsAs: 'decorators',
enableResourceInlining: false, enableResourceInlining: false,
- supportTestBed: false, - supportTestBed: false,
- supportJitMode: false, - supportJitMode: false,
})); // Disable removing of comments as TS is quite aggressive with these and can
} // remove important annotations, such as /* @__PURE__ */ and comments like /* vite-ignore */.
async diagnoseFiles(modes = DiagnosticModes.All) { 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 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..ac15cbf 100755
--- a/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js --- a/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js
+++ b/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, sourcemap: !!pluginOptions.sourcemap,
thirdPartySourcemaps: pluginOptions.thirdPartySourcemaps, thirdPartySourcemaps: pluginOptions.thirdPartySourcemaps,
advancedOptimizations: pluginOptions.advancedOptimizations, advancedOptimizations: pluginOptions.advancedOptimizations,
- jit: pluginOptions.jit, - jit: pluginOptions.jit || pluginOptions.includeTestMetadata,
+ jit: true, // pluginOptions.jit, + jit: true, //pluginOptions.jit || pluginOptions.includeTestMetadata,
}, environment_options_1.maxWorkers, cacheStore?.createCache('jstransformer')); }, environment_options_1.maxWorkers, cacheStore?.createCache('jstransformer'));
// Setup defines based on the values used by the Angular compiler-cli // Setup defines based on the values used by the Angular compiler-cli
build.initialOptions.define ??= {}; build.initialOptions.define ??= {};
@@ -385,12 +385,14 @@ function createCompilerPlugin(pluginOptions, styleOptions) { @@ -448,12 +448,14 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
async function hasSideEffects(path) { async function hasSideEffects(path) {
if (!pluginOptions.advancedOptimizations) { if (!pluginOptions.advancedOptimizations) {
return undefined; return undefined;
@ -41,3 +41,14 @@ index b03875c..8c48101 100755
} }
}, },
}; };
@@ -554,9 +556,7 @@ function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserve
sourceRoot: undefined,
preserveSymlinks,
externalRuntimeStyles: pluginOptions.externalRuntimeStyles,
- _enableHmr: !!pluginOptions.templateUpdates,
- supportTestBed: !!pluginOptions.includeTestMetadata,
- supportJitMode: !!pluginOptions.includeTestMetadata,
+ _enableHmr: !!pluginOptions.templateUpdates
};
};
}

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 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 --- a/node_modules/angular-gridster2/fesm2022/angular-gridster2.mjs
+++ b/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', ''); renderer.setStyle(el, DirTypes.LTR ? 'margin-right' : 'margin-left', '');
} }
else { else {

15
ui-ngx/patches/echarts+5.5.1-TB.patch

@ -0,0 +1,15 @@
diff --git a/node_modules/echarts/index.d.ts b/node_modules/echarts/index.d.ts
index 811908a..5f77c60 100644
--- a/node_modules/echarts/index.d.ts
+++ b/node_modules/echarts/index.d.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as echarts from './types/dist/echarts';
+// import * as echarts from './types/dist/echarts';
// Export for UMD module.
export as namespace echarts;
-export = echarts;
\ No newline at end of file
+export * from './types/dist/echarts';

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

File diff suppressed because one or more lines are too long

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

@ -35,9 +35,10 @@ import { SETTINGS_KEY } from '@core/settings/settings.effects';
import { initCustomJQueryEvents } from '@shared/models/jquery-event.models'; import { initCustomJQueryEvents } from '@shared/models/jquery-event.models';
@Component({ @Component({
selector: 'tb-root', selector: 'tb-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'] styleUrls: ['./app.component.scss'],
standalone: false
}) })
export class AppComponent { export class AppComponent {
@ -87,7 +88,7 @@ export class AppComponent {
if (!env.production) { if (!env.production) {
console.log(`Default Lang: ${env.defaultLang}`); console.log(`Default Lang: ${env.defaultLang}`);
} }
this.translate.setDefaultLang(env.defaultLang); this.translate.setFallbackLang(env.defaultLang);
} }
setupAuth() { setupAuth() {

24
ui-ngx/src/app/core/services/resources.service.ts

@ -24,14 +24,15 @@ import {
ɵCssSelectorList, ɵCssSelectorList,
ɵNG_COMP_DEF, ɵNG_COMP_DEF,
ɵNG_MOD_DEF, ɵNG_MOD_DEF,
ɵNgModuleDef ɵNgModuleDef,
DOCUMENT
} from '@angular/core'; } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { forkJoin, from, Observable, ReplaySubject, throwError } from 'rxjs'; import { forkJoin, from, Observable, ReplaySubject, throwError } from 'rxjs';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { IModulesMap } from '@modules/common/modules-map.models'; import { IModulesMap } from '@modules/common/modules-map.models';
import { TbResourceId } from '@shared/models/id/tb-resource-id'; import { TbResourceId } from '@shared/models/id/tb-resource-id';
import { camelCase, isObject } from '@core/utils'; import { camelCase, isObject, isUndefined } from '@core/utils';
import { AuthService } from '@core/auth/auth.service'; import { AuthService } from '@core/auth/auth.service';
import { select, Store } from '@ngrx/store'; import { select, Store } from '@ngrx/store';
import { selectIsAuthenticated } from '@core/auth/auth.selectors'; import { selectIsAuthenticated } from '@core/auth/auth.selectors';
@ -286,6 +287,23 @@ export class ResourcesService {
module: moduleDef, module: moduleDef,
components: [] components: []
} }
const declarationsDecl = moduleDef.declarations;
let declarations: Type<any>[];
if (Array.isArray(declarationsDecl)) {
declarations = declarationsDecl;
} else {
declarations = declarationsDecl();
}
if (declarations) {
for (const decl of declarations) {
if (ɵNG_COMP_DEF in decl) {
const component: ɵComponentDef<any> = decl[ɵNG_COMP_DEF];
if (isUndefined(component.standalone) || component.standalone) {
(component as any).standalone = false;
}
}
}
}
modulesWithComponents.modules.push(moduleInfo); modulesWithComponents.modules.push(moduleInfo);
const exportsDecl = moduleDef.exports; const exportsDecl = moduleDef.exports;
let exports: Type<any>[]; let exports: Type<any>[];

4
ui-ngx/src/app/core/services/utils.service.ts

@ -14,7 +14,7 @@
/// limitations under the License. /// limitations under the License.
/// ///
import { Inject, Injectable, NgZone, Renderer2 } from '@angular/core'; import { Inject, Injectable, NgZone, Renderer2, DOCUMENT } from '@angular/core';
import { WINDOW } from '@core/services/window.service'; import { WINDOW } from '@core/services/window.service';
import { ExceptionData, parseException } from '@app/shared/models/error.models'; import { ExceptionData, parseException } from '@app/shared/models/error.models';
import { import {
@ -45,7 +45,7 @@ import { publishReplay, refCount } from 'rxjs/operators';
import { WidgetContext } from '@app/modules/home/models/widget-component.models'; import { WidgetContext } from '@app/modules/home/models/widget-component.models';
import { AttributeData, LatestTelemetry, TelemetryType } from '@shared/models/telemetry/telemetry.models'; import { AttributeData, LatestTelemetry, TelemetryType } from '@shared/models/telemetry/telemetry.models';
import { EntityId } from '@shared/models/id/entity-id'; import { EntityId } from '@shared/models/id/entity-id';
import { DatePipe, DOCUMENT } from '@angular/common'; import { DatePipe } from '@angular/common';
import { entityTypeTranslations } from '@shared/models/entity-type.models'; import { entityTypeTranslations } from '@shared/models/entity-type.models';
import cssjs from '@core/css/css'; import cssjs from '@core/css/css';
import { isNotEmptyTbFunction } from '@shared/models/js-function.models'; import { isNotEmptyTbFunction } from '@shared/models/js-function.models';

4
ui-ngx/src/app/core/settings/settings.effects.ts

@ -15,7 +15,7 @@
/// ///
import { ActivationEnd, Router } from '@angular/router'; import { ActivationEnd, Router } from '@angular/router';
import { Inject, Injectable } from '@angular/core'; import { Inject, Injectable, DOCUMENT } from '@angular/core';
import { select, Store } from '@ngrx/store'; import { select, Store } from '@ngrx/store';
import { Actions, createEffect, ofType } from '@ngrx/effects'; import { Actions, createEffect, ofType } from '@ngrx/effects';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
@ -31,7 +31,7 @@ import { updateUserLang } from '@app/core/settings/settings.utils';
import { UtilsService } from '@core/services/utils.service'; import { UtilsService } from '@core/services/utils.service';
import { getCurrentAuthUser } from '@core/auth/auth.selectors'; import { getCurrentAuthUser } from '@core/auth/auth.selectors';
import { ActionAuthUpdateLastPublicDashboardId } from '../auth/auth.actions'; import { ActionAuthUpdateLastPublicDashboardId } from '../auth/auth.actions';
import { DOCUMENT } from '@angular/common';
export const SETTINGS_KEY = 'SETTINGS'; export const SETTINGS_KEY = 'SETTINGS';

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

@ -14,11 +14,12 @@
/// limitations under the License. /// 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 { customTranslationsPrefix } from '@app/shared/models/constants';
import { Observable } from 'rxjs';
export class TbMissingTranslationHandler implements MissingTranslationHandler { export class TbMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) { handle(params: MissingTranslationHandlerParams): StrictTranslation | Observable<StrictTranslation> {
if (params.key && !params.key.startsWith(customTranslationsPrefix)) { if (params.key && !params.key.startsWith(customTranslationsPrefix)) {
console.warn('Translation for \'' + params.key + '\' doesn\'t exist'); console.warn('Translation for \'' + params.key + '\' doesn\'t exist');
let translations: any; let translations: any;
@ -32,7 +33,8 @@ export class TbMissingTranslationHandler implements MissingTranslationHandler {
} }
translations = newTranslations; 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. /// limitations under the License.
/// ///
import { TranslateLoader } from '@ngx-translate/core'; import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
@ -26,7 +26,7 @@ export class TranslateDefaultLoader implements TranslateLoader {
} }
getTranslation(lang: string): Observable<object> { getTranslation(lang: string): Observable<TranslationObject> {
return this.http.get(`/assets/locale/locale.constant-${lang}.json`); 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 { Injectable } from '@angular/core';
import { TranslateParser } from '@ngx-translate/core'; import { InterpolateFunction, InterpolationParameters, TranslateParser } from '@ngx-translate/core';
import { isDefinedAndNotNull } from '@core/utils'; import { isDefinedAndNotNull } from '@core/utils';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class TranslateDefaultParser extends TranslateParser { export class TranslateDefaultParser extends TranslateParser {
templateMatcher: RegExp = /{{\s?([^{}\s]*)\s?}}/g; templateMatcher: RegExp = /{{\s?([^{}\s]*)\s?}}/g;
// eslint-disable-next-line @typescript-eslint/ban-types public interpolate(expr: string | InterpolateFunction, params?: InterpolationParameters): string {
public interpolate(expr: string | Function, params?: any): string {
let result: string; let result: string;
if (typeof expr === 'string') { if (typeof expr === 'string') {
@ -58,12 +57,11 @@ export class TranslateDefaultParser extends TranslateParser {
return target; return target;
} }
// eslint-disable-next-line @typescript-eslint/ban-types private interpolateFunction(fn: InterpolateFunction, params?: InterpolationParameters) {
private interpolateFunction(fn: Function, params?: any) {
return fn(params); return fn(params);
} }
private interpolateString(expr: string, params?: any) { private interpolateString(expr: string, params?: InterpolationParameters) {
if (!params) { if (!params) {
return expr; return expr;
} }

56
ui-ngx/src/app/modules/common/modules-map.ts

@ -14,8 +14,6 @@
/// limitations under the License. /// limitations under the License.
/// ///
/* eslint-disable max-len */
import * as AngularAnimations from '@angular/animations'; import * as AngularAnimations from '@angular/animations';
import * as AngularCore from '@angular/core'; import * as AngularCore from '@angular/core';
import * as AngularCommon from '@angular/common'; import * as AngularCommon from '@angular/common';
@ -341,6 +339,7 @@ import * as AIModelDialogComponent from '@home/components/ai-model/ai-model-dial
import { IModulesMap } from '@modules/common/modules-map.models'; import { IModulesMap } from '@modules/common/modules-map.models';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { isJSResourceUrl } from '@shared/public-api'; import { isJSResourceUrl } from '@shared/public-api';
import { ɵɵinterpolate, ɵɵinterpolate2 } from '@angular/core';
class ModulesMap implements IModulesMap { class ModulesMap implements IModulesMap {
@ -348,7 +347,7 @@ class ModulesMap implements IModulesMap {
private modulesMap: {[key: string]: any} = { private modulesMap: {[key: string]: any} = {
'@angular/animations': AngularAnimations, '@angular/animations': AngularAnimations,
'@angular/core': AngularCore, '@angular/core': this.angularCoreModule20to18Patch(AngularCore),
'@angular/common': AngularCommon, '@angular/common': AngularCommon,
'@angular/common/http': HttpClientModule, '@angular/common/http': HttpClientModule,
'@angular/forms': AngularForms, '@angular/forms': AngularForms,
@ -402,7 +401,7 @@ class ModulesMap implements IModulesMap {
'@ngrx/store': NgrxStore, '@ngrx/store': NgrxStore,
rxjs: RxJs, rxjs: RxJs,
'rxjs/operators': RxJsOperators, 'rxjs/operators': RxJsOperators,
'@ngx-translate/core': TranslateCore, '@ngx-translate/core': this.translateModule20to18Patch(TranslateCore),
'@mat-datetimepicker/core': MatDateTimePicker, '@mat-datetimepicker/core': MatDateTimePicker,
moment: _moment, moment: _moment,
tslib, tslib,
@ -700,6 +699,55 @@ class ModulesMap implements IModulesMap {
} }
return of(null); return of(null);
} }
private angularCoreModule20to18Patch(module: typeof AngularCore): typeof AngularCore {
const result = {...module};
(result as any).ɵɵStandaloneFeature = () => {};
(result as any).ɵɵInputTransformsFeature = () => {};
(result as any).ɵɵpropertyInterpolate = (propName: string, v0: any, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate(v0), sanitizer);
};
(result as any).ɵɵpropertyInterpolate1 = (propName: string, prefix: string, v0: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate1(prefix, v0, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate2 = (propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate2(prefix, v0, i0, v1, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate3 = (propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate3(prefix, v0, i0, v1, i1, v2, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate4 = (propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate5 = (propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate6 = (propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate7 = (propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolate8 = (propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix), sanitizer);
};
(result as any).ɵɵpropertyInterpolateV = (propName: string, values: any[], sanitizer?: any) => {
return result.ɵɵproperty(propName, result.ɵɵinterpolateV(values), sanitizer);
};
return result;
}
private translateModule20to18Patch(module: typeof TranslateCore): typeof TranslateCore {
const translateServiceCls = module.TranslateService;
Object.defineProperty(translateServiceCls.prototype, 'translations', {
get: function() {
return this.store.translations;
},
enumerable: true,
configurable: true
});
return module;
}
} }
export const modulesMap = new ModulesMap(); export const modulesMap = new ModulesMap();

7
ui-ngx/src/app/modules/home/components/ai-model/ai-model-dialog.component.ts

@ -46,9 +46,10 @@ export interface AIModelDialogData {
} }
@Component({ @Component({
selector: 'tb-ai-model-dialog', selector: 'tb-ai-model-dialog',
templateUrl: './ai-model-dialog.component.html', templateUrl: './ai-model-dialog.component.html',
styleUrls: ['./ai-model-dialog.component.scss'] styleUrls: ['./ai-model-dialog.component.scss'],
standalone: false
}) })
export class AIModelDialogComponent extends DialogComponent<AIModelDialogComponent, AiModel> { export class AIModelDialogComponent extends DialogComponent<AIModelDialogComponent, AiModel> {

7
ui-ngx/src/app/modules/home/components/ai-model/check-connectivity-dialog.component.ts

@ -28,9 +28,10 @@ export interface AIModelDialogData {
} }
@Component({ @Component({
selector: 'tb-check-connectivity-dialog', selector: 'tb-check-connectivity-dialog',
templateUrl: './check-connectivity-dialog.component.html', templateUrl: './check-connectivity-dialog.component.html',
styleUrls: ['./check-connectivity-dialog.component.scss'] styleUrls: ['./check-connectivity-dialog.component.scss'],
standalone: false
}) })
export class CheckConnectivityDialogComponent extends DialogComponent<CheckConnectivityDialogComponent> { export class CheckConnectivityDialogComponent extends DialogComponent<CheckConnectivityDialogComponent> {

7
ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-panel.component.ts

@ -54,9 +54,10 @@ export interface AlarmAssigneePanelData {
} }
@Component({ @Component({
selector: 'tb-alarm-assignee-panel', selector: 'tb-alarm-assignee-panel',
templateUrl: './alarm-assignee-panel.component.html', templateUrl: './alarm-assignee-panel.component.html',
styleUrls: ['./alarm-assignee-panel.component.scss'] styleUrls: ['./alarm-assignee-panel.component.scss'],
standalone: false
}) })
export class AlarmAssigneePanelComponent implements OnInit, AfterViewInit, OnDestroy { export class AlarmAssigneePanelComponent implements OnInit, AfterViewInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-select-panel.component.ts

@ -47,9 +47,10 @@ export interface AlarmAssigneeSelectPanelData {
} }
@Component({ @Component({
selector: 'tb-alarm-assignee-select-panel', selector: 'tb-alarm-assignee-select-panel',
templateUrl: './alarm-assignee-panel.component.html', templateUrl: './alarm-assignee-panel.component.html',
styleUrls: ['./alarm-assignee-panel.component.scss'] styleUrls: ['./alarm-assignee-panel.component.scss'],
standalone: false
}) })
export class AlarmAssigneeSelectPanelComponent implements OnInit, AfterViewInit, OnDestroy { export class AlarmAssigneeSelectPanelComponent implements OnInit, AfterViewInit, OnDestroy {

21
ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-select.component.ts

@ -34,16 +34,17 @@ import { coerceBoolean } from '@shared/decorators/coercion';
import { AlarmAssigneeOption } from '@shared/models/alarm.models'; import { AlarmAssigneeOption } from '@shared/models/alarm.models';
@Component({ @Component({
selector: 'tb-alarm-assignee-select', selector: 'tb-alarm-assignee-select',
templateUrl: './alarm-assignee-select.component.html', templateUrl: './alarm-assignee-select.component.html',
styleUrls: ['./alarm-assignee.component.scss'], styleUrls: ['./alarm-assignee.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => AlarmAssigneeSelectComponent), useExisting: forwardRef(() => AlarmAssigneeSelectComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class AlarmAssigneeSelectComponent implements OnInit, ControlValueAccessor { export class AlarmAssigneeSelectComponent implements OnInit, ControlValueAccessor {

7
ui-ngx/src/app/modules/home/components/alarm/alarm-assignee.component.ts

@ -28,9 +28,10 @@ import { TranslateService } from '@ngx-translate/core';
import { isNotEmptyStr } from '@core/utils'; import { isNotEmptyStr } from '@core/utils';
@Component({ @Component({
selector: 'tb-alarm-assignee', selector: 'tb-alarm-assignee',
templateUrl: './alarm-assignee.component.html', templateUrl: './alarm-assignee.component.html',
styleUrls: ['./alarm-assignee.component.scss'] styleUrls: ['./alarm-assignee.component.scss'],
standalone: false
}) })
export class AlarmAssigneeComponent { export class AlarmAssigneeComponent {
@Input() @Input()

7
ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.ts

@ -28,9 +28,10 @@ export interface AlarmCommentDialogData {
} }
@Component({ @Component({
selector: 'tb-alarm-comment-dialog', selector: 'tb-alarm-comment-dialog',
templateUrl: './alarm-comment-dialog.component.html', templateUrl: './alarm-comment-dialog.component.html',
styleUrls: [] styleUrls: [],
standalone: false
}) })
export class AlarmCommentDialogComponent extends DialogComponent<AlarmCommentDialogComponent, void> { export class AlarmCommentDialogComponent extends DialogComponent<AlarmCommentDialogComponent, void> {

7
ui-ngx/src/app/modules/home/components/alarm/alarm-comment.component.ts

@ -51,9 +51,10 @@ interface AlarmCommentsDisplayData {
} }
@Component({ @Component({
selector: 'tb-alarm-comment', selector: 'tb-alarm-comment',
templateUrl: './alarm-comment.component.html', templateUrl: './alarm-comment.component.html',
styleUrls: ['./alarm-comment.component.scss'] styleUrls: ['./alarm-comment.component.scss'],
standalone: false
}) })
export class AlarmCommentComponent implements OnInit { export class AlarmCommentComponent implements OnInit {
@Input() @Input()

7
ui-ngx/src/app/modules/home/components/alarm/alarm-details-dialog.component.ts

@ -47,9 +47,10 @@ export interface AlarmDetailsDialogData {
} }
@Component({ @Component({
selector: 'tb-alarm-details-dialog', selector: 'tb-alarm-details-dialog',
templateUrl: './alarm-details-dialog.component.html', templateUrl: './alarm-details-dialog.component.html',
styleUrls: ['./alarm-details-dialog.component.scss'] styleUrls: ['./alarm-details-dialog.component.scss'],
standalone: false
}) })
export class AlarmDetailsDialogComponent extends DialogComponent<AlarmDetailsDialogComponent, boolean> { export class AlarmDetailsDialogComponent extends DialogComponent<AlarmDetailsDialogComponent, boolean> {

21
ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.ts

@ -60,16 +60,17 @@ export interface AlarmFilterConfigData {
// @dynamic // @dynamic
@Component({ @Component({
selector: 'tb-alarm-filter-config', selector: 'tb-alarm-filter-config',
templateUrl: './alarm-filter-config.component.html', templateUrl: './alarm-filter-config.component.html',
styleUrls: ['./alarm-filter-config.component.scss'], styleUrls: ['./alarm-filter-config.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => AlarmFilterConfigComponent), useExisting: forwardRef(() => AlarmFilterConfigComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class AlarmFilterConfigComponent implements OnInit, OnDestroy, ControlValueAccessor { export class AlarmFilterConfigComponent implements OnInit, OnDestroy, ControlValueAccessor {

7
ui-ngx/src/app/modules/home/components/alarm/alarm-table-header.component.ts

@ -23,9 +23,10 @@ import { AlarmTableConfig } from './alarm-table-config';
import { AlarmFilterConfig } from '@shared/models/query/query.models'; import { AlarmFilterConfig } from '@shared/models/query/query.models';
@Component({ @Component({
selector: 'tb-alarm-table-header', selector: 'tb-alarm-table-header',
templateUrl: './alarm-table-header.component.html', templateUrl: './alarm-table-header.component.html',
styleUrls: ['./alarm-table-header.component.scss'] styleUrls: ['./alarm-table-header.component.scss'],
standalone: false
}) })
export class AlarmTableHeaderComponent extends EntityTableHeaderComponent<AlarmInfo> { export class AlarmTableHeaderComponent extends EntityTableHeaderComponent<AlarmInfo> {

7
ui-ngx/src/app/modules/home/components/alarm/alarm-table.component.ts

@ -42,9 +42,10 @@ interface AlarmPageQueryParams extends PageQueryParam {
} }
@Component({ @Component({
selector: 'tb-alarm-table', selector: 'tb-alarm-table',
templateUrl: './alarm-table.component.html', templateUrl: './alarm-table.component.html',
styleUrls: ['./alarm-table.component.scss'] styleUrls: ['./alarm-table.component.scss'],
standalone: false
}) })
export class AlarmTableComponent implements OnInit { export class AlarmTableComponent implements OnInit {

17
ui-ngx/src/app/modules/home/components/alias/aliases-entity-autocomplete.component.ts

@ -29,14 +29,15 @@ import { EntityService } from '@core/http/entity.service';
import { isDefinedAndNotNull } from '@core/utils'; import { isDefinedAndNotNull } from '@core/utils';
@Component({ @Component({
selector: 'tb-aliases-entity-autocomplete', selector: 'tb-aliases-entity-autocomplete',
templateUrl: './aliases-entity-autocomplete.component.html', templateUrl: './aliases-entity-autocomplete.component.html',
styleUrls: [], styleUrls: [],
providers: [{ providers: [{
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => AliasesEntityAutocompleteComponent), useExisting: forwardRef(() => AliasesEntityAutocompleteComponent),
multi: true multi: true
}] }],
standalone: false
}) })
export class AliasesEntityAutocompleteComponent implements ControlValueAccessor, OnInit, AfterViewInit { export class AliasesEntityAutocompleteComponent implements ControlValueAccessor, OnInit, AfterViewInit {

7
ui-ngx/src/app/modules/home/components/alias/aliases-entity-select-panel.component.ts

@ -26,9 +26,10 @@ export interface AliasesEntitySelectPanelData {
} }
@Component({ @Component({
selector: 'tb-aliases-entity-select-panel', selector: 'tb-aliases-entity-select-panel',
templateUrl: './aliases-entity-select-panel.component.html', templateUrl: './aliases-entity-select-panel.component.html',
styleUrls: ['./aliases-entity-select-panel.component.scss'] styleUrls: ['./aliases-entity-select-panel.component.scss'],
standalone: false
}) })
export class AliasesEntitySelectPanelComponent { export class AliasesEntitySelectPanelComponent {

7
ui-ngx/src/app/modules/home/components/alias/aliases-entity-select.component.ts

@ -41,9 +41,10 @@ import { deepClone } from '@core/utils';
import { AliasFilterType } from '@shared/models/alias.models'; import { AliasFilterType } from '@shared/models/alias.models';
@Component({ @Component({
selector: 'tb-aliases-entity-select', selector: 'tb-aliases-entity-select',
templateUrl: './aliases-entity-select.component.html', templateUrl: './aliases-entity-select.component.html',
styleUrls: ['./aliases-entity-select.component.scss'] styleUrls: ['./aliases-entity-select.component.scss'],
standalone: false
}) })
export class AliasesEntitySelectComponent implements OnInit, OnDestroy { export class AliasesEntitySelectComponent implements OnInit, OnDestroy {

9
ui-ngx/src/app/modules/home/components/alias/entity-alias-dialog.component.ts

@ -46,10 +46,11 @@ export interface EntityAliasDialogData {
} }
@Component({ @Component({
selector: 'tb-entity-alias-dialog', selector: 'tb-entity-alias-dialog',
templateUrl: './entity-alias-dialog.component.html', templateUrl: './entity-alias-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: EntityAliasDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: EntityAliasDialogComponent }],
styleUrls: ['./entity-alias-dialog.component.scss'] styleUrls: ['./entity-alias-dialog.component.scss'],
standalone: false
}) })
export class EntityAliasDialogComponent extends DialogComponent<EntityAliasDialogComponent, EntityAlias> export class EntityAliasDialogComponent extends DialogComponent<EntityAliasDialogComponent, EntityAlias>
implements OnInit, ErrorStateMatcher { implements OnInit, ErrorStateMatcher {

9
ui-ngx/src/app/modules/home/components/alias/entity-aliases-dialog.component.ts

@ -54,10 +54,11 @@ export interface EntityAliasesDialogData {
} }
@Component({ @Component({
selector: 'tb-entity-aliases-dialog', selector: 'tb-entity-aliases-dialog',
templateUrl: './entity-aliases-dialog.component.html', templateUrl: './entity-aliases-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: EntityAliasesDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: EntityAliasesDialogComponent }],
styleUrls: ['./entity-aliases-dialog.component.scss'] styleUrls: ['./entity-aliases-dialog.component.scss'],
standalone: false
}) })
export class EntityAliasesDialogComponent extends DialogComponent<EntityAliasesDialogComponent, EntityAliases> export class EntityAliasesDialogComponent extends DialogComponent<EntityAliasesDialogComponent, EntityAliases>
implements ErrorStateMatcher { implements ErrorStateMatcher {

9
ui-ngx/src/app/modules/home/components/attribute/add-attribute-dialog.component.ts

@ -33,10 +33,11 @@ export interface AddAttributeDialogData {
} }
@Component({ @Component({
selector: 'tb-add-attribute-dialog', selector: 'tb-add-attribute-dialog',
templateUrl: './add-attribute-dialog.component.html', templateUrl: './add-attribute-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: AddAttributeDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: AddAttributeDialogComponent }],
styleUrls: [] styleUrls: [],
standalone: false
}) })
export class AddAttributeDialogComponent extends DialogComponent<AddAttributeDialogComponent, boolean> export class AddAttributeDialogComponent extends DialogComponent<AddAttributeDialogComponent, boolean>
implements OnInit, ErrorStateMatcher { implements OnInit, ErrorStateMatcher {

9
ui-ngx/src/app/modules/home/components/attribute/add-widget-to-dashboard-dialog.component.ts

@ -49,10 +49,11 @@ export interface AddWidgetToDashboardDialogData {
} }
@Component({ @Component({
selector: 'tb-add-widget-to-dashboard-dialog', selector: 'tb-add-widget-to-dashboard-dialog',
templateUrl: './add-widget-to-dashboard-dialog.component.html', templateUrl: './add-widget-to-dashboard-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: AddWidgetToDashboardDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: AddWidgetToDashboardDialogComponent }],
styleUrls: ['./add-widget-to-dashboard-dialog.component.scss'] styleUrls: ['./add-widget-to-dashboard-dialog.component.scss'],
standalone: false
}) })
export class AddWidgetToDashboardDialogComponent extends export class AddWidgetToDashboardDialogComponent extends
DialogComponent<AddWidgetToDashboardDialogComponent, void> DialogComponent<AddWidgetToDashboardDialogComponent, void>

9
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts

@ -92,10 +92,11 @@ import { FormBuilder } from '@angular/forms';
@Component({ @Component({
selector: 'tb-attribute-table', selector: 'tb-attribute-table',
templateUrl: './attribute-table.component.html', templateUrl: './attribute-table.component.html',
styleUrls: ['./attribute-table.component.scss'], styleUrls: ['./attribute-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
}) })
export class AttributeTableComponent extends PageComponent implements AfterViewInit, OnInit, OnDestroy { export class AttributeTableComponent extends PageComponent implements AfterViewInit, OnInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts

@ -36,9 +36,10 @@ export interface DeleteTimeseriesPanelResult {
} }
@Component({ @Component({
selector: 'tb-delete-timeseries-panel', selector: 'tb-delete-timeseries-panel',
templateUrl: './delete-timeseries-panel.component.html', templateUrl: './delete-timeseries-panel.component.html',
styleUrls: ['./delete-timeseries-panel.component.scss'] styleUrls: ['./delete-timeseries-panel.component.scss'],
standalone: false
}) })
export class DeleteTimeseriesPanelComponent implements OnInit, OnDestroy { export class DeleteTimeseriesPanelComponent implements OnInit, OnDestroy {

9
ui-ngx/src/app/modules/home/components/attribute/edit-attribute-value-panel.component.ts

@ -29,10 +29,11 @@ export interface EditAttributeValuePanelData {
} }
@Component({ @Component({
selector: 'tb-edit-attribute-value-panel', selector: 'tb-edit-attribute-value-panel',
templateUrl: './edit-attribute-value-panel.component.html', templateUrl: './edit-attribute-value-panel.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: EditAttributeValuePanelComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: EditAttributeValuePanelComponent }],
styleUrls: ['./edit-attribute-value-panel.component.scss'] styleUrls: ['./edit-attribute-value-panel.component.scss'],
standalone: false
}) })
export class EditAttributeValuePanelComponent extends PageComponent implements OnInit, ErrorStateMatcher { export class EditAttributeValuePanelComponent extends PageComponent implements OnInit, ErrorStateMatcher {

7
ui-ngx/src/app/modules/home/components/audit-log/audit-log-details-dialog.component.ts

@ -29,9 +29,10 @@ export interface AuditLogDetailsDialogData {
} }
@Component({ @Component({
selector: 'tb-audit-log-details-dialog', selector: 'tb-audit-log-details-dialog',
templateUrl: './audit-log-details-dialog.component.html', templateUrl: './audit-log-details-dialog.component.html',
styleUrls: ['./audit-log-details-dialog.component.scss'] styleUrls: ['./audit-log-details-dialog.component.scss'],
standalone: false
}) })
export class AuditLogDetailsDialogComponent extends DialogComponent<AuditLogDetailsDialogComponent> implements OnInit, OnDestroy { export class AuditLogDetailsDialogComponent extends DialogComponent<AuditLogDetailsDialogComponent> implements OnInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/audit-log/audit-log-table.component.ts

@ -32,9 +32,10 @@ import { getCurrentAuthUser } from '@core/auth/auth.selectors';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
@Component({ @Component({
selector: 'tb-audit-log-table', selector: 'tb-audit-log-table',
templateUrl: './audit-log-table.component.html', templateUrl: './audit-log-table.component.html',
styleUrls: ['./audit-log-table.component.scss'] styleUrls: ['./audit-log-table.component.scss'],
standalone: false
}) })
export class AuditLogTableComponent implements OnInit { export class AuditLogTableComponent implements OnInit {

11
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table.component.ts

@ -37,11 +37,12 @@ import { EntityDebugSettingsService } from '@home/components/entity/debug/entity
import { DatePipe } from '@angular/common'; import { DatePipe } from '@angular/common';
@Component({ @Component({
selector: 'tb-calculated-fields-table', selector: 'tb-calculated-fields-table',
templateUrl: './calculated-fields-table.component.html', templateUrl: './calculated-fields-table.component.html',
styleUrls: ['./calculated-fields-table.component.scss'], styleUrls: ['./calculated-fields-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
providers: [EntityDebugSettingsService] providers: [EntityDebugSettingsService],
standalone: false
}) })
export class CalculatedFieldsTableComponent { export class CalculatedFieldsTableComponent {

35
ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.ts

@ -44,7 +44,7 @@ import {
CalculatedFieldType, CalculatedFieldType,
} from '@shared/models/calculated-field.models'; } from '@shared/models/calculated-field.models';
import { CalculatedFieldArgumentPanelComponent } from '@home/components/calculated-fields/components/public-api'; import { CalculatedFieldArgumentPanelComponent } from '@home/components/calculated-fields/components/public-api';
import { MatButton } from '@angular/material/button'; import { MatIconButton } from '@angular/material/button';
import { TbPopoverService } from '@shared/components/popover.service'; import { TbPopoverService } from '@shared/components/popover.service';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { EntityId } from '@shared/models/id/entity-id'; import { EntityId } from '@shared/models/id/entity-id';
@ -62,21 +62,22 @@ import { NULL_UUID } from '@shared/models/id/has-uuid';
import { BaseData } from '@shared/models/base-data'; import { BaseData } from '@shared/models/base-data';
@Component({ @Component({
selector: 'tb-calculated-field-arguments-table', selector: 'tb-calculated-field-arguments-table',
templateUrl: './calculated-field-arguments-table.component.html', templateUrl: './calculated-field-arguments-table.component.html',
styleUrls: [`calculated-field-arguments-table.component.scss`], styleUrls: [`calculated-field-arguments-table.component.scss`],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => CalculatedFieldArgumentsTableComponent), useExisting: forwardRef(() => CalculatedFieldArgumentsTableComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => CalculatedFieldArgumentsTableComponent), useExisting: forwardRef(() => CalculatedFieldArgumentsTableComponent),
multi: true multi: true
} }
], ],
standalone: false
}) })
export class CalculatedFieldArgumentsTableComponent implements ControlValueAccessor, Validator, OnChanges, AfterViewInit { export class CalculatedFieldArgumentsTableComponent implements ControlValueAccessor, Validator, OnChanges, AfterViewInit {
@ -153,7 +154,7 @@ export class CalculatedFieldArgumentsTableComponent implements ControlValueAcces
this.argumentsFormArray.markAsDirty(); this.argumentsFormArray.markAsDirty();
} }
manageArgument($event: Event, matButton: MatButton, argument = {} as CalculatedFieldArgumentValue): void { manageArgument($event: Event, matButton: MatIconButton, argument = {} as CalculatedFieldArgumentValue): void {
$event?.stopPropagation(); $event?.stopPropagation();
if (this.popoverComponent && !this.popoverComponent.tbHidden) { if (this.popoverComponent && !this.popoverComponent.tbHidden) {
this.popoverComponent.hide(); this.popoverComponent.hide();

7
ui-ngx/src/app/modules/home/components/calculated-fields/components/debug-dialog/calculated-field-debug-dialog.component.ts

@ -35,9 +35,10 @@ export interface CalculatedFieldDebugDialogData {
} }
@Component({ @Component({
selector: 'tb-calculated-field-debug-dialog', selector: 'tb-calculated-field-debug-dialog',
styleUrls: ['calculated-field-debug-dialog.component.scss'], styleUrls: ['calculated-field-debug-dialog.component.scss'],
templateUrl: './calculated-field-debug-dialog.component.html', templateUrl: './calculated-field-debug-dialog.component.html',
standalone: false
}) })
export class CalculatedFieldDebugDialogComponent extends DialogComponent<CalculatedFieldDebugDialogComponent, string> implements AfterViewInit { export class CalculatedFieldDebugDialogComponent extends DialogComponent<CalculatedFieldDebugDialogComponent, string> implements AfterViewInit {

9
ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.ts

@ -56,10 +56,11 @@ export interface CalculatedFieldDialogData {
} }
@Component({ @Component({
selector: 'tb-calculated-field-dialog', selector: 'tb-calculated-field-dialog',
templateUrl: './calculated-field-dialog.component.html', templateUrl: './calculated-field-dialog.component.html',
styleUrls: ['./calculated-field-dialog.component.scss'], styleUrls: ['./calculated-field-dialog.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None,
standalone: false
}) })
export class CalculatedFieldDialogComponent extends DialogComponent<CalculatedFieldDialogComponent, CalculatedField> { export class CalculatedFieldDialogComponent extends DialogComponent<CalculatedFieldDialogComponent, CalculatedField> {

7
ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.ts

@ -45,9 +45,10 @@ import { EntityAutocompleteComponent } from '@shared/components/entity/entity-au
import { NULL_UUID } from '@shared/models/id/has-uuid'; import { NULL_UUID } from '@shared/models/id/has-uuid';
@Component({ @Component({
selector: 'tb-calculated-field-argument-panel', selector: 'tb-calculated-field-argument-panel',
templateUrl: './calculated-field-argument-panel.component.html', templateUrl: './calculated-field-argument-panel.component.html',
styleUrls: ['./calculated-field-argument-panel.component.scss'] styleUrls: ['./calculated-field-argument-panel.component.scss'],
standalone: false
}) })
export class CalculatedFieldArgumentPanelComponent implements OnInit, AfterViewInit { export class CalculatedFieldArgumentPanelComponent implements OnInit, AfterViewInit {

31
ui-ngx/src/app/modules/home/components/calculated-fields/components/test-arguments/calculated-field-test-arguments.component.ts

@ -44,21 +44,22 @@ import { filter } from 'rxjs/operators';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
@Component({ @Component({
selector: 'tb-calculated-field-test-arguments', selector: 'tb-calculated-field-test-arguments',
templateUrl: './calculated-field-test-arguments.component.html', templateUrl: './calculated-field-test-arguments.component.html',
styleUrls: ['./calculated-field-test-arguments.component.scss'], styleUrls: ['./calculated-field-test-arguments.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => CalculatedFieldTestArgumentsComponent), useExisting: forwardRef(() => CalculatedFieldTestArgumentsComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => CalculatedFieldTestArgumentsComponent), useExisting: forwardRef(() => CalculatedFieldTestArgumentsComponent),
multi: true, multi: true,
} }
] ],
standalone: false
}) })
export class CalculatedFieldTestArgumentsComponent extends PageComponent implements ControlValueAccessor, Validator { export class CalculatedFieldTestArgumentsComponent extends PageComponent implements ControlValueAccessor, Validator {

9
ui-ngx/src/app/modules/home/components/calculated-fields/components/test-dialog/calculated-field-script-test-dialog.component.ts

@ -55,10 +55,11 @@ export interface CalculatedFieldTestScriptDialogData extends CalculatedFieldTest
} }
@Component({ @Component({
selector: 'tb-calculated-field-script-test-dialog', selector: 'tb-calculated-field-script-test-dialog',
templateUrl: './calculated-field-script-test-dialog.component.html', templateUrl: './calculated-field-script-test-dialog.component.html',
styleUrls: ['./calculated-field-script-test-dialog.component.scss'], styleUrls: ['./calculated-field-script-test-dialog.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None,
standalone: false
}) })
export class CalculatedFieldScriptTestDialogComponent extends DialogComponent<CalculatedFieldScriptTestDialogComponent, export class CalculatedFieldScriptTestDialogComponent extends DialogComponent<CalculatedFieldScriptTestDialogComponent,
string> implements AfterViewInit, OnDestroy { string> implements AfterViewInit, OnDestroy {

11
ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.ts

@ -42,11 +42,12 @@ export interface AddWidgetDialogData {
} }
@Component({ @Component({
selector: 'tb-add-widget-dialog', selector: 'tb-add-widget-dialog',
templateUrl: './add-widget-dialog.component.html', templateUrl: './add-widget-dialog.component.html',
providers: [/*{provide: ErrorStateMatcher, useExisting: AddWidgetDialogComponent}*/], providers: [ /*{provide: ErrorStateMatcher, useExisting: AddWidgetDialogComponent}*/],
styleUrls: ['./add-widget-dialog.component.scss'], styleUrls: ['./add-widget-dialog.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None,
standalone: false
}) })
export class AddWidgetDialogComponent extends DialogComponent<AddWidgetDialogComponent, Widget> export class AddWidgetDialogComponent extends DialogComponent<AddWidgetDialogComponent, Widget>
implements OnInit, ErrorStateMatcher { implements OnInit, ErrorStateMatcher {

7
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-image-dialog.component.ts

@ -41,9 +41,10 @@ export interface DashboardImageDialogResult {
} }
@Component({ @Component({
selector: 'tb-dashboard-image-dialog', selector: 'tb-dashboard-image-dialog',
templateUrl: './dashboard-image-dialog.component.html', templateUrl: './dashboard-image-dialog.component.html',
styleUrls: ['./dashboard-image-dialog.component.scss'] styleUrls: ['./dashboard-image-dialog.component.scss'],
standalone: false
}) })
export class DashboardImageDialogComponent extends DialogComponent<DashboardImageDialogComponent, DashboardImageDialogResult> { export class DashboardImageDialogComponent extends DialogComponent<DashboardImageDialogComponent, DashboardImageDialogResult> {

20
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts

@ -33,7 +33,8 @@ import {
StaticProvider, StaticProvider,
ViewChild, ViewChild,
ViewContainerRef, ViewContainerRef,
ViewEncapsulation ViewEncapsulation,
DOCUMENT
} from '@angular/core'; } from '@angular/core';
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
@ -143,9 +144,9 @@ import {
} from '@home/components/dashboard-page/dashboard-image-dialog.component'; } from '@home/components/dashboard-page/dashboard-image-dialog.component';
import { SafeUrl } from '@angular/platform-browser'; import { SafeUrl } from '@angular/platform-browser';
import cssjs from '@core/css/css'; import cssjs from '@core/css/css';
import { DOCUMENT } from '@angular/common';
import { IAliasController } from '@core/api/widget-api.models'; import { IAliasController } from '@core/api/widget-api.models';
import { MatButton } from '@angular/material/button'; import { MatButton, MatIconButton } from '@angular/material/button';
import { VersionControlComponent } from '@home/components/vc/version-control.component'; import { VersionControlComponent } from '@home/components/vc/version-control.component';
import { TbPopoverService } from '@shared/components/popover.service'; import { TbPopoverService } from '@shared/components/popover.service';
import { catchError, distinctUntilChanged, map, skip, tap } from 'rxjs/operators'; import { catchError, distinctUntilChanged, map, skip, tap } from 'rxjs/operators';
@ -160,11 +161,12 @@ import { HttpStatusCode } from '@angular/common/http';
// @dynamic // @dynamic
@Component({ @Component({
selector: 'tb-dashboard-page', selector: 'tb-dashboard-page',
templateUrl: './dashboard-page.component.html', templateUrl: './dashboard-page.component.html',
styleUrls: ['./dashboard-page.component.scss'], styleUrls: ['./dashboard-page.component.scss'],
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
}) })
export class DashboardPageComponent extends PageComponent implements IDashboardController, HasDirtyFlag, OnInit, AfterViewInit, OnDestroy { export class DashboardPageComponent extends PageComponent implements IDashboardController, HasDirtyFlag, OnInit, AfterViewInit, OnDestroy {
@ -1752,7 +1754,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
}); });
} }
toggleVersionControl($event: Event, versionControlButton: MatButton) { toggleVersionControl($event: Event, versionControlButton: MatButton | MatIconButton) {
if ($event) { if ($event) {
$event.stopPropagation(); $event.stopPropagation();
} }

3
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts

@ -28,7 +28,6 @@ import { IAliasController, IStateController } from '@core/api/widget-api.models'
import { ILayoutController } from './layout/layout.models'; import { ILayoutController } from './layout/layout.models';
import { DashboardContextMenuItem, WidgetContextMenuItem } from '@home/models/dashboard-component.models'; import { DashboardContextMenuItem, WidgetContextMenuItem } from '@home/models/dashboard-component.models';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { displayGrids } from 'angular-gridster2/lib/gridsterConfig.interface';
import { ElementRef } from '@angular/core'; import { ElementRef } from '@angular/core';
export declare type DashboardPageScope = 'tenant' | 'customer'; export declare type DashboardPageScope = 'tenant' | 'customer';
@ -87,7 +86,7 @@ export interface DashboardPageLayoutContext {
ctrl: ILayoutController; ctrl: ILayoutController;
dashboardCtrl: IDashboardController; dashboardCtrl: IDashboardController;
ignoreLoading: boolean; ignoreLoading: boolean;
displayGrid: displayGrids; displayGrid: 'always' | 'onDrag&Resize' | 'none';
} }
export interface DashboardPageLayout { export interface DashboardPageLayout {

9
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.ts

@ -47,10 +47,11 @@ export interface DashboardSettingsDialogData {
} }
@Component({ @Component({
selector: 'tb-dashboard-settings-dialog', selector: 'tb-dashboard-settings-dialog',
templateUrl: './dashboard-settings-dialog.component.html', templateUrl: './dashboard-settings-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: DashboardSettingsDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: DashboardSettingsDialogComponent }],
styleUrls: ['./dashboard-settings-dialog.component.scss'] styleUrls: ['./dashboard-settings-dialog.component.scss'],
standalone: false
}) })
export class DashboardSettingsDialogComponent extends DialogComponent<DashboardSettingsDialogComponent, DashboardSettingsDialogData> export class DashboardSettingsDialogComponent extends DialogComponent<DashboardSettingsDialogComponent, DashboardSettingsDialogData>
implements OnDestroy, ErrorStateMatcher { implements OnDestroy, ErrorStateMatcher {

7
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-state.component.ts

@ -27,9 +27,10 @@ import { EntityId } from '@shared/models/id/entity-id';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
@Component({ @Component({
selector: 'tb-dashboard-state', selector: 'tb-dashboard-state',
templateUrl: './dashboard-state.component.html', templateUrl: './dashboard-state.component.html',
styleUrls: ['./dashboard-state.component.scss'] styleUrls: ['./dashboard-state.component.scss'],
standalone: false
}) })
export class DashboardStateComponent extends PageComponent implements OnInit, OnDestroy { export class DashboardStateComponent extends PageComponent implements OnInit, OnDestroy {

9
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.ts

@ -17,10 +17,11 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
@Component({ @Component({
selector: 'tb-dashboard-toolbar', selector: 'tb-dashboard-toolbar',
templateUrl: './dashboard-toolbar.component.html', templateUrl: './dashboard-toolbar.component.html',
styleUrls: ['./dashboard-toolbar.component.scss'], styleUrls: ['./dashboard-toolbar.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None,
standalone: false
}) })
export class DashboardToolbarComponent implements OnInit { export class DashboardToolbarComponent implements OnInit {

9
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-widget-select.component.ts

@ -48,10 +48,11 @@ interface BundleWidgetsFilter extends WidgetsFilter {
} }
@Component({ @Component({
selector: 'tb-dashboard-widget-select', selector: 'tb-dashboard-widget-select',
templateUrl: './dashboard-widget-select.component.html', templateUrl: './dashboard-widget-select.component.html',
styleUrls: ['./dashboard-widget-select.component.scss'], styleUrls: ['./dashboard-widget-select.component.scss'],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None,
standalone: false
}) })
export class DashboardWidgetSelectComponent implements OnInit { export class DashboardWidgetSelectComponent implements OnInit {

7
ui-ngx/src/app/modules/home/components/dashboard-page/edit-widget.component.ts

@ -31,9 +31,10 @@ import { DataKeySettingsFunction } from '@home/components/widget/lib/settings/co
import { coerceBoolean } from '@shared/decorators/coercion'; import { coerceBoolean } from '@shared/decorators/coercion';
@Component({ @Component({
selector: 'tb-edit-widget', selector: 'tb-edit-widget',
templateUrl: './edit-widget.component.html', templateUrl: './edit-widget.component.html',
styleUrls: ['./edit-widget.component.scss'] styleUrls: ['./edit-widget.component.scss'],
standalone: false
}) })
export class EditWidgetComponent extends PageComponent implements OnInit, OnChanges { export class EditWidgetComponent extends PageComponent implements OnInit, OnChanges {

4
ui-ngx/src/app/modules/home/components/dashboard-page/layout/add-new-breakpoint-dialog.component.html

@ -29,7 +29,7 @@
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<mat-label translate>layout.breakpoint</mat-label> <mat-label translate>layout.breakpoint</mat-label>
<mat-select formControlName="newBreakpointId" [hideSingleSelectionIndicator]="false"> <mat-select formControlName="newBreakpointId" [hideSingleSelectionIndicator]="false">
<mat-select-trigger>{{ getName(this.addBreakpointFormGroup.get('newBreakpointId').value) }}</mat-select-trigger> <mat-select-trigger>{{ getName(addBreakpointFormGroup.get('newBreakpointId').value) }}</mat-select-trigger>
<mat-option *ngFor="let breakpoint of allowBreakpointIds" [value]="breakpoint" style="min-height:56px;"> <mat-option *ngFor="let breakpoint of allowBreakpointIds" [value]="breakpoint" style="min-height:56px;">
<mat-icon><tb-icon>{{ getIcon(breakpoint) }}</tb-icon></mat-icon> <mat-icon><tb-icon>{{ getIcon(breakpoint) }}</tb-icon></mat-icon>
<div>{{ getName(breakpoint) }}</div> <div>{{ getName(breakpoint) }}</div>
@ -40,7 +40,7 @@
<mat-form-field appearance="outline" subscriptSizing="dynamic"> <mat-form-field appearance="outline" subscriptSizing="dynamic">
<mat-label translate>layout.copy-from</mat-label> <mat-label translate>layout.copy-from</mat-label>
<mat-select formControlName="copyFrom" [hideSingleSelectionIndicator]="false"> <mat-select formControlName="copyFrom" [hideSingleSelectionIndicator]="false">
<mat-select-trigger>{{ getName(this.addBreakpointFormGroup.get('copyFrom').value) }}</mat-select-trigger> <mat-select-trigger>{{ getName(addBreakpointFormGroup.get('copyFrom').value) }}</mat-select-trigger>
<mat-option *ngFor="let breakpoint of selectedBreakpointIds" [value]="breakpoint" style="min-height:56px;"> <mat-option *ngFor="let breakpoint of selectedBreakpointIds" [value]="breakpoint" style="min-height:56px;">
<mat-icon><tb-icon>{{ getIcon(breakpoint) }}</tb-icon></mat-icon> <mat-icon><tb-icon>{{ getIcon(breakpoint) }}</tb-icon></mat-icon>
<div>{{ getName(breakpoint) }}</div> <div>{{ getName(breakpoint) }}</div>

5
ui-ngx/src/app/modules/home/components/dashboard-page/layout/add-new-breakpoint-dialog.component.ts

@ -35,8 +35,9 @@ export interface AddNewBreakpointDialogResult {
} }
@Component({ @Component({
selector: 'add-new-breakpoint-dialog', selector: 'add-new-breakpoint-dialog',
templateUrl: './add-new-breakpoint-dialog.component.html', templateUrl: './add-new-breakpoint-dialog.component.html',
standalone: false
}) })
export class AddNewBreakpointDialogComponent extends DialogComponent<AddNewBreakpointDialogComponent, AddNewBreakpointDialogResult> { export class AddNewBreakpointDialogComponent extends DialogComponent<AddNewBreakpointDialogComponent, AddNewBreakpointDialogResult> {

10
ui-ngx/src/app/modules/home/components/dashboard-page/layout/dashboard-layout.component.ts

@ -36,15 +36,15 @@ import { TbCheatSheetComponent } from '@shared/components/cheatsheet.component';
import { TbPopoverComponent } from '@shared/components/popover.component'; import { TbPopoverComponent } from '@shared/components/popover.component';
import { ImagePipe } from '@shared/pipe/image.pipe'; import { ImagePipe } from '@shared/pipe/image.pipe';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { displayGrids } from 'angular-gridster2/lib/gridsterConfig.interface';
import { BreakpointId, LayoutType, ViewFormatType } from '@shared/models/dashboard.models'; import { BreakpointId, LayoutType, ViewFormatType } from '@shared/models/dashboard.models';
import { isNotEmptyStr } from '@core/utils'; import { isNotEmptyStr } from '@core/utils';
import { TbContextMenuEvent } from '@shared/models/jquery-event.models'; import { TbContextMenuEvent } from '@shared/models/jquery-event.models';
@Component({ @Component({
selector: 'tb-dashboard-layout', selector: 'tb-dashboard-layout',
templateUrl: './dashboard-layout.component.html', templateUrl: './dashboard-layout.component.html',
styleUrls: ['./dashboard-layout.component.scss'] styleUrls: ['./dashboard-layout.component.scss'],
standalone: false
}) })
export class DashboardLayoutComponent extends PageComponent implements ILayoutController, DashboardCallbacks, OnInit, OnDestroy { export class DashboardLayoutComponent extends PageComponent implements ILayoutController, DashboardCallbacks, OnInit, OnDestroy {
@ -114,7 +114,7 @@ export class DashboardLayoutComponent extends PageComponent implements ILayoutCo
return this.layoutCtx.gridSettings.minColumns || this.layoutCtx.gridSettings.columns || 24; return this.layoutCtx.gridSettings.minColumns || this.layoutCtx.gridSettings.columns || 24;
} }
get displayGrid(): displayGrids { get displayGrid(): 'always' | 'onDrag&Resize' | 'none' {
return this.layoutCtx.displayGrid || 'onDrag&Resize'; return this.layoutCtx.displayGrid || 'onDrag&Resize';
} }

9
ui-ngx/src/app/modules/home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component.ts

@ -75,10 +75,11 @@ export interface DashboardLayoutSettings {
} }
@Component({ @Component({
selector: 'tb-manage-dashboard-layouts-dialog', selector: 'tb-manage-dashboard-layouts-dialog',
templateUrl: './manage-dashboard-layouts-dialog.component.html', templateUrl: './manage-dashboard-layouts-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: ManageDashboardLayoutsDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: ManageDashboardLayoutsDialogComponent }],
styleUrls: ['./manage-dashboard-layouts-dialog.component.scss', '../../../components/dashboard/layout-button.scss'] styleUrls: ['./manage-dashboard-layouts-dialog.component.scss', '../../../components/dashboard/layout-button.scss'],
standalone: false
}) })
export class ManageDashboardLayoutsDialogComponent extends DialogComponent<ManageDashboardLayoutsDialogComponent, DashboardStateLayouts> export class ManageDashboardLayoutsDialogComponent extends DialogComponent<ManageDashboardLayoutsDialogComponent, DashboardStateLayouts>
implements ErrorStateMatcher, OnDestroy { implements ErrorStateMatcher, OnDestroy {

9
ui-ngx/src/app/modules/home/components/dashboard-page/layout/move-widgets-dialog.component.ts

@ -28,10 +28,11 @@ export interface MoveWidgetsDialogResult {
} }
@Component({ @Component({
selector: 'tb-move-widgets-dialog', selector: 'tb-move-widgets-dialog',
templateUrl: './move-widgets-dialog.component.html', templateUrl: './move-widgets-dialog.component.html',
providers: [], providers: [],
styleUrls: [] styleUrls: [],
standalone: false
}) })
export class MoveWidgetsDialogComponent extends DialogComponent<MoveWidgetsDialogComponent, MoveWidgetsDialogResult> { export class MoveWidgetsDialogComponent extends DialogComponent<MoveWidgetsDialogComponent, MoveWidgetsDialogResult> {

7
ui-ngx/src/app/modules/home/components/dashboard-page/layout/select-dashboard-breakpoint.component.ts

@ -21,9 +21,10 @@ import { BreakpointId } from '@shared/models/dashboard.models';
import { DashboardUtilsService } from '@core/services/dashboard-utils.service'; import { DashboardUtilsService } from '@core/services/dashboard-utils.service';
@Component({ @Component({
selector: 'tb-select-dashboard-breakpoint', selector: 'tb-select-dashboard-breakpoint',
templateUrl: './select-dashboard-breakpoint.component.html', templateUrl: './select-dashboard-breakpoint.component.html',
styleUrls: ['./select-dashboard-breakpoint.component.scss'] styleUrls: ['./select-dashboard-breakpoint.component.scss'],
standalone: false
}) })
export class SelectDashboardBreakpointComponent implements OnInit, OnDestroy { export class SelectDashboardBreakpointComponent implements OnInit, OnDestroy {

9
ui-ngx/src/app/modules/home/components/dashboard-page/states/dashboard-state-dialog.component.ts

@ -43,10 +43,11 @@ export interface DashboardStateDialogData {
} }
@Component({ @Component({
selector: 'tb-dashboard-state-dialog', selector: 'tb-dashboard-state-dialog',
templateUrl: './dashboard-state-dialog.component.html', templateUrl: './dashboard-state-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: DashboardStateDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: DashboardStateDialogComponent }],
styleUrls: [] styleUrls: [],
standalone: false
}) })
export class DashboardStateDialogComponent extends export class DashboardStateDialogComponent extends
DialogComponent<DashboardStateDialogComponent, DashboardStateInfo> DialogComponent<DashboardStateDialogComponent, DashboardStateInfo>

7
ui-ngx/src/app/modules/home/components/dashboard-page/states/default-state-controller.component.ts

@ -29,9 +29,10 @@ import { EntityService } from '@core/http/entity.service';
import { MobileService } from '@core/services/mobile.service'; import { MobileService } from '@core/services/mobile.service';
@Component({ @Component({
selector: 'tb-default-state-controller', selector: 'tb-default-state-controller',
templateUrl: './default-state-controller.component.html', templateUrl: './default-state-controller.component.html',
styleUrls: ['./default-state-controller.component.scss'] styleUrls: ['./default-state-controller.component.scss'],
standalone: false
}) })
export class DefaultStateControllerComponent extends StateControllerComponent implements OnInit, OnDestroy { export class DefaultStateControllerComponent extends StateControllerComponent implements OnInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/dashboard-page/states/entity-state-controller.component.ts

@ -31,9 +31,10 @@ import { map, tap } from 'rxjs/operators';
import { MobileService } from '@core/services/mobile.service'; import { MobileService } from '@core/services/mobile.service';
@Component({ @Component({
selector: 'tb-entity-state-controller', selector: 'tb-entity-state-controller',
templateUrl: './entity-state-controller.component.html', templateUrl: './entity-state-controller.component.html',
styleUrls: ['./entity-state-controller.component.scss'] styleUrls: ['./entity-state-controller.component.scss'],
standalone: false
}) })
export class EntityStateControllerComponent extends StateControllerComponent implements OnInit, OnDestroy { export class EntityStateControllerComponent extends StateControllerComponent implements OnInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/dashboard-page/states/manage-dashboard-states-dialog.component.ts

@ -53,9 +53,10 @@ export interface ManageDashboardStatesDialogResult {
} }
@Component({ @Component({
selector: 'tb-manage-dashboard-states-dialog', selector: 'tb-manage-dashboard-states-dialog',
templateUrl: './manage-dashboard-states-dialog.component.html', templateUrl: './manage-dashboard-states-dialog.component.html',
styleUrls: ['./manage-dashboard-states-dialog.component.scss'] styleUrls: ['./manage-dashboard-states-dialog.component.scss'],
standalone: false
}) })
export class ManageDashboardStatesDialogComponent export class ManageDashboardStatesDialogComponent
extends DialogComponent<ManageDashboardStatesDialogComponent, ManageDashboardStatesDialogResult> extends DialogComponent<ManageDashboardStatesDialogComponent, ManageDashboardStatesDialogResult>

5
ui-ngx/src/app/modules/home/components/dashboard-page/states/states-component.directive.ts

@ -31,8 +31,9 @@ import { IStateControllerComponent } from '@home/components/dashboard-page/state
import { BehaviorSubject, Subject } from 'rxjs'; import { BehaviorSubject, Subject } from 'rxjs';
@Directive({ @Directive({
// eslint-disable-next-line @angular-eslint/directive-selector // eslint-disable-next-line @angular-eslint/directive-selector
selector: 'tb-states-component' selector: 'tb-states-component',
standalone: false
}) })
export class StatesComponentDirective implements OnInit, OnDestroy, OnChanges { export class StatesComponentDirective implements OnInit, OnDestroy, OnChanges {

7
ui-ngx/src/app/modules/home/components/dashboard-page/widget-types-panel.component.ts

@ -30,9 +30,10 @@ export interface DisplayWidgetTypesPanelData {
} }
@Component({ @Component({
selector: 'tb-widget-types-panel', selector: 'tb-widget-types-panel',
templateUrl: './widget-types-panel.component.html', templateUrl: './widget-types-panel.component.html',
styleUrls: ['./widget-types-panel.component.scss'] styleUrls: ['./widget-types-panel.component.scss'],
standalone: false
}) })
export class DisplayWidgetTypesPanelComponent { export class DisplayWidgetTypesPanelComponent {

7
ui-ngx/src/app/modules/home/components/dashboard-view/dashboard-view.component.ts

@ -22,9 +22,10 @@ import { Dashboard } from '@shared/models/dashboard.models';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
@Component({ @Component({
selector: 'tb-dashboard-view', selector: 'tb-dashboard-view',
templateUrl: './dashboard-view.component.html', templateUrl: './dashboard-view.component.html',
styleUrls: ['./dashboard-view.component.scss'] styleUrls: ['./dashboard-view.component.scss'],
standalone: false
}) })
export class DashboardViewComponent extends PageComponent { export class DashboardViewComponent extends PageComponent {

12
ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.ts

@ -58,15 +58,15 @@ import { distinct, take } from 'rxjs/operators';
import { UtilsService } from '@core/services/utils.service'; import { UtilsService } from '@core/services/utils.service';
import { WidgetComponentAction, WidgetComponentActionType } from '@home/components/widget/widget-container.component'; import { WidgetComponentAction, WidgetComponentActionType } from '@home/components/widget/widget-container.component';
import { TbPopoverComponent } from '@shared/components/popover.component'; import { TbPopoverComponent } from '@shared/components/popover.component';
import { displayGrids } from 'angular-gridster2/lib/gridsterConfig.interface';
import { coerceBoolean } from '@shared/decorators/coercion'; import { coerceBoolean } from '@shared/decorators/coercion';
import { TbContextMenuEvent } from '@shared/models/jquery-event.models'; import { TbContextMenuEvent } from '@shared/models/jquery-event.models';
@Component({ @Component({
selector: 'tb-dashboard', selector: 'tb-dashboard',
templateUrl: './dashboard.component.html', templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss'], styleUrls: ['./dashboard.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
}) })
export class DashboardComponent extends PageComponent implements IDashboardComponent, DoCheck, OnInit, OnDestroy, AfterViewInit, OnChanges { export class DashboardComponent extends PageComponent implements IDashboardComponent, DoCheck, OnInit, OnDestroy, AfterViewInit, OnChanges {
@ -101,7 +101,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
outerMargin: boolean; outerMargin: boolean;
@Input() @Input()
displayGrid: displayGrids = 'onDrag&Resize'; displayGrid: 'always' | 'onDrag&Resize' | 'none' = 'onDrag&Resize';
@Input() @Input()
gridType: GridType; gridType: GridType;

7
ui-ngx/src/app/modules/home/components/dashboard/select-target-layout-dialog.component.ts

@ -23,9 +23,10 @@ import { DialogComponent } from '@app/shared/components/dialog.component';
import { DashboardLayoutId } from '@app/shared/models/dashboard.models'; import { DashboardLayoutId } from '@app/shared/models/dashboard.models';
@Component({ @Component({
selector: 'tb-select-target-layout-dialog', selector: 'tb-select-target-layout-dialog',
templateUrl: './select-target-layout-dialog.component.html', templateUrl: './select-target-layout-dialog.component.html',
styleUrls: ['./layout-button.scss'] styleUrls: ['./layout-button.scss'],
standalone: false
}) })
export class SelectTargetLayoutDialogComponent extends DialogComponent<SelectTargetLayoutDialogComponent, DashboardLayoutId> export class SelectTargetLayoutDialogComponent extends DialogComponent<SelectTargetLayoutDialogComponent, DashboardLayoutId>
implements OnInit { implements OnInit {

9
ui-ngx/src/app/modules/home/components/dashboard/select-target-state-dialog.component.ts

@ -30,10 +30,11 @@ export interface SelectTargetStateDialogData {
} }
@Component({ @Component({
selector: 'tb-select-target-state-dialog', selector: 'tb-select-target-state-dialog',
templateUrl: './select-target-state-dialog.component.html', templateUrl: './select-target-state-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: SelectTargetStateDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: SelectTargetStateDialogComponent }],
styleUrls: [] styleUrls: [],
standalone: false
}) })
export class SelectTargetStateDialogComponent extends export class SelectTargetStateDialogComponent extends
DialogComponent<SelectTargetStateDialogComponent, string> DialogComponent<SelectTargetStateDialogComponent, string>

7
ui-ngx/src/app/modules/home/components/details-panel.component.ts

@ -31,9 +31,10 @@ import { Subscription } from 'rxjs';
import { coerceBoolean } from '@shared/decorators/coercion'; import { coerceBoolean } from '@shared/decorators/coercion';
@Component({ @Component({
selector: 'tb-details-panel', selector: 'tb-details-panel',
templateUrl: './details-panel.component.html', templateUrl: './details-panel.component.html',
styleUrls: ['./details-panel.component.scss'] styleUrls: ['./details-panel.component.scss'],
standalone: false
}) })
export class DetailsPanelComponent extends PageComponent implements OnDestroy { export class DetailsPanelComponent extends PageComponent implements OnDestroy {

7
ui-ngx/src/app/modules/home/components/device/copy-device-credentials.component.ts

@ -28,9 +28,10 @@ import { AppState } from '@core/core.state';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
@Component({ @Component({
selector: 'tb-copy-device-credentials', selector: 'tb-copy-device-credentials',
templateUrl: './copy-device-credentials.component.html', templateUrl: './copy-device-credentials.component.html',
styleUrls: [] styleUrls: [],
standalone: false
}) })
export class CopyDeviceCredentialsComponent implements OnInit, OnDestroy { export class CopyDeviceCredentialsComponent implements OnInit, OnDestroy {

31
ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m-server.component.ts

@ -36,21 +36,22 @@ import { takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
@Component({ @Component({
selector: 'tb-device-credentials-lwm2m-server', selector: 'tb-device-credentials-lwm2m-server',
templateUrl: './device-credentials-lwm2m-server.component.html', templateUrl: './device-credentials-lwm2m-server.component.html',
styleUrls: [], styleUrls: [],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DeviceCredentialsLwm2mServerComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mServerComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => DeviceCredentialsLwm2mServerComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mServerComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class DeviceCredentialsLwm2mServerComponent implements OnDestroy, ControlValueAccessor, Validator { export class DeviceCredentialsLwm2mServerComponent implements OnDestroy, ControlValueAccessor, Validator {

31
ui-ngx/src/app/modules/home/components/device/device-credentials-lwm2m.component.ts

@ -37,21 +37,22 @@ import { takeUntil } from 'rxjs/operators';
import { isDefinedAndNotNull } from '@core/utils'; import { isDefinedAndNotNull } from '@core/utils';
@Component({ @Component({
selector: 'tb-device-credentials-lwm2m', selector: 'tb-device-credentials-lwm2m',
templateUrl: './device-credentials-lwm2m.component.html', templateUrl: './device-credentials-lwm2m.component.html',
styleUrls: ['./device-credentials-lwm2m.component.scss'], styleUrls: ['./device-credentials-lwm2m.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DeviceCredentialsLwm2mComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => DeviceCredentialsLwm2mComponent), useExisting: forwardRef(() => DeviceCredentialsLwm2mComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class DeviceCredentialsLwm2mComponent implements ControlValueAccessor, Validator, OnDestroy { export class DeviceCredentialsLwm2mComponent implements ControlValueAccessor, Validator, OnDestroy {

30
ui-ngx/src/app/modules/home/components/device/device-credentials-mqtt-basic.component.ts

@ -32,20 +32,22 @@ import { takeUntil } from 'rxjs/operators';
import { generateSecret, isDefinedAndNotNull, isEmptyStr } from '@core/utils'; import { generateSecret, isDefinedAndNotNull, isEmptyStr } from '@core/utils';
@Component({ @Component({
selector: 'tb-device-credentials-mqtt-basic', selector: 'tb-device-credentials-mqtt-basic',
templateUrl: './device-credentials-mqtt-basic.component.html', templateUrl: './device-credentials-mqtt-basic.component.html',
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DeviceCredentialsMqttBasicComponent), useExisting: forwardRef(() => DeviceCredentialsMqttBasicComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => DeviceCredentialsMqttBasicComponent), useExisting: forwardRef(() => DeviceCredentialsMqttBasicComponent),
multi: true, multi: true,
}], }
styleUrls: [] ],
styleUrls: [],
standalone: false
}) })
export class DeviceCredentialsMqttBasicComponent implements ControlValueAccessor, Validator, OnDestroy { export class DeviceCredentialsMqttBasicComponent implements ControlValueAccessor, Validator, OnDestroy {

30
ui-ngx/src/app/modules/home/components/device/device-credentials.component.ts

@ -38,20 +38,22 @@ import { generateSecret, isDefinedAndNotNull } from '@core/utils';
import { coerceBoolean } from '@shared/decorators/coercion'; import { coerceBoolean } from '@shared/decorators/coercion';
@Component({ @Component({
selector: 'tb-device-credentials', selector: 'tb-device-credentials',
templateUrl: './device-credentials.component.html', templateUrl: './device-credentials.component.html',
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DeviceCredentialsComponent), useExisting: forwardRef(() => DeviceCredentialsComponent),
multi: true multi: true
}, },
{ {
provide: NG_VALIDATORS, provide: NG_VALIDATORS,
useExisting: forwardRef(() => DeviceCredentialsComponent), useExisting: forwardRef(() => DeviceCredentialsComponent),
multi: true, multi: true,
}], }
styleUrls: ['./device-credentials.component.scss'] ],
styleUrls: ['./device-credentials.component.scss'],
standalone: false
}) })
export class DeviceCredentialsComponent implements ControlValueAccessor, OnInit, Validator, OnDestroy { export class DeviceCredentialsComponent implements ControlValueAccessor, OnInit, Validator, OnDestroy {

21
ui-ngx/src/app/modules/home/components/device/device-info-filter.component.ts

@ -50,16 +50,17 @@ export interface DeviceFilterConfigData {
// @dynamic // @dynamic
@Component({ @Component({
selector: 'tb-device-info-filter', selector: 'tb-device-info-filter',
templateUrl: './device-info-filter.component.html', templateUrl: './device-info-filter.component.html',
styleUrls: ['./device-info-filter.component.scss'], styleUrls: ['./device-info-filter.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DeviceInfoFilterComponent), useExisting: forwardRef(() => DeviceInfoFilterComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class DeviceInfoFilterComponent implements OnInit, OnDestroy, ControlValueAccessor { export class DeviceInfoFilterComponent implements OnInit, OnDestroy, ControlValueAccessor {

7
ui-ngx/src/app/modules/home/components/edge/edge-downlink-table-header.component.ts

@ -22,9 +22,10 @@ import { EdgeEvent } from '@shared/models/edge.models';
import { EdgeDownlinkTableConfig } from '@home/components/edge/edge-downlink-table-config'; import { EdgeDownlinkTableConfig } from '@home/components/edge/edge-downlink-table-config';
@Component({ @Component({
selector: 'tb-edge-downlink-table-header', selector: 'tb-edge-downlink-table-header',
templateUrl: './edge-downlink-table-header.component.html', templateUrl: './edge-downlink-table-header.component.html',
styleUrls: ['./edge-downlink-table-header.component.scss'] styleUrls: ['./edge-downlink-table-header.component.scss'],
standalone: false
}) })
export class EdgeDownlinkTableHeaderComponent extends EntityTableHeaderComponent<EdgeEvent> { export class EdgeDownlinkTableHeaderComponent extends EntityTableHeaderComponent<EdgeEvent> {

7
ui-ngx/src/app/modules/home/components/edge/edge-downlink-table.component.ts

@ -29,9 +29,10 @@ import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
@Component({ @Component({
selector: 'tb-edge-downlink-table', selector: 'tb-edge-downlink-table',
templateUrl: './edge-downlink-table.component.html', templateUrl: './edge-downlink-table.component.html',
styleUrls: ['./edge-downlink-table.component.scss'] styleUrls: ['./edge-downlink-table.component.scss'],
standalone: false
}) })
export class EdgeDownlinkTableComponent implements OnInit { export class EdgeDownlinkTableComponent implements OnInit {

9
ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.ts

@ -31,10 +31,11 @@ import { DialogComponent } from '@shared/components/dialog.component';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({ @Component({
selector: 'tb-add-entity-dialog', selector: 'tb-add-entity-dialog',
templateUrl: './add-entity-dialog.component.html', templateUrl: './add-entity-dialog.component.html',
providers: [{provide: ErrorStateMatcher, useExisting: AddEntityDialogComponent}], providers: [{ provide: ErrorStateMatcher, useExisting: AddEntityDialogComponent }],
styleUrls: ['./add-entity-dialog.component.scss'] styleUrls: ['./add-entity-dialog.component.scss'],
standalone: false
}) })
export class AddEntityDialogComponent extends export class AddEntityDialogComponent extends
DialogComponent<AddEntityDialogComponent, BaseData<HasId>> implements OnInit, ErrorStateMatcher { DialogComponent<AddEntityDialogComponent, BaseData<HasId>> implements OnInit, ErrorStateMatcher {

33
ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-button.component.ts

@ -39,23 +39,22 @@ import { AdditionalDebugActionConfig } from '@home/components/entity/debug/entit
import { EntityType } from '@shared/models/entity-type.models'; import { EntityType } from '@shared/models/entity-type.models';
@Component({ @Component({
selector: 'tb-entity-debug-settings-button', selector: 'tb-entity-debug-settings-button',
templateUrl: './entity-debug-settings-button.component.html', templateUrl: './entity-debug-settings-button.component.html',
standalone: true, imports: [
imports: [ CommonModule,
CommonModule, SharedModule,
SharedModule, DurationLeftPipe,
DurationLeftPipe, ],
], providers: [
providers: [ {
{ provide: NG_VALUE_ACCESSOR,
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EntityDebugSettingsButtonComponent),
useExisting: forwardRef(() => EntityDebugSettingsButtonComponent), multi: true
multi: true },
}, EntityDebugSettingsService
EntityDebugSettingsService ],
], changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class EntityDebugSettingsButtonComponent implements ControlValueAccessor { export class EntityDebugSettingsButtonComponent implements ControlValueAccessor {

17
ui-ngx/src/app/modules/home/components/entity/debug/entity-debug-settings-panel.component.ts

@ -39,15 +39,14 @@ import { EntityType, entityTypeTranslations } from '@shared/models/entity-type.m
import { getCurrentAuthState } from '@core/auth/auth.selectors'; import { getCurrentAuthState } from '@core/auth/auth.selectors';
@Component({ @Component({
selector: 'tb-entity-debug-settings-panel', selector: 'tb-entity-debug-settings-panel',
templateUrl: './entity-debug-settings-panel.component.html', templateUrl: './entity-debug-settings-panel.component.html',
standalone: true, imports: [
imports: [ SharedModule,
SharedModule, CommonModule,
CommonModule, DurationLeftPipe
DurationLeftPipe ],
], changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class EntityDebugSettingsPanelComponent extends PageComponent implements OnInit { export class EntityDebugSettingsPanelComponent extends PageComponent implements OnInit {

9
ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts

@ -71,10 +71,11 @@ import { EntityDetailsPanelComponent } from '@home/components/entity/entity-deta
import { FormBuilder } from '@angular/forms'; import { FormBuilder } from '@angular/forms';
@Component({ @Component({
selector: 'tb-entities-table', selector: 'tb-entities-table',
templateUrl: './entities-table.component.html', templateUrl: './entities-table.component.html',
styleUrls: ['./entities-table.component.scss'], styleUrls: ['./entities-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
}) })
export class EntitiesTableComponent extends PageComponent implements IEntitiesTableComponent, AfterViewInit, OnInit, OnChanges, OnDestroy { export class EntitiesTableComponent extends PageComponent implements IEntitiesTableComponent, AfterViewInit, OnInit, OnChanges, OnDestroy {

7
ui-ngx/src/app/modules/home/components/entity/entity-chips.component.ts

@ -21,9 +21,10 @@ import { baseDetailsPageByEntityType, EntityType } from '@app/shared/public-api'
import { isEqual, isNotEmptyStr, isObject } from '@core/utils'; import { isEqual, isNotEmptyStr, isObject } from '@core/utils';
@Component({ @Component({
selector: 'tb-entity-chips', selector: 'tb-entity-chips',
templateUrl: './entity-chips.component.html', templateUrl: './entity-chips.component.html',
styleUrls: ['./entity-chips.component.scss'] styleUrls: ['./entity-chips.component.scss'],
standalone: false
}) })
export class EntityChipsComponent implements OnChanges { export class EntityChipsComponent implements OnChanges {

9
ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.ts

@ -37,10 +37,11 @@ import { DialogService } from '@core/services/dialog.service';
import { IEntityDetailsPageComponent } from '@home/models/entity/entity-details-page-component.models'; import { IEntityDetailsPageComponent } from '@home/models/entity/entity-details-page-component.models';
@Component({ @Component({
selector: 'tb-entity-details-page', selector: 'tb-entity-details-page',
templateUrl: './entity-details-page.component.html', templateUrl: './entity-details-page.component.html',
styleUrls: ['./entity-details-page.component.scss'], styleUrls: ['./entity-details-page.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
}) })
export class EntityDetailsPageComponent extends EntityDetailsPanelComponent implements IEntityDetailsPageComponent, OnInit, OnDestroy { export class EntityDetailsPageComponent extends EntityDetailsPanelComponent implements IEntityDetailsPageComponent, OnInit, OnDestroy {

9
ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts

@ -47,10 +47,11 @@ import { catchError } from 'rxjs/operators';
import { HttpStatusCode } from '@angular/common/http'; import { HttpStatusCode } from '@angular/common/http';
@Component({ @Component({
selector: 'tb-entity-details-panel', selector: 'tb-entity-details-panel',
templateUrl: './entity-details-panel.component.html', templateUrl: './entity-details-panel.component.html',
styleUrls: ['./entity-details-panel.component.scss'], styleUrls: ['./entity-details-panel.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
}) })
export class EntityDetailsPanelComponent extends PageComponent implements AfterViewInit, OnDestroy { export class EntityDetailsPanelComponent extends PageComponent implements AfterViewInit, OnDestroy {

21
ui-ngx/src/app/modules/home/components/entity/entity-filter-view.component.ts

@ -21,16 +21,17 @@ import { AliasEntityType, EntityType, entityTypeTranslations } from '@shared/mod
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
@Component({ @Component({
selector: 'tb-entity-filter-view', selector: 'tb-entity-filter-view',
templateUrl: './entity-filter-view.component.html', templateUrl: './entity-filter-view.component.html',
styleUrls: ['./entity-filter-view.component.scss'], styleUrls: ['./entity-filter-view.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => EntityFilterViewComponent), useExisting: forwardRef(() => EntityFilterViewComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class EntityFilterViewComponent implements ControlValueAccessor { export class EntityFilterViewComponent implements ControlValueAccessor {

21
ui-ngx/src/app/modules/home/components/entity/entity-filter.component.ts

@ -24,16 +24,17 @@ import { Subject, Subscription } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
@Component({ @Component({
selector: 'tb-entity-filter', selector: 'tb-entity-filter',
templateUrl: './entity-filter.component.html', templateUrl: './entity-filter.component.html',
styleUrls: ['./entity-filter.component.scss'], styleUrls: ['./entity-filter.component.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => EntityFilterComponent), useExisting: forwardRef(() => EntityFilterComponent),
multi: true multi: true
} }
] ],
standalone: false
}) })
export class EntityFilterComponent implements ControlValueAccessor, OnInit, OnDestroy { export class EntityFilterComponent implements ControlValueAccessor, OnInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/event/event-content-dialog.component.ts

@ -36,9 +36,10 @@ export interface EventContentDialogData {
} }
@Component({ @Component({
selector: 'tb-event-content-dialog', selector: 'tb-event-content-dialog',
templateUrl: './event-content-dialog.component.html', templateUrl: './event-content-dialog.component.html',
styleUrls: ['./event-content-dialog.component.scss'] styleUrls: ['./event-content-dialog.component.scss'],
standalone: false
}) })
export class EventContentDialogComponent extends DialogComponent<EventContentDialogData> implements OnInit, OnDestroy { export class EventContentDialogComponent extends DialogComponent<EventContentDialogData> implements OnInit, OnDestroy {

7
ui-ngx/src/app/modules/home/components/event/event-filter-panel.component.ts

@ -35,9 +35,10 @@ export interface FilterEntityColumn {
@Component({ @Component({
selector: 'tb-event-filter-panel', selector: 'tb-event-filter-panel',
templateUrl: './event-filter-panel.component.html', templateUrl: './event-filter-panel.component.html',
styleUrls: ['./event-filter-panel.component.scss'] styleUrls: ['./event-filter-panel.component.scss'],
standalone: false
}) })
export class EventFilterPanelComponent { export class EventFilterPanelComponent {

7
ui-ngx/src/app/modules/home/components/event/event-table-header.component.ts

@ -22,9 +22,10 @@ import { DebugEventType, Event, EventType, eventTypeTranslations } from '@app/sh
import { EventTableConfig } from '@home/components/event/event-table-config'; import { EventTableConfig } from '@home/components/event/event-table-config';
@Component({ @Component({
selector: 'tb-event-table-header', selector: 'tb-event-table-header',
templateUrl: './event-table-header.component.html', templateUrl: './event-table-header.component.html',
styleUrls: ['./event-table-header.component.scss'] styleUrls: ['./event-table-header.component.scss'],
standalone: false
}) })
export class EventTableHeaderComponent extends EntityTableHeaderComponent<Event> { export class EventTableHeaderComponent extends EntityTableHeaderComponent<Event> {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save