@cleavelandprice/ngx-lib 3.11.3 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/active-directory/gui/components/user-chooser/user-chooser.component.d.ts +20 -2
  2. package/active-directory/gui/components/user-form-field/user-form-field.component.d.ts +5 -4
  3. package/authentication/token/gui/components/login/login.component.d.ts +3 -3
  4. package/authentication/token/gui/components/login-form/login-form.component.d.ts +1 -2
  5. package/authentication/token/gui/services/authentication.service.d.ts +2 -4
  6. package/authentication/token/services/authentication.service.d.ts +3 -4
  7. package/dialog/components/base/base.component.d.ts +6 -5
  8. package/esm2022/active-directory/gui/components/user-chooser/user-chooser.component.mjs +60 -68
  9. package/esm2022/active-directory/gui/components/user-form-field/user-form-field.component.mjs +22 -27
  10. package/esm2022/authentication/token/gui/components/login/login.component.mjs +9 -10
  11. package/esm2022/authentication/token/gui/components/login-form/login-form.component.mjs +11 -12
  12. package/esm2022/authentication/token/gui/services/authentication.service.mjs +5 -7
  13. package/esm2022/authentication/token/services/authentication.service.mjs +9 -8
  14. package/esm2022/dialog/components/base/base.component.mjs +26 -26
  15. package/esm2022/lib/services/app-path-config.service.mjs +13 -10
  16. package/esm2022/quill/components/editor/editor.component.mjs +41 -48
  17. package/esm2022/quill/mention/components/editor/editor.component.mjs +30 -40
  18. package/esm2022/sharepoint/components/user-photo/user-photo.component.mjs +36 -0
  19. package/esm2022/sharepoint/pipes/user-photo-url.pipe.mjs +38 -0
  20. package/esm2022/sharepoint/public_api.mjs +3 -3
  21. package/esm2022/sharepoint/sharepoint.module.mjs +11 -11
  22. package/esm2022/upload/components/upload-dialog/upload-dialog.component.mjs +3 -3
  23. package/fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs +79 -91
  24. package/fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs.map +1 -1
  25. package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs +23 -27
  26. package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs.map +1 -1
  27. package/fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs +8 -7
  28. package/fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs.map +1 -1
  29. package/fesm2022/cleavelandprice-ngx-lib-dialog.mjs +25 -25
  30. package/fesm2022/cleavelandprice-ngx-lib-dialog.mjs.map +1 -1
  31. package/fesm2022/cleavelandprice-ngx-lib-quill-mention.mjs +30 -40
  32. package/fesm2022/cleavelandprice-ngx-lib-quill-mention.mjs.map +1 -1
  33. package/fesm2022/cleavelandprice-ngx-lib-quill.mjs +43 -49
  34. package/fesm2022/cleavelandprice-ngx-lib-quill.mjs.map +1 -1
  35. package/fesm2022/cleavelandprice-ngx-lib-sharepoint.mjs +34 -35
  36. package/fesm2022/cleavelandprice-ngx-lib-sharepoint.mjs.map +1 -1
  37. package/fesm2022/cleavelandprice-ngx-lib-upload.mjs +2 -2
  38. package/fesm2022/cleavelandprice-ngx-lib-upload.mjs.map +1 -1
  39. package/fesm2022/cleavelandprice-ngx-lib.mjs +12 -9
  40. package/fesm2022/cleavelandprice-ngx-lib.mjs.map +1 -1
  41. package/lib/services/app-path-config.service.d.ts +1 -2
  42. package/package.json +1 -1
  43. package/quill/components/editor/editor.component.d.ts +2 -7
  44. package/quill/mention/components/editor/editor.component.d.ts +13 -10
  45. package/sharepoint/components/user-photo/user-photo.component.d.ts +15 -0
  46. package/sharepoint/pipes/{employee-photo-url.pipe.d.ts → user-photo-url.pipe.d.ts} +3 -3
  47. package/sharepoint/public_api.d.ts +2 -2
  48. package/sharepoint/sharepoint.module.d.ts +3 -3
  49. package/esm2022/sharepoint/components/employee-photo/employee-photo.component.mjs +0 -37
  50. package/esm2022/sharepoint/pipes/employee-photo-url.pipe.mjs +0 -38
  51. package/sharepoint/components/employee-photo/employee-photo.component.d.ts +0 -15
@@ -1,8 +1,8 @@
1
1
  import { ServiceConfig as ServiceConfig$1 } from '@cleavelandprice/ngx-lib/authentication';
2
+ import { HttpClient } from '@angular/common/http';
2
3
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Injectable, Optional, Output, NgModule, SkipSelf } from '@angular/core';
4
+ import { inject, EventEmitter, Injectable, Optional, Output, NgModule, SkipSelf } from '@angular/core';
4
5
  import { JwtHelperService } from '@auth0/angular-jwt';
5
- import * as i2 from '@angular/common/http';
6
6
  import { CommonModule } from '@angular/common';
7
7
 
8
8
  //import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';
@@ -15,6 +15,7 @@ class ServiceConfig extends ServiceConfig$1 {
15
15
  }
16
16
 
17
17
  class AuthenticationService {
18
+ #http;
18
19
  //#endregion
19
20
  //#region Properties
20
21
  get useSessionStorage() {
@@ -27,9 +28,9 @@ class AuthenticationService {
27
28
  }
28
29
  //#endregion
29
30
  //#region Lifecycle
30
- constructor(config, http) {
31
+ constructor(config) {
31
32
  this.config = config;
32
- this.http = http;
33
+ this.#http = inject(HttpClient);
33
34
  //#region Fields
34
35
  this.authenticatedChanged = new EventEmitter();
35
36
  this.authenticatingChanged = new EventEmitter();
@@ -56,7 +57,7 @@ class AuthenticationService {
56
57
  this.authenticatingChanged.emit(this.authenticating);
57
58
  // Sending a 'raw' POST request so that we can tell HttpClient that we are expecting text instead of Json
58
59
  // Otherwise, it would throw an error trying to decode Json from the response
59
- this.http.request('POST', `${this.config?.apiUrl}${this.config?.authenticateEndpoint}`, { body: request, responseType: 'text' })
60
+ this.#http.request('POST', `${this.config?.apiUrl}${this.config?.authenticateEndpoint}`, { body: request, responseType: 'text' })
60
61
  .subscribe({
61
62
  next: (token) => {
62
63
  if (token) {
@@ -113,7 +114,7 @@ class AuthenticationService {
113
114
  }
114
115
  }
115
116
  }
116
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthenticationService, deps: [{ token: ServiceConfig, optional: true }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthenticationService, deps: [{ token: ServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
117
118
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthenticationService, providedIn: 'root' }); }
118
119
  }
119
120
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AuthenticationService, decorators: [{
@@ -123,7 +124,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
123
124
  }]
124
125
  }], ctorParameters: () => [{ type: ServiceConfig, decorators: [{
125
126
  type: Optional
126
- }] }, { type: i2.HttpClient }], propDecorators: { authenticatedChanged: [{
127
+ }] }], propDecorators: { authenticatedChanged: [{
127
128
  type: Output
128
129
  }], authenticatingChanged: [{
129
130
  type: Output
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-authentication-token.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/services/authentication.service.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/token.module.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/cleavelandprice-ngx-lib-authentication-token.ts"],"sourcesContent":["//import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';\r\nimport { ServiceConfig as BaseServiceConfig } from '@cleavelandprice/ngx-lib/authentication';\r\n\r\nexport class ServiceConfig extends BaseServiceConfig {\r\n deferTokenValidation = false;\r\n \r\n // See the comment in the library's main service-config.ts file for an explanation\r\n constructor(useSsl_or_customApiUrl: boolean | string = false,\r\n appName?: string,\r\n tokenName = 'token',\r\n authenticateEndpoint = '/authenticate/token'\r\n ) {\r\n super(useSsl_or_customApiUrl, appName, tokenName, authenticateEndpoint);\r\n }\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { EventEmitter, Injectable, Optional, Output } from '@angular/core';\r\nimport { JwtHelperService } from '@auth0/angular-jwt';\r\n\r\nimport {\r\n AbstractAuthenticationService,\r\n AuthenticatedUser,\r\n AuthenticationRequest\r\n} from '@cleavelandprice/ngx-lib/authentication';\r\n\r\nimport { AuthenticationToken } from '../model/authentication-token';\r\nimport { ServiceConfig } from '../model/service-config';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationService implements AbstractAuthenticationService {\r\n //#region Fields\r\n @Output() authenticatedChanged = new EventEmitter<boolean>();\r\n @Output() authenticatingChanged = new EventEmitter<boolean>();\r\n @Output() authenticationError = new EventEmitter();\r\n authenticating = false; // Flag set to true while the service is attempting to authenticate the user\r\n authenticated = false; // Flag set to true when the user is successfully authenticated\r\n authenticatedUser?: AuthenticatedUser; // Object representing the authenticated user\r\n //#endregion\r\n\r\n //#region Properties\r\n get useSessionStorage(): boolean {\r\n return !!localStorage.getItem('storeTokenInSession');\r\n }\r\n\r\n get storage(): Storage {\r\n return this.useSessionStorage ?\r\n sessionStorage:\r\n localStorage;\r\n }\r\n //#endregion\r\n\r\n //#region Lifecycle\r\n constructor(@Optional() protected config: ServiceConfig,\r\n protected http: HttpClient) {\r\n\r\n this.config = this.config ?? new ServiceConfig();\r\n\r\n if (!this.config.deferTokenValidation) {\r\n this.checkForExistingToken();\r\n }\r\n }\r\n //#endregion\r\n\r\n //#region Utilities\r\n //Authenticate the user and store the token in Local Storage\r\n login(username: string, password: string, adminGroup?: string, additionalInfo?: string): void {\r\n const request: AuthenticationRequest = {\r\n username,\r\n password,\r\n adminGroup,\r\n additionalInfo,\r\n appName: this.config?.appName\r\n };\r\n\r\n this.authenticating = true;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n\r\n // Sending a 'raw' POST request so that we can tell HttpClient that we are expecting text instead of Json\r\n // Otherwise, it would throw an error trying to decode Json from the response\r\n this.http.request('POST', `${this.config?.apiUrl}${this.config?.authenticateEndpoint}`, { body: request, responseType: 'text' })\r\n .subscribe({\r\n next: (token) => {\r\n if (token) {\r\n this.validateUser(token);\r\n } else {\r\n this.logout();\r\n }\r\n },\r\n error: (err) => {\r\n this.authenticating = false;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n this.authenticationError.emit(err);\r\n }\r\n });\r\n }\r\n \r\n //Logout the user and delete the token from Local Storage\r\n logout(): void {\r\n if (this.config?.tokenName && this.storage.getItem(this.config.tokenName)) {\r\n this.storage.removeItem(this.config.tokenName);\r\n }\r\n\r\n this.authenticatedUser = undefined;\r\n this.authenticated = false;\r\n this.authenticatedChanged.emit(false);\r\n }\r\n \r\n validateUser(token: string): void {\r\n const jwtHelper = new JwtHelperService();\r\n const decoded = jwtHelper.decodeToken(token) as AuthenticationToken;\r\n\r\n if (jwtHelper.isTokenExpired(token)) {\r\n this.logout();\r\n return;\r\n }\r\n\r\n this.authenticatedUser = {\r\n admin: decoded.role === 'Admin',\r\n displayName: decoded.displayName,\r\n accountName: decoded.winaccountname,\r\n distinguishedName: decoded.distinguishedName,\r\n employeeNumber: decoded.employeeNumber,\r\n memberOf: decoded.memberOf\r\n };\r\n\r\n if (this.config?.tokenName) {\r\n this.storage.setItem(this.config.tokenName, token);\r\n }\r\n \r\n this.authenticated = true;\r\n this.authenticatedChanged.emit(this.authenticated);\r\n\r\n this.authenticating = false;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n }\r\n\r\n checkForExistingToken(): void {\r\n if (this.config?.tokenName) {\r\n const token = this.storage.getItem(this.config.tokenName);\r\n if (token) {\r\n this.validateUser(token);\r\n }\r\n }\r\n }\r\n //#endregion\r\n}","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { ServiceConfig } from './model/service-config';\r\n\r\nimport { AuthenticationService } from './services/authentication.service';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: []\r\n})\r\nexport class TokenModule {\r\n static forRoot(config: ServiceConfig): ModuleWithProviders<TokenModule> {\r\n return {\r\n ngModule: TokenModule,\r\n providers: [\r\n AuthenticationService,\r\n { provide: ServiceConfig, useValue: config }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: TokenModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'TokenModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["BaseServiceConfig","i1.ServiceConfig"],"mappings":";;;;;;;AAAA;AAGM,MAAO,aAAc,SAAQA,eAAiB,CAAA;;IAIhD,WAAY,CAAA,sBAAA,GAA2C,KAAK,EACxD,OAAgB,EAChB,SAAS,GAAG,OAAO,EACnB,oBAAoB,GAAG,qBAAqB,EAAA;QAE5C,KAAK,CAAC,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,CAAC,CAAC;QAR5E,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC;KAS5B;AACJ;;MCEY,qBAAqB,CAAA;;;AAWhC,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;KACtD;AAED,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,iBAAiB;AAC3B,YAAA,cAAc;AACd,YAAA,YAAY,CAAC;KAChB;;;IAID,WAAkC,CAAA,MAAqB,EACnC,IAAgB,EAAA;QADF,IAAM,CAAA,MAAA,GAAN,MAAM,CAAe;QACnC,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;;AAtB1B,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,YAAY,EAAW,CAAC;AACnD,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,YAAY,EAAW,CAAC;AACpD,QAAA,IAAA,CAAA,mBAAmB,GAA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AA;;0BAYc,QAAQ;;0BAAI,QAAQ;;;ACzBnC;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-authentication-token.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/services/authentication.service.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/token.module.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/cleavelandprice-ngx-lib-authentication-token.ts"],"sourcesContent":["//import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';\r\nimport { ServiceConfig as BaseServiceConfig } from '@cleavelandprice/ngx-lib/authentication';\r\n\r\nexport class ServiceConfig extends BaseServiceConfig {\r\n deferTokenValidation = false;\r\n \r\n // See the comment in the library's main service-config.ts file for an explanation\r\n constructor(useSsl_or_customApiUrl: boolean | string = false,\r\n appName?: string,\r\n tokenName = 'token',\r\n authenticateEndpoint = '/authenticate/token'\r\n ) {\r\n super(useSsl_or_customApiUrl, appName, tokenName, authenticateEndpoint);\r\n }\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { EventEmitter, Injectable, Optional, Output, inject } from '@angular/core';\r\nimport { JwtHelperService } from '@auth0/angular-jwt';\r\n\r\nimport {\r\n AbstractAuthenticationService,\r\n AuthenticatedUser,\r\n AuthenticationRequest\r\n} from '@cleavelandprice/ngx-lib/authentication';\r\n\r\nimport { AuthenticationToken } from '../model/authentication-token';\r\nimport { ServiceConfig } from '../model/service-config';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationService implements AbstractAuthenticationService {\r\n #http = inject(HttpClient);\r\n\r\n //#region Fields\r\n @Output() authenticatedChanged = new EventEmitter<boolean>();\r\n @Output() authenticatingChanged = new EventEmitter<boolean>();\r\n @Output() authenticationError = new EventEmitter();\r\n authenticating = false; // Flag set to true while the service is attempting to authenticate the user\r\n authenticated = false; // Flag set to true when the user is successfully authenticated\r\n authenticatedUser?: AuthenticatedUser; // Object representing the authenticated user\r\n //#endregion\r\n\r\n //#region Properties\r\n get useSessionStorage(): boolean {\r\n return !!localStorage.getItem('storeTokenInSession');\r\n }\r\n\r\n get storage(): Storage {\r\n return this.useSessionStorage ?\r\n sessionStorage:\r\n localStorage;\r\n }\r\n //#endregion\r\n\r\n //#region Lifecycle\r\n constructor(@Optional() protected config: ServiceConfig) {\r\n this.config = this.config ?? new ServiceConfig();\r\n\r\n if (!this.config.deferTokenValidation) {\r\n this.checkForExistingToken();\r\n }\r\n }\r\n //#endregion\r\n\r\n //#region Utilities\r\n //Authenticate the user and store the token in Local Storage\r\n login(username: string, password: string, adminGroup?: string, additionalInfo?: string): void {\r\n const request: AuthenticationRequest = {\r\n username,\r\n password,\r\n adminGroup,\r\n additionalInfo,\r\n appName: this.config?.appName\r\n };\r\n\r\n this.authenticating = true;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n\r\n // Sending a 'raw' POST request so that we can tell HttpClient that we are expecting text instead of Json\r\n // Otherwise, it would throw an error trying to decode Json from the response\r\n this.#http.request('POST', `${this.config?.apiUrl}${this.config?.authenticateEndpoint}`, { body: request, responseType: 'text' })\r\n .subscribe({\r\n next: (token) => {\r\n if (token) {\r\n this.validateUser(token);\r\n } else {\r\n this.logout();\r\n }\r\n },\r\n error: (err) => {\r\n this.authenticating = false;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n this.authenticationError.emit(err);\r\n }\r\n });\r\n }\r\n \r\n //Logout the user and delete the token from Local Storage\r\n logout(): void {\r\n if (this.config?.tokenName && this.storage.getItem(this.config.tokenName)) {\r\n this.storage.removeItem(this.config.tokenName);\r\n }\r\n\r\n this.authenticatedUser = undefined;\r\n this.authenticated = false;\r\n this.authenticatedChanged.emit(false);\r\n }\r\n \r\n validateUser(token: string): void {\r\n const jwtHelper = new JwtHelperService();\r\n const decoded = jwtHelper.decodeToken(token) as AuthenticationToken;\r\n\r\n if (jwtHelper.isTokenExpired(token)) {\r\n this.logout();\r\n return;\r\n }\r\n\r\n this.authenticatedUser = {\r\n admin: decoded.role === 'Admin',\r\n displayName: decoded.displayName,\r\n accountName: decoded.winaccountname,\r\n distinguishedName: decoded.distinguishedName,\r\n employeeNumber: decoded.employeeNumber,\r\n memberOf: decoded.memberOf\r\n };\r\n\r\n if (this.config?.tokenName) {\r\n this.storage.setItem(this.config.tokenName, token);\r\n }\r\n \r\n this.authenticated = true;\r\n this.authenticatedChanged.emit(this.authenticated);\r\n\r\n this.authenticating = false;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n }\r\n\r\n checkForExistingToken(): void {\r\n if (this.config?.tokenName) {\r\n const token = this.storage.getItem(this.config.tokenName);\r\n if (token) {\r\n this.validateUser(token);\r\n }\r\n }\r\n }\r\n //#endregion\r\n}","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { ServiceConfig } from './model/service-config';\r\n\r\nimport { AuthenticationService } from './services/authentication.service';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: []\r\n})\r\nexport class TokenModule {\r\n static forRoot(config: ServiceConfig): ModuleWithProviders<TokenModule> {\r\n return {\r\n ngModule: TokenModule,\r\n providers: [\r\n AuthenticationService,\r\n { provide: ServiceConfig, useValue: config }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: TokenModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'TokenModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["BaseServiceConfig","i1.ServiceConfig"],"mappings":";;;;;;;AAAA;AAGM,MAAO,aAAc,SAAQA,eAAiB,CAAA;;IAIhD,WAAY,CAAA,sBAAA,GAA2C,KAAK,EACxD,OAAgB,EAChB,SAAS,GAAG,OAAO,EACnB,oBAAoB,GAAG,qBAAqB,EAAA;QAE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,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAJpB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAIH,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAJpB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIH,WAAW,EAAA,UAAA,EAAA,CAAA;kBAPvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;0BAYc,QAAQ;;0BAAI,QAAQ;;;ACzBnC;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, inject, NgModule } from '@angular/core';
2
+ import { input, EventEmitter, Component, Output, inject, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import * as i2 from '@angular/material/button';
@@ -32,42 +32,46 @@ var DialogType;
32
32
 
33
33
  class BaseComponent {
34
34
  constructor() {
35
- // This is so that DialogType can be publish accessible from the HTML template
35
+ // This is so that DialogType can be accessible from the HTML template
36
36
  this.DialogType = DialogType;
37
- this.dialogType = DialogType.Message;
37
+ this.dialogType = input(DialogType.Message);
38
+ this.data = input.required();
38
39
  this.closed = new EventEmitter();
39
40
  this.ConfirmationDialogMode = ConfirmationDialogMode;
40
41
  }
42
+ get #customTrueFalseTextValid() {
43
+ return this.data().customTrueFalseText?.length === 2;
44
+ }
41
45
  get customTrueText() {
42
- return this.data.customTrueFalseText ?
43
- this.data.customTrueFalseText[0] :
44
- null;
46
+ return this.#customTrueFalseTextValid ?
47
+ this.data().customTrueFalseText[0] :
48
+ undefined;
45
49
  }
46
50
  get customFalseText() {
47
- return this.data.customTrueFalseText ?
48
- this.data.customTrueFalseText[1] :
49
- null;
51
+ return this.#customTrueFalseTextValid ?
52
+ this.data().customTrueFalseText[1] :
53
+ undefined;
50
54
  }
51
55
  get choices() {
52
- return this.dialogType === DialogType.Choice ?
53
- this.data.choices :
56
+ return this.dialogType() === DialogType.Choice ?
57
+ this.data().choices :
54
58
  null;
55
59
  }
56
60
  ngOnInit() {
57
- this.userInput = this.data.value;
61
+ this.userInput = this.data().value;
58
62
  }
59
63
  close() {
60
64
  let data;
61
- switch (this.dialogType) {
65
+ switch (this.dialogType()) {
62
66
  case DialogType.Message:
63
- data = this.data.checkboxMessage ?
67
+ data = this.data().checkboxMessage ?
64
68
  {
65
69
  checkbox: this.checkboxValue || false
66
70
  } :
67
71
  null;
68
72
  break;
69
73
  case DialogType.Input:
70
- data = this.data.checkboxMessage ?
74
+ data = this.data().checkboxMessage ?
71
75
  {
72
76
  response: this.userInput,
73
77
  checkbox: this.checkboxValue || false
@@ -75,7 +79,7 @@ class BaseComponent {
75
79
  this.userInput;
76
80
  break;
77
81
  case DialogType.Confirmation:
78
- data = this.data.checkboxMessage ?
82
+ data = this.data().checkboxMessage ?
79
83
  {
80
84
  response: true,
81
85
  checkbox: this.checkboxValue || false
@@ -87,8 +91,8 @@ class BaseComponent {
87
91
  }
88
92
  cancel() {
89
93
  let data;
90
- if (this.dialogType === DialogType.Confirmation) {
91
- data = this.data.checkboxMessage ?
94
+ if (this.dialogType() === DialogType.Confirmation) {
95
+ data = this.data().checkboxMessage ?
92
96
  {
93
97
  response: false,
94
98
  checkbox: this.checkboxValue || false
@@ -98,16 +102,12 @@ class BaseComponent {
98
102
  this.closed.emit(data);
99
103
  }
100
104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
101
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: BaseComponent, selector: "cp-dialog-base", inputs: { dialogType: "dialogType", data: "data" }, outputs: { closed: "closed" }, ngImport: i0, template: "@if (data?.title) {\n <h2 mat-dialog-title [innerHTML]=\"data.title\"></h2>\n}\n\n<mat-dialog-content>\n @if (data?.message) {\n <div [innerHTML]=\"data.message\"></div>\n }\n\n @if (dialogType === DialogType.Input) {\n <mat-form-field>\n <textarea matInput [placeholder]=\"data.placeholder ?? ''\" [(ngModel)]=\"userInput\"></textarea>\n </mat-form-field>\n }\n\n @if (data?.checkboxMessage) {\n <div id=\"checkbox\">\n <mat-checkbox [(ngModel)]=\"checkboxValue\">\n <span [innerHTML]=\"data.checkboxMessage\"></span>\n </mat-checkbox>\n </div>\n }\n</mat-dialog-content>\n\n<mat-dialog-actions>\n @if (dialogType !== DialogType.Choice) {\n <button mat-raised-button (click)=\"close()\" [disabled]=\"dialogType === DialogType.Input && !userInput\">\n <span>\n @switch (data.mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>Yes</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>True</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customTrueText }}</span>\n }\n @default {\n <span>OK</span>\n }\n }\n </span>\n </button>\n @if (dialogType !== DialogType.Message) {\n <button mat-raised-button (click)=\"cancel()\">\n <span>\n @switch (data.mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>No</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>False</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customFalseText }}</span>\n }\n @default {\n <span>Cancel</span>\n }\n }\n </span>\n </button>\n }\n }\n\n @if (dialogType === DialogType.Choice) {\n @for (choice of choices; track choice; let i = $index) {\n <button mat-raised-button [matDialogClose]=\"i\">\n <span>{{ choice }}</span>\n </button>\n }\n }\n</mat-dialog-actions>", styles: ["mat-form-field{margin-top:2em;width:100%}#checkbox{margin:2em 0}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] }); }
105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: BaseComponent, selector: "cp-dialog-base", inputs: { dialogType: { classPropertyName: "dialogType", publicName: "dialogType", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "@if (data().title) {\n <h2 mat-dialog-title [innerHTML]=\"data().title\"></h2>\n}\n\n<mat-dialog-content>\n @if (data().message) {\n <div [innerHTML]=\"data().message\"></div>\n }\n\n @if (dialogType() === DialogType.Input) {\n <mat-form-field>\n <textarea matInput [placeholder]=\"data().placeholder ?? ''\" [(ngModel)]=\"userInput\"></textarea>\n </mat-form-field>\n }\n\n @if (data().checkboxMessage) {\n <div id=\"checkbox\">\n <mat-checkbox [(ngModel)]=\"checkboxValue\">\n <span [innerHTML]=\"data().checkboxMessage\"></span>\n </mat-checkbox>\n </div>\n }\n</mat-dialog-content>\n\n<mat-dialog-actions>\n @if (dialogType() !== DialogType.Choice) {\n <button mat-raised-button (click)=\"close()\" [disabled]=\"dialogType() === DialogType.Input && !userInput\">\n <span>\n @switch (data().mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>Yes</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>True</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customTrueText }}</span>\n }\n @default {\n <span>OK</span>\n }\n }\n </span>\n </button>\n @if (dialogType() !== DialogType.Message) {\n <button mat-raised-button (click)=\"cancel()\">\n <span>\n @switch (data().mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>No</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>False</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customFalseText }}</span>\n }\n @default {\n <span>Cancel</span>\n }\n }\n </span>\n </button>\n }\n }\n\n @if (dialogType() === DialogType.Choice) {\n @for (choice of choices; track choice; let i = $index) {\n <button mat-raised-button [matDialogClose]=\"i\">\n <span>{{ choice }}</span>\n </button>\n }\n }\n</mat-dialog-actions>", styles: ["mat-form-field{margin-top:2em;width:100%}#checkbox{margin:2em 0}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] }); }
102
106
  }
103
107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: BaseComponent, decorators: [{
104
108
  type: Component,
105
- args: [{ selector: 'cp-dialog-base', template: "@if (data?.title) {\n <h2 mat-dialog-title [innerHTML]=\"data.title\"></h2>\n}\n\n<mat-dialog-content>\n @if (data?.message) {\n <div [innerHTML]=\"data.message\"></div>\n }\n\n @if (dialogType === DialogType.Input) {\n <mat-form-field>\n <textarea matInput [placeholder]=\"data.placeholder ?? ''\" [(ngModel)]=\"userInput\"></textarea>\n </mat-form-field>\n }\n\n @if (data?.checkboxMessage) {\n <div id=\"checkbox\">\n <mat-checkbox [(ngModel)]=\"checkboxValue\">\n <span [innerHTML]=\"data.checkboxMessage\"></span>\n </mat-checkbox>\n </div>\n }\n</mat-dialog-content>\n\n<mat-dialog-actions>\n @if (dialogType !== DialogType.Choice) {\n <button mat-raised-button (click)=\"close()\" [disabled]=\"dialogType === DialogType.Input && !userInput\">\n <span>\n @switch (data.mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>Yes</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>True</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customTrueText }}</span>\n }\n @default {\n <span>OK</span>\n }\n }\n </span>\n </button>\n @if (dialogType !== DialogType.Message) {\n <button mat-raised-button (click)=\"cancel()\">\n <span>\n @switch (data.mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>No</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>False</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customFalseText }}</span>\n }\n @default {\n <span>Cancel</span>\n }\n }\n </span>\n </button>\n }\n }\n\n @if (dialogType === DialogType.Choice) {\n @for (choice of choices; track choice; let i = $index) {\n <button mat-raised-button [matDialogClose]=\"i\">\n <span>{{ choice }}</span>\n </button>\n }\n }\n</mat-dialog-actions>", styles: ["mat-form-field{margin-top:2em;width:100%}#checkbox{margin:2em 0}\n"] }]
106
- }], propDecorators: { dialogType: [{
107
- type: Input
108
- }], data: [{
109
- type: Input
110
- }], closed: [{
109
+ args: [{ selector: 'cp-dialog-base', template: "@if (data().title) {\n <h2 mat-dialog-title [innerHTML]=\"data().title\"></h2>\n}\n\n<mat-dialog-content>\n @if (data().message) {\n <div [innerHTML]=\"data().message\"></div>\n }\n\n @if (dialogType() === DialogType.Input) {\n <mat-form-field>\n <textarea matInput [placeholder]=\"data().placeholder ?? ''\" [(ngModel)]=\"userInput\"></textarea>\n </mat-form-field>\n }\n\n @if (data().checkboxMessage) {\n <div id=\"checkbox\">\n <mat-checkbox [(ngModel)]=\"checkboxValue\">\n <span [innerHTML]=\"data().checkboxMessage\"></span>\n </mat-checkbox>\n </div>\n }\n</mat-dialog-content>\n\n<mat-dialog-actions>\n @if (dialogType() !== DialogType.Choice) {\n <button mat-raised-button (click)=\"close()\" [disabled]=\"dialogType() === DialogType.Input && !userInput\">\n <span>\n @switch (data().mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>Yes</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>True</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customTrueText }}</span>\n }\n @default {\n <span>OK</span>\n }\n }\n </span>\n </button>\n @if (dialogType() !== DialogType.Message) {\n <button mat-raised-button (click)=\"cancel()\">\n <span>\n @switch (data().mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>No</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>False</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customFalseText }}</span>\n }\n @default {\n <span>Cancel</span>\n }\n }\n </span>\n </button>\n }\n }\n\n @if (dialogType() === DialogType.Choice) {\n @for (choice of choices; track choice; let i = $index) {\n <button mat-raised-button [matDialogClose]=\"i\">\n <span>{{ choice }}</span>\n </button>\n }\n }\n</mat-dialog-actions>", styles: ["mat-form-field{margin-top:2em;width:100%}#checkbox{margin:2em 0}\n"] }]
110
+ }], propDecorators: { closed: [{
111
111
  type: Output
112
112
  }] } });
113
113
 
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-dialog.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/dialog/src/model/confirmation-dialog-mode.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/model/dialog-type.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/base/base.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/base/base.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/choice/choice.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/choice/choice.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/confirmation/confirmation.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/confirmation/confirmation.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/input/input.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/input/input.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/message/message.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/message/message.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/dialog.module.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/cleavelandprice-ngx-lib-dialog.ts"],"sourcesContent":["export enum ConfirmationDialogMode {\r\n OkCancel,\r\n YesNo,\r\n TrueFalse,\r\n Custom\r\n}","export enum DialogType {\r\n Choice,\r\n Confirmation,\r\n Input,\r\n Message\r\n}","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\nimport { ConfirmationDialogMode } from '../../model/confirmation-dialog-mode';\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogChoiceData } from '../../model/dialog-choice-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-base',\r\n templateUrl: './base.component.html',\r\n styleUrls: ['./base.component.css']\r\n})\r\nexport class BaseComponent implements OnInit {\r\n // This is so that DialogType can be publish accessible from the HTML template\r\n DialogType = DialogType;\r\n @Input() dialogType = DialogType.Message;\r\n @Input() data!: DialogBaseData;\r\n @Output() closed = new EventEmitter<any>();\r\n\r\n ConfirmationDialogMode = ConfirmationDialogMode;\r\n\r\n // Form values\r\n userInput?: string;\r\n checkboxValue!: boolean;\r\n\r\n get customTrueText(): string | null {\r\n return this.data.customTrueFalseText ?\r\n this.data.customTrueFalseText[0] :\r\n null;\r\n }\r\n\r\n get customFalseText(): string | null {\r\n return this.data.customTrueFalseText ?\r\n this.data.customTrueFalseText[1] :\r\n null;\r\n }\r\n\r\n get choices(): string[] | null {\r\n return this.dialogType === DialogType.Choice ?\r\n (this.data as DialogChoiceData).choices :\r\n null;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.userInput = this.data.value;\r\n }\r\n\r\n close(): void {\r\n let data: any;\r\n\r\n switch (this.dialogType) {\r\n case DialogType.Message:\r\n data = this.data.checkboxMessage ?\r\n {\r\n checkbox: this.checkboxValue || false\r\n } :\r\n null;\r\n break;\r\n case DialogType.Input:\r\n data = this.data.checkboxMessage ?\r\n {\r\n response: this.userInput,\r\n checkbox: this.checkboxValue || false\r\n } :\r\n this.userInput;\r\n break;\r\n case DialogType.Confirmation:\r\n data = this.data.checkboxMessage ?\r\n {\r\n response: true,\r\n checkbox: this.checkboxValue || false\r\n } :\r\n true;\r\n break;\r\n }\r\n\r\n this.closed.emit(data);\r\n }\r\n\r\n cancel(): void {\r\n let data: any;\r\n\r\n if (this.dialogType === DialogType.Confirmation) {\r\n data = this.data.checkboxMessage ?\r\n {\r\n response: false,\r\n checkbox: this.checkboxValue || false\r\n } :\r\n false;\r\n }\r\n\r\n this.closed.emit(data);\r\n }\r\n}\r\n","@if (data?.title) {\n <h2 mat-dialog-title [innerHTML]=\"data.title\"></h2>\n}\n\n<mat-dialog-content>\n @if (data?.message) {\n <div [innerHTML]=\"data.message\"></div>\n }\n\n @if (dialogType === DialogType.Input) {\n <mat-form-field>\n <textarea matInput [placeholder]=\"data.placeholder ?? ''\" [(ngModel)]=\"userInput\"></textarea>\n </mat-form-field>\n }\n\n @if (data?.checkboxMessage) {\n <div id=\"checkbox\">\n <mat-checkbox [(ngModel)]=\"checkboxValue\">\n <span [innerHTML]=\"data.checkboxMessage\"></span>\n </mat-checkbox>\n </div>\n }\n</mat-dialog-content>\n\n<mat-dialog-actions>\n @if (dialogType !== DialogType.Choice) {\n <button mat-raised-button (click)=\"close()\" [disabled]=\"dialogType === DialogType.Input && !userInput\">\n <span>\n @switch (data.mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>Yes</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>True</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customTrueText }}</span>\n }\n @default {\n <span>OK</span>\n }\n }\n </span>\n </button>\n @if (dialogType !== DialogType.Message) {\n <button mat-raised-button (click)=\"cancel()\">\n <span>\n @switch (data.mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>No</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>False</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customFalseText }}</span>\n }\n @default {\n <span>Cancel</span>\n }\n }\n </span>\n </button>\n }\n }\n\n @if (dialogType === DialogType.Choice) {\n @for (choice of choices; track choice; let i = $index) {\n <button mat-raised-button [matDialogClose]=\"i\">\n <span>{{ choice }}</span>\n </button>\n }\n }\n</mat-dialog-actions>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogChoiceData } from '../../model/dialog-choice-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-choice',\r\n templateUrl: './choice.component.html',\r\n styleUrls: ['./choice.component.css']\r\n})\r\nexport class ChoiceComponent {\r\n //#region Services\r\n public data = inject<DialogChoiceData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<ChoiceComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Choice;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-confirmation',\r\n templateUrl: './confirmation.component.html',\r\n styleUrls: ['./confirmation.component.css']\r\n})\r\nexport class ConfirmationComponent {\r\n //#region Services\r\n public data = inject<DialogBaseData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<ConfirmationComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Confirmation;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-input',\r\n templateUrl: './input.component.html',\r\n styleUrls: ['./input.component.css']\r\n})\r\nexport class InputComponent {\r\n //#region Services\r\n public data = inject<DialogBaseData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<InputComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Input;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-message',\r\n templateUrl: './message.component.html',\r\n styleUrls: ['./message.component.css']\r\n})\r\nexport class MessageComponent {\r\n //#region Services\r\n public data = inject<DialogBaseData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<MessageComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Message;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { BaseComponent } from './components/base/base.component';\nimport { ChoiceComponent } from './components/choice/choice.component';\nimport { ConfirmationComponent } from './components/confirmation/confirmation.component';\nimport { InputComponent } from './components/input/input.component';\nimport { MessageComponent } from './components/message/message.component';\n\n@NgModule({\n declarations: [\n BaseComponent,\n ChoiceComponent,\n ConfirmationComponent,\n InputComponent,\n MessageComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n\n MatButtonModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule\n ],\n exports: [\n BaseComponent,\n ChoiceComponent,\n ConfirmationComponent,\n InputComponent,\n MessageComponent\n ]\n})\nexport class DialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.BaseComponent"],"mappings":";;;;;;;;;;;;;;;;IAAY,uBAKX;AALD,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,sBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,sBAAA,CAAA,sBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,sBAAA,CAAA,sBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACV,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,GAKjC,EAAA,CAAA,CAAA;;ICLW,WAKX;AALD,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,UAAA,CAAA,UAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY,CAAA;AACZ,IAAA,UAAA,CAAA,UAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,UAAA,CAAA,UAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACX,CAAC,EALW,UAAU,KAAV,UAAU,GAKrB,EAAA,CAAA,CAAA;;MCOY,aAAa,CAAA;AAL1B,IAAA,WAAA,GAAA;;QAOE,IAAU,CAAA,UAAA,GAAG,UAAU,CAAC;AACf,QAAA,IAAA,CAAA,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC;AAE/B,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAO,CAAC;QAE3C,IA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AA,EAAA,CAAA,CAAA,EAAA;AAGP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAjBrB,YAAY;YACZ,WAAW;YAEX,eAAe;YACf,iBAAiB;YACjB,eAAe;YACf,kBAAkB;YAClB,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAUL,YAAY,EAAA,UAAA,EAAA,CAAA;kBA1BxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;wBACb,eAAe;wBACf,qBAAqB;wBACrB,cAAc;wBACd,gBAAgB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBAEX,eAAe;wBACf,iBAAiB;wBACjB,eAAe;wBACf,kBAAkB;wBAClB,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb,eAAe;wBACf,qBAAqB;wBACrB,cAAc;wBACd,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;ACzCD;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-dialog.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/dialog/src/model/confirmation-dialog-mode.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/model/dialog-type.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/base/base.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/base/base.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/choice/choice.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/choice/choice.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/confirmation/confirmation.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/confirmation/confirmation.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/input/input.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/input/input.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/message/message.component.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/components/message/message.component.html","../../../../projects/cleavelandprice/ngx-lib/dialog/src/dialog.module.ts","../../../../projects/cleavelandprice/ngx-lib/dialog/src/cleavelandprice-ngx-lib-dialog.ts"],"sourcesContent":["export enum ConfirmationDialogMode {\r\n OkCancel,\r\n YesNo,\r\n TrueFalse,\r\n Custom\r\n}","export enum DialogType {\r\n Choice,\r\n Confirmation,\r\n Input,\r\n Message\r\n}","import { Component, EventEmitter, OnInit, Output, input } from '@angular/core';\r\n\r\nimport { ConfirmationDialogMode } from '../../model/confirmation-dialog-mode';\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogChoiceData } from '../../model/dialog-choice-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-base',\r\n templateUrl: './base.component.html',\r\n styleUrls: ['./base.component.css']\r\n})\r\nexport class BaseComponent implements OnInit {\r\n // This is so that DialogType can be accessible from the HTML template\r\n DialogType = DialogType;\r\n dialogType = input(DialogType.Message);\r\n data = input.required<DialogBaseData>();\r\n @Output() closed = new EventEmitter<any>();\r\n\r\n ConfirmationDialogMode = ConfirmationDialogMode;\r\n\r\n // Form values\r\n userInput?: string;\r\n checkboxValue!: boolean;\r\n\r\n get #customTrueFalseTextValid(): boolean {\r\n return this.data().customTrueFalseText?.length === 2;\r\n }\r\n\r\n get customTrueText(): string | undefined {\r\n return this.#customTrueFalseTextValid ?\r\n this.data().customTrueFalseText![0] :\r\n undefined;\r\n }\r\n\r\n get customFalseText(): string | undefined {\r\n return this.#customTrueFalseTextValid ?\r\n this.data().customTrueFalseText![1] :\r\n undefined;\r\n }\r\n\r\n get choices(): string[] | null {\r\n return this.dialogType() === DialogType.Choice ?\r\n (this.data() as DialogChoiceData).choices :\r\n null;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.userInput = this.data().value;\r\n }\r\n\r\n close(): void {\r\n let data: any;\r\n\r\n switch (this.dialogType()) {\r\n case DialogType.Message:\r\n data = this.data().checkboxMessage ?\r\n {\r\n checkbox: this.checkboxValue || false\r\n } :\r\n null;\r\n break;\r\n case DialogType.Input:\r\n data = this.data().checkboxMessage ?\r\n {\r\n response: this.userInput,\r\n checkbox: this.checkboxValue || false\r\n } :\r\n this.userInput;\r\n break;\r\n case DialogType.Confirmation:\r\n data = this.data().checkboxMessage ?\r\n {\r\n response: true,\r\n checkbox: this.checkboxValue || false\r\n } :\r\n true;\r\n break;\r\n }\r\n\r\n this.closed.emit(data);\r\n }\r\n\r\n cancel(): void {\r\n let data: any;\r\n\r\n if (this.dialogType() === DialogType.Confirmation) {\r\n data = this.data().checkboxMessage ?\r\n {\r\n response: false,\r\n checkbox: this.checkboxValue || false\r\n } :\r\n false;\r\n }\r\n\r\n this.closed.emit(data);\r\n }\r\n}\r\n","@if (data().title) {\n <h2 mat-dialog-title [innerHTML]=\"data().title\"></h2>\n}\n\n<mat-dialog-content>\n @if (data().message) {\n <div [innerHTML]=\"data().message\"></div>\n }\n\n @if (dialogType() === DialogType.Input) {\n <mat-form-field>\n <textarea matInput [placeholder]=\"data().placeholder ?? ''\" [(ngModel)]=\"userInput\"></textarea>\n </mat-form-field>\n }\n\n @if (data().checkboxMessage) {\n <div id=\"checkbox\">\n <mat-checkbox [(ngModel)]=\"checkboxValue\">\n <span [innerHTML]=\"data().checkboxMessage\"></span>\n </mat-checkbox>\n </div>\n }\n</mat-dialog-content>\n\n<mat-dialog-actions>\n @if (dialogType() !== DialogType.Choice) {\n <button mat-raised-button (click)=\"close()\" [disabled]=\"dialogType() === DialogType.Input && !userInput\">\n <span>\n @switch (data().mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>Yes</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>True</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customTrueText }}</span>\n }\n @default {\n <span>OK</span>\n }\n }\n </span>\n </button>\n @if (dialogType() !== DialogType.Message) {\n <button mat-raised-button (click)=\"cancel()\">\n <span>\n @switch (data().mode) {\n @case (ConfirmationDialogMode.YesNo) {\n <span>No</span>\n }\n @case (ConfirmationDialogMode.TrueFalse) {\n <span>False</span>\n }\n @case (ConfirmationDialogMode.Custom) {\n <span>{{ customFalseText }}</span>\n }\n @default {\n <span>Cancel</span>\n }\n }\n </span>\n </button>\n }\n }\n\n @if (dialogType() === DialogType.Choice) {\n @for (choice of choices; track choice; let i = $index) {\n <button mat-raised-button [matDialogClose]=\"i\">\n <span>{{ choice }}</span>\n </button>\n }\n }\n</mat-dialog-actions>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogChoiceData } from '../../model/dialog-choice-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-choice',\r\n templateUrl: './choice.component.html',\r\n styleUrls: ['./choice.component.css']\r\n})\r\nexport class ChoiceComponent {\r\n //#region Services\r\n public data = inject<DialogChoiceData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<ChoiceComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Choice;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-confirmation',\r\n templateUrl: './confirmation.component.html',\r\n styleUrls: ['./confirmation.component.css']\r\n})\r\nexport class ConfirmationComponent {\r\n //#region Services\r\n public data = inject<DialogBaseData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<ConfirmationComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Confirmation;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-input',\r\n templateUrl: './input.component.html',\r\n styleUrls: ['./input.component.css']\r\n})\r\nexport class InputComponent {\r\n //#region Services\r\n public data = inject<DialogBaseData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<InputComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Input;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { Component, inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\n\r\nimport { DialogBaseData } from '../../model/dialog-base-data';\r\nimport { DialogType } from '../../model/dialog-type';\r\n\r\n@Component({\r\n selector: 'cp-dialog-message',\r\n templateUrl: './message.component.html',\r\n styleUrls: ['./message.component.css']\r\n})\r\nexport class MessageComponent {\r\n //#region Services\r\n public data = inject<DialogBaseData>(MAT_DIALOG_DATA);\r\n public dialogRef = inject(MatDialogRef<MessageComponent>);\r\n //#endregion\r\n\r\n dialogType = DialogType.Message;\r\n}\r\n","<cp-dialog-base\n [data]=\"data\"\n [dialogType]=\"dialogType\"\n (closed)=\"dialogRef.close($event)\">\n</cp-dialog-base>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { BaseComponent } from './components/base/base.component';\nimport { ChoiceComponent } from './components/choice/choice.component';\nimport { ConfirmationComponent } from './components/confirmation/confirmation.component';\nimport { InputComponent } from './components/input/input.component';\nimport { MessageComponent } from './components/message/message.component';\n\n@NgModule({\n declarations: [\n BaseComponent,\n ChoiceComponent,\n ConfirmationComponent,\n InputComponent,\n MessageComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n\n MatButtonModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatInputModule\n ],\n exports: [\n BaseComponent,\n ChoiceComponent,\n ConfirmationComponent,\n InputComponent,\n MessageComponent\n ]\n})\nexport class DialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.BaseComponent"],"mappings":";;;;;;;;;;;;;;;;IAAY,uBAKX;AALD,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,sBAAA,CAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,sBAAA,CAAA,sBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,sBAAA,CAAA,sBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACV,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,GAKjC,EAAA,CAAA,CAAA;;ICLW,WAKX;AALD,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,UAAA,CAAA,UAAA,CAAA,cAAA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