valtech-components 2.0.940 → 2.0.942
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/member-card/member-card.component.mjs +102 -0
- package/esm2022/lib/components/molecules/member-card/types.mjs +5 -0
- package/esm2022/lib/components/organisms/attachment-uploader/attachment-uploader.component.mjs +6 -3
- package/esm2022/lib/components/organisms/attachment-uploader/types.mjs +1 -1
- package/esm2022/lib/components/organisms/form/form.component.mjs +51 -6
- package/esm2022/lib/components/types.mjs +2 -1
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +156 -9
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/member-card/member-card.component.d.ts +25 -0
- package/lib/components/molecules/member-card/types.d.ts +19 -0
- package/lib/components/organisms/attachment-uploader/types.d.ts +2 -0
- package/lib/components/organisms/form/form.component.d.ts +10 -0
- package/lib/components/types.d.ts +4 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MemberCardMetadata } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MemberCardComponent {
|
|
5
|
+
readonly props: import("@angular/core").InputSignal<MemberCardMetadata>;
|
|
6
|
+
/** Emitted when the trailing action button is clicked. */
|
|
7
|
+
onAction: EventEmitter<string>;
|
|
8
|
+
protected config: import("@angular/core").Signal<{
|
|
9
|
+
id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
handle?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
avatarUrl?: string;
|
|
14
|
+
roleLabel?: string;
|
|
15
|
+
showAction?: boolean;
|
|
16
|
+
actionIcon?: string;
|
|
17
|
+
actionAriaLabel?: string;
|
|
18
|
+
}>;
|
|
19
|
+
protected displayName: import("@angular/core").Signal<string>;
|
|
20
|
+
protected subtitle: import("@angular/core").Signal<string>;
|
|
21
|
+
constructor();
|
|
22
|
+
emitAction(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MemberCardComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MemberCardComponent, "val-member-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Props for `val-member-card` — a reusable person/member row with avatar,
|
|
2
|
+
* name, secondary line (handle or email), optional role pill and an action. */
|
|
3
|
+
export interface MemberCardMetadata {
|
|
4
|
+
/** Optional identifier echoed back on the action event. */
|
|
5
|
+
id?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
handle?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
avatarUrl?: string;
|
|
10
|
+
/** Already-translated role label shown as a pill below the name. */
|
|
11
|
+
roleLabel?: string;
|
|
12
|
+
/** Show the trailing action button. */
|
|
13
|
+
showAction?: boolean;
|
|
14
|
+
/** Ionicon name for the action button. */
|
|
15
|
+
actionIcon?: string;
|
|
16
|
+
/** Accessible label for the action button. */
|
|
17
|
+
actionAriaLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const MEMBER_CARD_DEFAULTS: Partial<MemberCardMetadata>;
|
|
@@ -11,4 +11,6 @@ export interface AttachmentUploaderMetadata {
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
/** Compress images before upload (default: true). PDFs are never compressed. */
|
|
13
13
|
compressImages?: boolean;
|
|
14
|
+
/** Upload function. If omitted, falls back to FeedbackService.uploadAttachment. */
|
|
15
|
+
uploadFn?: (file: File) => Promise<string>;
|
|
14
16
|
}
|
|
@@ -2,6 +2,7 @@ import { DoCheck, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } f
|
|
|
2
2
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { TextareaInputMetadata } from '../../molecules/textarea-input/types';
|
|
4
4
|
import { UsernameInputMetadata } from '../../molecules/username-input/types';
|
|
5
|
+
import { AttachmentItem } from '../attachment-uploader/types';
|
|
5
6
|
import { ButtonMetadata, FormMetadata, FormSubmit, InputMetadata, InputType } from '../../types';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
@@ -16,6 +17,12 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
|
16
17
|
}>;
|
|
17
18
|
form: FormGroup;
|
|
18
19
|
types: typeof InputType;
|
|
20
|
+
states: {
|
|
21
|
+
ENABLED: "ENABLED";
|
|
22
|
+
DISABLED: "DISABLED";
|
|
23
|
+
WORKING: "WORKING";
|
|
24
|
+
ERROR: "ERROR";
|
|
25
|
+
};
|
|
19
26
|
private subscriptions;
|
|
20
27
|
private actionsCache;
|
|
21
28
|
private fieldPropMemo;
|
|
@@ -23,6 +30,8 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
|
23
30
|
private textareaPropMemo;
|
|
24
31
|
private selectPropMemo;
|
|
25
32
|
private previousState;
|
|
33
|
+
private previousUploadingCount;
|
|
34
|
+
private uploadingFields;
|
|
26
35
|
constructor(fb: FormBuilder, elementRef: ElementRef);
|
|
27
36
|
ngOnInit(): void;
|
|
28
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -38,6 +47,7 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
|
|
|
38
47
|
ngOnDestroy(): void;
|
|
39
48
|
trackSelectChanges(fieldName: string): void;
|
|
40
49
|
submitHandler(token?: string): Promise<void>;
|
|
50
|
+
onAttachmentChange(fieldName: string, items: AttachmentItem[]): void;
|
|
41
51
|
getControl(field: string): FormControl;
|
|
42
52
|
getFieldProp(field: InputMetadata): InputMetadata;
|
|
43
53
|
/**
|
|
@@ -62,7 +62,8 @@ export declare enum InputType {
|
|
|
62
62
|
PHONE = 20,
|
|
63
63
|
CURRENCY = 21,
|
|
64
64
|
CHECKBOX_RADIO = 22,
|
|
65
|
-
HANDLE = 23
|
|
65
|
+
HANDLE = 23,
|
|
66
|
+
ATTACHMENT = 24
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
68
69
|
* Option for select, radio, etc. inputs.
|
|
@@ -158,6 +159,8 @@ export type InputMetadata = {
|
|
|
158
159
|
autoFocus?: boolean;
|
|
159
160
|
/** Custom input styles (only for PIN_CODE type) */
|
|
160
161
|
inputStyles?: Record<string, string>;
|
|
162
|
+
/** Upload function (only for ATTACHMENT type). Receives a File, must resolve to the uploaded URL. */
|
|
163
|
+
uploadFn?: (file: File) => Promise<string>;
|
|
161
164
|
};
|
|
162
165
|
/**
|
|
163
166
|
* A section in a form, grouping multiple fields.
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -175,6 +175,8 @@ export * from './lib/components/molecules/action-card/action-card.component';
|
|
|
175
175
|
export * from './lib/components/molecules/action-card/types';
|
|
176
176
|
export * from './lib/components/molecules/invitation-card/invitation-card.component';
|
|
177
177
|
export * from './lib/components/molecules/invitation-card/types';
|
|
178
|
+
export * from './lib/components/molecules/member-card/member-card.component';
|
|
179
|
+
export * from './lib/components/molecules/member-card/types';
|
|
178
180
|
export * from './lib/components/molecules/username-input/username-input.component';
|
|
179
181
|
export * from './lib/components/molecules/username-input/types';
|
|
180
182
|
export * from './lib/components/molecules/linked-providers/linked-providers.component';
|