valtech-components 4.0.73 → 4.0.76
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/molecules/request-form/request-form.component.mjs +229 -0
- package/esm2022/lib/components/molecules/request-form/types.mjs +2 -0
- package/esm2022/lib/components/organisms/organization-view/organization-view.component.mjs +2 -2
- package/esm2022/lib/components/organisms/organization-view/organization-view.i18n.mjs +6 -6
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +317 -103
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/request-form/request-form.component.d.ts +28 -0
- package/lib/components/molecules/request-form/types.d.ts +32 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { I18nService } from '../../../services/i18n';
|
|
3
|
+
import { FormMetadata, FormSubmit } from '../../types';
|
|
4
|
+
import { AttachmentItem } from '../../organisms/attachment-uploader/types';
|
|
5
|
+
import { RequestFormMetadata, RequestSubmitEvent } from './types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class RequestFormComponent implements OnInit {
|
|
8
|
+
props: RequestFormMetadata;
|
|
9
|
+
onSubmit: EventEmitter<RequestSubmitEvent>;
|
|
10
|
+
onCancel: EventEmitter<void>;
|
|
11
|
+
protected i18n: I18nService;
|
|
12
|
+
private requestService;
|
|
13
|
+
private feedbackService;
|
|
14
|
+
formProps: FormMetadata;
|
|
15
|
+
isSubmitting: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
isSuccess: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
error: import("@angular/core").WritableSignal<string>;
|
|
18
|
+
private currentAttachments;
|
|
19
|
+
constructor();
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
private buildFormProps;
|
|
22
|
+
handleFormSubmit(submitted: FormSubmit): Promise<void>;
|
|
23
|
+
onAttachmentsChange(items: AttachmentItem[]): void;
|
|
24
|
+
onCancelClick(): void;
|
|
25
|
+
protected t(key: string): string;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RequestFormComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RequestFormComponent, "val-request-form", never, { "props": { "alias": "props"; "required": false; }; }, { "onSubmit": "onSubmit"; "onCancel": "onCancel"; }, never, never, true, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AppRequest } from '../../../services/requests/types';
|
|
2
|
+
export interface RequestFormMetadata {
|
|
3
|
+
/** Request type identifier (e.g. 'support_ticket', 'feature_request'). Required. */
|
|
4
|
+
type: string;
|
|
5
|
+
/** Label for the title field */
|
|
6
|
+
titleLabel?: string;
|
|
7
|
+
/** Placeholder for the title field */
|
|
8
|
+
titlePlaceholder?: string;
|
|
9
|
+
/** Label for the description field */
|
|
10
|
+
descriptionLabel?: string;
|
|
11
|
+
/** Placeholder for the description field */
|
|
12
|
+
descriptionPlaceholder?: string;
|
|
13
|
+
/** Submit button text */
|
|
14
|
+
submitButtonText?: string;
|
|
15
|
+
/** Cancel button text — if omitted, no cancel button is shown */
|
|
16
|
+
cancelButtonText?: string;
|
|
17
|
+
/** Show attachment uploader (default: true) */
|
|
18
|
+
showAttachments?: boolean;
|
|
19
|
+
/** Custom success message — overrides i18n default */
|
|
20
|
+
successMessage?: string;
|
|
21
|
+
/** Compact mode (less spacing) */
|
|
22
|
+
compact?: boolean;
|
|
23
|
+
/** Additional CSS class for the wrapper */
|
|
24
|
+
cssClass?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface RequestSubmitEvent {
|
|
27
|
+
requestId: string;
|
|
28
|
+
request: AppRequest;
|
|
29
|
+
type: string;
|
|
30
|
+
title: string;
|
|
31
|
+
attachmentUrls?: string[];
|
|
32
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -392,6 +392,8 @@ export * from './lib/components/organisms/whatsapp-fab/whatsapp-fab.component';
|
|
|
392
392
|
export * from './lib/services/donation';
|
|
393
393
|
export * from './lib/components/molecules/feedback-form/feedback-form.component';
|
|
394
394
|
export * from './lib/components/molecules/feedback-form/types';
|
|
395
|
+
export * from './lib/components/molecules/request-form/request-form.component';
|
|
396
|
+
export * from './lib/components/molecules/request-form/types';
|
|
395
397
|
export * from './lib/components/molecules/content-reaction/content-reaction.component';
|
|
396
398
|
export * from './lib/components/molecules/content-reaction/types';
|
|
397
399
|
export * from './lib/services/splash-screen';
|