@wavemaker/app-ng-runtime 12.0.0-next.45032 → 12.0.0-next.45501

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +405 -451
  2. app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +2 -3
  3. app-ng-runtime/build-task/esm2022/public_api.mjs +1 -3
  4. app-ng-runtime/build-task/fesm2022/index.mjs +406 -454
  5. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  6. app-ng-runtime/build-task/public_api.d.ts +0 -2
  7. app-ng-runtime/components/base/bundles/index.umd.js +14 -62
  8. app-ng-runtime/components/base/components.module.d.ts +11 -12
  9. app-ng-runtime/components/base/esm2022/components.module.mjs +1 -5
  10. app-ng-runtime/components/base/esm2022/public_api.mjs +1 -2
  11. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +15 -25
  12. app-ng-runtime/components/base/fesm2022/index.mjs +15 -62
  13. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  14. app-ng-runtime/components/base/public_api.d.ts +0 -1
  15. app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +5 -10
  16. app-ng-runtime/components/containers/wizard/bundles/index.umd.js +17 -0
  17. app-ng-runtime/components/containers/wizard/esm2022/wizard.component.mjs +18 -1
  18. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs +17 -0
  19. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  20. app-ng-runtime/components/containers/wizard/wizard.component.d.ts +1 -0
  21. app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +1 -3
  22. app-ng-runtime/components/data/form/fesm2022/index.mjs +0 -2
  23. app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
  24. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +11 -0
  25. app-ng-runtime/components/dialogs/default/esm2022/base-dialog.mjs +12 -1
  26. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +11 -0
  27. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  28. app-ng-runtime/components/input/default/bundles/index.umd.js +63 -39
  29. app-ng-runtime/components/input/default/checkboxset/checkboxset.component.d.ts +0 -1
  30. app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +5 -8
  31. app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +5 -8
  32. app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +57 -29
  33. app-ng-runtime/components/input/default/esm2022/text/base/base-input.mjs +1 -4
  34. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +2 -2
  35. app-ng-runtime/components/input/default/esm2022/textarea/textarea.component.mjs +4 -1
  36. app-ng-runtime/components/input/default/fesm2022/index.mjs +63 -39
  37. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  38. app-ng-runtime/components/input/default/radioset/radioset.component.d.ts +0 -1
  39. app-ng-runtime/components/input/default/select/select.component.d.ts +2 -4
  40. app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +3 -2
  41. app-ng-runtime/components/input/epoch/bundles/index.umd.js +3 -0
  42. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +4 -1
  43. app-ng-runtime/components/input/epoch/fesm2022/index.mjs +3 -0
  44. app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
  45. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +31 -5
  46. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +34 -8
  47. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +32 -6
  48. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  49. app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +6 -2
  50. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +2 -2
  51. app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +2 -2
  52. app-ng-runtime/components/navigation/menu/esm2022/nav/nav.component.mjs +2 -2
  53. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +2 -2
  54. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  55. app-ng-runtime/core/bundles/index.umd.js +6 -16
  56. app-ng-runtime/core/enums/enums.d.ts +1 -2
  57. app-ng-runtime/core/esm2022/enums/enums.mjs +1 -2
  58. app-ng-runtime/core/esm2022/types/types.mjs +1 -4
  59. app-ng-runtime/core/esm2022/utils/build-utils.mjs +1 -6
  60. app-ng-runtime/core/esm2022/utils/utils.mjs +4 -3
  61. app-ng-runtime/core/fesm2022/index.mjs +4 -12
  62. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  63. app-ng-runtime/core/types/types.d.ts +1 -5
  64. app-ng-runtime/core/utils/utils.d.ts +1 -0
  65. app-ng-runtime/mobile/core/bundles/index.umd.js +18 -2
  66. app-ng-runtime/mobile/core/esm2022/native.xhr.mjs +19 -3
  67. app-ng-runtime/mobile/core/fesm2022/index.mjs +18 -2
  68. app-ng-runtime/mobile/core/fesm2022/index.mjs.map +1 -1
  69. app-ng-runtime/package.json +1 -1
  70. app-ng-runtime/runtime/base/bundles/index.umd.js +5 -288
  71. app-ng-runtime/runtime/base/esm2022/public_api.mjs +1 -2
  72. app-ng-runtime/runtime/base/esm2022/runtime-base.module.mjs +1 -6
  73. app-ng-runtime/runtime/base/esm2022/services/i18n.service.mjs +2 -2
  74. app-ng-runtime/runtime/base/esm2022/types/types.mjs +1 -2
  75. app-ng-runtime/runtime/base/fesm2022/index.mjs +4 -287
  76. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
  77. app-ng-runtime/runtime/base/public_api.d.ts +0 -1
  78. app-ng-runtime/runtime/base/runtime-base.module.d.ts +8 -9
  79. app-ng-runtime/runtime/base/types/types.d.ts +1 -2
  80. app-ng-runtime/runtime/dynamic/bundles/index.umd.js +9 -27
  81. app-ng-runtime/runtime/dynamic/esm2022/app/app.module.mjs +2 -5
  82. app-ng-runtime/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +7 -23
  83. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs +7 -26
  84. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  85. app-ng-runtime/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -1
  86. app-ng-runtime/scripts/datatable/datatable.js +6 -3
  87. app-ng-runtime/scripts/summernote/dist/summernote-lite.min.js +2 -3
  88. app-ng-runtime/transpiler/bundles/index.umd.js +0 -5
  89. app-ng-runtime/transpiler/esm2022/build.mjs +1 -4
  90. app-ng-runtime/transpiler/esm2022/imports.mjs +1 -3
  91. app-ng-runtime/transpiler/fesm2022/index.mjs +0 -5
  92. app-ng-runtime/transpiler/fesm2022/index.mjs.map +1 -1
  93. app-ng-runtime/build-task/advanced/custom-widget-container/custom-widget-container.build.d.ts +0 -2
  94. app-ng-runtime/build-task/advanced/custom-widget-wrapper/custom-widget-wrapper.build.d.ts +0 -2
  95. app-ng-runtime/build-task/esm2022/advanced/custom-widget-container/custom-widget-container.build.mjs +0 -15
  96. app-ng-runtime/build-task/esm2022/advanced/custom-widget-wrapper/custom-widget-wrapper.build.mjs +0 -26
  97. app-ng-runtime/components/advanced/custom/.npmignore +0 -2
  98. app-ng-runtime/components/advanced/custom/bundles/index.umd.js +0 -232
  99. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +0 -19
  100. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget.props.d.ts +0 -2
  101. app-ng-runtime/components/advanced/custom/custom-widget-prop.d.ts +0 -1
  102. app-ng-runtime/components/advanced/custom/custom-widget.directive.d.ts +0 -19
  103. app-ng-runtime/components/advanced/custom/custom-widget.module.d.ts +0 -10
  104. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +0 -102
  105. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget.props.mjs +0 -12
  106. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-prop.mjs +0 -8
  107. app-ng-runtime/components/advanced/custom/esm2022/custom-widget.directive.mjs +0 -68
  108. app-ng-runtime/components/advanced/custom/esm2022/custom-widget.module.mjs +0 -32
  109. app-ng-runtime/components/advanced/custom/esm2022/index.mjs +0 -5
  110. app-ng-runtime/components/advanced/custom/esm2022/public_api.mjs +0 -4
  111. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +0 -215
  112. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +0 -1
  113. app-ng-runtime/components/advanced/custom/index.d.ts +0 -5
  114. app-ng-runtime/components/advanced/custom/package.json +0 -23
  115. app-ng-runtime/components/advanced/custom/public_api.d.ts +0 -3
  116. app-ng-runtime/components/base/esm2022/widgets/common/base/custom-widget-container.directive.mjs +0 -39
  117. app-ng-runtime/components/base/widgets/common/base/custom-widget-container.directive.d.ts +0 -14
  118. app-ng-runtime/runtime/base/components/base-custom-widget.component.d.ts +0 -72
  119. app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +0 -288
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../projects/mobile/core/src/services/device-file.service.ts","../../../../projects/mobile/core/src/services/device-file-download.service.ts","../../../../projects/mobile/core/src/services/device-file-cache.service.ts","../../../../projects/mobile/core/src/services/device-file-opener.service.ts","../../../../projects/mobile/core/src/services/device.service.ts","../../../../projects/mobile/core/src/native.xhr.ts","../../../../projects/mobile/core/src/services/network.service.ts","../../../../projects/mobile/core/src/core.module.ts","../../../../projects/mobile/core/src/services/device-file-upload.service.ts","../../../../projects/mobile/core/src/services/ext-app-message.service.ts","../../../../projects/mobile/core/src/index.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { AppVersion } from '@awesome-cordova-plugins/app-version/ngx';\nimport {File} from '@awesome-cordova-plugins/file/ngx';\n\nimport { isAndroid, noop } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport {now} from \"lodash-es\";\n\ndeclare const cordova;\ndeclare const resolveLocalFileSystemURL;\ndeclare const FileReader;\n\nexport enum FileType {\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO'\n}\n\nconst IMAGE_EXTENSIONS = ['gif', 'jpg', 'png', 'svg', 'webp', 'jpeg', 'jif', 'jfif', 'jfi'],\n VIDEO_EXTENSIONS = ['mp4', 'mpg', 'avi', 'wma', 'mp2', '3gp', '3g2', 'm4p', 'm4v', 'mpg', 'fiv'],\n AUDIO_EXTENSIONS = ['mp3', 'm4p', 'aiff', 'aa', 'aax', 'wma'];\n\nconst APP_FOLDER_STRUCTURE = [{\n name : '{APP_NAME}',\n children : [{\n name : 'Media',\n children : [\n {\n name : '{APP_NAME} Images',\n fileType : FileType.IMAGE\n },\n {\n name : '{APP_NAME} Audio',\n fileType : FileType.AUDIO\n },\n {\n name : '{APP_NAME} Vedios',\n fileType : FileType.VIDEO\n },\n {\n name : '{APP_NAME} Documents',\n fileType : FileType.DOCUMENT\n }\n ]\n }]\n}];\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'DeviceFileService';\n\n private _appName: string;\n private _fileTypeVsPathMap = {\n 'temporary' : {},\n 'persistent' : {}\n };\n private _uploadDir: string;\n\n constructor(private cordovaAppVersion: AppVersion, private cordovaFile: File) {\n\n }\n\n public addMediaToGallery(filePath: string): Promise<void> {\n if (isAndroid() && this.isPersistentType(filePath)) {\n return new Promise((resolve, reject) => {\n cordova.plugins.MediaScannerPlugin.scanFile(filePath, resolve, reject);\n });\n }\n return Promise.resolve();\n }\n\n public appendToFileName(fileName: string, attachment?: string): string {\n let splits;\n attachment = attachment || '_' + now();\n fileName = fileName || 'noname';\n splits = fileName.split('.');\n if (splits.length > 1) {\n splits[splits.length - 2] = splits[splits.length - 2] + attachment;\n return splits.join('.');\n }\n return fileName + attachment;\n }\n\n public clearTemporaryStorage(): Promise<any> {\n return this.cordovaFile.removeRecursively(this.getTemporaryRootPath() + this._appName + '/', 'Media');\n }\n\n public copy(persistent: boolean, sourceFilePath: string) {\n const sourceFilename = sourceFilePath.split('/').pop(),\n destFolder = this.findFolderPath(persistent, sourceFilename),\n sourceFolder = sourceFilePath.substring(0, sourceFilePath.lastIndexOf('/'));\n return this.newFileName(destFolder, sourceFilename)\n .then( destFilename => this.cordovaFile.copyFile(sourceFolder, sourceFilename, destFolder, destFilename)\n .then(() => destFolder + destFilename));\n }\n\n public findFolderPath(persistent: boolean, fileName: string) {\n const typeMap = persistent ? this._fileTypeVsPathMap.persistent : this._fileTypeVsPathMap.temporary,\n fileType = this.findFileType(fileName);\n return typeMap[fileType] || typeMap[FileType.DOCUMENT];\n }\n\n public getPersistentRootPath(): string {\n return cordova.file.dataDirectory;\n }\n\n public getTemporaryRootPath(): string {\n return cordova.file.cacheDirectory;\n }\n\n public getUploadDirectory(): string {\n return this._uploadDir;\n }\n\n public isPersistentType(filePath: string): boolean {\n return filePath.startsWith(this.getPersistentRootPath());\n }\n\n public isValidPath(filePath: string): Promise<string> {\n let folder, fileName;\n if (!filePath) {\n return Promise.reject('File path is required');\n }\n folder = filePath.substring(0, filePath.lastIndexOf('/') + 1);\n fileName = filePath.split('/').pop();\n return this.cordovaFile.checkFile(folder, fileName)\n .then(() => filePath);\n }\n\n public listFiles(folder: string, search: string | RegExp): Promise<Map<string, any>[]> {\n return new Promise((resolve, reject) => {\n resolveLocalFileSystemURL(folder, directory => {\n if (!directory.files) {\n directory.createReader().readEntries(entries => {\n if (search) {\n entries = entries.filter(e => e.name.match(search));\n }\n entries = entries.map( e => {\n return {\n name : e.name,\n isDirectory : e.isDirectory,\n path : e.nativeURL\n };\n });\n resolve(entries);\n }, reject);\n } else {\n resolve([]);\n }\n }, reject);\n });\n }\n\n public newFileName(folder: string, fileName: string): Promise<string> {\n return this.cordovaFile.checkFile(folder, fileName)\n .then(() => {\n const extIndex = fileName.lastIndexOf('.');\n if (extIndex > 0) {\n fileName = fileName.substring(0, extIndex) + '_' + now() + '.' + fileName.substring(extIndex + 1);\n } else {\n fileName = fileName + '_' + now();\n }\n return this.newFileName(folder, fileName);\n }, () => fileName);\n }\n\n public removeFile(filePath: string): Promise<any> {\n const i = filePath.lastIndexOf('/'),\n dir = filePath.substring(0, i),\n file = filePath.substring(i + 1);\n return this.cordovaFile.removeFile(dir, file);\n }\n\n /**\n * removes the directory at the specified location.\n *\n * @param dirPath absolute path of directory\n */\n public removeDir(dirPath: string): Promise<any> {\n const i = dirPath.lastIndexOf('/'),\n parentdir = dirPath.substring(0, i + 1),\n dir = dirPath.substring(i + 1),\n movedDir = dir + now();\n return this.cordovaFile.checkDir(parentdir, dir)\n .then(() => {\n /**\n * If folder is remove directly without moving, then INVALID_MODIFICATION_ERR is thrown in android\n * when a copy operation is done with the same directory name. To avoid this, directory will be moved\n * first and removed.\n */\n return this.cordovaFile.moveDir(parentdir, dir, parentdir, movedDir)\n .then(() => this.cordovaFile.removeDir(parentdir, movedDir));\n }).catch(noop);\n }\n\n public start(): Promise<any> {\n /**\n * Default READ_CHUNK_SIZE is 256 Kb. But with that setting readJson method is failing. This is an issue\n * with cordova file plugin. So, increasing it to 512 Kb to read large database schema files (>256 Kb).\n */\n FileReader.READ_CHUNK_SIZE = 512 * 1024;\n return Promise.resolve().then(() => {\n return this.cordovaAppVersion.getAppName();\n }).then(appName => {\n const promises = [];\n this._appName = appName;\n promises.push(this.createFolderIfNotExists(this.getTemporaryRootPath(),\n APP_FOLDER_STRUCTURE,\n this._fileTypeVsPathMap.temporary));\n promises.push(this.createFolderIfNotExists(this.getPersistentRootPath(),\n APP_FOLDER_STRUCTURE,\n this._fileTypeVsPathMap.persistent));\n promises.push(this.setupUploadDirectory());\n return Promise.all(promises);\n }).then(() => {\n if (isAndroid()) {\n // this is necessary to prevent multiple file permission popup.\n return this.cordovaFile.readAsText(cordova.file.externalRootDirectory, 'random-file-for-permission').catch(noop);\n }\n });\n }\n\n public getServiceName() {\n return DeviceFileService.SERVICE_NAME;\n }\n\n private createFolderIfNotExists(parent: string, folders, fileTypeLocationMap) {\n const childPromises = [];\n if (folders) {\n folders.forEach(folder => {\n let folderPath;\n folder.name = folder.name.replace('{APP_NAME}', this._appName);\n folderPath = parent + folder.name + '/';\n if (folder.fileType && !fileTypeLocationMap[folder.fileType]) {\n fileTypeLocationMap[folder.fileType] = folderPath;\n }\n const p = this.cordovaFile.createDir(parent, folder.name, false)\n .then(() => this.createFolderIfNotExists(folderPath, folder.children, fileTypeLocationMap),\n () => this.createFolderIfNotExists(folderPath, folder.children, fileTypeLocationMap));\n childPromises.push(p);\n });\n }\n if (childPromises.length > 0) {\n return Promise.all(childPromises);\n }\n }\n\n private findFileType(fileName) {\n let extension;\n if (fileName.indexOf('.') > 0) {\n extension = fileName.split('.').pop().toLowerCase();\n if (IMAGE_EXTENSIONS.some(a => a === extension)) {\n return FileType.IMAGE;\n }\n if (VIDEO_EXTENSIONS.some(a => a === extension)) {\n return FileType.VIDEO;\n }\n if (AUDIO_EXTENSIONS.some(a => a === extension)) {\n return FileType.AUDIO;\n }\n }\n return FileType.DOCUMENT;\n }\n\n private setupUploadDirectory() {\n const uploadsDirName = 'uploads',\n appDir = cordova.file.dataDirectory;\n return this.cordovaFile.checkDir(appDir, uploadsDirName)\n .then(() => this._uploadDir = appDir + uploadsDirName,\n () => this.cordovaFile.createDir(appDir, uploadsDirName, true)\n .then(() => this._uploadDir = appDir + uploadsDirName));\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpClient,\n HttpEvent,\n HttpEventType,\n HttpHeaders,\n HttpRequest,\n HttpResponse\n} from '@angular/common/http';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\nimport { Observer } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { FileExtensionFromMimePipe } from '@wm/components/base';\n\nimport { DeviceFileService } from './device-file.service';\nimport {endsWith, find, isArray, isEmpty} from \"lodash-es\";\n\nconst MAX_CONCURRENT_DOWNLOADS = 2;\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileDownloadService {\n static readonly SERVICE_NAME = 'DeviceFileDownloadService';\n private _downloadQueue = [];\n private _concurrentDownloads = 0;\n\n constructor(\n private cordovaFile: File,\n private http: HttpClient,\n private deviceFileService: DeviceFileService,\n public fileExtensionFromMimePipe: FileExtensionFromMimePipe) {\n\n }\n\n public download(url: string, isPersistent: boolean, destFolder?: string, destFile?: string, progressObserver?: Observer<any>, headers?: any): Promise<string> {\n return this.addToDownloadQueue(url, isPersistent, destFolder, destFile, progressObserver, headers);\n }\n\n // Adds to download request queue\n private addToDownloadQueue(url: string, isPersistent: boolean, destFolder?: string, destFile?: string, progressObserver?: Observer<any>, headers?: any): Promise<string> {\n return new Promise<string>((resolve, reject) => {\n this._downloadQueue.push({\n url: url,\n headers: headers,\n isPersistent: isPersistent,\n destFolder: destFolder,\n destFile: destFile,\n resolve: resolve,\n reject: reject,\n progressObserver: progressObserver\n });\n if (this._concurrentDownloads < MAX_CONCURRENT_DOWNLOADS) {\n this.downloadNext();\n }\n });\n }\n\n private downloadNext(): void {\n if (this._downloadQueue.length > 0) {\n const req = this._downloadQueue.shift();\n this.downloadFile(req).then(filePath => {\n req.resolve(filePath);\n this.downloadNext();\n }, () => {\n req.reject();\n this.downloadNext();\n });\n }\n }\n\n // Start processing a download request\n private downloadFile(req): Promise<string> {\n let filePath, blob;\n this._concurrentDownloads++;\n\n return this.sendHttpRequest(req.url, req.progressObserver, req.headers).then((e) => {\n blob = (e as HttpResponse<Blob>).body;\n return this.getFileName(e, req, blob.type);\n }).then((fileName) => {\n if (!req.destFolder) {\n req.destFolder = this.deviceFileService.findFolderPath(req.isPersistent, fileName);\n }\n filePath = req.destFolder + fileName;\n return this.cordovaFile.writeFile(req.destFolder, fileName, blob);\n }).then(() => {\n this._concurrentDownloads--;\n return filePath;\n }, (response) => {\n this._concurrentDownloads--;\n this.cordovaFile.removeFile(req.destFolder, req.destFile);\n return Promise.reject(`Failed to downloaded ${req.url} with error ${JSON.stringify(response)}`);\n });\n }\n\n /**\n * Returns the filename\n * 1. if filename exists just return\n * 2. retrieve the filename from response headers i.e. content-disposition\n * 3. pick the filename from the end of the url\n * If filename doesnt contain the extension then extract using mimeType.\n * Generates newFileName if filename already exists.\n * @param response, download file response\n * @param req, download request params\n * @param mimeType mime type of file\n * @returns {Promise<string>}\n */\n private getFileName(response, req, mimeType) {\n const disposition = response.headers.get('Content-Disposition');\n let filename = req.destFile;\n if (!filename && disposition && disposition.indexOf('attachment') !== -1) {\n const filenameRegex = /filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/;\n const matches = filenameRegex.exec(disposition);\n if (matches !== null && matches[1]) {\n filename = matches[1].replace(/['\"]/g, '');\n }\n }\n if (!filename) {\n filename = req.url.split('?')[0];\n filename = filename.split('/').pop();\n }\n\n let fileExtension;\n if (mimeType) {\n fileExtension = this.fileExtensionFromMimePipe.transform(mimeType);\n }\n let hasFileExtension;\n // one or more file extensions can have same mimeType then loop over the file extensions.\n if (isArray(fileExtension) && !isEmpty(fileExtension)) {\n hasFileExtension = find(fileExtension, extension => endsWith(filename, extension));\n //File extension will be array for some file formats\n fileExtension = fileExtension[0];\n }\n if (!hasFileExtension && !endsWith(filename, fileExtension)) {\n filename = filename + fileExtension;\n }\n\n const folder = req.destFolder || this.deviceFileService.findFolderPath(req.isPersistent, filename);\n return this.deviceFileService.newFileName(folder, filename);\n }\n\n private sendHttpRequest(url: string, progressObserver: Observer<HttpEvent<any>>, headers?: any): Promise<HttpResponse<any>> {\n let reqHeaders = new HttpHeaders();\n\n // headers\n if (headers) {\n Object.entries(headers).forEach(([k, v]) => reqHeaders = reqHeaders.append(k, v as string));\n }\n const req = new HttpRequest('GET', url, {\n headers: reqHeaders,\n responseType: 'blob',\n reportProgress: progressObserver != null\n });\n return this.http.request(req)\n .pipe(\n map(e => {\n if (progressObserver && progressObserver.next && e.type === HttpEventType.DownloadProgress) {\n progressObserver.next(e);\n }\n return e;\n }),\n filter(e => e.type === HttpEventType.Response),\n map( e => {\n if (progressObserver && progressObserver.complete) {\n progressObserver.complete();\n }\n return (e as HttpResponse<any>);\n })\n )\n .toPromise();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\n\nimport { noop } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport { DeviceFileService } from './device-file.service';\nimport { DeviceFileDownloadService } from './device-file-download.service';\n\ndeclare const cordova;\n\nconst CACHE_FILE_INDEX_NAME = 'appCache.json';\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileCacheService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'DeviceFileCacheService';\n private _cacheIndex = {};\n private _writing;\n private _saveCache;\n\n public constructor(private cordovaFile: File,\n private fileService: DeviceFileService,\n private downloadService: DeviceFileDownloadService) {\n\n }\n\n public addEntry(url, filepath): void {\n this._cacheIndex[url] = filepath;\n this.writeCacheIndexToFile();\n }\n\n public getLocalPath(url: string, downloadIfNotExists: boolean, isPersistent: boolean, forceRefresh = false): Promise<string> {\n if (forceRefresh) {\n return this.download(url, isPersistent);\n }\n const filePath = this._cacheIndex[url];\n return this.fileService.isValidPath(filePath)\n .catch(() => {\n delete this._cacheIndex[url];\n if (downloadIfNotExists) {\n return this.download(url, isPersistent);\n } else {\n return Promise.reject('No cache entry for ' + url);\n }\n });\n }\n\n public invalidateCache(): void {\n this._cacheIndex = {};\n this.writeCacheIndexToFile();\n this.fileService.clearTemporaryStorage();\n }\n\n public start(): Promise<void> {\n return this.cordovaFile.readAsText(cordova.file.dataDirectory, CACHE_FILE_INDEX_NAME)\n .then(content => {\n this._cacheIndex = JSON.parse(content);\n }, noop);\n }\n\n public getServiceName() {\n return DeviceFileCacheService.SERVICE_NAME;\n }\n\n private download(url: string, isPersistent: boolean): Promise<string> {\n return this.downloadService.download(url, isPersistent)\n .then(filepath => {\n this._cacheIndex[url] = filepath;\n this.writeCacheIndexToFile();\n return filepath;\n });\n }\n\n private writeCacheIndexToFile(): void {\n if (!this._writing) {\n this._writing = true;\n this.cordovaFile.writeFile(cordova.file.dataDirectory, CACHE_FILE_INDEX_NAME, JSON.stringify(this._cacheIndex),\n {\n replace: true\n })\n .catch(noop)\n .then(() => {\n if (this._saveCache) {\n setTimeout(() => {\n this._writing = false;\n this._saveCache = false;\n this.writeCacheIndexToFile();\n }, 5000);\n } else {\n this._writing = false;\n }\n });\n } else {\n this._saveCache = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\nimport { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';\n\nimport { isAndroid, isIos, noop } from '@wm/core';\n\nimport { DeviceFileCacheService } from './device-file-cache.service';\nimport { DeviceFileDownloadService } from './device-file-download.service';\nimport { DeviceFileService } from './device-file.service';\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport {now} from \"lodash-es\";\n\ndeclare const cordova;\ndeclare const resolveLocalFileSystemURL;\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileOpenerService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'DeviceFileOpenerService';\n\n private _downloadsFolder;\n\n constructor(private cordovaFile: File,\n private cordovaFileOpener: FileOpener,\n private fileService: DeviceFileService,\n private cacheService: DeviceFileCacheService,\n private downloadService: DeviceFileDownloadService) {\n\n }\n\n // this method returns the mime type of file from the filePath.\n public getFileMimeType(filePath): Promise<any> {\n return new Promise<any> ((resolve) => {\n // Read the file entry from the file URL\n resolveLocalFileSystemURL(filePath, fileEntry => {\n fileEntry.file(metadata => {\n resolve(metadata.type);\n });\n });\n });\n }\n\n public openRemoteFile(url: string, extension: string, fileName?: string, headers?: any): Promise<void> {\n return this.getLocalPath(url, extension, fileName, headers)\n .then(filePath => {\n return this.getFileMimeType(filePath).then(type => {\n return this.cordovaFileOpener.open(filePath, type);\n });\n });\n }\n\n public start(): Promise<void> {\n let downloadsParent;\n if (isAndroid()) {\n downloadsParent = cordova.file.externalCacheDirectory;\n } else if (isIos()) {\n downloadsParent = cordova.file.documentsDirectory + 'NoCloud/';\n } else {\n downloadsParent = cordova.file.dataDirectory;\n }\n return this.cordovaFile.createDir(downloadsParent, 'downloads', false)\n .catch(noop)\n .then(() => {\n this._downloadsFolder = downloadsParent + 'downloads/';\n });\n }\n\n public getServiceName() {\n return DeviceFileCacheService.SERVICE_NAME;\n }\n\n private generateFileName(url: string, extension: string): string {\n let fileName = url.split('?')[0];\n fileName = fileName.split('/').pop();\n fileName = this.fileService.appendToFileName(fileName, '' + now());\n if (extension) {\n return fileName.split('.')[0] + '.' + extension;\n }\n return fileName;\n }\n\n private getLocalPath(url: string, extension?: string, filename?: string, headers?: any): Promise<string> {\n return new Promise( (resolve, reject) => {\n return this.cacheService.getLocalPath(url, false, false)\n .then( filePath => {\n let fileName, i, j, fromDir, fromFile;\n // Is it part of downloaded folder.\n if (filePath.startsWith(this._downloadsFolder)) {\n resolve(filePath);\n } else {\n //Extract extension from file downloaded earlier.\n j = filePath.lastIndexOf('.');\n extension = filePath.substring(j + 1);\n fileName = filename || this.generateFileName(url, extension);\n i = filePath.lastIndexOf('/');\n fromDir = filePath.substring(0, i);\n fromFile = filePath.substring(i + 1);\n this.cordovaFile.copyFile(fromDir, fromFile, this._downloadsFolder, fileName)\n .then(() => {\n const newFilePath = this._downloadsFolder + fileName;\n this.cacheService.addEntry(url, newFilePath);\n resolve(newFilePath);\n });\n }\n }).catch(() => {\n this.downloadService.download(url, false, this._downloadsFolder, filename, undefined, headers)\n .then(filePath => {\n this.cacheService.addEntry(url, filePath);\n resolve(filePath);\n }, reject);\n });\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport {File} from '@awesome-cordova-plugins/file/ngx';\n\nimport { $appDigest, hasCordova, noop, fetchContent, isIos } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport {forEach} from \"lodash-es\";\n\ndeclare const cordova;\n\nconst REGISTRY_FILE_NAME = 'registry.info';\n\nexport interface Config {\n baseUrl: string;\n customUrlScheme: string;\n customUrl: string;\n buildTime: number;\n enableSSLPinning: boolean;\n offlineStorage: boolean;\n useNativeXHR: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceService {\n static readonly SERVICE_NAME = 'DeviceService';\n\n private _registry = {};\n private _isReady = false;\n private _whenReadyPromises = [];\n private _backBtnTapListeners = [];\n private _startUpServices: IDeviceStartUpService[] = [];\n private _config: Config = {} as Config;\n\n public constructor(private file: File) {\n const maxWaitTime = 10;\n setTimeout(() => {\n if (!this._isReady) {\n console.warn(`Device is not ready even after ${maxWaitTime} seconds`);\n console.warn('Waiting For %O', this._startUpServices.map(i => i.getServiceName()));\n }\n }, maxWaitTime * 1000);\n document.addEventListener('backbutton', this.executeBackTapListeners.bind(this));\n if (hasCordova()) {\n const port = location.port ? ':' + location.port : '';\n const configUrl = `${location.protocol}//${location.hostname}${port}${isIos() ? '' : '/_www'}/config.json`;\n fetchContent('json', configUrl, true, (response => {\n if (!response.error && response.baseUrl) {\n this._config = response;\n }\n }));\n }\n }\n\n public executeBackTapListeners($event) {\n forEach(this._backBtnTapListeners, fn => {\n return fn($event) !== false;\n });\n // explicitly applying the digest cycle as the backbutton listener is not rendering the page content.\n // This is because zone is not run (there is no change detection)\n // https://weblogs.thinktecture.com/thomas/2017/02/cordova-vs-zonejs-or-why-is-angulars-document-event-listener-not-in-a-zone.html\n $appDigest();\n }\n\n public addStartUpService(service: IDeviceStartUpService) {\n this._startUpServices.push(service);\n }\n\n public onBackButtonTap(fn: ($event) => boolean) {\n this._backBtnTapListeners.unshift(fn);\n return () => {\n const i = this._backBtnTapListeners.indexOf(fn);\n if (i >= 0) {\n this._backBtnTapListeners.splice(i, 1);\n }\n };\n }\n\n public start() {\n if (this._isReady || this._startUpServices.length === 0) {\n this._isReady = true;\n return Promise.resolve();\n } else {\n return new Promise<void>((resolve) => {\n if (hasCordova()) {\n document.addEventListener('deviceready', () => resolve(), false);\n } else {\n resolve();\n }\n }).then(() => {\n if (window['cordova']) {\n return this.file.readAsText(cordova.file.dataDirectory, REGISTRY_FILE_NAME)\n .then(content => this._registry = JSON.parse(content), noop);\n }\n }).then(() => {\n return Promise.all(this._startUpServices.map(s => {\n return s.start().catch((error) => {\n console.error('%s failed to start due to: %O', s.getServiceName(), error);\n return Promise.reject(error);\n });\n }));\n }).then(() => {\n window['wmDeviceReady'] = true;\n document.dispatchEvent(new CustomEvent('wmDeviceReady'));\n this._startUpServices.length = 0;\n this._whenReadyPromises.forEach(fn => fn());\n this._isReady = true;\n });\n }\n }\n\n public getServiceName() {\n return DeviceService.SERVICE_NAME;\n }\n\n public whenReady(): Promise<void> {\n if (this._isReady) {\n return Promise.resolve();\n } else {\n return new Promise<void>((resolve) => {\n this._whenReadyPromises.push(resolve);\n });\n }\n }\n\n public getBaseUrl() {\n return this._config.baseUrl === 'http://NOSERVERREQUIRED.com' ? 'NONE' : this._config.baseUrl;\n }\n\n public isAppConnectedToPreview() {\n return this._config.customUrl !== this._config.baseUrl && this.getBaseUrl() !== 'NONE';\n }\n\n public getConfig(): Config {\n return this._config;\n }\n\n public useNativeXHR() {\n return (isIos() || this._config.useNativeXHR === true)\n && hasCordova()\n && cordova.plugin\n && cordova.plugin.http;\n }\n\n /**\n * @returns {Promise<number>} promise resolved with the app build time\n */\n public getAppBuildTime(): Promise<number> {\n return Promise.resolve(this._config.buildTime);\n }\n\n /**\n * Stores an entry that survives app restarts and updates.\n *\n * @param {string} key\n * @param {Object} value\n * @returns {Promise<any>}\n */\n public storeEntry(key: string, value: Object): Promise<any> {\n this._registry[key] = value;\n return this.file.writeFile(cordova.file.dataDirectory,\n REGISTRY_FILE_NAME,\n JSON.stringify(this._registry),\n { replace: true });\n }\n\n /**\n * @param {string} key\n * @returns {any} entry corresponding to the key\n */\n public getEntry(key: string): any {\n return this._registry[key];\n }\n}\n","import { isIos } from '@wm/core';\n\nconst _XMLHttpRequest = window['XMLHttpRequest'];\nconst cordova = window['cordova'];\n\n\nconst enum EVENT {\n LOAD_START = 'loadstart',\n LOAD = 'load',\n LOAD_END = 'loadend',\n PROGRESS = 'progress',\n ERROR = 'error',\n ABORT = 'abort'\n}\n\nconst STATUS_TEXT = {\n '100': '100 Continue',\n '101': '101 Switching Protocol',\n '102': '102 Processing (WebDAV)',\n '103': '103 Early Hints',\n\n '200': '200 OK',\n '201': '201 Created',\n '202': '202 Accepted',\n '203': '203 Non-Authoritative Information',\n '204': '204 No Content',\n '205': '205 Reset Content',\n '206': '206 Partial Content',\n '207': '207 Multi-Status (WebDAV)',\n '208': '208 Already Reported (WebDAV)',\n '226': '226 IM Used (HTTP Delta encoding)',\n\n '300': '300 Multiple Choice',\n '301': '301 Moved Permanently',\n '302': '302 Found',\n '303': '303 See Other',\n '304': '304 Not Modified',\n '305': '305 Use Proxy',\n '306': '306 unused',\n '307': '307 Temporary Redirect',\n '308': '308 Permanent Redirect'\n};\n\nclass Internals {\n xhr = new _XMLHttpRequest();\n method = 'GET';\n requestHeaders = {};\n responseHeaders = {};\n responseHeaderText = '';\n url = '';\n async = true;\n listeners = {};\n\n constructor(public nXhr: NativeXMLHttpRequest) {}\n\n public triggerListeners(eventName: string, data?: any): void {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(function (l) {\n l.apply(window, data);\n });\n }\n }\n\n public copyNativeResponse(res): void {\n this.nXhr.status = res.status;\n this.nXhr.statusText = res.statusText || res.status;\n this.nXhr.response = res.data;\n this.nXhr.responseType = (res.headers && res.headers['content-type']) || 'plain/text';\n this.nXhr.responseURL = res.responseURL;\n this.nXhr.responseXML = res.responseXML;\n this.nXhr.responseText = (res.data && res.data.toString()) || res.error;\n this.responseHeaderText = ((): string => {\n const headers = [];\n for (let k in res.headers) {\n headers.push(k + ': ' + res.headers[k]);\n }\n return headers.join('\\r\\n');\n })();\n }\n\n public copyXMLHttpResponse(req: any): void {\n this.nXhr.status = req.status;\n this.nXhr.statusText = req.statusText;\n this.nXhr.response = req.response;\n this.nXhr.responseType = req.responseType;\n this.nXhr.responseURL = req.responseURL;\n this.nXhr.responseXML = req.responseXML;\n this.nXhr.responseText = req.responseText;\n this.responseHeaderText = req.getAllResponseHeaders();\n this.nXhr.getResponseHeader = header => req.getResponseHeader(header);\n }\n\n public sendViaXhr(body) {\n const self = this;\n this.xhr.onreadystatechange = this.nXhr.onreadystatechange;\n this.xhr.onload = function() {\n self.copyXMLHttpResponse(self.xhr);\n if (self.nXhr.onload) {\n self.nXhr.onload.apply(self.nXhr, arguments);\n }\n };\n this.xhr.onerror = this.nXhr.onerror;\n if (!this.async) {\n this.xhr.ontimeout = this.nXhr.ontimeout;\n this.xhr.timeout = this.nXhr.timeout;\n }\n this.xhr.withCredentials = this.nXhr.withCredentials;\n for (let k in this.listeners) {\n this.xhr.addEventListener(k, e => {\n this.copyXMLHttpResponse(this.xhr);\n this.triggerListeners(e.type);\n });\n }\n this.xhr.send(body);\n }\n\n public close() {\n for (let k in this.listeners) {\n this.listeners[k].length = 0;\n }\n }\n}\n\nexport class NativeXMLHttpRequest {\n public onreadystatechange = null;\n public readyState = 0;\n public response = null;\n public responseType = null;\n public responseText = null;\n public responseURL = null;\n public responseXML = null;\n public status = 0;\n public statusText = '';\n public ontimeout = null;\n public onload = null;\n public onloadend = null;\n public onerror = null;\n public timeout = 0;\n public withCredentials = false;\n private progress = {\n lengthComputable: false,\n loaded : 0,\n total: 0,\n close: (success = false): void => {}\n };\n public upload = {\n addEventListener : this.addEventListener.bind(this)\n };\n private _internal = new Internals(this);\n\n public abort() {\n this.status = -1;\n this._internal.triggerListeners(EVENT.ERROR);\n this.onerror && this.onerror();\n this._internal.xhr.abort();\n this.close();\n }\n\n public getResponseHeader(name: string) {\n return this.response.headers[name];\n }\n\n public getAllResponseHeaders() {\n return this._internal.responseHeaderText;\n }\n\n public setRequestHeader(header: string, value: string) {\n this._internal.requestHeaders[header] = value;\n this._internal.xhr.setRequestHeader(header, value);\n }\n\n public overrideMimeType(mime: string) {\n this._internal.xhr.overrideMimeType(mime);\n }\n\n public open(method: string, url: string, async = true, user?: string, password?: string) {\n this._internal.method = method;\n this._internal.url = url;\n this._internal.async = async;\n this._internal.xhr.open(method, url, async, user, password);\n }\n\n public send(body?: any, useBrowserXHR = false) {\n if (useBrowserXHR\n || this._internal.url.startsWith('http://localhost')\n || !this._internal.url.startsWith('http')) {\n this._internal.sendViaXhr(body);\n } else if (this.responseType === 'blob') {\n this.sendBlobViaNativePlugin(body);\n } else {\n this.sendViaNativePlugin(body);\n }\n };\n\n public addEventListener(eventName: string, handler: () => any) {\n this._internal.listeners[eventName] = this._internal.listeners[eventName] || [];\n this._internal.listeners[eventName].push(handler);\n }\n\n public removeEventListener(eventName: string, handler: () => any) {\n if (this._internal.listeners[eventName]) {\n const i = this._internal.listeners[eventName].indexOf(handler);\n this._internal.listeners[eventName].splice(i, 1);\n }\n }\n\n private prepareOptions(body: any) {\n body = body || {};\n const options = {\n headers: {},\n data: body,\n method: this._internal.method,\n serializer: 'raw'\n };\n\n if (body != null && body != undefined) {\n if (body.constructor && body.constructor.toString().indexOf('FormData()') >= 0) {\n options.serializer = 'multipart';\n this.startProgress();\n } else if(typeof body === 'string') {\n options.serializer = 'utf8';\n } else {\n options.serializer = 'urlencoded';\n }\n }\n for (let key in this._internal.requestHeaders) {\n options.headers[key] = this._internal.requestHeaders[key];\n }\n return options;\n }\n\n /*\n * Native plugin didn't provide any API to track upload progress.\n * This method generates a synthetic event which does not co-relates with the actual upload progress.\n */\n private startProgress(total?) {\n const _1mb = 1024 * 1024 * 8;\n total = total || _1mb;\n const interval = Math.ceil(total / _1mb) * 200;\n const slice = Math.ceil(total / _1mb) * (_1mb / 10);\n this.progress = {\n lengthComputable: true,\n loaded : 0,\n total: total,\n close: null\n };\n const triggerEvent = () => {\n this._internal.triggerListeners(EVENT.PROGRESS, [{\n lengthComputable: true,\n total: this.progress.total,\n loaded: this.progress.loaded\n }]);\n };\n const intervalId = setInterval(() => {\n if(this.progress.loaded + slice < total) {\n this.progress.loaded += slice;\n }\n triggerEvent();\n }, interval);\n this.progress.close = (success = false) => {\n if (success) {\n this.progress.loaded = this.progress.total;\n }\n triggerEvent();\n clearInterval(intervalId);\n };\n }\n\n private sendBlobViaNativePlugin(body: any): void {\n const options = this.prepareOptions(body);\n const tempfile = (isIos() ? cordova.file.tempDirectory : cordova.file.cacheDirectory) + Date.now();\n const timerId = setTimeout(() => {\n if(this.timeout > 0) {\n console.error('network call with request %O failed with timeout', this);\n this._internal.triggerListeners(EVENT.LOAD);\n this._internal.triggerListeners(EVENT.ERROR);\n this.onerror && this.onerror();\n this.ontimeout && this.ontimeout();\n this.close();\n }\n }, this.timeout > 0 ? this.timeout : 1);\n const onSuccess = (file, response) => {\n const res = {\n headers: (response && response.headers) || {},\n status: 200,\n data: file\n };\n let contentType = (response && response.headers && response.headers['content-type']);\n if (contentType) {\n res.data.type = contentType.split(';')[0];\n }\n console.log('network call with request %O successed with response : %O', this, res);\n this._internal.copyNativeResponse(res);\n this._internal.triggerListeners(EVENT.LOAD);\n this.onload && this.onload();\n this.onloadend && this.onloadend();\n clearTimeout(timerId);\n };\n const onError = (response) => {\n console.error('network call with request %O failed with response : %O', this, response);\n this._internal.triggerListeners(EVENT.LOAD, [response]);\n this._internal.triggerListeners(EVENT.ERROR, [response]);\n this.onerror && this.onerror();\n this.onloadend && this.onloadend();\n clearTimeout(timerId);\n };\n cordova.plugin.http.downloadFile(new URL(this._internal.url).href, {}, options.headers, tempfile,\n (entry, response) => {\n entry.file(f => onSuccess(f, response), onError);\n }, onError);\n }\n\n private sendViaNativePlugin(body: any) {\n const options = this.prepareOptions(body);\n const timerId = setTimeout(() => {\n if(this.timeout > 0) {\n console.error('network call with request %O failed with timeout', this);\n this._internal.triggerListeners(EVENT.LOAD);\n this._internal.triggerListeners(EVENT.ERROR);\n this.ontimeout && this.ontimeout();\n this.close();\n }\n }, this.timeout > 0 ? this.timeout : 1);\n new Promise((resolve, reject) => {\n cordova.plugin.http.sendRequest(new URL(this._internal.url).href, options, resolve, reject);\n }).then(response => {\n console.log('network call with request %O successed with response : %O', this, response);\n this.progress.close(true);\n this._internal.copyNativeResponse(response);\n this._internal.triggerListeners(EVENT.LOAD);\n this.onload && this.onload();\n this.onloadend && this.onloadend();\n }, response => {\n this.progress.close();\n this._internal.copyNativeResponse(response);\n console.error('network call with request %O failed with response : %O', this, response);\n this._internal.triggerListeners(EVENT.LOAD, [response]);\n this._internal.triggerListeners(EVENT.ERROR, [response]);\n this.onerror && this.onerror();\n this.onloadend && this.onloadend();\n }).finally(() => clearTimeout(timerId));\n }\n\n private close() {\n this.ontimeout = null;\n this.onload = null;\n this.onerror = null;\n this.onreadystatechange = null;\n this._internal.close();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Network } from '@awesome-cordova-plugins/network/ngx';\n\nimport { App, getAbortableDefer, hasCordova, isIos, noop, retryIfFails } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport { NativeXMLHttpRequest } from './../native.xhr';\nimport { DeviceService } from './device.service';\nimport {clone, endsWith, find, get, isEqual, startsWith} from \"lodash-es\";\n\ndeclare const navigator;\n\nconst AUTO_CONNECT_KEY = 'WM.NetworkService._autoConnect',\n IS_CONNECTED_KEY = 'WM.NetworkService.isConnected',\n excludedList = [new RegExp('/wmProperties.js')],\n networkState = {\n isConnecting : false,\n isConnected : true,\n isNetworkAvailable : true,\n isServiceAvailable : true,\n noServiceRequired: false\n };\n\nlet XML_HTTP_REQUEST = null;\n\n/**\n * If server is not connected and url does not match the unblock list of regular expressions,\n * then this function return true. Otherwise, return false.\n * @param url\n * @returns {boolean}\n */\nconst blockUrl = url => {\n let block = !networkState.isConnected && startsWith(url, 'http');\n if (block) {\n block = !find(excludedList, regExp => regExp.test(url));\n }\n return block;\n};\n\nconst getXMLHttpRequestToUse = ((useNativeXHR: boolean) => {\n const clazz = useNativeXHR ? NativeXMLHttpRequest : XMLHttpRequest;\n const orig = clazz.prototype.open;\n // Intercept all XHR calls\n clazz.prototype.open = function (method: string, url: string, async: boolean = true, user?: string, password?: string) {\n if (!networkState.noServiceRequired && blockUrl(url)) {\n const urlSplits = url.split('://');\n const pathIndex = urlSplits[1].indexOf('/');\n urlSplits[1] = 'localhost' + (pathIndex > 0 ? urlSplits[1].substr(pathIndex) : '/');\n url = urlSplits.join('://');\n }\n return orig.apply(this, [method, url, async, user, password]);\n };\n return clazz;\n});\n\n@Injectable({ providedIn: 'root' })\nexport class NetworkService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'NetworkService';\n\n private _autoConnect = localStorage.getItem(AUTO_CONNECT_KEY) !== 'false';\n private _lastKnownNetworkState: any;\n private _isCheckingServer = false;\n\n constructor(private httpClient: HttpClient, private app: App, private network: Network, private deviceService: DeviceService) {\n networkState.isConnected = localStorage.getItem(IS_CONNECTED_KEY) === 'true';\n XML_HTTP_REQUEST = XML_HTTP_REQUEST || getXMLHttpRequestToUse(deviceService.useNativeXHR());\n }\n\n /**\n * This method attempts to connect app to the server and returns a promise that will be resolved with\n * a boolean value based on the operation result.\n *\n * @returns {object} promise\n */\n public connect(): Promise<boolean> {\n this.setAutoConnect(true);\n return this.tryToConnect();\n }\n\n /**\n * When the auto connect is enabled, then app is automatically connected whenever server is available.\n * Every time when app goes offline, auto connect is enabled. Before app coming to online, one can disable\n * the auto connection flow using this method.\n */\n public disableAutoConnect = () => this.setAutoConnect(false);\n\n /**\n * This method disconnects the app from the server and returns a promise that will be resolved with\n * a boolean value based on the operation result. Use connect method to reconnect.\n *\n * @returns {object} promise\n */\n public disconnect(): Promise<boolean> {\n const p = this.tryToDisconnect();\n this.disableAutoConnect();\n return p;\n }\n\n /**\n * If pingServer is true, then it returns a promise that will be resolved with boolean based on service availability\n * check.If pingServer is false, returns a boolean value based on the last known service availability.\n *\n * @returns {boolean} if pingServer is true, then a promise is returned. Otherwise, a boolean value.\n */\n public isAvailable(pingServer = false): boolean | Promise<boolean> {\n if (pingServer) {\n return this.isServiceAvailable().then(() => {\n this.checkForNetworkStateChange();\n return networkState.isServiceAvailable;\n });\n }\n return networkState.isServiceAvailable;\n }\n\n /**\n * Returns true, if app is connected to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true, if app is connected to server. Otherwise, returns false.\n */\n public isConnected = () => {\n // checking for connection type.\n if (get(navigator, 'connection') && navigator.connection.type) {\n networkState.isConnected = networkState.isConnected && (navigator.connection.type !== 'none');\n }\n this.checkForNetworkStateChange();\n return networkState.isConnected;\n }\n\n /**\n * Returns true if app is trying to connect to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true if app is trying to connect to server. Otherwise, returns false.\n */\n public isConnecting = () => networkState.isConnecting;\n\n /**\n * This method returns a promise that is resolved when connection is established with server.\n *\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public onConnect() {\n let defer,\n cancelSubscription;\n if (this.isConnected()) {\n return Promise.resolve();\n }\n defer = getAbortableDefer();\n cancelSubscription = this.app.subscribe('onNetworkStateChange', () => {\n if (this.isConnected()) {\n defer.resolve(true);\n cancelSubscription();\n }\n });\n defer.promise.catch(function () {\n cancelSubscription();\n });\n return defer.promise;\n }\n\n /**\n * This is a util method. If fn cannot execute successfully and network lost connection, then the fn will\n * be invoked when network is back. The returned can also be aborted.\n *\n * @param {function()} fn method to invoke.\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public retryIfNetworkFails(fn) {\n const defer = getAbortableDefer();\n retryIfFails(fn, 0, 0, () => {\n let onConnectPromise;\n if (!this.isConnected()) {\n onConnectPromise = this.onConnect();\n defer.promise.catch(function () {\n onConnectPromise.abort();\n });\n return onConnectPromise;\n }\n return false;\n }).then(defer.resolve, defer.reject);\n return defer.promise;\n }\n\n public start(): Promise<any> {\n if (window['cordova']) {\n // Connection constant will be available only when network plugin is included.\n if (window['Connection'] && navigator.connection) {\n networkState.isNetworkAvailable = navigator.connection.type !== 'none';\n networkState.isConnected = networkState.isNetworkAvailable && networkState.isConnected;\n /*\n * When the device comes online, check is the service is available. If the service is available and auto\n * connect flag is true, then app is automatically connected to remote server.\n */\n this.network.onConnect().subscribe(() => {\n networkState.isNetworkAvailable = true;\n this.tryToConnect().catch(noop);\n });\n\n /*\n *When device goes offline, then change the network state and emit that notifies about network state change.\n */\n this.network.onDisconnect().subscribe(() => {\n networkState.isNetworkAvailable = false;\n networkState.isServiceAvailable = false;\n this.tryToDisconnect();\n });\n\n this.app.subscribe('onNetworkStateChange', (data) => {\n /**\n * If network is available and server is not available,then\n * try to connect when server is available.\n */\n if (data.isNetworkAvailable && !data.isServiceAvailable && !this._isCheckingServer && !data.noServiceRequired) {\n this._isCheckingServer = true;\n this.checkForServiceAvailiblity().then(() => {\n this._isCheckingServer = false;\n this.connect();\n }, () => {\n this._isCheckingServer = false;\n });\n }\n });\n }\n }\n // to set the default n/w connection values.\n return this.tryToConnect(true).catch(noop);\n }\n\n public getServiceName() {\n return NetworkService.SERVICE_NAME;\n }\n\n /**\n * This function adds the given regular expression to the unblockList. Even app is in offline mode,\n * the urls matching with the given regular expression are not blocked by NetworkService.\n *\n * @param {string} urlRegex regular expression\n */\n public unblock(urlRegex: string) {\n excludedList.push(new RegExp(urlRegex));\n }\n\n public getState() {\n return clone(networkState);\n }\n\n private checkForNetworkStateChange() {\n if (!isEqual(this._lastKnownNetworkState, networkState)) {\n this._lastKnownNetworkState = clone(networkState);\n this.app.notify('onNetworkStateChange', this._lastKnownNetworkState);\n }\n }\n\n /**\n * Returns a promise that is resolved when server is available.\n * @returns {*}\n */\n private checkForServiceAvailiblity(): Promise<void> {\n const maxTimeout = 4500;\n return new Promise<void>(resolve => {\n const intervalId = setInterval(() => {\n if (networkState.isNetworkAvailable) {\n this.isServiceAvailable(maxTimeout).then(available => {\n if (available) {\n clearInterval(intervalId);\n resolve();\n }\n });\n }\n }, 5000);\n });\n }\n\n /**\n * Pings server to check whether server is available. Based on ping response network state is modified.\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n */\n private isServiceAvailable(maxTimeout?: number): Promise<boolean> {\n if (this.app.deployedUrl === 'NONE') {\n networkState.isServiceAvailable = false;\n networkState.noServiceRequired = true;\n return Promise.resolve(false);\n }\n return this.pingServer(maxTimeout).then(response => {\n networkState.isServiceAvailable = response;\n if (!networkState.isServiceAvailable) {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n }\n return response;\n });\n }\n\n /**\n * Pings server\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n * default timeout value is 1min.\n */\n private pingServer(maxTimeout = 60000): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n const oReq = new XML_HTTP_REQUEST();\n let baseURL = this.app.deployedUrl;\n if (baseURL && !endsWith(baseURL, '/')) {\n baseURL += '/';\n } else {\n baseURL = baseURL || '';\n }\n\n const timer = setTimeout(() => {\n oReq.abort(); // abort request\n resolve(false);\n }, maxTimeout);\n\n oReq.addEventListener('load', () => {\n if (oReq.status === 200) {\n resolve(true);\n } else {\n resolve(false);\n }\n if (timer) {\n clearTimeout(timer);\n }\n });\n\n oReq.addEventListener('error', () => resolve(false));\n oReq.open('GET', baseURL + 'services/application/wmProperties.js?t=' + Date.now());\n oReq.send();\n });\n }\n\n private setAutoConnect(flag: boolean): void {\n this._autoConnect = flag;\n localStorage.setItem(AUTO_CONNECT_KEY, '' + flag);\n }\n\n /**\n * Tries to connect to remote server. Network State will be changed based on the success of connection\n * operation and emits an event notifying the network state change.\n *\n * @param silentMode {boolean} if true and connection is successful, then no event is emitted. Otherwise,\n * events are emitted for network status change.\n * @returns {*} a promise\n */\n private tryToConnect(silentMode = false): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n this.isServiceAvailable(5000).then(() => {\n if (networkState.isServiceAvailable && this._autoConnect) {\n networkState.isConnecting = true;\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n setTimeout(() => {\n networkState.isConnecting = false;\n networkState.isConnected = true;\n localStorage.setItem(IS_CONNECTED_KEY, '' + true);\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n resolve(true);\n }, silentMode ? 0 : 5000);\n } else {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n localStorage.setItem(IS_CONNECTED_KEY, '' + false);\n reject();\n this.checkForNetworkStateChange();\n }\n });\n });\n }\n\n private tryToDisconnect(): Promise<boolean> {\n networkState.isConnected = false;\n networkState.isConnecting = false;\n this.checkForNetworkStateChange();\n localStorage.setItem(IS_CONNECTED_KEY, '' + networkState.isConnected);\n return Promise.resolve(networkState.isConnected);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { hasCordova, isIos } from '@wm/core';\n\nimport { DeviceFileCacheService } from './services/device-file-cache.service';\nimport { DeviceFileOpenerService } from './services/device-file-opener.service';\nimport { DeviceFileService } from './services/device-file.service';\nimport { DeviceService } from './services/device.service';\nimport { NetworkService } from './services/network.service';\nimport { NativeXMLHttpRequest } from './native.xhr';\n\ndeclare const cordova;\n\n@NgModule({\n declarations: [],\n imports: [],\n providers: [\n // add providers to mobile-runtime module.\n ],\n bootstrap: []\n})\nexport class MobileCoreModule {\n static initialized = false;\n // Startup services have to be added only once in the app life-cycle.\n static addStartupServices(deviceService: DeviceService,\n deviceFileService: DeviceFileService,\n fileCacheService: DeviceFileCacheService,\n fileOpener: DeviceFileOpenerService,\n networkService: NetworkService) {\n if (this.initialized) {\n return;\n }\n deviceService.addStartUpService(networkService);\n if (hasCordova()) {\n deviceService.addStartUpService(deviceFileService);\n deviceService.addStartUpService(fileCacheService);\n deviceService.addStartUpService(fileOpener);\n }\n this.initialized = true;\n }\n\n constructor(\n deviceService: DeviceService,\n deviceFileService: DeviceFileService,\n fileCacheService: DeviceFileCacheService,\n fileOpener: DeviceFileOpenerService,\n networkService: NetworkService\n ) {\n MobileCoreModule.addStartupServices(deviceService, deviceFileService, fileCacheService, fileOpener, networkService);\n const isSSLPinningEnabled = deviceService.getConfig().enableSSLPinning;\n if (hasCordova()) {\n document.addEventListener('wmDeviceReady', () => {\n if (deviceService.useNativeXHR()) {\n // ### ANGULAR9TODO###\n // Adding type as any to avoid error TS2739:\n (<any>window)['XMLHttpRequest'] = NativeXMLHttpRequest;\n if (isSSLPinningEnabled) {\n cordova.plugin.http.setServerTrustMode('pinned', () => {\n console.log('SSL Pinning enabled.!');\n }, e => {\n console.log('Failed to enable SSL Pinning. Due to: ' + e);\n }); \n }\n this.overrideResolveLocalFileSystemURL();\n }\n }, false);\n }\n }\n\n private overrideResolveLocalFileSystemURL() {\n const or = window['resolveLocalFileSystemURL'];\n window['resolveLocalFileSystemURL'] = (path, onSuccess, onError) => {\n if (path && path.startsWith('http://localhost')) {\n path = new URL(path).pathname;\n const lf = '/local-filesystem';\n if (path.startsWith(lf)) {\n path = 'file://' + path.substring(lf.length);\n }\n }\n or.call(window, path, onSuccess, onError);\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\n\nimport { convertToBlob } from '@wm/core';\nimport {forEach} from \"lodash-es\";\n\nexport interface IUploadResponse {\n text: string;\n response: any;\n headers: (string) => string;\n}\n\nexport class UploadRequest {\n\n private _files = [];\n private _params = [];\n private _headers = [];\n\n constructor (private url: string, private cordovaFile: File) {\n\n }\n\n public addFile(name: string, path: string, filename: string): UploadRequest {\n this._files.push({\n name: name,\n path: path,\n fileName: filename\n });\n return this;\n }\n\n public addHeader(name: string, value: string): UploadRequest {\n this._headers.push({\n name: name,\n value: value\n });\n return this;\n }\n\n public addParam(name: string, value: string): UploadRequest {\n this._params.push({\n name: name,\n value: value\n });\n return this;\n }\n\n public post(): Promise<IUploadResponse> {\n const formData = new FormData();\n this._params.forEach( e => formData.append(e.name, e.value));\n return Promise.all(this._files.map( e => {\n if (e.path) {\n return convertToBlob(e.path)\n .then(result => {\n return {\n name: e.name,\n fileName: e.fileName,\n blob: result.blob\n };\n });\n }\n return e;\n })).then(params => {\n params.forEach(e => formData.append(e.name, e.blob || e.path, e.fileName));\n return new Promise<IUploadResponse>((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open('POST', this.url);\n this._headers.forEach(e => request.setRequestHeader(e.name, e.value));\n request.onload = () => {\n resolve({\n headers: (name: string) => request.getResponseHeader(name),\n response: request.response,\n text: request.responseText as string\n });\n };\n request.onerror = reject;\n request.onabort = reject;\n request.send(formData);\n });\n });\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileUploadService {\n static readonly SERVICE_NAME = 'DeviceFileUploadService';\n constructor(private cordovaFile: File) {}\n\n public upload(url: string, fileParamName: string, path: string, fileName?: string, params?: any, headers?: any): Promise<IUploadResponse> {\n const req = new UploadRequest(url, this.cordovaFile)\n .addFile(fileParamName, path, fileName);\n forEach(params, (k, v) => req.addParam(k, v));\n forEach(headers, (k, v) => req.addHeader(k, v));\n return req.post();\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { App, getValidJSON } from '@wm/core';\nimport {forEach, remove, split, startsWith} from \"lodash-es\";\n\ninterface Message {\n address: string;\n data: Map<string, string>;\n}\n\ninterface Handler {\n pattern: string;\n callback: (msg: string) => any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ExtAppMessageService {\n static readonly SERVICE_NAME = 'ExtAppMessageService';\n private handlers = [];\n\n constructor(private app: App) {\n document.addEventListener('externalAppMessageReceived', e => {\n const message = (e['detail'].message) as Message;\n this.handlers.forEach(handler => {\n const matches = handler && message.address.match(handler.pattern);\n if (matches && matches.length > 0) {\n handler.callBack(message);\n }\n });\n });\n }\n\n /**\n * adds a listener for a message whose address matches with the given regex pattern.\n *\n * @param {string} messageAddressPattern a regex pattern that is used to target messages to listen.\n * @param {Function} listener function to invoke when message that matches regex is received.\n * message received will be sent as first argument.\n * @returns {Function} a function which removes the listener when invoked.\n */\n public subscribe(messageAddressPattern, listener: (msg: Message) => any) {\n const handler = {\n pattern : new RegExp(messageAddressPattern),\n callBack : listener\n };\n this.handlers.push(handler);\n return () => remove(this.handlers, handler);\n }\n\n}\n\n(function (window, document) {\n 'use strict';\n // listen app-to-app communication via url schemes\n function subString(str, begin, end) {\n end = end < 0 ? undefined : end;\n return (str && begin >= 0 && str.length > begin && str.substring(begin, end)) || undefined;\n }\n function indexOf(str, pattern) {\n return str && str.indexOf(pattern);\n }\n /**\n * returns if oAuth flow is implicit or pkce using state object in redirect_uri response.\n *\n * @param {url} string which contains access token and state information.\n * @returns {Boolean}\n */\n function getFlow(url) {\n if (!url) {\n return false;\n }\n const stateObj = url.match(/\\{([^)]+)\\}/);\n if (stateObj) {\n const parsedObj = getValidJSON('{' + stateObj[1] + '}');\n if (parsedObj && parsedObj.flow) {\n return parsedObj.flow;\n }\n }\n return false;\n }\n function extractData(url) {\n let str = subString(url, indexOf(url, '?') + 1, indexOf(url, '#'));\n const data = {}, flow = getFlow(url);\n // access token comes as a hash for implicit flow\n if (flow === 'implicit') {\n str = url.match(/access_token=([^&#]*)/)[0];\n } else if (flow === 'pkce') {\n str = url.match(/code=([^&#]*)/)[0];\n }\n forEach(split(str, '&'), entry => {\n const esplits = entry.split('=');\n data[esplits[0]] = esplits[1];\n });\n return data;\n }\n function extractAddress(url) {\n // access token comes as a hash for implicit flow\n const addressKey = getFlow(url) === 'implicit' ? '#' : '?';\n return subString(url, indexOf(url, '://') + 3, indexOf(url, addressKey));\n }\n function createMessage(url) {\n return {\n 'address': extractAddress(url),\n 'data': extractData(url)\n };\n }\n window['handleOpenURL'] = function (url) {\n const handleOpenURL = window['handleOpenURL'];\n if (handleOpenURL.isReady && !startsWith(url, 'http')) {\n const message = createMessage(url);\n const e = new window['CustomEvent']('externalAppMessageReceived', {\n 'detail': {\n 'message': message\n }\n });\n document.dispatchEvent(e);\n }\n handleOpenURL.lastURL = url;\n };\n}(window, document));\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i2","i1","i3.DeviceFileService","i2.DeviceFileService","i3.DeviceFileDownloadService","i4.DeviceFileCacheService","i5.DeviceFileDownloadService","cordova","i4.DeviceService","i1.DeviceService","i3.DeviceFileCacheService","i4.DeviceFileOpenerService","i5.NetworkService"],"mappings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K,UAAU,GAAG,GAAG,GAAG,GAAG,CAAC;QAC3D,OAAO,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC;KAC5E;IACD,SAAS,aAAa,CAAC,GAAG,EAAA;QACtB,OAAO;AACH,YAAA,SAAS,EAAE,cAAc,CAAC,GAAG,CAAC;AAC9B,YAAA,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC;SAC3B,CAAC;KACL;AACD,IAAA,MAAM,CAAC,eAAe,CAAC,GAAG,UAAU,GAAG,EAAA;AACnC,QAAA,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC9C,QAAA,IAAI,aAAa,CAAC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE;AACnD,YAAA,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;YACnC,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,4BAA4B,EAAE;AAC9D,gBAAA,QAAQ,EAAE;AACN,oBAAA,SAAS,EAAE,OAAO;AACrB,iBAAA;AACJ,aAAA,CAAC,CAAC;AACH,YAAA,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;SAC7B;AACD,QAAA,aAAa,CAAC,OAAO,GAAG,GAAG,CAAC;AAChC,KAAC,CAAC;AACN,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC;;ACvHnB;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../projects/mobile/core/src/services/device-file.service.ts","../../../../projects/mobile/core/src/services/device-file-download.service.ts","../../../../projects/mobile/core/src/services/device-file-cache.service.ts","../../../../projects/mobile/core/src/services/device-file-opener.service.ts","../../../../projects/mobile/core/src/services/device.service.ts","../../../../projects/mobile/core/src/native.xhr.ts","../../../../projects/mobile/core/src/services/network.service.ts","../../../../projects/mobile/core/src/core.module.ts","../../../../projects/mobile/core/src/services/device-file-upload.service.ts","../../../../projects/mobile/core/src/services/ext-app-message.service.ts","../../../../projects/mobile/core/src/index.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { AppVersion } from '@awesome-cordova-plugins/app-version/ngx';\nimport {File} from '@awesome-cordova-plugins/file/ngx';\n\nimport { isAndroid, noop } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport {now} from \"lodash-es\";\n\ndeclare const cordova;\ndeclare const resolveLocalFileSystemURL;\ndeclare const FileReader;\n\nexport enum FileType {\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO'\n}\n\nconst IMAGE_EXTENSIONS = ['gif', 'jpg', 'png', 'svg', 'webp', 'jpeg', 'jif', 'jfif', 'jfi'],\n VIDEO_EXTENSIONS = ['mp4', 'mpg', 'avi', 'wma', 'mp2', '3gp', '3g2', 'm4p', 'm4v', 'mpg', 'fiv'],\n AUDIO_EXTENSIONS = ['mp3', 'm4p', 'aiff', 'aa', 'aax', 'wma'];\n\nconst APP_FOLDER_STRUCTURE = [{\n name : '{APP_NAME}',\n children : [{\n name : 'Media',\n children : [\n {\n name : '{APP_NAME} Images',\n fileType : FileType.IMAGE\n },\n {\n name : '{APP_NAME} Audio',\n fileType : FileType.AUDIO\n },\n {\n name : '{APP_NAME} Vedios',\n fileType : FileType.VIDEO\n },\n {\n name : '{APP_NAME} Documents',\n fileType : FileType.DOCUMENT\n }\n ]\n }]\n}];\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'DeviceFileService';\n\n private _appName: string;\n private _fileTypeVsPathMap = {\n 'temporary' : {},\n 'persistent' : {}\n };\n private _uploadDir: string;\n\n constructor(private cordovaAppVersion: AppVersion, private cordovaFile: File) {\n\n }\n\n public addMediaToGallery(filePath: string): Promise<void> {\n if (isAndroid() && this.isPersistentType(filePath)) {\n return new Promise((resolve, reject) => {\n cordova.plugins.MediaScannerPlugin.scanFile(filePath, resolve, reject);\n });\n }\n return Promise.resolve();\n }\n\n public appendToFileName(fileName: string, attachment?: string): string {\n let splits;\n attachment = attachment || '_' + now();\n fileName = fileName || 'noname';\n splits = fileName.split('.');\n if (splits.length > 1) {\n splits[splits.length - 2] = splits[splits.length - 2] + attachment;\n return splits.join('.');\n }\n return fileName + attachment;\n }\n\n public clearTemporaryStorage(): Promise<any> {\n return this.cordovaFile.removeRecursively(this.getTemporaryRootPath() + this._appName + '/', 'Media');\n }\n\n public copy(persistent: boolean, sourceFilePath: string) {\n const sourceFilename = sourceFilePath.split('/').pop(),\n destFolder = this.findFolderPath(persistent, sourceFilename),\n sourceFolder = sourceFilePath.substring(0, sourceFilePath.lastIndexOf('/'));\n return this.newFileName(destFolder, sourceFilename)\n .then( destFilename => this.cordovaFile.copyFile(sourceFolder, sourceFilename, destFolder, destFilename)\n .then(() => destFolder + destFilename));\n }\n\n public findFolderPath(persistent: boolean, fileName: string) {\n const typeMap = persistent ? this._fileTypeVsPathMap.persistent : this._fileTypeVsPathMap.temporary,\n fileType = this.findFileType(fileName);\n return typeMap[fileType] || typeMap[FileType.DOCUMENT];\n }\n\n public getPersistentRootPath(): string {\n return cordova.file.dataDirectory;\n }\n\n public getTemporaryRootPath(): string {\n return cordova.file.cacheDirectory;\n }\n\n public getUploadDirectory(): string {\n return this._uploadDir;\n }\n\n public isPersistentType(filePath: string): boolean {\n return filePath.startsWith(this.getPersistentRootPath());\n }\n\n public isValidPath(filePath: string): Promise<string> {\n let folder, fileName;\n if (!filePath) {\n return Promise.reject('File path is required');\n }\n folder = filePath.substring(0, filePath.lastIndexOf('/') + 1);\n fileName = filePath.split('/').pop();\n return this.cordovaFile.checkFile(folder, fileName)\n .then(() => filePath);\n }\n\n public listFiles(folder: string, search: string | RegExp): Promise<Map<string, any>[]> {\n return new Promise((resolve, reject) => {\n resolveLocalFileSystemURL(folder, directory => {\n if (!directory.files) {\n directory.createReader().readEntries(entries => {\n if (search) {\n entries = entries.filter(e => e.name.match(search));\n }\n entries = entries.map( e => {\n return {\n name : e.name,\n isDirectory : e.isDirectory,\n path : e.nativeURL\n };\n });\n resolve(entries);\n }, reject);\n } else {\n resolve([]);\n }\n }, reject);\n });\n }\n\n public newFileName(folder: string, fileName: string): Promise<string> {\n return this.cordovaFile.checkFile(folder, fileName)\n .then(() => {\n const extIndex = fileName.lastIndexOf('.');\n if (extIndex > 0) {\n fileName = fileName.substring(0, extIndex) + '_' + now() + '.' + fileName.substring(extIndex + 1);\n } else {\n fileName = fileName + '_' + now();\n }\n return this.newFileName(folder, fileName);\n }, () => fileName);\n }\n\n public removeFile(filePath: string): Promise<any> {\n const i = filePath.lastIndexOf('/'),\n dir = filePath.substring(0, i),\n file = filePath.substring(i + 1);\n return this.cordovaFile.removeFile(dir, file);\n }\n\n /**\n * removes the directory at the specified location.\n *\n * @param dirPath absolute path of directory\n */\n public removeDir(dirPath: string): Promise<any> {\n const i = dirPath.lastIndexOf('/'),\n parentdir = dirPath.substring(0, i + 1),\n dir = dirPath.substring(i + 1),\n movedDir = dir + now();\n return this.cordovaFile.checkDir(parentdir, dir)\n .then(() => {\n /**\n * If folder is remove directly without moving, then INVALID_MODIFICATION_ERR is thrown in android\n * when a copy operation is done with the same directory name. To avoid this, directory will be moved\n * first and removed.\n */\n return this.cordovaFile.moveDir(parentdir, dir, parentdir, movedDir)\n .then(() => this.cordovaFile.removeDir(parentdir, movedDir));\n }).catch(noop);\n }\n\n public start(): Promise<any> {\n /**\n * Default READ_CHUNK_SIZE is 256 Kb. But with that setting readJson method is failing. This is an issue\n * with cordova file plugin. So, increasing it to 512 Kb to read large database schema files (>256 Kb).\n */\n FileReader.READ_CHUNK_SIZE = 512 * 1024;\n return Promise.resolve().then(() => {\n return this.cordovaAppVersion.getAppName();\n }).then(appName => {\n const promises = [];\n this._appName = appName;\n promises.push(this.createFolderIfNotExists(this.getTemporaryRootPath(),\n APP_FOLDER_STRUCTURE,\n this._fileTypeVsPathMap.temporary));\n promises.push(this.createFolderIfNotExists(this.getPersistentRootPath(),\n APP_FOLDER_STRUCTURE,\n this._fileTypeVsPathMap.persistent));\n promises.push(this.setupUploadDirectory());\n return Promise.all(promises);\n }).then(() => {\n if (isAndroid()) {\n // this is necessary to prevent multiple file permission popup.\n return this.cordovaFile.readAsText(cordova.file.externalRootDirectory, 'random-file-for-permission').catch(noop);\n }\n });\n }\n\n public getServiceName() {\n return DeviceFileService.SERVICE_NAME;\n }\n\n private createFolderIfNotExists(parent: string, folders, fileTypeLocationMap) {\n const childPromises = [];\n if (folders) {\n folders.forEach(folder => {\n let folderPath;\n folder.name = folder.name.replace('{APP_NAME}', this._appName);\n folderPath = parent + folder.name + '/';\n if (folder.fileType && !fileTypeLocationMap[folder.fileType]) {\n fileTypeLocationMap[folder.fileType] = folderPath;\n }\n const p = this.cordovaFile.createDir(parent, folder.name, false)\n .then(() => this.createFolderIfNotExists(folderPath, folder.children, fileTypeLocationMap),\n () => this.createFolderIfNotExists(folderPath, folder.children, fileTypeLocationMap));\n childPromises.push(p);\n });\n }\n if (childPromises.length > 0) {\n return Promise.all(childPromises);\n }\n }\n\n private findFileType(fileName) {\n let extension;\n if (fileName.indexOf('.') > 0) {\n extension = fileName.split('.').pop().toLowerCase();\n if (IMAGE_EXTENSIONS.some(a => a === extension)) {\n return FileType.IMAGE;\n }\n if (VIDEO_EXTENSIONS.some(a => a === extension)) {\n return FileType.VIDEO;\n }\n if (AUDIO_EXTENSIONS.some(a => a === extension)) {\n return FileType.AUDIO;\n }\n }\n return FileType.DOCUMENT;\n }\n\n private setupUploadDirectory() {\n const uploadsDirName = 'uploads',\n appDir = cordova.file.dataDirectory;\n return this.cordovaFile.checkDir(appDir, uploadsDirName)\n .then(() => this._uploadDir = appDir + uploadsDirName,\n () => this.cordovaFile.createDir(appDir, uploadsDirName, true)\n .then(() => this._uploadDir = appDir + uploadsDirName));\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpClient,\n HttpEvent,\n HttpEventType,\n HttpHeaders,\n HttpRequest,\n HttpResponse\n} from '@angular/common/http';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\nimport { Observer } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { FileExtensionFromMimePipe } from '@wm/components/base';\n\nimport { DeviceFileService } from './device-file.service';\nimport {endsWith, find, isArray, isEmpty} from \"lodash-es\";\n\nconst MAX_CONCURRENT_DOWNLOADS = 2;\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileDownloadService {\n static readonly SERVICE_NAME = 'DeviceFileDownloadService';\n private _downloadQueue = [];\n private _concurrentDownloads = 0;\n\n constructor(\n private cordovaFile: File,\n private http: HttpClient,\n private deviceFileService: DeviceFileService,\n public fileExtensionFromMimePipe: FileExtensionFromMimePipe) {\n\n }\n\n public download(url: string, isPersistent: boolean, destFolder?: string, destFile?: string, progressObserver?: Observer<any>, headers?: any): Promise<string> {\n return this.addToDownloadQueue(url, isPersistent, destFolder, destFile, progressObserver, headers);\n }\n\n // Adds to download request queue\n private addToDownloadQueue(url: string, isPersistent: boolean, destFolder?: string, destFile?: string, progressObserver?: Observer<any>, headers?: any): Promise<string> {\n return new Promise<string>((resolve, reject) => {\n this._downloadQueue.push({\n url: url,\n headers: headers,\n isPersistent: isPersistent,\n destFolder: destFolder,\n destFile: destFile,\n resolve: resolve,\n reject: reject,\n progressObserver: progressObserver\n });\n if (this._concurrentDownloads < MAX_CONCURRENT_DOWNLOADS) {\n this.downloadNext();\n }\n });\n }\n\n private downloadNext(): void {\n if (this._downloadQueue.length > 0) {\n const req = this._downloadQueue.shift();\n this.downloadFile(req).then(filePath => {\n req.resolve(filePath);\n this.downloadNext();\n }, () => {\n req.reject();\n this.downloadNext();\n });\n }\n }\n\n // Start processing a download request\n private downloadFile(req): Promise<string> {\n let filePath, blob;\n this._concurrentDownloads++;\n\n return this.sendHttpRequest(req.url, req.progressObserver, req.headers).then((e) => {\n blob = (e as HttpResponse<Blob>).body;\n return this.getFileName(e, req, blob.type);\n }).then((fileName) => {\n if (!req.destFolder) {\n req.destFolder = this.deviceFileService.findFolderPath(req.isPersistent, fileName);\n }\n filePath = req.destFolder + fileName;\n return this.cordovaFile.writeFile(req.destFolder, fileName, blob);\n }).then(() => {\n this._concurrentDownloads--;\n return filePath;\n }, (response) => {\n this._concurrentDownloads--;\n this.cordovaFile.removeFile(req.destFolder, req.destFile);\n return Promise.reject(`Failed to downloaded ${req.url} with error ${JSON.stringify(response)}`);\n });\n }\n\n /**\n * Returns the filename\n * 1. if filename exists just return\n * 2. retrieve the filename from response headers i.e. content-disposition\n * 3. pick the filename from the end of the url\n * If filename doesnt contain the extension then extract using mimeType.\n * Generates newFileName if filename already exists.\n * @param response, download file response\n * @param req, download request params\n * @param mimeType mime type of file\n * @returns {Promise<string>}\n */\n private getFileName(response, req, mimeType) {\n const disposition = response.headers.get('Content-Disposition');\n let filename = req.destFile;\n if (!filename && disposition && disposition.indexOf('attachment') !== -1) {\n const filenameRegex = /filename[^;=\\n]*=((['\"]).*?\\2|[^;\\n]*)/;\n const matches = filenameRegex.exec(disposition);\n if (matches !== null && matches[1]) {\n filename = matches[1].replace(/['\"]/g, '');\n }\n }\n if (!filename) {\n filename = req.url.split('?')[0];\n filename = filename.split('/').pop();\n }\n\n let fileExtension;\n if (mimeType) {\n fileExtension = this.fileExtensionFromMimePipe.transform(mimeType);\n }\n let hasFileExtension;\n // one or more file extensions can have same mimeType then loop over the file extensions.\n if (isArray(fileExtension) && !isEmpty(fileExtension)) {\n hasFileExtension = find(fileExtension, extension => endsWith(filename, extension));\n //File extension will be array for some file formats\n fileExtension = fileExtension[0];\n }\n if (!hasFileExtension && !endsWith(filename, fileExtension)) {\n filename = filename + fileExtension;\n }\n\n const folder = req.destFolder || this.deviceFileService.findFolderPath(req.isPersistent, filename);\n return this.deviceFileService.newFileName(folder, filename);\n }\n\n private sendHttpRequest(url: string, progressObserver: Observer<HttpEvent<any>>, headers?: any): Promise<HttpResponse<any>> {\n let reqHeaders = new HttpHeaders();\n\n // headers\n if (headers) {\n Object.entries(headers).forEach(([k, v]) => reqHeaders = reqHeaders.append(k, v as string));\n }\n const req = new HttpRequest('GET', url, {\n headers: reqHeaders,\n responseType: 'blob',\n reportProgress: progressObserver != null\n });\n return this.http.request(req)\n .pipe(\n map(e => {\n if (progressObserver && progressObserver.next && e.type === HttpEventType.DownloadProgress) {\n progressObserver.next(e);\n }\n return e;\n }),\n filter(e => e.type === HttpEventType.Response),\n map( e => {\n if (progressObserver && progressObserver.complete) {\n progressObserver.complete();\n }\n return (e as HttpResponse<any>);\n })\n )\n .toPromise();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\n\nimport { noop } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport { DeviceFileService } from './device-file.service';\nimport { DeviceFileDownloadService } from './device-file-download.service';\n\ndeclare const cordova;\n\nconst CACHE_FILE_INDEX_NAME = 'appCache.json';\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileCacheService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'DeviceFileCacheService';\n private _cacheIndex = {};\n private _writing;\n private _saveCache;\n\n public constructor(private cordovaFile: File,\n private fileService: DeviceFileService,\n private downloadService: DeviceFileDownloadService) {\n\n }\n\n public addEntry(url, filepath): void {\n this._cacheIndex[url] = filepath;\n this.writeCacheIndexToFile();\n }\n\n public getLocalPath(url: string, downloadIfNotExists: boolean, isPersistent: boolean, forceRefresh = false): Promise<string> {\n if (forceRefresh) {\n return this.download(url, isPersistent);\n }\n const filePath = this._cacheIndex[url];\n return this.fileService.isValidPath(filePath)\n .catch(() => {\n delete this._cacheIndex[url];\n if (downloadIfNotExists) {\n return this.download(url, isPersistent);\n } else {\n return Promise.reject('No cache entry for ' + url);\n }\n });\n }\n\n public invalidateCache(): void {\n this._cacheIndex = {};\n this.writeCacheIndexToFile();\n this.fileService.clearTemporaryStorage();\n }\n\n public start(): Promise<void> {\n return this.cordovaFile.readAsText(cordova.file.dataDirectory, CACHE_FILE_INDEX_NAME)\n .then(content => {\n this._cacheIndex = JSON.parse(content);\n }, noop);\n }\n\n public getServiceName() {\n return DeviceFileCacheService.SERVICE_NAME;\n }\n\n private download(url: string, isPersistent: boolean): Promise<string> {\n return this.downloadService.download(url, isPersistent)\n .then(filepath => {\n this._cacheIndex[url] = filepath;\n this.writeCacheIndexToFile();\n return filepath;\n });\n }\n\n private writeCacheIndexToFile(): void {\n if (!this._writing) {\n this._writing = true;\n this.cordovaFile.writeFile(cordova.file.dataDirectory, CACHE_FILE_INDEX_NAME, JSON.stringify(this._cacheIndex),\n {\n replace: true\n })\n .catch(noop)\n .then(() => {\n if (this._saveCache) {\n setTimeout(() => {\n this._writing = false;\n this._saveCache = false;\n this.writeCacheIndexToFile();\n }, 5000);\n } else {\n this._writing = false;\n }\n });\n } else {\n this._saveCache = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\nimport { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';\n\nimport { isAndroid, isIos, noop } from '@wm/core';\n\nimport { DeviceFileCacheService } from './device-file-cache.service';\nimport { DeviceFileDownloadService } from './device-file-download.service';\nimport { DeviceFileService } from './device-file.service';\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport {now} from \"lodash-es\";\n\ndeclare const cordova;\ndeclare const resolveLocalFileSystemURL;\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileOpenerService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'DeviceFileOpenerService';\n\n private _downloadsFolder;\n\n constructor(private cordovaFile: File,\n private cordovaFileOpener: FileOpener,\n private fileService: DeviceFileService,\n private cacheService: DeviceFileCacheService,\n private downloadService: DeviceFileDownloadService) {\n\n }\n\n // this method returns the mime type of file from the filePath.\n public getFileMimeType(filePath): Promise<any> {\n return new Promise<any> ((resolve) => {\n // Read the file entry from the file URL\n resolveLocalFileSystemURL(filePath, fileEntry => {\n fileEntry.file(metadata => {\n resolve(metadata.type);\n });\n });\n });\n }\n\n public openRemoteFile(url: string, extension: string, fileName?: string, headers?: any): Promise<void> {\n return this.getLocalPath(url, extension, fileName, headers)\n .then(filePath => {\n return this.getFileMimeType(filePath).then(type => {\n return this.cordovaFileOpener.open(filePath, type);\n });\n });\n }\n\n public start(): Promise<void> {\n let downloadsParent;\n if (isAndroid()) {\n downloadsParent = cordova.file.externalCacheDirectory;\n } else if (isIos()) {\n downloadsParent = cordova.file.documentsDirectory + 'NoCloud/';\n } else {\n downloadsParent = cordova.file.dataDirectory;\n }\n return this.cordovaFile.createDir(downloadsParent, 'downloads', false)\n .catch(noop)\n .then(() => {\n this._downloadsFolder = downloadsParent + 'downloads/';\n });\n }\n\n public getServiceName() {\n return DeviceFileCacheService.SERVICE_NAME;\n }\n\n private generateFileName(url: string, extension: string): string {\n let fileName = url.split('?')[0];\n fileName = fileName.split('/').pop();\n fileName = this.fileService.appendToFileName(fileName, '' + now());\n if (extension) {\n return fileName.split('.')[0] + '.' + extension;\n }\n return fileName;\n }\n\n private getLocalPath(url: string, extension?: string, filename?: string, headers?: any): Promise<string> {\n return new Promise( (resolve, reject) => {\n return this.cacheService.getLocalPath(url, false, false)\n .then( filePath => {\n let fileName, i, j, fromDir, fromFile;\n // Is it part of downloaded folder.\n if (filePath.startsWith(this._downloadsFolder)) {\n resolve(filePath);\n } else {\n //Extract extension from file downloaded earlier.\n j = filePath.lastIndexOf('.');\n extension = filePath.substring(j + 1);\n fileName = filename || this.generateFileName(url, extension);\n i = filePath.lastIndexOf('/');\n fromDir = filePath.substring(0, i);\n fromFile = filePath.substring(i + 1);\n this.cordovaFile.copyFile(fromDir, fromFile, this._downloadsFolder, fileName)\n .then(() => {\n const newFilePath = this._downloadsFolder + fileName;\n this.cacheService.addEntry(url, newFilePath);\n resolve(newFilePath);\n });\n }\n }).catch(() => {\n this.downloadService.download(url, false, this._downloadsFolder, filename, undefined, headers)\n .then(filePath => {\n this.cacheService.addEntry(url, filePath);\n resolve(filePath);\n }, reject);\n });\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport {File} from '@awesome-cordova-plugins/file/ngx';\n\nimport { $appDigest, hasCordova, noop, fetchContent, isIos } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport {forEach} from \"lodash-es\";\n\ndeclare const cordova;\n\nconst REGISTRY_FILE_NAME = 'registry.info';\n\nexport interface Config {\n baseUrl: string;\n customUrlScheme: string;\n customUrl: string;\n buildTime: number;\n enableSSLPinning: boolean;\n offlineStorage: boolean;\n useNativeXHR: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceService {\n static readonly SERVICE_NAME = 'DeviceService';\n\n private _registry = {};\n private _isReady = false;\n private _whenReadyPromises = [];\n private _backBtnTapListeners = [];\n private _startUpServices: IDeviceStartUpService[] = [];\n private _config: Config = {} as Config;\n\n public constructor(private file: File) {\n const maxWaitTime = 10;\n setTimeout(() => {\n if (!this._isReady) {\n console.warn(`Device is not ready even after ${maxWaitTime} seconds`);\n console.warn('Waiting For %O', this._startUpServices.map(i => i.getServiceName()));\n }\n }, maxWaitTime * 1000);\n document.addEventListener('backbutton', this.executeBackTapListeners.bind(this));\n if (hasCordova()) {\n const port = location.port ? ':' + location.port : '';\n const configUrl = `${location.protocol}//${location.hostname}${port}${isIos() ? '' : '/_www'}/config.json`;\n fetchContent('json', configUrl, true, (response => {\n if (!response.error && response.baseUrl) {\n this._config = response;\n }\n }));\n }\n }\n\n public executeBackTapListeners($event) {\n forEach(this._backBtnTapListeners, fn => {\n return fn($event) !== false;\n });\n // explicitly applying the digest cycle as the backbutton listener is not rendering the page content.\n // This is because zone is not run (there is no change detection)\n // https://weblogs.thinktecture.com/thomas/2017/02/cordova-vs-zonejs-or-why-is-angulars-document-event-listener-not-in-a-zone.html\n $appDigest();\n }\n\n public addStartUpService(service: IDeviceStartUpService) {\n this._startUpServices.push(service);\n }\n\n public onBackButtonTap(fn: ($event) => boolean) {\n this._backBtnTapListeners.unshift(fn);\n return () => {\n const i = this._backBtnTapListeners.indexOf(fn);\n if (i >= 0) {\n this._backBtnTapListeners.splice(i, 1);\n }\n };\n }\n\n public start() {\n if (this._isReady || this._startUpServices.length === 0) {\n this._isReady = true;\n return Promise.resolve();\n } else {\n return new Promise<void>((resolve) => {\n if (hasCordova()) {\n document.addEventListener('deviceready', () => resolve(), false);\n } else {\n resolve();\n }\n }).then(() => {\n if (window['cordova']) {\n return this.file.readAsText(cordova.file.dataDirectory, REGISTRY_FILE_NAME)\n .then(content => this._registry = JSON.parse(content), noop);\n }\n }).then(() => {\n return Promise.all(this._startUpServices.map(s => {\n return s.start().catch((error) => {\n console.error('%s failed to start due to: %O', s.getServiceName(), error);\n return Promise.reject(error);\n });\n }));\n }).then(() => {\n window['wmDeviceReady'] = true;\n document.dispatchEvent(new CustomEvent('wmDeviceReady'));\n this._startUpServices.length = 0;\n this._whenReadyPromises.forEach(fn => fn());\n this._isReady = true;\n });\n }\n }\n\n public getServiceName() {\n return DeviceService.SERVICE_NAME;\n }\n\n public whenReady(): Promise<void> {\n if (this._isReady) {\n return Promise.resolve();\n } else {\n return new Promise<void>((resolve) => {\n this._whenReadyPromises.push(resolve);\n });\n }\n }\n\n public getBaseUrl() {\n return this._config.baseUrl === 'http://NOSERVERREQUIRED.com' ? 'NONE' : this._config.baseUrl;\n }\n\n public isAppConnectedToPreview() {\n return this._config.customUrl !== this._config.baseUrl && this.getBaseUrl() !== 'NONE';\n }\n\n public getConfig(): Config {\n return this._config;\n }\n\n public useNativeXHR() {\n return (isIos() || this._config.useNativeXHR === true)\n && hasCordova()\n && cordova.plugin\n && cordova.plugin.http;\n }\n\n /**\n * @returns {Promise<number>} promise resolved with the app build time\n */\n public getAppBuildTime(): Promise<number> {\n return Promise.resolve(this._config.buildTime);\n }\n\n /**\n * Stores an entry that survives app restarts and updates.\n *\n * @param {string} key\n * @param {Object} value\n * @returns {Promise<any>}\n */\n public storeEntry(key: string, value: Object): Promise<any> {\n this._registry[key] = value;\n return this.file.writeFile(cordova.file.dataDirectory,\n REGISTRY_FILE_NAME,\n JSON.stringify(this._registry),\n { replace: true });\n }\n\n /**\n * @param {string} key\n * @returns {any} entry corresponding to the key\n */\n public getEntry(key: string): any {\n return this._registry[key];\n }\n}\n","import { isIos } from '@wm/core';\n\nconst _XMLHttpRequest = window['XMLHttpRequest'];\nconst cordova = window['cordova'];\n\n\nconst enum EVENT {\n LOAD_START = 'loadstart',\n LOAD = 'load',\n LOAD_END = 'loadend',\n PROGRESS = 'progress',\n ERROR = 'error',\n ABORT = 'abort'\n}\n\nconst STATUS_TEXT = {\n '100': '100 Continue',\n '101': '101 Switching Protocol',\n '102': '102 Processing (WebDAV)',\n '103': '103 Early Hints',\n\n '200': '200 OK',\n '201': '201 Created',\n '202': '202 Accepted',\n '203': '203 Non-Authoritative Information',\n '204': '204 No Content',\n '205': '205 Reset Content',\n '206': '206 Partial Content',\n '207': '207 Multi-Status (WebDAV)',\n '208': '208 Already Reported (WebDAV)',\n '226': '226 IM Used (HTTP Delta encoding)',\n\n '300': '300 Multiple Choice',\n '301': '301 Moved Permanently',\n '302': '302 Found',\n '303': '303 See Other',\n '304': '304 Not Modified',\n '305': '305 Use Proxy',\n '306': '306 unused',\n '307': '307 Temporary Redirect',\n '308': '308 Permanent Redirect'\n};\n\nclass Internals {\n xhr = new _XMLHttpRequest();\n method = 'GET';\n requestHeaders = {};\n responseHeaders = {};\n responseHeaderText = '';\n url = '';\n async = true;\n listeners = {};\n\n constructor(public nXhr: NativeXMLHttpRequest) {}\n\n public triggerListeners(eventName: string, data?: any): void {\n const listeners = this.listeners[eventName];\n if (listeners) {\n listeners.forEach(function (l) {\n l.apply(window, data);\n });\n }\n }\n\n public copyNativeResponse(res): void {\n this.nXhr.status = res.status;\n this.nXhr.statusText = res.statusText || res.status;\n this.nXhr.response = res.data;\n this.nXhr.responseType = (res.headers && res.headers['content-type']) || 'plain/text';\n this.nXhr.responseURL = res.responseURL;\n this.nXhr.responseXML = res.responseXML;\n this.nXhr.responseText = (res.data && res.data.toString()) || res.error;\n this.responseHeaderText = ((): string => {\n const headers = [];\n for (let k in res.headers) {\n headers.push(k + ': ' + res.headers[k]);\n }\n return headers.join('\\r\\n');\n })();\n }\n\n public copyXMLHttpResponse(req: any): void {\n this.nXhr.status = req.status;\n this.nXhr.statusText = req.statusText;\n this.nXhr.response = req.response;\n this.nXhr.responseType = req.responseType;\n this.nXhr.responseURL = req.responseURL;\n this.nXhr.responseXML = req.responseXML;\n this.nXhr.responseText = req.responseText;\n this.responseHeaderText = req.getAllResponseHeaders();\n this.nXhr.readyState = req.readyState;\n this.nXhr.getResponseHeader = header => req.getResponseHeader(header);\n }\n\n public sendViaXhr(body) {\n const self = this;\n this.xhr.onreadystatechange = () => {\n self.copyXMLHttpResponse(self.xhr);\n this.nXhr.onreadystatechange && this.nXhr.onreadystatechange();\n }\n this.xhr.onload = function() {\n self.copyXMLHttpResponse(self.xhr);\n if (self.nXhr.onload) {\n self.nXhr.onload.apply(self.nXhr, arguments);\n }\n };\n this.xhr.onerror = this.nXhr.onerror;\n if (!this.async) {\n this.xhr.ontimeout = this.nXhr.ontimeout;\n this.xhr.timeout = this.nXhr.timeout;\n }\n this.xhr.withCredentials = this.nXhr.withCredentials;\n for (let k in this.listeners) {\n this.xhr.addEventListener(k, e => {\n this.copyXMLHttpResponse(this.xhr);\n this.triggerListeners(e.type);\n });\n }\n this.xhr.send(body);\n }\n\n public close() {\n for (let k in this.listeners) {\n this.listeners[k].length = 0;\n }\n }\n}\n\nexport class NativeXMLHttpRequest {\n public onreadystatechange = null;\n public readyState = 0;\n public response = null;\n public responseType = null;\n public responseText = null;\n public responseURL = null;\n public responseXML = null;\n public status = 0;\n public statusText = '';\n public ontimeout = null;\n public onload = null;\n public onloadend = null;\n public onerror = null;\n public timeout = 0;\n public withCredentials = false;\n private progress = {\n lengthComputable: false,\n loaded : 0,\n total: 0,\n close: (success = false): void => {}\n };\n public upload = {\n addEventListener : this.addEventListener.bind(this)\n };\n private _internal = new Internals(this);\n\n public abort() {\n this.status = -1;\n this._internal.triggerListeners(EVENT.ERROR);\n this.onerror && this.onerror();\n this._internal.xhr.abort();\n this.close();\n }\n\n public getResponseHeader(name: string) {\n return this.response.headers[name];\n }\n\n public getAllResponseHeaders() {\n return this._internal.responseHeaderText;\n }\n\n public setRequestHeader(header: string, value: string) {\n this._internal.requestHeaders[header] = value;\n this._internal.xhr.setRequestHeader(header, value);\n }\n\n public overrideMimeType(mime: string) {\n this._internal.xhr.overrideMimeType(mime);\n }\n\n public open(method: string, url: string, async = true, user?: string, password?: string) {\n this._internal.method = method;\n this._internal.url = url;\n this._internal.async = async;\n this._internal.xhr.open(method, url, async, user, password);\n }\n\n public send(body?: any, useBrowserXHR = false) {\n if (useBrowserXHR\n || this._internal.url.startsWith('http://localhost')\n || !this._internal.url.startsWith('http')) {\n this._internal.sendViaXhr(body);\n } else if (this.responseType === 'blob') {\n this.sendBlobViaNativePlugin(body);\n } else {\n this.sendViaNativePlugin(body);\n }\n };\n\n public addEventListener(eventName: string, handler: () => any) {\n this._internal.listeners[eventName] = this._internal.listeners[eventName] || [];\n this._internal.listeners[eventName].push(handler);\n }\n\n public removeEventListener(eventName: string, handler: () => any) {\n if (this._internal.listeners[eventName]) {\n const i = this._internal.listeners[eventName].indexOf(handler);\n this._internal.listeners[eventName].splice(i, 1);\n }\n }\n\n private prepareOptions(body: any) {\n body = body || {};\n const options = {\n headers: {},\n data: body,\n method: this._internal.method,\n serializer: 'raw'\n };\n\n if (body != null && body != undefined) {\n if (body.constructor && body.constructor.toString().indexOf('FormData()') >= 0) {\n options.serializer = 'multipart';\n this.startProgress();\n } else if(typeof body === 'string') {\n options.serializer = 'utf8';\n } else {\n options.serializer = 'urlencoded';\n }\n }\n for (let key in this._internal.requestHeaders) {\n options.headers[key] = this._internal.requestHeaders[key];\n }\n return options;\n }\n\n /*\n * Native plugin didn't provide any API to track upload progress.\n * This method generates a synthetic event which does not co-relates with the actual upload progress.\n */\n private startProgress(total?) {\n const _1mb = 1024 * 1024 * 8;\n total = total || _1mb;\n const interval = Math.ceil(total / _1mb) * 200;\n const slice = Math.ceil(total / _1mb) * (_1mb / 10);\n this.progress = {\n lengthComputable: true,\n loaded : 0,\n total: total,\n close: null\n };\n const triggerEvent = () => {\n this._internal.triggerListeners(EVENT.PROGRESS, [{\n lengthComputable: true,\n total: this.progress.total,\n loaded: this.progress.loaded\n }]);\n };\n const intervalId = setInterval(() => {\n if(this.progress.loaded + slice < total) {\n this.progress.loaded += slice;\n }\n triggerEvent();\n }, interval);\n this.progress.close = (success = false) => {\n if (success) {\n this.progress.loaded = this.progress.total;\n }\n triggerEvent();\n clearInterval(intervalId);\n };\n }\n\n private sendBlobViaNativePlugin(body: any): void {\n const options = this.prepareOptions(body);\n const tempfile = (isIos() ? cordova.file.tempDirectory : cordova.file.cacheDirectory) + Date.now();\n const timerId = setTimeout(() => {\n if(this.timeout > 0) {\n console.error('network call with request %O failed with timeout', this);\n this._internal.triggerListeners(EVENT.LOAD);\n this._internal.triggerListeners(EVENT.ERROR);\n this.onerror && this.onerror();\n this.ontimeout && this.ontimeout();\n this.close();\n }\n }, this.timeout > 0 ? this.timeout : 1);\n const onSuccess = (file, response) => {\n const res = {\n headers: (response && response.headers) || {},\n status: 200,\n data: file\n };\n let contentType = (response && response.headers && response.headers['content-type']);\n if (contentType) {\n res.data.type = contentType.split(';')[0];\n }\n console.log('network call with request %O successed with response : %O', this, res);\n this._internal.copyNativeResponse(res);\n this._internal.triggerListeners(EVENT.LOAD);\n this.onload && this.onload();\n this.onloadend && this.onloadend();\n clearTimeout(timerId);\n this.readyState = 4;\n this.onreadystatechange && this.onreadystatechange();\n };\n const onError = (response) => {\n console.error('network call with request %O failed with response : %O', this, response);\n this._internal.triggerListeners(EVENT.LOAD, [response]);\n this._internal.triggerListeners(EVENT.ERROR, [response]);\n this.onerror && this.onerror();\n this.onloadend && this.onloadend();\n clearTimeout(timerId);\n this.readyState = 4;\n this.onreadystatechange && this.onreadystatechange();\n };\n cordova.plugin.http.downloadFile(new URL(this._internal.url).href, {}, options.headers, tempfile,\n (entry, response) => {\n entry.file(f => onSuccess(f, response), onError);\n }, onError);\n \n this.readyState = 1;\n this.onreadystatechange && this.onreadystatechange();\n }\n\n private sendViaNativePlugin(body: any) {\n const options = this.prepareOptions(body);\n const timerId = setTimeout(() => {\n if(this.timeout > 0) {\n console.error('network call with request %O failed with timeout', this);\n this._internal.triggerListeners(EVENT.LOAD);\n this._internal.triggerListeners(EVENT.ERROR);\n this.ontimeout && this.ontimeout();\n this.close();\n }\n }, this.timeout > 0 ? this.timeout : 1);\n new Promise((resolve, reject) => {\n cordova.plugin.http.sendRequest(new URL(this._internal.url).href, options, resolve, reject);\n this.readyState = 1;\n this.onreadystatechange && this.onreadystatechange();\n }).then(response => {\n console.log('network call with request %O successed with response : %O', this, response);\n this.progress.close(true);\n this._internal.copyNativeResponse(response);\n this._internal.triggerListeners(EVENT.LOAD);\n this.onload && this.onload();\n this.onloadend && this.onloadend();\n }, response => {\n this.progress.close();\n this._internal.copyNativeResponse(response);\n console.error('network call with request %O failed with response : %O', this, response);\n this._internal.triggerListeners(EVENT.LOAD, [response]);\n this._internal.triggerListeners(EVENT.ERROR, [response]);\n this.onerror && this.onerror();\n this.onloadend && this.onloadend();\n }).finally(() => {\n this.readyState = 4;\n this.onreadystatechange && this.onreadystatechange();\n clearTimeout(timerId);\n });\n }\n\n private close() {\n this.ontimeout = null;\n this.onload = null;\n this.onerror = null;\n this.onreadystatechange = null;\n this._internal.close();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Network } from '@awesome-cordova-plugins/network/ngx';\n\nimport { App, getAbortableDefer, hasCordova, isIos, noop, retryIfFails } from '@wm/core';\n\nimport { IDeviceStartUpService } from './device-start-up-service';\nimport { NativeXMLHttpRequest } from './../native.xhr';\nimport { DeviceService } from './device.service';\nimport {clone, endsWith, find, get, isEqual, startsWith} from \"lodash-es\";\n\ndeclare const navigator;\n\nconst AUTO_CONNECT_KEY = 'WM.NetworkService._autoConnect',\n IS_CONNECTED_KEY = 'WM.NetworkService.isConnected',\n excludedList = [new RegExp('/wmProperties.js')],\n networkState = {\n isConnecting : false,\n isConnected : true,\n isNetworkAvailable : true,\n isServiceAvailable : true,\n noServiceRequired: false\n };\n\nlet XML_HTTP_REQUEST = null;\n\n/**\n * If server is not connected and url does not match the unblock list of regular expressions,\n * then this function return true. Otherwise, return false.\n * @param url\n * @returns {boolean}\n */\nconst blockUrl = url => {\n let block = !networkState.isConnected && startsWith(url, 'http');\n if (block) {\n block = !find(excludedList, regExp => regExp.test(url));\n }\n return block;\n};\n\nconst getXMLHttpRequestToUse = ((useNativeXHR: boolean) => {\n const clazz = useNativeXHR ? NativeXMLHttpRequest : XMLHttpRequest;\n const orig = clazz.prototype.open;\n // Intercept all XHR calls\n clazz.prototype.open = function (method: string, url: string, async: boolean = true, user?: string, password?: string) {\n if (!networkState.noServiceRequired && blockUrl(url)) {\n const urlSplits = url.split('://');\n const pathIndex = urlSplits[1].indexOf('/');\n urlSplits[1] = 'localhost' + (pathIndex > 0 ? urlSplits[1].substr(pathIndex) : '/');\n url = urlSplits.join('://');\n }\n return orig.apply(this, [method, url, async, user, password]);\n };\n return clazz;\n});\n\n@Injectable({ providedIn: 'root' })\nexport class NetworkService implements IDeviceStartUpService {\n static readonly SERVICE_NAME = 'NetworkService';\n\n private _autoConnect = localStorage.getItem(AUTO_CONNECT_KEY) !== 'false';\n private _lastKnownNetworkState: any;\n private _isCheckingServer = false;\n\n constructor(private httpClient: HttpClient, private app: App, private network: Network, private deviceService: DeviceService) {\n networkState.isConnected = localStorage.getItem(IS_CONNECTED_KEY) === 'true';\n XML_HTTP_REQUEST = XML_HTTP_REQUEST || getXMLHttpRequestToUse(deviceService.useNativeXHR());\n }\n\n /**\n * This method attempts to connect app to the server and returns a promise that will be resolved with\n * a boolean value based on the operation result.\n *\n * @returns {object} promise\n */\n public connect(): Promise<boolean> {\n this.setAutoConnect(true);\n return this.tryToConnect();\n }\n\n /**\n * When the auto connect is enabled, then app is automatically connected whenever server is available.\n * Every time when app goes offline, auto connect is enabled. Before app coming to online, one can disable\n * the auto connection flow using this method.\n */\n public disableAutoConnect = () => this.setAutoConnect(false);\n\n /**\n * This method disconnects the app from the server and returns a promise that will be resolved with\n * a boolean value based on the operation result. Use connect method to reconnect.\n *\n * @returns {object} promise\n */\n public disconnect(): Promise<boolean> {\n const p = this.tryToDisconnect();\n this.disableAutoConnect();\n return p;\n }\n\n /**\n * If pingServer is true, then it returns a promise that will be resolved with boolean based on service availability\n * check.If pingServer is false, returns a boolean value based on the last known service availability.\n *\n * @returns {boolean} if pingServer is true, then a promise is returned. Otherwise, a boolean value.\n */\n public isAvailable(pingServer = false): boolean | Promise<boolean> {\n if (pingServer) {\n return this.isServiceAvailable().then(() => {\n this.checkForNetworkStateChange();\n return networkState.isServiceAvailable;\n });\n }\n return networkState.isServiceAvailable;\n }\n\n /**\n * Returns true, if app is connected to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true, if app is connected to server. Otherwise, returns false.\n */\n public isConnected = () => {\n // checking for connection type.\n if (get(navigator, 'connection') && navigator.connection.type) {\n networkState.isConnected = networkState.isConnected && (navigator.connection.type !== 'none');\n }\n this.checkForNetworkStateChange();\n return networkState.isConnected;\n }\n\n /**\n * Returns true if app is trying to connect to server. Otherwise, returns false.\n *\n * @returns {boolean} Returns true if app is trying to connect to server. Otherwise, returns false.\n */\n public isConnecting = () => networkState.isConnecting;\n\n /**\n * This method returns a promise that is resolved when connection is established with server.\n *\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public onConnect() {\n let defer,\n cancelSubscription;\n if (this.isConnected()) {\n return Promise.resolve();\n }\n defer = getAbortableDefer();\n cancelSubscription = this.app.subscribe('onNetworkStateChange', () => {\n if (this.isConnected()) {\n defer.resolve(true);\n cancelSubscription();\n }\n });\n defer.promise.catch(function () {\n cancelSubscription();\n });\n return defer.promise;\n }\n\n /**\n * This is a util method. If fn cannot execute successfully and network lost connection, then the fn will\n * be invoked when network is back. The returned can also be aborted.\n *\n * @param {function()} fn method to invoke.\n * @returns {object} promise a promise that is resolved with the returned object of fn\n */\n public retryIfNetworkFails(fn) {\n const defer = getAbortableDefer();\n retryIfFails(fn, 0, 0, () => {\n let onConnectPromise;\n if (!this.isConnected()) {\n onConnectPromise = this.onConnect();\n defer.promise.catch(function () {\n onConnectPromise.abort();\n });\n return onConnectPromise;\n }\n return false;\n }).then(defer.resolve, defer.reject);\n return defer.promise;\n }\n\n public start(): Promise<any> {\n if (window['cordova']) {\n // Connection constant will be available only when network plugin is included.\n if (window['Connection'] && navigator.connection) {\n networkState.isNetworkAvailable = navigator.connection.type !== 'none';\n networkState.isConnected = networkState.isNetworkAvailable && networkState.isConnected;\n /*\n * When the device comes online, check is the service is available. If the service is available and auto\n * connect flag is true, then app is automatically connected to remote server.\n */\n this.network.onConnect().subscribe(() => {\n networkState.isNetworkAvailable = true;\n this.tryToConnect().catch(noop);\n });\n\n /*\n *When device goes offline, then change the network state and emit that notifies about network state change.\n */\n this.network.onDisconnect().subscribe(() => {\n networkState.isNetworkAvailable = false;\n networkState.isServiceAvailable = false;\n this.tryToDisconnect();\n });\n\n this.app.subscribe('onNetworkStateChange', (data) => {\n /**\n * If network is available and server is not available,then\n * try to connect when server is available.\n */\n if (data.isNetworkAvailable && !data.isServiceAvailable && !this._isCheckingServer && !data.noServiceRequired) {\n this._isCheckingServer = true;\n this.checkForServiceAvailiblity().then(() => {\n this._isCheckingServer = false;\n this.connect();\n }, () => {\n this._isCheckingServer = false;\n });\n }\n });\n }\n }\n // to set the default n/w connection values.\n return this.tryToConnect(true).catch(noop);\n }\n\n public getServiceName() {\n return NetworkService.SERVICE_NAME;\n }\n\n /**\n * This function adds the given regular expression to the unblockList. Even app is in offline mode,\n * the urls matching with the given regular expression are not blocked by NetworkService.\n *\n * @param {string} urlRegex regular expression\n */\n public unblock(urlRegex: string) {\n excludedList.push(new RegExp(urlRegex));\n }\n\n public getState() {\n return clone(networkState);\n }\n\n private checkForNetworkStateChange() {\n if (!isEqual(this._lastKnownNetworkState, networkState)) {\n this._lastKnownNetworkState = clone(networkState);\n this.app.notify('onNetworkStateChange', this._lastKnownNetworkState);\n }\n }\n\n /**\n * Returns a promise that is resolved when server is available.\n * @returns {*}\n */\n private checkForServiceAvailiblity(): Promise<void> {\n const maxTimeout = 4500;\n return new Promise<void>(resolve => {\n const intervalId = setInterval(() => {\n if (networkState.isNetworkAvailable) {\n this.isServiceAvailable(maxTimeout).then(available => {\n if (available) {\n clearInterval(intervalId);\n resolve();\n }\n });\n }\n }, 5000);\n });\n }\n\n /**\n * Pings server to check whether server is available. Based on ping response network state is modified.\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n */\n private isServiceAvailable(maxTimeout?: number): Promise<boolean> {\n if (this.app.deployedUrl === 'NONE') {\n networkState.isServiceAvailable = false;\n networkState.noServiceRequired = true;\n return Promise.resolve(false);\n }\n return this.pingServer(maxTimeout).then(response => {\n networkState.isServiceAvailable = response;\n if (!networkState.isServiceAvailable) {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n }\n return response;\n });\n }\n\n /**\n * Pings server\n * @returns {*} a promise that resolved with true, if server responds with valid status.\n * Otherwise, the promise is resolved with false.\n * default timeout value is 1min.\n */\n private pingServer(maxTimeout = 60000): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n const oReq = new XML_HTTP_REQUEST();\n let baseURL = this.app.deployedUrl;\n if (baseURL && !endsWith(baseURL, '/')) {\n baseURL += '/';\n } else {\n baseURL = baseURL || '';\n }\n\n const timer = setTimeout(() => {\n oReq.abort(); // abort request\n resolve(false);\n }, maxTimeout);\n\n oReq.addEventListener('load', () => {\n if (oReq.status === 200) {\n resolve(true);\n } else {\n resolve(false);\n }\n if (timer) {\n clearTimeout(timer);\n }\n });\n\n oReq.addEventListener('error', () => resolve(false));\n oReq.open('GET', baseURL + 'services/application/wmProperties.js?t=' + Date.now());\n oReq.send();\n });\n }\n\n private setAutoConnect(flag: boolean): void {\n this._autoConnect = flag;\n localStorage.setItem(AUTO_CONNECT_KEY, '' + flag);\n }\n\n /**\n * Tries to connect to remote server. Network State will be changed based on the success of connection\n * operation and emits an event notifying the network state change.\n *\n * @param silentMode {boolean} if true and connection is successful, then no event is emitted. Otherwise,\n * events are emitted for network status change.\n * @returns {*} a promise\n */\n private tryToConnect(silentMode = false): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n this.isServiceAvailable(5000).then(() => {\n if (networkState.isServiceAvailable && this._autoConnect) {\n networkState.isConnecting = true;\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n setTimeout(() => {\n networkState.isConnecting = false;\n networkState.isConnected = true;\n localStorage.setItem(IS_CONNECTED_KEY, '' + true);\n if (!silentMode) {\n this.checkForNetworkStateChange();\n }\n resolve(true);\n }, silentMode ? 0 : 5000);\n } else {\n networkState.isConnecting = false;\n networkState.isConnected = false;\n localStorage.setItem(IS_CONNECTED_KEY, '' + false);\n reject();\n this.checkForNetworkStateChange();\n }\n });\n });\n }\n\n private tryToDisconnect(): Promise<boolean> {\n networkState.isConnected = false;\n networkState.isConnecting = false;\n this.checkForNetworkStateChange();\n localStorage.setItem(IS_CONNECTED_KEY, '' + networkState.isConnected);\n return Promise.resolve(networkState.isConnected);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { hasCordova, isIos } from '@wm/core';\n\nimport { DeviceFileCacheService } from './services/device-file-cache.service';\nimport { DeviceFileOpenerService } from './services/device-file-opener.service';\nimport { DeviceFileService } from './services/device-file.service';\nimport { DeviceService } from './services/device.service';\nimport { NetworkService } from './services/network.service';\nimport { NativeXMLHttpRequest } from './native.xhr';\n\ndeclare const cordova;\n\n@NgModule({\n declarations: [],\n imports: [],\n providers: [\n // add providers to mobile-runtime module.\n ],\n bootstrap: []\n})\nexport class MobileCoreModule {\n static initialized = false;\n // Startup services have to be added only once in the app life-cycle.\n static addStartupServices(deviceService: DeviceService,\n deviceFileService: DeviceFileService,\n fileCacheService: DeviceFileCacheService,\n fileOpener: DeviceFileOpenerService,\n networkService: NetworkService) {\n if (this.initialized) {\n return;\n }\n deviceService.addStartUpService(networkService);\n if (hasCordova()) {\n deviceService.addStartUpService(deviceFileService);\n deviceService.addStartUpService(fileCacheService);\n deviceService.addStartUpService(fileOpener);\n }\n this.initialized = true;\n }\n\n constructor(\n deviceService: DeviceService,\n deviceFileService: DeviceFileService,\n fileCacheService: DeviceFileCacheService,\n fileOpener: DeviceFileOpenerService,\n networkService: NetworkService\n ) {\n MobileCoreModule.addStartupServices(deviceService, deviceFileService, fileCacheService, fileOpener, networkService);\n const isSSLPinningEnabled = deviceService.getConfig().enableSSLPinning;\n if (hasCordova()) {\n document.addEventListener('wmDeviceReady', () => {\n if (deviceService.useNativeXHR()) {\n // ### ANGULAR9TODO###\n // Adding type as any to avoid error TS2739:\n (<any>window)['XMLHttpRequest'] = NativeXMLHttpRequest;\n if (isSSLPinningEnabled) {\n cordova.plugin.http.setServerTrustMode('pinned', () => {\n console.log('SSL Pinning enabled.!');\n }, e => {\n console.log('Failed to enable SSL Pinning. Due to: ' + e);\n }); \n }\n this.overrideResolveLocalFileSystemURL();\n }\n }, false);\n }\n }\n\n private overrideResolveLocalFileSystemURL() {\n const or = window['resolveLocalFileSystemURL'];\n window['resolveLocalFileSystemURL'] = (path, onSuccess, onError) => {\n if (path && path.startsWith('http://localhost')) {\n path = new URL(path).pathname;\n const lf = '/local-filesystem';\n if (path.startsWith(lf)) {\n path = 'file://' + path.substring(lf.length);\n }\n }\n or.call(window, path, onSuccess, onError);\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { File } from '@awesome-cordova-plugins/file/ngx';\n\nimport { convertToBlob } from '@wm/core';\nimport {forEach} from \"lodash-es\";\n\nexport interface IUploadResponse {\n text: string;\n response: any;\n headers: (string) => string;\n}\n\nexport class UploadRequest {\n\n private _files = [];\n private _params = [];\n private _headers = [];\n\n constructor (private url: string, private cordovaFile: File) {\n\n }\n\n public addFile(name: string, path: string, filename: string): UploadRequest {\n this._files.push({\n name: name,\n path: path,\n fileName: filename\n });\n return this;\n }\n\n public addHeader(name: string, value: string): UploadRequest {\n this._headers.push({\n name: name,\n value: value\n });\n return this;\n }\n\n public addParam(name: string, value: string): UploadRequest {\n this._params.push({\n name: name,\n value: value\n });\n return this;\n }\n\n public post(): Promise<IUploadResponse> {\n const formData = new FormData();\n this._params.forEach( e => formData.append(e.name, e.value));\n return Promise.all(this._files.map( e => {\n if (e.path) {\n return convertToBlob(e.path)\n .then(result => {\n return {\n name: e.name,\n fileName: e.fileName,\n blob: result.blob\n };\n });\n }\n return e;\n })).then(params => {\n params.forEach(e => formData.append(e.name, e.blob || e.path, e.fileName));\n return new Promise<IUploadResponse>((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open('POST', this.url);\n this._headers.forEach(e => request.setRequestHeader(e.name, e.value));\n request.onload = () => {\n resolve({\n headers: (name: string) => request.getResponseHeader(name),\n response: request.response,\n text: request.responseText as string\n });\n };\n request.onerror = reject;\n request.onabort = reject;\n request.send(formData);\n });\n });\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class DeviceFileUploadService {\n static readonly SERVICE_NAME = 'DeviceFileUploadService';\n constructor(private cordovaFile: File) {}\n\n public upload(url: string, fileParamName: string, path: string, fileName?: string, params?: any, headers?: any): Promise<IUploadResponse> {\n const req = new UploadRequest(url, this.cordovaFile)\n .addFile(fileParamName, path, fileName);\n forEach(params, (k, v) => req.addParam(k, v));\n forEach(headers, (k, v) => req.addHeader(k, v));\n return req.post();\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { App, getValidJSON } from '@wm/core';\nimport {forEach, remove, split, startsWith} from \"lodash-es\";\n\ninterface Message {\n address: string;\n data: Map<string, string>;\n}\n\ninterface Handler {\n pattern: string;\n callback: (msg: string) => any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ExtAppMessageService {\n static readonly SERVICE_NAME = 'ExtAppMessageService';\n private handlers = [];\n\n constructor(private app: App) {\n document.addEventListener('externalAppMessageReceived', e => {\n const message = (e['detail'].message) as Message;\n this.handlers.forEach(handler => {\n const matches = handler && message.address.match(handler.pattern);\n if (matches && matches.length > 0) {\n handler.callBack(message);\n }\n });\n });\n }\n\n /**\n * adds a listener for a message whose address matches with the given regex pattern.\n *\n * @param {string} messageAddressPattern a regex pattern that is used to target messages to listen.\n * @param {Function} listener function to invoke when message that matches regex is received.\n * message received will be sent as first argument.\n * @returns {Function} a function which removes the listener when invoked.\n */\n public subscribe(messageAddressPattern, listener: (msg: Message) => any) {\n const handler = {\n pattern : new RegExp(messageAddressPattern),\n callBack : listener\n };\n this.handlers.push(handler);\n return () => remove(this.handlers, handler);\n }\n\n}\n\n(function (window, document) {\n 'use strict';\n // listen app-to-app communication via url schemes\n function subString(str, begin, end) {\n end = end < 0 ? undefined : end;\n return (str && begin >= 0 && str.length > begin && str.substring(begin, end)) || undefined;\n }\n function indexOf(str, pattern) {\n return str && str.indexOf(pattern);\n }\n /**\n * returns if oAuth flow is implicit or pkce using state object in redirect_uri response.\n *\n * @param {url} string which contains access token and state information.\n * @returns {Boolean}\n */\n function getFlow(url) {\n if (!url) {\n return false;\n }\n const stateObj = url.match(/\\{([^)]+)\\}/);\n if (stateObj) {\n const parsedObj = getValidJSON('{' + stateObj[1] + '}');\n if (parsedObj && parsedObj.flow) {\n return parsedObj.flow;\n }\n }\n return false;\n }\n function extractData(url) {\n let str = subString(url, indexOf(url, '?') + 1, indexOf(url, '#'));\n const data = {}, flow = getFlow(url);\n // access token comes as a hash for implicit flow\n if (flow === 'implicit') {\n str = url.match(/access_token=([^&#]*)/)[0];\n } else if (flow === 'pkce') {\n str = url.match(/code=([^&#]*)/)[0];\n }\n forEach(split(str, '&'), entry => {\n const esplits = entry.split('=');\n data[esplits[0]] = esplits[1];\n });\n return data;\n }\n function extractAddress(url) {\n // access token comes as a hash for implicit flow\n const addressKey = getFlow(url) === 'implicit' ? '#' : '?';\n return subString(url, indexOf(url, '://') + 3, indexOf(url, addressKey));\n }\n function createMessage(url) {\n return {\n 'address': extractAddress(url),\n 'data': extractData(url)\n };\n }\n window['handleOpenURL'] = function (url) {\n const handleOpenURL = window['handleOpenURL'];\n if (handleOpenURL.isReady && !startsWith(url, 'http')) {\n const message = createMessage(url);\n const e = new window['CustomEvent']('externalAppMessageReceived', {\n 'detail': {\n 'message': message\n }\n });\n document.dispatchEvent(e);\n }\n handleOpenURL.lastURL = url;\n };\n}(window, document));\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i2","i1","i3.DeviceFileService","i2.DeviceFileService","i3.DeviceFileDownloadService","i4.DeviceFileCacheService","i5.DeviceFileDownloadService","cordova","i4.DeviceService","i1.DeviceService","i3.DeviceFileCacheService","i4.DeviceFileOpenerService","i5.NetworkService"],"mappings":";;;;;;;;;;;;;;IAcY,SAKX;AALD,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACnB,CAAC,EALW,QAAQ,KAAR,QAAQ,GAKnB,EAAA,CAAA,CAAA,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EACvF,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE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