Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. import { BrandingDetails } from './BrandingDetails';
  2.  
  3. export enum TargetPlatform {
  4. Android = 1,
  5. iOS = 2,
  6. Win10 = 4
  7. }
  8.  
  9. export enum StartupOption {
  10. StartWithDemo,
  11. StartWithSync,
  12. RequireSync
  13. }
  14.  
  15. export type CodeBase = 11.0 | 10.3 | 10.2 | 10.1;
  16. export const CodeBases = [
  17. 11.0,
  18. 10.3,
  19. 10.2,
  20. 10.1
  21. ]
  22.  
  23. export interface ImageData {
  24. name: string,
  25. image: Blob
  26. }
  27.  
  28. export interface ImageConfiguration {
  29. label: string,
  30. description: string,
  31. minWidth: number,
  32. minHeight: number,
  33. appStore: boolean,
  34. multiInput?: boolean,
  35. minCount?: number,
  36. maxCount?: number,
  37. notExact?: boolean,
  38. maxWidth?: number,
  39. maxHeight?: number,
  40. }
  41.  
  42. export interface BrandingPortalConfigFeatures {
  43. disableTutorial: boolean,
  44. disableiCloud: boolean,
  45. disableLocationTracking: boolean
  46. disableOfflineMaps: boolean
  47. openSyncDialogOnFirstStart: boolean
  48. forceInitialSync: boolean
  49. organizationPicker: string
  50. preFillOrgDataInSyncDialog: boolean
  51. orgURL: string,
  52. userMode: UserMode,
  53. domain: string,
  54. homeRealm: string,
  55. ADFSUsername: string,
  56. sharePointServerType: SharepointServerType,
  57. sharePointUserName: string,
  58. sharePointPassword: string,
  59. exchangeUrl: string,
  60. exchangeEmail: string,
  61. exchangeUserName: string,
  62. exchangePassword: string,
  63. savePassword: string,
  64. useCustomDemoData: boolean
  65. }
  66.  
  67. export enum SharepointServerType {
  68. SameAsCRM = 0,
  69. ActiveDirectory = 1,
  70. "Online(MS Office 365)" = 2,
  71. ADFS = 3
  72. }
  73.  
  74. export enum UserMode {
  75. Standard,
  76. External,
  77. Anonymous,
  78. OAuth
  79. }
  80.  
  81. export interface PlatformImages {
  82. [key: string]: ImageConfiguration
  83. }
  84.  
  85. export class BrandingPortalConfig {
  86. appName: string = '';
  87. rescoContact: string = '';
  88. codeBase: CodeBase = 11.0;
  89. appStoreDeployment: boolean = true;
  90. appEdition: string = '';
  91. packageName: string = '';
  92. backgroundColor: string = '#0064CF';
  93. targetPlatform: TargetPlatform = TargetPlatform.Android | TargetPlatform.iOS | TargetPlatform.Win10;
  94. brandingDetails: BrandingDetails = {
  95. aboutLogo: null,
  96. appSubTitle: "",
  97. appTitle: "",
  98. manufacturer: ""
  99. };
  100.  
  101. brandingFeatures = {
  102. disableTutorial: true, // "Hides the tutorial shown during the first start and from About window."
  103. disableSyncWizard: true, // "Disables the wizard shown before the first synchronization which guides user through the sync details (including the Resco CRM organization registration)."
  104. disableiCloud: true, // "Disables function loading document from iCloud. Enable this option if the iOS provisioning profile is linked to App ID having active iCloud container."
  105. disableGlympse: true, // "Disables the background GPS position monitoring via Glympse service.Enabling requires special entitlements on iOS and significantly increases the installation size."
  106. disableLocationTracking: false, // "Disables the background GPS position monitoring via Resco service.Enabling requires special entitlements on iOS."
  107. disableOfflineMaps: true, // "Disables the MapBox provider implementing the offline maps function. Enabling significantly increases the installation size."
  108. openSyncDialogOnFirstStart: false, // "Forces the app to start the sync dialog on the very first start (after installation)."
  109. forceInitialSync: false, // [only if Sync on 1st start is enabled], "Prevents user to closed initial sync dialog."
  110. organizationPicker: '', //[input box with comma - delimited alphanumeric names], "Sync dialog will contain a combo-box for choosing organization URL from instead of typing it manually."
  111. preFillOrgDataInSyncDialog: false, // it should automatically disable "Sync Wizard" option User Mode(Standard/ External / Anonymous / OAuth)
  112. orgURL: '',
  113. userMode: UserMode.Standard,
  114. domain: '',
  115. homeRealm: '',
  116. ADFSUsername: '',
  117. sharePointServerType: SharepointServerType.SameAsCRM,
  118. sharePointUserName: '',
  119. sharePointPassword: '',
  120. exchangeUrl: '',
  121. exchangeEmail: '',
  122. exchangeUserName: '',
  123. exchangePassword: '',
  124. savePassword: '',
  125. useCustomDemoData: false, // "Overrides default app data and configuration. The legacy (demo) configuration is applied immediately after the app is launched for the very first time (after installation). When user synchronizes with the target organization (Resco CRM/Dynamics 365/SalesForce), this configuration is thrown away and the app automatically takes the configuration from the server (as it was configured for that organization with Woodford)."
  126. demoDataOrgURL: '',
  127. demoDataUserMode: UserMode.Standard,
  128. demoDataUserName: '',
  129. demoDataPassword: '',
  130. };
  131.  
  132. androidImages?: ImageData[];
  133. googlePlayImages?: ImageData[];
  134. googlePayTexts?: Blob;
  135.  
  136. iOSImages?: ImageData[];
  137. appStoreImages?: ImageData[];
  138. appStoreTexts?: Blob;
  139. appStoreDemoAccount?: Blob;
  140.  
  141. winImages?: ImageData[];
  142. winStoreTexts?: Blob;
  143. winStoreScreenshots?: ImageData[];
  144.  
  145. // Features:
  146. turnOffWizard: boolean = true;
  147. turnOffTutorial: boolean = true
  148. excludeSpacyLibs: boolean = true; //Label: "Exclude spacy libs", Desc:"Switch on to reduce the app size by removing MapBox (offline maps), Glympse (position tracking) and support for Apple Watch"
  149. prefillOrganizationUrl: string = ''; // [Optional] Desc:"URL of the organization that has to be pre-filled in synchronization dialog."
  150. startupOptions: StartupOption; // Desc:"Determines hot the app should start during the first run. It can either start with demo data, it can show the sync dialog or it can force the sync dialog preventing user to close it."
  151. linkWithAppConnect = false;
  152.  
  153. // defaultCustomization: ZIP (in the future)
  154. // pushServiceConfig - TBD
  155.  
  156. // iOS Signing resources
  157. iOSSigningCert: string = ''; // [Optional] binary<.P12 file> only if (this.platforms & iOS) != 0 && this.appStoreDeployment == false
  158. iOSSigningCertPassword: string = ''; // [Optional] Password for signing certificate
  159. iOSProvisioningProfile: string = ''; // [Optional] binary<.mobilprovision file> only if (this.platforms & iOS) != 0 && this.appStoreDeployment == false
  160.  
  161. public get urlScheme(): string {
  162. return this.packageName.replace(/\./g, '').toLowerCase() + '://';
  163. }
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement