valtech-components 4.0.969 → 4.0.970
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.
- package/esm2022/lib/components/organisms/comms-preferences-settings/comms-preferences-settings.component.mjs +153 -0
- package/esm2022/lib/components/organisms/comms-preferences-settings/comms-preferences-settings.i18n.mjs +25 -0
- package/esm2022/lib/components/organisms/comms-preferences-settings/types.mjs +2 -0
- package/esm2022/lib/services/comms-preferences/comms-preferences.service.mjs +38 -0
- package/esm2022/lib/services/comms-preferences/config.mjs +18 -0
- package/esm2022/lib/services/comms-preferences/index.mjs +4 -0
- package/esm2022/lib/services/comms-preferences/types.mjs +2 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/valtech-components.mjs +273 -63
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/comms-preferences-settings/comms-preferences-settings.component.d.ts +29 -0
- package/lib/components/organisms/comms-preferences-settings/comms-preferences-settings.i18n.d.ts +24 -0
- package/lib/components/organisms/comms-preferences-settings/types.d.ts +4 -0
- package/lib/services/comms-preferences/comms-preferences.service.d.ts +15 -0
- package/lib/services/comms-preferences/config.d.ts +14 -0
- package/lib/services/comms-preferences/index.d.ts +3 -0
- package/lib/services/comms-preferences/types.d.ts +21 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ToggleInputMetadata } from '../../molecules/toggle-input/types';
|
|
2
|
+
import { CommunicationSetting } from '../../../services/comms-preferences/types';
|
|
3
|
+
import { CommsPreferencesSettingsConfig } from './types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* `val-comms-preferences-settings` (ADR-089) — la organización enciende o
|
|
7
|
+
* apaga comunicaciones transaccionales configurables (hoy: bingo-transfer-
|
|
8
|
+
* pending; el catálogo crece sin tocar este componente). Un toggle por
|
|
9
|
+
* comunicación, guardado inmediato (sin botón "Guardar" aparte) con
|
|
10
|
+
* rollback optimista si falla.
|
|
11
|
+
*/
|
|
12
|
+
export declare class CommsPreferencesSettingsComponent {
|
|
13
|
+
private i18n;
|
|
14
|
+
private nav;
|
|
15
|
+
private toast;
|
|
16
|
+
private svc;
|
|
17
|
+
config?: CommsPreferencesSettingsConfig;
|
|
18
|
+
private get ns();
|
|
19
|
+
readonly settings: import("@angular/core").WritableSignal<CommunicationSetting[]>;
|
|
20
|
+
private readonly controls;
|
|
21
|
+
readonly page: import("../../../services/page-state/page-state").PageState;
|
|
22
|
+
constructor();
|
|
23
|
+
private controlFor;
|
|
24
|
+
toggleProps(templateId: string): ToggleInputMetadata;
|
|
25
|
+
private onToggle;
|
|
26
|
+
protected tt(key: string): string;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommsPreferencesSettingsComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CommsPreferencesSettingsComponent, "val-comms-preferences-settings", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
29
|
+
}
|
package/lib/components/organisms/comms-preferences-settings/comms-preferences-settings.i18n.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const COMMS_PREFERENCES_SETTINGS_I18N: {
|
|
2
|
+
es: {
|
|
3
|
+
pageTitle: string;
|
|
4
|
+
pageDescription: string;
|
|
5
|
+
empty: string;
|
|
6
|
+
savedOk: string;
|
|
7
|
+
saveError: string;
|
|
8
|
+
errorTitle: string;
|
|
9
|
+
offlineTitle: string;
|
|
10
|
+
offlineHint: string;
|
|
11
|
+
retry: string;
|
|
12
|
+
};
|
|
13
|
+
en: {
|
|
14
|
+
pageTitle: string;
|
|
15
|
+
pageDescription: string;
|
|
16
|
+
empty: string;
|
|
17
|
+
savedOk: string;
|
|
18
|
+
saveError: string;
|
|
19
|
+
errorTitle: string;
|
|
20
|
+
offlineTitle: string;
|
|
21
|
+
offlineHint: string;
|
|
22
|
+
retry: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ListCommsSettingsResponse, SetCommsEnabledResponse, ValtechCommsPreferencesConfig } from './types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CommsPreferencesService {
|
|
6
|
+
private readonly http;
|
|
7
|
+
private readonly config;
|
|
8
|
+
private readonly baseUrl;
|
|
9
|
+
private readonly appId;
|
|
10
|
+
constructor(http: HttpClient, config: ValtechCommsPreferencesConfig | null);
|
|
11
|
+
list(): Observable<ListCommsSettingsResponse>;
|
|
12
|
+
setEnabled(templateId: string, enabled: boolean): Observable<SetCommsEnabledResponse>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommsPreferencesService, [null, { optional: true; }]>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommsPreferencesService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
|
+
import { ValtechCommsPreferencesConfig } from './types';
|
|
3
|
+
export declare const VALTECH_COMMS_PREFERENCES_CONFIG: InjectionToken<ValtechCommsPreferencesConfig>;
|
|
4
|
+
/**
|
|
5
|
+
* Provee el servicio de comms-preferences (ADR-089) a la aplicacion Angular.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* bootstrapApplication(AppComponent, {
|
|
9
|
+
* providers: [
|
|
10
|
+
* provideValtechCommsPreferences({ apiUrl: environment.apiUrl, appId: 'bingo' }),
|
|
11
|
+
* ],
|
|
12
|
+
* });
|
|
13
|
+
*/
|
|
14
|
+
export declare function provideValtechCommsPreferences(config: ValtechCommsPreferencesConfig): EnvironmentProviders;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ValtechCommsPreferencesConfig {
|
|
2
|
+
apiUrl: string;
|
|
3
|
+
appId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CommunicationSetting {
|
|
6
|
+
templateId: string;
|
|
7
|
+
label: string;
|
|
8
|
+
labelEn: string;
|
|
9
|
+
audience: string;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
isDefault: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ListCommsSettingsResponse {
|
|
14
|
+
operationId: string;
|
|
15
|
+
settings: CommunicationSetting[];
|
|
16
|
+
}
|
|
17
|
+
export interface SetCommsEnabledResponse {
|
|
18
|
+
operationId: string;
|
|
19
|
+
templateId: string;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -498,6 +498,9 @@ export * from './lib/components/molecules/content-reaction/content-reaction-moda
|
|
|
498
498
|
export * from './lib/components/molecules/content-reaction/types';
|
|
499
499
|
export * from './lib/services/reactions/index';
|
|
500
500
|
export * from './lib/services/collections';
|
|
501
|
+
export * from './lib/services/comms-preferences';
|
|
502
|
+
export * from './lib/components/organisms/comms-preferences-settings/comms-preferences-settings.component';
|
|
503
|
+
export * from './lib/components/organisms/comms-preferences-settings/types';
|
|
501
504
|
export * from './lib/services/entity-feed/index';
|
|
502
505
|
export * from './lib/components/molecules/reaction-bar/reaction-bar.component';
|
|
503
506
|
export * from './lib/components/molecules/reaction-bar/types';
|