[APPS-2108] break direct dependency on moment.js (#9032)

* break direct dependency on moment.js

* [ci:force] preserve moment for cli tools

* remove MatMomentDatetimeModule from content

* share dialog fixes

* revert testing module changes

* remove incorrect date modules

* fix html
This commit is contained in:
Denys Vuika
2023-10-26 14:33:26 +01:00
committed by GitHub
parent abf369bc37
commit 7ebdce7875
25 changed files with 82 additions and 160 deletions

View File

@@ -30,7 +30,6 @@ module.exports = function (config) {
watched: false
},
{pattern: 'node_modules/moment/min/moment.min.js', included: true, watched: false},
{pattern: 'lib/insights/src/lib/i18n/**/en.json', included: false, served: true, watched: false},
{pattern: 'lib/insights/**/*.ts', included: false, served: true, watched: false},
{pattern: 'lib/config/app.config.json', included: false, served: true, watched: false},

View File

@@ -19,7 +19,6 @@
"@alfresco/adf-core": ">=6.3.0",
"@ngx-translate/core": ">=14.0.0",
"chart.js": "^4.3.0",
"moment": ">=2.22.2",
"ng2-charts": "^4.1.1",
"raphael": ">=2.3.0"
},

View File

@@ -60,8 +60,8 @@ export class DateRangeWidgetComponent implements OnInit {
constructor(private dateAdapter: DateAdapter<Date>) {}
ngOnInit() {
const momentDateAdapter = this.dateAdapter as AdfDateFnsAdapter;
momentDateAdapter.displayFormat = DISPLAY_FORMAT;
const dateAdapter = this.dateAdapter as AdfDateFnsAdapter;
dateAdapter.displayFormat = DISPLAY_FORMAT;
if (this.field) {
if (this.field.value?.startDate) {