@ngrdt/forms 0.0.78 → 0.0.81
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/fesm2022/ngrdt-forms.mjs +97 -41
- package/fesm2022/ngrdt-forms.mjs.map +1 -1
- package/index.d.ts +15 -5
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnDestroy, Injector, Signal, Type, InjectionToken, PipeTransform } from '@angular/core';
|
|
3
3
|
import * as _angular_forms from '@angular/forms';
|
|
4
4
|
import { ControlValueAccessor, AbstractControl, ValidationErrors, NgControl, FormControl, ValidatorFn } from '@angular/forms';
|
|
5
|
-
import { RdtInteractiveElementComponent, RdtComponentOutletDirective } from '@ngrdt/core';
|
|
5
|
+
import { RdtInteractiveElementComponent, RdtComponentOutletDirective, RdtTranslateService } from '@ngrdt/core';
|
|
6
6
|
import { Nullable, RdtBaseFormInputComponentInputsInt, RdtFile, RdtMimeType, RdtCombinedMimeType, AllEncodingAliases } from '@ngrdt/utils';
|
|
7
7
|
import * as _ngrdt_forms from '@ngrdt/forms';
|
|
8
8
|
import * as rxjs from 'rxjs';
|
|
@@ -184,7 +184,7 @@ declare class VnshFileReaderText extends RdtFileReader<string> {
|
|
|
184
184
|
|
|
185
185
|
declare const RDT_DEFAULT_FILE_READER: InjectionToken<RdtFileReader<unknown>>;
|
|
186
186
|
|
|
187
|
-
declare function
|
|
187
|
+
declare function fileLabelTranslate(translate: RdtTranslateService, files: RdtFile[]): string;
|
|
188
188
|
type RdtFileLabelFn = (files: RdtFile[]) => string;
|
|
189
189
|
declare const RDT_DEFAULT_FILE_LABEL_FN: InjectionToken<RdtFileLabelFn>;
|
|
190
190
|
|
|
@@ -293,6 +293,7 @@ declare abstract class RdtSelectOfflineDatasourceProviderDirective<TValue extend
|
|
|
293
293
|
datasource: _angular_core.Signal<_ngrdt_forms.RdtSelectDatasource<any, any> | null>;
|
|
294
294
|
selectedMap: _angular_core.Signal<Map<any, _ngrdt_forms.RdtLabelValueId<any, any>>>;
|
|
295
295
|
fetchError: _angular_core.Signal<any>;
|
|
296
|
+
loadingValuePlaceholder: _angular_core.Signal<string>;
|
|
296
297
|
missingValuePlaceholder: _angular_core.Signal<string>;
|
|
297
298
|
hasMore: _angular_core.Signal<boolean>;
|
|
298
299
|
selectedItems: _angular_core.Signal<_ngrdt_forms.RdtLabelValueId<any, any>[]>;
|
|
@@ -325,6 +326,7 @@ declare abstract class RdtSelectOfflineDatasourceProviderDirective<TValue extend
|
|
|
325
326
|
datasource: _ngrdt_forms.RdtSelectDatasource<any, any> | null;
|
|
326
327
|
selectedMap: Map<any, _ngrdt_forms.RdtLabelValueId<any, any>>;
|
|
327
328
|
fetchError: any | null;
|
|
329
|
+
loadingValuePlaceholder: string;
|
|
328
330
|
missingValuePlaceholder: string;
|
|
329
331
|
}>;
|
|
330
332
|
readonly optionsInput: _angular_core.InputSignal<RdtLabelValue<TValue>[] | TValue[] | undefined>;
|
|
@@ -364,10 +366,12 @@ interface RdtSelectState<TItem, TId> {
|
|
|
364
366
|
datasource: RdtSelectDatasource<TItem, TId> | null;
|
|
365
367
|
selectedMap: Map<TId, RdtLabelValueId<TItem, TId>>;
|
|
366
368
|
fetchError: any | null;
|
|
369
|
+
loadingValuePlaceholder: string;
|
|
367
370
|
missingValuePlaceholder: string;
|
|
368
371
|
_fetchRequest: RdtSelectFetchRequest | null;
|
|
369
372
|
_fetchMissingRequest: RdtSelectFetchMissingRequest<TId> | null;
|
|
370
373
|
_missingSelected: TId[];
|
|
374
|
+
_unfetchableIds: TId[];
|
|
371
375
|
}
|
|
372
376
|
declare const rdtSelectInitialState: RdtSelectState<any, any>;
|
|
373
377
|
|
|
@@ -382,6 +386,7 @@ declare function getRdtSelectStore<T, TId>(initialState?: RdtSelectState<any, an
|
|
|
382
386
|
datasource: _angular_core.Signal<RdtSelectDatasource<T, TId> | null>;
|
|
383
387
|
selectedMap: _angular_core.Signal<Map<TId, RdtLabelValueId<T, TId>>>;
|
|
384
388
|
fetchError: _angular_core.Signal<any>;
|
|
389
|
+
loadingValuePlaceholder: _angular_core.Signal<string>;
|
|
385
390
|
missingValuePlaceholder: _angular_core.Signal<string>;
|
|
386
391
|
hasMore: _angular_core.Signal<boolean>;
|
|
387
392
|
selectedItems: _angular_core.Signal<RdtLabelValueId<T, TId>[]>;
|
|
@@ -414,6 +419,7 @@ declare function getRdtSelectStore<T, TId>(initialState?: RdtSelectState<any, an
|
|
|
414
419
|
datasource: RdtSelectDatasource<T, TId> | null;
|
|
415
420
|
selectedMap: Map<TId, RdtLabelValueId<T, TId>>;
|
|
416
421
|
fetchError: any | null;
|
|
422
|
+
loadingValuePlaceholder: string;
|
|
417
423
|
missingValuePlaceholder: string;
|
|
418
424
|
}>>;
|
|
419
425
|
declare const RdtSelectStore: _angular_core.Type<{
|
|
@@ -427,6 +433,7 @@ declare const RdtSelectStore: _angular_core.Type<{
|
|
|
427
433
|
datasource: _angular_core.Signal<RdtSelectDatasource<any, any> | null>;
|
|
428
434
|
selectedMap: _angular_core.Signal<Map<any, RdtLabelValueId<any, any>>>;
|
|
429
435
|
fetchError: _angular_core.Signal<any>;
|
|
436
|
+
loadingValuePlaceholder: _angular_core.Signal<string>;
|
|
430
437
|
missingValuePlaceholder: _angular_core.Signal<string>;
|
|
431
438
|
hasMore: _angular_core.Signal<boolean>;
|
|
432
439
|
selectedItems: _angular_core.Signal<RdtLabelValueId<any, any>[]>;
|
|
@@ -459,6 +466,7 @@ declare const RdtSelectStore: _angular_core.Type<{
|
|
|
459
466
|
datasource: RdtSelectDatasource<any, any> | null;
|
|
460
467
|
selectedMap: Map<any, RdtLabelValueId<any, any>>;
|
|
461
468
|
fetchError: any | null;
|
|
469
|
+
loadingValuePlaceholder: string;
|
|
462
470
|
missingValuePlaceholder: string;
|
|
463
471
|
}>>;
|
|
464
472
|
type RdtSelectStore<T = any, TId = number> = InstanceType<ReturnType<typeof getRdtSelectStore<T, TId>>>;
|
|
@@ -482,12 +490,13 @@ declare abstract class RdtBaseSelectCommonComponent<TItem, TId, TOut extends TId
|
|
|
482
490
|
readonly pageSizeInput: _angular_core.InputSignal<number>;
|
|
483
491
|
private readonly pageSizeEffect;
|
|
484
492
|
readonly loading: _angular_core.Signal<boolean>;
|
|
493
|
+
private readonly datasourceEffect;
|
|
485
494
|
ngOnInit(): void;
|
|
486
495
|
protected handleInput(value: string | null): void;
|
|
487
496
|
protected readonly storeValueChangeEffect: _angular_core.EffectRef;
|
|
488
497
|
protected readonly externalValueEffect: _angular_core.EffectRef;
|
|
489
498
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtBaseSelectCommonComponent<any, any, any>, never>;
|
|
490
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdtBaseSelectCommonComponent<any, any, any>, never, never, { "manualInitInput": { "alias": "manualInit"; "required": false; "isSignal": true; }; "datasourceInput": { "alias": "
|
|
499
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdtBaseSelectCommonComponent<any, any, any>, never, never, { "manualInitInput": { "alias": "manualInit"; "required": false; "isSignal": true; }; "datasourceInput": { "alias": "datasource"; "required": false; "isSignal": true; }; "queryValidatorFnInput": { "alias": "inputValidator"; "required": false; "isSignal": true; }; "debounceTimeInput": { "alias": "debounce"; "required": false; "isSignal": true; }; "pageSizeInput": { "alias": "pageSize"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
491
500
|
}
|
|
492
501
|
|
|
493
502
|
declare abstract class RdtMultiSelectComponent<TItem, TId> extends RdtBaseSelectCommonComponent<TItem, TId, TId[]> {
|
|
@@ -533,7 +542,7 @@ type RdtErrorValue = {
|
|
|
533
542
|
key: string;
|
|
534
543
|
value: string;
|
|
535
544
|
} | null;
|
|
536
|
-
type ErrorCodesFn = (value?: any) => string;
|
|
545
|
+
type ErrorCodesFn = (value?: any) => string | string[];
|
|
537
546
|
|
|
538
547
|
interface RdtFormErrorCodeMap {
|
|
539
548
|
required: ErrorCodesFn;
|
|
@@ -548,6 +557,7 @@ interface RdtFormErrorCodeMap {
|
|
|
548
557
|
declare function getFirstError(errors: ValidationErrors): RdtErrorValue;
|
|
549
558
|
declare const defaultRdtFormErrorCodes: RdtFormErrorCodeMap;
|
|
550
559
|
declare class RdtFormErrorPipe implements PipeTransform {
|
|
560
|
+
private translateService;
|
|
551
561
|
private readonly errorCodes;
|
|
552
562
|
transform(errors: ValidationErrors | undefined | null): string;
|
|
553
563
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtFormErrorPipe, never>;
|
|
@@ -585,5 +595,5 @@ declare class RdtCommonValidators {
|
|
|
585
595
|
static cannotContainAccents: ValidatorFn;
|
|
586
596
|
}
|
|
587
597
|
|
|
588
|
-
export { NO_OP_FILE_READER, NoOpFileReader, RDT_CHECKBOX_BASE_PROVIDER, RDT_DEFAULT_FILE_LABEL_FN, RDT_DEFAULT_FILE_READER, RDT_DEFAULT_MAX_FILE_SIZE, RDT_FORM_ERROR_CODES_PROVIDER, RdtBaseFormInputComponent, RdtBaseSelectCommonComponent, RdtCheckboxComponent, RdtCheckboxOutletDirective, RdtCommonValidators, RdtDateComponent, RdtDateValidators, RdtFileInputComponent, RdtFileReader, RdtFileReaderArrayBuffer, RdtFileReaderBase64, RdtFormErrorPipe, RdtFormInputOutletDirective, RdtMultiSelectComponent, RdtNumericInputComponent, RdtOfflineSelectDatasource, RdtSelectDatasource, RdtSelectOfflineDatasourceProviderDirective, RdtSelectOptionDirective, RdtSelectStore, RdtSingleSelectComponent, RdtTextAreaComponent, RdtTextInputComponent, VnshFileReaderText,
|
|
598
|
+
export { NO_OP_FILE_READER, NoOpFileReader, RDT_CHECKBOX_BASE_PROVIDER, RDT_DEFAULT_FILE_LABEL_FN, RDT_DEFAULT_FILE_READER, RDT_DEFAULT_MAX_FILE_SIZE, RDT_FORM_ERROR_CODES_PROVIDER, RdtBaseFormInputComponent, RdtBaseSelectCommonComponent, RdtCheckboxComponent, RdtCheckboxOutletDirective, RdtCommonValidators, RdtDateComponent, RdtDateValidators, RdtFileInputComponent, RdtFileReader, RdtFileReaderArrayBuffer, RdtFileReaderBase64, RdtFormErrorPipe, RdtFormInputOutletDirective, RdtMultiSelectComponent, RdtNumericInputComponent, RdtOfflineSelectDatasource, RdtSelectDatasource, RdtSelectOfflineDatasourceProviderDirective, RdtSelectOptionDirective, RdtSelectStore, RdtSingleSelectComponent, RdtTextAreaComponent, RdtTextInputComponent, VnshFileReaderText, defaultRdtFormErrorCodes, fileLabelTranslate, getFirstError, getRdtSelectPage, rdtSelectInitialState };
|
|
589
599
|
export type { ErrorCodesFn, RdtCheckboxInputInt, RdtDateType, RdtErrorValue, RdtFileLabelFn, RdtFormErrorCodeMap, RdtLabelValue, RdtLabelValueId, RdtRenderedSelectOption, RdtSelectPage, RdtSelectRequestParams, RdtSelectState };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrdt/forms",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@ngrdt/core": "^0.0.
|
|
6
|
-
"@ngrdt/utils": "^0.0.
|
|
5
|
+
"@ngrdt/core": "^0.0.81",
|
|
6
|
+
"@ngrdt/utils": "^0.0.81",
|
|
7
7
|
"@angular/core": ">=20.0.0",
|
|
8
8
|
"@angular/forms": ">=20.0.0",
|
|
9
9
|
"rxjs": ">=7.0.0",
|