@ngrdt/forms 0.0.39 → 0.0.42

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/index.d.ts CHANGED
@@ -233,27 +233,28 @@ declare class RdtOfflineSelectDatasource<TValue extends string | number> extends
233
233
  protected preprocessLabel(label: string): string;
234
234
  protected preprocessData(data: RdtLabelValue<TValue>[]): RdtLabelValue<TValue>[];
235
235
  protected filterData(query: string | null): RdtLabelValue<TValue>[];
236
- protected getPage(data: RdtLabelValue<TValue>[], pageIndex: number, pageSize: number): RdtSelectPage<RdtLabelValue<TValue>>;
237
236
  }
238
237
 
239
238
  declare abstract class RdtSelectOfflineDatasourceProviderDirective<TValue extends string | number> {
240
239
  readonly store: {
240
+ initialized: _angular_core.Signal<boolean>;
241
241
  query: _angular_core.Signal<string | null>;
242
242
  nextPageIndex: _angular_core.Signal<number | null>;
243
243
  pageSize: _angular_core.Signal<number>;
244
244
  totalCount: _angular_core.Signal<number>;
245
245
  totalCountKnown: _angular_core.Signal<boolean>;
246
- options: _angular_core.Signal<RdtLabelValueId<any, any>[]>;
246
+ options: _angular_core.Signal<_ngrdt_forms.RdtLabelValueId<any, any>[]>;
247
247
  datasource: _angular_core.Signal<_ngrdt_forms.RdtSelectDatasource<any, any> | null>;
248
- selectedMap: _angular_core.Signal<Map<any, RdtLabelValueId<any, any>>>;
248
+ selectedMap: _angular_core.Signal<Map<any, _ngrdt_forms.RdtLabelValueId<any, any>>>;
249
249
  fetchError: _angular_core.Signal<any>;
250
250
  missingValuePlaceholder: _angular_core.Signal<string>;
251
251
  hasMore: _angular_core.Signal<boolean>;
252
- selectedItems: _angular_core.Signal<RdtLabelValueId<any, any>[]>;
252
+ selectedItems: _angular_core.Signal<_ngrdt_forms.RdtLabelValueId<any, any>[]>;
253
253
  loadingOptions: _angular_core.Signal<boolean>;
254
254
  loadingMissing: _angular_core.Signal<boolean>;
255
255
  loading: _angular_core.Signal<boolean>;
256
- visibleOptions: _angular_core.Signal<RdtRenderedSelectOption<any, any>[]>;
256
+ visibleOptions: _angular_core.Signal<_ngrdt_forms.RdtRenderedSelectOption<any, any>[]>;
257
+ init: (initialValue: any[] | null) => void;
257
258
  fetch: () => void;
258
259
  setDatasource: (datasource: _ngrdt_forms.RdtSelectDatasource<any, any>) => void;
259
260
  setQuery: (query: string | null) => void;
@@ -268,14 +269,15 @@ declare abstract class RdtSelectOfflineDatasourceProviderDirective<TValue extend
268
269
  isSelected: (item: any) => boolean;
269
270
  setPageSize: (size: number) => void;
270
271
  } & _ngrx_signals.StateSource<{
272
+ initialized: boolean;
271
273
  query: string | null;
272
274
  nextPageIndex: number | null;
273
275
  pageSize: number;
274
276
  totalCount: number;
275
277
  totalCountKnown: boolean;
276
- options: RdtLabelValueId<any, any>[];
278
+ options: _ngrdt_forms.RdtLabelValueId<any, any>[];
277
279
  datasource: _ngrdt_forms.RdtSelectDatasource<any, any> | null;
278
- selectedMap: Map<any, RdtLabelValueId<any, any>>;
280
+ selectedMap: Map<any, _ngrdt_forms.RdtLabelValueId<any, any>>;
279
281
  fetchError: any | null;
280
282
  missingValuePlaceholder: string;
281
283
  }>;
@@ -305,6 +307,7 @@ declare class RdtSelectOptionDirective<TValue> implements Highlightable {
305
307
  }
306
308
 
307
309
  interface RdtSelectState<TItem, TId> {
310
+ initialized: boolean;
308
311
  query: string | null;
309
312
  nextPageIndex: number | null;
310
313
  pageSize: number;
@@ -322,6 +325,7 @@ interface RdtSelectState<TItem, TId> {
322
325
  declare const rdtSelectInitialState: RdtSelectState<any, any>;
323
326
 
324
327
  declare function getRdtSelectStore<T, TId>(initialState?: RdtSelectState<any, any>): _angular_core.Type<{
328
+ initialized: _angular_core.Signal<boolean>;
325
329
  query: _angular_core.Signal<string | null>;
326
330
  nextPageIndex: _angular_core.Signal<number | null>;
327
331
  pageSize: _angular_core.Signal<number>;
@@ -338,6 +342,7 @@ declare function getRdtSelectStore<T, TId>(initialState?: RdtSelectState<any, an
338
342
  loadingMissing: _angular_core.Signal<boolean>;
339
343
  loading: _angular_core.Signal<boolean>;
340
344
  visibleOptions: _angular_core.Signal<RdtRenderedSelectOption<T, TId>[]>;
345
+ init: (initialValue: TId[] | null) => void;
341
346
  fetch: () => void;
342
347
  setDatasource: (datasource: RdtSelectDatasource<T, TId>) => void;
343
348
  setQuery: (query: string | null) => void;
@@ -352,6 +357,7 @@ declare function getRdtSelectStore<T, TId>(initialState?: RdtSelectState<any, an
352
357
  isSelected: (item: T) => boolean;
353
358
  setPageSize: (size: number) => void;
354
359
  } & _ngrx_signals.StateSource<{
360
+ initialized: boolean;
355
361
  query: string | null;
356
362
  nextPageIndex: number | null;
357
363
  pageSize: number;
@@ -364,6 +370,7 @@ declare function getRdtSelectStore<T, TId>(initialState?: RdtSelectState<any, an
364
370
  missingValuePlaceholder: string;
365
371
  }>>;
366
372
  declare const RdtSelectStore: _angular_core.Type<{
373
+ initialized: _angular_core.Signal<boolean>;
367
374
  query: _angular_core.Signal<string | null>;
368
375
  nextPageIndex: _angular_core.Signal<number | null>;
369
376
  pageSize: _angular_core.Signal<number>;
@@ -380,6 +387,7 @@ declare const RdtSelectStore: _angular_core.Type<{
380
387
  loadingMissing: _angular_core.Signal<boolean>;
381
388
  loading: _angular_core.Signal<boolean>;
382
389
  visibleOptions: _angular_core.Signal<RdtRenderedSelectOption<any, any>[]>;
390
+ init: (initialValue: any[] | null) => void;
383
391
  fetch: () => void;
384
392
  setDatasource: (datasource: RdtSelectDatasource<any, any>) => void;
385
393
  setQuery: (query: string | null) => void;
@@ -394,6 +402,7 @@ declare const RdtSelectStore: _angular_core.Type<{
394
402
  isSelected: (item: any) => boolean;
395
403
  setPageSize: (size: number) => void;
396
404
  } & _ngrx_signals.StateSource<{
405
+ initialized: boolean;
397
406
  query: string | null;
398
407
  nextPageIndex: number | null;
399
408
  pageSize: number;
@@ -410,7 +419,7 @@ type RdtSelectStore<T = any, TId = number> = InstanceType<ReturnType<typeof getR
410
419
  declare abstract class RdtBaseSelectCommonComponent<TItem, TId, TOut> extends RdtBaseFormInputComponent<TOut> {
411
420
  readonly datasourceInput: _angular_core.InputSignal<RdtSelectDatasource<TItem, TId> | null>;
412
421
  readonly store: RdtSelectStore<TItem, TId>;
413
- readonly visibleOptions: _angular_core.Signal<RdtRenderedSelectOption<TItem, TId>[]>;
422
+ readonly visibleOptions: _angular_core.Signal<_ngrdt_forms.RdtRenderedSelectOption<TItem, TId>[]>;
414
423
  readonly queryValidatorFnInput: _angular_core.InputSignal<Nullable<ValidatorFn | ValidatorFn[]>>;
415
424
  readonly queryValidatorFn: _angular_core.WritableSignal<Nullable<ValidatorFn | ValidatorFn[]>>;
416
425
  private readonly queryValidatorEffect;
@@ -431,19 +440,21 @@ declare abstract class RdtBaseSelectCommonComponent<TItem, TId, TOut> extends Rd
431
440
  }
432
441
 
433
442
  declare abstract class RdtMultiSelectComponent<TItem, TId> extends RdtBaseSelectCommonComponent<TItem, TId, TId[]> {
434
- readonly selected: _angular_core.Signal<RdtLabelValueId<TItem, TId>[] | null>;
443
+ readonly selected: _angular_core.Signal<_ngrdt_forms.RdtLabelValueId<TItem, TId>[] | null>;
435
444
  protected isEmpty(value: TId[]): boolean;
436
445
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtMultiSelectComponent<any, any>, never>;
437
446
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdtMultiSelectComponent<any, any>, never, never, {}, {}, never, never, true, never>;
438
447
  }
439
448
 
440
449
  declare abstract class RdtSingleSelectComponent<TItem, TId> extends RdtBaseSelectCommonComponent<TItem, TId, TId> {
441
- readonly selected: _angular_core.Signal<RdtLabelValueId<TItem, TId> | null>;
450
+ readonly selected: _angular_core.Signal<_ngrdt_forms.RdtLabelValueId<TItem, TId> | null>;
442
451
  protected isEmpty(value: TId): boolean;
443
452
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdtSingleSelectComponent<any, any>, never>;
444
453
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdtSingleSelectComponent<any, any>, never, never, {}, {}, never, never, true, never>;
445
454
  }
446
455
 
456
+ declare function getRdtSelectPage<TValue>(data: RdtLabelValue<TValue>[], pageIndex: number, pageSize: number): RdtSelectPage<RdtLabelValue<TValue>>;
457
+
447
458
  type RdtInputType = 'text' | 'number' | 'email' | 'password';
448
459
 
449
460
  declare abstract class RdtTextInputComponent extends RdtBaseFormInputComponent<string, string> {
@@ -486,5 +497,5 @@ declare class RdtCommonValidators {
486
497
  static cannotContainAccents: ValidatorFn;
487
498
  }
488
499
 
489
- export { NO_OP_FILE_READER, NoOpFileReader, RDT_DEFAULT_FILE_LABEL_FN, RDT_DEFAULT_FILE_READER, RDT_DEFAULT_MAX_FILE_SIZE, RdtBaseFormInputComponent, RdtBaseSelectCommonComponent, RdtCheckboxComponent, RdtCommonValidators, RdtDateComponent, RdtDateValidators, RdtFileInputComponent, RdtFileReader, RdtFileReaderArrayBuffer, RdtFileReaderBase64, RdtMultiSelectComponent, RdtNumericInputComponent, RdtOfflineSelectDatasource, RdtSelectDatasource, RdtSelectOfflineDatasourceProviderDirective, RdtSelectOptionDirective, RdtSelectStore, RdtSingleSelectComponent, RdtTextInputComponent, VnshFileReaderText, czechFileLabelFn, rdtSelectInitialState };
490
- export type { RdtDateType, RdtFileLabelFn, RdtSelectPage, RdtSelectState };
500
+ export { NO_OP_FILE_READER, NoOpFileReader, RDT_DEFAULT_FILE_LABEL_FN, RDT_DEFAULT_FILE_READER, RDT_DEFAULT_MAX_FILE_SIZE, RdtBaseFormInputComponent, RdtBaseSelectCommonComponent, RdtCheckboxComponent, RdtCommonValidators, RdtDateComponent, RdtDateValidators, RdtFileInputComponent, RdtFileReader, RdtFileReaderArrayBuffer, RdtFileReaderBase64, RdtMultiSelectComponent, RdtNumericInputComponent, RdtOfflineSelectDatasource, RdtSelectDatasource, RdtSelectOfflineDatasourceProviderDirective, RdtSelectOptionDirective, RdtSelectStore, RdtSingleSelectComponent, RdtTextInputComponent, VnshFileReaderText, czechFileLabelFn, getRdtSelectPage, rdtSelectInitialState };
501
+ export type { RdtDateType, RdtFileLabelFn, 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.39",
3
+ "version": "0.0.42",
4
4
  "peerDependencies": {
5
- "@ngrdt/core": "^0.0.39",
6
- "@ngrdt/utils": "^0.0.39",
5
+ "@ngrdt/core": "^0.0.42",
6
+ "@ngrdt/utils": "^0.0.42",
7
7
  "@angular/core": ">=18.2.0",
8
8
  "@angular/forms": ">=18.2.0",
9
9
  "rxjs": ">=7.0.0",