2022-12-17 17:46:08 +01:00
|
|
|
import { NgModule, CUSTOM_ELEMENTS_SCHEMA, ErrorHandler } from '@angular/core';
|
2021-09-30 08:43:49 +01:00
|
|
|
import { BrowserModule, HammerModule } from '@angular/platform-browser';
|
2020-08-05 15:39:16 +01:00
|
|
|
import { RouteReuseStrategy } from '@angular/router';
|
|
|
|
|
|
|
|
|
|
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
2021-02-25 11:50:32 +01:00
|
|
|
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
2020-08-05 15:39:16 +01:00
|
|
|
|
|
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
|
|
|
import { AppComponent } from './app.component';
|
2023-07-11 17:54:08 +01:00
|
|
|
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
2020-08-05 15:39:16 +01:00
|
|
|
|
2020-08-25 14:08:13 +01:00
|
|
|
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
|
|
|
|
2020-12-09 12:10:19 +01:00
|
|
|
import { WebView } from '@ionic-native/ionic-webview/ngx';
|
|
|
|
|
import { FilePath } from '@ionic-native/file-path/ngx';
|
2021-02-09 13:16:41 +01:00
|
|
|
import { Camera } from '@ionic-native/camera/ngx';
|
2020-12-09 12:10:19 +01:00
|
|
|
import { IonicStorageModule } from '@ionic/storage';
|
2021-01-22 16:00:37 +01:00
|
|
|
|
|
|
|
|
import { CommonModule } from '@angular/common';
|
2021-06-24 11:47:05 +01:00
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
2021-01-25 16:18:36 +01:00
|
|
|
|
2021-01-22 16:00:37 +01:00
|
|
|
import { CalendarModule, DateAdapter } from 'angular-calendar';
|
|
|
|
|
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
2021-07-08 10:43:40 +01:00
|
|
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
2021-06-15 11:39:59 +01:00
|
|
|
import { ChatService } from './services/chat.service';
|
2021-06-17 13:58:56 +01:00
|
|
|
import {MatDatepickerModule} from '@angular/material/datepicker';
|
2022-10-12 17:32:13 +01:00
|
|
|
import {MAT_DATE_LOCALE} from '@angular/material/core';
|
2021-08-22 01:24:45 +01:00
|
|
|
import { Network } from '@ionic-native/network/ngx';
|
2022-03-25 09:25:05 +01:00
|
|
|
import { MultipleDocumentsPicker } from '@awesome-cordova-plugins/multiple-document-picker/ngx';
|
2022-04-05 13:22:17 +01:00
|
|
|
import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx';
|
2024-03-01 14:37:42 +01:00
|
|
|
import { FFMpeg } from '@awesome-cordova-plugins/ffmpeg/ngx';
|
2024-05-17 15:27:02 +01:00
|
|
|
import { FFmpeg } from '@ffmpeg/ffmpeg';
|
2021-11-29 15:48:35 +01:00
|
|
|
|
2021-06-24 11:08:17 +01:00
|
|
|
|
2021-04-08 11:27:53 +01:00
|
|
|
|
2021-06-18 12:02:14 +01:00
|
|
|
import {
|
2021-07-28 09:29:14 +01:00
|
|
|
NgxMatDatetimePickerModule,
|
|
|
|
|
NgxMatNativeDateModule,
|
|
|
|
|
NgxMatTimepickerModule
|
2021-06-18 12:02:14 +01:00
|
|
|
} from '@angular-material-components/datetime-picker';
|
2021-06-24 11:08:17 +01:00
|
|
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
|
|
|
import { MatSelectModule } from '@angular/material/select';
|
2021-06-24 11:47:05 +01:00
|
|
|
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
|
|
|
|
import { MatButtonModule } from '@angular/material/button';
|
2021-07-08 11:07:40 +01:00
|
|
|
import { HttpClient } from '@angular/common/http';
|
2020-09-10 09:48:37 +01:00
|
|
|
|
2021-08-04 10:47:22 +01:00
|
|
|
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
|
|
|
|
import { fas } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
|
import { far } from '@fortawesome/free-regular-svg-icons'
|
|
|
|
|
import { fab } from '@fortawesome/free-brands-svg-icons'
|
|
|
|
|
|
2021-08-17 09:53:06 +01:00
|
|
|
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
|
2021-09-21 06:09:41 +01:00
|
|
|
import { SQLite } from '@ionic-native/sqlite/ngx';
|
2021-10-15 15:21:26 +01:00
|
|
|
import { CookieService } from 'ngx-cookie-service';
|
2021-08-25 16:02:40 +01:00
|
|
|
|
2021-11-16 16:00:14 +01:00
|
|
|
import { ImagePicker } from '@ionic-native/image-picker/ngx';
|
2023-10-31 10:09:12 +01:00
|
|
|
import { MediaCapture } from '@awesome-cordova-plugins/media-capture/ngx';
|
2021-11-16 16:00:14 +01:00
|
|
|
import { Media } from '@ionic-native/media/ngx';
|
2022-04-04 01:14:16 +01:00
|
|
|
import { File } from '@awesome-cordova-plugins/file/ngx';
|
2022-03-18 11:45:38 +01:00
|
|
|
|
2021-11-16 16:00:14 +01:00
|
|
|
import { StreamingMedia } from '@ionic-native/streaming-media/ngx';
|
|
|
|
|
import { PhotoViewer } from '@ionic-native/photo-viewer/ngx';
|
2021-11-26 14:46:08 +01:00
|
|
|
import {NgxImageCompressService} from 'ngx-image-compress';
|
2021-11-30 10:23:46 +01:00
|
|
|
import { CustomImageCachePageRoutingModule } from './services/file/custom-image-cache/custom-image-cache-routing.module';
|
2022-01-28 19:02:44 +01:00
|
|
|
import { IonicImageLoaderComponent, IonicImageLoaderModule } from 'ionic-image-loader-v5';
|
2022-04-04 00:37:00 +01:00
|
|
|
import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
|
2022-04-04 01:14:16 +01:00
|
|
|
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
2021-11-18 13:01:53 +01:00
|
|
|
|
2022-12-17 17:46:08 +01:00
|
|
|
|
2023-04-13 12:51:38 +01:00
|
|
|
import { MatInputModule } from '@angular/material/input';
|
|
|
|
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
|
|
|
|
|
|
|
|
|
2022-12-17 17:46:08 +01:00
|
|
|
// The example is using Angular, Import '@sentry/vue' or '@sentry/react' when using a Sibling different than Angular.
|
2023-01-12 15:27:09 +01:00
|
|
|
import * as SentrySibling from '@sentry/angular';
|
|
|
|
|
import * as Sentry from '@sentry/capacitor';
|
2023-01-09 14:42:33 +01:00
|
|
|
// The e xample is using Angular, Import '@sentry/vue' or '@sentry/react' when using a Sibling different than Angular.
|
2022-12-17 17:46:08 +01:00
|
|
|
// For automatic instrumentation (highly recommended)
|
2023-01-12 15:27:09 +01:00
|
|
|
import { Integration } from '@sentry/types';
|
|
|
|
|
import { BrowserTracing } from '@sentry/tracing';
|
2023-06-26 11:12:57 +01:00
|
|
|
import { AngularFireModule } from '@angular/fire';
|
|
|
|
|
import { AngularFireMessagingModule } from '@angular/fire/messaging';
|
|
|
|
|
import { firebaseConfig } from '../firebase-config';
|
2024-02-29 09:40:51 +01:00
|
|
|
import { EditorModule } from '@tinymce/tinymce-angular';;
|
2023-07-14 18:57:07 +01:00
|
|
|
import { CreateProcessPageModule } from './modals/create-process/create-process.module';
|
|
|
|
|
import { CreateProcessPage } from './modals/create-process/create-process.page';
|
2023-07-11 17:54:08 +01:00
|
|
|
import { LoggingInterceptorService } from './services/logging-interceptor.service';
|
2023-09-22 15:17:25 +01:00
|
|
|
import { PopupQuestionPipe } from './modals/popup-question.pipe';
|
2023-10-31 10:09:12 +01:00
|
|
|
import '@teamhive/capacitor-video-recorder';
|
2023-11-29 12:17:52 +01:00
|
|
|
import { tokenInterceptor } from './interceptors/token.interceptors';
|
2024-03-06 15:20:35 +01:00
|
|
|
import { chatTokenInterceptor } from './interceptors/chatToken.interceptor';
|
2022-12-17 17:46:08 +01:00
|
|
|
|
2023-11-10 14:58:33 +01:00
|
|
|
import { InputFilterDirective } from './services/directives/input-filter.directive';
|
2023-12-01 12:16:34 +01:00
|
|
|
import { VisibilityDirective } from './services/directives/visibility.directive';
|
2024-02-29 09:40:51 +01:00
|
|
|
import { DeplomaOptionsPageModule } from './shared/popover/deploma-options/deploma-options.module';
|
|
|
|
|
import { DiplomaOptionsPage } from './shared/popover/deploma-options/deploma-options.page';
|
2024-03-26 14:32:26 +01:00
|
|
|
import { ImageCropperModule } from 'ngx-image-cropper';
|
2024-06-04 09:31:37 +01:00
|
|
|
import { createAction, createReducer, on, StoreModule } from '@ngrx/store';
|
2024-07-17 16:39:18 +01:00
|
|
|
import { typingReducer } from './module/chat/data/data-source/userTyping/user-typing-memory-data-source.service';
|
2023-02-06 09:23:36 +01:00
|
|
|
// import { ServiceWorkerModule } from '@angular/service-worker';
|
|
|
|
|
// import { AngularFireModule } from '@angular/fire';
|
|
|
|
|
// import { AngularFireMessagingModule } from '@angular/fire/messaging';
|
|
|
|
|
// import { environment } from 'src/environments/environment';
|
|
|
|
|
|
2021-11-16 16:00:14 +01:00
|
|
|
/* import { FCM } from '@ionic-native/fcm/ngx';
|
|
|
|
|
import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
|
|
|
|
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
|
|
|
|
|
|
2024-07-25 08:51:04 +01:00
|
|
|
|
|
|
|
|
// import { WebTracerProvider } from '@opentelemetry/web';
|
|
|
|
|
// import { SimpleSpanProcessor } from '@opentelemetry/tracing';
|
|
|
|
|
// import { ConsoleSpanExporter } from '@opentelemetry/tracing';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const provider = new WebTracerProvider();
|
|
|
|
|
// provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
|
|
|
|
|
// provider.register();
|
|
|
|
|
|
2023-01-12 15:27:09 +01:00
|
|
|
Sentry.init(
|
|
|
|
|
{
|
|
|
|
|
dsn: 'https://5b345a3ae70b4e4da463da65881b4aaa@o4504340905525248.ingest.sentry.io/4504345615794176',
|
2022-12-27 20:26:54 +01:00
|
|
|
// To set your release and dist versions
|
2023-01-12 15:27:09 +01:00
|
|
|
release: 'gabinetedigital@1.0.0',
|
|
|
|
|
dist: '1',
|
2022-12-30 15:34:45 +01:00
|
|
|
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
|
|
|
|
|
// We recommend adjusting this value in production.
|
2023-01-12 15:27:09 +01:00
|
|
|
tracesSampleRate: 1.0,
|
|
|
|
|
integrations: [
|
|
|
|
|
new BrowserTracing({
|
|
|
|
|
tracingOrigins: ['localhost', 'https://gd-api.oapr.gov.ao/api/'],
|
|
|
|
|
}) as Integration,
|
|
|
|
|
]
|
|
|
|
|
},
|
2022-12-30 15:34:45 +01:00
|
|
|
// Forward the init method to the sibling Framework.
|
2023-01-12 15:27:09 +01:00
|
|
|
SentrySibling.init
|
|
|
|
|
);
|
2024-06-04 09:31:37 +01:00
|
|
|
|
|
|
|
|
export const increment = createAction('[Counter Component] Increment');
|
|
|
|
|
export const decrement = createAction('[Counter Component] Decrement');
|
|
|
|
|
export const reset = createAction('[Counter Component] Reset');
|
|
|
|
|
|
|
|
|
|
export const initialState = 0;
|
|
|
|
|
|
|
|
|
|
const _counterReducer = createReducer(
|
|
|
|
|
initialState,
|
|
|
|
|
on(increment, (state) => state + 1),
|
|
|
|
|
on(decrement, (state) => state - 1),
|
|
|
|
|
on(reset, (state) => 0)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export function counterReducer(state, action) {
|
|
|
|
|
return _counterReducer(state, action);
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-05 15:39:16 +01:00
|
|
|
@NgModule({
|
2024-02-22 11:40:06 +01:00
|
|
|
declarations: [AppComponent, PopupQuestionPipe, InputFilterDirective],
|
2024-07-17 16:39:18 +01:00
|
|
|
imports: [
|
|
|
|
|
StoreModule.forRoot({ userTyping: typingReducer }),
|
|
|
|
|
BrowserModule,
|
2021-01-22 16:00:37 +01:00
|
|
|
CommonModule,
|
|
|
|
|
FormsModule,
|
|
|
|
|
CalendarModule.forRoot({
|
|
|
|
|
provide: DateAdapter,
|
2021-01-25 16:18:36 +01:00
|
|
|
useFactory: adapterFactory
|
2021-01-22 16:00:37 +01:00
|
|
|
}),
|
2023-02-06 09:23:36 +01:00
|
|
|
//AngularFireModule.initializeApp(environment.firebase),
|
|
|
|
|
//AngularFireMessagingModule,
|
2022-01-28 19:02:44 +01:00
|
|
|
IonicImageLoaderModule,
|
2021-07-06 10:33:24 +01:00
|
|
|
IonicModule.forRoot({animated: false}),
|
2021-11-29 15:48:35 +01:00
|
|
|
IonicStorageModule.forRoot({
|
|
|
|
|
name: '__mydb',
|
|
|
|
|
driverOrder: ['indexeddb', 'sqlite', 'websql']
|
2022-01-28 19:02:44 +01:00
|
|
|
|
2021-11-29 15:48:35 +01:00
|
|
|
}),
|
|
|
|
|
|
2021-07-28 09:29:14 +01:00
|
|
|
AppRoutingModule,
|
2021-08-04 10:47:22 +01:00
|
|
|
FontAwesomeModule,
|
2021-07-28 09:29:14 +01:00
|
|
|
HttpClientModule,
|
|
|
|
|
// NgbModule,
|
2021-06-16 22:38:25 +01:00
|
|
|
NoopAnimationsModule,
|
2021-06-18 12:02:14 +01:00
|
|
|
MatDatepickerModule,
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
NgxMatDatetimePickerModule,
|
|
|
|
|
NgxMatTimepickerModule,
|
2021-06-24 11:08:17 +01:00
|
|
|
NgxMatNativeDateModule,
|
2021-06-24 11:47:05 +01:00
|
|
|
|
|
|
|
|
NgxMatMomentModule,
|
|
|
|
|
MatButtonModule,
|
|
|
|
|
ReactiveFormsModule,
|
|
|
|
|
|
2021-06-24 11:08:17 +01:00
|
|
|
MatSelectModule,
|
2021-07-08 11:07:40 +01:00
|
|
|
MatDialogModule,
|
2021-08-25 16:02:40 +01:00
|
|
|
//
|
2021-09-30 08:43:49 +01:00
|
|
|
HammerModule,
|
2022-03-18 11:45:38 +01:00
|
|
|
CustomImageCachePageRoutingModule,
|
2022-01-11 12:12:45 +01:00
|
|
|
|
2023-04-13 12:51:38 +01:00
|
|
|
//
|
|
|
|
|
MatInputModule,
|
|
|
|
|
MatNativeDateModule,
|
|
|
|
|
NgxMatDatetimePickerModule,
|
|
|
|
|
NgxMatTimepickerModule,
|
|
|
|
|
NgxMatNativeDateModule,
|
|
|
|
|
NgxMatMomentModule,
|
|
|
|
|
MatSelectModule,
|
|
|
|
|
MatButtonModule,
|
2023-06-26 11:12:57 +01:00
|
|
|
AngularFireModule.initializeApp(firebaseConfig),
|
|
|
|
|
AngularFireMessagingModule,
|
2023-07-14 18:57:07 +01:00
|
|
|
EditorModule,
|
|
|
|
|
// options
|
|
|
|
|
DeplomaOptionsPageModule,
|
2023-11-10 14:58:33 +01:00
|
|
|
CreateProcessPageModule,
|
2024-03-26 14:32:26 +01:00
|
|
|
ImageCropperModule
|
2023-07-14 18:57:07 +01:00
|
|
|
],
|
|
|
|
|
entryComponents: [
|
|
|
|
|
DiplomaOptionsPage,
|
|
|
|
|
CreateProcessPage
|
|
|
|
|
],
|
2020-08-05 15:39:16 +01:00
|
|
|
providers: [
|
2021-06-24 11:08:17 +01:00
|
|
|
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
|
2022-12-17 17:46:08 +01:00
|
|
|
{
|
|
|
|
|
provide: ErrorHandler,
|
|
|
|
|
// Attach the Sentry ErrorHandler
|
2023-01-12 15:27:09 +01:00
|
|
|
useValue: SentrySibling.createErrorHandler(),
|
2022-12-17 17:46:08 +01:00
|
|
|
},
|
2021-02-25 11:50:32 +01:00
|
|
|
StatusBar,
|
2021-03-01 15:45:30 +01:00
|
|
|
//SplashScreen,
|
2021-07-08 11:07:40 +01:00
|
|
|
HttpClient,
|
2020-08-05 15:39:16 +01:00
|
|
|
HttpClientModule,
|
2020-08-25 14:08:13 +01:00
|
|
|
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
2020-08-26 09:42:16 +01:00
|
|
|
InAppBrowser,
|
2021-02-09 13:16:41 +01:00
|
|
|
Camera,
|
2022-03-18 11:45:38 +01:00
|
|
|
File,
|
2020-12-09 12:10:19 +01:00
|
|
|
WebView,
|
|
|
|
|
FilePath,
|
2021-11-16 16:00:14 +01:00
|
|
|
/* FCM,
|
|
|
|
|
FirebaseX, */
|
2021-05-19 09:37:43 +01:00
|
|
|
ChatService,
|
2021-08-17 09:53:06 +01:00
|
|
|
ScreenOrientation,
|
2021-09-07 12:09:01 +01:00
|
|
|
Network,
|
2021-10-15 15:21:26 +01:00
|
|
|
SQLite,
|
2021-11-16 16:00:14 +01:00
|
|
|
CookieService,
|
|
|
|
|
ImagePicker,
|
|
|
|
|
MediaCapture,
|
|
|
|
|
Media,
|
|
|
|
|
StreamingMedia,
|
2021-11-26 14:46:08 +01:00
|
|
|
PhotoViewer,
|
2022-02-25 15:10:10 +01:00
|
|
|
NgxImageCompressService,
|
2022-03-25 09:25:05 +01:00
|
|
|
MultipleDocumentsPicker,
|
2022-04-04 01:14:16 +01:00
|
|
|
NgxExtendedPdfViewerModule,
|
2022-04-05 13:22:17 +01:00
|
|
|
FileOpener,
|
2023-06-30 15:35:11 +01:00
|
|
|
DocumentViewer,
|
2024-03-01 14:37:42 +01:00
|
|
|
FFMpeg,
|
2024-05-17 15:27:02 +01:00
|
|
|
FFmpeg,
|
2023-07-11 17:54:08 +01:00
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: LoggingInterceptorService, multi: true },
|
2024-03-06 15:20:35 +01:00
|
|
|
chatTokenInterceptor,
|
2024-03-05 09:18:08 +01:00
|
|
|
tokenInterceptor,
|
2024-06-04 09:31:37 +01:00
|
|
|
|
2023-11-09 11:45:04 +01:00
|
|
|
|
2020-08-05 15:39:16 +01:00
|
|
|
],
|
2020-08-11 04:11:42 +01:00
|
|
|
bootstrap: [AppComponent],
|
|
|
|
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
2020-08-05 15:39:16 +01:00
|
|
|
})
|
2021-08-04 10:47:22 +01:00
|
|
|
export class AppModule {
|
|
|
|
|
constructor(library: FaIconLibrary) {
|
|
|
|
|
library.addIconPacks(fas, fab, far);
|
|
|
|
|
}
|
|
|
|
|
}
|